Theorem: Ordinal.toPGame_add
File: Mathlib/SetTheory/Game/Ordinal.lean

tactic: refine ⟨le_of_forall_lf (fun i => ?_) isEmptyElim, le_of_forall_lf (fun i => ?_) isEmptyElim⟩
state_before: a b : Ordinal.{u}
⊢ a.toPGame + b.toPGame ≈ (a ♯ b).toPGame
state_after: case refine_1
a b : Ordinal.{u}
i : (a.toPGame + b.toPGame).LeftMoves
⊢ (a.toPGame + b.toPGame).moveLeft i ⧏ (a ♯ b).toPGame

case refine_2
a b : Ordinal.{u}
i : (a ♯ b).toPGame.LeftMoves
⊢ (a ♯ b).toPGame.moveLeft i ⧏ a.toPGame + b.toPGame

tactic: apply leftMoves_add_cases i <;>
intro i <;>
let wf := toLeftMovesToPGame_symm_lt i <;>
(try rw [add_moveLeft_inl]) <;>
(try rw [add_moveLeft_inr]) <;>
rw [toPGame_moveLeft', lf_congr_left (toPGame_add _ _), toPGame_lf_iff]
state_before: case refine_1
a b : Ordinal.{u}
i : (a.toPGame + b.toPGame).LeftMoves
⊢ (a.toPGame + b.toPGame).moveLeft i ⧏ (a ♯ b).toPGame
state_after: case refine_1.hl
a b : Ordinal.{u}
i✝ : (a.toPGame + b.toPGame).LeftMoves
i : a.toPGame.LeftMoves
wf : ↑(toLeftMovesToPGame.symm i) < a := toLeftMovesToPGame_symm_lt i
⊢ ↑(toLeftMovesToPGame.symm i) ♯ b < a ♯ b

case refine_1.hr
a b : Ordinal.{u}
i✝ : (a.toPGame + b.toPGame).LeftMoves
i : b.toPGame.LeftMoves
wf : ↑(toLeftMovesToPGame.symm i) < b := toLeftMovesToPGame_symm_lt i
⊢ a ♯ ↑(toLeftMovesToPGame.symm i) < a ♯ b

tactic: try rw [add_moveLeft_inl]
state_before: case refine_1.hl
a b : Ordinal.{u}
i✝ : (a.toPGame + b.toPGame).LeftMoves
i : a.toPGame.LeftMoves
wf : ↑(toLeftMovesToPGame.symm i) < a := toLeftMovesToPGame_symm_lt i
⊢ (a.toPGame + b.toPGame).moveLeft (toLeftMovesAdd (Sum.inl i)) ⧏ (a ♯ b).toPGame
state_after: case refine_1.hl
a b : Ordinal.{u}
i✝ : (a.toPGame + b.toPGame).LeftMoves
i : a.toPGame.LeftMoves
wf : ↑(toLeftMovesToPGame.symm i) < a := toLeftMovesToPGame_symm_lt i
⊢ a.toPGame.moveLeft i + b.toPGame ⧏ (a ♯ b).toPGame

tactic: rw [add_moveLeft_inl]
state_before: case refine_1.hl
a b : Ordinal.{u}
i✝ : (a.toPGame + b.toPGame).LeftMoves
i : a.toPGame.LeftMoves
wf : ↑(toLeftMovesToPGame.symm i) < a := toLeftMovesToPGame_symm_lt i
⊢ (a.toPGame + b.toPGame).moveLeft (toLeftMovesAdd (Sum.inl i)) ⧏ (a ♯ b).toPGame
state_after: case refine_1.hl
a b : Ordinal.{u}
i✝ : (a.toPGame + b.toPGame).LeftMoves
i : a.toPGame.LeftMoves
wf : ↑(toLeftMovesToPGame.symm i) < a := toLeftMovesToPGame_symm_lt i
⊢ a.toPGame.moveLeft i + b.toPGame ⧏ (a ♯ b).toPGame

tactic: try rw [add_moveLeft_inr]
state_before: case refine_1.hr
a b : Ordinal.{u}
i✝ : (a.toPGame + b.toPGame).LeftMoves
i : b.toPGame.LeftMoves
wf : ↑(toLeftMovesToPGame.symm i) < b := toLeftMovesToPGame_symm_lt i
⊢ (a.toPGame + b.toPGame).moveLeft (toLeftMovesAdd (Sum.inr i)) ⧏ (a ♯ b).toPGame
state_after: case refine_1.hr
a b : Ordinal.{u}
i✝ : (a.toPGame + b.toPGame).LeftMoves
i : b.toPGame.LeftMoves
wf : ↑(toLeftMovesToPGame.symm i) < b := toLeftMovesToPGame_symm_lt i
⊢ a.toPGame + b.toPGame.moveLeft i ⧏ (a ♯ b).toPGame

tactic: rw [add_moveLeft_inr]
state_before: case refine_1.hr
a b : Ordinal.{u}
i✝ : (a.toPGame + b.toPGame).LeftMoves
i : b.toPGame.LeftMoves
wf : ↑(toLeftMovesToPGame.symm i) < b := toLeftMovesToPGame_symm_lt i
⊢ (a.toPGame + b.toPGame).moveLeft (toLeftMovesAdd (Sum.inr i)) ⧏ (a ♯ b).toPGame
state_after: case refine_1.hr
a b : Ordinal.{u}
i✝ : (a.toPGame + b.toPGame).LeftMoves
i : b.toPGame.LeftMoves
wf : ↑(toLeftMovesToPGame.symm i) < b := toLeftMovesToPGame_symm_lt i
⊢ a.toPGame + b.toPGame.moveLeft i ⧏ (a ♯ b).toPGame

tactic: exact nadd_lt_nadd_right wf _
state_before: case refine_1.hl
a b : Ordinal.{u}
i✝ : (a.toPGame + b.toPGame).LeftMoves
i : a.toPGame.LeftMoves
wf : ↑(toLeftMovesToPGame.symm i) < a := toLeftMovesToPGame_symm_lt i
⊢ ↑(toLeftMovesToPGame.symm i) ♯ b < a ♯ b
state_after: no goals

tactic: exact nadd_lt_nadd_left wf _
state_before: case refine_1.hr
a b : Ordinal.{u}
i✝ : (a.toPGame + b.toPGame).LeftMoves
i : b.toPGame.LeftMoves
wf : ↑(toLeftMovesToPGame.symm i) < b := toLeftMovesToPGame_symm_lt i
⊢ a ♯ ↑(toLeftMovesToPGame.symm i) < a ♯ b
state_after: no goals

tactic: rw [toPGame_moveLeft']
state_before: case refine_2
a b : Ordinal.{u}
i : (a ♯ b).toPGame.LeftMoves
⊢ (a ♯ b).toPGame.moveLeft i ⧏ a.toPGame + b.toPGame
state_after: case refine_2
a b : Ordinal.{u}
i : (a ♯ b).toPGame.LeftMoves
⊢ (↑(toLeftMovesToPGame.symm i)).toPGame ⧏ a.toPGame + b.toPGame

tactic: rcases lt_nadd_iff.1 (toLeftMovesToPGame_symm_lt i) with (⟨c, hc, hc'⟩ | ⟨c, hc, hc'⟩) <;>
rw [← toPGame_le_iff, ← le_congr_right (toPGame_add _ _)] at hc' <;>
apply lf_of_le_of_lf hc'
state_before: case refine_2
a b : Ordinal.{u}
i : (a ♯ b).toPGame.LeftMoves
⊢ (↑(toLeftMovesToPGame.symm i)).toPGame ⧏ a.toPGame + b.toPGame
state_after: case refine_2.inl.intro.intro
a b : Ordinal.{u}
i : (a ♯ b).toPGame.LeftMoves
c : Ordinal.{u}
hc : c < a
hc' : (↑(toLeftMovesToPGame.symm i)).toPGame ≤ c.toPGame + b.toPGame
⊢ c.toPGame + b.toPGame ⧏ a.toPGame + b.toPGame

case refine_2.inr.intro.intro
a b : Ordinal.{u}
i : (a ♯ b).toPGame.LeftMoves
c : Ordinal.{u}
hc : c < b
hc' : (↑(toLeftMovesToPGame.symm i)).toPGame ≤ a.toPGame + c.toPGame
⊢ a.toPGame + c.toPGame ⧏ a.toPGame + b.toPGame

tactic: apply add_lf_add_right
state_before: case refine_2.inl.intro.intro
a b : Ordinal.{u}
i : (a ♯ b).toPGame.LeftMoves
c : Ordinal.{u}
hc : c < a
hc' : (↑(toLeftMovesToPGame.symm i)).toPGame ≤ c.toPGame + b.toPGame
⊢ c.toPGame + b.toPGame ⧏ a.toPGame + b.toPGame
state_after: case refine_2.inl.intro.intro.h
a b : Ordinal.{u}
i : (a ♯ b).toPGame.LeftMoves
c : Ordinal.{u}
hc : c < a
hc' : (↑(toLeftMovesToPGame.symm i)).toPGame ≤ c.toPGame + b.toPGame
⊢ c.toPGame ⧏ a.toPGame

tactic: rwa [toPGame_lf_iff]
state_before: case refine_2.inl.intro.intro.h
a b : Ordinal.{u}
i : (a ♯ b).toPGame.LeftMoves
c : Ordinal.{u}
hc : c < a
hc' : (↑(toLeftMovesToPGame.symm i)).toPGame ≤ c.toPGame + b.toPGame
⊢ c.toPGame ⧏ a.toPGame
state_after: no goals

tactic: apply add_lf_add_left
state_before: case refine_2.inr.intro.intro
a b : Ordinal.{u}
i : (a ♯ b).toPGame.LeftMoves
c : Ordinal.{u}
hc : c < b
hc' : (↑(toLeftMovesToPGame.symm i)).toPGame ≤ a.toPGame + c.toPGame
⊢ a.toPGame + c.toPGame ⧏ a.toPGame + b.toPGame
state_after: case refine_2.inr.intro.intro.h
a b : Ordinal.{u}
i : (a ♯ b).toPGame.LeftMoves
c : Ordinal.{u}
hc : c < b
hc' : (↑(toLeftMovesToPGame.symm i)).toPGame ≤ a.toPGame + c.toPGame
⊢ c.toPGame ⧏ b.toPGame

tactic: rwa [toPGame_lf_iff]
state_before: case refine_2.inr.intro.intro.h
a b : Ordinal.{u}
i : (a ♯ b).toPGame.LeftMoves
c : Ordinal.{u}
hc : c < b
hc' : (↑(toLeftMovesToPGame.symm i)).toPGame ≤ a.toPGame + c.toPGame
⊢ c.toPGame ⧏ b.toPGame
state_after: no goals