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 ⌀ |
|---|---|---|---|---|---|---|
star_moveLeft (x) : star.moveLeft x = 0 :=
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_moveLeft | null |
star_moveRight (x) : star.moveRight x = 0 :=
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 | star_moveRight | null |
uniqueStarLeftMoves : Unique star.LeftMoves :=
PUnit.instUnique | instance | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | uniqueStarLeftMoves | null |
uniqueStarRightMoves : Unique star.RightMoves :=
PUnit.instUnique | instance | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | uniqueStarRightMoves | null |
zero_lf_star : 0 ⧏ star := by
rw [zero_lf]
use default
rintro ⟨⟩ | 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_star | null |
star_lf_zero : star ⧏ 0 := by
rw [lf_zero]
use default
rintro ⟨⟩ | 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_lf_zero | null |
star_fuzzy_zero : star ‖ 0 :=
⟨star_lf_zero, zero_lf_star⟩
@[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_fuzzy_zero | null |
neg_star : -star = star := by simp [star]
@[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_star | null |
protected zero_lt_one : (0 : PGame) < 1 :=
lt_of_le_of_lf (zero_le_of_isEmpty_rightMoves 1) (zero_lf_le.2 ⟨default, le_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 | zero_lt_one | null |
up : PGame.{u} :=
⟨PUnit, PUnit, fun _ => 0, fun _ => star⟩
@[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 | up | The pre-game `up` |
up_leftMoves : up.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 | up_leftMoves | null |
up_rightMoves : up.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 | up_rightMoves | null |
up_moveLeft (x) : up.moveLeft x = 0 :=
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 | up_moveLeft | null |
up_moveRight (x) : up.moveRight x = star :=
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 | up_moveRight | null |
up_neg : 0 < up := by
rw [lt_iff_le_and_lf, zero_lf]
simp [zero_le_lf, zero_lf_star] | theorem | SetTheory | [
"Mathlib.Algebra.Order.ZeroLEOne",
"Mathlib.SetTheory.PGame.Order",
"Mathlib.Data.Nat.Cast.Defs",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Algebra.lean | up_neg | null |
star_fuzzy_up : star ‖ up := by
unfold Fuzzy
simp only [← PGame.not_le]
simp [le_iff_forall_lf] | 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_fuzzy_up | null |
down : PGame.{u} :=
⟨PUnit, PUnit, fun _ => star, 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 | down | The pre-game `down` |
down_leftMoves : down.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 | down_leftMoves | null |
down_rightMoves : down.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 | down_rightMoves | null |
down_moveLeft (x) : down.moveLeft x = star :=
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 | down_moveLeft | null |
down_moveRight (x) : down.moveRight x = 0 :=
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 | down_moveRight | null |
down_neg : down < 0 := by
rw [lt_iff_le_and_lf, lf_zero]
simp [le_zero_lf, star_lf_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 | down_neg | null |
neg_down : -down = up := by simp [up, down]
@[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_down | null |
neg_up : -up = down := by simp [up, down] | 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_up | null |
star_fuzzy_down : star ‖ down := by
rw [← neg_fuzzy_neg_iff, neg_down, neg_star]
exact star_fuzzy_up | 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_fuzzy_down | null |
@[simp]
zero_lf_one : (0 : PGame) ⧏ 1 :=
PGame.zero_lt_one.lf | 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_one | null |
PGame : Type (u + 1)
| mk : ∀ α β : Type u, (α → PGame) → (β → PGame) → PGame
compile_inductive% PGame | inductive | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | PGame | The type of pre-games, before we have quotiented
by equivalence (`PGame.setoid`). In ZFC, a combinatorial game is constructed from
two sets of combinatorial games that have been constructed at an earlier
stage. To do this in type theory, we say that a pre-game is built
inductively from two families of pre-games indexed over any type
in Type u. The resulting type `PGame.{u}` lives in `Type (u+1)`,
reflecting that it is a proper class in ZFC. |
LeftMoves : PGame → Type u
| mk l _ _ _ => l | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | LeftMoves | The indexing type for allowable moves by Left. |
RightMoves : PGame → Type u
| mk _ r _ _ => r | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | RightMoves | The indexing type for allowable moves by Right. |
moveLeft : ∀ g : PGame, LeftMoves g → PGame
| mk _l _ L _ => L | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | moveLeft | The new game after Left makes an allowed move. |
moveRight : ∀ g : PGame, RightMoves g → PGame
| mk _ _r _ R => R
@[simp] | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | moveRight | The new game after Right makes an allowed move. |
leftMoves_mk {xl xr xL xR} : (⟨xl, xr, xL, xR⟩ : PGame).LeftMoves = xl :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | leftMoves_mk | null |
moveLeft_mk {xl xr xL xR} : (⟨xl, xr, xL, xR⟩ : PGame).moveLeft = xL :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | moveLeft_mk | null |
rightMoves_mk {xl xr xL xR} : (⟨xl, xr, xL, xR⟩ : PGame).RightMoves = xr :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | rightMoves_mk | null |
moveRight_mk {xl xr xL xR} : (⟨xl, xr, xL, xR⟩ : PGame).moveRight = xR :=
rfl | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | moveRight_mk | null |
ext {x y : PGame} (hl : x.LeftMoves = y.LeftMoves) (hr : x.RightMoves = y.RightMoves)
(hL : ∀ i j, i ≍ j → x.moveLeft i = y.moveLeft j)
(hR : ∀ i j, i ≍ j → x.moveRight i = y.moveRight j) :
x = y := by
cases x
cases y
subst hl hr
simp only [leftMoves_mk, rightMoves_mk, heq_eq_eq, forall_eq', mk.injEq, true_and] at *
exact ⟨funext hL, funext hR⟩ | lemma | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | ext | null |
ofLists (L R : List PGame.{u}) : PGame.{u} :=
mk (ULift (Fin L.length)) (ULift (Fin R.length)) (fun i => L[i.down.1]) fun j ↦ R[j.down.1] | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | ofLists | Construct a pre-game from list of pre-games describing the available moves for Left and Right. |
leftMoves_ofLists (L R : List PGame) : (ofLists L R).LeftMoves = ULift (Fin L.length) :=
rfl | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | leftMoves_ofLists | null |
rightMoves_ofLists (L R : List PGame) : (ofLists L R).RightMoves = ULift (Fin R.length) :=
rfl | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | rightMoves_ofLists | null |
toOfListsLeftMoves {L R : List PGame} : Fin L.length ≃ (ofLists L R).LeftMoves :=
Equiv.ulift.symm | abbrev | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | toOfListsLeftMoves | Converts a number into a left move for `ofLists`.
This is just an abbreviation for `Equiv.ulift.symm` |
toOfListsRightMoves {L R : List PGame} : Fin R.length ≃ (ofLists L R).RightMoves :=
Equiv.ulift.symm
@[simp] | abbrev | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | toOfListsRightMoves | Converts a number into a right move for `ofLists`.
This is just an abbreviation for `Equiv.ulift.symm` |
ofLists_moveLeft' {L R : List PGame} (i : (ofLists L R).LeftMoves) :
(ofLists L R).moveLeft i = L[i.down.val] :=
rfl | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | ofLists_moveLeft' | null |
ofLists_moveLeft {L R : List PGame} (i : Fin L.length) :
(ofLists L R).moveLeft (ULift.up i) = L[i] :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | ofLists_moveLeft | null |
ofLists_moveRight' {L R : List PGame} (i : (ofLists L R).RightMoves) :
(ofLists L R).moveRight i = R[i.down.val] :=
rfl | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | ofLists_moveRight' | null |
ofLists_moveRight {L R : List PGame} (i : Fin R.length) :
(ofLists L R).moveRight (ULift.up i) = R[i] :=
rfl | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | ofLists_moveRight | null |
@[elab_as_elim]
moveRecOn {C : PGame → Sort*} (x : PGame)
(IH : ∀ y : PGame, (∀ i, C (y.moveLeft i)) → (∀ j, C (y.moveRight j)) → C y) : C x :=
x.recOn fun yl yr yL yR => IH (mk yl yr yL yR) | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | moveRecOn | A variant of `PGame.recOn` expressed in terms of `PGame.moveLeft` and `PGame.moveRight`.
Both this and `PGame.recOn` describe Conway induction on games. |
@[mk_iff]
IsOption : PGame → PGame → Prop
| moveLeft {x : PGame} (i : x.LeftMoves) : IsOption (x.moveLeft i) x
| moveRight {x : PGame} (i : x.RightMoves) : IsOption (x.moveRight i) x | inductive | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | IsOption | `IsOption x y` means that `x` is either a left or right option for `y`. |
IsOption.mk_left {xl xr : Type u} (xL : xl → PGame) (xR : xr → PGame) (i : xl) :
(xL i).IsOption (mk xl xr xL xR) :=
@IsOption.moveLeft (mk _ _ _ _) i | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | IsOption.mk_left | null |
IsOption.mk_right {xl xr : Type u} (xL : xl → PGame) (xR : xr → PGame) (i : xr) :
(xR i).IsOption (mk xl xr xL xR) :=
@IsOption.moveRight (mk _ _ _ _) i | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | IsOption.mk_right | null |
wf_isOption : WellFounded IsOption :=
⟨fun x =>
moveRecOn x fun x IHl IHr =>
Acc.intro x fun y h => by
induction h with
| moveLeft i => exact IHl i
| moveRight j => exact IHr j⟩ | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | wf_isOption | null |
Subsequent : PGame → PGame → Prop :=
TransGen IsOption | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Subsequent | `Subsequent x y` says that `x` can be obtained by playing some nonempty sequence of moves from
`y`. It is the transitive closure of `IsOption`. |
@[trans]
Subsequent.trans {x y z} : Subsequent x y → Subsequent y z → Subsequent x z :=
TransGen.trans | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Subsequent.trans | null |
wf_subsequent : WellFounded Subsequent :=
wf_isOption.transGen | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | wf_subsequent | null |
@[simp]
Subsequent.moveLeft {x : PGame} (i : x.LeftMoves) : Subsequent (x.moveLeft i) x :=
TransGen.single (IsOption.moveLeft i)
@[simp] | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Subsequent.moveLeft | null |
Subsequent.moveRight {x : PGame} (j : x.RightMoves) : Subsequent (x.moveRight j) x :=
TransGen.single (IsOption.moveRight j)
@[simp] | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Subsequent.moveRight | null |
Subsequent.mk_left {xl xr} (xL : xl → PGame) (xR : xr → PGame) (i : xl) :
Subsequent (xL i) (mk xl xr xL xR) :=
@Subsequent.moveLeft (mk _ _ _ _) i
@[simp] | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Subsequent.mk_left | null |
Subsequent.mk_right {xl xr} (xL : xl → PGame) (xR : xr → PGame) (j : xr) :
Subsequent (xR j) (mk xl xr xL xR) :=
@Subsequent.moveRight (mk _ _ _ _) j | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Subsequent.mk_right | null |
instOnePGame : One PGame :=
⟨⟨PUnit, PEmpty, fun _ => 0, PEmpty.elim⟩⟩
@[simp] | instance | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | instOnePGame | Discharges proof obligations of the form `⊢ Subsequent ..` arising in termination proofs
of definitions using well-founded recursion on `PGame`.
-/
macro "pgame_wf_tac" : tactic =>
`(tactic| solve_by_elim (config := { maxDepth := 8 })
[Prod.Lex.left, Prod.Lex.right, PSigma.Lex.left, PSigma.Lex.right,
Subsequent.moveLeft, Subsequent.moveRight, Subsequent.mk_left, Subsequent.mk_right,
Subsequent.trans])
-- Register some consequences of pgame_wf_tac as simp-lemmas for convenience
-- (which are applied by default for WF goals)
variable {xl xr : Type u}
-- This is different from mk_right from the POV of the simplifier,
-- because the unifier can't solve `xr =?= RightMoves (mk xl xr xL xR)` at reducible transparency.
@[simp]
theorem Subsequent.mk_right' (xL : xl → PGame) (xR : xr → PGame) (j : RightMoves (mk xl xr xL xR)) :
Subsequent (xR j) (mk xl xr xL xR) := by
pgame_wf_tac
@[simp] theorem Subsequent.moveRight_mk_left {xR : xr → PGame} {i : xl} (xL : xl → PGame) (j) :
Subsequent ((xL i).moveRight j) (mk xl xr xL xR) := by
pgame_wf_tac
@[simp] theorem Subsequent.moveRight_mk_right {xL : xl → PGame} {i : xr} (xR : xr → PGame) (j) :
Subsequent ((xR i).moveRight j) (mk xl xr xL xR) := by
pgame_wf_tac
@[simp] theorem Subsequent.moveLeft_mk_left {xR : xr → PGame} {i : xl} (xL : xl → PGame) (j) :
Subsequent ((xL i).moveLeft j) (mk xl xr xL xR) := by
pgame_wf_tac
@[simp] theorem Subsequent.moveLeft_mk_right {xL : xl → PGame} {i : xr} (xR : xr → PGame) (j) :
Subsequent ((xR i).moveLeft j) (mk xl xr xL xR) := by
pgame_wf_tac
/-! ### Basic pre-games -/
/-- The pre-game `Zero` is defined by `0 = { | }`. -/
instance : Zero PGame :=
⟨⟨PEmpty, PEmpty, PEmpty.elim, PEmpty.elim⟩⟩
@[simp]
theorem zero_leftMoves : LeftMoves 0 = PEmpty :=
rfl
@[simp]
theorem zero_rightMoves : RightMoves 0 = PEmpty :=
rfl
instance isEmpty_zero_leftMoves : IsEmpty (LeftMoves 0) :=
PEmpty.instIsEmpty
instance isEmpty_zero_rightMoves : IsEmpty (RightMoves 0) :=
PEmpty.instIsEmpty
instance : Inhabited PGame :=
⟨0⟩
/-- The pre-game `One` is defined by `1 = { 0 | }`. |
one_leftMoves : LeftMoves 1 = PUnit :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | one_leftMoves | null |
one_moveLeft (x) : moveLeft 1 x = 0 :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | one_moveLeft | null |
one_rightMoves : RightMoves 1 = PEmpty :=
rfl | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | one_rightMoves | null |
uniqueOneLeftMoves : Unique (LeftMoves 1) :=
PUnit.instUnique | instance | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | uniqueOneLeftMoves | null |
isEmpty_one_rightMoves : IsEmpty (RightMoves 1) :=
PEmpty.instIsEmpty
/-! ### Identity -/ | instance | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | isEmpty_one_rightMoves | null |
Identical : PGame.{u} → PGame.{u} → Prop
| mk _ _ xL xR, mk _ _ yL yR =>
Relator.BiTotal (fun i j ↦ Identical (xL i) (yL j)) ∧
Relator.BiTotal (fun i j ↦ Identical (xR i) (yR j))
@[inherit_doc] scoped infix:50 " ≡ " => PGame.Identical | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Identical | Two pre-games are identical if their left and right sets are identical.
That is, `Identical x y` if every left move of `x` is identical to some left move of `y`,
every right move of `x` is identical to some right move of `y`, and vice versa. |
identical_iff : ∀ {x y : PGame}, x ≡ y ↔
Relator.BiTotal (x.moveLeft · ≡ y.moveLeft ·) ∧ Relator.BiTotal (x.moveRight · ≡ y.moveRight ·)
| mk _ _ _ _, mk _ _ _ _ => Iff.rfl
@[refl, simp] protected theorem Identical.refl (x) : x ≡ x :=
PGame.recOn x fun _ _ _ _ IHL IHR ↦ ⟨Relator.BiTotal.refl IHL, Relator.BiTotal.refl IHR⟩ | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | identical_iff | null |
protected Identical.rfl {x} : x ≡ x := Identical.refl x
@[symm] protected theorem Identical.symm : ∀ {x y}, x ≡ y → y ≡ x
| mk _ _ _ _, mk _ _ _ _, ⟨hL, hR⟩ => ⟨hL.symm fun _ _ h ↦ h.symm, hR.symm fun _ _ h ↦ h.symm⟩ | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Identical.rfl | null |
identical_comm {x y} : x ≡ y ↔ y ≡ x :=
⟨.symm, .symm⟩
@[trans] protected theorem Identical.trans : ∀ {x y z}, x ≡ y → y ≡ z → x ≡ z
| mk _ _ _ _, mk _ _ _ _, mk _ _ _ _, ⟨hL₁, hR₁⟩, ⟨hL₂, hR₂⟩ =>
⟨hL₁.trans (fun _ _ _ h₁ h₂ ↦ h₁.trans h₂) hL₂, hR₁.trans (fun _ _ _ h₁ h₂ ↦ h₁.trans h₂) hR₂⟩ | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | identical_comm | null |
memₗ (x y : PGame.{u}) : Prop := ∃ b, x ≡ y.moveLeft b | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | memₗ | `x ∈ₗ y` if `x` is identical to some left move of `y`. |
memᵣ (x y : PGame.{u}) : Prop := ∃ b, x ≡ y.moveRight b
@[inherit_doc] scoped infix:50 " ∈ₗ " => PGame.memₗ
@[inherit_doc] scoped infix:50 " ∈ᵣ " => PGame.memᵣ
@[inherit_doc PGame.memₗ] binder_predicate x " ∈ₗ " y:term => `($x ∈ₗ $y)
@[inherit_doc PGame.memᵣ] binder_predicate x " ∈ᵣ " y:term => `($x ∈ᵣ $y) | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | memᵣ | `x ∈ᵣ y` if `x` is identical to some right move of `y`. |
memₗ_def {x y : PGame} : x ∈ₗ y ↔ ∃ b, x ≡ y.moveLeft b := .rfl | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | memₗ_def | null |
memᵣ_def {x y : PGame} : x ∈ᵣ y ↔ ∃ b, x ≡ y.moveRight b := .rfl | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | memᵣ_def | null |
moveLeft_memₗ (x : PGame) (b) : x.moveLeft b ∈ₗ x := ⟨_, .rfl⟩ | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | moveLeft_memₗ | null |
moveRight_memᵣ (x : PGame) (b) : x.moveRight b ∈ᵣ x := ⟨_, .rfl⟩ | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | moveRight_memᵣ | null |
identical_of_isEmpty (x y : PGame)
[IsEmpty x.LeftMoves] [IsEmpty x.RightMoves]
[IsEmpty y.LeftMoves] [IsEmpty y.RightMoves] : x ≡ y :=
identical_iff.2 (by simp [biTotal_empty]) | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | identical_of_isEmpty | null |
identicalSetoid : Setoid PGame :=
⟨Identical, Identical.refl, Identical.symm, Identical.trans⟩ | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | identicalSetoid | `Identical` as a `Setoid`. |
Identical.moveLeft : ∀ {x y}, x ≡ y →
∀ i, ∃ j, x.moveLeft i ≡ y.moveLeft j
| mk _ _ _ _, mk _ _ _ _, ⟨hl, _⟩, i => hl.1 i | lemma | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Identical.moveLeft | If `x` and `y` are identical, then a left move of `x` is identical to some left move of `y`. |
Identical.moveRight : ∀ {x y}, x ≡ y →
∀ i, ∃ j, x.moveRight i ≡ y.moveRight j
| mk _ _ _ _, mk _ _ _ _, ⟨_, hr⟩, i => hr.1 i | lemma | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Identical.moveRight | If `x` and `y` are identical, then a right move of `x` is identical to some right move of `y`. |
identical_of_eq {x y : PGame} (h : x = y) : x ≡ y := by subst h; rfl | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | identical_of_eq | null |
identical_iff' : ∀ {x y : PGame}, x ≡ y ↔
((∀ i, x.moveLeft i ∈ₗ y) ∧ (∀ j, y.moveLeft j ∈ₗ x)) ∧
((∀ i, x.moveRight i ∈ᵣ y) ∧ (∀ j, y.moveRight j ∈ᵣ x))
| mk xl xr xL xR, mk yl yr yL yR => by
convert identical_iff <;>
dsimp [Relator.BiTotal, Relator.LeftTotal, Relator.RightTotal] <;>
congr! <;>
exact exists_congr <| fun _ ↦ identical_comm | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | identical_iff' | Uses `∈ₗ` and `∈ᵣ` instead of `≡`. |
memₗ.congr_right : ∀ {x y : PGame},
x ≡ y → (∀ {w : PGame}, w ∈ₗ x ↔ w ∈ₗ y)
| mk _ _ _ _, mk _ _ _ _, ⟨⟨h₁, h₂⟩, _⟩, _w =>
⟨fun ⟨i, hi⟩ ↦ (h₁ i).imp (fun _ ↦ hi.trans),
fun ⟨j, hj⟩ ↦ (h₂ j).imp (fun _ hi ↦ hj.trans hi.symm)⟩ | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | memₗ.congr_right | null |
memᵣ.congr_right : ∀ {x y : PGame},
x ≡ y → (∀ {w : PGame}, w ∈ᵣ x ↔ w ∈ᵣ y)
| mk _ _ _ _, mk _ _ _ _, ⟨_, ⟨h₁, h₂⟩⟩, _w =>
⟨fun ⟨i, hi⟩ ↦ (h₁ i).imp (fun _ ↦ hi.trans),
fun ⟨j, hj⟩ ↦ (h₂ j).imp (fun _ hi ↦ hj.trans hi.symm)⟩ | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | memᵣ.congr_right | null |
memₗ.congr_left : ∀ {x y : PGame},
x ≡ y → (∀ {w : PGame}, x ∈ₗ w ↔ y ∈ₗ w)
| _, _, h, mk _ _ _ _ => ⟨fun ⟨i, hi⟩ ↦ ⟨i, h.symm.trans hi⟩, fun ⟨i, hi⟩ ↦ ⟨i, h.trans hi⟩⟩ | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | memₗ.congr_left | null |
memᵣ.congr_left : ∀ {x y : PGame},
x ≡ y → (∀ {w : PGame}, x ∈ᵣ w ↔ y ∈ᵣ w)
| _, _, h, mk _ _ _ _ => ⟨fun ⟨i, hi⟩ ↦ ⟨i, h.symm.trans hi⟩, fun ⟨i, hi⟩ ↦ ⟨i, h.trans hi⟩⟩ | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | memᵣ.congr_left | null |
Identical.ext : ∀ {x y}, (∀ z, z ∈ₗ x ↔ z ∈ₗ y) → (∀ z, z ∈ᵣ x ↔ z ∈ᵣ y) → x ≡ y
| mk _ _ _ _, mk _ _ _ _, hl, hr => identical_iff'.mpr
⟨⟨fun i ↦ (hl _).mp ⟨i, refl _⟩, fun j ↦ (hl _).mpr ⟨j, refl _⟩⟩,
⟨fun i ↦ (hr _).mp ⟨i, refl _⟩, fun j ↦ (hr _).mpr ⟨j, refl _⟩⟩⟩ | lemma | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Identical.ext | null |
Identical.ext_iff {x y} : x ≡ y ↔ (∀ z, z ∈ₗ x ↔ z ∈ₗ y) ∧ (∀ z, z ∈ᵣ x ↔ z ∈ᵣ y) :=
⟨fun h ↦ ⟨@memₗ.congr_right _ _ h, @memᵣ.congr_right _ _ h⟩, fun h ↦ h.elim Identical.ext⟩ | lemma | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Identical.ext_iff | null |
Identical.congr_right {x y z} (h : x ≡ y) : z ≡ x ↔ z ≡ y :=
⟨fun hz ↦ hz.trans h, fun hz ↦ hz.trans h.symm⟩ | lemma | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Identical.congr_right | null |
Identical.congr_left {x y z} (h : x ≡ y) : x ≡ z ↔ y ≡ z :=
⟨fun hz ↦ h.symm.trans hz, fun hz ↦ h.trans hz⟩ | lemma | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Identical.congr_left | null |
Identical.of_fn {x y : PGame}
(l : x.LeftMoves → y.LeftMoves) (il : y.LeftMoves → x.LeftMoves)
(r : x.RightMoves → y.RightMoves) (ir : y.RightMoves → x.RightMoves)
(hl : ∀ i, x.moveLeft i ≡ y.moveLeft (l i))
(hil : ∀ i, x.moveLeft (il i) ≡ y.moveLeft i)
(hr : ∀ i, x.moveRight i ≡ y.moveRight (r i))
(hir : ∀ i, x.moveRight (ir i) ≡ y.moveRight i) : x ≡ y :=
identical_iff.mpr
⟨⟨fun i ↦ ⟨l i, hl i⟩, fun i ↦ ⟨il i, hil i⟩⟩, ⟨fun i ↦ ⟨r i, hr i⟩, fun i ↦ ⟨ir i, hir i⟩⟩⟩ | lemma | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Identical.of_fn | Show `x ≡ y` by giving an explicit correspondence between the moves of `x` and `y`. |
Identical.of_equiv {x y : PGame}
(l : x.LeftMoves ≃ y.LeftMoves) (r : x.RightMoves ≃ y.RightMoves)
(hl : ∀ i, x.moveLeft i ≡ y.moveLeft (l i)) (hr : ∀ i, x.moveRight i ≡ y.moveRight (r i)) :
x ≡ y :=
.of_fn l l.symm r r.symm hl (by simpa using hl <| l.symm ·) hr (by simpa using hr <| r.symm ·)
/-! ### Relabellings -/ | lemma | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Identical.of_equiv | null |
Relabelling : PGame.{u} → PGame.{u} → Type (u + 1)
|
mk :
∀ {x y : PGame} (L : x.LeftMoves ≃ y.LeftMoves) (R : x.RightMoves ≃ y.RightMoves),
(∀ i, Relabelling (x.moveLeft i) (y.moveLeft (L i))) →
(∀ j, Relabelling (x.moveRight j) (y.moveRight (R j))) → Relabelling x y
@[inherit_doc]
scoped infixl:50 " ≡r " => PGame.Relabelling | inductive | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | Relabelling | `Relabelling x y` says that `x` and `y` are really the same game, just dressed up differently.
Specifically, there is a bijection between the moves for Left in `x` and in `y`, and similarly
for Right, and under these bijections we inductively have `Relabelling`s for the consequent games. |
mk' (L : y.LeftMoves ≃ x.LeftMoves) (R : y.RightMoves ≃ x.RightMoves)
(hL : ∀ i, x.moveLeft (L i) ≡r y.moveLeft i) (hR : ∀ j, x.moveRight (R j) ≡r y.moveRight j) :
x ≡r y :=
⟨L.symm, R.symm, fun i => by simpa using hL (L.symm i), fun j => by simpa using hR (R.symm j)⟩ | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | mk' | A constructor for relabellings swapping the equivalences. |
leftMovesEquiv : x ≡r y → x.LeftMoves ≃ y.LeftMoves
| ⟨L,_, _,_⟩ => L
@[simp] | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | leftMovesEquiv | The equivalence between left moves of `x` and `y` given by the relabelling. |
mk_leftMovesEquiv {x y L R hL hR} : (@Relabelling.mk x y L R hL hR).leftMovesEquiv = L :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | mk_leftMovesEquiv | null |
mk'_leftMovesEquiv {x y L R hL hR} :
(@Relabelling.mk' x y L R hL hR).leftMovesEquiv = L.symm :=
rfl | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | mk'_leftMovesEquiv | null |
rightMovesEquiv : x ≡r y → x.RightMoves ≃ y.RightMoves
| ⟨_, R, _, _⟩ => R
@[simp] | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | rightMovesEquiv | The equivalence between right moves of `x` and `y` given by the relabelling. |
mk_rightMovesEquiv {x y L R hL hR} : (@Relabelling.mk x y L R hL hR).rightMovesEquiv = R :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | mk_rightMovesEquiv | null |
mk'_rightMovesEquiv {x y L R hL hR} :
(@Relabelling.mk' x y L R hL hR).rightMovesEquiv = R.symm :=
rfl | theorem | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | mk'_rightMovesEquiv | null |
moveLeft : ∀ (r : x ≡r y) (i : x.LeftMoves), x.moveLeft i ≡r y.moveLeft (r.leftMovesEquiv i)
| ⟨_, _, hL, _⟩ => hL | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | moveLeft | A left move of `x` is a relabelling of a left move of `y`. |
moveLeftSymm :
∀ (r : x ≡r y) (i : y.LeftMoves), x.moveLeft (r.leftMovesEquiv.symm i) ≡r y.moveLeft i
| ⟨L, R, hL, hR⟩, i => by simpa using hL (L.symm i) | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | moveLeftSymm | A left move of `y` is a relabelling of a left move of `x`. |
moveRight :
∀ (r : x ≡r y) (i : x.RightMoves), x.moveRight i ≡r y.moveRight (r.rightMovesEquiv i)
| ⟨_, _, _, hR⟩ => hR | def | SetTheory | [
"Mathlib.Data.Nat.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/PGame/Basic.lean | moveRight | A right move of `x` is a relabelling of a right move of `y`. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.