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.PGame → Prop} (H : ∀ (l r : Type u_1) (L : l → SetTheory.PGame) (R : r → SetTheory.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 y → f 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 x → SetTheory.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₂) :
          Surreal → Surreal → α

          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

              Converts an ordinal into the corresponding surreal.

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