Skip to content

Commit

Permalink
chore(SetTheory/Cardinal/Basic): add sections structuring the file be…
Browse files Browse the repository at this point in the history
…tter (#11603)

This file is overly long: add some sections to structure the material better.

And tweak one line break to be more logical.
  • Loading branch information
grunweg authored and atarnoam committed Apr 16, 2024
1 parent 15c372e commit d791774
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions Mathlib/SetTheory/Cardinal/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,7 @@ theorem lift_lt_aleph0 {c : Cardinal.{u}} : lift.{v} c < ℵ₀ ↔ c < ℵ₀ :
#align cardinal.lift_lt_aleph_0 Cardinal.lift_lt_aleph0

/-! ### Properties about the cast from `ℕ` -/
section castFromN

-- porting note (#10618): simp can prove this
-- @[simp]
Expand Down Expand Up @@ -1666,8 +1667,8 @@ theorem add_lt_aleph0 {a b : Cardinal} (ha : a < ℵ₀) (hb : b < ℵ₀) : a +
#align cardinal.add_lt_aleph_0 Cardinal.add_lt_aleph0

theorem add_lt_aleph0_iff {a b : Cardinal} : a + b < ℵ₀ ↔ a < ℵ₀ ∧ b < ℵ₀ :=
fun h => ⟨(self_le_add_right _ _).trans_lt h, (self_le_add_left _ _).trans_lt h⟩, fun ⟨h1, h2⟩ =>
add_lt_aleph0 h1 h2⟩
fun h => ⟨(self_le_add_right _ _).trans_lt h, (self_le_add_left _ _).trans_lt h⟩,
fun ⟨h1, h2⟩ => add_lt_aleph0 h1 h2⟩
#align cardinal.add_lt_aleph_0_iff Cardinal.add_lt_aleph0_iff

theorem aleph0_le_add_iff {a b : Cardinal} : ℵ₀ ≤ a + b ↔ ℵ₀ ≤ a ∨ ℵ₀ ≤ b := by
Expand Down Expand Up @@ -1829,8 +1830,6 @@ theorem ofNat_add_aleph0 {n : ℕ} [Nat.AtLeastTwo n] : no_index (OfNat.ofNat n)
theorem aleph0_add_ofNat {n : ℕ} [Nat.AtLeastTwo n] : ℵ₀ + no_index (OfNat.ofNat n) = ℵ₀ :=
aleph0_add_nat n

variable {c : Cardinal}

theorem exists_nat_eq_of_le_nat {c : Cardinal} {n : ℕ} (h : c ≤ n) : ∃ m, m ≤ n ∧ c = m := by
lift c to ℕ using h.trans_lt (nat_lt_aleph0 _)
exact ⟨c, mod_cast h, rfl⟩
Expand All @@ -1844,6 +1843,10 @@ theorem mk_pNat : #ℕ+ = ℵ₀ :=
mk_denumerable ℕ+
#align cardinal.mk_pnat Cardinal.mk_pNat

end castFromN

variable {c : Cardinal}

/-- **König's theorem** -/
theorem sum_lt_prod {ι} (f g : ι → Cardinal) (H : ∀ i, f i < g i) : sum f < prod g :=
lt_of_not_ge fun ⟨F⟩ => by
Expand All @@ -1864,6 +1867,9 @@ theorem sum_lt_prod {ι} (f g : ι → Cardinal) (H : ∀ i, f i < g i) : sum f
exact hc i a (congr_fun h _)
#align cardinal.sum_lt_prod Cardinal.sum_lt_prod

/-! Cardinalities of sets: cardinality of empty, finite sets, unions, subsets etc. -/
section sets

-- porting note (#10618): simp can prove this
-- @[simp]
theorem mk_empty : #Empty = 0 :=
Expand Down Expand Up @@ -2151,7 +2157,6 @@ theorem mk_union_le_aleph0 {α} {P Q : Set α} :
← countable_union]
#align cardinal.mk_union_le_aleph_0 Cardinal.mk_union_le_aleph0


theorem mk_subtype_of_equiv {α β : Type u} (p : β → Prop) (e : α ≃ β) :
#{ a : α // p (e a) } = #{ b : β // p b } :=
mk_congr (Equiv.subtypeEquivOfSubtype e)
Expand Down Expand Up @@ -2270,6 +2275,10 @@ theorem three_le {α : Type*} (h : 3 ≤ #α) (x : α) (y : α) : ∃ z : α, z
simpa [not_or] using this
#align cardinal.three_le Cardinal.three_le

end sets

section powerlt

/-- The function `a ^< b`, defined as the supremum of `a ^ c` for `c < b`. -/
def powerlt (a b : Cardinal.{u}) : Cardinal.{u} :=
⨆ c : Iio b, a ^ (c : Cardinal)
Expand Down Expand Up @@ -2323,6 +2332,8 @@ theorem powerlt_zero {a : Cardinal} : a ^< 0 = 0 := by
exact Subtype.isEmpty_of_false fun x => mem_Iio.not.mpr (Cardinal.zero_le x).not_lt
#align cardinal.powerlt_zero Cardinal.powerlt_zero

end powerlt

/-- The cardinality of a nontrivial module over a ring is at least the cardinality of the ring if
there are no zero divisors (for instance if the ring is a field) -/
theorem mk_le_of_module (R : Type u) (E : Type v)
Expand Down

0 comments on commit d791774

Please sign in to comment.