Skip to content

Commit cdb5bd6

Browse files
committed
feat(SetTheory/Surreal/Basic): add some lemmas for Surreal.mk (#14600)
add some lemmas for Surreal.mk
1 parent 2d55389 commit cdb5bd6

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Mathlib/SetTheory/Surreal/Basic.lean

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,10 @@ instance : One Surreal :=
321321
instance : Inhabited Surreal :=
322322
0
323323

324+
lemma mk_eq_mk {x y : PGame.{u}} {hx hy} : mk x hx = mk y hy ↔ x ≈ y := Quotient.eq
325+
326+
lemma mk_eq_zero {x : PGame.{u}} {hx} : mk x hx = 0 ↔ x ≈ 0 := Quotient.eq
327+
324328
/-- Lift an equivalence-respecting function on pre-games to surreals. -/
325329
def lift {α} (f : ∀ x, Numeric x → α)
326330
(H : ∀ {x y} (hx : Numeric x) (hy : Numeric y), x.Equiv y → f x hx = f y hy) : Surreal → α :=
@@ -344,10 +348,24 @@ instance instLE : LE Surreal :=
344348
@[simp]
345349
lemma mk_le_mk {x y : PGame.{u}} {hx hy} : mk x hx ≤ mk y hy ↔ x ≤ y := Iff.rfl
346350

351+
lemma zero_le_mk {x : PGame.{u}} {hx} : 0 ≤ mk x hx ↔ 0 ≤ x := Iff.rfl
352+
347353
instance instLT : LT Surreal :=
348354
⟨lift₂ (fun x y _ _ => x < y) fun _ _ _ _ hx hy => propext (lt_congr hx hy)⟩
349355
#align surreal.has_lt Surreal.instLT
350356

357+
lemma mk_lt_mk {x y : PGame.{u}} {hx hy} : mk x hx < mk y hy ↔ x < y := Iff.rfl
358+
359+
lemma zero_lt_mk {x : PGame.{u}} {hx} : 0 < mk x hx ↔ 0 < x := Iff.rfl
360+
361+
/-- Same as `moveLeft_lt`, but for `Surreal` instead of `PGame` -/
362+
theorem mk_moveLeft_lt_mk {x : PGame} (o : Numeric x) (i) :
363+
Surreal.mk (x.moveLeft i) (Numeric.moveLeft o i) < Surreal.mk x o := Numeric.moveLeft_lt o i
364+
365+
/-- Same as `lt_moveRight`, but for `Surreal` instead of `PGame` -/
366+
theorem mk_lt_mk_moveRight {x : PGame} (o : Numeric x) (j) :
367+
Surreal.mk x o < Surreal.mk (x.moveRight j) (Numeric.moveRight o j) := Numeric.lt_moveRight o j
368+
351369
/-- Addition on surreals is inherited from pre-game addition:
352370
the sum of `x = {xL | xR}` and `y = {yL | yR}` is `{xL + y, x + yL | xR + y, x + yR}`. -/
353371
instance : Add Surreal :=
@@ -378,6 +396,14 @@ instance orderedAddCommGroup : OrderedAddCommGroup Surreal where
378396
nsmul := nsmulRec
379397
zsmul := zsmulRec
380398

399+
lemma mk_add {x y : PGame} (hx : x.Numeric) (hy : y.Numeric) :
400+
Surreal.mk (x + y) (hx.add hy) = Surreal.mk x hx + Surreal.mk y hy := by rfl
401+
402+
lemma mk_sub {x y : PGame} (hx : x.Numeric) (hy : y.Numeric) :
403+
Surreal.mk (x - y) (hx.sub hy) = Surreal.mk x hx - Surreal.mk y hy := by rfl
404+
405+
lemma zero_def : 0 = mk 0 numeric_zero := by rfl
406+
381407
noncomputable instance : LinearOrderedAddCommGroup Surreal :=
382408
{ Surreal.orderedAddCommGroup with
383409
le_total := by

0 commit comments

Comments
 (0)