Logic Selection: Logics that move between contexts

A15Prose proofChoosing the right logic for the right context boundary.

Although this account holds forever, men ever fail to comprehend, both before hearing it and once they have heard.

Heraclitus, Fragment B1

This chapter formalizes the logic and absence-policy dimensions of context, defining Anchor A15 (Logic Selection): each view carries a quadruple (signature, constraints, proof logic, absence policy), and coherence across views requires reconciling both the inference rules and the interpretation of missing data. The three-valued logic adapter is introduced as a first-class reconciliation mechanism for CWA/OWA mismatches. T5 (Negation/Absence) is resolved as a policy mismatch rather than a model deficiency. The formal treatment here extends the context structure of Chapter 10 and corresponds to the narrative discussion of evidentiary gaps in Vol I, Chapter 6 ("Evidence without Custody").

The Problem with "Not"

A hospital merges two patient databases. Database A lists allergies explicitly: if a patient has a penicillin allergy, the record says so. If the allergy field is empty, the system treats it as unknown. Database B uses a standardized allergy field: if the field is empty, the patient has no known allergies.

After the merge, patients with missing allergy data from Database A are flagged as "no allergies." A physician prescribes penicillin. The patient has an allergic reaction. The system did exactly what it was told to do.

This is not a software bug in the ordinary sense. Both databases were internally consistent. The error occurred at the boundary: two systems with different interpretations of absence were merged without reconciliation.

The same pattern appears everywhere:

  • Inventory: "not in stock" may mean "confirmed out" or "we haven't checked yet."
  • Legal eligibility: "not prohibited" may mean "permitted" or "not yet ruled on."
  • Product safety: "no toxicity data" may mean "tested and safe" or "never tested."

The common thread is negation. What does "not p" mean? The answer depends on two independent choices the system has made, often implicitly—the proof logic governing valid inferences, and the absence policy governing how missing data is interpreted.

Two Independent Axes

The first axis is proof logic. Different logics have different inference rules.

Classical logic accepts the law of excluded middle: for any proposition p, either p or ¬p holds. It also accepts double negation elimination: ¬¬p implies p. Semantically, propositions are bivalent: every proposition is either true or false, even if the system does not know which.

Intuitionistic logic rejects both(Dalen 1988, vol. 1, ch. 1)A. S. Troelstra and D. van Dalen, Constructivism in Mathematics: An Introduction (Amsterdam: Elsevier, 1988), vol. 1, ch. 1.View in bibliography. The law of excluded middle is not assumed; p ∨ ¬p is not a theorem. Double negation elimination fails: ¬¬p means "assuming ¬p leads to contradiction," but that does not prove p is true. Negation is asymmetric: proving ¬p requires a refutation procedure, not merely the absence of a proof for p.

The difference matters when you ask what "not proven" implies. Under classical logic with completeness assumptions, "not provable" can be taken as "false." Under intuitionistic logic, "not provable" remains "unknown."

But here is the critical distinction: classical logic itself does not license "not provable implies false." That inference requires an additional commitment, an epistemic policy layered on top of the proof system. This policy is independent of the proof logic.

The second axis is absence policy.

Closed-World Assumption (CWA): If p is not asserted, then ¬p holds(Reiter 1978)Raymond Reiter, "On Closed World Data Bases," in Logic and Data Bases, ed. Hervé Gallaire and Jack Minker (New York: Plenum Press, 1978), 55–76.View in bibliography. Relational databases often operate as if CWA holds for many predicates: absence of a tuple is treated as falsity for that predicate, except where NULL/unknown is explicitly modeled.

Open-World Assumption (OWA): If p is not asserted, then p is unknown(Patel-Schneider 2003, ch. 2)Franz Baader and Diego Calvanese and Deborah L. McGuinness and Daniele Nardi and Peter F. Patel-Schneider, The Description Logic Handbook: Theory, Implementation, and Applications (Cambridge University Press, 2003), ch. 2.View in bibliography. This is the standard interpretation in knowledge graphs and ontologies. The Semantic Web assumes incomplete knowledge. Absence from the graph means "we don't know," not "it's false."

You can mix these independently. Classical logic with OWA is coherent: you accept excluded middle as a logical principle but treat missing data as unknown. Intuitionistic logic with CWA is also coherent, though unusual: you reject excluded middle but treat absence as negation for operational purposes.

The common pairings (classical/CWA for databases, intuitionistic/OWA for knowledge graphs) are conventions, not necessities. The conflation to avoid: "classical logic says absence implies negation." It does not. CWA says that.

CWA and OWA in Practice

Databases assume CWA because it makes queries decidable and results finite. If you ask "which products are in stock?" the system returns all rows where in_stock = true. Everything else is implicitly false. This works well when the database is the authoritative source and completeness is guaranteed.

Knowledge graphs assume OWA because they aggregate incomplete information from multiple sources. If you ask "is product X sustainable?" and the graph has no sustainability data for X, the answer is "unknown," not "no." This works well when the knowledge base is expected to grow and no single source is authoritative.

The merge problem emerges when these systems meet:

  • Database (CWA): "product X not listed" means X does not exist in our catalog.
  • Knowledge graph (OWA): "product X not in graph" means we have no information about X.
  • Merge: If we treat the combined data under CWA, products not in the database are treated as nonexistent, even if the knowledge graph is merely silent about them. If we treat it under OWA, the database's authoritative "not in catalog" becomes "unknown status," which may be operationally useless.

Without explicit absence policy annotation, the system silently picks one interpretation. The merge succeeds. The downstream queries are wrong. This is T5.

A15: Logic Selection

A15
Logic Selection (A15)

A view specification is a quadruple:

Ctx(U)=(Σ,I,LU,PU)\text{Ctx}(U) = (\Sigma, I, L_U, P_U)

where:

  • Σ = signature (types, predicates, function symbols)
  • I = constraints (integrity constraints, invariants)
  • LUL_U = proof logic (classical, intuitionistic, three-valued, paraconsistent)
  • PUP_U = absence policy (CWA, OWA, NAF, NULL)

The derivable sentences Th(U) are determined by Σ, I, and LUL_U. The interpretation of missing data is governed by PUP_U.

Coherence requirement: When views overlap, both L and P must be reconciled:

  1. Same (L,P)(L, P): claims directly comparable
  2. Different LL: inference rules differ; translation may be lossy
  3. Different PP: absence semantics differ; need explicit policy adapter

This definition extends Chapter 10's context structure. Ctx(U) is the full specification of a view; Th(U) is the set of sentences derivable in that view. The separation of L and P makes the two degrees of freedom explicit.

Most T5-style errors are pure P mismatches with identical L. The databases often share classical logic but differ on absence policy. The fix is not to change the logic; it is to reconcile the policies.

The Logic Adapter

When views with different absence policies overlap, we need a reconciliation mechanism. The canonical approach is to translate both sides into a common status space.

The 3-valued adapter: Map all claims into true/false/unknown.

Definitions:

  • unknown = no assertion (the view is silent, not contradicting)
  • CWA-derived = falsity arising from absence, not from explicit negative evidence
SourceMapping
OWA view, p asserted true→ true
OWA view, p asserted false→ false
OWA view, p not asserted→ unknown
CWA view, p asserted true→ true
CWA view, p asserted false→ false
CWA view, p not asserted→ false (tagged: CWA-derived)

Gluing rules:

  • true / true → agreement (true)
  • false / false → agreement (false)
  • unknown / unknown → agreement (unknown)
  • true / false → real conflict (requires resolution)
  • true / unknown → true wins (unknown means "no assertion," not "¬p")
  • false (CWA-derived) / unknown → commitment-vs-ignorance mismatch

The last case is the critical one. A CWA-derived "false" meeting OWA "unknown" is not a logical contradiction. The CWA view is asserting "we have complete information and this is false." The OWA view is asserting "we have incomplete information and cannot say." These are compatible claims about different epistemic states.

But they are not the same claim. The system must decide: adopt the CWA interpretation (lose the uncertainty signal), adopt the OWA interpretation (lose the operational commitment), or record the disagreement explicitly.

The logic adapter is a first-class object, parallel to the witness objects and obstruction witnesses from earlier chapters. It produces either a glued section in the shared status presheaf, or an obstruction witness labeled "policy mismatch." It records what reconciliation was attempted and what the result was.

Worked Example: Allergen Data

Two data sources overlap on product X.

Source A (Inventory Database, CWA):

  • Ctx(A) = (Σ, I, classical, CWA)
  • contains_allergens(X) not in database
  • CWA interpretation: X does not contain allergens

Source B (Supplier Knowledge Graph, OWA):

  • Ctx(B) = (Σ, I, classical, OWA)
  • contains_allergens(X) not in graph
  • OWA interpretation: allergen status of X is unknown

Overlap via logic adapter:

Source ASource BMapped AMapped BResult
contains_allergens(X) = truecontains_allergens(X) = truetruetrueAgreement
(absent)(absent)falseunknownPolicy conflict
(absent)= truefalsetrueReal conflict
= true(absent)trueunknownA wins (B silent)

Resolution for policy conflict:

  1. Adopt A's policy: X does not contain allergens. This is dangerous for medical applications. The absence from A's database may reflect data entry lag, not safety certification.

  2. Adopt B's policy: Allergen status is unknown. This may block operational workflows that require a definite answer. But for safety-critical decisions, "unknown" is the honest answer.

  3. Record disagreement: "Source A claims ¬contains_allergens (CWA-derived from absence). Source B has no information. Policy conflict on overlap."

Option 3 is the honest one. The system surfaces the policy mismatch. A downstream consumer can decide whether to treat absence as safe (accepting risk) or unknown (blocking the workflow until explicit data is provided).

The key point: this is not a failure of the merge. It is the merge working correctly—exposing a genuine ambiguity that was previously hidden by implicit assumptions.

Beyond Two-Valued

Classical and intuitionistic are not the only proof logics. Three-valued logics (Kleene(Kleene 1952, §64)Stephen Cole Kleene, Introduction to Metamathematics (Amsterdam: North-Holland, 1952), §64.View in bibliography, Łukasiewicz(Łukasiewicz 1920)Jan Łukasiewicz, "O logice trójwartościowej," Ruch Filozoficzny 5 (1920): 170–171.View in bibliography) make "unknown" a first-class truth value. Negation of unknown is unknown (strong Kleene), which captures the behavior we want for absent data.

Paraconsistent logics tolerate contradictions without explosion(Priest 2002)Graham Priest, "Paraconsistent Logic," in Handbook of Philosophical Logic, ed. Dov M. Gabbay and Franz Guenthner (Dordrecht: Kluwer Academic Publishers, 2002), 287–393.View in bibliography(Belnap 1977)Belnap, Nuel D., Jr., "A Useful Four-Valued Logic," in Modern Uses of Multiple-Valued Logic, ed. J. Michael Dunn and George Epstein (Dordrecht: D. Reidel Publishing, 1977), 5–37.View in bibliography. In classical logic, a contradiction (p ∧ ¬p) implies everything (ex falso quodlibet). This is catastrophic when merging inconsistent sources. Paraconsistent logics allow local contradictions to be quarantined: the merge can proceed, flagging the contradiction, without the entire system becoming trivially true.

Default logic and non-monotonic reasoning allow conclusions to be retracted when new information arrives(Reiter 1980)Raymond Reiter, "A Logic for Default Reasoning," Artificial Intelligence 13, no. 1--2 (1980): 81–132.View in bibliography. This is useful for CWA-style assumptions that should be overridden by explicit evidence. If the database assumes "no allergen data means no allergens" but later receives explicit allergen information, the default is defeated.

The parameter space is not binary. Each view occupies a point in (L, P) space. The system must annotate which point each view occupies, or the merge will silently pick one.

Touchstone Resolved: T5

T5 (Negation/Absence) was: System treats absence as negation, e.g., "no allergy listed" → "no allergy."

T5 in A15 terms: The source view has Psource=OWAP_{source} = \text{OWA}. The target view has Ptarget=CWAP_{target} = \text{CWA}. The system translated without policy reconciliation. The CWA interpretation was applied to OWA data.

The fix: Require Ctx(U) = (Σ, I, L_U, P_U) for every view. When translating claims across views, check both L and P compatibility. If PsourcePtargetP_{source} \neq P_{target} and the claim involves absence, apply the logic adapter or record disagreement.

T5 is not an LLM "hallucination" or a training data problem—it is an absence-policy mismatch. The fix is not better models; it is explicit (L, P) annotation.

The honest system response:

Query: "Does product X contain allergens?"

System: "Source A (CWA): no allergen data, interpreted as no allergens. Source B (OWA): no allergen data, interpreted as unknown. Policy conflict on overlap. Recommend: treat as unknown for safety-critical decisions."

This is not a bug but the system correctly reporting that different sources have different epistemic standards, and that those standards disagree on this query.

Consequence

Negation is not universal. It depends on two knobs: the proof logic (what ¬ means as an inference rule) and the absence policy (what "p not asserted" implies). Turn either knob, and the meaning of "not p" changes.

Chapter 10 built contexts as restriction structures. Chapter 11 stated coherence as the sheaf condition. Chapter 12 handled dependent predicates. Chapter 13 adds the final piece: the logic and policy of each view must be explicit, or gluing will silently conflate incompatible interpretations of absence.

Part III's machinery is now complete. Coherence requires not just agreeing on facts, but agreeing on inference rules and absence semantics. The next chapter asks: given all this structure, what does it mean to substitute one thing for another?