Jump to content

The Principia Machina/Inputs/Prime Kernel: Difference between revisions

From The Invariance Itself
help set: TPK input, schema 0.3.0
 
m 1 revision imported
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{TPM map}}
{{TPM map}}
{{DISPLAYTITLE:Inputs: the Prime Kernel (TPK)}}
{{DISPLAYTITLE:Inputs: the Prime Kernel (TPK)}}
''Public Recorder inputs: a help set for the people who put things into The Principia Machina - authors of a new UWC, operators, and the declaring authority. It explains; the specification governs. Start at [[The Principia Machina/Inputs|the index]]; for a guided walk from a blank file to a declared UWC, follow [[The Principia Machina/Tutorial|the tutorial]]. Agents read [[The Principia Machina/Agent/Inputs|the agent-facing page]] instead.''
''Public Recorder inputs: a help set for the people who put things into The Principia Machina - authors of a new UWC, operators, and the declaring authority. It explains; the specification governs. Start at [[The Principia Machina/Inputs|the index]]; for a guided walk from a blank file to a declared UWC, follow [[The Principia Machina/Tutorial|the tutorial]]. Its counterpart for agents is [[The Principia Machina/Agent/Inputs|the agent-facing page]].''


{{:The Principia Machina/Diagrams/06 Three-zone TFK}}
{{:The Principia Machina/Diagrams/06 Three-zone TFK}}
Line 9: Line 9:
What you write in the first zone of the Full Kernel, kind by kind and field by field.
What you write in the first zone of the Full Kernel, kind by kind and field by field.


''Explains: TPS 0.1.0, revision 4 (declared final 2026-09-22); the zone schemas the declaring authority selected on 2026-09-22 (records D92.1, D98.1, D99.1, D100.1, and for units D103.1, D104.1, D105.1; schema 0.3.0), whose text enters TPS at revision 5, and the kernel tests and isomorphism checks selected the same day (D106.1, D107.1, D108.1; tpm_kernel_tests 0.2.0), whose text follows at the next TPS revision; TPC-PY as built 2026-09-22 (tpc_zone 0.3.0, tpc_units 0.1.0, tpc_tests 0.1.0; no TPC-PY version is declared yet) with check_draft 0.3.0; Generic Specification Guide 0.1.0, sections 3.1 and 3.6. Where this page and the specification differ, the specification governs.''
''Explains: TPS 0.3.0 (declared final on 2026-09-28 at revision 6; it follows TPS 0.1.1, declared final on 2026-09-26), whose sections 2.2 to 2.5 carry the zone schemas with the optional declared form, the ROLE field, the D variable and the structure check (records D92.1, D98.1, D99.1, D100.1, D103.1-D105.1, D106.1-D108.1, D132.1, D176.1, D177.1, D179.1 and D186.1); [[The Principia Machina/TPC-PY|TPC-PY 0.1.0]] (declared on 2026-09-28, tree digest a00161c1b321fd66abc591209007d46a7fa6290097835060e50f381426259043, conformed TPS 0.3.0; tpc_zone 0.5.0, tpc_units 0.1.1, tpc_tests 0.2.0, tpc_form 0.2.0, tpc_eom 0.1.0; schema 0.5.0) with check_draft 0.5.0; Generic Specification Guide 0.1.0, sections 3.1 and 3.6. Where this page and the specification differ, the specification governs.''
 
== A kernel assumes nothing it does not state ==
Read this before you write anything. The Full Kernel is a closed world: the only physics in a UWC is what its Prime Kernel declares - its degrees of freedom, constants, laws, assumptions, constraints and boundaries. Nothing is supplied from outside.
* '''No gravity''', unless a law or a constant of the kernel declares it.
* '''No electric or magnetic force''', unless declared.
* '''No friction''' and '''no air resistance''', unless declared.
* '''No equation of motion''' except those the laws state. The kernel does not contain Newton's laws in general, or any other general law; it contains the equations you write, and nothing a reader would "normally assume" beside them.
Why: a result stands only while it derives from the TFK plus the assumptions it declares ([[The Principia Machina/TPS/4.4 The strike rule|TPS 4.4]], SR2 and SR3). A derivation that uses a force stated neither in the kernel nor in the assumptions the result declares uses something the UWC does not contain; and an assumption brought in by a result is that result's, counted against it, never the kernel's. No check reports what you left out: completeness is judged only against what you declared ([[The Principia Machina/TPS/2.2 The Prime Kernel|TPS 2.2]]), so a force you forgot is not an error message, it is simply absent from every result.
 
The rule is stated in [[The Principia Machina/TPS/2.2 The Prime Kernel|TPS 2.2.19]], the closed-world clause. A result may still use something the kernel leaves out, but only as its own assumption record: that record is counted against the result, and it never becomes part of the kernel.
 
Environment modules are selected (D178.1) and not yet built. The new-container form will ask one question: which of the modules the declaring authority has declared act on the system - the first catalogue selected holds gravity at the standard strength, air resistance at sea level in two forms, and the constant pi. Nothing is pre-selected, and the last answer is "None of these: only the laws I write act". A module you choose adds ordinary entries and terms to your kernel, each shown to you before it enters; nothing is switched on by default, so the closed world above still holds, and once the UWC is declared its modules are fixed with it ([[The Principia Machina/Inputs/Environment modules|Inputs: environment modules]]; [[The Principia Machina/TPS/5.22 Environment modules|TPS 5.22]]). Until TPX runs the form, every force is declared by hand; [[The Principia Machina/Tutorial/6 Fix refusals|tutorial step 6]] shows it for gravity.


== What the Prime Kernel is ==
== What the Prime Kernel is ==
The Prime Kernel (TPK) is the axiomatic base of a UWC: its laws, assumptions, hard boundaries and constraints, the constants they use, and the degrees of freedom (DOF) they leave free. It is immutable once declared. Any change, even a typo, is a new UWC by copy-forward, so check it before you submit ([[The Principia Machina/TPS/2.1 The Full Kernel and immutability|TPS 2.1]] and [[The Principia Machina/TPS/2.2 The Prime Kernel|2.2]]).
The Prime Kernel (TPK) is the axiomatic base of a UWC: its laws, assumptions, hard boundaries and constraints, the constants they use, and the degrees of freedom (DOF) they leave free. It is the whole of the UWC's physics. It is immutable once declared. Any change, even a typo, is a new UWC by copy-forward, so check it before you submit ([[The Principia Machina/TPS/2.1 The Full Kernel and immutability|TPS 2.1]] and [[The Principia Machina/TPS/2.2 The Prime Kernel|2.2]]).


== The six kinds ==
== The six kinds ==
Line 19: Line 31:
! Kind !! What it holds !! Fields you must give !! Fields you may add
! Kind !! What it holds !! Fields you must give !! Fields you may add
|-
|-
| <code>DOF</code> || a degree of freedom the kernel leaves free || NAME, DIMENSION || none
| <code>DOF</code> || a variable the kernel leaves free for its laws to relate: a coordinate, a state variable, or the time || NAME, DIMENSION || ROLE (only <code>INPUT</code>)
|-
|-
| <code>CONSTANT</code> || a named quantity || NAME, DIMENSION || VALUE, UNIT, UNCERTAINTY
| <code>CONSTANT</code> || a named quantity || NAME, DIMENSION || VALUE, UNIT, UNCERTAINTY
|-
|-
| <code>LAW</code> || a statement taken as given || NAME, STATEMENT, REFS || none
| <code>LAW</code> || a statement taken as given; in a kernel that describes motion, its equations of motion || NAME, STATEMENT, REFS, ROLE || EQUATION
|-
|-
| <code>ASSUMPTION</code> || one proposition taken as given for this UWC || NAME, PROPOSITION, REFS || none
| <code>ASSUMPTION</code> || one proposition taken as given for this UWC that the laws do not already say || NAME, PROPOSITION, REFS || none
|-
|-
| <code>CONSTRAINT</code> || a restriction that removes or fixes one DOF || NAME, TARGET, ACTION, STATEMENT || VALUE, UNIT
| <code>CONSTRAINT</code> || a restriction that removes or fixes one DOF || NAME, TARGET, ACTION, STATEMENT || VALUE, UNIT
|-
|-
| <code>BOUNDARY</code> || where the kernel is not asserted to hold || NAME, PREDICATE, REFS || none
| <code>BOUNDARY</code> || a hard boundary: the region where the kernel is asserted, as a predicate (see PREDICATE below) || NAME, PREDICATE, REFS || CONDITION
|}
|}
Write the kinds in any order in your file. The digest reads them in a fixed order, so the order you choose changes nothing.
Write the kinds in any order in your file. The digest reads them in a fixed order, so the order you choose changes nothing. The exact schema is [[The Principia Machina/TPS/2.2 The Prime Kernel|TPS 2.2]].
 
Beside the six kinds, a TPK may have one more key, <code>PARAMETERS</code>, with one field, <code>D_VARIABLES</code>: <code>"ONE"</code> or <code>"SEVERAL"</code>. It says how many different variables the kernel's derivatives may be taken with respect to. <code>ONE</code> is the default: every <code>D(x, s)</code> in the kernel uses the same s, usually the time t, and a second one is refused. <code>SEVERAL</code> lets laws about something that changes in space and in time take derivatives in more than one variable; the structure check does not analyse such a kernel, and its label says so, with the reason PDE (partial differential equation). Leaving <code>PARAMETERS</code> out and writing <code>"PARAMETERS": {"D_VARIABLES": "ONE"}</code> give the same digest ([[The Principia Machina/TPS/2.2 The Prime Kernel|TPS 2.2.6]]).


== The fields ==
== The fields ==
; NAME
; NAME
: Letters, digits and the underscore, not starting with a digit, ASCII only: <code>k_s</code>, <code>A_lin</code>, <code>omega</code>. A name must be unique across the whole TPK, not only within its kind. Greek letters are spelled out, because a Greek letter and a Latin look-alike would read as one name and resolve as two.
: Letters, digits and the underscore, not starting with a digit, ASCII only: <code>k_s</code>, <code>A_kpos</code>, <code>omega</code>. A name must be unique across the whole TPK, not only within its kind. Greek letters are spelled out, because a Greek letter and a Latin look-alike would read as one name and resolve as two.
; DIMENSION
; DIMENSION
: The physical dimension, written in base dimensions with their exponents: <code>L1 T-1</code> for a speed, <code>M1 L1 T-2</code> for a force, <code>1</code> for a pure number. Always write the exponent, even when it is 1. The bases and the accepted forms are on [[The Principia Machina/Inputs/Text and numbers|Text and numbers]].
: The physical dimension, written in base dimensions with their exponents: <code>L1 T-1</code> for a speed, <code>M1 L1 T-2</code> for a force, <code>1</code> for a pure number. Always write the exponent, even when it is 1. The bases and the accepted forms are on [[The Principia Machina/Inputs/Text and numbers|Text and numbers]].
; REFS
; REFS
: The list of DOF and CONSTANT names the statement uses. Each must be a DOF or a CONSTANT of the same TPK; a law cannot cite a law, and no entry may cite itself. The checker cannot read your prose, so REFS is how it knows what a statement is about. That REFS names everything the prose uses is inspected by the declaring authority before declaring.
: The list of DOF and CONSTANT names the statement uses. Each must be a DOF or a CONSTANT of the same TPK; a law cannot cite a law, and no entry may cite itself. The checker cannot read your prose, so REFS is how it knows what a statement is about.
; ROLE
: Required on every LAW; optional on a DOF. It says what a law is for. On a law, write one of these, in capitals and with no spaces: <code>EOM(x)</code> when the law is the equation of motion of the DOF x - it says how x changes; <code>CONSTRAINT</code> for a relation the DOF must keep, such as a pendulum's fixed length (a kind of law, not a CONSTRAINT entry); <code>CONSTITUTIVE</code> for a law that gives a force or a material's response, such as a spring's force; <code>INVARIANT</code> for a quantity the motion keeps, such as an energy; <code>DEFINITION</code> for a law that defines one quantity from others. In the spring example KIN is <code>"ROLE": "EOM(x)"</code> and EOM_X is <code>"ROLE": "EOM(v)"</code>; EOM_Z, which restates the motion of z that C_NOZ fixes, is <code>"ROLE": "CONSTRAINT"</code> (a law that repeats a fixed DOF's motion takes CONSTRAINT, not EOM). On a DOF the only value is <code>INPUT</code>: a quantity the kernel takes as given, such as a driving force or a noise, which needs no equation of motion of its own. The checker refuses a role it cannot read, and an <code>EOM(...)</code> whose name is not a DOF of the kernel. Any other mismatch - an <code>EOM(x)</code> law with no derivative of x, say - is not refused: the structure check reports it ([[The Principia Machina/TPS/2.2 The Prime Kernel|TPS 2.2.6]]).
; STATEMENT, PROPOSITION, PREDICATE
; STATEMENT, PROPOSITION, PREDICATE
: Prose, in any notation you like, subject to the text rules on [[The Principia Machina/Inputs/Text and numbers|Text and numbers]]. Keep each ASSUMPTION to one proposition: "the restoring force is linear in x" is one; "the force is linear and the mass is constant" is two, and should be two entries. The checker refuses an assumption visibly joined into two claims (T2, below).
: Prose, in any notation you like, subject to the text rules on [[The Principia Machina/Inputs/Text and numbers|Text and numbers]]. Keep each ASSUMPTION to one proposition: "k_s is positive" is one; "k_s and m are positive" is two, and should be two entries. A BOUNDARY's PREDICATE is written, in the tutorial and on this page, to be true where the kernel is asserted: <code>|x| < x_max</code>.
; EQUATION (on a LAW), CONDITION (on a BOUNDARY)
: Optional. The same law or predicate in the declared form: a small closed grammar over the entry's REFS names, with <code>D(x, t)</code> for the derivative of x with respect to t and <code>D(x, t, 2)</code> for the second ([[The Principia Machina/TPS/2.2 The Prime Kernel|TPS 2.2]] states the grammar, its dimensional rules and its canonical spelling). Where a form is present, the checker reads it: the form must name exactly the entry's REFS, both sides of an EQUATION must have one dimension, and a CONDITION must be decided for every value. Where it is absent, those checks are the declaring authority's by inspection. Nothing forces a form on you (record D132.1). A derivative needs its variable - usually the time t - among the REFS, and that variable must be a DOF that no constraint fixes or removes; it may have any dimension, so a kernel in a scaled, dimensionless time works too ([[The Principia Machina/TPS/2.2 The Prime Kernel|TPS 2.2.13]]). A kernel that uses derivatives therefore declares its variable as a DOF.
; VALUE, UNIT, UNCERTAINTY (on a CONSTANT)
; VALUE, UNIT, UNCERTAINTY (on a CONSTANT)
: VALUE is a decimal written as a string, in quotes: <code>"0.05"</code>. A VALUE needs a UNIT and a UNIT needs a VALUE. UNCERTAINTY needs a VALUE, is not negative, and is in the same UNIT. The UNIT is written in the unit form on [[The Principia Machina/Inputs/Text and numbers|Text and numbers]] and must have the constant's DIMENSION: a length may be in <code>m</code>, <code>cm</code> or <code>au</code>, never in <code>s</code>.
: VALUE is a decimal written as a string, in quotes: <code>"0.05"</code>. A VALUE needs a UNIT and a UNIT needs a VALUE. UNCERTAINTY needs a VALUE, is not negative, and is in the same UNIT. The UNIT is written in the unit form on [[The Principia Machina/Inputs/Text and numbers|Text and numbers]] and must have the constant's DIMENSION: a length may be in <code>m</code>, <code>cm</code> or <code>au</code>, never in <code>s</code>. A constant with a value is also what lets the final pass evaluate a law (see T3 below).
; TARGET, ACTION, VALUE, UNIT (on a CONSTRAINT)
; TARGET, ACTION, VALUE, UNIT (on a CONSTRAINT)
: TARGET is the one DOF the constraint acts on. ACTION is <code>REMOVE</code> or <code>FIX</code>. FIX needs a VALUE and a UNIT with the TARGET's dimension (<code>1</code> for a dimensionless DOF, <code>rad</code> or <code>deg</code> for an angle); REMOVE takes neither. A restriction such as "tabletop only" or "no rotation" is written here, as a CONSTRAINT, never as a weakened manifold entry ([[The Principia Machina/TPS/2.3 The Translation Manifold|TPS 2.3]]).
: TARGET is the one DOF the constraint acts on. ACTION is <code>REMOVE</code> or <code>FIX</code>. FIX needs a VALUE and a UNIT with the TARGET's dimension (<code>1</code> for a dimensionless DOF, <code>rad</code> or <code>deg</code> for an angle); REMOVE takes neither. A restriction such as "tabletop only" or "no rotation" is written here, as a CONSTRAINT, never as a weakened manifold entry ([[The Principia Machina/TPS/2.3 The Translation Manifold|TPS 2.3]]). A constraint restricts which motions the kernel describes; it declares no force. If something in your system pushes to keep the constraint - a track, a rail, a string - that push is a force, and it is declared like any other.
 
A BOUNDARY's PREDICATE states where the kernel is asserted. Several boundaries all hold together; with none, the kernel is asserted everywhere ([[The Principia Machina/TPS/2.2 The Prime Kernel|TPS 2.2.6]]).
 
== Equations of motion ==
A kernel that describes motion states its equations of motion as laws: for every DOF except the time, a law that says how it changes. The kernel holds these equations and no general law beside them: writing <code>m dv/dt = -k_s x</code> declares that equation, not Newton's laws. The tutorial writes them out in full, in the declared form, one law each ([[The Principia Machina/Tutorial/2 Write the Prime Kernel|tutorial step 2]]).
 
A check now asks. At the final pass the structure check reads every law that has an EQUATION, together with its ROLE (see ROLE above), and asks whether each DOF that changes is given by exactly one law: nothing missing, nothing given twice. It refuses nothing. It runs when the Measure Set's switch <code>STRUCTURE_CHECK</code> is <code>ON</code>, which it is unless you write <code>OFF</code> ([[The Principia Machina/Inputs/Measure Set|the Measure Set]]). A DOF that no law gives is a named gap: the UWC then starts with a first task, EOM-0, which must supply that equation before other work lands. Every other finding goes to the declaring authority with a question.
 
The UWC's certificate carries one of two labels. ''structurally regular'' means the check ran and found nothing. ''Structure not Validated at Inception'' comes with its reason: the switch was off, the check found something, a law about motion is written only in prose, the laws take derivatives in more than one variable, or no law has an EQUATION. Both labels are valid UWCs, and the label never changes. The same test can run again later over the kernel and the results in the register; that result is shown beside the label, never in its place ([[The Principia Machina/TPS/2.2 The Prime Kernel|TPS 2.2.20]], [[The Principia Machina/TPS/5.3 TPX|5.3.47]]).


== What is refused ==
== What is refused ==
Line 53: Line 80:


== The checks ==
== The checks ==
'''T1 well-formedness''' runs first, in TPC-PY and, when it is built, in TPX. It checks that every entry has its fields and no others, that names are identifiers and unique, that every REFS and TARGET resolves to the right kind, that dimensions, decimals and units parse, that every unit has the dimension of what it measures, and that no entry cites itself.
'''T1 well-formedness''' runs first, in TPC-PY and, when it is built, in TPX. It checks that every entry has its fields and no others, that names are identifiers and unique, that every REFS and TARGET resolves to the right kind, that dimensions, decimals and units parse, that every unit has the dimension of what it measures, that no entry cites itself, and that every declared form parses and names exactly its entry's REFS, that every law has a ROLE from the list and every <code>EOM(...)</code> names a DOF, and that every derivative's variable is a DOF no constraint fixes or removes - one for the whole kernel unless <code>D_VARIABLES</code> is <code>SEVERAL</code>.


If T1 passes, two more kernel tests run as the zone is entered (tpm_kernel_tests 0.2.0):
If T1 passes, the kernel tests that run as the zone is entered follow ([[The Principia Machina/TPS/2.2 The Prime Kernel|TPS 2.2]]):
* '''T2 atomicity, the part a machine can read''': no assumption is joined into two claims at its top level. Refused: the words "and", "but" and "whereas" in any case, the phrase "as well as", the symbols &amp; and &#8743;, a semicolon, a second sentence (a full stop, ! or ? followed by a space and a capital letter), and a list (a new line beginning with -, *, +, &#8226; or a number). Text inside closed brackets or closed quotation marks is not top level, so "linear in x (Hooke's range and below)" passes; brackets around the whole proposition are ignored, so "(A and B)" is still two claims. A bracket or quotation mark left open hides nothing (record D106.1).
* '''T2 atomicity, the part a machine can read''': no assumption is visibly joined into two claims at its top level - by a joining word, a semicolon, a second sentence or a list. Text inside closed brackets or quotation marks is not top level. The exact words and signs are in TPS 2.2 and on [[The Principia Machina/Inputs/Refusal messages|Refusal messages]].
* '''T5 DOF yield''': every DOF is named in the REFS of some law - a DOF no law names is idle - and every constraint's TARGET is named by some law, since a constraint on a DOF no law leaves free does nothing.
* '''T5 DOF yield''': every DOF is named in the REFS of some law - a DOF no law names is idle - and every constraint's TARGET is named by some law.
* '''T4 dimensional homogeneity''', for every LAW with an EQUATION: both sides have one dimension.
* '''T6 boundary closure''', for every BOUNDARY with a CONDITION: the condition is decided for every value, every partial operation guarded.


At the final pass, after the Measure Set is entered:
At the final pass, after the Measure Set is entered:
* '''T3 consistency, over the constraints''': no DOF is both removed and fixed, and none is fixed at two different values. Values are compared after conversion to SI, so "0 m" and "0 cm" agree and "0 m" and "2 cm" do not. Two values in units of different kind - a frequency in Hz against an angular speed in rad s-1 - cannot be compared and come back to you. T3 waits for the final pass because the depth it needs, S_MAX, is in the Measure Set.
* '''T3 consistency, the part a machine can run''': over the constraints, no DOF is both removed and fixed, or fixed at two values compared in SI; over the laws, no two laws give one left side two right sides, and a law whose every name has a value - a constant with a VALUE, or a DOF under a FIX - is evaluated and must not be false. T3 waits for the final pass because its depth, S_MAX, is in the Measure Set.
* '''The structure check''', when the Measure Set's <code>STRUCTURE_CHECK</code> is <code>ON</code>: whether the equations of motion give every changing DOF exactly once. It refuses nothing; see [[#Equations of motion|Equations of motion]] above.


What no machine reads yet stays with the declaring authority, who inspects it before declaring; each inspection is recorded as debt ([[The Principia Machina/TPS/2.2 The Prime Kernel|TPS 2.2]]):
What no machine reads stays with the declaring authority, who inspects it before declaring; each inspection is recorded as debt. The list is in [[The Principia Machina/TPS/2.2 The Prime Kernel|TPS 2.2]], and the checker prints it at the end of every passing run: T2's meaning; T3 beyond what is evaluated; T4, T6 and T3 for every law or boundary without a form; and whether each prose field says what its REFS and its form say.
* '''T2''', the rest: whether each assumption really states one claim. The machine rule is a filter over English: it refuses "x lies between 0 and 1" (write 0 &lt; x &lt; 1), and it misses a comma splice or a word it does not list, such as "while" or "plus".
* '''T3''' over the laws and assumptions, to the depth S_MAX.
* '''T4 dimensional homogeneity''' of each law. A law's STATEMENT is prose, so its dimensions cannot be read. The constraints' half of T4 is already in T1: a FIX's unit must have its TARGET's dimension.
* '''T6 boundary closure''': that each boundary is decided for every value of its DOF. Its other half - a boundary names only DOF and constants - is in T1.
An optional machine-readable form for laws and boundaries has been chosen (record D108.1). It will be built as its own step; for a draft that uses it, T4, T6 and part of T3 will then run by machine. Until then they are inspections.


== Non-goals ==
== Non-goals ==
The checks do not judge whether your laws are right, or consistent beyond the bounded search T3 makes. The kernel certifies completeness only against the DOF it yields: a degree of freedom the kernel failed to include is invisible to every check ([[The Principia Machina/TPS/2.2 The Prime Kernel|TPS 2.2]]).
The checks do not judge whether your laws are right, or consistent beyond the bounded test T3 makes. They do not know what you left out: a force you did not declare is absent, and no message says so. The kernel certifies completeness only against the DOF it yields: a degree of freedom the kernel failed to include is invisible to every check ([[The Principia Machina/TPS/2.2 The Prime Kernel|TPS 2.2]]). The structure check sees the shape of the equations, not their physics: a wrong equation of the right shape passes it.


== Worked example ==
== Worked example ==
The spring kernel: three DOF (position x, velocity v, height z), three constants (the mass, the spring stiffness, and the largest displacement for which the linear law is asserted), three laws, one assumption, one constraint that fixes z at 0, and one boundary.
The spring kernel: four DOF (the time t, the displacement x and velocity v along the spring's axis, the displacement z across it), three constants (the mass, the spring's stiffness, and the largest displacement for which the spring law is asserted), three laws - the equations of motion, each with its EQUATION and its ROLE - two assumptions (the stiffness and the mass are positive), one constraint that fixes z at 0, and one boundary with its CONDITION. No gravity, friction, air resistance or electric or magnetic force is declared, so the UWC has none.
<pre>
<pre>
{
{
   "TPK": {
   "TPK": {
     "DOF": [
     "DOF": [
      {"NAME": "t", "DIMENSION": "T1"},
       {"NAME": "x", "DIMENSION": "L1"},
       {"NAME": "x", "DIMENSION": "L1"},
       {"NAME": "v", "DIMENSION": "L1 T-1"},
       {"NAME": "v", "DIMENSION": "L1 T-1"},
Line 95: Line 121:
     "LAW": [
     "LAW": [
       {
       {
         "NAME": "N2",
         "NAME": "EOM_X",
         "STATEMENT": "m dv/dt = -k_s x",
         "STATEMENT": "m dv/dt = -k_s x",
         "REFS": ["m", "v", "k_s", "x"]
         "REFS": ["m", "v", "k_s", "x", "t"],
        "ROLE": "EOM(v)",
        "EQUATION": "m * D(v, t) = -k_s * x"
       },
       },
       {
       {
         "NAME": "KIN",
         "NAME": "KIN",
         "STATEMENT": "dx/dt = v",
         "STATEMENT": "dx/dt = v",
         "REFS": ["x", "v"]
         "REFS": ["x", "v", "t"],
        "ROLE": "EOM(x)",
        "EQUATION": "D(x, t) = v"
       },
       },
       {
       {
         "NAME": "FREE_Z",
         "NAME": "EOM_Z",
         "STATEMENT": "d2z/dt2 = 0",
         "STATEMENT": "m d2z/dt2 = 0",
         "REFS": ["z"]
         "REFS": ["m", "z", "t"],
        "ROLE": "CONSTRAINT",
        "EQUATION": "m * D(z, t, 2) = 0"
       }
       }
     ],
     ],
     "ASSUMPTION": [
     "ASSUMPTION": [
       {
       {
         "NAME": "A_lin",
         "NAME": "A_kpos",
         "PROPOSITION": "the restoring force is linear in x (Hooke régime)",
         "PROPOSITION": "k_s is positive",
         "REFS": ["x"]
         "REFS": ["k_s"]
      },
      {
        "NAME": "A_mpos",
        "PROPOSITION": "m is positive",
        "REFS": ["m"]
       }
       }
     ],
     ],
Line 124: Line 161:
         "VALUE": "0",
         "VALUE": "0",
         "UNIT": "m",
         "UNIT": "m",
         "STATEMENT": "motion confined to z = 0"
         "STATEMENT": "only motion on the spring axis is described: z = 0"
       }
       }
     ],
     ],
Line 131: Line 168:
         "NAME": "B_small",
         "NAME": "B_small",
         "PREDICATE": "|x| < x_max",
         "PREDICATE": "|x| < x_max",
         "REFS": ["x", "x_max"]
         "REFS": ["x", "x_max"],
        "CONDITION": "abs(x) < x_max"
       }
       }
     ]
     ]
Line 138: Line 176:
</pre>
</pre>


<code>C_NOZ</code> fixes z, which <code>FREE_Z</code> would otherwise leave free, so the kernel yields motion along x only. <code>B_small</code> states where the kernel is asserted. The checker reports <code>TPK  PASS</code>, <code>T2 PASS</code> and <code>T5 PASS</code> for this zone; step by step, it is built on [[The Principia Machina/Tutorial/2 Write the Prime Kernel|tutorial step 2]].
<code>EOM_X</code> and <code>KIN</code> are the equations of motion along the axis; <code>EOM_Z</code> says no force acts across it, and <code>C_NOZ</code> restricts the kernel to motion on the axis, which is why EOM_Z's ROLE is CONSTRAINT. <code>B_small</code> states where the kernel is asserted. For this zone the checker prints:
<pre>
TPK  PASS
    T2 PASS
    T5 PASS
    T4 PASS
    T6 PASS
</pre>
With the Translation Manifold and the Measure Set of the tutorial added (<code>examples/spring_draft.json</code>), the structure check gives this kernel the label ''structurally regular''. Step by step, it is built on [[The Principia Machina/Tutorial/2 Write the Prime Kernel|tutorial step 2]].


Governing sections: [[The Principia Machina/TPS/2.1 The Full Kernel and immutability|TPS 2.1]], [[The Principia Machina/TPS/2.2 The Prime Kernel|2.2]] and [[The Principia Machina/TPS/2.5 Digests and the digest gate|2.5]].
Governing sections: [[The Principia Machina/TPS/2.1 The Full Kernel and immutability|TPS 2.1]], [[The Principia Machina/TPS/2.2 The Prime Kernel|2.2]], [[The Principia Machina/TPS/2.5 Digests and the digest gate|2.5]] and [[The Principia Machina/TPS/4.4 The strike rule|4.4]].


----
----
Previous: [[The Principia Machina/Inputs/New container form|The new-container form]]. Next: [[The Principia Machina/Inputs/Translation Manifold|The Translation Manifold]].
Previous: [[The Principia Machina/Inputs/Environment modules|Environment modules]]. Next: [[The Principia Machina/Inputs/Translation Manifold|The Translation Manifold]].


[[Category:The Principia Machina]]
[[Category:The Principia Machina]]



Latest revision as of 01:45, 3 October 2026

The Principia Machina: map
Reading the diagrams
Structure key
Process key
Definition of terms
Roles
Reading by audience
Start here: the walk through
The operator's guide
Tutorial: create a UUID Workspace Container (UWC)
Public Recorder inputs
Sponsors: your first agent
The specification
Contents: parts, tables, diagrams
TPS 0.5.0 (declared 2026-10-03, revision 8; machine-optimized text)
Decisions (the foundations record, one line each)


Public Recorder inputs: a help set for the people who put things into The Principia Machina - authors of a new UWC, operators, and the declaring authority. It explains; the specification governs. Start at the index; for a guided walk from a blank file to a declared UWC, follow the tutorial. Its counterpart for agents is the agent-facing page.

The three zones and their digests. The Prime Kernel is the first zone. (diagram page.)

Purpose

What you write in the first zone of the Full Kernel, kind by kind and field by field.

Explains: TPS 0.3.0 (declared final on 2026-09-28 at revision 6; it follows TPS 0.1.1, declared final on 2026-09-26), whose sections 2.2 to 2.5 carry the zone schemas with the optional declared form, the ROLE field, the D variable and the structure check (records D92.1, D98.1, D99.1, D100.1, D103.1-D105.1, D106.1-D108.1, D132.1, D176.1, D177.1, D179.1 and D186.1); TPC-PY 0.1.0 (declared on 2026-09-28, tree digest a00161c1b321fd66abc591209007d46a7fa6290097835060e50f381426259043, conformed TPS 0.3.0; tpc_zone 0.5.0, tpc_units 0.1.1, tpc_tests 0.2.0, tpc_form 0.2.0, tpc_eom 0.1.0; schema 0.5.0) with check_draft 0.5.0; Generic Specification Guide 0.1.0, sections 3.1 and 3.6. Where this page and the specification differ, the specification governs.

A kernel assumes nothing it does not state

Read this before you write anything. The Full Kernel is a closed world: the only physics in a UWC is what its Prime Kernel declares - its degrees of freedom, constants, laws, assumptions, constraints and boundaries. Nothing is supplied from outside.

  • No gravity, unless a law or a constant of the kernel declares it.
  • No electric or magnetic force, unless declared.
  • No friction and no air resistance, unless declared.
  • No equation of motion except those the laws state. The kernel does not contain Newton's laws in general, or any other general law; it contains the equations you write, and nothing a reader would "normally assume" beside them.

Why: a result stands only while it derives from the TFK plus the assumptions it declares (TPS 4.4, SR2 and SR3). A derivation that uses a force stated neither in the kernel nor in the assumptions the result declares uses something the UWC does not contain; and an assumption brought in by a result is that result's, counted against it, never the kernel's. No check reports what you left out: completeness is judged only against what you declared (TPS 2.2), so a force you forgot is not an error message, it is simply absent from every result.

The rule is stated in TPS 2.2.19, the closed-world clause. A result may still use something the kernel leaves out, but only as its own assumption record: that record is counted against the result, and it never becomes part of the kernel.

Environment modules are selected (D178.1) and not yet built. The new-container form will ask one question: which of the modules the declaring authority has declared act on the system - the first catalogue selected holds gravity at the standard strength, air resistance at sea level in two forms, and the constant pi. Nothing is pre-selected, and the last answer is "None of these: only the laws I write act". A module you choose adds ordinary entries and terms to your kernel, each shown to you before it enters; nothing is switched on by default, so the closed world above still holds, and once the UWC is declared its modules are fixed with it (Inputs: environment modules; TPS 5.22). Until TPX runs the form, every force is declared by hand; tutorial step 6 shows it for gravity.

What the Prime Kernel is

The Prime Kernel (TPK) is the axiomatic base of a UWC: its laws, assumptions, hard boundaries and constraints, the constants they use, and the degrees of freedom (DOF) they leave free. It is the whole of the UWC's physics. It is immutable once declared. Any change, even a typo, is a new UWC by copy-forward, so check it before you submit (TPS 2.1 and 2.2).

The six kinds

A TPK is one JSON object whose keys are kinds. A kind you do not need may be left out; that means it is empty.

Kind What it holds Fields you must give Fields you may add
DOF a variable the kernel leaves free for its laws to relate: a coordinate, a state variable, or the time NAME, DIMENSION ROLE (only INPUT)
CONSTANT a named quantity NAME, DIMENSION VALUE, UNIT, UNCERTAINTY
LAW a statement taken as given; in a kernel that describes motion, its equations of motion NAME, STATEMENT, REFS, ROLE EQUATION
ASSUMPTION one proposition taken as given for this UWC that the laws do not already say NAME, PROPOSITION, REFS none
CONSTRAINT a restriction that removes or fixes one DOF NAME, TARGET, ACTION, STATEMENT VALUE, UNIT
BOUNDARY a hard boundary: the region where the kernel is asserted, as a predicate (see PREDICATE below) NAME, PREDICATE, REFS CONDITION

Write the kinds in any order in your file. The digest reads them in a fixed order, so the order you choose changes nothing. The exact schema is TPS 2.2.

Beside the six kinds, a TPK may have one more key, PARAMETERS, with one field, D_VARIABLES: "ONE" or "SEVERAL". It says how many different variables the kernel's derivatives may be taken with respect to. ONE is the default: every D(x, s) in the kernel uses the same s, usually the time t, and a second one is refused. SEVERAL lets laws about something that changes in space and in time take derivatives in more than one variable; the structure check does not analyse such a kernel, and its label says so, with the reason PDE (partial differential equation). Leaving PARAMETERS out and writing "PARAMETERS": {"D_VARIABLES": "ONE"} give the same digest (TPS 2.2.6).

The fields

NAME
Letters, digits and the underscore, not starting with a digit, ASCII only: k_s, A_kpos, omega. A name must be unique across the whole TPK, not only within its kind. Greek letters are spelled out, because a Greek letter and a Latin look-alike would read as one name and resolve as two.
DIMENSION
The physical dimension, written in base dimensions with their exponents: L1 T-1 for a speed, M1 L1 T-2 for a force, 1 for a pure number. Always write the exponent, even when it is 1. The bases and the accepted forms are on Text and numbers.
REFS
The list of DOF and CONSTANT names the statement uses. Each must be a DOF or a CONSTANT of the same TPK; a law cannot cite a law, and no entry may cite itself. The checker cannot read your prose, so REFS is how it knows what a statement is about.
ROLE
Required on every LAW; optional on a DOF. It says what a law is for. On a law, write one of these, in capitals and with no spaces: EOM(x) when the law is the equation of motion of the DOF x - it says how x changes; CONSTRAINT for a relation the DOF must keep, such as a pendulum's fixed length (a kind of law, not a CONSTRAINT entry); CONSTITUTIVE for a law that gives a force or a material's response, such as a spring's force; INVARIANT for a quantity the motion keeps, such as an energy; DEFINITION for a law that defines one quantity from others. In the spring example KIN is "ROLE": "EOM(x)" and EOM_X is "ROLE": "EOM(v)"; EOM_Z, which restates the motion of z that C_NOZ fixes, is "ROLE": "CONSTRAINT" (a law that repeats a fixed DOF's motion takes CONSTRAINT, not EOM). On a DOF the only value is INPUT: a quantity the kernel takes as given, such as a driving force or a noise, which needs no equation of motion of its own. The checker refuses a role it cannot read, and an EOM(...) whose name is not a DOF of the kernel. Any other mismatch - an EOM(x) law with no derivative of x, say - is not refused: the structure check reports it (TPS 2.2.6).
STATEMENT, PROPOSITION, PREDICATE
Prose, in any notation you like, subject to the text rules on Text and numbers. Keep each ASSUMPTION to one proposition: "k_s is positive" is one; "k_s and m are positive" is two, and should be two entries. A BOUNDARY's PREDICATE is written, in the tutorial and on this page, to be true where the kernel is asserted: |x| < x_max.
EQUATION (on a LAW), CONDITION (on a BOUNDARY)
Optional. The same law or predicate in the declared form: a small closed grammar over the entry's REFS names, with D(x, t) for the derivative of x with respect to t and D(x, t, 2) for the second (TPS 2.2 states the grammar, its dimensional rules and its canonical spelling). Where a form is present, the checker reads it: the form must name exactly the entry's REFS, both sides of an EQUATION must have one dimension, and a CONDITION must be decided for every value. Where it is absent, those checks are the declaring authority's by inspection. Nothing forces a form on you (record D132.1). A derivative needs its variable - usually the time t - among the REFS, and that variable must be a DOF that no constraint fixes or removes; it may have any dimension, so a kernel in a scaled, dimensionless time works too (TPS 2.2.13). A kernel that uses derivatives therefore declares its variable as a DOF.
VALUE, UNIT, UNCERTAINTY (on a CONSTANT)
VALUE is a decimal written as a string, in quotes: "0.05". A VALUE needs a UNIT and a UNIT needs a VALUE. UNCERTAINTY needs a VALUE, is not negative, and is in the same UNIT. The UNIT is written in the unit form on Text and numbers and must have the constant's DIMENSION: a length may be in m, cm or au, never in s. A constant with a value is also what lets the final pass evaluate a law (see T3 below).
TARGET, ACTION, VALUE, UNIT (on a CONSTRAINT)
TARGET is the one DOF the constraint acts on. ACTION is REMOVE or FIX. FIX needs a VALUE and a UNIT with the TARGET's dimension (1 for a dimensionless DOF, rad or deg for an angle); REMOVE takes neither. A restriction such as "tabletop only" or "no rotation" is written here, as a CONSTRAINT, never as a weakened manifold entry (TPS 2.3). A constraint restricts which motions the kernel describes; it declares no force. If something in your system pushes to keep the constraint - a track, a rail, a string - that push is a force, and it is declared like any other.

A BOUNDARY's PREDICATE states where the kernel is asserted. Several boundaries all hold together; with none, the kernel is asserted everywhere (TPS 2.2.6).

Equations of motion

A kernel that describes motion states its equations of motion as laws: for every DOF except the time, a law that says how it changes. The kernel holds these equations and no general law beside them: writing m dv/dt = -k_s x declares that equation, not Newton's laws. The tutorial writes them out in full, in the declared form, one law each (tutorial step 2).

A check now asks. At the final pass the structure check reads every law that has an EQUATION, together with its ROLE (see ROLE above), and asks whether each DOF that changes is given by exactly one law: nothing missing, nothing given twice. It refuses nothing. It runs when the Measure Set's switch STRUCTURE_CHECK is ON, which it is unless you write OFF (the Measure Set). A DOF that no law gives is a named gap: the UWC then starts with a first task, EOM-0, which must supply that equation before other work lands. Every other finding goes to the declaring authority with a question.

The UWC's certificate carries one of two labels. structurally regular means the check ran and found nothing. Structure not Validated at Inception comes with its reason: the switch was off, the check found something, a law about motion is written only in prose, the laws take derivatives in more than one variable, or no law has an EQUATION. Both labels are valid UWCs, and the label never changes. The same test can run again later over the kernel and the results in the register; that result is shown beside the label, never in its place (TPS 2.2.20, 5.3.47).

What is refused

  • The status fields STATE, SCRUTINY, RIDER, NOTE, CHECKS_OWED and RECORDS. They change over the UWC's life, so they belong in register records.
  • Any other field the kind does not list.

Both are refused, never silently dropped: text outside the digest would be text the chain does not cover.

The checks

T1 well-formedness runs first, in TPC-PY and, when it is built, in TPX. It checks that every entry has its fields and no others, that names are identifiers and unique, that every REFS and TARGET resolves to the right kind, that dimensions, decimals and units parse, that every unit has the dimension of what it measures, that no entry cites itself, and that every declared form parses and names exactly its entry's REFS, that every law has a ROLE from the list and every EOM(...) names a DOF, and that every derivative's variable is a DOF no constraint fixes or removes - one for the whole kernel unless D_VARIABLES is SEVERAL.

If T1 passes, the kernel tests that run as the zone is entered follow (TPS 2.2):

  • T2 atomicity, the part a machine can read: no assumption is visibly joined into two claims at its top level - by a joining word, a semicolon, a second sentence or a list. Text inside closed brackets or quotation marks is not top level. The exact words and signs are in TPS 2.2 and on Refusal messages.
  • T5 DOF yield: every DOF is named in the REFS of some law - a DOF no law names is idle - and every constraint's TARGET is named by some law.
  • T4 dimensional homogeneity, for every LAW with an EQUATION: both sides have one dimension.
  • T6 boundary closure, for every BOUNDARY with a CONDITION: the condition is decided for every value, every partial operation guarded.

At the final pass, after the Measure Set is entered:

  • T3 consistency, the part a machine can run: over the constraints, no DOF is both removed and fixed, or fixed at two values compared in SI; over the laws, no two laws give one left side two right sides, and a law whose every name has a value - a constant with a VALUE, or a DOF under a FIX - is evaluated and must not be false. T3 waits for the final pass because its depth, S_MAX, is in the Measure Set.
  • The structure check, when the Measure Set's STRUCTURE_CHECK is ON: whether the equations of motion give every changing DOF exactly once. It refuses nothing; see Equations of motion above.

What no machine reads stays with the declaring authority, who inspects it before declaring; each inspection is recorded as debt. The list is in TPS 2.2, and the checker prints it at the end of every passing run: T2's meaning; T3 beyond what is evaluated; T4, T6 and T3 for every law or boundary without a form; and whether each prose field says what its REFS and its form say.

Non-goals

The checks do not judge whether your laws are right, or consistent beyond the bounded test T3 makes. They do not know what you left out: a force you did not declare is absent, and no message says so. The kernel certifies completeness only against the DOF it yields: a degree of freedom the kernel failed to include is invisible to every check (TPS 2.2). The structure check sees the shape of the equations, not their physics: a wrong equation of the right shape passes it.

Worked example

The spring kernel: four DOF (the time t, the displacement x and velocity v along the spring's axis, the displacement z across it), three constants (the mass, the spring's stiffness, and the largest displacement for which the spring law is asserted), three laws - the equations of motion, each with its EQUATION and its ROLE - two assumptions (the stiffness and the mass are positive), one constraint that fixes z at 0, and one boundary with its CONDITION. No gravity, friction, air resistance or electric or magnetic force is declared, so the UWC has none.

{
  "TPK": {
    "DOF": [
      {"NAME": "t", "DIMENSION": "T1"},
      {"NAME": "x", "DIMENSION": "L1"},
      {"NAME": "v", "DIMENSION": "L1 T-1"},
      {"NAME": "z", "DIMENSION": "L1"}
    ],
    "CONSTANT": [
      {"NAME": "m", "DIMENSION": "M1"},
      {"NAME": "k_s", "DIMENSION": "M1 T-2"},
      {
        "NAME": "x_max",
        "DIMENSION": "L1",
        "VALUE": "0.05",
        "UNIT": "m",
        "UNCERTAINTY": "0.001"
      }
    ],
    "LAW": [
      {
        "NAME": "EOM_X",
        "STATEMENT": "m dv/dt = -k_s x",
        "REFS": ["m", "v", "k_s", "x", "t"],
        "ROLE": "EOM(v)",
        "EQUATION": "m * D(v, t) = -k_s * x"
      },
      {
        "NAME": "KIN",
        "STATEMENT": "dx/dt = v",
        "REFS": ["x", "v", "t"],
        "ROLE": "EOM(x)",
        "EQUATION": "D(x, t) = v"
      },
      {
        "NAME": "EOM_Z",
        "STATEMENT": "m d2z/dt2 = 0",
        "REFS": ["m", "z", "t"],
        "ROLE": "CONSTRAINT",
        "EQUATION": "m * D(z, t, 2) = 0"
      }
    ],
    "ASSUMPTION": [
      {
        "NAME": "A_kpos",
        "PROPOSITION": "k_s is positive",
        "REFS": ["k_s"]
      },
      {
        "NAME": "A_mpos",
        "PROPOSITION": "m is positive",
        "REFS": ["m"]
      }
    ],
    "CONSTRAINT": [
      {
        "NAME": "C_NOZ",
        "TARGET": "z",
        "ACTION": "FIX",
        "VALUE": "0",
        "UNIT": "m",
        "STATEMENT": "only motion on the spring axis is described: z = 0"
      }
    ],
    "BOUNDARY": [
      {
        "NAME": "B_small",
        "PREDICATE": "|x| < x_max",
        "REFS": ["x", "x_max"],
        "CONDITION": "abs(x) < x_max"
      }
    ]
  }
}

EOM_X and KIN are the equations of motion along the axis; EOM_Z says no force acts across it, and C_NOZ restricts the kernel to motion on the axis, which is why EOM_Z's ROLE is CONSTRAINT. B_small states where the kernel is asserted. For this zone the checker prints:

TPK  PASS
     T2 PASS
     T5 PASS
     T4 PASS
     T6 PASS

With the Translation Manifold and the Measure Set of the tutorial added (examples/spring_draft.json), the structure check gives this kernel the label structurally regular. Step by step, it is built on tutorial step 2.

Governing sections: TPS 2.1, 2.2, 2.5 and 4.4.


Previous: Environment modules. Next: The Translation Manifold.