Documentation

Mathlib.SetTheory.Surreal.Basic

Surreal numbers #

The basic theory of surreal numbers, built on top of the theory of combinatorial (pre-)games.

A pregame is Numeric if all the Left options are strictly smaller than all the Right options, and all those options are themselves numeric. In terms of combinatorial games, the numeric games have "frozen"; you can only make your position worse by playing, and Left is some definite "number" of moves ahead (or behind) Right.

A surreal number is an equivalence class of numeric pregames.

In fact, the surreals form a complete ordered field, containing a copy of the reals (and much else besides!) but we do not yet have a complete development.

Order properties #

Surreal numbers inherit the relations and < from games (Surreal.instLE and Surreal.instLT), and these relations satisfy the axioms of a partial order.

Algebraic operations #

We show that the surreals form a linear ordered commutative group.

One can also map all the ordinals into the surreals!

Multiplication of surreal numbers #

The proof that multiplication lifts to surreal numbers is surprisingly difficult and is currently missing in the library. A sample proof can be found in Theorem 3.8 in the second reference below. The difficulty lies in the length of the proof and the number of theorems that need to proven simultaneously. This will make for a fun and challenging project.

The branch surreal_mul contains some progress on this proof.

Todo #

References #

A pre-game is numeric if everything in the L set is less than everything in the R set, and all the elements of L and R are also numeric.

Equations
Instances For
    theorem SetTheory.PGame.numeric_rec {C : SetTheory.PGameProp} (H : ∀ (l r : Type u_1) (L : lSetTheory.PGame) (R : rSetTheory.PGame), (∀ (i : l) (j : r), L i < R j)(∀ (i : l), SetTheory.PGame.Numeric (L i))(∀ (i : r), SetTheory.PGame.Numeric (R i))(∀ (i : l), C (L i))(∀ (i : r), C (R i))C (SetTheory.PGame.mk l r L R)) (x : SetTheory.PGame) :

    Definition of x ≤ y on numeric pre-games, in terms of <

    Definition of x < y on numeric pre-games, in terms of

    Pre-games defined by natural numbers are numeric.

    def Surreal :
    Type (u_1 + 1)

    The type of surreal numbers. These are the numeric pre-games quotiented by the equivalence relation x ≈ y ↔ x ≤ y ∧ y ≤ x. In the quotient, the order becomes a total order.

    Equations
    Instances For

      Construct a surreal number from a numeric pre-game.

      Equations
      Instances For
        def Surreal.lift {α : Sort u_1} (f : (x : SetTheory.PGame) → SetTheory.PGame.Numeric xα) (H : ∀ {x y : SetTheory.PGame} (hx : SetTheory.PGame.Numeric x) (hy : SetTheory.PGame.Numeric y), SetTheory.PGame.Equiv x yf x hx = f y hy) :
        Surrealα

        Lift an equivalence-respecting function on pre-games to surreals.

        Equations
        Instances For
          def Surreal.lift₂ {α : Sort u_1} (f : (x : SetTheory.PGame) → (y : SetTheory.PGame) → SetTheory.PGame.Numeric xSetTheory.PGame.Numeric yα) (H : ∀ {x₁ : SetTheory.PGame} {y₁ : SetTheory.PGame} {x₂ : SetTheory.PGame} {y₂ : SetTheory.PGame} (ox₁ : SetTheory.PGame.Numeric x₁) (oy₁ : SetTheory.PGame.Numeric y₁) (ox₂ : SetTheory.PGame.Numeric x₂) (oy₂ : SetTheory.PGame.Numeric y₂), SetTheory.PGame.Equiv x₁ x₂SetTheory.PGame.Equiv y₁ y₂f x₁ y₁ ox₁ oy₁ = f x₂ y₂ ox₂ oy₂) :
          SurrealSurrealα

          Lift a binary equivalence-respecting function on pre-games to surreals.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            Equations
            • One or more equations did not get rendered due to their size.
            Equations
            • One or more equations did not get rendered due to their size.

            Addition on surreals is inherited from pre-game addition: the sum of x = {xL | xR} and y = {yL | yR} is {xL + y, x + yL | xR + y, x + yR}.

            Equations
            • One or more equations did not get rendered due to their size.

            Negation for surreal numbers is inherited from pre-game negation: the negation of {L | R} is {-R | -L}.

            Equations
            Equations
            • One or more equations did not get rendered due to their size.

            Casts a Surreal number into a Game.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              theorem Surreal.zero_toGame :
              Surreal.toGame 0 = 0
              @[simp]
              theorem Surreal.one_toGame :
              Surreal.toGame 1 = 1
              @[simp]
              theorem Surreal.nat_toGame (n : ) :
              Surreal.toGame n = n

              A small family of surreals is bounded above.

              A small set of surreals is bounded above.

              A small family of surreals is bounded below.

              A small set of surreals is bounded below.

              Converts an ordinal into the corresponding surreal.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For