Native RAM execution of the weight-to-multiplicity reduction
Lax263307.NativeWeightReduction · concepts/Lax263307/NativeWeightReduction.lean · lax-263307
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
One fixed finite RAM program reads the exact unprefixed weighted-graph input, clips negative weights, finds the maximum, and emits the rounded copy counts in vertex order. Its running time and sufficient word width are at most c(n+h+1)^2 when all rational numerators and denominators are at most 2^h. The guarantee holds at every larger word width.
Concept map
Lean source view on GitHub
| 1 | import Lax263307.WeightRounding |
| 2 | import Lax808846.Ram |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Native RAM execution of the weight-to-multiplicity reduction |
| 7 | type: theorem |
| 8 | --- |
| 9 | One fixed finite RAM program reads the exact unprefixed weighted-graph input, |
| 10 | clips negative weights, finds the maximum, and emits the rounded copy counts |
| 11 | in vertex order. Its running time and sufficient word width are at most |
| 12 | c(n+h+1)^2 when all rational numerators and denominators are at most 2^h. |
| 13 | The guarantee holds at every larger word width. |
| 14 | |
| 15 | # Formalization notes |
| 16 | |
| 17 | The proof compiles the checked input, maximum, accuracy, multiplicity, and |
| 18 | output loops through the registered RAM simulation theorem. Empty graphs |
| 19 | and instances with no positive weight are included. This implements the |
| 20 | multiplicity calculation; constructing the blow-up and executing the |
| 21 | recursive independent-set algorithm remain separate native obligations. |
| 22 | -/ |
| 23 | |
| 24 | namespace Lax263307.NativeWeightReduction |
| 25 | |
| 26 | open WeightedIndependentSet WeightRounding |
| 27 | |
| 28 | axiom exists_program : ∃ p : Lax808846.Ram.Program, ∃ c : ℕ, 0<c ∧ |
| 29 | ∀ (n h : ℕ), 1≤h → ∀ (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] |
| 30 | (w : Fin n → ℚ) (ε : ℚ), 0<ε → |
| 31 | (∀ i,(w i).num.natAbs≤2^h ∧ (w i).den≤2^h) → |
| 32 | ε.num.natAbs≤2^h → ε.den≤2^h → |
| 33 | ∀ width : ℕ,c*(n+h+1)^2≤width → |
| 34 | ∃ t≤c*(n+h+1)^2,Lax808846.Ram.RunsTo width p (encodeInput G w ε) |
| 35 | (List.ofFn (copies (fun i => max (w i) 0) ε)) t |
| 36 | |
| 37 | end Lax263307.NativeWeightReduction |
| 38 |
Formalization notes
The proof compiles the checked input, maximum, accuracy, multiplicity, and output loops through the registered RAM simulation theorem. Empty graphs and instances with no positive weight are included. This implements the multiplicity calculation; constructing the blow-up and executing the recursive independent-set algorithm remain separate native obligations.
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments