Automated reasoning tools called SMT solvers check whether a logical formula can be made true. A single formula often mixes several kinds of data, such as lists and trees, fixed-width machine integers, and arrays. The solver handles this by running a separate reasoning engine for each kind of data and making the engines agree on which shared variables are equal. That agreement is called an arrangement: a partition of the variables into equality classes. When one of the data kinds is finite, as with 4-bit words that have only 16 values, the classic method for combining engines can give wrong answers. The repair is polite combination. It requires guessing an arrangement over all variables of the shared sort, including many fresh variables that the "polite" engine invents only to show how many domain elements it needs. The number of possible arrangements grows like the Bell numbers, which is faster than exponential.
This note makes one claim. Most of those invented variables are interchangeable. The polite engine's verdict does not change when they are renamed, and the other engine never mentions them. Guessing how they are partitioned is therefore wasted work. For these variables it should be enough to state how many distinct values they must take and pass that number to the other engine as a cardinality constraint. The idea comes from descriptive complexity's notion of order-invariance: the properties that matter are the ones unchanged under every relabeling. We propose to prove when this collapse is sound, to establish that it holds for the standard algebraic-datatype theory, to build it into cvc5, and to measure whether it matters in practice. We also state plainly the condition under which it would not matter.
Background and the Gap
Polite combination was put on firm footing by Polite Theories Revisited. It rests on a witness function: a computable rewrite of a formula that exposes, through fresh variables, a finite domain size sufficient to satisfy it. Later work sharpened the conditions under which this is sound. Politeness and Stable Infiniteness: Stronger Together separated weak politeness from strong politeness. Politeness for the Theory of Algebraic Datatypes and its journal version Polite Combination of Algebraic Datatypes introduced additivity and used it to prove the SMT-LIB datatype theory strongly polite. Combining Combination Properties, Part I and The Nonexistence of Unicorns together showed that stable infiniteness plus strong finite witnessability is enough.
All of this work shrinks the proof obligation for showing a theory is polite. None of it shrinks the search the solver must perform, which is the gap we target. The one operational improvement, Combining Stable Infiniteness and (Strong) Politeness, avoids full arrangements on sorts that happen to be stably infinite. It cannot help on genuinely finite shared sorts such as bit-vectors. Our proposal is aimed at exactly that case.
The order-invariance literature supplies the lens rather than the machinery. Order-Invariant Types and Their Applications shows that invariant properties compose across disjoint unions through their types. Model-Checking on Ordered Structures shows that fixing an arbitrary order can make model checking harder, while invariance can restore tractability. Together these motivate quotienting by symmetry directly. The common engineering fix instead breaks symmetry with an arbitrary lexicographic order. The file contains no prior paper that quotients polite arrangements by symmetry.
Core Claim
Let $T_1$ be strongly polite over sort $\sigma$ with witness $wtn$. Let $T_2$ be an arbitrary disjoint theory. Write $V$ for the variables of sort $\sigma$ in $wtn(\phi_1)$, and $W \subseteq V$ for those that satisfy two conditions. First, they do not occur in the $T_2$-part $\phi_2$. Second, $wtn(\phi_1)$ is invariant, up to renaming, under a group $G$ of permutations of $W$. We call $G$ the witness symmetry group.
The claim is that satisfiability of $\phi_1 \wedge \phi_2$ is decided correctly by enumerating only two things: arrangements of $V \setminus W$, and, for each one, a single number $k$ bounding how many new classes $W$ contributes. $T_2$ then checks
$$\phi_2 \wedge \delta_{V\setminus W} \wedge \mathrm{atleast}_\sigma(m + k),$$
where $\delta_{V\setminus W}$ is the arrangement on the shared-with-$T_2$ variables, $m$ is its number of classes, and $\mathrm{atleast}_\sigma(n)$ says the $\sigma$-domain has at least $n$ elements. Satisfiability on the $T_1$ side reduces to checking one canonical representative per orbit of $G$.
The intuition is simple. $T_2$ cannot see $W$, so its answer depends only on how many distinct $\sigma$-elements it must supply. $T_1$'s answer depends only on the $G$-orbit of the arrangement. When $G$ acts as the full symmetric group on a block of $W$, the orbits are exactly the integer partitions of that block. Enumeration then falls from Bell numbers to partition numbers.
Where $T_1$ is also smooth, meaning that anything satisfiable in a small domain stays satisfiable in any larger one, we expect a further step. It should be enough to find the least $k$ for which $T_1$ is satisfiable, which turns a case split into a monotone search. The hypothesis of this step is that such monotonicity holds; proving it is part of the research program.
Research Program
Theory. We first state the quotient theorem in general form and prove it. The completeness direction should follow the existing strong-politeness argument: if a model exists, some arrangement works, and every arrangement in its orbit is equally good. We then prove that the datatype witnesses $wtn_i$ and $wtn_f$ of Polite Combination of Algebraic Datatypes have nontrivial witness symmetry groups. The fresh element variables they introduce to fill finite constructors and to lengthen chains of distinct values are candidates. We will check whether additivity, which concerns conjoining flat equalities, already forces the needed invariance.
We treat the Feferman–Vaught-style compositionality of Order-Invariant Types as an open analogy. We will ask whether the orbit type of a combined formula is determined by the orbit types of its parts, but the proposal does not depend on the answer.
Implementation. The witness symmetry group is computed syntactically from the output of the witness function, not by general automorphism search. The bet is that the witness function creates its symmetries, so the solver can record them for free when it generates the fresh variables. In cvc5 cvc5, we replace case splits over $W$ with a canonical-representative constraint on the datatype side and a lemma sending the cardinality bound to the bit-vector or finite-sort side.
Baselines
The naive reference point is full polite combination: guess arrangements over all of $V$, exactly as the textbook procedure prescribes. It shows how much the quotient removes when no other optimization is present. We will run it in the same cvc5 build with the quotient switched off.
The strongest existing method on this question is cvc5's shipped combination, including the hybrid scheme of Combining Stable Infiniteness and (Strong) Politeness. On the Diem smart-contract benchmark that paper reports total running time falling from 81.5 to 34.9 seconds (75%), theory-combination time falling from 20.3 to 3.4 seconds (83%), and 24% fewer shared terms tracked. We rerun it on the same machines with the same timeouts and default options, and we add our quotient on top.
On Diem, "beating" this baseline means a further significant cut in combination time with no loss in the number of problems solved. We expect Diem to leave little room, because its shared sorts are largely stably infinite and the hybrid already covers them. The decisive comparison is therefore on finite shared sorts. There, beating the baseline means solving strictly more problems within the timeout, or showing median combination time falling with a growth rate consistent with partition numbers rather than Bell numbers.
The symmetry-breaking baseline follows CVC4-SymBreak, which detects symmetries with graph-automorphism tools and adds lexicographic symmetry-breaking predicates. It reported solving 16,567 problems against CVC4's 15,662 on QF_NIA at SMT-COMP 2018. That tool targets a different logic, so we reimplement its method on our benchmarks and give it the same timeout.
Two ablations isolate our ingredients. The first uses orbit representatives but keeps explicit arrangements on the $T_2$ side, which separates the symmetry quotient from the cardinality handoff. The second applies the cardinality handoff without checking the invariance conditions. It is expected to be unsound on some inputs, and it shows that the conditions are doing real work rather than being a free heuristic.
Why not just…?
Why not just use SAT-level symmetry breaking? CVC4-SymBreak operates on the propositional skeleton and on theory atoms. The fresh witness variables are created inside the combination step, so they may never appear as atoms that such tools can see. Its gains were also modest, about 3–4% on QF_NIA. The reimplemented baseline tests directly whether generic symmetry breaking recovers our gains on finite-sort benchmarks. If it does, our contribution shrinks to the soundness theorem, and we will say so.
Why not just use hybrid Nelson–Oppen? It helps only when a sort is stably infinite on the other theory's side. With 4-bit or 8-bit bit-vector element sorts that condition fails by construction, and the hybrid falls back to full polite arrangements. Our finite-sort benchmark family is designed so that the hybrid provably cannot help, and it tests that claim.
Why not just trust the unicorn theorem and move on? The Nonexistence of Unicorns removes the obligation to prove smoothness when establishing politeness. It says nothing about the cost of running the combination. The two results are complementary rather than competing.
Why not just note that real solvers already combine theories lazily? This is the real threat. cvc5 does not literally enumerate Bell-many arrangements; it propagates equalities and splits only on demand. If lazy splitting already rarely touches the witness variables, the quotient buys nothing. We therefore instrument the number of equality case splits on witness-introduced variables before building anything. If that number is small across all benchmark families, we will report a theoretical result with a negative empirical finding rather than stretching the claim.
Proposed Experiments
We use four benchmark families. The first is the Diem suite used in Combining Stable Infiniteness and (Strong) Politeness and The Move Prover. The second is the SMT-LIB datatype and datatype-plus-bit-vector divisions, measured by problems solved; the file gives only cvc5's aggregate of 346,638 of 379,750 benchmarks, and no reported result found on Lacuna for these specific divisions. The third is the Isabelle (co)datatype goals of A Decision Procedure for (Co)datatypes, used as a regression check on inductive datatypes only, because co-datatypes lie outside the known strong-politeness results. The fourth is a new, parameterized family of datatype formulas over small bit-vector element sorts. Scaling the number of distinct list and tree variables forces witness growth past the size of the finite domain, which is exactly the regime where politeness is needed.
We measure problems solved, total time, combination time, and witness-variable case splits. The decisive check has two parts. The instrumentation must first show that default cvc5 performs many witness-variable splits on the finite-sort family. The quotient must then remove most of those splits while matching all baseline verdicts. If the first part fails, the empirical case collapses, and the note reports that honestly.
References
- Polite Theories Revisited
- Politeness and Stable Infiniteness: Stronger Together
- Politeness for the Theory of Algebraic Datatypes (Extended Abstract)
- Polite Combination of Algebraic Datatypes
- Combining Combination Properties, Part I: Nelson-Oppen and Politeness
- The Nonexistence of Unicorns and Many-Sorted Löwenheim-Skolem Theorems
- Combining Stable Infiniteness and (Strong) Politeness
- Order-Invariant Types and Their Applications
- Model-Checking on Ordered Structures
- cvc5: A Versatile and Industrial-Strength SMT Solver
- CVC4-SymBreak: Derived SMT solver at SMT Competition 2019
- The Move Prover
- A Decision Procedure for (Co)datatypes in SMT Solvers