treelike_cp_size
The unary size of a treelike Cutting Planes derivation tree d, defined recursively as 1 plus the unary size lin_ineq_unary_size L of the root inequality L, plus the sum of treelike_cp_size over all direct sub-derivations.
Statement
def treelike_cp_size {n : ℕ} {F : List (List (CnfLit (Fin n)))} {L : LinIneq n} (d : TreelikeCpDerivation n F L) : ℕ- Defined in
- arXiv:2611.24548 Sec 2.1 & Def 4.1
- Verified
- 19 Nov 2026
- Axioms
- none listed
- Built on 6
- TreelikeCpDerivationInductive type family of treelike Cutting Planes (CP) derivations of a linear inequality from a CNF formula F over n variables (given as a…
- CnfLitA CNF literal over a variable type V is either a positive variable or a negated variable.
- lin_ineq_unary_sizeThe unary size of a linear inequality c^T x ≥ d, defined as the sum of absolute values of its coefficients plus |d| + 1.
- LinIneqA linear inequality c^T x ≥ d over n Boolean variables, with integer coefficient vector c : Fin n → ℤ and integer constant term d : ℤ.
- cnf_clause_to_linThe linear inequality embedding of a CNF clause C over n variables, asserting ∑_{l ∈ C} [l] ≥ 1 where [x_i] = x_i and [~x_i] = 1 - x_i.
- cnf_lit_decidable_eqDecidable equality on CNF literals, derived from decidable equality on the underlying variables.
Read back from the Lean
A definition treelike_cp_size that computes a natural number (the size) for a tree-like Cutting Planes derivation d : TreelikeCpDerivation n F L of a linear inequality L : LinIneq n from a CNF formula F : List (List (CnfLit (Fin n))) on n : ℕ variables.
The size is defined recursively on d as 1 + lin_ineq_unary_size L plus:
- 0 if d is an axiom/leaf rule (.trivial, .box_lower i, .box_upper i, or .clause C hC);
- treelike_cp_size d₁ + treelike_cp_size d₂ if d is a linear combination .lin_comb d₁ d₂ lam1 lam2;
- treelike_cp_size d' if d is a division rule .division d' c α hα hdiv.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- Unary size of a treelike Cutting Planes derivation tree. -/ def treelike_cp_size {n : ℕ} {F : List (List (CnfLit (Fin n)))} {L : LinIneq n} (d : TreelikeCpDerivation n F L) : ℕ := 1 + lin_ineq_unary_size L + match d with | .trivial => 0 | .box_lower _ => 0 | .box_upper _ => 0 | .clause _ _ => 0 | .lin_comb d₁ d₂ _ _ => treelike_cp_size d₁ + treelike_cp_size d₂ | .division d _ _ _ _ => treelike_cp_size d