Theorem: SetTheory.PGame.quot_left_distrib
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 xl xr xL xR * 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 xl xr xL xR * 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 xl xr xL xR * 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 xl xr xL xR * 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 xl xr xL xR * 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 xl xr xL xR * 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 xl xr xL xR * 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 xl xr xL xR * 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 xl xr xL xR * 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 xl xr xL xR * 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 xl xr xL xR * 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 xl xr xL xR * 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 xl xr xL xR * 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 xl xr xL xR * 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 := 6 }) [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 xl xr xL xR * mk zl zr zL zR).LeftMoves
state_after: no goals

tactic: rintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩) <;>
  solve_by_elim (config := { maxDepth := 6 }) [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 xl xr xL xR * 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 =>
          Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
            Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
        fun val =>
        Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
          Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))
    fun a =>
    Sum.casesOn a
      (fun val =>
        Prod.casesOn val fun fst snd =>
          Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
      fun val =>
      Prod.casesOn val fun fst snd =>
        Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val))
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 =>
          Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
            Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
        fun val =>
        Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
          Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))
    fun a =>
    Sum.casesOn a
      (fun val =>
        Prod.casesOn val fun fst snd =>
          Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
      fun val =>
      Prod.casesOn val fun fst snd =>
        Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val))
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 xl xr xL xR * 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 xl xr xL xR * 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 xl xr xL xR * 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 := 6 }) [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 xl xr xL xR * mk zl zr zL zR).RightMoves
state_after: no goals

tactic: rintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩) <;>
  solve_by_elim (config := { maxDepth := 6 }) [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 xl xr xL xR * 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 =>
          Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
            Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
        fun val =>
        Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
          Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))
    fun a =>
    Sum.casesOn a
      (fun val =>
        Prod.casesOn val fun fst snd =>
          Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
      fun val =>
      Prod.casesOn val fun fst snd =>
        Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val))
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 =>
          Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
            Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
        fun val =>
        Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
          Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))
    fun a =>
    Sum.casesOn a
      (fun val =>
        Prod.casesOn val fun fst snd =>
          Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
      fun val =>
      Prod.casesOn val fun fst snd =>
        Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val))
state_after: no goals

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

case refine_3.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zl
⊢ ⟦(mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)).moveLeft (Sum.inl (i, Sum.inr k))⟧ =
    ⟦(mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR).moveLeft
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
                    Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
                fun val =>
                Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
                  Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inl (i, Sum.inr k)))⟧

case refine_3.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yr
⊢ ⟦(mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)).moveLeft (Sum.inr (i, Sum.inl j))⟧ =
    ⟦(mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR).moveLeft
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
                    Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
                fun val =>
                Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
                  Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inr (i, Sum.inl j)))⟧

case refine_3.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zr
⊢ ⟦(mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)).moveLeft (Sum.inr (i, Sum.inr k))⟧ =
    ⟦(mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR).moveLeft
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
                    Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
                fun val =>
                Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
                  Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inr (i, Sum.inr k)))⟧

tactic: change
  ⟦xL i * (y + z) + x * (yL j + z) - xL i * (yL j + z)⟧ =
    ⟦xL i * y + x * yL j - xL i * yL j + x * z⟧
state_before: case refine_3.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yl
⊢ ⟦(mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)).moveLeft (Sum.inl (i, Sum.inl j))⟧ =
    ⟦(mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR).moveLeft
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
                    Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
                fun val =>
                Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
                  Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inl (i, Sum.inl j)))⟧
state_after: case refine_3.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yl
⊢ ⟦xL i * (y + z) + x * (yL j + z) - xL i * (yL j + z)⟧ = ⟦xL i * y + x * yL j - xL i * yL j + x * z⟧

tactic: simp only [quot_sub, quot_add]
state_before: case refine_3.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yl
⊢ ⟦xL i * (y + z) + x * (yL j + z) - xL i * (yL j + z)⟧ = ⟦xL i * y + x * yL j - xL i * yL j + x * z⟧
state_after: case refine_3.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yl
⊢ ⟦xL i * (y + z)⟧ + ⟦x * (yL j + z)⟧ - ⟦xL i * (yL j + z)⟧ = ⟦xL i * y⟧ + ⟦x * yL j⟧ - ⟦xL i * yL j⟧ + ⟦x * z⟧

tactic: rw [quot_left_distrib (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]
state_before: case refine_3.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yl
⊢ ⟦xL i * (y + z)⟧ + ⟦x * (yL j + z)⟧ - ⟦xL i * (yL j + z)⟧ = ⟦xL i * y⟧ + ⟦x * yL j⟧ - ⟦xL i * yL j⟧ + ⟦x * z⟧
state_after: case refine_3.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yl
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + ⟦x * (yL j + z)⟧ - ⟦xL i * (yL j + z)⟧ =
    ⟦xL i * y⟧ + ⟦x * yL j⟧ - ⟦xL i * yL j⟧ + ⟦x * z⟧

tactic: rw [quot_left_distrib (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]
state_before: case refine_3.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yl
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + ⟦x * (yL j + z)⟧ - ⟦xL i * (yL j + z)⟧ =
    ⟦xL i * y⟧ + ⟦x * yL j⟧ - ⟦xL i * yL j⟧ + ⟦x * z⟧
state_after: case refine_3.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yl
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * yL j⟧ + ⟦mk xl xr xL xR * mk zl zr zL zR⟧) -
      ⟦xL i * (yL j + z)⟧ =
    ⟦xL i * y⟧ + ⟦x * yL j⟧ - ⟦xL i * yL j⟧ + ⟦x * z⟧

tactic: rw [quot_left_distrib (xL i) (yL j) (mk zl zr zL zR)]
state_before: case refine_3.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yl
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * yL j⟧ + ⟦mk xl xr xL xR * mk zl zr zL zR⟧) -
      ⟦xL i * (yL j + z)⟧ =
    ⟦xL i * y⟧ + ⟦x * yL j⟧ - ⟦xL i * yL j⟧ + ⟦x * z⟧
state_after: case refine_3.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yl
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * yL j⟧ + ⟦mk xl xr xL xR * mk zl zr zL zR⟧) -
      (⟦xL i * yL j⟧ + ⟦xL i * mk zl zr zL zR⟧) =
    ⟦xL i * y⟧ + ⟦x * yL j⟧ - ⟦xL i * yL j⟧ + ⟦x * z⟧

tactic: abel
state_before: case refine_3.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yl
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * yL j⟧ + ⟦mk xl xr xL xR * mk zl zr zL zR⟧) -
      (⟦xL i * yL j⟧ + ⟦xL i * mk zl zr zL zR⟧) =
    ⟦xL i * y⟧ + ⟦x * yL j⟧ - ⟦xL i * yL j⟧ + ⟦x * z⟧
state_after: no goals

tactic: change
  ⟦xL i * (y + z) + x * (y + zL k) - xL i * (y + zL k)⟧ =
    ⟦x * y + (xL i * z + x * zL k - xL i * zL k)⟧
state_before: case refine_3.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zl
⊢ ⟦(mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)).moveLeft (Sum.inl (i, Sum.inr k))⟧ =
    ⟦(mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR).moveLeft
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
                    Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
                fun val =>
                Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
                  Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inl (i, Sum.inr k)))⟧
state_after: case refine_3.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zl
⊢ ⟦xL i * (y + z) + x * (y + zL k) - xL i * (y + zL k)⟧ = ⟦x * y + (xL i * z + x * zL k - xL i * zL k)⟧

tactic: simp only [quot_sub, quot_add]
state_before: case refine_3.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zl
⊢ ⟦xL i * (y + z) + x * (y + zL k) - xL i * (y + zL k)⟧ = ⟦x * y + (xL i * z + x * zL k - xL i * zL k)⟧
state_after: case refine_3.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zl
⊢ ⟦xL i * (y + z)⟧ + ⟦x * (y + zL k)⟧ - ⟦xL i * (y + zL k)⟧ = ⟦x * y⟧ + (⟦xL i * z⟧ + ⟦x * zL k⟧ - ⟦xL i * zL k⟧)

tactic: rw [quot_left_distrib (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]
state_before: case refine_3.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zl
⊢ ⟦xL i * (y + z)⟧ + ⟦x * (y + zL k)⟧ - ⟦xL i * (y + zL k)⟧ = ⟦x * y⟧ + (⟦xL i * z⟧ + ⟦x * zL k⟧ - ⟦xL i * zL k⟧)
state_after: case refine_3.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zl
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + ⟦x * (y + zL k)⟧ - ⟦xL i * (y + zL k)⟧ =
    ⟦x * y⟧ + (⟦xL i * z⟧ + ⟦x * zL k⟧ - ⟦xL i * zL k⟧)

tactic: rw [quot_left_distrib (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]
state_before: case refine_3.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zl
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + ⟦x * (y + zL k)⟧ - ⟦xL i * (y + zL k)⟧ =
    ⟦x * y⟧ + (⟦xL i * z⟧ + ⟦x * zL k⟧ - ⟦xL i * zL k⟧)
state_after: case refine_3.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zl
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zL k⟧) -
      ⟦xL i * (y + zL k)⟧ =
    ⟦x * y⟧ + (⟦xL i * z⟧ + ⟦x * zL k⟧ - ⟦xL i * zL k⟧)

tactic: rw [quot_left_distrib (xL i) (mk yl yr yL yR) (zL k)]
state_before: case refine_3.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zl
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zL k⟧) -
      ⟦xL i * (y + zL k)⟧ =
    ⟦x * y⟧ + (⟦xL i * z⟧ + ⟦x * zL k⟧ - ⟦xL i * zL k⟧)
state_after: case refine_3.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zl
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zL k⟧) -
      (⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * zL k⟧) =
    ⟦x * y⟧ + (⟦xL i * z⟧ + ⟦x * zL k⟧ - ⟦xL i * zL k⟧)

tactic: abel
state_before: case refine_3.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zl
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zL k⟧) -
      (⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * zL k⟧) =
    ⟦x * y⟧ + (⟦xL i * z⟧ + ⟦x * zL k⟧ - ⟦xL i * zL k⟧)
state_after: no goals

tactic: change
  ⟦xR i * (y + z) + x * (yR j + z) - xR i * (yR j + z)⟧ =
    ⟦xR i * y + x * yR j - xR i * yR j + x * z⟧
state_before: case refine_3.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yr
⊢ ⟦(mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)).moveLeft (Sum.inr (i, Sum.inl j))⟧ =
    ⟦(mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR).moveLeft
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
                    Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
                fun val =>
                Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
                  Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inr (i, Sum.inl j)))⟧
state_after: case refine_3.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yr
⊢ ⟦xR i * (y + z) + x * (yR j + z) - xR i * (yR j + z)⟧ = ⟦xR i * y + x * yR j - xR i * yR j + x * z⟧

tactic: simp only [quot_sub, quot_add]
state_before: case refine_3.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yr
⊢ ⟦xR i * (y + z) + x * (yR j + z) - xR i * (yR j + z)⟧ = ⟦xR i * y + x * yR j - xR i * yR j + x * z⟧
state_after: case refine_3.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yr
⊢ ⟦xR i * (y + z)⟧ + ⟦x * (yR j + z)⟧ - ⟦xR i * (yR j + z)⟧ = ⟦xR i * y⟧ + ⟦x * yR j⟧ - ⟦xR i * yR j⟧ + ⟦x * z⟧

tactic: rw [quot_left_distrib (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]
state_before: case refine_3.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yr
⊢ ⟦xR i * (y + z)⟧ + ⟦x * (yR j + z)⟧ - ⟦xR i * (yR j + z)⟧ = ⟦xR i * y⟧ + ⟦x * yR j⟧ - ⟦xR i * yR j⟧ + ⟦x * z⟧
state_after: case refine_3.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yr
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + ⟦x * (yR j + z)⟧ - ⟦xR i * (yR j + z)⟧ =
    ⟦xR i * y⟧ + ⟦x * yR j⟧ - ⟦xR i * yR j⟧ + ⟦x * z⟧

tactic: rw [quot_left_distrib (mk xl xr xL xR) (yR j) (mk zl zr zL zR)]
state_before: case refine_3.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yr
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + ⟦x * (yR j + z)⟧ - ⟦xR i * (yR j + z)⟧ =
    ⟦xR i * y⟧ + ⟦x * yR j⟧ - ⟦xR i * yR j⟧ + ⟦x * z⟧
state_after: case refine_3.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yr
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * yR j⟧ + ⟦mk xl xr xL xR * mk zl zr zL zR⟧) -
      ⟦xR i * (yR j + z)⟧ =
    ⟦xR i * y⟧ + ⟦x * yR j⟧ - ⟦xR i * yR j⟧ + ⟦x * z⟧

tactic: rw [quot_left_distrib (xR i) (yR j) (mk zl zr zL zR)]
state_before: case refine_3.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yr
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * yR j⟧ + ⟦mk xl xr xL xR * mk zl zr zL zR⟧) -
      ⟦xR i * (yR j + z)⟧ =
    ⟦xR i * y⟧ + ⟦x * yR j⟧ - ⟦xR i * yR j⟧ + ⟦x * z⟧
state_after: case refine_3.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yr
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * yR j⟧ + ⟦mk xl xr xL xR * mk zl zr zL zR⟧) -
      (⟦xR i * yR j⟧ + ⟦xR i * mk zl zr zL zR⟧) =
    ⟦xR i * y⟧ + ⟦x * yR j⟧ - ⟦xR i * yR j⟧ + ⟦x * z⟧

tactic: abel
state_before: case refine_3.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yr
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * yR j⟧ + ⟦mk xl xr xL xR * mk zl zr zL zR⟧) -
      (⟦xR i * yR j⟧ + ⟦xR i * mk zl zr zL zR⟧) =
    ⟦xR i * y⟧ + ⟦x * yR j⟧ - ⟦xR i * yR j⟧ + ⟦x * z⟧
state_after: no goals

tactic: change
  ⟦xR i * (y + z) + x * (y + zR k) - xR i * (y + zR k)⟧ =
    ⟦x * y + (xR i * z + x * zR k - xR i * zR k)⟧
state_before: case refine_3.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zr
⊢ ⟦(mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)).moveLeft (Sum.inr (i, Sum.inr k))⟧ =
    ⟦(mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR).moveLeft
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
                    Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
                fun val =>
                Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
                  Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inr (i, Sum.inr k)))⟧
state_after: case refine_3.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zr
⊢ ⟦xR i * (y + z) + x * (y + zR k) - xR i * (y + zR k)⟧ = ⟦x * y + (xR i * z + x * zR k - xR i * zR k)⟧

tactic: simp only [quot_sub, quot_add]
state_before: case refine_3.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zr
⊢ ⟦xR i * (y + z) + x * (y + zR k) - xR i * (y + zR k)⟧ = ⟦x * y + (xR i * z + x * zR k - xR i * zR k)⟧
state_after: case refine_3.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zr
⊢ ⟦xR i * (y + z)⟧ + ⟦x * (y + zR k)⟧ - ⟦xR i * (y + zR k)⟧ = ⟦x * y⟧ + (⟦xR i * z⟧ + ⟦x * zR k⟧ - ⟦xR i * zR k⟧)

tactic: rw [quot_left_distrib (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]
state_before: case refine_3.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zr
⊢ ⟦xR i * (y + z)⟧ + ⟦x * (y + zR k)⟧ - ⟦xR i * (y + zR k)⟧ = ⟦x * y⟧ + (⟦xR i * z⟧ + ⟦x * zR k⟧ - ⟦xR i * zR k⟧)
state_after: case refine_3.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zr
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + ⟦x * (y + zR k)⟧ - ⟦xR i * (y + zR k)⟧ =
    ⟦x * y⟧ + (⟦xR i * z⟧ + ⟦x * zR k⟧ - ⟦xR i * zR k⟧)

tactic: rw [quot_left_distrib (mk xl xr xL xR) (mk yl yr yL yR) (zR k)]
state_before: case refine_3.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zr
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + ⟦x * (y + zR k)⟧ - ⟦xR i * (y + zR k)⟧ =
    ⟦x * y⟧ + (⟦xR i * z⟧ + ⟦x * zR k⟧ - ⟦xR i * zR k⟧)
state_after: case refine_3.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zr
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zR k⟧) -
      ⟦xR i * (y + zR k)⟧ =
    ⟦x * y⟧ + (⟦xR i * z⟧ + ⟦x * zR k⟧ - ⟦xR i * zR k⟧)

tactic: rw [quot_left_distrib (xR i) (mk yl yr yL yR) (zR k)]
state_before: case refine_3.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zr
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zR k⟧) -
      ⟦xR i * (y + zR k)⟧ =
    ⟦x * y⟧ + (⟦xR i * z⟧ + ⟦x * zR k⟧ - ⟦xR i * zR k⟧)
state_after: case refine_3.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zr
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zR k⟧) -
      (⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * zR k⟧) =
    ⟦x * y⟧ + (⟦xR i * z⟧ + ⟦x * zR k⟧ - ⟦xR i * zR k⟧)

tactic: abel
state_before: case refine_3.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zr
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zR k⟧) -
      (⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * zR k⟧) =
    ⟦x * y⟧ + (⟦xR i * z⟧ + ⟦x * zR k⟧ - ⟦xR i * zR k⟧)
state_after: no goals

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

case refine_4.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zr
⊢ ⟦(mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)).moveRight (Sum.inl (i, Sum.inr k))⟧ =
    ⟦(mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR).moveRight
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
                    Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
                fun val =>
                Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
                  Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inl (i, Sum.inr k)))⟧

case refine_4.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yl
⊢ ⟦(mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)).moveRight (Sum.inr (i, Sum.inl j))⟧ =
    ⟦(mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR).moveRight
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
                    Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
                fun val =>
                Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
                  Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inr (i, Sum.inl j)))⟧

case refine_4.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zl
⊢ ⟦(mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)).moveRight (Sum.inr (i, Sum.inr k))⟧ =
    ⟦(mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR).moveRight
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
                    Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
                fun val =>
                Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
                  Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inr (i, Sum.inr k)))⟧

tactic: change
  ⟦xL i * (y + z) + x * (yR j + z) - xL i * (yR j + z)⟧ =
    ⟦xL i * y + x * yR j - xL i * yR j + x * z⟧
state_before: case refine_4.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yr
⊢ ⟦(mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)).moveRight (Sum.inl (i, Sum.inl j))⟧ =
    ⟦(mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR).moveRight
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
                    Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
                fun val =>
                Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
                  Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inl (i, Sum.inl j)))⟧
state_after: case refine_4.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yr
⊢ ⟦xL i * (y + z) + x * (yR j + z) - xL i * (yR j + z)⟧ = ⟦xL i * y + x * yR j - xL i * yR j + x * z⟧

tactic: simp only [quot_sub, quot_add]
state_before: case refine_4.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yr
⊢ ⟦xL i * (y + z) + x * (yR j + z) - xL i * (yR j + z)⟧ = ⟦xL i * y + x * yR j - xL i * yR j + x * z⟧
state_after: case refine_4.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yr
⊢ ⟦xL i * (y + z)⟧ + ⟦x * (yR j + z)⟧ - ⟦xL i * (yR j + z)⟧ = ⟦xL i * y⟧ + ⟦x * yR j⟧ - ⟦xL i * yR j⟧ + ⟦x * z⟧

tactic: rw [quot_left_distrib (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]
state_before: case refine_4.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yr
⊢ ⟦xL i * (y + z)⟧ + ⟦x * (yR j + z)⟧ - ⟦xL i * (yR j + z)⟧ = ⟦xL i * y⟧ + ⟦x * yR j⟧ - ⟦xL i * yR j⟧ + ⟦x * z⟧
state_after: case refine_4.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yr
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + ⟦x * (yR j + z)⟧ - ⟦xL i * (yR j + z)⟧ =
    ⟦xL i * y⟧ + ⟦x * yR j⟧ - ⟦xL i * yR j⟧ + ⟦x * z⟧

tactic: rw [quot_left_distrib (mk xl xr xL xR) (yR j) (mk zl zr zL zR)]
state_before: case refine_4.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yr
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + ⟦x * (yR j + z)⟧ - ⟦xL i * (yR j + z)⟧ =
    ⟦xL i * y⟧ + ⟦x * yR j⟧ - ⟦xL i * yR j⟧ + ⟦x * z⟧
state_after: case refine_4.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yr
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * yR j⟧ + ⟦mk xl xr xL xR * mk zl zr zL zR⟧) -
      ⟦xL i * (yR j + z)⟧ =
    ⟦xL i * y⟧ + ⟦x * yR j⟧ - ⟦xL i * yR j⟧ + ⟦x * z⟧

tactic: rw [quot_left_distrib (xL i) (yR j) (mk zl zr zL zR)]
state_before: case refine_4.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yr
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * yR j⟧ + ⟦mk xl xr xL xR * mk zl zr zL zR⟧) -
      ⟦xL i * (yR j + z)⟧ =
    ⟦xL i * y⟧ + ⟦x * yR j⟧ - ⟦xL i * yR j⟧ + ⟦x * z⟧
state_after: case refine_4.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yr
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * yR j⟧ + ⟦mk xl xr xL xR * mk zl zr zL zR⟧) -
      (⟦xL i * yR j⟧ + ⟦xL i * mk zl zr zL zR⟧) =
    ⟦xL i * y⟧ + ⟦x * yR j⟧ - ⟦xL i * yR j⟧ + ⟦x * z⟧

tactic: abel
state_before: case refine_4.inl.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
j : yr
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * yR j⟧ + ⟦mk xl xr xL xR * mk zl zr zL zR⟧) -
      (⟦xL i * yR j⟧ + ⟦xL i * mk zl zr zL zR⟧) =
    ⟦xL i * y⟧ + ⟦x * yR j⟧ - ⟦xL i * yR j⟧ + ⟦x * z⟧
state_after: no goals

tactic: change
  ⟦xL i * (y + z) + x * (y + zR k) - xL i * (y + zR k)⟧ =
    ⟦x * y + (xL i * z + x * zR k - xL i * zR k)⟧
state_before: case refine_4.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zr
⊢ ⟦(mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)).moveRight (Sum.inl (i, Sum.inr k))⟧ =
    ⟦(mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR).moveRight
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
                    Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
                fun val =>
                Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
                  Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inl (i, Sum.inr k)))⟧
state_after: case refine_4.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zr
⊢ ⟦xL i * (y + z) + x * (y + zR k) - xL i * (y + zR k)⟧ = ⟦x * y + (xL i * z + x * zR k - xL i * zR k)⟧

tactic: simp only [quot_sub, quot_add]
state_before: case refine_4.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zr
⊢ ⟦xL i * (y + z) + x * (y + zR k) - xL i * (y + zR k)⟧ = ⟦x * y + (xL i * z + x * zR k - xL i * zR k)⟧
state_after: case refine_4.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zr
⊢ ⟦xL i * (y + z)⟧ + ⟦x * (y + zR k)⟧ - ⟦xL i * (y + zR k)⟧ = ⟦x * y⟧ + (⟦xL i * z⟧ + ⟦x * zR k⟧ - ⟦xL i * zR k⟧)

tactic: rw [quot_left_distrib (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]
state_before: case refine_4.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zr
⊢ ⟦xL i * (y + z)⟧ + ⟦x * (y + zR k)⟧ - ⟦xL i * (y + zR k)⟧ = ⟦x * y⟧ + (⟦xL i * z⟧ + ⟦x * zR k⟧ - ⟦xL i * zR k⟧)
state_after: case refine_4.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zr
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + ⟦x * (y + zR k)⟧ - ⟦xL i * (y + zR k)⟧ =
    ⟦x * y⟧ + (⟦xL i * z⟧ + ⟦x * zR k⟧ - ⟦xL i * zR k⟧)

tactic: rw [quot_left_distrib (mk xl xr xL xR) (mk yl yr yL yR) (zR k)]
state_before: case refine_4.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zr
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + ⟦x * (y + zR k)⟧ - ⟦xL i * (y + zR k)⟧ =
    ⟦x * y⟧ + (⟦xL i * z⟧ + ⟦x * zR k⟧ - ⟦xL i * zR k⟧)
state_after: case refine_4.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zr
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zR k⟧) -
      ⟦xL i * (y + zR k)⟧ =
    ⟦x * y⟧ + (⟦xL i * z⟧ + ⟦x * zR k⟧ - ⟦xL i * zR k⟧)

tactic: rw [quot_left_distrib (xL i) (mk yl yr yL yR) (zR k)]
state_before: case refine_4.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zr
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zR k⟧) -
      ⟦xL i * (y + zR k)⟧ =
    ⟦x * y⟧ + (⟦xL i * z⟧ + ⟦x * zR k⟧ - ⟦xL i * zR k⟧)
state_after: case refine_4.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zr
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zR k⟧) -
      (⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * zR k⟧) =
    ⟦x * y⟧ + (⟦xL i * z⟧ + ⟦x * zR k⟧ - ⟦xL i * zR k⟧)

tactic: abel
state_before: case refine_4.inl.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xl
k : zr
⊢ ⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zR k⟧) -
      (⟦xL i * mk yl yr yL yR⟧ + ⟦xL i * zR k⟧) =
    ⟦x * y⟧ + (⟦xL i * z⟧ + ⟦x * zR k⟧ - ⟦xL i * zR k⟧)
state_after: no goals

tactic: change
  ⟦xR i * (y + z) + x * (yL j + z) - xR i * (yL j + z)⟧ =
    ⟦xR i * y + x * yL j - xR i * yL j + x * z⟧
state_before: case refine_4.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yl
⊢ ⟦(mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)).moveRight (Sum.inr (i, Sum.inl j))⟧ =
    ⟦(mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR).moveRight
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
                    Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
                fun val =>
                Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
                  Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inr (i, Sum.inl j)))⟧
state_after: case refine_4.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yl
⊢ ⟦xR i * (y + z) + x * (yL j + z) - xR i * (yL j + z)⟧ = ⟦xR i * y + x * yL j - xR i * yL j + x * z⟧

tactic: simp only [quot_sub, quot_add]
state_before: case refine_4.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yl
⊢ ⟦xR i * (y + z) + x * (yL j + z) - xR i * (yL j + z)⟧ = ⟦xR i * y + x * yL j - xR i * yL j + x * z⟧
state_after: case refine_4.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yl
⊢ ⟦xR i * (y + z)⟧ + ⟦x * (yL j + z)⟧ - ⟦xR i * (yL j + z)⟧ = ⟦xR i * y⟧ + ⟦x * yL j⟧ - ⟦xR i * yL j⟧ + ⟦x * z⟧

tactic: rw [quot_left_distrib (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]
state_before: case refine_4.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yl
⊢ ⟦xR i * (y + z)⟧ + ⟦x * (yL j + z)⟧ - ⟦xR i * (yL j + z)⟧ = ⟦xR i * y⟧ + ⟦x * yL j⟧ - ⟦xR i * yL j⟧ + ⟦x * z⟧
state_after: case refine_4.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yl
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + ⟦x * (yL j + z)⟧ - ⟦xR i * (yL j + z)⟧ =
    ⟦xR i * y⟧ + ⟦x * yL j⟧ - ⟦xR i * yL j⟧ + ⟦x * z⟧

tactic: rw [quot_left_distrib (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]
state_before: case refine_4.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yl
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + ⟦x * (yL j + z)⟧ - ⟦xR i * (yL j + z)⟧ =
    ⟦xR i * y⟧ + ⟦x * yL j⟧ - ⟦xR i * yL j⟧ + ⟦x * z⟧
state_after: case refine_4.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yl
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * yL j⟧ + ⟦mk xl xr xL xR * mk zl zr zL zR⟧) -
      ⟦xR i * (yL j + z)⟧ =
    ⟦xR i * y⟧ + ⟦x * yL j⟧ - ⟦xR i * yL j⟧ + ⟦x * z⟧

tactic: rw [quot_left_distrib (xR i) (yL j) (mk zl zr zL zR)]
state_before: case refine_4.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yl
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * yL j⟧ + ⟦mk xl xr xL xR * mk zl zr zL zR⟧) -
      ⟦xR i * (yL j + z)⟧ =
    ⟦xR i * y⟧ + ⟦x * yL j⟧ - ⟦xR i * yL j⟧ + ⟦x * z⟧
state_after: case refine_4.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yl
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * yL j⟧ + ⟦mk xl xr xL xR * mk zl zr zL zR⟧) -
      (⟦xR i * yL j⟧ + ⟦xR i * mk zl zr zL zR⟧) =
    ⟦xR i * y⟧ + ⟦x * yL j⟧ - ⟦xR i * yL j⟧ + ⟦x * z⟧

tactic: abel
state_before: case refine_4.inr.mk.inl
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
j : yl
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * yL j⟧ + ⟦mk xl xr xL xR * mk zl zr zL zR⟧) -
      (⟦xR i * yL j⟧ + ⟦xR i * mk zl zr zL zR⟧) =
    ⟦xR i * y⟧ + ⟦x * yL j⟧ - ⟦xR i * yL j⟧ + ⟦x * z⟧
state_after: no goals

tactic: change
  ⟦xR i * (y + z) + x * (y + zL k) - xR i * (y + zL k)⟧ =
    ⟦x * y + (xR i * z + x * zL k - xR i * zL k)⟧
state_before: case refine_4.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zl
⊢ ⟦(mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)).moveRight (Sum.inr (i, Sum.inr k))⟧ =
    ⟦(mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR).moveRight
        ({
            toFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Prod.casesOn val fun fst snd =>
                    Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))
                fun val =>
                Prod.casesOn val fun fst snd =>
                  Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),
            invFun := fun a =>
              Sum.casesOn a
                (fun val =>
                  Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>
                    Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))
                fun val =>
                Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>
                  Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),
            left_inv := ⋯, right_inv := ⋯ }
          (Sum.inr (i, Sum.inr k)))⟧
state_after: case refine_4.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zl
⊢ ⟦xR i * (y + z) + x * (y + zL k) - xR i * (y + zL k)⟧ = ⟦x * y + (xR i * z + x * zL k - xR i * zL k)⟧

tactic: simp only [quot_sub, quot_add]
state_before: case refine_4.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zl
⊢ ⟦xR i * (y + z) + x * (y + zL k) - xR i * (y + zL k)⟧ = ⟦x * y + (xR i * z + x * zL k - xR i * zL k)⟧
state_after: case refine_4.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zl
⊢ ⟦xR i * (y + z)⟧ + ⟦x * (y + zL k)⟧ - ⟦xR i * (y + zL k)⟧ = ⟦x * y⟧ + (⟦xR i * z⟧ + ⟦x * zL k⟧ - ⟦xR i * zL k⟧)

tactic: rw [quot_left_distrib (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]
state_before: case refine_4.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zl
⊢ ⟦xR i * (y + z)⟧ + ⟦x * (y + zL k)⟧ - ⟦xR i * (y + zL k)⟧ = ⟦x * y⟧ + (⟦xR i * z⟧ + ⟦x * zL k⟧ - ⟦xR i * zL k⟧)
state_after: case refine_4.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zl
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + ⟦x * (y + zL k)⟧ - ⟦xR i * (y + zL k)⟧ =
    ⟦x * y⟧ + (⟦xR i * z⟧ + ⟦x * zL k⟧ - ⟦xR i * zL k⟧)

tactic: rw [quot_left_distrib (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]
state_before: case refine_4.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zl
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + ⟦x * (y + zL k)⟧ - ⟦xR i * (y + zL k)⟧ =
    ⟦x * y⟧ + (⟦xR i * z⟧ + ⟦x * zL k⟧ - ⟦xR i * zL k⟧)
state_after: case refine_4.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zl
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zL k⟧) -
      ⟦xR i * (y + zL k)⟧ =
    ⟦x * y⟧ + (⟦xR i * z⟧ + ⟦x * zL k⟧ - ⟦xR i * zL k⟧)

tactic: rw [quot_left_distrib (xR i) (mk yl yr yL yR) (zL k)]
state_before: case refine_4.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zl
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zL k⟧) -
      ⟦xR i * (y + zL k)⟧ =
    ⟦x * y⟧ + (⟦xR i * z⟧ + ⟦x * zL k⟧ - ⟦xR i * zL k⟧)
state_after: case refine_4.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zl
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zL k⟧) -
      (⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * zL k⟧) =
    ⟦x * y⟧ + (⟦xR i * z⟧ + ⟦x * zL k⟧ - ⟦xR i * zL k⟧)

tactic: abel
state_before: case refine_4.inr.mk.inr
x✝ y✝ z✝ : PGame
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
yl yr : Type u_1
yL : yl → PGame
yR : yr → PGame
zl zr : Type u_1
zL : zl → PGame
zR : zr → PGame
x : PGame := mk xl xr xL xR
y : PGame := mk yl yr yL yR
z : PGame := mk zl zr zL zR
i : xr
k : zl
⊢ ⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * mk zl zr zL zR⟧ + (⟦mk xl xr xL xR * mk yl yr yL yR⟧ + ⟦mk xl xr xL xR * zL k⟧) -
      (⟦xR i * mk yl yr yL yR⟧ + ⟦xR i * zL k⟧) =
    ⟦x * y⟧ + (⟦xR i * z⟧ + ⟦x * zL k⟧ - ⟦xR i * zL k⟧)
state_after: no goals