Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 65edf25

Browse files
committed
feat(set_theory/game/pgame): x.move_left i < x and variants (#13654)
1 parent 454b884 commit 65edf25

File tree

3 files changed

+33
-30
lines changed

3 files changed

+33
-30
lines changed

src/set_theory/game/pgame.lean

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,12 +386,35 @@ end
386386
| ⟨l, r, L, R⟩ := by rw mk_le_mk; exact
387387
⟨λ i, lt_mk_of_le (le_refl _), λ i, mk_lt_of_le (le_refl _)⟩
388388

389+
protected theorem le_rfl {x : pgame} : x ≤ x :=
390+
pgame.le_refl x
391+
389392
protected theorem lt_irrefl (x : pgame) : ¬ x < x :=
390393
not_lt.2 (pgame.le_refl _)
391394

392395
protected theorem ne_of_lt : ∀ {x y : pgame}, x < y → x ≠ y
393396
| x _ h rfl := pgame.lt_irrefl x h
394397

398+
/-- In general, `xL i ≤ x` isn't true. It is true however for `numeric` games, see
399+
`numeric.move_left_le`. -/
400+
theorem lt_mk {xl xr : Type u} {xL : xl → pgame} {xR : xr → pgame} (i) : xL i < mk xl xr xL xR :=
401+
lt_mk_of_le pgame.le_rfl
402+
403+
/-- In general, `x ≤ xR i` isn't true. It is true however for `numeric` games, see
404+
`numeric.move_right_le`. -/
405+
theorem mk_lt {xl xr : Type u} {xL : xl → pgame} {xR : xr → pgame} (i) : mk xl xr xL xR < xR i :=
406+
mk_lt_of_le pgame.le_rfl
407+
408+
/-- In general, `x.move_left i ≤ x` isn't true. It is true however for `numeric` games, see
409+
`numeric.move_left_le`. -/
410+
theorem move_left_lt {x : pgame} (i) : x.move_left i < x :=
411+
move_left_lt_of_le pgame.le_rfl
412+
413+
/-- In general, `x ≤ x.move_right i` isn't true. It is true however for `numeric` games, see
414+
`numeric.move_right_le`. -/
415+
theorem lt_move_right {x : pgame} (i) : x < x.move_right i :=
416+
lt_move_right_of_le pgame.le_rfl
417+
395418
theorem le_trans_aux
396419
{xl xr} {xL : xl → pgame} {xR : xr → pgame}
397420
{yl yr} {yL : yl → pgame} {yR : yr → pgame}

src/set_theory/surreal/basic.lean

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -108,35 +108,15 @@ theorem numeric_neg : Π {x : pgame} (o : numeric x), numeric (-x)
108108
⟨λ j i, lt_iff_neg_gt.1 (o.1 i j),
109109
⟨λ j, numeric_neg (o.2.2 j), λ i, numeric_neg (o.2.1 i)⟩⟩
110110

111-
-- We provide this as an analogue for `numeric.move_left_le`,
112-
-- even though it does not need the `numeric` hypothesis.
113-
@[nolint unused_arguments]
114-
theorem numeric.move_left_lt {x : pgame.{u}} (o : numeric x) (i : x.left_moves) :
115-
x.move_left i < x :=
116-
begin
117-
rw lt_def_le,
118-
left,
119-
use i,
120-
end
121-
111+
/-- For the `<` version, see `pgame.move_left_lt`. -/
122112
theorem numeric.move_left_le {x : pgame} (o : numeric x) (i : x.left_moves) :
123113
x.move_left i ≤ x :=
124-
le_of_lt (o.move_left i) o (o.move_left_lt i)
125-
126-
-- We provide this as an analogue for `numeric.le_move_right`,
127-
-- even though it does not need the `numeric` hypothesis.
128-
@[nolint unused_arguments]
129-
theorem numeric.lt_move_right {x : pgame} (o : numeric x) (j : x.right_moves) :
130-
x < x.move_right j :=
131-
begin
132-
rw lt_def_le,
133-
right,
134-
use j,
135-
end
114+
le_of_lt (o.move_left i) o (pgame.move_left_lt i)
136115

116+
/-- For the `<` version, see `pgame.lt_move_right`. -/
137117
theorem numeric.le_move_right {x : pgame} (o : numeric x) (j : x.right_moves) :
138118
x ≤ x.move_right j :=
139-
le_of_lt o (o.move_right j) (o.lt_move_right j)
119+
le_of_lt o (o.move_right j) (pgame.lt_move_right j)
140120

141121
theorem add_lt_add
142122
{w x y z : pgame.{u}} (oy : numeric y) (oz : numeric z)
@@ -178,10 +158,10 @@ theorem numeric_add : Π {x y : pgame} (ox : numeric x) (oy : numeric y), numeri
178158
{ show xL ix + ⟨yl, yr, yL, yR⟩ < xR jx + ⟨yl, yr, yL, yR⟩,
179159
exact add_lt_add_right (ox.1 ix jx) _ },
180160
{ show xL ix + ⟨yl, yr, yL, yR⟩ < ⟨xl, xr, xL, xR⟩ + yR jy,
181-
exact add_lt_add oy (oy.move_right jy) (ox.move_left_lt _) (oy.lt_move_right _), },
182-
{ -- show ⟨xl, xr, xL, xR⟩ + yL iy < xR jx + ⟨yl, yr, yL, yR⟩, -- fails?
183-
exact add_lt_add (oy.move_left iy) oy (ox.lt_move_right _) (oy.move_left_lt _), },
184-
{ -- show ⟨xl, xr, xL, xR⟩ + yL iy < ⟨xl, xr, xL, xR⟩ + yR jy, -- fails?
161+
exact add_lt_add oy (oy.move_right jy) (pgame.lt_mk ix) (pgame.mk_lt jy), },
162+
{ -- show ⟨xl, xr, xL, xR⟩ + yL iy < xR jx + ⟨yl, yr, yL, yR⟩, -- fails?
163+
exact add_lt_add (oy.move_left iy) oy (pgame.mk_lt jx) (pgame.lt_mk iy), },
164+
{ -- show ⟨xl, xr, xL, xR⟩ + yL iy < ⟨xl, xr, xL, xR⟩ + yR jy, -- fails?
185165
exact @add_lt_add_left pgame _ _ _ _ _ (oy.1 iy jy) ⟨xl, xr, xL, xR⟩ }
186166
end,
187167
begin

src/set_theory/surreal/dyadic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ begin
6666
{ rintro ⟨ ⟩ ⟨ ⟩,
6767
dsimp only [pi.zero_apply],
6868
rw ← pow_half_move_left' n,
69-
apply hn.move_left_lt },
69+
apply pgame.move_left_lt },
7070
{ exact ⟨λ _, numeric_zero, λ _, hn⟩ } }
7171
end
7272

7373
theorem pow_half_succ_lt_pow_half {n : ℕ} : pow_half (n + 1) < pow_half n :=
74-
(@numeric_pow_half (n + 1)).lt_move_right punit.star
74+
pgame.lt_move_right punit.star
7575

7676
theorem pow_half_succ_le_pow_half {n : ℕ} : pow_half (n + 1) ≤ pow_half n :=
7777
le_of_lt numeric_pow_half numeric_pow_half pow_half_succ_lt_pow_half

0 commit comments

Comments
 (0)