statement
stringlengths
1
2.88k
proof
stringlengths
0
13.9k
type
stringclasses
10 values
symbolic_name
stringlengths
1
131
library
stringclasses
417 values
filename
stringlengths
17
80
imports
listlengths
0
16
deps
listlengths
0
64
docstring
stringlengths
0
10.2k
source_url
stringclasses
1 value
commit
stringclasses
1 value
is_empty_right_moves_add (x y : pgame.{u}) [is_empty x.right_moves] [is_empty y.right_moves] : is_empty (x + y).right_moves
begin unfreezingI { cases x, cases y }, apply is_empty_sum.2 ⟨_, _⟩, assumption' end
instance
pgame.is_empty_right_moves_add
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "is_empty" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_zero_relabelling : Π (x : pgame.{u}), x + 0 ≡r x
| ⟨xl, xr, xL, xR⟩ := begin refine ⟨equiv.sum_empty xl pempty, equiv.sum_empty xr pempty, _, _⟩; rintro (⟨i⟩|⟨⟨⟩⟩); apply add_zero_relabelling end
def
pgame.add_zero_relabelling
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "equiv.sum_empty", "pempty" ]
`x + 0` has exactly the same moves as `x`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_zero_equiv (x : pgame.{u}) : x + 0 ≈ x
(add_zero_relabelling x).equiv
lemma
pgame.add_zero_equiv
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "equiv" ]
`x + 0` is equivalent to `x`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zero_add_relabelling : Π (x : pgame.{u}), 0 + x ≡r x
| ⟨xl, xr, xL, xR⟩ := begin refine ⟨equiv.empty_sum pempty xl, equiv.empty_sum pempty xr, _, _⟩; rintro (⟨⟨⟩⟩|⟨i⟩); apply zero_add_relabelling end
def
pgame.zero_add_relabelling
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "equiv.empty_sum", "pempty" ]
`0 + x` has exactly the same moves as `x`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zero_add_equiv (x : pgame.{u}) : 0 + x ≈ x
(zero_add_relabelling x).equiv
lemma
pgame.zero_add_equiv
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "equiv" ]
`0 + x` is equivalent to `x`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
left_moves_add : ∀ (x y : pgame.{u}), (x + y).left_moves = (x.left_moves ⊕ y.left_moves)
| ⟨_, _, _, _⟩ ⟨_, _, _, _⟩ := rfl
theorem
pgame.left_moves_add
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
right_moves_add : ∀ (x y : pgame.{u}), (x + y).right_moves = (x.right_moves ⊕ y.right_moves)
| ⟨_, _, _, _⟩ ⟨_, _, _, _⟩ := rfl
theorem
pgame.right_moves_add
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_left_moves_add {x y : pgame} : x.left_moves ⊕ y.left_moves ≃ (x + y).left_moves
equiv.cast (left_moves_add x y).symm
def
pgame.to_left_moves_add
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "equiv.cast", "pgame" ]
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.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_right_moves_add {x y : pgame} : x.right_moves ⊕ y.right_moves ≃ (x + y).right_moves
equiv.cast (right_moves_add x y).symm
def
pgame.to_right_moves_add
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "equiv.cast", "pgame" ]
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.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mk_add_move_left_inl {xl xr yl yr} {xL xR yL yR} {i} : (mk xl xr xL xR + mk yl yr yL yR).move_left (sum.inl i) = (mk xl xr xL xR).move_left i + (mk yl yr yL yR)
rfl
lemma
pgame.mk_add_move_left_inl
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_move_left_inl {x : pgame} (y : pgame) (i) : (x + y).move_left (to_left_moves_add (sum.inl i)) = x.move_left i + y
by { cases x, cases y, refl }
lemma
pgame.add_move_left_inl
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mk_add_move_right_inl {xl xr yl yr} {xL xR yL yR} {i} : (mk xl xr xL xR + mk yl yr yL yR).move_right (sum.inl i) = (mk xl xr xL xR).move_right i + (mk yl yr yL yR)
rfl
lemma
pgame.mk_add_move_right_inl
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_move_right_inl {x : pgame} (y : pgame) (i) : (x + y).move_right (to_right_moves_add (sum.inl i)) = x.move_right i + y
by { cases x, cases y, refl }
lemma
pgame.add_move_right_inl
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mk_add_move_left_inr {xl xr yl yr} {xL xR yL yR} {i} : (mk xl xr xL xR + mk yl yr yL yR).move_left (sum.inr i) = (mk xl xr xL xR) + (mk yl yr yL yR).move_left i
rfl
lemma
pgame.mk_add_move_left_inr
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_move_left_inr (x : pgame) {y : pgame} (i) : (x + y).move_left (to_left_moves_add (sum.inr i)) = x + y.move_left i
by { cases x, cases y, refl }
lemma
pgame.add_move_left_inr
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mk_add_move_right_inr {xl xr yl yr} {xL xR yL yR} {i} : (mk xl xr xL xR + mk yl yr yL yR).move_right (sum.inr i) = (mk xl xr xL xR) + (mk yl yr yL yR).move_right i
rfl
lemma
pgame.mk_add_move_right_inr
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_move_right_inr (x : pgame) {y : pgame} (i) : (x + y).move_right (to_right_moves_add (sum.inr i)) = x + y.move_right i
by { cases x, cases y, refl }
lemma
pgame.add_move_right_inr
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
left_moves_add_cases {x y : pgame} (k) {P : (x + y).left_moves → Prop} (hl : ∀ i, P $ to_left_moves_add (sum.inl i)) (hr : ∀ i, P $ to_left_moves_add (sum.inr i)) : P k
begin rw ←to_left_moves_add.apply_symm_apply k, cases to_left_moves_add.symm k with i i, { exact hl i }, { exact hr i } end
lemma
pgame.left_moves_add_cases
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
right_moves_add_cases {x y : pgame} (k) {P : (x + y).right_moves → Prop} (hl : ∀ j, P $ to_right_moves_add (sum.inl j)) (hr : ∀ j, P $ to_right_moves_add (sum.inr j)) : P k
begin rw ←to_right_moves_add.apply_symm_apply k, cases to_right_moves_add.symm k with i i, { exact hl i }, { exact hr i } end
lemma
pgame.right_moves_add_cases
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_empty_nat_right_moves : ∀ n : ℕ, is_empty (right_moves n)
| 0 := pempty.is_empty | (n + 1) := begin haveI := is_empty_nat_right_moves n, rw [pgame.nat_succ, right_moves_add], apply_instance end
instance
pgame.is_empty_nat_right_moves
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "is_empty", "pgame.nat_succ" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
relabelling.add_congr : ∀ {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₂⟩ := begin 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.sum_congr L₁ L₂, equiv.sum_congr R₁ R₂, _...
def
pgame.relabelling.add_congr
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "equiv.sum_congr" ]
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`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sub_zero (x : pgame) : x - 0 = x + 0
show x + -0 = x + 0, by rw neg_zero
theorem
pgame.sub_zero
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
relabelling.sub_congr {w x y z : pgame} (h₁ : w ≡r x) (h₂ : y ≡r z) : w - y ≡r x - z
h₁.add_congr h₂.neg_congr
def
pgame.relabelling.sub_congr
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
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`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
neg_add_relabelling : Π (x y : pgame), -(x + y) ≡r -x + -y
| ⟨xl, xr, xL, xR⟩ ⟨yl, yr, yL, yR⟩ := begin refine ⟨equiv.refl _, equiv.refl _, _, _⟩, all_goals { exact λ j, sum.cases_on j (λ j, neg_add_relabelling _ _) (λ j, neg_add_relabelling ⟨xl, xr, xL, xR⟩ _) } end using_well_founded { dec_tac := pgame_wf_tac }
def
pgame.neg_add_relabelling
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "equiv.refl", "pgame" ]
`-(x + y)` has exactly the same moves as `-x + -y`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
neg_add_le {x y : pgame} : -(x + y) ≤ -x + -y
(neg_add_relabelling x y).le
theorem
pgame.neg_add_le
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_comm_relabelling : Π (x y : pgame.{u}), x + y ≡r y + x
| (mk xl xr xL xR) (mk yl yr yL yR) := begin refine ⟨equiv.sum_comm _ _, equiv.sum_comm _ _, _, _⟩; rintros (_|_); { dsimp [left_moves_add, right_moves_add], apply add_comm_relabelling } end using_well_founded { dec_tac := pgame_wf_tac }
def
pgame.add_comm_relabelling
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "equiv.sum_comm" ]
`x + y` has exactly the same moves as `y + x`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_comm_le {x y : pgame} : x + y ≤ y + x
(add_comm_relabelling x y).le
theorem
pgame.add_comm_le
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_comm_equiv {x y : pgame} : x + y ≈ y + x
(add_comm_relabelling x y).equiv
theorem
pgame.add_comm_equiv
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "equiv", "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_assoc_relabelling : Π (x y z : pgame.{u}), x + y + z ≡r x + (y + z)
| ⟨xl, xr, xL, xR⟩ ⟨yl, yr, yL, yR⟩ ⟨zl, zr, zL, zR⟩ := begin refine ⟨equiv.sum_assoc _ _ _, equiv.sum_assoc _ _ _, _, _⟩, all_goals { rintro (⟨i|i⟩|i) <|> rintro (j|⟨j|j⟩), { apply add_assoc_relabelling }, { apply add_assoc_relabelling ⟨xl, xr, xL, xR⟩ }, { apply add_assoc_relabelling ⟨xl, xr, xL, xR...
def
pgame.add_assoc_relabelling
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "equiv.sum_assoc" ]
`(x + y) + z` has exactly the same moves as `x + (y + z)`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_assoc_equiv {x y z : pgame} : (x + y) + z ≈ x + (y + z)
(add_assoc_relabelling x y z).equiv
theorem
pgame.add_assoc_equiv
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "equiv", "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_left_neg_le_zero : ∀ (x : pgame), -x + x ≤ 0
| ⟨xl, xr, xL, xR⟩ := le_zero.2 $ λ i, begin cases i, { -- If Left played in -x, Right responds with the same move in x. refine ⟨@to_right_moves_add _ ⟨_, _, _, _⟩ (sum.inr i), _⟩, convert @add_left_neg_le_zero (xR i), apply add_move_right_inr }, { -- If Left in x, Right responds with the same move in...
theorem
pgame.add_left_neg_le_zero
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zero_le_add_left_neg (x : pgame) : 0 ≤ -x + x
begin rw [←neg_le_neg_iff, neg_zero], exact neg_add_le.trans (add_left_neg_le_zero _) end
theorem
pgame.zero_le_add_left_neg
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_left_neg_equiv (x : pgame) : -x + x ≈ 0
⟨add_left_neg_le_zero x, zero_le_add_left_neg x⟩
theorem
pgame.add_left_neg_equiv
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_right_neg_le_zero (x : pgame) : x + -x ≤ 0
add_comm_le.trans (add_left_neg_le_zero x)
theorem
pgame.add_right_neg_le_zero
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zero_le_add_right_neg (x : pgame) : 0 ≤ x + -x
(zero_le_add_left_neg x).trans add_comm_le
theorem
pgame.zero_le_add_right_neg
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_right_neg_equiv (x : pgame) : x + -x ≈ 0
⟨add_right_neg_le_zero x, zero_le_add_right_neg x⟩
theorem
pgame.add_right_neg_equiv
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sub_self_equiv : ∀ x, x - x ≈ 0
add_right_neg_equiv
theorem
pgame.sub_self_equiv
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_le_add_right' : ∀ {x y z : pgame} (h : x ≤ y), x + z ≤ y + z
| (mk xl xr xL xR) (mk yl yr yL yR) (mk zl zr zL zR) := λ h, begin refine le_def.2 ⟨λ i, _, λ i, _⟩; cases i, { rw le_def at h, cases h, rcases h_left i with ⟨i', ih⟩ | ⟨j, jh⟩, { exact or.inl ⟨to_left_moves_add (sum.inl i'), add_le_add_right' ih⟩ }, { refine or.inr ⟨to_right_moves_add (sum.inl j)...
lemma
pgame.add_le_add_right'
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "ih", "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
covariant_class_swap_add_le : covariant_class pgame pgame (swap (+)) (≤)
⟨λ x y z, add_le_add_right'⟩
instance
pgame.covariant_class_swap_add_le
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "covariant_class", "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
covariant_class_add_le : covariant_class pgame pgame (+) (≤)
⟨λ x y z h, (add_comm_le.trans (add_le_add_right h x)).trans add_comm_le⟩
instance
pgame.covariant_class_add_le
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "covariant_class", "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
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 }, λ w, calc z ≤ z + 0 : (add_zero_relabelling _).symm.le ... ≤ z + (x + -x) : add_le_add_left (zero_le_add_right_neg x) _ ... ≤ z + x + -x : (add_assoc_relabelling _ _ _).symm.le ... ≤ y + x + -x : add_le_add_righ...
theorem
pgame.add_lf_add_right
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
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
pgame.add_lf_add_left
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
covariant_class_swap_add_lt : covariant_class pgame pgame (swap (+)) (<)
⟨λ x y z h, ⟨add_le_add_right h.1 x, add_lf_add_right h.2 x⟩⟩
instance
pgame.covariant_class_swap_add_lt
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "covariant_class", "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
covariant_class_add_lt : covariant_class pgame pgame (+) (<)
⟨λ x y z h, ⟨add_le_add_left h.1 x, add_lf_add_left h.2 x⟩⟩
instance
pgame.covariant_class_add_lt
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "covariant_class", "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
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
pgame.add_lf_add_of_lf_of_le
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
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
pgame.add_lf_add_of_le_of_lf
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
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
pgame.add_congr
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_congr_left {x y z : pgame} (h : x ≈ y) : x + z ≈ y + z
add_congr h equiv_rfl
theorem
pgame.add_congr_left
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_congr_right {x y z : pgame} : y ≈ z → x + y ≈ x + z
add_congr equiv_rfl
theorem
pgame.add_congr_right
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
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
pgame.sub_congr
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sub_congr_left {x y z : pgame} (h : x ≈ y) : x - z ≈ y - z
sub_congr h equiv_rfl
theorem
pgame.sub_congr_left
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sub_congr_right {x y z : pgame} : y ≈ z → x - y ≈ x - z
sub_congr equiv_rfl
theorem
pgame.sub_congr_right
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
le_iff_sub_nonneg {x y : pgame} : x ≤ y ↔ 0 ≤ y - x
⟨λ h, (zero_le_add_right_neg x).trans (add_le_add_right h _), λ h, calc x ≤ 0 + x : (zero_add_relabelling x).symm.le ... ≤ y - x + x : add_le_add_right h _ ... ≤ y + (-x + x) : (add_assoc_relabelling _ _ _).le ... ≤ y + 0 : add_le_add_left (add_left_neg_le_zero x) _ ... ≤ y : (add_zero_relabellin...
theorem
pgame.le_iff_sub_nonneg
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lf_iff_sub_zero_lf {x y : pgame} : x ⧏ y ↔ 0 ⧏ y - x
⟨λ h, (zero_le_add_right_neg x).trans_lf (add_lf_add_right h _), λ h, calc x ≤ 0 + x : (zero_add_relabelling x).symm.le ... ⧏ y - x + x : add_lf_add_right h _ ... ≤ y + (-x + x) : (add_assoc_relabelling _ _ _).le ... ≤ y + 0 : add_le_add_left (add_left_neg_le_zero x) _ ... ≤ y : (add_zero_relabel...
theorem
pgame.lf_iff_sub_zero_lf
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lt_iff_sub_pos {x y : pgame} : x < y ↔ 0 < y - x
⟨λ h, lt_of_le_of_lt (zero_le_add_right_neg x) (add_lt_add_right h _), λ h, calc x ≤ 0 + x : (zero_add_relabelling x).symm.le ... < y - x + x : add_lt_add_right h _ ... ≤ y + (-x + x) : (add_assoc_relabelling _ _ _).le ... ≤ y + 0 : add_le_add_left (add_left_neg_le_zero x) _ ... ≤ y : (add_zero_r...
theorem
pgame.lt_iff_sub_pos
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star : pgame.{u}
⟨punit, punit, λ _, 0, λ _, 0⟩
def
pgame.star
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[]
The pre-game `star`, which is fuzzy with zero.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_left_moves : star.left_moves = punit
rfl
theorem
pgame.star_left_moves
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_right_moves : star.right_moves = punit
rfl
theorem
pgame.star_right_moves
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_move_left (x) : star.move_left x = 0
rfl
theorem
pgame.star_move_left
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_move_right (x) : star.move_right x = 0
rfl
theorem
pgame.star_move_right
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
unique_star_left_moves : unique star.left_moves
punit.unique
instance
pgame.unique_star_left_moves
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "punit.unique", "unique" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
unique_star_right_moves : unique star.right_moves
punit.unique
instance
pgame.unique_star_right_moves
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "punit.unique", "unique" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_fuzzy_zero : star ‖ 0
⟨by { rw lf_zero, use default, rintros ⟨⟩ }, by { rw zero_lf, use default, rintros ⟨⟩ }⟩
theorem
pgame.star_fuzzy_zero
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
neg_star : -star = star
by simp [star]
theorem
pgame.neg_star
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zero_lt_one : (0 : pgame) < 1
lt_of_le_of_lf (zero_le_of_is_empty_right_moves 1) (zero_lf_le.2 ⟨default, le_rfl⟩)
theorem
pgame.zero_lt_one
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame", "zero_lt_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zero_lf_one : (0 : pgame) ⧏ 1
pgame.zero_lt_one.lf
theorem
pgame.zero_lf_one
set_theory.game
src/set_theory/game/pgame.lean
[ "data.fin.basic", "data.list.basic", "logic.relation", "logic.small.basic", "order.game_add" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
short : pgame.{u} → Type (u+1) | mk : Π {α β : Type u} {L : α → pgame.{u}} {R : β → pgame.{u}} (sL : ∀ i : α, short (L i)) (sR : ∀ j : β, short (R j)) [fintype α] [fintype β], short ⟨α, β, L, R⟩
inductive
pgame.short
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[ "fintype" ]
A short game is a game with a finite set of moves at every turn.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
subsingleton_short : Π (x : pgame), subsingleton (short x)
| (mk xl xr xL xR) := ⟨λ a b, begin cases a, cases b, congr, { funext, apply @subsingleton.elim _ (subsingleton_short (xL x)) }, { funext, apply @subsingleton.elim _ (subsingleton_short (xR x)) }, end⟩ using_well_founded { dec_tac := pgame_wf_tac }
instance
pgame.subsingleton_short
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
short.mk' {x : pgame} [fintype x.left_moves] [fintype x.right_moves] (sL : ∀ i : x.left_moves, short (x.move_left i)) (sR : ∀ j : x.right_moves, short (x.move_right j)) : short x
by unfreezingI { cases x, dsimp at * }; exact short.mk sL sR
def
pgame.short.mk'
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[ "fintype", "pgame" ]
A synonym for `short.mk` that specifies the pgame in an implicit argument.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
fintype_left {α β : Type u} {L : α → pgame.{u}} {R : β → pgame.{u}} [S : short ⟨α, β, L, R⟩] : fintype α
by { casesI S with _ _ _ _ _ _ F _, exact F }
def
pgame.fintype_left
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[ "fintype" ]
Extracting the `fintype` instance for the indexing type for Left's moves in a short game. This is an unindexed typeclass, so it can't be made a global instance.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
fintype_left_moves (x : pgame) [S : short x] : fintype (x.left_moves)
by { casesI x, dsimp, apply_instance }
instance
pgame.fintype_left_moves
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[ "fintype", "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
fintype_right {α β : Type u} {L : α → pgame.{u}} {R : β → pgame.{u}} [S : short ⟨α, β, L, R⟩] : fintype β
by { casesI S with _ _ _ _ _ _ _ F, exact F }
def
pgame.fintype_right
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[ "fintype" ]
Extracting the `fintype` instance for the indexing type for Right's moves in a short game. This is an unindexed typeclass, so it can't be made a global instance.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
fintype_right_moves (x : pgame) [S : short x] : fintype (x.right_moves)
by { casesI x, dsimp, apply_instance }
instance
pgame.fintype_right_moves
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[ "fintype", "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
move_left_short (x : pgame) [S : short x] (i : x.left_moves) : short (x.move_left i)
by { casesI S with _ _ _ _ L _ _ _, apply L }
instance
pgame.move_left_short
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
move_left_short' {xl xr} (xL xR) [S : short (mk xl xr xL xR)] (i : xl) : short (xL i)
by { casesI S with _ _ _ _ L _ _ _, apply L }
def
pgame.move_left_short'
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[]
Extracting the `short` instance for a move by Left. This would be a dangerous instance potentially introducing new metavariables in typeclass search, so we only make it an instance locally.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
move_right_short (x : pgame) [S : short x] (j : x.right_moves) : short (x.move_right j)
by { casesI S with _ _ _ _ _ R _ _, apply R }
instance
pgame.move_right_short
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[ "pgame" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
move_right_short' {xl xr} (xL xR) [S : short (mk xl xr xL xR)] (j : xr) : short (xR j)
by { casesI S with _ _ _ _ _ R _ _, apply R }
def
pgame.move_right_short'
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[]
Extracting the `short` instance for a move by Right. This would be a dangerous instance potentially introducing new metavariables in typeclass search, so we only make it an instance locally.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
short_birthday : ∀ (x : pgame.{u}) [short x], x.birthday < ordinal.omega
| ⟨xl, xr, xL, xR⟩ hs := begin haveI := hs, unfreezingI { rcases hs with ⟨sL, sR⟩ }, rw [birthday, max_lt_iff], split, all_goals { rw ←cardinal.ord_aleph_0, refine cardinal.lsub_lt_ord_of_is_regular.{u u} cardinal.is_regular_aleph_0 (cardinal.lt_aleph_0_of_finite _) (λ i, _), rw cardinal.ord_ale...
theorem
pgame.short_birthday
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[ "cardinal.is_regular_aleph_0", "cardinal.lt_aleph_0_of_finite", "cardinal.ord_aleph_0", "max_lt_iff", "ordinal.omega" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
short.of_is_empty {l r xL xR} [is_empty l] [is_empty r] : short (mk l r xL xR)
short.mk is_empty_elim is_empty_elim
def
pgame.short.of_is_empty
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[ "is_empty", "is_empty_elim" ]
This leads to infinite loops if made into an instance.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
short_0 : short 0
short.of_is_empty
instance
pgame.short_0
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
short_1 : short 1
short.mk (λ i, begin cases i, apply_instance, end) (λ j, by cases j)
instance
pgame.short_1
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
list_short : list pgame.{u} → Type (u+1) | nil : list_short [] | cons : Π (hd : pgame.{u}) [short hd] (tl : list pgame.{u}) [list_short tl], list_short (hd :: tl)
inductive
pgame.list_short
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[]
Evidence that every `pgame` in a list is `short`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
list_short_nth_le : Π (L : list pgame.{u}) [list_short L] (i : fin (list.length L)), short (list.nth_le L i i.is_lt)
| [] _ n := begin exfalso, rcases n with ⟨_, ⟨⟩⟩, end | (hd :: tl) (@list_short.cons _ S _ _) ⟨0, _⟩ := S | (hd :: tl) (@list_short.cons _ _ _ S) ⟨n+1, h⟩ := @list_short_nth_le tl S ⟨n, (add_lt_add_iff_right 1).mp h⟩
instance
pgame.list_short_nth_le
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
short_of_lists : Π (L R : list pgame) [list_short L] [list_short R], short (pgame.of_lists L R)
| L R _ _ := by { resetI, apply short.mk, { intros, apply_instance }, { intros, apply pgame.list_short_nth_le /- where does the subtype.val come from? -/ } }
instance
pgame.short_of_lists
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[ "pgame", "pgame.list_short_nth_le", "pgame.of_lists" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
short_of_relabelling : Π {x y : pgame.{u}} (R : relabelling x y) (S : short x), short y
| x y ⟨L, R, rL, rR⟩ S := begin resetI, haveI := fintype.of_equiv _ L, haveI := fintype.of_equiv _ R, exact short.mk' (λ i, by { rw ←(L.right_inv i), apply short_of_relabelling (rL (L.symm i)) infer_instance, }) (λ j, by simpa using short_of_relabelling (rR (R.symm j)) infer_instance) end
def
pgame.short_of_relabelling
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[ "fintype.of_equiv" ]
If `x` is a short game, and `y` is a relabelling of `x`, then `y` is also short.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
short_neg : Π (x : pgame.{u}) [short x], short (-x)
| (mk xl xr xL xR) _ := by { resetI, exact short.mk (λ i, short_neg _) (λ i, short_neg _) } using_well_founded { dec_tac := pgame_wf_tac }
instance
pgame.short_neg
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
short_add : Π (x y : pgame.{u}) [short x] [short y], short (x + y)
| (mk xl xr xL xR) (mk yl yr yL yR) _ _ := begin resetI, apply short.mk, all_goals { rintro ⟨i⟩, { apply short_add }, { change short (mk xl xr xL xR + _), apply short_add } } end using_well_founded { dec_tac := pgame_wf_tac }
instance
pgame.short_add
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
short_nat : Π n : ℕ, short n
| 0 := pgame.short_0 | (n+1) := @pgame.short_add _ _ (short_nat n) pgame.short_1
instance
pgame.short_nat
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[ "pgame.short_0", "pgame.short_1", "pgame.short_add" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
short_bit0 (x : pgame.{u}) [short x] : short (bit0 x)
by { dsimp [bit0], apply_instance }
instance
pgame.short_bit0
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
short_bit1 (x : pgame.{u}) [short x] : short (bit1 x)
by { dsimp [bit1], apply_instance }
instance
pgame.short_bit1
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
le_lf_decidable : Π (x y : pgame.{u}) [short x] [short y], decidable (x ≤ y) × decidable (x ⧏ y)
| (mk xl xr xL xR) (mk yl yr yL yR) shortx shorty := begin resetI, split, { refine @decidable_of_iff' _ _ mk_le_mk (id _), apply @and.decidable _ _ _ _, { apply @fintype.decidable_forall_fintype xl _ _ (by apply_instance), intro i, apply (@le_lf_decidable _ _ _ _).2; apply_instance, }, { a...
def
pgame.le_lf_decidable
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[ "decidable_of_iff'", "fintype.decidable_exists_fintype", "fintype.decidable_forall_fintype" ]
Auxiliary construction of decidability instances. We build `decidable (x ≤ y)` and `decidable (x ⧏ y)` in a simultaneous induction. Instances for the two projections separately are provided below.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
le_decidable (x y : pgame.{u}) [short x] [short y] : decidable (x ≤ y)
(le_lf_decidable x y).1
instance
pgame.le_decidable
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lf_decidable (x y : pgame.{u}) [short x] [short y] : decidable (x ⧏ y)
(le_lf_decidable x y).2
instance
pgame.lf_decidable
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lt_decidable (x y : pgame.{u}) [short x] [short y] : decidable (x < y)
and.decidable
instance
pgame.lt_decidable
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
equiv_decidable (x y : pgame.{u}) [short x] [short y] : decidable (x ≈ y)
and.decidable
instance
pgame.equiv_decidable
set_theory.game
src/set_theory/game/short.lean
[ "data.fintype.basic", "set_theory.cardinal.cofinality", "set_theory.game.birthday" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
state (S : Type u)
(turn_bound : S → ℕ) (L : S → finset S) (R : S → finset S) (left_bound : ∀ {s t : S} (m : t ∈ L s), turn_bound t < turn_bound s) (right_bound : ∀ {s t : S} (m : t ∈ R s), turn_bound t < turn_bound s)
class
pgame.state
set_theory.game
src/set_theory/game/state.lean
[ "set_theory.game.short" ]
[ "finset" ]
`pgame_state S` describes how to interpret `s : S` as a state of a combinatorial game. Use `pgame.of_state s` or `game.of_state s` to construct the game. `pgame_state.L : S → finset S` and `pgame_state.R : S → finset S` describe the states reachable by a move by Left or Right. `pgame_state.turn_bound : S → ℕ` gives an...
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
turn_bound_ne_zero_of_left_move {s t : S} (m : t ∈ L s) : turn_bound s ≠ 0
begin intro h, have t := state.left_bound m, rw h at t, exact nat.not_succ_le_zero _ t, end
lemma
pgame.turn_bound_ne_zero_of_left_move
set_theory.game
src/set_theory/game/state.lean
[ "set_theory.game.short" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
turn_bound_ne_zero_of_right_move {s t : S} (m : t ∈ R s) : turn_bound s ≠ 0
begin intro h, have t := state.right_bound m, rw h at t, exact nat.not_succ_le_zero _ t, end
lemma
pgame.turn_bound_ne_zero_of_right_move
set_theory.game
src/set_theory/game/state.lean
[ "set_theory.game.short" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
turn_bound_of_left {s t : S} (m : t ∈ L s) (n : ℕ) (h : turn_bound s ≤ n + 1) : turn_bound t ≤ n
nat.le_of_lt_succ (nat.lt_of_lt_of_le (left_bound m) h)
lemma
pgame.turn_bound_of_left
set_theory.game
src/set_theory/game/state.lean
[ "set_theory.game.short" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
turn_bound_of_right {s t : S} (m : t ∈ R s) (n : ℕ) (h : turn_bound s ≤ n + 1) : turn_bound t ≤ n
nat.le_of_lt_succ (nat.lt_of_lt_of_le (right_bound m) h)
lemma
pgame.turn_bound_of_right
set_theory.game
src/set_theory/game/state.lean
[ "set_theory.game.short" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83