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