Skip to content

Commit dd3f45b

Browse files
committed
feat(SetTheory/Ordinal/Arithmetic): (sInf sᶜ).card ≤ #s (#18780)
The cardinality of the least ordinal not in a set is at most the cardinality of the set.
1 parent 9e10768 commit dd3f45b

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

Mathlib/SetTheory/Ordinal/Arithmetic.lean

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,17 +1466,28 @@ theorem iSup_ord {ι} {f : ι → Cardinal} (hf : BddAbove (range f)) :
14661466
conv_lhs => change range (ord ∘ f)
14671467
rw [range_comp]
14681468

1469+
theorem lift_card_sInf_compl_le (s : Set Ordinal.{u}) :
1470+
Cardinal.lift.{u + 1} (sInf sᶜ).card ≤ #s := by
1471+
rw [← mk_Iio_ordinal]
1472+
refine mk_le_mk_of_subset fun x (hx : x < _) ↦ ?_
1473+
rw [← not_not_mem]
1474+
exact not_mem_of_lt_csInf' hx
1475+
1476+
theorem card_sInf_range_compl_le_lift {ι : Type u} (f : ι → Ordinal.{max u v}) :
1477+
(sInf (range f)ᶜ).card ≤ Cardinal.lift.{v} #ι := by
1478+
rw [← Cardinal.lift_le.{max u v + 1}, Cardinal.lift_lift]
1479+
apply (lift_card_sInf_compl_le _).trans
1480+
rw [← Cardinal.lift_id'.{u, max u v + 1} #(range _)]
1481+
exact mk_range_le_lift
1482+
1483+
theorem card_sInf_range_compl_le {ι : Type u} (f : ι → Ordinal.{u}) :
1484+
(sInf (range f)ᶜ).card ≤ #ι :=
1485+
Cardinal.lift_id #ι ▸ card_sInf_range_compl_le_lift f
1486+
14691487
theorem sInf_compl_lt_lift_ord_succ {ι : Type u} (f : ι → Ordinal.{max u v}) :
14701488
sInf (range f)ᶜ < lift.{v} (succ #ι).ord := by
1471-
by_contra! h
1472-
have : Iio (lift.{v} (succ #ι).ord) ⊆ range f := by
1473-
intro o ho
1474-
have := not_mem_of_lt_csInf' (ho.trans_le h)
1475-
rwa [not_mem_compl_iff] at this
1476-
have := mk_le_mk_of_subset this
1477-
rw [mk_Iio_ordinal, ← lift_card, Cardinal.lift_lift, card_ord, Cardinal.lift_succ,
1478-
succ_le_iff, ← Cardinal.lift_id'.{u, max (u + 1) (v + 1)} #_] at this
1479-
exact this.not_le mk_range_le_lift
1489+
rw [lift_ord, Cardinal.lift_succ, ← card_le_iff]
1490+
exact card_sInf_range_compl_le_lift f
14801491

14811492
theorem sInf_compl_lt_ord_succ {ι : Type u} (f : ι → Ordinal.{u}) :
14821493
sInf (range f)ᶜ < (succ #ι).ord :=

0 commit comments

Comments
 (0)