is_cp_derivation
A Cutting Planes (CP) derivation from a CNF formula F : Finset (Finset (CnfLit (Fin n))) is a list π : List (LinIneq n) where each line π[i] is: (1) the trivial line 0 ≥ 0 with zero coefficients and zero constant; (2) a Boolean box axiom x_v ≥ 0 or -x_v ≥ -1 for some v : Fin n; (3) an embedded clause C ∈ F; (4) a linear combination of two earlier lines π[j], π[k] (j, k < i) with non-negative integer coefficients lam1, lam2 : ℕ; or (5) a division (rounding) step from an earlier line π[j] (j < i) with integer α > 0 such that π[j].coeffs = α * π[i].coeffs and π[i].const = ⌈π[j].const / α⌉.
Statement
def is_cp_derivation (n : ℕ) (F : Finset (Finset (CnfLit (Fin n)))) (π : List (LinIneq n)) : Prop
- Defined in
- arXiv:2611.24548 Definition 4.1
- Verified
- 19 Nov 2026
- Axioms
- none listed
- Built on 3
- LinIneqA linear inequality c^T x ≥ d over n Boolean variables, with integer coefficient vector c : Fin n → ℤ and integer constant term d : ℤ.
- CnfLitA CNF literal over a variable type V is either a positive variable or a negated variable.
- cnf_lit_decidable_eqDecidable equality on CNF literals, derived from decidable equality on the underlying variables.
- Used by 1
- is_cp_refutationA Cutting Planes refutation of a CNF formula F : Finset (Finset (CnfLit (Fin n))) is a CP derivation π : List (LinIneq n) from F…
Read back from the Lean
is_cp_derivation n F π defines a predicate on a list of linear inequalities π : List (LinIneq n) with respect to a CNF formula F : Finset (Finset (CnfLit (Fin n))) on n variables.
It asserts that for every index i : Fin π.length, the i-th inequality π[i] satisfies at least one of the following six rules:
1. **Trivial zero axiom:** Every coefficient π[i].coeffs j is 0 (for all j : Fin n) and the constant π[i].const is 0 (representing $0 \ge 0$).
2. **Variable lower bound axiom ($x_v \ge 0$):** There exists a variable v : Fin n such that for all j : Fin n, π[i].coeffs j = 1 if j = v and 0 otherwise, and π[i].const = 0.
3. **Variable upper bound axiom ($x_v \le 1$, i.e., $-x_v \ge -1$):** There exists a variable v : Fin n such that for all j : Fin n, π[i].coeffs j = -1 if j = v and 0 otherwise, and π[i].const = -1.
4. **Clause axiom:** There exists a clause C ∈ F such that:
- for every variable j : Fin n, π[i].coeffs j = (if CnfLit.pos j ∈ C then 1 else 0) - (if CnfLit.neg j ∈ C then 1 else 0), and
- π[i].const = 1 - ∑ j : Fin n, (if CnfLit.neg j ∈ C then (1 : ℤ) else 0).
5. **Non-negative linear combination rule:** There exist strictly earlier indices j, k < i in π and natural numbers lam1, lam2 : ℕ such that:
- for all variables m : Fin n, π[i].coeffs m = (lam1 : ℤ) * π[j].coeffs m + (lam2 : ℤ) * π[k].coeffs m, and
- π[i].const = (lam1 : ℤ) * π[j].const + (lam2 : ℤ) * π[k].const.
6. **Chvátal-Gomory cut / division rule:** There exist a strictly earlier index j < i in π and an integer α > 0 such that:
- for all variables m : Fin n, π[j].coeffs m = α * π[i].coeffs m (i.e., α divides every coefficient of π[j], yielding π[i]), and
- π[i].const = ⌈(π[j].const : ℚ) / (α : ℚ)⌉ (the ceiling of the division of π[j].const by α).
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
/-- A Cutting Planes (CP) derivation from a CNF formula F. -/ def is_cp_derivation (n : ℕ) (F : Finset (Finset (CnfLit (Fin n)))) (π : List (LinIneq n)) : Prop := ∀ i : Fin π.length, ( (∀ j, π[i].coeffs j = 0) ∧ π[i].const = 0 ) ∨ ( ∃ v : Fin n, (∀ j, π[i].coeffs j = if j = v then 1 else 0) ∧ π[i].const = 0 ) ∨ ( ∃ v : Fin n, (∀ j, π[i].coeffs j = if j = v then -1 else 0) ∧ π[i].const = -1 ) ∨ ( ∃ C ∈ F, (∀ j, π[i].coeffs j = (if CnfLit.pos j ∈ C then 1 else 0) - (if CnfLit.neg j ∈ C then 1 else 0)) ∧ π[i].const = 1 - ∑ j : Fin n, (if CnfLit.neg j ∈ C then (1 : ℤ) else 0) ) ∨ ( ∃ (j k : Fin π.length) (lam1 lam2 : ℕ), j < i ∧ k < i ∧ (∀ m, π[i].coeffs m = (lam1 : ℤ) * π[j].coeffs m + (lam2 : ℤ) * π[k].coeffs m) ∧ π[i].const = (lam1 : ℤ) * π[j].const + (lam2 : ℤ) * π[k].const ) ∨ ( ∃ (j : Fin π.length) (α : ℤ), j < i ∧ 0 < α ∧ (∀ m, π[j].coeffs m = α * π[i].coeffs m) ∧ π[i].const = ⌈(π[j].const : ℚ) / (α : ℚ)⌉ )