Documentation

LeanPool.DistinctDistances.S4PackedCertificateSummary

Checked summaries of weighted row subtrees #

Combine exact kernel-verified subtree results before applying the full certificate checker.

The quantities the certificate checker computes from a weighted tree.

  • cost : ℕ

    The weighted cost, including penalties for missing and invalid rows.

  • rhs : ℤ

    The weighted right-hand side.

  • positive : PackTrie

    The combined positive coefficients.

  • negative : PackTrie

    The combined negative coefficients.

Instances For

    The summary of a node combines its two child summaries.

    Equations
    Instances For
      structure Esgk.FarkasPackedCheck.SummaryValid {T : Type} (width : ℕ) (box : Box) (build : T → Option Row) (rows : WTree T) (summary : PackedSummary) :

      The four fields match the checker’s calculations for the original subtree.

      Instances For
        theorem Esgk.FarkasPackedCheck.SummaryValid.node {T : Type} {width : ℕ} {box : Box} {build : T → Option Row} {left right : WTree T} {leftSummary rightSummary : PackedSummary} (hl : SummaryValid width box build left leftSummary) (hr : SummaryValid width box build right rightSummary) :
        SummaryValid width box build (left.node right) (leftSummary.combine rightSummary)

        Exact child quantities imply the exact quantities for a node.

        noncomputable def Esgk.FarkasPackedCheck.checkSummary (width : ℕ) (box : Box) (summary : PackedSummary) :

        The checker’s final comparisons, performed on exact summary values.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem Esgk.FarkasPackedCheck.SummaryValid.checked {T : Type} {width : ℕ} {box : Box} {build : T → Option Row} {rows : WTree T} {summary : PackedSummary} (e : SummaryValid width box build rows summary) (h : checkSummary width box summary = true) :
          check width box build rows = true

          A passing exact summary certifies the original full tree.