Logic

GMEOW Logic — Vision and Doctrine

Status: canonical target architecture for GMEOW's reasoning layer. This is the manifesto of a five-document design set; it carries the vision, doctrine, lineage, and target architecture. The formal semantics, runtime, rollout, and conformance contract live in the sibling documents below. Where this document states a thesis once, the siblings make it precise — repetition is replaced by cross-reference on purpose.

The document set

Document Genre Contents
LOGIC.md (this) manifesto vision, doctrine, lineage, target architecture
LOGIC-SEMANTICS.md formal semantics the unified core, triple-term/assertion rules, semantic profiles, modality, worlds, decidability
LOGIC-RUNTIME.md runtime solver architecture, the Nemo–Prolog seam, graph versioning, generated artifacts, CLI
LOGIC-MIGRATION.md rollout the MVP ladder, adapter phases, gates, deprecations, the design risk register
LOGIC-CONFORMANCE.md contract the conformance corpus and the loss-ledger preservation contract
LOGIC-REFERENCES.md appendix external standards, theory, and engines cited — staged for the metadata/references.ttl ledger

The thesis

GMEOW must not be limited by the expressivity, serialization assumptions, or runtime cost of OWL-era tools. The current stack uses OWL 2 DL/EL, RDF 1.1 compatibility encodings, Jena, ROBOT, ELK, HermiT, SHACL, and owlrl because those are the available mature tools. That is a compatibility position, not the semantic ceiling.

logic: is the canonical reasoning language for GMEOW. It is RDF 1.2-native, not an OWL syntax with a new namespace. It accepts none of its predecessors' restraints — not OWL's decidability ceiling, not the DL-safe rule restriction, not the tree-model property, not enforced monotonicity, not the forced choice between open-world and closed-world semantics. It subsumes those systems as fragments and exceeds all of them. Then, following the projection doctrine that governs the rest of the project, it generates lossy compatibility artifacts for the tools and ecosystems that cannot consume the canonical form.

How much does OWL leave out? The exact fraction is not asserted here as a slogan — it is measured and emitted by generated/logic/projection-report.ttl across construct coverage, competency-question coverage, preserved entailments, validation constraints, explanation/ provenance features, and modal/counterfactual features (see LOGIC-CONFORMANCE.md). The durable, qualitative point is what OWL can never hold: logic programming, defeasible and non-monotonic inference, contextual/standpoint/ temporal/modal/probabilistic scope, paraconsistent treatment of contradiction, metalevel reasoning over statements, and the modal and second-order content of a real foundational ontology. OWL deliberately trades expressivity for decidability; logic: does not.

logic: is deliberately Turing-complete — a computational substrate, not merely a description language. It is meant to compute, generate, and search, not only to classify, which is the dividing line between OWL (sub-Turing by design) and the Prolog/N3 lineage logic: belongs to. Rejecting the decidability ceiling is a choice, not an oversight: it means refusing to let decidability cap the canonical model, then recovering termination and tractability where a consumer needs them — as a projection guarantee and a statically certified profile, never as a restriction on what can be said. The formal account — the halting problem, decidability-as- projection, and the certified profiles — is in LOGIC-SEMANTICS.md.

This is the same doctrine GMEOW already applies everywhere else:

logic: applies that doctrine to logic itself, and to the foundational ontology.

Why This Exists

The current reasoning lane has three structural limits.

First, OWL is not RDF 1.2. GMEOW's statement layer is already RDF 1.2-first, but OWL reasoners consume an RDF 1.1-compatible downcast. That downcast is useful, but it cannot be the whole semantic story for standpoint-indexed, attributed, temporal, confidence-weighted claims.

Second, OWL captures one fragment and forbids the rest. OWL 2 DL and EL optimize for decidable classification. They cannot express logic programming, recursion with negation, value-inventing rules, defeasible defaults, modal necessity, second-order identity supply, weighted/probabilistic inference, or reasoning about statements as objects. SHACL adds closed-world validation but no inference; Datalog adds recursion but no open-world classification; Prolog adds computation but is not RDF-native and has no open-world reading. No prior system unifies these, and none is RDF 1.2-native. GMEOW needs all of them, coherent, in one framework.

Third, the current Java/Docker reasoning path is expensive. HermiT sound-and-complete consistency over the merged ontology runs ~15 minutes and grows with the ontology; the default 900s container ceiling sits right at that cliff, so HermiT gets a doubled 1800s ceiling (src/gmeow_tools/reason.py:44-45, _HERMIT_TIMEOUT; gate-health tracked as reasoner timeout gate). HermiT and ROBOT are valuable compatibility checkers, but they are too slow and too far from RDF 1.2 to be the canonical authority.

Lineage and Supersession

logic: is a deliberate superset. Each predecessor contributes a fragment; each imposes a restraint we reject; logic: subsumes the contribution and discards the restraint.

Predecessor Contributes Restraint we reject How logic: exceeds it
RDFS lightweight subsumption almost no semantics full taxonomy + everything below
OWL 2 DL decidable classification, rich class constructors decidability ceiling, tree-model property classification is one mode; no expressivity cap
OWL 2 EL tractable subset even narrower one projection profile, nothing more
SWRL rules over OWL DL-safe restriction; rules bolted on, not native rules are first-class and unrestricted
RIF rule interchange never fully realized; interchange, not a logic a single native logic, not an exchange format
SHACL closed-world validation, shapes no inference; validation only open- and closed-world co-resident
Datalog (Soufflé, Nemo, RDFox) recursive monotonic rules, fast materialization monotonic only; no open-world classification; no modality monotonic and non-monotonic; with classification and modality
Prolog (SWI, Scryer, Trealla) unification, SLD resolution, computation not RDF-native; no open-world reading; no native probability logic programming over RDF 1.2 triple terms
ProbLog probabilistic logic programming a separate tool from one's ontology probability/confidence scope is first-class (carefully typed — see semantics)
F-logic (Flora-2, Ergo) frame/object reasoning + LP its own syntax, outside RDF frame reasoning over native RDF frames
N3 Logic (cwm, EYE) RDF-native rules, quoted graphs, builtins, both chaining directions pre-RDF-1.2 cited formulae; no contextual/modal scope as data RDF 1.2 triple terms are the modern cited formula, with full contextual scope
SPARQL query, CONSTRUCT a query language, not a logic query is a projection of goal resolution
Common Logic first-order interchange no RDF model, no contextual layer FOL-grade expressivity, RDF 1.2-native, contextualized
gUFO OWL upper ontology, stereotypes a lossy OWL realization of UFO — drops modality and higher-order types the full foundational theory; gUFO becomes a projection

The closest living ancestor is N3 Logic and the EYE reasoner: RDF-native rules, quoted graphs (the direct precursor of RDF 1.2 triple terms), builtins, and both forward and backward chaining. logic: is N3's maximal successor — it keeps the RDF-native, quoted-formula, bidirectional core and adds contextual scope, defeasibility, modality, probability, paraconsistency, and a foundational ontology, all as first-class data.

Design influences beyond formal logics — Ithkuil

The ambition — maximal, explicit, factored precision — has a natural-language analog in Ithkuil (John Quijada), the engineered language built to make cognitive distinctions fully explicit. Four lessons carry directly into logic::

The decisive lesson is cautionary, and it becomes the project's strongest framing. Ithkuil achieves total precision but is near-unspeakable — maximal expressivity with no usable surface. That is precisely the failure mode a maximal logic risks, and exactly what the projection doctrine prevents: author once in the maximal canon, then project to speakable, tractable surfaces (OWL, Datalog, Prolog, SHACL, gUFO) for every consumer.

GMEOW Logic is Ithkuil's precision with Ithkuil's fatal flaw engineered out — a maximal canon that always carries a lossy, usable projection.

OWL, gUFO, and the upper ontologies as projections

The canonical statement of the doctrine, made once here and referenced elsewhere: every prior formalism is a generated, lossy compatibility target — useful, documented, reproducible, and not canonical. OWL DL/EL, Datalog, SHACL, SWRL, N3, Prolog, and SPARQL are projections of the logic; the artifact set, drift gates, and preservation contract are specified in LOGIC-RUNTIME.md and LOGIC-CONFORMANCE.md.

The foundation follows the same doctrine, with one careful distinction. gUFO is the primary generated down-projection of UFO⁺ because it is the OWL realization of the same UFO lineage — truth-preserving for the fragment OWL can express. BFO, DOLCE, and SUMO are generated alignment/bridge views, not truth-preserving projections, unless a specific subfragment is certified as such in the loss ledger. They carry genuinely different ontological commitments, and the maximal-source doctrine respects that rather than overclaiming a shared foundation. The operational semantics of the foundation are in LOGIC-SEMANTICS.md; its rollout and projection discipline are in LOGIC-MIGRATION.md.

Concept → Repo Machinery

Every design concept maps to a file or function that hosts or templates it. This is the grounding index that keeps the whole design honest; the siblings cite these in context.

Design concept Existing machinery to reuse / extend
Canonical RDF 1.2 lead + lossy downcast + round-trip gate StatementGenerator, statement_compile.py:123-130,151-210
RDF 1.2 statement/triple-term authoring form dsl/statements/vocabulary.ttl:45-54 (StatementMetadata, reifier, qSubject…)
Compile to typed IR, then project LiftMap/UpProjection, up_projection.py
Registered generator + drift/orphan gate generator.py:49,97,723; make check-generated/make regenerate
logic: namespace registration config.py PREFIXES (add logic: beside gmeow, config.py:21-24)
Loss metadata convention gmeow:lossyDrop, dsl/mappings/vocabulary.ttl:237; mapping_dsl.py:151,493
Two-engine agreement make crosscheck / gmeow crosscheck-queries (Makefile:42)
Closed-world validation lanes pySHACL over shapes/gmeow-shapes.ttl; ROBOT verify over queries/verify/*.rq
Monotonic materialization oracle owlrl in tests/test_reasoning_entailments.py
Temporal scope gmeow temporal (cli.py:476)
Foundation discipline as conformance reasoning_lint.py (MixIden/MixRig/RelComp); imports/gufo.ttl
Reified worlds + accessibility gmeow:Standpoint / gmeow:NarrativeReferenceFrame; accordingTo (index); sharpens (accessibility); standpointModality (□/◇/□¬)
Type-level counterfactual (no-occurrence gate) risk slice (Hazard ⊑ Disposition, CausalLink/Cascade over EventType); teleology Goal/satisfiedBy; norms prescribedConduct
Belief-world vs asserted-world deception heldStandpoint / projectedStandpoint on one Event
Deterministic revision (entrenchment) reuse gmeow:overrides / AuthorityLevel / moreSevereThan / sharpens as the tie-break order; tie → unknown
Engine pattern (Rust core + Python oracle + corpus gate) GTS GTS conformance design; crates/gts/; pyoxigraph model; Principle 7
Possible world = named graph oxigraph quad store; accordingTo context; paraconsistency = world-indexed entailment
World construction substrate Nemo existential rules + acyclicity/termination certification
Backward chaining (Prolog-grade) embedded Scryer Prolog; magic-sets over Nemo later
Second-order identity supply OWL punning (class-as-individual) + Flora-2/Ergo HiLog reification
Logic-to-prose explanation source mandatory annotations (validate.py structural_lint); gmeow describe; markdown datatype
Upper-ontology projection targets config.py:560-575 (gufo/dolce/bfo as "upper")
Reasoning cost reality reason.py:44-45 (_HERMIT_TIMEOUT, reasoner timeout gate)
CLI sub-app + reason modes cli.py:332,1168 (add_typer); cli.py:407 (reason)

Constitutional Alignment

logic: is the project's own doctrine applied to logic and to its foundation. The CONSTITUTION requires a maximal canonical model, maximal linking, explicit and gated projection, and no compatibility format promoted above the canonical source. The statement layer already realizes this for facts; logic: realizes it for axioms, rules, and the upper ontology. OWL, Datalog, SHACL, Prolog, N3, SPARQL, and gUFO take their correct places as documented, reproducible, lossy projections — never second sources of truth.

End State

The end state is not "OWL, but faster." It is:

This makes GMEOW's logic match the rest of the project: maximal model, maximal linking, explicit projection, and no compatibility format — not even OWL, not even gUFO — promoted above the canonical source.