Theorem: SetTheory.PGame.quot_mul_assoc
File: Mathlib/SetTheory/Game/Basic.lean

tactic: let x := mk xl xr xL xR
state_before: 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
⊢ ⟦mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR⟧ = ⟦mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)⟧
state_after: 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
⊢ ⟦mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR⟧ = ⟦mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)⟧

tactic: let y := mk yl yr yL yR
state_before: 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
⊢ ⟦mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR⟧ = ⟦mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)⟧
state_after: 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
⊢ ⟦mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR⟧ = ⟦mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)⟧

tactic: let z := mk zl zr zL zR
state_before: 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
⊢ ⟦mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR⟧ = ⟦mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)⟧
state_after: 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
⊢ ⟦mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR⟧ = ⟦mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)⟧

tactic: refine quot_eq_of_mk'_quot_eq ?_ ?_ ?_ ?_
state_before: 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
⊢ ⟦mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR⟧ = ⟦mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)⟧
state_after: case refine_1
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
⊢ (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).LeftMoves ≃
    (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).LeftMoves

case refine_2
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
⊢ (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).RightMoves ≃
    (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).RightMoves

case refine_3
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 : (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).LeftMoves),
    ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveLeft i⟧ =
      ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveLeft (?refine_1 i)⟧

case refine_4
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
⊢ ∀ (j : (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).RightMoves),
    ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveRight j⟧ =
      ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveRight (?refine_2 j)⟧

tactic: fconstructor
state_before: case refine_1
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
⊢ (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).LeftMoves ≃
    (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).LeftMoves
state_after: case refine_1.toFun
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
⊢ (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).LeftMoves →
    (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).LeftMoves

case refine_1.invFun
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
⊢ (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).LeftMoves →
    (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).LeftMoves

case refine_1.left_inv
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
⊢ LeftInverse ?refine_1.invFun ?refine_1.toFun

case refine_1.right_inv
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
⊢ Function.RightInverse ?refine_1.invFun ?refine_1.toFun

tactic: rintro (⟨⟨_, _⟩ | ⟨_, _⟩, _⟩ | ⟨⟨_, _⟩ | ⟨_, _⟩, _⟩) <;>
  solve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]
state_before: case refine_1.toFun
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
⊢ (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).LeftMoves →
    (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).LeftMoves
state_after: no goals

tactic: rintro (⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩) <;>
  solve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]
state_before: case refine_1.invFun
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
⊢ (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).LeftMoves →
    (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).LeftMoves
state_after: no goals

tactic: rintro (⟨⟨_, _⟩ | ⟨_, _⟩, _⟩ | ⟨⟨_, _⟩ | ⟨_, _⟩, _⟩) <;> rfl
state_before: case refine_1.left_inv
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
⊢ LeftInverse
    (fun a =>
      Sum.casesOn a
        (fun val =>
          Prod.casesOn val fun fst snd =>
            Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
              fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
        fun val =>
        Prod.casesOn val fun fst snd =>
          Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd)) fun val =>
            Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))
    fun a =>
    Sum.casesOn a
      (fun val =>
        Prod.casesOn val fun fst snd =>
          Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd))) fun val =>
            Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
      fun val =>
      Prod.casesOn val fun fst snd =>
        Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd))) fun val =>
          Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd))
state_after: no goals

tactic: rintro (⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩) <;> rfl
state_before: case refine_1.right_inv
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
⊢ Function.RightInverse
    (fun a =>
      Sum.casesOn a
        (fun val =>
          Prod.casesOn val fun fst snd =>
            Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
              fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
        fun val =>
        Prod.casesOn val fun fst snd =>
          Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd)) fun val =>
            Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))
    fun a =>
    Sum.casesOn a
      (fun val =>
        Prod.casesOn val fun fst snd =>
          Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd))) fun val =>
            Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
      fun val =>
      Prod.casesOn val fun fst snd =>
        Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd))) fun val =>
          Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd))
state_after: no goals

tactic: fconstructor
state_before: case refine_2
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
⊢ (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).RightMoves ≃
    (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).RightMoves
state_after: case refine_2.toFun
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
⊢ (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).RightMoves →
    (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).RightMoves

case refine_2.invFun
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
⊢ (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).RightMoves →
    (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).RightMoves

case refine_2.left_inv
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
⊢ LeftInverse ?refine_2.invFun ?refine_2.toFun

case refine_2.right_inv
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
⊢ Function.RightInverse ?refine_2.invFun ?refine_2.toFun

tactic: rintro (⟨⟨_, _⟩ | ⟨_, _⟩, _⟩ | ⟨⟨_, _⟩ | ⟨_, _⟩, _⟩) <;>
  solve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]
state_before: case refine_2.toFun
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
⊢ (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).RightMoves →
    (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).RightMoves
state_after: no goals

tactic: rintro (⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩) <;>
  solve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]
state_before: case refine_2.invFun
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
⊢ (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).RightMoves →
    (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).RightMoves
state_after: no goals

tactic: rintro (⟨⟨_, _⟩ | ⟨_, _⟩, _⟩ | ⟨⟨_, _⟩ | ⟨_, _⟩, _⟩) <;> rfl
state_before: case refine_2.left_inv
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
⊢ LeftInverse
    (fun a =>
      Sum.casesOn a
        (fun val =>
          Prod.casesOn val fun fst snd =>
            Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
              fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
        fun val =>
        Prod.casesOn val fun fst snd =>
          Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd)) fun val =>
            Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))
    fun a =>
    Sum.casesOn a
      (fun val =>
        Prod.casesOn val fun fst snd =>
          Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd))) fun val =>
            Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
      fun val =>
      Prod.casesOn val fun fst snd =>
        Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd))) fun val =>
          Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd))
state_after: no goals

tactic: rintro (⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩) <;> rfl
state_before: case refine_2.right_inv
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
⊢ Function.RightInverse
    (fun a =>
      Sum.casesOn a
        (fun val =>
          Prod.casesOn val fun fst snd =>
            Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
              fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
        fun val =>
        Prod.casesOn val fun fst snd =>
          Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd)) fun val =>
            Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))
    fun a =>
    Sum.casesOn a
      (fun val =>
        Prod.casesOn val fun fst snd =>
          Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd))) fun val =>
            Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
      fun val =>
      Prod.casesOn val fun fst snd =>
        Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd))) fun val =>
          Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd))
state_after: no goals

tactic: rintro (⟨⟨i, j⟩ | ⟨i, j⟩, k⟩ | ⟨⟨i, j⟩ | ⟨i, j⟩, k⟩)
state_before: case refine_3
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 : (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).LeftMoves),
    ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveLeft i⟧ =
      ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveLeft
          ({
              toFun := fun a =>
                Sum.casesOn a
                  (fun val =>
                    Prod.casesOn val fun fst snd =>
                      Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                        fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                  fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
              invFun := fun a =>
                Sum.casesOn a
                  (fun val =>
                    Prod.casesOn val fun fst snd =>
                      Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                        fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                  fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
              left_inv := ⋯, right_inv := ⋯ }
            i)⟧
state_after: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveLeft (Sum.inl (Sum.inl (i, j), k))⟧ =
    ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveLeft
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                    fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                    fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inl (Sum.inl (i, j), k)))⟧

case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveLeft (Sum.inl (Sum.inr (i, j), k))⟧ =
    ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveLeft
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                    fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                    fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inl (Sum.inr (i, j), k)))⟧

case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveLeft (Sum.inr (Sum.inl (i, j), k))⟧ =
    ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveLeft
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                    fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                    fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inr (Sum.inl (i, j), k)))⟧

case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveLeft (Sum.inr (Sum.inr (i, j), k))⟧ =
    ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveLeft
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                    fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                    fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inr (Sum.inr (i, j), k)))⟧

tactic: change
  ⟦(xL i * y + x * yL j - xL i * yL j) * z + x * y * zL k -
        (xL i * y + x * yL j - xL i * yL j) * zL k⟧ =
    ⟦xL i * (y * z) + x * (yL j * z + y * zL k - yL j * zL k) -
        xL i * (yL j * z + y * zL k - yL j * zL k)⟧
state_before: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveLeft (Sum.inl (Sum.inl (i, j), k))⟧ =
    ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveLeft
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                    fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                    fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inl (Sum.inl (i, j), k)))⟧
state_after: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦(xL i * y + x * yL j - xL i * yL j) * z + x * y * zL k - (xL i * y + x * yL j - xL i * yL j) * zL k⟧ =
    ⟦xL i * (y * z) + x * (yL j * z + y * zL k - yL j * zL k) - xL i * (yL j * z + y * zL k - yL j * zL k)⟧

tactic: simp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib,
           quot_left_distrib_sub, quot_left_distrib]
state_before: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦(xL i * y + x * yL j - xL i * yL j) * z + x * y * zL k - (xL i * y + x * yL j - xL i * yL j) * zL k⟧ =
    ⟦xL i * (y * z) + x * (yL j * z + y * zL k - yL j * zL k) - xL i * (yL j * z + y * zL k - yL j * zL k)⟧
state_after: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦xL i * y * z⟧ + ⟦x * yL j * z⟧ - ⟦xL i * yL j * z⟧ + ⟦x * y * zL k⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xL i * yL j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)

tactic: rw [quot_mul_assoc (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]
state_before: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦xL i * y * z⟧ + ⟦x * yL j * z⟧ - ⟦xL i * yL j * z⟧ + ⟦x * y * zL k⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xL i * yL j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)
state_after: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦x * yL j * z⟧ - ⟦xL i * yL j * z⟧ + ⟦x * y * zL k⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xL i * yL j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]
state_before: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦x * yL j * z⟧ - ⟦xL i * yL j * z⟧ + ⟦x * y * zL k⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xL i * yL j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)
state_after: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ - ⟦xL i * yL j * z⟧ +
        ⟦x * y * zL k⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xL i * yL j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)

tactic: rw [quot_mul_assoc (xL i) (yL j) (mk zl zr zL zR)]
state_before: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ - ⟦xL i * yL j * z⟧ +
        ⟦x * y * zL k⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xL i * yL j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)
state_after: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦x * y * zL k⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xL i * yL j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]
state_before: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦x * y * zL k⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xL i * yL j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)
state_after: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xL i * yL j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)

tactic: rw [quot_mul_assoc (xL i) (mk yl yr yL yR) (zL k)]
state_before: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xL i * yL j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)
state_after: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zL k)⟧ + ⟦x * yL j * zL k⟧ - ⟦xL i * yL j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (yL j) (zL k)]
state_before: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zL k)⟧ + ⟦x * yL j * zL k⟧ - ⟦xL i * yL j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)
state_after: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zL k)⟧ + ⟦mk xl xr xL xR * (yL j * zL k)⟧ - ⟦xL i * yL j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)

tactic: rw [quot_mul_assoc (xL i) (yL j) (zL k)]
state_before: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zL k)⟧ + ⟦mk xl xr xL xR * (yL j * zL k)⟧ - ⟦xL i * yL j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)
state_after: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zL k)⟧ + ⟦mk xl xr xL xR * (yL j * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)

tactic: abel
state_before: case refine_3.inl.mk.inl.mk
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
k : zl
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zL k)⟧ + ⟦mk xl xr xL xR * (yL j * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)
state_after: no goals

tactic: change
  ⟦(xR i * y + x * yR j - xR i * yR j) * z + x * y * zL k -
        (xR i * y + x * yR j - xR i * yR j) * zL k⟧ =
    ⟦xR i * (y * z) + x * (yR j * z + y * zL k - yR j * zL k) -
        xR i * (yR j * z + y * zL k - yR j * zL k)⟧
state_before: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveLeft (Sum.inl (Sum.inr (i, j), k))⟧ =
    ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveLeft
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                    fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                    fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inl (Sum.inr (i, j), k)))⟧
state_after: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦(xR i * y + x * yR j - xR i * yR j) * z + x * y * zL k - (xR i * y + x * yR j - xR i * yR j) * zL k⟧ =
    ⟦xR i * (y * z) + x * (yR j * z + y * zL k - yR j * zL k) - xR i * (yR j * z + y * zL k - yR j * zL k)⟧

tactic: simp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib,
           quot_left_distrib_sub, quot_left_distrib]
state_before: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦(xR i * y + x * yR j - xR i * yR j) * z + x * y * zL k - (xR i * y + x * yR j - xR i * yR j) * zL k⟧ =
    ⟦xR i * (y * z) + x * (yR j * z + y * zL k - yR j * zL k) - xR i * (yR j * z + y * zL k - yR j * zL k)⟧
state_after: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦xR i * y * z⟧ + ⟦x * yR j * z⟧ - ⟦xR i * yR j * z⟧ + ⟦x * y * zL k⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xR i * yR j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧)

tactic: rw [quot_mul_assoc (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]
state_before: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦xR i * y * z⟧ + ⟦x * yR j * z⟧ - ⟦xR i * yR j * z⟧ + ⟦x * y * zL k⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xR i * yR j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧)
state_after: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦x * yR j * z⟧ - ⟦xR i * yR j * z⟧ + ⟦x * y * zL k⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xR i * yR j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (yR j) (mk zl zr zL zR)]
state_before: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦x * yR j * z⟧ - ⟦xR i * yR j * z⟧ + ⟦x * y * zL k⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xR i * yR j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧)
state_after: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ - ⟦xR i * yR j * z⟧ +
        ⟦x * y * zL k⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xR i * yR j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧)

tactic: rw [quot_mul_assoc (xR i) (yR j) (mk zl zr zL zR)]
state_before: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ - ⟦xR i * yR j * z⟧ +
        ⟦x * y * zL k⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xR i * yR j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧)
state_after: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦x * y * zL k⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xR i * yR j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]
state_before: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦x * y * zL k⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xR i * yR j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧)
state_after: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xR i * yR j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧)

tactic: rw [quot_mul_assoc (xR i) (mk yl yr yL yR) (zL k)]
state_before: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xR i * yR j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧)
state_after: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zL k)⟧ + ⟦x * yR j * zL k⟧ - ⟦xR i * yR j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (yR j) (zL k)]
state_before: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zL k)⟧ + ⟦x * yR j * zL k⟧ - ⟦xR i * yR j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧)
state_after: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zL k)⟧ + ⟦mk xl xr xL xR * (yR j * zL k)⟧ - ⟦xR i * yR j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧)

tactic: rw [quot_mul_assoc (xR i) (yR j) (zL k)]
state_before: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zL k)⟧ + ⟦mk xl xr xL xR * (yR j * zL k)⟧ - ⟦xR i * yR j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧)
state_after: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zL k)⟧ + ⟦mk xl xr xL xR * (yR j * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧)

tactic: abel
state_before: case refine_3.inl.mk.inr.mk
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
k : zl
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zL k)⟧ + ⟦mk xl xr xL xR * (yR j * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yR j * zL k)⟧)
state_after: no goals

tactic: change
  ⟦(xL i * y + x * yR j - xL i * yR j) * z + x * y * zR k -
        (xL i * y + x * yR j - xL i * yR j) * zR k⟧ =
    ⟦xL i * (y * z) + x * (yR j * z + y * zR k - yR j * zR k) -
        xL i * (yR j * z + y * zR k - yR j * zR k)⟧
state_before: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveLeft (Sum.inr (Sum.inl (i, j), k))⟧ =
    ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveLeft
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                    fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                    fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inr (Sum.inl (i, j), k)))⟧
state_after: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦(xL i * y + x * yR j - xL i * yR j) * z + x * y * zR k - (xL i * y + x * yR j - xL i * yR j) * zR k⟧ =
    ⟦xL i * (y * z) + x * (yR j * z + y * zR k - yR j * zR k) - xL i * (yR j * z + y * zR k - yR j * zR k)⟧

tactic: simp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib,
           quot_left_distrib_sub, quot_left_distrib]
state_before: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦(xL i * y + x * yR j - xL i * yR j) * z + x * y * zR k - (xL i * y + x * yR j - xL i * yR j) * zR k⟧ =
    ⟦xL i * (y * z) + x * (yR j * z + y * zR k - yR j * zR k) - xL i * (yR j * z + y * zR k - yR j * zR k)⟧
state_after: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦xL i * y * z⟧ + ⟦x * yR j * z⟧ - ⟦xL i * yR j * z⟧ + ⟦x * y * zR k⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xL i * yR j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧)

tactic: rw [quot_mul_assoc (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]
state_before: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦xL i * y * z⟧ + ⟦x * yR j * z⟧ - ⟦xL i * yR j * z⟧ + ⟦x * y * zR k⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xL i * yR j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧)
state_after: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦x * yR j * z⟧ - ⟦xL i * yR j * z⟧ + ⟦x * y * zR k⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xL i * yR j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (yR j) (mk zl zr zL zR)]
state_before: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦x * yR j * z⟧ - ⟦xL i * yR j * z⟧ + ⟦x * y * zR k⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xL i * yR j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧)
state_after: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ - ⟦xL i * yR j * z⟧ +
        ⟦x * y * zR k⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xL i * yR j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧)

tactic: rw [quot_mul_assoc (xL i) (yR j) (mk zl zr zL zR)]
state_before: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ - ⟦xL i * yR j * z⟧ +
        ⟦x * y * zR k⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xL i * yR j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧)
state_after: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦x * y * zR k⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xL i * yR j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zR k)]
state_before: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦x * y * zR k⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xL i * yR j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧)
state_after: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xL i * yR j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧)

tactic: rw [quot_mul_assoc (xL i) (mk yl yr yL yR) (zR k)]
state_before: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xL i * yR j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧)
state_after: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zR k)⟧ + ⟦x * yR j * zR k⟧ - ⟦xL i * yR j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (yR j) (zR k)]
state_before: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zR k)⟧ + ⟦x * yR j * zR k⟧ - ⟦xL i * yR j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧)
state_after: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zR k)⟧ + ⟦mk xl xr xL xR * (yR j * zR k)⟧ - ⟦xL i * yR j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧)

tactic: rw [quot_mul_assoc (xL i) (yR j) (zR k)]
state_before: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zR k)⟧ + ⟦mk xl xr xL xR * (yR j * zR k)⟧ - ⟦xL i * yR j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧)
state_after: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zR k)⟧ + ⟦mk xl xr xL xR * (yR j * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧)

tactic: abel
state_before: case refine_3.inr.mk.inl.mk
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
k : zr
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zR k)⟧ + ⟦mk xl xr xL xR * (yR j * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yR j * zR k)⟧)
state_after: no goals

tactic: change
  ⟦(xR i * y + x * yL j - xR i * yL j) * z + x * y * zR k -
        (xR i * y + x * yL j - xR i * yL j) * zR k⟧ =
    ⟦xR i * (y * z) + x * (yL j * z + y * zR k - yL j * zR k) -
        xR i * (yL j * z + y * zR k - yL j * zR k)⟧
state_before: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveLeft (Sum.inr (Sum.inr (i, j), k))⟧ =
    ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveLeft
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                    fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                    fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inr (Sum.inr (i, j), k)))⟧
state_after: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦(xR i * y + x * yL j - xR i * yL j) * z + x * y * zR k - (xR i * y + x * yL j - xR i * yL j) * zR k⟧ =
    ⟦xR i * (y * z) + x * (yL j * z + y * zR k - yL j * zR k) - xR i * (yL j * z + y * zR k - yL j * zR k)⟧

tactic: simp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib,
           quot_left_distrib_sub, quot_left_distrib]
state_before: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦(xR i * y + x * yL j - xR i * yL j) * z + x * y * zR k - (xR i * y + x * yL j - xR i * yL j) * zR k⟧ =
    ⟦xR i * (y * z) + x * (yL j * z + y * zR k - yL j * zR k) - xR i * (yL j * z + y * zR k - yL j * zR k)⟧
state_after: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦xR i * y * z⟧ + ⟦x * yL j * z⟧ - ⟦xR i * yL j * z⟧ + ⟦x * y * zR k⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xR i * yL j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧)

tactic: rw [quot_mul_assoc (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]
state_before: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦xR i * y * z⟧ + ⟦x * yL j * z⟧ - ⟦xR i * yL j * z⟧ + ⟦x * y * zR k⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xR i * yL j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧)
state_after: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦x * yL j * z⟧ - ⟦xR i * yL j * z⟧ + ⟦x * y * zR k⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xR i * yL j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]
state_before: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦x * yL j * z⟧ - ⟦xR i * yL j * z⟧ + ⟦x * y * zR k⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xR i * yL j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧)
state_after: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ - ⟦xR i * yL j * z⟧ +
        ⟦x * y * zR k⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xR i * yL j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧)

tactic: rw [quot_mul_assoc (xR i) (yL j) (mk zl zr zL zR)]
state_before: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ - ⟦xR i * yL j * z⟧ +
        ⟦x * y * zR k⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xR i * yL j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧)
state_after: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦x * y * zR k⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xR i * yL j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zR k)]
state_before: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦x * y * zR k⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xR i * yL j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧)
state_after: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xR i * yL j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧)

tactic: rw [quot_mul_assoc (xR i) (mk yl yr yL yR) (zR k)]
state_before: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xR i * yL j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧)
state_after: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zR k)⟧ + ⟦x * yL j * zR k⟧ - ⟦xR i * yL j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (yL j) (zR k)]
state_before: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zR k)⟧ + ⟦x * yL j * zR k⟧ - ⟦xR i * yL j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧)
state_after: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zR k)⟧ + ⟦mk xl xr xL xR * (yL j * zR k)⟧ - ⟦xR i * yL j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧)

tactic: rw [quot_mul_assoc (xR i) (yL j) (zR k)]
state_before: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zR k)⟧ + ⟦mk xl xr xL xR * (yL j * zR k)⟧ - ⟦xR i * yL j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧)
state_after: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zR k)⟧ + ⟦mk xl xr xL xR * (yL j * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧)

tactic: abel
state_before: case refine_3.inr.mk.inr.mk
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
k : zr
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zR k)⟧ + ⟦mk xl xr xL xR * (yL j * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yL j * zR k)⟧)
state_after: no goals

tactic: rintro (⟨⟨i, j⟩ | ⟨i, j⟩, k⟩ | ⟨⟨i, j⟩ | ⟨i, j⟩, k⟩)
state_before: case refine_4
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
⊢ ∀ (j : (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).RightMoves),
    ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveRight j⟧ =
      ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveRight
          ({
              toFun := fun a =>
                Sum.casesOn a
                  (fun val =>
                    Prod.casesOn val fun fst snd =>
                      Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                        fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                  fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
              invFun := fun a =>
                Sum.casesOn a
                  (fun val =>
                    Prod.casesOn val fun fst snd =>
                      Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                        fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                  fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
              left_inv := ⋯, right_inv := ⋯ }
            j)⟧
state_after: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveRight (Sum.inl (Sum.inl (i, j), k))⟧ =
    ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveRight
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                    fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                    fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inl (Sum.inl (i, j), k)))⟧

case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveRight (Sum.inl (Sum.inr (i, j), k))⟧ =
    ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveRight
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                    fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                    fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inl (Sum.inr (i, j), k)))⟧

case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveRight (Sum.inr (Sum.inl (i, j), k))⟧ =
    ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveRight
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                    fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                    fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inr (Sum.inl (i, j), k)))⟧

case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveRight (Sum.inr (Sum.inr (i, j), k))⟧ =
    ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveRight
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                    fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                    fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inr (Sum.inr (i, j), k)))⟧

tactic: change
  ⟦(xL i * y + x * yL j - xL i * yL j) * z + x * y * zR k -
        (xL i * y + x * yL j - xL i * yL j) * zR k⟧ =
    ⟦xL i * (y * z) + x * (yL j * z + y * zR k - yL j * zR k) -
        xL i * (yL j * z + y * zR k - yL j * zR k)⟧
state_before: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveRight (Sum.inl (Sum.inl (i, j), k))⟧ =
    ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveRight
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                    fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                    fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inl (Sum.inl (i, j), k)))⟧
state_after: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦(xL i * y + x * yL j - xL i * yL j) * z + x * y * zR k - (xL i * y + x * yL j - xL i * yL j) * zR k⟧ =
    ⟦xL i * (y * z) + x * (yL j * z + y * zR k - yL j * zR k) - xL i * (yL j * z + y * zR k - yL j * zR k)⟧

tactic: simp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib,
           quot_left_distrib_sub, quot_left_distrib]
state_before: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦(xL i * y + x * yL j - xL i * yL j) * z + x * y * zR k - (xL i * y + x * yL j - xL i * yL j) * zR k⟧ =
    ⟦xL i * (y * z) + x * (yL j * z + y * zR k - yL j * zR k) - xL i * (yL j * z + y * zR k - yL j * zR k)⟧
state_after: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦xL i * y * z⟧ + ⟦x * yL j * z⟧ - ⟦xL i * yL j * z⟧ + ⟦x * y * zR k⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xL i * yL j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧)

tactic: rw [quot_mul_assoc (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]
state_before: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦xL i * y * z⟧ + ⟦x * yL j * z⟧ - ⟦xL i * yL j * z⟧ + ⟦x * y * zR k⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xL i * yL j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧)
state_after: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦x * yL j * z⟧ - ⟦xL i * yL j * z⟧ + ⟦x * y * zR k⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xL i * yL j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]
state_before: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦x * yL j * z⟧ - ⟦xL i * yL j * z⟧ + ⟦x * y * zR k⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xL i * yL j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧)
state_after: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ - ⟦xL i * yL j * z⟧ +
        ⟦x * y * zR k⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xL i * yL j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧)

tactic: rw [quot_mul_assoc (xL i) (yL j) (mk zl zr zL zR)]
state_before: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ - ⟦xL i * yL j * z⟧ +
        ⟦x * y * zR k⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xL i * yL j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧)
state_after: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦x * y * zR k⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xL i * yL j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zR k)]
state_before: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦x * y * zR k⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xL i * yL j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧)
state_after: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xL i * yL j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧)

tactic: rw [quot_mul_assoc (xL i) (mk yl yr yL yR) (zR k)]
state_before: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xL i * y * zR k⟧ + ⟦x * yL j * zR k⟧ - ⟦xL i * yL j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧)
state_after: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zR k)⟧ + ⟦x * yL j * zR k⟧ - ⟦xL i * yL j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (yL j) (zR k)]
state_before: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zR k)⟧ + ⟦x * yL j * zR k⟧ - ⟦xL i * yL j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧)
state_after: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zR k)⟧ + ⟦mk xl xr xL xR * (yL j * zR k)⟧ - ⟦xL i * yL j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧)

tactic: rw [quot_mul_assoc (xL i) (yL j) (zR k)]
state_before: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zR k)⟧ + ⟦mk xl xr xL xR * (yL j * zR k)⟧ - ⟦xL i * yL j * zR k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧)
state_after: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zR k)⟧ + ⟦mk xl xr xL xR * (yL j * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧)

tactic: abel
state_before: case refine_4.inl.mk.inl.mk
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
k : zr
i : xl
j : yl
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zR k)⟧ + ⟦mk xl xr xL xR * (yL j * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yL j * zR k)⟧) -
      (⟦xL i * (yL j * z)⟧ + ⟦xL i * (y * zR k)⟧ - ⟦xL i * (yL j * zR k)⟧)
state_after: no goals

tactic: change
  ⟦(xR i * y + x * yR j - xR i * yR j) * z + x * y * zR k -
        (xR i * y + x * yR j - xR i * yR j) * zR k⟧ =
    ⟦xR i * (y * z) + x * (yR j * z + y * zR k - yR j * zR k) -
        xR i * (yR j * z + y * zR k - yR j * zR k)⟧
state_before: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveRight (Sum.inl (Sum.inr (i, j), k))⟧ =
    ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveRight
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                    fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                    fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inl (Sum.inr (i, j), k)))⟧
state_after: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦(xR i * y + x * yR j - xR i * yR j) * z + x * y * zR k - (xR i * y + x * yR j - xR i * yR j) * zR k⟧ =
    ⟦xR i * (y * z) + x * (yR j * z + y * zR k - yR j * zR k) - xR i * (yR j * z + y * zR k - yR j * zR k)⟧

tactic: simp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib,
           quot_left_distrib_sub, quot_left_distrib]
state_before: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦(xR i * y + x * yR j - xR i * yR j) * z + x * y * zR k - (xR i * y + x * yR j - xR i * yR j) * zR k⟧ =
    ⟦xR i * (y * z) + x * (yR j * z + y * zR k - yR j * zR k) - xR i * (yR j * z + y * zR k - yR j * zR k)⟧
state_after: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦xR i * y * z⟧ + ⟦x * yR j * z⟧ - ⟦xR i * yR j * z⟧ + ⟦x * y * zR k⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xR i * yR j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧)

tactic: rw [quot_mul_assoc (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]
state_before: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦xR i * y * z⟧ + ⟦x * yR j * z⟧ - ⟦xR i * yR j * z⟧ + ⟦x * y * zR k⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xR i * yR j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧)
state_after: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦x * yR j * z⟧ - ⟦xR i * yR j * z⟧ + ⟦x * y * zR k⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xR i * yR j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (yR j) (mk zl zr zL zR)]
state_before: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦x * yR j * z⟧ - ⟦xR i * yR j * z⟧ + ⟦x * y * zR k⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xR i * yR j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧)
state_after: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ - ⟦xR i * yR j * z⟧ +
        ⟦x * y * zR k⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xR i * yR j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧)

tactic: rw [quot_mul_assoc (xR i) (yR j) (mk zl zr zL zR)]
state_before: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ - ⟦xR i * yR j * z⟧ +
        ⟦x * y * zR k⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xR i * yR j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧)
state_after: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦x * y * zR k⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xR i * yR j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zR k)]
state_before: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦x * y * zR k⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xR i * yR j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧)
state_after: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xR i * yR j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧)

tactic: rw [quot_mul_assoc (xR i) (mk yl yr yL yR) (zR k)]
state_before: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xR i * y * zR k⟧ + ⟦x * yR j * zR k⟧ - ⟦xR i * yR j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧)
state_after: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zR k)⟧ + ⟦x * yR j * zR k⟧ - ⟦xR i * yR j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (yR j) (zR k)]
state_before: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zR k)⟧ + ⟦x * yR j * zR k⟧ - ⟦xR i * yR j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧)
state_after: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zR k)⟧ + ⟦mk xl xr xL xR * (yR j * zR k)⟧ - ⟦xR i * yR j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧)

tactic: rw [quot_mul_assoc (xR i) (yR j) (zR k)]
state_before: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zR k)⟧ + ⟦mk xl xr xL xR * (yR j * zR k)⟧ - ⟦xR i * yR j * zR k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧)
state_after: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zR k)⟧ + ⟦mk xl xr xL xR * (yR j * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧)

tactic: abel
state_before: case refine_4.inl.mk.inr.mk
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
k : zr
i : xr
j : yr
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zR k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zR k)⟧ + ⟦mk xl xr xL xR * (yR j * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zR k)⟧ - ⟦x * (yR j * zR k)⟧) -
      (⟦xR i * (yR j * z)⟧ + ⟦xR i * (y * zR k)⟧ - ⟦xR i * (yR j * zR k)⟧)
state_after: no goals

tactic: change
  ⟦(xL i * y + x * yR j - xL i * yR j) * z + x * y * zL k -
        (xL i * y + x * yR j - xL i * yR j) * zL k⟧ =
    ⟦xL i * (y * z) + x * (yR j * z + y * zL k - yR j * zL k) -
        xL i * (yR j * z + y * zL k - yR j * zL k)⟧
state_before: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveRight (Sum.inr (Sum.inl (i, j), k))⟧ =
    ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveRight
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                    fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                    fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inr (Sum.inl (i, j), k)))⟧
state_after: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦(xL i * y + x * yR j - xL i * yR j) * z + x * y * zL k - (xL i * y + x * yR j - xL i * yR j) * zL k⟧ =
    ⟦xL i * (y * z) + x * (yR j * z + y * zL k - yR j * zL k) - xL i * (yR j * z + y * zL k - yR j * zL k)⟧

tactic: simp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib,
           quot_left_distrib_sub, quot_left_distrib]
state_before: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦(xL i * y + x * yR j - xL i * yR j) * z + x * y * zL k - (xL i * y + x * yR j - xL i * yR j) * zL k⟧ =
    ⟦xL i * (y * z) + x * (yR j * z + y * zL k - yR j * zL k) - xL i * (yR j * z + y * zL k - yR j * zL k)⟧
state_after: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦xL i * y * z⟧ + ⟦x * yR j * z⟧ - ⟦xL i * yR j * z⟧ + ⟦x * y * zL k⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xL i * yR j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧)

tactic: rw [quot_mul_assoc (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]
state_before: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦xL i * y * z⟧ + ⟦x * yR j * z⟧ - ⟦xL i * yR j * z⟧ + ⟦x * y * zL k⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xL i * yR j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧)
state_after: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦x * yR j * z⟧ - ⟦xL i * yR j * z⟧ + ⟦x * y * zL k⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xL i * yR j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (yR j) (mk zl zr zL zR)]
state_before: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦x * yR j * z⟧ - ⟦xL i * yR j * z⟧ + ⟦x * y * zL k⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xL i * yR j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧)
state_after: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ - ⟦xL i * yR j * z⟧ +
        ⟦x * y * zL k⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xL i * yR j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧)

tactic: rw [quot_mul_assoc (xL i) (yR j) (mk zl zr zL zR)]
state_before: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ - ⟦xL i * yR j * z⟧ +
        ⟦x * y * zL k⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xL i * yR j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧)
state_after: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦x * y * zL k⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xL i * yR j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]
state_before: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦x * y * zL k⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xL i * yR j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧)
state_after: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xL i * yR j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧)

tactic: rw [quot_mul_assoc (xL i) (mk yl yr yL yR) (zL k)]
state_before: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xL i * y * zL k⟧ + ⟦x * yR j * zL k⟧ - ⟦xL i * yR j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧)
state_after: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zL k)⟧ + ⟦x * yR j * zL k⟧ - ⟦xL i * yR j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (yR j) (zL k)]
state_before: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zL k)⟧ + ⟦x * yR j * zL k⟧ - ⟦xL i * yR j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧)
state_after: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zL k)⟧ + ⟦mk xl xr xL xR * (yR j * zL k)⟧ - ⟦xL i * yR j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧)

tactic: rw [quot_mul_assoc (xL i) (yR j) (zL k)]
state_before: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zL k)⟧ + ⟦mk xl xr xL xR * (yR j * zL k)⟧ - ⟦xL i * yR j * zL k⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧)
state_after: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zL k)⟧ + ⟦mk xl xr xL xR * (yR j * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧)

tactic: abel
state_before: case refine_4.inr.mk.inl.mk
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
k : zl
i : xl
j : yr
⊢ ⟦xL i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yR j * mk zl zr zL zR)⟧ -
          ⟦xL i * (yR j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xL i * (mk yl yr yL yR * zL k)⟧ + ⟦mk xl xr xL xR * (yR j * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧) =
    ⟦xL i * (y * z)⟧ + (⟦x * (yR j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yR j * zL k)⟧) -
      (⟦xL i * (yR j * z)⟧ + ⟦xL i * (y * zL k)⟧ - ⟦xL i * (yR j * zL k)⟧)
state_after: no goals

tactic: change
  ⟦(xR i * y + x * yL j - xR i * yL j) * z + x * y * zL k -
        (xR i * y + x * yL j - xR i * yL j) * zL k⟧ =
    ⟦xR i * (y * z) + x * (yL j * z + y * zL k - yL j * zL k) -
        xR i * (yL j * z + y * zL k - yL j * zL k)⟧
state_before: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦(mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR).moveRight (Sum.inr (Sum.inr (i, j), k))⟧ =
    ⟦(mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)).moveRight
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))
                      fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))
                    fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))
                      fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))
                    fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inr (Sum.inr (i, j), k)))⟧
state_after: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦(xR i * y + x * yL j - xR i * yL j) * z + x * y * zL k - (xR i * y + x * yL j - xR i * yL j) * zL k⟧ =
    ⟦xR i * (y * z) + x * (yL j * z + y * zL k - yL j * zL k) - xR i * (yL j * z + y * zL k - yL j * zL k)⟧

tactic: simp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib,
           quot_left_distrib_sub, quot_left_distrib]
state_before: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦(xR i * y + x * yL j - xR i * yL j) * z + x * y * zL k - (xR i * y + x * yL j - xR i * yL j) * zL k⟧ =
    ⟦xR i * (y * z) + x * (yL j * z + y * zL k - yL j * zL k) - xR i * (yL j * z + y * zL k - yL j * zL k)⟧
state_after: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦xR i * y * z⟧ + ⟦x * yL j * z⟧ - ⟦xR i * yL j * z⟧ + ⟦x * y * zL k⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xR i * yL j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧)

tactic: rw [quot_mul_assoc (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]
state_before: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦xR i * y * z⟧ + ⟦x * yL j * z⟧ - ⟦xR i * yL j * z⟧ + ⟦x * y * zL k⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xR i * yL j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧)
state_after: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦x * yL j * z⟧ - ⟦xR i * yL j * z⟧ + ⟦x * y * zL k⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xR i * yL j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]
state_before: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦x * yL j * z⟧ - ⟦xR i * yL j * z⟧ + ⟦x * y * zL k⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xR i * yL j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧)
state_after: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ - ⟦xR i * yL j * z⟧ +
        ⟦x * y * zL k⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xR i * yL j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧)

tactic: rw [quot_mul_assoc (xR i) (yL j) (mk zl zr zL zR)]
state_before: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ - ⟦xR i * yL j * z⟧ +
        ⟦x * y * zL k⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xR i * yL j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧)
state_after: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦x * y * zL k⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xR i * yL j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]
state_before: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦x * y * zL k⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xR i * yL j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧)
state_after: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xR i * yL j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧)

tactic: rw [quot_mul_assoc (xR i) (mk yl yr yL yR) (zL k)]
state_before: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xR i * y * zL k⟧ + ⟦x * yL j * zL k⟧ - ⟦xR i * yL j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧)
state_after: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zL k)⟧ + ⟦x * yL j * zL k⟧ - ⟦xR i * yL j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧)

tactic: rw [quot_mul_assoc (mk xl xr xL xR) (yL j) (zL k)]
state_before: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zL k)⟧ + ⟦x * yL j * zL k⟧ - ⟦xR i * yL j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧)
state_after: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zL k)⟧ + ⟦mk xl xr xL xR * (yL j * zL k)⟧ - ⟦xR i * yL j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧)

tactic: rw [quot_mul_assoc (xR i) (yL j) (zL k)]
state_before: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zL k)⟧ + ⟦mk xl xr xL xR * (yL j * zL k)⟧ - ⟦xR i * yL j * zL k⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧)
state_after: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zL k)⟧ + ⟦mk xl xr xL xR * (yL j * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧)

tactic: abel
state_before: case refine_4.inr.mk.inr.mk
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
k : zl
i : xr
j : yl
⊢ ⟦xR i * (mk yl yr yL yR * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ -
          ⟦xR i * (yL j * mk zl zr zL zR)⟧ +
        ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
      (⟦xR i * (mk yl yr yL yR * zL k)⟧ + ⟦mk xl xr xL xR * (yL j * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧) =
    ⟦xR i * (y * z)⟧ + (⟦x * (yL j * z)⟧ + ⟦x * (y * zL k)⟧ - ⟦x * (yL j * zL k)⟧) -
      (⟦xR i * (yL j * z)⟧ + ⟦xR i * (y * zL k)⟧ - ⟦xR i * (yL j * zL k)⟧)
state_after: no goals