l3lab/ntp-mathlib huggingface dataset:
theorem quot_mul_assoc (x y z : PGame) : (⟦x * y * z⟧ : Game) = ⟦x * (y * z)⟧ :=
  match x, y, z with
  | mk xl xr xL xR, mk yl yr yL yR, mk zl zr zL zR => by
    let x := mk xl xr xL xR
    let y := mk yl yr yL yR
    let z := mk zl zr zL zR
    refine' quot_eq_of_mk'_quot_eq _ _ _ _
    · fconstructor
      · rintro (⟨⟨_, _⟩ | ⟨_, _⟩, _⟩ | ⟨⟨_, _⟩ | ⟨_, _⟩, _⟩) <;>
          -- Porting note: as above, increased the `maxDepth` here by 1.
          solve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]
      · rintro (⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩) <;>
          solve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]
      · rintro (⟨⟨_, _⟩ | ⟨_, _⟩, _⟩ | ⟨⟨_, _⟩ | ⟨_, _⟩, _⟩) <;> rfl
      · rintro (⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩) <;> rfl
    · fconstructor
      · rintro (⟨⟨_, _⟩ | ⟨_, _⟩, _⟩ | ⟨⟨_, _⟩ | ⟨_, _⟩, _⟩) <;>
          solve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]
      · rintro (⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩) <;>
          solve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]
      · rintro (⟨⟨_, _⟩ | ⟨_, _⟩, _⟩ | ⟨⟨_, _⟩ | ⟨_, _⟩, _⟩) <;> rfl
      · rintro (⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩) <;> rfl
    -- Porting note: explicitly wrote out arguments to each recursive
    -- quot_mul_assoc reference below, because otherwise the decreasing_by block
    -- failed. Each branch previously ended with: `simp [quot_mul_assoc]; abel`
    -- See https://github.com/leanprover/lean4/issues/2288
    · rintro (⟨⟨i, j⟩ | ⟨i, j⟩, k⟩ | ⟨⟨i, j⟩ | ⟨i, j⟩, k⟩)
      · 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)⟧
        simp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib,
                   quot_left_distrib_sub, quot_left_distrib]
        rw [quot_mul_assoc (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]
        rw [quot_mul_assoc (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]
        

Proof state:
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 * (mk yl yr yL yR * mk zl zr zL zR)⟧ +
        (⟦mk xl xr xL xR * (yL j * mk zl zr zL zR)⟧ + ⟦mk xl xr xL xR * (mk yl yr yL yR * zL k)⟧ -
          ⟦mk xl xr xL xR * (yL j * zL k)⟧) -
      (⟦xL i * (yL j * mk zl zr zL zR)⟧ + ⟦xL i * (mk yl yr yL yR * zL k)⟧ - ⟦xL i * (yL j * zL k)⟧)

Next tactic:
rw [quot_mul_assoc (xL i) (yL j) (mk zl zr zL zR)]
instance (l r : Type u) [IsEmpty l] [IsEmpty r] : IsEmpty (InvTy l r true) :=
  ⟨by 

Proof state:
l r : Type u
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
⊢ InvTy l r true → False

Next tactic:
rintro (_ | _ | _ | a | a)
instance (l r : Type u) [IsEmpty l] [IsEmpty r] : IsEmpty (InvTy l r true) :=
  ⟨by rintro (_ | _ | _ | a | a) <;> 

Proof state:
case right₁
l r : Type u
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
a : l
a✝ : InvTy l r false
⊢ False

Next tactic:
exact isEmptyElim a
instance (l r : Type u) [IsEmpty l] [IsEmpty r] : IsEmpty (InvTy l r true) :=
  ⟨by rintro (_ | _ | _ | a | a) <;> 

Proof state:
case right₂
l r : Type u
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
a : r
a✝ : InvTy l r true
⊢ False

Next tactic:
exact isEmptyElim a
instance uniqueInvTy (l r : Type u) [IsEmpty l] [IsEmpty r] : Unique (InvTy l r false) :=
  { InvTy.instInhabited l r with
    uniq := by
      

Proof state:
l r : Type u
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
src✝ : Inhabited (InvTy l r false) := InvTy.instInhabited l r
⊢ ∀ (a : InvTy l r false), a = default

Next tactic:
rintro (a | a | a)
instance uniqueInvTy (l r : Type u) [IsEmpty l] [IsEmpty r] : Unique (InvTy l r false) :=
  { InvTy.instInhabited l r with
    uniq := by
      rintro (a | a | a)
      

Proof state:
case zero
l r : Type u
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
src✝ : Inhabited (InvTy l r false) := InvTy.instInhabited l r
⊢ InvTy.zero = default
case left₁
l r : Type u
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
src✝ : Inhabited (InvTy l r false) := InvTy.instInhabited l r
a : r
a✝ : InvTy l r false
⊢ InvTy.left₁ a a✝ = default
case left₂
l r : Type u
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
src✝ : Inhabited (InvTy l r false) := InvTy.instInhabited l r
a : l
a✝ : InvTy l r true
⊢ InvTy.left₂ a a✝ = default

Next tactic:
rfl
instance uniqueInvTy (l r : Type u) [IsEmpty l] [IsEmpty r] : Unique (InvTy l r false) :=
  { InvTy.instInhabited l r with
    uniq := by
      rintro (a | a | a)
      rfl
      

Proof state:
case left₁
l r : Type u
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
src✝ : Inhabited (InvTy l r false) := InvTy.instInhabited l r
a : r
a✝ : InvTy l r false
⊢ InvTy.left₁ a a✝ = default
case left₂
l r : Type u
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
src✝ : Inhabited (InvTy l r false) := InvTy.instInhabited l r
a : l
a✝ : InvTy l r true
⊢ InvTy.left₂ a a✝ = default

Next tactic:
all_goals exact isEmptyElim a
instance uniqueInvTy (l r : Type u) [IsEmpty l] [IsEmpty r] : Unique (InvTy l r false) :=
  { InvTy.instInhabited l r with
    uniq := by
      rintro (a | a | a)
      rfl
      all_goals 

Proof state:
case left₁
l r : Type u
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
src✝ : Inhabited (InvTy l r false) := InvTy.instInhabited l r
a : r
a✝ : InvTy l r false
⊢ InvTy.left₁ a a✝ = default

Next tactic:
exact isEmptyElim a
instance uniqueInvTy (l r : Type u) [IsEmpty l] [IsEmpty r] : Unique (InvTy l r false) :=
  { InvTy.instInhabited l r with
    uniq := by
      rintro (a | a | a)
      rfl
      all_goals 

Proof state:
case left₂
l r : Type u
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
src✝ : Inhabited (InvTy l r false) := InvTy.instInhabited l r
a : l
a✝ : InvTy l r true
⊢ InvTy.left₂ a a✝ = default

Next tactic:
exact isEmptyElim a
@[simp]
theorem invVal_isEmpty {l r : Type u} {b} (L R IHl IHr) (i : InvTy l r b) [IsEmpty l] [IsEmpty r] :
    invVal L R IHl IHr i = 0 := by
  

Proof state:
l r : Type u
b : Bool
L : l → PGame
R : r → PGame
IHl : l → PGame
IHr : r → PGame
i : InvTy l r b
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
⊢ invVal L R IHl IHr i = 0

Next tactic:
cases' i with a _ a _ a _ a
@[simp]
theorem invVal_isEmpty {l r : Type u} {b} (L R IHl IHr) (i : InvTy l r b) [IsEmpty l] [IsEmpty r] :
    invVal L R IHl IHr i = 0 := by
  cases' i with a _ a _ a _ a
  · 

Proof state:
case zero
l r : Type u
L : l → PGame
R : r → PGame
IHl : l → PGame
IHr : r → PGame
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
⊢ invVal L R IHl IHr InvTy.zero = 0

Next tactic:
rfl
@[simp]
theorem invVal_isEmpty {l r : Type u} {b} (L R IHl IHr) (i : InvTy l r b) [IsEmpty l] [IsEmpty r] :
    invVal L R IHl IHr i = 0 := by
  cases' i with a _ a _ a _ a
  · rfl
  

Proof state:
case left₁
l r : Type u
L : l → PGame
R : r → PGame
IHl : l → PGame
IHr : r → PGame
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
a : r
a✝ : InvTy l r false
⊢ invVal L R IHl IHr (InvTy.left₁ a a✝) = 0
case left₂
l r : Type u
L : l → PGame
R : r → PGame
IHl : l → PGame
IHr : r → PGame
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
a : l
a✝ : InvTy l r true
⊢ invVal L R IHl IHr (InvTy.left₂ a a✝) = 0
case right₁
l r : Type u
L : l → PGame
R : r → PGame
IHl : l → PGame
IHr : r → PGame
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
a : l
a✝ : InvTy l r false
⊢ invVal L R IHl IHr (InvTy.right₁ a a✝) = 0
case right₂
l r : Type u
L : l → PGame
R : r → PGame
IHl : l → PGame
IHr : r → PGame
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
a : r
a✝ : InvTy l r true
⊢ invVal L R IHl IHr (InvTy.right₂ a a✝) = 0

Next tactic:
all_goals exact isEmptyElim a
@[simp]
theorem invVal_isEmpty {l r : Type u} {b} (L R IHl IHr) (i : InvTy l r b) [IsEmpty l] [IsEmpty r] :
    invVal L R IHl IHr i = 0 := by
  cases' i with a _ a _ a _ a
  · rfl
  all_goals 

Proof state:
case left₁
l r : Type u
L : l → PGame
R : r → PGame
IHl : l → PGame
IHr : r → PGame
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
a : r
a✝ : InvTy l r false
⊢ invVal L R IHl IHr (InvTy.left₁ a a✝) = 0

Next tactic:
exact isEmptyElim a
@[simp]
theorem invVal_isEmpty {l r : Type u} {b} (L R IHl IHr) (i : InvTy l r b) [IsEmpty l] [IsEmpty r] :
    invVal L R IHl IHr i = 0 := by
  cases' i with a _ a _ a _ a
  · rfl
  all_goals 

Proof state:
case left₂
l r : Type u
L : l → PGame
R : r → PGame
IHl : l → PGame
IHr : r → PGame
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
a : l
a✝ : InvTy l r true
⊢ invVal L R IHl IHr (InvTy.left₂ a a✝) = 0

Next tactic:
exact isEmptyElim a
@[simp]
theorem invVal_isEmpty {l r : Type u} {b} (L R IHl IHr) (i : InvTy l r b) [IsEmpty l] [IsEmpty r] :
    invVal L R IHl IHr i = 0 := by
  cases' i with a _ a _ a _ a
  · rfl
  all_goals 

Proof state:
case right₁
l r : Type u
L : l → PGame
R : r → PGame
IHl : l → PGame
IHr : r → PGame
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
a : l
a✝ : InvTy l r false
⊢ invVal L R IHl IHr (InvTy.right₁ a a✝) = 0

Next tactic:
exact isEmptyElim a
@[simp]
theorem invVal_isEmpty {l r : Type u} {b} (L R IHl IHr) (i : InvTy l r b) [IsEmpty l] [IsEmpty r] :
    invVal L R IHl IHr i = 0 := by
  cases' i with a _ a _ a _ a
  · rfl
  all_goals 

Proof state:
case right₂
l r : Type u
L : l → PGame
R : r → PGame
IHl : l → PGame
IHr : r → PGame
inst✝¹ : IsEmpty l
inst✝ : IsEmpty r
a : r
a✝ : InvTy l r true
⊢ invVal L R IHl IHr (InvTy.right₂ a a✝) = 0

Next tactic:
exact isEmptyElim a
theorem zero_lf_inv' : ∀ x : PGame, 0 ⧏ inv' x
  | ⟨xl, xr, xL, xR⟩ => by
    

Proof state:
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
⊢ 0 ⧏ inv' (mk xl xr xL xR)

Next tactic:
convert lf_mk _ _ InvTy.zero
theorem zero_lf_inv' : ∀ x : PGame, 0 ⧏ inv' x
  | ⟨xl, xr, xL, xR⟩ => by
    convert lf_mk _ _ InvTy.zero
    

Proof state:
case h.e'_1
xl xr : Type u_1
xL : xl → PGame
xR : xr → PGame
⊢ 0 = invVal (fun i => xL ↑i) xR (fun i => inv' (xL ↑i)) (fun i => inv' (xR i)) InvTy.zero

Next tactic:
rfl
/-- `inv' 0` has exactly the same moves as `1`. -/
def inv'Zero : inv' 0 ≡r 1 := by
  

Proof state:
⊢ inv' 0 ≡r 1

Next tactic:
change mk _ _ _ _ ≡r 1
/-- `inv' 0` has exactly the same moves as `1`. -/
def inv'Zero : inv' 0 ≡r 1 := by
  change mk _ _ _ _ ≡r 1
  

Proof state:
⊢ mk (InvTy { i // 0 < PEmpty.elim i } PEmpty.{?u.444859 + 1} false)
      (InvTy { i // 0 < PEmpty.elim i } PEmpty.{?u.444859 + 1} true)
      (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))
      (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i)) ≡r
    1

Next tactic:
refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩
/-- `inv' 0` has exactly the same moves as `1`. -/
def inv'Zero : inv' 0 ≡r 1 := by
  change mk _ _ _ _ ≡r 1
  refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩
  · 

Proof state:
case refine'_1
⊢ LeftMoves
      (mk (InvTy { i // 0 < PEmpty.elim i } PEmpty.{?u.444859 + 1} false)
        (InvTy { i // 0 < PEmpty.elim i } PEmpty.{?u.444859 + 1} true)
        (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))
        (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))) ≃
    LeftMoves 1

Next tactic:
apply Equiv.equivPUnit (InvTy _ _ _)
/-- `inv' 0` has exactly the same moves as `1`. -/
def inv'Zero : inv' 0 ≡r 1 := by
  change mk _ _ _ _ ≡r 1
  refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩
  · apply Equiv.equivPUnit (InvTy _ _ _)
  · 

Proof state:
case refine'_2
⊢ RightMoves
      (mk (InvTy { i // 0 < PEmpty.elim i } PEmpty.{?u.444859 + 1} false)
        (InvTy { i // 0 < PEmpty.elim i } PEmpty.{?u.444859 + 1} true)
        (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))
        (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))) ≃
    RightMoves 1

Next tactic:
apply Equiv.equivPEmpty (InvTy _ _ _)
/-- `inv' 0` has exactly the same moves as `1`. -/
def inv'Zero : inv' 0 ≡r 1 := by
  change mk _ _ _ _ ≡r 1
  refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩
  · apply Equiv.equivPUnit (InvTy _ _ _)
  · apply Equiv.equivPEmpty (InvTy _ _ _)
  · -- Porting note: had to add `rfl`, because `simp` only uses the built-in `rfl`.
    

Proof state:
case refine'_3
i :
  LeftMoves
    (mk (InvTy { i // 0 < PEmpty.elim i } PEmpty.{?u.444859 + 1} false)
      (InvTy { i // 0 < PEmpty.elim i } PEmpty.{?u.444859 + 1} true)
      (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))
      (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i)))
⊢ moveLeft
      (mk (InvTy { i // 0 < PEmpty.elim i } PEmpty.{?u.444859 + 1} false)
        (InvTy { i // 0 < PEmpty.elim i } PEmpty.{?u.444859 + 1} true)
        (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))
        (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i)))
      i ≡r
    moveLeft 1 ((Equiv.equivPUnit (InvTy { i // 0 < PEmpty.elim i } PEmpty.{?u.444859 + 1} false)) i)

Next tactic:
simp
/-- `inv' 0` has exactly the same moves as `1`. -/
def inv'Zero : inv' 0 ≡r 1 := by
  change mk _ _ _ _ ≡r 1
  refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩
  · apply Equiv.equivPUnit (InvTy _ _ _)
  · apply Equiv.equivPEmpty (InvTy _ _ _)
  · -- Porting note: had to add `rfl`, because `simp` only uses the built-in `rfl`.
    simp; 

Proof state:
case refine'_3
i :
  LeftMoves
    (mk (InvTy { i // 0 < PEmpty.elim i } PEmpty.{?u.444859 + 1} false)
      (InvTy { i // 0 < PEmpty.elim i } PEmpty.{?u.444859 + 1} true)
      (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))
      (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i)))
⊢ 0 ≡r 0

Next tactic:
rfl
/-- `inv' 0` has exactly the same moves as `1`. -/
def inv'Zero : inv' 0 ≡r 1 := by
  change mk _ _ _ _ ≡r 1
  refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩
  · apply Equiv.equivPUnit (InvTy _ _ _)
  · apply Equiv.equivPEmpty (InvTy _ _ _)
  · -- Porting note: had to add `rfl`, because `simp` only uses the built-in `rfl`.
    simp; rfl
  · 

Proof state:
case refine'_4
⊢ IsEmpty
    (RightMoves
      (mk (InvTy { i // 0 < PEmpty.elim i } PEmpty.{?u.444859 + 1} false)
        (InvTy { i // 0 < PEmpty.elim i } PEmpty.{?u.444859 + 1} true)
        (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))
        (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))))

Next tactic:
dsimp
/-- `inv' 0` has exactly the same moves as `1`. -/
def inv'Zero : inv' 0 ≡r 1 := by
  change mk _ _ _ _ ≡r 1
  refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩
  · apply Equiv.equivPUnit (InvTy _ _ _)
  · apply Equiv.equivPEmpty (InvTy _ _ _)
  · -- Porting note: had to add `rfl`, because `simp` only uses the built-in `rfl`.
    simp; rfl
  · dsimp
    

Proof state:
case refine'_4
⊢ IsEmpty (InvTy { i // 0 < PEmpty.elim i } PEmpty.{?u.444859 + 1} true)

Next tactic:
infer_instance
/-- `inv' 1` has exactly the same moves as `1`. -/
def inv'One : inv' 1 ≡r (1 : PGame.{u}) := by
  

Proof state:
⊢ inv' 1 ≡r 1

Next tactic:
change Relabelling (mk _ _ _ _) 1
/-- `inv' 1` has exactly the same moves as `1`. -/
def inv'One : inv' 1 ≡r (1 : PGame.{u}) := by
  change Relabelling (mk _ _ _ _) 1
  

Proof state:
⊢ mk (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} false) (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} true)
      (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))
      (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i)) ≡r
    1

Next tactic:
have : IsEmpty { _i : PUnit.{u + 1} // (0 : PGame.{u}) < 0 } := by
    rw [lt_self_iff_false]
    infer_instance
/-- `inv' 1` has exactly the same moves as `1`. -/
def inv'One : inv' 1 ≡r (1 : PGame.{u}) := by
  change Relabelling (mk _ _ _ _) 1
  have : IsEmpty { _i : PUnit.{u + 1} // (0 : PGame.{u}) < 0 } := by
    

Proof state:
⊢ IsEmpty { _i // 0 < 0 }

Next tactic:
rw [lt_self_iff_false]
/-- `inv' 1` has exactly the same moves as `1`. -/
def inv'One : inv' 1 ≡r (1 : PGame.{u}) := by
  change Relabelling (mk _ _ _ _) 1
  have : IsEmpty { _i : PUnit.{u + 1} // (0 : PGame.{u}) < 0 } := by
    rw [lt_self_iff_false]
    

Proof state:
⊢ IsEmpty { _i // False }

Next tactic:
infer_instance
/-- `inv' 1` has exactly the same moves as `1`. -/
def inv'One : inv' 1 ≡r (1 : PGame.{u}) := by
  change Relabelling (mk _ _ _ _) 1
  have : IsEmpty { _i : PUnit.{u + 1} // (0 : PGame.{u}) < 0 } := by
    rw [lt_self_iff_false]
    infer_instance
  

Proof state:
this : IsEmpty { _i // 0 < 0 }
⊢ mk (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} false) (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} true)
      (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))
      (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i)) ≡r
    1

Next tactic:
refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩
/-- `inv' 1` has exactly the same moves as `1`. -/
def inv'One : inv' 1 ≡r (1 : PGame.{u}) := by
  change Relabelling (mk _ _ _ _) 1
  have : IsEmpty { _i : PUnit.{u + 1} // (0 : PGame.{u}) < 0 } := by
    rw [lt_self_iff_false]
    infer_instance
  refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩ <;> 

Proof state:
case refine'_1
this : IsEmpty { _i // 0 < 0 }
⊢ LeftMoves
      (mk (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} false)
        (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} true)
        (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))
        (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i =>
          inv' (PEmpty.elim i))) ≃
    LeftMoves 1

Next tactic:
dsimp
/-- `inv' 1` has exactly the same moves as `1`. -/
def inv'One : inv' 1 ≡r (1 : PGame.{u}) := by
  change Relabelling (mk _ _ _ _) 1
  have : IsEmpty { _i : PUnit.{u + 1} // (0 : PGame.{u}) < 0 } := by
    rw [lt_self_iff_false]
    infer_instance
  refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩ <;> 

Proof state:
case refine'_2
this : IsEmpty { _i // 0 < 0 }
⊢ RightMoves
      (mk (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} false)
        (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} true)
        (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))
        (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i =>
          inv' (PEmpty.elim i))) ≃
    RightMoves 1

Next tactic:
dsimp
/-- `inv' 1` has exactly the same moves as `1`. -/
def inv'One : inv' 1 ≡r (1 : PGame.{u}) := by
  change Relabelling (mk _ _ _ _) 1
  have : IsEmpty { _i : PUnit.{u + 1} // (0 : PGame.{u}) < 0 } := by
    rw [lt_self_iff_false]
    infer_instance
  refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩ <;> 

Proof state:
case refine'_3
this : IsEmpty { _i // 0 < 0 }
i :
  LeftMoves
    (mk (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} false) (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} true)
      (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))
      (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i)))
⊢ moveLeft
      (mk (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} false)
        (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} true)
        (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))
        (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i)))
      i ≡r
    moveLeft 1 ((id ?refine'_1) i)

Next tactic:
dsimp
/-- `inv' 1` has exactly the same moves as `1`. -/
def inv'One : inv' 1 ≡r (1 : PGame.{u}) := by
  change Relabelling (mk _ _ _ _) 1
  have : IsEmpty { _i : PUnit.{u + 1} // (0 : PGame.{u}) < 0 } := by
    rw [lt_self_iff_false]
    infer_instance
  refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩ <;> 

Proof state:
case refine'_4
this : IsEmpty { _i // 0 < 0 }
⊢ IsEmpty
    (RightMoves
      (mk (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} false)
        (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} true)
        (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))
        (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i =>
          inv' (PEmpty.elim i))))

Next tactic:
dsimp
/-- `inv' 1` has exactly the same moves as `1`. -/
def inv'One : inv' 1 ≡r (1 : PGame.{u}) := by
  change Relabelling (mk _ _ _ _) 1
  have : IsEmpty { _i : PUnit.{u + 1} // (0 : PGame.{u}) < 0 } := by
    rw [lt_self_iff_false]
    infer_instance
  refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩ <;> dsimp
  · 

Proof state:
case refine'_1
this : IsEmpty { _i // 0 < 0 }
⊢ InvTy { i // 0 < 0 } PEmpty.{u + 1} false ≃ PUnit.{u + 1}

Next tactic:
apply Equiv.equivPUnit
/-- `inv' 1` has exactly the same moves as `1`. -/
def inv'One : inv' 1 ≡r (1 : PGame.{u}) := by
  change Relabelling (mk _ _ _ _) 1
  have : IsEmpty { _i : PUnit.{u + 1} // (0 : PGame.{u}) < 0 } := by
    rw [lt_self_iff_false]
    infer_instance
  refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩ <;> dsimp
  · apply Equiv.equivPUnit
  · 

Proof state:
case refine'_2
this : IsEmpty { _i // 0 < 0 }
⊢ InvTy { i // 0 < 0 } PEmpty.{u + 1} true ≃ PEmpty.{u + 1}

Next tactic:
apply Equiv.equivOfIsEmpty
/-- `inv' 1` has exactly the same moves as `1`. -/
def inv'One : inv' 1 ≡r (1 : PGame.{u}) := by
  change Relabelling (mk _ _ _ _) 1
  have : IsEmpty { _i : PUnit.{u + 1} // (0 : PGame.{u}) < 0 } := by
    rw [lt_self_iff_false]
    infer_instance
  refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩ <;> dsimp
  · apply Equiv.equivPUnit
  · apply Equiv.equivOfIsEmpty
  · -- Porting note: had to add `rfl`, because `simp` only uses the built-in `rfl`.
    

Proof state:
case refine'_3
this : IsEmpty { _i // 0 < 0 }
i :
  LeftMoves
    (mk (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} false) (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} true)
      (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))
      (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i)))
⊢ invVal (fun i => 0) PEmpty.elim (fun i => inv' 0) (fun i => inv' (PEmpty.elim i)) i ≡r 0

Next tactic:
simp
/-- `inv' 1` has exactly the same moves as `1`. -/
def inv'One : inv' 1 ≡r (1 : PGame.{u}) := by
  change Relabelling (mk _ _ _ _) 1
  have : IsEmpty { _i : PUnit.{u + 1} // (0 : PGame.{u}) < 0 } := by
    rw [lt_self_iff_false]
    infer_instance
  refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩ <;> dsimp
  · apply Equiv.equivPUnit
  · apply Equiv.equivOfIsEmpty
  · -- Porting note: had to add `rfl`, because `simp` only uses the built-in `rfl`.
    simp; 

Proof state:
case refine'_3
this : IsEmpty { _i // 0 < 0 }
i :
  LeftMoves
    (mk (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} false) (InvTy { i // 0 < (fun x => 0) i } PEmpty.{u + 1} true)
      (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))
      (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i)))
⊢ 0 ≡r 0

Next tactic:
rfl