While this submission is a draft, it cannot be used by other submissions.

A fixed RAM program constructing the complete moment LP

Lax263307.NativeMomentLP · concepts/Lax263307/NativeMomentLP.lean · lax-263307

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural 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
    22 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    Each proof establishes this claim relative to its assumptions.

    Lean source view on GitHub

    1import Lax263307.MomentLP
    2import Lax808846.Ram
    3import Lax109476.RationalEncoding
    4
    5/-!
    6---
    7title: A fixed RAM program constructing the complete moment LP
    8type: theorem
    9---
    10One finite RAM program constructs the exact dense rational moment LP from
    11its graph, target k and level r. It generates the coordinate catalog,
    12computes cardinality and independence metadata, writes all six matrix row
    13families, and appends the bound and objective vectors. If N is the catalog
    14size, both execution time and sufficient word width are bounded by
    15c(n+k+r+N+2)^4 for one fixed constant c, uniformly at every larger width.
    16
    17# Formalization notes
    18
    19Physical input is n, k, r, n squared, followed by the row-major adjacency
    20bits. Output is the registered RationalEncoding.encodeProgram format,
    21including its dimension header and canonical rational triples. The program
    22uses only the N catalog masks, without any array indexed by all 2^n masks.
    23Solver invocation and the recursive QPTAS driver are separate obligations.
    24-/
    25
    26namespace Lax263307.NativeMomentLP
    27
    28def 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
    31axiom 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
    37end Lax263307.NativeMomentLP
    38
    Show Proof
    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.

    Builds on
    Used by

    none

    From Mathlib

    none

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…