Theorem: SetTheory.PGame.nim_add_equiv_zero_iff
File: Mathlib/SetTheory/Game/Nim.lean

tactic: constructor
state_before: o₁ o₂ : Ordinal.{u_1}
⊢ nim o₁ + nim o₂ ≈ 0 ↔ o₁ = o₂
state_after: case mp
o₁ o₂ : Ordinal.{u_1}
⊢ nim o₁ + nim o₂ ≈ 0 → o₁ = o₂

case mpr
o₁ o₂ : Ordinal.{u_1}
⊢ o₁ = o₂ → nim o₁ + nim o₂ ≈ 0

tactic: refine not_imp_not.1 fun hne : _ ≠ _ => (Impartial.not_equiv_zero_iff (nim o₁ + nim o₂)).2 ?_
state_before: case mp
o₁ o₂ : Ordinal.{u_1}
⊢ nim o₁ + nim o₂ ≈ 0 → o₁ = o₂
state_after: case mp
o₁ o₂ : Ordinal.{u_1}
hne : o₁ ≠ o₂
⊢ nim o₁ + nim o₂ ‖ 0

tactic: wlog h : o₁ < o₂
state_before: case mp
o₁ o₂ : Ordinal.{u_1}
hne : o₁ ≠ o₂
⊢ nim o₁ + nim o₂ ‖ 0
state_after: case mp.inr
o₁ o₂ : Ordinal.{u_1}
hne : o₁ ≠ o₂
this : ∀ (o₁ o₂ : Ordinal.{u_1}), o₁ ≠ o₂ → o₁ < o₂ → nim o₁ + nim o₂ ‖ 0
h : ¬o₁ < o₂
⊢ nim o₁ + nim o₂ ‖ 0

o₁ o₂ : Ordinal.{u_1}
hne : o₁ ≠ o₂
h : o₁ < o₂
⊢ nim o₁ + nim o₂ ‖ 0

tactic: rw [Impartial.fuzzy_zero_iff_gf, zero_lf_le, nim_def o₂]
state_before: o₁ o₂ : Ordinal.{u_1}
hne : o₁ ≠ o₂
h : o₁ < o₂
⊢ nim o₁ + nim o₂ ‖ 0
state_after: o₁ o₂ : Ordinal.{u_1}
hne : o₁ ≠ o₂
h : o₁ < o₂
⊢ ∃ i,
    0 ≤
      (nim o₁ +
            mk (Quotient.out o₂).α (Quotient.out o₂).α (fun o₂_1 => nim (typein (fun x x_1 => x < x_1) o₂_1))
              fun o₂_1 => nim (typein (fun x x_1 => x < x_1) o₂_1)).moveLeft
        i

tactic: refine ⟨toLeftMovesAdd (Sum.inr ?_), ?_⟩
state_before: o₁ o₂ : Ordinal.{u_1}
hne : o₁ ≠ o₂
h : o₁ < o₂
⊢ ∃ i,
    0 ≤
      (nim o₁ +
            mk (Quotient.out o₂).α (Quotient.out o₂).α (fun o₂_1 => nim (typein (fun x x_1 => x < x_1) o₂_1))
              fun o₂_1 => nim (typein (fun x x_1 => x < x_1) o₂_1)).moveLeft
        i
state_after: case refine_1
o₁ o₂ : Ordinal.{u_1}
hne : o₁ ≠ o₂
h : o₁ < o₂
⊢ (mk (Quotient.out o₂).α (Quotient.out o₂).α (fun o₂_1 => nim (typein (fun x x_1 => x < x_1) o₂_1)) fun o₂_1 =>
      nim (typein (fun x x_1 => x < x_1) o₂_1)).LeftMoves

case refine_2
o₁ o₂ : Ordinal.{u_1}
hne : o₁ ≠ o₂
h : o₁ < o₂
⊢ 0 ≤
    (nim o₁ +
          mk (Quotient.out o₂).α (Quotient.out o₂).α (fun o₂_1 => nim (typein (fun x x_1 => x < x_1) o₂_1)) fun o₂_1 =>
            nim (typein (fun x x_1 => x < x_1) o₂_1)).moveLeft
      (toLeftMovesAdd (Sum.inr ?refine_1))

tactic: exact (fuzzy_congr_left add_comm_equiv).1 (this _ _ hne.symm (hne.lt_or_lt.resolve_left h))
state_before: case mp.inr
o₁ o₂ : Ordinal.{u_1}
hne : o₁ ≠ o₂
this : ∀ (o₁ o₂ : Ordinal.{u_1}), o₁ ≠ o₂ → o₁ < o₂ → nim o₁ + nim o₂ ‖ 0
h : ¬o₁ < o₂
⊢ nim o₁ + nim o₂ ‖ 0
state_after: no goals

tactic: exact (Ordinal.principalSegOut h).top
state_before: case refine_1
o₁ o₂ : Ordinal.{u_1}
hne : o₁ ≠ o₂
h : o₁ < o₂
⊢ (mk (Quotient.out o₂).α (Quotient.out o₂).α (fun o₂_1 => nim (typein (fun x x_1 => x < x_1) o₂_1)) fun o₂_1 =>
      nim (typein (fun x x_1 => x < x_1) o₂_1)).LeftMoves
state_after: no goals

tactic: simpa only [Ordinal.typein_top, Ordinal.type_lt, PGame.add_moveLeft_inr, PGame.moveLeft_mk]
  using (Impartial.add_self (nim o₁)).2
state_before: case refine_2
o₁ o₂ : Ordinal.{u_1}
hne : o₁ ≠ o₂
h : o₁ < o₂
⊢ 0 ≤
    (nim o₁ +
          mk (Quotient.out o₂).α (Quotient.out o₂).α (fun o₂_1 => nim (typein (fun x x_1 => x < x_1) o₂_1)) fun o₂_1 =>
            nim (typein (fun x x_1 => x < x_1) o₂_1)).moveLeft
      (toLeftMovesAdd (Sum.inr (principalSegOut h).top))
state_after: no goals

tactic: rintro rfl
state_before: case mpr
o₁ o₂ : Ordinal.{u_1}
⊢ o₁ = o₂ → nim o₁ + nim o₂ ≈ 0
state_after: case mpr
o₁ : Ordinal.{u_1}
⊢ nim o₁ + nim o₁ ≈ 0

tactic: exact Impartial.add_self (nim o₁)
state_before: case mpr
o₁ : Ordinal.{u_1}
⊢ nim o₁ + nim o₁ ≈ 0
state_after: no goals