l3lab/ntp-mathlib huggingface dataset:
theorem impartial_congr : ∀ {G H : PGame} (_ : G ≡r H) [G.Impartial], H.Impartial
  | G, H => fun e => by
    intro h
    

Proof state:
G H : PGame
e : G ≡r H
h : Impartial G
⊢ Impartial H

Next tactic:
exact impartial_def.2
      ⟨Equiv.trans e.symm.equiv (Equiv.trans (neg_equiv_self G) (neg_equiv_neg_iff.2 e.equiv)),
        fun i => impartial_congr (e.moveLeftSymm i), fun j => impartial_congr (e.moveRightSymm j)⟩
theorem impartial_congr : ∀ {G H : PGame} (_ : G ≡r H) [G.Impartial], H.Impartial
  | G, H => fun e => by
    intro h
    exact impartial_def.2
      ⟨Equiv.trans e.symm.equiv (Equiv.trans (neg_equiv_self G) (neg_equiv_neg_iff.2 e.equiv)),
        fun i => impartial_congr (e.moveLeftSymm i), fun j => impartial_congr (e.moveRightSymm j)⟩
termination_by _ G H => (G, H)
decreasing_by 

Proof state:
G H : PGame
x✝ :
  ∀ (y : (_ : PGame) ×' PGame),
    (invImage (fun a => PSigma.casesOn a fun G snd => (G, snd)) Prod.instWellFoundedRelationProd).1 y
        { fst := G, snd := H } →
      y.1 ≡r y.2 → ∀ [inst : Impartial y.1], Impartial y.2
e : G ≡r H
h : Impartial G
i : LeftMoves H
⊢ (invImage (fun a => PSigma.casesOn a fun G snd => (G, snd)) Prod.instWellFoundedRelationProd).1
    { fst := moveLeft G ((Relabelling.leftMovesEquiv e).symm i), snd := moveLeft H i } { fst := G, snd := H }

Next tactic:
pgame_wf_tac
theorem impartial_congr : ∀ {G H : PGame} (_ : G ≡r H) [G.Impartial], H.Impartial
  | G, H => fun e => by
    intro h
    exact impartial_def.2
      ⟨Equiv.trans e.symm.equiv (Equiv.trans (neg_equiv_self G) (neg_equiv_neg_iff.2 e.equiv)),
        fun i => impartial_congr (e.moveLeftSymm i), fun j => impartial_congr (e.moveRightSymm j)⟩
termination_by _ G H => (G, H)
decreasing_by 

Proof state:
G H : PGame
x✝ :
  ∀ (y : (_ : PGame) ×' PGame),
    (invImage (fun a => PSigma.casesOn a fun G snd => (G, snd)) Prod.instWellFoundedRelationProd).1 y
        { fst := G, snd := H } →
      y.1 ≡r y.2 → ∀ [inst : Impartial y.1], Impartial y.2
e : G ≡r H
h : Impartial G
j : RightMoves H
⊢ (invImage (fun a => PSigma.casesOn a fun G snd => (G, snd)) Prod.instWellFoundedRelationProd).1
    { fst := moveRight G ((Relabelling.rightMovesEquiv e).symm j), snd := moveRight H j } { fst := G, snd := H }

Next tactic:
pgame_wf_tac
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    

Proof state:
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
⊢ Impartial (G + H)

Next tactic:
rw [impartial_def]
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    

Proof state:
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
⊢ G + H ≈ -(G + H) ∧
    (∀ (i : LeftMoves (G + H)), Impartial (moveLeft (G + H) i)) ∧
      ∀ (j : RightMoves (G + H)), Impartial (moveRight (G + H) j)

Next tactic:
refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · 

Proof state:
case refine'_1
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : LeftMoves (G + H)
⊢ Impartial (moveLeft (G + H) k)

Next tactic:
apply leftMoves_add_cases k
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      

Proof state:
case refine'_1.hl
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : LeftMoves (G + H)
⊢ ∀ (i : LeftMoves G), Impartial (moveLeft (G + H) (toLeftMovesAdd (Sum.inl i)))
case refine'_1.hr
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : LeftMoves (G + H)
⊢ ∀ (i : LeftMoves H), Impartial (moveLeft (G + H) (toLeftMovesAdd (Sum.inr i)))

Next tactic:
all_goals
        intro i; simp only [add_moveLeft_inl, add_moveLeft_inr]
        apply impartial_add
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        

Proof state:
case refine'_1.hl
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : LeftMoves (G + H)
⊢ ∀ (i : LeftMoves G), Impartial (moveLeft (G + H) (toLeftMovesAdd (Sum.inl i)))

Next tactic:
intro i
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        intro i; 

Proof state:
case refine'_1.hl
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : LeftMoves (G + H)
i : LeftMoves G
⊢ Impartial (moveLeft (G + H) (toLeftMovesAdd (Sum.inl i)))

Next tactic:
simp only [add_moveLeft_inl, add_moveLeft_inr]
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        intro i; simp only [add_moveLeft_inl, add_moveLeft_inr]
        

Proof state:
case refine'_1.hl
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : LeftMoves (G + H)
i : LeftMoves G
⊢ Impartial (moveLeft G i + H)

Next tactic:
apply impartial_add
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        

Proof state:
case refine'_1.hr
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : LeftMoves (G + H)
⊢ ∀ (i : LeftMoves H), Impartial (moveLeft (G + H) (toLeftMovesAdd (Sum.inr i)))

Next tactic:
intro i
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        intro i; 

Proof state:
case refine'_1.hr
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : LeftMoves (G + H)
i : LeftMoves H
⊢ Impartial (moveLeft (G + H) (toLeftMovesAdd (Sum.inr i)))

Next tactic:
simp only [add_moveLeft_inl, add_moveLeft_inr]
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        intro i; simp only [add_moveLeft_inl, add_moveLeft_inr]
        

Proof state:
case refine'_1.hr
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : LeftMoves (G + H)
i : LeftMoves H
⊢ Impartial (G + moveLeft H i)

Next tactic:
apply impartial_add
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        intro i; simp only [add_moveLeft_inl, add_moveLeft_inr]
        apply impartial_add
    · 

Proof state:
case refine'_2
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : RightMoves (G + H)
⊢ Impartial (moveRight (G + H) k)

Next tactic:
apply rightMoves_add_cases k
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        intro i; simp only [add_moveLeft_inl, add_moveLeft_inr]
        apply impartial_add
    · apply rightMoves_add_cases k
      

Proof state:
case refine'_2.hl
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : RightMoves (G + H)
⊢ ∀ (j : RightMoves G), Impartial (moveRight (G + H) (toRightMovesAdd (Sum.inl j)))
case refine'_2.hr
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : RightMoves (G + H)
⊢ ∀ (j : RightMoves H), Impartial (moveRight (G + H) (toRightMovesAdd (Sum.inr j)))

Next tactic:
all_goals
        intro i; simp only [add_moveRight_inl, add_moveRight_inr]
        apply impartial_add
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        intro i; simp only [add_moveLeft_inl, add_moveLeft_inr]
        apply impartial_add
    · apply rightMoves_add_cases k
      all_goals
        

Proof state:
case refine'_2.hl
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : RightMoves (G + H)
⊢ ∀ (j : RightMoves G), Impartial (moveRight (G + H) (toRightMovesAdd (Sum.inl j)))

Next tactic:
intro i
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        intro i; simp only [add_moveLeft_inl, add_moveLeft_inr]
        apply impartial_add
    · apply rightMoves_add_cases k
      all_goals
        intro i; 

Proof state:
case refine'_2.hl
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : RightMoves (G + H)
i : RightMoves G
⊢ Impartial (moveRight (G + H) (toRightMovesAdd (Sum.inl i)))

Next tactic:
simp only [add_moveRight_inl, add_moveRight_inr]
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        intro i; simp only [add_moveLeft_inl, add_moveLeft_inr]
        apply impartial_add
    · apply rightMoves_add_cases k
      all_goals
        intro i; simp only [add_moveRight_inl, add_moveRight_inr]
        

Proof state:
case refine'_2.hl
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : RightMoves (G + H)
i : RightMoves G
⊢ Impartial (moveRight G i + H)

Next tactic:
apply impartial_add
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        intro i; simp only [add_moveLeft_inl, add_moveLeft_inr]
        apply impartial_add
    · apply rightMoves_add_cases k
      all_goals
        

Proof state:
case refine'_2.hr
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : RightMoves (G + H)
⊢ ∀ (j : RightMoves H), Impartial (moveRight (G + H) (toRightMovesAdd (Sum.inr j)))

Next tactic:
intro i
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        intro i; simp only [add_moveLeft_inl, add_moveLeft_inr]
        apply impartial_add
    · apply rightMoves_add_cases k
      all_goals
        intro i; 

Proof state:
case refine'_2.hr
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : RightMoves (G + H)
i : RightMoves H
⊢ Impartial (moveRight (G + H) (toRightMovesAdd (Sum.inr i)))

Next tactic:
simp only [add_moveRight_inl, add_moveRight_inr]
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        intro i; simp only [add_moveLeft_inl, add_moveLeft_inr]
        apply impartial_add
    · apply rightMoves_add_cases k
      all_goals
        intro i; simp only [add_moveRight_inl, add_moveRight_inr]
        

Proof state:
case refine'_2.hr
G H : PGame
x✝¹ : Impartial G
x✝ : Impartial H
k : RightMoves (G + H)
i : RightMoves H
⊢ Impartial (G + moveRight H i)

Next tactic:
apply impartial_add
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        intro i; simp only [add_moveLeft_inl, add_moveLeft_inr]
        apply impartial_add
    · apply rightMoves_add_cases k
      all_goals
        intro i; simp only [add_moveRight_inl, add_moveRight_inr]
        apply impartial_add
termination_by _ G H _ _ => (G, H)
decreasing_by 

Proof state:
G H : PGame
x✝² : Impartial G
x✝¹ : Impartial H
x✝ :
  ∀ (y : (x : PGame) ×' (x_1 : PGame) ×' (_ : Impartial x) ×' Impartial x_1),
    (invImage
            (fun a =>
              PSigma.casesOn a fun G snd => PSigma.casesOn snd fun H snd => PSigma.casesOn snd fun x snd => (G, H))
            Prod.instWellFoundedRelationProd).1
        y { fst := G, snd := { fst := H, snd := { fst := x✝², snd := x✝¹ } } } →
      Impartial (y.1 + y.2.1)
i : LeftMoves G
⊢ (invImage
        (fun a => PSigma.casesOn a fun G snd => PSigma.casesOn snd fun H snd => PSigma.casesOn snd fun x snd => (G, H))
        Prod.instWellFoundedRelationProd).1
    { fst := moveLeft G i, snd := { fst := H, snd := { fst := (_ : Impartial (moveLeft G i)), snd := x✝¹ } } }
    { fst := G, snd := { fst := H, snd := { fst := x✝², snd := x✝¹ } } }

Next tactic:
pgame_wf_tac
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        intro i; simp only [add_moveLeft_inl, add_moveLeft_inr]
        apply impartial_add
    · apply rightMoves_add_cases k
      all_goals
        intro i; simp only [add_moveRight_inl, add_moveRight_inr]
        apply impartial_add
termination_by _ G H _ _ => (G, H)
decreasing_by 

Proof state:
G H : PGame
x✝² : Impartial G
x✝¹ : Impartial H
x✝ :
  ∀ (y : (x : PGame) ×' (x_1 : PGame) ×' (_ : Impartial x) ×' Impartial x_1),
    (invImage
            (fun a =>
              PSigma.casesOn a fun G snd => PSigma.casesOn snd fun H snd => PSigma.casesOn snd fun x snd => (G, H))
            Prod.instWellFoundedRelationProd).1
        y { fst := G, snd := { fst := H, snd := { fst := x✝², snd := x✝¹ } } } →
      Impartial (y.1 + y.2.1)
i : LeftMoves H
⊢ (invImage
        (fun a => PSigma.casesOn a fun G snd => PSigma.casesOn snd fun H snd => PSigma.casesOn snd fun x snd => (G, H))
        Prod.instWellFoundedRelationProd).1
    { fst := G, snd := { fst := moveLeft H i, snd := { fst := x✝², snd := (_ : Impartial (moveLeft H i)) } } }
    { fst := G, snd := { fst := H, snd := { fst := x✝², snd := x✝¹ } } }

Next tactic:
pgame_wf_tac
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        intro i; simp only [add_moveLeft_inl, add_moveLeft_inr]
        apply impartial_add
    · apply rightMoves_add_cases k
      all_goals
        intro i; simp only [add_moveRight_inl, add_moveRight_inr]
        apply impartial_add
termination_by _ G H _ _ => (G, H)
decreasing_by 

Proof state:
G H : PGame
x✝² : Impartial G
x✝¹ : Impartial H
x✝ :
  ∀ (y : (x : PGame) ×' (x_1 : PGame) ×' (_ : Impartial x) ×' Impartial x_1),
    (invImage
            (fun a =>
              PSigma.casesOn a fun G snd => PSigma.casesOn snd fun H snd => PSigma.casesOn snd fun x snd => (G, H))
            Prod.instWellFoundedRelationProd).1
        y { fst := G, snd := { fst := H, snd := { fst := x✝², snd := x✝¹ } } } →
      Impartial (y.1 + y.2.1)
i : RightMoves G
⊢ (invImage
        (fun a => PSigma.casesOn a fun G snd => PSigma.casesOn snd fun H snd => PSigma.casesOn snd fun x snd => (G, H))
        Prod.instWellFoundedRelationProd).1
    { fst := moveRight G i, snd := { fst := H, snd := { fst := (_ : Impartial (moveRight G i)), snd := x✝¹ } } }
    { fst := G, snd := { fst := H, snd := { fst := x✝², snd := x✝¹ } } }

Next tactic:
pgame_wf_tac
instance impartial_add : ∀ (G H : PGame) [G.Impartial] [H.Impartial], (G + H).Impartial
  | G, H, _, _ => by
    rw [impartial_def]
    refine' ⟨Equiv.trans (add_congr (neg_equiv_self G) (neg_equiv_self _))
        (Equiv.symm (negAddRelabelling _ _).equiv), fun k => _, fun k => _⟩
    · apply leftMoves_add_cases k
      all_goals
        intro i; simp only [add_moveLeft_inl, add_moveLeft_inr]
        apply impartial_add
    · apply rightMoves_add_cases k
      all_goals
        intro i; simp only [add_moveRight_inl, add_moveRight_inr]
        apply impartial_add
termination_by _ G H _ _ => (G, H)
decreasing_by 

Proof state:
G H : PGame
x✝² : Impartial G
x✝¹ : Impartial H
x✝ :
  ∀ (y : (x : PGame) ×' (x_1 : PGame) ×' (_ : Impartial x) ×' Impartial x_1),
    (invImage
            (fun a =>
              PSigma.casesOn a fun G snd => PSigma.casesOn snd fun H snd => PSigma.casesOn snd fun x snd => (G, H))
            Prod.instWellFoundedRelationProd).1
        y { fst := G, snd := { fst := H, snd := { fst := x✝², snd := x✝¹ } } } →
      Impartial (y.1 + y.2.1)
i : RightMoves H
⊢ (invImage
        (fun a => PSigma.casesOn a fun G snd => PSigma.casesOn snd fun H snd => PSigma.casesOn snd fun x snd => (G, H))
        Prod.instWellFoundedRelationProd).1
    { fst := G, snd := { fst := moveRight H i, snd := { fst := x✝², snd := (_ : Impartial (moveRight H i)) } } }
    { fst := G, snd := { fst := H, snd := { fst := x✝², snd := x✝¹ } } }

Next tactic:
pgame_wf_tac
instance impartial_neg : ∀ (G : PGame) [G.Impartial], (-G).Impartial
  | G, _ => by
    

Proof state:
G : PGame
x✝ : Impartial G
⊢ Impartial (-G)

Next tactic:
rw [impartial_def]
instance impartial_neg : ∀ (G : PGame) [G.Impartial], (-G).Impartial
  | G, _ => by
    rw [impartial_def]
    

Proof state:
G : PGame
x✝ : Impartial G
⊢ -G ≈ - -G ∧
    (∀ (i : LeftMoves (-G)), Impartial (moveLeft (-G) i)) ∧ ∀ (j : RightMoves (-G)), Impartial (moveRight (-G) j)

Next tactic:
refine' ⟨_, fun i => _, fun i => _⟩
instance impartial_neg : ∀ (G : PGame) [G.Impartial], (-G).Impartial
  | G, _ => by
    rw [impartial_def]
    refine' ⟨_, fun i => _, fun i => _⟩
    · 

Proof state:
case refine'_1
G : PGame
x✝ : Impartial G
⊢ -G ≈ - -G

Next tactic:
rw [neg_neg]
instance impartial_neg : ∀ (G : PGame) [G.Impartial], (-G).Impartial
  | G, _ => by
    rw [impartial_def]
    refine' ⟨_, fun i => _, fun i => _⟩
    · rw [neg_neg]
      

Proof state:
case refine'_1
G : PGame
x✝ : Impartial G
⊢ -G ≈ G

Next tactic:
exact Equiv.symm (neg_equiv_self G)
instance impartial_neg : ∀ (G : PGame) [G.Impartial], (-G).Impartial
  | G, _ => by
    rw [impartial_def]
    refine' ⟨_, fun i => _, fun i => _⟩
    · rw [neg_neg]
      exact Equiv.symm (neg_equiv_self G)
    · 

Proof state:
case refine'_2
G : PGame
x✝ : Impartial G
i : LeftMoves (-G)
⊢ Impartial (moveLeft (-G) i)

Next tactic:
rw [moveLeft_neg']
instance impartial_neg : ∀ (G : PGame) [G.Impartial], (-G).Impartial
  | G, _ => by
    rw [impartial_def]
    refine' ⟨_, fun i => _, fun i => _⟩
    · rw [neg_neg]
      exact Equiv.symm (neg_equiv_self G)
    · rw [moveLeft_neg']
      

Proof state:
case refine'_2
G : PGame
x✝ : Impartial G
i : LeftMoves (-G)
⊢ Impartial (-moveRight G (toLeftMovesNeg.symm i))

Next tactic:
apply impartial_neg
instance impartial_neg : ∀ (G : PGame) [G.Impartial], (-G).Impartial
  | G, _ => by
    rw [impartial_def]
    refine' ⟨_, fun i => _, fun i => _⟩
    · rw [neg_neg]
      exact Equiv.symm (neg_equiv_self G)
    · rw [moveLeft_neg']
      apply impartial_neg
    · 

Proof state:
case refine'_3
G : PGame
x✝ : Impartial G
i : RightMoves (-G)
⊢ Impartial (moveRight (-G) i)

Next tactic:
rw [moveRight_neg']
instance impartial_neg : ∀ (G : PGame) [G.Impartial], (-G).Impartial
  | G, _ => by
    rw [impartial_def]
    refine' ⟨_, fun i => _, fun i => _⟩
    · rw [neg_neg]
      exact Equiv.symm (neg_equiv_self G)
    · rw [moveLeft_neg']
      apply impartial_neg
    · rw [moveRight_neg']
      

Proof state:
case refine'_3
G : PGame
x✝ : Impartial G
i : RightMoves (-G)
⊢ Impartial (-moveLeft G (toRightMovesNeg.symm i))

Next tactic:
apply impartial_neg
instance impartial_neg : ∀ (G : PGame) [G.Impartial], (-G).Impartial
  | G, _ => by
    rw [impartial_def]
    refine' ⟨_, fun i => _, fun i => _⟩
    · rw [neg_neg]
      exact Equiv.symm (neg_equiv_self G)
    · rw [moveLeft_neg']
      apply impartial_neg
    · rw [moveRight_neg']
      apply impartial_neg
termination_by _ G _ => G
decreasing_by 

Proof state:
G : PGame
x✝¹ : Impartial G
x✝ :
  ∀ (y : (x : PGame) ×' Impartial x),
    (invImage (fun a => PSigma.casesOn a fun G snd => G) instWellFoundedRelationPGame).1 y { fst := G, snd := x✝¹ } →
      Impartial (-y.1)
i : LeftMoves (-G)
⊢ (invImage (fun a => PSigma.casesOn a fun G snd => G) instWellFoundedRelationPGame).1
    { fst := moveRight G (toLeftMovesNeg.symm i), snd := (_ : Impartial (moveRight G (toLeftMovesNeg.symm i))) }
    { fst := G, snd := x✝¹ }

Next tactic:
pgame_wf_tac
instance impartial_neg : ∀ (G : PGame) [G.Impartial], (-G).Impartial
  | G, _ => by
    rw [impartial_def]
    refine' ⟨_, fun i => _, fun i => _⟩
    · rw [neg_neg]
      exact Equiv.symm (neg_equiv_self G)
    · rw [moveLeft_neg']
      apply impartial_neg
    · rw [moveRight_neg']
      apply impartial_neg
termination_by _ G _ => G
decreasing_by 

Proof state:
G : PGame
x✝¹ : Impartial G
x✝ :
  ∀ (y : (x : PGame) ×' Impartial x),
    (invImage (fun a => PSigma.casesOn a fun G snd => G) instWellFoundedRelationPGame).1 y { fst := G, snd := x✝¹ } →
      Impartial (-y.1)
i : RightMoves (-G)
⊢ (invImage (fun a => PSigma.casesOn a fun G snd => G) instWellFoundedRelationPGame).1
    { fst := moveLeft G (toRightMovesNeg.symm i), snd := (_ : Impartial (moveLeft G (toRightMovesNeg.symm i))) }
    { fst := G, snd := x✝¹ }

Next tactic:
pgame_wf_tac
theorem nonpos : ¬0 < G := fun h => by
  

Proof state:
G : PGame
inst✝ : Impartial G
h : 0 < G
⊢ False

Next tactic:
have h' := neg_lt_neg_iff.2 h
theorem nonpos : ¬0 < G := fun h => by
  have h' := neg_lt_neg_iff.2 h
  

Proof state:
G : PGame
inst✝ : Impartial G
h : 0 < G
h' : -G < -0
⊢ False

Next tactic:
rw [neg_zero, lt_congr_left (Equiv.symm (neg_equiv_self G))] at h'