Papers
Topics
Authors
Recent
Search
2000 character limit reached

Logic of Here-and-There with Constraints

Updated 6 July 2026
  • 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 hh and tt, a constant individual domain, and persistence from hh to tt; 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 A¬AA\vee\neg A, and stronger than intuitionistic logic, validating ¬A¬¬A\neg A\vee\neg\neg A (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 ,,,¬\wedge,\vee,\rightarrow,\neg, and quantifiers ,\forall,\exists. A model has two worlds hth\le t, a constant domain DD, and persistent predicate interpretations tt0. Satisfaction at a world tt1 is classical for atoms, conjunction, disjunction, and quantifiers, while implication is evaluated by checking all accessible worlds: tt2 Negation is defined as tt3, with tt4 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 tt5 with tt6, where tt7 is “here” and tt8 is “there”. Total interpretations satisfy tt9, 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 hh0, special rules for hh1, 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 hh2 or hh3 (Fandinno et al., 2021)
Arithmetic comparisons hh4, hh5 (Lifschitz, 2021)
Algebraic constraints hh6 (Eiter et al., 2020)
Theory atoms in CASP structured/compositional theory atoms hh7 (Cabalar et al., 6 Feb 2025)
Metric-temporal constraints hh8, bounded hh9 (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 tt0, and semantically tt1 (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 tt2 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 tt3 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

tt4

where tt5 is a weighted formula over a semiring tt6, and tt7 is a comparison relation such as tt8 (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 tt9, later refined to structured and compositional theories with theory variables, domains, and denotations A¬AA\vee\neg A0 (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 A¬AA\vee\neg A1, A¬AA\vee\neg A2, A¬AA\vee\neg A3, and A¬AA\vee\neg A4 over bounded discrete time (Cabalar et al., 2020). Constraint Temporal HT introduces temporal terms A¬AA\vee\neg A5, partial valuations A¬AA\vee\neg A6, and solution relations A¬AA\vee\neg A7 for temporal constraint atoms A¬AA\vee\neg A8 (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 A¬AA\vee\neg A9 is an equilibrium model of a theory ¬A¬¬A\neg A\vee\neg\neg A0 iff ¬A¬¬A\neg A\vee\neg\neg A1 and there is no ¬A¬¬A\neg A\vee\neg\neg A2 such that ¬A¬¬A\neg A\vee\neg\neg A3. 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, ¬A¬¬A\neg A\vee\neg\neg A4, under explicit assumptions on the underlying theory and external atoms (Cabalar et al., 6 Feb 2025). There, an ¬A¬¬A\neg A\vee\neg\neg A5-interpretation is a pair ¬A¬¬A\neg A\vee\neg\neg A6 of partial valuations with ¬A¬¬A\neg A\vee\neg\neg A7, and a total equilibrium model ¬A¬¬A\neg A\vee\neg\neg A8 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 ¬A¬¬A\neg A\vee\neg\neg A9 and ,,,¬\wedge,\vee,\rightarrow,\neg0 can be proved in HTA, then the original mini-GRINGO programs are strongly equivalent; for regular rules, the same holds with the simplified translation ,,,¬\wedge,\vee,\rightarrow,\neg1 (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 ,,,¬\wedge,\vee,\rightarrow,\neg2, two axioms, standard-style quantifier rules, special implication rules, and a large block of negation rules. A formula ,,,¬\wedge,\vee,\rightarrow,\neg3 is valid in HT iff there is a sequent proof of ,,,¬\wedge,\vee,\rightarrow,\neg4 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 ,,,¬\wedge,\vee,\rightarrow,\neg5 and ,,,¬\wedge,\vee,\rightarrow,\neg6 is precisely what makes the calculus HT-specific.

The alternative embedding views HT as intuitionistic logic plus two axiom schemas: ,,,¬\wedge,\vee,\rightarrow,\neg7 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 ,,,¬\wedge,\vee,\rightarrow,\neg8, ,,,¬\wedge,\vee,\rightarrow,\neg9, and ,\forall,\exists0 (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 ,\forall,\exists1, 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 ,\forall,\exists2 or commutativity of ,\forall,\exists3 inside HTA derivations.

ASP(AC) generalizes the atomic layer more radically. Weighted formulas are interpreted over semirings ,\forall,\exists4, and unweighted formulas are embedded as multiplicative identity ,\forall,\exists5 when true and additive identity ,\forall,\exists6 when false (Eiter et al., 2020). Algebraic constraints ,\forall,\exists7 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 ,\forall,\exists8 with ,\forall,\exists9 at every time point, and metric operators are bounded by integers or the trace length hth\le t0 (Cabalar et al., 2020). The logic supports hth\le t1, 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 hth\le t2, partial valuations over hth\le t3, 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 hth\le t4-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 hth\le t5, satisfiability is in hth\le t6 and strong equivalence is in hth\le t7, 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).

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 Logic of Here-and-There with Constraints.