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 #
In this file, we show that the surreals form a linear ordered commutative group.
In Mathlib.SetTheory.Surreal.Multiplication
, we define multiplication and show that the
surreals form a linear ordered commutative ring.
One can also map all the ordinals into the surreals!
TODO #
- Define the field structure on the surreals.
References #
- [Conway, On numbers and games][Conway2001]
- [Schleicher, Stoll, An introduction to Conway's games and numbers][SchleicherStoll]
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
- (SetTheory.PGame.mk α β L R).Numeric = ((∀ (i : α) (j : β), L i < R j) ∧ (∀ (i : α), (L i).Numeric) ∧ ∀ (j : β), (R j).Numeric)
Instances For
Relabellings preserve being numeric.
Alias of SetTheory.PGame.le_of_lf
.
Alias of SetTheory.PGame.lt_of_lf
.
Definition of x ≤ y
on numeric pre-games, in terms of <
Definition of x < y
on numeric pre-games, in terms of ≤
The definition of x < y
on numeric pre-games, in terms of <
two moves later.
Inserting a smaller numeric left option into a numeric game results in a numeric game.
Inserting a larger numeric right option into a numeric game results in a numeric game.
Pre-games defined by natural numbers are numeric.
Ordinal games are numeric.
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
Equations
- Surreal.instZero = { zero := Surreal.mk 0 SetTheory.PGame.numeric_zero }
Equations
- Surreal.instOne = { one := Surreal.mk 1 SetTheory.PGame.numeric_one }
Equations
- Surreal.instInhabited = { default := 0 }
Lift an equivalence-respecting function on pre-games to surreals.
Equations
- Surreal.lift f H = Quotient.lift (fun (x : { x : SetTheory.PGame // x.Numeric }) => f ↑x ⋯) ⋯
Instances For
Lift a binary equivalence-respecting function on pre-games to surreals.
Equations
- Surreal.lift₂ f H = Surreal.lift (fun (x : SetTheory.PGame) (ox : x.Numeric) => Surreal.lift (fun (y : SetTheory.PGame) (oy : y.Numeric) => f x y ox oy) ⋯) ⋯
Instances For
Equations
- Surreal.instLE = { le := Surreal.lift₂ (fun (x y : SetTheory.PGame) (x_1 : x.Numeric) (x_2 : y.Numeric) => x ≤ y) @Surreal.instLE.proof_1 }
Equations
- Surreal.instLT = { lt := Surreal.lift₂ (fun (x y : SetTheory.PGame) (x_1 : x.Numeric) (x_2 : y.Numeric) => x < y) @Surreal.instLT.proof_1 }
Same as moveLeft_lt
, but for Surreal
instead of PGame
Same as lt_moveRight
, but for Surreal
instead of PGame
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
- Surreal.instAdd = { add := Surreal.lift₂ (fun (x y : SetTheory.PGame) (ox : x.Numeric) (oy : y.Numeric) => ⟦⟨x + y, ⋯⟩⟧) @Surreal.instAdd.proof_1 }
Negation for surreal numbers is inherited from pre-game negation:
the negation of {L | R}
is {-R | -L}
.
Equations
- Surreal.instNeg = { neg := Surreal.lift (fun (x : SetTheory.PGame) (ox : x.Numeric) => ⟦⟨-x, ⋯⟩⟧) @Surreal.instNeg.proof_1 }
Equations
- One or more equations did not get rendered due to their size.
Equations
- Surreal.instAddMonoidWithOne = AddMonoidWithOne.unary
Casts a Surreal
number into a Game
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
- Ordinal.toSurreal = { toFun := fun (o : Ordinal.{?u.8}) => Surreal.mk o.toPGame ⋯, inj' := Ordinal.toSurreal.proof_1, map_rel_iff' := @Ordinal.toPGame_le_iff }