File: Mathlib/SetTheory/Ordinal/Basic.lean

full_name: nonempty_embedding_to_cardinal
code: theorem nonempty_embedding_to_cardinal : Nonempty (σ ↪ Cardinal.{u}) 
goal: Nonempty (σ ↪ Cardinal.{u})

full_name: embeddingToCardinal
code: /-- An embedding of any type to the set of cardinals. -/
def embeddingToCardinal : σ ↪ Cardinal.{u} 
goal: σ ↪ Cardinal.{u}

full_name: WellOrderingRel
code: /-- Any type can be endowed with a well order, obtained by pulling back the well order over
cardinals by some embedding. -/
def WellOrderingRel : σ → σ → Prop 
goal: σ → σ → Prop

full_name: WellOrderingRel.isWellOrder
code: instance WellOrderingRel.isWellOrder : IsWellOrder σ WellOrderingRel 
goal: IsWellOrder σ WellOrderingRel

full_name: IsWellOrder.subtype_nonempty
code: instance IsWellOrder.subtype_nonempty : Nonempty { r // IsWellOrder σ r } 
goal: Nonempty { r // IsWellOrder σ r }

full_name: WellOrder
code: /-- Bundled structure registering a well order on a type. Ordinals will be defined as a quotient
of this type. -/
structure WellOrder : Type (u + 1) where
  /-- The underlying type of the order. -/
  α : Type u
  /-- The underlying relation of the order. -/
  r : α → α → Prop
  /-- The proposition that `r` is a well-ordering for `α`. -/
  wo : IsWellOrder α r
goal: Type (u + 1)

full_name: WellOrder.wo
code: /-- Bundled structure registering a well order on a type. Ordinals will be defined as a quotient
of this type. -/
structure WellOrder : Type (u + 1) where
  /-- The underlying type of the order. -/
  α : Type u
  /-- The underlying relation of the order. -/
  r : α → α → Prop
  /-- The proposition that `r` is a well-ordering for `α`. -/
  wo : IsWellOrder α r
goal: IsWellOrder self.α self.r

full_name: WellOrder.α
code: /-- Bundled structure registering a well order on a type. Ordinals will be defined as a quotient
of this type. -/
structure WellOrder : Type (u + 1) where
  /-- The underlying type of the order. -/
  α : Type u
  /-- The underlying relation of the order. -/
  r : α → α → Prop
  /-- The proposition that `r` is a well-ordering for `α`. -/
  wo : IsWellOrder α r
goal: Type u

full_name: WellOrder.r
code: /-- Bundled structure registering a well order on a type. Ordinals will be defined as a quotient
of this type. -/
structure WellOrder : Type (u + 1) where
  /-- The underlying type of the order. -/
  α : Type u
  /-- The underlying relation of the order. -/
  r : α → α → Prop
  /-- The proposition that `r` is a well-ordering for `α`. -/
  wo : IsWellOrder α r
goal: self.α → self.α → Prop

full_name: WellOrder.inhabited
code: instance inhabited : Inhabited WellOrder 
goal: Inhabited WellOrder

full_name: WellOrder.eta
code: @[simp]
theorem eta (o : WellOrder) : mk o.α o.r o.wo = o 
goal: { α := o.α, r := o.r, wo := ⋯ } = o

full_name: Ordinal.isEquivalent
code: /-- Equivalence relation on well orders on arbitrary types in universe `u`, given by order
isomorphism. -/
instance Ordinal.isEquivalent : Setoid WellOrder 
goal: Setoid WellOrder

full_name: Ordinal
code: /-- `Ordinal.{u}` is the type of well orders in `Type u`, up to order isomorphism. -/
@[pp_with_univ]
def Ordinal : Type (u + 1) 
goal: Type (u + 1)

full_name: hasWellFoundedOut
code: instance hasWellFoundedOut (o : Ordinal) : WellFoundedRelation o.out.α 
goal: WellFoundedRelation (Quotient.out o).α

full_name: linearOrderOut
code: instance linearOrderOut (o : Ordinal) : LinearOrder o.out.α 
goal: LinearOrder (Quotient.out o).α

full_name: isWellOrder_out_lt
code: instance isWellOrder_out_lt (o : Ordinal) : IsWellOrder o.out.α (· < ·) 
goal: IsWellOrder (Quotient.out o).α fun x x_1 => x < x_1

full_name: Ordinal.type
code: /-- The order type of a well order is an ordinal. -/
def type (r : α → α → Prop) [wo : IsWellOrder α r] : Ordinal 
goal: Ordinal.{u}

full_name: Ordinal.zero
code: instance zero : Zero Ordinal 
goal: Zero Ordinal.{u_3}

full_name: Ordinal.inhabited
code: instance inhabited : Inhabited Ordinal 
goal: Inhabited Ordinal.{u_3}

full_name: Ordinal.one
code: instance one : One Ordinal 
goal: One Ordinal.{u_3}

full_name: Ordinal.typein
code: /-- The order type of an element inside a well order. For the embedding as a principal segment, see
`typein.principalSeg`. -/
def typein (r : α → α → Prop) [IsWellOrder α r] (a : α) : Ordinal 
goal: Ordinal.{u}

full_name: Ordinal.type_def'
code: @[simp]
theorem type_def' (w : WellOrder) : ⟦w⟧ = type w.r 
goal: ⟦w⟧ = Ordinal.type w.r

full_name: Ordinal.type_def
code: @[simp]
theorem type_def (r) [wo : IsWellOrder α r] : (⟦⟨α, r, wo⟩⟧ : Ordinal) = type r 
goal: ⟦{ α := α, r := r, wo := wo }⟧ = Ordinal.type r

full_name: Ordinal.type_out
code: @[simp]
theorem type_out (o : Ordinal) : Ordinal.type o.out.r = o 
goal: Ordinal.type (Quotient.out o).r = o

full_name: Ordinal.type_eq
code: theorem type_eq {α β} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r] [IsWellOrder β s] :
    type r = type s ↔ Nonempty (r ≃r s) 
goal: Ordinal.type r = Ordinal.type s ↔ Nonempty (r ≃r s)

full_name: RelIso.ordinal_type_eq
code: theorem _root_.RelIso.ordinal_type_eq {α β} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r]
    [IsWellOrder β s] (h : r ≃r s) : type r = type s 
goal: Ordinal.type r = Ordinal.type s

full_name: Ordinal.type_lt
code: @[simp]
theorem type_lt (o : Ordinal) : type ((· < ·) : o.out.α → o.out.α → Prop) = o 
goal: (Ordinal.type fun x x_1 => x < x_1) = o

full_name: Ordinal.type_eq_zero_of_empty
code: theorem type_eq_zero_of_empty (r) [IsWellOrder α r] [IsEmpty α] : type r = 0 
goal: Ordinal.type r = 0

full_name: Ordinal.type_eq_zero_iff_isEmpty
code: @[simp]
theorem type_eq_zero_iff_isEmpty [IsWellOrder α r] : type r = 0 ↔ IsEmpty α 
goal: Ordinal.type r = 0 ↔ IsEmpty α

full_name: Ordinal.type_ne_zero_iff_nonempty
code: theorem type_ne_zero_iff_nonempty [IsWellOrder α r] : type r ≠ 0 ↔ Nonempty α 
goal: Ordinal.type r ≠ 0 ↔ Nonempty α

full_name: Ordinal.type_ne_zero_of_nonempty
code: theorem type_ne_zero_of_nonempty (r) [IsWellOrder α r] [h : Nonempty α] : type r ≠ 0 
goal: Ordinal.type r ≠ 0

full_name: Ordinal.type_pEmpty
code: theorem type_pEmpty : type (@EmptyRelation PEmpty) = 0 
goal: Ordinal.type EmptyRelation = 0

full_name: Ordinal.type_empty
code: theorem type_empty : type (@EmptyRelation Empty) = 0 
goal: Ordinal.type EmptyRelation = 0

full_name: Ordinal.type_eq_one_of_unique
code: theorem type_eq_one_of_unique (r) [IsWellOrder α r] [Unique α] : type r = 1 
goal: Ordinal.type r = 1

full_name: Ordinal.type_eq_one_iff_unique
code: @[simp]
theorem type_eq_one_iff_unique [IsWellOrder α r] : type r = 1 ↔ Nonempty (Unique α) 
goal: Ordinal.type r = 1 ↔ Nonempty (Unique α)

full_name: Ordinal.type_pUnit
code: theorem type_pUnit : type (@EmptyRelation PUnit) = 1 
goal: Ordinal.type EmptyRelation = 1

full_name: Ordinal.type_unit
code: theorem type_unit : type (@EmptyRelation Unit) = 1 
goal: Ordinal.type EmptyRelation = 1

full_name: Ordinal.out_empty_iff_eq_zero
code: @[simp]
theorem out_empty_iff_eq_zero {o : Ordinal} : IsEmpty o.out.α ↔ o = 0 
goal: IsEmpty (Quotient.out o).α ↔ o = 0

full_name: Ordinal.eq_zero_of_out_empty
code: theorem eq_zero_of_out_empty (o : Ordinal) [h : IsEmpty o.out.α] : o = 0 
goal: o = 0

full_name: Ordinal.isEmpty_out_zero
code: instance isEmpty_out_zero : IsEmpty (0 : Ordinal).out.α 
goal: IsEmpty (Quotient.out 0).α

full_name: Ordinal.out_nonempty_iff_ne_zero
code: @[simp]
theorem out_nonempty_iff_ne_zero {o : Ordinal} : Nonempty o.out.α ↔ o ≠ 0 
goal: Nonempty (Quotient.out o).α ↔ o ≠ 0

full_name: Ordinal.ne_zero_of_out_nonempty
code: theorem ne_zero_of_out_nonempty (o : Ordinal) [h : Nonempty o.out.α] : o ≠ 0 
goal: o ≠ 0

full_name: Ordinal.one_ne_zero
code: protected theorem one_ne_zero : (1 : Ordinal) ≠ 0 
goal: 1 ≠ 0

full_name: Ordinal.nontrivial
code: instance nontrivial : Nontrivial Ordinal.{u} 
goal: Nontrivial Ordinal.{u}

full_name: Ordinal.type_preimage
code: theorem type_preimage {α β : Type u} (r : α → α → Prop) [IsWellOrder α r] (f : β ≃ α) :
    type (f ⁻¹'o r) = type r 
goal: Ordinal.type (⇑f ⁻¹'o r) = Ordinal.type r

full_name: Ordinal.type_preimage_aux
code: @[simp, nolint simpNF] -- `simpNF` incorrectly complains the LHS doesn't simplify.
theorem type_preimage_aux {α β : Type u} (r : α → α → Prop) [IsWellOrder α r] (f : β ≃ α) :
    @type _ (fun x y => r (f x) (f y)) (inferInstanceAs (IsWellOrder β (↑f ⁻¹'o r))) = type r 
goal: (Ordinal.type fun x y => r (f x) (f y)) = Ordinal.type r

full_name: Ordinal.inductionOn
code: @[elab_as_elim]
theorem inductionOn {C : Ordinal → Prop} (o : Ordinal)
    (H : ∀ (α r) [IsWellOrder α r], C (type r)) : C o 
goal: C o

full_name: Ordinal.partialOrder
code: /--
For `Ordinal`:

* less-equal is defined such that well orders `r` and `s` satisfy `type r ≤ type s` if there exists
  a function embedding `r` as an *initial* segment of `s`.

* less-than is defined such that well orders `r` and `s` satisfy `type r < type s` if there exists
  a function embedding `r` as a *principal* segment of `s`.
-/
instance partialOrder : PartialOrder Ordinal 
goal: PartialOrder Ordinal.{u_3}

full_name: Ordinal.type_le_iff
code: theorem type_le_iff {α β} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r]
    [IsWellOrder β s] : type r ≤ type s ↔ Nonempty (r ≼i s) 
goal: Ordinal.type r ≤ Ordinal.type s ↔ Nonempty (r ≼i s)

full_name: Ordinal.type_le_iff'
code: theorem type_le_iff' {α β} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r]
    [IsWellOrder β s] : type r ≤ type s ↔ Nonempty (r ↪r s) 
goal: Ordinal.type r ≤ Ordinal.type s ↔ Nonempty (r ↪r s)

full_name: InitialSeg.ordinal_type_le
code: theorem _root_.InitialSeg.ordinal_type_le {α β} {r : α → α → Prop} {s : β → β → Prop}
    [IsWellOrder α r] [IsWellOrder β s] (h : r ≼i s) : type r ≤ type s 
goal: Ordinal.type r ≤ Ordinal.type s

full_name: RelEmbedding.ordinal_type_le
code: theorem _root_.RelEmbedding.ordinal_type_le {α β} {r : α → α → Prop} {s : β → β → Prop}
    [IsWellOrder α r] [IsWellOrder β s] (h : r ↪r s) : type r ≤ type s 
goal: Ordinal.type r ≤ Ordinal.type s

full_name: Ordinal.type_lt_iff
code: @[simp]
theorem type_lt_iff {α β} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r]
    [IsWellOrder β s] : type r < type s ↔ Nonempty (r ≺i s) 
goal: Ordinal.type r < Ordinal.type s ↔ Nonempty (r ≺i s)

full_name: PrincipalSeg.ordinal_type_lt
code: theorem _root_.PrincipalSeg.ordinal_type_lt {α β} {r : α → α → Prop} {s : β → β → Prop}
    [IsWellOrder α r] [IsWellOrder β s] (h : r ≺i s) : type r < type s 
goal: Ordinal.type r < Ordinal.type s

full_name: Ordinal.zero_le
code: @[simp]
protected theorem zero_le (o : Ordinal) : 0 ≤ o 
goal: 0 ≤ o

full_name: Ordinal.orderBot
code: instance orderBot : OrderBot Ordinal 
goal: OrderBot Ordinal.{u_3}

full_name: Ordinal.bot_eq_zero
code: @[simp]
theorem bot_eq_zero : (⊥ : Ordinal) = 0 
goal: ⊥ = 0

full_name: Ordinal.le_zero
code: @[simp]
protected theorem le_zero {o : Ordinal} : o ≤ 0 ↔ o = 0 
goal: o ≤ 0 ↔ o = 0

full_name: Ordinal.pos_iff_ne_zero
code: protected theorem pos_iff_ne_zero {o : Ordinal} : 0 < o ↔ o ≠ 0 
goal: 0 < o ↔ o ≠ 0

full_name: Ordinal.not_lt_zero
code: protected theorem not_lt_zero (o : Ordinal) : ¬o < 0 
goal: ¬o < 0

full_name: Ordinal.eq_zero_or_pos
code: theorem eq_zero_or_pos : ∀ a : Ordinal, a = 0 ∨ 0 < a 
goal: a = 0 ∨ 0 < a

full_name: Ordinal.zeroLEOneClass
code: instance zeroLEOneClass : ZeroLEOneClass Ordinal 
goal: ZeroLEOneClass Ordinal.{u_3}

full_name: Ordinal.NeZero.one
code: instance NeZero.one : NeZero (1 : Ordinal) 
goal: NeZero 1

full_name: Ordinal.initialSegOut
code: /-- Given two ordinals `α ≤ β`, then `initialSegOut α β` is the initial segment embedding
of `α` to `β`, as map from a model type for `α` to a model type for `β`. -/
def initialSegOut {α β : Ordinal} (h : α ≤ β) :
    InitialSeg ((· < ·) : α.out.α → α.out.α → Prop) ((· < ·) : β.out.α → β.out.α → Prop) 
goal: (fun x x_1 => x < x_1) ≼i fun x x_1 => x < x_1

full_name: Ordinal.principalSegOut
code: /-- Given two ordinals `α < β`, then `principalSegOut α β` is the principal segment embedding
of `α` to `β`, as map from a model type for `α` to a model type for `β`. -/
def principalSegOut {α β : Ordinal} (h : α < β) :
    PrincipalSeg ((· < ·) : α.out.α → α.out.α → Prop) ((· < ·) : β.out.α → β.out.α → Prop) 
goal: (fun x x_1 => x < x_1) ≺i fun x x_1 => x < x_1

full_name: Ordinal.typein_lt_type
code: theorem typein_lt_type (r : α → α → Prop) [IsWellOrder α r] (a : α) : typein r a < type r 
goal: Ordinal.typein r a < Ordinal.type r

full_name: Ordinal.typein_lt_self
code: theorem typein_lt_self {o : Ordinal} (i : o.out.α) :
    @typein _ (· < ·) (isWellOrder_out_lt _) i < o 
goal: Ordinal.typein (fun x x_1 => x < x_1) i < o

full_name: Ordinal.typein_top
code: @[simp]
theorem typein_top {α β} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r] [IsWellOrder β s]
    (f : r ≺i s) : typein s f.top = type r 
goal: Ordinal.typein s f.top = Ordinal.type r

full_name: Ordinal.typein_apply
code: @[simp]
theorem typein_apply {α β} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r] [IsWellOrder β s]
    (f : r ≼i s) (a : α) : Ordinal.typein s (f a) = Ordinal.typein r a 
goal: Ordinal.typein s (f a) = Ordinal.typein r a

full_name: Ordinal.typein_lt_typein
code: @[simp]
theorem typein_lt_typein (r : α → α → Prop) [IsWellOrder α r] {a b : α} :
    typein r a < typein r b ↔ r a b 
goal: Ordinal.typein r a < Ordinal.typein r b ↔ r a b

full_name: Ordinal.typein_surj
code: theorem typein_surj (r : α → α → Prop) [IsWellOrder α r] {o} (h : o < type r) :
    ∃ a, typein r a = o 
goal: ∃ a, Ordinal.typein r a = o

full_name: Ordinal.typein_injective
code: theorem typein_injective (r : α → α → Prop) [IsWellOrder α r] : Injective (typein r) 
goal: Function.Injective (Ordinal.typein r)

full_name: Ordinal.typein_inj
code: @[simp]
theorem typein_inj (r : α → α → Prop) [IsWellOrder α r] {a b} : typein r a = typein r b ↔ a = b 
goal: Ordinal.typein r a = Ordinal.typein r b ↔ a = b

full_name: Ordinal.typein.principalSeg
code: /-- Principal segment version of the `typein` function, embedding a well order into
  ordinals as a principal segment. -/
def typein.principalSeg {α : Type u} (r : α → α → Prop) [IsWellOrder α r] :
    @PrincipalSeg α Ordinal.{u} r (· < ·) 
goal: r ≺i fun x x_1 => x < x_1

full_name: Ordinal.typein.principalSeg_coe
code: @[simp]
theorem typein.principalSeg_coe (r : α → α → Prop) [IsWellOrder α r] :
    (typein.principalSeg r : α → Ordinal) = typein r 
goal: ⇑(Ordinal.typein.principalSeg r).toRelEmbedding = Ordinal.typein r

full_name: Ordinal.enum
code: /-- `enum r o h` is the `o`-th element of `α` ordered by `r`.
  That is, `enum` maps an initial segment of the ordinals, those
  less than the order type of `r`, to the elements of `α`. -/
def enum (r : α → α → Prop) [IsWellOrder α r] (o) (h : o < type r) : α 
goal: α

full_name: Ordinal.typein_enum
code: @[simp]
theorem typein_enum (r : α → α → Prop) [IsWellOrder α r] {o} (h : o < type r) :
    typein r (enum r o h) = o 
goal: Ordinal.typein r (Ordinal.enum r o h) = o

full_name: Ordinal.enum_type
code: theorem enum_type {α β} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r] [IsWellOrder β s]
    (f : s ≺i r) {h : type s < type r} : enum r (type s) h = f.top 
goal: Ordinal.enum r (Ordinal.type s) h = f.top

full_name: Ordinal.enum_typein
code: @[simp]
theorem enum_typein (r : α → α → Prop) [IsWellOrder α r] (a : α) :
    enum r (typein r a) (typein_lt_type r a) = a 
goal: Ordinal.enum r (Ordinal.typein r a) ⋯ = a

full_name: Ordinal.enum_lt_enum
code: theorem enum_lt_enum {r : α → α → Prop} [IsWellOrder α r] {o₁ o₂ : Ordinal} (h₁ : o₁ < type r)
    (h₂ : o₂ < type r) : r (enum r o₁ h₁) (enum r o₂ h₂) ↔ o₁ < o₂ 
goal: r (Ordinal.enum r o₁ h₁) (Ordinal.enum r o₂ h₂) ↔ o₁ < o₂

full_name: Ordinal.relIso_enum'
code: theorem relIso_enum' {α β : Type u} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r]
    [IsWellOrder β s] (f : r ≃r s) (o : Ordinal) :
    ∀ (hr : o < type r) (hs : o < type s), f (enum r o hr) = enum s o hs 
goal: f (Ordinal.enum r o hr) = Ordinal.enum s o hs

full_name: Ordinal.relIso_enum
code: theorem relIso_enum {α β : Type u} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r]
    [IsWellOrder β s] (f : r ≃r s) (o : Ordinal) (hr : o < type r) :
    f (enum r o hr) =
      enum s o
        (by
          convert hr using 1
          apply Quotient.sound
          exact ⟨f.symm⟩) 
goal: f (Ordinal.enum r o hr) = Ordinal.enum s o ⋯

full_name: Ordinal.lt_wf
code: theorem lt_wf : @WellFounded Ordinal (· < ·) 
goal: WellFounded fun x x_1 => x < x_1

full_name: Ordinal.wellFoundedRelation
code: instance wellFoundedRelation : WellFoundedRelation Ordinal 
goal: WellFoundedRelation Ordinal.{u_3}

full_name: Ordinal.induction
code: /-- Reformulation of well founded induction on ordinals as a lemma that works with the
`induction` tactic, as in `induction i using Ordinal.induction with | h i IH => ?_`. -/
theorem induction {p : Ordinal.{u} → Prop} (i : Ordinal.{u}) (h : ∀ j, (∀ k, k < j → p k) → p j) :
    p i 
goal: p i

full_name: Ordinal.card
code: /-- The cardinal of an ordinal is the cardinality of any type on which a relation with that order
type is defined. -/
def card : Ordinal → Cardinal 
goal: Ordinal.{u_3} → Cardinal.{u_3}

full_name: Ordinal.card_type
code: @[simp]
theorem card_type (r : α → α → Prop) [IsWellOrder α r] : card (type r) = #α 
goal: (Ordinal.type r).card = #α

full_name: Ordinal.card_typein
code: @[simp, nolint simpNF]
theorem card_typein {r : α → α → Prop} [IsWellOrder α r] (x : α) :
    #{ y // r y x } = (typein r x).card 
goal: #{ y // r y x } = (Ordinal.typein r x).card

full_name: Ordinal.card_le_card
code: theorem card_le_card {o₁ o₂ : Ordinal} : o₁ ≤ o₂ → card o₁ ≤ card o₂ 
goal: o₁ ≤ o₂ → o₁.card ≤ o₂.card

full_name: Ordinal.card_zero
code: @[simp]
theorem card_zero : card 0 = 0 
goal: Ordinal.card 0 = 0

full_name: Ordinal.card_one
code: @[simp]
theorem card_one : card 1 = 1 
goal: Ordinal.card 1 = 1

full_name: Ordinal.lift
code: /-- The universe lift operation for ordinals, which embeds `Ordinal.{u}` as
  a proper initial segment of `Ordinal.{v}` for `v > u`. For the initial segment version,
  see `lift.initialSeg`. -/
@[pp_with_univ]
def lift (o : Ordinal.{v}) : Ordinal.{max v u} 
goal: Ordinal.{max v u}

full_name: Ordinal.type_uLift
code: theorem type_uLift (r : α → α → Prop) [IsWellOrder α r] :
    type (ULift.down.{v,u} ⁻¹'o r) = lift.{v} (type r) 
goal: Ordinal.type (ULift.down ⁻¹'o r) = Ordinal.lift.{v, u} (Ordinal.type r)

full_name: Ordinal.type_uLift_aux
code: @[simp, nolint simpNF]
theorem type_uLift_aux (r : α → α → Prop) [IsWellOrder α r] :
    @type.{max v u} _ (fun x y => r (ULift.down.{v,u} x) (ULift.down.{v,u} y))
      (inferInstanceAs (IsWellOrder (ULift α) (ULift.down ⁻¹'o r))) = lift.{v} (type r) 
goal: (Ordinal.type fun x y => r x.down y.down) = Ordinal.lift.{v, u} (Ordinal.type r)

full_name: RelIso.ordinal_lift_type_eq
code: theorem _root_.RelIso.ordinal_lift_type_eq {α : Type u} {β : Type v} {r : α → α → Prop}
    {s : β → β → Prop} [IsWellOrder α r] [IsWellOrder β s] (f : r ≃r s) :
    lift.{v} (type r) = lift.{u} (type s) 
goal: Ordinal.lift.{v, u} (Ordinal.type r) = Ordinal.lift.{u, v} (Ordinal.type s)

full_name: Ordinal.type_lift_preimage
code: theorem type_lift_preimage {α : Type u} {β : Type v} (r : α → α → Prop) [IsWellOrder α r]
    (f : β ≃ α) : lift.{u} (type (f ⁻¹'o r)) = lift.{v} (type r) 
goal: Ordinal.lift.{u, v} (Ordinal.type (⇑f ⁻¹'o r)) = Ordinal.lift.{v, u} (Ordinal.type r)

full_name: Ordinal.type_lift_preimage_aux
code: @[simp, nolint simpNF]
theorem type_lift_preimage_aux {α : Type u} {β : Type v} (r : α → α → Prop) [IsWellOrder α r]
    (f : β ≃ α) : lift.{u} (@type _ (fun x y => r (f x) (f y))
      (inferInstanceAs (IsWellOrder β (f ⁻¹'o r)))) = lift.{v} (type r) 
goal: Ordinal.lift.{u, v} (Ordinal.type fun x y => r (f x) (f y)) = Ordinal.lift.{v, u} (Ordinal.type r)

full_name: Ordinal.lift_umax
code: /-- `lift.{max u v, u}` equals `lift.{v, u}`. -/
-- @[simp] -- Porting note: simp lemma never applies, tested
theorem lift_umax : lift.{max u v, u} = lift.{v, u} 
goal: Ordinal.lift.{max u v, u} = Ordinal.lift.{v, u}

full_name: Ordinal.lift_umax'
code: /-- `lift.{max v u, u}` equals `lift.{v, u}`. -/
-- @[simp] -- Porting note: simp lemma never applies, tested
theorem lift_umax' : lift.{max v u, u} = lift.{v, u} 
goal: Ordinal.lift.{max v u, u} = Ordinal.lift.{v, u}

full_name: Ordinal.lift_id'
code: /-- An ordinal lifted to a lower or equal universe equals itself. -/
-- @[simp] -- Porting note: simp lemma never applies, tested
theorem lift_id' (a : Ordinal) : lift a = a 
goal: Ordinal.lift.{u_3, max u_3 u_4} a = a

full_name: Ordinal.lift_id
code: /-- An ordinal lifted to the same universe equals itself. -/
@[simp]
theorem lift_id : ∀ a, lift.{u, u} a = a 
goal: Ordinal.lift.{u, u} a = a

full_name: Ordinal.lift_uzero
code: /-- An ordinal lifted to the zero universe equals itself. -/
@[simp]
theorem lift_uzero (a : Ordinal.{u}) : lift.{0} a = a 
goal: Ordinal.lift.{0, u} a = a

full_name: Ordinal.lift_lift
code: @[simp]
theorem lift_lift (a : Ordinal) : lift.{w} (lift.{v} a) = lift.{max v w} a 
goal: Ordinal.lift.{w, max v u_3} (Ordinal.lift.{v, u_3} a) = Ordinal.lift.{max v w, u_3} a

full_name: Ordinal.lift_type_le
code: theorem lift_type_le {α : Type u} {β : Type v} {r s} [IsWellOrder α r] [IsWellOrder β s] :
    lift.{max v w} (type r) ≤ lift.{max u w} (type s) ↔ Nonempty (r ≼i s) 
goal: Ordinal.lift.{max v w, u} (Ordinal.type r) ≤ Ordinal.lift.{max u w, v} (Ordinal.type s) ↔ Nonempty (r ≼i s)

full_name: Ordinal.lift_type_eq
code: theorem lift_type_eq {α : Type u} {β : Type v} {r s} [IsWellOrder α r] [IsWellOrder β s] :
    lift.{max v w} (type r) = lift.{max u w} (type s) ↔ Nonempty (r ≃r s) 
goal: Ordinal.lift.{max v w, u} (Ordinal.type r) = Ordinal.lift.{max u w, v} (Ordinal.type s) ↔ Nonempty (r ≃r s)

full_name: Ordinal.lift_type_lt
code: theorem lift_type_lt {α : Type u} {β : Type v} {r s} [IsWellOrder α r] [IsWellOrder β s] :
    lift.{max v w} (type r) < lift.{max u w} (type s) ↔ Nonempty (r ≺i s) 
goal: Ordinal.lift.{max v w, u} (Ordinal.type r) < Ordinal.lift.{max u w, v} (Ordinal.type s) ↔ Nonempty (r ≺i s)

full_name: Ordinal.lift_le
code: @[simp]
theorem lift_le {a b : Ordinal} : lift.{u,v} a ≤ lift.{u,v} b ↔ a ≤ b 
goal: Ordinal.lift.{u, v} a ≤ Ordinal.lift.{u, v} b ↔ a ≤ b

full_name: Ordinal.lift_inj
code: @[simp]
theorem lift_inj {a b : Ordinal} : lift.{u,v} a = lift.{u,v} b ↔ a = b 
goal: Ordinal.lift.{u, v} a = Ordinal.lift.{u, v} b ↔ a = b

full_name: Ordinal.lift_lt
code: @[simp]
theorem lift_lt {a b : Ordinal} : lift.{u,v} a < lift.{u,v} b ↔ a < b 
goal: Ordinal.lift.{u, v} a < Ordinal.lift.{u, v} b ↔ a < b

full_name: Ordinal.lift_zero
code: @[simp]
theorem lift_zero : lift 0 = 0 
goal: Ordinal.lift.{u_4, u_3} 0 = 0

full_name: Ordinal.lift_one
code: @[simp]
theorem lift_one : lift 1 = 1 
goal: Ordinal.lift.{u_4, u_3} 1 = 1

full_name: Ordinal.lift_card
code: @[simp]
theorem lift_card (a) : Cardinal.lift.{u,v} (card a)= card (lift.{u,v} a) 
goal: Cardinal.lift.{u, v} a.card = (Ordinal.lift.{u, v} a).card

full_name: Ordinal.lift_down'
code: theorem lift_down' {a : Cardinal.{u}} {b : Ordinal.{max u v}}
    (h : card.{max u v} b ≤ Cardinal.lift.{v,u} a) : ∃ a', lift.{v,u} a' = b 
goal: ∃ a', Ordinal.lift.{v, u} a' = b

full_name: Ordinal.lift_down
code: theorem lift_down {a : Ordinal.{u}} {b : Ordinal.{max u v}} (h : b ≤ lift.{v,u} a) :
    ∃ a', lift.{v,u} a' = b 
goal: ∃ a', Ordinal.lift.{v, u} a' = b

full_name: Ordinal.le_lift_iff
code: theorem le_lift_iff {a : Ordinal.{u}} {b : Ordinal.{max u v}} :
    b ≤ lift.{v,u} a ↔ ∃ a', lift.{v,u} a' = b ∧ a' ≤ a 
goal: b ≤ Ordinal.lift.{v, u} a ↔ ∃ a', Ordinal.lift.{v, u} a' = b ∧ a' ≤ a

full_name: Ordinal.lt_lift_iff
code: theorem lt_lift_iff {a : Ordinal.{u}} {b : Ordinal.{max u v}} :
    b < lift.{v,u} a ↔ ∃ a', lift.{v,u} a' = b ∧ a' < a 
goal: b < Ordinal.lift.{v, u} a ↔ ∃ a', Ordinal.lift.{v, u} a' = b ∧ a' < a

full_name: Ordinal.lift.initialSeg
code: /-- Initial segment version of the lift operation on ordinals, embedding `ordinal.{u}` in
  `ordinal.{v}` as an initial segment when `u ≤ v`. -/
def lift.initialSeg : @InitialSeg Ordinal.{u} Ordinal.{max u v} (· < ·) (· < ·) 
goal: (fun x x_1 => x < x_1) ≼i fun x x_1 => x < x_1

full_name: Ordinal.lift.initialSeg_coe
code: @[simp]
theorem lift.initialSeg_coe : (lift.initialSeg.{u,v} : Ordinal → Ordinal) = lift.{v,u} 
goal: ⇑Ordinal.lift.initialSeg = Ordinal.lift.{v, u}

full_name: Ordinal.omega
code: /-- `ω` is the first infinite ordinal, defined as the order type of `ℕ`. -/
def omega : Ordinal.{u} 
goal: Ordinal.{u}

full_name: Ordinal._aux_Mathlib_SetTheory_Ordinal_Basic___macroRules_Ordinal_termω_1
code: @[inherit_doc]
scoped notation "ω" => Ordinal.omega
goal: Lean.Macro

full_name: Ordinal._aux_Mathlib_SetTheory_Ordinal_Basic___unexpand_Ordinal_omega_1
code: @[inherit_doc]
scoped notation "ω" => Ordinal.omega
goal: Lean.PrettyPrinter.Unexpander

full_name: Ordinal.type_nat_lt
code: /-- Note that the presence of this lemma makes `simp [omega]` form a loop. -/
@[simp]
theorem type_nat_lt : @type ℕ (· < ·) _ = ω 
goal: (Ordinal.type fun x x_1 => x < x_1) = Ordinal.omega

full_name: Ordinal.card_omega
code: @[simp]
theorem card_omega : card ω = ℵ₀ 
goal: Ordinal.omega.card = ℵ₀

full_name: Ordinal.lift_omega
code: @[simp]
theorem lift_omega : lift ω = ω 
goal: Ordinal.lift.{u_3, u_4} Ordinal.omega = Ordinal.omega

full_name: Ordinal.add
code: /-- `o₁ + o₂` is the order on the disjoint union of `o₁` and `o₂` obtained by declaring that
  every element of `o₁` is smaller than every element of `o₂`. -/
instance add : Add Ordinal.{u} 
goal: Add Ordinal.{u}

full_name: Ordinal.addMonoidWithOne
code: instance addMonoidWithOne : AddMonoidWithOne Ordinal.{u} 
goal: AddMonoidWithOne Ordinal.{u}

full_name: Ordinal.card_add
code: @[simp]
theorem card_add (o₁ o₂ : Ordinal) : card (o₁ + o₂) = card o₁ + card o₂ 
goal: (o₁ + o₂).card = o₁.card + o₂.card

full_name: Ordinal.type_sum_lex
code: @[simp]
theorem type_sum_lex {α β : Type u} (r : α → α → Prop) (s : β → β → Prop) [IsWellOrder α r]
    [IsWellOrder β s] : type (Sum.Lex r s) = type r + type s 
goal: Ordinal.type (Sum.Lex r s) = Ordinal.type r + Ordinal.type s

full_name: Ordinal.card_nat
code: @[simp]
theorem card_nat (n : ℕ) : card.{u} n = n 
goal: (↑n).card = ↑n

full_name: Ordinal.card_ofNat
code: @[simp]
theorem card_ofNat (n : ℕ) [n.AtLeastTwo] :
    card.{u} (no_index (OfNat.ofNat n)) = OfNat.ofNat n 
goal: (OfNat.ofNat n).card = OfNat.ofNat n

full_name: Ordinal.add_covariantClass_le
code: instance add_covariantClass_le : CovariantClass Ordinal.{u} Ordinal.{u} (· + ·) (· ≤ ·) 
goal: CovariantClass Ordinal.{u} Ordinal.{u} (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1

full_name: Ordinal.add_swap_covariantClass_le
code: instance add_swap_covariantClass_le :
    CovariantClass Ordinal.{u} Ordinal.{u} (swap (· + ·)) (· ≤ ·) 
goal: CovariantClass Ordinal.{u} Ordinal.{u} (Function.swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1

full_name: Ordinal.le_add_right
code: theorem le_add_right (a b : Ordinal) : a ≤ a + b 
goal: a ≤ a + b

full_name: Ordinal.le_add_left
code: theorem le_add_left (a b : Ordinal) : a ≤ b + a 
goal: a ≤ b + a

full_name: Ordinal.linearOrder
code: instance linearOrder : LinearOrder Ordinal 
goal: LinearOrder Ordinal.{u_3}

full_name: Ordinal.wellFoundedLT
code: instance wellFoundedLT : WellFoundedLT Ordinal 
goal: WellFoundedLT Ordinal.{u_3}

full_name: Ordinal.isWellOrder
code: instance isWellOrder : IsWellOrder Ordinal (· < ·) 
goal: IsWellOrder Ordinal.{u_3} fun x x_1 => x < x_1

full_name: Ordinal.instConditionallyCompleteLinearOrderBot
code: instance : ConditionallyCompleteLinearOrderBot Ordinal 
goal: ConditionallyCompleteLinearOrderBot Ordinal.{u_3}

full_name: Ordinal.max_zero_left
code: theorem max_zero_left : ∀ a : Ordinal, max 0 a = a 
goal: max 0 a = a

full_name: Ordinal.max_zero_right
code: theorem max_zero_right : ∀ a : Ordinal, max a 0 = a 
goal: max a 0 = a

full_name: Ordinal.max_eq_zero
code: @[simp]
theorem max_eq_zero {a b : Ordinal} : max a b = 0 ↔ a = 0 ∧ b = 0 
goal: max a b = 0 ↔ a = 0 ∧ b = 0

full_name: Ordinal.sInf_empty
code: @[simp]
theorem sInf_empty : sInf (∅ : Set Ordinal) = 0 
goal: sInf ∅ = 0

full_name: _private.Mathlib.SetTheory.Ordinal.Basic.0.Ordinal.succ_le_iff'
code: private theorem succ_le_iff' {a b : Ordinal} : a + 1 ≤ b ↔ a < b 
goal: a + 1 ≤ b ↔ a < b

full_name: Ordinal.noMaxOrder
code: instance noMaxOrder : NoMaxOrder Ordinal 
goal: NoMaxOrder Ordinal.{u_3}

full_name: Ordinal.succOrder
code: instance succOrder : SuccOrder Ordinal.{u} 
goal: SuccOrder Ordinal.{u}

full_name: Ordinal.add_one_eq_succ
code: @[simp]
theorem add_one_eq_succ (o : Ordinal) : o + 1 = succ o 
goal: o + 1 = Order.succ o

full_name: Ordinal.succ_zero
code: @[simp]
theorem succ_zero : succ (0 : Ordinal) = 1 
goal: Order.succ 0 = 1

full_name: Ordinal.succ_one
code: @[simp]
theorem succ_one : succ (1 : Ordinal) = 2 
goal: Order.succ 1 = 2

full_name: Ordinal.add_succ
code: theorem add_succ (o₁ o₂ : Ordinal) : o₁ + succ o₂ = succ (o₁ + o₂) 
goal: o₁ + Order.succ o₂ = Order.succ (o₁ + o₂)

full_name: Ordinal.one_le_iff_pos
code: theorem one_le_iff_pos {o : Ordinal} : 1 ≤ o ↔ 0 < o 
goal: 1 ≤ o ↔ 0 < o

full_name: Ordinal.one_le_iff_ne_zero
code: theorem one_le_iff_ne_zero {o : Ordinal} : 1 ≤ o ↔ o ≠ 0 
goal: 1 ≤ o ↔ o ≠ 0

full_name: Ordinal.succ_pos
code: theorem succ_pos (o : Ordinal) : 0 < succ o 
goal: 0 < Order.succ o

full_name: Ordinal.succ_ne_zero
code: theorem succ_ne_zero (o : Ordinal) : succ o ≠ 0 
goal: Order.succ o ≠ 0

full_name: Ordinal.lt_one_iff_zero
code: @[simp]
theorem lt_one_iff_zero {a : Ordinal} : a < 1 ↔ a = 0 
goal: a < 1 ↔ a = 0

full_name: Ordinal.le_one_iff
code: theorem le_one_iff {a : Ordinal} : a ≤ 1 ↔ a = 0 ∨ a = 1 
goal: a ≤ 1 ↔ a = 0 ∨ a = 1

full_name: Ordinal.card_succ
code: @[simp]
theorem card_succ (o : Ordinal) : card (succ o) = card o + 1 
goal: (Order.succ o).card = o.card + 1

full_name: Ordinal.natCast_succ
code: theorem natCast_succ (n : ℕ) : ↑n.succ = succ (n : Ordinal) 
goal: ↑n.succ = Order.succ ↑n

full_name: Ordinal.uniqueIioOne
code: instance uniqueIioOne : Unique (Iio (1 : Ordinal)) 
goal: Unique ↑(Set.Iio 1)

full_name: Ordinal.uniqueOutOne
code: instance uniqueOutOne : Unique (1 : Ordinal).out.α 
goal: Unique (Quotient.out 1).α

full_name: Ordinal.one_out_eq
code: theorem one_out_eq (x : (1 : Ordinal).out.α) : x = enum (· < ·) 0 (by simp) 
goal: x = Ordinal.enum (fun x x_1 => x < x_1) 0 ⋯

full_name: Ordinal.typein_one_out
code: @[simp]
theorem typein_one_out (x : (1 : Ordinal).out.α) :
    @typein _ (· < ·) (isWellOrder_out_lt _) x = 0 
goal: Ordinal.typein (fun x x_1 => x < x_1) x = 0

full_name: Ordinal.typein_le_typein
code: @[simp]
theorem typein_le_typein (r : α → α → Prop) [IsWellOrder α r] {x x' : α} :
    typein r x ≤ typein r x' ↔ ¬r x' x 
goal: Ordinal.typein r x ≤ Ordinal.typein r x' ↔ ¬r x' x

full_name: Ordinal.typein_le_typein'
code: theorem typein_le_typein' (o : Ordinal) {x x' : o.out.α} :
    @typein _ (· < ·) (isWellOrder_out_lt _) x ≤ @typein _ (· < ·) (isWellOrder_out_lt _) x'
      ↔ x ≤ x' 
goal: Ordinal.typein (fun x x_1 => x < x_1) x ≤ Ordinal.typein (fun x x_1 => x < x_1) x' ↔ x ≤ x'

full_name: Ordinal.enum_le_enum
code: @[simp, nolint simpNF]
theorem enum_le_enum (r : α → α → Prop) [IsWellOrder α r] {o o' : Ordinal} (ho : o < type r)
    (ho' : o' < type r) : ¬r (enum r o' ho') (enum r o ho) ↔ o ≤ o' 
goal: ¬r (Ordinal.enum r o' ho') (Ordinal.enum r o ho) ↔ o ≤ o'

full_name: Ordinal.enum_le_enum'
code: @[simp]
theorem enum_le_enum' (a : Ordinal) {o o' : Ordinal} (ho : o < type (· < ·))
    (ho' : o' < type (· < ·)) : enum (· < ·) o ho ≤ @enum a.out.α (· < ·) _ o' ho' ↔ o ≤ o' 
goal: Ordinal.enum (fun x x_1 => x < x_1) o ho ≤ Ordinal.enum (fun x x_1 => x < x_1) o' ho' ↔ o ≤ o'

full_name: Ordinal.enum_zero_le
code: theorem enum_zero_le {r : α → α → Prop} [IsWellOrder α r] (h0 : 0 < type r) (a : α) :
    ¬r a (enum r 0 h0) 
goal: ¬r a (Ordinal.enum r 0 h0)

full_name: Ordinal.enum_zero_le'
code: theorem enum_zero_le' {o : Ordinal} (h0 : 0 < o) (a : o.out.α) :
    @enum o.out.α (· < ·) _ 0 (by rwa [type_lt]) ≤ a 
goal: Ordinal.enum (fun x x_1 => x < x_1) 0 ⋯ ≤ a

full_name: Ordinal.le_enum_succ
code: theorem le_enum_succ {o : Ordinal} (a : (succ o).out.α) :
    a ≤
      @enum (succ o).out.α (· < ·) _ o
        (by
          rw [type_lt]
          exact lt_succ o) 
goal: a ≤ Ordinal.enum (fun x x_1 => x < x_1) o ⋯

full_name: Ordinal.enum_inj
code: @[simp]
theorem enum_inj {r : α → α → Prop} [IsWellOrder α r] {o₁ o₂ : Ordinal} (h₁ : o₁ < type r)
    (h₂ : o₂ < type r) : enum r o₁ h₁ = enum r o₂ h₂ ↔ o₁ = o₂ 
goal: Ordinal.enum r o₁ h₁ = Ordinal.enum r o₂ h₂ ↔ o₁ = o₂

full_name: Ordinal.enumIso_symm_apply_coe
code: /-- A well order `r` is order isomorphic to the set of ordinals smaller than `type r`. -/
@[simps]
def enumIso (r : α → α → Prop) [IsWellOrder α r] : Subrel (· < ·) (· < type r) ≃r r 
goal: ↑((Ordinal.enumIso r).symm x) = Ordinal.typein r x

full_name: Ordinal.enumIso
code: /-- A well order `r` is order isomorphic to the set of ordinals smaller than `type r`. -/
@[simps]
def enumIso (r : α → α → Prop) [IsWellOrder α r] : Subrel (· < ·) (· < type r) ≃r r 
goal: (Subrel (fun x x_1 => x < x_1) fun x => x < Ordinal.type r) ≃r r

full_name: Ordinal.enumIso_apply
code: /-- A well order `r` is order isomorphic to the set of ordinals smaller than `type r`. -/
@[simps]
def enumIso (r : α → α → Prop) [IsWellOrder α r] : Subrel (· < ·) (· < type r) ≃r r 
goal: (Ordinal.enumIso r) x = Ordinal.enum r ↑x ⋯

full_name: Ordinal.enumIsoOut_apply
code: /-- The order isomorphism between ordinals less than `o` and `o.out.α`. -/
@[simps!]
noncomputable def enumIsoOut (o : Ordinal) : Set.Iio o ≃o o.out.α 
goal: o.enumIsoOut x = Ordinal.enum (fun x x_1 => x < x_1) ↑x ⋯

full_name: Ordinal.enumIsoOut_symm_apply_coe
code: /-- The order isomorphism between ordinals less than `o` and `o.out.α`. -/
@[simps!]
noncomputable def enumIsoOut (o : Ordinal) : Set.Iio o ≃o o.out.α 
goal: ↑((RelIso.symm o.enumIsoOut) x) = Ordinal.typein (fun x x_1 => x < x_1) x

full_name: Ordinal.enumIsoOut
code: /-- The order isomorphism between ordinals less than `o` and `o.out.α`. -/
@[simps!]
noncomputable def enumIsoOut (o : Ordinal) : Set.Iio o ≃o o.out.α 
goal: ↑(Set.Iio o) ≃o (Quotient.out o).α

full_name: Ordinal.outOrderBotOfPos
code: /-- `o.out.α` is an `OrderBot` whenever `0 < o`. -/
def outOrderBotOfPos {o : Ordinal} (ho : 0 < o) : OrderBot o.out.α 
goal: OrderBot (Quotient.out o).α

full_name: Ordinal.enum_zero_eq_bot
code: theorem enum_zero_eq_bot {o : Ordinal} (ho : 0 < o) :
    enum (· < ·) 0 (by rwa [type_lt]) =
      haveI H := outOrderBotOfPos ho
      (⊥ : (Quotient.out o).α) 
goal: Ordinal.enum (fun x x_1 => x < x_1) 0 ⋯ = ⊥

full_name: Ordinal.univ
code: /-- `univ.{u v}` is the order type of the ordinals of `Type u` as a member
  of `Ordinal.{v}` (when `u < v`). It is an inaccessible cardinal. -/
@[pp_with_univ, nolint checkUnivs]
def univ : Ordinal.{max (u + 1) v} 
goal: Ordinal.{max (u + 1) v}

full_name: Ordinal.univ_id
code: theorem univ_id : univ.{u, u + 1} = @type Ordinal (· < ·) _ 
goal: Ordinal.univ.{u, u + 1} = Ordinal.type fun x x_1 => x < x_1

full_name: Ordinal.lift_univ
code: @[simp]
theorem lift_univ : lift.{w} univ.{u, v} = univ.{u, max v w} 
goal: Ordinal.lift.{w, max (u + 1) v} Ordinal.univ.{u, v} = Ordinal.univ.{u, max v w}

full_name: Ordinal.univ_umax
code: theorem univ_umax : univ.{u, max (u + 1) v} = univ.{u, v} 
goal: Ordinal.univ.{u, max (u + 1) v} = Ordinal.univ.{u, v}

full_name: Ordinal.lift.principalSeg
code: /-- Principal segment version of the lift operation on ordinals, embedding `ordinal.{u}` in
  `ordinal.{v}` as a principal segment when `u < v`. -/
def lift.principalSeg : @PrincipalSeg Ordinal.{u} Ordinal.{max (u + 1) v} (· < ·) (· < ·) 
goal: (fun x x_1 => x < x_1) ≺i fun x x_1 => x < x_1

full_name: Ordinal.lift.principalSeg_coe
code: @[simp]
theorem lift.principalSeg_coe :
    (lift.principalSeg.{u, v} : Ordinal → Ordinal) = lift.{max (u + 1) v} 
goal: ⇑Ordinal.lift.principalSeg.toRelEmbedding = Ordinal.lift.{max (u + 1) v, u}

full_name: Ordinal.lift.principalSeg_top
code: @[simp]
theorem lift.principalSeg_top : (lift.principalSeg.{u,v}).top = univ.{u,v} 
goal: Ordinal.lift.principalSeg.top = Ordinal.univ.{u, v}

full_name: Ordinal.lift.principalSeg_top'
code: theorem lift.principalSeg_top' : lift.principalSeg.{u, u + 1}.top = @type Ordinal (· < ·) _ 
goal: Ordinal.lift.principalSeg.top = Ordinal.type fun x x_1 => x < x_1

full_name: Cardinal.mk_ordinal_out
code: @[simp]
theorem mk_ordinal_out (o : Ordinal) : #o.out.α = o.card 
goal: #(Quotient.out o).α = o.card

full_name: Cardinal.ord
code: /-- The ordinal corresponding to a cardinal `c` is the least ordinal
  whose cardinal is `c`. For the order-embedding version, see `ord.order_embedding`. -/
def ord (c : Cardinal) : Ordinal 
goal: Ordinal.{u}

full_name: Cardinal.ord_eq_Inf
code: theorem ord_eq_Inf (α : Type u) : ord #α = ⨅ r : { r // IsWellOrder α r }, @type α r.1 r.2 
goal: (#α).ord = ⨅ r, Ordinal.type ↑r

full_name: Cardinal.ord_eq
code: theorem ord_eq (α) : ∃ (r : α → α → Prop) (wo : IsWellOrder α r), ord #α = @type α r wo 
goal: ∃ r, ∃ (wo : IsWellOrder α r), (#α).ord = Ordinal.type r

full_name: Cardinal.ord_le_type
code: theorem ord_le_type (r : α → α → Prop) [h : IsWellOrder α r] : ord #α ≤ type r 
goal: (#α).ord ≤ Ordinal.type r

full_name: Cardinal.ord_le
code: theorem ord_le {c o} : ord c ≤ o ↔ c ≤ o.card 
goal: c.ord ≤ o ↔ c ≤ o.card

full_name: Cardinal.gc_ord_card
code: theorem gc_ord_card : GaloisConnection ord card 
goal: GaloisConnection Cardinal.ord Ordinal.card

full_name: Cardinal.lt_ord
code: theorem lt_ord {c o} : o < ord c ↔ o.card < c 
goal: o < c.ord ↔ o.card < c

full_name: Cardinal.card_ord
code: @[simp]
theorem card_ord (c) : (ord c).card = c 
goal: c.ord.card = c

full_name: Cardinal.gciOrdCard
code: /-- Galois coinsertion between `Cardinal.ord` and `Ordinal.card`. -/
def gciOrdCard : GaloisCoinsertion ord card 
goal: GaloisCoinsertion Cardinal.ord Ordinal.card

full_name: Cardinal.ord_card_le
code: theorem ord_card_le (o : Ordinal) : o.card.ord ≤ o 
goal: o.card.ord ≤ o

full_name: Cardinal.lt_ord_succ_card
code: theorem lt_ord_succ_card (o : Ordinal) : o < (succ o.card).ord 
goal: o < (Order.succ o.card).ord

full_name: Cardinal.card_le_iff
code: theorem card_le_iff {o : Ordinal} {c : Cardinal} : o.card ≤ c ↔ o < (succ c).ord 
goal: o.card ≤ c ↔ o < (Order.succ c).ord

full_name: Cardinal.card_le_of_le_ord
code: /--
A variation on `Cardinal.lt_ord` using `≤`: If `o` is no greater than the
initial ordinal of cardinality `c`, then its cardinal is no greater than `c`.

The converse, however, is false (for instance, `o = ω+1` and `c = ℵ₀`).
-/
lemma card_le_of_le_ord {o : Ordinal} {c : Cardinal} (ho : o ≤ c.ord) :
    o.card ≤ c 
goal: o.card ≤ c

full_name: Cardinal.ord_strictMono
code: @[mono]
theorem ord_strictMono : StrictMono ord 
goal: StrictMono Cardinal.ord

full_name: Cardinal.ord_mono
code: @[mono]
theorem ord_mono : Monotone ord 
goal: Monotone Cardinal.ord

full_name: Cardinal.ord_le_ord
code: @[simp]
theorem ord_le_ord {c₁ c₂} : ord c₁ ≤ ord c₂ ↔ c₁ ≤ c₂ 
goal: c₁.ord ≤ c₂.ord ↔ c₁ ≤ c₂

full_name: Cardinal.ord_lt_ord
code: @[simp]
theorem ord_lt_ord {c₁ c₂} : ord c₁ < ord c₂ ↔ c₁ < c₂ 
goal: c₁.ord < c₂.ord ↔ c₁ < c₂

full_name: Cardinal.ord_zero
code: @[simp]
theorem ord_zero : ord 0 = 0 
goal: Cardinal.ord 0 = 0

full_name: Cardinal.ord_nat
code: @[simp]
theorem ord_nat (n : ℕ) : ord n = n 
goal: (↑n).ord = ↑n

full_name: Cardinal.ord_one
code: @[simp]
theorem ord_one : ord 1 = 1 
goal: Cardinal.ord 1 = 1

full_name: Cardinal.ord_ofNat
code: @[simp]
theorem ord_ofNat (n : ℕ) [n.AtLeastTwo] : ord (no_index (OfNat.ofNat n)) = OfNat.ofNat n 
goal: (OfNat.ofNat n).ord = OfNat.ofNat n

full_name: Cardinal.lift_ord
code: @[simp]
theorem lift_ord (c) : Ordinal.lift.{u,v} (ord c) = ord (lift.{u,v} c) 
goal: Ordinal.lift.{u, v} c.ord = (Cardinal.lift.{u, v} c).ord

full_name: Cardinal.mk_ord_out
code: theorem mk_ord_out (c : Cardinal) : #c.ord.out.α = c 
goal: #(Quotient.out c.ord).α = c

full_name: Cardinal.card_typein_lt
code: theorem card_typein_lt (r : α → α → Prop) [IsWellOrder α r] (x : α) (h : ord #α = type r) :
    card (typein r x) < #α 
goal: (Ordinal.typein r x).card < #α

full_name: Cardinal.card_typein_out_lt
code: theorem card_typein_out_lt (c : Cardinal) (x : c.ord.out.α) :
    card (@typein _ (· < ·) (isWellOrder_out_lt _) x) < c 
goal: (Ordinal.typein (fun x x_1 => x < x_1) x).card < c

full_name: Cardinal.mk_Iio_ord_out_α
code: theorem mk_Iio_ord_out_α {c : Cardinal} (i : c.ord.out.α) : #(Iio i) < c 
goal: #↑(Set.Iio i) < c

full_name: Cardinal.ord_injective
code: theorem ord_injective : Injective ord 
goal: Function.Injective Cardinal.ord

full_name: Cardinal.ord.orderEmbedding
code: /-- The ordinal corresponding to a cardinal `c` is the least ordinal
  whose cardinal is `c`. This is the order-embedding version. For the regular function, see `ord`.
-/
def ord.orderEmbedding : Cardinal ↪o Ordinal 
goal: Cardinal.{u_3} ↪o Ordinal.{u_3}

full_name: Cardinal.ord.orderEmbedding_coe
code: @[simp]
theorem ord.orderEmbedding_coe : (ord.orderEmbedding : Cardinal → Ordinal) = ord 
goal: ⇑Cardinal.ord.orderEmbedding = Cardinal.ord

full_name: Cardinal.univ
code: /-- The cardinal `univ` is the cardinality of ordinal `univ`, or
  equivalently the cardinal of `Ordinal.{u}`, or `Cardinal.{u}`,
  as an element of `Cardinal.{v}` (when `u < v`). -/
@[pp_with_univ, nolint checkUnivs]
def univ 
goal: Cardinal.{max (u + 1) v}

full_name: Cardinal.univ_id
code: theorem univ_id : univ.{u, u + 1} = #Ordinal 
goal: Cardinal.univ.{u, u + 1} = #Ordinal.{u}

full_name: Cardinal.lift_univ
code: @[simp]
theorem lift_univ : lift.{w} univ.{u, v} = univ.{u, max v w} 
goal: Cardinal.lift.{w, max (u + 1) v} Cardinal.univ.{u, v} = Cardinal.univ.{u, max v w}

full_name: Cardinal.univ_umax
code: theorem univ_umax : univ.{u, max (u + 1) v} = univ.{u, v} 
goal: Cardinal.univ.{u, max (u + 1) v} = Cardinal.univ.{u, v}

full_name: Cardinal.lift_lt_univ
code: theorem lift_lt_univ (c : Cardinal) : lift.{u + 1, u} c < univ.{u, u + 1} 
goal: Cardinal.lift.{u + 1, u} c < Cardinal.univ.{u, u + 1}

full_name: Cardinal.lift_lt_univ'
code: theorem lift_lt_univ' (c : Cardinal) : lift.{max (u + 1) v, u} c < univ.{u, v} 
goal: Cardinal.lift.{max (u + 1) v, u} c < Cardinal.univ.{u, v}

full_name: Cardinal.ord_univ
code: @[simp]
theorem ord_univ : ord univ.{u, v} = Ordinal.univ.{u, v} 
goal: Cardinal.univ.{u, v}.ord = Ordinal.univ.{u, v}

full_name: Cardinal.lt_univ
code: theorem lt_univ {c} : c < univ.{u, u + 1} ↔ ∃ c', c = lift.{u + 1, u} c' 
goal: c < Cardinal.univ.{u, u + 1} ↔ ∃ c', c = Cardinal.lift.{u + 1, u} c'

full_name: Cardinal.lt_univ'
code: theorem lt_univ' {c} : c < univ.{u, v} ↔ ∃ c', c = lift.{max (u + 1) v, u} c' 
goal: c < Cardinal.univ.{u, v} ↔ ∃ c', c = Cardinal.lift.{max (u + 1) v, u} c'

full_name: Cardinal.small_iff_lift_mk_lt_univ
code: theorem small_iff_lift_mk_lt_univ {α : Type u} :
    Small.{v} α ↔ Cardinal.lift.{v+1,_} #α < univ.{v, max u (v + 1)} 
goal: Small.{v, u} α ↔ Cardinal.lift.{v + 1, u} #α < Cardinal.univ.{v, max u (v + 1)}

full_name: Ordinal.card_univ
code: @[simp]
theorem card_univ : card univ.{u,v} = Cardinal.univ.{u,v} 
goal: Ordinal.univ.{u, v}.card = Cardinal.univ.{u, v}

full_name: Ordinal.nat_le_card
code: @[simp]
theorem nat_le_card {o} {n : ℕ} : (n : Cardinal) ≤ card o ↔ (n : Ordinal) ≤ o 
goal: ↑n ≤ o.card ↔ ↑n ≤ o

full_name: Ordinal.one_le_card
code: @[simp]
theorem one_le_card {o} : 1 ≤ card o ↔ 1 ≤ o 
goal: 1 ≤ o.card ↔ 1 ≤ o

full_name: Ordinal.ofNat_le_card
code: @[simp]
theorem ofNat_le_card {o} {n : ℕ} [n.AtLeastTwo] :
    (no_index (OfNat.ofNat n : Cardinal)) ≤ card o ↔ (OfNat.ofNat n : Ordinal) ≤ o 
goal: OfNat.ofNat n ≤ o.card ↔ OfNat.ofNat n ≤ o

full_name: Ordinal.nat_lt_card
code: @[simp]
theorem nat_lt_card {o} {n : ℕ} : (n : Cardinal) < card o ↔ (n : Ordinal) < o 
goal: ↑n < o.card ↔ ↑n < o

full_name: Ordinal.zero_lt_card
code: @[simp]
theorem zero_lt_card {o} : 0 < card o ↔ 0 < o 
goal: 0 < o.card ↔ 0 < o

full_name: Ordinal.one_lt_card
code: @[simp]
theorem one_lt_card {o} : 1 < card o ↔ 1 < o 
goal: 1 < o.card ↔ 1 < o

full_name: Ordinal.ofNat_lt_card
code: @[simp]
theorem ofNat_lt_card {o} {n : ℕ} [n.AtLeastTwo] :
    (no_index (OfNat.ofNat n : Cardinal)) < card o ↔ (OfNat.ofNat n : Ordinal) < o 
goal: OfNat.ofNat n < o.card ↔ OfNat.ofNat n < o

full_name: Ordinal.card_lt_nat
code: @[simp]
theorem card_lt_nat {o} {n : ℕ} : card o < n ↔ o < n 
goal: o.card < ↑n ↔ o < ↑n

full_name: Ordinal.card_lt_ofNat
code: @[simp]
theorem card_lt_ofNat {o} {n : ℕ} [n.AtLeastTwo] :
    card o < (no_index (OfNat.ofNat n)) ↔ o < OfNat.ofNat n 
goal: o.card < OfNat.ofNat n ↔ o < OfNat.ofNat n

full_name: Ordinal.card_le_nat
code: @[simp]
theorem card_le_nat {o} {n : ℕ} : card o ≤ n ↔ o ≤ n 
goal: o.card ≤ ↑n ↔ o ≤ ↑n

full_name: Ordinal.card_le_one
code: @[simp]
theorem card_le_one {o} : card o ≤ 1 ↔ o ≤ 1 
goal: o.card ≤ 1 ↔ o ≤ 1

full_name: Ordinal.card_le_ofNat
code: @[simp]
theorem card_le_ofNat {o} {n : ℕ} [n.AtLeastTwo] :
    card o ≤ (no_index (OfNat.ofNat n)) ↔ o ≤ OfNat.ofNat n 
goal: o.card ≤ OfNat.ofNat n ↔ o ≤ OfNat.ofNat n

full_name: Ordinal.card_eq_nat
code: @[simp]
theorem card_eq_nat {o} {n : ℕ} : card o = n ↔ o = n 
goal: o.card = ↑n ↔ o = ↑n

full_name: Ordinal.card_eq_zero
code: @[simp]
theorem card_eq_zero {o} : card o = 0 ↔ o = 0 
goal: o.card = 0 ↔ o = 0

full_name: Ordinal.card_eq_one
code: @[simp]
theorem card_eq_one {o} : card o = 1 ↔ o = 1 
goal: o.card = 1 ↔ o = 1

full_name: Ordinal.card_eq_ofNat
code: @[simp]
theorem card_eq_ofNat {o} {n : ℕ} [n.AtLeastTwo] :
    card o = (no_index (OfNat.ofNat n)) ↔ o = OfNat.ofNat n 
goal: o.card = OfNat.ofNat n ↔ o = OfNat.ofNat n

full_name: Ordinal.type_fintype
code: @[simp]
theorem type_fintype (r : α → α → Prop) [IsWellOrder α r] [Fintype α] :
    type r = Fintype.card α 
goal: Ordinal.type r = ↑(Fintype.card α)

full_name: Ordinal.type_fin
code: theorem type_fin (n : ℕ) : @type (Fin n) (· < ·) _ = n 
goal: (Ordinal.type fun x x_1 => x < x_1) = ↑n

full_name: List.Sorted.lt_ord_of_lt
code: theorem List.Sorted.lt_ord_of_lt [LinearOrder α] [IsWellOrder α (· < ·)] {l m : List α}
    {o : Ordinal} (hl : l.Sorted (· > ·)) (hm : m.Sorted (· > ·)) (hmltl : m < l)
    (hlt : ∀ i ∈ l, Ordinal.typein (· < ·) i < o) : ∀ i ∈ m, Ordinal.typein (· < ·) i < o 
goal: i ∈ m → Ordinal.typein (fun x x_1 => x < x_1) i < o