# Design Decisions ## Geometric Logic Foundation - **Axioms as Sequents:** `forall vars. premises |- conclusion` - **Positive Conclusions:** Existentials and disjunctions allowed, but never negation - **Geometric Morphisms:** Preserved by design for category-theoretic semantics --- ## Identity System - **Luid** ("Local Universe ID"): Globally unique across all structures - **Slid** ("Structure-Local ID"): Index within a single structure - Bidirectional mapping enables persistent identity despite structure changes --- ## Storage - **Append-Only:** Elements only tombstoned, never deleted - **Patch-based Versioning:** Each commit is a delta from parent - **GeologMeta:** Single homoiconic theory instance storing all data --- ## Type System - **Postfix Application:** `x f` not `f(x)` — categorical style - **Derived Sorts:** Products of base sorts for record domains - **Product Domains:** Functions can take record arguments: `[x: M, y: M] -> M` - **Relations → Prop:** Relations are functions to `Prop` --- ## Chase Algorithm - **Fixpoint Iteration:** Derives consequences until closure - **Congruence Closure:** Merges elements when axioms conclude `x = y` - **Tensor Algebra:** Efficient axiom checking via sparse tensors - **Termination:** Unit laws no longer cause infinite loops --- ## Solver Architecture - **Explicit Search Tree:** Not implicit in call stack - **Refinement Preorder:** Structures can grow (carriers, functions, relations) - **Obligations vs Unsat:** Axiom obligation = need to witness conclusion (not failure) - **Tactics-based:** AutoTactic composes CheckTactic, ForwardChainingTactic, PropagateEquationsTactic --- ## Query Compilation - **QueryOp Intermediate:** SQL-like operators (Scan, Filter, Join, Project) - **Optimization Passes:** Filter fusion, projection pushdown - **Store-aware:** Compiled directly to GeologMeta queries with indexing --- ## Tensor Algebra - **Sparse Representation:** Roaring Bitmaps for efficient membership - **Lazy Expression Trees:** Tensor products fused with contractions - **Boolean Semiring:** AND for product, OR for sum