The moment relaxation as an explicit rational linear program

Lax263307.MomentLP · concepts/Lax263307/MomentLP.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

    Lemma

    Use the computable moment catalog as the LP variable order. Paired normalization rows, upper-bound rows, nonindependence rows, insertion monotonicity rows, and paired conditioned-mass rows encode the relaxation exactly. Primal nonnegativity supplies the coordinate lower bounds. The resulting rational LP has N variables and 2+4N+Nn rows, where N≤(r+3)(n+1)^(r+2).

    Concept map
    15 concepts; 7 descendants hidden
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    This concept declares 4 statements. Each proof establishes one of them relative to its assumptions.

    1 decode_encode proven

    2 evaluate_encoding proven

    4 single_row_value proven

    Lean source view on GitHub

    1import Lax263307.CoordinateCatalog
    2import Lax263307.ComponentCutEncoding
    3import Lax109476.RationalCertificates
    4
    5/-!
    6---
    7title: The moment relaxation as an explicit rational linear program
    8type: lemma
    9---
    10Use the computable moment catalog as the LP variable order. Paired
    11normalization rows, upper-bound rows, nonindependence rows, insertion
    12monotonicity rows, and paired conditioned-mass rows encode the relaxation
    13exactly. Primal nonnegativity supplies the coordinate lower bounds.
    14The resulting rational LP has N variables and 2+4N+Nn rows, where
    15N≤(r+3)(n+1)^(r+2).
    16
    17# Formalization notes
    18
    19All finite index concatenations and graph independence tests are computable.
    20Rows indexed by sets of size r+2 are inactive in the two families restricted
    21to size at most r+1. Collected component-cut coefficients can use the same
    22catalog order, with evaluation exactly equal to a native finite dot product.
    23Dense input construction and solver execution on RAM remain separate bounds.
    24-/
    25
    26namespace Lax263307.MomentLP
    27
    28open ComponentCutEncoding (evaluate)
    29open LinearRelaxation CoordinateCatalog
    30open Lax109476.LinearProgram Lax109476.RationalCertificates
    31
    32abbrev dimension (n r : ℕ) : ℕ := (catalog n r).length
    33abbrev Index (n r : ℕ) := Fin (dimension n r)
    34
    35/-- Row blocks for normalization, coordinate bounds, independence, monotonicity, and mass. -/
    36abbrev rowCount (n r : ℕ) : ℕ :=
    37 let N := dimension n r
    38 2 + (N + (N + (N * n + (N + N))))
    39
    40def decode {K : Type} {n r : ℕ} (x : Index n r → K) : Coordinate n r → K :=
    41 fun A => x ((indexing n r).symm A)
    42
    43def encode {K : Type} {n r : ℕ} (y : Coordinate n r → K) : Index n r → K :=
    44 fun j => y (indexing n r j)
    45
    46def singleRow {n r : ℕ} (A : Finset (Fin n)) (j : Index n r) : ℚ :=
    47 if A = (indexing n r j).val then 1 else 0
    48
    49def monotoneRow {n r : ℕ} (A : Finset (Fin n)) (v : Fin n) (j : Index n r) : ℚ :=
    50 singleRow (insert v A) j - singleRow A j
    51
    52def massRow {n r : ℕ} (A : Finset (Fin n)) (k : ℕ) (j : Index n r) : ℚ :=
    53 (∑ v, singleRow (insert v A) j) - (k : ℚ) * singleRow A j
    54
    55def program {n : ℕ} (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (k r : ℕ) :
    56 Program ℚ (rowCount n r) (dimension n r) where
    57 A := Fin.addCases
    58 (fun i : Fin 2 => fun j => if i = 0 then singleRow ∅ j else -singleRow ∅ j)
    59 (Fin.addCases
    60 (fun i : Index n r => singleRow (indexing n r i).val)
    61 (Fin.addCases
    62 (fun i : Index n r => fun j =>
    63 if G.IsIndepSet ((indexing n r i).val : Set (Fin n)) then 0 else singleRow (indexing n r i).val j)
    64 (Fin.addCases
    65 (fun i : Fin (dimension n r * n) =>
    66 let uv := finProdFinEquiv.symm i
    67 if (indexing n r uv.1).val.card ≤ r + 1 then
    68 monotoneRow (indexing n r uv.1).val uv.2 else fun _ => 0)
    69 (Fin.addCases
    70 (fun i : Index n r =>
    71 if (indexing n r i).val.card ≤ r + 1 then massRow (indexing n r i).val k else fun _ => 0)
    72 (fun i : Index n r => fun j =>
    73 if (indexing n r i).val.card ≤ r + 1 then -massRow (indexing n r i).val k j else 0)))))
    74 b := Fin.addCases (fun i : Fin 2 => if i = 0 then 1 else -1)
    75 (Fin.addCases (fun _ : Index n r => 1) (fun _ => 0))
    76 c := fun _ => 0
    77
    78axiom decode_encode {K : Type} {n r : ℕ} (y : Coordinate n r → K) : decode (encode y) = y
    79
    80axiom single_row_value {n r : ℕ} (x : Index n r → ℝ) (A : Finset (Fin n)) :
    81 (∑ j, (singleRow A j : ℝ) * x j) = value (decode x) A
    82
    83axiom primal_characterization {n : ℕ} (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (k r : ℕ)
    84 (x : Index n r → ℝ) :
    85 PrimalFeasible (toReal (program G k r)) x ↔ IsFeasible G k r (decode x)
    86
    87axiom evaluate_encoding {n r : ℕ} (a : Coordinate n r → ℤ) (x : Index n r → ℝ) :
    88 evaluate a (decode x) =
    89 (fun j => ((encode a j : ℤ) : ℝ)) ⬝ᵥ x
    90
    91end Lax263307.MomentLP
    92
    Show ProofShow ProofShow ProofShow Proof
    Formalization notes

    All finite index concatenations and graph independence tests are computable. Rows indexed by sets of size r+2 are inactive in the two families restricted to size at most r+1. Collected component-cut coefficients can use the same catalog order, with evaluation exactly equal to a native finite dot product. Dense input construction and solver execution on RAM remain separate bounds.

    Discussion

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

    Loading discussion…