l3lab/ntp-mathlib huggingface dataset:
theorem nmul_nadd_le {a' b' : Ordinal} (ha : a' ≤ a) (hb : b' ≤ b) :
    a' ⨳ b ♯ a ⨳ b' ≤ a ⨳ b ♯ a' ⨳ b' := by
  rcases lt_or_eq_of_le ha with (ha | rfl)
  · rcases lt_or_eq_of_le hb with (hb | rfl)
    · exact (nmul_nadd_lt ha hb).le
    · rw [nadd_comm]
  · 

Proof state:
case inr
b c d a' b' : Ordinal.{u}
hb : b' ≤ b
ha : a' ≤ a'
⊢ a' ⨳ b ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a' ⨳ b'

Next tactic:
exact le_rfl
theorem lt_nmul_iff : c < a ⨳ b ↔ ∃ a' < a, ∃ b' < b, c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b' := by
  

Proof state:
a b c d : Ordinal.{u}
⊢ c < a ⨳ b ↔ ∃ a' < a, ∃ b' < b, c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'

Next tactic:
refine' ⟨fun h => _, _⟩
theorem lt_nmul_iff : c < a ⨳ b ↔ ∃ a' < a, ∃ b' < b, c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b' := by
  refine' ⟨fun h => _, _⟩
  · 

Proof state:
case refine'_1
a b c d : Ordinal.{u}
h : c < a ⨳ b
⊢ ∃ a' < a, ∃ b' < b, c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'

Next tactic:
rw [nmul] at h
theorem lt_nmul_iff : c < a ⨳ b ↔ ∃ a' < a, ∃ b' < b, c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b' := by
  refine' ⟨fun h => _, _⟩
  · rw [nmul] at h
    

Proof state:
case refine'_1
a b c d : Ordinal.{u}
h : c < sInf {c | ∀ a' < a, ∀ b' < b, a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'}
⊢ ∃ a' < a, ∃ b' < b, c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'

Next tactic:
simpa using not_mem_of_lt_csInf h ⟨0, fun _ _ => bot_le⟩
theorem lt_nmul_iff : c < a ⨳ b ↔ ∃ a' < a, ∃ b' < b, c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b' := by
  refine' ⟨fun h => _, _⟩
  · rw [nmul] at h
    simpa using not_mem_of_lt_csInf h ⟨0, fun _ _ => bot_le⟩
  · 

Proof state:
case refine'_2
a b c d : Ordinal.{u}
⊢ (∃ a' < a, ∃ b' < b, c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b') → c < a ⨳ b

Next tactic:
rintro ⟨a', ha, b', hb, h⟩
theorem lt_nmul_iff : c < a ⨳ b ↔ ∃ a' < a, ∃ b' < b, c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b' := by
  refine' ⟨fun h => _, _⟩
  · rw [nmul] at h
    simpa using not_mem_of_lt_csInf h ⟨0, fun _ _ => bot_le⟩
  · rintro ⟨a', ha, b', hb, h⟩
    

Proof state:
case refine'_2.intro.intro.intro.intro
a b c d a' : Ordinal.{u}
ha : a' < a
b' : Ordinal.{u}
hb : b' < b
h : c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'
⊢ c < a ⨳ b

Next tactic:
have := h.trans_lt (nmul_nadd_lt ha hb)
theorem lt_nmul_iff : c < a ⨳ b ↔ ∃ a' < a, ∃ b' < b, c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b' := by
  refine' ⟨fun h => _, _⟩
  · rw [nmul] at h
    simpa using not_mem_of_lt_csInf h ⟨0, fun _ _ => bot_le⟩
  · rintro ⟨a', ha, b', hb, h⟩
    have := h.trans_lt (nmul_nadd_lt ha hb)
    

Proof state:
case refine'_2.intro.intro.intro.intro
a b c d a' : Ordinal.{u}
ha : a' < a
b' : Ordinal.{u}
hb : b' < b
h : c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'
this : c ♯ a' ⨳ b' < a ⨳ b ♯ a' ⨳ b'
⊢ c < a ⨳ b

Next tactic:
rwa [nadd_lt_nadd_iff_right] at this
theorem nmul_le_iff : a ⨳ b ≤ c ↔ ∀ a' < a, ∀ b' < b, a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b' := by
  

Proof state:
a b c d : Ordinal.{u}
⊢ a ⨳ b ≤ c ↔ ∀ a' < a, ∀ b' < b, a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'

Next tactic:
rw [← not_iff_not]
theorem nmul_le_iff : a ⨳ b ≤ c ↔ ∀ a' < a, ∀ b' < b, a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b' := by
  rw [← not_iff_not]; 

Proof state:
a b c d : Ordinal.{u}
⊢ ¬a ⨳ b ≤ c ↔ ¬∀ a' < a, ∀ b' < b, a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'

Next tactic:
simp [lt_nmul_iff]
theorem nmul_comm : ∀ a b, a ⨳ b = b ⨳ a
  | a, b => by
    

Proof state:
a✝ b✝ c d : Ordinal.{u}
a b : Ordinal.{u_1}
⊢ a ⨳ b = b ⨳ a

Next tactic:
rw [nmul, nmul]
theorem nmul_comm : ∀ a b, a ⨳ b = b ⨳ a
  | a, b => by
    rw [nmul, nmul]
    

Proof state:
a✝ b✝ c d : Ordinal.{u}
a b : Ordinal.{u_1}
⊢ sInf {c | ∀ a' < a, ∀ b' < b, a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'} =
    sInf {c | ∀ a' < b, ∀ b' < a, a' ⨳ a ♯ b ⨳ b' < c ♯ a' ⨳ b'}

Next tactic:
congr
theorem nmul_comm : ∀ a b, a ⨳ b = b ⨳ a
  | a, b => by
    rw [nmul, nmul]
    congr; 

Proof state:
case e_a
a✝ b✝ c d : Ordinal.{u}
a b : Ordinal.{u_1}
⊢ {c | ∀ a' < a, ∀ b' < b, a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'} = {c | ∀ a' < b, ∀ b' < a, a' ⨳ a ♯ b ⨳ b' < c ♯ a' ⨳ b'}

Next tactic:
ext x
theorem nmul_comm : ∀ a b, a ⨳ b = b ⨳ a
  | a, b => by
    rw [nmul, nmul]
    congr; ext x; 

Proof state:
case e_a.h
a✝ b✝ c d : Ordinal.{u}
a b x : Ordinal.{u_1}
⊢ x ∈ {c | ∀ a' < a, ∀ b' < b, a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'} ↔
    x ∈ {c | ∀ a' < b, ∀ b' < a, a' ⨳ a ♯ b ⨳ b' < c ♯ a' ⨳ b'}

Next tactic:
constructor
theorem nmul_comm : ∀ a b, a ⨳ b = b ⨳ a
  | a, b => by
    rw [nmul, nmul]
    congr; ext x; constructor <;> 

Proof state:
case e_a.h.mp
a✝ b✝ c d : Ordinal.{u}
a b x : Ordinal.{u_1}
⊢ x ∈ {c | ∀ a' < a, ∀ b' < b, a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'} →
    x ∈ {c | ∀ a' < b, ∀ b' < a, a' ⨳ a ♯ b ⨳ b' < c ♯ a' ⨳ b'}

Next tactic:
intro H c hc d hd
theorem nmul_comm : ∀ a b, a ⨳ b = b ⨳ a
  | a, b => by
    rw [nmul, nmul]
    congr; ext x; constructor <;> 

Proof state:
case e_a.h.mpr
a✝ b✝ c d : Ordinal.{u}
a b x : Ordinal.{u_1}
⊢ x ∈ {c | ∀ a' < b, ∀ b' < a, a' ⨳ a ♯ b ⨳ b' < c ♯ a' ⨳ b'} →
    x ∈ {c | ∀ a' < a, ∀ b' < b, a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'}

Next tactic:
intro H c hc d hd
theorem nmul_comm : ∀ a b, a ⨳ b = b ⨳ a
  | a, b => by
    rw [nmul, nmul]
    congr; ext x; constructor <;> intro H c hc d hd
    -- Porting note: had to add additional arguments to `nmul_comm` here
    -- for the termination checker.
    · 

Proof state:
case e_a.h.mp
a✝ b✝ c✝ d✝ : Ordinal.{u}
a b x : Ordinal.{u_1}
H : x ∈ {c | ∀ a' < a, ∀ b' < b, a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'}
c : Ordinal.{u_1}
hc : c < b
d : Ordinal.{u_1}
hd : d < a
⊢ c ⨳ a ♯ b ⨳ d < x ♯ c ⨳ d

Next tactic:
rw [nadd_comm, ← nmul_comm d b, ← nmul_comm a c, ← nmul_comm d]
theorem nmul_comm : ∀ a b, a ⨳ b = b ⨳ a
  | a, b => by
    rw [nmul, nmul]
    congr; ext x; constructor <;> intro H c hc d hd
    -- Porting note: had to add additional arguments to `nmul_comm` here
    -- for the termination checker.
    · rw [nadd_comm, ← nmul_comm d b, ← nmul_comm a c, ← nmul_comm d]
      

Proof state:
case e_a.h.mp
a✝ b✝ c✝ d✝ : Ordinal.{u}
a b x : Ordinal.{u_1}
H : x ∈ {c | ∀ a' < a, ∀ b' < b, a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'}
c : Ordinal.{u_1}
hc : c < b
d : Ordinal.{u_1}
hd : d < a
⊢ d ⨳ b ♯ a ⨳ c < x ♯ d ⨳ c

Next tactic:
exact H _ hd _ hc
theorem nmul_comm : ∀ a b, a ⨳ b = b ⨳ a
  | a, b => by
    rw [nmul, nmul]
    congr; ext x; constructor <;> intro H c hc d hd
    -- Porting note: had to add additional arguments to `nmul_comm` here
    -- for the termination checker.
    · rw [nadd_comm, ← nmul_comm d b, ← nmul_comm a c, ← nmul_comm d]
      exact H _ hd _ hc
    · 

Proof state:
case e_a.h.mpr
a✝ b✝ c✝ d✝ : Ordinal.{u}
a b x : Ordinal.{u_1}
H : x ∈ {c | ∀ a' < b, ∀ b' < a, a' ⨳ a ♯ b ⨳ b' < c ♯ a' ⨳ b'}
c : Ordinal.{u_1}
hc : c < a
d : Ordinal.{u_1}
hd : d < b
⊢ c ⨳ b ♯ a ⨳ d < x ♯ c ⨳ d

Next tactic:
rw [nadd_comm, nmul_comm a d, nmul_comm c, nmul_comm c]
theorem nmul_comm : ∀ a b, a ⨳ b = b ⨳ a
  | a, b => by
    rw [nmul, nmul]
    congr; ext x; constructor <;> intro H c hc d hd
    -- Porting note: had to add additional arguments to `nmul_comm` here
    -- for the termination checker.
    · rw [nadd_comm, ← nmul_comm d b, ← nmul_comm a c, ← nmul_comm d]
      exact H _ hd _ hc
    · rw [nadd_comm, nmul_comm a d, nmul_comm c, nmul_comm c]
      

Proof state:
case e_a.h.mpr
a✝ b✝ c✝ d✝ : Ordinal.{u}
a b x : Ordinal.{u_1}
H : x ∈ {c | ∀ a' < b, ∀ b' < a, a' ⨳ a ♯ b ⨳ b' < c ♯ a' ⨳ b'}
c : Ordinal.{u_1}
hc : c < a
d : Ordinal.{u_1}
hd : d < b
⊢ d ⨳ a ♯ b ⨳ c < x ♯ d ⨳ c

Next tactic:
exact H _ hd _ hc
@[simp]
theorem nmul_zero (a) : a ⨳ 0 = 0 := by
  

Proof state:
a✝ b c d : Ordinal.{u}
a : Ordinal.{u_1}
⊢ a ⨳ 0 = 0

Next tactic:
rw [← Ordinal.le_zero, nmul_le_iff]
@[simp]
theorem nmul_zero (a) : a ⨳ 0 = 0 := by
  rw [← Ordinal.le_zero, nmul_le_iff]
  

Proof state:
a✝ b c d : Ordinal.{u}
a : Ordinal.{u_1}
⊢ ∀ a' < a, ∀ b' < 0, a' ⨳ 0 ♯ a ⨳ b' < 0 ♯ a' ⨳ b'

Next tactic:
exact fun _ _ a ha => (Ordinal.not_lt_zero a ha).elim
@[simp]
theorem zero_nmul (a) : 0 ⨳ a = 0 := by 

Proof state:
a✝ b c d : Ordinal.{u}
a : Ordinal.{u_1}
⊢ 0 ⨳ a = 0

Next tactic:
rw [nmul_comm, nmul_zero]
@[simp]
theorem nmul_one (a : Ordinal) : a ⨳ 1 = a := by
  

Proof state:
a✝ b c d : Ordinal.{u}
a : Ordinal.{u_1}
⊢ a ⨳ 1 = a

Next tactic:
rw [nmul]
@[simp]
theorem nmul_one (a : Ordinal) : a ⨳ 1 = a := by
  rw [nmul]
  

Proof state:
a✝ b c d : Ordinal.{u}
a : Ordinal.{u_1}
⊢ sInf {c | ∀ a' < a, ∀ b' < 1, a' ⨳ 1 ♯ a ⨳ b' < c ♯ a' ⨳ b'} = a

Next tactic:
simp only [lt_one_iff_zero, forall_eq, nmul_zero, nadd_zero]
@[simp]
theorem nmul_one (a : Ordinal) : a ⨳ 1 = a := by
  rw [nmul]
  simp only [lt_one_iff_zero, forall_eq, nmul_zero, nadd_zero]
  

Proof state:
a✝ b c d : Ordinal.{u}
a : Ordinal.{u_1}
⊢ sInf {c | ∀ a' < a, a' ⨳ 1 < c} = a

Next tactic:
convert csInf_Ici (α := Ordinal)
@[simp]
theorem nmul_one (a : Ordinal) : a ⨳ 1 = a := by
  rw [nmul]
  simp only [lt_one_iff_zero, forall_eq, nmul_zero, nadd_zero]
  convert csInf_Ici (α := Ordinal)
  

Proof state:
case h.e'_2.h.e'_3
a✝ b c d : Ordinal.{u}
a : Ordinal.{u_1}
⊢ {c | ∀ a' < a, a' ⨳ 1 < c} = Set.Ici a

Next tactic:
ext b
@[simp]
theorem nmul_one (a : Ordinal) : a ⨳ 1 = a := by
  rw [nmul]
  simp only [lt_one_iff_zero, forall_eq, nmul_zero, nadd_zero]
  convert csInf_Ici (α := Ordinal)
  ext b
  -- Porting note: added this `simp` line, as the result from `convert`
  -- is slightly different.
  

Proof state:
case h.e'_2.h.e'_3.h
a✝ b✝ c d : Ordinal.{u}
a b : Ordinal.{u_1}
⊢ b ∈ {c | ∀ a' < a, a' ⨳ 1 < c} ↔ b ∈ Set.Ici a

Next tactic:
simp only [Set.mem_setOf_eq, Set.mem_Ici]
@[simp]
theorem nmul_one (a : Ordinal) : a ⨳ 1 = a := by
  rw [nmul]
  simp only [lt_one_iff_zero, forall_eq, nmul_zero, nadd_zero]
  convert csInf_Ici (α := Ordinal)
  ext b
  -- Porting note: added this `simp` line, as the result from `convert`
  -- is slightly different.
  simp only [Set.mem_setOf_eq, Set.mem_Ici]
  

Proof state:
case h.e'_2.h.e'_3.h
a✝ b✝ c d : Ordinal.{u}
a b : Ordinal.{u_1}
⊢ (∀ a' < a, a' ⨳ 1 < b) ↔ a ≤ b

Next tactic:
refine' ⟨fun H => le_of_forall_lt fun c hc => _, fun ha c hc => _⟩
@[simp]
theorem nmul_one (a : Ordinal) : a ⨳ 1 = a := by
  rw [nmul]
  simp only [lt_one_iff_zero, forall_eq, nmul_zero, nadd_zero]
  convert csInf_Ici (α := Ordinal)
  ext b
  -- Porting note: added this `simp` line, as the result from `convert`
  -- is slightly different.
  simp only [Set.mem_setOf_eq, Set.mem_Ici]
  refine' ⟨fun H => le_of_forall_lt fun c hc => _, fun ha c hc => _⟩
  -- Porting note: had to add arguments to `nmul_one` in the next two lines
  -- for the termination checker.
  · 

Proof state:
case h.e'_2.h.e'_3.h.refine'_1
a✝ b✝ c✝ d : Ordinal.{u}
a b : Ordinal.{u_1}
H : ∀ a' < a, a' ⨳ 1 < b
c : Ordinal.{u_1}
hc : c < a
⊢ c < b

Next tactic:
simpa only [nmul_one c] using H c hc
@[simp]
theorem nmul_one (a : Ordinal) : a ⨳ 1 = a := by
  rw [nmul]
  simp only [lt_one_iff_zero, forall_eq, nmul_zero, nadd_zero]
  convert csInf_Ici (α := Ordinal)
  ext b
  -- Porting note: added this `simp` line, as the result from `convert`
  -- is slightly different.
  simp only [Set.mem_setOf_eq, Set.mem_Ici]
  refine' ⟨fun H => le_of_forall_lt fun c hc => _, fun ha c hc => _⟩
  -- Porting note: had to add arguments to `nmul_one` in the next two lines
  -- for the termination checker.
  · simpa only [nmul_one c] using H c hc
  · 

Proof state:
case h.e'_2.h.e'_3.h.refine'_2
a✝ b✝ c✝ d : Ordinal.{u}
a b : Ordinal.{u_1}
ha : a ≤ b
c : Ordinal.{u_1}
hc : c < a
⊢ c ⨳ 1 < b

Next tactic:
simpa only [nmul_one c] using hc.trans_le ha
@[simp]
theorem one_nmul (a) : 1 ⨳ a = a := by 

Proof state:
a✝ b c d : Ordinal.{u}
a : Ordinal.{u_1}
⊢ 1 ⨳ a = a

Next tactic:
rw [nmul_comm, nmul_one]
theorem nmul_lt_nmul_of_pos_left (h₁ : a < b) (h₂ : 0 < c) : c ⨳ a < c ⨳ b :=
  lt_nmul_iff.2 ⟨0, h₂, a, h₁, by 

Proof state:
a b c d : Ordinal.{u}
h₁ : a < b
h₂ : 0 < c
⊢ c ⨳ a ♯ 0 ⨳ a ≤ 0 ⨳ b ♯ c ⨳ a

Next tactic:
simp
theorem nmul_lt_nmul_of_pos_right (h₁ : a < b) (h₂ : 0 < c) : a ⨳ c < b ⨳ c :=
  lt_nmul_iff.2 ⟨a, h₁, 0, h₂, by 

Proof state:
a b c d : Ordinal.{u}
h₁ : a < b
h₂ : 0 < c
⊢ a ⨳ c ♯ a ⨳ 0 ≤ a ⨳ c ♯ b ⨳ 0

Next tactic:
simp
theorem nmul_le_nmul_of_nonneg_left (h₁ : a ≤ b) (h₂ : 0 ≤ c) : c ⨳ a ≤ c ⨳ b := by
  

Proof state:
a b c d : Ordinal.{u}
h₁ : a ≤ b
h₂ : 0 ≤ c
⊢ c ⨳ a ≤ c ⨳ b

Next tactic:
rcases lt_or_eq_of_le h₁ with (h₁ | rfl)
theorem nmul_le_nmul_of_nonneg_left (h₁ : a ≤ b) (h₂ : 0 ≤ c) : c ⨳ a ≤ c ⨳ b := by
  rcases lt_or_eq_of_le h₁ with (h₁ | rfl) <;> 

Proof state:
case inl
a b c d : Ordinal.{u}
h₁✝ : a ≤ b
h₂ : 0 ≤ c
h₁ : a < b
⊢ c ⨳ a ≤ c ⨳ b

Next tactic:
rcases lt_or_eq_of_le h₂ with (h₂ | rfl)
theorem nmul_le_nmul_of_nonneg_left (h₁ : a ≤ b) (h₂ : 0 ≤ c) : c ⨳ a ≤ c ⨳ b := by
  rcases lt_or_eq_of_le h₁ with (h₁ | rfl) <;> 

Proof state:
case inr
a c d : Ordinal.{u}
h₂ : 0 ≤ c
h₁ : a ≤ a
⊢ c ⨳ a ≤ c ⨳ a

Next tactic:
rcases lt_or_eq_of_le h₂ with (h₂ | rfl)
theorem nmul_le_nmul_of_nonneg_left (h₁ : a ≤ b) (h₂ : 0 ≤ c) : c ⨳ a ≤ c ⨳ b := by
  rcases lt_or_eq_of_le h₁ with (h₁ | rfl) <;> rcases lt_or_eq_of_le h₂ with (h₂ | rfl)
  · 

Proof state:
case inl.inl
a b c d : Ordinal.{u}
h₁✝ : a ≤ b
h₂✝ : 0 ≤ c
h₁ : a < b
h₂ : 0 < c
⊢ c ⨳ a ≤ c ⨳ b

Next tactic:
exact (nmul_lt_nmul_of_pos_left h₁ h₂).le
theorem nmul_le_nmul_of_nonneg_left (h₁ : a ≤ b) (h₂ : 0 ≤ c) : c ⨳ a ≤ c ⨳ b := by
  rcases lt_or_eq_of_le h₁ with (h₁ | rfl) <;> rcases lt_or_eq_of_le h₂ with (h₂ | rfl)
  · exact (nmul_lt_nmul_of_pos_left h₁ h₂).le
  

Proof state:
case inl.inr
a b d : Ordinal.{u}
h₁✝ : a ≤ b
h₁ : a < b
h₂ : 0 ≤ 0
⊢ 0 ⨳ a ≤ 0 ⨳ b
case inr.inl
a c d : Ordinal.{u}
h₂✝ : 0 ≤ c
h₁ : a ≤ a
h₂ : 0 < c
⊢ c ⨳ a ≤ c ⨳ a
case inr.inr a d : Ordinal.{u} h₁ : a ≤ a h₂ : 0 ≤ 0 ⊢ 0 ⨳ a ≤ 0 ⨳ a

Next tactic:
all_goals simp
theorem nmul_le_nmul_of_nonneg_left (h₁ : a ≤ b) (h₂ : 0 ≤ c) : c ⨳ a ≤ c ⨳ b := by
  rcases lt_or_eq_of_le h₁ with (h₁ | rfl) <;> rcases lt_or_eq_of_le h₂ with (h₂ | rfl)
  · exact (nmul_lt_nmul_of_pos_left h₁ h₂).le
  all_goals 

Proof state:
case inl.inr
a b d : Ordinal.{u}
h₁✝ : a ≤ b
h₁ : a < b
h₂ : 0 ≤ 0
⊢ 0 ⨳ a ≤ 0 ⨳ b

Next tactic:
simp
theorem nmul_le_nmul_of_nonneg_left (h₁ : a ≤ b) (h₂ : 0 ≤ c) : c ⨳ a ≤ c ⨳ b := by
  rcases lt_or_eq_of_le h₁ with (h₁ | rfl) <;> rcases lt_or_eq_of_le h₂ with (h₂ | rfl)
  · exact (nmul_lt_nmul_of_pos_left h₁ h₂).le
  all_goals 

Proof state:
case inr.inl
a c d : Ordinal.{u}
h₂✝ : 0 ≤ c
h₁ : a ≤ a
h₂ : 0 < c
⊢ c ⨳ a ≤ c ⨳ a

Next tactic:
simp
theorem nmul_le_nmul_of_nonneg_left (h₁ : a ≤ b) (h₂ : 0 ≤ c) : c ⨳ a ≤ c ⨳ b := by
  rcases lt_or_eq_of_le h₁ with (h₁ | rfl) <;> rcases lt_or_eq_of_le h₂ with (h₂ | rfl)
  · exact (nmul_lt_nmul_of_pos_left h₁ h₂).le
  all_goals 

Proof state:
case inr.inr
a d : Ordinal.{u}
h₁ : a ≤ a
h₂ : 0 ≤ 0
⊢ 0 ⨳ a ≤ 0 ⨳ a

Next tactic:
simp
theorem nmul_le_nmul_of_nonneg_right (h₁ : a ≤ b) (h₂ : 0 ≤ c) : a ⨳ c ≤ b ⨳ c := by
  

Proof state:
a b c d : Ordinal.{u}
h₁ : a ≤ b
h₂ : 0 ≤ c
⊢ a ⨳ c ≤ b ⨳ c

Next tactic:
rw [nmul_comm, nmul_comm b]
theorem nmul_le_nmul_of_nonneg_right (h₁ : a ≤ b) (h₂ : 0 ≤ c) : a ⨳ c ≤ b ⨳ c := by
  rw [nmul_comm, nmul_comm b]
  

Proof state:
a b c d : Ordinal.{u}
h₁ : a ≤ b
h₂ : 0 ≤ c
⊢ c ⨳ a ≤ c ⨳ b

Next tactic:
exact nmul_le_nmul_of_nonneg_left h₁ h₂
theorem nmul_nadd : ∀ a b c, a ⨳ (b ♯ c) = a ⨳ b ♯ a ⨳ c
  | a, b, c => by
    

Proof state:
a✝ b✝ c✝ d : Ordinal.{u}
a b c : Ordinal.{u_1}
⊢ a ⨳ (b ♯ c) = a ⨳ b ♯ a ⨳ c

Next tactic:
refine le_antisymm (nmul_le_iff.2 fun a' ha d hd => ?_)
      (nadd_le_iff.2 ⟨fun d hd => ?_, fun d hd => ?_⟩)
theorem nmul_nadd : ∀ a b c, a ⨳ (b ♯ c) = a ⨳ b ♯ a ⨳ c
  | a, b, c => by
    refine le_antisymm (nmul_le_iff.2 fun a' ha d hd => ?_)
      (nadd_le_iff.2 ⟨fun d hd => ?_, fun d hd => ?_⟩)
    · -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
      

Proof state:
case refine_1
a✝ b✝ c✝ d✝ : Ordinal.{u}
a b c a' : Ordinal.{u_1}
ha : a' < a
d : Ordinal.{u_1}
hd : d < b ♯ c
⊢ a' ⨳ (b ♯ c) ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d

Next tactic:
rw [nmul_nadd a' b c]
theorem nmul_nadd : ∀ a b c, a ⨳ (b ♯ c) = a ⨳ b ♯ a ⨳ c
  | a, b, c => by
    refine le_antisymm (nmul_le_iff.2 fun a' ha d hd => ?_)
      (nadd_le_iff.2 ⟨fun d hd => ?_, fun d hd => ?_⟩)
    · -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
      rw [nmul_nadd a' b c]
      

Proof state:
case refine_1
a✝ b✝ c✝ d✝ : Ordinal.{u}
a b c a' : Ordinal.{u_1}
ha : a' < a
d : Ordinal.{u_1}
hd : d < b ♯ c
⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d

Next tactic:
rcases lt_nadd_iff.1 hd with (⟨b', hb, hd⟩ | ⟨c', hc, hd⟩)
theorem nmul_nadd : ∀ a b c, a ⨳ (b ♯ c) = a ⨳ b ♯ a ⨳ c
  | a, b, c => by
    refine le_antisymm (nmul_le_iff.2 fun a' ha d hd => ?_)
      (nadd_le_iff.2 ⟨fun d hd => ?_, fun d hd => ?_⟩)
    · -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
      rw [nmul_nadd a' b c]
      rcases lt_nadd_iff.1 hd with (⟨b', hb, hd⟩ | ⟨c', hc, hd⟩)
      · 

Proof state:
case refine_1.inl.intro.intro
a✝ b✝ c✝ d✝ : Ordinal.{u}
a b c a' : Ordinal.{u_1}
ha : a' < a
d : Ordinal.{u_1}
hd✝ : d < b ♯ c
b' : Ordinal.{u_1}
hb : b' < b
hd : d ≤ b' ♯ c
⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d

Next tactic:
have := nadd_lt_nadd_of_lt_of_le (nmul_nadd_lt ha hb) (nmul_nadd_le ha.le hd)
theorem nmul_nadd : ∀ a b c, a ⨳ (b ♯ c) = a ⨳ b ♯ a ⨳ c
  | a, b, c => by
    refine le_antisymm (nmul_le_iff.2 fun a' ha d hd => ?_)
      (nadd_le_iff.2 ⟨fun d hd => ?_, fun d hd => ?_⟩)
    · -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
      rw [nmul_nadd a' b c]
      rcases lt_nadd_iff.1 hd with (⟨b', hb, hd⟩ | ⟨c', hc, hd⟩)
      · have := nadd_lt_nadd_of_lt_of_le (nmul_nadd_lt ha hb) (nmul_nadd_le ha.le hd)
        -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
        

Proof state:
case refine_1.inl.intro.intro
a✝ b✝ c✝ d✝ : Ordinal.{u}
a b c a' : Ordinal.{u_1}
ha : a' < a
d : Ordinal.{u_1}
hd✝ : d < b ♯ c
b' : Ordinal.{u_1}
hb : b' < b
hd : d ≤ b' ♯ c
this : a' ⨳ b ♯ a ⨳ b' ♯ (a' ⨳ (b' ♯ c) ♯ a ⨳ d) < a ⨳ b ♯ a' ⨳ b' ♯ (a ⨳ (b' ♯ c) ♯ a' ⨳ d)
⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d

Next tactic:
rw [nmul_nadd a' b' c, nmul_nadd a b' c] at this
theorem nmul_nadd : ∀ a b c, a ⨳ (b ♯ c) = a ⨳ b ♯ a ⨳ c
  | a, b, c => by
    refine le_antisymm (nmul_le_iff.2 fun a' ha d hd => ?_)
      (nadd_le_iff.2 ⟨fun d hd => ?_, fun d hd => ?_⟩)
    · -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
      rw [nmul_nadd a' b c]
      rcases lt_nadd_iff.1 hd with (⟨b', hb, hd⟩ | ⟨c', hc, hd⟩)
      · have := nadd_lt_nadd_of_lt_of_le (nmul_nadd_lt ha hb) (nmul_nadd_le ha.le hd)
        -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
        rw [nmul_nadd a' b' c, nmul_nadd a b' c] at this
        

Proof state:
case refine_1.inl.intro.intro
a✝ b✝ c✝ d✝ : Ordinal.{u}
a b c a' : Ordinal.{u_1}
ha : a' < a
d : Ordinal.{u_1}
hd✝ : d < b ♯ c
b' : Ordinal.{u_1}
hb : b' < b
hd : d ≤ b' ♯ c
this : a' ⨳ b ♯ a ⨳ b' ♯ (a' ⨳ b' ♯ a' ⨳ c ♯ a ⨳ d) < a ⨳ b ♯ a' ⨳ b' ♯ (a ⨳ b' ♯ a ⨳ c ♯ a' ⨳ d)
⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d

Next tactic:
simp only [nadd_assoc] at this
theorem nmul_nadd : ∀ a b c, a ⨳ (b ♯ c) = a ⨳ b ♯ a ⨳ c
  | a, b, c => by
    refine le_antisymm (nmul_le_iff.2 fun a' ha d hd => ?_)
      (nadd_le_iff.2 ⟨fun d hd => ?_, fun d hd => ?_⟩)
    · -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
      rw [nmul_nadd a' b c]
      rcases lt_nadd_iff.1 hd with (⟨b', hb, hd⟩ | ⟨c', hc, hd⟩)
      · have := nadd_lt_nadd_of_lt_of_le (nmul_nadd_lt ha hb) (nmul_nadd_le ha.le hd)
        -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
        rw [nmul_nadd a' b' c, nmul_nadd a b' c] at this
        simp only [nadd_assoc] at this
        

Proof state:
case refine_1.inl.intro.intro
a✝ b✝ c✝ d✝ : Ordinal.{u}
a b c a' : Ordinal.{u_1}
ha : a' < a
d : Ordinal.{u_1}
hd✝ : d < b ♯ c
b' : Ordinal.{u_1}
hb : b' < b
hd : d ≤ b' ♯ c
this : a' ⨳ b ♯ (a ⨳ b' ♯ (a' ⨳ b' ♯ (a' ⨳ c ♯ a ⨳ d))) < a ⨳ b ♯ (a' ⨳ b' ♯ (a ⨳ b' ♯ (a ⨳ c ♯ a' ⨳ d)))
⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d

Next tactic:
rwa [nadd_left_comm, nadd_left_comm _ (a ⨳ b'), nadd_left_comm (a ⨳ b),
          nadd_lt_nadd_iff_left, nadd_left_comm (a' ⨳ b), nadd_left_comm (a ⨳ b),
          nadd_lt_nadd_iff_left, ← nadd_assoc, ← nadd_assoc] at this
theorem nmul_nadd : ∀ a b c, a ⨳ (b ♯ c) = a ⨳ b ♯ a ⨳ c
  | a, b, c => by
    refine le_antisymm (nmul_le_iff.2 fun a' ha d hd => ?_)
      (nadd_le_iff.2 ⟨fun d hd => ?_, fun d hd => ?_⟩)
    · -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
      rw [nmul_nadd a' b c]
      rcases lt_nadd_iff.1 hd with (⟨b', hb, hd⟩ | ⟨c', hc, hd⟩)
      · have := nadd_lt_nadd_of_lt_of_le (nmul_nadd_lt ha hb) (nmul_nadd_le ha.le hd)
        -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
        rw [nmul_nadd a' b' c, nmul_nadd a b' c] at this
        simp only [nadd_assoc] at this
        rwa [nadd_left_comm, nadd_left_comm _ (a ⨳ b'), nadd_left_comm (a ⨳ b),
          nadd_lt_nadd_iff_left, nadd_left_comm (a' ⨳ b), nadd_left_comm (a ⨳ b),
          nadd_lt_nadd_iff_left, ← nadd_assoc, ← nadd_assoc] at this
      · 

Proof state:
case refine_1.inr.intro.intro
a✝ b✝ c✝ d✝ : Ordinal.{u}
a b c a' : Ordinal.{u_1}
ha : a' < a
d : Ordinal.{u_1}
hd✝ : d < b ♯ c
c' : Ordinal.{u_1}
hc : c' < c
hd : d ≤ b ♯ c'
⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d

Next tactic:
have := nadd_lt_nadd_of_le_of_lt (nmul_nadd_le ha.le hd) (nmul_nadd_lt ha hc)
theorem nmul_nadd : ∀ a b c, a ⨳ (b ♯ c) = a ⨳ b ♯ a ⨳ c
  | a, b, c => by
    refine le_antisymm (nmul_le_iff.2 fun a' ha d hd => ?_)
      (nadd_le_iff.2 ⟨fun d hd => ?_, fun d hd => ?_⟩)
    · -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
      rw [nmul_nadd a' b c]
      rcases lt_nadd_iff.1 hd with (⟨b', hb, hd⟩ | ⟨c', hc, hd⟩)
      · have := nadd_lt_nadd_of_lt_of_le (nmul_nadd_lt ha hb) (nmul_nadd_le ha.le hd)
        -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
        rw [nmul_nadd a' b' c, nmul_nadd a b' c] at this
        simp only [nadd_assoc] at this
        rwa [nadd_left_comm, nadd_left_comm _ (a ⨳ b'), nadd_left_comm (a ⨳ b),
          nadd_lt_nadd_iff_left, nadd_left_comm (a' ⨳ b), nadd_left_comm (a ⨳ b),
          nadd_lt_nadd_iff_left, ← nadd_assoc, ← nadd_assoc] at this
      · have := nadd_lt_nadd_of_le_of_lt (nmul_nadd_le ha.le hd) (nmul_nadd_lt ha hc)
        -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
        

Proof state:
case refine_1.inr.intro.intro
a✝ b✝ c✝ d✝ : Ordinal.{u}
a b c a' : Ordinal.{u_1}
ha : a' < a
d : Ordinal.{u_1}
hd✝ : d < b ♯ c
c' : Ordinal.{u_1}
hc : c' < c
hd : d ≤ b ♯ c'
this : a' ⨳ (b ♯ c') ♯ a ⨳ d ♯ (a' ⨳ c ♯ a ⨳ c') < a ⨳ (b ♯ c') ♯ a' ⨳ d ♯ (a ⨳ c ♯ a' ⨳ c')
⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d

Next tactic:
rw [nmul_nadd a' b c', nmul_nadd a b c'] at this
theorem nmul_nadd : ∀ a b c, a ⨳ (b ♯ c) = a ⨳ b ♯ a ⨳ c
  | a, b, c => by
    refine le_antisymm (nmul_le_iff.2 fun a' ha d hd => ?_)
      (nadd_le_iff.2 ⟨fun d hd => ?_, fun d hd => ?_⟩)
    · -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
      rw [nmul_nadd a' b c]
      rcases lt_nadd_iff.1 hd with (⟨b', hb, hd⟩ | ⟨c', hc, hd⟩)
      · have := nadd_lt_nadd_of_lt_of_le (nmul_nadd_lt ha hb) (nmul_nadd_le ha.le hd)
        -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
        rw [nmul_nadd a' b' c, nmul_nadd a b' c] at this
        simp only [nadd_assoc] at this
        rwa [nadd_left_comm, nadd_left_comm _ (a ⨳ b'), nadd_left_comm (a ⨳ b),
          nadd_lt_nadd_iff_left, nadd_left_comm (a' ⨳ b), nadd_left_comm (a ⨳ b),
          nadd_lt_nadd_iff_left, ← nadd_assoc, ← nadd_assoc] at this
      · have := nadd_lt_nadd_of_le_of_lt (nmul_nadd_le ha.le hd) (nmul_nadd_lt ha hc)
        -- Porting note: adding arguments to `nmul_nadd` for the termination checker.
        rw [nmul_nadd a' b c', nmul_nadd a b c'] at this
        

Proof state:
case refine_1.inr.intro.intro
a✝ b✝ c✝ d✝ : Ordinal.{u}
a b c a' : Ordinal.{u_1}
ha : a' < a
d : Ordinal.{u_1}
hd✝ : d < b ♯ c
c' : Ordinal.{u_1}
hc : c' < c
hd : d ≤ b ♯ c'
this : a' ⨳ b ♯ a' ⨳ c' ♯ a ⨳ d ♯ (a' ⨳ c ♯ a ⨳ c') < a ⨳ b ♯ a ⨳ c' ♯ a' ⨳ d ♯ (a ⨳ c ♯ a' ⨳ c')
⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d

Next tactic:
simp only [nadd_assoc] at this