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

Commit 3d1354c

Browse files
committed
feat(set_theory/ordinal_arithmetic): Suprema of functions with the same range are equal (#11910)
1 parent 721bace commit 3d1354c

File tree

1 file changed

+84
-13
lines changed

1 file changed

+84
-13
lines changed

src/set_theory/ordinal_arithmetic.lean

Lines changed: 84 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,44 @@ by simp only [family_of_bfamily', typein_enum]
930930
family_of_bfamily o f (enum o.out.r i (by { convert hi, exact type_out _ })) = f i hi :=
931931
family_of_bfamily'_enum _ (type_out o) f _ _
932932

933+
/-- The range of a family indexed by ordinals. -/
934+
def brange (o : ordinal) (f : Π a < o, α) : set α :=
935+
{a | ∃ i hi, f i hi = a}
936+
937+
theorem mem_brange {o : ordinal} {f : Π a < o, α} {a} : a ∈ brange o f ↔ ∃ i hi, f i hi = a :=
938+
iff.rfl
939+
940+
theorem mem_brange_self {o} (f : Π a < o, α) (i hi) : f i hi ∈ brange o f :=
941+
⟨i, hi, rfl⟩
942+
943+
@[simp] theorem range_family_of_bfamily' {ι : Type u} (r : ι → ι → Prop) [is_well_order ι r] {o}
944+
(ho : type r = o) (f : Π a < o, α) : range (family_of_bfamily' r ho f) = brange o f :=
945+
begin
946+
refine set.ext (λ a, ⟨_, _⟩),
947+
{ rintro ⟨b, rfl⟩,
948+
apply mem_brange_self },
949+
{ rintro ⟨i, hi, rfl⟩,
950+
exact ⟨_, family_of_bfamily'_enum _ _ _ _ _⟩ }
951+
end
952+
953+
@[simp] theorem range_family_of_bfamily {o} (f : Π a < o, α) :
954+
range (family_of_bfamily o f) = brange o f :=
955+
range_family_of_bfamily' _ _ f
956+
957+
@[simp] theorem brange_bfamily_of_family' {ι : Type u} (r : ι → ι → Prop) [is_well_order ι r]
958+
(f : ι → α) : brange _ (bfamily_of_family' r f) = range f :=
959+
begin
960+
refine set.ext (λ a, ⟨_, _⟩),
961+
{ rintro ⟨i, hi, rfl⟩,
962+
apply mem_range_self },
963+
{ rintro ⟨b, rfl⟩,
964+
exact ⟨_, _, bfamily_of_family'_typein _ _ _⟩ },
965+
end
966+
967+
@[simp] theorem brange_bfamily_of_family {ι : Type u} (f : ι → α) :
968+
brange _ (bfamily_of_family f) = range f :=
969+
brange_bfamily_of_family' _ _
970+
933971
theorem comp_bfamily_of_family' {ι : Type u} (r : ι → ι → Prop) [is_well_order ι r] (f : ι → α)
934972
(g : α → β) : (λ i hi, g (bfamily_of_family' r f i hi)) = bfamily_of_family' r (g ∘ f) :=
935973
rfl
@@ -1000,25 +1038,25 @@ eq_of_forall_ge_iff $ λ a, by simp only [sup_le, cardinal.ord_le, cardinal.sup_
10001038
theorem sup_const {ι} [hι : nonempty ι] (o : ordinal) : sup (λ _ : ι, o) = o :=
10011039
le_antisymm (sup_le.2 (λ _, le_rfl)) (le_sup _ hι.some)
10021040

1041+
theorem sup_le_of_range_subset {ι ι'} {f : ι → ordinal} {g : ι' → ordinal}
1042+
(h : set.range f ⊆ set.range g) : sup.{u (max v w)} f ≤ sup.{v (max u w)} g :=
1043+
sup_le.2 $ λ i, match h (mem_range_self i) with ⟨j, hj⟩ := hj ▸ le_sup _ _ end
1044+
1045+
theorem sup_eq_of_range_eq {ι ι'} {f : ι → ordinal} {g : ι' → ordinal}
1046+
(h : set.range f = set.range g) : sup.{u (max v w)} f = sup.{v (max u w)} g :=
1047+
(sup_le_of_range_subset h.le).antisymm (sup_le_of_range_subset.{v u w} h.ge)
1048+
10031049
lemma unbounded_range_of_sup_ge {α β : Type u} (r : α → α → Prop) [is_well_order α r] (f : β → α)
10041050
(h : type r ≤ sup.{u u} (typein r ∘ f)) : unbounded r (range f) :=
10051051
(not_bounded_iff _).1 $ λ ⟨x, hx⟩, not_lt_of_le h $ lt_of_le_of_lt
10061052
(sup_le.2 $ λ y, le_of_lt $ (typein_lt_typein r).2 $ hx _ $ mem_range_self y)
10071053
(typein_lt_type r x)
10081054

1009-
private theorem sup_le_sup {ι ι' : Type u} (r : ι → ι → Prop) (r' : ι' → ι' → Prop)
1010-
[is_well_order ι r] [is_well_order ι' r'] {o} (ho : type r = o) (ho' : type r' = o)
1011-
(f : Π a < o, ordinal) : sup (family_of_bfamily' r ho f) ≤ sup (family_of_bfamily' r' ho' f) :=
1012-
sup_le.2 $ λ i, begin
1013-
cases typein_surj r' (by { rw [ho', ←ho], exact typein_lt_type r i }) with j hj,
1014-
simp_rw [family_of_bfamily', ←hj],
1015-
apply le_sup
1016-
end
1017-
1018-
theorem sup_eq_sup {ι ι' : Type u} (r : ι → ι → Prop) (r' : ι' → ι' → Prop)
1019-
[is_well_order ι r] [is_well_order ι' r'] {o} (ho : type r = o) (ho' : type r' = o)
1020-
(f : Π a < o, ordinal) : sup (family_of_bfamily' r ho f) = sup (family_of_bfamily' r' ho' f) :=
1021-
le_antisymm (sup_le_sup r r' ho ho' f) (sup_le_sup r' r ho' ho f)
1055+
theorem sup_eq_sup {ι ι' : Type u} (r : ι → ι → Prop) (r' : ι' → ι' → Prop) [is_well_order ι r]
1056+
[is_well_order ι' r'] {o : ordinal.{u}} (ho : type r = o) (ho' : type r' = o)
1057+
(f : Π a < o, ordinal.{max u v}) :
1058+
sup (family_of_bfamily' r ho f) = sup (family_of_bfamily' r' ho' f) :=
1059+
sup_eq_of_range_eq.{u u v} (by simp)
10221060

10231061
/-- The supremum of a family of ordinals indexed by the set of ordinals less than some
10241062
`o : ordinal.{u}`. This is a special case of `sup` over the family provided by
@@ -1086,6 +1124,18 @@ bsup_eq_zero_iff.2 (λ i hi, by { subst ho, exact (ordinal.not_lt_zero i hi).eli
10861124
theorem bsup_const {o : ordinal} (ho : o ≠ 0) (a : ordinal) : bsup o (λ _ _, a) = a :=
10871125
le_antisymm (bsup_le.2 (λ _ _, le_rfl)) (le_bsup _ 0 (ordinal.pos_iff_ne_zero.2 ho))
10881126

1127+
theorem bsup_le_of_brange_subset {o o'} {f : Π a < o, ordinal} {g : Π a < o', ordinal}
1128+
(h : brange o f ⊆ brange o' g) : bsup.{u (max v w)} o f ≤ bsup.{v (max u w)} o' g :=
1129+
bsup_le.2 $ λ i hi, begin
1130+
obtain ⟨j, hj, hj'⟩ := h ⟨i, hi, rfl⟩,
1131+
rw ←hj',
1132+
apply le_bsup
1133+
end
1134+
1135+
theorem bsup_eq_of_brange_eq {o o'} {f : Π a < o, ordinal} {g : Π a < o', ordinal}
1136+
(h : brange o f = brange o' g) : bsup.{u (max v w)} o f = bsup.{v (max u w)} o' g :=
1137+
(bsup_le_of_brange_subset h.le).antisymm (bsup_le_of_brange_subset.{v u w} h.ge)
1138+
10891139
theorem bsup_id_limit {o} (ho : ∀ a < o, succ a < o) : bsup.{u u} o (λ x _, x) = o :=
10901140
le_antisymm (bsup_le.2 (λ i hi, hi.le))
10911141
(not_lt.1 (λ h, (lt_bsup_of_limit.{u u} (λ _ _ _ _, id) ho _ h).false))
@@ -1168,6 +1218,14 @@ end
11681218
theorem lsub_const {ι} [hι : nonempty ι] (o : ordinal) : lsub (λ _ : ι, o) = o + 1 :=
11691219
sup_const o.succ
11701220

1221+
theorem lsub_le_of_range_subset {ι ι'} {f : ι → ordinal} {g : ι' → ordinal}
1222+
(h : set.range f ⊆ set.range g) : lsub f ≤ lsub g :=
1223+
sup_le_of_range_subset (by convert set.image_subset _ h; apply set.range_comp)
1224+
1225+
theorem lsub_eq_of_range_eq {ι ι'} {f : ι → ordinal} {g : ι' → ordinal}
1226+
(h : set.range f = set.range g) : lsub f = lsub g :=
1227+
(lsub_le_of_range_subset h.le).antisymm (lsub_le_of_range_subset h.ge)
1228+
11711229
theorem lsub_nmem_range {ι} (f : ι → ordinal) : lsub f ∉ set.range f :=
11721230
λ ⟨i, h⟩, h.not_lt (lt_lsub f i)
11731231

@@ -1265,6 +1323,19 @@ begin
12651323
exact (lt_blsub.{u u} (λ x _, x) _ h).false
12661324
end
12671325

1326+
theorem blsub_le_of_brange_subset {o o'} {f : Π a < o, ordinal} {g : Π a < o', ordinal}
1327+
(h : brange o f ⊆ brange o' g) : blsub.{u (max v w)} o f ≤ blsub.{v (max u w)} o' g :=
1328+
bsup_le_of_brange_subset $ λ a ⟨b, hb, hb'⟩, begin
1329+
obtain ⟨c, hc, hc'⟩ := h ⟨b, hb, rfl⟩,
1330+
simp_rw ←hc' at hb',
1331+
exact ⟨c, hc, hb'⟩
1332+
end
1333+
1334+
theorem blsub_eq_of_brange_eq {o o'} {f : Π a < o, ordinal} {g : Π a < o', ordinal}
1335+
(h : {o | ∃ i hi, f i hi = o} = {o | ∃ i hi, g i hi = o}) :
1336+
blsub.{u (max v w)} o f = blsub.{v (max u w)} o' g :=
1337+
(blsub_le_of_brange_subset h.le).antisymm (blsub_le_of_brange_subset.{v u w} h.ge)
1338+
12681339
theorem lsub_typein (o : ordinal) : lsub.{u u} (typein o.out.r) = o :=
12691340
by { have := blsub_id o, rwa blsub_eq_lsub at this }
12701341

0 commit comments

Comments
 (0)