kernel-Nat.Finset.exists_memB_of_card_pos
- Kind
- kernel-term
- Status
- checked
Supports: a positive cardinality yields a member below the set's own bound
cargo test --release -p axeyum-lean-kernel --lib -- nat_prelude::finset_singleton_tests:: --test-threads=4 Evidence notes
The proof is a decision on the loop `allBelow (fun k => notB (memB s k)) (bound s)`. A `false` verdict is handed to `allBelow_false_witness`, whose index is re-introduced unchanged after `notB (memB s k) = false` is read back as membership. A `true` verdict says every index below the bound is a non-member, so `Nat.countRange_eq_zero_of_all_false` collapses `card s` to zero and the positivity hypothesis becomes `Lt zero zero`, refuted by `Nat.lt_irrefl`. Nothing anywhere chooses; the recursion inside `allBelow_false_witness` IS the search.