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 ⌀ |
|---|---|---|---|---|---|---|
toNat_congr {β : Type v} (e : α ≃ β) : toNat #α = toNat #β := by
rw [← toNat_lift, (lift_mk_eq.{_,_,v}).mpr ⟨e⟩, toNat_lift] | theorem | SetTheory | [
"Mathlib.SetTheory.Cardinal.ENat"
] | Mathlib/SetTheory/Cardinal/ToNat.lean | toNat_congr | null |
toNat_mul (x y : Cardinal) : toNat (x * y) = toNat x * toNat y := map_mul toNat x y
@[simp] | theorem | SetTheory | [
"Mathlib.SetTheory.Cardinal.ENat"
] | Mathlib/SetTheory/Cardinal/ToNat.lean | toNat_mul | null |
toNat_add (hc : c < ℵ₀) (hd : d < ℵ₀) : toNat (c + d) = toNat c + toNat d := by
lift c to ℕ using hc
lift d to ℕ using hd
norm_cast | theorem | SetTheory | [
"Mathlib.SetTheory.Cardinal.ENat"
] | Mathlib/SetTheory/Cardinal/ToNat.lean | toNat_add | null |
toNat_lift_add_lift {a : Cardinal.{u}} {b : Cardinal.{v}} (ha : a < ℵ₀) (hb : b < ℵ₀) :
toNat (lift.{v} a + lift.{u} b) = toNat a + toNat b := by
simp [*]
@[simp] | theorem | SetTheory | [
"Mathlib.SetTheory.Cardinal.ENat"
] | Mathlib/SetTheory/Cardinal/ToNat.lean | toNat_lift_add_lift | null |
natCast_toNat_le (a : Cardinal) : (toNat a : Cardinal) ≤ a := by
obtain h | h := lt_or_ge a ℵ₀
· simp [cast_toNat_of_lt_aleph0 h]
· simp [Cardinal.toNat_apply_of_aleph0_le h] | lemma | SetTheory | [
"Mathlib.SetTheory.Cardinal.ENat"
] | Mathlib/SetTheory/Cardinal/ToNat.lean | natCast_toNat_le | null |
univLE_iff_cardinal_le : UnivLE.{u, v} ↔ univ.{u, v+1} ≤ univ.{v, u+1} := by
rw [← not_iff_not, univLE_iff]; simp_rw [small_iff_lift_mk_lt_univ]; push_neg
refine ⟨fun ⟨α, le⟩ ↦ ?_, fun h ↦ ?_⟩
· rw [univ_umax.{v,u}, ← lift_le.{u+1}, lift_univ, lift_lift] at le
exact le.trans_lt (lift_lt_univ'.{u,v+1} #α)
· obtain ⟨⟨α⟩, h⟩ := lt_univ'.mp h; use α
rw [univ_umax.{v,u}, ← lift_le.{u+1}, lift_univ, lift_lift]
exact h.le | theorem | SetTheory | [
"Mathlib.Logic.UnivLE",
"Mathlib.SetTheory.Ordinal.Basic"
] | Mathlib/SetTheory/Cardinal/UnivLE.lean | univLE_iff_cardinal_le | null |
univLE_iff_exists_embedding : UnivLE.{u, v} ↔ Nonempty (Ordinal.{u} ↪ Ordinal.{v}) := by
rw [univLE_iff_cardinal_le]
exact lift_mk_le' | theorem | SetTheory | [
"Mathlib.Logic.UnivLE",
"Mathlib.SetTheory.Ordinal.Basic"
] | Mathlib/SetTheory/Cardinal/UnivLE.lean | univLE_iff_exists_embedding | null |
Ordinal.univLE_of_injective {f : Ordinal.{u} → Ordinal.{v}} (h : f.Injective) :
UnivLE.{u, v} :=
univLE_iff_exists_embedding.2 ⟨f, h⟩ | theorem | SetTheory | [
"Mathlib.Logic.UnivLE",
"Mathlib.SetTheory.Ordinal.Basic"
] | Mathlib/SetTheory/Cardinal/UnivLE.lean | Ordinal.univLE_of_injective | null |
univLE_total : UnivLE.{u, v} ∨ UnivLE.{v, u} := by
simp_rw [univLE_iff_cardinal_le]; apply le_total | theorem | SetTheory | [
"Mathlib.Logic.UnivLE",
"Mathlib.SetTheory.Ordinal.Basic"
] | Mathlib/SetTheory/Cardinal/UnivLE.lean | univLE_total | Together with transitivity, this shows `UnivLE` is a total preorder. |
tree (A : Type*) : CompleteSublattice (Set (List A)) :=
CompleteSublattice.mk' {T | ∀ ⦃x : List A⦄ ⦃a : A⦄, x ++ [a] ∈ T → x ∈ T}
(by rintro S hS x a ⟨t, ht, hx⟩; use t, ht, hS ht hx)
(by rintro S hS x a h T hT; exact hS hT <| h T hT)
@[simps!] instance (A : Type*) : SetLike (tree A) (List A) := SetLike.instSubtypeSet | def | SetTheory | [
"Mathlib.Order.CompleteLattice.SetLike"
] | Mathlib/SetTheory/Descriptive/Tree.lean | tree | A tree is a set of finite sequences, implemented as `List A`, that is stable under
taking prefixes. For the definition we use the equivalent property `x ++ [a] ∈ T → x ∈ T`,
which is more convenient to check. We define `tree A` as a complete sublattice of
`Set (List A)`, which coerces to the type of trees on `A`. |
mem_of_append {x y : List A} (h : x ++ y ∈ T) : x ∈ T := by
induction y generalizing x with
| nil => simpa using h
| cons y ys ih => exact T.prop (ih (by simpa)) | lemma | SetTheory | [
"Mathlib.Order.CompleteLattice.SetLike"
] | Mathlib/SetTheory/Descriptive/Tree.lean | mem_of_append | null |
mem_of_prefix {x y : List A} (h' : x <+: y) (h : y ∈ T) : x ∈ T := by
obtain ⟨_, rfl⟩ := h'; exact mem_of_append h | lemma | SetTheory | [
"Mathlib.Order.CompleteLattice.SetLike"
] | Mathlib/SetTheory/Descriptive/Tree.lean | mem_of_prefix | null |
singleton_mem (T : tree A) {a : A} {x : List A} (h : a :: x ∈ T) : [a] ∈ T :=
mem_of_prefix ⟨x, rfl⟩ h
@[simp] lemma tree_eq_bot : T = ⊥ ↔ [] ∉ T where
mp := by rintro rfl; simp
mpr h := by ext x; simpa using fun h' ↦ h <| mem_of_prefix x.nil_prefix h' | lemma | SetTheory | [
"Mathlib.Order.CompleteLattice.SetLike"
] | Mathlib/SetTheory/Descriptive/Tree.lean | singleton_mem | null |
take_mem {n : ℕ} (x : T) : x.val.take n ∈ T :=
mem_of_prefix (x.val.take_prefix n) x.prop | lemma | SetTheory | [
"Mathlib.Order.CompleteLattice.SetLike"
] | Mathlib/SetTheory/Descriptive/Tree.lean | take_mem | null |
@[simps] take (n : ℕ) (x : T) : T := ⟨x.val.take n, take_mem x⟩
@[simp] lemma take_take (m n : ℕ) (x : T) : take m (take n x) = take (m ⊓ n) x := by
simp [Subtype.ext_iff, List.take_take]
@[simp] lemma take_eq_take {x : T} {m n : ℕ} :
take m x = take n x ↔ m ⊓ x.val.length = n ⊓ x.val.length := by simp [Subtype.ext_iff]
variable (T) (x y : List A) | def | SetTheory | [
"Mathlib.Order.CompleteLattice.SetLike"
] | Mathlib/SetTheory/Descriptive/Tree.lean | take | A variant of `List.take` internally to a tree |
subAt : tree A := ⟨(x ++ ·)⁻¹' T, fun _ _ _ ↦ mem_of_append (by rwa [List.append_assoc])⟩
@[simp] lemma mem_subAt : y ∈ subAt T x ↔ x ++ y ∈ T := Iff.rfl
@[simp] lemma subAt_nil : subAt T [] = T := rfl
@[simp] lemma subAt_append : subAt (subAt T x) y = subAt T (x ++ y) := by ext; simp
@[gcongr] lemma subAt_mono (h : S ≤ T) : subAt S x ≤ subAt T x :=
Set.preimage_mono h | def | SetTheory | [
"Mathlib.Order.CompleteLattice.SetLike"
] | Mathlib/SetTheory/Descriptive/Tree.lean | subAt | The residual tree obtained by regarding the node x as new root |
@[simps] drop (n : ℕ) (x : T) : subAt T (Tree.take n x).val :=
⟨x.val.drop n, by simp⟩ | def | SetTheory | [
"Mathlib.Order.CompleteLattice.SetLike"
] | Mathlib/SetTheory/Descriptive/Tree.lean | drop | A variant of `List.drop` that takes values in `subAt` |
pullSub : tree A where
val := { y | y.take x.length <+: x ∧ y.drop x.length ∈ T }
property := fun y a ⟨h1, h2⟩ ↦
⟨((y.prefix_append [a]).take x.length).trans h1,
mem_of_prefix ((y.prefix_append [a]).drop x.length) h2⟩
variable {T x y} | def | SetTheory | [
"Mathlib.Order.CompleteLattice.SetLike"
] | Mathlib/SetTheory/Descriptive/Tree.lean | pullSub | Adjoint of `subAt`, given by pasting x before the root of T. Explicitly,
elements are prefixes of x or x with an element of T appended |
mem_pullSub_short (hl : y.length ≤ x.length) : y ∈ pullSub T x ↔ y <+: x ∧ [] ∈ T := by
simp [pullSub, List.take_of_length_le hl, List.drop_eq_nil_iff.mpr hl] | lemma | SetTheory | [
"Mathlib.Order.CompleteLattice.SetLike"
] | Mathlib/SetTheory/Descriptive/Tree.lean | mem_pullSub_short | null |
mem_pullSub_long (hl : x.length ≤ y.length) : y ∈ pullSub T x ↔ ∃ z ∈ T, y = x ++ z where
mp := by
intro ⟨h1, h2⟩; use y.drop x.length, h2
nth_rw 1 [← List.take_append_drop x.length y]
simpa [-List.take_append_drop, List.prefix_iff_eq_take, hl] using h1
mpr := by simp +contextual [pullSub]
@[simp] lemma mem_pullSub_append : x ++ y ∈ pullSub T x ↔ y ∈ T := by simp [mem_pullSub_long]
@[simp] lemma mem_pullSub_self : x ∈ pullSub T x ↔ [] ∈ T := by
simpa using mem_pullSub_append (y := [])
variable (T x y) | lemma | SetTheory | [
"Mathlib.Order.CompleteLattice.SetLike"
] | Mathlib/SetTheory/Descriptive/Tree.lean | mem_pullSub_long | null |
pullSub_subAt : pullSub (subAt T x) x ≤ T := by
intro y (h : y ∈ pullSub _ x); rcases le_total y.length x.length with h' | h'
· rw [mem_pullSub_short h'] at h; exact mem_of_prefix h.1 (by simpa using h.2)
· rw [mem_pullSub_long h'] at h; obtain ⟨_, h, rfl⟩ := h; exact h
@[simp] lemma subAt_pullSub : subAt (pullSub T x) x = T := by
ext y; simp
@[gcongr] lemma pullSub_mono (h : S ≤ T) x : pullSub S x ≤ pullSub T x :=
fun _ ⟨h1, h2⟩ ↦ ⟨h1, h h2⟩ | lemma | SetTheory | [
"Mathlib.Order.CompleteLattice.SetLike"
] | Mathlib/SetTheory/Descriptive/Tree.lean | pullSub_subAt | null |
pullSub_adjunction (S T : tree A) (x : List A) : pullSub S x ≤ T ↔ S ≤ subAt T x where
mp _ := by rw [← subAt_pullSub S x]; gcongr
mpr _ := le_trans (by gcongr) (pullSub_subAt T x)
@[simp] lemma pullSub_nil : pullSub T [] = T := by simp [pullSub]
@[simp] lemma pullSub_append : pullSub (pullSub T y) x = pullSub T (x ++ y) := by
ext z; rcases le_total x.length z.length with hl | hl
· by_cases hp : x <+: z
· obtain ⟨z, rfl⟩ := hp
simp [pullSub, List.take_add]
· constructor <;> intro ⟨h, _⟩ <;>
[skip; replace h := by simpa [List.take_take] using h.take x.length] <;>
cases hp <| List.prefix_iff_eq_take.mpr (h.eq_of_length (by simpa)).symm
· rw [mem_pullSub_short hl, mem_pullSub_short (by simp), mem_pullSub_short (by simp; cutsat)]
simpa using fun _ ↦ (z.isPrefix_append_of_length hl).symm | lemma | SetTheory | [
"Mathlib.Order.CompleteLattice.SetLike"
] | Mathlib/SetTheory/Descriptive/Tree.lean | pullSub_adjunction | null |
Game :=
Quotient PGame.setoid | abbrev | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | Game | The type of combinatorial games. 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 combinatorial pre-game is built
inductively from two families of combinatorial 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.
A combinatorial game is then constructed by quotienting by the equivalence
`x ≈ y ↔ x ≤ y ∧ y ≤ x`. |
LF : Game → Game → Prop :=
Quotient.lift₂ PGame.LF fun _ _ _ _ hx hy => propext (lf_congr hx hy) | def | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | LF | Negation of games. -/
instance : Neg Game where
neg := Quot.map Neg.neg <| fun _ _ => (neg_equiv_neg_iff).2
instance : Zero Game where zero := ⟦0⟧
instance : Add Game where
add := Quotient.map₂ HAdd.hAdd <| fun _ _ hx _ _ hy => PGame.add_congr hx hy
instance instAddCommGroupWithOneGame : AddCommGroupWithOne Game where
zero := ⟦0⟧
one := ⟦1⟧
add_zero := by
rintro ⟨x⟩
exact Quot.sound (add_zero_equiv x)
zero_add := by
rintro ⟨x⟩
exact Quot.sound (zero_add_equiv x)
add_assoc := by
rintro ⟨x⟩ ⟨y⟩ ⟨z⟩
exact Quot.sound add_assoc_equiv
neg_add_cancel := Quotient.ind <| fun x => Quot.sound (neg_add_cancel_equiv x)
add_comm := by
rintro ⟨x⟩ ⟨y⟩
exact Quot.sound add_comm_equiv
nsmul := nsmulRec
zsmul := zsmulRec
instance : Inhabited Game :=
⟨0⟩
theorem zero_def : (0 : Game) = ⟦0⟧ :=
rfl
instance instPartialOrderGame : PartialOrder Game where
le := Quotient.lift₂ (· ≤ ·) fun _ _ _ _ hx hy => propext (le_congr hx hy)
le_refl := by
rintro ⟨x⟩
exact le_refl x
le_trans := by
rintro ⟨x⟩ ⟨y⟩ ⟨z⟩
exact @le_trans _ _ x y z
le_antisymm := by
rintro ⟨x⟩ ⟨y⟩ h₁ h₂
apply Quot.sound
exact ⟨h₁, h₂⟩
lt := Quotient.lift₂ (· < ·) fun _ _ _ _ hx hy => propext (lt_congr hx hy)
lt_iff_le_not_ge := by
rintro ⟨x⟩ ⟨y⟩
exact @lt_iff_le_not_ge _ _ x y
/-- The less or fuzzy relation on games.
If `0 ⧏ x` (less or fuzzy with), then Left can win `x` as the first player. |
@[simp]
not_le : ∀ {x y : Game}, ¬x ≤ y ↔ Game.LF y x := by
rintro ⟨x⟩ ⟨y⟩
exact PGame.not_le | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | not_le | On `Game`, simp-normal inequalities should use as few negations as possible. |
@[simp]
not_lf : ∀ {x y : Game}, ¬Game.LF x y ↔ y ≤ x := by
rintro ⟨x⟩ ⟨y⟩
exact PGame.not_lf | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | not_lf | On `Game`, simp-normal inequalities should use as few negations as possible. |
Fuzzy : Game → Game → Prop :=
Quotient.lift₂ PGame.Fuzzy fun _ _ _ _ hx hy => propext (fuzzy_congr hx hy) | def | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | Fuzzy | The fuzzy, confused, or incomparable relation on games.
If `x ‖ 0`, then the first player can always win `x`. |
le_iff_game_le {x y : PGame} : x ≤ y ↔ (⟦x⟧ : Game) ≤ ⟦y⟧ :=
Iff.rfl | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | le_iff_game_le | null |
lf_iff_game_lf {x y : PGame} : x ⧏ y ↔ Game.LF ⟦x⟧ ⟦y⟧ :=
Iff.rfl | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | lf_iff_game_lf | null |
lt_iff_game_lt {x y : PGame} : x < y ↔ (⟦x⟧ : Game) < ⟦y⟧ :=
Iff.rfl | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | lt_iff_game_lt | null |
equiv_iff_game_eq {x y : PGame} : x ≈ y ↔ (⟦x⟧ : Game) = ⟦y⟧ :=
(@Quotient.eq' _ _ x y).symm
alias ⟨game_eq, _⟩ := equiv_iff_game_eq | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | equiv_iff_game_eq | null |
fuzzy_iff_game_fuzzy {x y : PGame} : x ‖ y ↔ Game.Fuzzy ⟦x⟧ ⟦y⟧ :=
Iff.rfl | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | fuzzy_iff_game_fuzzy | null |
addLeftMono : AddLeftMono Game :=
⟨by
rintro ⟨a⟩ ⟨b⟩ ⟨c⟩ h
exact @add_le_add_left _ _ _ _ b c h a⟩ | instance | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | addLeftMono | null |
addRightMono : AddRightMono Game :=
⟨by
rintro ⟨a⟩ ⟨b⟩ ⟨c⟩ h
exact @add_le_add_right _ _ _ _ b c h a⟩ | instance | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | addRightMono | null |
addLeftStrictMono : AddLeftStrictMono Game :=
⟨by
rintro ⟨a⟩ ⟨b⟩ ⟨c⟩ h
exact @add_lt_add_left _ _ _ _ b c h a⟩ | instance | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | addLeftStrictMono | null |
addRightStrictMono : AddRightStrictMono Game :=
⟨by
rintro ⟨a⟩ ⟨b⟩ ⟨c⟩ h
exact @add_lt_add_right _ _ _ _ b c h a⟩ | instance | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | addRightStrictMono | null |
add_lf_add_right : ∀ {b c : Game} (_ : b ⧏ c) (a), (b + a : Game) ⧏ c + a := by
rintro ⟨b⟩ ⟨c⟩ h ⟨a⟩
apply PGame.add_lf_add_right h | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | add_lf_add_right | null |
add_lf_add_left : ∀ {b c : Game} (_ : b ⧏ c) (a), (a + b : Game) ⧏ a + c := by
rintro ⟨b⟩ ⟨c⟩ h ⟨a⟩
apply PGame.add_lf_add_left h | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | add_lf_add_left | null |
isOrderedAddMonoid : IsOrderedAddMonoid Game :=
{ add_le_add_left := @add_le_add_left _ _ _ Game.addLeftMono } | instance | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | isOrderedAddMonoid | null |
bddAbove_range_of_small {ι : Type*} [Small.{u} ι] (f : ι → Game.{u}) :
BddAbove (Set.range f) := by
obtain ⟨x, hx⟩ := PGame.bddAbove_range_of_small (Quotient.out ∘ f)
refine ⟨⟦x⟧, Set.forall_mem_range.2 fun i ↦ ?_⟩
simpa [PGame.le_iff_game_le] using hx <| Set.mem_range_self i | lemma | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | bddAbove_range_of_small | A small family of games is bounded above. |
bddAbove_of_small (s : Set Game.{u}) [Small.{u} s] : BddAbove s := by
simpa using bddAbove_range_of_small (Subtype.val : s → Game.{u}) | lemma | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | bddAbove_of_small | A small set of games is bounded above. |
bddBelow_range_of_small {ι : Type*} [Small.{u} ι] (f : ι → Game.{u}) :
BddBelow (Set.range f) := by
obtain ⟨x, hx⟩ := PGame.bddBelow_range_of_small (Quotient.out ∘ f)
refine ⟨⟦x⟧, Set.forall_mem_range.2 fun i ↦ ?_⟩
simpa [PGame.le_iff_game_le] using hx <| Set.mem_range_self i | lemma | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | bddBelow_range_of_small | A small family of games is bounded below. |
bddBelow_of_small (s : Set Game.{u}) [Small.{u} s] : BddBelow s := by
simpa using bddBelow_range_of_small (Subtype.val : s → Game.{u}) | lemma | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | bddBelow_of_small | A small set of games is bounded below. |
@[simp] quot_zero : (⟦0⟧ : Game) = 0 := rfl
@[simp] theorem quot_one : (⟦1⟧ : Game) = 1 := rfl
@[simp] theorem quot_neg (a : PGame) : (⟦-a⟧ : Game) = -⟦a⟧ := rfl
@[simp] theorem quot_add (a b : PGame) : ⟦a + b⟧ = (⟦a⟧ : Game) + ⟦b⟧ := rfl
@[simp] theorem quot_sub (a b : PGame) : ⟦a - b⟧ = (⟦a⟧ : Game) - ⟦b⟧ := rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | quot_zero | null |
quot_natCast : ∀ n : ℕ, ⟦(n : PGame)⟧ = (n : Game)
| 0 => rfl
| n + 1 => by
rw [PGame.nat_succ, quot_add, Nat.cast_add, Nat.cast_one, quot_natCast]
rfl | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | quot_natCast | null |
quot_eq_of_mk'_quot_eq {x y : PGame} (L : x.LeftMoves ≃ y.LeftMoves)
(R : x.RightMoves ≃ y.RightMoves) (hl : ∀ i, (⟦x.moveLeft i⟧ : Game) = ⟦y.moveLeft (L i)⟧)
(hr : ∀ j, (⟦x.moveRight j⟧ : Game) = ⟦y.moveRight (R j)⟧) : (⟦x⟧ : Game) = ⟦y⟧ :=
game_eq (.of_equiv L R (fun _ => equiv_iff_game_eq.2 (hl _))
(fun _ => equiv_iff_game_eq.2 (hr _)))
/-! Multiplicative operations can be defined at the level of pre-games,
but to prove their properties we need to use the abelian group structure of games.
Hence we define them here. -/ | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | quot_eq_of_mk'_quot_eq | null |
toLeftMovesMul {x y : PGame} :
(x.LeftMoves × y.LeftMoves) ⊕ (x.RightMoves × y.RightMoves) ≃ (x * y).LeftMoves :=
Equiv.cast (leftMoves_mul x y).symm | def | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | toLeftMovesMul | The product of `x = {xL | xR}` and `y = {yL | yR}` is
`{xL*y + x*yL - xL*yL, xR*y + x*yR - xR*yR | xL*y + x*yR - xL*yR, xR*y + x*yL - xR*yL}`. -/
instance : Mul 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), (xl × yr) ⊕ (xr × yl), ?_, ?_⟩ <;> rintro (⟨i, j⟩ | ⟨i, j⟩)
· exact IHxl i y + IHyl j - IHxl i (yL j)
· exact IHxr i y + IHyr j - IHxr i (yR j)
· exact IHxl i y + IHyr j - IHxl i (yR j)
· exact IHxr i y + IHyl j - IHxr i (yL j)⟩
theorem leftMoves_mul :
∀ x y : PGame.{u},
(x * y).LeftMoves = (x.LeftMoves × y.LeftMoves ⊕ x.RightMoves × y.RightMoves)
| ⟨_, _, _, _⟩, ⟨_, _, _, _⟩ => rfl
theorem rightMoves_mul :
∀ x y : PGame.{u},
(x * y).RightMoves = (x.LeftMoves × y.RightMoves ⊕ x.RightMoves × y.LeftMoves)
| ⟨_, _, _, _⟩, ⟨_, _, _, _⟩ => rfl
/-- Turns two left or right moves for `x` and `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. |
toRightMovesMul {x y : PGame} :
(x.LeftMoves × y.RightMoves) ⊕ (x.RightMoves × y.LeftMoves) ≃ (x * y).RightMoves :=
Equiv.cast (rightMoves_mul x y).symm
@[simp] | def | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | toRightMovesMul | Turns a left and a right move for `x` and `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_mul_moveLeft_inl {xl xr yl yr} {xL xR yL yR} {i j} :
(mk xl xr xL xR * mk yl yr yL yR).moveLeft (Sum.inl (i, j)) =
xL i * mk yl yr yL yR + mk xl xr xL xR * yL j - xL i * yL j :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mk_mul_moveLeft_inl | null |
mul_moveLeft_inl {x y : PGame} {i j} :
(x * y).moveLeft (toLeftMovesMul (Sum.inl (i, j))) =
x.moveLeft i * y + x * y.moveLeft j - x.moveLeft i * y.moveLeft j := by
cases x
cases y
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mul_moveLeft_inl | null |
mk_mul_moveLeft_inr {xl xr yl yr} {xL xR yL yR} {i j} :
(mk xl xr xL xR * mk yl yr yL yR).moveLeft (Sum.inr (i, j)) =
xR i * mk yl yr yL yR + mk xl xr xL xR * yR j - xR i * yR j :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mk_mul_moveLeft_inr | null |
mul_moveLeft_inr {x y : PGame} {i j} :
(x * y).moveLeft (toLeftMovesMul (Sum.inr (i, j))) =
x.moveRight i * y + x * y.moveRight j - x.moveRight i * y.moveRight j := by
cases x
cases y
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mul_moveLeft_inr | null |
mk_mul_moveRight_inl {xl xr yl yr} {xL xR yL yR} {i j} :
(mk xl xr xL xR * mk yl yr yL yR).moveRight (Sum.inl (i, j)) =
xL i * mk yl yr yL yR + mk xl xr xL xR * yR j - xL i * yR j :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mk_mul_moveRight_inl | null |
mul_moveRight_inl {x y : PGame} {i j} :
(x * y).moveRight (toRightMovesMul (Sum.inl (i, j))) =
x.moveLeft i * y + x * y.moveRight j - x.moveLeft i * y.moveRight j := by
cases x
cases y
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mul_moveRight_inl | null |
mk_mul_moveRight_inr {xl xr yl yr} {xL xR yL yR} {i j} :
(mk xl xr xL xR * mk yl yr yL yR).moveRight (Sum.inr (i, j)) =
xR i * mk yl yr yL yR + mk xl xr xL xR * yL j - xR i * yL j :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mk_mul_moveRight_inr | null |
mul_moveRight_inr {x y : PGame} {i j} :
(x * y).moveRight (toRightMovesMul (Sum.inr (i, j))) =
x.moveRight i * y + x * y.moveLeft j - x.moveRight i * y.moveLeft j := by
cases x
cases y
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mul_moveRight_inr | null |
neg_mk_mul_moveLeft_inl {xl xr yl yr} {xL xR yL yR} {i j} :
(-(mk xl xr xL xR * mk yl yr yL yR)).moveLeft (Sum.inl (i, j)) =
-(xL i * mk yl yr yL yR + mk xl xr xL xR * yR j - xL i * yR j) :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | neg_mk_mul_moveLeft_inl | null |
neg_mk_mul_moveLeft_inr {xl xr yl yr} {xL xR yL yR} {i j} :
(-(mk xl xr xL xR * mk yl yr yL yR)).moveLeft (Sum.inr (i, j)) =
-(xR i * mk yl yr yL yR + mk xl xr xL xR * yL j - xR i * yL j) :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | neg_mk_mul_moveLeft_inr | null |
neg_mk_mul_moveRight_inl {xl xr yl yr} {xL xR yL yR} {i j} :
(-(mk xl xr xL xR * mk yl yr yL yR)).moveRight (Sum.inl (i, j)) =
-(xL i * mk yl yr yL yR + mk xl xr xL xR * yL j - xL i * yL j) :=
rfl
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | neg_mk_mul_moveRight_inl | null |
neg_mk_mul_moveRight_inr {xl xr yl yr} {xL xR yL yR} {i j} :
(-(mk xl xr xL xR * mk yl yr yL yR)).moveRight (Sum.inr (i, j)) =
-(xR i * mk yl yr yL yR + mk xl xr xL xR * yR j - xR i * yR j) :=
rfl | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | neg_mk_mul_moveRight_inr | null |
leftMoves_mul_cases {x y : PGame} (k) {P : (x * y).LeftMoves → Prop}
(hl : ∀ ix iy, P <| toLeftMovesMul (Sum.inl ⟨ix, iy⟩))
(hr : ∀ jx jy, P <| toLeftMovesMul (Sum.inr ⟨jx, jy⟩)) : P k := by
rw [← toLeftMovesMul.apply_symm_apply k]
rcases toLeftMovesMul.symm k with (⟨ix, iy⟩ | ⟨jx, jy⟩)
· apply hl
· apply hr | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | leftMoves_mul_cases | null |
rightMoves_mul_cases {x y : PGame} (k) {P : (x * y).RightMoves → Prop}
(hl : ∀ ix jy, P <| toRightMovesMul (Sum.inl ⟨ix, jy⟩))
(hr : ∀ jx iy, P <| toRightMovesMul (Sum.inr ⟨jx, iy⟩)) : P k := by
rw [← toRightMovesMul.apply_symm_apply k]
rcases toRightMovesMul.symm k with (⟨ix, iy⟩ | ⟨jx, jy⟩)
· apply hl
· apply hr | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | rightMoves_mul_cases | null |
protected mul_comm (x y : PGame) : x * y ≡ y * x :=
match x, y with
| ⟨xl, xr, xL, xR⟩, ⟨yl, yr, yL, yR⟩ => by
refine Identical.of_equiv ((Equiv.prodComm _ _).sumCongr (Equiv.prodComm _ _))
((Equiv.sumComm _ _).trans ((Equiv.prodComm _ _).sumCongr (Equiv.prodComm _ _))) ?_ ?_ <;>
· rintro (⟨_, _⟩ | ⟨_, _⟩) <;>
exact ((((PGame.mul_comm _ (mk _ _ _ _)).add (PGame.mul_comm (mk _ _ _ _) _)).trans
(PGame.add_comm _ _)).sub (PGame.mul_comm _ _))
termination_by (x, y) | lemma | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mul_comm | `x * y` and `y * x` have the same moves. |
mulCommRelabelling (x y : PGame.{u}) : x * y ≡r y * x :=
match x, y with
| ⟨xl, xr, xL, xR⟩, ⟨yl, yr, yL, yR⟩ => by
refine ⟨Equiv.sumCongr (Equiv.prodComm _ _) (Equiv.prodComm _ _),
(Equiv.sumComm _ _).trans (Equiv.sumCongr (Equiv.prodComm _ _) (Equiv.prodComm _ _)), ?_, ?_⟩
<;>
rintro (⟨i, j⟩ | ⟨i, j⟩) <;>
{ dsimp
exact ((addCommRelabelling _ _).trans <|
(mulCommRelabelling _ _).addCongr (mulCommRelabelling _ _)).subCongr
(mulCommRelabelling _ _) }
termination_by (x, y) | def | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mulCommRelabelling | `x * y` and `y * x` have the same moves. |
quot_mul_comm (x y : PGame.{u}) : (⟦x * y⟧ : Game) = ⟦y * x⟧ :=
game_eq (x.mul_comm y).equiv | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | quot_mul_comm | null |
mul_comm_equiv (x y : PGame) : x * y ≈ y * x :=
Quotient.exact <| quot_mul_comm _ _ | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mul_comm_equiv | `x * y` is equivalent to `y * x`. |
isEmpty_leftMoves_mul (x y : PGame.{u})
[IsEmpty (x.LeftMoves × y.LeftMoves ⊕ x.RightMoves × y.RightMoves)] :
IsEmpty (x * y).LeftMoves := by
cases x
cases y
assumption | instance | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | isEmpty_leftMoves_mul | null |
isEmpty_rightMoves_mul (x y : PGame.{u})
[IsEmpty (x.LeftMoves × y.RightMoves ⊕ x.RightMoves × y.LeftMoves)] :
IsEmpty (x * y).RightMoves := by
cases x
cases y
assumption | instance | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | isEmpty_rightMoves_mul | null |
protected mul_zero (x : PGame) : x * 0 ≡ 0 := identical_zero _ | lemma | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mul_zero | `x * 0` has exactly the same moves as `0`. |
mulZeroRelabelling (x : PGame) : x * 0 ≡r 0 :=
Relabelling.isEmpty _ | def | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mulZeroRelabelling | `x * 0` has exactly the same moves as `0`. |
mul_zero_equiv (x : PGame) : x * 0 ≈ 0 :=
x.mul_zero.equiv
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mul_zero_equiv | `x * 0` is equivalent to `0`. |
quot_mul_zero (x : PGame) : (⟦x * 0⟧ : Game) = 0 :=
game_eq x.mul_zero_equiv | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | quot_mul_zero | null |
protected zero_mul (x : PGame) : 0 * x ≡ 0 := identical_zero _ | lemma | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | zero_mul | `0 * x` has exactly the same moves as `0`. |
zeroMulRelabelling (x : PGame) : 0 * x ≡r 0 :=
Relabelling.isEmpty _ | def | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | zeroMulRelabelling | `0 * x` has exactly the same moves as `0`. |
zero_mul_equiv (x : PGame) : 0 * x ≈ 0 :=
x.zero_mul.equiv
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | zero_mul_equiv | `0 * x` is equivalent to `0`. |
quot_zero_mul (x : PGame) : (⟦0 * x⟧ : Game) = 0 :=
game_eq x.zero_mul_equiv | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | quot_zero_mul | null |
negMulRelabelling (x y : PGame.{u}) : -x * y ≡r -(x * y) :=
match x, y with
| ⟨xl, xr, xL, xR⟩, ⟨yl, yr, yL, yR⟩ => by
refine ⟨Equiv.sumComm _ _, Equiv.sumComm _ _, ?_, ?_⟩ <;>
rintro (⟨i, j⟩ | ⟨i, j⟩) <;>
· dsimp
apply ((negAddRelabelling _ _).trans _).symm
apply ((negAddRelabelling _ _).trans (Relabelling.addCongr _ _)).subCongr
· exact (negMulRelabelling _ _).symm
· exact (negMulRelabelling _ _).symm
change -(mk xl xr xL xR * _) ≡r _
exact (negMulRelabelling _ _).symm
termination_by (x, y) | def | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | negMulRelabelling | `-x * y` and `-(x * y)` have the same moves. |
@[simp]
mul_neg (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, j⟩ | ⟨i, j⟩) _ ⟨rfl⟩
all_goals
dsimp
rw [PGame.neg_sub', PGame.neg_add]
congr
exacts [mul_neg _ (mk ..), mul_neg .., mul_neg ..]
termination_by (x, y) | lemma | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mul_neg | `x * -y` and `-(x * y)` have the same moves. |
neg_mul (x y : PGame) : -x * y ≡ -(x * y) :=
((PGame.mul_comm _ _).trans (of_eq (mul_neg _ _))).trans (PGame.mul_comm _ _).neg
@[simp] | lemma | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | neg_mul | `-x * y` and `-(x * y)` have the same moves. |
quot_neg_mul (x y : PGame) : (⟦-x * y⟧ : Game) = -⟦x * y⟧ :=
game_eq (x.neg_mul y).equiv | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | quot_neg_mul | null |
mulNegRelabelling (x y : PGame) : x * -y ≡r -(x * y) :=
(mulCommRelabelling x _).trans <| (negMulRelabelling _ x).trans (mulCommRelabelling y x).negCongr | def | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mulNegRelabelling | `x * -y` and `-(x * y)` have the same moves. |
quot_mul_neg (x y : PGame) : ⟦x * -y⟧ = (-⟦x * y⟧ : Game) :=
game_eq (by rw [mul_neg]) | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | quot_mul_neg | null |
quot_neg_mul_neg (x y : PGame) : ⟦-x * -y⟧ = (⟦x * y⟧ : Game) := by simp
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | quot_neg_mul_neg | null |
quot_left_distrib (x y z : PGame) : (⟦x * (y + z)⟧ : Game) = ⟦x * y⟧ + ⟦x * z⟧ :=
match x, y, z with
| mk xl xr xL xR, mk yl yr yL yR, mk zl zr zL zR => by
let x := mk xl xr xL xR
let y := mk yl yr yL yR
let z := mk zl zr zL zR
refine quot_eq_of_mk'_quot_eq ?_ ?_ ?_ ?_
· fconstructor
· rintro (⟨_, _ | _⟩ | ⟨_, _ | _⟩) <;>
solve_by_elim (maxDepth := 6) [Sum.inl, Sum.inr, Prod.mk]
· rintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩) <;>
solve_by_elim (maxDepth := 6) [Sum.inl, Sum.inr, Prod.mk]
· rintro (⟨_, _ | _⟩ | ⟨_, _ | _⟩) <;> rfl
· rintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩) <;> rfl
· fconstructor
· rintro (⟨_, _ | _⟩ | ⟨_, _ | _⟩) <;>
solve_by_elim (maxDepth := 6) [Sum.inl, Sum.inr, Prod.mk]
· rintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩) <;>
solve_by_elim (maxDepth := 6) [Sum.inl, Sum.inr, Prod.mk]
· rintro (⟨_, _ | _⟩ | ⟨_, _ | _⟩) <;> rfl
· rintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩) <;> rfl
· rintro (⟨i, j | k⟩ | ⟨i, j | k⟩)
· change
⟦xL i * (y + z) + x * (yL j + z) - xL i * (yL j + z)⟧ =
⟦xL i * y + x * yL j - xL i * yL j + x * z⟧
simp only [quot_sub, quot_add]
rw [quot_left_distrib (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]
rw [quot_left_distrib (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]
rw [quot_left_distrib (xL i) (yL j) (mk zl zr zL zR)]
abel
· change
⟦xL i * (y + z) + x * (y + zL k) - xL i * (y + zL k)⟧ =
⟦x * y + (xL i * z + x * zL k - xL i * zL k)⟧
simp only [quot_sub, quot_add]
rw [quot_left_distrib (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]
rw [quot_left_distrib (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]
rw [quot_left_distrib (xL i) (mk yl yr yL yR) (zL k)]
abel
· change
⟦xR i * (y + z) + x * (yR j + z) - xR i * (yR j + z)⟧ =
⟦xR i * y + x * yR j - xR i * yR j + x * z⟧
simp only [quot_sub, quot_add]
rw [quot_left_distrib (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]
rw [quot_left_distrib (mk xl xr xL xR) (yR j) (mk zl zr zL zR)]
rw [quot_left_distrib (xR i) (yR j) (mk zl zr zL zR)]
abel
· change
⟦xR i * (y + z) + x * (y + zR k) - xR i * (y + zR k)⟧ =
⟦x * y + (xR i * z + x * zR k - xR i * zR k)⟧
simp only [quot_sub, quot_add]
rw [quot_left_distrib (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]
... | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | quot_left_distrib | null |
left_distrib_equiv (x y z : PGame) : x * (y + z) ≈ x * y + x * z :=
Quotient.exact <| quot_left_distrib _ _ _
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | left_distrib_equiv | `x * (y + z)` is equivalent to `x * y + x * z`. |
quot_left_distrib_sub (x y z : PGame) : (⟦x * (y - z)⟧ : Game) = ⟦x * y⟧ - ⟦x * z⟧ := by
change (⟦x * (y + -z)⟧ : Game) = ⟦x * y⟧ + -⟦x * z⟧
rw [quot_left_distrib, quot_mul_neg]
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | quot_left_distrib_sub | null |
quot_right_distrib (x y z : PGame) : (⟦(x + y) * z⟧ : Game) = ⟦x * z⟧ + ⟦y * z⟧ := by
simp only [quot_mul_comm, quot_left_distrib] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | quot_right_distrib | null |
right_distrib_equiv (x y z : PGame) : (x + y) * z ≈ x * z + y * z :=
Quotient.exact <| quot_right_distrib _ _ _
@[simp] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | right_distrib_equiv | `(x + y) * z` is equivalent to `x * z + y * z`. |
quot_right_distrib_sub (x y z : PGame) : (⟦(y - z) * x⟧ : Game) = ⟦y * x⟧ - ⟦z * x⟧ := by
change (⟦(y + -z) * x⟧ : Game) = ⟦y * x⟧ + -⟦z * x⟧
rw [quot_right_distrib, quot_neg_mul] | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | quot_right_distrib_sub | null |
mulOneRelabelling : ∀ x : PGame.{u}, x * 1 ≡r x
| ⟨xl, xr, xL, xR⟩ => by
change _ * One.one ≡r _
unfold One.one
unfold instOnePGame
change mk _ _ _ _ * mk _ _ _ _ ≡r _
refine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _),
(Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩ <;>
(try rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)) <;>
{ dsimp
apply (Relabelling.subCongr (Relabelling.refl _) (mulZeroRelabelling _)).trans
rw [sub_zero_eq_add_zero]
exact (addZeroRelabelling _).trans <|
(((mulOneRelabelling _).addCongr (mulZeroRelabelling _)).trans <| addZeroRelabelling _) } | def | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mulOneRelabelling | `x * 1` has the same moves as `x`. |
protected one_mul : ∀ (x : PGame), 1 * x ≡ x
| ⟨xl, xr, xL, xR⟩ => by
refine Identical.of_equiv ((Equiv.sumEmpty _ _).trans (Equiv.punitProd _))
((Equiv.sumEmpty _ _).trans (Equiv.punitProd _)) ?_ ?_ <;>
· rintro (⟨⟨⟩, _⟩ | ⟨⟨⟩, _⟩)
exact ((((PGame.zero_mul (mk _ _ _ _)).add (PGame.one_mul _)).trans (PGame.zero_add _)).sub
(PGame.zero_mul _)).trans (PGame.sub_zero _) | lemma | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | one_mul | `1 * x` has the same moves as `x`. |
protected mul_one (x : PGame) : x * 1 ≡ x := (x.mul_comm _).trans x.one_mul
@[simp] | lemma | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mul_one | `x * 1` has the same moves as `x`. |
quot_mul_one (x : PGame) : (⟦x * 1⟧ : Game) = ⟦x⟧ :=
game_eq x.mul_one.equiv | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | quot_mul_one | null |
mul_one_equiv (x : PGame) : x * 1 ≈ x :=
Quotient.exact <| quot_mul_one x | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mul_one_equiv | `x * 1` is equivalent to `x`. |
oneMulRelabelling (x : PGame) : 1 * x ≡r x :=
(mulCommRelabelling 1 x).trans <| mulOneRelabelling x
@[simp] | def | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | oneMulRelabelling | `1 * x` has the same moves as `x`. |
quot_one_mul (x : PGame) : (⟦1 * x⟧ : Game) = ⟦x⟧ :=
game_eq x.one_mul.equiv | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | quot_one_mul | null |
one_mul_equiv (x : PGame) : 1 * x ≈ x :=
Quotient.exact <| quot_one_mul x | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | one_mul_equiv | `1 * x` is equivalent to `x`. |
quot_mul_assoc (x y z : PGame) : (⟦x * y * z⟧ : Game) = ⟦x * (y * z)⟧ :=
match x, y, z with
| mk xl xr xL xR, mk yl yr yL yR, mk zl zr zL zR => by
let x := mk xl xr xL xR
let y := mk yl yr yL yR
let z := mk zl zr zL zR
refine quot_eq_of_mk'_quot_eq ?_ ?_ ?_ ?_
· fconstructor
· rintro (⟨⟨_, _⟩ | ⟨_, _⟩, _⟩ | ⟨⟨_, _⟩ | ⟨_, _⟩, _⟩) <;>
solve_by_elim (maxDepth := 8) [Sum.inl, Sum.inr, Prod.mk]
· rintro (⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩) <;>
solve_by_elim (maxDepth := 8) [Sum.inl, Sum.inr, Prod.mk]
· rintro (⟨⟨_, _⟩ | ⟨_, _⟩, _⟩ | ⟨⟨_, _⟩ | ⟨_, _⟩, _⟩) <;> rfl
· rintro (⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩) <;> rfl
· fconstructor
· rintro (⟨⟨_, _⟩ | ⟨_, _⟩, _⟩ | ⟨⟨_, _⟩ | ⟨_, _⟩, _⟩) <;>
solve_by_elim (maxDepth := 8) [Sum.inl, Sum.inr, Prod.mk]
· rintro (⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩) <;>
solve_by_elim (maxDepth := 8) [Sum.inl, Sum.inr, Prod.mk]
· rintro (⟨⟨_, _⟩ | ⟨_, _⟩, _⟩ | ⟨⟨_, _⟩ | ⟨_, _⟩, _⟩) <;> rfl
· rintro (⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩) <;> rfl
· rintro (⟨⟨i, j⟩ | ⟨i, j⟩, k⟩ | ⟨⟨i, j⟩ | ⟨i, j⟩, k⟩)
· change
⟦(xL i * y + x * yL j - xL i * yL j) * z + x * y * zL k -
(xL i * y + x * yL j - xL i * yL j) * zL k⟧ =
⟦xL i * (y * z) + x * (yL j * z + y * zL k - yL j * zL k) -
xL i * (yL j * z + y * zL k - yL j * zL k)⟧
simp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib,
quot_left_distrib_sub, quot_left_distrib]
rw [quot_mul_assoc (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]
rw [quot_mul_assoc (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]
rw [quot_mul_assoc (xL i) (yL j) (mk zl zr zL zR)]
rw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]
rw [quot_mul_assoc (xL i) (mk yl yr yL yR) (zL k)]
rw [quot_mul_assoc (mk xl xr xL xR) (yL j) (zL k)]
rw [quot_mul_assoc (xL i) (yL j) (zL k)]
abel
· change
⟦(xR i * y + x * yR j - xR i * yR j) * z + x * y * zL k -
(xR i * y + x * yR j - xR i * yR j) * zL k⟧ =
⟦xR i * (y * z) + x * (yR j * z + y * zL k - yR j * zL k) -
xR i * (yR j * z + y * zL k - yR j * zL k)⟧
simp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib,
quot_left_distrib_sub, quot_left_distrib]
rw [quot_mul_assoc (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]
rw [quot_mul_assoc (mk xl xr xL xR) (yR j) (mk zl zr zL zR)]
rw [quot_mul_assoc (xR i) (yR j) (mk zl zr zL zR)]
rw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]
rw [quot_mul_assoc (xR i) (mk yl yr yL yR) (zL k)]
rw [quot_mul_assoc (mk xl xr xL xR) (yR j) (zL k)]
rw [quot_mul_assoc (xR i) (yR j) (zL k)]
... | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | quot_mul_assoc | null |
mul_assoc_equiv (x y z : PGame) : x * y * z ≈ x * (y * z) :=
Quotient.exact <| quot_mul_assoc _ _ _ | theorem | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mul_assoc_equiv | `x * y * z` is equivalent to `x * (y * z)`. |
mulOption (x y : PGame) (i : LeftMoves x) (j : LeftMoves y) : PGame :=
x.moveLeft i * y + x * y.moveLeft j - x.moveLeft i * y.moveLeft j | def | SetTheory | [
"Mathlib.Algebra.Order.Monoid.Defs",
"Mathlib.SetTheory.PGame.Algebra",
"Mathlib.Tactic.Abel",
"Mathlib.Tactic.Linter.DeprecatedModule"
] | Mathlib/SetTheory/Game/Basic.lean | mulOption | The left options of `x * y` of the first kind, i.e. of the form `xL * y + x * yL - xL * yL`. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.