state
stringlengths
0
159k
srcUpToTactic
stringlengths
387
167k
nextTactic
stringlengths
3
9k
declUpToTactic
stringlengths
22
11.5k
declId
stringlengths
38
95
decl
stringlengths
16
1.89k
file_tag
stringlengths
17
73
α : Type u_1 β : Type u_2 γ : Type u_3 f : α → β s✝ t : Set α s : Set β h : ∀ (x : α), f x ∉ s ⊢ ∀ x ∈ s, ∀ (x_1 : α), ¬f x_1 = x
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura -/ import Mathlib.Data.Set.Basic #align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29" /-! # Ima...
intro y hy x hx
theorem preimage_eq_empty_iff {s : Set β} : f ⁻¹' s = ∅ ↔ Disjoint s (range f) := ⟨fun h => by simp only [eq_empty_iff_forall_not_mem, disjoint_iff_inter_eq_empty, not_exists, mem_inter_iff, not_and, mem_range, mem_preimage] at h ⊢
Mathlib.Data.Set.Image.1653_0.IJFiTzmYGOCpPSd
theorem preimage_eq_empty_iff {s : Set β} : f ⁻¹' s = ∅ ↔ Disjoint s (range f)
Mathlib_Data_Set_Image
α : Type u_1 β : Type u_2 γ : Type u_3 f : α → β s✝ t : Set α s : Set β h : ∀ (x : α), f x ∉ s y : β hy : y ∈ s x : α hx : f x = y ⊢ False
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura -/ import Mathlib.Data.Set.Basic #align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29" /-! # Ima...
rw [← hx] at hy
theorem preimage_eq_empty_iff {s : Set β} : f ⁻¹' s = ∅ ↔ Disjoint s (range f) := ⟨fun h => by simp only [eq_empty_iff_forall_not_mem, disjoint_iff_inter_eq_empty, not_exists, mem_inter_iff, not_and, mem_range, mem_preimage] at h ⊢ intro y hy x hx
Mathlib.Data.Set.Image.1653_0.IJFiTzmYGOCpPSd
theorem preimage_eq_empty_iff {s : Set β} : f ⁻¹' s = ∅ ↔ Disjoint s (range f)
Mathlib_Data_Set_Image
α : Type u_1 β : Type u_2 γ : Type u_3 f : α → β s✝ t : Set α s : Set β h : ∀ (x : α), f x ∉ s y : β x : α hy : f x ∈ s hx : f x = y ⊢ False
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura -/ import Mathlib.Data.Set.Basic #align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29" /-! # Ima...
exact h x hy
theorem preimage_eq_empty_iff {s : Set β} : f ⁻¹' s = ∅ ↔ Disjoint s (range f) := ⟨fun h => by simp only [eq_empty_iff_forall_not_mem, disjoint_iff_inter_eq_empty, not_exists, mem_inter_iff, not_and, mem_range, mem_preimage] at h ⊢ intro y hy x hx rw [← hx] at hy
Mathlib.Data.Set.Image.1653_0.IJFiTzmYGOCpPSd
theorem preimage_eq_empty_iff {s : Set β} : f ⁻¹' s = ∅ ↔ Disjoint s (range f)
Mathlib_Data_Set_Image
α : Type u_1 β : α → Type u_2 i j : α s : Set (β i) h : i ≠ j ⊢ Sigma.mk j ⁻¹' (Sigma.mk i '' s) = ∅
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura -/ import Mathlib.Data.Set.Basic #align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29" /-! # Ima...
simp [image, h]
lemma sigma_mk_preimage_image' (h : i ≠ j) : Sigma.mk j ⁻¹' (Sigma.mk i '' s) = ∅ := by
Mathlib.Data.Set.Image.1671_0.IJFiTzmYGOCpPSd
lemma sigma_mk_preimage_image' (h : i ≠ j) : Sigma.mk j ⁻¹' (Sigma.mk i '' s) = ∅
Mathlib_Data_Set_Image
α : Type u_1 β : α → Type u_2 i j : α s : Set (β i) ⊢ Sigma.mk i ⁻¹' (Sigma.mk i '' s) = s
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura -/ import Mathlib.Data.Set.Basic #align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29" /-! # Ima...
simp [image]
lemma sigma_mk_preimage_image_eq_self : Sigma.mk i ⁻¹' (Sigma.mk i '' s) = s := by
Mathlib.Data.Set.Image.1674_0.IJFiTzmYGOCpPSd
lemma sigma_mk_preimage_image_eq_self : Sigma.mk i ⁻¹' (Sigma.mk i '' s) = s
Mathlib_Data_Set_Image
o : Ordinal.{u_1} ⊢ let_fun this := (_ : IsWellOrder (Quotient.out o).α fun x x_1 => x < x_1); nim o = mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [nim]
theorem nim_def (o : Ordinal) : have : IsWellOrder (Quotient.out o).α (· < ·) := inferInstance nim o = PGame.mk o.out.α o.out.α (fun o₂ => nim (Ordinal.typein (· < ·) o₂)) fun o₂ => nim (Ordinal.typein (· < ·) o₂) := by
Mathlib.SetTheory.Game.Nim.59_0.mmFMhRYSjViKjcP
theorem nim_def (o : Ordinal) : have : IsWellOrder (Quotient.out o).α (· < ·)
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} ⊢ let_fun this := (_ : IsWellOrder (Quotient.out o).α fun x x_1 => x < x_1); (mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => let_fun x := (_ : typein (fun x x_1 => x < x_1) o₂ < o); nim (typein (Quotient.out o).r o₂)) fun o₂ => let_fun x := (_ : typein (fun x x...
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rfl
theorem nim_def (o : Ordinal) : have : IsWellOrder (Quotient.out o).α (· < ·) := inferInstance nim o = PGame.mk o.out.α o.out.α (fun o₂ => nim (Ordinal.typein (· < ·) o₂)) fun o₂ => nim (Ordinal.typein (· < ·) o₂) := by rw [nim];
Mathlib.SetTheory.Game.Nim.59_0.mmFMhRYSjViKjcP
theorem nim_def (o : Ordinal) : have : IsWellOrder (Quotient.out o).α (· < ·)
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} ⊢ LeftMoves (nim o) = (Quotient.out o).α
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [nim_def]
theorem leftMoves_nim (o : Ordinal) : (nim o).LeftMoves = o.out.α := by
Mathlib.SetTheory.Game.Nim.67_0.mmFMhRYSjViKjcP
theorem leftMoves_nim (o : Ordinal) : (nim o).LeftMoves = o.out.α
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} ⊢ LeftMoves (mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) = (Quotient.out o).α
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rfl
theorem leftMoves_nim (o : Ordinal) : (nim o).LeftMoves = o.out.α := by rw [nim_def];
Mathlib.SetTheory.Game.Nim.67_0.mmFMhRYSjViKjcP
theorem leftMoves_nim (o : Ordinal) : (nim o).LeftMoves = o.out.α
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} ⊢ RightMoves (nim o) = (Quotient.out o).α
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [nim_def]
theorem rightMoves_nim (o : Ordinal) : (nim o).RightMoves = o.out.α := by
Mathlib.SetTheory.Game.Nim.70_0.mmFMhRYSjViKjcP
theorem rightMoves_nim (o : Ordinal) : (nim o).RightMoves = o.out.α
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} ⊢ RightMoves (mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) = (Quotient.out o).α
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rfl
theorem rightMoves_nim (o : Ordinal) : (nim o).RightMoves = o.out.α := by rw [nim_def];
Mathlib.SetTheory.Game.Nim.70_0.mmFMhRYSjViKjcP
theorem rightMoves_nim (o : Ordinal) : (nim o).RightMoves = o.out.α
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} ⊢ let_fun this := (_ : IsWellOrder (Quotient.out o).α fun x x_1 => x < x_1); HEq (moveLeft (nim o)) fun i => nim (typein (fun x x_1 => x < x_1) i)
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [nim_def]
theorem moveLeft_nim_hEq (o : Ordinal) : have : IsWellOrder (Quotient.out o).α (· < ·) := inferInstance HEq (nim o).moveLeft fun i : o.out.α => nim (typein (· < ·) i) := by
Mathlib.SetTheory.Game.Nim.73_0.mmFMhRYSjViKjcP
theorem moveLeft_nim_hEq (o : Ordinal) : have : IsWellOrder (Quotient.out o).α (· < ·)
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} ⊢ let_fun this := (_ : IsWellOrder (Quotient.out o).α fun x x_1 => x < x_1); HEq (moveLeft (mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂))) fun i => nim (typein (fun x x_1 => x < x_1)...
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rfl
theorem moveLeft_nim_hEq (o : Ordinal) : have : IsWellOrder (Quotient.out o).α (· < ·) := inferInstance HEq (nim o).moveLeft fun i : o.out.α => nim (typein (· < ·) i) := by rw [nim_def];
Mathlib.SetTheory.Game.Nim.73_0.mmFMhRYSjViKjcP
theorem moveLeft_nim_hEq (o : Ordinal) : have : IsWellOrder (Quotient.out o).α (· < ·)
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} ⊢ let_fun this := (_ : IsWellOrder (Quotient.out o).α fun x x_1 => x < x_1); HEq (moveRight (nim o)) fun i => nim (typein (fun x x_1 => x < x_1) i)
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [nim_def]
theorem moveRight_nim_hEq (o : Ordinal) : have : IsWellOrder (Quotient.out o).α (· < ·) := inferInstance HEq (nim o).moveRight fun i : o.out.α => nim (typein (· < ·) i) := by
Mathlib.SetTheory.Game.Nim.78_0.mmFMhRYSjViKjcP
theorem moveRight_nim_hEq (o : Ordinal) : have : IsWellOrder (Quotient.out o).α (· < ·)
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} ⊢ let_fun this := (_ : IsWellOrder (Quotient.out o).α fun x x_1 => x < x_1); HEq (moveRight (mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂))) fun i => nim (typein (fun x x_1 => x < x_1...
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rfl
theorem moveRight_nim_hEq (o : Ordinal) : have : IsWellOrder (Quotient.out o).α (· < ·) := inferInstance HEq (nim o).moveRight fun i : o.out.α => nim (typein (· < ·) i) := by rw [nim_def];
Mathlib.SetTheory.Game.Nim.78_0.mmFMhRYSjViKjcP
theorem moveRight_nim_hEq (o : Ordinal) : have : IsWellOrder (Quotient.out o).α (· < ·)
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} i : ↑(Set.Iio o) ⊢ moveLeft (nim o) (toLeftMovesNim i) = nim ↑i
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
simp
theorem moveLeft_nim {o : Ordinal} (i) : (nim o).moveLeft (toLeftMovesNim i) = nim i := by
Mathlib.SetTheory.Game.Nim.111_0.mmFMhRYSjViKjcP
theorem moveLeft_nim {o : Ordinal} (i) : (nim o).moveLeft (toLeftMovesNim i) = nim i
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} i : ↑(Set.Iio o) ⊢ moveRight (nim o) (toRightMovesNim i) = nim ↑i
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
simp
theorem moveRight_nim {o : Ordinal} (i) : (nim o).moveRight (toRightMovesNim i) = nim i := by
Mathlib.SetTheory.Game.Nim.119_0.mmFMhRYSjViKjcP
theorem moveRight_nim {o : Ordinal} (i) : (nim o).moveRight (toRightMovesNim i) = nim i
Mathlib_SetTheory_Game_Nim
o : Ordinal.{?u.16604} P : LeftMoves (nim o) → Sort u_1 i : LeftMoves (nim o) H : (a : Ordinal.{?u.16604}) → (H : a < o) → P (toLeftMovesNim { val := a, property := H }) ⊢ P i
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [← toLeftMovesNim.apply_symm_apply i]
/-- A recursion principle for left moves of a nim game. -/ @[elab_as_elim] def leftMovesNimRecOn {o : Ordinal} {P : (nim o).LeftMoves → Sort*} (i : (nim o).LeftMoves) (H : ∀ a (H : a < o), P <| toLeftMovesNim ⟨a, H⟩) : P i := by
Mathlib.SetTheory.Game.Nim.122_0.mmFMhRYSjViKjcP
/-- A recursion principle for left moves of a nim game. -/ @[elab_as_elim] def leftMovesNimRecOn {o : Ordinal} {P : (nim o).LeftMoves → Sort*} (i : (nim o).LeftMoves) (H : ∀ a (H : a < o), P <| toLeftMovesNim ⟨a, H⟩) : P i
Mathlib_SetTheory_Game_Nim
o : Ordinal.{?u.16604} P : LeftMoves (nim o) → Sort u_1 i : LeftMoves (nim o) H : (a : Ordinal.{?u.16604}) → (H : a < o) → P (toLeftMovesNim { val := a, property := H }) ⊢ P (toLeftMovesNim (toLeftMovesNim.symm i))
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
apply H
/-- A recursion principle for left moves of a nim game. -/ @[elab_as_elim] def leftMovesNimRecOn {o : Ordinal} {P : (nim o).LeftMoves → Sort*} (i : (nim o).LeftMoves) (H : ∀ a (H : a < o), P <| toLeftMovesNim ⟨a, H⟩) : P i := by rw [← toLeftMovesNim.apply_symm_apply i];
Mathlib.SetTheory.Game.Nim.122_0.mmFMhRYSjViKjcP
/-- A recursion principle for left moves of a nim game. -/ @[elab_as_elim] def leftMovesNimRecOn {o : Ordinal} {P : (nim o).LeftMoves → Sort*} (i : (nim o).LeftMoves) (H : ∀ a (H : a < o), P <| toLeftMovesNim ⟨a, H⟩) : P i
Mathlib_SetTheory_Game_Nim
o : Ordinal.{?u.17019} P : RightMoves (nim o) → Sort u_1 i : RightMoves (nim o) H : (a : Ordinal.{?u.17019}) → (H : a < o) → P (toRightMovesNim { val := a, property := H }) ⊢ P i
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [← toRightMovesNim.apply_symm_apply i]
/-- A recursion principle for right moves of a nim game. -/ @[elab_as_elim] def rightMovesNimRecOn {o : Ordinal} {P : (nim o).RightMoves → Sort*} (i : (nim o).RightMoves) (H : ∀ a (H : a < o), P <| toRightMovesNim ⟨a, H⟩) : P i := by
Mathlib.SetTheory.Game.Nim.129_0.mmFMhRYSjViKjcP
/-- A recursion principle for right moves of a nim game. -/ @[elab_as_elim] def rightMovesNimRecOn {o : Ordinal} {P : (nim o).RightMoves → Sort*} (i : (nim o).RightMoves) (H : ∀ a (H : a < o), P <| toRightMovesNim ⟨a, H⟩) : P i
Mathlib_SetTheory_Game_Nim
o : Ordinal.{?u.17019} P : RightMoves (nim o) → Sort u_1 i : RightMoves (nim o) H : (a : Ordinal.{?u.17019}) → (H : a < o) → P (toRightMovesNim { val := a, property := H }) ⊢ P (toRightMovesNim (toRightMovesNim.symm i))
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
apply H
/-- A recursion principle for right moves of a nim game. -/ @[elab_as_elim] def rightMovesNimRecOn {o : Ordinal} {P : (nim o).RightMoves → Sort*} (i : (nim o).RightMoves) (H : ∀ a (H : a < o), P <| toRightMovesNim ⟨a, H⟩) : P i := by rw [← toRightMovesNim.apply_symm_apply i];
Mathlib.SetTheory.Game.Nim.129_0.mmFMhRYSjViKjcP
/-- A recursion principle for right moves of a nim game. -/ @[elab_as_elim] def rightMovesNimRecOn {o : Ordinal} {P : (nim o).RightMoves → Sort*} (i : (nim o).RightMoves) (H : ∀ a (H : a < o), P <| toRightMovesNim ⟨a, H⟩) : P i
Mathlib_SetTheory_Game_Nim
⊢ IsEmpty (LeftMoves (nim 0))
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [nim_def]
instance isEmpty_nim_zero_leftMoves : IsEmpty (nim 0).LeftMoves := by
Mathlib.SetTheory.Game.Nim.136_0.mmFMhRYSjViKjcP
instance isEmpty_nim_zero_leftMoves : IsEmpty (nim 0).LeftMoves
Mathlib_SetTheory_Game_Nim
⊢ IsEmpty (LeftMoves (mk (Quotient.out 0).α (Quotient.out 0).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)))
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
exact Ordinal.isEmpty_out_zero
instance isEmpty_nim_zero_leftMoves : IsEmpty (nim 0).LeftMoves := by rw [nim_def]
Mathlib.SetTheory.Game.Nim.136_0.mmFMhRYSjViKjcP
instance isEmpty_nim_zero_leftMoves : IsEmpty (nim 0).LeftMoves
Mathlib_SetTheory_Game_Nim
⊢ IsEmpty (RightMoves (nim 0))
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [nim_def]
instance isEmpty_nim_zero_rightMoves : IsEmpty (nim 0).RightMoves := by
Mathlib.SetTheory.Game.Nim.141_0.mmFMhRYSjViKjcP
instance isEmpty_nim_zero_rightMoves : IsEmpty (nim 0).RightMoves
Mathlib_SetTheory_Game_Nim
⊢ IsEmpty (RightMoves (mk (Quotient.out 0).α (Quotient.out 0).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)))
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
exact Ordinal.isEmpty_out_zero
instance isEmpty_nim_zero_rightMoves : IsEmpty (nim 0).RightMoves := by rw [nim_def]
Mathlib.SetTheory.Game.Nim.141_0.mmFMhRYSjViKjcP
instance isEmpty_nim_zero_rightMoves : IsEmpty (nim 0).RightMoves
Mathlib_SetTheory_Game_Nim
i : LeftMoves (nim 1) ⊢ toLeftMovesNim.symm i = { val := 0, property := (_ : 0 ∈ Set.Iio 1) }
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
simp [eq_iff_true_of_subsingleton]
@[simp] theorem toLeftMovesNim_one_symm (i) : (@toLeftMovesNim 1).symm i = ⟨0, Set.mem_Iio.mpr zero_lt_one⟩ := by
Mathlib.SetTheory.Game.Nim.175_0.mmFMhRYSjViKjcP
@[simp] theorem toLeftMovesNim_one_symm (i) : (@toLeftMovesNim 1).symm i = ⟨0, Set.mem_Iio.mpr zero_lt_one⟩
Mathlib_SetTheory_Game_Nim
i : RightMoves (nim 1) ⊢ toRightMovesNim.symm i = { val := 0, property := (_ : 0 ∈ Set.Iio 1) }
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
simp [eq_iff_true_of_subsingleton]
@[simp] theorem toRightMovesNim_one_symm (i) : (@toRightMovesNim 1).symm i = ⟨0, Set.mem_Iio.mpr zero_lt_one⟩ := by
Mathlib.SetTheory.Game.Nim.181_0.mmFMhRYSjViKjcP
@[simp] theorem toRightMovesNim_one_symm (i) : (@toRightMovesNim 1).symm i = ⟨0, Set.mem_Iio.mpr zero_lt_one⟩
Mathlib_SetTheory_Game_Nim
x : LeftMoves (nim 1) ⊢ moveLeft (nim 1) x = nim 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
simp
theorem nim_one_moveLeft (x) : (nim 1).moveLeft x = nim 0 := by
Mathlib.SetTheory.Game.Nim.187_0.mmFMhRYSjViKjcP
theorem nim_one_moveLeft (x) : (nim 1).moveLeft x = nim 0
Mathlib_SetTheory_Game_Nim
x : RightMoves (nim 1) ⊢ moveRight (nim 1) x = nim 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
simp
theorem nim_one_moveRight (x) : (nim 1).moveRight x = nim 0 := by
Mathlib.SetTheory.Game.Nim.190_0.mmFMhRYSjViKjcP
theorem nim_one_moveRight (x) : (nim 1).moveRight x = nim 0
Mathlib_SetTheory_Game_Nim
⊢ nim 1 ≡r star
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [nim_def]
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star := by
Mathlib.SetTheory.Game.Nim.193_0.mmFMhRYSjViKjcP
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star
Mathlib_SetTheory_Game_Nim
⊢ (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) ≡r star
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
refine' ⟨_, _, fun i => _, fun j => _⟩
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star := by rw [nim_def]
Mathlib.SetTheory.Game.Nim.193_0.mmFMhRYSjViKjcP
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star
Mathlib_SetTheory_Game_Nim
case refine'_1 ⊢ LeftMoves (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) ≃ LeftMoves star case refine'_2 ⊢ RightMoves (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x ...
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
any_goals dsimp; apply Equiv.equivOfUnique
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star := by rw [nim_def] refine' ⟨_, _, fun i => _, fun j => _⟩
Mathlib.SetTheory.Game.Nim.193_0.mmFMhRYSjViKjcP
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star
Mathlib_SetTheory_Game_Nim
case refine'_1 ⊢ LeftMoves (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) ≃ LeftMoves star
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
dsimp
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star := by rw [nim_def] refine' ⟨_, _, fun i => _, fun j => _⟩ any_goals
Mathlib.SetTheory.Game.Nim.193_0.mmFMhRYSjViKjcP
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star
Mathlib_SetTheory_Game_Nim
case refine'_1 ⊢ (Quotient.out 1).α ≃ PUnit.{?u.23865 + 1}
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
apply Equiv.equivOfUnique
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star := by rw [nim_def] refine' ⟨_, _, fun i => _, fun j => _⟩ any_goals dsimp;
Mathlib.SetTheory.Game.Nim.193_0.mmFMhRYSjViKjcP
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star
Mathlib_SetTheory_Game_Nim
case refine'_2 ⊢ RightMoves (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) ≃ RightMoves star
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
dsimp
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star := by rw [nim_def] refine' ⟨_, _, fun i => _, fun j => _⟩ any_goals
Mathlib.SetTheory.Game.Nim.193_0.mmFMhRYSjViKjcP
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star
Mathlib_SetTheory_Game_Nim
case refine'_2 ⊢ (Quotient.out 1).α ≃ PUnit.{?u.23865 + 1}
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
apply Equiv.equivOfUnique
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star := by rw [nim_def] refine' ⟨_, _, fun i => _, fun j => _⟩ any_goals dsimp;
Mathlib.SetTheory.Game.Nim.193_0.mmFMhRYSjViKjcP
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star
Mathlib_SetTheory_Game_Nim
case refine'_3 i : LeftMoves (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) ⊢ moveLeft (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typ...
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
dsimp
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star := by rw [nim_def] refine' ⟨_, _, fun i => _, fun j => _⟩ any_goals
Mathlib.SetTheory.Game.Nim.193_0.mmFMhRYSjViKjcP
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star
Mathlib_SetTheory_Game_Nim
case refine'_3 i : LeftMoves (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) ⊢ nim (typein (fun x x_1 => x < x_1) i) ≡r 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
apply Equiv.equivOfUnique
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star := by rw [nim_def] refine' ⟨_, _, fun i => _, fun j => _⟩ any_goals dsimp;
Mathlib.SetTheory.Game.Nim.193_0.mmFMhRYSjViKjcP
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star
Mathlib_SetTheory_Game_Nim
case refine'_4 j : RightMoves (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) ⊢ moveRight (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (t...
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
dsimp
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star := by rw [nim_def] refine' ⟨_, _, fun i => _, fun j => _⟩ any_goals
Mathlib.SetTheory.Game.Nim.193_0.mmFMhRYSjViKjcP
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star
Mathlib_SetTheory_Game_Nim
case refine'_4 j : RightMoves (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) ⊢ nim (typein (fun x x_1 => x < x_1) j) ≡r 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
apply Equiv.equivOfUnique
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star := by rw [nim_def] refine' ⟨_, _, fun i => _, fun j => _⟩ any_goals dsimp;
Mathlib.SetTheory.Game.Nim.193_0.mmFMhRYSjViKjcP
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star
Mathlib_SetTheory_Game_Nim
case refine'_3 i : LeftMoves (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) ⊢ moveLeft (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typ...
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
all_goals simp; exact nimZeroRelabelling
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star := by rw [nim_def] refine' ⟨_, _, fun i => _, fun j => _⟩ any_goals dsimp; apply Equiv.equivOfUnique
Mathlib.SetTheory.Game.Nim.193_0.mmFMhRYSjViKjcP
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star
Mathlib_SetTheory_Game_Nim
case refine'_3 i : LeftMoves (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) ⊢ moveLeft (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typ...
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
simp
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star := by rw [nim_def] refine' ⟨_, _, fun i => _, fun j => _⟩ any_goals dsimp; apply Equiv.equivOfUnique all_goals
Mathlib.SetTheory.Game.Nim.193_0.mmFMhRYSjViKjcP
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star
Mathlib_SetTheory_Game_Nim
case refine'_3 i : LeftMoves (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) ⊢ nim 0 ≡r 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
exact nimZeroRelabelling
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star := by rw [nim_def] refine' ⟨_, _, fun i => _, fun j => _⟩ any_goals dsimp; apply Equiv.equivOfUnique all_goals simp;
Mathlib.SetTheory.Game.Nim.193_0.mmFMhRYSjViKjcP
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star
Mathlib_SetTheory_Game_Nim
case refine'_4 j : RightMoves (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) ⊢ moveRight (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (t...
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
simp
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star := by rw [nim_def] refine' ⟨_, _, fun i => _, fun j => _⟩ any_goals dsimp; apply Equiv.equivOfUnique all_goals
Mathlib.SetTheory.Game.Nim.193_0.mmFMhRYSjViKjcP
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star
Mathlib_SetTheory_Game_Nim
case refine'_4 j : RightMoves (mk (Quotient.out 1).α (Quotient.out 1).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) ⊢ nim 0 ≡r 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
exact nimZeroRelabelling
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star := by rw [nim_def] refine' ⟨_, _, fun i => _, fun j => _⟩ any_goals dsimp; apply Equiv.equivOfUnique all_goals simp;
Mathlib.SetTheory.Game.Nim.193_0.mmFMhRYSjViKjcP
/-- `nim 1` has exactly the same moves as `star`. -/ def nimOneRelabelling : nim 1 ≡r star
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} ⊢ birthday (nim o) = o
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
induction' o using Ordinal.induction with o IH
@[simp] theorem nim_birthday (o : Ordinal) : (nim o).birthday = o := by
Mathlib.SetTheory.Game.Nim.205_0.mmFMhRYSjViKjcP
@[simp] theorem nim_birthday (o : Ordinal) : (nim o).birthday = o
Mathlib_SetTheory_Game_Nim
case h o : Ordinal.{u_1} IH : ∀ k < o, birthday (nim k) = k ⊢ birthday (nim o) = o
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [nim_def, birthday_def]
@[simp] theorem nim_birthday (o : Ordinal) : (nim o).birthday = o := by induction' o using Ordinal.induction with o IH
Mathlib.SetTheory.Game.Nim.205_0.mmFMhRYSjViKjcP
@[simp] theorem nim_birthday (o : Ordinal) : (nim o).birthday = o
Mathlib_SetTheory_Game_Nim
case h o : Ordinal.{u_1} IH : ∀ k < o, birthday (nim k) = k ⊢ max (lsub fun i => birthday (moveLeft (mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) i)) (lsub...
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
dsimp
@[simp] theorem nim_birthday (o : Ordinal) : (nim o).birthday = o := by induction' o using Ordinal.induction with o IH rw [nim_def, birthday_def]
Mathlib.SetTheory.Game.Nim.205_0.mmFMhRYSjViKjcP
@[simp] theorem nim_birthday (o : Ordinal) : (nim o).birthday = o
Mathlib_SetTheory_Game_Nim
case h o : Ordinal.{u_1} IH : ∀ k < o, birthday (nim k) = k ⊢ max (lsub fun i => birthday (nim (typein (fun x x_1 => x < x_1) i))) (lsub fun i => birthday (nim (typein (fun x x_1 => x < x_1) i))) = o
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [max_eq_right le_rfl]
@[simp] theorem nim_birthday (o : Ordinal) : (nim o).birthday = o := by induction' o using Ordinal.induction with o IH rw [nim_def, birthday_def] dsimp
Mathlib.SetTheory.Game.Nim.205_0.mmFMhRYSjViKjcP
@[simp] theorem nim_birthday (o : Ordinal) : (nim o).birthday = o
Mathlib_SetTheory_Game_Nim
case h o : Ordinal.{u_1} IH : ∀ k < o, birthday (nim k) = k ⊢ (lsub fun i => birthday (nim (typein (fun x x_1 => x < x_1) i))) = o
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
convert lsub_typein o with i
@[simp] theorem nim_birthday (o : Ordinal) : (nim o).birthday = o := by induction' o using Ordinal.induction with o IH rw [nim_def, birthday_def] dsimp rw [max_eq_right le_rfl]
Mathlib.SetTheory.Game.Nim.205_0.mmFMhRYSjViKjcP
@[simp] theorem nim_birthday (o : Ordinal) : (nim o).birthday = o
Mathlib_SetTheory_Game_Nim
case h.e'_2.h.e'_2.h o : Ordinal.{u_1} IH : ∀ k < o, birthday (nim k) = k i : (Quotient.out o).α ⊢ birthday (nim (typein (fun x x_1 => x < x_1) i)) = typein (fun x x_1 => x < x_1) i
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
exact IH _ (typein_lt_self i)
@[simp] theorem nim_birthday (o : Ordinal) : (nim o).birthday = o := by induction' o using Ordinal.induction with o IH rw [nim_def, birthday_def] dsimp rw [max_eq_right le_rfl] convert lsub_typein o with i
Mathlib.SetTheory.Game.Nim.205_0.mmFMhRYSjViKjcP
@[simp] theorem nim_birthday (o : Ordinal) : (nim o).birthday = o
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} ⊢ -nim o = nim o
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
induction' o using Ordinal.induction with o IH
@[simp] theorem neg_nim (o : Ordinal) : -nim o = nim o := by
Mathlib.SetTheory.Game.Nim.215_0.mmFMhRYSjViKjcP
@[simp] theorem neg_nim (o : Ordinal) : -nim o = nim o
Mathlib_SetTheory_Game_Nim
case h o : Ordinal.{u_1} IH : ∀ k < o, -nim k = nim k ⊢ -nim o = nim o
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [nim_def]
@[simp] theorem neg_nim (o : Ordinal) : -nim o = nim o := by induction' o using Ordinal.induction with o IH
Mathlib.SetTheory.Game.Nim.215_0.mmFMhRYSjViKjcP
@[simp] theorem neg_nim (o : Ordinal) : -nim o = nim o
Mathlib_SetTheory_Game_Nim
case h o : Ordinal.{u_1} IH : ∀ k < o, -nim k = nim k ⊢ (-mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) = mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => ...
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
dsimp
@[simp] theorem neg_nim (o : Ordinal) : -nim o = nim o := by induction' o using Ordinal.induction with o IH rw [nim_def];
Mathlib.SetTheory.Game.Nim.215_0.mmFMhRYSjViKjcP
@[simp] theorem neg_nim (o : Ordinal) : -nim o = nim o
Mathlib_SetTheory_Game_Nim
case h o : Ordinal.{u_1} IH : ∀ k < o, -nim k = nim k ⊢ (mk (Quotient.out o).α (Quotient.out o).α (fun j => -nim (typein (fun x x_1 => x < x_1) j)) fun i => -nim (typein (fun x x_1 => x < x_1) i)) = mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim...
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
congr
@[simp] theorem neg_nim (o : Ordinal) : -nim o = nim o := by induction' o using Ordinal.induction with o IH rw [nim_def]; dsimp;
Mathlib.SetTheory.Game.Nim.215_0.mmFMhRYSjViKjcP
@[simp] theorem neg_nim (o : Ordinal) : -nim o = nim o
Mathlib_SetTheory_Game_Nim
case h.e_a o : Ordinal.{u_1} IH : ∀ k < o, -nim k = nim k ⊢ (fun j => -nim (typein (fun x x_1 => x < x_1) j)) = fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
funext i
@[simp] theorem neg_nim (o : Ordinal) : -nim o = nim o := by induction' o using Ordinal.induction with o IH rw [nim_def]; dsimp; congr <;>
Mathlib.SetTheory.Game.Nim.215_0.mmFMhRYSjViKjcP
@[simp] theorem neg_nim (o : Ordinal) : -nim o = nim o
Mathlib_SetTheory_Game_Nim
case h.e_a o : Ordinal.{u_1} IH : ∀ k < o, -nim k = nim k ⊢ (fun i => -nim (typein (fun x x_1 => x < x_1) i)) = fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
funext i
@[simp] theorem neg_nim (o : Ordinal) : -nim o = nim o := by induction' o using Ordinal.induction with o IH rw [nim_def]; dsimp; congr <;>
Mathlib.SetTheory.Game.Nim.215_0.mmFMhRYSjViKjcP
@[simp] theorem neg_nim (o : Ordinal) : -nim o = nim o
Mathlib_SetTheory_Game_Nim
case h.e_a.h o : Ordinal.{u_1} IH : ∀ k < o, -nim k = nim k i : (Quotient.out o).α ⊢ -nim (typein (fun x x_1 => x < x_1) i) = nim (typein (fun x x_1 => x < x_1) i)
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
exact IH _ (Ordinal.typein_lt_self i)
@[simp] theorem neg_nim (o : Ordinal) : -nim o = nim o := by induction' o using Ordinal.induction with o IH rw [nim_def]; dsimp; congr <;> funext i <;>
Mathlib.SetTheory.Game.Nim.215_0.mmFMhRYSjViKjcP
@[simp] theorem neg_nim (o : Ordinal) : -nim o = nim o
Mathlib_SetTheory_Game_Nim
case h.e_a.h o : Ordinal.{u_1} IH : ∀ k < o, -nim k = nim k i : (Quotient.out o).α ⊢ -nim (typein (fun x x_1 => x < x_1) i) = nim (typein (fun x x_1 => x < x_1) i)
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
exact IH _ (Ordinal.typein_lt_self i)
@[simp] theorem neg_nim (o : Ordinal) : -nim o = nim o := by induction' o using Ordinal.induction with o IH rw [nim_def]; dsimp; congr <;> funext i <;>
Mathlib.SetTheory.Game.Nim.215_0.mmFMhRYSjViKjcP
@[simp] theorem neg_nim (o : Ordinal) : -nim o = nim o
Mathlib_SetTheory_Game_Nim
o : Ordinal.{?u.34699} ⊢ Impartial (nim o)
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
induction' o using Ordinal.induction with o IH
instance nim_impartial (o : Ordinal) : Impartial (nim o) := by
Mathlib.SetTheory.Game.Nim.221_0.mmFMhRYSjViKjcP
instance nim_impartial (o : Ordinal) : Impartial (nim o)
Mathlib_SetTheory_Game_Nim
case h o : Ordinal.{?u.34717} IH : ∀ k < o, Impartial (nim k) ⊢ Impartial (nim o)
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [impartial_def, neg_nim]
instance nim_impartial (o : Ordinal) : Impartial (nim o) := by induction' o using Ordinal.induction with o IH
Mathlib.SetTheory.Game.Nim.221_0.mmFMhRYSjViKjcP
instance nim_impartial (o : Ordinal) : Impartial (nim o)
Mathlib_SetTheory_Game_Nim
case h o : Ordinal.{?u.34717} IH : ∀ k < o, Impartial (nim k) ⊢ nim o ≈ nim o ∧ (∀ (i : LeftMoves (nim o)), Impartial (moveLeft (nim o) i)) ∧ ∀ (j : RightMoves (nim o)), Impartial (moveRight (nim o) j)
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
refine' ⟨equiv_rfl, fun i => _, fun i => _⟩
instance nim_impartial (o : Ordinal) : Impartial (nim o) := by induction' o using Ordinal.induction with o IH rw [impartial_def, neg_nim]
Mathlib.SetTheory.Game.Nim.221_0.mmFMhRYSjViKjcP
instance nim_impartial (o : Ordinal) : Impartial (nim o)
Mathlib_SetTheory_Game_Nim
case h.refine'_1 o : Ordinal.{?u.34717} IH : ∀ k < o, Impartial (nim k) i : LeftMoves (nim o) ⊢ Impartial (moveLeft (nim o) i)
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
simpa using IH _ (typein_lt_self _)
instance nim_impartial (o : Ordinal) : Impartial (nim o) := by induction' o using Ordinal.induction with o IH rw [impartial_def, neg_nim] refine' ⟨equiv_rfl, fun i => _, fun i => _⟩ <;>
Mathlib.SetTheory.Game.Nim.221_0.mmFMhRYSjViKjcP
instance nim_impartial (o : Ordinal) : Impartial (nim o)
Mathlib_SetTheory_Game_Nim
case h.refine'_2 o : Ordinal.{?u.35327} IH : ∀ k < o, Impartial (nim k) i : RightMoves (nim o) ⊢ Impartial (moveRight (nim o) i)
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
simpa using IH _ (typein_lt_self _)
instance nim_impartial (o : Ordinal) : Impartial (nim o) := by induction' o using Ordinal.induction with o IH rw [impartial_def, neg_nim] refine' ⟨equiv_rfl, fun i => _, fun i => _⟩ <;>
Mathlib.SetTheory.Game.Nim.221_0.mmFMhRYSjViKjcP
instance nim_impartial (o : Ordinal) : Impartial (nim o)
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} ho : o ≠ 0 ⊢ nim o ‖ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [Impartial.fuzzy_zero_iff_lf, nim_def, lf_zero_le]
theorem nim_fuzzy_zero_of_ne_zero {o : Ordinal} (ho : o ≠ 0) : nim o ‖ 0 := by
Mathlib.SetTheory.Game.Nim.227_0.mmFMhRYSjViKjcP
theorem nim_fuzzy_zero_of_ne_zero {o : Ordinal} (ho : o ≠ 0) : nim o ‖ 0
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} ho : o ≠ 0 ⊢ ∃ j, moveRight (mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) j ≤ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [← Ordinal.pos_iff_ne_zero] at ho
theorem nim_fuzzy_zero_of_ne_zero {o : Ordinal} (ho : o ≠ 0) : nim o ‖ 0 := by rw [Impartial.fuzzy_zero_iff_lf, nim_def, lf_zero_le]
Mathlib.SetTheory.Game.Nim.227_0.mmFMhRYSjViKjcP
theorem nim_fuzzy_zero_of_ne_zero {o : Ordinal} (ho : o ≠ 0) : nim o ‖ 0
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} ho : 0 < o ⊢ ∃ j, moveRight (mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) j ≤ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
exact ⟨(Ordinal.principalSegOut ho).top, by simp⟩
theorem nim_fuzzy_zero_of_ne_zero {o : Ordinal} (ho : o ≠ 0) : nim o ‖ 0 := by rw [Impartial.fuzzy_zero_iff_lf, nim_def, lf_zero_le] rw [← Ordinal.pos_iff_ne_zero] at ho
Mathlib.SetTheory.Game.Nim.227_0.mmFMhRYSjViKjcP
theorem nim_fuzzy_zero_of_ne_zero {o : Ordinal} (ho : o ≠ 0) : nim o ‖ 0
Mathlib_SetTheory_Game_Nim
o : Ordinal.{u_1} ho : 0 < o ⊢ moveRight (mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) (principalSegOut ho).top ≤ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
simp
theorem nim_fuzzy_zero_of_ne_zero {o : Ordinal} (ho : o ≠ 0) : nim o ‖ 0 := by rw [Impartial.fuzzy_zero_iff_lf, nim_def, lf_zero_le] rw [← Ordinal.pos_iff_ne_zero] at ho exact ⟨(Ordinal.principalSegOut ho).top, by
Mathlib.SetTheory.Game.Nim.227_0.mmFMhRYSjViKjcP
theorem nim_fuzzy_zero_of_ne_zero {o : Ordinal} (ho : o ≠ 0) : nim o ‖ 0
Mathlib_SetTheory_Game_Nim
o₁ o₂ : Ordinal.{u_1} ⊢ nim o₁ + nim o₂ ≈ 0 ↔ o₁ = o₂
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
constructor
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂ := by
Mathlib.SetTheory.Game.Nim.233_0.mmFMhRYSjViKjcP
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂
Mathlib_SetTheory_Game_Nim
case mp o₁ o₂ : Ordinal.{u_1} ⊢ nim o₁ + nim o₂ ≈ 0 → o₁ = o₂
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
refine' not_imp_not.1 fun hne : _ ≠ _ => (Impartial.not_equiv_zero_iff (nim o₁ + nim o₂)).2 _
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂ := by constructor ·
Mathlib.SetTheory.Game.Nim.233_0.mmFMhRYSjViKjcP
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂
Mathlib_SetTheory_Game_Nim
case mp o₁ o₂ : Ordinal.{u_1} hne : o₁ ≠ o₂ ⊢ nim o₁ + nim o₂ ‖ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
wlog h : o₁ < o₂
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂ := by constructor · refine' not_imp_not.1 fun hne : _ ≠ _ => (Impartial.not_equiv_zero_iff (nim o₁ + nim o₂)).2 _
Mathlib.SetTheory.Game.Nim.233_0.mmFMhRYSjViKjcP
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂
Mathlib_SetTheory_Game_Nim
case mp.inr o₁ o₂ : Ordinal.{u_1} hne : o₁ ≠ o₂ this : ∀ (o₁ o₂ : Ordinal.{u_1}), o₁ ≠ o₂ → o₁ < o₂ → nim o₁ + nim o₂ ‖ 0 h : ¬o₁ < o₂ ⊢ nim o₁ + nim o₂ ‖ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
exact (fuzzy_congr_left add_comm_equiv).1 (this _ _ hne.symm (hne.lt_or_lt.resolve_left h))
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂ := by constructor · refine' not_imp_not.1 fun hne : _ ≠ _ => (Impartial.not_equiv_zero_iff (nim o₁ + nim o₂)).2 _ wlog h : o₁ < o₂ ·
Mathlib.SetTheory.Game.Nim.233_0.mmFMhRYSjViKjcP
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂
Mathlib_SetTheory_Game_Nim
o₁ o₂ : Ordinal.{u_1} hne : o₁ ≠ o₂ h : o₁ < o₂ ⊢ nim o₁ + nim o₂ ‖ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [Impartial.fuzzy_zero_iff_gf, zero_lf_le, nim_def o₂]
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂ := by constructor · refine' not_imp_not.1 fun hne : _ ≠ _ => (Impartial.not_equiv_zero_iff (nim o₁ + nim o₂)).2 _ wlog h : o₁ < o₂ · exact (fuzzy_congr_left add_comm_equiv).1 (this _ _ hne.symm (hne.lt_or_lt.resolve_l...
Mathlib.SetTheory.Game.Nim.233_0.mmFMhRYSjViKjcP
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂
Mathlib_SetTheory_Game_Nim
o₁ o₂ : Ordinal.{u_1} hne : o₁ ≠ o₂ h : o₁ < o₂ ⊢ ∃ i, 0 ≤ moveLeft (nim o₁ + mk (Quotient.out o₂).α (Quotient.out o₂).α (fun o₂_1 => nim (typein (fun x x_1 => x < x_1) o₂_1)) fun o₂_1 => nim (typein (fun x x_1 => x < x_1) o₂_1)) i
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
refine' ⟨toLeftMovesAdd (Sum.inr _), _⟩
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂ := by constructor · refine' not_imp_not.1 fun hne : _ ≠ _ => (Impartial.not_equiv_zero_iff (nim o₁ + nim o₂)).2 _ wlog h : o₁ < o₂ · exact (fuzzy_congr_left add_comm_equiv).1 (this _ _ hne.symm (hne.lt_or_lt.resolve_l...
Mathlib.SetTheory.Game.Nim.233_0.mmFMhRYSjViKjcP
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂
Mathlib_SetTheory_Game_Nim
case refine'_1 o₁ o₂ : Ordinal.{u_1} hne : o₁ ≠ o₂ h : o₁ < o₂ ⊢ LeftMoves (mk (Quotient.out o₂).α (Quotient.out o₂).α (fun o₂_1 => nim (typein (fun x x_1 => x < x_1) o₂_1)) fun o₂_1 => nim (typein (fun x x_1 => x < x_1) o₂_1))
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
exact (Ordinal.principalSegOut h).top
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂ := by constructor · refine' not_imp_not.1 fun hne : _ ≠ _ => (Impartial.not_equiv_zero_iff (nim o₁ + nim o₂)).2 _ wlog h : o₁ < o₂ · exact (fuzzy_congr_left add_comm_equiv).1 (this _ _ hne.symm (hne.lt_or_lt.resolve_l...
Mathlib.SetTheory.Game.Nim.233_0.mmFMhRYSjViKjcP
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂
Mathlib_SetTheory_Game_Nim
case refine'_2 o₁ o₂ : Ordinal.{u_1} hne : o₁ ≠ o₂ h : o₁ < o₂ ⊢ 0 ≤ moveLeft (nim o₁ + mk (Quotient.out o₂).α (Quotient.out o₂).α (fun o₂_1 => nim (typein (fun x x_1 => x < x_1) o₂_1)) fun o₂_1 => nim (typein (fun x x_1 => x < x_1) o₂_1)) (toLeftMovesAdd (Sum.inr (principalSegOut h).t...
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
simpa only [Ordinal.typein_top, Ordinal.type_lt, PGame.add_moveLeft_inr, PGame.moveLeft_mk] using (Impartial.add_self (nim o₁)).2
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂ := by constructor · refine' not_imp_not.1 fun hne : _ ≠ _ => (Impartial.not_equiv_zero_iff (nim o₁ + nim o₂)).2 _ wlog h : o₁ < o₂ · exact (fuzzy_congr_left add_comm_equiv).1 (this _ _ hne.symm (hne.lt_or_lt.resolve_l...
Mathlib.SetTheory.Game.Nim.233_0.mmFMhRYSjViKjcP
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂
Mathlib_SetTheory_Game_Nim
case mpr o₁ o₂ : Ordinal.{u_1} ⊢ o₁ = o₂ → nim o₁ + nim o₂ ≈ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rintro rfl
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂ := by constructor · refine' not_imp_not.1 fun hne : _ ≠ _ => (Impartial.not_equiv_zero_iff (nim o₁ + nim o₂)).2 _ wlog h : o₁ < o₂ · exact (fuzzy_congr_left add_comm_equiv).1 (this _ _ hne.symm (hne.lt_or_lt.resolve_l...
Mathlib.SetTheory.Game.Nim.233_0.mmFMhRYSjViKjcP
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂
Mathlib_SetTheory_Game_Nim
case mpr o₁ : Ordinal.{u_1} ⊢ nim o₁ + nim o₁ ≈ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
exact Impartial.add_self (nim o₁)
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂ := by constructor · refine' not_imp_not.1 fun hne : _ ≠ _ => (Impartial.not_equiv_zero_iff (nim o₁ + nim o₂)).2 _ wlog h : o₁ < o₂ · exact (fuzzy_congr_left add_comm_equiv).1 (this _ _ hne.symm (hne.lt_or_lt.resolve_l...
Mathlib.SetTheory.Game.Nim.233_0.mmFMhRYSjViKjcP
@[simp] theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂
Mathlib_SetTheory_Game_Nim
o₁ o₂ : Ordinal.{u_1} ⊢ nim o₁ + nim o₂ ‖ 0 ↔ o₁ ≠ o₂
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [iff_not_comm, Impartial.not_fuzzy_zero_iff, nim_add_equiv_zero_iff]
@[simp] theorem nim_add_fuzzy_zero_iff {o₁ o₂ : Ordinal} : nim o₁ + nim o₂ ‖ 0 ↔ o₁ ≠ o₂ := by
Mathlib.SetTheory.Game.Nim.249_0.mmFMhRYSjViKjcP
@[simp] theorem nim_add_fuzzy_zero_iff {o₁ o₂ : Ordinal} : nim o₁ + nim o₂ ‖ 0 ↔ o₁ ≠ o₂
Mathlib_SetTheory_Game_Nim
o₁ o₂ : Ordinal.{u_1} ⊢ nim o₁ ≈ nim o₂ ↔ o₁ = o₂
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [Impartial.equiv_iff_add_equiv_zero, nim_add_equiv_zero_iff]
@[simp] theorem nim_equiv_iff_eq {o₁ o₂ : Ordinal} : (nim o₁ ≈ nim o₂) ↔ o₁ = o₂ := by
Mathlib.SetTheory.Game.Nim.254_0.mmFMhRYSjViKjcP
@[simp] theorem nim_equiv_iff_eq {o₁ o₂ : Ordinal} : (nim o₁ ≈ nim o₂) ↔ o₁ = o₂
Mathlib_SetTheory_Game_Nim
x✝ : PGame G : PGame := x✝ i : LeftMoves G ⊢ (invImage (fun a => a) instWellFoundedRelationPGame).1 (moveLeft G i) x✝
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
pgame_wf_tac
/-- The Grundy value of an impartial game, the ordinal which corresponds to the game of nim that the game is equivalent to -/ noncomputable def grundyValue : ∀ _ : PGame.{u}, Ordinal.{u} | G => Ordinal.mex.{u, u} fun i => grundyValue (G.moveLeft i) termination_by grundyValue G => G decreasing_by
Mathlib.SetTheory.Game.Nim.259_0.mmFMhRYSjViKjcP
/-- The Grundy value of an impartial game, the ordinal which corresponds to the game of nim that the game is equivalent to -/ noncomputable def grundyValue : ∀ _ : PGame.{u}, Ordinal.{u} | G => Ordinal.mex.{u, u} fun i => grundyValue (G.moveLeft i) termination_by grundyValue G => G decreasing_by pgame_wf_tac
Mathlib_SetTheory_Game_Nim
G : PGame ⊢ grundyValue G = mex fun i => grundyValue (moveLeft G i)
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [grundyValue]
theorem grundyValue_eq_mex_left (G : PGame) : grundyValue G = Ordinal.mex.{u, u} fun i => grundyValue (G.moveLeft i) := by
Mathlib.SetTheory.Game.Nim.267_0.mmFMhRYSjViKjcP
theorem grundyValue_eq_mex_left (G : PGame) : grundyValue G = Ordinal.mex.{u, u} fun i => grundyValue (G.moveLeft i)
Mathlib_SetTheory_Game_Nim
x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ ⊢ x✝ ≈ nim (grundyValue x✝)
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [Impartial.equiv_iff_add_equiv_zero, ← Impartial.forall_leftMoves_fuzzy_iff_equiv_zero]
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ ⊢ ∀ (i : LeftMoves (x✝ + nim (grundyValue x✝))), moveLeft (x✝ + nim (grundyValue x✝)) i ‖ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
intro i
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ i : LeftMoves (x✝ + nim (grundyValue x✝)) ⊢ moveLeft (x✝ + nim (grundyValue x✝)) i ‖ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
apply leftMoves_add_cases i
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
case hl x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ i : LeftMoves (x✝ + nim (grundyValue x✝)) ⊢ ∀ (i : LeftMoves x✝), moveLeft (x✝ + nim (grundyValue x✝)) (toLeftMovesAdd (Sum.inl i)) ‖ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
intro i₁
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
case hl x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ i : LeftMoves (x✝ + nim (grundyValue x✝)) i₁ : LeftMoves x✝ ⊢ moveLeft (x✝ + nim (grundyValue x✝)) (toLeftMovesAdd (Sum.inl i₁)) ‖ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [add_moveLeft_inl]
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
case hl x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ i : LeftMoves (x✝ + nim (grundyValue x✝)) i₁ : LeftMoves x✝ ⊢ moveLeft x✝ i₁ + nim (grundyValue x✝) ‖ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
apply (fuzzy_congr_left (add_congr_left (Equiv.symm (equiv_nim_grundyValue (G.moveLeft i₁))))).1
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
case hl x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ i : LeftMoves (x✝ + nim (grundyValue x✝)) i₁ : LeftMoves x✝ ⊢ nim (grundyValue (moveLeft G i₁)) + nim (grundyValue x✝) ‖ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [nim_add_fuzzy_zero_iff]
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
case hl x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ i : LeftMoves (x✝ + nim (grundyValue x✝)) i₁ : LeftMoves x✝ ⊢ grundyValue (moveLeft G i₁) ≠ grundyValue x✝
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
intro heq
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
case hl x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ i : LeftMoves (x✝ + nim (grundyValue x✝)) i₁ : LeftMoves x✝ heq : grundyValue (moveLeft G i₁) = grundyValue x✝ ⊢ False
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [eq_comm, grundyValue_eq_mex_left G] at heq
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
case hl x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ i : LeftMoves (x✝ + nim (grundyValue x✝)) i₁ : LeftMoves x✝ heq : (mex fun i => grundyValue (moveLeft G i)) = grundyValue (moveLeft G i₁) ⊢ False
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
have h := Ordinal.ne_mex.{u, u} (fun i ↦ grundyValue (moveLeft G i))
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
case hl x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ i : LeftMoves (x✝ + nim (grundyValue x✝)) i₁ : LeftMoves x✝ heq : (mex fun i => grundyValue (moveLeft G i)) = grundyValue (moveLeft G i₁) h : ∀ (i : LeftMoves G), grundyValue (moveLeft G i) ≠ mex fun i => grundyValue (moveLeft G i) ⊢ False
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [heq] at h
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
case hl x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ i : LeftMoves (x✝ + nim (grundyValue x✝)) i₁ : LeftMoves x✝ heq : (mex fun i => grundyValue (moveLeft G i)) = grundyValue (moveLeft G i₁) h : ∀ (i : LeftMoves G), grundyValue (moveLeft G i) ≠ grundyValue (moveLeft G i₁) ⊢ False
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
exact (h i₁).irrefl
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
case hr x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ i : LeftMoves (x✝ + nim (grundyValue x✝)) ⊢ ∀ (i : LeftMoves (nim (grundyValue x✝))), moveLeft (x✝ + nim (grundyValue x✝)) (toLeftMovesAdd (Sum.inr i)) ‖ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
intro i₂
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
case hr x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ i : LeftMoves (x✝ + nim (grundyValue x✝)) i₂ : LeftMoves (nim (grundyValue x✝)) ⊢ moveLeft (x✝ + nim (grundyValue x✝)) (toLeftMovesAdd (Sum.inr i₂)) ‖ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [add_moveLeft_inr, ← Impartial.exists_left_move_equiv_iff_fuzzy_zero]
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
case hr x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ i : LeftMoves (x✝ + nim (grundyValue x✝)) i₂ : LeftMoves (nim (grundyValue x✝)) ⊢ ∃ i, moveLeft (x✝ + moveLeft (nim (grundyValue x✝)) i₂) i ≈ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
revert i₂
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
case hr x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ i : LeftMoves (x✝ + nim (grundyValue x✝)) ⊢ ∀ (i₂ : LeftMoves (nim (grundyValue x✝))), ∃ i, moveLeft (x✝ + moveLeft (nim (grundyValue x✝)) i₂) i ≈ 0
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
rw [nim_def]
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
case hr x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ i : LeftMoves (x✝ + nim (grundyValue x✝)) ⊢ ∀ (i₂ : LeftMoves (mk (Quotient.out (grundyValue x✝)).α (Quotient.out (grundyValue x✝)).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂))),...
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
intro i₂
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim
case hr x✝ : PGame inst✝ : Impartial x✝ G : PGame := x✝ i : LeftMoves (x✝ + nim (grundyValue x✝)) i₂ : LeftMoves (mk (Quotient.out (grundyValue x✝)).α (Quotient.out (grundyValue x✝)).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) ⊢ ∃ i, moveLeft ...
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Markus Himmel -/ import Mathlib.Data.Nat.Bitwise import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Game.Impartial #align_import set_theory.game.nim from "leanp...
have h' : ∃ i : G.LeftMoves, grundyValue (G.moveLeft i) = Ordinal.typein (Quotient.out (grundyValue G)).r i₂ := by revert i₂ rw [grundyValue_eq_mex_left] intro i₂ have hnotin : _ ∉ _ := fun hin => (le_not_le_of_lt (Ordinal.typein_lt_self i₂)).2 (csInf_le' hin)...
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib.SetTheory.Game.Nim.271_0.mmFMhRYSjViKjcP
/-- 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 -/ theorem equiv_nim_grundyValue : ∀ (G : PGame.{u}) [G.Impartial], G ≈ nim (grundyValue G) | G => by rw [Impartial.equiv_iff_add_equiv_zero, ← Impa...
Mathlib_SetTheory_Game_Nim