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 |
|---|---|---|---|---|---|---|---|---|---|---|
move_right_nim_heq (o : ordinal) : (nim o).move_right == λ i : o.out.α, nim (typein (<) i) | by { rw nim_def, refl } | lemma | pgame.move_right_nim_heq | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_left_moves_nim {o : ordinal} : set.Iio o ≃ (nim o).left_moves | (enum_iso_out o).to_equiv.trans (equiv.cast (left_moves_nim o).symm) | def | pgame.to_left_moves_nim | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"equiv.cast",
"ordinal",
"set.Iio"
] | Turns an ordinal less than `o` into a left move for `nim o` and viceversa. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
to_right_moves_nim {o : ordinal} : set.Iio o ≃ (nim o).right_moves | (enum_iso_out o).to_equiv.trans (equiv.cast (right_moves_nim o).symm) | def | pgame.to_right_moves_nim | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"equiv.cast",
"ordinal",
"set.Iio"
] | Turns an ordinal less than `o` into a right move for `nim o` and viceversa. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
to_left_moves_nim_symm_lt {o : ordinal} (i : (nim o).left_moves) :
↑(to_left_moves_nim.symm i) < o | (to_left_moves_nim.symm i).prop | theorem | pgame.to_left_moves_nim_symm_lt | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_right_moves_nim_symm_lt {o : ordinal} (i : (nim o).right_moves) :
↑(to_right_moves_nim.symm i) < o | (to_right_moves_nim.symm i).prop | theorem | pgame.to_right_moves_nim_symm_lt | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
move_left_nim' {o : ordinal.{u}} (i) :
(nim o).move_left i = nim (to_left_moves_nim.symm i).val | (congr_heq (move_left_nim_heq o).symm (cast_heq _ i)).symm | lemma | pgame.move_left_nim' | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"congr_heq"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
move_left_nim {o : ordinal} (i) :
(nim o).move_left (to_left_moves_nim i) = nim i | by simp | lemma | pgame.move_left_nim | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
move_right_nim' {o : ordinal} (i) :
(nim o).move_right i = nim (to_right_moves_nim.symm i).val | (congr_heq (move_right_nim_heq o).symm (cast_heq _ i)).symm | lemma | pgame.move_right_nim' | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"congr_heq",
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
move_right_nim {o : ordinal} (i) :
(nim o).move_right (to_right_moves_nim i) = nim i | by simp | lemma | pgame.move_right_nim | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
left_moves_nim_rec_on {o : ordinal} {P : (nim o).left_moves → Sort*}
(i : (nim o).left_moves) (H : ∀ a < o, P $ to_left_moves_nim ⟨a, H⟩) : P i | by { rw ←to_left_moves_nim.apply_symm_apply i, apply H } | def | pgame.left_moves_nim_rec_on | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"ordinal"
] | A recursion principle for left moves of a nim game. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
right_moves_nim_rec_on {o : ordinal} {P : (nim o).right_moves → Sort*}
(i : (nim o).right_moves) (H : ∀ a < o, P $ to_right_moves_nim ⟨a, H⟩) : P i | by { rw ←to_right_moves_nim.apply_symm_apply i, apply H } | def | pgame.right_moves_nim_rec_on | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"ordinal"
] | A recursion principle for right moves of a nim game. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_empty_nim_zero_left_moves : is_empty (nim 0).left_moves | by { rw nim_def, exact ordinal.is_empty_out_zero } | instance | pgame.is_empty_nim_zero_left_moves | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"is_empty",
"ordinal.is_empty_out_zero"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
is_empty_nim_zero_right_moves : is_empty (nim 0).right_moves | by { rw nim_def, exact ordinal.is_empty_out_zero } | instance | pgame.is_empty_nim_zero_right_moves | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"is_empty",
"ordinal.is_empty_out_zero"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
nim_zero_relabelling : nim 0 ≡r 0 | relabelling.is_empty _ | def | pgame.nim_zero_relabelling | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [] | `nim 0` has exactly the same moves as `0`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nim_zero_equiv : nim 0 ≈ 0 | equiv.is_empty _ | theorem | pgame.nim_zero_equiv | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"equiv.is_empty"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
unique_nim_one_left_moves : unique (nim 1).left_moves | (equiv.cast $ left_moves_nim 1).unique | instance | pgame.unique_nim_one_left_moves | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"equiv.cast",
"unique"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
unique_nim_one_right_moves : unique (nim 1).right_moves | (equiv.cast $ right_moves_nim 1).unique | instance | pgame.unique_nim_one_right_moves | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"equiv.cast",
"unique"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
default_nim_one_left_moves_eq :
(default : (nim 1).left_moves) = @to_left_moves_nim 1 ⟨0, zero_lt_one⟩ | rfl | theorem | pgame.default_nim_one_left_moves_eq | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
default_nim_one_right_moves_eq :
(default : (nim 1).right_moves) = @to_right_moves_nim 1 ⟨0, zero_lt_one⟩ | rfl | theorem | pgame.default_nim_one_right_moves_eq | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_left_moves_nim_one_symm (i) :
(@to_left_moves_nim 1).symm i = ⟨0, zero_lt_one⟩ | by simp | theorem | pgame.to_left_moves_nim_one_symm | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_right_moves_nim_one_symm (i) :
(@to_right_moves_nim 1).symm i = ⟨0, zero_lt_one⟩ | by simp | theorem | pgame.to_right_moves_nim_one_symm | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
nim_one_move_left (x) : (nim 1).move_left x = nim 0 | by simp | theorem | pgame.nim_one_move_left | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
nim_one_move_right (x) : (nim 1).move_right x = nim 0 | by simp | theorem | pgame.nim_one_move_right | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
nim_one_relabelling : nim 1 ≡r star | begin
rw nim_def,
refine ⟨_, _, λ i, _, λ j, _⟩,
any_goals { dsimp, apply equiv.equiv_of_unique },
all_goals { simp, exact nim_zero_relabelling }
end | def | pgame.nim_one_relabelling | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"equiv.equiv_of_unique"
] | `nim 1` has exactly the same moves as `star`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nim_one_equiv : nim 1 ≈ star | nim_one_relabelling.equiv | theorem | pgame.nim_one_equiv | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
nim_birthday (o : ordinal) : (nim o).birthday = o | begin
induction o using ordinal.induction with o IH,
rw [nim_def, birthday_def],
dsimp,
rw max_eq_right le_rfl,
convert lsub_typein o,
exact funext (λ i, IH _ (typein_lt_self i))
end | lemma | pgame.nim_birthday | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"le_rfl",
"ordinal",
"ordinal.induction"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
neg_nim (o : ordinal) : -nim o = nim o | begin
induction o using ordinal.induction with o IH,
rw nim_def, dsimp; congr;
funext i;
exact IH _ (ordinal.typein_lt_self i)
end | lemma | pgame.neg_nim | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"ordinal",
"ordinal.induction",
"ordinal.typein_lt_self"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
nim_impartial (o : ordinal) : impartial (nim o) | begin
induction o using ordinal.induction with o IH,
rw [impartial_def, neg_nim],
refine ⟨equiv_rfl, λ i, _, λ i, _⟩;
simpa using IH _ (typein_lt_self _)
end | instance | pgame.nim_impartial | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"ordinal",
"ordinal.induction"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
nim_fuzzy_zero_of_ne_zero {o : ordinal} (ho : o ≠ 0) : nim o ‖ 0 | begin
rw [impartial.fuzzy_zero_iff_lf, nim_def, lf_zero_le],
rw ←ordinal.pos_iff_ne_zero at ho,
exact ⟨(ordinal.principal_seg_out ho).top, by simp⟩
end | lemma | pgame.nim_fuzzy_zero_of_ne_zero | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"ordinal",
"ordinal.principal_seg_out"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
nim_add_equiv_zero_iff (o₁ o₂ : ordinal) : nim o₁ + nim o₂ ≈ 0 ↔ o₁ = o₂ | begin
split,
{ refine not_imp_not.1 (λ (hne : _ ≠ _), (impartial.not_equiv_zero_iff _).2 _),
wlog h : o₁ < o₂,
{ exact (fuzzy_congr_left add_comm_equiv).1 (this _ _ hne.symm (hne.lt_or_lt.resolve_left h)) },
rw [impartial.fuzzy_zero_iff_gf, zero_lf_le, nim_def o₂],
refine ⟨to_left_moves_add (sum.inr... | lemma | pgame.nim_add_equiv_zero_iff | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"ordinal",
"ordinal.principal_seg_out"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
nim_add_fuzzy_zero_iff {o₁ o₂ : ordinal} : nim o₁ + nim o₂ ‖ 0 ↔ o₁ ≠ o₂ | by rw [iff_not_comm, impartial.not_fuzzy_zero_iff, nim_add_equiv_zero_iff] | lemma | pgame.nim_add_fuzzy_zero_iff | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"iff_not_comm",
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
nim_equiv_iff_eq {o₁ o₂ : ordinal} : nim o₁ ≈ nim o₂ ↔ o₁ = o₂ | by rw [impartial.equiv_iff_add_equiv_zero, nim_add_equiv_zero_iff] | lemma | pgame.nim_equiv_iff_eq | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
grundy_value : Π (G : pgame.{u}), ordinal.{u} | | G := ordinal.mex.{u u} (λ i, grundy_value (G.move_left i))
using_well_founded { dec_tac := pgame_wf_tac } | def | pgame.grundy_value | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [] | The Grundy value of an impartial game, the ordinal which corresponds to the game of nim that the
game is equivalent to | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
grundy_value_eq_mex_left (G : pgame) :
grundy_value G = ordinal.mex.{u u} (λ i, grundy_value (G.move_left i)) | by rw grundy_value | lemma | pgame.grundy_value_eq_mex_left | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"pgame"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
equiv_nim_grundy_value : ∀ (G : pgame.{u}) [G.impartial], G ≈ nim (grundy_value G) | | G :=
begin
introI hG,
rw [impartial.equiv_iff_add_equiv_zero, ←impartial.forall_left_moves_fuzzy_iff_equiv_zero],
intro i,
apply left_moves_add_cases i,
{ intro i₁,
rw add_move_left_inl,
apply (fuzzy_congr_left (add_congr_left (equiv_nim_grundy_value (G.move_left i₁)).symm)).1,
rw nim_add_fuzzy_... | theorem | pgame.equiv_nim_grundy_value | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"cInf_le'",
"ordinal.ne_mex",
"ordinal.typein",
"ordinal.typein_lt_self",
"quotient.out"
] | The Sprague-Grundy theorem which states that every impartial game is equivalent to a game of
nim, namely the game of nim corresponding to the games Grundy value | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
grundy_value_eq_iff_equiv_nim {G : pgame} [G.impartial] {o : ordinal} :
grundy_value G = o ↔ G ≈ nim o | ⟨by { rintro rfl, exact equiv_nim_grundy_value G },
by { intro h, rw ←nim_equiv_iff_eq, exact (equiv_nim_grundy_value G).symm.trans h }⟩ | lemma | pgame.grundy_value_eq_iff_equiv_nim | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"ordinal",
"pgame"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
nim_grundy_value (o : ordinal.{u}) : grundy_value (nim o) = o | grundy_value_eq_iff_equiv_nim.2 pgame.equiv_rfl | lemma | pgame.nim_grundy_value | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"pgame.equiv_rfl"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
grundy_value_eq_iff_equiv (G H : pgame) [G.impartial] [H.impartial] :
grundy_value G = grundy_value H ↔ G ≈ H | grundy_value_eq_iff_equiv_nim.trans (equiv_congr_left.1 (equiv_nim_grundy_value H) _).symm | lemma | pgame.grundy_value_eq_iff_equiv | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"pgame"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
grundy_value_zero : grundy_value 0 = 0 | grundy_value_eq_iff_equiv_nim.2 nim_zero_equiv.symm | lemma | pgame.grundy_value_zero | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
grundy_value_iff_equiv_zero (G : pgame) [G.impartial] : grundy_value G = 0 ↔ G ≈ 0 | by rw [←grundy_value_eq_iff_equiv, grundy_value_zero] | lemma | pgame.grundy_value_iff_equiv_zero | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"pgame"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
grundy_value_star : grundy_value star = 1 | grundy_value_eq_iff_equiv_nim.2 nim_one_equiv.symm | lemma | pgame.grundy_value_star | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
grundy_value_neg (G : pgame) [G.impartial] : grundy_value (-G) = grundy_value G | by rw [grundy_value_eq_iff_equiv_nim, neg_equiv_iff, neg_nim, ←grundy_value_eq_iff_equiv_nim] | lemma | pgame.grundy_value_neg | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"pgame"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
grundy_value_eq_mex_right : ∀ (G : pgame) [G.impartial],
grundy_value G = ordinal.mex.{u u} (λ i, grundy_value (G.move_right i)) | | ⟨l, r, L, R⟩ := begin
introI H,
rw [←grundy_value_neg, grundy_value_eq_mex_left],
congr,
ext i,
haveI : (R i).impartial := @impartial.move_right_impartial ⟨l, r, L, R⟩ _ i,
apply grundy_value_neg
end | lemma | pgame.grundy_value_eq_mex_right | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"pgame"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
grundy_value_nim_add_nim (n m : ℕ) :
grundy_value (nim.{u} n + nim.{u} m) = nat.lxor n m | begin
-- We do strong induction on both variables.
induction n using nat.strong_induction_on with n hn generalizing m,
induction m using nat.strong_induction_on with m hm,
rw grundy_value_eq_mex_left,
apply (ordinal.mex_le_of_ne.{u u} (λ i, _)).antisymm (ordinal.le_mex_of_forall (λ ou hu, _)),
-- The Grundy... | lemma | pgame.grundy_value_nim_add_nim | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"equiv.symm_apply_apply",
"nat.lt_lxor_cases",
"nat.lxor_cancel_left",
"nat.lxor_cancel_right",
"nat.lxor_comm",
"nat.lxor_left_inj",
"nat.lxor_right_inj",
"ordinal.le_mex_of_forall",
"ordinal.nat_cast_inj",
"ordinal.nat_lt_omega"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
nim_add_nim_equiv {n m : ℕ} : nim n + nim m ≈ nim (nat.lxor n m) | by rw [←grundy_value_eq_iff_equiv_nim, grundy_value_nim_add_nim] | lemma | pgame.nim_add_nim_equiv | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
grundy_value_add (G H : pgame) [G.impartial] [H.impartial] {n m : ℕ} (hG : grundy_value G = n)
(hH : grundy_value H = m) : grundy_value (G + H) = nat.lxor n m | begin
rw [←nim_grundy_value (nat.lxor n m), grundy_value_eq_iff_equiv],
refine equiv.trans _ nim_add_nim_equiv,
convert add_congr (equiv_nim_grundy_value G) (equiv_nim_grundy_value H);
simp only [hG, hH]
end | lemma | pgame.grundy_value_add | set_theory.game | src/set_theory/game/nim.lean | [
"data.nat.bitwise",
"set_theory.game.birthday",
"set_theory.game.impartial"
] | [
"equiv.trans",
"pgame"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_pgame_def (o : ordinal) :
o.to_pgame = ⟨o.out.α, pempty, λ x, (typein (<) x).to_pgame, pempty.elim⟩ | by rw to_pgame | theorem | ordinal.to_pgame_def | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"ordinal",
"pempty"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_pgame_left_moves (o : ordinal) : o.to_pgame.left_moves = o.out.α | by rw [to_pgame, left_moves] | theorem | ordinal.to_pgame_left_moves | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_pgame_right_moves (o : ordinal) : o.to_pgame.right_moves = pempty | by rw [to_pgame, right_moves] | theorem | ordinal.to_pgame_right_moves | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"ordinal",
"pempty"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
is_empty_zero_to_pgame_left_moves : is_empty (to_pgame 0).left_moves | by { rw to_pgame_left_moves, apply_instance } | instance | ordinal.is_empty_zero_to_pgame_left_moves | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"is_empty"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
is_empty_to_pgame_right_moves (o : ordinal) : is_empty o.to_pgame.right_moves | by { rw to_pgame_right_moves, apply_instance } | instance | ordinal.is_empty_to_pgame_right_moves | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"is_empty",
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_left_moves_to_pgame {o : ordinal} : set.Iio o ≃ o.to_pgame.left_moves | (enum_iso_out o).to_equiv.trans (equiv.cast (to_pgame_left_moves o).symm) | def | ordinal.to_left_moves_to_pgame | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"equiv.cast",
"ordinal",
"set.Iio"
] | Converts an ordinal less than `o` into a move for the `pgame` corresponding to `o`, and vice
versa. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
to_left_moves_to_pgame_symm_lt {o : ordinal} (i : o.to_pgame.left_moves) :
↑(to_left_moves_to_pgame.symm i) < o | (to_left_moves_to_pgame.symm i).prop | theorem | ordinal.to_left_moves_to_pgame_symm_lt | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_pgame_move_left_heq {o : ordinal} :
o.to_pgame.move_left == λ x : o.out.α, (typein (<) x).to_pgame | by { rw to_pgame, refl } | theorem | ordinal.to_pgame_move_left_heq | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_pgame_move_left' {o : ordinal} (i) :
o.to_pgame.move_left i = (to_left_moves_to_pgame.symm i).val.to_pgame | (congr_heq to_pgame_move_left_heq.symm (cast_heq _ i)).symm | theorem | ordinal.to_pgame_move_left' | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"congr_heq",
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_pgame_move_left {o : ordinal} (i) :
o.to_pgame.move_left (to_left_moves_to_pgame i) = i.val.to_pgame | by simp | theorem | ordinal.to_pgame_move_left | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
zero_to_pgame_relabelling : to_pgame 0 ≡r 0 | relabelling.is_empty _ | def | ordinal.zero_to_pgame_relabelling | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [] | `0.to_pgame` has the same moves as `0`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
unique_one_to_pgame_left_moves : unique (to_pgame 1).left_moves | (equiv.cast $ to_pgame_left_moves 1).unique | instance | ordinal.unique_one_to_pgame_left_moves | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"equiv.cast",
"unique"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
one_to_pgame_left_moves_default_eq :
(default : (to_pgame 1).left_moves) = @to_left_moves_to_pgame 1 ⟨0, zero_lt_one⟩ | rfl | theorem | ordinal.one_to_pgame_left_moves_default_eq | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_left_moves_one_to_pgame_symm (i) :
(@to_left_moves_to_pgame 1).symm i = ⟨0, zero_lt_one⟩ | by simp | theorem | ordinal.to_left_moves_one_to_pgame_symm | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
one_to_pgame_move_left (x) : (to_pgame 1).move_left x = to_pgame 0 | by simp | theorem | ordinal.one_to_pgame_move_left | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
one_to_pgame_relabelling : to_pgame 1 ≡r 1 | ⟨equiv.equiv_of_unique _ _, equiv.equiv_of_is_empty _ _,
λ i, by simpa using zero_to_pgame_relabelling, is_empty_elim⟩ | def | ordinal.one_to_pgame_relabelling | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"equiv.equiv_of_is_empty"
] | `1.to_pgame` has the same moves as `1`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
to_pgame_lf {a b : ordinal} (h : a < b) : a.to_pgame ⧏ b.to_pgame | by { convert move_left_lf (to_left_moves_to_pgame ⟨a, h⟩), rw to_pgame_move_left } | theorem | ordinal.to_pgame_lf | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_pgame_le {a b : ordinal} (h : a ≤ b) : a.to_pgame ≤ b.to_pgame | begin
refine le_iff_forall_lf.2 ⟨λ i, _, is_empty_elim⟩,
rw to_pgame_move_left',
exact to_pgame_lf ((to_left_moves_to_pgame_symm_lt i).trans_le h)
end | theorem | ordinal.to_pgame_le | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_pgame_lt {a b : ordinal} (h : a < b) : a.to_pgame < b.to_pgame | ⟨to_pgame_le h.le, to_pgame_lf h⟩ | theorem | ordinal.to_pgame_lt | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_pgame_nonneg (a : ordinal) : 0 ≤ a.to_pgame | zero_to_pgame_relabelling.ge.trans $ to_pgame_le $ ordinal.zero_le a | theorem | ordinal.to_pgame_nonneg | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"ordinal",
"ordinal.zero_le"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_pgame_lf_iff {a b : ordinal} : a.to_pgame ⧏ b.to_pgame ↔ a < b | ⟨by { contrapose, rw [not_lt, not_lf], exact to_pgame_le }, to_pgame_lf⟩ | theorem | ordinal.to_pgame_lf_iff | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_pgame_le_iff {a b : ordinal} : a.to_pgame ≤ b.to_pgame ↔ a ≤ b | ⟨by { contrapose, rw [not_le, pgame.not_le], exact to_pgame_lf }, to_pgame_le⟩ | theorem | ordinal.to_pgame_le_iff | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"ordinal",
"pgame.not_le"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_pgame_lt_iff {a b : ordinal} : a.to_pgame < b.to_pgame ↔ a < b | ⟨by { contrapose, rw not_lt, exact λ h, not_lt_of_le (to_pgame_le h) }, to_pgame_lt⟩ | theorem | ordinal.to_pgame_lt_iff | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"not_lt_of_le",
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_pgame_equiv_iff {a b : ordinal} : a.to_pgame ≈ b.to_pgame ↔ a = b | by rw [pgame.equiv, le_antisymm_iff, to_pgame_le_iff, to_pgame_le_iff] | theorem | ordinal.to_pgame_equiv_iff | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"ordinal",
"pgame.equiv"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_pgame_injective : function.injective ordinal.to_pgame | λ a b h, to_pgame_equiv_iff.1 $ equiv_of_eq h | theorem | ordinal.to_pgame_injective | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_pgame_eq_iff {a b : ordinal} : a.to_pgame = b.to_pgame ↔ a = b | to_pgame_injective.eq_iff | theorem | ordinal.to_pgame_eq_iff | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_pgame_embedding : ordinal.{u} ↪o pgame.{u} | { to_fun := ordinal.to_pgame,
inj' := to_pgame_injective,
map_rel_iff' := @to_pgame_le_iff } | def | ordinal.to_pgame_embedding | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [] | The order embedding version of `to_pgame`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
to_pgame_add : ∀ a b : ordinal.{u}, a.to_pgame + b.to_pgame ≈ (a ♯ b).to_pgame | | a b := begin
refine ⟨le_of_forall_lf (λ i, _) is_empty_elim, le_of_forall_lf (λ i, _) is_empty_elim⟩,
{ apply left_moves_add_cases i;
intro i;
let wf := to_left_moves_to_pgame_symm_lt i;
try { rw add_move_left_inl }; try { rw add_move_left_inr };
rw [to_pgame_move_left', lf_congr_left (to_pgame_ad... | theorem | ordinal.to_pgame_add | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"is_empty_elim"
] | The sum of ordinals as games corresponds to natural addition of ordinals. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
to_pgame_add_mk (a b : ordinal) :
⟦a.to_pgame⟧ + ⟦b.to_pgame⟧ = ⟦(a ♯ b).to_pgame⟧ | quot.sound (to_pgame_add a b) | theorem | ordinal.to_pgame_add_mk | set_theory.game | src/set_theory/game/ordinal.lean | [
"set_theory.game.basic",
"set_theory.ordinal.natural_ops"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
pgame : Type (u+1)
| mk : ∀ α β : Type u, (α → pgame) → (β → pgame) → pgame | inductive | pgame | set_theory.game | src/set_theory/game/pgame.lean | [
"data.fin.basic",
"data.list.basic",
"logic.relation",
"logic.small.basic",
"order.game_add"
] | [] | The type of pre-games, before we have quotiented
by equivalence (`pgame.setoid`). In ZFC, a combinatorial game is constructed from
two sets of combinatorial games that have been constructed at an earlier
stage. To do this in type theory, we say that a pre-game is built
inductively from two families of pre-games... | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
left_moves : pgame → Type u | | (mk l _ _ _) := l | def | pgame.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"
] | [
"pgame"
] | The indexing type for allowable moves by Left. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
right_moves : pgame → Type u | | (mk _ r _ _) := r | def | pgame.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"
] | [
"pgame"
] | The indexing type for allowable moves by Right. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
move_left : Π (g : pgame), left_moves g → pgame | | (mk l _ L _) := L | def | pgame.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"
] | [
"pgame"
] | The new game after Left makes an allowed move. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
move_right : Π (g : pgame), right_moves g → pgame | | (mk _ r _ R) := R | def | pgame.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"
] | [
"pgame"
] | The new game after Right makes an allowed move. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
left_moves_mk {xl xr xL xR} : (⟨xl, xr, xL, xR⟩ : pgame).left_moves = xl | rfl | lemma | pgame.left_moves_mk | 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 | |
move_left_mk {xl xr xL xR} : (⟨xl, xr, xL, xR⟩ : pgame).move_left = xL | rfl | lemma | pgame.move_left_mk | 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_mk {xl xr xL xR} : (⟨xl, xr, xL, xR⟩ : pgame).right_moves = xr | rfl | lemma | pgame.right_moves_mk | 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 | |
move_right_mk {xl xr xL xR} : (⟨xl, xr, xL, xR⟩ : pgame).move_right = xR | rfl | lemma | pgame.move_right_mk | 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 | |
of_lists (L R : list pgame.{u}) : pgame.{u} | mk (ulift (fin L.length)) (ulift (fin R.length))
(λ i, L.nth_le i.down i.down.is_lt) (λ j, R.nth_le j.down j.down.prop) | def | pgame.of_lists | 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 | |
left_moves_of_lists (L R : list pgame) : (of_lists L R).left_moves = ulift (fin L.length) | rfl | lemma | pgame.left_moves_of_lists | 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_of_lists (L R : list pgame) : (of_lists L R).right_moves = ulift (fin R.length) | rfl | lemma | pgame.right_moves_of_lists | 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 | |
to_of_lists_left_moves {L R : list pgame} : fin L.length ≃ (of_lists L R).left_moves | ((equiv.cast (left_moves_of_lists L R).symm).trans equiv.ulift).symm | def | pgame.to_of_lists_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"
] | [
"equiv.cast",
"equiv.ulift",
"pgame"
] | Converts a number into a left move for `of_lists`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
to_of_lists_right_moves {L R : list pgame} : fin R.length ≃ (of_lists L R).right_moves | ((equiv.cast (right_moves_of_lists L R).symm).trans equiv.ulift).symm | def | pgame.to_of_lists_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"
] | [
"equiv.cast",
"equiv.ulift",
"pgame"
] | Converts a number into a right move for `of_lists`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
of_lists_move_left {L R : list pgame} (i : fin L.length) :
(of_lists L R).move_left (to_of_lists_left_moves i) = L.nth_le i i.is_lt | rfl | theorem | pgame.of_lists_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"
] | [
"pgame"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
of_lists_move_left' {L R : list pgame} (i : (of_lists L R).left_moves) :
(of_lists L R).move_left i =
L.nth_le (to_of_lists_left_moves.symm i) (to_of_lists_left_moves.symm i).is_lt | rfl | theorem | pgame.of_lists_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"
] | [
"pgame"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
of_lists_move_right {L R : list pgame} (i : fin R.length) :
(of_lists L R).move_right (to_of_lists_right_moves i) = R.nth_le i i.is_lt | rfl | theorem | pgame.of_lists_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"
] | [
"pgame"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
of_lists_move_right' {L R : list pgame} (i : (of_lists L R).right_moves) :
(of_lists L R).move_right i =
R.nth_le (to_of_lists_right_moves.symm i) (to_of_lists_right_moves.symm i).is_lt | rfl | theorem | pgame.of_lists_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"
] | [
"pgame"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
move_rec_on {C : pgame → Sort*} (x : pgame)
(IH : ∀ (y : pgame), (∀ i, C (y.move_left i)) → (∀ j, C (y.move_right j)) → C y) : C x | x.rec_on $ λ yl yr yL yR, IH (mk yl yr yL yR) | def | pgame.move_rec_on | set_theory.game | src/set_theory/game/pgame.lean | [
"data.fin.basic",
"data.list.basic",
"logic.relation",
"logic.small.basic",
"order.game_add"
] | [
"pgame"
] | A variant of `pgame.rec_on` expressed in terms of `pgame.move_left` and `pgame.move_right`.
Both this and `pgame.rec_on` describe Conway induction on games. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_option : pgame → pgame → Prop
| move_left {x : pgame} (i : x.left_moves) : is_option (x.move_left i) x
| move_right {x : pgame} (i : x.right_moves) : is_option (x.move_right i) x | inductive | pgame.is_option | set_theory.game | src/set_theory/game/pgame.lean | [
"data.fin.basic",
"data.list.basic",
"logic.relation",
"logic.small.basic",
"order.game_add"
] | [
"pgame"
] | `is_option x y` means that `x` is either a left or right option for `y`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
is_option.mk_left {xl xr : Type u} (xL : xl → pgame) (xR : xr → pgame) (i : xl) :
(xL i).is_option (mk xl xr xL xR) | @is_option.move_left (mk _ _ _ _) i | theorem | pgame.is_option.mk_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 | |
is_option.mk_right {xl xr : Type u} (xL : xl → pgame) (xR : xr → pgame) (i : xr) :
(xR i).is_option (mk xl xr xL xR) | @is_option.move_right (mk _ _ _ _) i | theorem | pgame.is_option.mk_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 | |
wf_is_option : well_founded is_option | ⟨λ x, move_rec_on x $ λ x IHl IHr, acc.intro x $ λ y h, begin
induction h with _ i _ j,
{ exact IHl i },
{ exact IHr j }
end⟩ | theorem | pgame.wf_is_option | 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 | |
subsequent : pgame → pgame → Prop | trans_gen is_option | def | pgame.subsequent | set_theory.game | src/set_theory/game/pgame.lean | [
"data.fin.basic",
"data.list.basic",
"logic.relation",
"logic.small.basic",
"order.game_add"
] | [
"pgame"
] | `subsequent x y` says that `x` can be obtained by playing some nonempty sequence of moves from
`y`. It is the transitive closure of `is_option`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
subsequent.trans {x y z} : subsequent x y → subsequent y z → subsequent x z | trans_gen.trans | theorem | pgame.subsequent.trans | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.