Computing balanced light separators from registered flow-cut outputs
Lax263307.ComputedSeparators · concepts/Lax263307/ComputedSeparators.lean · lax-263307
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
Label each remaining vertex set in increasing order, construct its rational split network, and read the cut membership prefix of the registered Leighton–Rao solver's output. Orient the two projected shores by size. Repeat until the remainder has at most two thirds of the original vertices. The computed list has at most n cuts. Its separator has the stated cost, and its computed pieces form a balanced partition with no cross edges.
Concept map
Evidence
Each proof establishes this claim relative to its assumptions.
Lean source view on GitHub
| 1 | import Lax263307.LightSeparators |
| 2 | import Mathlib.Data.Finset.Sort |
| 3 | import Mathlib.Data.List.GetD |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Computing balanced light separators from registered flow-cut outputs |
| 8 | type: theorem |
| 9 | --- |
| 10 | Label each remaining vertex set in increasing order, construct its rational |
| 11 | split network, and read the cut membership prefix of the registered |
| 12 | Leighton–Rao solver's output. Orient the two projected shores by size. |
| 13 | Repeat until the remainder has at most two thirds of the original vertices. |
| 14 | The computed list has at most n cuts. Its separator has the stated cost, |
| 15 | and its computed pieces form a balanced partition with no cross edges. |
| 16 | |
| 17 | # Formalization notes |
| 18 | |
| 19 | All labels, rational capacities, output decoding, shore choices, and the |
| 20 | bounded cut-list loop are computable. The solver retains its actual registered |
| 21 | RAM polynomial-time guarantee. This statement proves the wrapper's functional |
| 22 | correctness; the RAM implementation and time bound for its surrounding loops |
| 23 | remain separate obligations. |
| 24 | -/ |
| 25 | |
| 26 | namespace Lax263307.ComputedSeparators |
| 27 | |
| 28 | open scoped NNRat |
| 29 | open Lax263307.VertexSplitting Lax455465.RationalEncoding |
| 30 | |
| 31 | def decodeCut (n : ℕ) (words : List ℕ) : Finset (Fin n) := |
| 32 | Finset.univ.filter fun v => words.getD v.val 0 = 1 |
| 33 | |
| 34 | def label {n : ℕ} (R : Finset (Fin n)) : Fin R.card ↪o Fin n := |
| 35 | R.orderEmbOfFin rfl |
| 36 | |
| 37 | def restriction {n : ℕ} (G : SimpleGraph (Fin n)) (R : Finset (Fin n)) : |
| 38 | SimpleGraph (Fin R.card) := G.comap (label R) |
| 39 | |
| 40 | instance {n : ℕ} (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (R : Finset (Fin n)) : |
| 41 | DecidableRel (restriction G R).Adj := inferInstanceAs (DecidableRel (G.comap (label R)).Adj) |
| 42 | |
| 43 | def ratio (B n : ℕ) : ℚ := B * ((Nat.log2 (2 * n) : ℚ) + 1) |
| 44 | def scale (n ℓ k : ℕ) : ℚ := (ℓ : ℚ) * n ^ 2 / (3 * k) |
| 45 | |
| 46 | def largeCapacity (B n r ℓ k : ℕ) : ℚ≥0 := |
| 47 | (Nat.ceil (ratio B n * (2 * r : ℕ) ^ 2 / scale n ℓ k) + 1 : ℕ) |
| 48 | |
| 49 | def orient {n : ℕ} (A B : Finset (Fin n)) : Finset (Fin n) × Finset (Fin n) := |
| 50 | if B.card ≤ A.card then (A, B) else (B, A) |
| 51 | |
| 52 | def step {n : ℕ} (solve : List ℕ → List ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] |
| 53 | (x : Fin n → ℚ≥0) (B ℓ k : ℕ) (R : Finset (Fin n)) : |
| 54 | Finset (Fin n) × Finset (Fin n) := |
| 55 | let I := splitInstance (restriction G R) (fun v => x (label R v)) |
| 56 | (largeCapacity B n R.card ℓ k) |
| 57 | let U := decodeCut (2 * R.card) (solve (encodeInput .directed I)) |
| 58 | let shores := orient (leftShore U) (rightShore U) |
| 59 | (shores.1.image (label R), shores.2.image (label R)) |
| 60 | |
| 61 | def cuts {n : ℕ} (cut : Finset (Fin n) → Finset (Fin n) × Finset (Fin n)) : |
| 62 | ℕ → Finset (Fin n) → List (Finset (Fin n) × Finset (Fin n)) |
| 63 | | 0, _ => [] |
| 64 | | fuel + 1, R => |
| 65 | if 3 * R.card ≤ 2 * n then [] |
| 66 | else let s := cut R |
| 67 | s :: cuts cut fuel (s.1 \ s.2) |
| 68 | |
| 69 | def separator {n : ℕ} (cs : List (Finset (Fin n) × Finset (Fin n))) : Finset (Fin n) := |
| 70 | cs.foldr (fun s S => (s.1 ∩ s.2) ∪ S) ∅ |
| 71 | |
| 72 | def remaining {n : ℕ} (start : Finset (Fin n)) |
| 73 | (cs : List (Finset (Fin n) × Finset (Fin n))) : Finset (Fin n) := |
| 74 | if h : cs.length = 0 then start else |
| 75 | let s := cs.get ⟨cs.length - 1, by omega⟩ |
| 76 | s.1 \ s.2 |
| 77 | |
| 78 | def pieces {n : ℕ} (cs : List (Finset (Fin n) × Finset (Fin n))) : |
| 79 | Option (Fin cs.length) → Finset (Fin n) |
| 80 | | none => remaining Finset.univ cs |
| 81 | | some i => (cs.get i).2 \ (cs.get i).1 |
| 82 | |
| 83 | open Lax263307.GraphClasses Lax263307.PowerBagBounds |
| 84 | open Lax263307.Entropy Lax263307.RepeatedCutAccounting |
| 85 | |
| 86 | axiom light_separator (C : GraphClass) (hereditary : IsHereditary C) |
| 87 | (a A : ℕ) (ha : 0 < a) (hA : 0 < A) (class_bound : HasPowerBagBound C a A) : |
| 88 | ∃ (solve : List ℕ → List ℕ) (K B : ℕ), Lax759944.RamPolytime.RamPolytime solve ∧ |
| 89 | 0 < K ∧ 0 < B ∧ ∀ (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj], |
| 90 | G ∈ C n → 0 < n → ∀ (x : Fin n → ℚ≥0) (k p ℓ : ℕ), |
| 91 | 0 < k → 0 < p → 0 < ℓ → |
| 92 | (∀ v, (x v : ℝ) ≤ 1) → (∑ v, (x v : ℝ)) ≤ k → |
| 93 | edgeCost G (fun v => (x v : ℝ)) ≤ (k : ℝ) ^ 2 / p → |
| 94 | (K : ℝ) * ((ℓ : ℝ) + 1) ^ (4 * a + 2) ≤ k → |
| 95 | (2 * K : ℝ) * ((ℓ : ℝ) + 1) ^ (4 * a + 2) ≤ p → |
| 96 | let cs := cuts (step solve G x B ℓ k) n Finset.univ |
| 97 | cs.length ≤ n ∧ |
| 98 | Lax263307.EdgeSublinearSeparators.IsBalancedSeparator G |
| 99 | (Lax263307.ComputedSeparators.separator cs) ∧ |
| 100 | cost (fun v => (x v : ℝ)) (Lax263307.ComputedSeparators.separator cs) ≤ |
| 101 | 12 * (ratio B n : ℝ) * k / ℓ ∧ |
| 102 | ∃ P : Lax263307.SeparatorComponents.Partition G |
| 103 | (Lax263307.ComputedSeparators.separator cs) (Option (Fin cs.length)), |
| 104 | (∀ i, P.vertices i = pieces cs i) ∧ ∀ i, 3 * (P.vertices i).card ≤ 2 * n |
| 105 | |
| 106 | end Lax263307.ComputedSeparators |
| 107 |
Formalization notes
All labels, rational capacities, output decoding, shore choices, and the bounded cut-list loop are computable. The solver retains its actual registered RAM polynomial-time guarantee. This statement proves the wrapper's functional correctness; the RAM implementation and time bound for its surrounding loops remain separate obligations.
Builds on
Used by
From Mathlib
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments