AI Wiki中文/EN

Nonmonotonic reasoning: when a new fact withdraws an old answer

非单调推理

Compute finite stable models, audit their reducts, and distinguish defeasible absence, alternatives and the lack of any stable interpretation.

On this pageIntuitionMathematics & methodImplementationLimitationsExercisesResearch connections

A new fact can retire an old conclusion

An archive has received a record. Its rules say to index received records unless they are blocked, and to mark indexed records for release unless a hold is recorded. With no block or hold, it concludes release. A hold arrives a minute later. The record is still received and indexed, but the release conclusion must go.

Nothing was erased from the input: one fact was added. The conclusion was conditional on an absence, and that condition no longer holds. This is the kind of change nonmonotonic reasoning is designed to express. Our archive is a fictional, finite example; the word release denotes a proposition in a program, not an instruction that publishes a document.

In classical propositional logic, adding premises preserves every existing consequence. If every interpretation satisfying a knowledge base makes a statement true, restricting that set of interpretations by adding premises cannot introduce a counterexample:

K⊆K′ ∧ K⊨φ⟹K′⊨φ.K\subseteq K'\ \land\ K\models\varphi\quad\Longrightarrow\quad K'\models\varphi.

The word monotonic concerns the consequence relation under inclusion of premises. It does not mean that the outside world never changes. Replacing yesterday’s database, deleting an assumption, or asking about a different time can change answers in an entirely classical system: those operations need not satisfy the premise inclusion above. A nonmonotonic rule instead lets an added premise defeat a conclusion while the old rules remain present.

For the archive, read the following notation as “head if body”; commas join conditions:

record.
indexed :- record, not blocked.
release :- indexed, not hold.

The not operator is default negation. Its interpretation will be defined relative to a candidate set of true atoms. It is not a timed-out search and does not assert classical negation. Facts, normal rules and headless integrity constraints are distinct constructs in the official Potassco syntax guide.

Several approaches make different choices about defeasible conclusions. Circumscription adds a chosen minimality condition; Reiter’s default logic tests the consistency of justifications with an extension; autoepistemic logic describes reflection about what is believed. Stable-model semantics gives a particular consistency test for rule-based candidates. These are related formalisms, with different definitions, rather than interchangeable names for an if statement. Lifschitz’s survey, §3 gives their context. The default-logic chapter develops Reiter’s construction.

Check whether an assumption can support itself legitimately

Fix a finite declared set of atoms AA. An interpretation M⊆AM\subseteq A lists exactly the atoms taken as true. Each input rule has a head hh, a positive body B+B^+, and a default-negative body B−B^-:

h←b1,…,bk,not⁡c1,…,not⁡cj,B+={b1,…,bk},B−={c1,…,cj}.h\leftarrow b_1,\ldots,b_k,\operatorname{not}c_1,\ldots,\operatorname{not}c_j,\qquad B^+=\{b_1,\ldots,b_k\},\quad B^-=\{c_1,\ldots,c_j\}.

An ordinary head is an atom. The special head ⊥\bot, represented by Python None, makes an integrity constraint. A body holds in MM when all its positive atoms belong to MM and none of its negative-body atoms do. An ordinary rule then requires its head to belong to MM; a constraint forbids its body from holding. An empty ordinary body is a fact. An empty constraint body rejects every interpretation.

Satisfying those implications is necessary but insufficient. The program a :- b. and b :- a. is satisfied by both the empty set and the set containing both atoms. The latter offers only circular support. Where did either atom first come from?

The Gelfond–Lifschitz reduct makes the check precise. For a fixed candidate MM, discard a rule if any of its default-negative atoms is in MM, then remove the negative body from every surviving rule. This is the construction in Gelfond and Lifschitz’s 1988 paper, §2. For our extension with constraints, keep the resulting definite rules and constraint bodies separate:

DM={h←B+:(h,B+,B−)∈P, h≠⊥, B−∩M=∅},CM={B+:(⊥,B+,B−)∈P, B−∩M=∅}.D^M=\{h\leftarrow B^+:(h,B^+,B^-)\in P,\ h\ne\bot,\ B^-\cap M=\varnothing\},\qquad C^M=\{B^+:(\bot,B^+,B^-)\in P,\ B^-\cap M=\varnothing\}.

Build the least closure LL of the definite part from nothing. Each round adds every head whose positive premises were available at the start of that round. Accept the candidate only when it is exactly this closure and no retained constraint body is contained in it:

L0=∅,Lt+1=Lt∪{h:(h←B)∈DM, B⊆Lt},M∈SM⁡(P) ⟺ M=L ∧ ∀B∈CM  (B⊈L).L_0=\varnothing,\quad L_{t+1}=L_t\cup\{h:(h\leftarrow B)\in D^M,\ B\subseteq L_t\},\quad M\in\operatorname{SM}(P)\ \Longleftrightarrow\ M=L\ \land\ \forall B\in C^M\;(B\nsubseteq L).

There are at most ∣A∣|A| growing rounds. A round without change establishes the fixed point. The check does not repeatedly replace MM with its reduct’s closure until convergence; the candidate remains fixed throughout one check. Such an outer iteration can oscillate.

Why is the computed closure least? Inductively, every model of the definite rules contains L0L_0, and must contain each subsequent LtL_t. At termination, LL itself satisfies those rules. If a retained positive constraint fails in LL, it fails in every superset too, so the reduct has no model. Otherwise LL is its least model. Enumerating every subset of the declared universe and applying this test therefore returns exactly the stable models for this finite language. Constraints filter candidates; they never derive a head. In particular, :- not local. alone cannot supply support for local.

A two-mode device gives a complete four-candidate audit. Its rules are local :- not remote. (rule 0) and remote :- not local. (rule 1):

CandidateSurviving rule IDsDefinite closureStable?
Empty set0, 1local, remoteNo
remote1remoteYes
local0localYes
local, remoteNoneEmpty setNo

Thus the program allows two alternatives without selecting a preferred mode. For a nonempty family of stable models, a positive atom is a credulous consequence if it occurs in some model and a skeptical consequence if it occurs in every model:

SM⁡(P)≠∅:Cred⁡(P)=⋃M∈SM⁡(P)M,Skep⁡(P)=⋂M∈SM⁡(P)M.\operatorname{SM}(P)\ne\varnothing:\qquad \operatorname{Cred}(P)=\bigcup_{M\in\operatorname{SM}(P)}M,\qquad \operatorname{Skep}(P)=\bigcap_{M\in\operatorname{SM}(P)}M.

Both device modes are credulous, neither skeptical. These are also called brave and cautious consequences; Potassco’s enumeration options distinguish union and intersection. They are not probabilities: two returned alternatives do not establish a fifty-fifty distribution.

If there are no stable models, unrestricted universal quantification over that empty family is vacuously true. Our query interface deliberately reports None for both modes with status no-stable-model. It does not convert that mathematical convention into a claim that every archive decision is reliable. This differs from one empty stable model, for which every positive query returns False.

An exhaustive solver with inspectable reducts

The complete program runs on Python 3.10 or later using the standard library. Atoms are nonempty strings with exact, case-sensitive identity. They must be declared once. Rule rows, bodies and the universe must be lists or tuples; undeclared names and Boolean atom values are rejected. Repeated occurrences within a body are collapsed because a repeated conjunction changes nothing. An atom may occur in both bodies, making that rule’s original body impossible; the normal reduct test still handles it correctly.

stable_models enumerates candidates in the itertools.product((False, True), ...) order of the declared atoms. Output atoms follow declaration order. Rule order affects audit IDs but not semantics. There is no search budget or partial result: a returned no-stable-model follows exhaustive enumeration. An interrupted Python process has returned no such conclusion.

The optional audit records surviving input rule IDs, the atoms first derived in each synchronous layer, the final closure, and violated constraint IDs. violated refers to constraints of the reduct evaluated on its closure, which may differ from the candidate; it is not a report that those constraints’ original bodies hold in the candidate. Counters include all candidates, not only successful ones. rounds includes the final no-change scan per candidate, and derivations counts atoms newly added across all those closures.

"""Finite propositional normal programs; Python 3.10+, standard library."""
from itertools import product


def _sequence(value, label):
    if type(value) not in (list, tuple):
        raise ValueError(label + " must be a list or tuple")
    return tuple(value)


def _name(value):
    if type(value) is not str or not value:
        raise ValueError("atoms must be nonempty strings")
    return value


def stable_models(atoms, rules, query=None, audit=False):
    """Rule: (head_or_None, positive_body, default_negative_body)."""
    atoms = _sequence(atoms, "atoms")
    for atom in atoms:
        _name(atom)
    if len(set(atoms)) != len(atoms):
        raise ValueError("duplicate atom declaration")
    universe = set(atoms)
    if query is not None and _name(query) not in universe:
        raise ValueError("undeclared query")
    if type(audit) is not bool:
        raise ValueError("audit must be bool")
    normalized = []
    for row in _sequence(rules, "rules"):
        row = _sequence(row, "rule")
        if len(row) != 3:
            raise ValueError("a rule has three fields")
        head, positive, negative = row
        if head is not None and _name(head) not in universe:
            raise ValueError("undeclared head")
        bodies = []
        for body in (positive, negative):
            body = _sequence(body, "body")
            for atom in body:
                if _name(atom) not in universe:
                    raise ValueError("undeclared body atom")
            bodies.append(frozenset(body))
        normalized.append((head, *bodies))

    def ordered(values):
        return tuple(atom for atom in atoms if atom in values)

    models, records = [], []
    candidates = rounds = derivations = 0
    for flags in product((False, True), repeat=len(atoms)):
        candidate = {a for a, flag in zip(atoms, flags) if flag}
        # The negative body is tested against the fixed candidate.
        kept = [(i, h, pos) for i, (h, pos, neg) in enumerate(normalized)
                if neg.isdisjoint(candidate)]
        closure = set()
        layers = []
        while True:
            rounds += 1
            new = {h for _, h, pos in kept
                   if h is not None and pos <= closure} - closure
            if not new:
                break
            derivations += len(new)
            if audit:
                layers.append(ordered(new))
            closure.update(new)
        violated = tuple(i for i, h, pos in kept
                         if h is None and pos <= closure)
        stable = closure == candidate and not violated
        candidates += 1
        if stable:
            models.append(ordered(candidate))
        if audit:
            records.append({"candidate": ordered(candidate),
                            "kept": tuple(i for i, _, _ in kept),
                            "layers": tuple(layers),
                            "closure": ordered(closure),
                            "violated": violated, "stable": stable})

    # These sets are positive-atom consequences, not classical negations.
    if models:
        possible = set().union(*map(set, models))
        certain = set(models[0])
        for model in models[1:]:
            certain.intersection_update(model)
        credulous, skeptical = ordered(possible), ordered(certain)
        answer = None if query is None else {
            "atom": query, "credulous": query in possible,
            "skeptical": query in certain}
    else:
        credulous = skeptical = None
        answer = None if query is None else {
            "atom": query, "credulous": None, "skeptical": None}
    return {"status": "models" if models else "no-stable-model",
            "models": tuple(models), "credulous": credulous,
            "skeptical": skeptical, "query": answer,
            "candidates": candidates, "rounds": rounds,
            "derivations": derivations, "audit": tuple(records)}


if __name__ == "__main__":
    atoms = ("record", "indexed", "release", "blocked", "hold")
    archive = (("record", (), ()),
               ("indexed", ("record",), ("blocked",)),
               ("release", ("indexed",), ("hold",)))
    for label, extra in (("before", ()), ("after", (("hold", (), ()),))):
        result = stable_models(atoms, archive + extra, query="release")
        print(label, result["models"], result["query"])
    choice = (("local", (), ("remote",)),
              ("remote", (), ("local",)))
    result = stable_models(("local", "remote"), choice,
                           query="local", audit=True)
    print("choice", result["models"], result["query"])
    for row in result["audit"]:
        print(row)
    odd = stable_models(("ready",), (("ready", (), ("ready",)),),
                        query="ready")
    print("odd", odd["status"], odd["query"])

Save it as nonmonotonic.py and run python3 nonmonotonic.py. The archive begins with the sole model (record, indexed, release). Adding the fact hold changes it to (record, indexed, hold). Both versions inspect 32 candidates and make 88 closure rounds. They respectively count 56 and 88 derivations; those totals include rejected candidates and are not counts of facts in the final model.

The device’s returned model order is ((remote,), (local,)), because the rightmost Boolean position changes first. It checks four candidates, seven closure rounds and four derivations. The last line reports:

odd no-stable-model {'atom': 'ready', 'credulous': None, 'skeptical': None}

For ready :- not ready., assuming no ready turns the rule into a fact, which produces ready. Assuming ready removes the only rule and yields the empty closure. Neither assumption reproduces itself. This failure is fully decided; it is not a timeout. Nor does it say that the original implication has no classical model: the interpretation containing ready satisfies that implication but lacks stable support.

Let nn be the number of declared atoms, rr the number of rule rows, and s=1+n+r+∑(∣B+∣+∣B−∣)s=1+n+r+\sum(|B^+|+|B^-|), counting raw body occurrences before deduplication. Treat atom operations as constant-cost with expected constant-time hashing. The solver takes O(2n(n+1)s)O(2^n(n+1)s) time: each candidate needs at most n+1n+1 scans, and the audit’s ordering work fits the same bound. If kk models are returned, space with audit disabled is O(s+k(n+1))O(s+k(n+1)). Audit adds O(2n(n+r+1))O(2^n(n+r+1)) retained space. Although a candidate may have nn layers, each atom appears in only one layer. These are conservative bounds for this implementation, not performance claims about clingo. String length, Python object overhead and actual hashing behavior add costs outside the atomic-name model.

The tests use a separate characterization: first require a candidate to satisfy every original rule and constraint, then enumerate all orders of its true atoms. Every true atom must have a supporting rule whose positive premises occur strictly earlier and whose negative body is absent from the candidate. This finite support-order criterion is described in Lifschitz, §8. It neither builds a reduct nor iterates a least closure. One can verify its equivalence here: a closure’s first-appearance layers supply such an order; conversely, induction along a supported order derives every candidate atom, while the original-rule model condition prevents deriving anything outside it.

Absence is a modeling commitment

In a stable interpretation, not blocked is satisfied by the absence of blocked. That absence might reflect the archive’s chosen default policy, incomplete input, or a poor model. The solver cannot tell which. If a release really requires an explicit clearance record, encode a positive cleared condition. Changing that rule is a policy choice; speeding up the solver would not make it for you.

Classical negation and default negation have different jobs. The implementation has no operator for classical negation. Even the string not p is just one atom if declared as such; the program does not parse its spelling. If one atom denotes “sensor confirmed healthy” and another “sensor confirmed faulty,” both can be facts unless an explicit constraint forbids their joint occurrence. Such a constraint enforces only that chosen exclusion; it does not create a complete theory of explicit negation. Also, an atom absent from every stable model has failed the positive query, but the solver has not produced a separately represented classical-negation fact.

A positive cycle needs support from outside the cycle. For a :- b. and b :- a., the only stable model is empty. Adding a. yields the sole model containing both. A negative cycle can instead create alternatives or eliminate all stable models, as the device and ready examples demonstrate. It is therefore unsafe to reject every cyclic program, accept every self-consistent implication model, or cache a failed default check as a permanent fact about the world.

This model also assigns no priorities to competing defaults and does not automatically repair an inconsistent specification. Adding the device constraint :- remote. filters the two models down to the local one. That expresses a decision made by the model author, not a preference inferred from the order of the two original rules.

Our language is finite and already propositional. It has no variables, function symbols, grounding, disjunctive heads, aggregates, optimization, probabilities or time. Real tasks require an explicit choice of atom granularity and input coverage. The Potassco guide includes constructs beyond this subset. A useful first application is a small configuration or exception-policy audit where all possible alternatives can be inspected; large instances require a different implementation and appropriate modeling checks. A frame default belongs to a separate representation chapter and does not acquire stable-model semantics merely by being called a default.

Four checks before relying on a default

  1. In the archive, add blocked. instead of hold.. What is the stable model, and does the failure to derive release prove an explicit not_release atom?

    Answer: The sole model is (record, blocked). The indexing rule is discarded relative to that candidate, so indexed and then release have no support. No not_release atom was declared or derived. With the original program plus hold., the different sole model is (record, indexed, hold).

  2. For the device, compare adding the fact local. with adding the constraint :- remote.. What happens if both original mode rules are removed before adding that same constraint?

    Answer: With the two mode rules present, either addition leaves the single model containing local. With only :- remote., the empty model is stable: the constraint forbids remote but supplies no support for local. With only :- not local., there are no stable models, since the empty closure violates the constraint and a candidate containing local cannot derive it.

  3. Why do a :- b. and b :- a. not justify the set containing both atoms? Does adding the constraint :- not a. fix the problem?

    Answer: No strictly ordered support can start: each atom needs the other first. Their positive reduct’s least closure is empty. Adding the constraint forbids that empty closure but contributes no fact, so there are no stable models. Adding the fact a. instead supplies a starting point and derives both atoms.

  4. An API receives no stable models for ready :- not ready.. A programmer sets skeptical = all(ready in m for m in models). What is returned, why is that dangerous, and what should this chapter’s API return?

    Answer: Python’s all returns True for an empty iterable. That follows the vacuous universal convention, but silently presenting it as a supported positive answer hides that the program has no stable interpretation. This API returns status no-stable-model with both query fields None. For the empty program on the declared atom ready, it instead returns one empty model and both fields False; those are different outcomes.

Read the semantic contract before comparing solvers

Gelfond and Lifschitz’s 1988 paper defines stable sets using reducts and proves their minimality. Its §2 then reserves a canonical stable-model semantics for programs with exactly one stable model; §3 discusses cases with several or none. This chapter uses the later ASP practice of considering the entire family of stable models, rather than attributing that modern query interface to the original paper. The source was read through the university-hosted PDF; its rules have atomic heads, whereas our headless-constraint handling is explicitly specified above.

Lifschitz’s survey connects multiple characterizations; its §8 is especially useful for testing a reduct implementation by a different route. The official Potassco guide supplies an executable-language reference for facts, default negation, constraints and cyclic examples. The guide is cited as accessed on September 5, 2026, without asserting a particular embedded clingo version or reproducing a solver benchmark.

For an implementation study, begin with definite-rule forward chaining: it explains the positive closure inside each candidate check. Then compare minimality with the Horn-clause chapter. Keep the surrounding assumptions visible: positive closure alone cannot interpret default negation, and satisfying the original rules alone cannot eliminate unsupported cycles. A useful replication report includes the complete program, declared universe, all returned models, and the precise query policy when the model family is empty.

Make a prediction, then check

The program ready :- not ready. has no stable model. What should this chapter’s ready query return?

Choose one answer

Learning objectives

  • Distinguish classical monotonic consequence, knowledge-base rewriting and defeasible defaults using an explicit added-fact retraction.
  • Implement GL reducts and full stable-model enumeration for finite normal programs, correctly handling constraints, cycles, skeptical/credulous queries and no-model status.

Prerequisites & connections

Explore related knowledge →

References

  1. The Stable Model Semantics for Logic Programming
    Michael Gelfond; Vladimir Lifschitz · 1988
  2. ASP Basics — Potassco Guide
    Potassco
  3. Thirteen Definitions of a Stable Model
    Vladimir Lifschitz · 2010

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.

  • Reread both complete locales, separating classical monotonic consequence under premise inclusion from database replacement/deletion or time change. Adding hold withdraws release without removing rules. not tests absence in a fixed candidate and is not classical negation, a timeout or a probability; multiple stable alternatives are not automatically equiprobable.
  • All nine author tests pass on Python 3.12.4; the program requires only Python 3.10+ standard library. The independent oracle enumerates original-rule/constraint Boolean models and all strict support orders of true atoms, without constructing GL reducts or iterating least closure. It covers all 256 subsets of the eight one-atom rules; 1177 programs of length 0–2 from the 48-rule two-atom pool; 3304 programs of length 0–3 from the 27-rule short-body pool; and 650 seeded random instances with 0–5 atoms and 0–10 rules. Including hand cases: 5403 program instances, 25474 candidate subsets, 2905 returned stable models, 2514 no-model programs and 16 multiple-model programs. These are execution-instance counts, with possible overlap between pools.
  • Checks every audit candidate, surviving original rule ID, strictly new synchronous layers without postponed eligible heads, closure fixed point, constraints evaluated on that reduct closure and the independent stability label. rounds equals all layer counts plus one final empty scan per candidate, and derivations equals the sum of all closure sizes. Also passed 200 renaming/declaration-order/rule-order transformations, all atom queries in mixed programs, 14 invalid inputs, input/result mutation isolation, repeated bodies/rules and unused declared atoms.
  • Verified archive versions at 32 candidates/88 rounds, with 56 derivations before and 88 after hold; sole models are record/indexed/release and record/indexed/hold, while blocked leaves record/blocked. The device has four candidates/seven rounds/four derivations, remote then local model order, and a credulous but not skeptical local query; the constraint selects local. Odd negation has no stable model; unseeded positive cycles have a single empty model and a fact derives both atoms. No models gives None for both modes, one empty model gives False for both; ready can satisfy the classical implication without stable support.
  • Separately checked general correctness: fixed-candidate reduct, inclusion induction and fixed point of finite positive closure, upward persistence of positive-constraint violations, exhaustive completeness, and support-order/first-layer equivalence. Explicit time O(2^n(n+1)s), unaudited space O(s+k(n+1)), and full-audit addition O(2^n(n+r+1)) include raw repeated input, final scans, output models and retained candidate records. Expected hashing/atomic-string assumptions are stated; no production ASP performance or grounding implementation is claimed.
  • Applied pinned Humanizer 2.11.2 and the Chinese guide paragraph by paragraph, with no targeted stock-phrase hits. Root AI cross-review found extra dollar delimiters splitting inline costs and trailing whitespace on display formulas; corrected both and added exact-formula/whitespace regressions. Strict MDX, repository display-math plugins, strict KaTeX and actual React HTML yield five displays/six headings/four answers per locale. Extracted rendered TeX annotations confirm all three complete cost expressions instead of equating successful compilation with correct math presentation. Both locales share byte-identical code and five display equations.
  • Default logic currently lacks a body and uses a catalogue anchor with an explicit pending label. After root integration, both frame/script locale files were confirmed present and that link now targets the article. Other direct links were checked against repository files and stable catalogue IDs. Only /tmp drafts were written, retaining review written. Records AI author checks and received AI editorial fixes; full independent cross-review is separate. No human expert review, whole-site build, browser acceptance, clingo execution or source-code reuse is claimed.
  • Read both complete articles, implementation, metadata and all9 author tests; reran all9 successfully. Six anchors,5 displays, identical full code and4 answered exercises correspond; review did not stop at final stable labels.
  • Independent semantic oracle translates each rule to conjunction/implication/falsity; not a becomes a implies false. Implication is recursively evaluated at here/there, checking both successor worlds at here. A candidateT is accepted exactly when(T,T) satisfies the formulas and no(H,T) with H a proper subset ofT does. This equilibrium reference constructs no GL reduct, iterates no closure and enumerates no author-style support total orders.
  • Checked19,465 programs,105,466 candidates and189,892 two-world interpretation evaluations; all11,837 returned models and their ordering matched. Covers all256 one-atom rule subsets, all18,473 programs of up to3rules from the48-rule two-atom pool,600 random0–7atom/0–14rule programs,128 sets of1–4paired choices with constraint filters, and8 specific cases. Random inputs allow duplicate bodies/rules, opposite-body overlap, empty constraints and Chinese/newline names.
  • A second independent reference audits traces using AND-hypergraph minimum proof-tree heights via a priority queue. Empty bodies give height1; settling every positive premise proposes1+the maximum premise height, without synchronous round scans. Compared all105,466 complete candidate/kept/layers/closure/violated/stable records,74,210 proof atoms and all first layers. Totals146,397 rounds and74,210 derivations match exactly.
  • Every program also ran with audit disabled and differed exactly by removing audit records;2,807 additional atom-query runs checked complete results. Two explicit fixtures distinguish violated on reduct closure from original candidate: candidate{p} for the sole constraint :-p has no closure violation but is unstable; the empty candidate for factp plus :-p violates the closure constraint. Constraints provide no support.
  • Independently checked archive32candidates/88rounds/56or88derivations, with addedhold withdrawingrelease while rules remain. No-modelNone differs from one-empty-modelFalse; unseeded positive cycles do not self-support, and an odd negative cycle can satisfy original implication without a stable model. Brave/cautious are defined for nonempty families, not probabilities or explicit classical-negation facts.
  • Reviewed general correctness: fixed candidate, inclusion induction for positive reduct least models, upward persistence of positive-constraint violations and complete subset enumeration. The support-order oracle also requires original-rule modelhood, not support alone. TimeO(2^n(n+1)s), unaudited spaceO(s+k(n+1)), and audit additionO(2^n(n+r+1)) cover empty-input constants, raw duplicates, retained models and layer tuples. Declaration-order layer formatting may cost n-squared per candidate but s is at leastn; temporary model sets for union fit k(n+1) space.
  • Independent strict MDX/remark-math/repository display plugins/KaTeX and actual React HTML pass:5displays/6headings/4strong answers per locale, no math errors or emphasis remnants outside code. Actual MathML annotations contain exactly the three complete cost expressionsO(2^n(n+1)s),O(s+k(n+1)),O(2^n(n+r+1)); this verifies formula completeness rather than merely no KaTeX error. Catalogue IDs and directly linked article files are valid.
  • Promoted the full prose, equations, code and exercises. Tests read formal MDX only; removed temporary fallbacks/draft skips and updated review assertion to checked. Algorithm and independent references are unchanged; final record binds both locale hashes.
  • Publication navigation update: default logic now has complete articles and recorded checks. Replaced its catalogue placeholder and future wording with the formal chapter link and present tense in both languages. Reversing the recorded replacements restores the old files; all other prose, programs, equations, exercises and prior review evidence are unchanged.

Source locations checked:

  • The Stable Model Semantics for Logic Programming · Actual web PDF reading: university AI-Lab gel88 record https://www.cs.utexas.edu/users/ai-lab?gel88= linked the working 11-page stable.pdf. Read §2 PDF pages 3–4, extracted lines 257–325, for ground-program assumption, deleting rules with a candidate-true negative literal, deleting remaining negative bodies, stable fixed points and the explicit unique-canonical-model restriction; Theorem 1 lines 289–353 for minimality proof; §3 lines 354–361 for positive least models and page 7 lines 456–487 for odd and mutual negation examples. The original atomic-head language does not include our direct headless-constraint syntax. Old stable.ps link returned 404. Direct curl download was attempted but sandbox DNS could not resolve the host; no local PDF hash, screenshot verification or original scanner provenance is claimed. Cached web PDF was successfully read even though one fresh direct-URL open later failed.
  • ASP Basics — Potassco Guide · Actual full 279-line official page opened. Read lines 25–44 for brave union/cautious intersection/all-model option; lines 166–190 Syntax of Core Rules for facts, normal rules, default negation and headless constraints; lines 207–216 for positive-cycle lack of acyclic support; lines 233–260 for two-model and no-model negative cycles; lines 261–270 for the constraint-to-fresh-odd-loop explanation. Grounding context lines 160–165 is explicitly outside our finite string-atom implementation. The line 215 first/second-rule explanation is reversed in the source; our independent examples use the actual rule semantics and do not repeat that sentence. No exact page release version, clingo execution or performance result was verified.
  • Thirteen Definitions of a Stable Model · Actual 17-page author PDF read: §3 PDF pages 4–5, extracted lines 114–180, gives default-based retraction and circumscription/default logic/autoepistemic distinctions; §5 page 7 lines 222–238 repeats reduct semantics; §6 page 8 lines 240–282 gives no-nonempty-unfounded-set characterization; §8 page 10 lines 321–353 gives Definition G, an original-program model admitting a well-order in which positive supports strictly precede their head. This last characterization, specialized to finite permutations and retaining original constraint satisfaction, is the test oracle. Opened UT official https://www.cs.utexas.edu/~ai-lab/people-view.php?PID=187 and read lines 177–178 identifying the 2010 Fields of Logic and Computation publication. No particular revision date of the author PDF is asserted. A screenshot cache-miss and curl DNS failure are not reported as successful visual checks.
  • The Stable Model Semantics for Logic Programming · Independently read the11-page university PDF through the working https://www.cs.utexas.edu/~vl/papers/stable.pdf spelling after /users/vl and the gel88 page returned tool errors. Read pp1–2 atom-head syntax and canonical-model context; §2 pp3–5 web lines257–353 reduct construction, stable fixed point, Theorem1/minimality and explicit exactly-one-canonical-model restriction; §3 pp5–7 lines354–487 least positive models, odd/mutual negative cycles and no/several-model discussion. Extracted text has broken ligatures but the relevant statements were legible; no local download or screenshot inspection is claimed. Independently verified official UT author bibliography https://www.cs.utexas.edu/~ai-lab/people-view.php?PID=187 lines335–336:1988 and proceedings1070–1080. No claim that original atomic-head syntax included this chapter’s headless constraints or modern full-family query API.
  • Thirteen Definitions of a Stable Model · Independently opened17-page author PDF and read §3 pp4–5 lines114–180 for distinct circumscription/default/autoepistemic approaches; §5 p7 lines222–238 for reducts; §8 p10 lines321–353 for supported well-order criterion; §10 pp11–12 lines376–397 for here-and-there pairs X subset Y and equilibrium minimality, supporting the peer’s independent oracle. Also read nearby original-rule/model assumptions and the finite well-order caveat. Official UT author bibliography lines177–178 confirms2010 Fields of Logic and Computation. Did not verify every theorem in the17-page paper or its infinite/first-order generalizations.
  • ASP Basics — Potassco Guide · Independently read official279-line page: enumeration options25–44 for brave union/cautious intersection; core syntax166–190 for facts, normal/default-negative rules and constraints; positive cycle207–216; mutual negative cycle233–241; odd cycle253–260; fresh-atom constraint encoding261–270. Read grounding context as outside scope. Source line215 reverses which displayed positive-cycle rule is unsatisfied; the chapter does not reproduce that source error. No clingo version, browser solver execution, performance benchmark or page revision was independently verified.

Related topics

No matches. Try a synonym or acronym.

0 results shown

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