Skip to content

Add RDF/TrustGraph projection for typed claim formulas #659

Description

@kunyuan

Context

Gaia now has an executable predicate-logic surface through claim(formula=...): typed PredicateSymbol / FunctionSymbol declarations, UserPredicate applications, ClaimAtom, equality, causal markers, and finite-domain quantifier lowering. This gives Gaia a stronger internal semantics than a plain subject-predicate-object graph because formulas carry arity, domain/type constraints, quantifier scope, claim references, and lowering behavior into operators / factor graphs.

At the same time, systems such as TrustGraph show that RDF-style graphs are useful as an interoperability, indexing, retrieval, and provenance layer. The two designs are compatible if RDF is treated as a projection/interchange representation rather than the canonical Gaia formula kernel.

Proposal

Add a Gaia RDF / TrustGraph bridge that can project typed Gaia claim formulas into RDF named graphs while preserving enough structure to round-trip or audit the original formula.

Suggested mapping:

  • Domain -> RDF class / SKOS concept
  • PredicateSymbol -> RDF property or class, with arity/domain metadata
  • FunctionSymbol -> RDF property/function node with result range metadata
  • UserPredicate atom -> RDF triple where lossless, or an explicit atom node when arguments/provenance require it
  • Equals / measured values -> value binding or measurement node
  • Forall / Exists / Implies / compound formulas -> reified formula nodes or named graph structures, not flattened into a single RDF edge
  • ClaimAtom -> RDF link to the source Gaia claim IRI
  • Formula provenance -> PROV-O / named graph metadata with source claim, source span, package, and compiler/lowering metadata

Non-goals

  • Do not replace Gaia's canonical typed formula AST with RDF triples.
  • Do not flatten quantified or compound formulas into simple SPO edges.
  • Do not let LLM-extracted RDF predicates enter Gaia formulas without typed symbol validation.

Why this matters

This would let Gaia benefit from TrustGraph-like graph retrieval, ontology selection, cross-document linking, and provenance/explainability while preserving Gaia's own semantics for formula validation, lowering, and probabilistic inference.

Acceptance criteria

  • Define a minimal RDF projection schema for Gaia domains, symbols, atomic formulas, claim references, and provenance.
  • Support direct triple projection for simple atoms where no logical structure is lost.
  • Support reified/named-graph projection for quantifiers and compound formulas.
  • Add round-trip or audit tests showing that projection does not silently erase quantifier scope, arity/domain information, or claim identity.
  • Document that RDF is an external graph/interchange layer, while Gaia typed formula AST remains the canonical source of formula semantics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions