cop_win_of_stationary_guards_and_residual_components
Fix t guard vertices in a connected graph. For each starting robber vertex r outside all of their closed neighborhoods, suppose c cops can win on the connected component containing r after removing those closed neighborhoods. Then t+c cops can win on the whole graph. The mobile cops may start at one common vertex before the robber chooses a component.
Statement
theorem cop_win_of_stationary_guards_and_residual_components {V : Type*} (G : SimpleGraph V) (conn : G.Connected) (t c : ℕ) (A : Fin t → V) (h : ∀ r, ¬Op606Deploy.covered G A r → HasCopWinStrategy (G.induce (Op606Deploy.region G A r)) c) : HasCopWinStrategy G (t+c)
- Source
- Guard removal and redeployment, https://www.math.cmu.edu/~af1p/Texfiles/cops.pdf and https://drops.dagstuhl.de/opus/volltexte/2023/18583/pdf/LIPIcs-MFCS-2023-49.pdf. Game kernel for OP-606.
- Verified
- 29 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 3
- HasCopWinStrategyThe cop player has a winning strategy with c cops on G if there exists an initial placement of cops from which the cops can capture the…
- CopsCanWinFromCops can force capture from cop positions C and robber position R in the cops and robber game with c cops on G if the robber is already…
- Arena.Reachable.transReachability is transitive.
The proof, explained
To capture a robber using t stationary guards and c mobile cops on a connected graph, all c mobile cops initially gather at an arbitrary common vertex. If the robber starts in the closed neighborhood of any guard, they are captured on the very first move. Otherwise, the robber is trapped in a connected component of the graph minus the guards' closed neighborhoods; the mobile cops can safely walk across the connected graph to their winning configuration on that component without allowing the robber to escape, and then capture the robber using the component's winning strategy lifted to the full graph.
Appending stationary guards to valid mobile cop moves produces a valid move for all t+c cops.
By case analysis on the cop index (using Fin.addCases), the first t guards do not move and thus remain on their vertices, while the remaining c mobile cops move according to their assumed valid moves.
uses
Fin.addCasesapply Fin.addCases · intro i; exact Or.inl (by simp) · intro i; simpa using h i
If the robber starts in the closed neighborhood of any guard, the cops win immediately in one step.
If robber r is covered by guard A i (either A i = r or adjacent to r), guard i moves directly to r while all other cops and guards remain stationary. By Function.update_of_ne, unaffected cops stay in place, achieving a one-step capture via CopsCanWinFrom.step_capture.
uses
CopsCanWinFrom.step_capture,Function.update_of_ne,eq_commclassical obtain ⟨i,hi⟩ := h let D := Function.update (Fin.append A C) (i.castAdd c) r apply CopsCanWinFrom.step_capture _ _ D · intro j by_cases hj : j=i.castAdd c · subst j simpa [D,eq_comm] using hi · exact Or.inl (Function.update_of_ne hj _ _) · exact ⟨i.castAdd c, by simp [D]⟩
A winning cop strategy on an induced component whose external boundary is covered lifts to a winning strategy on the full graph.
By induction on the winning strategy in the induced subgraph G[S]. Immediate capture cases carry over directly. In an ordinary step, mobile cops move according to the component strategy while guards remain stationary (via moves). The robber either moves to another vertex in S, where the induction hypothesis applies, or steps out of S, which by the boundary condition lands on a covered vertex where cover_win finishes the game.
uses
CopsCanWinFrom.step,CopsCanWinFrom.step_capture,moves,cover_wininduction h with | capture C r cap => obtain ⟨i,hi⟩ := cap exact .capture _ _ ⟨Fin.natAdd t i,by simpa using congrArg Subtype.val hi⟩ | step_capture C r D hm cap => apply CopsCanWinFrom.step_capture _ _ (Fin.append A (fun i => (D i).val)) · exact moves G _ _ _ (fun i => (hm i).imp (congrArg Subtype.val) id) · obtain ⟨i,hi⟩ := cap exact ⟨Fin.natAdd t i,by simpa using congrArg Subtype.val hi⟩ | step C r D hm _ ih => apply CopsCanWinFrom.step _ _ (Fin.append A (fun i => (D i).val)) · exact moves G _ _ _ (fun i => (hm i).imp (congrArg Subtype.val) id) · intro z hz rcases hz with rfl|hadj · exact ih r (.inl rfl) · rcases closed _ r.property z hadj with hs|hc · exact ih ⟨z,hs⟩ (.inr hadj) · exact cover_win G A _ _ hc
In a connected graph, mobile cops can follow synchronized walks from initial positions C to target positions D via valid single-step moves.
For each mobile cop i, connectedness of G provides a walk w i from C i to D i. Setting the total deployment horizon T to the sum of all walk lengths, cop i advances along w i at each time step s, staying put once the end of their walk is reached. At each tick, every cop either steps across an edge or remains stationary.
uses
Finset.single_le_sum,Nat.zero_le,Finset.mem_univclassical let w (i : Fin c) := (conn (C i) (D i)).some let T := ∑ i, (w i).length let P (s : ℕ) (i : Fin c) := (w i).getVert s have endp : P T = D := by funext i exact (w i).getVert_of_length_le (Finset.single_le_sum (f := fun j => (w j).length) (fun j _ => Nat.zero_le _) (Finset.mem_univ i)) have beginp : P 0 = C := by funext i; exact (w i).getVert_zero have step (s : ℕ) : ∀ i, P (s+1) i=P s i ∨ G.Adj (P s i) (P (s+1) i) := by intro i by_cases h : s < (w i).length · exact .inr ((w i).adj_getVert_succ h) · exact .inl (((w i).getVert_of_length_le (by omega)).trans ((w i).getVert_of_length_le (by omega)).symm)
Mobile cops starting at arbitrary positions C win against any robber confined to S if they win from target positions D.
By backward induction on the remaining time n = T - s. At s = T, cops have reached D and win by assumption. In the inductive step from s to s+1, mobile cops advance along their walks while guards stay stationary (via moves). The robber either stays in S, preserving the induction invariant, or steps out of S into a covered vertex and loses immediately to cover_win. Setting s = 0 yields victory from C.
uses
CopsCanWinFrom.step,moves,cover_win,Nat.zero_addhave back (n : ℕ) : ∀ s, s+n=T → ∀ r ∈ S, CopsCanWinFrom G (t+c) (Fin.append A (P s)) r := by induction n with | zero => intro s hs; rw [show s=T by omega,endp]; exact hD | succ n ih => intro s hs r hr apply CopsCanWinFrom.step _ _ (Fin.append A (P (s+1))) (moves G _ _ _ (step s)) intro z hz rcases hz with rfl|hadj · exact ih _ (by omega) _ hr · rcases closed r hr z hadj with h|h · exact ih _ (by omega) _ h · exact cover_win G A _ _ h simpa only [beginp] using back T 0 (Nat.zero_add _)
Mobile cops may all start at an arbitrary common vertex, winning immediately if the robber starts at a covered vertex.
Fix an arbitrary base vertex in the connected graph and place all c mobile cops there. If the robber chooses a vertex r already covered by the guards, the cops win immediately via Op606Deploy.cover_win.
uses
Op606Deploy.cover_winclassical let base : V := conn.nonempty.some let C : Fin c → V := fun _ => base refine ⟨Fin.append A C,fun r => ?_⟩ by_cases hr : Op606Deploy.covered G A r · exact Op606Deploy.cover_win G A C r hr
If the robber starts at an uncovered vertex r, the connected component S of uncovered vertices containing r has all its boundary neighbors covered by guards.
Define S as the set of uncovered vertices reachable from r in the subgraph induced by all uncovered vertices. By SimpleGraph.Reachable.rfl, r is in S. For any vertex x in S and neighbor y in G, either y is covered by guards, or y is uncovered and extends the path from r, meaning y is also in S.
uses
SimpleGraph.Reachable.rfllet S := Op606Deploy.region G A r have hroot : r ∈ S := ⟨hr,hr,SimpleGraph.Reachable.rfl⟩ have closed (x : V) (hx : x∈S) (y : V) (ha : G.Adj x y) : y ∈ S ∨ Op606Deploy.covered G A y := by by_cases hy : Op606Deploy.covered G A y · exact .inr hy obtain ⟨hroot,hx,hpath⟩ := hx have edge : (G.induce {x | ¬Op606Deploy.covered G A x}).Adj ⟨x,hx⟩ ⟨y,hy⟩ := ha exact .inl ⟨hroot,hy,hpath.trans edge.reachable⟩
The t+c cops win on the full graph by deploying mobile cops to the winning configuration of the robber's component.
By hypothesis, c cops have a winning strategy from some configuration D on the robber's component S. By Op606Deploy.lift_win, guards A together with cops at D win on G against any robber in S. Finally, Op606Deploy.deploy allows the mobile cops to transition safely from their common initial vertex to D without the robber being able to leave S, completing the proof.
uses
Op606Deploy.deploy,Op606Deploy.lift_winobtain ⟨D,hw⟩ := h r hr apply Op606Deploy.deploy G conn A C (fun i => (D i).val) S closed _ r hroot exact fun x hx => Op606Deploy.lift_win G A S closed (hw ⟨x,hx⟩)
Fin.addCases- A goal about an element of Fin (m + n) can be proved by checking indices in Fin m and indices in Fin n separately.
CopsCanWinFrom.step_capture- Cops win if they can make a valid move such that at least one cop lands on the robber's vertex.
Function.update_of_ne- Updating a function at a point leaves its value at any distinct point unchanged.
eq_comm- Equality is symmetric.
CopsCanWinFrom.step- Cops win from a configuration if they can make a valid move such that they can win against every valid robber response.
moves- Keeping guards stationary while moving mobile cops along valid moves yields a valid joint move for all cops and guards.
cover_win- Guards and mobile cops win in one step if the robber starts at a vertex in the closed neighborhood of any guard.
Finset.single_le_sum- A single non-negative term in a finite sum is bounded above by the total sum.
Nat.zero_le- Zero is less than or equal to any natural number.
Finset.mem_univ- Every element of a finite type belongs to its universal finset.
Nat.zero_add- Adding zero to any natural number leaves it unchanged.
Op606Deploy.cover_win- Guards and mobile cops win in one step if the robber starts at a vertex in the closed neighborhood of any guard.
SimpleGraph.Reachable.rfl- Every vertex is reachable from itself via a trivial walk.
Op606Deploy.deploy- In a connected graph, mobile cops can safely traverse walks from any starting positions to target positions without allowing a robber in a guarded component to escape.
Op606Deploy.lift_win- A winning cop strategy on an induced subgraph with guarded boundary lifts to a winning strategy on the full graph with stationary guards.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
namespace Op606Deploydef covered {V : Type*} (G : SimpleGraph V) {t : ℕ} (A : Fin t → V) (r : V) : Prop := ∃ i, A i = r ∨ G.Adj (A i) rdef region {V : Type*} (G : SimpleGraph V) {t : ℕ} (A : Fin t → V) (r : V) : Set V := {z | ∃ (hr : ¬ covered G A r) (hz : ¬ covered G A z), (G.induce {x | ¬ covered G A x}).Reachable ⟨r,hr⟩ ⟨z,hz⟩}private theorem moves {V : Type*} (G : SimpleGraph V) {t c : ℕ} (A : Fin t → V) (C D : Fin c → V) (h : ∀ i, D i=C i ∨ G.Adj (C i) (D i)) : ∀ i, Fin.append A D i = Fin.append A C i ∨ G.Adj (Fin.append A C i) (Fin.append A D i) := by apply Fin.addCases · intro i; exact Or.inl (by simp) · intro i; simpa using h iprivate theorem cover_win {V : Type*} (G : SimpleGraph V) {t c : ℕ} (A : Fin t → V) (C : Fin c → V) (r : V) (h : covered G A r) : CopsCanWinFrom G (t+c) (Fin.append A C) r := by classical obtain ⟨i,hi⟩ := h let D := Function.update (Fin.append A C) (i.castAdd c) r apply CopsCanWinFrom.step_capture _ _ D · intro j by_cases hj : j=i.castAdd c · subst j simpa [D,eq_comm] using hi · exact Or.inl (Function.update_of_ne hj _ _) · exact ⟨i.castAdd c, by simp [D]⟩private theorem lift_win {V : Type*} (G : SimpleGraph V) {t c : ℕ} (A : Fin t → V) (S : Set V) (closed : ∀ x ∈ S, ∀ y, G.Adj x y → y ∈ S ∨ covered G A y) {C : Fin c → S} {r : S} (h : CopsCanWinFrom (G.induce S) c C r) : CopsCanWinFrom G (t+c) (Fin.append A (fun i => (C i).val)) r.val := by induction h with | capture C r cap => obtain ⟨i,hi⟩ := cap exact .capture _ _ ⟨Fin.natAdd t i,by simpa using congrArg Subtype.val hi⟩ | step_capture C r D hm cap => apply CopsCanWinFrom.step_capture _ _ (Fin.append A (fun i => (D i).val)) · exact moves G _ _ _ (fun i => (hm i).imp (congrArg Subtype.val) id) · obtain ⟨i,hi⟩ := cap exact ⟨Fin.natAdd t i,by simpa using congrArg Subtype.val hi⟩ | step C r D hm _ ih => apply CopsCanWinFrom.step _ _ (Fin.append A (fun i => (D i).val)) · exact moves G _ _ _ (fun i => (hm i).imp (congrArg Subtype.val) id) · intro z hz rcases hz with rfl|hadj · exact ih r (.inl rfl) · rcases closed _ r.property z hadj with hs|hc · exact ih ⟨z,hs⟩ (.inr hadj) · exact cover_win G A _ _ hcprivate theorem deploy {V : Type*} (G : SimpleGraph V) (conn : G.Connected) {t c : ℕ} (A : Fin t → V) (C D : Fin c → V) (S : Set V) (closed : ∀ x ∈ S, ∀ y, G.Adj x y → y ∈ S ∨ covered G A y) (hD : ∀ r ∈ S, CopsCanWinFrom G (t+c) (Fin.append A D) r) : ∀ r ∈ S, CopsCanWinFrom G (t+c) (Fin.append A C) r := by classical let w (i : Fin c) := (conn (C i) (D i)).some let T := ∑ i, (w i).length let P (s : ℕ) (i : Fin c) := (w i).getVert s have endp : P T = D := by funext i exact (w i).getVert_of_length_le (Finset.single_le_sum (f := fun j => (w j).length) (fun j _ => Nat.zero_le _) (Finset.mem_univ i)) have beginp : P 0 = C := by funext i; exact (w i).getVert_zero have step (s : ℕ) : ∀ i, P (s+1) i=P s i ∨ G.Adj (P s i) (P (s+1) i) := by intro i by_cases h : s < (w i).length · exact .inr ((w i).adj_getVert_succ h) · exact .inl (((w i).getVert_of_length_le (by omega)).trans ((w i).getVert_of_length_le (by omega)).symm) have back (n : ℕ) : ∀ s, s+n=T → ∀ r ∈ S, CopsCanWinFrom G (t+c) (Fin.append A (P s)) r := by induction n with | zero => intro s hs; rw [show s=T by omega,endp]; exact hD | succ n ih => intro s hs r hr apply CopsCanWinFrom.step _ _ (Fin.append A (P (s+1))) (moves G _ _ _ (step s)) intro z hz rcases hz with rfl|hadj · exact ih _ (by omega) _ hr · rcases closed r hr z hadj with h|h · exact ih _ (by omega) _ h · exact cover_win G A _ _ h simpa only [beginp] using back T 0 (Nat.zero_add _)end Op606Deploytheorem cop_win_of_stationary_guards_and_residual_components {V : Type*} (G : SimpleGraph V) (conn : G.Connected) (t c : ℕ) (A : Fin t → V) (h : ∀ r, ¬Op606Deploy.covered G A r → HasCopWinStrategy (G.induce (Op606Deploy.region G A r)) c) : HasCopWinStrategy G (t+c) := by classical let base : V := conn.nonempty.some let C : Fin c → V := fun _ => base refine ⟨Fin.append A C,fun r => ?_⟩ by_cases hr : Op606Deploy.covered G A r · exact Op606Deploy.cover_win G A C r hr let S := Op606Deploy.region G A r have hroot : r ∈ S := ⟨hr,hr,SimpleGraph.Reachable.rfl⟩ have closed (x : V) (hx : x∈S) (y : V) (ha : G.Adj x y) : y ∈ S ∨ Op606Deploy.covered G A y := by by_cases hy : Op606Deploy.covered G A y · exact .inr hy obtain ⟨hroot,hx,hpath⟩ := hx have edge : (G.induce {x | ¬Op606Deploy.covered G A x}).Adj ⟨x,hx⟩ ⟨y,hy⟩ := ha exact .inl ⟨hroot,hy,hpath.trans edge.reachable⟩ obtain ⟨D,hw⟩ := h r hr apply Op606Deploy.deploy G conn A C (fun i => (D i).val) S closed _ r hroot exact fun x hx => Op606Deploy.lift_win G A S closed (hw ⟨x,hx⟩)