Propositional Program Equivalence
- Propositional Program Equivalence is a family of semantic relations that determines when one program can substitute another while preserving observable behavior.
- Different frameworks like ASP, Krom logic, KAT, and PDL offer variants such as least-model, strong, and uniform equivalences, each with distinct criteria and applications.
- Algebraic and logical methods—including sequential composition, HT logic, and guarded-string automata—provide effective decision procedures and complexity insights for these equivalence notions.
Propositional program equivalence is a family of interchangeability relations for programs analyzed at propositional granularity. Its exact meaning depends on the semantic framework. In propositional Krom logic programs, equivalence may be defined by equality of least models, by subsumption, or by invariance under addition of facts; in answer set programming, the central notions are ordinary, strong, and uniform equivalence; in Kleene Algebra with Tests, equivalence means equality under all interpretations of primitive tests and actions; and in propositional dynamic logic, program equivalence can itself be a proposition stating equality of successor relations at a state (Antić, 2023, 0712.0948, Kappé, 10 Jul 2025, Goldblatt et al., 2011).
1. Semantic scope and basic notions
The literature does not use a single universal definition of propositional program equivalence. Rather, each framework fixes a semantics and then asks when one program can replace another without changing the relevant observable behavior. In answer set programming this behavior is usually the set of answer sets, possibly under arbitrary context extension; in positive Krom programs it is the least model or its closure under added facts; in KAT and GKAT it is control-flow behavior under all interpretations of primitive operations; and in PDL it is equality of reachable states from the current world (0712.0948, Kappé, 10 Jul 2025).
| Notion | Criterion | Setting |
|---|---|---|
| Least-model equivalence | Propositional Krom logic programs | |
| Subsumption equivalence | for all | Propositional Krom logic programs |
| Uniform equivalence | for every | Propositional Krom logic programs |
| Ordinary equivalence | Propositional ASP | |
| Strong equivalence | iff for every program | Propositional ASP |
| Uniform equivalence | iff 0 for every set of facts 1 | Propositional ASP |
| Propositional equivalence | 2 | KAT / GKAT |
| Program equivalence formula | 3 | PDL with equivalence operator |
A recurring distinction is between ordinary equivalence and substitutivity-based equivalence. Woltran emphasizes that ordinary equivalence requires only the same answer sets, whereas strong equivalence requires faithful replacement within any context program; uniform equivalence lies between these extremes by restricting contexts to facts (0712.0948). In KAT, by contrast, the intended abstraction ignores the internal meaning of primitive statements and tracks only how tests govern control flow and how actions interleave (Kappé, 10 Jul 2025).
2. Algebraic characterizations for propositional Krom logic programs
A propositional Krom logic program 4 over a finite nonempty alphabet 5 is a finite set of facts 6 and proper rules 7, with 8. Writing 9 for the set of facts and 0 for the set of proper rules, interpretations are subsets 1, and 2 has a unique 3-least model 4. Least-model equivalence is then 5 iff 6; subsumption equivalence is 7 iff 8 for all 9; and uniform equivalence is 0 iff 1 for every context 2 (Antić, 2023).
The central algebraic device is the sequential composition 3, introduced for this setting via Antić’s program algebra. The note defines
4
together with the iterates
5
In the Krom case, this operation satisfies the laws 6, 7, 8, and 9 (Antić, 2023).
The decisive theorem is the algebraic identification of least models: 0 Equivalently,
1
A second collapse is even sharper: subsumption equivalence in the Krom setting coincides with literal program equality, because 2 implies 3 and 4, hence 5. Uniform equivalence also admits a closed form. For every interpretation 6,
7
and therefore
8
The note illustrates the criterion with 9 and 0: both are uniformly equivalent because neither program can bootstrap the 1 cycle without facts, and for every added fact context the closures coincide (Antić, 2023).
The same source also states the principal limitation of the algebraic method. For arbitrary positive propositional programs, sequential composition loses associativity and ceases to distribute over union, so the simple iterative description of 2 breaks down. This is why the Krom fragment is unusually well behaved: its clean theory depends on the binary rule shape 3, the absence of disjunction and negation as failure, and the associativity of composition.
3. Strong equivalence via here-and-there and equilibrium logic
In answer set programming, strong equivalence is the canonical substitutivity notion. For propositional programs 4 and 5,
6
The key characterization is logical: strong equivalence coincides with equivalence in the logic of here-and-there (HT). Harrison, Lifschitz, and Truszczyński extend this principle from finite formulas to infinitary formulas. Their HT-style system starts from an infinitary basic system and adds, among other axioms, the here-and-there schema
7
Their main theorem states that if 8 is a theorem of the HT-style system, then 9 and 0 have the same stable models, and if 1 and 2 are equivalent in that system, then 3 and 4 have the same stable models (Harrison et al., 2014).
This result yields a proof method for strong equivalence. In the finite case, it reduces to checking provability in finite HT, which is decidable and in PSPACE. The practical method given in the paper is: ground the rules or small programs, translate each rule to a propositional formula, and use an HT-oriented prover or a reduction to SAT to check 5 (Harrison et al., 2014).
Equilibrium Logic supplies the model-theoretic counterpart. For an HT-interpretation 6 with 7, strong equivalence of theories is equivalent to equality of HT-models. On that basis, Cabalar and Ferraris show that every finite propositional theory 8 can be transformed into a disjunctive logic program 9, possibly with default negation in heads, such that 0 and 1 are strongly equivalent. They present both a syntactic transformation and a semantic construction from HT-countermodels. A corollary reported in the same account is that strong equivalence for arbitrary propositional theories is coNP-complete [0701095].
A persistent source of confusion is the relation between strong and uniform equivalence. The answer-set literature treats them as distinct notions: strong equivalence quantifies over arbitrary context programs, whereas uniform equivalence restricts contexts to facts. The Krom note explicitly states that uniform equivalence is weaker than strong equivalence, and the ASP survey places it strictly between strong and ordinary equivalence (Antić, 2023, 0712.0948).
4. Relativized, arithmetic, aggregate, and ordered-disjunctive extensions
Woltran’s two-parameter framework unifies many ASP equivalence notions by restricting separately the atoms allowed in context-rule heads and bodies. For alphabets 2, let 3 be the class of programs whose head atoms lie in 4 and whose positive and negative body atoms lie in 5. Then
6
This subsumes strong, uniform, ordinary, and relativized equivalence as special cases. The corresponding model theory uses generalized 7-SE-models, and the main theorem states
8
For disjunctive programs, deciding 9 is 0-complete; for normal programs it is coNP-complete (0712.0948).
The HT method extends beyond propositional ASP. Lifschitz’s HTA framework translates finite sets of regular rules with integer arithmetic into two-sorted first-order formulas. If 1 and 2, then
3
The proof route uses validity of HTA in two-world HT-models, grounding to infinitary propositional HT, and the characterization of strong equivalence by equality of HT-models. The same account states that strong-equivalence checking for propositional ASP is coNP-complete in general, while with arithmetic the problem may be harder, though in many cases it collapses to a combination of coNP checks for Boolean structure and PTIME checks for arithmetic theory (Lifschitz, 2021).
A parallel extension handles restricted uses of the 4 aggregate. For MGC programs, Lifschitz gives a finite first-order translation 5, an infinitary grounding 6, and the results: 7 and if 8 and 9 are equivalent in 0 plus the aggregate-defining axioms 1, then 2 and 3 are strongly equivalent. The exposition further states that the restricted MGC use of 4 does not raise the worst-case complexity beyond the familiar coNP bound for strong equivalence of ordinary propositional logic programs (Lifschitz, 2022).
Ordered disjunction requires a different logic. For LPODs, Charalambidis and coauthors work in the four-valued lattice 5 and treat an LPOD rule as a formula 6, where the head uses the ordered-disjunction connective 7. Their main theorem identifies two notions of strong equivalence and shows that both coincide with equality of four-valued model sets: 8 The decision problem is coNP-complete (Charalambidis et al., 2022).
5. Propositional equivalence in KAT and GKAT
A distinct line of work studies propositional program equivalence as control-flow equivalence abstracted from the meaning of primitive operations. Fix primitive tests 9 and primitive actions 00. KAT forms Boolean tests
01
and program expressions
02
Under relational semantics, an interpretation assigns relations to actions and predicates to tests, and equivalence is
03
The same source emphasizes that this captures propositional equivalence because it quantifies over all meanings of primitives (Kappé, 10 Jul 2025).
KAT also has a language semantics by guarded strings, and the defining theorem is
04
This permits automata-theoretic decision procedures. Conditionals and loops are encoded algebraically as
05
The resulting equivalence problem is PSPACE-complete in expression size, while optimized symbolic algorithms can often handle large checks in practice (Kappé, 10 Jul 2025).
GKAT isolates the deterministic fragment by taking conditionals and while-loops as primitives: 06 Its embedding into KAT is
07
When primitive actions are functional, GKAT equivalence again coincides with equality under all interpretations and with equality of guarded-string languages. The automata are fully deterministic, can be built in 08 states and transitions, and language equivalence is decidable by union-find based bisimulation search in nearly linear time 09. The extended abstract states the metatheoretical contrast succinctly: KAT is PSPACE-complete, whereas GKAT is decidable in almost linear time (Kappé, 10 Jul 2025).
This line of work also records open problems. A fully finitary axiomatization of full GKAT remains open, because completeness currently uses an infinitary fixed-point rule, and there is an open structural question about which deterministic guarded-string automata are expressible in GKAT.
6. Undecidability frontiers and expressive limits
At the opposite end of the spectrum from KAT and GKAT lies the dynamic-logic treatment of program equivalence. Goldblatt and Jackson extend PDL with a binary propositional form 10 interpreted by equality of successor sets from the current state: 11 They also define
12
and show that two well-structured programs 13 are equivalent on all halting computations precisely when
14
holds. In deterministic PDL with intersection and 15, program equivalence can be expressed by
16
The main negative result is that any PDL variant able to express 17 or, equivalently, 18, has a 19-hard validity problem; moreover, the set of formulas valid over finite models is not recursively enumerable (Goldblatt et al., 2011).
These results sharply delimit the tractable fragments discussed earlier. The Krom fragment owes its algebraic transparency to severe syntactic restrictions; HT-based strong-equivalence checking remains manageable for many propositional and restricted first-order ASP settings; KAT and especially GKAT achieve efficient equivalence checking by abstracting away the semantics of primitive statements; but once program equivalence becomes an operator inside a sufficiently expressive modal logic, the associated validity problem becomes highly undecidable (Antić, 2023, Kappé, 10 Jul 2025, Goldblatt et al., 2011).
Taken together, these strands show that propositional program equivalence is not one problem but a spectrum of problems organized by semantic strength and expressiveness. Least-model, uniform, and strong equivalence isolate different substitutivity regimes; HT and related logics provide exact logical criteria for many ASP languages; algebraic methods yield closed forms in Krom logic and efficient decision procedures in GKAT; and expressive dynamic-logic operators reveal how quickly equivalence can cross from decidable verification into the first level of the analytical hierarchy.