Documentation

CombinatorialGames.Ruleset.Hackenbush.Uproot

Uproot Hackenbush #

Uproot Hackenbush is played on the same positions as Hackenbush (a graph with a ground vertex, blue/red/green edges, no green edge touching the ground). Besides the usual move of cutting an edge of your own colour or a green edge, a player may uproot: delete a ground edge of the opponent's colour, provided the position has at least two ground edges. Everything disconnected from the ground falls away as usual.

Uproot is a sacrifice: it spends a move to remove one of the opponent's obligations. The proviso guarantees an uproot never empties the position; without it a single red ground edge would force Left to move to 0 and lose. Since the proviso reads the whole position, a disjunctive sum of two positions is not a position, so the class of positions is not closed under addition and the stride result is proved by GameForm.hasStride_of_options rather than via ordinal sums.

Under misère play the strides of a position are its ground counts, exactly as in Hackenbush (hasStride_groundCount), so uprooting never changes an outcome (misereOutcome_eq_hackenbush) and the misère quotient is ℤ. Two bare blue ground edges form {1 | 1}: the player with no obligations is forced to uproot, lowering the opponent's stride, which is why the stride definition compares the best move against the opponent's stride candidate.

The ground edges of a position, of either colour.

Equations
Instances For
    def Hackenbush.Uproot.CanRemove {V : Type} (hack : Hackenbush V) (p : Player) (e : Sym2 V) :

    Player p may delete e: it is not of the opponent's colour, or it is a ground edge and at least two ground edges exist.

    Equations
    Instances For
      theorem Hackenbush.Uproot.canRemove_of_ne {V : Type} {hack : Hackenbush V} {p : Player} {e : Sym2 V} (hc : hack.coloring e ≠ Color.ofPlayer (-p)) :
      CanRemove hack p e
      theorem Hackenbush.Uproot.canRemove_of_eq {V : Type} {hack : Hackenbush V} {p : Player} {e : Sym2 V} (hc : hack.coloring e = Color.ofPlayer p) :
      CanRemove hack p e
      theorem Hackenbush.Uproot.canRemove_of_ground {V : Type} {hack : Hackenbush V} (p : Player) {e : Sym2 V} (hg : hack.ground ∈ e) (h2 : 2 ≤ hack.groundEdgeFinset.card) :
      CanRemove hack p e
      theorem Hackenbush.Uproot.exists_canRemove {V : Type} (hack : Hackenbush V) (e : Sym2 V) :
      ∃ (p : Player), CanRemove hack p e

      Some player may delete any edge.

      Moves in Uproot Hackenbush.

      Equations
      Instances For
        theorem Hackenbush.Uproot.mem_moves_iff {V : Type} {p : Player} {hack hack' : Hackenbush V} :
        hack' ∈ Uproot.moves p hack ↔ ∃ e ∈ hack.graph.edgeSet, CanRemove hack p e ∧ hack' = hack.remove e

        Convert an Uproot Hackenbush position to a GameForm.

        Equations
        Instances For
          theorem Hackenbush.Uproot.mem_moves_toGameForm_iff {V : Type} {p : Player} {hack : Hackenbush V} {g : GameForm} :
          g ∈ Moves.moves p (toGameForm hack) ↔ ∃ (e : Sym2 V) (_ : e ∈ hack.graph.edgeSet), CanRemove hack p e ∧ g = toGameForm (hack.remove e)
          theorem Hackenbush.Uproot.toGameForm_remove_mem_moves {V : Type} {hack : Hackenbush V} {e : Sym2 V} {p : Player} (he : e ∈ hack.graph.edgeSet) (hc : CanRemove hack p e) :

          The game form is zero iff the graph has no edges.

          theorem Hackenbush.Uproot.remove_graph_ne_bot_of_groundCount_zero {V : Type} {hack : Hackenbush V} {p : Player} {e : Sym2 V} (he : e ∈ hack.graph.edgeSet) (hc : CanRemove hack p e) (hgc : hack.groundCount p = 0) :
          (hack.remove e).graph ≠ ⊥

          A move by a player with no ground edges never empties the position.

          Stride theory #

          When p has no ground edges, the position is solved for p.

          When groundCount p ≥ 1, the position is not solved for p.

          The p-stride of an Uproot Hackenbush position equals the number of p-coloured ground edges, exactly as in Hackenbush.

          Uproot Hackenbush as a ruleset. This is a different Ruleset structure on the same position type as Hackenbush, so it is not an instance.

          Equations
          Instances For

            The game forms of Uproot Hackenbush positions.

            Equations
            Instances For