Theorem: Cardinal.mul_eq_self
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: refine' le_antisymm _ (by simpa only [mul_one] using mul_le_mul_left' (one_le_aleph0.trans h) c)
state_before: c : Cardinal
h : ℵ₀ ≤ c
⊢ c * c = c

tactic: refine' Acc.recOn (Cardinal.lt_wf.apply c) (fun c _ => Quotient.inductionOn c fun α IH ol => _) h
state_before: c : Cardinal
h : ℵ₀ ≤ c
⊢ c * c ≤ c

tactic: rcases ord_eq α with ⟨r, wo, e⟩
state_before: c✝ : Cardinal
h : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
⊢ Quotient.mk isEquivalent α * Quotient.mk isEquivalent α ≤ Quotient.mk isEquivalent α

tactic: skip
state_before: case intro.intro
c✝ : Cardinal
h : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
⊢ Quotient.mk isEquivalent α * Quotient.mk isEquivalent α ≤ Quotient.mk isEquivalent α

tactic: letI := linearOrderOfSTO r
state_before: case intro.intro
c✝ : Cardinal
h : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
⊢ Quotient.mk isEquivalent α * Quotient.mk isEquivalent α ≤ Quotient.mk isEquivalent α

tactic: let g : α × α → α := fun p => max p.1 p.2
state_before: case intro.intro
c✝ : Cardinal
h : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝ : LinearOrder α := linearOrderOfSTO r
this : IsWellOrder α fun x x_1 => x < x_1
⊢ Quotient.mk isEquivalent α * Quotient.mk isEquivalent α ≤ Quotient.mk isEquivalent α

tactic: haveI : IsWellOrder _ s := (RelEmbedding.preimage _ _).isWellOrder
state_before: case intro.intro
c✝ : Cardinal
h : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝ : LinearOrder α := linearOrderOfSTO r
this : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
⊢ Quotient.mk isEquivalent α * Quotient.mk isEquivalent α ≤ Quotient.mk isEquivalent α

tactic: suffices type s ≤ type r by exact card_le_card this
state_before: case intro.intro
c✝ : Cardinal
h : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this : IsWellOrder (α × α) s
⊢ Quotient.mk isEquivalent α * Quotient.mk isEquivalent α ≤ Quotient.mk isEquivalent α

tactic: refine' le_of_forall_lt fun o h => _
state_before: case intro.intro
c✝ : Cardinal
h : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this : IsWellOrder (α × α) s
⊢ type s ≤ type r

tactic: rcases typein_surj s h with ⟨p, rfl⟩
state_before: case intro.intro
c✝ : Cardinal
h✝ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this : IsWellOrder (α × α) s
o : Ordinal
h : o < type s
⊢ o < type r

tactic: rw [← e, lt_ord]
state_before: case intro.intro.intro
c✝ : Cardinal
h✝ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this : IsWellOrder (α × α) s
p : α × α
h : typein s p < type s
⊢ typein s p < type r

tactic: simpa only [mul_one] using mul_le_mul_left' (one_le_aleph0.trans h) c
state_before: c : Cardinal
h : ℵ₀ ≤ c
⊢ c ≤ c * c

tactic: exact card_le_card this
state_before: c✝ : Cardinal
h : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝² : LinearOrder α := linearOrderOfSTO r
this✝¹ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this✝ : IsWellOrder (α × α) s
this : type s ≤ type r
⊢ Quotient.mk isEquivalent α * Quotient.mk isEquivalent α ≤ Quotient.mk isEquivalent α

tactic: have : { q | s q p } ⊆ insert (g p) { x | x < g p } ×ˢ insert (g p) { x | x < g p } := by
  intro q h
  simp only [Preimage, ge_iff_le, Embedding.coeFn_mk, Prod.lex_def, typein_lt_typein,
    typein_inj, mem_setOf_eq] at h
  exact max_le_iff.1 (le_iff_lt_or_eq.2 <| h.imp_right And.left)
state_before: case intro.intro.intro.refine'_1
c✝ : Cardinal
h✝ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this : IsWellOrder (α × α) s
p : α × α
h : typein s p < type s
⊢ card (typein s p) ≤
    card (succ (typein (fun x x_1 => x < x_1) (g p))) * card (succ (typein (fun x x_1 => x < x_1) (g p)))

tactic: suffices H : (insert (g p) { x | r x (g p) } : Set α) ≃ Sum { x | r x (g p) } PUnit
state_before: case intro.intro.intro.refine'_1
c✝ : Cardinal
h✝ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝² : LinearOrder α := linearOrderOfSTO r
this✝¹ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this✝ : IsWellOrder (α × α) s
p : α × α
h : typein s p < type s
this : {q | s q p} ⊆ insert (g p) {x | x < g p} ×ˢ insert (g p) {x | x < g p}
⊢ card (typein s p) ≤
    card (succ (typein (fun x x_1 => x < x_1) (g p))) * card (succ (typein (fun x x_1 => x < x_1) (g p)))

tactic: refine' (Equiv.Set.insert _).trans ((Equiv.refl _).sumCongr punitEquivPUnit)
state_before: case H
c✝ : Cardinal
h✝ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝² : LinearOrder α := linearOrderOfSTO r
this✝¹ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this✝ : IsWellOrder (α × α) s
p : α × α
h : typein s p < type s
this : {q | s q p} ⊆ insert (g p) {x | x < g p} ×ˢ insert (g p) {x | x < g p}
⊢ ↑(insert (g p) {x | r x (g p)}) ≃ ↑{x | r x (g p)} ⊕ PUnit

tactic: apply @irrefl _ r
state_before: case H
c✝ : Cardinal
h✝ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝² : LinearOrder α := linearOrderOfSTO r
this✝¹ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this✝ : IsWellOrder (α × α) s
p : α × α
h : typein s p < type s
this : {q | s q p} ⊆ insert (g p) {x | x < g p} ×ˢ insert (g p) {x | x < g p}
⊢ ¬g p ∈ {x | r x (g p)}

tactic: intro q h
state_before: c✝ : Cardinal
h✝ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this : IsWellOrder (α × α) s
p : α × α
h : typein s p < type s
⊢ {q | s q p} ⊆ insert (g p) {x | x < g p} ×ˢ insert (g p) {x | x < g p}

tactic: simp only [Preimage, ge_iff_le, Embedding.coeFn_mk, Prod.lex_def, typein_lt_typein,
  typein_inj, mem_setOf_eq] at h
state_before: c✝ : Cardinal
h✝¹ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this : IsWellOrder (α × α) s
p : α × α
h✝ : typein s p < type s
q : α × α
h : q ∈ {q | s q p}
⊢ q ∈ insert (g p) {x | x < g p} ×ˢ insert (g p) {x | x < g p}

tactic: exact max_le_iff.1 (le_iff_lt_or_eq.2 <| h.imp_right And.left)
state_before: c✝ : Cardinal
h✝¹ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this : IsWellOrder (α × α) s
p : α × α
h✝ : typein s p < type s
q : α × α
h :
  max q.fst q.snd < max p.fst p.snd ∨
    max q.fst q.snd = max p.fst p.snd ∧ (q.fst < p.fst ∨ q.fst = p.fst ∧ q.snd < p.snd)
⊢ q ∈ insert (g p) {x | x < g p} ×ˢ insert (g p) {x | x < g p}

tactic: exact
  ⟨(Set.embeddingOfSubset _ _ this).trans
      ((Equiv.Set.prod _ _).trans (H.prodCongr H)).toEmbedding⟩
state_before: case intro.intro.intro.refine'_1
c✝ : Cardinal
h✝ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝² : LinearOrder α := linearOrderOfSTO r
this✝¹ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this✝ : IsWellOrder (α × α) s
p : α × α
h : typein s p < type s
this : {q | s q p} ⊆ insert (g p) {x | x < g p} ×ˢ insert (g p) {x | x < g p}
H : ↑(insert (g p) {x | r x (g p)}) ≃ ↑{x | r x (g p)} ⊕ PUnit
⊢ card (typein s p) ≤
    card (succ (typein (fun x x_1 => x < x_1) (g p))) * card (succ (typein (fun x x_1 => x < x_1) (g p)))

tactic: exact (mul_lt_aleph0 qo qo).trans_le ol
state_before: case intro.intro.intro.refine'_2.inl
c✝ : Cardinal
h✝ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this : IsWellOrder (α × α) s
p : α × α
h : typein s p < type s
qo : card (succ (typein (fun x x_1 => x < x_1) (g p))) < ℵ₀
⊢ card (succ (typein (fun x x_1 => x < x_1) (g p))) * card (succ (typein (fun x x_1 => x < x_1) (g p))) < (#α)

tactic: suffices : (succ (typein LT.lt (g p))).card < ⟦α⟧
state_before: case intro.intro.intro.refine'_2.inr
c✝ : Cardinal
h✝ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this : IsWellOrder (α × α) s
p : α × α
h : typein s p < type s
qo : ℵ₀ ≤ card (succ (typein (fun x x_1 => x < x_1) (g p)))
⊢ card (succ (typein (fun x x_1 => x < x_1) (g p))) * card (succ (typein (fun x x_1 => x < x_1) (g p))) < (#α)

tactic: rw [← lt_ord]
state_before: case this
c✝ : Cardinal
h✝ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this : IsWellOrder (α × α) s
p : α × α
h : typein s p < type s
qo : ℵ₀ ≤ card (succ (typein (fun x x_1 => x < x_1) (g p)))
⊢ card (succ (typein LT.lt (g p))) < Quotient.mk isEquivalent α

tactic: apply (ord_isLimit ol).2
state_before: case this
c✝ : Cardinal
h✝ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this : IsWellOrder (α × α) s
p : α × α
h : typein s p < type s
qo : ℵ₀ ≤ card (succ (typein (fun x x_1 => x < x_1) (g p)))
⊢ succ (typein LT.lt (g p)) < ord (Quotient.mk isEquivalent α)

tactic: rw [mk'_def, e]
state_before: case this.a
c✝ : Cardinal
h✝ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this : IsWellOrder (α × α) s
p : α × α
h : typein s p < type s
qo : ℵ₀ ≤ card (succ (typein (fun x x_1 => x < x_1) (g p)))
⊢ typein LT.lt (g p) < ord (Quotient.mk isEquivalent α)

tactic: apply typein_lt_type
state_before: case this.a
c✝ : Cardinal
h✝ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this : IsWellOrder (α × α) s
p : α × α
h : typein s p < type s
qo : ℵ₀ ≤ card (succ (typein (fun x x_1 => x < x_1) (g p)))
⊢ typein LT.lt (g p) < type r

tactic: exact (IH _ this qo).trans_lt this
state_before: case intro.intro.intro.refine'_2.inr
c✝ : Cardinal
h✝ : ℵ₀ ≤ c✝
c : Cardinal
x✝ : ∀ (y : Cardinal), y < c → Acc (fun x x_1 => x < x_1) y
α : Type u_1
IH : ∀ (y : Cardinal), y < Quotient.mk isEquivalent α → ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ Quotient.mk isEquivalent α
r : α → α → Prop
wo : IsWellOrder α r
e : ord (#α) = type r
this✝² : LinearOrder α := linearOrderOfSTO r
this✝¹ : IsWellOrder α fun x x_1 => x < x_1
g : α × α → α := fun p => max p.fst p.snd
f : α × α ↪ Ordinal × α × α :=
  { toFun := fun p => (typein (fun x x_1 => x < x_1) (g p), p),
    inj' :=
      (_ :
        ∀ (p q : α × α),
          (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p =
              (fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q →
            ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) p).snd =
              ((fun p => (typein (fun x x_1 => x < x_1) (g p), p)) q).snd) }
s : α × α → α × α → Prop :=
  ↑f ⁻¹'o Prod.Lex (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)
this✝ : IsWellOrder (α × α) s
p : α × α
h : typein s p < type s
qo : ℵ₀ ≤ card (succ (typein (fun x x_1 => x < x_1) (g p)))
this : card (succ (typein LT.lt (g p))) < Quotient.mk isEquivalent α
⊢ card (succ (typein (fun x x_1 => x < x_1) (g p))) * card (succ (typein (fun x x_1 => x < x_1) (g p))) < (#α)