fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
principal_mul_ord {c : Cardinal} (hc : ℵ₀ ≤ c) : Principal (· * ·) c.ord := by intro a b ha hb rw [lt_ord, card_mul] at * exact mul_lt_of_lt hc ha hb
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Arithmetic", "Mathlib.SetTheory.Ordinal.Principal" ]
Mathlib/SetTheory/Cardinal/Ordinal.lean
principal_mul_ord
null
IsInitial.principal_mul {o : Ordinal} (h : IsInitial o) (ho : ω ≤ o) : Principal (· * ·) o := by rw [← h.ord_card] apply principal_mul_ord rwa [aleph0_le_card]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Arithmetic", "Mathlib.SetTheory.Ordinal.Principal" ]
Mathlib/SetTheory/Cardinal/Ordinal.lean
IsInitial.principal_mul
null
principal_mul_omega (o : Ordinal) : Principal (· * ·) (ω_ o) := (isInitial_omega o).principal_mul (omega0_le_omega o)
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Arithmetic", "Mathlib.SetTheory.Ordinal.Principal" ]
Mathlib/SetTheory/Cardinal/Ordinal.lean
principal_mul_omega
null
infinite_pigeonhole {β α : Type u} (f : β → α) (h₁ : ℵ₀ ≤ #β) (h₂ : #α < (#β).ord.cof) : ∃ a : α, #(f ⁻¹' {a}) = #β := by have : ∃ a, #β ≤ #(f ⁻¹' {a}) := by by_contra! h apply mk_univ.not_lt rw [← preimage_univ, ← iUnion_of_singleton, preimage_iUnion] exact mk_iUnion_le_sum_mk.trans_lt ((sum_le_iSup _).trans_lt <| mul_lt_of_lt h₁ (h₂.trans_le <| cof_ord_le _) (iSup_lt h₂ h)) obtain ⟨x, h⟩ := this refine ⟨x, h.antisymm' ?_⟩ rw [le_mk_iff_exists_set] exact ⟨_, rfl⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Finite.Lattice", "Mathlib.SetTheory.Cardinal.Regular" ]
Mathlib/SetTheory/Cardinal/Pigeonhole.lean
infinite_pigeonhole
The infinite pigeonhole principle
infinite_pigeonhole_card {β α : Type u} (f : β → α) (θ : Cardinal) (hθ : θ ≤ #β) (h₁ : ℵ₀ ≤ θ) (h₂ : #α < θ.ord.cof) : ∃ a : α, θ ≤ #(f ⁻¹' {a}) := by rcases le_mk_iff_exists_set.1 hθ with ⟨s, rfl⟩ obtain ⟨a, ha⟩ := infinite_pigeonhole (f ∘ Subtype.val : s → α) h₁ h₂ use a; rw [← ha, @preimage_comp _ _ _ Subtype.val f] exact mk_preimage_of_injective _ _ Subtype.val_injective
theorem
SetTheory
[ "Mathlib.Data.Set.Finite.Lattice", "Mathlib.SetTheory.Cardinal.Regular" ]
Mathlib/SetTheory/Cardinal/Pigeonhole.lean
infinite_pigeonhole_card
Pigeonhole principle for a cardinality below the cardinality of the domain
infinite_pigeonhole_set {β α : Type u} {s : Set β} (f : s → α) (θ : Cardinal) (hθ : θ ≤ #s) (h₁ : ℵ₀ ≤ θ) (h₂ : #α < θ.ord.cof) : ∃ (a : α) (t : Set β) (h : t ⊆ s), θ ≤ #t ∧ ∀ ⦃x⦄ (hx : x ∈ t), f ⟨x, h hx⟩ = a := by obtain ⟨a, ha⟩ := infinite_pigeonhole_card f θ hθ h₁ h₂ refine ⟨a, { x | ∃ h, f ⟨x, h⟩ = a }, ?_, ?_, ?_⟩ · rintro x ⟨hx, _⟩ exact hx · refine ha.trans (ge_of_eq <| Quotient.sound ⟨Equiv.trans ?_ (Equiv.subtypeSubtypeEquivSubtypeExists _ _).symm⟩) simp only [coe_eq_subtype, mem_singleton_iff, mem_preimage, mem_setOf_eq] rfl rintro x ⟨_, hx'⟩; exact hx'
theorem
SetTheory
[ "Mathlib.Data.Set.Finite.Lattice", "Mathlib.SetTheory.Cardinal.Regular" ]
Mathlib/SetTheory/Cardinal/Pigeonhole.lean
infinite_pigeonhole_set
null
infinite_pigeonhole_card_lt {β α : Type u} (f : β → α) (w : #α < #β) (w' : ℵ₀ ≤ #α) : ∃ a : α, #α < #(f ⁻¹' {a}) := by simp_rw [← succ_le_iff] exact infinite_pigeonhole_card f (succ #α) (succ_le_of_lt w) (w'.trans (lt_succ _).le) ((lt_succ _).trans_le (isRegular_succ w').2.ge)
theorem
SetTheory
[ "Mathlib.Data.Set.Finite.Lattice", "Mathlib.SetTheory.Cardinal.Regular" ]
Mathlib/SetTheory/Cardinal/Pigeonhole.lean
infinite_pigeonhole_card_lt
A function whose codomain's cardinality is infinite but strictly smaller than its domain's has a fiber with cardinality strictly great than the codomain.
exists_infinite_fiber {β α : Type u} (f : β → α) (w : #α < #β) (w' : Infinite α) : ∃ a : α, Infinite (f ⁻¹' {a}) := by simp_rw [Cardinal.infinite_iff] at w' ⊢ obtain ⟨a, ha⟩ := infinite_pigeonhole_card_lt f w w' exact ⟨a, w'.trans ha.le⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Finite.Lattice", "Mathlib.SetTheory.Cardinal.Regular" ]
Mathlib/SetTheory/Cardinal/Pigeonhole.lean
exists_infinite_fiber
A function whose codomain's cardinality is infinite but strictly smaller than its domain's has an infinite fiber.
le_range_of_union_finset_eq_top {α β : Type*} [Infinite β] (f : α → Finset β) (w : ⋃ a, (f a : Set β) = ⊤) : #β ≤ #(range f) := by have k : _root_.Infinite (range f) := by rw [infinite_coe_iff] apply mt (union_finset_finite_of_range_finite f) rw [w] exact infinite_univ by_contra h simp only [not_le] at h let u : ∀ b, ∃ a, b ∈ f a := fun b => by simpa using (w.ge :) (Set.mem_univ b) let u' : β → range f := fun b => ⟨f (u b).choose, by simp⟩ have v' : ∀ a, u' ⁻¹' {⟨f a, by simp⟩} ≤ f a := by rintro a p m have m : f (u p).choose = f a := by simpa [u'] using m rw [← m] apply fun b => (u b).choose_spec obtain ⟨⟨-, ⟨a, rfl⟩⟩, p⟩ := exists_infinite_fiber u' h k exact (@Infinite.of_injective _ _ p (inclusion (v' a)) (inclusion_injective _)).false
theorem
SetTheory
[ "Mathlib.Data.Set.Finite.Lattice", "Mathlib.SetTheory.Cardinal.Regular" ]
Mathlib/SetTheory/Cardinal/Pigeonhole.lean
le_range_of_union_finset_eq_top
null
IsRegular (c : Cardinal) : Prop := ℵ₀ ≤ c ∧ c ≤ c.ord.cof
def
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsRegular
A cardinal is regular if it is infinite and it equals its own cofinality.
IsRegular.aleph0_le {c : Cardinal} (H : c.IsRegular) : ℵ₀ ≤ c := H.1
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsRegular.aleph0_le
null
IsRegular.cof_eq {c : Cardinal} (H : c.IsRegular) : c.ord.cof = c := (cof_ord_le c).antisymm H.2
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsRegular.cof_eq
null
IsRegular.cof_omega_eq {o : Ordinal} (H : (ℵ_ o).IsRegular) : (ω_ o).cof = ℵ_ o := by rw [← ord_aleph, H.cof_eq]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsRegular.cof_omega_eq
null
IsRegular.pos {c : Cardinal} (H : c.IsRegular) : 0 < c := aleph0_pos.trans_le H.1
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsRegular.pos
null
IsRegular.nat_lt {c : Cardinal} (H : c.IsRegular) (n : ℕ) : n < c := lt_of_lt_of_le (nat_lt_aleph0 n) H.aleph0_le
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsRegular.nat_lt
null
IsRegular.ord_pos {c : Cardinal} (H : c.IsRegular) : 0 < c.ord := by rw [Cardinal.lt_ord, card_zero] exact H.pos
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsRegular.ord_pos
null
isRegular_cof {o : Ordinal} (h : IsSuccLimit o) : IsRegular o.cof := ⟨aleph0_le_cof.2 h, (cof_cof o).ge⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
isRegular_cof
null
IsRegular.ne_zero {c : Cardinal} (H : c.IsRegular) : c ≠ 0 := H.pos.ne'
lemma
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsRegular.ne_zero
If `c` is a regular cardinal, then `c.ord.toType` has a least element.
isRegular_aleph0 : IsRegular ℵ₀ := ⟨le_rfl, by simp⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
isRegular_aleph0
null
fact_isRegular_aleph0 : Fact (IsRegular ℵ₀) where out := isRegular_aleph0
lemma
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
fact_isRegular_aleph0
null
isRegular_succ {c : Cardinal.{u}} (h : ℵ₀ ≤ c) : IsRegular (succ c) := ⟨h.trans (le_succ c), succ_le_of_lt (by have αe := Cardinal.mk_out (succ c) set α := (succ c).out rcases ord_eq α with ⟨r, wo, re⟩ have := isSuccLimit_ord (h.trans (le_succ _)) rw [← αe, re] at this ⊢ rcases cof_eq' r this with ⟨S, H, Se⟩ rw [← Se] apply lt_imp_lt_of_le_imp_le fun h => mul_le_mul_right' h c rw [mul_eq_self h, ← succ_le_iff, ← αe, ← sum_const'] refine le_trans ?_ (sum_le_sum (fun (x : S) => card (typein r (x : α))) _ fun i => ?_) · simp only [← card_typein, ← mk_sigma] exact ⟨Embedding.ofSurjective (fun x => x.2.1) fun a => let ⟨b, h, ab⟩ := H a ⟨⟨⟨_, h⟩, _, ab⟩, rfl⟩⟩ · rw [← lt_succ_iff, ← lt_ord, ← αe, re] apply typein_lt_type)⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
isRegular_succ
null
isRegular_aleph_one : IsRegular ℵ₁ := by rw [← succ_aleph0] exact isRegular_succ le_rfl
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
isRegular_aleph_one
null
isRegular_preAleph_succ {o : Ordinal} (h : ω ≤ o) : IsRegular (preAleph (succ o)) := by rw [preAleph_succ] exact isRegular_succ (aleph0_le_preAleph.2 h)
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
isRegular_preAleph_succ
null
isRegular_aleph_succ (o : Ordinal) : IsRegular (ℵ_ (succ o)) := by rw [aleph_succ] exact isRegular_succ (aleph0_le_aleph o)
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
isRegular_aleph_succ
null
lsub_lt_ord_lift_of_isRegular {ι} {f : ι → Ordinal} {c} (hc : IsRegular c) (hι : Cardinal.lift.{v, u} #ι < c) : (∀ i, f i < c.ord) → Ordinal.lsub.{u, v} f < c.ord := lsub_lt_ord_lift (by rwa [hc.cof_eq])
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
lsub_lt_ord_lift_of_isRegular
null
lsub_lt_ord_of_isRegular {ι} {f : ι → Ordinal} {c} (hc : IsRegular c) (hι : #ι < c) : (∀ i, f i < c.ord) → Ordinal.lsub f < c.ord := lsub_lt_ord (by rwa [hc.cof_eq])
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
lsub_lt_ord_of_isRegular
null
iSup_lt_ord_lift_of_isRegular {ι} {f : ι → Ordinal} {c} (hc : IsRegular c) (hι : Cardinal.lift.{v, u} #ι < c) : (∀ i, f i < c.ord) → iSup f < c.ord := iSup_lt_ord_lift (by rwa [hc.cof_eq])
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
iSup_lt_ord_lift_of_isRegular
null
iSup_lt_ord_of_isRegular {ι} {f : ι → Ordinal} {c} (hc : IsRegular c) (hι : #ι < c) : (∀ i, f i < c.ord) → iSup f < c.ord := iSup_lt_ord (by rwa [hc.cof_eq])
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
iSup_lt_ord_of_isRegular
null
blsub_lt_ord_lift_of_isRegular {o : Ordinal} {f : ∀ a < o, Ordinal} {c} (hc : IsRegular c) (ho : Cardinal.lift.{v, u} o.card < c) : (∀ i hi, f i hi < c.ord) → Ordinal.blsub.{u, v} o f < c.ord := blsub_lt_ord_lift (by rwa [hc.cof_eq])
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
blsub_lt_ord_lift_of_isRegular
null
blsub_lt_ord_of_isRegular {o : Ordinal} {f : ∀ a < o, Ordinal} {c} (hc : IsRegular c) (ho : o.card < c) : (∀ i hi, f i hi < c.ord) → Ordinal.blsub o f < c.ord := blsub_lt_ord (by rwa [hc.cof_eq])
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
blsub_lt_ord_of_isRegular
null
bsup_lt_ord_lift_of_isRegular {o : Ordinal} {f : ∀ a < o, Ordinal} {c} (hc : IsRegular c) (hι : Cardinal.lift.{v, u} o.card < c) : (∀ i hi, f i hi < c.ord) → Ordinal.bsup.{u, v} o f < c.ord := bsup_lt_ord_lift (by rwa [hc.cof_eq])
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
bsup_lt_ord_lift_of_isRegular
null
bsup_lt_ord_of_isRegular {o : Ordinal} {f : ∀ a < o, Ordinal} {c} (hc : IsRegular c) (hι : o.card < c) : (∀ i hi, f i hi < c.ord) → Ordinal.bsup o f < c.ord := bsup_lt_ord (by rwa [hc.cof_eq])
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
bsup_lt_ord_of_isRegular
null
iSup_lt_lift_of_isRegular {ι} {f : ι → Cardinal} {c} (hc : IsRegular c) (hι : Cardinal.lift.{v, u} #ι < c) : (∀ i, f i < c) → iSup.{max u v + 1, u + 1} f < c := iSup_lt_lift.{u, v} (by rwa [hc.cof_eq])
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
iSup_lt_lift_of_isRegular
null
iSup_lt_of_isRegular {ι} {f : ι → Cardinal} {c} (hc : IsRegular c) (hι : #ι < c) : (∀ i, f i < c) → iSup f < c := iSup_lt (by rwa [hc.cof_eq])
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
iSup_lt_of_isRegular
null
sum_lt_lift_of_isRegular {ι : Type u} {f : ι → Cardinal} {c : Cardinal} (hc : IsRegular c) (hι : Cardinal.lift.{v, u} #ι < c) (hf : ∀ i, f i < c) : sum f < c := (sum_le_iSup_lift _).trans_lt <| mul_lt_of_lt hc.1 hι (iSup_lt_lift_of_isRegular hc hι hf)
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
sum_lt_lift_of_isRegular
null
sum_lt_of_isRegular {ι : Type u} {f : ι → Cardinal} {c : Cardinal} (hc : IsRegular c) (hι : #ι < c) : (∀ i, f i < c) → sum f < c := sum_lt_lift_of_isRegular.{u, u} hc (by rwa [lift_id]) @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
sum_lt_of_isRegular
null
card_lt_of_card_iUnion_lt {ι : Type u} {α : Type u} {t : ι → Set α} {c : Cardinal} (h : #(⋃ i, t i) < c) (i : ι) : #(t i) < c := lt_of_le_of_lt (Cardinal.mk_le_mk_of_subset <| subset_iUnion _ _) h @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
card_lt_of_card_iUnion_lt
null
card_iUnion_lt_iff_forall_of_isRegular {ι : Type u} {α : Type u} {t : ι → Set α} {c : Cardinal} (hc : c.IsRegular) (hι : #ι < c) : #(⋃ i, t i) < c ↔ ∀ i, #(t i) < c := by refine ⟨card_lt_of_card_iUnion_lt, fun h ↦ ?_⟩ apply lt_of_le_of_lt (Cardinal.mk_sUnion_le _) apply Cardinal.mul_lt_of_lt hc.aleph0_le (lt_of_le_of_lt Cardinal.mk_range_le hι) apply Cardinal.iSup_lt_of_isRegular hc (lt_of_le_of_lt Cardinal.mk_range_le hι) simpa
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
card_iUnion_lt_iff_forall_of_isRegular
null
card_lt_of_card_biUnion_lt {α β : Type u} {s : Set α} {t : ∀ a ∈ s, Set β} {c : Cardinal} (h : #(⋃ a ∈ s, t a ‹_›) < c) (a : α) (ha : a ∈ s) : # (t a ha) < c := by rw [biUnion_eq_iUnion] at h have := card_lt_of_card_iUnion_lt h simp_all only [iUnion_coe_set, Subtype.forall]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
card_lt_of_card_biUnion_lt
null
card_biUnion_lt_iff_forall_of_isRegular {α β : Type u} {s : Set α} {t : ∀ a ∈ s, Set β} {c : Cardinal} (hc : c.IsRegular) (hs : #s < c) : #(⋃ a ∈ s, t a ‹_›) < c ↔ ∀ a (ha : a ∈ s), # (t a ha) < c := by rw [biUnion_eq_iUnion, card_iUnion_lt_iff_forall_of_isRegular hc hs, SetCoe.forall']
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
card_biUnion_lt_iff_forall_of_isRegular
null
nfpFamily_lt_ord_lift_of_isRegular {ι} {f : ι → Ordinal → Ordinal} {c} (hc : IsRegular c) (hι : Cardinal.lift.{v, u} #ι < c) (hc' : c ≠ ℵ₀) (hf : ∀ (i), ∀ b < c.ord, f i b < c.ord) {a} (ha : a < c.ord) : nfpFamily f a < c.ord := by apply nfpFamily_lt_ord_lift _ _ hf ha <;> rw [hc.cof_eq] · exact lt_of_le_of_ne hc.1 hc'.symm · exact hι
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
nfpFamily_lt_ord_lift_of_isRegular
null
nfpFamily_lt_ord_of_isRegular {ι} {f : ι → Ordinal → Ordinal} {c} (hc : IsRegular c) (hι : #ι < c) (hc' : c ≠ ℵ₀) {a} (hf : ∀ (i), ∀ b < c.ord, f i b < c.ord) : a < c.ord → nfpFamily.{u, u} f a < c.ord := nfpFamily_lt_ord_lift_of_isRegular hc (by rwa [lift_id]) hc' hf
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
nfpFamily_lt_ord_of_isRegular
null
nfp_lt_ord_of_isRegular {f : Ordinal → Ordinal} {c} (hc : IsRegular c) (hc' : c ≠ ℵ₀) (hf : ∀ i < c.ord, f i < c.ord) {a} : a < c.ord → nfp f a < c.ord := nfp_lt_ord (by rw [hc.cof_eq]; exact lt_of_le_of_ne hc.1 hc'.symm) hf
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
nfp_lt_ord_of_isRegular
null
derivFamily_lt_ord_lift {ι : Type u} {f : ι → Ordinal → Ordinal} {c} (hc : IsRegular c) (hι : lift.{v} #ι < c) (hc' : c ≠ ℵ₀) (hf : ∀ i, ∀ b < c.ord, f i b < c.ord) {a} : a < c.ord → derivFamily f a < c.ord := by have hω : ℵ₀ < c.ord.cof := by rw [hc.cof_eq] exact lt_of_le_of_ne hc.1 hc'.symm induction a using limitRecOn with | zero => rw [derivFamily_zero] exact nfpFamily_lt_ord_lift hω (by rwa [hc.cof_eq]) hf | succ b hb => intro hb' rw [derivFamily_succ] exact nfpFamily_lt_ord_lift hω (by rwa [hc.cof_eq]) hf ((isSuccLimit_ord hc.1).succ_lt (hb ((lt_succ b).trans hb'))) | limit b hb H => intro hb' have : ⨆ a : Iio b, _ = _ := iSup_Iio_eq_bsup (f := fun x (_ : x < b) ↦ derivFamily f x) rw [derivFamily_limit f hb, this] exact bsup_lt_ord_of_isRegular.{u, v} hc (ord_lt_ord.1 ((ord_card_le b).trans_lt hb')) fun o' ho' => H o' ho' (ho'.trans hb')
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
derivFamily_lt_ord_lift
null
derivFamily_lt_ord {ι} {f : ι → Ordinal → Ordinal} {c} (hc : IsRegular c) (hι : #ι < c) (hc' : c ≠ ℵ₀) (hf : ∀ (i), ∀ b < c.ord, f i b < c.ord) {a} : a < c.ord → derivFamily.{u, u} f a < c.ord := derivFamily_lt_ord_lift hc (by rwa [lift_id]) hc' hf
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
derivFamily_lt_ord
null
deriv_lt_ord {f : Ordinal.{u} → Ordinal} {c} (hc : IsRegular c) (hc' : c ≠ ℵ₀) (hf : ∀ i < c.ord, f i < c.ord) {a} : a < c.ord → deriv f a < c.ord := derivFamily_lt_ord_lift hc (by simpa using Cardinal.one_lt_aleph0.trans (lt_of_le_of_ne hc.1 hc'.symm)) hc' fun _ => hf /-! ### Inaccessible cardinals -/
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
deriv_lt_ord
null
IsInaccessible (c : Cardinal) : Prop := ℵ₀ < c ∧ c ≤ c.ord.cof ∧ ∀ x < c, 2 ^ x < c @[deprecated "use the default constructor for `IsInaccessible`" (since := "2025-07-01")]
def
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsInaccessible
A cardinal is inaccessible if it is an uncountable regular strong limit cardinal.
IsInaccessible.mk {c} (h₁ : ℵ₀ < c) (h₂ : c ≤ c.ord.cof) (h₃ : ∀ x < c, (2 ^ x) < c) : IsInaccessible c := ⟨h₁, h₂, h₃⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsInaccessible.mk
null
IsInaccessible.aleph0_lt {c : Cardinal} (h : IsInaccessible c) : ℵ₀ < c := h.1
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsInaccessible.aleph0_lt
null
IsInaccessible.nat_lt {c : Cardinal} (h : IsInaccessible c) (n : ℕ) : n < c := (nat_lt_aleph0 n).trans h.1
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsInaccessible.nat_lt
null
IsInaccessible.pos {c : Cardinal} (h : IsInaccessible c) : 0 < c := aleph0_pos.trans h.1
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsInaccessible.pos
null
IsInaccessible.ne_zero {c : Cardinal} (h : IsInaccessible c) : c ≠ 0 := h.pos.ne'
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsInaccessible.ne_zero
null
IsInaccessible.isRegular {c : Cardinal} (h : IsInaccessible c) : IsRegular c := ⟨h.aleph0_lt.le, h.2.1⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsInaccessible.isRegular
null
IsInaccessible.isStrongLimit {c : Cardinal} (h : IsInaccessible c) : IsStrongLimit c := ⟨h.ne_zero, h.2.2⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsInaccessible.isStrongLimit
null
isInaccessible_def {c : Cardinal} : IsInaccessible c ↔ ℵ₀ < c ∧ IsRegular c ∧ IsStrongLimit c where mp h := ⟨h.aleph0_lt, h.isRegular, h.isStrongLimit⟩ mpr := fun ⟨h₁, h₂, h₃⟩ ↦ ⟨h₁, h₂.2, h₃.two_power_lt⟩ @[deprecated (since := "2025-08-20")] alias isInaccesible_def := isInaccessible_def
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
isInaccessible_def
null
IsInaccessible.univ : IsInaccessible univ.{u, v} := ⟨aleph0_lt_univ, by simp, IsStrongLimit.univ.two_power_lt⟩ @[deprecated IsInaccessible.univ (since := "2025-07-01")] alias univ_inaccessible := IsInaccessible.univ
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
IsInaccessible.univ
null
iSup_sequence_lt_omega1 {α : Type u} [Countable α] (o : α → Ordinal.{max u v}) (ho : ∀ n, o n < (aleph 1).ord) : iSup o < (aleph 1).ord := by apply iSup_lt_ord_lift _ ho rw [Cardinal.isRegular_aleph_one.cof_eq] exact lt_of_le_of_lt mk_le_aleph0 aleph0_lt_aleph_one
lemma
SetTheory
[ "Mathlib.SetTheory.Cardinal.Cofinality", "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Cardinal/Regular.lean
iSup_sequence_lt_omega1
null
schroeder_bernstein_of_rel {f : α → β} {g : β → α} (hf : Function.Injective f) (hg : Function.Injective g) (R : α → β → Prop) (hp₁ : ∀ a : α, R a (f a)) (hp₂ : ∀ b : β, R (g b) b) : ∃ h : α → β, Bijective h ∧ ∀ a : α, R a (h a) := by classical rcases isEmpty_or_nonempty β with hβ | hβ · have : IsEmpty α := Function.isEmpty f exact ⟨_, ((Equiv.equivEmpty α).trans (Equiv.equivEmpty β).symm).bijective, by simp⟩ set F : Set α →o Set α := { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ monotone' := fun s t hst => by dsimp at hst ⊢; gcongr } set s : Set α := F.lfp have hs : (g '' (f '' s)ᶜ)ᶜ = s := F.map_lfp have hns : g '' (f '' s)ᶜ = sᶜ := compl_injective (by simp [hs]) set g' := invFun g have g'g : LeftInverse g' g := leftInverse_invFun hg have hg'ns : g' '' sᶜ = (f '' s)ᶜ := by rw [← hns, g'g.image_image] set h : α → β := s.piecewise f g' have : Surjective h := by rw [← range_eq_univ, range_piecewise, hg'ns, union_compl_self] have : Injective h := by refine (injective_piecewise_iff _).2 ⟨hf.injOn, ?_, ?_⟩ · intro x hx y hy hxy obtain ⟨x', _, rfl⟩ : x ∈ g '' (f '' s)ᶜ := by rwa [hns] obtain ⟨y', _, rfl⟩ : y ∈ g '' (f '' s)ᶜ := by rwa [hns] rw [g'g _, g'g _] at hxy rw [hxy] · intro x hx y hy hxy obtain ⟨y', hy', rfl⟩ : y ∈ g '' (f '' s)ᶜ := by rwa [hns] rw [g'g _] at hxy exact hy' ⟨x, hx, hxy⟩ refine ⟨h, ⟨‹Injective h›, ‹Surjective h›⟩, fun a ↦ ?_⟩ simp only [h, Set.piecewise, g'] split · exact hp₁ a · have : g (invFun g a) = a := by have : a ∈ g '' (f '' s)ᶜ := by grind obtain ⟨x, _, hx⟩ := mem_image _ _ _ |>.mp this exact Function.invFun_eq ⟨x, hx⟩ grind
theorem
SetTheory
[ "Mathlib.Data.Set.Piecewise", "Mathlib.Order.FixedPoints", "Mathlib.Order.Zorn" ]
Mathlib/SetTheory/Cardinal/SchroederBernstein.lean
schroeder_bernstein_of_rel
**The Schröder-Bernstein Theorem**: Given injections `α → β` and `β → α` that satisfy a pointwise property `R`, we can get a bijection `α → β` that satisfies that same pointwise property.
schroeder_bernstein {f : α → β} {g : β → α} (hf : Function.Injective f) (hg : Function.Injective g) : ∃ h : α → β, Bijective h := by obtain ⟨f, hf, _⟩ := schroeder_bernstein_of_rel hf hg (fun x y ↦ True) (by simp) (by simp) exact ⟨f, hf⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Piecewise", "Mathlib.Order.FixedPoints", "Mathlib.Order.Zorn" ]
Mathlib/SetTheory/Cardinal/SchroederBernstein.lean
schroeder_bernstein
**The Schröder-Bernstein Theorem**: Given injections `α → β` and `β → α`, we can get a bijection `α → β`.
antisymm : (α ↪ β) → (β ↪ α) → Nonempty (α ≃ β) | ⟨_, h₁⟩, ⟨_, h₂⟩ => let ⟨f, hf⟩ := schroeder_bernstein h₁ h₂ ⟨Equiv.ofBijective f hf⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Piecewise", "Mathlib.Order.FixedPoints", "Mathlib.Order.Zorn" ]
Mathlib/SetTheory/Cardinal/SchroederBernstein.lean
antisymm
**The Schröder-Bernstein Theorem**: Given embeddings `α ↪ β` and `β ↪ α`, there exists an equivalence `α ≃ β`.
private sets := { s : Set (∀ i, β i) | ∀ i : ι, s.InjOn fun x => x i }
abbrev
SetTheory
[ "Mathlib.Data.Set.Piecewise", "Mathlib.Order.FixedPoints", "Mathlib.Order.Zorn" ]
Mathlib/SetTheory/Cardinal/SchroederBernstein.lean
sets
`sets β`
min_injective [I : Nonempty ι] : ∃ i, Nonempty (∀ j, β i ↪ β j) := let ⟨s, hs⟩ := show ∃ s, Maximal (· ∈ sets β) s by refine zorn_subset _ fun c hc hcc ↦ ⟨⋃₀ c, fun i x ⟨p, hpc, hxp⟩ y ⟨q, hqc, hyq⟩ hi ↦ ?_, fun _ ↦ subset_sUnion_of_mem⟩ exact (hcc.total hpc hqc).elim (fun h ↦ hc hqc i (h hxp) hyq hi) fun h ↦ hc hpc i hxp (h hyq) hi let ⟨i, e⟩ := show ∃ i, Surjective fun x : s => x.val i from Classical.by_contradiction fun h => have h : ∀ i, ∃ y, ∀ x ∈ s, (x : ∀ i, β i) i ≠ y := by simpa [Surjective] using h let ⟨f, hf⟩ := Classical.axiom_of_choice h have : f ∈ s := have : insert f s ∈ sets β := fun i x hx y hy => by rcases hx with hx | hx <;> rcases hy with hy | hy; · simp [hx, hy] · subst x exact fun e => (hf i y hy e.symm).elim · subst y exact fun e => (hf i x hx e).elim · exact hs.prop i hx hy hs.eq_of_subset this (subset_insert _ _) ▸ mem_insert .. let ⟨i⟩ := I hf i f this rfl ⟨i, ⟨fun j => ⟨s.restrict (fun x => x j) ∘ surjInv e, ((hs.1 j).injective).comp (injective_surjInv _)⟩⟩⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Piecewise", "Mathlib.Order.FixedPoints", "Mathlib.Order.Zorn" ]
Mathlib/SetTheory/Cardinal/SchroederBernstein.lean
min_injective
The cardinals are well-ordered. We express it here by the fact that in any set of cardinals there is an element that injects into the others. See `Cardinal.conditionallyCompleteLinearOrderBot` for (one of) the lattice instances.
total (α : Type u) (β : Type v) : Nonempty (α ↪ β) ∨ Nonempty (β ↪ α) := match @min_injective Bool (fun b => cond b (ULift α) (ULift.{max u v, v} β)) ⟨true⟩ with | ⟨true, ⟨h⟩⟩ => let ⟨f, hf⟩ := h false Or.inl ⟨Embedding.congr Equiv.ulift Equiv.ulift ⟨f, hf⟩⟩ | ⟨false, ⟨h⟩⟩ => let ⟨f, hf⟩ := h true Or.inr ⟨Embedding.congr Equiv.ulift Equiv.ulift ⟨f, hf⟩⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Piecewise", "Mathlib.Order.FixedPoints", "Mathlib.Order.Zorn" ]
Mathlib/SetTheory/Cardinal/SchroederBernstein.lean
total
The cardinals are totally ordered. See `Cardinal.conditionallyCompleteLinearOrderBot` for (one of) the lattice instance.
private Operands : Fin 6 ⊕ s → Type | .inl 0 => Bool -- add | .inl 1 => Bool -- mul | .inl 2 => Unit -- neg | .inl 3 => Unit -- inv | .inl 4 => Empty -- zero | .inl 5 => Empty -- one | .inr _ => Empty -- s variable [DivisionRing α]
abbrev
SetTheory
[ "Mathlib.Algebra.Field.Subfield.Basic", "Mathlib.Data.W.Cardinal", "Mathlib.Tactic.FinCases" ]
Mathlib/SetTheory/Cardinal/Subfield.lean
Operands
null
private operate : (Σ n, Operands s n → closure s) → closure s | ⟨.inl 0, f⟩ => f false + f true | ⟨.inl 1, f⟩ => f false * f true | ⟨.inl 2, f⟩ => - f () | ⟨.inl 3, f⟩ => (f ())⁻¹ | ⟨.inl 4, _⟩ => 0 | ⟨.inl 5, _⟩ => 1 | ⟨.inr a, _⟩ => ⟨a, subset_closure a.prop⟩
def
SetTheory
[ "Mathlib.Algebra.Field.Subfield.Basic", "Mathlib.Data.W.Cardinal", "Mathlib.Tactic.FinCases" ]
Mathlib/SetTheory/Cardinal/Subfield.lean
operate
null
private rangeOfWType : Subfield (closure s) where carrier := Set.range (WType.elim _ <| operate s) add_mem' := by rintro _ _ ⟨x, rfl⟩ ⟨y, rfl⟩; exact ⟨WType.mk (.inl 0) (Bool.rec x y), by rfl⟩ mul_mem' := by rintro _ _ ⟨x, rfl⟩ ⟨y, rfl⟩; exact ⟨WType.mk (.inl 1) (Bool.rec x y), by rfl⟩ neg_mem' := by rintro _ ⟨x, rfl⟩; exact ⟨WType.mk (.inl 2) fun _ ↦ x, rfl⟩ inv_mem' := by rintro _ ⟨x, rfl⟩; exact ⟨WType.mk (.inl 3) fun _ ↦ x, rfl⟩ zero_mem' := ⟨WType.mk (.inl 4) Empty.rec, rfl⟩ one_mem' := ⟨WType.mk (.inl 5) Empty.rec, rfl⟩
def
SetTheory
[ "Mathlib.Algebra.Field.Subfield.Basic", "Mathlib.Data.W.Cardinal", "Mathlib.Tactic.FinCases" ]
Mathlib/SetTheory/Cardinal/Subfield.lean
rangeOfWType
null
private rangeOfWType_eq_top : rangeOfWType s = ⊤ := top_le_iff.mp fun a _ ↦ by rw [← SetLike.mem_coe, ← Subtype.val_injective.mem_set_image] change ↑a ∈ map (closure s).subtype _ refine closure_le.mpr (fun a ha ↦ ?_) a.prop exact ⟨⟨a, subset_closure ha⟩, ⟨WType.mk (.inr ⟨a, ha⟩) Empty.rec, rfl⟩, rfl⟩
lemma
SetTheory
[ "Mathlib.Algebra.Field.Subfield.Basic", "Mathlib.Data.W.Cardinal", "Mathlib.Tactic.FinCases" ]
Mathlib/SetTheory/Cardinal/Subfield.lean
rangeOfWType_eq_top
null
private surjective_ofWType : Function.Surjective (WType.elim _ <| operate s) := by rw [← Set.range_eq_univ] exact SetLike.coe_set_eq.mpr (rangeOfWType_eq_top s) open Cardinal
lemma
SetTheory
[ "Mathlib.Algebra.Field.Subfield.Basic", "Mathlib.Data.W.Cardinal", "Mathlib.Tactic.FinCases" ]
Mathlib/SetTheory/Cardinal/Subfield.lean
surjective_ofWType
null
cardinalMk_closure_le_max : #(closure s) ≤ max #s ℵ₀ := (Cardinal.mk_le_of_surjective <| surjective_ofWType s).trans <| by convert WType.cardinalMk_le_max_aleph0_of_finite' using 1 · rw [lift_uzero, mk_sum, lift_uzero] have : lift.{u,0} #(Fin 6) < ℵ₀ := lift_lt_aleph0.mpr (lt_aleph0_of_finite _) obtain h|h := lt_or_ge #s ℵ₀ · rw [max_eq_right h.le, max_eq_right] exact (add_lt_aleph0 this h).le · rw [max_eq_left h, add_eq_right h (this.le.trans h), max_eq_left h] rintro (n|_) · fin_cases n <;> (dsimp only [id_eq]; infer_instance) infer_instance
lemma
SetTheory
[ "Mathlib.Algebra.Field.Subfield.Basic", "Mathlib.Data.W.Cardinal", "Mathlib.Tactic.FinCases" ]
Mathlib/SetTheory/Cardinal/Subfield.lean
cardinalMk_closure_le_max
null
cardinalMk_closure [Infinite s] : #(closure s) = #s := ((cardinalMk_closure_le_max s).trans_eq <| max_eq_left <| aleph0_le_mk s).antisymm (mk_le_mk_of_subset subset_closure)
lemma
SetTheory
[ "Mathlib.Algebra.Field.Subfield.Basic", "Mathlib.Data.W.Cardinal", "Mathlib.Tactic.FinCases" ]
Mathlib/SetTheory/Cardinal/Subfield.lean
cardinalMk_closure
null
noncomputable toNat : Cardinal →*₀ ℕ := ENat.toNatHom.comp toENat @[simp] lemma toNat_toENat (a : Cardinal) : ENat.toNat (toENat a) = toNat a := rfl @[simp]
def
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat
This function sends finite cardinals to the corresponding natural, and infinite cardinals to 0.
toNat_ofENat (n : ℕ∞) : toNat n = ENat.toNat n := congr_arg ENat.toNat <| toENat_ofENat n @[simp, norm_cast] theorem toNat_natCast (n : ℕ) : toNat n = n := toNat_ofENat n @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_ofENat
null
toNat_eq_zero : toNat c = 0 ↔ c = 0 ∨ ℵ₀ ≤ c := by rw [← toNat_toENat, ENat.toNat_eq_zero, toENat_eq_zero, toENat_eq_top]
lemma
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_eq_zero
null
toNat_ne_zero : toNat c ≠ 0 ↔ c ≠ 0 ∧ c < ℵ₀ := by simp [not_or] @[simp] lemma toNat_pos : 0 < toNat c ↔ c ≠ 0 ∧ c < ℵ₀ := pos_iff_ne_zero.trans toNat_ne_zero
lemma
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_ne_zero
null
cast_toNat_of_lt_aleph0 {c : Cardinal} (h : c < ℵ₀) : ↑(toNat c) = c := by lift c to ℕ using h rw [toNat_natCast]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
cast_toNat_of_lt_aleph0
null
toNat_apply_of_lt_aleph0 {c : Cardinal.{u}} (h : c < ℵ₀) : toNat c = Classical.choose (lt_aleph0.1 h) := Nat.cast_injective (R := Cardinal.{u}) <| by rw [cast_toNat_of_lt_aleph0 h, ← Classical.choose_spec (lt_aleph0.1 h)]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_apply_of_lt_aleph0
null
toNat_apply_of_aleph0_le {c : Cardinal} (h : ℵ₀ ≤ c) : toNat c = 0 := by simp [h]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_apply_of_aleph0_le
null
cast_toNat_of_aleph0_le {c : Cardinal} (h : ℵ₀ ≤ c) : ↑(toNat c) = (0 : Cardinal) := by rw [toNat_apply_of_aleph0_le h, Nat.cast_zero]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
cast_toNat_of_aleph0_le
null
cast_toNat_eq_iff_lt_aleph0 {c : Cardinal} : (toNat c) = c ↔ c < ℵ₀ := by constructor · intro h; by_contra h'; rw [not_lt] at h' rw [toNat_apply_of_aleph0_le h'] at h; rw [← h] at h' absurd h'; rw [not_le]; exact nat_lt_aleph0 0 · exact fun h ↦ (Cardinal.cast_toNat_of_lt_aleph0 h)
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
cast_toNat_eq_iff_lt_aleph0
null
toNat_strictMonoOn : StrictMonoOn toNat (Iio ℵ₀) := by simp only [← range_natCast, StrictMonoOn, forall_mem_range, toNat_natCast, Nat.cast_lt] exact fun _ _ ↦ id
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_strictMonoOn
null
toNat_monotoneOn : MonotoneOn toNat (Iio ℵ₀) := toNat_strictMonoOn.monotoneOn
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_monotoneOn
null
toNat_injOn : InjOn toNat (Iio ℵ₀) := toNat_strictMonoOn.injOn
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_injOn
null
toNat_inj_of_lt_aleph0 (hc : c < ℵ₀) (hd : d < ℵ₀) : toNat c = toNat d ↔ c = d := toNat_injOn.eq_iff hc hd
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_inj_of_lt_aleph0
Two finite cardinals are equal iff they are equal their `Cardinal.toNat` projections are equal.
toNat_le_iff_le_of_lt_aleph0 (hc : c < ℵ₀) (hd : d < ℵ₀) : toNat c ≤ toNat d ↔ c ≤ d := toNat_strictMonoOn.le_iff_le hc hd
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_le_iff_le_of_lt_aleph0
null
toNat_lt_iff_lt_of_lt_aleph0 (hc : c < ℵ₀) (hd : d < ℵ₀) : toNat c < toNat d ↔ c < d := toNat_strictMonoOn.lt_iff_lt hc hd @[gcongr]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_lt_iff_lt_of_lt_aleph0
null
toNat_le_toNat (hcd : c ≤ d) (hd : d < ℵ₀) : toNat c ≤ toNat d := toNat_monotoneOn (hcd.trans_lt hd) hd hcd
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_le_toNat
null
toNat_lt_toNat (hcd : c < d) (hd : d < ℵ₀) : toNat c < toNat d := toNat_strictMonoOn (hcd.trans hd) hd hcd @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_lt_toNat
null
toNat_ofNat (n : ℕ) [n.AtLeastTwo] : Cardinal.toNat ofNat(n) = OfNat.ofNat n := toNat_natCast n
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_ofNat
null
toNat_rightInverse : Function.RightInverse ((↑) : ℕ → Cardinal) toNat := toNat_natCast
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_rightInverse
`toNat` has a right-inverse: coercion.
toNat_surjective : Surjective toNat := toNat_rightInverse.surjective @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_surjective
null
mk_toNat_of_infinite [h : Infinite α] : toNat #α = 0 := by simp @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
mk_toNat_of_infinite
null
aleph0_toNat : toNat ℵ₀ = 0 := toNat_apply_of_aleph0_le le_rfl
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
aleph0_toNat
null
mk_toNat_eq_card [Fintype α] : toNat #α = Fintype.card α := by simp @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
mk_toNat_eq_card
null
zero_toNat : toNat 0 = 0 := map_zero _
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
zero_toNat
null
one_toNat : toNat 1 = 1 := map_one _
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
one_toNat
null
toNat_eq_iff {n : ℕ} (hn : n ≠ 0) : toNat c = n ↔ c = n := by rw [← toNat_toENat, ENat.toNat_eq_iff hn, toENat_eq_nat]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_eq_iff
null
toNat_eq_ofNat {n : ℕ} [Nat.AtLeastTwo n] : toNat c = OfNat.ofNat n ↔ c = OfNat.ofNat n := toNat_eq_iff <| OfNat.ofNat_ne_zero n @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_eq_ofNat
A version of `toNat_eq_iff` for literals
toNat_eq_one : toNat c = 1 ↔ c = 1 := by rw [toNat_eq_iff one_ne_zero, Nat.cast_one]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_eq_one
null
toNat_eq_one_iff_unique : toNat #α = 1 ↔ Subsingleton α ∧ Nonempty α := toNat_eq_one.trans eq_one_iff_unique @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_eq_one_iff_unique
null
toNat_lift (c : Cardinal.{v}) : toNat (lift.{u, v} c) = toNat c := by simp only [← toNat_toENat, toENat_lift]
theorem
SetTheory
[ "Mathlib.SetTheory.Cardinal.ENat" ]
Mathlib/SetTheory/Cardinal/ToNat.lean
toNat_lift
null