The recursive oracle near the moment relaxation
Lax263307.NearOracle · concepts/Lax263307/NearOracle.lean · lax-263307
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
The oracle searches for a heavy conditioning set, computes separators, and queries the resulting parts. Its possible outputs are an independent set, a component cut, or rejection.
The correctness predicate requires an approximation guarantee for a found set and a valid inequality with a quantitative gap for a returned cut. It rules out rejection under the oracle's hypotheses.
Concept map
Lean source view on GitHub
| 1 | import Lax263307.ComputedSeparators |
| 2 | import Lax263307.ComputedRounding |
| 3 | import Lax263307.HeavyRationalConditioning |
| 4 | import Lax263307.AlgorithmParameters |
| 5 | |
| 6 | /-! |
| 7 | --- |
| 8 | title: The recursive oracle near the moment relaxation |
| 9 | type: definition |
| 10 | --- |
| 11 | The oracle searches for a heavy conditioning set, computes separators, |
| 12 | and queries the resulting parts. Its possible outputs are an independent |
| 13 | set, a component cut, or rejection. |
| 14 | |
| 15 | The correctness predicate requires an approximation guarantee for a found |
| 16 | set and a valid inequality with a quantitative gap for a returned cut. |
| 17 | It rules out rejection under the oracle's hypotheses. |
| 18 | |
| 19 | # Formalization notes |
| 20 | |
| 21 | `ChildCorrect` specifies the recursive answers on balanced parts. |
| 22 | `Correct` specifies the corresponding answer or cut at the current level. |
| 23 | The function itself is computable for the supplied flow solver and child |
| 24 | queries. |
| 25 | -/ |
| 26 | |
| 27 | namespace Lax263307.NearOracle |
| 28 | |
| 29 | open AlgorithmParameters (level load sparsity) |
| 30 | open ComponentCutEncoding (coefficient evaluate) |
| 31 | open ComputedRounding (collect) |
| 32 | open ComputedSeparators (cuts pieces step) |
| 33 | open HeavyRationalConditioning (findHeavyConditioning) |
| 34 | open scoped NNRat |
| 35 | open LinearRelaxation RationalConditioning |
| 36 | |
| 37 | def costs {n r : ℕ} (y : RationalVector n r) (A : Finset (Fin n)) (v : Fin n) : ℚ≥0 := |
| 38 | ⟨max 0 (rationalValue y (insert v A) / rationalValue y A), le_max_left _ _⟩ |
| 39 | |
| 40 | def order (q : ℕ) : List (Option (Fin q)) := none :: (List.finRange q).map some |
| 41 | |
| 42 | inductive Result (n : ℕ) |
| 43 | | found (vertices : Finset (Fin n)) |
| 44 | | cut (conditioning vertices : Finset (Fin n)) (bound : ℕ) |
| 45 | | reject |
| 46 | |
| 47 | def run {n : ℕ} (flow : List ℕ → List ℕ) (a K B D : ℕ) |
| 48 | (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (k : ℕ) |
| 49 | (y : RationalVector n (level a K B n D)) |
| 50 | (child : Finset (Fin n) → ℕ → Option (Finset (Fin n))) : Result n := |
| 51 | let p := sparsity a K B n D |
| 52 | match findHeavyConditioning G k p y with |
| 53 | | none => .reject |
| 54 | | some A => |
| 55 | let x := costs y A |
| 56 | let cs := cuts |
| 57 | (step flow G x B (load B n D) k) n Finset.univ |
| 58 | let parts := pieces cs |
| 59 | let c : Option (Fin cs.length) → ℚ := fun i => ∑ v ∈ parts i, (x v : ℚ) |
| 60 | match collect (order cs.length) parts (1 / D) k c |
| 61 | (fun i t => child (parts i) t) with |
| 62 | | .found I => .found I |
| 63 | | .cut C u => .cut A C u |
| 64 | |
| 65 | def ChildCorrect {n : ℕ} (G : SimpleGraph (Fin n)) (D h : ℕ) |
| 66 | (child : Finset (Fin n) → ℕ → Option (Finset (Fin n))) : Prop := |
| 67 | ∀ C : Finset (Fin n), 3 * C.card ≤ 2 * n → ∀ t : ℕ, |
| 68 | match child C t with |
| 69 | | some I => I ⊆ C ∧ G.IsIndepSet (I : Set (Fin n)) ∧ |
| 70 | (1 - 4 * (1 / (D : ℝ))) ^ h * (t : ℝ) ≤ I.card |
| 71 | | none => IsIndependenceBound G C (t - 1) |
| 72 | |
| 73 | def Correct {n r : ℕ} (G : SimpleGraph (Fin n)) (k h D : ℕ) (η : ℝ) |
| 74 | (x : MomentVector n r) : Result n → Prop |
| 75 | | .found I => G.IsIndepSet (I : Set (Fin n)) ∧ |
| 76 | (1 - 4 * (1 / (D : ℝ))) ^ (h + 1) * (k : ℝ) ≤ I.card |
| 77 | | .cut A C u => A.card ≤ r ∧ u ≤ n ∧ IsIndependenceBound G C u ∧ |
| 78 | (∀ z ∈ independentSetHull G k r, |
| 79 | evaluate (coefficient A C u) z ≤ 0) ∧ |
| 80 | η * (1 / (D : ℝ)) ^ 2 / (16 * n) ≤ |
| 81 | evaluate (coefficient A C u) x ∧ |
| 82 | (∑ T : Coordinate n r, |(coefficient A C u T : ℝ)|) ≤ 2 * n |
| 83 | | .reject => False |
| 84 | |
| 85 | end Lax263307.NearOracle |
| 86 |
Formalization notes
specifies the recursive answers on balanced parts. specifies the corresponding answer or cut at the current level. The function itself is computable for the supplied flow solver and child queries.
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments