pith. machine review for the scientific record. sign in
def definition def or abbrev high

mentionsVarXOR

show as:
view Lean formalization →

The definition checks whether a given variable index occurs in the support list of an XOR constraint. Researchers handling mixed CNF-XOR SAT instances in complexity reductions would cite it when decomposing constraints for uniform processing. It is realized as a direct list scan that applies the .any combinator to the vars field of the input structure.

claimLet $X$ be an XOR constraint over $n$ variables, given by a list of indices together with a parity bit. For a variable index $v$, the predicate mentionsVarXOR$(X,v)$ returns true precisely when $v$ appears in the variable list of $X$.

background

The module treats constraints as either CNF clauses or XOR checks. Var $n$ is the type Fin $n$ of variable indices for a problem of size $n$. XORConstraint $n$ is the structure whose fields are a list of such indices and a Boolean parity value.

proof idea

This is a one-line wrapper that applies the list membership test .any to the vars field of the supplied XORConstraint, using decide on equality with the target variable.

why it matters in Recognition Science

It supplies the XOR case for the mixed-constraint predicate mentionsVar, which dispatches on Constraint to either clause or XOR inspection. The definition therefore supports uniform variable tracking across hybrid constraint systems in the SAT.PC module.

scope and limits

Lean usage

match K with | .xor X => mentionsVarXOR X v

formal statement (Lean)

  26def mentionsVarXOR {n} (X : XORConstraint n) (v : Var n) : Bool :=

proof body

Definition body.

  27  X.vars.any (fun u => decide (u = v))
  28
  29/-- Whether a variable is mentioned in a mixed constraint. -/

used by (1)

From the project-wide theorem graph. These declarations reference this one in their body.

depends on (6)

Lean names referenced from this declaration's body.