AI Wiki中文/EN

Horn clauses: least models, constraints and negative queries

Horn 子句

Use intersection closure and a checkable HornSAT solver to distinguish false bits from logical negation.

On this pageIntuitionMathematics & methodImplementationLimitationsExercisesResearch connections

Off in the smallest setting does not mean forbidden

Consider a hypothetical controller with six Boolean indicators. A start command s has been issued. It requires the motor m to run; the motor requires coolant c, and coolant requires the motor. An optional lamp test t requires the lamp l. Maintenance mode r must never coincide with coolant. These are symbolic requirements for one snapshot, not a physical controller specification:

F=s∧(s→m)∧(m→c)∧(c→m)∧(t→l)∧¬(c∧r).F=s\land(s\to m)\land(m\to c)\land(c\to m)\land(t\to l)\land\lnot(c\land r).

The smallest satisfying set of true indicators is s, m and c. Maintenance, the lamp test and the lamp are false there, but for different reasons. Maintenance must be false in every satisfying setting. The test and lamp can both be turned on without breaking the rules. Reading every false bit in the smallest setting as “logically forbidden” would lose that distinction.

A Horn clause contains at most one positive literal. A Horn formula is a conjunction of such clauses. The restriction permits efficient satisfiability tests and, whenever the formula is satisfiable, a unique least model under the ordering false < true. “Least” compares which variables are true, not the probability or real-world cost of a setting. Dowling and Gallier’s algorithms explicitly compute this least satisfying assignment. Original paper, printed pp.267–268

This chapter studies that mathematical class, including negative constraints. Forward chaining separately develops an indexed procedure for positive consequences of definite clauses. A definite clause has exactly one positive literal; general Horn clauses may have none. That difference makes inconsistency possible.

Rules, constraints and intersections of models

Treat a clause as a set of literals, so duplicates do not count twice. With a possibly empty set of body atoms B, its implication form is

(⋁b∈B¬b)∨h ≡ (⋀b∈Bb)→h,h∈{one atom,⊥}.\left(\bigvee_{b\in B}\lnot b\right)\lor h \ \equiv\ \left(\bigwedge_{b\in B}b\right)\to h, \qquad h\in\{\text{one atom},\bot\}.

When h is false, omit it from the disjunction. The empty conjunction is true and the empty disjunction is false. These conventions give several distinct cases:

ClauseImplicationRole
qtrue → qPositive fact
NOT p OR qp → qDefinite rule
NOT p OR NOT qp AND q → falseNegative constraint
Empty clausetrue → falseImmediate contradiction
p OR NOT pp → pTautology

The constraint NOT p OR NOT q forbids p and q from being true together; it does not forbid each one separately. A negative unit NOT p is the constraint p → false, not a positive fact about an atom named “not_p.” The syntax distinction between Horn and definite clauses is also given in the CMU logic notes.

Every definite-only formula has the all-true assignment as a model. General Horn formulas need not: p together with NOT p is unsatisfiable, and an empty clause is already unsatisfiable on its own. The all-false assignment need not satisfy a definite formula either, because positive facts can force variables true.

Identify an assignment with the set of variables it makes true. Horn models are closed under intersections of a nonempty family of models:

I≠∅,Mi⊨F (i∈I)⟹⋂i∈IMi⊨F.I\ne\varnothing,\quad M_i\models F\ (i\in I) \quad\Longrightarrow\quad \bigcap_{i\in I}M_i\models F.

To prove this, let the intersection satisfy the body of a definite rule. Every model in the family satisfies that body, hence contains the head; the intersection therefore contains the head too. For a negative constraint, its entire body cannot occur in the intersection: that would put the body in every model and violate the constraint in each. This checks every clause. The intersection itself may be the empty set of true variables; the family being intersected must not be empty.

If F has models, intersecting all of them therefore yields a model contained in every other one: its unique least model. If F is unsatisfiable, there is no least satisfying model. Do not apply the empty-family intersection convention, which would give the all-true assignment, and call that a solution. Nor are models necessarily closed under union: NOT p OR NOT q allows the models {p} and {q}, but their union violates it. For the non-Horn formula p OR q, even intersection closure fails: those same two models have a false all-off intersection.

A constructive route separates the definite clauses D from the negative constraints. Begin with no true atoms and repeatedly add forced heads:

L0=∅,Lj+1=Lj∪{h:(B→h)∈D, B⊆Lj}.L_0=\varnothing,\qquad L_{j+1}=L_j\cup\{h:(B\to h)\in D,\ B\subseteq L_j\}.

Each added atom belongs to every model of D: its body has already been established, and a model cannot make that body true while leaving the head false. When no new atom can be added, the resulting L* satisfies D; any violated definite clause would still have an addable head. Thus L* is D’s least model. This is the least-fixed-point argument in Poole and Mackworth, §5.3.2.

Now test the negative constraints:

F is UNSAT⟺∃(B→⊥)∈F: B⊆L∗.F\text{ is UNSAT}\quad\Longleftrightarrow\quad \exists(B\to\bot)\in F:\ B\subseteq L^*.

If a negative body is contained in L*, every model of D contains it, so no model can satisfy F. Otherwise L* satisfies both parts and is F’s least model. Negative constraints can reject the entire definite closure; they do not require guessing extra true atoms to find another solution. Adding atoms cannot repair an already violated negative body. An empty constraint has B empty, so it always fails this test.

Compute the least model and record why each bit is true

The complete Python 3.10+ program uses standard data structures. Variables are integers 1 through n, positive integers denote positive literals and negative integers denote negations, as in SAT. CNF and clause containers must be exact lists or tuples. Zero, Boolean values, floats, negative n and out-of-range literal IDs are rejected. The input is validated and copied without changing the caller’s lists.

prepare_horn removes duplicate literal occurrences while preserving first-occurrence order. It then rejects a clause with two distinct positive literals. This is a syntactic interface: even the tautology (1,-1,2) is rejected because its normalized clause has two positive literals. The function does not search for an equivalent Horn encoding. A repeated positive literal such as (1,1) is accepted. Horn tautologies such as (1,-1) remain as inert self-rules; duplicate clauses retain their original indices.

horn_sat performs full scans of the definite rules until no head changes, then tests the negative constraints in input order. Unlike the displayed mathematical sequence, additions within a scan are available to later rules in that same scan; both procedures reach the same least fixed point. There is no budget or partial-answer mode. Cycles without a fact to start them derive nothing, and cycles with support cannot add a variable twice.

A proof record (head, clause_id, parent_ids) records a new true variable, the original clause that forced it and earlier proof records supporting its body. The first record has ID 0. A fact needs no parents. The returned conflict, when present, records an original negative-clause ID and the proof parents establishing its entire body. These IDs refer to different objects: a clause ID indexes the input; a parent ID indexes the proof.

On SAT, model is the complete n-bit least model. On UNSAT it is None. The separate closure always reports L*, the least model of the definite part, and must not be mistaken for a model of an inconsistent full formula. The proof may include facts unrelated to the selected conflict; it is not a minimal unsatisfiable core.

The query interface accepts a signed literal. For a consistent F, positive and negative entailment use different checks:

F⊨p ⟺ p∈L∗,F⊨¬p ⟺ F∧p is UNSAT,F satisfiable.F\models p\ \Longleftrightarrow\ p\in L^*,\qquad F\models\lnot p\ \Longleftrightarrow\ F\land p\text{ is UNSAT}, \qquad F\text{ satisfiable}.

If p is absent from L*, that model refutes the positive query p. To answer the negative query NOT p, the code adds the positive unit p and runs HornSAT again. A resulting conflict proves NOT p; a resulting model is a countermodel to NOT p. Adding a positive fact stays inside Horn CNF. assumed_true identifies that extra assumption, and its input clause ID is the original input length. A conflict in this probe does not say the original F was inconsistent.

For an already inconsistent F, classical entailment makes both signs entailed. The result exposes consistent=False with the original conflict instead of treating either answer as useful evidence about a real device. A non-entailed query returns an actual countermodel, not merely a failed attempt at proof. The distinction between failure to derive an atom and its falsity is explained in Poole and Mackworth, §5.3.1.

def prepare_horn(n, clauses):
    if type(n) is not int or n < 0 or type(clauses) not in (list, tuple):
        raise ValueError('n must be nonnegative; clauses must be a list or tuple')
    rules = []
    for clause in clauses:
        if type(clause) not in (list, tuple):
            raise ValueError('each clause must be a list or tuple')
        if any(type(p) is not int or p == 0 or abs(p) > n for p in clause):
            raise ValueError('literals must be signed integers from 1 to n')
        unique = tuple(dict.fromkeys(clause))
        positive = [p for p in unique if p > 0]
        if len(positive) > 1:
            raise ValueError('a Horn clause has at most one distinct positive literal')
        rules.append((tuple(-p for p in unique if p < 0),
                      positive[0] if positive else None))
    return tuple(rules)


def horn_sat(n, clauses):
    rules = prepare_horn(n, clauses)
    values = [False] * n
    proof, reason = [], {}
    passes = rule_visits = constraints_checked = 0
    while True:
        passes += 1
        changed = False
        for cid, (body, head) in enumerate(rules):
            rule_visits += 1
            if head is not None and not values[head-1] and all(values[p-1] for p in body):
                parents = tuple(reason[p] for p in body)
                reason[head] = len(proof)
                proof.append((head, cid, parents))
                values[head-1] = True
                changed = True
        if not changed:
            break
    conflict = None
    for cid, (body, head) in enumerate(rules):
        if head is None:
            constraints_checked += 1
            if all(values[p-1] for p in body):
                conflict = (cid, tuple(reason[p] for p in body))
                break
    return dict(status='SAT' if conflict is None else 'UNSAT',
                model=tuple(values) if conflict is None else None,
                closure=tuple(i+1 for i, true in enumerate(values) if true),
                proof=tuple(proof), conflict=conflict, passes=passes,
                rule_visits=rule_visits, constraints_checked=constraints_checked)


def ask_literal(n, clauses, literal):
    base = horn_sat(n, clauses)
    if type(literal) is not int or not 1 <= abs(literal) <= n:
        raise ValueError('query must be a nonzero signed variable ID')
    if base['status'] == 'UNSAT':
        return dict(entailed=True, consistent=False, countermodel=None,
                    assumed_true=None, evidence=base)
    if literal > 0:
        yes = base['model'][literal-1]
        return dict(entailed=yes, consistent=True,
                    countermodel=None if yes else base['model'],
                    assumed_true=None, evidence=base)
    p = -literal
    extended = tuple(tuple(c) for c in clauses) + ((p,),)
    probe = horn_sat(n, extended)
    yes = probe['status'] == 'UNSAT'
    return dict(entailed=yes, consistent=True,
                countermodel=None if yes else probe['model'],
                assumed_true=p, evidence=probe)


CNF = ((1,), (-1, 2), (-2, 3), (-3, 2), (-5, 6), (-3, -4))
out = horn_sat(6, CNF)
print('base:', out['status'], out['model'])
print('proof:', out['proof'])
print('counts:', out['passes'], out['rule_visits'], out['constraints_checked'])
for literal in (2, -2, 4, -4, 5, -5):
    result = ask_literal(6, CNF, literal)
    print('query:', literal, result['entailed'], result['consistent'], result['countermodel'])
bad = horn_sat(6, CNF + ((4,),))
print('maintenance:', bad['status'], bad['closure'], bad['conflict'])
print('empty:', horn_sat(0, ((),))['conflict'])

In the controller example, variables 1–6 mean start, motor, coolant, maintenance, lamp test and lamp. The base run returns (True,True,True,False,False,False). Its three proof records derive 1 from clause 0, 2 from clause 1 using proof 0, and 3 from clause 2 using proof 1. It completes two full scans, 12 clause visits and one negative-constraint check. A scan includes visits to negative clauses even though their bodies are checked later.

Direct enumeration gives exactly three models: the base model, the same model with the lamp on, and the same model with both lamp test and lamp on. Maintenance is false in all three. The lamp test and lamp are false in the least model but true in some other models.

The signed queries illustrate the difference:

QueryEntailed?Explanation
Motor, +2YesIn the least model and proved by clause 1
NOT motor, −2NoThe base model is a countermodel
Maintenance, +4NoFalse in the base model
NOT maintenance, −4YesAdding maintenance violates the coolant/maintenance constraint
Lamp test, +5NoFalse in the base model
NOT lamp test, −5NoTurning on the test and lamp gives a countermodel

Adding (4,) derives proof record 3 for maintenance. The conflict is (5,(2,3)): original clause 5 is (-3,-4), and proof records 2 and 3 establish coolant and maintenance. In a negative query this certifies the augmented formula F AND maintenance. For the zero-variable input ((),), the conflict is (0,()); no positive derivation is needed to refute an empty clause.

A separate certificate checker can start from each cited original clause and resolve away its negative literals using the cited earlier positive units. A positive proof step must leave exactly the claimed positive unit; a conflict must leave the empty clause. Reject missing body parents, future references or a supposedly negative conflict that cites a definite rule. This checks soundness of the recorded deductions; it does not by itself verify a SAT model’s leastness. The tests check that separately by intersecting all models of small inputs.

Let m be the number of input clauses, L the number of literal occurrences, S = 1 + m + L, and R the number of full scans. A scan that changes the state adds at least one of n variables; one final unchanged scan stops the loop. Hence R ≤ n+1. Preparation and constraint checking cost O(S), allocation/output cost O(n+S), and the complete call costs O(n+R·S) time and O(n+S) space. Proof-parent references occupy at most O(L): each clause can justify a new head at most once. These bounds assume expected constant-time dictionary operations and unit-cost integer IDs.

This is a scanning baseline. Put a dependency chain in reverse order, with its initial fact last, and only one new atom is added per scan; the tests reach R = n+1. Dowling and Gallier show how occurrence lists and counters reduce HornSAT to linear time under indexed-symbol assumptions. Their optimization avoids rediscovering which rule bodies are ready. Original paper, §§4.1–4.2

ask_literal recomputes the base answer on each call and uses at most one additional HornSAT call. Its per-query worst-case bound remains O(n+(n+1)S), allowing for the extra unit clause. Answering many queries separately repeats that cost. The program does not implement incremental assumptions or cache query results.

A least model is a structural guarantee, not a default policy

The least model minimizes the true-variable set by inclusion. This is stronger than merely being an inclusion-minimal model: it is contained in every model. It therefore also uses the fewest true variables, but that fact is not a general weighted optimization claim. Negative costs, preferences for particular modes, time-dependent effects and resource objectives require an explicit problem formulation.

Setting unproved atoms false when constructing L* is a mathematical method for producing one model. It does not add their negations to the theory. A rule engine that answers every unproved atom as false under a closed-world policy is making an additional semantic choice. The signed-query interface here keeps classical entailment. In particular, an all-negative constraint cannot be implemented by turning each body atom into a separate negative fact.

The syntactic restriction has consequences. The clause p OR q contains a choice between positive atoms that this solver cannot represent directly. Allowing it and arbitrarily selecting p could discard the valid q-only model. Conversely, rejecting a CNF does not establish that no equivalent Horn formula exists; finding such a representation is outside this validator.

These results apply to finite propositional Horn CNF over the declared variables. A first-order Horn program with function symbols can have infinitely many ground instances; “Horn” alone does not supply this program’s finite bound. Constrained Horn clauses used with arithmetic theories are also outside its interface. A programming language’s negation-as-failure or execution order should not be silently substituted for the classical clauses studied here.

Separate false bits from negative consequences

1. Classify the clauses before running them

Classify (1,1), (-1,-2), (), (1,-1) and (1,-1,2). Which ones does this interface reject? Does a definite-only formula ever lack a model?

Answer: After duplicate removal, (1,1) is a positive fact. (-1,-2) is a negative constraint forbidding both atoms together. () is an empty constraint and makes the formula inconsistent. (1,-1) is a definite tautology. (1,-1,2) is semantically true but has two distinct positive literals, so this syntactic Horn validator rejects it. Every definite-only formula is satisfied by the all-true assignment; empty or negative constraints are outside that definite-only claim.

2. Use the right intersection

The formula NOT p OR NOT q has models {}, {p} and {q}, written as sets of true atoms. Find its least model and a union that is not a model. Why is intersecting an empty family not a way to solve an inconsistent Horn formula?

Answer: The intersection of the three models is {}, the all-false assignment. The union {p} ∪ {q} violates the constraint. Intersection closure assumes at least one model in the family; if the formula has no models, there is no satisfying member to start with. The set-theoretic empty-family intersection would give the full variable universe, and may violate negative constraints. It is not a least satisfying model.

3. Ask about the lamp and maintenance

Both the lamp test and maintenance are false in the controller’s least model. Which negation is entailed? Give a countermodel to the other. Why does the negative-maintenance query return consistent=True while its evidence says UNSAT?

Answer: NOT maintenance is entailed, because coolant is forced and the two cannot coexist. NOT lamp test is not entailed: (True,True,True,False,True,True) satisfies F and makes the test true. consistent describes the original F. The query’s UNSAT evidence describes F plus the temporary fact maintenance, identified by assumed_true=4; that contradiction proves a negative consequence of a consistent theory.

4. Read a conflict and check the scan cost

Audit conflict (5,(2,3)) after adding maintenance. What would be wrong with accepting (5,(2,))? For n variables in a reversed implication chain with its starting fact last, how many scans can this implementation require?

Answer: Clause 5 is (-3,-4). Proof 2 establishes variable 3 and proof 3 establishes variable 4; resolving both units into the clause leaves nothing. Citing only proof 2 leaves (-4), so no contradiction has been proved. In a reversed chain, each changing scan adds one atom and an unchanged scan confirms closure, for n+1 scans. This is why the published existence of a linear-time HornSAT algorithm does not make this repeated-scan implementation linear.

Connect the model theorem to an algorithm’s actual interface

Dowling and Gallier’s 1984 paper, Linear-Time Algorithms for Testing the Satisfiability of Propositional Horn Formulae, treats general Horn satisfiability. Its introduction states the least-assignment result; §1 fixes the clause forms; §2 gives a repeated-scan baseline; §§4–5 develop more efficient procedures. Its size accounting includes assumptions about how propositional symbols are indexed. Read those assumptions before attaching a linear-time label to an implementation. Original paper

Poole and Mackworth §5.3 develops definite-clause semantics and query answers, while the CMU notes state the Horn/definite syntax distinction. The controller, proof records, signed-query interface and tests here are original. No source program, circuit diagram or paper scan is reproduced.

The tests enumerate all small models, compare the answer with their intersection, check the definite closure even when the full formula is inconsistent, and audit each conflict by unit resolution. They test positive and negative queries against all models, including vacuous entailment, and execute incorrect shortcuts that ignore constraints or negate unproved atoms. These are AI-assisted technical checks on a finite teaching implementation, not human review or a production controller validation.

Make a prediction, then check

Atom p is false in the least model of a consistent Horn formula F. What follows from that fact alone?

Choose one answer

Learning objectives

  • Classify definite clauses, all-negative constraints, empty clauses and tautologies; prove intersection closure for nonempty families of Horn models and explain the unique least model of a satisfiable formula.
  • Derive complete HornSAT from the definite closure, independently audit stable input-clause IDs, positive-unit derivations and negative conflicts, and distinguish scanning costs from a linear algorithm.
  • Distinguish positive and negative entailment using actual models or refutations of augmented formulas, keeping least-model false bits, contradictions under a query assumption and original inconsistency separate.

Prerequisites & connections

Explore related knowledge →

References

  1. Linear-Time Algorithms for Testing the Satisfiability of Propositional Horn Formulae
    William F. Dowling; Jean H. Gallier · 1984
  2. Artificial Intelligence: Foundations of Computational Agents, 3e — 5.3 Propositional Definite Clauses
    David L. Poole; Alan K. Mackworth · 2023
  3. CMU 15-281: Propositional Logic and SAT
    Carnegie Mellon University 15-281 course staff

Version1 · Editorial status: Recorded technical checks completed

View technical check record (AI)

Codex · 2026-09-05 · Codex technical check: primary-source locations, original runnable models, independent finite-state oracles, bilingual review and second-agent cross-checks; not independent human peer review.

  • Codex reread both complete articles; six display equations, six stable anchors, full Python and four exercise answers correspond. Checked nonempty-family intersection closure, absence of a least model for UNSAT, both directions of the definite-closure/negative-constraint test, least versus minimal and classical positive/negative/vacuous entailment. Failure to prove true is not treated as logical negation.
  • All eight tests executed and passed. All256 two-variable Horn CNFs and1,024 signed queries were compared with models from every assignment. All1,771 formulas of lengths0–3 with replacement from20 three-variable clauses were checked for satisfiability, definite closure, least models and pairwise model intersections.
  • Ran another300 seeded raw-list inputs on zero through six variables, including duplicate literals/clauses, Horn tautologies, empty clauses and cycles; checked input preservation, identical status/model after clause reversal and257 random signed queries. A separate certificate checker performs unit resolution directly on original clauses without calling preparation or solving helpers; it rejects missing conditions, future references, wrong heads/conflict parents and definite rules presented as negative conflicts.
  • The main example actually has three models, least model111000 and two scans/12 visits/one constraint check. Adding maintenance gives a conflict at negative clause5 from proof records2,3 and closure(1,2,3,4). For NOT maintenance, consistent=True describes the original formula while UNSAT evidence describes the augmentation; assumed_true=4 marks it. Zero-variable empty CNF is SAT with model(), the empty-clause conflict is(0,()), and reversed chains for n=1 through8 require n+1 passes.
  • Executed three failing shortcuts: ignoring negative constraints mislabels the maintenance contradiction SAT; negating the unproved lamp-test bit falsely entails NOT test; splitting NOT p OR NOT q into two negative facts rejects a valid p model. Also checked failure of union closure for Horn models and intersection closure for non-Horn models, syntactic rejection of(1,-1,2), complete later-input validation and zero-variable/Boolean/zero/float/range boundaries.
  • Checked O(n+R·S) time, R≤n+1, O(n+S) space and O(L) proof-parent references under expected dictionary costs and unit-cost integer IDs; the original scanning implementation is not labeled a published linear algorithm. Each locale was compiled with repository math plugins and KaTeX strict:error/throwOnError:true, then rendered to React static HTML: six displays/four strong answers, no errors or literal emphasis outside code. Initial rendering caught English set braces interpreted by MDX; after marking them as code, all tests/rendering passed again. These are AI technical self-checks, not human review, a whole-site build or browser acceptance; this draft is not counted as published.
  • Read both complete locales, the original program, eight tests and final metadata without edits. Checked Horn/definite syntax, duplicate literals and syntactic rejection of a tautology with two positives, nonempty-family intersection closure, least versus minimal models, definite closure versus inconsistent original CNF, signed queries, vacuous entailment and temporary-fact identity. No defect found; no author correction required.
  • Independent /tmp/aiwiki-horn-clauses-independent-review.py saturates unrestricted binary resolution: every clause pair is resolved on every complementary literal, including non-units, dropping tautologies until empty clause or fixed point. It does not enumerate all models or call tested prepare_horn, scanning closure or the author’s unit-proof checker as a semantic oracle. It refutes F, F∧¬q for every signed query q, and D∧¬p for each variable of the definite part to independently determine closure and least models.
  • The corpus contains all256 two-variable Horn formulas,1771 three-variable formulas with at most3 clauses chosen with replacement,400 random raw inputs with zero through7 variables, duplicates, tautologies and empties, plus9 zero/empty/all-negative boundaries:2436 programs,14480 signed queries and8026 complete-result/evidence audits. All agree with general-resolution refutation;400 bijective variable renamings preserve results and mapped closures, and original inputs remain unchanged.
  • Audited10234 positive-proof support subgraphs and2121 conflict support subgraphs: raw clause IDs/heads/exact body parents, strictly earlier parent IDs and distinct derived heads. Independent general resolution checks each support-clause set entails its head or is itself inconsistent. For successful negative queries of a consistent base, the conflict support must actually include the temporary positive fact at the original input length, and assumed_true identifies it. Every returned countermodel directly satisfies raw CNF and falsifies the query; probe UNSAT does not imply base inconsistency.
  • Reran all eight author tests successfully. The main example’s three models also follow directly from forced s/m/c, forbidden r and the three lamp states satisfying t→l;12 clause visits/two passes/one constraint check, the three proof steps and maintenance conflict(5,(2,3)) agree. R≤n+1, S including constants/clauses/literals, O(L) parent references, empty n/m cases, two-call query cost and expected hashing assumptions are consistent. The prose calls this code a scanning baseline, not the paper’s linear-time algorithm.
  • Major formulas, code, exercises and claims correspond across locales. Actually compiled with repository display-math plugins and strict KaTeX and React-rendered both documents: six displays, six stable headings and four strong answers each, with no math errors or emphasis residue outside code. This is another AI agent’s technical review, without browser checking, whole-site build, human peer review or production-controller validation claims.
  • Promotion preserves full prose, equations, program and exercises. Tests load published articles only, with draft fallback/skip paths removed and the Prolog review assertion updated to checked, with real-engine tests separated; algorithm and independent oracle logic are unchanged. Final review binds both MDX SHA-256 hashes.

Source locations checked:

  • Linear-Time Algorithms for Testing the Satisfiability of Propositional Horn Formulae · Actually read the existing official PDF at /tmp/aiwiki-next-forward-chaining/dowling-gallier-1984.pdf (18 pages), extracted to /tmp/aiwiki-horn-dg.txt. Printed pp267–268 introduction: general HornSAT and least satisfying assignment under false<true; pp269–270 §1/§2: reduced clause forms, duplicate assumptions and repeated scanning; p271: K+1 pass bound and forced atoms. Read pp274–277 §§4.1–4.2, Algorithm2, numbered-symbol assumption, occurrence lists/counters, arbitrary-name symbol-table cost and charging each negative occurrence once. Visually inspected retained p267.png and own renders of printed pp268,270,271; confirmed journal header 1984:3:267–284 despite OCR misreading the first page. No fresh remote retrieval or complete visual inspection of all18 pages is claimed. The controller and implementation are original, with duplicate input clauses retained and constraints checked after the definite closure.
  • Artificial Intelligence: Foundations of Computational Agents, 3e — 5.3 Propositional Definite Clauses · Actually opened official §5.3 HTML. Read definition/fact and exactly-one-positive material (retrieved lines16–59), query failure versus falsity in §5.3.1 (lines86–109), bottom-up consequences (lines123–158), and §5.3.2 proof of soundness, fixed-point model and completeness for atomic queries (lines177–197). Scope is definite clauses; the negative-constraint test and signed classical-query implementation are independently developed here. No source figure or program copied.
  • CMU 15-281: Propositional Logic and SAT · Actually opened the official CMU15-281 Propositional Logic and SAT course page and read CNF/Horn/definite definitions (retrieved lines102–108): exactly one versus at most one positive literal. Verified the course/page identity, without inferring an exact publication date from the s24 URL. This source supports the syntax distinction, not the complete least-model/intersection proof or the implementation's boundary behavior.
  • Linear-Time Algorithms for Testing the Satisfiability of Propositional Horn Formulae · Independently opened the official UPenn 18-page PDF through web and read printed pp267–271 (definition, 1984 header, least-assignment statement, reduced forms, repeated-scan Algorithm1 and K+1 pass bound), pp272–273 (pebbling soundness/completeness and least-model corollary), and pp274–277 §§4.1–4.2 (indexed identifiers, occurrence lists/counters, symbol-table assumptions and each negative occurrence charged once). Web screenshot retrieval failed; instead actually viewed the author-retained local renders dg-page268.png and dg-page270.png, confirming the printed page labels, least truth-assignment wording and Algorithm1. The source initializes facts separately and may stop on inconsistency; this article intentionally completes its own definite closure then tests constraints. No fresh shell download, full-paper visual inspection or upstream Pascal execution is claimed.
  • Artificial Intelligence: Foundations of Computational Agents, 3e — 5.3 Propositional Definite Clauses · Independently read canonical official third-edition §5.3 in this ongoing turn: definite syntax and empty bodies at lines25–59; §5.3.1 lines86–109 separates a no answer from falsity; §5.3.2 lines123–158 and177–197 establish positive consequences and least-model completeness. The source is not credited with the new negative-constraint or signed-query implementation. Copyright 2023 is distinguished from the 2025 HTML generation stamp.
  • CMU 15-281: Propositional Logic and SAT · Independently opened the actual official CMU15-281 course page. Read lines102–108 defining CNF, definite clauses with exactly one positive literal and Horn clauses with at most one; lines123–150 give entailment and general-resolution refutation, supporting the independent checker design. No exact publication/revision date inferred from s24. Empty-CNF/empty-clause behavior is an explicit article extension, not attributed to the course’s one-or-more CNF wording.

Related topics

No matches. Try a synonym or acronym.

0 results shown

Wrap the whole query in double quotes for a phrase match.