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

Commit 98cbad7

Browse files
committed
chore(set_theory/pgame): add protected (#9022)
Breaks #7843 into smaller PRs. These lemmas about `pgame` conflict with the ones for `game` when used in `calc` mode proofs, which confuses Lean. There is no way to use the lemmas for `game` (required for surreal numbers) without using `_root_` as `game` inherits these lemmas from its abelian group structure.
1 parent c83c22d commit 98cbad7

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/set_theory/game/impartial.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ begin
138138
split,
139139
{ rw le_iff_sub_nonneg,
140140
exact le_trans hGHp.2
141-
(le_trans add_comm_le $ le_of_le_of_equiv (le_refl _) $ add_congr (equiv_refl _)
141+
(le_trans add_comm_le $ le_of_le_of_equiv (pgame.le_refl _) $ add_congr (equiv_refl _)
142142
(neg_equiv_self G)) },
143143
{ rw le_iff_sub_nonneg,
144144
exact le_trans hGHp.2
145-
(le_of_le_of_equiv (le_refl _) $ add_congr (equiv_refl _) (neg_equiv_self H)) } }
145+
(le_of_le_of_equiv (pgame.le_refl _) $ add_congr (equiv_refl _) (neg_equiv_self H)) } }
146146
end
147147

148148
lemma le_zero_iff {G : pgame} [G.impartial] : G ≤ 00 ≤ G :=

src/set_theory/game/winner.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ lemma not_first_wins_of_first_loses {G : pgame} : G.first_loses → ¬G.first_wi
7474
begin
7575
rw first_loses_is_zero,
7676
rintros h ⟨h₀, -⟩,
77-
exact lt_irrefl 0 (lt_of_lt_of_equiv h₀ h)
77+
exact pgame.lt_irrefl 0 (lt_of_lt_of_equiv h₀ h)
7878
end
7979

8080
lemma not_first_loses_of_first_wins {G : pgame} : G.first_wins → ¬G.first_loses :=

src/set_theory/pgame.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,15 +359,15 @@ end
359359
theorem not_le {x y : pgame} : ¬ x ≤ y ↔ y < x := not_le_lt.1
360360
theorem not_lt {x y : pgame} : ¬ x < y ↔ y ≤ x := not_le_lt.2
361361

362-
@[refl] theorem le_refl : ∀ x : pgame, x ≤ x
362+
@[refl] protected theorem le_refl : ∀ x : pgame, x ≤ x
363363
| ⟨l, r, L, R⟩ := by rw mk_le_mk; exact
364364
⟨λ i, lt_mk_of_le (le_refl _), λ i, mk_lt_of_le (le_refl _)⟩
365365

366-
theorem lt_irrefl (x : pgame) : ¬ x < x :=
367-
not_lt.2 (le_refl _)
366+
protected theorem lt_irrefl (x : pgame) : ¬ x < x :=
367+
not_lt.2 (pgame.le_refl _)
368368

369-
theorem ne_of_lt : ∀ {x y : pgame}, x < y → x ≠ y
370-
| x _ h rfl := lt_irrefl x h
369+
protected theorem ne_of_lt : ∀ {x y : pgame}, x < y → x ≠ y
370+
| x _ h rfl := pgame.lt_irrefl x h
371371

372372
theorem le_trans_aux
373373
{xl xr} {xL : xl → pgame} {xR : xr → pgame}
@@ -415,7 +415,7 @@ def equiv (x y : pgame) : Prop := x ≤ y ∧ y ≤ x
415415

416416
local infix ` ≈ ` := pgame.equiv
417417

418-
@[refl, simp] theorem equiv_refl (x) : x ≈ x := ⟨le_refl _, le_refl _⟩
418+
@[refl, simp] theorem equiv_refl (x) : x ≈ x := ⟨pgame.le_refl _, pgame.le_refl _⟩
419419
@[symm] theorem equiv_symm {x y} : x ≈ y → y ≈ x | ⟨xy, yx⟩ := ⟨yx, xy⟩
420420
@[trans] theorem equiv_trans {x y z} : x ≈ y → y ≈ z → x ≈ z
421421
| ⟨xy, yx⟩ ⟨yz, zy⟩ := ⟨le_trans xy yz, le_trans zy yx⟩

0 commit comments

Comments
 (0)