Jump to content

2.2 The Prime Kernel (TPS 0.2.0)

From The Invariance Itself
Revision as of 13:51, 26 September 2026 by TPM>BFP_Rauch (TPS 0.2.0 (proposed) revision 5 rebuilt (v15): D91.1-D173.1 under tpm_tps_thread_request 0.1.9 and the bibliography resolution of 2026-09-26)

Instruction artifact, machine-optimized text: TPS, section 2.2 The Prime Kernel. Part of TPS and the TPM hub. Human-only edit (TPS 5.13). TPS 0.1.0 was declared final at revision 4 on 2026-09-22, a version declaration recorded in the foundations record; the chain begins at TPX's first landing (TPS 5.6.7). TPS 0.1.1 changed only the status lines. This page is revision 5 of the tree, proposed as version 0.2.0 until H-DECL declares it. The text below is this section of the TPS artifact at 0.2.0 (proposed), verbatim; the whole artifact and its file digest are on The Principia Machina/TPS. Human readers: the contents page is the map.

TPS 2.2  THE PRIME KERNEL
purpose: laws, assumptions, hard boundaries, CONSTRAINT entries; the
         TPK schema; the kernel tests T1-T6 and which parts are
         MECHANICAL; the declared form and its grammar
governs: 2.2 | version: 0.2.0 (proposed) | class: instruction artifact
audience: operator, agent

2.2.1  The TPK is the first zone of the TFK: laws, assumptions, hard
       boundaries, CONSTRAINT entries. It is the guide's L0 KERNEL (see
       1.1). [I-020]
2.2.2  A restriction is declared as CONSTRAINT entries in the TPK, so the
       TPK yields the restricted DOF inventory (see 2.3.4). [B-02]
2.2.3  The kernel tests T1-T6 are the guide's tests of a TPK. TPX runs
       them as the TPK zone is entered and returns a rejected component
       to the author (see 5.5). [I-057]
       The bodies of T1-T6 are specified at guide 3.6: T1
       WELL-FORMEDNESS; T2 ATOMICITY OF ASSUMPTIONS; T3 CONSISTENCY TO
       DEPTH, bounded by a declared depth s_max; T4 DIMENSIONAL
       HOMOGENEITY; T5 DOF YIELD, which is where a CONSTRAINT entry is
       tested (2.2.2, 2.3.4); T6 BOUNDARY CLOSURE. Each names its
       inputs, class, pass condition and failure report; they run in
       order and T1 stops the run on failure. T2's semantic part, T3
       where the TPK is not executable, and T6 where a boundary
       predicate is not executable, are INSPECTION by the guide's own
       classing; every other part is MECHANICAL. [I-161] [D85.2]
       EXECUTABLE, in TPC, both residences, over the fields of 2.2.6:
       T1 whole, including the resolution of every REFS and TARGET,
       the UNIT checks of 2.2.9 and 2.2.10, and, where a declared form
       is present, its parse and the names rule (2.2.12); T2's
       syntactic part: an ASSUMPTION's PROPOSITION is refused when, at
       top level - outside closed bracket pairs and closed quotations,
       enclosing brackets stripped, an unclosed pair hiding nothing -
       it holds the words "and", "but" or "whereas", the phrase "as
       well as", the symbols "&" or U+2227, a semicolon, a second
       sentence or a list line, ASCII words matched whole in any case;
       T3 over the CONSTRAINT entries at depth 1 within every S_MAX >= 1
       (a TARGET both removed and fixed, or fixed at two values
       compared after normalization to coherent SI through the
       twelve-significant-digit canonical form; two FIX values of
       different KIND, or a value that cannot be normalized, returned
       to the author) and, where a LAW carries EQUATION, over the laws
       to the ground fragment (2.2.17); T4's constraint half inside T1
       (a FIX's UNIT against its TARGET's DIMENSION) and, where a LAW
       carries EQUATION, its law half (2.2.15); T5 (a) inside T1, and
       (b) every CONSTRAINT's TARGET named in the REFS of some LAW,
       (c) every DOF named in the REFS of some LAW, a DOF named only by
       an ASSUMPTION or a BOUNDARY being idle; T6's clause that a
       BOUNDARY's REFS lie within the DOF and CONSTANTs, inside T1,
       and, where a BOUNDARY carries CONDITION, its totality (2.2.16).
       T3 runs at the final pass, after the TMS is entered, since it
       reads STEP_CONVENTION and S_MAX from the TMS (5.5.2); a TMS
       without a depth of at least 1 is refused. Recorded limits: T2's
       rule refuses a one-claim proposition that uses a listed joiner
       and does not detect a comma splice or an unlisted connective,
       which reach the inspection the guide keeps; T3 over the fragment
       finds constraint-level contradictions only. [D106.1] [D107.1]
       [D108.1] [D132.1]
       INSPECTION, by H-DECL before the declaration: T2's semantic
       part; a law without EQUATION under T4 and T3; a boundary without
       CONDITION under T6; agreement between the prose and its declared
       form; T3 over the assumptions and beyond depth 1 (2.2.18).
       OWED: none of the bodies above; what stays INSPECTION is stated
       at 2.2.18 and is classed so by the guide or by the absence of a
       form, not by an owed body; C-01 stands for the parts a future
       declared form could carry. [DI-4.1] [D132.1]
2.2.4  While the body of a kernel test is owed, that check is INSPECTION,
       performed by H-DECL before the declaration that instantiates the
       container, and recorded as ratchet debt. TPX executes the check
       when its body lands. [DI-4.1]
2.2.5  Completeness certified by CAC is relative to the declared TPK's
       DOF inventory. CAC cannot detect a degree of freedom the TPK
       failed to yield (see 2.3.6, 7.1). [I-124]
2.2.6  THE TPK SCHEMA. A TPK is an object whose keys are kinds, six
       kinds in this fixed order, a kind that is absent meaning empty:
         KIND        REQUIRED FIELDS                 OPTIONAL FIELDS
         DOF         NAME DIMENSION                  -
         CONSTANT    NAME DIMENSION                  VALUE UNIT
                                                     UNCERTAINTY
         LAW         NAME STATEMENT REFS             EQUATION
         ASSUMPTION  NAME PROPOSITION REFS           -
         CONSTRAINT  NAME TARGET ACTION STATEMENT    VALUE UNIT
         BOUNDARY    NAME PREDICATE REFS             CONDITION
       These are the guide's 3.1 contents under TPM names: DOF
       INVENTORY, CONSTANTS, LAWS, ASSUMPTIONS, CONSTRAINT entries,
       HARD BOUNDARIES. STATEMENT, PROPOSITION and PREDICATE are prose;
       what a check must read is a field. [D98.1] [D132.1]
2.2.7  NAME is an ASCII identifier, [A-Za-z_][A-Za-z0-9_]*, unique
       across the whole TPK, not only within its kind. A kernel written
       with Greek letters spells them; a Unicode name would let two
       look-alike names read as one citation and resolve as two.
       [D98.1]
2.2.8  REFS is a set of NAMEs: the DOF and CONSTANTs the entry names.
       Every REFS member resolves to a DOF or a CONSTANT of the same
       TPK. REFS and TARGET are declared by the author, not extracted
       from the prose; that REFS lists every name the prose uses is
       INSPECTION until a declared form (2.2.12) carries the names
       rule. [D98.1]
2.2.9  TARGET names the one DOF a CONSTRAINT removes or fixes. ACTION
       is REMOVE or FIX. FIX requires VALUE and UNIT; REMOVE forbids
       both. A FIX's UNIT is commensurable with the TARGET DOF's
       DIMENSION ("1", or an angle unit, for a dimensionless DOF),
       checked at zone entry; a mismatch refuses the component.
       [D98.1] [D104.1]
2.2.10 A CONSTANT with VALUE carries UNIT, and UNIT requires VALUE;
       UNCERTAINTY requires VALUE, is not negative and is in the same
       UNIT. UNIT parses under the unit grammar (3.2.11) and is
       commensurable with the CONSTANT's DIMENSION, checked at zone
       entry; a problem names the unit and both dimensions. UNIT is
       checked for its dimension, not its size: a value meant in m and
       written in km passes. [D104.1]
2.2.11 No entry carries a mutable field (STATE, SCRUTINY, RIDER, NOTE,
       CHECKS_OWED, RECORDS; 2.1.3). Such a field is refused, never
       dropped: content outside the digest is content the chain does
       not cover. Any other unknown field is refused likewise. [D98.1]
2.2.12 THE DECLARED FORM. Beside the prose, an OPTIONAL machine-readable
       form: EQUATION on a LAW, CONDITION on a BOUNDARY, and on a
       SIGNATURE of the TrM header FORM and IMAGE_FORM, both or neither
       (2.3.14). An absent form means no form; nothing is forced on an
       author, and a TPK without any form passes every mechanical check
       it passes without one. Where the form is present, T4's law half,
       T6's totality and the names rule - every identifier in the form
       a REFS member and every REFS member named in the form or the
       derivative variable - are MECHANICAL, and T3 over laws runs to
       the ground fragment; where it is absent those parts are
       INSPECTION by H-DECL at instantiation, listed by name at the
       gate and never silently passed. A form that does not parse, or
       fails the names rule, is T1's finding and the other checks skip
       that entry. [D108.1] [D132.1]
2.2.13 THE GRAMMAR of a declared form, closed:
         equation   := expr "=" expr                 EQUATION on a LAW
         form       := expr ( "=" expr )?            FORM, IMAGE_FORM
         predicate  := disj                          CONDITION
         disj       := conj ( "or" conj )*           left-associative
         conj       := neg ( "and" neg )*            left-associative
         neg        := "not" neg | "(" predicate ")" | expr cmp expr
         cmp        := "<" | "<=" | ">" | ">=" | "=" | "!="
         expr       := term ( ("+" | "-") term )*    left-associative
         term       := unary ( ("*" | "/") unary )*  left-associative
         unary      := "-" power | power             -a^2 is -(a^2)
         power      := atom ( "^" exponent )?        a^2^3 is refused
         exponent   := integer | "(" "-"? integer ")"
                     | "(" "-"? integer "/" integer ")"
         atom       := identifier | literal | "(" expr ")"
                     | function "(" expr ")"
                     | "D" "(" identifier "," identifier
                       ( "," integer )? ")"
         function   := exp | ln | sin | cos | tan | abs | sqrt
         identifier := [A-Za-z_][A-Za-z0-9_]*  a REFS, OVER or
                                               inventory NAME
         literal    := digits ("." digits)? ([eE] [-+]? digits{1,4})?
                       unsigned
       Tokens are identifiers, literals, the operators + - * / ^ = <
       <= > >= != ( ) and ",", and the keywords and, or, not;
       whitespace between tokens is ignored. No implicit
       multiplication, no unit inside an expression, no chained
       comparison, no two operators in a row (a*(-b) is written), no
       "^-1" (x^(-1) is written). D(x, t) and D(x, t, n), n >= 1, is
       the n-th derivative of x with respect to t, t a REFS member of
       DIMENSION T1 exactly, x any REFS member, D of a bound
       identifier evaluating to 0; D(x, t, 1) is spelled D(x, t); D is
       not permitted in a CONDITION. A function name without "(" is an
       identifier; a keyword is never an identifier. The parser is
       deterministic with one token of lookahead; its 33 grammar
       witnesses are asserted in both residences at load and pinned as
       vectors. [D132.1]
2.2.14 CANONICAL SPELLING of a form, the spelling that enters the
       preimage (2.5.12): NFC; no whitespace, except one space around
       "and" and "or" and after "not"; literals in the canonical decimal
       form of 2.5.12; integer exponents without leading zeros; a
       rational exponent p/q kept as written; D(x,t,1) written D(x,t);
       the author's operand order and parenthesization kept, enclosing
       parentheses dropped only at delimiter-bounded slots (the whole;
       each side of "=" or of a comparison; a function argument), inner
       ones kept. Only spelling is canonical: "x*2" and "2*x" are
       different statements and digest apart. The canonical form parses
       back to the same tree. [D132.1]
2.2.15 DIMENSIONAL RULES. + and - need equal canonical DIMENSIONs and
       yield it; * adds exponents and / subtracts them; ^ multiplies by
       the integer exponent, or by p/q when every resulting exponent is
       an integer; exp, ln, sin, cos and tan need a dimensionless
       argument and yield 1; abs keeps its argument's; sqrt halves, every
       exponent even; a literal is dimensionless, and the literal zero
       has every dimension, so D(z, t, 2) = 0 and a guard x != 0 are
       homogeneous while dividing by an expression of the zero's
       dimension is refused; D(x, t, n) yields dim(x) with its T
       exponent lowered by n; "=" and every comparison need equal
       DIMENSIONs. An unparsable DIMENSION or an absent identifier
       refuses the form's dimension. T4's law half: the two sides of
       EQUATION have one DIMENSION. [D132.1]
2.2.16 TOTALITY of a CONDITION is decided syntactically over a closed
       guard table: / on E needs the conjunct E != 0 or 0 != E; ln(E)
       needs E > 0 or 0 < E; sqrt(E) and E^(p/q) need E >= 0 or 0 <=
       E; E^(negative) needs E != 0; tan is refused in a predicate; + -
       * abs exp sin cos and ^ with an integer >= 0 are total. A guard
       is a conjunct beside the comparison: the other operand of every
       "and" on the path from the root, through "not" and parentheses;
       an "or" on the path hides the conjuncts below it from those
       above; guards match by the canonical spelling of E; a > 0 does
       not guard /a. Every comparison of a CONDITION is dimensionally
       homogeneous. T6's totality: a partial operation without its
       guard refuses the BOUNDARY. [D132.1]
2.2.17 T3 OVER LAWS, THE GROUND FRAGMENT, at depth 1: a LAW whose every
       identifier is bound - every REFS member a CONSTANT with VALUE or
       a DOF under a FIX, the first FIX by NAME when two bind one DOF -
       is evaluated in coherent SI to a closed equation; an equation
       false through the twelve-significant-digit canonical form is P
       and not-P; two laws with one canonical left side and different
       right sides are P and not-P syntactically; a difference of KIND
       between the sides is returned; a derivative of a FIXed DOF is 0.
       Evaluation is in IEEE doubles in one written order, integer
       powers by repeated multiplication, a rational power by the one
       library call, overflow to infinity as C does, ln, sqrt and a
       negative base under a rational exponent refused outside their
       domains, division by zero refused, sin, cos and tan of a
       non-finite value refused; a non-finite result or a binding that
       cannot be normalized refuses the law with the reason. The
       fragment finds a closed equation false and is not a consistency
       proof; beyond it T3 is INSPECTION by the guide's classing.
       [D132.1]
2.2.18 WHAT STAYS INSPECTION at the TPK gate: a law without EQUATION
       (T4 and T3 over it) and a boundary without CONDITION (T6),
       listed by name at the gate; agreement between the prose and its
       declared form (STATEMENT against EQUATION, PREDICATE against
       CONDITION); T2's semantic part; T3 over the assumptions and over
       the laws beyond depth 1, S_MAX staying a bound the fragment does
       not reach. The kernel tests are filters over declared fields:
       prose that disagrees with its fields escapes them. [D132.1]