Misere combinatorial games.
The immediate-option relation determined by a raw move function.
Equations
- MisereGames.Moves.IsOption' moves x y = (x ∈ ⋃ (p : MisereGames.Player), moves p y)
Instances For
A type with Left and Right moves and a well-founded option relation.
The positions reachable by a move for a player.
- isOption'_wf : WellFounded (IsOption' moves)
The option relation generated by
movesis well-founded.
Instances
A type of combinatorial game forms with negation, addition, and set construction.
- ofSets (st : Player → Set G) (h : True) [Small.{v, v + 1} ↑(st Player.left)] [Small.{v, v + 1} ↑(st Player.right)] : G
- neg : G → G
- add : G → G → G
- moves_ofSets' (p : Player) (st : Player → Set G) [Small.{v, v + 1} ↑(st Player.left)] [Small.{v, v + 1} ↑(st Player.right)] : moves p !{st} = st p
- ofSets_inj'' {st₁ st₂ : Player → Set G} [Small.{v, v + 1} ↑(st₁ Player.left)] [Small.{v, v + 1} ↑(st₁ Player.right)] [Small.{v, v + 1} ↑(st₂ Player.left)] [Small.{v, v + 1} ↑(st₂ Player.right)] : !{st₁} = !{st₂} ↔ st₁ = st₂
Positions that behave like ends for a player in the ambient form type.
- ofSets_isEndLike_iff' (p : Player) (s t : Set G) [Small.{v, v + 1} ↑s] [Small.{v, v + 1} ↑t] : IsEndLike p !{s | t} ↔ moves p !{s | t} = ∅
- ofSets_add_ofSets'' (s₁ t₁ s₂ t₂ : Set G) [Small.{v, v + 1} ↑s₁] [Small.{v, v + 1} ↑t₁] [Small.{v, v + 1} ↑s₂] [Small.{v, v + 1} ↑t₂] : !{s₁ | t₁} + !{s₂ | t₂} = !{(fun (x : G) => x + !{s₂ | t₂}) '' s₁ ∪ (fun (x : G) => !{s₁ | t₁} + x) '' s₂ | (fun (x : G) => x + !{s₂ | t₂}) '' t₁ ∪ (fun (x : G) => !{s₁ | t₁} + x) '' t₂}
- ofSets_moves_of_not_isEndLike' (g : G) [Small.{v, v + 1} ↑(moves Player.left g)] [Small.{v, v + 1} ↑(moves Player.right g)] (h : ∀ (p : Player), ¬IsEndLike p g) : !{fun (p : Player) => moves p g} = g
Instances
A proper subposition is an element of the transitive closure of IsOption.
Note that this is not the reflexive-transitive closure! While it is common to
say that $G$ is a subposition of $G$ in the literature, here Subposition
refers to a proper subposition.
Instances For
Equations
- MisereGames.Moves.instWellFoundedRelation = { rel := MisereGames.Moves.Subposition, wf := ⋯ }
Solve routine well-foundedness goals generated by recursive form definitions.
Equations
- MisereGames.Moves.formWf = Lean.ParserDescr.node `MisereGames.Moves.formWf 1024 (Lean.ParserDescr.nonReservedSymbol "form_wf" false)
Instances For
A position is an end for p when p has no legal move.
Equations
- MisereGames.Form.IsEnd p g = (MisereGames.Moves.moves p g = ∅)
Instances For
Equations
- MisereGames.Form.instZero = { zero := !{fun (x : MisereGames.Player) => ∅} }
A form is zero-like if it is both a Left and a Right end, just like 0.
Equations
- MisereGames.Form.IsZeroLike g = ∀ (p : MisereGames.Player), MisereGames.Form.IsEnd p g
Instances For
Equations
- MisereGames.Form.instNegZeroClass = { toZero := MisereGames.Form.instZero, toNeg := g_form.toNeg, neg_zero := ⋯ }
Equations
- MisereGames.Form.instInhabited = { default := 0 }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- MisereGames.Form.instIntCast = { intCast := fun (x : ℤ) => match x with | Int.ofNat n => ↑n | Int.negSucc n => -(↑n + 1) }
Every Left option of an integer is equal to a smaller integer.
Equations
- One or more equations did not get rendered due to their size.