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 #

Prove that every real number has birthday at most ω.

theorem exists_div_btwn {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] [Archimedean K] {x y : K} {n : } (h : x < y) (nh : (y - x)⁻¹ < n) :
∃ (z : ), x < z / n z / n < y
theorem exists_dyadic_btwn {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] [Archimedean K] {x y : K} (h : x < y) :
∃ (q : Dyadic), x < q q < y

to IGame #

@[match_pattern]

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

Equations
Instances For
    instance Real.Numeric.toIGame (x : ) :
    (↑x).Numeric
    @[simp]
    theorem Real.leftMoves_toIGame (x : ) :
    (↑x).leftMoves = Dyadic.toIGame '' {q : Dyadic | q < x}
    @[simp]
    theorem Real.rightMoves_toIGame (x : ) :
    (↑x).rightMoves = Dyadic.toIGame '' {q : Dyadic | x < q}
    theorem Real.forall_leftMoves_toIGame {P : IGameProp} {x : } :
    (∀ y(↑x).leftMoves, P y) ∀ (q : Dyadic), q < xP q
    theorem Real.exists_leftMoves_toIGame {P : IGameProp} {x : } :
    (∃ y(↑x).leftMoves, P y) ∃ (q : Dyadic), q < x P q
    theorem Real.forall_rightMoves_toIGame {P : IGameProp} {x : } :
    (∀ y(↑x).rightMoves, P y) ∀ (q : Dyadic), x < qP q
    theorem Real.exists_rightMoves_toIGame {P : IGameProp} {x : } :
    (∃ y(↑x).rightMoves, P y) ∃ (q : Dyadic), x < q P q
    theorem Real.mem_leftMoves_toIGame_of_lt {q : Dyadic} {x : } (h : q < x) :
    q (↑x).leftMoves
    theorem Real.mem_rightMoves_toIGame_of_lt {q : Dyadic} {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_dyadic_equiv (q : Dyadic) :
    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_dyadic_equiv (x : ) (q : Dyadic) :
    ↑(x + q)x + q
    theorem Real.toIGame_dyadic_add_equiv (q : Dyadic) (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_dyadic_equiv (x : ) (q : Dyadic) :
    ↑(x - q)x - q
    theorem Real.toIGame_dyadic_sub_equiv (q : Dyadic) (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 = {(fun (x : Dyadic) => x) '' {q : Dyadic | q < x} | (fun (x : Dyadic) => x) '' {q : Dyadic | 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
        @[simp]
        theorem Real.toGame_toSurreal (x : ) :
        Surreal.toGame x = x
        theorem Real.toSurreal_def (x : ) :
        x = Surreal.ofSets ((fun (x : Dyadic) => x) '' {q : Dyadic | q < x}) ((fun (x : Dyadic) => x) '' {q : Dyadic | 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_ofNat (n : ) [n.AtLeastTwo] :
        (OfNat.ofNat 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_neg (x : ) :
        ↑(-x) = -x
        @[simp]
        theorem Real.toSurreal_add (x y : ) :
        ↑(x + y) = x + y
        @[simp]
        theorem Real.toSurreal_sub (x y : ) :
        ↑(x - y) = x - y
        @[simp]
        theorem Real.toSurreal_max (x y : ) :
        (max x y) = max x y
        @[simp]
        theorem Real.toSurreal_min (x y : ) :
        (min x y) = min x y
        @[simp]
        theorem Real.toSurreal_abs (x : ) :
        |x| = |x|

        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

          Simp lemmas #

          Dyadic #

          @[simp]
          theorem Real.dyadic_lt_toIGame {q : Dyadic} {x : } :
          q < x q < x
          @[simp]
          theorem Real.toIGame_lt_dyadic {q : Dyadic} {x : } :
          x < q x < q
          @[simp]
          theorem Real.dyadic_le_toIGame {q : Dyadic} {x : } :
          q x q x
          @[simp]
          theorem Real.toIGame_le_dyadic {q : Dyadic} {x : } :
          x q x q
          @[simp]
          theorem Real.dyadic_equiv_toIGame {q : Dyadic} {x : } :
          qx q = x
          @[simp]
          theorem Real.toIGame_equiv_dyadic {q : Dyadic} {x : } :
          xq x = q

          #

          @[simp]
          theorem Real.toIGame_lt_intCast {x : } {y : } :
          x < y x < y
          @[simp]
          theorem Real.toIGame_le_intCast {x : } {y : } :
          x y x y
          @[simp]
          theorem Real.intCast_lt_toIGame {x : } {y : } :
          x < y x < y
          @[simp]
          theorem Real.intCast_le_toIGame {x : } {y : } :
          x y x y
          @[simp]
          theorem Real.toIGame_equiv_intCast {x : } {y : } :
          xy x = y
          @[simp]
          theorem Real.intCast_equiv_toIGame {x : } {y : } :
          xy x = y

          #

          @[simp]
          theorem Real.toIGame_lt_natCast {x : } {y : } :
          x < y x < y
          @[simp]
          theorem Real.toIGame_le_natCast {x : } {y : } :
          x y x y
          @[simp]
          theorem Real.natCast_lt_toIGame {x : } {y : } :
          x < y x < y
          @[simp]
          theorem Real.natCast_le_toIGame {x : } {y : } :
          x y x y
          @[simp]
          theorem Real.toIGame_equiv_natCast {x : } {y : } :
          xy x = y
          @[simp]
          theorem Real.natCast_equiv_toIGame {x : } {y : } :
          xy x = y

          0 #

          @[simp]
          theorem Real.toIGame_lt_zero {x : } :
          x < 0 x < 0
          @[simp]
          theorem Real.toIGame_le_zero {x : } :
          x 0 x 0
          @[simp]
          theorem Real.zero_lt_toIGame {x : } :
          0 < x 0 < x
          @[simp]
          theorem Real.zero_le_toIGame {x : } :
          0 x 0 x
          @[simp]
          theorem Real.toIGame_equiv_zero {x : } :
          x0 x = 0
          @[simp]
          theorem Real.zero_equiv_toIGame {x : } :
          0x 0 = x

          1 #

          @[simp]
          theorem Real.toIGame_lt_one {x : } :
          x < 1 x < 1
          @[simp]
          theorem Real.toIGame_le_one {x : } :
          x 1 x 1
          @[simp]
          theorem Real.one_lt_toIGame {x : } :
          1 < x 1 < x
          @[simp]
          theorem Real.one_le_toIGame {x : } :
          1 x 1 x
          @[simp]
          theorem Real.toIGame_equiv_one {x : } :
          x1 x = 1
          @[simp]
          theorem Real.one_equiv_toIGame {x : } :
          1x 1 = x