-- Mathlib/SetTheory/Cardinal/Arithmetic.lean
theorem mul_eq_self {c : Cardinal} (h : ℵ₀ ≤ c) : c * c = c

Proof state:
case intro.intro.intro.refine_1
c✝ : Cardinal.{u_1}
h✝ : ℵ₀ ≤ c✝
c : Cardinal.{u_1}
x✝ : ∀ y < c, Acc (fun x1 x2 => x1 < x2) y
α : Type u_1
IH : ∀ y < #α, ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ #α
r : α → α → Prop
wo : IsWellOrder α r
e : (#α).ord = type r
this✝² : LinearOrder α := linearOrderOfSTO r
this✝¹ : IsWellOrder α fun x1 x2 => x1 < x2
g : α × α → α := fun p => p.1 ⊔ p.2
f : α × α ↪ Ordinal.{u_1} × α × α :=
  { toFun := fun p => ((typein fun x1 x2 => x1 < x2).toRelEmbedding (g p), p), inj' := ⋯ }
s : α × α → α × α → Prop :=
  ⇑f ⁻¹'o Prod.Lex (fun x1 x2 => x1 < x2) (Prod.Lex (fun x1 x2 => x1 < x2) fun x1 x2 => x1 < x2)
this✝ : IsWellOrder (α × α) s
p : α × α
h : (typein s).toRelEmbedding 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:
apply @irrefl _ r

Result:
no goals

Proof state:
case intro.intro.intro.refine_1
c✝ : Cardinal.{u_1}
h✝ : ℵ₀ ≤ c✝
c : Cardinal.{u_1}
x✝ : ∀ y < c, Acc (fun x1 x2 => x1 < x2) y
α : Type u_1
IH : ∀ y < #α, ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ #α
r : α → α → Prop
wo : IsWellOrder α r
e : (#α).ord = type r
this✝² : LinearOrder α := linearOrderOfSTO r
this✝¹ : IsWellOrder α fun x1 x2 => x1 < x2
g : α × α → α := fun p => p.1 ⊔ p.2
f : α × α ↪ Ordinal.{u_1} × α × α :=
  { toFun := fun p => ((typein fun x1 x2 => x1 < x2).toRelEmbedding (g p), p), inj' := ⋯ }
s : α × α → α × α → Prop :=
  ⇑f ⁻¹'o Prod.Lex (fun x1 x2 => x1 < x2) (Prod.Lex (fun x1 x2 => x1 < x2) fun x1 x2 => x1 < x2)
this✝ : IsWellOrder (α × α) s
p : α × α
h : (typein s).toRelEmbedding p < type s
this : {q | s q p} ⊆ insert (g p) {x | x < g p} ×ˢ insert (g p) {x | x < g p}
⊢ ((typein s).toRelEmbedding p).card ≤
    (succ ((typein fun x1 x2 => x1 < x2).toRelEmbedding (g p))).card *
      (succ ((typein fun x1 x2 => x1 < x2).toRelEmbedding (g p))).card

Tactic:
suffices H : (insert (g p) { x | r x (g p) } : Set α) ≃ { x | r x (g p) } ⊕ PUnit from
  ⟨(Set.embeddingOfSubset _ _ this).trans
    ((Equiv.Set.prod _ _).trans (H.prodCongr H)).toEmbedding⟩

Result:
case intro.intro.intro.refine_1
c✝ : Cardinal.{u_1}
h✝ : ℵ₀ ≤ c✝
c : Cardinal.{u_1}
x✝ : ∀ y < c, Acc (fun x1 x2 => x1 < x2) y
α : Type u_1
IH : ∀ y < #α, ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ #α
r : α → α → Prop
wo : IsWellOrder α r
e : (#α).ord = type r
this✝² : LinearOrder α := linearOrderOfSTO r
this✝¹ : IsWellOrder α fun x1 x2 => x1 < x2
g : α × α → α := fun p => p.1 ⊔ p.2
f : α × α ↪ Ordinal.{u_1} × α × α :=
  { toFun := fun p => ((typein fun x1 x2 => x1 < x2).toRelEmbedding (g p), p), inj' := ⋯ }
s : α × α → α × α → Prop :=
  ⇑f ⁻¹'o Prod.Lex (fun x1 x2 => x1 < x2) (Prod.Lex (fun x1 x2 => x1 < x2) fun x1 x2 => x1 < x2)
this✝ : IsWellOrder (α × α) s
p : α × α
h : (typein s).toRelEmbedding 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.{u_1 + 1}

Proof state:
case intro.intro
c✝ : Cardinal.{u_1}
h : ℵ₀ ≤ c✝
c : Cardinal.{u_1}
x✝ : ∀ y < c, Acc (fun x1 x2 => x1 < x2) y
α : Type u_1
IH : ∀ y < #α, ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ #α
r : α → α → Prop
wo : IsWellOrder α r
e : (#α).ord = type r
⊢ #α * #α ≤ #α

Tactic:
letI := linearOrderOfSTO r

Result:
case intro.intro
c✝ : Cardinal.{u_1}
h : ℵ₀ ≤ c✝
c : Cardinal.{u_1}
x✝ : ∀ y < c, Acc (fun x1 x2 => x1 < x2) y
α : Type u_1
IH : ∀ y < #α, ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ #α
r : α → α → Prop
wo : IsWellOrder α r
e : (#α).ord = type r
this : LinearOrder α := linearOrderOfSTO r
⊢ #α * #α ≤ #α

Proof state:
c✝ : Cardinal.{u_1}
h : ℵ₀ ≤ c✝
c : Cardinal.{u_1}
x✝ : ∀ y < c, Acc (fun x1 x2 => x1 < x2) y
α : Type u_1
IH : ∀ y < #α, ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ #α
⊢ #α * #α ≤ #α

Tactic:
rcases ord_eq α with ⟨r, wo, e⟩

Result:
case intro.intro
c✝ : Cardinal.{u_1}
h : ℵ₀ ≤ c✝
c : Cardinal.{u_1}
x✝ : ∀ y < c, Acc (fun x1 x2 => x1 < x2) y
α : Type u_1
IH : ∀ y < #α, ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ #α
r : α → α → Prop
wo : IsWellOrder α r
e : (#α).ord = type r
⊢ #α * #α ≤ #α

Proof state:
c✝ : Cardinal.{u_1}
h✝¹ : ℵ₀ ≤ c✝
c : Cardinal.{u_1}
x✝ : ∀ y < c, Acc (fun x1 x2 => x1 < x2) y
α : Type u_1
IH : ∀ y < #α, ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ #α
r : α → α → Prop
wo : IsWellOrder α r
e : (#α).ord = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x1 x2 => x1 < x2
g : α × α → α := fun p => p.1 ⊔ p.2
f : α × α ↪ Ordinal.{u_1} × α × α :=
  { toFun := fun p => ((typein fun x1 x2 => x1 < x2).toRelEmbedding (g p), p), inj' := ⋯ }
s : α × α → α × α → Prop :=
  ⇑f ⁻¹'o Prod.Lex (fun x1 x2 => x1 < x2) (Prod.Lex (fun x1 x2 => x1 < x2) fun x1 x2 => x1 < x2)
this : IsWellOrder (α × α) s
p : α × α
h✝ : (typein s).toRelEmbedding 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:
simp only [s, f, Preimage, Embedding.coeFn_mk, Prod.lex_def, typein_lt_typein,
  typein_inj, mem_setOf_eq] at h

Result:
c✝ : Cardinal.{u_1}
h✝¹ : ℵ₀ ≤ c✝
c : Cardinal.{u_1}
x✝ : ∀ y < c, Acc (fun x1 x2 => x1 < x2) y
α : Type u_1
IH : ∀ y < #α, ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ #α
r : α → α → Prop
wo : IsWellOrder α r
e : (#α).ord = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x1 x2 => x1 < x2
g : α × α → α := fun p => p.1 ⊔ p.2
f : α × α ↪ Ordinal.{u_1} × α × α :=
  { toFun := fun p => ((typein fun x1 x2 => x1 < x2).toRelEmbedding (g p), p), inj' := ⋯ }
s : α × α → α × α → Prop :=
  ⇑f ⁻¹'o Prod.Lex (fun x1 x2 => x1 < x2) (Prod.Lex (fun x1 x2 => x1 < x2) fun x1 x2 => x1 < x2)
this : IsWellOrder (α × α) s
p : α × α
h✝ : (typein s).toRelEmbedding p < type s
q : α × α
h : g q < g p ∨ g q = g p ∧ (q.1 < p.1 ∨ q.1 = p.1 ∧ q.2 < p.2)
⊢ q ∈ insert (g p) {x | x < g p} ×ˢ insert (g p) {x | x < g p}

Proof state:
c✝ : Cardinal.{u_1}
h✝ : ℵ₀ ≤ c✝
c : Cardinal.{u_1}
x✝ : ∀ y < c, Acc (fun x1 x2 => x1 < x2) y
α : Type u_1
IH : ∀ y < #α, ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ #α
r : α → α → Prop
wo : IsWellOrder α r
e : (#α).ord = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x1 x2 => x1 < x2
g : α × α → α := fun p => p.1 ⊔ p.2
f : α × α ↪ Ordinal.{u_1} × α × α :=
  { toFun := fun p => ((typein fun x1 x2 => x1 < x2).toRelEmbedding (g p), p), inj' := ⋯ }
s : α × α → α × α → Prop :=
  ⇑f ⁻¹'o Prod.Lex (fun x1 x2 => x1 < x2) (Prod.Lex (fun x1 x2 => x1 < x2) fun x1 x2 => x1 < x2)
this : IsWellOrder (α × α) s
p : α × α
h : (typein s).toRelEmbedding p < type s
⊢ {q | s q p} ⊆ insert (g p) {x | x < g p} ×ˢ insert (g p) {x | x < g p}

Tactic:
intro q h

Result:
c✝ : Cardinal.{u_1}
h✝¹ : ℵ₀ ≤ c✝
c : Cardinal.{u_1}
x✝ : ∀ y < c, Acc (fun x1 x2 => x1 < x2) y
α : Type u_1
IH : ∀ y < #α, ℵ₀ ≤ y → y * y ≤ y
ol : ℵ₀ ≤ #α
r : α → α → Prop
wo : IsWellOrder α r
e : (#α).ord = type r
this✝¹ : LinearOrder α := linearOrderOfSTO r
this✝ : IsWellOrder α fun x1 x2 => x1 < x2
g : α × α → α := fun p => p.1 ⊔ p.2
f : α × α ↪ Ordinal.{u_1} × α × α :=
  { toFun := fun p => ((typein fun x1 x2 => x1 < x2).toRelEmbedding (g p), p), inj' := ⋯ }
s : α × α → α × α → Prop :=
  ⇑f ⁻¹'o Prod.Lex (fun x1 x2 => x1 < x2) (Prod.Lex (fun x1 x2 => x1 < x2) fun x1 x2 => x1 < x2)
this : IsWellOrder (α × α) s
p : α × α
h✝ : (typein s).toRelEmbedding 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}