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

Commit a54e63d

Browse files
committed
feat(set_theory/ordinal/basic): basic lemmas on ordinal.lift (#15146)
We add some missing instances for preimages, and missing theorems for `ordinal.lift`. We remove `ordinal.lift_type`, as it was just a worse way of stating `ordinal.type_ulift`. We also tweak some spacing and golf a few theorems. This conflicts with (and is inspired by) some of the changes of #15137.
1 parent b758104 commit a54e63d

File tree

3 files changed

+34
-20
lines changed

3 files changed

+34
-20
lines changed

src/order/rel_iso.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,14 @@ f.injective.eq_iff
441441
/-- Any equivalence lifts to a relation isomorphism between `s` and its preimage. -/
442442
protected def preimage (f : α ≃ β) (s : β → β → Prop) : f ⁻¹'o s ≃r s := ⟨f, λ a b, iff.rfl⟩
443443

444+
instance is_well_order.preimage {α : Type u} (r : α → α → Prop) [is_well_order α r] (f : β ≃ α) :
445+
is_well_order β (f ⁻¹'o r) :=
446+
@rel_embedding.is_well_order _ _ (f ⁻¹'o r) r (rel_iso.preimage f r) _
447+
448+
instance is_well_order.ulift {α : Type u} (r : α → α → Prop) [is_well_order α r] :
449+
is_well_order (ulift α) (ulift.down ⁻¹'o r) :=
450+
is_well_order.preimage r equiv.ulift
451+
444452
/-- A surjective relation embedding is a relation isomorphism. -/
445453
@[simps apply]
446454
noncomputable def of_surjective (f : r ↪r s) (H : surjective f) : r ≃r s :=

src/set_theory/cardinal/cofinality.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,8 @@ end
221221
begin
222222
refine induction_on o _,
223223
introsI α r _,
224-
cases lift_type r with _ e, rw e,
225224
apply le_antisymm,
226-
{ unfreezingI { refine le_cof_type.2 (λ S H, _) },
225+
{ refine le_cof_type.2 (λ S H, _),
227226
have : (#(ulift.up ⁻¹' S)).lift ≤ #S,
228227
{ rw [← cardinal.lift_umax, ← cardinal.lift_id' (#S)],
229228
exact mk_preimage_of_injective_lift ulift.up _ ulift.up_injective },

src/set_theory/ordinal/basic.lean

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -505,12 +505,16 @@ theorem type_eq {α β} {r : α → α → Prop} {s : β → β → Prop}
505505
quotient.eq
506506

507507
theorem _root_.rel_iso.ordinal_type_eq {α β} {r : α → α → Prop} {s : β → β → Prop}
508-
[is_well_order α r] [is_well_order β s] (h : r ≃r s) :
509-
type r = type s := type_eq.2 ⟨h⟩
508+
[is_well_order α r] [is_well_order β s] (h : r ≃r s) : type r = type s :=
509+
type_eq.2 ⟨h⟩
510510

511511
@[simp] theorem type_lt (o : ordinal) : type ((<) : o.out.α → o.out.α → Prop) = o :=
512512
(type_def' _).symm.trans $ quotient.out_eq o
513513

514+
@[simp] theorem type_preimage {α β : Type u} (r : α → α → Prop) [is_well_order α r] (f : β ≃ α) :
515+
type (f ⁻¹'o r) = type r :=
516+
(rel_iso.preimage f r).ordinal_type_eq
517+
514518
@[elab_as_eliminator] theorem induction_on {C : ordinal → Prop}
515519
(o : ordinal) (H : ∀ α r [is_well_order α r], by exactI C (type r)) : C o :=
516520
quot.induction_on o $ λ ⟨α, r, wo⟩, @H α r wo
@@ -808,16 +812,23 @@ quotient.sound ⟨⟨punit_equiv_punit, λ _ _, iff.rfl⟩⟩
808812
a proper initial segment of `ordinal.{v}` for `v > u`. For the initial segment version,
809813
see `lift.initial_seg`. -/
810814
def lift (o : ordinal.{v}) : ordinal.{max v u} :=
811-
quotient.lift_on o (λ ⟨α, r, wo⟩,
812-
@type _ _ (@rel_embedding.is_well_order _ _ (@equiv.ulift.{u} α ⁻¹'o r) r
813-
(rel_iso.preimage equiv.ulift.{u} r) wo)) $
814-
λ ⟨α, r, _⟩ ⟨β, s, _⟩ ⟨f⟩,
815-
quot.sound ⟨(rel_iso.preimage equiv.ulift r).trans $
816-
f.trans (rel_iso.preimage equiv.ulift s).symm⟩
815+
quotient.lift_on o (λ w, type $ ulift.down ⁻¹'o w.r) $
816+
λ ⟨α, r, _⟩ ⟨β, s, _⟩ ⟨f⟩, quot.sound ⟨(rel_iso.preimage equiv.ulift r).trans $
817+
f.trans (rel_iso.preimage equiv.ulift s).symm⟩
818+
819+
@[simp] theorem type_ulift (r : α → α → Prop) [is_well_order α r] :
820+
type (ulift.down ⁻¹'o r) = lift.{v} (type r) :=
821+
rfl
822+
823+
theorem _root_.rel_iso.ordinal_lift_type_eq {α : Type u} {β : Type v}
824+
{r : α → α → Prop} {s : β → β → Prop} [is_well_order α r] [is_well_order β s] (f : r ≃r s) :
825+
lift.{v} (type r) = lift.{u} (type s) :=
826+
((rel_iso.preimage equiv.ulift r).trans $
827+
f.trans (rel_iso.preimage equiv.ulift s).symm).ordinal_type_eq
817828

818-
theorem lift_type} (r : α → α → Prop) [is_well_order α r] :
819-
∃ wo', lift (type r) = @type _ (@equiv.ulift.{v} α ⁻¹'o r) wo' :=
820-
⟨_, rfl⟩
829+
@[simp] theorem type_lift_preimage : Type u} {β : Type v} (r : α → α → Prop) [is_well_order α r]
830+
(f : β ≃ α) : lift.{u} (type (f ⁻¹'o r)) = lift.{v} (type r) :=
831+
(rel_iso.preimage f r).ordinal_lift_type_eq
821832

822833
/-- `lift.{(max u v) u}` equals `lift.{v u}`. Using `set_option pp.universes true` will make it much
823834
easier to understand what's happening when using this lemma. -/
@@ -871,22 +882,18 @@ by haveI := @rel_embedding.is_well_order _ _ (@equiv.ulift.{max v w} α ⁻¹'o
871882
(initial_seg.of_iso (rel_iso.preimage equiv.ulift s).symm)⟩⟩
872883

873884
@[simp] theorem lift_le {a b : ordinal} : lift.{u v} a ≤ lift b ↔ a ≤ b :=
874-
induction_on a $ λ α r _, induction_on b $ λ β s _,
875-
by rw ← lift_umax; exactI lift_type_le
885+
induction_on a $ λ α r _, induction_on b $ λ β s _, by { rw ← lift_umax, exactI lift_type_le }
876886

877887
@[simp] theorem lift_inj {a b : ordinal} : lift a = lift b ↔ a = b :=
878888
by simp only [le_antisymm_iff, lift_le]
879889

880890
@[simp] theorem lift_lt {a b : ordinal} : lift a < lift b ↔ a < b :=
881891
by simp only [lt_iff_le_not_le, lift_le]
882892

883-
@[simp] theorem lift_zero : lift 0 = 0 :=
884-
quotient.sound ⟨(rel_iso.preimage equiv.ulift _).trans
885-
⟨equiv_of_is_empty _ _, λ a b, iff.rfl⟩⟩
893+
@[simp] theorem lift_zero : lift 0 = 0 := (rel_iso.rel_iso_of_is_empty _ _).ordinal_type_eq
886894

887895
@[simp] theorem lift_one : lift 1 = 1 :=
888-
quotient.sound ⟨(rel_iso.preimage equiv.ulift _).trans
889-
⟨punit_equiv_punit, λ a b, iff.rfl⟩⟩
896+
quotient.sound ⟨(rel_iso.preimage equiv.ulift _).trans ⟨punit_equiv_punit, λ a b, iff.rfl⟩⟩
890897

891898
theorem one_eq_lift_type_unit : 1 = lift.{u} (@type unit empty_relation _) :=
892899
by rw [← one_eq_type_unit, lift_one]

0 commit comments

Comments
 (0)