Documentation

CombinatorialGames.Surreal.Real

Real numbers as games #

We define the function Real.toIGame, casting a real number to its Dedekind cut, and prove that it's an order embedding. We then define the Game and Surreal versions of this map, and prove that they are ring and field homomorphisms respectively.

TODO #

Every real number has birthday at most ω. This can be proven by showing that a real number is equivalent to its Dedekind cut where only dyadic rationals are considered. At a later point, after we have the necessary API on dyadic numbers, we might want to prove this equivalence, or even re-define real numbers as Dedekind cuts of dyadic numbers specifically.

theorem Set.neg_image {α : Type u_1} {β : Type u_2} [InvolutiveNeg α] [InvolutiveNeg β] {s : Set β} {f : βα} (h : xs, f (-x) = -f x) :
-f '' s = f '' (-s)

to IGame #

@[match_pattern]

The canonical map from to IGame, sending a real number to its Dedekind cut.

Equations
Instances For
    instance Real.Numeric.toIGame (x : ) :
    (↑x).Numeric
    @[simp]
    theorem Real.leftMoves_toIGame (x : ) :
    (↑x).leftMoves = Rat.cast '' {q : | q < x}
    @[simp]
    theorem Real.rightMoves_toIGame (x : ) :
    (↑x).rightMoves = Rat.cast '' {q : | x < q}
    theorem Real.forall_leftMoves_toIGame {P : IGameProp} {x : } :
    (∀ y(↑x).leftMoves, P y) ∀ (q : ), q < xP q
    theorem Real.exists_leftMoves_toIGame {P : IGameProp} {x : } :
    (∃ y(↑x).leftMoves, P y) ∃ (q : ), q < x P q
    theorem Real.forall_rightMoves_toIGame {P : IGameProp} {x : } :
    (∀ y(↑x).rightMoves, P y) ∀ (q : ), x < qP q
    theorem Real.exists_rightMoves_toIGame {P : IGameProp} {x : } :
    (∃ y(↑x).rightMoves, P y) ∃ (q : ), x < q P q
    theorem Real.mem_leftMoves_toIGame_of_lt {q : } {x : } (h : q < x) :
    q (↑x).leftMoves
    theorem Real.mem_rightMoves_toIGame_of_lt {q : } {x : } (h : x < q) :
    q (↑x).rightMoves
    @[simp]
    theorem Real.toIGame_le_iff {x y : } :
    x y x y
    @[simp]
    theorem Real.toIGame_lt_iff {x y : } :
    x < y x < y
    @[simp]
    theorem Real.toIGame_equiv_iff {x y : } :
    xy x = y
    @[simp]
    theorem Real.toIGame_inj {x y : } :
    x = y x = y
    @[simp]
    theorem Real.toIGame_neg (x : ) :
    ↑(-x) = -x
    theorem Real.toIGame_ratCast_equiv (q : ) :
    qq
    theorem Real.toIGame_natCast_equiv (n : ) :
    nn
    theorem Real.toIGame_intCast_equiv (n : ) :
    nn
    theorem Real.toIGame_zero_equiv :
    00
    theorem Real.toIGame_one_equiv :
    11
    @[simp]
    theorem Real.ratCast_lt_toIGame {q : } {x : } :
    q < x q < x
    @[simp]
    theorem Real.toIGame_lt_ratCast {q : } {x : } :
    x < q x < q
    @[simp]
    theorem Real.ratCast_le_toIGame {q : } {x : } :
    q x q x
    @[simp]
    theorem Real.toIGame_le_ratCast {q : } {x : } :
    x q x q
    @[simp]
    theorem Real.ratCast_equiv_toIGame {q : } {x : } :
    qx q = x
    @[simp]
    theorem Real.toIGame_equiv_ratCast {q : } {x : } :
    xq x = q
    theorem Real.toIGame_add_ratCast_equiv (x : ) (q : ) :
    ↑(x + q)x + q
    theorem Real.toIGame_ratCast_add_equiv (q : ) (x : ) :
    ↑(q + x)q + x
    theorem Real.toIGame_add_equiv (x y : ) :
    ↑(x + y)x + y
    theorem Real.toIGame_sub_ratCast_equiv (x : ) (q : ) :
    ↑(x - q)x - q
    theorem Real.toIGame_ratCast_sub_equiv (q : ) (x : ) :
    ↑(q - x)q - x
    theorem Real.toIGame_sub_equiv (x y : ) :
    ↑(x - y)x - y

    to Game #

    @[match_pattern]
    def Real.toGame (x : ) :

    The canonical map from to Game, sending a real number to its Dedekind cut.

    Equations
    Instances For
      @[simp]
      theorem Game.mk_real_toIGame (x : ) :
      mk x = x
      theorem Real.toGame_def (x : ) :
      x = {Rat.cast '' {q : | q < x} | Rat.cast '' {q : | x < q}}ᴳ
      @[simp]
      theorem Real.toGame_le_iff {x y : } :
      x y x y
      @[simp]
      theorem Real.toGame_lt_iff {x y : } :
      x < y x < y
      @[simp]
      theorem Real.toGame_equiv_iff {x y : } :
      xy x = y
      @[simp]
      theorem Real.toGame_inj {x y : } :
      x = y x = y
      @[simp]
      theorem Real.toGame_ratCast (q : ) :
      q = q
      @[simp]
      theorem Real.toGame_natCast (n : ) :
      n = n
      @[simp]
      theorem Real.toGame_intCast (n : ) :
      n = n
      @[simp]
      theorem Real.toGame_zero :
      0 = 0
      @[simp]
      theorem Real.toGame_one :
      1 = 1
      @[simp]
      theorem Real.toGame_add (x y : ) :
      ↑(x + y) = x + y
      @[simp]
      theorem Real.toGame_sub (x y : ) :
      ↑(x - y) = x - y
      @[simp]

      to Surreal #

      @[match_pattern]

      The canonical map from to Surreal, sending a real number to its Dedekind cut.

      Equations
      Instances For
        @[simp]
        theorem Surreal.mk_real_toIGame (x : ) :
        mk x = x
        theorem Real.toSurreal_def (x : ) :
        x = Surreal.ofSets (Rat.cast '' {q : | q < x}) (Rat.cast '' {q : | x < q})
        @[simp]
        theorem Real.toSurreal_le_iff {x y : } :
        x y x y
        @[simp]
        theorem Real.toSurreal_lt_iff {x y : } :
        x < y x < y
        @[simp]
        theorem Real.toSurreal_equiv_iff {x y : } :
        xy x = y
        @[simp]
        theorem Real.toSurreal_inj {x y : } :
        x = y x = y
        @[simp]
        theorem Real.toSurreal_ratCast (q : ) :
        q = q
        @[simp]
        theorem Real.toSurreal_natCast (n : ) :
        n = n
        @[simp]
        theorem Real.toSurreal_intCast (n : ) :
        n = n
        @[simp]
        theorem Real.toSurreal_zero :
        0 = 0
        @[simp]
        theorem Real.toSurreal_one :
        1 = 1
        @[simp]
        theorem Real.toSurreal_add (x y : ) :
        ↑(x + y) = x + y
        @[simp]
        theorem Real.toSurreal_sub (x y : ) :
        ↑(x - y) = x - y

        For convenience, we deal with multiplication after defining Real.toSurreal.

        theorem Real.toIGame_mul_ratCast_equiv (x : ) (q : ) :
        ↑(x * q)x * q
        theorem Real.toIGame_ratCast_mul_equiv (q : ) (x : ) :
        ↑(q * x)q * x
        theorem Real.toIGame_mul_equiv (x y : ) :
        ↑(x * y)x * y
        @[simp]
        theorem Real.toSurreal_mul (x y : ) :
        ↑(x * y) = x * y

        Real.toSurreal as an OrderRingHom.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[simp]
          theorem Real.toSurreal_inv (x : ) :
          x⁻¹ = (↑x)⁻¹
          @[simp]
          theorem Real.toSurreal_div (x y : ) :
          ↑(x / y) = x / y
          theorem Real.toIGame_inv_equiv (x : ) :
          x⁻¹(↑x)⁻¹
          theorem Real.toIGame_div_equiv (x y : ) :
          ↑(x / y)x / y