nogood-backtracking

57 beliefs (50 IN, 7 OUT)

This topic covers the non-monotonic reasoning and contradiction resolution machinery of the TMS, centered on two core mechanisms: outlist-based defeat and nogood-driven backtracking. The outlist is the single primitive underlying all defeasible reasoning patterns — challenges, kill-switches, supersession, and default logic (outlist-is-universal-defeat-mechanism, non-monotonic-system-is-single-reversible-primitive). Its semantics are fully specified: multiple outlist entries form a conjunction where all must be OUT for the justification to hold (multiple-outlist-is-conjunction), absent outlist nodes are permissively treated as OUT while absent antecedents strictly fail (outlist-absent-means-out), and these relationships survive persistence through JSON serialization with rebuilt dependent indexes (outlist-relationships-survive-persistence). Because outlist defeat flips truth values without deleting nodes, every defeat operation is inherently reversible (all-defeat-mechanisms-are-reversible), though dialectical challenge permanently destroys premise identity by injecting a justification into a formerly unjustified node (negative-semantics-have-reversible-defeat-but-permanent-identity-effects).

The contradiction detection and resolution pipeline forms a deterministic sequence. Detection filters to IN beliefs only (contradictions-only-checks-in-beliefs), shuffles them before batching to probabilistically cover cross-batch pairs across runs (contradictions-shuffles-before-batching), and enforces a minimum of two claims per nogood (contradiction-min-two-claims). The add_nogood function unconditionally records every contradiction before attempting resolution (add-nogood-always-records), then resolves via dependency-directed backtracking: find_culprits traces justification chains back to premises, scores by entrenchment, and retracts the least-entrenched premise to minimize disruption (backtracking-retracts-least-entrenched). When no traceable chain exists — all nogood members are premises — a fallback retracts the member with the fewest dependents (add-nogood-fallback-uses-dependent-count). Retraction cascades transitively through BFS propagation with guaranteed termination, and surgical restoration hints identify cascade victims with surviving alternative premises (contradiction-resolution-minimizes-disruption-and-guides-recovery). These beliefs are predominantly premises grounding the system's design, with several derived beliefs synthesizing broader properties like completeness and traceability (contradiction-management-is-complete-and-traceable, negative-semantics-ground-deterministic-dialectics).

Nogood ID management reflects a specific bug fix history. The belief that IDs were derived from list length (nogood-ids-assume-append-only) is OUT, having been superseded by the monotonic counter design where _next_nogood_id only ever increases and persists as a high-water mark in the network_meta SQLite table (nogood-id-counter-is-monotonic, nogood-id-persisted-in-meta). Import operations advance the counter past the highest imported ID to prevent collisions (nogood-id-import-sync). A backwards-compatibility path handles databases created before this fix by deriving the counter from existing IDs (nogood-id-backwards-compat).

Several broader synthesis beliefs are also OUT: outlist-nodes-not-in-dependents-index was retracted, indicating that the dependent index tracking issue it described has been resolved. Three dispute-resolution beliefs (dispute-resolution-is-complete-and-reliable, dispute-resolution-is-topology-accurate, dispute-resolution-spans-all-origins) and two negative-semantics uniformity beliefs (negation-is-transparent-to-evaluation, negative-semantics-are-uniform-through-minimality) are retracted, suggesting that high-level claims about the uniformity and completeness of dispute resolution were found to be overstated or inaccurate — the surviving beliefs make more carefully scoped claims about specific properties like reversibility, minimal disruption, and guided recovery rather than sweeping uniformity assertions.