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

Commit 61df9c6

Browse files
committed
feat(set_theory/ordinal/basic): tweak type_def + golf type_lt (#14611)
We replace the original, redundant `type_def'` with a new more general lemma. We keep `type_def` as it enables `dsimp`, unlike `type_def'`. We golf `type_lt` using this new lemma.
1 parent 9c4a3d1 commit 61df9c6

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/set_theory/ordinal/basic.lean

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -494,27 +494,22 @@ def type (r : α → α → Prop) [wo : is_well_order α r] : ordinal :=
494494
def typein (r : α → α → Prop) [is_well_order α r] (a : α) : ordinal :=
495495
type (subrel r {b | r b a})
496496

497-
theorem type_def (r : α → α → Prop) [wo : is_well_order α r] :
498-
@eq ordinal ⟦⟨α, r, wo⟩⟧ (type r) := rfl
497+
@[simp] theorem type_def' (w : Well_order) : ⟦w⟧ = type w.r :=
498+
by { cases w, refl }
499499

500-
@[simp] theorem type_def' (r : α → α → Prop) [is_well_order α r] {wo} :
501-
@eq ordinal ⟦⟨α, r, wo⟩⟧ (type r) := rfl
500+
@[simp] theorem type_def (r) [wo : is_well_order α r] : (⟦⟨α, r, wo⟩⟧ : ordinal) = type r :=
501+
rfl
502502

503503
theorem type_eq {α β} {r : α → α → Prop} {s : β → β → Prop}
504-
[is_well_order α r] [is_well_order β s] :
505-
type r = type s ↔ nonempty (r ≃r s) := quotient.eq
504+
[is_well_order α r] [is_well_order β s] : type r = type s ↔ nonempty (r ≃r s) :=
505+
quotient.eq
506506

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

511511
@[simp] theorem type_lt (o : ordinal) : type ((<) : o.out.α → o.out.α → Prop) = o :=
512-
begin
513-
change type o.out.r = _,
514-
refine eq.trans _ (quotient.out_eq o),
515-
cases quotient.out o,
516-
refl
517-
end
512+
(type_def' _).symm.trans $ quotient.out_eq o
518513

519514
@[elab_as_eliminator] theorem induction_on {C : ordinal → Prop}
520515
(o : ordinal) (H : ∀ α r [is_well_order α r], by exactI C (type r)) : C o :=

0 commit comments

Comments
 (0)