Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 133067c

Browse files
committed
feat(set_theory/cardinal_ordinal): cardinal.mk_finset_eq_mk (#3578)
1 parent 4a5e25c commit 133067c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/data/finset/basic.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,6 +1186,14 @@ rfl
11861186
@[simp] theorem to_finset_cons {a : α} {l : list α} : to_finset (a :: l) = insert a (to_finset l) :=
11871187
finset.eq_of_veq $ by by_cases h : a ∈ l; simp [finset.insert_val', multiset.erase_dup_cons, h]
11881188

1189+
theorem to_finset_surjective : function.surjective (to_finset : list α → finset α) :=
1190+
begin
1191+
refine λ s, ⟨quotient.out' s.val, finset.ext $ λ x, _⟩,
1192+
obtain ⟨l, hl⟩ := quot.exists_rep s.val,
1193+
rw [list.mem_to_finset, finset.mem_def, ←hl],
1194+
exact list.perm.mem_iff (quotient.mk_out l)
1195+
end
1196+
11891197
end list
11901198

11911199
namespace finset

src/set_theory/cardinal_ordinal.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,11 @@ calc mk (list α)
460460
... = max (omega) (mk α) : mul_eq_max (le_refl _) H1
461461
... = mk α : max_eq_right H1
462462

463+
theorem mk_finset_eq_mk {α : Type u} (h : omega ≤ mk α) : mk (finset α) = mk α :=
464+
eq.symm $ le_antisymm (mk_le_of_injective (λ x y, finset.singleton_inj.1)) $
465+
calc mk (finset α) ≤ mk (list α) : mk_le_of_surjective list.to_finset_surjective
466+
... = mk α : mk_list_eq_mk h
467+
463468
lemma mk_bounded_set_le_of_omega_le (α : Type u) (c : cardinal) (hα : omega ≤ mk α) :
464469
mk {t : set α // mk t ≤ c} ≤ mk α ^ c :=
465470
begin

0 commit comments

Comments
 (0)