l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem quot_left_distrib (x y z : PGame) : (⟦x * (y + z)⟧ : Game) = ⟦x * y⟧ + ⟦x * z⟧ :=
  match x, y, z with
  | mk xl xr xL xR, mk yl yr yL yR, mk zl zr zL zR => by
    let x := mk xl xr xL xR
    let y := mk yl yr yL yR
    let z := mk zl zr zL zR
    refine' quot_eq_of_mk'_quot_eq _ _ _ _
    · fconstructor
      · rintro (⟨_, _ | _⟩ | ⟨_, _ | _⟩) <;>
          -- Porting note: we've increased `maxDepth` here from `5` to `6`.
          -- Likely this sort of off-by-one error is just a change in the implementation
          -- of `solve_by_elim`.
          solve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]
      · rintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩) <;>
          solve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]
      · rintro (⟨_, _ | _⟩ | ⟨_, _ | _⟩) <;> rfl
      · rintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩) <;> rfl
    · fconstructor
      · rintro (⟨_, _ | _⟩ | ⟨_, _ | _⟩) <;>
          solve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]
      · rintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩) <;>
          solve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]
      · rintro (⟨_, _ | _⟩ | ⟨_, _ | _⟩) <;> rfl
      · rintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩) <;> rfl
    -- Porting note: explicitly wrote out arguments to each recursive
    -- quot_left_distrib reference below, because otherwise the decreasing_by block
    -- failed. Previously, each branch ended with: `simp [quot_left_distrib]; abel`
    -- See https://github.com/leanprover/lean4/issues/2288
    · rintro (⟨i, j | k⟩ | ⟨i, j | k⟩)
      · change
          ⟦xL i * (y + z) + x * (yL j + z) - xL i * (yL j + z)⟧ =
            ⟦xL i * y + x * yL j - xL i * yL j + x * z⟧
        simp only [quot_sub, quot_add]
        rw [quot_left_distrib (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]
        rw [quot_left_distrib (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]
        rw [quot_left_distrib (xL i) (yL j) (mk zl zr zL zR)]
        abel
      · change
          ⟦xL i * (y + z) + x * (y + zL k) - xL i * (y + zL k)⟧ =
            ⟦x * y + (xL i * z + x * zL k - xL i * zL k)⟧
        simp only [quot_sub, quot_add]
        rw [quot_left_distrib (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]
        rw [quot_left_distrib (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]
        rw [quot_left_distrib (xL i) (mk yl yr yL yR) (zL k)]
        

Proof state:
case refine'_3.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zl
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zL k⟧) -
      (⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * zL k⟧) =
    ⟦mk xl xr xL xR * mk yl yr yL yR⟧ + (⟦xL i * mk zl zr zL zR⟧ + ⟦mk xl xr xL xR * zL k⟧ - ⟦xL i * zL k⟧)

Next tactic:
abel
@[simp]
theorem quot_left_distrib (x y z : PGame) : (⟦x * (y + z)⟧ : Game) = ⟦x * y⟧ + ⟦x * z⟧ :=
  match x, y, z with
  | mk xl xr xL xR, mk yl yr yL yR, mk zl zr zL zR => by
    let x := mk xl xr xL xR
    let y := mk yl yr yL yR
    let z := mk zl zr zL zR
    refine' quot_eq_of_mk'_quot_eq _ _ _ _
    · fconstructor
      · rintro (⟨_, _ | _⟩ | ⟨_, _ | _⟩) <;>
          -- Porting note: we've increased `maxDepth` here from `5` to `6`.
          -- Likely this sort of off-by-one error is just a change in the implementation
          -- of `solve_by_elim`.
          solve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]
      · rintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩) <;>
          solve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]
      · rintro (⟨_, _ | _⟩ | ⟨_, _ | _⟩) <;> rfl
      · rintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩) <;> rfl
    · fconstructor
      · rintro (⟨_, _ | _⟩ | ⟨_, _ | _⟩) <;>
          solve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]
      · rintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩) <;>
          solve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]
      · rintro (⟨_, _ | _⟩ | ⟨_, _ | _⟩) <;> rfl
      · rintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩) <;> rfl
    -- Porting note: explicitly wrote out arguments to each recursive
    -- quot_left_distrib reference below, because otherwise the decreasing_by block
    -- failed. Previously, each branch ended with: `simp [quot_left_distrib]; abel`
    -- See https://github.com/leanprover/lean4/issues/2288
    · rintro (⟨i, j | k⟩ | ⟨i, j | k⟩)
      · change
          ⟦xL i * (y + z) + x * (yL j + z) - xL i * (yL j + z)⟧ =
            ⟦xL i * y + x * yL j - xL i * yL j + x * z⟧
        simp only [quot_sub, quot_add]
        rw [quot_left_distrib (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]
        rw [quot_left_distrib (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]
        rw [quot_left_distrib (xL i) (yL j) (mk zl zr zL zR)]
        abel
      · change
          ⟦xL i * (y + z) + x * (y + zL k) - xL i * (y + zL k)⟧ =
            ⟦x * y + (xL i * z + x * zL k - xL i * zL k)⟧
        simp only [quot_sub, quot_add]
        rw [quot_left_distrib (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]
        rw [quot_left_distrib (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]
        rw [quot_left_distrib (xL i) (mk yl yr yL yR) (zL k)]
        abel
      · change
          ⟦xR i * (y + z) + x * (yR j + z) - xR i * (yR j + z)⟧ =
            ⟦xR i * y + x * yR j - xR i * yR j + x * z⟧
        

Proof state:
case refine'_3.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yr
⊢ ⟦xR i * (y + z) + x * (yR j + z) - xR i * (yR j + z)⟧ = ⟦xR i * y + x * yR j - xR i * yR j + x * z⟧

Next tactic:
simp only [quot_sub, quot_add]
@[simp]
theorem quot_left_distrib_sub (x y z : PGame) : (⟦x * (y - z)⟧ : Game) = ⟦x * y⟧ - ⟦x * z⟧ := by
  

Proof state:
x y z : PGame
⊢ ⟦x * (y - z)⟧ = ⟦x * y⟧ - ⟦x * z⟧

Next tactic:
change (⟦x * (y + -z)⟧ : Game) = ⟦x * y⟧ + -⟦x * z⟧
@[simp]
theorem quot_left_distrib_sub (x y z : PGame) : (⟦x * (y - z)⟧ : Game) = ⟦x * y⟧ - ⟦x * z⟧ := by
  change (⟦x * (y + -z)⟧ : Game) = ⟦x * y⟧ + -⟦x * z⟧
  

Proof state:
x y z : PGame
⊢ ⟦x * (y + -z)⟧ = ⟦x * y⟧ + -⟦x * z⟧

Next tactic:
rw [quot_left_distrib, quot_mul_neg]
@[simp]
theorem quot_right_distrib (x y z : PGame) : (⟦(x + y) * z⟧ : Game) = ⟦x * z⟧ + ⟦y * z⟧ := by
  

Proof state:
x y z : PGame
⊢ ⟦(x + y) * z⟧ = ⟦x * z⟧ + ⟦y * z⟧

Next tactic:
simp only [quot_mul_comm, quot_left_distrib]
@[simp]
theorem quot_right_distrib_sub (x y z : PGame) : (⟦(y - z) * x⟧ : Game) = ⟦y * x⟧ - ⟦z * x⟧ := by
  

Proof state:
x y z : PGame
⊢ ⟦(y - z) * x⟧ = ⟦y * x⟧ - ⟦z * x⟧

Next tactic:
change (⟦(y + -z) * x⟧ : Game) = ⟦y * x⟧ + -⟦z * x⟧
@[simp]
theorem quot_right_distrib_sub (x y z : PGame) : (⟦(y - z) * x⟧ : Game) = ⟦y * x⟧ - ⟦z * x⟧ := by
  change (⟦(y + -z) * x⟧ : Game) = ⟦y * x⟧ + -⟦z * x⟧
  

Proof state:
x y z : PGame
⊢ ⟦(y + -z) * x⟧ = ⟦y * x⟧ + -⟦z * x⟧

Next tactic:
rw [quot_right_distrib, quot_neg_mul]
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    

Proof state:
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
⊢ mk xl xr xL xR * 1 ≡r mk xl xr xL xR

Next tactic:
show _ * One.one ≡r _
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    

Proof state:
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
⊢ mk xl xr xL xR * One.one ≡r mk xl xr xL xR

Next tactic:
unfold One.one
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    

Proof state:
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
⊢ mk xl xr xL xR * instOnePGame.1 ≡r mk xl xr xL xR

Next tactic:
unfold instOnePGame
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    unfold instOnePGame
    

Proof state:
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
⊢ mk xl xr xL xR * { one := mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim }.1 ≡r mk xl xr xL xR

Next tactic:
change mk _ _ _ _ * mk _ _ _ _ ≡r _
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    unfold instOnePGame
    change mk _ _ _ _ * mk _ _ _ _ ≡r _
    -- Porting note: changed `refine'` to `refine`,
    -- otherwise there are typeclass inference failures.
    

Proof state:
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
⊢ mk xl xr xL xR * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim ≡r mk xl xr xL xR

Next tactic:
refine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _),
      (Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    unfold instOnePGame
    change mk _ _ _ _ * mk _ _ _ _ ≡r _
    -- Porting note: changed `refine'` to `refine`,
    -- otherwise there are typeclass inference failures.
    refine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _),
      (Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩ <;>
    (

Proof state:
case refine_1
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
⊢ (i : LeftMoves (mk xl xr xL xR * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim)) →
    moveLeft (mk xl xr xL xR * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim) i ≡r
      moveLeft (mk xl xr xL xR)
        (((Equiv.sumEmpty (xl × PUnit.{u + 1}) (xr × PEmpty.{u + 1})).trans (Equiv.prodPUnit xl)) i)

Next tactic:
try rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    unfold instOnePGame
    change mk _ _ _ _ * mk _ _ _ _ ≡r _
    -- Porting note: changed `refine'` to `refine`,
    -- otherwise there are typeclass inference failures.
    refine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _),
      (Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩ <;>
    (try 

Proof state:
case refine_1
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
⊢ (i : LeftMoves (mk xl xr xL xR * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim)) →
    moveLeft (mk xl xr xL xR * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim) i ≡r
      moveLeft (mk xl xr xL xR)
        (((Equiv.sumEmpty (xl × PUnit.{u + 1}) (xr × PEmpty.{u + 1})).trans (Equiv.prodPUnit xl)) i)

Next tactic:
rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    unfold instOnePGame
    change mk _ _ _ _ * mk _ _ _ _ ≡r _
    -- Porting note: changed `refine'` to `refine`,
    -- otherwise there are typeclass inference failures.
    refine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _),
      (Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩ <;>
    (

Proof state:
case refine_2
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
⊢ (j : RightMoves (mk xl xr xL xR * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim)) →
    moveRight (mk xl xr xL xR * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim) j ≡r
      moveRight (mk xl xr xL xR)
        (((Equiv.emptySum (xl × PEmpty.{u + 1}) (xr × PUnit.{u + 1})).trans (Equiv.prodPUnit xr)) j)

Next tactic:
try rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    unfold instOnePGame
    change mk _ _ _ _ * mk _ _ _ _ ≡r _
    -- Porting note: changed `refine'` to `refine`,
    -- otherwise there are typeclass inference failures.
    refine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _),
      (Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩ <;>
    (try 

Proof state:
case refine_2
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
⊢ (j : RightMoves (mk xl xr xL xR * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim)) →
    moveRight (mk xl xr xL xR * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim) j ≡r
      moveRight (mk xl xr xL xR)
        (((Equiv.emptySum (xl × PEmpty.{u + 1}) (xr × PUnit.{u + 1})).trans (Equiv.prodPUnit xr)) j)

Next tactic:
rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    unfold instOnePGame
    change mk _ _ _ _ * mk _ _ _ _ ≡r _
    -- Porting note: changed `refine'` to `refine`,
    -- otherwise there are typeclass inference failures.
    refine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _),
      (Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩ <;>
    (try rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)) <;>
    

Proof state:
case refine_1.inl.mk.unit
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
i : xl
⊢ moveLeft (mk xl xr xL xR * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim) (Sum.inl (i, PUnit.unit)) ≡r
    moveLeft (mk xl xr xL xR)
      (((Equiv.sumEmpty (xl × PUnit.{u + 1}) (xr × PEmpty.{u + 1})).trans (Equiv.prodPUnit xl))
        (Sum.inl (i, PUnit.unit)))

Next tactic:
{ (try intro i)
      dsimp
      apply (Relabelling.subCongr (Relabelling.refl _) (mulZeroRelabelling _)).trans
      rw [sub_zero]
      exact (addZeroRelabelling _).trans <|
        (((mulOneRelabelling _).addCongr (mulZeroRelabelling _)).trans <| addZeroRelabelling _) }
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    unfold instOnePGame
    change mk _ _ _ _ * mk _ _ _ _ ≡r _
    -- Porting note: changed `refine'` to `refine`,
    -- otherwise there are typeclass inference failures.
    refine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _),
      (Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩ <;>
    (try rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)) <;>
    { (

Proof state:
case refine_1.inl.mk.unit
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
i : xl
⊢ moveLeft (mk xl xr xL xR * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim) (Sum.inl (i, PUnit.unit)) ≡r
    moveLeft (mk xl xr xL xR)
      (((Equiv.sumEmpty (xl × PUnit.{u + 1}) (xr × PEmpty.{u + 1})).trans (Equiv.prodPUnit xl))
        (Sum.inl (i, PUnit.unit)))

Next tactic:
try intro i
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    unfold instOnePGame
    change mk _ _ _ _ * mk _ _ _ _ ≡r _
    -- Porting note: changed `refine'` to `refine`,
    -- otherwise there are typeclass inference failures.
    refine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _),
      (Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩ <;>
    (try rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)) <;>
    { (try 

Proof state:
case refine_1.inl.mk.unit
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
i : xl
⊢ moveLeft (mk xl xr xL xR * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim) (Sum.inl (i, PUnit.unit)) ≡r
    moveLeft (mk xl xr xL xR)
      (((Equiv.sumEmpty (xl × PUnit.{u + 1}) (xr × PEmpty.{u + 1})).trans (Equiv.prodPUnit xl))
        (Sum.inl (i, PUnit.unit)))

Next tactic:
intro i
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    unfold instOnePGame
    change mk _ _ _ _ * mk _ _ _ _ ≡r _
    -- Porting note: changed `refine'` to `refine`,
    -- otherwise there are typeclass inference failures.
    refine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _),
      (Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩ <;>
    (try rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)) <;>
    { (try intro i)
      

Proof state:
case refine_1.inl.mk.unit
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
i : xl
⊢ moveLeft (mk xl xr xL xR * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim) (Sum.inl (i, PUnit.unit)) ≡r
    moveLeft (mk xl xr xL xR)
      (((Equiv.sumEmpty (xl × PUnit.{u + 1}) (xr × PEmpty.{u + 1})).trans (Equiv.prodPUnit xl))
        (Sum.inl (i, PUnit.unit)))

Next tactic:
dsimp
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    unfold instOnePGame
    change mk _ _ _ _ * mk _ _ _ _ ≡r _
    -- Porting note: changed `refine'` to `refine`,
    -- otherwise there are typeclass inference failures.
    refine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _),
      (Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩ <;>
    (try rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)) <;>
    { (try intro i)
      dsimp
      

Proof state:
case refine_1.inl.mk.unit
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
i : xl
⊢ xL i * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim + mk xl xr xL xR * 0 - xL i * 0 ≡r
    xL ((Equiv.sumEmpty (xl × PUnit.{u + 1}) (xr × PEmpty.{u + 1})) (Sum.inl (i, PUnit.unit))).1

Next tactic:
apply (Relabelling.subCongr (Relabelling.refl _) (mulZeroRelabelling _)).trans
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    unfold instOnePGame
    change mk _ _ _ _ * mk _ _ _ _ ≡r _
    -- Porting note: changed `refine'` to `refine`,
    -- otherwise there are typeclass inference failures.
    refine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _),
      (Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩ <;>
    (try rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)) <;>
    { (try intro i)
      dsimp
      apply (Relabelling.subCongr (Relabelling.refl _) (mulZeroRelabelling _)).trans
      

Proof state:
case refine_1.inl.mk.unit
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
i : xl
⊢ xL i * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim + mk xl xr xL xR * 0 - 0 ≡r
    xL ((Equiv.sumEmpty (xl × PUnit.{u + 1}) (xr × PEmpty.{u + 1})) (Sum.inl (i, PUnit.unit))).1

Next tactic:
rw [sub_zero]
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    unfold instOnePGame
    change mk _ _ _ _ * mk _ _ _ _ ≡r _
    -- Porting note: changed `refine'` to `refine`,
    -- otherwise there are typeclass inference failures.
    refine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _),
      (Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩ <;>
    (try rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)) <;>
    { (try intro i)
      dsimp
      apply (Relabelling.subCongr (Relabelling.refl _) (mulZeroRelabelling _)).trans
      rw [sub_zero]
      

Proof state:
case refine_1.inl.mk.unit
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
i : xl
⊢ xL i * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim + mk xl xr xL xR * 0 + 0 ≡r
    xL ((Equiv.sumEmpty (xl × PUnit.{u + 1}) (xr × PEmpty.{u + 1})) (Sum.inl (i, PUnit.unit))).1

Next tactic:
exact (addZeroRelabelling _).trans <|
        (((mulOneRelabelling _).addCongr (mulZeroRelabelling _)).trans <| addZeroRelabelling _)
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    unfold instOnePGame
    change mk _ _ _ _ * mk _ _ _ _ ≡r _
    -- Porting note: changed `refine'` to `refine`,
    -- otherwise there are typeclass inference failures.
    refine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _),
      (Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩ <;>
    (try rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)) <;>
    

Proof state:
case refine_2.inr.mk.unit
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
i : xr
⊢ moveRight (mk xl xr xL xR * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim) (Sum.inr (i, PUnit.unit)) ≡r
    moveRight (mk xl xr xL xR)
      (((Equiv.emptySum (xl × PEmpty.{u + 1}) (xr × PUnit.{u + 1})).trans (Equiv.prodPUnit xr))
        (Sum.inr (i, PUnit.unit)))

Next tactic:
{ (try intro i)
      dsimp
      apply (Relabelling.subCongr (Relabelling.refl _) (mulZeroRelabelling _)).trans
      rw [sub_zero]
      exact (addZeroRelabelling _).trans <|
        (((mulOneRelabelling _).addCongr (mulZeroRelabelling _)).trans <| addZeroRelabelling _) }
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    unfold instOnePGame
    change mk _ _ _ _ * mk _ _ _ _ ≡r _
    -- Porting note: changed `refine'` to `refine`,
    -- otherwise there are typeclass inference failures.
    refine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _),
      (Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩ <;>
    (try rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)) <;>
    { (

Proof state:
case refine_2.inr.mk.unit
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
i : xr
⊢ moveRight (mk xl xr xL xR * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim) (Sum.inr (i, PUnit.unit)) ≡r
    moveRight (mk xl xr xL xR)
      (((Equiv.emptySum (xl × PEmpty.{u + 1}) (xr × PUnit.{u + 1})).trans (Equiv.prodPUnit xr))
        (Sum.inr (i, PUnit.unit)))

Next tactic:
try intro i
/-- `x * 1` has the same moves as `x`. -/
def mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
  | ⟨xl, xr, xL, xR⟩ => by
    -- Porting note: the next four lines were just `unfold has_one.one,`
    show _ * One.one ≡r _
    unfold One.one
    unfold instOnePGame
    change mk _ _ _ _ * mk _ _ _ _ ≡r _
    -- Porting note: changed `refine'` to `refine`,
    -- otherwise there are typeclass inference failures.
    refine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _),
      (Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩ <;>
    (try rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)) <;>
    { (try 

Proof state:
case refine_2.inr.mk.unit
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
i : xr
⊢ moveRight (mk xl xr xL xR * mk PUnit.{u + 1} PEmpty.{u + 1} (fun x => 0) PEmpty.elim) (Sum.inr (i, PUnit.unit)) ≡r
    moveRight (mk xl xr xL xR)
      (((Equiv.emptySum (xl × PEmpty.{u + 1}) (xr × PUnit.{u + 1})).trans (Equiv.prodPUnit xr))
        (Sum.inr (i, PUnit.unit)))

Next tactic:
intro i