Encyclopedia Delta Delta Kernel Syntax Dterm

ARTICLE 3 claims 3 models

Delta Kernel Syntax Dterm

DTerm is the grammar of a deliberately small arithmetic, a language stripped to counting, adding, and multiplying, with nothing else allowed.

The term language

DTerm is the name for the terms of a minimal arithmetic language. A term is one of five things: a variable, the number zero, the successor operation (adding one), addition, or multiplication. The declaration is an inductive type, which means it builds every possible expression from these five shapes and nothing else. This is the syntax of the δ object logic, a formal system that Recognition Science uses as its forced base. The grammar is deliberately bare: there is no universe hierarchy, no function types, no propositions-as-types, no set membership, and no comprehension. Formulas are plain data, not statements in the host logic.

The operations on terms are equally disciplined. De Bruijn indices name variables by their binder depth rather than by name, which keeps substitution mechanical. The ledger, a discrete record of events, is the image here: the only atomic predicate is equality, defined as identity of ledger content. The definitions of lift and subst are structural recursions, meaning they walk the term tree and rebuild it, with no choice, no classical logic, and nothing beyond primitive-recursive syntax manipulation. The module imports nothing beyond the Lean prelude; it does not use Mathlib.

What DTerm does not claim is as important as what it establishes. It does not define what a derivation is; that is the job of Check.lean. It does not assert that any formula is true; it only describes the shapes formulas can take. It does not introduce a universe hierarchy or any type-theoretic machinery. The declaration is a definitional choice, a MODEL in the framework's vocabulary, not a theorem. It sets up the syntax so that later modules can check derivations as plain data, but the syntax itself proves nothing about the world. It is the grammar, not the sentence.

MODEL DTerm · IndisputableMonolith/DeltaKernel/Syntax.lean
/-- Terms over the distinction signature: de Bruijn variables, zero,
successor (the distinction step), addition, multiplication.
`0` and `S` are the primitive signature of the free distinction structure;
`+` and `·` are the canonical recursion-licensed extensions (their defining
equations are axiom rules in `Check.lean`, licensed by initiality:
"freeness is forcing"). -/
inductive DTerm : Type where
  | var  : Nat → DTerm
  | zero : DTerm
  | succ : DTerm → DTerm
  | add  : DTerm → DTerm → DTerm
  | mul  : DTerm → DTerm → DTerm
MODEL lift · subst · IndisputableMonolith/DeltaKernel/Syntax.lean
/-- Shift the free variables `≥ c` up by `d`. -/
def lift (d c : Nat) : DTerm → DTerm
  | var n   => if n < c then var n else var (n + d)
  | zero    => zero
  | succ t  => succ (t.lift d c)
  | add t s => add (t.lift d c) (s.lift d c)
  | mul t s => mul (t.lift d c) (s.lift d c)
/-- Substitute `s` for variable `k` (binder instantiation: free variables
above `k` shift down by one). -/
def subst (k : Nat) (s : DTerm) : DTerm → DTerm
  | var n   => if n = k then s else if k < n then var (n - 1) else var n
  | zero    => zero
  | succ t  => succ (subst k s t)
  | add t u => add (subst k s t) (subst k s u)
  | mul t u => mul (subst k s t) (subst k s u)
MODEL DTerm · IndisputableMonolith/DeltaKernel/Syntax.lean
/-- Terms over the distinction signature: de Bruijn variables, zero,
successor (the distinction step), addition, multiplication.
`0` and `S` are the primitive signature of the free distinction structure;
`+` and `·` are the canonical recursion-licensed extensions (their defining
equations are axiom rules in `Check.lean`, licensed by initiality:
"freeness is forcing"). -/
inductive DTerm : Type where
  | var  : Nat → DTerm
  | zero : DTerm
  | succ : DTerm → DTerm
  | add  : DTerm → DTerm → DTerm
  | mul  : DTerm → DTerm → DTerm

What this page does not claim

DTerm does not define derivations or proof checking. DTerm does not assert the truth of any arithmetic statement. DTerm does not introduce a universe hierarchy or type-theoretic constructs.

Verify this page

Every tagged claim above names its theorem. To check one yourself rather than trust this page, elaborate the source module with Lean 4 and audit its axiom basis:

$ lake env lean IndisputableMonolith/DeltaKernel/Syntax.lean
expected axiom basis: [propext, Classical.choice, Quot.sound] (the Lean kernel's standard three; no RS-specific axioms)

A page whose claims cannot be reproduced this way does not ship. In production, every anchor links to the exact declaration in the public source release, and this block carries the build receipt for the page itself.

Derived articles

This page is generated by a question-recursion engine: the questions its answers raise become the next pages. The current agenda, with open targets marked red:

MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND