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

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
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)
⊢ #α * #α ≤ #α

Tactic:
haveI : IsWellOrder _ s := (RelEmbedding.preimage _ _).isWellOrder

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
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
⊢ #α * #α ≤ #α

Proof state:
case intro.intro.intro.refine_2.inr
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
qo : ℵ₀ ≤ (succ ((typein fun x1 x2 => x1 < x2).toRelEmbedding (g p))).card
⊢ succ ((typein LT.lt).toRelEmbedding (g p)) < (#α).ord

Tactic:
apply (isLimit_ord ol).succ_lt

Result:
case intro.intro.intro.refine_2.inr
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
qo : ℵ₀ ≤ (succ ((typein fun x1 x2 => x1 < x2).toRelEmbedding (g p))).card
⊢ (typein LT.lt).toRelEmbedding (g p) < (#α).ord

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
⊢ ((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:
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 [s, f, Preimage, 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)

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}
⊢ ((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

Proof state:
c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ c * c ≤ c

Tactic:
refine Acc.recOn (Cardinal.lt_wf.apply c) (fun c _ => Cardinal.inductionOn c fun α IH ol => ?_) 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 : ℵ₀ ≤ #α
⊢ #α * #α ≤ #α

Proof state:
case intro.intro.intro.refine_2.inr
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
qo : ℵ₀ ≤ (succ ((typein fun x1 x2 => x1 < x2).toRelEmbedding (g p))).card
⊢ (succ ((typein LT.lt).toRelEmbedding (g p))).card < #α

Tactic:
rw [← lt_ord]

Result:
case intro.intro.intro.refine_2.inr
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
qo : ℵ₀ ≤ (succ ((typein fun x1 x2 => x1 < x2).toRelEmbedding (g p))).card
⊢ succ ((typein LT.lt).toRelEmbedding (g p)) < (#α).ord

Proof state:
c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ c * c = c

Tactic:
refine le_antisymm ?_ (by simpa only [mul_one] using mul_le_mul_left' (one_le_aleph0.trans h) c)

Result:
c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ c * c ≤ c