@@ -1904,6 +1904,87 @@ theorem lt_iff_sub_pos {x y : PGame} : x < y ↔ 0 < y - x :=
1904
1904
⟩
1905
1905
#align pgame.lt_iff_sub_pos SetTheory.PGame.lt_iff_sub_pos
1906
1906
1907
+ /-! ### Inserting an option -/
1908
+
1909
+ /-- The pregame constructed by inserting `x'` as a new left option into x. -/
1910
+ def insertLeft (x x' : PGame.{u}) : PGame :=
1911
+ match x with
1912
+ | mk xl xr xL xR => mk (xl ⊕ PUnit) xr (Sum.elim xL fun _ => x') xR
1913
+
1914
+ /-- A new left option cannot hurt Left. -/
1915
+ lemma le_insertLeft (x x' : PGame) : x ≤ insertLeft x x' := by
1916
+ rw [le_def]
1917
+ constructor
1918
+ · intro i
1919
+ left
1920
+ rcases x with ⟨xl, xr, xL, xR⟩
1921
+ simp only [insertLeft, leftMoves_mk, moveLeft_mk, Sum.exists, Sum.elim_inl]
1922
+ left
1923
+ use i
1924
+ · intro j
1925
+ right
1926
+ rcases x with ⟨xl, xr, xL, xR⟩
1927
+ simp only [rightMoves_mk, moveRight_mk, insertLeft]
1928
+ use j
1929
+
1930
+ /-- Adding a gift horse left option does not change the value of `x`. A gift horse left option is
1931
+ a game `x'` with `x' ⧏ x`. It is called "gift horse" because it seems like Left has gotten the
1932
+ "gift" of a new option, but actually the value of the game did not change. -/
1933
+ lemma insertLeft_equiv_of_lf {x x' : PGame} (h : x' ⧏ x) : insertLeft x x' ≈ x := by
1934
+ rw [equiv_def]
1935
+ constructor
1936
+ · rw [le_def]
1937
+ constructor
1938
+ · intro i
1939
+ rcases x with ⟨xl, xr, xL, xR⟩
1940
+ simp only [insertLeft, leftMoves_mk, moveLeft_mk] at i ⊢
1941
+ rcases i with i | _
1942
+ · simp only [Sum.elim_inl]
1943
+ left
1944
+ use i
1945
+ · simp only [Sum.elim_inr]
1946
+ rw [lf_iff_exists_le] at h
1947
+ simp only [leftMoves_mk, moveLeft_mk] at h
1948
+ exact h
1949
+ · intro j
1950
+ right
1951
+ rcases x with ⟨xl, xr, xL, xR⟩
1952
+ simp only [insertLeft, rightMoves_mk, moveRight_mk]
1953
+ use j
1954
+ · apply le_insertLeft
1955
+
1956
+ /-- The pregame constructed by inserting `x'` as a new right option into x. -/
1957
+ def insertRight (x x' : PGame.{u}) : PGame :=
1958
+ match x with
1959
+ | mk xl xr xL xR => mk xl (xr ⊕ PUnit) xL (Sum.elim xR fun _ => x')
1960
+
1961
+ theorem neg_insertRight_neg (x x' : PGame.{u}) : (-x).insertRight (-x') = -x.insertLeft x' := by
1962
+ cases x
1963
+ cases x'
1964
+ dsimp [insertRight, insertLeft]
1965
+ congr! with (i | j)
1966
+
1967
+ theorem neg_insertLeft_neg (x x' : PGame.{u}) : (-x).insertLeft (-x') = -x.insertRight x' := by
1968
+ rw [← neg_eq_iff_eq_neg, ← neg_insertRight_neg, neg_neg, neg_neg]
1969
+
1970
+ /-- A new right option cannot hurt Right. -/
1971
+ lemma insertRight_le (x x' : PGame) : insertRight x x' ≤ x := by
1972
+ rw [← neg_le_neg_iff, ← neg_insertLeft_neg]
1973
+ exact le_insertLeft _ _
1974
+
1975
+ /-- Adding a gift horse right option does not change the value of `x`. A gift horse right option is
1976
+ a game `x'` with `x ⧏ x'`. It is called "gift horse" because it seems like Right has gotten the
1977
+ "gift" of a new option, but actually the value of the game did not change. -/
1978
+ lemma insertRight_equiv_of_lf {x x' : PGame} (h : x ⧏ x') : insertRight x x' ≈ x := by
1979
+ rw [← neg_equiv_neg_iff, ← neg_insertLeft_neg]
1980
+ exact insertLeft_equiv_of_lf (neg_lf_neg_iff.mpr h)
1981
+
1982
+ /-- Inserting on the left and right commutes. -/
1983
+ theorem insertRight_insertLeft {x x' x'' : PGame} :
1984
+ insertRight (insertLeft x x') x'' = insertLeft (insertRight x x'') x' := by
1985
+ cases x; cases x'; cases x''
1986
+ dsimp [insertLeft, insertRight]
1987
+
1907
1988
/-! ### Special pre-games -/
1908
1989
1909
1990
0 commit comments