Tiramemsu

A mini book · Tiramemsu

Reasoning with N3 in Tiramemsu

Rules over a memory that has two clocks and never forgets: conclusions that respect time, and that fall when their reasons go.

{ ?p v:worksAt ?c.
  ?c v:locatedIn ?l }
    => { ?p v:worksIn ?l }.

Ten short chapters · feature n3 · reasoning by eyeron

Contents

  1. 01Why rules in agent memoryWhat follows from memory, conclusions that stay grounded, and what never-forget means for a reasoner.
  2. 02N3 in fifteen minutesFacts, formulas, rules, variables, builtins, backward rules and inference fuses: enough N3 to read every example.
  3. 03Your memory as N3What the reasoner sees: statement IRIs, tm:content, layers, scopes and predicate pruning.
  4. 04Time, part 1: transaction timeReasoning as of any past transaction, with the rules believed then and a clock that reads then.
  5. 05Time, part 2: valid timeFacts that were never true at the same time never combine: pointwise semantics, the segment sweep and episodes.
  6. 06Rule sets as memoryStored rules with history, corrections by supersede, and the monotonicity check.
  7. 07MaterializationWriting conclusions as derived beliefs that fall with their premises and their rules.
  8. 08RecipesTenure from validity, colleagues who overlapped, trusted facts, layered rule sets, contradiction fuses and previewing a rule edit.
  9. 09ReferenceEvery surface, option, vocabulary term and error, and the limits of the design.
  10. 10Time leaves the storeBoth clocks exported as RDF 1.2: every statement reified with its lifetime, the triple asserted in the view you choose, checked by LeanRDF.

About this book

Tiramemsu stores facts with their own ids, two clocks and a history that is never deleted. This book is about the next step: asking what follows from that memory, with N3 rules, and keeping what follows as memory too.

A plain rule engine joins facts that were never true at the same time, forgets which rules it used last month, and leaves its conclusions behind when their premises are retracted. The chapters show how tiramemsu avoids all three, one idea at a time, with examples you can paste.

Chapters 1–3

The basics

Why rules belong in memory, enough N3 to read every example, and what a rule sees of your statements.

Chapters 4–5

Time

Reasoning as of any transaction, with the rules believed then, and valid time that never combines facts from different moments.

Chapters 6–10

Writing it down

Rule sets with history, materialized conclusions that stay grounded, seven recipes, a reference, and both clocks exported as RDF 1.2.

Status. Reasoning ships behind the opt-in Cargo feature n3, off by default (OpenSpec change add-n3-reasoning, built on add-derived-beliefs). The reasoner is eyeron by Jos De Roo (MIT). Until eyeron is on crates.io the feature is available only when building from the repository.

Reasoning is done by eyeron, a native Rust N3 reasoner by Jos De Roo (MIT). New to tiramemsu? Read Time travel and bitemporality and Layered graphs first.