Correctness of the complete recursive unweighted algorithm
Lax263307.RecursiveAlgorithm · concepts/Lax263307/RecursiveAlgorithm.lean · lax-263307
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
An explicit recursive function uses exhaustive search for small targets and bounded projected round-or-cut search for larger targets. Child calls operate on canonically labeled balanced parts. Descending target search returns an independent set with the requested approximation ratio.
Concept map
Evidence
Each proof establishes this claim relative to its assumptions.
Lean source view on GitHub
| 1 | import Lax263307.ProjectedOracle |
| 2 | import Lax263307.ExhaustiveTargets |
| 3 | import Lax263307.RecursionDepth |
| 4 | import Lax263307.TargetSearch |
| 5 | |
| 6 | /-! |
| 7 | --- |
| 8 | title: Correctness of the complete recursive unweighted algorithm |
| 9 | type: theorem |
| 10 | --- |
| 11 | An explicit recursive function uses exhaustive search for small targets and |
| 12 | bounded projected round-or-cut search for larger targets. Child calls operate |
| 13 | on canonically labeled balanced parts. Descending target search returns an |
| 14 | independent set with the requested approximation ratio. |
| 15 | |
| 16 | # Formalization notes |
| 17 | |
| 18 | The depth budget terminates every call. Induction discharges the child-query |
| 19 | hypothesis of the projected oracle, including sound rejection. The accuracy |
| 20 | denominator is 4(depth(n)+1)ceil(1/epsilon). This proves correctness of the |
| 21 | computable function; a finite RAM implementation and its uniform complexity |
| 22 | bound are still needed for the main theorem. |
| 23 | -/ |
| 24 | |
| 25 | namespace Lax263307.RecursiveAlgorithm |
| 26 | |
| 27 | open ComputedSeparators AlgorithmParameters |
| 28 | |
| 29 | def attempt (lp flow : List ℕ → List ℕ) (a K B D : ℕ) (fuel : ℕ) |
| 30 | {n : ℕ} (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (k : ℕ) : Option (Finset (Fin n)) := |
| 31 | if k ≤ cutoff a K B n D ∨ n ≤ 1 then ExhaustiveTargets.findIndependentSet G k |
| 32 | else if n < k then none |
| 33 | else match fuel with |
| 34 | | 0 => none |
| 35 | | fuel + 1 => ProjectedOracle.search lp flow a K B D G k |
| 36 | (fun C t => (attempt lp flow a K B D fuel (restriction G C) t).map |
| 37 | (fun I => I.image (label C))) |
| 38 | termination_by fuel |
| 39 | |
| 40 | def solve {n : ℕ} (lp flow : List ℕ → List ℕ) (a K B D : ℕ) |
| 41 | (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] : Finset (Fin n) × ℕ := |
| 42 | TargetSearch.search (attempt lp flow a K B D (RecursionDepth.depth n) G) n |
| 43 | |
| 44 | def Correct {n : ℕ} (G : SimpleGraph (Fin n)) (k fuel D : ℕ) : Option (Finset (Fin n)) → Prop |
| 45 | | some I => G.IsIndepSet (I : Set (Fin n)) ∧ (1 - 4*(1/(D:ℝ)))^fuel * (k:ℝ) ≤ I.card |
| 46 | | none => ∀ J : Finset (Fin n), G.IsIndepSet (J : Set (Fin n)) → J.card < k |
| 47 | |
| 48 | def accuracyDenominator (n : ℕ) (ε : ℚ) : ℕ := |
| 49 | 4 * (RecursionDepth.depth n + 1) * ⌈ε⁻¹⌉₊ |
| 50 | |
| 51 | def independentSet {n : ℕ} (lp flow : List ℕ → List ℕ) (a K B : ℕ) |
| 52 | (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (ε : ℚ) : Finset (Fin n) := |
| 53 | (solve lp flow a K B (accuracyDenominator n ε) G).1 |
| 54 | |
| 55 | open GraphClasses PowerBagBounds |
| 56 | |
| 57 | axiom exists_solver (C : GraphClass) (hereditary : IsHereditary C) |
| 58 | (a A : ℕ) (ha : 0 < a) (hA : 0 < A) (class_bound : HasPowerBagBound C a A) : |
| 59 | ∃ (lp flow : List ℕ → List ℕ) (K B : ℕ), |
| 60 | Lax759944.RamPolytime.RamPolytime lp ∧ Lax759944.RamPolytime.RamPolytime flow ∧ |
| 61 | 0 < K ∧ 0 < B ∧ ∀ (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj], |
| 62 | G ∈ C n → ∀ ε : ℚ, 0 < ε → ε < 1 → |
| 63 | Lax263307.WeightedIndependentSet.IsApproximation G (fun _ => 1) ε |
| 64 | (independentSet lp flow a K B G ε) |
| 65 | |
| 66 | end Lax263307.RecursiveAlgorithm |
| 67 |
Formalization notes
The depth budget terminates every call. Induction discharges the child-query hypothesis of the projected oracle, including sound rejection. The accuracy denominator is 4(depth(n)+1)ceil(1/epsilon). This proves correctness of the computable function; a finite RAM implementation and its uniform complexity bound are still needed for the main theorem.
Builds on
Used by
From Mathlib
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments