File: Mathlib/SetTheory/Game/Domineering.lean

full_name: SetTheory.PGame.Domineering.shiftUp
code: /-- The equivalence `(x, y) ↦ (x, y+1)`. -/
@[simps!]
def shiftUp : ℤ × ℤ ≃ ℤ × ℤ 
goal: ℤ × ℤ ≃ ℤ × ℤ

full_name: SetTheory.PGame.Domineering.shiftUp_apply
code: /-- The equivalence `(x, y) ↦ (x, y+1)`. -/
@[simps!]
def shiftUp : ℤ × ℤ ≃ ℤ × ℤ 
goal: ∀ (a : ℤ × ℤ), SetTheory.PGame.Domineering.shiftUp a = Prod.map id (fun x => x + 1) a

full_name: SetTheory.PGame.Domineering.shiftUp_symm_apply
code: /-- The equivalence `(x, y) ↦ (x, y+1)`. -/
@[simps!]
def shiftUp : ℤ × ℤ ≃ ℤ × ℤ 
goal: ∀ (a : ℤ × ℤ), SetTheory.PGame.Domineering.shiftUp.symm a = Prod.map id (fun x => x + -1) a

full_name: SetTheory.PGame.Domineering.shiftRight
code: /-- The equivalence `(x, y) ↦ (x+1, y)`. -/
@[simps!]
def shiftRight : ℤ × ℤ ≃ ℤ × ℤ 
goal: ℤ × ℤ ≃ ℤ × ℤ

full_name: SetTheory.PGame.Domineering.shiftRight_symm_apply
code: /-- The equivalence `(x, y) ↦ (x+1, y)`. -/
@[simps!]
def shiftRight : ℤ × ℤ ≃ ℤ × ℤ 
goal: ∀ (a : ℤ × ℤ), SetTheory.PGame.Domineering.shiftRight.symm a = Prod.map (fun x => x + -1) id a

full_name: SetTheory.PGame.Domineering.shiftRight_apply
code: /-- The equivalence `(x, y) ↦ (x+1, y)`. -/
@[simps!]
def shiftRight : ℤ × ℤ ≃ ℤ × ℤ 
goal: ∀ (a : ℤ × ℤ), SetTheory.PGame.Domineering.shiftRight a = Prod.map (fun x => x + 1) id a

full_name: SetTheory.PGame.Domineering.Board
code: /-- A Domineering board is an arbitrary finite subset of `ℤ × ℤ`. -/
-- Porting note: reducibility cannot be `local`. For now there are no dependents of this file so
-- being globally reducible is fine.
abbrev Board 
goal: Type

full_name: SetTheory.PGame.Domineering.left
code: /-- Left can play anywhere that a square and the square below it are open. -/
def left (b : Board) : Finset (ℤ × ℤ) 
goal: Finset (ℤ × ℤ)

full_name: SetTheory.PGame.Domineering.right
code: /-- Right can play anywhere that a square and the square to the left are open. -/
def right (b : Board) : Finset (ℤ × ℤ) 
goal: Finset (ℤ × ℤ)

full_name: SetTheory.PGame.Domineering.mem_left
code: theorem mem_left {b : Board} (x : ℤ × ℤ) : x ∈ left b ↔ x ∈ b ∧ (x.1, x.2 - 1) ∈ b 
goal: x ∈ SetTheory.PGame.Domineering.left b ↔ x ∈ b ∧ (x.1, x.2 - 1) ∈ b

full_name: SetTheory.PGame.Domineering.mem_right
code: theorem mem_right {b : Board} (x : ℤ × ℤ) : x ∈ right b ↔ x ∈ b ∧ (x.1 - 1, x.2) ∈ b 
goal: x ∈ SetTheory.PGame.Domineering.right b ↔ x ∈ b ∧ (x.1 - 1, x.2) ∈ b

full_name: SetTheory.PGame.Domineering.moveLeft
code: /-- After Left moves, two vertically adjacent squares are removed from the board. -/
def moveLeft (b : Board) (m : ℤ × ℤ) : Board 
goal: SetTheory.PGame.Domineering.Board

full_name: SetTheory.PGame.Domineering.moveRight
code: /-- After Left moves, two horizontally adjacent squares are removed from the board. -/
def moveRight (b : Board) (m : ℤ × ℤ) : Board 
goal: SetTheory.PGame.Domineering.Board

full_name: SetTheory.PGame.Domineering.fst_pred_mem_erase_of_mem_right
code: theorem fst_pred_mem_erase_of_mem_right {b : Board} {m : ℤ × ℤ} (h : m ∈ right b) :
    (m.1 - 1, m.2) ∈ b.erase m 
goal: (m.1 - 1, m.2) ∈ Finset.erase b m

full_name: SetTheory.PGame.Domineering.snd_pred_mem_erase_of_mem_left
code: theorem snd_pred_mem_erase_of_mem_left {b : Board} {m : ℤ × ℤ} (h : m ∈ left b) :
    (m.1, m.2 - 1) ∈ b.erase m 
goal: (m.1, m.2 - 1) ∈ Finset.erase b m

full_name: SetTheory.PGame.Domineering.card_of_mem_left
code: theorem card_of_mem_left {b : Board} {m : ℤ × ℤ} (h : m ∈ left b) : 2 ≤ Finset.card b 
goal: 2 ≤ Finset.card b

full_name: SetTheory.PGame.Domineering.card_of_mem_right
code: theorem card_of_mem_right {b : Board} {m : ℤ × ℤ} (h : m ∈ right b) : 2 ≤ Finset.card b 
goal: 2 ≤ Finset.card b

full_name: SetTheory.PGame.Domineering.moveLeft_card
code: theorem moveLeft_card {b : Board} {m : ℤ × ℤ} (h : m ∈ left b) :
    Finset.card (moveLeft b m) + 2 = Finset.card b 
goal: Finset.card (SetTheory.PGame.Domineering.moveLeft b m) + 2 = Finset.card b

full_name: SetTheory.PGame.Domineering.moveRight_card
code: theorem moveRight_card {b : Board} {m : ℤ × ℤ} (h : m ∈ right b) :
    Finset.card (moveRight b m) + 2 = Finset.card b 
goal: Finset.card (SetTheory.PGame.Domineering.moveRight b m) + 2 = Finset.card b

full_name: SetTheory.PGame.Domineering.moveLeft_smaller
code: theorem moveLeft_smaller {b : Board} {m : ℤ × ℤ} (h : m ∈ left b) :
    Finset.card (moveLeft b m) / 2 < Finset.card b / 2 
goal: Finset.card (SetTheory.PGame.Domineering.moveLeft b m) / 2 < Finset.card b / 2

full_name: SetTheory.PGame.Domineering.moveRight_smaller
code: theorem moveRight_smaller {b : Board} {m : ℤ × ℤ} (h : m ∈ right b) :
    Finset.card (moveRight b m) / 2 < Finset.card b / 2 
goal: Finset.card (SetTheory.PGame.Domineering.moveRight b m) / 2 < Finset.card b / 2

full_name: SetTheory.PGame.Domineering.state
code: /-- The instance describing allowed moves on a Domineering board. -/
instance state : State Board 
goal: SetTheory.PGame.State SetTheory.PGame.Domineering.Board

full_name: SetTheory.PGame.domineering
code: /-- Construct a pre-game from a Domineering board. -/
def domineering (b : Domineering.Board) : PGame 
goal: SetTheory.PGame

full_name: SetTheory.PGame.shortDomineering
code: /-- All games of Domineering are short, because each move removes two squares. -/
instance shortDomineering (b : Domineering.Board) : Short (domineering b) 
goal: (SetTheory.PGame.domineering b).Short

full_name: SetTheory.PGame.domineering.one
code: /-- The Domineering board with two squares arranged vertically, in which Left has the only move. -/
def domineering.one 
goal: SetTheory.PGame

full_name: SetTheory.PGame.domineering.L
code: /-- The `L` shaped Domineering board, in which Left is exactly half a move ahead. -/
def domineering.L 
goal: SetTheory.PGame

full_name: SetTheory.PGame.shortOne
code: instance shortOne : Short domineering.one 
goal: SetTheory.PGame.domineering.one.Short

full_name: SetTheory.PGame.shortL
code: instance shortL : Short domineering.L 
goal: SetTheory.PGame.domineering.L.Short