Prismatic Nabla

Prismatic Nabla

410 files Epistemic

Overview

Prismatic Nabla implements the NABLA Infinity epistemic framework, the platform's core system for managing knowledge, confidence, and truth. It enforces 7 non-negotiable axioms that govern how the platform forms, maintains, and revises beliefs. Every intelligence assessment, security rating, and analytical conclusion passes through Nabla's verification pipeline.

With 410 source files, Prismatic Nabla is one of the most substantial applications in the umbrella. This reflects the reality that epistemic management pervades every domain: OSINT intelligence requires confidence scoring, EASM ratings require evidence-based assessment, compliance claims require provenance verification, and threat intelligence requires contradiction-preserving analysis. Nabla is not a utility library -- it is the epistemic foundation on which all platform intelligence products rest.

7 Non-Negotiable Axioms

Each axiom is implemented as an enforcement module with configurable severity (HARD blocks operations, SOFT logs warnings):

Axiom Implementation Details

#AxiomEnforcementImplementationViolation Response
1Signal PluralityHARDPrismaticNabla.Axiom.SignalPluralityBLOCKED until 2+ signals provided
2Contradiction PreservationHARDPrismaticNabla.Axiom.ContradictionPreservationBLOCKED -- conflicting signals must be preserved
3Absence InformativeSOFTPrismaticNabla.Axiom.AbsenceInformativeWARNING -- missing signal tracked as evidence
4Time DecayHARDPrismaticNabla.Axiom.TimeDecayBLOCKED until timestamps provided
5Unknown ValidHARDPrismaticNabla.Axiom.UnknownValidBLOCKED -- "I don't know" must be accepted
6Source IndependenceSOFTPrismaticNabla.Axiom.SourceIndependenceWARNING -- independent sources weighted higher
7Provenance MandatoryHARDPrismaticNabla.Axiom.ProvenanceMandatoryBLOCKED until provenance chain provided

Axiom Enforcement Pipeline

# Every belief assertion passes through the axiom pipeline
defmodule PrismaticNabla.AxiomPipeline do
  @axioms [
    SignalPlurality,
    ContradictionPreservation,
    AbsenceInformative,
    TimeDecay,
    UnknownValid,
    SourceIndependence,
    ProvenanceMandatory
  ]

  def enforce(belief, evidence) do
    Enum.reduce_while(@axioms, {:ok, belief}, fn axiom, {:ok, acc} ->
      case axiom.check(acc, evidence) do
        {:ok, updated} -> {:cont, {:ok, updated}}
        {:violation, :hard, reason} -> {:halt, {:error, {:axiom_violation, axiom, reason}}}
        {:violation, :soft, reason} ->
          Logger.warning("Soft axiom violation: #{axiom} - #{reason}")
          {:cont, {:ok, acc}}
      end
    end)
  end
end

Axiom Application Examples

Signal Plurality in Practice:

# BLOCKED: Only one source
{:error, {:axiom_violation, SignalPlurality, "Only 1 signal, minimum 2 required"}} =
  PrismaticNabla.assert(%{
    claim: "Entity X is high risk",
    evidence: [single_source_signal],
    confidence: 0.90
  })

# ALLOWED: Multiple independent sources
{:ok, belief} = PrismaticNabla.assert(%{
  claim: "Entity X is high risk",
  evidence: [shodan_signal, censys_signal, certificate_signal],
  confidence: 0.92
})

Contradiction Preservation in Practice:

# Both signals preserved, not resolved
{:ok, belief} = PrismaticNabla.assert(%{
  claim: "Entity X compliance status",
  evidence: [
    %{signal: :sanctions_match, confidence: 0.88, source: :eu_sanctions},
    %{signal: :clean_record, confidence: 0.85, source: :local_registry}
  ],
  contradictions: [:sanctions_match_vs_clean_record]
})
# belief.has_contradictions == true
# belief.resolved == false  (contradictions preserved, not smoothed)

Belief Graph

The Belief Graph is Nabla's core data structure -- a directed acyclic graph where nodes represent claims, evidence, or meta-beliefs, and edges represent support, contradiction, or derivation relationships.

Graph Structure

Node TypeDescriptionProperties
ClaimAn assertion about the worldConfidence, timestamp, provenance
EvidenceA data point supporting or contradicting a claimSource, reliability, freshness
Meta-BeliefA belief about the quality of other beliefsMeta-confidence, scope
InferenceA derived claim from combining evidenceDerivation rule, input beliefs
Edge TypeDescriptionSemantics
SupportsEvidence supports a claimWeighted by source reliability
ContradictsEvidence contradicts a claimPreserved per Axiom 2
DerivesClaim derived from other claimsInference rule attached
SupersedesNewer evidence supersedes olderTime decay application

Graph Operations

# Build belief graph for an entity assessment
{:ok, graph} = PrismaticNabla.build_graph(%{
  entity: "example.com",
  domains: [:security, :compliance, :reputation],
  depth: 3
})

# Query the graph
{:ok, supporting} = PrismaticNabla.graph_query(graph, :supporting, claim_id)
{:ok, contradicting} = PrismaticNabla.graph_query(graph, :contradicting, claim_id)
{:ok, inference_chain} = PrismaticNabla.graph_query(graph, :derivation_path, claim_id)

Confidence Scoring

Confidence scoring in Nabla is Bayesian-inspired with domain-specific adjustments:

Scoring Model

Confidence(claim) = base_confidence
                  * corroboration_factor(supporting_signals)
                  * contradiction_penalty(contradicting_signals)
                  * time_decay_factor(evidence_age)
                  * source_independence_bonus(unique_sources)
FactorCalculationRange
Base ConfidenceInitial assessment from primary evidence0.0 - 1.0
Corroboration1 + 0.1 * (independent_sources - 1) capped at 1.51.0 - 1.5
Contradiction Penalty1 - 0.15 * contradiction_count floored at 0.50.5 - 1.0
Time Decaye^(-lambda * age_days) with configurable half-life0.0 - 1.0
Source Independence1 + 0.05 * independent_source_count capped at 1.31.0 - 1.3

Confidence Thresholds by Domain

DomainMinimum ConfidenceTrinity Gate Required
Critical Decisions0.95MANDATORY
Security Ratings0.80MANDATORY
Standard Operations0.80MANDATORY
Exploratory Analysis0.60RECOMMENDED
Research Queries0.50OPTIONAL

Temporal Decay Configuration

# Configure domain-specific decay rates
PrismaticNabla.configure_decay(%{
  security_vulnerabilities: %{half_life_days: 30},   # Fast decay: vulns get patched
  corporate_ownership: %{half_life_days: 365},        # Slow decay: ownership changes rarely
  dns_records: %{half_life_days: 7},                  # Medium decay: DNS changes periodically
  compliance_assessment: %{half_life_days: 90}         # Quarterly reassessment expected
})

Trinity Gate (4-Layer)

The Trinity Gate is the platform's multi-layer verification system. All claims must pass through it before achieving "verified" status:

Layer Architecture

LayerMethodVerified PropertyNabla Module
Layer 1: StructuralGraph TheoryBelief graph forms valid DAG, no cyclesPrismaticNabla.TrinityGate.Structural
Layer 2: LogicalRule-BasedPropositions satisfy logical consistencyPrismaticNabla.TrinityGate.Logical
Layer 3: FormalModal Logic + Lean4Claims proven in formal systemPrismaticNabla.TrinityGate.Formal
Layer 4: ConsciousnessMeta-verificationReasoning process itself is soundPrismaticNabla.TrinityGate.Consciousness

Gate Execution

# Pass belief through Trinity Gate
{:ok, verified} = PrismaticNabla.trinity_gate(belief)

# Returns detailed verification report
%{
  structural: %{passed: true, dag_valid: true, cycles: 0},
  logical: %{passed: true, contradictions_flagged: 1, consistent: true},
  formal: %{passed: true, lean4_proof: "theorem ...", verified: true},
  consciousness: %{passed: true, meta_confidence: 0.97},
  overall: :passed,
  verified_at: ~U[...]
}

# Check axiom compliance
{:ok, report} = PrismaticNabla.axiom_check(belief)
# Returns per-axiom compliance status

Usage

# Create a belief with evidence
{:ok, belief} = PrismaticNabla.assert(%{
  claim: "Entity X is high risk",
  evidence: [signal_1, signal_2, signal_3],
  confidence: 0.87
})

# Verify through Trinity Gate
{:ok, verified} = PrismaticNabla.trinity_gate(belief)

# Check axiom compliance
{:ok, report} = PrismaticNabla.axiom_check(belief)

# Query beliefs with confidence threshold
{:ok, beliefs} = PrismaticNabla.query(entity: "X", min_confidence: 0.80)

# Revise belief with new evidence (Bayesian update)
{:ok, revised} = PrismaticNabla.revise(belief, new_evidence)

# Get full belief graph for entity
{:ok, graph} = PrismaticNabla.entity_graph("X", depth: 3)

Architecture

Raw Evidence --> Signal Collection --> Axiom Enforcement --> Trinity Gate --> Verified Belief
                    |                    |                  |                    |
              Plurality Check      Contradiction       Structural +         Belief Graph
              Source Independence   Preservation        Logical +             Storage
              Provenance Tracking  Time Decay           Formal Check
ComponentImplementation
Axiom PipelineGenServer chain with sequential enforcement
Belief GraphKuzuDB for persistence, ETS for hot access
Trinity Gate4-stage pipeline with parallel Layer 1-2 and sequential Layer 3-4
Confidence EnginePure functional module with Bayesian update
Time DecayBackground GenServer applying periodic decay to all beliefs
TelemetryFull event coverage for axiom checks, gate passages, confidence updates

Integration Points

All platform modules that make assessments or form conclusions integrate with Nabla for epistemic verification:

ConsumerIntegration TypePrimary Use
Prismatic PerimeterSecurity rating confidenceEvidence-based A-F grades
PrismaticOSINT assessment confidenceInvestigation conclusion validation
Prismatic Lean4Trinity Gate Layer 3Formal proof integration
Prismatic Monte CarloQEVE probabilistic componentStatistical confidence bounds
Prismatic AgentsAgent decision confidenceEpistemic-aware agent operations
Prismatic OSINT Czech LegalEntity resolution confidenceCross-source entity matching
  • NABLA Axioms -- The 7 non-negotiable axioms implemented and enforced by the Prismatic Nabla framework
  • Trinity Gate -- The 4-layer verification system (structural, logical, formal, consciousness) managed by Nabla
  • Intelligence Synthesis -- Belief graph construction and confidence scoring for multi-source intelligence fusion

Connect & Contribute

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