l3lab/ntp-mathlib huggingface dataset:
theorem add : ∀ {x y : PGame} (_ : Numeric x) (_ : Numeric y), Numeric (x + y)
  | ⟨xl, xr, xL, xR⟩, ⟨yl, yr, yL, yR⟩, ox, oy =>
    ⟨by
      rintro (ix | iy) (jx | jy)
      · exact add_lt_add_right (ox.1 ix jx) _
      · exact (add_lf_add_of_lf_of_le (lf_mk _ _ ix) (oy.le_moveRight jy)).lt
          ((ox.moveLeft ix).add oy) (ox.add (oy.moveRight jy))
      · exact (add_lf_add_of_lf_of_le (mk_lf _ _ jx) (oy.moveLeft_le iy)).lt
          (ox.add (oy.moveLeft iy)) ((ox.moveRight jx).add oy)
      · exact add_lt_add_left (oy.1 iy jy) ⟨xl, xr, xL, xR⟩, by
      constructor
      · rintro (ix | iy)
        · exact (ox.moveLeft ix).add oy
        · exact ox.add (oy.moveLeft iy)
      · rintro (jx | jy)
        · apply (ox.moveRight jx).add oy
        · apply ox.add (oy.moveRight jy)⟩
termination_by _ x y _ _ => (x, y) -- Porting note: Added `termination_by`
decreasing_by 

Proof state:
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
ox : Numeric (PGame.mk xl xr xL xR)
oy : Numeric (PGame.mk yl yr yL yR)
x✝ :
  ∀ (y : (x : PGame) ×' (x_1 : PGame) ×' (_ : Numeric x) ×' Numeric x_1),
    (invImage
            (fun a =>
              PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => PSigma.casesOn snd fun x_1 snd => (x, y))
            Prod.instWellFoundedRelationProd).1
        y { fst := PGame.mk xl xr xL xR, snd := { fst := PGame.mk yl yr yL yR, snd := { fst := ox, snd := oy } } } →
      Numeric (y.1 + y.2.1)
jx : xr
⊢ (invImage
        (fun a =>
          PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => PSigma.casesOn snd fun x_1 snd => (x, y))
        Prod.instWellFoundedRelationProd).1
    { fst := PGame.moveRight (PGame.mk xl xr xL xR) jx,
      snd :=
        { fst := PGame.mk yl yr yL yR,
          snd := { fst := (_ : Numeric (PGame.moveRight (PGame.mk xl xr xL xR) jx)), snd := oy } } }
    { fst := PGame.mk xl xr xL xR, snd := { fst := PGame.mk yl yr yL yR, snd := { fst := ox, snd := oy } } }

Next tactic:
pgame_wf_tac
theorem add : ∀ {x y : PGame} (_ : Numeric x) (_ : Numeric y), Numeric (x + y)
  | ⟨xl, xr, xL, xR⟩, ⟨yl, yr, yL, yR⟩, ox, oy =>
    ⟨by
      rintro (ix | iy) (jx | jy)
      · exact add_lt_add_right (ox.1 ix jx) _
      · exact (add_lf_add_of_lf_of_le (lf_mk _ _ ix) (oy.le_moveRight jy)).lt
          ((ox.moveLeft ix).add oy) (ox.add (oy.moveRight jy))
      · exact (add_lf_add_of_lf_of_le (mk_lf _ _ jx) (oy.moveLeft_le iy)).lt
          (ox.add (oy.moveLeft iy)) ((ox.moveRight jx).add oy)
      · exact add_lt_add_left (oy.1 iy jy) ⟨xl, xr, xL, xR⟩, by
      constructor
      · rintro (ix | iy)
        · exact (ox.moveLeft ix).add oy
        · exact ox.add (oy.moveLeft iy)
      · rintro (jx | jy)
        · apply (ox.moveRight jx).add oy
        · apply ox.add (oy.moveRight jy)⟩
termination_by _ x y _ _ => (x, y) -- Porting note: Added `termination_by`
decreasing_by 

Proof state:
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
ox : Numeric (PGame.mk xl xr xL xR)
oy : Numeric (PGame.mk yl yr yL yR)
x✝ :
  ∀ (y : (x : PGame) ×' (x_1 : PGame) ×' (_ : Numeric x) ×' Numeric x_1),
    (invImage
            (fun a =>
              PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => PSigma.casesOn snd fun x_1 snd => (x, y))
            Prod.instWellFoundedRelationProd).1
        y { fst := PGame.mk xl xr xL xR, snd := { fst := PGame.mk yl yr yL yR, snd := { fst := ox, snd := oy } } } →
      Numeric (y.1 + y.2.1)
iy : yl
⊢ (invImage
        (fun a =>
          PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => PSigma.casesOn snd fun x_1 snd => (x, y))
        Prod.instWellFoundedRelationProd).1
    { fst := PGame.mk xl xr xL xR,
      snd := { fst := yL iy, snd := { fst := ox, snd := (_ : Numeric (PGame.moveLeft (PGame.mk yl yr yL yR) iy)) } } }
    { fst := PGame.mk xl xr xL xR, snd := { fst := PGame.mk yl yr yL yR, snd := { fst := ox, snd := oy } } }

Next tactic:
pgame_wf_tac
/-- Ordinal games are numeric. -/
theorem numeric_toPGame (o : Ordinal) : o.toPGame.Numeric := by
  

Proof state:
o : Ordinal.{u_1}
⊢ Numeric (Ordinal.toPGame o)

Next tactic:
induction' o using Ordinal.induction with o IH
/-- Ordinal games are numeric. -/
theorem numeric_toPGame (o : Ordinal) : o.toPGame.Numeric := by
  induction' o using Ordinal.induction with o IH
  

Proof state:
case h
o : Ordinal.{u_1}
IH : ∀ k < o, Numeric (Ordinal.toPGame k)
⊢ Numeric (Ordinal.toPGame o)

Next tactic:
apply numeric_of_isEmpty_rightMoves
/-- Ordinal games are numeric. -/
theorem numeric_toPGame (o : Ordinal) : o.toPGame.Numeric := by
  induction' o using Ordinal.induction with o IH
  apply numeric_of_isEmpty_rightMoves
  

Proof state:
case h.H
o : Ordinal.{u_1}
IH : ∀ k < o, Numeric (Ordinal.toPGame k)
⊢ ∀ (i : LeftMoves (Ordinal.toPGame o)), Numeric (moveLeft (Ordinal.toPGame o) i)

Next tactic:
simpa using fun i => IH _ (Ordinal.toLeftMovesToPGame_symm_lt i)
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by 

Proof state:
⊢ ∀ (a b c : Surreal), a + b + c = a + (b + c)

Next tactic:
rintro ⟨_⟩ ⟨_⟩ ⟨_⟩
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; 

Proof state:
case mk.mk.mk
a✝³ : Surreal
a✝² : Subtype Numeric
b✝ : Surreal
a✝¹ : Subtype Numeric
c✝ : Surreal
a✝ : Subtype Numeric
⊢ Quot.mk Setoid.r a✝² + Quot.mk Setoid.r a✝¹ + Quot.mk Setoid.r a✝ =
    Quot.mk Setoid.r a✝² + (Quot.mk Setoid.r a✝¹ + Quot.mk Setoid.r a✝)

Next tactic:
exact Quotient.sound add_assoc_equiv
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by 

Proof state:
⊢ ∀ (a : Surreal), 0 + a = a

Next tactic:
rintro ⟨a⟩
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; 

Proof state:
case mk
a✝ : Surreal
a : Subtype Numeric
⊢ 0 + Quot.mk Setoid.r a = Quot.mk Setoid.r a

Next tactic:
exact Quotient.sound (zero_add_equiv a)
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; exact Quotient.sound (zero_add_equiv a)
  add_zero := by 

Proof state:
⊢ ∀ (a : Surreal), a + 0 = a

Next tactic:
rintro ⟨a⟩
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; exact Quotient.sound (zero_add_equiv a)
  add_zero := by rintro ⟨a⟩; 

Proof state:
case mk
a✝ : Surreal
a : Subtype Numeric
⊢ Quot.mk Setoid.r a + 0 = Quot.mk Setoid.r a

Next tactic:
exact Quotient.sound (add_zero_equiv a)
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; exact Quotient.sound (zero_add_equiv a)
  add_zero := by rintro ⟨a⟩; exact Quotient.sound (add_zero_equiv a)
  neg := Neg.neg
  add_left_neg := by 

Proof state:
⊢ ∀ (a : Surreal), -a + a = 0

Next tactic:
rintro ⟨a⟩
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; exact Quotient.sound (zero_add_equiv a)
  add_zero := by rintro ⟨a⟩; exact Quotient.sound (add_zero_equiv a)
  neg := Neg.neg
  add_left_neg := by rintro ⟨a⟩; 

Proof state:
case mk
a✝ : Surreal
a : Subtype Numeric
⊢ -Quot.mk Setoid.r a + Quot.mk Setoid.r a = 0

Next tactic:
exact Quotient.sound (add_left_neg_equiv a)
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; exact Quotient.sound (zero_add_equiv a)
  add_zero := by rintro ⟨a⟩; exact Quotient.sound (add_zero_equiv a)
  neg := Neg.neg
  add_left_neg := by rintro ⟨a⟩; exact Quotient.sound (add_left_neg_equiv a)
  add_comm := by 

Proof state:
⊢ ∀ (a b : Surreal), a + b = b + a

Next tactic:
rintro ⟨_⟩ ⟨_⟩
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; exact Quotient.sound (zero_add_equiv a)
  add_zero := by rintro ⟨a⟩; exact Quotient.sound (add_zero_equiv a)
  neg := Neg.neg
  add_left_neg := by rintro ⟨a⟩; exact Quotient.sound (add_left_neg_equiv a)
  add_comm := by rintro ⟨_⟩ ⟨_⟩; 

Proof state:
case mk.mk
a✝² : Surreal
a✝¹ : Subtype Numeric
b✝ : Surreal
a✝ : Subtype Numeric
⊢ Quot.mk Setoid.r a✝¹ + Quot.mk Setoid.r a✝ = Quot.mk Setoid.r a✝ + Quot.mk Setoid.r a✝¹

Next tactic:
exact Quotient.sound add_comm_equiv
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; exact Quotient.sound (zero_add_equiv a)
  add_zero := by rintro ⟨a⟩; exact Quotient.sound (add_zero_equiv a)
  neg := Neg.neg
  add_left_neg := by rintro ⟨a⟩; exact Quotient.sound (add_left_neg_equiv a)
  add_comm := by rintro ⟨_⟩ ⟨_⟩; exact Quotient.sound add_comm_equiv
  le := (· ≤ ·)
  lt := (· < ·)
  le_refl := by 

Proof state:
⊢ ∀ (a : Surreal), a ≤ a

Next tactic:
rintro ⟨_⟩
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; exact Quotient.sound (zero_add_equiv a)
  add_zero := by rintro ⟨a⟩; exact Quotient.sound (add_zero_equiv a)
  neg := Neg.neg
  add_left_neg := by rintro ⟨a⟩; exact Quotient.sound (add_left_neg_equiv a)
  add_comm := by rintro ⟨_⟩ ⟨_⟩; exact Quotient.sound add_comm_equiv
  le := (· ≤ ·)
  lt := (· < ·)
  le_refl := by rintro ⟨_⟩; 

Proof state:
case mk
a✝¹ : Surreal
a✝ : Subtype Numeric
⊢ Quot.mk Setoid.r a✝ ≤ Quot.mk Setoid.r a✝

Next tactic:
apply @le_rfl PGame
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; exact Quotient.sound (zero_add_equiv a)
  add_zero := by rintro ⟨a⟩; exact Quotient.sound (add_zero_equiv a)
  neg := Neg.neg
  add_left_neg := by rintro ⟨a⟩; exact Quotient.sound (add_left_neg_equiv a)
  add_comm := by rintro ⟨_⟩ ⟨_⟩; exact Quotient.sound add_comm_equiv
  le := (· ≤ ·)
  lt := (· < ·)
  le_refl := by rintro ⟨_⟩; apply @le_rfl PGame
  le_trans := by 

Proof state:
⊢ ∀ (a b c : Surreal), a ≤ b → b ≤ c → a ≤ c

Next tactic:
rintro ⟨_⟩ ⟨_⟩ ⟨_⟩
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; exact Quotient.sound (zero_add_equiv a)
  add_zero := by rintro ⟨a⟩; exact Quotient.sound (add_zero_equiv a)
  neg := Neg.neg
  add_left_neg := by rintro ⟨a⟩; exact Quotient.sound (add_left_neg_equiv a)
  add_comm := by rintro ⟨_⟩ ⟨_⟩; exact Quotient.sound add_comm_equiv
  le := (· ≤ ·)
  lt := (· < ·)
  le_refl := by rintro ⟨_⟩; apply @le_rfl PGame
  le_trans := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; 

Proof state:
case mk.mk.mk
a✝³ : Surreal
a✝² : Subtype Numeric
b✝ : Surreal
a✝¹ : Subtype Numeric
c✝ : Surreal
a✝ : Subtype Numeric
⊢ Quot.mk Setoid.r a✝² ≤ Quot.mk Setoid.r a✝¹ →
    Quot.mk Setoid.r a✝¹ ≤ Quot.mk Setoid.r a✝ → Quot.mk Setoid.r a✝² ≤ Quot.mk Setoid.r a✝

Next tactic:
apply @le_trans PGame
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; exact Quotient.sound (zero_add_equiv a)
  add_zero := by rintro ⟨a⟩; exact Quotient.sound (add_zero_equiv a)
  neg := Neg.neg
  add_left_neg := by rintro ⟨a⟩; exact Quotient.sound (add_left_neg_equiv a)
  add_comm := by rintro ⟨_⟩ ⟨_⟩; exact Quotient.sound add_comm_equiv
  le := (· ≤ ·)
  lt := (· < ·)
  le_refl := by rintro ⟨_⟩; apply @le_rfl PGame
  le_trans := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; apply @le_trans PGame
  lt_iff_le_not_le := by 

Proof state:
⊢ ∀ (a b : Surreal), a < b ↔ a ≤ b ∧ ¬b ≤ a

Next tactic:
rintro ⟨_, ox⟩ ⟨_, oy⟩
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; exact Quotient.sound (zero_add_equiv a)
  add_zero := by rintro ⟨a⟩; exact Quotient.sound (add_zero_equiv a)
  neg := Neg.neg
  add_left_neg := by rintro ⟨a⟩; exact Quotient.sound (add_left_neg_equiv a)
  add_comm := by rintro ⟨_⟩ ⟨_⟩; exact Quotient.sound add_comm_equiv
  le := (· ≤ ·)
  lt := (· < ·)
  le_refl := by rintro ⟨_⟩; apply @le_rfl PGame
  le_trans := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; apply @le_trans PGame
  lt_iff_le_not_le := by rintro ⟨_, ox⟩ ⟨_, oy⟩; 

Proof state:
case mk.mk.mk.mk
a✝ : Surreal
val✝¹ : PGame
ox : Numeric val✝¹
b✝ : Surreal
val✝ : PGame
oy : Numeric val✝
⊢ Quot.mk Setoid.r { val := val✝¹, property := ox } < Quot.mk Setoid.r { val := val✝, property := oy } ↔
    Quot.mk Setoid.r { val := val✝¹, property := ox } ≤ Quot.mk Setoid.r { val := val✝, property := oy } ∧
      ¬Quot.mk Setoid.r { val := val✝, property := oy } ≤ Quot.mk Setoid.r { val := val✝¹, property := ox }

Next tactic:
apply @lt_iff_le_not_le PGame
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; exact Quotient.sound (zero_add_equiv a)
  add_zero := by rintro ⟨a⟩; exact Quotient.sound (add_zero_equiv a)
  neg := Neg.neg
  add_left_neg := by rintro ⟨a⟩; exact Quotient.sound (add_left_neg_equiv a)
  add_comm := by rintro ⟨_⟩ ⟨_⟩; exact Quotient.sound add_comm_equiv
  le := (· ≤ ·)
  lt := (· < ·)
  le_refl := by rintro ⟨_⟩; apply @le_rfl PGame
  le_trans := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; apply @le_trans PGame
  lt_iff_le_not_le := by rintro ⟨_, ox⟩ ⟨_, oy⟩; apply @lt_iff_le_not_le PGame
  le_antisymm := by 

Proof state:
⊢ ∀ (a b : Surreal), a ≤ b → b ≤ a → a = b

Next tactic:
rintro ⟨_⟩ ⟨_⟩ h₁ h₂
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; exact Quotient.sound (zero_add_equiv a)
  add_zero := by rintro ⟨a⟩; exact Quotient.sound (add_zero_equiv a)
  neg := Neg.neg
  add_left_neg := by rintro ⟨a⟩; exact Quotient.sound (add_left_neg_equiv a)
  add_comm := by rintro ⟨_⟩ ⟨_⟩; exact Quotient.sound add_comm_equiv
  le := (· ≤ ·)
  lt := (· < ·)
  le_refl := by rintro ⟨_⟩; apply @le_rfl PGame
  le_trans := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; apply @le_trans PGame
  lt_iff_le_not_le := by rintro ⟨_, ox⟩ ⟨_, oy⟩; apply @lt_iff_le_not_le PGame
  le_antisymm := by rintro ⟨_⟩ ⟨_⟩ h₁ h₂; 

Proof state:
case mk.mk
a✝² : Surreal
a✝¹ : Subtype Numeric
b✝ : Surreal
a✝ : Subtype Numeric
h₁ : Quot.mk Setoid.r a✝¹ ≤ Quot.mk Setoid.r a✝
h₂ : Quot.mk Setoid.r a✝ ≤ Quot.mk Setoid.r a✝¹
⊢ Quot.mk Setoid.r a✝¹ = Quot.mk Setoid.r a✝

Next tactic:
exact Quotient.sound ⟨h₁, h₂⟩
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; exact Quotient.sound (zero_add_equiv a)
  add_zero := by rintro ⟨a⟩; exact Quotient.sound (add_zero_equiv a)
  neg := Neg.neg
  add_left_neg := by rintro ⟨a⟩; exact Quotient.sound (add_left_neg_equiv a)
  add_comm := by rintro ⟨_⟩ ⟨_⟩; exact Quotient.sound add_comm_equiv
  le := (· ≤ ·)
  lt := (· < ·)
  le_refl := by rintro ⟨_⟩; apply @le_rfl PGame
  le_trans := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; apply @le_trans PGame
  lt_iff_le_not_le := by rintro ⟨_, ox⟩ ⟨_, oy⟩; apply @lt_iff_le_not_le PGame
  le_antisymm := by rintro ⟨_⟩ ⟨_⟩ h₁ h₂; exact Quotient.sound ⟨h₁, h₂⟩
  add_le_add_left := by 

Proof state:
⊢ ∀ (a b : Surreal), a ≤ b → ∀ (c : Surreal), c + a ≤ c + b

Next tactic:
rintro ⟨_⟩ ⟨_⟩ hx ⟨_⟩
instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
  add := (· + ·)
  add_assoc := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; exact Quotient.sound add_assoc_equiv
  zero := 0
  zero_add := by rintro ⟨a⟩; exact Quotient.sound (zero_add_equiv a)
  add_zero := by rintro ⟨a⟩; exact Quotient.sound (add_zero_equiv a)
  neg := Neg.neg
  add_left_neg := by rintro ⟨a⟩; exact Quotient.sound (add_left_neg_equiv a)
  add_comm := by rintro ⟨_⟩ ⟨_⟩; exact Quotient.sound add_comm_equiv
  le := (· ≤ ·)
  lt := (· < ·)
  le_refl := by rintro ⟨_⟩; apply @le_rfl PGame
  le_trans := by rintro ⟨_⟩ ⟨_⟩ ⟨_⟩; apply @le_trans PGame
  lt_iff_le_not_le := by rintro ⟨_, ox⟩ ⟨_, oy⟩; apply @lt_iff_le_not_le PGame
  le_antisymm := by rintro ⟨_⟩ ⟨_⟩ h₁ h₂; exact Quotient.sound ⟨h₁, h₂⟩
  add_le_add_left := by rintro ⟨_⟩ ⟨_⟩ hx ⟨_⟩; 

Proof state:
case mk.mk.mk
a✝³ : Surreal
a✝² : Subtype Numeric
b✝ : Surreal
a✝¹ : Subtype Numeric
hx : Quot.mk Setoid.r a✝² ≤ Quot.mk Setoid.r a✝¹
c✝ : Surreal
a✝ : Subtype Numeric
⊢ Quot.mk Setoid.r a✝ + Quot.mk Setoid.r a✝² ≤ Quot.mk Setoid.r a✝ + Quot.mk Setoid.r a✝¹

Next tactic:
exact @add_le_add_left PGame _ _ _ _ _ hx _
noncomputable instance : LinearOrderedAddCommGroup Surreal :=
  { Surreal.orderedAddCommGroup with
    le_total := by
      

Proof state:
src✝ : OrderedAddCommGroup Surreal := orderedAddCommGroup
⊢ ∀ (a b : Surreal), a ≤ b ∨ b ≤ a

Next tactic:
rintro ⟨⟨x, ox⟩⟩ ⟨⟨y, oy⟩⟩
noncomputable instance : LinearOrderedAddCommGroup Surreal :=
  { Surreal.orderedAddCommGroup with
    le_total := by
      rintro ⟨⟨x, ox⟩⟩ ⟨⟨y, oy⟩⟩
      

Proof state:
case mk.mk.mk.mk
src✝ : OrderedAddCommGroup Surreal := orderedAddCommGroup
a✝ : Surreal
x : PGame
ox : Numeric x
b✝ : Surreal
y : PGame
oy : Numeric y
⊢ Quot.mk Setoid.r { val := x, property := ox } ≤ Quot.mk Setoid.r { val := y, property := oy } ∨
    Quot.mk Setoid.r { val := y, property := oy } ≤ Quot.mk Setoid.r { val := x, property := ox }

Next tactic:
exact or_iff_not_imp_left.2 fun h => (PGame.not_le.1 h).le oy ox
/-- Casts a `Surreal` number into a `Game`. -/
def toGame : Surreal →+o Game where
  toFun := lift (fun x _ => ⟦x⟧) fun _ _ => Quot.sound
  map_zero' := rfl
  map_add' := by 

Proof state:
⊢ ∀ (x y : Surreal),
    ZeroHom.toFun
        {
          toFun :=
            lift (fun x x_1 => ⟦x⟧)
              (_ :
                ∀ {x y : PGame},
                  Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y),
          map_zero' :=
            (_ :
              lift (fun x x_1 => ⟦x⟧)
                  (_ :
                    ∀ {x y : PGame},
                      Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y)
                  0 =
                lift (fun x x_1 => ⟦x⟧)
                  (_ :
                    ∀ {x y : PGame},
                      Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y)
                  0) }
        (x + y) =
      ZeroHom.toFun
          {
            toFun :=
              lift (fun x x_1 => ⟦x⟧)
                (_ :
                  ∀ {x y : PGame},
                    Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y),
            map_zero' :=
              (_ :
                lift (fun x x_1 => ⟦x⟧)
                    (_ :
                      ∀ {x y : PGame},
                        Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y)
                    0 =
                  lift (fun x x_1 => ⟦x⟧)
                    (_ :
                      ∀ {x y : PGame},
                        Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y)
                    0) }
          x +
        ZeroHom.toFun
          {
            toFun :=
              lift (fun x x_1 => ⟦x⟧)
                (_ :
                  ∀ {x y : PGame},
                    Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y),
            map_zero' :=
              (_ :
                lift (fun x x_1 => ⟦x⟧)
                    (_ :
                      ∀ {x y : PGame},
                        Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y)
                    0 =
                  lift (fun x x_1 => ⟦x⟧)
                    (_ :
                      ∀ {x y : PGame},
                        Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y)
                    0) }
          y

Next tactic:
rintro ⟨_, _⟩ ⟨_, _⟩
/-- Casts a `Surreal` number into a `Game`. -/
def toGame : Surreal →+o Game where
  toFun := lift (fun x _ => ⟦x⟧) fun _ _ => Quot.sound
  map_zero' := rfl
  map_add' := by rintro ⟨_, _⟩ ⟨_, _⟩; 

Proof state:
case mk.mk.mk.mk
x✝ : Surreal
val✝¹ : PGame
property✝¹ : Numeric val✝¹
y✝ : Surreal
val✝ : PGame
property✝ : Numeric val✝
⊢ ZeroHom.toFun
      {
        toFun :=
          lift (fun x x_1 => ⟦x⟧)
            (_ :
              ∀ {x y : PGame}, Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y),
        map_zero' :=
          (_ :
            lift (fun x x_1 => ⟦x⟧)
                (_ :
                  ∀ {x y : PGame},
                    Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y)
                0 =
              lift (fun x x_1 => ⟦x⟧)
                (_ :
                  ∀ {x y : PGame},
                    Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y)
                0) }
      (Quot.mk Setoid.r { val := val✝¹, property := property✝¹ } +
        Quot.mk Setoid.r { val := val✝, property := property✝ }) =
    ZeroHom.toFun
        {
          toFun :=
            lift (fun x x_1 => ⟦x⟧)
              (_ :
                ∀ {x y : PGame},
                  Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y),
          map_zero' :=
            (_ :
              lift (fun x x_1 => ⟦x⟧)
                  (_ :
                    ∀ {x y : PGame},
                      Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y)
                  0 =
                lift (fun x x_1 => ⟦x⟧)
                  (_ :
                    ∀ {x y : PGame},
                      Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y)
                  0) }
        (Quot.mk Setoid.r { val := val✝¹, property := property✝¹ }) +
      ZeroHom.toFun
        {
          toFun :=
            lift (fun x x_1 => ⟦x⟧)
              (_ :
                ∀ {x y : PGame},
                  Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y),
          map_zero' :=
            (_ :
              lift (fun x x_1 => ⟦x⟧)
                  (_ :
                    ∀ {x y : PGame},
                      Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y)
                  0 =
                lift (fun x x_1 => ⟦x⟧)
                  (_ :
                    ∀ {x y : PGame},
                      Numeric x → Numeric y → PGame.Equiv x y → Quot.mk PGame.Equiv x = Quot.mk PGame.Equiv y)
                  0) }
        (Quot.mk Setoid.r { val := val✝, property := property✝ })

Next tactic:
rfl
/-- Converts an ordinal into the corresponding surreal. -/
noncomputable def toSurreal : Ordinal ↪o Surreal where
  toFun o := mk _ (numeric_toPGame o)
  inj' a b h := toPGame_equiv_iff.1 (by 

Proof state:
a b : Ordinal.{?u.71201}
h :
  (fun o => Surreal.mk (toPGame o) (_ : Numeric (toPGame o))) a =
    (fun o => Surreal.mk (toPGame o) (_ : Numeric (toPGame o))) b
⊢ toPGame a ≈ toPGame b

Next tactic:
apply Quotient.exact h