File: Mathlib/SetTheory/Game/Ordinal.lean

full_name: Ordinal.toPGame
code: /-- Converts an ordinal into the corresponding pre-game. -/
noncomputable def toPGame : Ordinal.{u} → PGame.{u}
  
goal: Ordinal.{u} → SetTheory.PGame

full_name: Ordinal.toPGame_def
code: @[nolint unusedHavesSuffices]
theorem toPGame_def (o : Ordinal) :
    have : IsWellOrder o.out.α (· < ·) := isWellOrder_out_lt o
    o.toPGame = ⟨o.out.α, PEmpty, fun x => (typein (· < ·) x).toPGame, PEmpty.elim⟩ 
goal: let_fun this := ⋯;
o.toPGame =
  SetTheory.PGame.mk (Quotient.out o).α PEmpty.{u_1 + 1} (fun x => (Ordinal.typein (fun x x_1 => x < x_1) x).toPGame)
    PEmpty.elim

full_name: Ordinal.toPGame_leftMoves
code: @[simp, nolint unusedHavesSuffices]
theorem toPGame_leftMoves (o : Ordinal) : o.toPGame.LeftMoves = o.out.α 
goal: o.toPGame.LeftMoves = (Quotient.out o).α

full_name: Ordinal.toPGame_rightMoves
code: @[simp, nolint unusedHavesSuffices]
theorem toPGame_rightMoves (o : Ordinal) : o.toPGame.RightMoves = PEmpty 
goal: o.toPGame.RightMoves = PEmpty.{u_1 + 1}

full_name: Ordinal.isEmpty_zero_toPGame_leftMoves
code: instance isEmpty_zero_toPGame_leftMoves : IsEmpty (toPGame 0).LeftMoves 
goal: IsEmpty (Ordinal.toPGame 0).LeftMoves

full_name: Ordinal.isEmpty_toPGame_rightMoves
code: instance isEmpty_toPGame_rightMoves (o : Ordinal) : IsEmpty o.toPGame.RightMoves 
goal: IsEmpty o.toPGame.RightMoves

full_name: Ordinal.toLeftMovesToPGame
code: /-- Converts an ordinal less than `o` into a move for the `PGame` corresponding to `o`, and vice
versa. -/
noncomputable def toLeftMovesToPGame {o : Ordinal} : Set.Iio o ≃ o.toPGame.LeftMoves 
goal: ↑(Set.Iio o) ≃ o.toPGame.LeftMoves

full_name: Ordinal.toLeftMovesToPGame_symm_lt
code: @[simp]
theorem toLeftMovesToPGame_symm_lt {o : Ordinal} (i : o.toPGame.LeftMoves) :
    ↑(toLeftMovesToPGame.symm i) < o 
goal: ↑(Ordinal.toLeftMovesToPGame.symm i) < o

full_name: Ordinal.toPGame_moveLeft_hEq
code: @[nolint unusedHavesSuffices]
theorem toPGame_moveLeft_hEq {o : Ordinal} :
    have : IsWellOrder o.out.α (· < ·) := isWellOrder_out_lt o
    HEq o.toPGame.moveLeft fun x : o.out.α => (typein (· < ·) x).toPGame 
goal: let_fun this := ⋯;
HEq o.toPGame.moveLeft fun x => (Ordinal.typein (fun x x_1 => x < x_1) x).toPGame

full_name: Ordinal.toPGame_moveLeft'
code: @[simp]
theorem toPGame_moveLeft' {o : Ordinal} (i) :
    o.toPGame.moveLeft i = (toLeftMovesToPGame.symm i).val.toPGame 
goal: o.toPGame.moveLeft i = (↑(Ordinal.toLeftMovesToPGame.symm i)).toPGame

full_name: Ordinal.toPGame_moveLeft
code: theorem toPGame_moveLeft {o : Ordinal} (i) :
    o.toPGame.moveLeft (toLeftMovesToPGame i) = i.val.toPGame 
goal: o.toPGame.moveLeft (Ordinal.toLeftMovesToPGame i) = (↑i).toPGame

full_name: Ordinal.zeroToPGameRelabelling
code: /-- `0.toPGame` has the same moves as `0`. -/
noncomputable def zeroToPGameRelabelling : toPGame 0 ≡r 0 
goal: Ordinal.toPGame 0 ≡r 0

full_name: Ordinal.uniqueOneToPGameLeftMoves
code: noncomputable instance uniqueOneToPGameLeftMoves : Unique (toPGame 1).LeftMoves 
goal: Unique (Ordinal.toPGame 1).LeftMoves

full_name: Ordinal.one_toPGame_leftMoves_default_eq
code: @[simp]
theorem one_toPGame_leftMoves_default_eq :
    (default : (toPGame 1).LeftMoves) = @toLeftMovesToPGame 1 ⟨0, Set.mem_Iio.mpr zero_lt_one⟩ 
goal: default = Ordinal.toLeftMovesToPGame ⟨0, ⋯⟩

full_name: Ordinal.to_leftMoves_one_toPGame_symm
code: @[simp]
theorem to_leftMoves_one_toPGame_symm (i) :
    (@toLeftMovesToPGame 1).symm i = ⟨0, Set.mem_Iio.mpr zero_lt_one⟩ 
goal: Ordinal.toLeftMovesToPGame.symm i = ⟨0, ⋯⟩

full_name: Ordinal.one_toPGame_moveLeft
code: theorem one_toPGame_moveLeft (x) : (toPGame 1).moveLeft x = toPGame 0 
goal: (Ordinal.toPGame 1).moveLeft x = Ordinal.toPGame 0

full_name: Ordinal.oneToPGameRelabelling
code: /-- `1.toPGame` has the same moves as `1`. -/
noncomputable def oneToPGameRelabelling : toPGame 1 ≡r 1 
goal: Ordinal.toPGame 1 ≡r 1

full_name: Ordinal.toPGame_lf
code: theorem toPGame_lf {a b : Ordinal} (h : a < b) : a.toPGame ⧏ b.toPGame 
goal: a.toPGame ⧏ b.toPGame

full_name: Ordinal.toPGame_le
code: theorem toPGame_le {a b : Ordinal} (h : a ≤ b) : a.toPGame ≤ b.toPGame 
goal: a.toPGame ≤ b.toPGame

full_name: Ordinal.toPGame_lt
code: theorem toPGame_lt {a b : Ordinal} (h : a < b) : a.toPGame < b.toPGame 
goal: a.toPGame < b.toPGame

full_name: Ordinal.toPGame_nonneg
code: theorem toPGame_nonneg (a : Ordinal) : 0 ≤ a.toPGame 
goal: 0 ≤ a.toPGame

full_name: Ordinal.toPGame_lf_iff
code: @[simp]
theorem toPGame_lf_iff {a b : Ordinal} : a.toPGame ⧏ b.toPGame ↔ a < b 
goal: a.toPGame ⧏ b.toPGame ↔ a < b

full_name: Ordinal.toPGame_le_iff
code: @[simp]
theorem toPGame_le_iff {a b : Ordinal} : a.toPGame ≤ b.toPGame ↔ a ≤ b 
goal: a.toPGame ≤ b.toPGame ↔ a ≤ b

full_name: Ordinal.toPGame_lt_iff
code: @[simp]
theorem toPGame_lt_iff {a b : Ordinal} : a.toPGame < b.toPGame ↔ a < b 
goal: a.toPGame < b.toPGame ↔ a < b

full_name: Ordinal.toPGame_equiv_iff
code: @[simp]
theorem toPGame_equiv_iff {a b : Ordinal} : (a.toPGame ≈ b.toPGame) ↔ a = b 
goal: a.toPGame ≈ b.toPGame ↔ a = b

full_name: Ordinal.toPGame_injective
code: theorem toPGame_injective : Function.Injective Ordinal.toPGame 
goal: Function.Injective Ordinal.toPGame

full_name: Ordinal.toPGame_eq_iff
code: @[simp]
theorem toPGame_eq_iff {a b : Ordinal} : a.toPGame = b.toPGame ↔ a = b 
goal: a.toPGame = b.toPGame ↔ a = b

full_name: Ordinal.toPGameEmbedding
code: /-- The order embedding version of `toPGame`. -/
@[simps]
noncomputable def toPGameEmbedding : Ordinal.{u} ↪o PGame.{u} 
goal: Ordinal.{u} ↪o SetTheory.PGame

full_name: Ordinal.toPGameEmbedding_apply
code: /-- The order embedding version of `toPGame`. -/
@[simps]
noncomputable def toPGameEmbedding : Ordinal.{u} ↪o PGame.{u} 
goal: ∀ (a : Ordinal.{u}), Ordinal.toPGameEmbedding a = a.toPGame

full_name: Ordinal.toPGame_add
code: /-- The sum of ordinals as games corresponds to natural addition of ordinals. -/
theorem toPGame_add : ∀ a b : Ordinal.{u}, a.toPGame + b.toPGame ≈ (a ♯ b).toPGame
  
goal: a.toPGame + b.toPGame ≈ (a ♯ b).toPGame

full_name: Ordinal.toPGame_add_mk'
code: @[simp]
theorem toPGame_add_mk' (a b : Ordinal) : (⟦a.toPGame⟧ + ⟦b.toPGame⟧ : Game) = ⟦(a ♯ b).toPGame⟧ 
goal: ⟦a.toPGame⟧ + ⟦b.toPGame⟧ = ⟦(a ♯ b).toPGame⟧