A fixed RAM program constructing the complete moment LP
Lax263307.NativeMomentLP · concepts/Lax263307/NativeMomentLP.lean · lax-263307
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
One finite RAM program constructs the exact dense rational moment LP from its graph, target k and level r. It generates the coordinate catalog, computes cardinality and independence metadata, writes all six matrix row families, and appends the bound and objective vectors. If N is the catalog size, both execution time and sufficient word width are bounded by c(n+k+r+N+2)^4 for one fixed constant c, uniformly at every larger width.
Concept map
Lean source view on GitHub
| 1 | import Lax263307.MomentLP |
| 2 | import Lax808846.Ram |
| 3 | import Lax109476.RationalEncoding |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: A fixed RAM program constructing the complete moment LP |
| 8 | type: theorem |
| 9 | --- |
| 10 | One finite RAM program constructs the exact dense rational moment LP from |
| 11 | its graph, target k and level r. It generates the coordinate catalog, |
| 12 | computes cardinality and independence metadata, writes all six matrix row |
| 13 | families, and appends the bound and objective vectors. If N is the catalog |
| 14 | size, both execution time and sufficient word width are bounded by |
| 15 | c(n+k+r+N+2)^4 for one fixed constant c, uniformly at every larger width. |
| 16 | |
| 17 | # Formalization notes |
| 18 | |
| 19 | Physical input is n, k, r, n squared, followed by the row-major adjacency |
| 20 | bits. Output is the registered RationalEncoding.encodeProgram format, |
| 21 | including its dimension header and canonical rational triples. The program |
| 22 | uses only the N catalog masks, without any array indexed by all 2^n masks. |
| 23 | Solver invocation and the recursive QPTAS driver are separate obligations. |
| 24 | -/ |
| 25 | |
| 26 | namespace Lax263307.NativeMomentLP |
| 27 | |
| 28 | def encodeInput {n : ℕ} (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (k r : ℕ) : List ℕ := |
| 29 | n::k::r::(n*n)::(List.ofFn fun u => List.ofFn fun v => if G.Adj u v then 1 else 0).flatten |
| 30 | |
| 31 | axiom exists_program : ∃ p : Lax808846.Ram.Program, ∃ c : ℕ,0 < c ∧ |
| 32 | ∀ (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (k r width : ℕ), |
| 33 | c*(n+k+r+MomentLP.dimension n r+2)^4 ≤ width → |
| 34 | ∃ t ≤ c*(n+k+r+MomentLP.dimension n r+2)^4,Lax808846.Ram.RunsTo width p (encodeInput G k r) |
| 35 | (Lax109476.RationalEncoding.encodeProgram (MomentLP.program G k r)) t |
| 36 | |
| 37 | end Lax263307.NativeMomentLP |
| 38 |
Formalization notes
Physical input is n, k, r, n squared, followed by the row-major adjacency bits. Output is the registered RationalEncoding.encodeProgram format, including its dimension header and canonical rational triples. The program uses only the N catalog masks, without any array indexed by all 2^n masks. Solver invocation and the recursive QPTAS driver are separate obligations.
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments