Documentation

CslibFrontier.Computability.Pebbling.Basic

The black pebble game #

The black pebble game on a directed graph G is played on configurations C : Finset V of pebbled vertices, where G.Adj u v means that u is an immediate predecessor of v. A move either places a pebble on a vertex whose predecessors all carry pebbles, or removes a pebble. In particular a pebble can always be placed on a source. A vertex is pebblable with s pebbles if some run from the empty configuration that never holds more than s pebbles pebbles it. The black pebbling price of a vertex is the least such s, and 0 when no budget suffices.

We use Nordström's convention, without sliding: placing a pebble always uses a new pebble. Under the sliding rule of [Sav98] every price is one lower ([Nor15], Proposition 2.5).

Main definitions #

Main results #

References #

The game #

inductive Cslib.Pebbling.Move (V : Type u_1) :
Type u_1

A move of the black pebble game.

inductive Cslib.Pebbling.BlackStep {V : Type u_1} [DecidableEq V] (G : Digraph V) :
Finset V → Move V → Finset V → Prop

One legal move of the black pebble game, without a budget.

def Cslib.Pebbling.blackPebbleGame {V : Type u_1} [DecidableEq V] (G : Digraph V) (s : ℕ) :
LTS (Finset V) (Move V)

The black pebble game with s pebbles.

def Cslib.Pebbling.BlackPebblable {V : Type u_1} [DecidableEq V] (G : Digraph V) (s : ℕ) (v : V) :

v can be black-pebbled with at most s pebbles.

noncomputable def Cslib.Pebbling.blackPebblingPrice {V : Type u_1} [DecidableEq V] (G : Digraph V) (v : V) :

The black pebbling price of v: the least s such that v is pebblable with s pebbles.

When no budget suffices (for example at a vertex with a self-loop, with infinitely many predecessors, or with no open path from a source), the set is empty and the price is sInf ∅ = 0. Statements about the price therefore need a pebblability witness, as in blackPebblingPrice_eq; on a finite graph with well-founded predecessor relation every vertex is pebblable (blackPebblable_fintypeCard).

theorem Cslib.Pebbling.blackPebbleGame_tr {V : Type u_1} [DecidableEq V] {G : Digraph V} {s : ℕ} {C D : Finset V} {m : Move V} :
(blackPebbleGame G s).Tr C m D ↔ BlackStep G C m D ∧ D.card ≤ s
theorem Cslib.Pebbling.BlackStep.eq_insert_of_mem {V : Type u_1} [DecidableEq V] {G : Digraph V} {C D : Finset V} {m : Move V} (h : BlackStep G C m D) {x : V} (hxD : x ∈ D) (hxC : x ∉ C) :
(∀ (u : V), G.Adj u x → u ∈ C) ∧ D = insert x C
theorem Cslib.Pebbling.blackPebbleGame_mTr_mono {V : Type u_1} [DecidableEq V] {G : Digraph V} {s t : ℕ} (hst : s ≤ t) {C D : Finset V} {ms : List (Move V)} (h : (blackPebbleGame G s).MTr C ms D) :
(blackPebbleGame G t).MTr C ms D
theorem Cslib.Pebbling.card_le_of_blackPebbleGame_mTr {V : Type u_1} [DecidableEq V] {G : Digraph V} {s : ℕ} {C D : Finset V} {ms : List (Move V)} (h : (blackPebbleGame G s).MTr C ms D) (hC : C.card ≤ s) :
D.card ≤ s
theorem Cslib.Pebbling.BlackPebblable.mono {V : Type u_1} [DecidableEq V] {G : Digraph V} {s t : ℕ} (hst : s ≤ t) {v : V} (h : BlackPebblable G s v) :
theorem Cslib.Pebbling.BlackPebblable.one_le {V : Type u_1} [DecidableEq V] {G : Digraph V} {s : ℕ} {v : V} (h : BlackPebblable G s v) :
1 ≤ s
theorem Cslib.Pebbling.exists_blackPebbleGame_mTr_sdiff {V : Type u_1} [DecidableEq V] {G : Digraph V} {s : ℕ} {C : Finset V} (hC : C.card ≤ s) (D : Finset V) :
∃ (ms : List (Move V)), (blackPebbleGame G s).MTr C ms (C \ D)

Removing the pebbles of D one at a time.

theorem Cslib.Pebbling.blackPebblable_iff_exists_mTr_singleton {V : Type u_1} [DecidableEq V] {G : Digraph V} {s : ℕ} {v : V} :
BlackPebblable G s v ↔ ∃ (ms : List (Move V)), (blackPebbleGame G s).MTr ∅ ms {v}

A vertex is pebblable exactly when some run ends with a pebble on that vertex alone.

theorem Cslib.Pebbling.exists_blackPebbleGame_mTr_union {V : Type u_1} [DecidableEq V] {G : Digraph V} {s : ℕ} {C D : Finset V} {ms : List (Move V)} (h : (blackPebbleGame G s).MTr C ms D) (F : Finset V) :
∃ (ms' : List (Move V)), (blackPebbleGame G (s + F.card)).MTr (C ∪ F) ms' (D ∪ F)

Keeping the pebbles of F in place throughout a run costs at most F.card extra pebbles.

theorem Cslib.Pebbling.BlackPebblable.of_forall_adj {V : Type u_1} [DecidableEq V] {G : Digraph V} {s t : ℕ} {v : V} (ps : Finset V) (hps : ∀ (u : V), G.Adj u v → u ∈ ps) (h : ∀ u ∈ ps, BlackPebblable G s u) (ht : ps.card + 1 ≤ t) (hst : s + ps.card ≤ t + 1) :

Composition: if every predecessor of v lies in ps and can be pebbled with s pebbles, then v can be pebbled with t pebbles whenever #ps + 1 ≤ t and s + #ps ≤ t + 1.

On a finite graph without infinite descending chains of predecessors, every vertex can be pebbled with one pebble per vertex.

theorem Cslib.Pebbling.blackPebblingPrice_le {V : Type u_1} [DecidableEq V] {G : Digraph V} {s : ℕ} {v : V} (h : BlackPebblable G s v) :

A vertex that no budget pebbles has price 0.

theorem Cslib.Pebbling.blackPebblingPrice_eq {V : Type u_1} [DecidableEq V] {G : Digraph V} {n : ℕ} {v : V} (h : BlackPebblable G n v) (hle : ∀ (s : ℕ), BlackPebblable G s v → n ≤ s) :

The price is n when n pebbles suffice and every successful budget is at least n.

On a finite graph with well-founded predecessor relation, the price of any vertex is at most the number of vertices.

theorem Cslib.Pebbling.blackPebblable_one_of_source {V : Type u_1} [DecidableEq V] {G : Digraph V} {v : V} (hv : ∀ (u : V), ¬G.Adj u v) :

A source is pebblable with one pebble.

theorem Cslib.Pebbling.blackPebblingPrice_eq_one_of_source {V : Type u_1} [DecidableEq V] {G : Digraph V} {v : V} (hv : ∀ (u : V), ¬G.Adj u v) :

A source has black pebbling price 1.