Correctness of the complete weighted approximation algorithm
Lax263307.WeightedAlgorithm · concepts/Lax263307/WeightedAlgorithm.lean · lax-263307
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
Clip negative weights, round them to copy multiplicities, and compute the unweighted approximation on the canonically numbered independent blow-up. Projection and removal of nonpositive-weight vertices give the requested weighted approximation. Empty and nonpositive instances return the empty set.
Concept map
Evidence
Each proof establishes this claim relative to its assumptions.
Lean source view on GitHub
| 1 | import Lax263307.RecursiveAlgorithm |
| 2 | import Lax263307.BlowUpBagBounds |
| 3 | import Lax263307.PositiveWeights |
| 4 | import Lax263307.WeightedProjection |
| 5 | import Mathlib.Algebra.BigOperators.Fin |
| 6 | |
| 7 | /-! |
| 8 | --- |
| 9 | title: Correctness of the complete weighted approximation algorithm |
| 10 | type: theorem |
| 11 | --- |
| 12 | Clip negative weights, round them to copy multiplicities, and compute the |
| 13 | unweighted approximation on the canonically numbered independent blow-up. |
| 14 | Projection and removal of nonpositive-weight vertices give the requested |
| 15 | weighted approximation. Empty and nonpositive instances return the empty set. |
| 16 | |
| 17 | # Formalization notes |
| 18 | |
| 19 | The algorithm is a computable function using the fixed registered LP and |
| 20 | flow solvers. The copy labeling is the computable finite-sigma equivalence. |
| 21 | This closes functional correctness for signed rational weights, including |
| 22 | the recursive search. It does not yet assert a complete RAM execution or |
| 23 | its quasipolynomial time and word-length bounds. |
| 24 | -/ |
| 25 | |
| 26 | namespace Lax263307.WeightedAlgorithm |
| 27 | |
| 28 | open WeightRounding IndependentBlowUp PositiveWeights |
| 29 | |
| 30 | def labeling {n : ℕ} (copies : Fin n → ℕ) : Fin (∑ v, copies v) ≃ Vertex copies := |
| 31 | finSigmaFinEquiv.symm |
| 32 | |
| 33 | def numbered {n : ℕ} (G : SimpleGraph (Fin n)) (copies : Fin n → ℕ) : |
| 34 | SimpleGraph (Fin (∑ v, copies v)) := (graph G copies).comap (labeling copies) |
| 35 | |
| 36 | instance {n : ℕ} (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (copies : Fin n → ℕ) : |
| 37 | DecidableRel (numbered G copies).Adj := fun _ _ => inferInstanceAs (Decidable (G.Adj _ _)) |
| 38 | |
| 39 | def solve {n : ℕ} (lp flow : List ℕ → List ℕ) (a K B : ℕ) |
| 40 | (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (w : Fin n → ℚ) (ε : ℚ) : Finset (Fin n) := |
| 41 | let w' := positiveWeights w |
| 42 | if n = 0 ∨ maximumWeight w' ≤ 0 then ∅ |
| 43 | else |
| 44 | let copies' := copies w' ε |
| 45 | let I := RecursiveAlgorithm.independentSet lp flow a K B (numbered G copies') (ε/2) |
| 46 | discardNonpositive w (project (I.image (labeling copies'))) |
| 47 | |
| 48 | open GraphClasses EdgeSublinearSeparators WeightedIndependentSet |
| 49 | |
| 50 | axiom exists_solver (C : GraphClass) (hereditary : IsHereditary C) |
| 51 | (separators : HasStronglyEdgeSublinearSeparators C) : |
| 52 | ∃ (lp flow : List ℕ → List ℕ) (a K B : ℕ), |
| 53 | Lax759944.RamPolytime.RamPolytime lp ∧ Lax759944.RamPolytime.RamPolytime flow ∧ |
| 54 | 0 < a ∧ 0 < K ∧ 0 < B ∧ |
| 55 | ∀ (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj], G ∈ C n → |
| 56 | ∀ (w : Fin n → ℚ) (ε : ℚ), 0 < ε → ε < 1 → IsApproximation G w ε (solve lp flow a K B G w ε) |
| 57 | |
| 58 | end Lax263307.WeightedAlgorithm |
| 59 |
Formalization notes
The algorithm is a computable function using the fixed registered LP and flow solvers. The copy labeling is the computable finite-sigma equivalence. This closes functional correctness for signed rational weights, including the recursive search. It does not yet assert a complete RAM execution or its quasipolynomial time and word-length bounds.
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments