Modal Logic

epistemic

Modal Logic

Definition

Modal logic is a family of formal logical systems that extend classical propositional and predicate logic with operators for modality -- concepts such as necessity, possibility, knowledge, belief, obligation, and temporality. Within the Prismatic Platform, modal logic provides the theoretical foundation for Trinity Gate's third verification layer (Formal Necessity), where conclusions are evaluated not merely for truth but for the strength of their truth: Is a conclusion necessarily true (it must hold in all consistent scenarios), merely possibly true (it holds in some scenarios but not all), or contingently true (it happens to hold in the current scenario but could easily have been false)?

The practical consequence of this distinction is profound for decision-making. A conclusion that is necessarily true given the evidence can be acted upon with full commitment -- the NM/ND doctrine's "No Doubts" phase. A conclusion that is merely possibly true requires additional investigation before commitment. A conclusion that is contingently true is unreliable for high-stakes decisions regardless of its current confidence score. Modal logic provides the formal framework for making these distinctions precise, machine-checkable, and auditable.

Within the Prismatic Platform's architecture, modal logic is not implemented as a standalone engine but is encoded into Lean4 type signatures and proof obligations. The translation from modal claims to type-theoretic representations allows the platform to leverage Lean4's proof automation while preserving modal semantics.

Historical Foundations

Aristotle to Leibniz

Modal reasoning is among the oldest topics in logic. Aristotle's Prior Analytics (circa 350 BCE) distinguished between "necessary" and "possible" propositions and formulated syllogistic rules for combining them. His example -- "All humans are necessarily mortal" versus "Some humans are possibly wise" -- illustrates the fundamental modal distinction that persists in modern systems.

Gottfried Wilhelm Leibniz (1646-1716) introduced the concept of "possible worlds" as an informal device for understanding necessity and possibility. A proposition is necessary if it is true in all possible worlds. A proposition is possible if it is true in at least one possible world. A proposition is contingent if it is true in some possible worlds but not others. This intuition, informal in Leibniz's time, would be formalized three centuries later into the rigorous semantics that the Prismatic Platform employs.

Kripke Semantics

Saul Kripke's 1959 paper "A Completeness Theorem in Modal Logic" revolutionized the field by providing a formal semantics for modal operators. Kripke semantics defines a modal model as a triple (W, R, V) where:

  • W is a set of possible worlds (abstract states of affairs)
  • R is an accessibility relation between worlds (which worlds are "reachable" from which)
  • V is a valuation function assigning truth values to propositions at each world

The modal operators are interpreted as:

  • Necessarily P (written as box-P): P is true in all worlds accessible from the current world
  • Possibly P (written as diamond-P): P is true in at least one world accessible from the current world

The properties of the accessibility relation R determine the specific modal system:

Property of RModal SystemAxiomMeaning
NoneK (basic)K: box(P -> Q) -> (box-P -> box-Q)Distribution of necessity over implication
ReflexiveTT: box-P -> PWhat is necessary is true
Reflexive + TransitiveS44: box-P -> box-box-PNecessary truths are necessarily necessary
Reflexive + Symmetric + Transitive (equivalence)S55: diamond-P -> box-diamond-PIf something is possible, it is necessarily possible

The Prismatic Platform primarily operates in system S4 for epistemic claims and system S5 for logical and mathematical claims. The choice of system affects which proofs are valid and which inferences are licensed.

Contemporary Extensions

Modern modal logic has branched into numerous specialized variants, several of which are directly relevant to the platform's epistemic infrastructure.

Varieties of Modal Logic

Alethic Modal Logic

Alethic modal logic is the "classical" version dealing with truth, necessity, and possibility. Its two primitive operators are:

  • box-P (necessarily P): P is true and could not have been otherwise
  • diamond-P (possibly P): P could be true, even if it is not actually true

The duality between the operators is fundamental: diamond-P is equivalent to not-box-not-P. Something is possible if and only if its negation is not necessary.

In the Prismatic Platform, alethic modal logic governs the distinction between conclusions that the evidence forces (necessary) and conclusions that the evidence permits but does not force (possible). The Trinity Gate's formal layer requires necessity for critical decisions -- the evidence must force the conclusion, not merely be consistent with it.

Epistemic Modal Logic

Epistemic modal logic introduces operators for knowledge and belief:

  • K_a(P): Agent a knows that P (P is true in all worlds consistent with a's information)
  • B_a(P): Agent a believes that P (P is true in all worlds consistent with a's beliefs)

The distinction between knowledge and belief is critical: knowledge requires truth (you cannot know something false), while belief does not (you can believe something false). The KD45 system formalizes rational belief: consistent (D: you do not believe contradictions), positively introspective (4: if you believe P, you believe that you believe P), and negatively introspective (5: if you do not believe P, you believe that you do not believe P).

For the Prismatic Platform, epistemic modal logic formalizes the distinction between what the platform's agents believe based on available evidence and what is actually true. A QEVE assessment produces beliefs grounded in evidence, not knowledge of ground truth. The epistemic operators make this distinction explicit and prevent the platform from confusing high confidence with certain knowledge -- a conflation that classical logic encourages but modal logic prevents.

Deontic Modal Logic

Deontic modal logic introduces operators for obligation and permission:

  • O(P): It is obligatory that P
  • P(P): It is permitted that P
  • F(P): It is forbidden that P (equivalent to O(not-P))

In the Prismatic Platform, deontic modal logic formalizes the NM/ND doctrine's prescriptive dimension. Once a conclusion passes Trinity Gate with sufficient confidence, certain actions become obligatory (complete execution) and certain actions become forbidden (partial delivery, hedging, doubt-compromised execution). The deontic formalization ensures that doctrinal requirements are not merely guidelines but logically binding obligations within the system's reasoning framework.

Temporal Modal Logic

Temporal modal logic introduces operators for reasoning about time:

  • G(P): P holds at all future times (always)
  • F(P): P holds at some future time (eventually)
  • X(P): P holds at the next time step
  • P-until-Q: P holds continuously until Q becomes true

Temporal modal logic is relevant to the platform's time decay axiom formalization. The claim "evidence E is reliable" decays over time, transitioning from "necessarily reliable" through "possibly reliable" to "no longer reliable." Temporal modal logic provides the formal framework for reasoning about these transitions.

Application in Trinity Gate

The Trinity Gate's third layer (Formal Necessity) uses modal logic to distinguish three categories of conclusions:

Necessary Conclusions

A conclusion is necessary if it must be true in every possible world consistent with the evidence. Formally:

box(Evidence -> Conclusion)

This means: in every scenario where the evidence holds, the conclusion follows. There is no consistent scenario in which the evidence is true but the conclusion is false. Necessary conclusions receive the highest epistemic standing and are eligible for critical decision thresholds (tau = 0.95).

Example: If three independent sanctions databases flag Entity X, and the platform's inference rules derive "Entity X has sanctions exposure," this conclusion is necessary given the evidence -- there is no consistent interpretation of three independent sanctions hits that does not imply sanctions exposure.

Possible Conclusions

A conclusion is possible if it is true in at least one possible world consistent with the evidence, but not in all such worlds. Formally:

diamond(Evidence -> Conclusion) AND NOT box(Evidence -> Conclusion)

This means: the evidence is consistent with the conclusion, but also consistent with the conclusion being false. Possible conclusions are flagged for additional investigation and are not eligible for critical decision thresholds.

Example: If media coverage is mixed (some positive, some negative), the conclusion "Entity X has reputational risk" is possible but not necessary -- the evidence is consistent with both "genuine reputational risk" and "normal media noise."

Contingent Conclusions

A conclusion is contingent if it happens to hold in the current scenario but is not forced by the evidence. Contingent conclusions are the most fragile -- they are true only because of the specific configuration of current evidence and would change with minor evidence modifications. Monte Carlo verification specifically targets contingent conclusions through perturbation analysis.

Encoding Modal Logic in Lean4

The Prismatic Platform encodes modal logic in Lean4 through a type-theoretic representation of possible worlds and accessibility.

World Types

-- A world is an assignment of truth values to propositions
structure World where
  propositions : Prop -> Bool

-- Accessibility between worlds
def Accessible (w1 w2 : World) : Prop := ...

-- Necessity: true in all accessible worlds
def Necessarily (P : World -> Prop) (w : World) : Prop :=
  forall w', Accessible w w' -> P w'

-- Possibility: true in at least one accessible world
def Possibly (P : World -> Prop) (w : World) : Prop :=
  exists w', Accessible w w' /\ P w'

Proof Obligations

When the QEVE pipeline generates a Lean4 theorem for a critical conclusion, the theorem includes a modal proof obligation:

-- Theorem: Given the evidence, the conclusion is necessary
theorem risk_assessment_necessary
  (evidence : EvidenceSet)
  (h_sanctions : SanctionsHit evidence)
  (h_ownership : OwnershipChanges evidence >= 3)
  (h_plurality : IndependentSources evidence >= 2)
  : Necessarily (fun w => ElevatedRisk w evidence) current_world := by
  intro w' h_accessible
  -- Proof proceeds by showing the conclusion follows in all accessible worlds
  ...

If the proof succeeds, the conclusion is formally necessary. If it fails, the system attempts to construct a counterworld -- a possible world consistent with the evidence where the conclusion is false. The counterworld, if found, is reported as part of the QEVE output.

The Distinction That Matters

The central contribution of modal logic to the Prismatic Platform is the formal distinction between "probably true" and "necessarily true." Classical probability theory can say "there is a 95% chance this conclusion is correct." Modal logic can say "given the evidence, this conclusion must be true in every consistent scenario."

These are fundamentally different claims:

Claim TypeFormal StatusResidual RiskAppropriate For
Probably true (95%)Statistical5% failure rate across decisionsPortfolio-level risk management
Necessarily true (box)Logical0% if axioms holdIndividual high-stakes decisions

For a due diligence assessment on a single acquisition target, "95% probability" means a 1-in-20 chance of being wrong -- unacceptable for a decision worth millions. "Necessarily true given the evidence" means the conclusion cannot be wrong unless the evidence itself is wrong -- a much stronger guarantee that focuses attention on evidence quality (which is auditable) rather than statistical luck (which is not).

This is why the Trinity Gate requires formal necessity for critical decisions: it shifts the epistemic burden from "are we statistically lucky?" to "is our evidence sound?" -- a question that provenance tracking, source independence verification, and time decay can actually answer.

Philosophical Implications

Possible Worlds and Epistemic Humility

Kripke's possible worlds framework provides a formal basis for epistemic humility. By explicitly modeling alternative scenarios consistent with the evidence, modal logic prevents the platform from confusing "true in the current assessment" with "true in all assessments." Every conclusion is evaluated against its modal status, and possible-but-not-necessary conclusions are flagged even when their confidence scores are high.

This aligns with the NABLA Infinity "Unknown Valid" axiom: the platform must be capable of expressing "I don't know" as a legitimate modal state (the proposition is neither necessary nor impossible given current evidence).

De Re vs. De Dicto

Modal logic distinguishes between de re modality (about things) and de dicto modality (about propositions). "Necessarily, the CEO of Firm X is responsible for compliance" is de dicto -- it says something about the proposition. "The CEO of Firm X is necessarily responsible for compliance" is de re -- it says something about the person. The distinction matters in entity resolution: a de dicto claim survives entity re-identification, while a de re claim may not.

"Modal collapse" occurs when a system treats all truths as necessary truths -- conflating "is true" with "must be true." Classical logic (without modal operators) suffers from modal collapse by default, because it has no formal machinery for distinguishing necessity from contingency. The Prismatic Platform's adoption of modal logic specifically prevents modal collapse, ensuring that contingent conclusions are recognized as contingent even when they happen to be true in the current evidence configuration.

Limitations

Modal logic, while powerful, has limitations that the platform addresses through complementary methods.

Possible worlds explosion: The number of possible worlds consistent with a set of evidence can be combinatorially large. The platform manages this through bounded model checking (exploring only worlds within a specified depth) and abstract interpretation (grouping similar worlds into equivalence classes).

Accessibility relation specification: The choice of accessibility relation (and thus the specific modal system) affects which conclusions count as necessary. The platform uses domain-specific accessibility relations: S5 for mathematical properties, S4 for epistemic claims, KD45 for agent belief modeling.

Quantified modal logic: Combining modal operators with quantifiers ("for all entities, necessarily P") introduces well-known logical complications (the Barcan formula, rigid designators). The platform handles quantified modal claims through Lean4's dependent type system, which provides a natural resolution of the technical difficulties.

Computational complexity: Modal logic satisfiability ranges from NP-complete (basic K) to PSPACE-complete (S5) to undecidable (quantified modal logic). The platform uses timeout-bounded proof search and falls back to Monte Carlo verification when formal proof is computationally infeasible.

  • Trinity Gate -- Verification gate whose third layer implements modal necessity checking
  • Formal Verification -- Mathematical proof framework in which modal logic is applied
  • Lean4 -- Theorem prover encoding modal logic through dependent types
  • QEVE -- Verification engine generating modal proof obligations
  • NABLA Infinity -- Epistemic framework whose axioms modal logic formalizes
  • Belief Graph -- Data structure from which modal claims are extracted
  • Confidence Scoring -- Scoring framework informed by modal status distinctions
  • Epistemic Robustness -- Perturbation stability complementing modal necessity
  • NM/ND Doctrine -- Execution doctrine whose deontic aspects modal logic formalizes
  • White Team -- Verification team producing modal proofs
  • Monte Carlo Verification -- Probabilistic fallback when modal proof is computationally infeasible
  • Entity Resolution -- Domain where de re/de dicto distinctions apply

See Also


Connect & Contribute

Created by Tomáš Korcak (korczis) | Open Source under GHL