fact stringlengths 6 3.84k | type stringclasses 11
values | library stringclasses 32
values | imports listlengths 1 14 | filename stringlengths 20 95 | symbolic_name stringlengths 1 90 | docstring stringlengths 7 20k ⌀ |
|---|---|---|---|---|---|---|
neg_le_neg_iff {x y : PGame} : -y ≤ -x ↔ x ≤ y :=
neg_le_lf_neg_iff.1
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_le_neg_iff | null |
neg_lf_neg_iff {x y : PGame} : -y ⧏ -x ↔ x ⧏ y :=
neg_le_lf_neg_iff.2
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_lf_neg_iff | null |
neg_lt_neg_iff {x y : PGame} : -y < -x ↔ x < y := by
rw [lt_iff_le_and_lf, lt_iff_le_and_lf, neg_le_neg_iff, neg_lf_neg_iff]
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_lt_neg_iff | null |
neg_identical_neg {x y : PGame} : -x ≡ -y ↔ x ≡ y :=
⟨Identical.of_neg, Identical.neg⟩
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_identical_neg | null |
neg_equiv_neg_iff {x y : PGame} : -x ≈ -y ↔ x ≈ y := by
change Equiv (-x) (-y) ↔ Equiv x y
rw [Equiv, Equiv, neg_le_neg_iff, neg_le_neg_iff, and_comm]
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_equiv_neg_iff | null |
neg_fuzzy_neg_iff {x y : PGame} : -x ‖ -y ↔ x ‖ y := by
rw [Fuzzy, Fuzzy, neg_lf_neg_iff, neg_lf_neg_iff, and_comm] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_fuzzy_neg_iff | null |
neg_le_iff {x y : PGame} : -y ≤ x ↔ -x ≤ y := by rw [← neg_neg x, neg_le_neg_iff, neg_neg] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_le_iff | null |
neg_lf_iff {x y : PGame} : -y ⧏ x ↔ -x ⧏ y := by rw [← neg_neg x, neg_lf_neg_iff, neg_neg] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_lf_iff | null |
neg_lt_iff {x y : PGame} : -y < x ↔ -x < y := by rw [← neg_neg x, neg_lt_neg_iff, neg_neg] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_lt_iff | null |
neg_equiv_iff {x y : PGame} : (-x ≈ y) ↔ (x ≈ -y) := by
rw [← neg_neg y, neg_equiv_neg_iff, neg_neg] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_equiv_iff | null |
neg_fuzzy_iff {x y : PGame} : -x ‖ y ↔ x ‖ -y := by
rw [← neg_neg y, neg_fuzzy_neg_iff, neg_neg] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_fuzzy_iff | null |
le_neg_iff {x y : PGame} : y ≤ -x ↔ x ≤ -y := by rw [← neg_neg x, neg_le_neg_iff, neg_neg] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | le_neg_iff | null |
lf_neg_iff {x y : PGame} : y ⧏ -x ↔ x ⧏ -y := by rw [← neg_neg x, neg_lf_neg_iff, neg_neg] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | lf_neg_iff | null |
lt_neg_iff {x y : PGame} : y < -x ↔ x < -y := by rw [← neg_neg x, neg_lt_neg_iff, neg_neg]
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | lt_neg_iff | null |
neg_le_zero_iff {x : PGame} : -x ≤ 0 ↔ 0 ≤ x := by rw [neg_le_iff, neg_zero]
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_le_zero_iff | null |
zero_le_neg_iff {x : PGame} : 0 ≤ -x ↔ x ≤ 0 := by rw [le_neg_iff, neg_zero]
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | zero_le_neg_iff | null |
neg_lf_zero_iff {x : PGame} : -x ⧏ 0 ↔ 0 ⧏ x := by rw [neg_lf_iff, neg_zero]
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_lf_zero_iff | null |
zero_lf_neg_iff {x : PGame} : 0 ⧏ -x ↔ x ⧏ 0 := by rw [lf_neg_iff, neg_zero]
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | zero_lf_neg_iff | null |
neg_lt_zero_iff {x : PGame} : -x < 0 ↔ 0 < x := by rw [neg_lt_iff, neg_zero]
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_lt_zero_iff | null |
zero_lt_neg_iff {x : PGame} : 0 < -x ↔ x < 0 := by rw [lt_neg_iff, neg_zero]
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | zero_lt_neg_iff | null |
neg_equiv_zero_iff {x : PGame} : (-x ≈ 0) ↔ (x ≈ 0) := by rw [neg_equiv_iff, neg_zero]
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_equiv_zero_iff | null |
neg_fuzzy_zero_iff {x : PGame} : -x ‖ 0 ↔ x ‖ 0 := by rw [neg_fuzzy_iff, neg_zero]
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_fuzzy_zero_iff | null |
zero_equiv_neg_iff {x : PGame} : (0 ≈ -x) ↔ (0 ≈ x) := by rw [← neg_equiv_iff, neg_zero]
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | zero_equiv_neg_iff | null |
zero_fuzzy_neg_iff {x : PGame} : 0 ‖ -x ↔ 0 ‖ x := by rw [← neg_fuzzy_iff, neg_zero]
/-! ### Addition and subtraction -/ | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | zero_fuzzy_neg_iff | null |
addZeroRelabelling : ∀ x : PGame.{u}, x + 0 ≡r x
| ⟨xl, xr, xL, xR⟩ => by
refine ⟨Equiv.sumEmpty xl PEmpty, Equiv.sumEmpty xr PEmpty, ?_, ?_⟩ <;> rintro (⟨i⟩ | ⟨⟨⟩⟩) <;>
apply addZeroRelabelling
termination_by x => x | def | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | addZeroRelabelling | The sum of `x = {xL | xR}` and `y = {yL | yR}` is `{xL + y, x + yL | xR + y, x + yR}`. -/
instance : Add PGame.{u} :=
⟨fun x y => by
induction x generalizing y with | mk xl xr _ _ IHxl IHxr => _
induction y with | mk yl yr yL yR IHyl IHyr => _
have y := mk yl yr yL yR
refine ⟨xl ⊕ yl, xr ⊕ yr, Sum.rec ?_ ?_, Sum.rec ?_ ?_⟩
· exact fun i => IHxl i y
· exact IHyl
· exact fun i => IHxr i y
· exact IHyr⟩
theorem mk_add_moveLeft {xl xr yl yr} {xL xR yL yR} {i} :
(mk xl xr xL xR + mk yl yr yL yR).moveLeft i =
i.rec (xL · + mk yl yr yL yR) (mk xl xr xL xR + yL ·) :=
rfl
theorem mk_add_moveRight {xl xr yl yr} {xL xR yL yR} {i} :
(mk xl xr xL xR + mk yl yr yL yR).moveRight i =
i.rec (xR · + mk yl yr yL yR) (mk xl xr xL xR + yR ·) :=
rfl
/-- The pre-game `((0 + 1) + ⋯) + 1`.
Note that this is **not** the usual recursive definition `n = {0, 1, … | }`. For instance,
`2 = 0 + 1 + 1 = {0 + 0 + 1, 0 + 1 + 0 | }` does not contain any left option equivalent to `0`. For
an implementation of said definition, see `Ordinal.toPGame`. For the proof that these games are
equivalent, see `Ordinal.toPGame_natCast`. -/
instance : NatCast PGame :=
⟨Nat.unaryCast⟩
@[simp]
protected theorem nat_succ (n : ℕ) : ((n + 1 : ℕ) : PGame) = n + 1 :=
rfl
instance isEmpty_leftMoves_add (x y : PGame.{u}) [IsEmpty x.LeftMoves] [IsEmpty y.LeftMoves] :
IsEmpty (x + y).LeftMoves := by
cases x
cases y
apply isEmpty_sum.2 ⟨_, _⟩
assumption'
instance isEmpty_rightMoves_add (x y : PGame.{u}) [IsEmpty x.RightMoves] [IsEmpty y.RightMoves] :
IsEmpty (x + y).RightMoves := by
cases x
cases y
apply isEmpty_sum.2 ⟨_, _⟩
assumption'
/-- `x + 0` has exactly the same moves as `x`. |
add_zero_equiv (x : PGame.{u}) : x + 0 ≈ x :=
(addZeroRelabelling x).equiv | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_zero_equiv | `x + 0` is equivalent to `x`. |
zeroAddRelabelling : ∀ x : PGame.{u}, 0 + x ≡r x
| ⟨xl, xr, xL, xR⟩ => by
refine ⟨Equiv.emptySum PEmpty xl, Equiv.emptySum PEmpty xr, ?_, ?_⟩ <;> rintro (⟨⟨⟩⟩ | ⟨i⟩) <;>
apply zeroAddRelabelling | def | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | zeroAddRelabelling | `0 + x` has exactly the same moves as `x`. |
zero_add_equiv (x : PGame.{u}) : 0 + x ≈ x :=
(zeroAddRelabelling x).equiv | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | zero_add_equiv | `0 + x` is equivalent to `x`. |
leftMoves_add : ∀ x y : PGame.{u}, (x + y).LeftMoves = (x.LeftMoves ⊕ y.LeftMoves)
| ⟨_, _, _, _⟩, ⟨_, _, _, _⟩ => rfl | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | leftMoves_add | Use `toLeftMovesAdd` to cast between these two types. |
rightMoves_add : ∀ x y : PGame.{u}, (x + y).RightMoves = (x.RightMoves ⊕ y.RightMoves)
| ⟨_, _, _, _⟩, ⟨_, _, _, _⟩ => rfl | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | rightMoves_add | Use `toRightMovesAdd` to cast between these two types. |
toLeftMovesAdd {x y : PGame} : x.LeftMoves ⊕ y.LeftMoves ≃ (x + y).LeftMoves :=
Equiv.cast (leftMoves_add x y).symm | def | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | toLeftMovesAdd | Converts a left move for `x` or `y` into a left move for `x + y` and vice versa.
Even though these types are the same (not definitionally so), this is the preferred way to convert
between them. |
toRightMovesAdd {x y : PGame} : x.RightMoves ⊕ y.RightMoves ≃ (x + y).RightMoves :=
Equiv.cast (rightMoves_add x y).symm
@[simp] | def | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | toRightMovesAdd | Converts a right move for `x` or `y` into a right move for `x + y` and vice versa.
Even though these types are the same (not definitionally so), this is the preferred way to convert
between them. |
mk_add_moveLeft_inl {xl xr yl yr} {xL xR yL yR} {i} :
(mk xl xr xL xR + mk yl yr yL yR).moveLeft (Sum.inl i) =
(mk xl xr xL xR).moveLeft i + mk yl yr yL yR :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | mk_add_moveLeft_inl | null |
add_moveLeft_inl {x : PGame} (y : PGame) (i) :
(x + y).moveLeft (toLeftMovesAdd (Sum.inl i)) = x.moveLeft i + y := by
cases x
cases y
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_moveLeft_inl | null |
mk_add_moveRight_inl {xl xr yl yr} {xL xR yL yR} {i} :
(mk xl xr xL xR + mk yl yr yL yR).moveRight (Sum.inl i) =
(mk xl xr xL xR).moveRight i + mk yl yr yL yR :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | mk_add_moveRight_inl | null |
add_moveRight_inl {x : PGame} (y : PGame) (i) :
(x + y).moveRight (toRightMovesAdd (Sum.inl i)) = x.moveRight i + y := by
cases x
cases y
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_moveRight_inl | null |
mk_add_moveLeft_inr {xl xr yl yr} {xL xR yL yR} {i} :
(mk xl xr xL xR + mk yl yr yL yR).moveLeft (Sum.inr i) =
mk xl xr xL xR + (mk yl yr yL yR).moveLeft i :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | mk_add_moveLeft_inr | null |
add_moveLeft_inr (x : PGame) {y : PGame} (i) :
(x + y).moveLeft (toLeftMovesAdd (Sum.inr i)) = x + y.moveLeft i := by
cases x
cases y
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_moveLeft_inr | null |
mk_add_moveRight_inr {xl xr yl yr} {xL xR yL yR} {i} :
(mk xl xr xL xR + mk yl yr yL yR).moveRight (Sum.inr i) =
mk xl xr xL xR + (mk yl yr yL yR).moveRight i :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | mk_add_moveRight_inr | null |
add_moveRight_inr (x : PGame) {y : PGame} (i) :
(x + y).moveRight (toRightMovesAdd (Sum.inr i)) = x + y.moveRight i := by
cases x
cases y
rfl | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_moveRight_inr | null |
leftMoves_add_cases {x y : PGame} (k) {P : (x + y).LeftMoves → Prop}
(hl : ∀ i, P <| toLeftMovesAdd (Sum.inl i)) (hr : ∀ i, P <| toLeftMovesAdd (Sum.inr i)) :
P k := by
rw [← toLeftMovesAdd.apply_symm_apply k]
rcases toLeftMovesAdd.symm k with i | i
· exact hl i
· exact hr i | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | leftMoves_add_cases | Case on possible left moves of `x + y`. |
rightMoves_add_cases {x y : PGame} (k) {P : (x + y).RightMoves → Prop}
(hl : ∀ j, P <| toRightMovesAdd (Sum.inl j)) (hr : ∀ j, P <| toRightMovesAdd (Sum.inr j)) :
P k := by
rw [← toRightMovesAdd.apply_symm_apply k]
rcases toRightMovesAdd.symm k with i | i
· exact hl i
· exact hr i | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | rightMoves_add_cases | Case on possible right moves of `x + y`. |
isEmpty_nat_rightMoves : ∀ n : ℕ, IsEmpty (RightMoves n)
| 0 => inferInstanceAs (IsEmpty PEmpty)
| n + 1 => by
haveI := isEmpty_nat_rightMoves n
rw [PGame.nat_succ, rightMoves_add]
infer_instance | instance | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | isEmpty_nat_rightMoves | null |
protected add_comm (x y : PGame) : x + y ≡ y + x :=
match x, y with
| mk xl xr xL xR, mk yl yr yL yR => by
refine Identical.of_equiv (Equiv.sumComm _ _) (Equiv.sumComm _ _) ?_ ?_ <;>
· rintro (_ | _) <;>
· dsimp; exact PGame.add_comm _ _
termination_by (x, y) | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_comm | `x + y` has exactly the same moves as `y + x`. |
protected add_assoc (x y z : PGame) : x + y + z ≡ x + (y + z) :=
match x, y, z with
| mk xl xr xL xR, mk yl yr yL yR, mk zl zr zL zR => by
refine Identical.of_equiv (Equiv.sumAssoc _ _ _) (Equiv.sumAssoc _ _ _) ?_ ?_ <;>
· rintro ((_ | _) | _)
· exact PGame.add_assoc _ _ _
· exact PGame.add_assoc (mk _ _ _ _) _ _
· exact PGame.add_assoc (mk _ _ _ _) (mk _ _ _ _) _
termination_by (x, y, z) | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_assoc | `(x + y) + z` has exactly the same moves as `x + (y + z)`. |
protected add_zero : ∀ (x : PGame), x + 0 ≡ x
| mk xl xr xL xR => by
refine Identical.of_equiv (Equiv.sumEmpty _ _) (Equiv.sumEmpty _ _) ?_ ?_ <;>
· rintro (_ | ⟨⟨⟩⟩)
exact PGame.add_zero _ | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_zero | `x + 0` has exactly the same moves as `x`. |
protected zero_add (x : PGame) : 0 + x ≡ x :=
(PGame.add_comm _ _).trans x.add_zero | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | zero_add | `0 + x` has exactly the same moves as `x`. |
protected neg_add (x y : PGame) : -(x + y) = -x + -y :=
match x, y with
| mk xl xr xL xR, mk yl yr yL yR => by
refine ext rfl rfl ?_ ?_ <;>
· rintro (i | i) _ ⟨rfl⟩
· exact PGame.neg_add _ _
· simpa [Equiv.refl, mk_add_moveLeft, mk_add_moveRight] using PGame.neg_add _ _
termination_by (x, y) | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_add | `-(x + y)` has exactly the same moves as `-x + -y`. |
protected neg_add_rev (x y : PGame) : -(x + y) ≡ -y + -x :=
Identical.trans (of_eq (x.neg_add y)) (PGame.add_comm _ _) | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_add_rev | `-(x + y)` has exactly the same moves as `-y + -x`. |
identical_zero_iff : ∀ (x : PGame),
x ≡ 0 ↔ IsEmpty x.LeftMoves ∧ IsEmpty x.RightMoves
| mk xl xr xL xR => by
constructor
· rintro ⟨h₁, h₂⟩
dsimp [Relator.BiTotal, Relator.LeftTotal, Relator.RightTotal] at h₁ h₂
simp_rw [IsEmpty.forall_iff, and_true, IsEmpty.exists_iff] at h₁ h₂
exact ⟨⟨h₁⟩, ⟨h₂⟩⟩
· rintro ⟨h₁, h₂⟩
exact identical_of_isEmpty _ _ | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | identical_zero_iff | null |
identical_zero (x : PGame) [IsEmpty x.LeftMoves] [IsEmpty x.RightMoves] : x ≡ 0 :=
x.identical_zero_iff.mpr ⟨by infer_instance, by infer_instance⟩ | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | identical_zero | Any game without left or right moves is identical to 0. |
protected add_eq_zero : ∀ {x y : PGame}, x + y ≡ 0 ↔ x ≡ 0 ∧ y ≡ 0
| mk xl xr xL xR, mk yl yr yL yR => by
simp_rw [identical_zero_iff, leftMoves_add, rightMoves_add, isEmpty_sum]
tauto | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_eq_zero | null |
Identical.add_right {x₁ x₂ y} : x₁ ≡ x₂ → x₁ + y ≡ x₂ + y :=
match x₁, x₂, y with
| mk x₁l x₁r x₁L x₁R, mk x₂l x₂r x₂L x₂R, mk yl yr yL yR => by
intro h
refine ⟨⟨?_, ?_⟩, ⟨?_, ?_⟩⟩ <;> rintro (_ | _) <;> try exact ⟨.inr _, h.add_right⟩
· exact (h.1.1 _).elim (⟨.inl ·, ·.add_right⟩)
· exact (h.1.2 _).elim (⟨.inl ·, ·.add_right⟩)
· exact (h.2.1 _).elim (⟨.inl ·, ·.add_right⟩)
· exact (h.2.2 _).elim (⟨.inl ·, ·.add_right⟩)
termination_by (x₁, x₂, y) | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | Identical.add_right | null |
Identical.add_left {x y₁ y₂} (hy : y₁ ≡ y₂) : x + y₁ ≡ x + y₂ :=
(x.add_comm y₁).trans (hy.add_right.trans (y₂.add_comm x)) | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | Identical.add_left | null |
Identical.add {x₁ x₂ y₁ y₂ : PGame.{u}} (hx : x₁ ≡ x₂) (hy : y₁ ≡ y₂) : x₁ + y₁ ≡ x₂ + y₂ :=
hx.add_right.trans hy.add_left | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | Identical.add | If `w` has the same moves as `x` and `y` has the same moves as `z`,
then `w + y` has the same moves as `x + z`. |
memₗ_add_iff {x y₁ y₂ : PGame} :
x ∈ₗ y₁ + y₂ ↔ (∃ z ∈ₗ y₁, x ≡ z + y₂) ∨ (∃ z ∈ₗ y₂, x ≡ y₁ + z) := by
obtain ⟨y₁l, y₁r, y₁L, y₁R⟩ := y₁
obtain ⟨y₂l, y₂r, y₂L, y₂R⟩ := y₂
constructor
· rintro ⟨(i | i), hi⟩
exacts [.inl ⟨y₁L i, moveLeft_memₗ _ _, hi⟩, .inr ⟨y₂L i, moveLeft_memₗ _ _, hi⟩]
· rintro (⟨_, ⟨i, hi⟩, h⟩ | ⟨_, ⟨i, hi⟩, h⟩)
exacts [⟨.inl i, h.trans hi.add_right⟩, ⟨.inr i, h.trans hi.add_left⟩] | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | memₗ_add_iff | null |
memᵣ_add_iff {x y₁ y₂ : PGame} :
x ∈ᵣ y₁ + y₂ ↔ (∃ z ∈ᵣ y₁, x ≡ z + y₂) ∨ (∃ z ∈ᵣ y₂, x ≡ y₁ + z) := by
obtain ⟨y₁l, y₁r, y₁L, y₁R⟩ := y₁
obtain ⟨y₂l, y₂r, y₂L, y₂R⟩ := y₂
constructor
· rintro ⟨(i | i), hi⟩
exacts [.inl ⟨y₁R i, moveRight_memᵣ _ _, hi⟩, .inr ⟨y₂R i, moveRight_memᵣ _ _, hi⟩]
· rintro (⟨_, ⟨i, hi⟩, h⟩ | ⟨_, ⟨i, hi⟩, h⟩)
exacts [⟨.inl i, h.trans hi.add_right⟩, ⟨.inr i, h.trans hi.add_left⟩] | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | memᵣ_add_iff | null |
Relabelling.addCongr : ∀ {w x y z : PGame.{u}}, w ≡r x → y ≡r z → w + y ≡r x + z
| ⟨wl, wr, wL, wR⟩, ⟨xl, xr, xL, xR⟩, ⟨yl, yr, yL, yR⟩, ⟨zl, zr, zL, zR⟩, ⟨L₁, R₁, hL₁, hR₁⟩,
⟨L₂, R₂, hL₂, hR₂⟩ => by
let Hwx : ⟨wl, wr, wL, wR⟩ ≡r ⟨xl, xr, xL, xR⟩ := ⟨L₁, R₁, hL₁, hR₁⟩
let Hyz : ⟨yl, yr, yL, yR⟩ ≡r ⟨zl, zr, zL, zR⟩ := ⟨L₂, R₂, hL₂, hR₂⟩
refine ⟨Equiv.sumCongr L₁ L₂, Equiv.sumCongr R₁ R₂, ?_, ?_⟩ <;> rintro (i | j)
· exact (hL₁ i).addCongr Hyz
· exact Hwx.addCongr (hL₂ j)
· exact (hR₁ i).addCongr Hyz
· exact Hwx.addCongr (hR₂ j)
termination_by _ x _ z => (x, z) | def | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | Relabelling.addCongr | If `w` has the same moves as `x` and `y` has the same moves as `z`,
then `w + y` has the same moves as `x + z`. |
@[simp]
sub_zero_eq_add_zero (x : PGame) : x - 0 = x + 0 :=
show x + -0 = x + 0 by rw [neg_zero] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | sub_zero_eq_add_zero | null |
protected sub_zero (x : PGame) : x - 0 ≡ x :=
_root_.trans (of_eq x.sub_zero_eq_add_zero) x.add_zero | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | sub_zero | null |
protected neg_sub' (x y : PGame) : -(x - y) = -x - -y := PGame.neg_add _ _ | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_sub' | This lemma is named to match `neg_sub'`. |
Identical.sub {x₁ x₂ y₁ y₂ : PGame.{u}} (hx : x₁ ≡ x₂) (hy : y₁ ≡ y₂) : x₁ - y₁ ≡ x₂ - y₂ :=
hx.add hy.neg | lemma | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | Identical.sub | If `w` has the same moves as `x` and `y` has the same moves as `z`,
then `w - y` has the same moves as `x - z`. |
Relabelling.subCongr {w x y z : PGame} (h₁ : w ≡r x) (h₂ : y ≡r z) : w - y ≡r x - z :=
h₁.addCongr h₂.negCongr | def | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | Relabelling.subCongr | If `w` has the same moves as `x` and `y` has the same moves as `z`,
then `w - y` has the same moves as `x - z`. |
negAddRelabelling : ∀ x y : PGame, -(x + y) ≡r -x + -y
| ⟨xl, xr, xL, xR⟩, ⟨yl, yr, yL, yR⟩ => by
refine ⟨Equiv.refl _, Equiv.refl _, ?_, ?_⟩
all_goals
exact fun j =>
Sum.casesOn j (fun j => negAddRelabelling _ _) fun j =>
negAddRelabelling ⟨xl, xr, xL, xR⟩ _
termination_by x y => (x, y) | def | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | negAddRelabelling | `-(x + y)` has exactly the same moves as `-x + -y`. |
neg_add_le {x y : PGame} : -(x + y) ≤ -x + -y :=
(x.neg_add y).le | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_add_le | null |
addCommRelabelling : ∀ x y : PGame.{u}, x + y ≡r y + x
| mk xl xr xL xR, mk yl yr yL yR => by
refine ⟨Equiv.sumComm _ _, Equiv.sumComm _ _, ?_, ?_⟩ <;> rintro (_ | _) <;>
· dsimp
apply addCommRelabelling
termination_by x y => (x, y) | def | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | addCommRelabelling | `x + y` has exactly the same moves as `y + x`. |
add_comm_le {x y : PGame} : x + y ≤ y + x :=
(x.add_comm y).le | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_comm_le | null |
add_comm_equiv {x y : PGame} : x + y ≈ y + x :=
(x.add_comm y).equiv | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_comm_equiv | null |
addAssocRelabelling : ∀ x y z : PGame.{u}, x + y + z ≡r x + (y + z)
| ⟨xl, xr, xL, xR⟩, ⟨yl, yr, yL, yR⟩, ⟨zl, zr, zL, zR⟩ => by
refine ⟨Equiv.sumAssoc _ _ _, Equiv.sumAssoc _ _ _, ?_, ?_⟩
· rintro (⟨i | i⟩ | i)
· apply addAssocRelabelling
· apply addAssocRelabelling ⟨xl, xr, xL, xR⟩ (yL i)
· apply addAssocRelabelling ⟨xl, xr, xL, xR⟩ ⟨yl, yr, yL, yR⟩ (zL i)
· rintro (⟨i | i⟩ | i)
· apply addAssocRelabelling
· apply addAssocRelabelling ⟨xl, xr, xL, xR⟩ (yR i)
· apply addAssocRelabelling ⟨xl, xr, xL, xR⟩ ⟨yl, yr, yL, yR⟩ (zR i)
termination_by x y z => (x, y, z) | def | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | addAssocRelabelling | `(x + y) + z` has exactly the same moves as `x + (y + z)`. |
add_assoc_equiv {x y z : PGame} : x + y + z ≈ x + (y + z) :=
(x.add_assoc y z).equiv | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_assoc_equiv | null |
neg_add_cancel_le_zero : ∀ x : PGame, -x + x ≤ 0
| ⟨xl, xr, xL, xR⟩ =>
le_zero.2 fun i => by
obtain i | i := i
· -- If Left played in -x, Right responds with the same move in x.
refine ⟨@toRightMovesAdd _ ⟨_, _, _, _⟩ (Sum.inr i), ?_⟩
convert @neg_add_cancel_le_zero (xR i)
apply add_moveRight_inr
· -- If Left in x, Right responds with the same move in -x.
dsimp
refine ⟨@toRightMovesAdd ⟨_, _, _, _⟩ _ (Sum.inl i), ?_⟩
convert @neg_add_cancel_le_zero (xL i)
apply add_moveRight_inl | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_add_cancel_le_zero | null |
zero_le_neg_add_cancel (x : PGame) : 0 ≤ -x + x := by
rw [← neg_le_neg_iff, neg_zero]
exact neg_add_le.trans (neg_add_cancel_le_zero _) | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | zero_le_neg_add_cancel | null |
neg_add_cancel_equiv (x : PGame) : -x + x ≈ 0 :=
⟨neg_add_cancel_le_zero x, zero_le_neg_add_cancel x⟩ | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_add_cancel_equiv | null |
add_neg_cancel_le_zero (x : PGame) : x + -x ≤ 0 :=
add_comm_le.trans (neg_add_cancel_le_zero x) | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_neg_cancel_le_zero | null |
zero_le_add_neg_cancel (x : PGame) : 0 ≤ x + -x :=
(zero_le_neg_add_cancel x).trans add_comm_le | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | zero_le_add_neg_cancel | null |
add_neg_cancel_equiv (x : PGame) : x + -x ≈ 0 :=
⟨add_neg_cancel_le_zero x, zero_le_add_neg_cancel x⟩ | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_neg_cancel_equiv | null |
sub_self_equiv : ∀ (x : PGame), x - x ≈ 0 :=
add_neg_cancel_equiv | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | sub_self_equiv | null |
private add_le_add_right' : ∀ {x y z : PGame}, x ≤ y → x + z ≤ y + z
| mk xl xr xL xR, mk yl yr yL yR, mk zl zr zL zR => fun h => by
refine le_def.2 ⟨fun i => ?_, fun i => ?_⟩ <;> obtain i | i := i
· rw [le_def] at h
obtain ⟨h_left, h_right⟩ := h
rcases h_left i with (⟨i', ih⟩ | ⟨j, jh⟩)
· exact Or.inl ⟨toLeftMovesAdd (Sum.inl i'), add_le_add_right' ih⟩
· refine Or.inr ⟨toRightMovesAdd (Sum.inl j), ?_⟩
convert add_le_add_right' jh
apply add_moveRight_inl
· exact Or.inl ⟨@toLeftMovesAdd _ ⟨_, _, _, _⟩ (Sum.inr i), add_le_add_right' h⟩
· rw [le_def] at h
rcases h.right i with (⟨i, ih⟩ | ⟨j', jh⟩)
· refine Or.inl ⟨toLeftMovesAdd (Sum.inl i), ?_⟩
convert add_le_add_right' ih
apply add_moveLeft_inl
· exact Or.inr ⟨toRightMovesAdd (Sum.inl j'), add_le_add_right' jh⟩
· exact
Or.inr ⟨@toRightMovesAdd _ ⟨_, _, _, _⟩ (Sum.inr i), add_le_add_right' h⟩
termination_by x y z => (x, y, z) | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_le_add_right' | null |
addRightMono : AddRightMono PGame :=
⟨fun _ _ _ => add_le_add_right'⟩ | instance | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | addRightMono | null |
addLeftMono : AddLeftMono PGame :=
⟨fun x _ _ h => (add_comm_le.trans (by gcongr)).trans add_comm_le⟩ | instance | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | addLeftMono | null |
add_lf_add_right {y z : PGame} (h : y ⧏ z) (x) : y + x ⧏ z + x :=
suffices z + x ≤ y + x → z ≤ y by
rw [← PGame.not_le] at h ⊢
exact mt this h
fun w =>
calc
z ≤ z + 0 := (PGame.add_zero _).symm.le
_ ≤ z + (x + -x) := add_le_add_left (zero_le_add_neg_cancel x) _
_ ≤ z + x + -x := (PGame.add_assoc _ _ _).symm.le
_ ≤ y + x + -x := by gcongr
_ ≤ y + (x + -x) := (PGame.add_assoc _ _ _).le
_ ≤ y + 0 := add_le_add_left (add_neg_cancel_le_zero x) _
_ ≤ y := (PGame.add_zero _).le | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_lf_add_right | null |
add_lf_add_left {y z : PGame} (h : y ⧏ z) (x) : x + y ⧏ x + z := by
rw [lf_congr add_comm_equiv add_comm_equiv]
apply add_lf_add_right h | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_lf_add_left | null |
addRightStrictMono : AddRightStrictMono PGame :=
⟨fun x _ _ h => ⟨add_le_add_right h.1 x, add_lf_add_right h.2 x⟩⟩ | instance | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | addRightStrictMono | null |
addLeftStrictMono : AddLeftStrictMono PGame :=
⟨fun x _ _ h => ⟨add_le_add_left h.1 x, add_lf_add_left h.2 x⟩⟩ | instance | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | addLeftStrictMono | null |
add_lf_add_of_lf_of_le {w x y z : PGame} (hwx : w ⧏ x) (hyz : y ≤ z) : w + y ⧏ x + z :=
lf_of_lf_of_le (add_lf_add_right hwx y) (add_le_add_left hyz x) | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_lf_add_of_lf_of_le | null |
add_lf_add_of_le_of_lf {w x y z : PGame} (hwx : w ≤ x) (hyz : y ⧏ z) : w + y ⧏ x + z :=
lf_of_le_of_lf (add_le_add_right hwx y) (add_lf_add_left hyz x) | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_lf_add_of_le_of_lf | null |
add_congr {w x y z : PGame} (h₁ : w ≈ x) (h₂ : y ≈ z) : w + y ≈ x + z :=
⟨(add_le_add_left h₂.1 w).trans (add_le_add_right h₁.1 z),
(add_le_add_left h₂.2 x).trans (add_le_add_right h₁.2 y)⟩ | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_congr | null |
add_congr_left {x y z : PGame} (h : x ≈ y) : x + z ≈ y + z :=
add_congr h equiv_rfl | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_congr_left | null |
add_congr_right {x y z : PGame} : (y ≈ z) → (x + y ≈ x + z) :=
add_congr equiv_rfl | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | add_congr_right | null |
sub_congr {w x y z : PGame} (h₁ : w ≈ x) (h₂ : y ≈ z) : w - y ≈ x - z :=
add_congr h₁ (neg_equiv_neg_iff.2 h₂) | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | sub_congr | null |
sub_congr_left {x y z : PGame} (h : x ≈ y) : x - z ≈ y - z :=
sub_congr h equiv_rfl | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | sub_congr_left | null |
sub_congr_right {x y z : PGame} : (y ≈ z) → (x - y ≈ x - z) :=
sub_congr equiv_rfl | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | sub_congr_right | null |
le_iff_sub_nonneg {x y : PGame} : x ≤ y ↔ 0 ≤ y - x :=
⟨fun h => (zero_le_add_neg_cancel x).trans (add_le_add_right h _), fun h =>
calc
x ≤ 0 + x := (PGame.zero_add x).symm.le
_ ≤ y - x + x := by gcongr
_ ≤ y + (-x + x) := (PGame.add_assoc _ _ _).le
_ ≤ y + 0 := add_le_add_left (neg_add_cancel_le_zero x) _
_ ≤ y := (PGame.add_zero y).le
⟩ | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | le_iff_sub_nonneg | null |
lf_iff_sub_zero_lf {x y : PGame} : x ⧏ y ↔ 0 ⧏ y - x :=
⟨fun h => (zero_le_add_neg_cancel x).trans_lf (add_lf_add_right h _), fun h =>
calc
x ≤ 0 + x := (PGame.zero_add x).symm.le
_ ⧏ y - x + x := add_lf_add_right h _
_ ≤ y + (-x + x) := (PGame.add_assoc _ _ _).le
_ ≤ y + 0 := add_le_add_left (neg_add_cancel_le_zero x) _
_ ≤ y := (PGame.add_zero y).le
⟩ | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | lf_iff_sub_zero_lf | null |
lt_iff_sub_pos {x y : PGame} : x < y ↔ 0 < y - x :=
⟨fun h => lt_of_le_of_lt (zero_le_add_neg_cancel x) (add_lt_add_right h _), fun h =>
calc
x ≤ 0 + x := (PGame.zero_add x).symm.le
_ < y - x + x := add_lt_add_right h _
_ ≤ y + (-x + x) := (PGame.add_assoc _ _ _).le
_ ≤ y + 0 := by gcongr; exact neg_add_cancel_le_zero x
_ ≤ y := (PGame.add_zero y).le
⟩
/-! ### Interaction of option insertion with negation -/ | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | lt_iff_sub_pos | null |
neg_insertRight_neg (x x' : PGame.{u}) : (-x).insertRight (-x') = -x.insertLeft x' := by
cases x
cases x'
dsimp [insertRight, insertLeft]
congr! with (i | j) | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_insertRight_neg | null |
neg_insertLeft_neg (x x' : PGame.{u}) : (-x).insertLeft (-x') = -x.insertRight x' := by
rw [← neg_eq_iff_eq_neg, ← neg_insertRight_neg, neg_neg, neg_neg]
/-! ### Special pre-games -/ | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | neg_insertLeft_neg | null |
star : PGame.{u} :=
⟨PUnit, PUnit, fun _ => 0, fun _ => 0⟩
@[simp] | def | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | star | The pre-game `star`, which is fuzzy with zero. |
star_leftMoves : star.LeftMoves = PUnit :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | star_leftMoves | null |
star_rightMoves : star.RightMoves = PUnit :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | star_rightMoves | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.