abbrev
definition
ForcedArborescenceWitness
show as:
view math explainer →
open explainer
Generate a durable explainer page for this declaration.
open lean source
IndisputableMonolith.Complexity.SAT.PC on GitHub at line 111.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
formal source
108
109/-- Forced arborescence witness: for this development we take it to be the same data
110 as a peeling witness (a spanning, duplicate-free list of vars with matching constraints). -/
111abbrev ForcedArborescenceWitness {n}
112 (inputs : InputSet n) (aRef : Assignment n) (φ : CNF n) (H : XORSystem n) : Prop :=
113 PeelingWitness inputs aRef φ H
114
115/-- Program goal (graph-theoretic equivalence to target):
116 PC ↔ existence of a forced-implication arborescence (to be proven). -/
117def programGoal_pc_iff_arborescence {n}
118 (inputs : InputSet n) (aRef : Assignment n) (φ : CNF n) (H : XORSystem n) : Prop :=
119 (PC inputs aRef φ H) ↔ (ForcedArborescence inputs aRef φ H)
120
121/-- Helper to extract one (K, v) pair from PC condition. -/
122noncomputable def extractFromPC {n : Nat} (inputs : InputSet n) (aRef : Assignment n)
123 (φ : CNF n) (H : XORSystem n) (hPC : PC inputs aRef φ H)
124 (U : Finset (Var n)) (hU : U ⊆ inputs) (hne : U.Nonempty) :
125 { p : Constraint n × Var n //
126 p.1 ∈ constraintsOf φ H ∧
127 p.2 ∈ U ∧
128 mentionsVar p.1 p.2 = true ∧
129 (∀ w ∈ U, w ≠ p.2 → mentionsVar p.1 w = false) ∧
130 determinesVar aRef p.1 p.2 } := by
131 have h := hPC U hU hne
132 choose K hK using h
133 choose v hv using hK.2
134 exact ⟨(K, v), hK.1, hv.1, hv.2.1, hv.2.2.1, hv.2.2.2⟩
135
136/-- Bundled result type for peeling construction. -/
137structure PeelingResult {n : Nat} (inputs : InputSet n) (aRef : Assignment n)
138 (φ : CNF n) (H : XORSystem n) (U : Finset (Var n)) where
139 vars : List (Var n)
140 constrs : List (Constraint n)
141 len_eq : vars.length = constrs.length