Papers
Topics
Authors
Recent
Search
2000 character limit reached

Propositional Program Equivalence

Updated 6 July 2026
  • 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 KlmL    LM(K)=LM(L)K \equiv_{lm} L \iff LM(K)=LM(L) Propositional Krom logic programs
Subsumption equivalence IKILI \models K \Leftrightarrow I \models L for all II Propositional Krom logic programs
Uniform equivalence KIlmLIK \cup I \equiv_{lm} L \cup I for every IAI\subseteq A Propositional Krom logic programs
Ordinary equivalence PQ    AS(P)=AS(Q)P \equiv Q \iff AS(P)=AS(Q) Propositional ASP
Strong equivalence PsQP \equiv_s Q iff AS(PR)=AS(QR)AS(P\cup R)=AS(Q\cup R) for every program RR Propositional ASP
Uniform equivalence PuQP \equiv_u Q iff IKILI \models K \Leftrightarrow I \models L0 for every set of facts IKILI \models K \Leftrightarrow I \models L1 Propositional ASP
Propositional equivalence IKILI \models K \Leftrightarrow I \models L2 KAT / GKAT
Program equivalence formula IKILI \models K \Leftrightarrow I \models L3 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 IKILI \models K \Leftrightarrow I \models L4 over a finite nonempty alphabet IKILI \models K \Leftrightarrow I \models L5 is a finite set of facts IKILI \models K \Leftrightarrow I \models L6 and proper rules IKILI \models K \Leftrightarrow I \models L7, with IKILI \models K \Leftrightarrow I \models L8. Writing IKILI \models K \Leftrightarrow I \models L9 for the set of facts and II0 for the set of proper rules, interpretations are subsets II1, and II2 has a unique II3-least model II4. Least-model equivalence is then II5 iff II6; subsumption equivalence is II7 iff II8 for all II9; and uniform equivalence is KIlmLIK \cup I \equiv_{lm} L \cup I0 iff KIlmLIK \cup I \equiv_{lm} L \cup I1 for every context KIlmLIK \cup I \equiv_{lm} L \cup I2 (Antić, 2023).

The central algebraic device is the sequential composition KIlmLIK \cup I \equiv_{lm} L \cup I3, introduced for this setting via Antić’s program algebra. The note defines

KIlmLIK \cup I \equiv_{lm} L \cup I4

together with the iterates

KIlmLIK \cup I \equiv_{lm} L \cup I5

In the Krom case, this operation satisfies the laws KIlmLIK \cup I \equiv_{lm} L \cup I6, KIlmLIK \cup I \equiv_{lm} L \cup I7, KIlmLIK \cup I \equiv_{lm} L \cup I8, and KIlmLIK \cup I \equiv_{lm} L \cup I9 (Antić, 2023).

The decisive theorem is the algebraic identification of least models: IAI\subseteq A0 Equivalently,

IAI\subseteq A1

A second collapse is even sharper: subsumption equivalence in the Krom setting coincides with literal program equality, because IAI\subseteq A2 implies IAI\subseteq A3 and IAI\subseteq A4, hence IAI\subseteq A5. Uniform equivalence also admits a closed form. For every interpretation IAI\subseteq A6,

IAI\subseteq A7

and therefore

IAI\subseteq A8

The note illustrates the criterion with IAI\subseteq A9 and PQ    AS(P)=AS(Q)P \equiv Q \iff AS(P)=AS(Q)0: both are uniformly equivalent because neither program can bootstrap the PQ    AS(P)=AS(Q)P \equiv Q \iff AS(P)=AS(Q)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 PQ    AS(P)=AS(Q)P \equiv Q \iff AS(P)=AS(Q)2 breaks down. This is why the Krom fragment is unusually well behaved: its clean theory depends on the binary rule shape PQ    AS(P)=AS(Q)P \equiv Q \iff AS(P)=AS(Q)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 PQ    AS(P)=AS(Q)P \equiv Q \iff AS(P)=AS(Q)4 and PQ    AS(P)=AS(Q)P \equiv Q \iff AS(P)=AS(Q)5,

PQ    AS(P)=AS(Q)P \equiv Q \iff AS(P)=AS(Q)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

PQ    AS(P)=AS(Q)P \equiv Q \iff AS(P)=AS(Q)7

Their main theorem states that if PQ    AS(P)=AS(Q)P \equiv Q \iff AS(P)=AS(Q)8 is a theorem of the HT-style system, then PQ    AS(P)=AS(Q)P \equiv Q \iff AS(P)=AS(Q)9 and PsQP \equiv_s Q0 have the same stable models, and if PsQP \equiv_s Q1 and PsQP \equiv_s Q2 are equivalent in that system, then PsQP \equiv_s Q3 and PsQP \equiv_s Q4 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 PsQP \equiv_s Q5 (Harrison et al., 2014).

Equilibrium Logic supplies the model-theoretic counterpart. For an HT-interpretation PsQP \equiv_s Q6 with PsQP \equiv_s Q7, strong equivalence of theories is equivalent to equality of HT-models. On that basis, Cabalar and Ferraris show that every finite propositional theory PsQP \equiv_s Q8 can be transformed into a disjunctive logic program PsQP \equiv_s Q9, possibly with default negation in heads, such that AS(PR)=AS(QR)AS(P\cup R)=AS(Q\cup R)0 and AS(PR)=AS(QR)AS(P\cup R)=AS(Q\cup R)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 AS(PR)=AS(QR)AS(P\cup R)=AS(Q\cup R)2, let AS(PR)=AS(QR)AS(P\cup R)=AS(Q\cup R)3 be the class of programs whose head atoms lie in AS(PR)=AS(QR)AS(P\cup R)=AS(Q\cup R)4 and whose positive and negative body atoms lie in AS(PR)=AS(QR)AS(P\cup R)=AS(Q\cup R)5. Then

AS(PR)=AS(QR)AS(P\cup R)=AS(Q\cup R)6

This subsumes strong, uniform, ordinary, and relativized equivalence as special cases. The corresponding model theory uses generalized AS(PR)=AS(QR)AS(P\cup R)=AS(Q\cup R)7-SE-models, and the main theorem states

AS(PR)=AS(QR)AS(P\cup R)=AS(Q\cup R)8

For disjunctive programs, deciding AS(PR)=AS(QR)AS(P\cup R)=AS(Q\cup R)9 is RR0-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 RR1 and RR2, then

RR3

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 RR4 aggregate. For MGC programs, Lifschitz gives a finite first-order translation RR5, an infinitary grounding RR6, and the results: RR7 and if RR8 and RR9 are equivalent in PuQP \equiv_u Q0 plus the aggregate-defining axioms PuQP \equiv_u Q1, then PuQP \equiv_u Q2 and PuQP \equiv_u Q3 are strongly equivalent. The exposition further states that the restricted MGC use of PuQP \equiv_u Q4 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 PuQP \equiv_u Q5 and treat an LPOD rule as a formula PuQP \equiv_u Q6, where the head uses the ordered-disjunction connective PuQP \equiv_u Q7. Their main theorem identifies two notions of strong equivalence and shows that both coincide with equality of four-valued model sets: PuQP \equiv_u Q8 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 PuQP \equiv_u Q9 and primitive actions IKILI \models K \Leftrightarrow I \models L00. KAT forms Boolean tests

IKILI \models K \Leftrightarrow I \models L01

and program expressions

IKILI \models K \Leftrightarrow I \models L02

Under relational semantics, an interpretation assigns relations to actions and predicates to tests, and equivalence is

IKILI \models K \Leftrightarrow I \models L03

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

IKILI \models K \Leftrightarrow I \models L04

This permits automata-theoretic decision procedures. Conditionals and loops are encoded algebraically as

IKILI \models K \Leftrightarrow I \models L05

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: IKILI \models K \Leftrightarrow I \models L06 Its embedding into KAT is

IKILI \models K \Leftrightarrow I \models L07

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 IKILI \models K \Leftrightarrow I \models L08 states and transitions, and language equivalence is decidable by union-find based bisimulation search in nearly linear time IKILI \models K \Leftrightarrow I \models L09. 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 IKILI \models K \Leftrightarrow I \models L10 interpreted by equality of successor sets from the current state: IKILI \models K \Leftrightarrow I \models L11 They also define

IKILI \models K \Leftrightarrow I \models L12

and show that two well-structured programs IKILI \models K \Leftrightarrow I \models L13 are equivalent on all halting computations precisely when

IKILI \models K \Leftrightarrow I \models L14

holds. In deterministic PDL with intersection and IKILI \models K \Leftrightarrow I \models L15, program equivalence can be expressed by

IKILI \models K \Leftrightarrow I \models L16

The main negative result is that any PDL variant able to express IKILI \models K \Leftrightarrow I \models L17 or, equivalently, IKILI \models K \Leftrightarrow I \models L18, has a IKILI \models K \Leftrightarrow I \models L19-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.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Propositional Program Equivalence.