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

Commit f1091b3

Browse files
committed
feat(set_theory/cardinal): A set of cardinals is small iff it's bounded (#13373)
We move `mk_subtype_le` and `mk_set_le` earlier within the file in order to better accomodate for the new result, `bdd_above_iff_small`. We need this result right above the `Sup` stuff, as we'll make heavy use of it in a following refactor for `cardinal.sup`.
1 parent c30131f commit f1091b3

File tree

2 files changed

+34
-10
lines changed

2 files changed

+34
-10
lines changed

src/set_theory/cardinal/basic.lean

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Authors: Johannes Hölzl, Mario Carneiro, Floris van Doorn
55
-/
66
import data.nat.enat
77
import data.set.countable
8+
import logic.small
89
import order.conditionally_complete_lattice
910
import set_theory.schroeder_bernstein
1011

@@ -184,6 +185,12 @@ theorem le_mk_iff_exists_set {c : cardinal} {α : Type u} :
184185
⟨set.range f, (equiv.of_injective f hf).cardinal_eq.symm⟩,
185186
λ ⟨p, e⟩, e ▸ ⟨⟨subtype.val, λ a b, subtype.eq⟩⟩⟩
186187

188+
theorem mk_subtype_le {α : Type u} (p : α → Prop) : #(subtype p) ≤ #α :=
189+
⟨embedding.subtype p⟩
190+
191+
theorem mk_set_le (s : set α) : #s ≤ #α :=
192+
mk_subtype_le s
193+
187194
theorem out_embedding {c c' : cardinal} : c ≤ c' ↔ nonempty (c.out ↪ c'.out) :=
188195
by { transitivity _, rw [←quotient.out_eq c, ←quotient.out_eq c'], refl }
189196

@@ -614,14 +621,38 @@ lemma mk_le_mk_mul_of_mk_preimage_le {c : cardinal} (f : α → β) (hf : ∀ b
614621
by simpa only [←mk_congr (@equiv.sigma_preimage_equiv α β f), mk_sigma, ←sum_const']
615622
using sum_le_sum _ _ hf
616623

624+
/-- The range of an indexed cardinal function, whose outputs live in a higher universe than the
625+
inputs, is always bounded above. -/
626+
theorem bdd_above_range {ι : Type u} (f : ι → cardinal.{max u v}) : bdd_above (set.range f) :=
627+
⟨_, by { rintros a ⟨i, rfl⟩, exact le_sum f i }⟩
628+
629+
instance (a : cardinal.{u}) : small.{u} (set.Iic a) :=
630+
begin
631+
rw ←mk_out a,
632+
apply @small_of_surjective (set a.out) (Iic (#a.out)) _ (λ x, ⟨#x, mk_set_le x⟩),
633+
rintro ⟨x, hx⟩,
634+
simpa using le_mk_iff_exists_set.1 hx
635+
end
636+
637+
/-- A set of cardinals is bounded above iff it's small, i.e. it corresponds to an usual ZFC set. -/
638+
theorem bdd_above_iff_small (s : set cardinal.{u}) : bdd_above s ↔ small.{u} s :=
639+
⟨λ ⟨a, ha⟩, @small_subset _ (Iic a) s (λ x h, ha h) _, begin
640+
rintro ⟨ι, ⟨e⟩⟩,
641+
suffices : range (λ x : ι, (e.symm x).1) = s,
642+
{ rw ←this,
643+
apply bdd_above_range.{u u} },
644+
ext x,
645+
refine ⟨_, λ hx, ⟨e ⟨x, hx⟩, _⟩⟩,
646+
{ rintro ⟨a, rfl⟩,
647+
exact (e.symm a).prop },
648+
{ simp_rw [subtype.val_eq_coe, equiv.symm_apply_apply], refl }
649+
end
650+
617651
/-- The indexed supremum of cardinals is the smallest cardinal above
618652
everything in the family. -/
619653
def sup {ι : Type u} (f : ι → cardinal.{max u v}) : cardinal :=
620654
Sup (set.range f)
621655

622-
theorem bdd_above_range {ι : Type u} (f : ι → cardinal.{max u v}) : bdd_above (set.range f) :=
623-
⟨_, by { rintros a ⟨i, rfl⟩, exact le_sum f i }⟩
624-
625656
theorem le_sup {ι} (f : ι → cardinal.{max u v}) (i) : f i ≤ sup f :=
626657
le_cSup (bdd_above_range f) (mem_range_self i)
627658

@@ -1227,9 +1258,6 @@ mk_le_of_surjective quot.exists_rep
12271258
theorem mk_quotient_le {α : Type u} {s : setoid α} : #(quotient s) ≤ #α :=
12281259
mk_quot_le
12291260

1230-
theorem mk_subtype_le {α : Type u} (p : α → Prop) : #(subtype p) ≤ #α :=
1231-
⟨embedding.subtype p⟩
1232-
12331261
theorem mk_subtype_le_of_subset {α : Type u} {p q : α → Prop} (h : ∀ ⦃x⦄, p x → q x) :
12341262
#(subtype p) ≤ #(subtype q) :=
12351263
⟨embedding.subtype_map (embedding.refl α) h⟩
@@ -1338,9 +1366,6 @@ lemma mk_le_mk_of_subset {α} {s t : set α} (h : s ⊆ t) : #s ≤ #t :=
13381366
lemma mk_subtype_mono {p q : α → Prop} (h : ∀x, p x → q x) : #{x // p x} ≤ #{x // q x} :=
13391367
⟨embedding_of_subset _ _ h⟩
13401368

1341-
lemma mk_set_le (s : set α) : #s ≤ #α :=
1342-
mk_subtype_le s
1343-
13441369
lemma mk_union_le_omega {α} {P Q : set α} : #((P ∪ Q : set α)) ≤ ω ↔ #P ≤ ω ∧ #Q ≤ ω :=
13451370
by simp
13461371

src/set_theory/ordinal/basic.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Mario Carneiro, Floris van Doorn
55
-/
66
import data.sum.order
7-
import logic.small
87
import order.succ_pred.basic
98
import set_theory.cardinal.basic
109

0 commit comments

Comments
 (0)