Logic of Here-and-There with Constraints
- Logic of Here-and-There with Constraints is a formalism that combines two-world intuitionistic semantics with enriched atomic layers to support equilibrium logic applications in ASP, arithmetic, and temporal reasoning.
- It establishes a modular framework where constraint expressions—ranging from ASP integrity constraints to algebraic and temporal operators—enhance classical and non-classical logic interactions.
- Its proof-theoretic and computational foundations underpin strong equivalence, automated reasoning, and highlight open challenges in extending ASP and first-order systems.
Searching arXiv for the cited HT and constraint-related papers to ground the encyclopedia entry in current arXiv records. The logic of Here-and-There with constraints denotes a family of formalisms that preserve the two-world semantics of Here-and-There (HT) while enriching the atomic layer with constraint-bearing expressions. In standard first-order HT, formulas are interpreted in an intuitionistic Kripke structure with exactly two worlds and , a constant individual domain, and persistence from to ; implication and negation are evaluated across both worlds, whereas conjunction, disjunction, and quantifiers are evaluated pointwise in each world (Otten et al., 7 Jan 2026). This places HT strictly between intuitionistic and classical logic: it is weaker than classical logic, for example not validating , and stronger than intuitionistic logic, validating (Otten et al., 7 Jan 2026). Constraint extensions retain this semantic core and use it as the monotonic basis for equilibrium logic, strong equivalence, and answer set programming (ASP) (Fandinno et al., 2021, Cabalar et al., 6 Feb 2025).
1. Semantic foundations of HT and its constraint-oriented reading
In first-order HT, the syntax is the ordinary first-order language with terms, predicates, connectives , and quantifiers . A model has two worlds , a constant domain , and persistent predicate interpretations 0. Satisfaction at a world 1 is classical for atoms, conjunction, disjunction, and quantifiers, while implication is evaluated by checking all accessible worlds: 2 Negation is defined as 3, with 4 false in both worlds (Otten et al., 7 Jan 2026).
The propositional presentation used in equilibrium logic and ASP is equivalent in spirit. An HT-interpretation is a pair 5 with 6, where 7 is “here” and 8 is “there”. Total interpretations satisfy 9, and classical satisfaction is recovered by restricting attention to total interpretations (Fandinno et al., 2021). This total/non-total distinction is the semantic mechanism that later supports equilibrium models and stable models.
Constraint-oriented readings of HT rely on the fact that the non-classicality of the logic is concentrated in implication and negation. The atomic layer can therefore be specialized in multiple ways without changing the two-world discipline. This is explicit in the first-order prover architecture for HT, where terms and predicates are “completely standard first-order,” and HT-specific behavior is encoded “almost entirely” in special rules for 0, special rules for 1, and the HOS/SQHT axioms of the intuitionistic embedding (Otten et al., 7 Jan 2026). A plausible implication is that constraint extensions can often reuse the same equilibrium-theoretic spine while replacing only the semantics of atoms.
2. Constraint vocabularies and their formal realizations
The literature does not use a single notion of “constraint.” In HT-based work, the term ranges from ASP integrity constraints to arithmetic comparisons, semiring-valued inequalities, abstract theory atoms, and temporal or metric restrictions. The common feature is that each of these is made part of the atomic or rule-level language while leaving the HT evaluation of implication, negation, and minimality intact.
| Formulation | Characteristic construct | Representative source |
|---|---|---|
| ASP integrity constraints | 2 or 3 | (Fandinno et al., 2021) |
| Arithmetic comparisons | 4, 5 | (Lifschitz, 2021) |
| Algebraic constraints | 6 | (Eiter et al., 2020) |
| Theory atoms in CASP | structured/compositional theory atoms 7 | (Cabalar et al., 6 Feb 2025) |
| Metric-temporal constraints | 8, bounded 9 | (Cabalar et al., 2020, Cabalar et al., 18 Jul 2025) |
In ASP’s core HT analysis, an integrity constraint is simply a rule with empty head, syntactically 0, and semantically 1 (Fandinno et al., 2021). In that setting, “constraints” are filters on equilibrium models rather than special background-theory atoms.
In “Here and There with Arithmetic,” the constraint layer consists of comparison atoms between integer or precomputed terms. The comparison symbols 2 are treated as built-in predicate constants with fixed interpretation, and arithmetic is incorporated through a two-sorted first-order language with integer function symbols 3 and axioms for all true arithmetical sentences (Lifschitz, 2021). The paper explicitly describes these comparison atoms as constraints because their truth is fixed by the intended arithmetic structure rather than freely assigned.
In ASP(AC) and FO Weighted HT Logic, constraints compare semiring values produced by weighted formulas. The canonical form is
4
where 5 is a weighted formula over a semiring 6, and 7 is a comparison relation such as 8 (Eiter et al., 2020, Kiesel, 2021). This turns weighted calculations into first-class atoms in rules and formulas.
In the clingo-oriented CASP framework, the constraint side is abstracted as a theory 9, later refined to structured and compositional theories with theory variables, domains, and denotations 0 (Cabalar et al., 6 Feb 2025). Constraint atoms are not hard-coded to arithmetic; they may denote any theory whose atoms admit locality, complement, and satisfiability conditions.
In the temporal case, constraints are indexed over time. Metric temporal HT uses bounded operators such as 1, 2, 3, and 4 over bounded discrete time (Cabalar et al., 2020). Constraint Temporal HT introduces temporal terms 5, partial valuations 6, and solution relations 7 for temporal constraint atoms 8 (Cabalar et al., 18 Jul 2025).
A common misconception is that “HT with constraints” names a single formalism. The literature instead contains a family of related systems whose shared invariant is the HT/equilibrium semantics, not a unique atomic language.
3. Equilibrium logic, stable models, and equivalence under constraints
HT is the monotonic core of equilibrium logic. In the propositional ASP setting, a total interpretation 9 is an equilibrium model of a theory 0 iff 1 and there is no 2 such that 3. Stable models of a program are precisely equilibrium models of its HT translation (Fandinno et al., 2021). This is the basis for the familiar claim that strong equivalence of programs is characterized by equivalence in HT.
Constraint extensions preserve this scheme. In the abstract CASP setting, strong equivalence between T-programs is characterized by equivalence in the logic of Here-and-There with constraints, 4, under explicit assumptions on the underlying theory and external atoms (Cabalar et al., 6 Feb 2025). There, an 5-interpretation is a pair 6 of partial valuations with 7, and a total equilibrium model 8 is minimal with respect to the “here” valuation.
The general countermodel theory of equivalence extends beyond strong equivalence. For propositional and quantified HT, there-closed HT-countermodels characterize uniform equivalence even for infinite theories, and the paper develops corresponding notions of equivalence interpretations and relativized hyperequivalence (Fink, 2010). This is significant because earlier characterizations via maximal non-total HT-models are not adequate for infinite settings. The framework also lifts to quantified HT, which is directly relevant when constraints are expressed by first-order or non-ground vocabularies.
Arithmetic HT provides a narrower proof-theoretic route. It shows that if equivalence between the translations 9 and 0 can be proved in HTA, then the original mini-GRINGO programs are strongly equivalent; for regular rules, the same holds with the simplified translation 1 (Lifschitz, 2021). This is a sound method for proving strong equivalence with arithmetic, but the system is explicitly incomplete.
4. Proof theory, embeddings, and automated reasoning
The first dedicated theorem proving framework for first-order HT is based on a native sequent calculus, LHT, and an axiomatic embedding of HT into intuitionistic logic (Otten et al., 7 Jan 2026). LHT uses sequents 2, two axioms, standard-style quantifier rules, special implication rules, and a large block of negation rules. A formula 3 is valid in HT iff there is a sequent proof of 4 in LHT, and all propositional rules as well as the quantifier rules with Eigenvariable condition are invertible (Otten et al., 7 Jan 2026). The special treatment of 5 and 6 is precisely what makes the calculus HT-specific.
The alternative embedding views HT as intuitionistic logic plus two axiom schemas: 7 usually referred to as HOS and SQHT (Otten et al., 7 Jan 2026). In implementation, full instantiation is impractical, so the paper uses a restricted instantiation regime over the predicates appearing in the target formula. The paper reports that it found no evidence that this optimized axiomatization is incomplete for propositional HT, but states that for first-order HT it is likely incomplete (Otten et al., 7 Jan 2026).
Four provers are implemented: the native sequent prover leanHaT, and three axiomatic provers ihat-seq, ihat-tab, and ihat-con, all in compact Prolog (Otten et al., 7 Jan 2026). On the ILTP benchmark library, with 10s CPU timeout per problem, leanHaT solves 378 HT-problems and 31 refutations of HT-invalid formulas; ihat-seq solves 154 HT-problems and 0 refutations; ihat-tab solves 209 HT-problems and 0 refutations; ihat-con solves 300 HT-problems and 0 refutations (Otten et al., 7 Jan 2026). The paper explicitly notes that it does not directly implement constraints, but also states that the architecture is highly relevant for “HT + constraints” because HT-specific reasoning is isolated from the rest of first-order reasoning. This suggests a modular integration point for theory solvers.
For infinitary formulas, the proof-theoretic landscape is different. “Proving Infinitary Formulas” shows that validity of infinitary HT-formulas can be justified by finite proofs in finitary systems such as 8, 9, and 0 (Harrison et al., 2016). Since non-ground ASP with aggregates or infinite domains often translates into infinitary HT formulas, this provides a finitary meta-theory for strong equivalence arguments that involve constraints and infinite conjunctions or disjunctions.
5. Arithmetic, algebraic, quantitative, and temporal extensions
Arithmetic HT, ASP(AC), and temporal HT with constraints represent three distinct but structurally compatible extension lines.
In HTA, mini-GRINGO rules are translated into a two-sorted first-order language with generic and integer variables, arithmetic function symbols 1, built-in comparison symbols, and a proof system consisting of intuitionistic logic plus the Hosoi axiom, order axioms for precomputed terms, all true ground comparison facts, and all true arithmetical sentences (Lifschitz, 2021). This makes arithmetic constraints part of the logic rather than external annotations. Typical strong-equivalence arguments then use arithmetic facts such as totality of 2 or commutativity of 3 inside HTA derivations.
ASP(AC) generalizes the atomic layer more radically. Weighted formulas are interpreted over semirings 4, and unweighted formulas are embedded as multiplicative identity 5 when true and additive identity 6 when false (Eiter et al., 2020). Algebraic constraints 7 then appear in rule bodies and heads. This framework subsumes many ASP constructs, including aggregates, choice constraints, arithmetic operators, and provenance-oriented computations (Eiter et al., 2020). In the related quantitative-and-stream framework, FO Weighted HT Logic and Weighted LARS are used to unify constraints, quantitative reasoning, and streaming/temporal aspects through HT and Weighted Logic (Kiesel, 2021).
Temporal extensions retain the two-world semantics but index it over traces. In metric temporal HT, an HT-trace is a sequence 8 with 9 at every time point, and metric operators are bounded by integers or the trace length 0 (Cabalar et al., 2020). The logic supports 1, next, bounded until/release, and their past counterparts, as well as interval operators. Metric formulas can be translated into ordinary temporal formulas over the same alphabet, and also into a poly-size temporal theory with fresh atoms for closure subformulas (Cabalar et al., 2020).
Constraint Temporal HT goes one step further by combining THT and HTC directly. It introduces temporal terms 2, partial valuations over 3, strict and non-strict solution relations for temporal constraint atoms, and temporal equilibrium models defined by minimization of the entire “here”-trace (Cabalar et al., 18 Jul 2025). The paper proves that this temporal constraint logic is a conservative extension of both HTC and THT, and gives a Kamp-style translation into quantified HT with evaluable functions (Cabalar et al., 18 Jul 2025). A plausible implication is that temporal ASP with numeric fluents can be given a genuinely equilibrium-theoretic semantics without reducing time or constraints to purely propositional encodings at the foundational level.
6. Scope, limitations, and open directions
Several limitations are explicit in the literature. The first-order HT provers based on restricted HOS/SQHT axioms are likely incomplete for first-order HT, even though the restricted embedding is experimentally very effective (Otten et al., 7 Jan 2026). HTA is also incomplete as a theory of strong equivalence for the full mini-GRINGO language; the paper provides a counterexample and suggests that stronger principles such as induction or additional quantifier axioms may be needed (Lifschitz, 2021).
Computational limits are similarly clear. ASP(AC) is undecidable in general. For variable-free programs over efficiently encodable semirings, model checking and strong equivalence are co-NP-complete, and answer set existence is 4-complete; for safe non-ground programs, satisfiability and strong equivalence are undecidable in general, while safe programs without value invention in constraints, with domain-restricted head constraints and computable semirings, yield decidable SAT and SE (Eiter et al., 2020). In the abstract CASP setting, satisfiability and strong equivalence are both undecidable in general; relative to a theory satisfiability oracle 5, satisfiability is in 6 and strong equivalence is in 7, while polynomial-time decidable theories give NP-complete satisfiability and coNP-complete strong equivalence (Cabalar et al., 6 Feb 2025).
Temporal work also imposes semantic bounds. Metric temporal ASP is developed over bounded discrete time specifically to remain compatible with ASP-style grounding and solving; it does not address continuous-time metric temporal logic (Cabalar et al., 2020). Constraint Temporal HT is parametric in the constraint system and already covers linear arithmetic, but its role is still foundational: it establishes the temporal equilibrium logic with constraints rather than a mature solver ecosystem (Cabalar et al., 18 Jul 2025).
These limitations reveal a stable structural pattern. HT with constraints is not one logic but a modular research program: a two-world monotonic core, an equilibrium selection principle, and an extensible atomic theory layer. The papers collectively show that this pattern supports integrity constraints, arithmetic, semiring computations, abstract external theories, metric time, and temporal numeric fluents, while preserving the central model-theoretic use of HT for strong equivalence and stable-model semantics (Cabalar et al., 6 Feb 2025, Cabalar et al., 18 Jul 2025).