Expand description
The ordering-principle specialist — a polynomial-time recognizer + refuter for GT(n), the linear-ordering contradiction. GT(n) asserts a strict total order (totality + antisymmetry + transitivity) in which every element has a strictly greater one (“no maximum”). That is impossible: a finite strict total order always has a maximum. So a complete GT(n) core is unsatisfiable, and any formula containing it (a superset of an UNSAT core) is UNSAT.
The general cascade decides GT(n) only by super-polynomial search (measured: GT(20) ≈ 2.7s, ~68k conflicts, growing ~10x every 4 steps). This module recognizes the structure directly and certifies UNSAT from it — polynomial, and instant where search walls.
Soundness is by faithful, conservative recognition, in the style of crate::pigeonhole: the
recognizer verifies, for a single consistent element/edge identification, that ALL of totality,
antisymmetry, transitivity (every ordered triple), and the no-maximum clause (every element) are
present. Only then is a complete GT(n) core certified present — and it is genuinely UNSAT. Any
missing, ambiguous, or extra-shaped piece makes the recognizer return None (never a false
refutation); the caller then falls through to the general engine. Full transitivity is essential:
without it a “no-maximum tournament” can be a satisfiable cycle (e.g. 0<1<2<0), so an incomplete
structure must not be refuted.
The refutation object is an OrderingCert: the element/edge identification, which a checker
re-verifies against the raw clauses (check_ordering_cert) with zero trust in how it was produced.
Structs§
- Ordering
Cert - A re-checkable ordering-principle refutation: the recovered element/edge identification of a complete
GT(n) core.
edge[i * n + j]is the comparison variablex_ij(“i < j”) for the ordered pair(i, j); diagonal entries (i == j) areu32::MAXand unused. Given this map a checker re-verifies that every totality, antisymmetry, transitivity, and no-maximum clause is present — the whole certificate, no trust in the recognizer.
Functions§
- check_
ordering_ cert - Re-check an
OrderingCertagainst the rawclausesfrom scratch, trusting nothing about how it was produced: verify that for its element/edge identification EVERY totality, antisymmetry, transitivity, and no-maximum clause is present.trueiff the certificate genuinely witnesses a complete GT(n) core (which is unsatisfiable), so the formula is UNSAT. - ordering_
certificate - Recover a complete ordering-principle (GT(n)) core from
clauses, orNoneif there is none. OnSome(cert)the formula is unsatisfiable (a finite strict total order has a maximum, contradicting the no-maximum clauses), andcertre-checks viacheck_ordering_cert. Conservative / fail-closed — never a false certificate. See the module docs. - refute_
ordering - Refute a formula that contains a complete ordering-principle core.
trueiff a certificate is recovered — seeordering_certificate. Never a false refutation. - refutes_
ordering_ principle - The ordering cut over a
ProofExpr: clausify and run the specialist. This is the entry the cascade (crate::sat::prove_unsat) calls.