AFTD Auto-Formalizing Theoretical Domains

pk_free_hole_two_stationary_guards_obstruction

theoremverified

There exist a connected P6-free fourteen-vertex graph G, an induced six-cycle f and a robber r outside its closed neighborhood. With two guards fixed at any two cycle sites until capture, a third cop starting on any cycle site cannot catch r even when allowed anywhere in G. With all three cops free to move, the team starting on consecutive cycle sites 3,4,5 can force capture from this same r.

Statement

theorem pk_free_hole_two_stationary_guards_obstruction :
    ∃ G : SimpleGraph (Fin 14), G.Connected ∧ IsPkFree G 6 ∧
      ∃ (f : SimpleGraph.cycleGraph 6 ↪g G) (r : Fin 14), (∀ i, r ≠ f i ∧ ¬G.Adj r (f i)) ∧
        (∀ i j h, ¬op606TwoGuardsWin G (f i) (f j) (f h) r) ∧
        CopsCanWinFrom G 3 ![f 3,f 4,f 5] r
Source
OP-606, longest-hole campaign in arXiv:2610.36290. Experiments 44743, 44746, 44748 and 44749.
Verified
29 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 6
  • IsPkFreeA simple graph G is P_k-free if it contains no induced subgraph isomorphic to the path on k vertices.
  • 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…
  • three_token_odd_cycle_matching_bound_negationIt is not the case that for all integers k ≥ 2, the independence number of the 3-token graph of the odd cycle C_{2k+1} is equal to ((2 * k…
  • Arena.Reachable.transReachability is transitive.
  • g$g(S,M) = \dim_{\mathbb{F}_p}(S^{\perp}_M) - \dim_{\mathbb{F}_p}(S_M)$.

The proof, explained

The theorem is proved by constructing an explicit 14-vertex graph G containing an induced 6-cycle and a robber vertex 12 outside the cycle's closed neighborhood. Exhaustive computation verifies that G is connected and contains no induced 6-vertex path (P6). By a pigeonhole argument over three independent lanes, two stationary guards on the cycle cannot block the robber from evading the third mobile cop forever, whereas three mobile cops can coordinate a two-step capture strategy.

  1. The 14-vertex graph G is an undirected simple graph without self-loops automation

    The adjacency relation is given by bitmask testing. Symmetry and the absence of self-loops are verified by finite exhaustive checking.

    lines 21–27

    def graph : SimpleGraph (Fin 14) where
      Adj := rel
      symm := ⟨by decide⟩
      loopless := ⟨by decide⟩
    
    instance : DecidableRel graph.Adj := inferInstanceAs (DecidableRel rel)
    
  2. The 6-cycle embeds as an induced subgraph of G automation

    The map sends each cycle vertex i to vertex i in G. Injectivity holds by Fin.ext and congrArg, and adjacency preservation in both directions is verified by decide.

    lines 28–34

    uses Fin.ext, congrArg

    def near (i : Fin 6) : Fin 14 := ⟨i.val,by omega⟩
    
    def hole : SimpleGraph.cycleGraph 6 ↪g graph where
      toFun := near
      inj' := fun _ _ h => Fin.ext (congrArg (fun i : Fin 14 => i.val) h)
      map_rel_iff' := by decide
    
  3. The graph G is connected

    A finite search confirms that every vertex z in G is equal to 12, adjacent to 12, or connected to 12 via a two-step path. Therefore every vertex is reachable from 12, so any two vertices are connected through 12.

    lines 35–43

    uses SimpleGraph.Reachable.rfl

    theorem connected : graph.Connected := by
      have cover : ∀ z : Fin 14, z = 12 ∨ graph.Adj 12 z ∨ ∃ u, graph.Adj 12 u ∧ graph.Adj u z := by decide
      have hr (z : Fin 14) : graph.Reachable 12 z := by
        rcases cover z with rfl|h|⟨u,hu,uz⟩
        · exact SimpleGraph.Reachable.rfl
        · exact h.reachable
        · exact hu.reachable.trans uz.reachable
      exact ⟨fun i j => (hr i).symm.trans (hr j)⟩
    
  4. A property verified on all vertices holds for any specific vertex automation

    By List.all_eq_true.mp, since the boolean predicate holds for all elements of List.finRange 14, it holds for any vertex i.

    lines 44–45

    uses List.all_eq_true.mp

    private theorem apply_all {P : Fin 14 → Bool} (h : (List.finRange 14).all P=true) (i : Fin 14) : P i=true := List.all_eq_true.mp h _ (by simp)
    
  5. The graph G contains no induced path on 6 vertices automation

    An exhaustive search tests that no sequence of six vertices forms an induced path. Applying this test to the vertices of any hypothetical induced 6-path f yields a contradiction after simplifying the conditional branches with if_pos and pathGraph_adj.

    lines 46–105

    uses SimpleGraph.pathGraph_adj, if_pos

    theorem no_path : IsPkFree graph 6 := by
      rintro ⟨f⟩
      have pair (i j : Fin 6) : graph.Adj (f i) (f j) ↔ (SimpleGraph.pathGraph 6).Adj i j := f.map_rel_iff
    
      have test : (List.finRange 14).all (fun a => (List.finRange 14).all (fun b => if graph.Adj a b then (List.finRange 14).all (fun c => if graph.Adj b c ∧ a ≠ c ∧ ¬graph.Adj a c then (List.finRange 14).all (fun d => if graph.Adj c d ∧ a ≠ d ∧ ¬graph.Adj a d ∧ b ≠ d ∧ ¬graph.Adj b d then (List.finRange 14).all (fun e => if graph.Adj d e ∧ a ≠ e ∧ ¬graph.Adj a e ∧ b ≠ e ∧ ¬graph.Adj b e ∧ c ≠ e ∧ ¬graph.Adj c e then (List.finRange 14).all (fun f => if graph.Adj e f ∧ a ≠ f ∧ ¬graph.Adj a f ∧ b ≠ f ∧ ¬graph.Adj b f ∧ c ≠ f ∧ ¬graph.Adj c f ∧ d ≠ f ∧ ¬graph.Adj d f then false else true) else true) else true) else true) else true))=true := by decide
    
      have h0 := apply_all test (f 0)
    
      have c1 : graph.Adj (f 0) (f 1) := ((pair 0 1).mpr (by rw [SimpleGraph.pathGraph_adj]; decide))
    
      have h1 := apply_all h0 (f 1)
    
      simp only [if_pos c1] at h1
    
      have c2 : graph.Adj (f 1) (f 2) ∧ (f 0) ≠ (f 2) ∧ ¬graph.Adj (f 0) (f 2) := ⟨((pair 1 2).mpr (by rw [SimpleGraph.pathGraph_adj]; decide)),
        (fun h => (by decide : (0 : Fin 6) ≠ 2) (f.injective h)),
        (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 0 2) ((pair 0 2).mp h))⟩
    
      have h2 := apply_all h1 (f 2)
    
      simp only [if_pos c2] at h2
    
      have c3 : graph.Adj (f 2) (f 3) ∧ (f 0) ≠ (f 3) ∧ ¬graph.Adj (f 0) (f 3) ∧ (f 1) ≠ (f 3) ∧ ¬graph.Adj (f 1) (f 3) := ⟨((pair 2 3).mpr (by rw [SimpleGraph.pathGraph_adj]; decide)),
        (fun h => (by decide : (0 : Fin 6) ≠ 3) (f.injective h)),
        (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 0 3) ((pair 0 3).mp h)),
        (fun h => (by decide : (1 : Fin 6) ≠ 3) (f.injective h)),
        (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 1 3) ((pair 1 3).mp h))⟩
    
      have h3 := apply_all h2 (f 3)
    
      simp only [if_pos c3] at h3
    
      have c4 : graph.Adj (f 3) (f 4) ∧ (f 0) ≠ (f 4) ∧ ¬graph.Adj (f 0) (f 4) ∧ (f 1) ≠ (f 4) ∧ ¬graph.Adj (f 1) (f 4) ∧ (f 2) ≠ (f 4) ∧ ¬graph.Adj (f 2) (f 4) := ⟨((pair 3 4).mpr (by rw [SimpleGraph.pathGraph_adj]; decide)),
        (fun h => (by decide : (0 : Fin 6) ≠ 4) (f.injective h)),
        (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 0 4) ((pair 0 4).mp h)),
        (fun h => (by decide : (1 : Fin 6) ≠ 4) (f.injective h)),
        (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 1 4) ((pair 1 4).mp h)),
        (fun h => (by decide : (2 : Fin 6) ≠ 4) (f.injective h)),
        (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 2 4) ((pair 2 4).mp h))⟩
    
      have h4 := apply_all h3 (f 4)
    
      simp only [if_pos c4] at h4
    
      have c5 : graph.Adj (f 4) (f 5) ∧ (f 0) ≠ (f 5) ∧ ¬graph.Adj (f 0) (f 5) ∧ (f 1) ≠ (f 5) ∧ ¬graph.Adj (f 1) (f 5) ∧ (f 2) ≠ (f 5) ∧ ¬graph.Adj (f 2) (f 5) ∧ (f 3) ≠ (f 5) ∧ ¬graph.Adj (f 3) (f 5) := ⟨((pair 4 5).mpr (by rw [SimpleGraph.pathGraph_adj]; decide)),
        (fun h => (by decide : (0 : Fin 6) ≠ 5) (f.injective h)),
        (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 0 5) ((pair 0 5).mp h)),
        (fun h => (by decide : (1 : Fin 6) ≠ 5) (f.injective h)),
        (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 1 5) ((pair 1 5).mp h)),
        (fun h => (by decide : (2 : Fin 6) ≠ 5) (f.injective h)),
        (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 2 5) ((pair 2 5).mp h)),
        (fun h => (by decide : (3 : Fin 6) ≠ 5) (f.injective h)),
        (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 3 5) ((pair 3 5).mp h))⟩
    
      have h5 := apply_all h4 (f 5)
    
      simp only [if_pos c5] at h5
      contradiction
    
    
  6. The zone and safe predicates have decidable instances automation

    The zone and safe definitions are unfolded and their decidability instances are synthesized by typeclass inference.

    lines 106–112

    def zone (l : Fin 3) (z : Fin 14) : Prop :=
      z.val=12 ∨ z.val=13 ∨ z.val=6+2*l.val ∨ z.val=7+2*l.val
    private instance (l : Fin 3) (z : Fin 14) : Decidable (zone l z) := by unfold zone; infer_instance
    
    def safe (l : Fin 3) (c z : Fin 14) : Prop := zone l z ∧ z ≠ c ∧ ¬graph.Adj c z
    private instance (l : Fin 3) (c z : Fin 14) : Decidable (safe l c z) := by unfold safe; infer_instance
    
  7. The robber survives indefinitely against two stationary cycle guards and one mobile cop

    By the pigeonhole principle, any two stationary guards on the 6-cycle leave at least one of the three lanes completely unoccupied. The robber can stay within this safe zone: whenever the mobile cop moves, the robber has an evasive response that remains in the zone and out of reach of all three cops. Induction on the winning relation shows that capture is impossible.

    lines 113–137

    theorem survive (i j h : Fin 6) : ¬ op606TwoGuardsWin graph (near i) (near j) (near h) 12 := by
      have lane : ∀ i j : Fin 6, ∃ l : Fin 3, i.val%3 ≠ l.val ∧ j.val%3 ≠ l.val := by decide
      obtain ⟨l,hi,hj⟩ := lane i j
      have avoid : ∀ (l : Fin 3) (i : Fin 6), i.val%3 ≠ l.val → ∀ z, zone l z → z ≠ near i ∧ ¬graph.Adj (near i) z := by decide
      have evade : ∀ l c r, safe l c r → ∀ d, d=c ∨ graph.Adj c d → ∃ z, (z=r ∨ graph.Adj r z) ∧ safe l d z := by decide
      have start : ∀ (l : Fin 3) (h : Fin 6), safe l (near h) 12 := by decide
      have no (c r : Fin 14) (win : op606TwoGuardsWin graph (near i) (near j) c r) : ¬safe l c r := by
        induction win with
        | capture hh =>
          intro hs
          have x := avoid l i hi _ hs.1
          have y := avoid l j hj _ hs.1
          rcases hh with h|h|h|h|h|h
          · exact x.1 h
          · exact x.2 h
          · exact y.1 h
          · exact y.2 h
          · exact hs.2.1 h
          · exact hs.2.2 h
        | step d move _ ih =>
          intro hs
          obtain ⟨z,hz,good⟩ := evade _ _ _ hs d move
          exact ih z hz good
      exact fun hw => no _ _ hw (start l h)
    
  8. Covering the robber allows the cops to force capture in one step

    If some cop i is already at or adjacent to the robber, that cop moves to the robber's location while all other cops stay in place (using Function.update_of_ne and Or.inl), achieving capture immediately via CopsCanWinFrom.step_capture.

    lines 138–149

    uses CopsCanWinFrom.step_capture, Or.inl, Function.update_of_ne

    def covers (C : Fin 3 → Fin 14) (r : Fin 14) : Prop := ∃ i, C i=r ∨ graph.Adj (C i) r
    private instance (C : Fin 3 → Fin 14) (r : Fin 14) : Decidable (covers C r) := by unfold covers; infer_instance
    
    theorem cover_win {C : Fin 3 → Fin 14} {r : Fin 14} (hc : covers C r) : CopsCanWinFrom graph 3 C r := by
      obtain ⟨i,hi⟩ := hc
      apply CopsCanWinFrom.step_capture _ _ (Function.update C i r)
      · intro j
        by_cases hj : j=i
        · subst j; simpa [eq_comm] using hi
        · exact Or.inl (Function.update_of_ne hj _ _)
      · exact ⟨i,by simp⟩
    
  9. Three mobile cops starting at vertices 3, 4, 5 win against the robber starting at 12

    The cops first move to {3, 8, 0}. For any robber move, a precomputed reply either captures the robber immediately or covers all possible subsequent robber moves, in which case cover_win finishes the game.

    lines 150–180

    uses CopsCanWinFrom.step, cover_win

    def initial : Fin 3 → Fin 14 := ![3,4,5]
    def first : Fin 3 → Fin 14 := ![3,8,0]
    def reply : Fin 14 → Fin 3 → Fin 14 := ![![3,1,0],
      ![3,1,0],
      ![3,1,5],
      ![3,1,0],
      ![3,1,0],
      ![3,1,5],
      ![3,1,6],
      ![3,1,6],
      ![3,1,6],
      ![3,1,6],
      ![3,8,5],
      ![3,8,5],
      ![3,12,0],
      ![3,12,6]]
    
    theorem three : CopsCanWinFrom graph 3 initial 12 := by
      have legal : ∀ i, first i=initial i ∨ graph.Adj (initial i) (first i) := by decide
      have check : ∀ r, r=12 ∨ graph.Adj 12 r →
          (∀ i, reply r i=first i ∨ graph.Adj (first i) (reply r i)) ∧
          ((∃ i, reply r i=r) ∨ ∀ z, z=r ∨ graph.Adj r z → covers (reply r) z) := by decide
      apply CopsCanWinFrom.step _ _ first legal
      intro r hr
      obtain ⟨hm,h⟩ := check r hr
      rcases h with h|h
      · exact .step_capture _ _ _ hm h
      · exact .step _ _ _ hm (fun z hz => cover_win (h z hz))
    
    end Op606Mobile
    
  10. There exists a connected P6-free graph with an induced 6-cycle establishing the obstruction automation

    The theorem is concluded by providing G as the graph, vertex 12 as the robber, and citing the proofs of connectedness, P6-freeness, the induced 6-cycle embedding, the impossibility of capture with two stationary guards, and the winning strategy for three mobile cops.

    lines 181–187

    uses Op606Mobile.graph, Op606Mobile.connected, Op606Mobile.no_path, Op606Mobile.hole, Op606Mobile.survive, Op606Mobile.three

    theorem pk_free_hole_two_stationary_guards_obstruction :
        ∃ G : SimpleGraph (Fin 14), G.Connected ∧ IsPkFree G 6 ∧
          ∃ (f : SimpleGraph.cycleGraph 6 ↪g G) (r : Fin 14), (∀ i, r ≠ f i ∧ ¬G.Adj r (f i)) ∧
            (∀ i j h, ¬op606TwoGuardsWin G (f i) (f j) (f h) r) ∧
            CopsCanWinFrom G 3 ![f 3,f 4,f 5] r := by
      exact ⟨Op606Mobile.graph,Op606Mobile.connected,Op606Mobile.no_path,Op606Mobile.hole,12,by decide,
        Op606Mobile.survive,Op606Mobile.three⟩
Fin.ext
Equality of Fin values from equality of their underlying natural numbers
congrArg
Application of a function respects equality of arguments
SimpleGraph.Reachable.rfl
Reflexivity of reachability: every vertex is reachable from itself
List.all_eq_true.mp
If all elements in a list satisfy a boolean predicate, then any element in the list satisfies it
SimpleGraph.pathGraph_adj
Adjacency in a path graph on n vertices corresponds to difference in index by 1
if_pos
Simplification of an if-then-else when the condition is true
CopsCanWinFrom.step_capture
A game step where cops move to new positions and capture the robber immediately
Or.inl
First disjunct of an or proposition
Function.update_of_ne
Updating a function at a point different from the evaluated point leaves the value unchanged
CopsCanWinFrom.step
A game step where cops move and can win from all possible subsequent robber moves
cover_win
If the current cop configuration covers the robber, the cops can force a win in one step
Op606Mobile.graph
The 14-vertex graph defined via adjacency bitmasks
Op606Mobile.connected
Proof that the 14-vertex graph is connected
Op606Mobile.no_path
Proof that the 14-vertex graph contains no induced 6-vertex path
Op606Mobile.hole
The induced subgraph embedding of the 6-cycle into the 14-vertex graph
Op606Mobile.survive
Proof that two stationary guards and one mobile cop cannot catch the robber starting at 12
Op606Mobile.three
Proof that three mobile cops starting at vertices 3, 4, 5 win against the robber at 12

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

set_option maxHeartbeats 3000000set_option synthInstance.maxSize 2048set_option maxRecDepth 8000/-- Two guards stay at u,v until capture. The mobile cop can use any vertex of G. -/inductive op606TwoGuardsWin {V : Type*} (G : SimpleGraph V) (u v : V) : V → V → Prop where  | capture {c r} (h : r=u ∨ G.Adj u r ∨ r=v ∨ G.Adj v r ∨ r=c ∨ G.Adj c r) :      op606TwoGuardsWin G u v c r  | step {c r} (d : V) (move : d=c ∨ G.Adj c d)      (wins : ∀ z, z=r ∨ G.Adj r z → op606TwoGuardsWin G u v d z) : op606TwoGuardsWin G u v c rnamespace Op606Mobiledef mask : Fin 14 → ℕ := ![226,773,3082,212,808,3089,12297,12297,12306,12306,12324,12324,4032,4032]def rel (x y : Fin 14) : Prop := (mask x).testBit y.val = trueinstance : DecidableRel rel := fun x y => inferInstanceAs (Decidable ((mask x).testBit y.val = true))def graph : SimpleGraph (Fin 14) where  Adj := rel  symm := ⟨by decide⟩  loopless := ⟨by decide⟩instance : DecidableRel graph.Adj := inferInstanceAs (DecidableRel rel)def near (i : Fin 6) : Fin 14 := ⟨i.val,by omega⟩def hole : SimpleGraph.cycleGraph 6 ↪g graph where  toFun := near  inj' := fun _ _ h => Fin.ext (congrArg (fun i : Fin 14 => i.val) h)  map_rel_iff' := by decidetheorem connected : graph.Connected := by  have cover : ∀ z : Fin 14, z = 12 ∨ graph.Adj 12 z ∨ ∃ u, graph.Adj 12 u ∧ graph.Adj u z := by decide  have hr (z : Fin 14) : graph.Reachable 12 z := by    rcases cover z with rfl|h|⟨u,hu,uz⟩    · exact SimpleGraph.Reachable.rfl    · exact h.reachable    · exact hu.reachable.trans uz.reachable  exact ⟨fun i j => (hr i).symm.trans (hr j)⟩private theorem apply_all {P : Fin 14 → Bool} (h : (List.finRange 14).all P=true) (i : Fin 14) : P i=true := List.all_eq_true.mp h _ (by simp)theorem no_path : IsPkFree graph 6 := by  rintro ⟨f⟩  have pair (i j : Fin 6) : graph.Adj (f i) (f j) ↔ (SimpleGraph.pathGraph 6).Adj i j := f.map_rel_iff  have test : (List.finRange 14).all (fun a => (List.finRange 14).all (fun b => if graph.Adj a b then (List.finRange 14).all (fun c => if graph.Adj b c ∧ a ≠ c ∧ ¬graph.Adj a c then (List.finRange 14).all (fun d => if graph.Adj c d ∧ a ≠ d ∧ ¬graph.Adj a d ∧ b ≠ d ∧ ¬graph.Adj b d then (List.finRange 14).all (fun e => if graph.Adj d e ∧ a ≠ e ∧ ¬graph.Adj a e ∧ b ≠ e ∧ ¬graph.Adj b e ∧ c ≠ e ∧ ¬graph.Adj c e then (List.finRange 14).all (fun f => if graph.Adj e f ∧ a ≠ f ∧ ¬graph.Adj a f ∧ b ≠ f ∧ ¬graph.Adj b f ∧ c ≠ f ∧ ¬graph.Adj c f ∧ d ≠ f ∧ ¬graph.Adj d f then false else true) else true) else true) else true) else true))=true := by decide  have h0 := apply_all test (f 0)  have c1 : graph.Adj (f 0) (f 1) := ((pair 0 1).mpr (by rw [SimpleGraph.pathGraph_adj]; decide))  have h1 := apply_all h0 (f 1)  simp only [if_pos c1] at h1  have c2 : graph.Adj (f 1) (f 2) ∧ (f 0) ≠ (f 2) ∧ ¬graph.Adj (f 0) (f 2) := ⟨((pair 1 2).mpr (by rw [SimpleGraph.pathGraph_adj]; decide)),    (fun h => (by decide : (0 : Fin 6) ≠ 2) (f.injective h)),    (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 0 2) ((pair 0 2).mp h))⟩  have h2 := apply_all h1 (f 2)  simp only [if_pos c2] at h2  have c3 : graph.Adj (f 2) (f 3) ∧ (f 0) ≠ (f 3) ∧ ¬graph.Adj (f 0) (f 3) ∧ (f 1) ≠ (f 3) ∧ ¬graph.Adj (f 1) (f 3) := ⟨((pair 2 3).mpr (by rw [SimpleGraph.pathGraph_adj]; decide)),    (fun h => (by decide : (0 : Fin 6) ≠ 3) (f.injective h)),    (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 0 3) ((pair 0 3).mp h)),    (fun h => (by decide : (1 : Fin 6) ≠ 3) (f.injective h)),    (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 1 3) ((pair 1 3).mp h))⟩  have h3 := apply_all h2 (f 3)  simp only [if_pos c3] at h3  have c4 : graph.Adj (f 3) (f 4) ∧ (f 0) ≠ (f 4) ∧ ¬graph.Adj (f 0) (f 4) ∧ (f 1) ≠ (f 4) ∧ ¬graph.Adj (f 1) (f 4) ∧ (f 2) ≠ (f 4) ∧ ¬graph.Adj (f 2) (f 4) := ⟨((pair 3 4).mpr (by rw [SimpleGraph.pathGraph_adj]; decide)),    (fun h => (by decide : (0 : Fin 6) ≠ 4) (f.injective h)),    (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 0 4) ((pair 0 4).mp h)),    (fun h => (by decide : (1 : Fin 6) ≠ 4) (f.injective h)),    (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 1 4) ((pair 1 4).mp h)),    (fun h => (by decide : (2 : Fin 6) ≠ 4) (f.injective h)),    (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 2 4) ((pair 2 4).mp h))⟩  have h4 := apply_all h3 (f 4)  simp only [if_pos c4] at h4  have c5 : graph.Adj (f 4) (f 5) ∧ (f 0) ≠ (f 5) ∧ ¬graph.Adj (f 0) (f 5) ∧ (f 1) ≠ (f 5) ∧ ¬graph.Adj (f 1) (f 5) ∧ (f 2) ≠ (f 5) ∧ ¬graph.Adj (f 2) (f 5) ∧ (f 3) ≠ (f 5) ∧ ¬graph.Adj (f 3) (f 5) := ⟨((pair 4 5).mpr (by rw [SimpleGraph.pathGraph_adj]; decide)),    (fun h => (by decide : (0 : Fin 6) ≠ 5) (f.injective h)),    (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 0 5) ((pair 0 5).mp h)),    (fun h => (by decide : (1 : Fin 6) ≠ 5) (f.injective h)),    (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 1 5) ((pair 1 5).mp h)),    (fun h => (by decide : (2 : Fin 6) ≠ 5) (f.injective h)),    (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 2 5) ((pair 2 5).mp h)),    (fun h => (by decide : (3 : Fin 6) ≠ 5) (f.injective h)),    (fun h => (by rw [SimpleGraph.pathGraph_adj]; decide : ¬(SimpleGraph.pathGraph 6).Adj 3 5) ((pair 3 5).mp h))⟩  have h5 := apply_all h4 (f 5)  simp only [if_pos c5] at h5  contradictiondef zone (l : Fin 3) (z : Fin 14) : Prop :=  z.val=12 ∨ z.val=13 ∨ z.val=6+2*l.val ∨ z.val=7+2*l.valprivate instance (l : Fin 3) (z : Fin 14) : Decidable (zone l z) := by unfold zone; infer_instancedef safe (l : Fin 3) (c z : Fin 14) : Prop := zone l z ∧ z ≠ c ∧ ¬graph.Adj c zprivate instance (l : Fin 3) (c z : Fin 14) : Decidable (safe l c z) := by unfold safe; infer_instancetheorem survive (i j h : Fin 6) : ¬ op606TwoGuardsWin graph (near i) (near j) (near h) 12 := by  have lane : ∀ i j : Fin 6, ∃ l : Fin 3, i.val%3 ≠ l.val ∧ j.val%3 ≠ l.val := by decide  obtain ⟨l,hi,hj⟩ := lane i j  have avoid : ∀ (l : Fin 3) (i : Fin 6), i.val%3 ≠ l.val → ∀ z, zone l z → z ≠ near i ∧ ¬graph.Adj (near i) z := by decide  have evade : ∀ l c r, safe l c r → ∀ d, d=c ∨ graph.Adj c d → ∃ z, (z=r ∨ graph.Adj r z) ∧ safe l d z := by decide  have start : ∀ (l : Fin 3) (h : Fin 6), safe l (near h) 12 := by decide  have no (c r : Fin 14) (win : op606TwoGuardsWin graph (near i) (near j) c r) : ¬safe l c r := by    induction win with    | capture hh =>      intro hs      have x := avoid l i hi _ hs.1      have y := avoid l j hj _ hs.1      rcases hh with h|h|h|h|h|h      · exact x.1 h      · exact x.2 h      · exact y.1 h      · exact y.2 h      · exact hs.2.1 h      · exact hs.2.2 h    | step d move _ ih =>      intro hs      obtain ⟨z,hz,good⟩ := evade _ _ _ hs d move      exact ih z hz good  exact fun hw => no _ _ hw (start l h)def covers (C : Fin 3 → Fin 14) (r : Fin 14) : Prop := ∃ i, C i=r ∨ graph.Adj (C i) rprivate instance (C : Fin 3 → Fin 14) (r : Fin 14) : Decidable (covers C r) := by unfold covers; infer_instancetheorem cover_win {C : Fin 3 → Fin 14} {r : Fin 14} (hc : covers C r) : CopsCanWinFrom graph 3 C r := by  obtain ⟨i,hi⟩ := hc  apply CopsCanWinFrom.step_capture _ _ (Function.update C i r)  · intro j    by_cases hj : j=i    · subst j; simpa [eq_comm] using hi    · exact Or.inl (Function.update_of_ne hj _ _)  · exact ⟨i,by simp⟩def initial : Fin 3 → Fin 14 := ![3,4,5]def first : Fin 3 → Fin 14 := ![3,8,0]def reply : Fin 14 → Fin 3 → Fin 14 := ![![3,1,0],  ![3,1,0],  ![3,1,5],  ![3,1,0],  ![3,1,0],  ![3,1,5],  ![3,1,6],  ![3,1,6],  ![3,1,6],  ![3,1,6],  ![3,8,5],  ![3,8,5],  ![3,12,0],  ![3,12,6]]theorem three : CopsCanWinFrom graph 3 initial 12 := by  have legal : ∀ i, first i=initial i ∨ graph.Adj (initial i) (first i) := by decide  have check : ∀ r, r=12 ∨ graph.Adj 12 r →      (∀ i, reply r i=first i ∨ graph.Adj (first i) (reply r i)) ∧      ((∃ i, reply r i=r) ∨ ∀ z, z=r ∨ graph.Adj r z → covers (reply r) z) := by decide  apply CopsCanWinFrom.step _ _ first legal  intro r hr  obtain ⟨hm,h⟩ := check r hr  rcases h with h|h  · exact .step_capture _ _ _ hm h  · exact .step _ _ _ hm (fun z hz => cover_win (h z hz))end Op606Mobiletheorem pk_free_hole_two_stationary_guards_obstruction :    ∃ G : SimpleGraph (Fin 14), G.Connected ∧ IsPkFree G 6 ∧      ∃ (f : SimpleGraph.cycleGraph 6 ↪g G) (r : Fin 14), (∀ i, r ≠ f i ∧ ¬G.Adj r (f i)) ∧        (∀ i j h, ¬op606TwoGuardsWin G (f i) (f j) (f h) r) ∧        CopsCanWinFrom G 3 ![f 3,f 4,f 5] r := by  exact ⟨Op606Mobile.graph,Op606Mobile.connected,Op606Mobile.no_path,Op606Mobile.hole,12,by decide,    Op606Mobile.survive,Op606Mobile.three⟩
See it in the graphDiscuss this resultChallenge it