The Principia Machina/Inputs/Text and numbers: Difference between revisions
m 1 revision imported |
DeltaS Zero (talk | contribs) G-1 (outside AI session 2): the lead's last sentence now says where the agent-facing page is and addresses no one (base revision 5451) |
||
| Line 1: | Line 1: | ||
{{TPM map}} | {{TPM map}} | ||
{{DISPLAYTITLE:Inputs: text, numbers and dimensions}} | {{DISPLAYTITLE:Inputs: text, numbers and dimensions}} | ||
''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]]. | ''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]].'' | ||
== Purpose == | == Purpose == | ||
Revision as of 01:35, 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.
Purpose
The rules that apply to every field of every zone: what text is accepted, how numbers, dimensions and units are written, and what is normalized before a digest is taken.
Explains: TPS 0.4.0 (declared final on 2026-09-30 at revision 7, and in force; it follows TPS 0.3.0, declared final on 2026-09-28 at revision 6), 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; the unit rules of records D103.1, D104.1 and D105.1, now TPS 3.2.11 and 4.4.11. Where this page and the specification differ, the specification governs.
The file
- One JSON object, saved as UTF-8. A byte-order mark at the start, which some Windows editors add, is accepted.
- No key may appear twice in one object. Different JSON readers disagree about which of two duplicates counts, so a reviewer and TPX could read two different kernels from one file. The checker refuses the file.
- Strings in quotes, whole numbers without:
"K": "2"but"N_X": 2. Swapping them is refused as the wrong type.
Text
Before a digest is taken, all text is normalized in two ways, and you need not do either yourself:
- Line endings become LF. Browsers send form text with CRLF and the wiki stores LF; without this a correct draft would digest differently from its stored page.
- Unicode NFC: characters that have two encodings (an "é" as one code point or as "e" plus an accent) are written one way.
Refused characters. A field is refused if it contains an invisible or control character: any character of Unicode general category C (controls, format characters, surrogates, private use, unassigned), except TAB and line breaks, plus the line and paragraph separators U+2028 and U+2029. This covers the bidirectional overrides that make text display in a different order from how it is stored, zero-width spaces and joiners, the byte-order mark inside text, tag characters, the soft hyphen and NUL. The reason: the declaring authority must be able to see exactly the text that is hashed, and hidden text is a carrier for instructions aimed at the AI agents that will read the kernel. The message names the first such character, as <U+202E> for example.
What is not refused:
- Look-alike letters in prose, such as a Cyrillic "а" in a STATEMENT, are ordinary text. Names are ASCII identifiers, so a look-alike can never change what a name cites.
- Superscripts, ligatures and mathematical letters stay as written. The normalization is NFC, not NFKC, so "x²" and "x2" remain different, as physics notation needs.
A cost is accepted: a legitimate format character, such as a zero-width joiner in an emoji sequence or a zero-width non-joiner in Persian script, is refused too.
Unicode versions. TPC-PY and TPX may carry different versions of Unicode's character tables. A character assigned very recently may be refused by one and accepted by the other. Digests cannot differ because of this; TPX decides for the record.
Numbers
VALUE, UNCERTAINTY and K are decimals written as strings: an optional minus sign, digits, an optional fraction, and an optional exponent - "0.05", "6.674e-11", "1500". A comma, a space or a missing digit before the point ("0,05", ".5") is refused. Before the digest each decimal is written in one canonical form, so "0.050", "0.05" and "5e-2" are one value and one digest. Trailing zeros carry no precision here; UNCERTAINTY does. On a register record one decimal is the exception: a measured result's U_C keeps its written precision in the record's digest, trailing zeros included, because TPX checks its uncertainty budget at U_C's last written digit, so "0.0010" and "0.001" give two digests there (TPS 3.2.5 and 3.2.20; see Register records). Only string arithmetic is used: no floating-point rounding enters a digest.
Dimensions
A DIMENSION is either 1 (dimensionless) or base dimensions with integer exponents, separated by single spaces:
| Base | Dimension |
|---|---|
| L | length |
| M | mass |
| T | time |
| I | electric current |
| TH | thermodynamic temperature |
| N | amount of substance |
| J | luminous intensity |
The exponent is always written: L1, not L. Bases may come in any order and may repeat; repeats add. Before the digest the dimension is written canonically: bases in the order above, each once, zero exponents dropped. So T-1 L1 becomes L1 T-1, M1 L1 M1 becomes L1 M2, and L1 L-1 becomes 1.
Units
A UNIT is written like a DIMENSION: symbols with their exponents, separated by single spaces, or 1 for a pure number. A newton is kg m s-2, a square centimetre cm2, a rate per minute min-1. There is no /, . or ^. The exponent belongs to the prefixed symbol: cm2 is (0.01 m)2. An exponent of 1 may be left out.
The symbols accepted are the SI's:
| Group | Symbols |
|---|---|
base units, with the gram (so a kilogram is kg) |
m g s A K mol cd
|
| angles | rad sr
|
| derived units with special names | Hz N Pa J W C V F Ohm S Wb T H lm lx Bq Gy Sv kat
|
| units accepted for use with the SI | min h d au deg arcmin arcsec ha L t eV
|
The ohm is written Ohm. The 24 SI prefixes, from q (10-30) to Q (1030), go on any SI unit and on L, eV, arcsec and t; micro is written u, as in um. Minutes, hours and days, the hectare, the astronomical unit, the degree and the arcminute take no prefix. One prefix per symbol: Mg, not kkg.
Five units are refused, each for a reason the message states: degC (an offset, not a ratio: write a temperature difference in K), Da (its value is measured, so a conversion would carry an uncertainty) and Np, B, dB (logarithmic). Anything else outside the list is refused, never guessed.
Before the digest a unit is spelled canonically: repeated symbols merge, symbols follow the order of the table, and the exponent 1 is dropped. s-2 m kg becomes m kg s-2. Only the spelling changes, never the size: 5 in cm and 0.05 in m are two different statements with two digests.
Measured values. A measured value's UNIT must have the dimension of its manifold entry. Before two values are compared, TPX converts both to SI units. Two units that agree in dimension but differ in kind are not compared: Hz (cycles per second) and rad s-1 (radians per second) share a dimension, but one cycle is 2π radians. Such a pair opens an audit block for a person to settle. The kinds are angle, Hz, Bq, Gy and Sv; sr, lm and lx count as angle squared, so square degrees and steradians convert (TPS 4.4).
Yardstick terms
Terms are also written canonically: the weights of a WSUM are sorted by atom, and a double NEG cancels. WSUM:w_s*S;w_a*A and WSUM:w_a*A;w_s*S are one term.
Declared forms
An EQUATION, a CONDITION or a signature's FORM and IMAGE_FORM is also written canonically before the digest: spaces dropped except around and, or and after not, literals as canonical decimals, D(x, t, 1) written D(x,t). Only the spelling is canonical, never the algebra: m * D(v, t) and m*D(v,t) are one form, but -k_s * x and -x * k_s are two, and digest apart. The rules are TPS 2.2's canonical spelling.
What normalization means for you
Two spellings of one meaning give one digest. A draft in which you only respelled a decimal, a dimension, a unit, a term or the spacing of a form is IDENTICAL to the original, not a successor. What TPX writes to the TFK pages is your draft as entered; the digest is over the canonical form.
Non-goals
Normalization never repairs meaning. A character that has no visible form is refused, not removed: removing a hidden override would change what a reader sees. A unit outside the SI list, such as metre or ft, is refused rather than translated.
Worked example
The finished spring draft with x_max written as "5e-2" instead of "0.05", v's dimension written as "T-1 L1" instead of "L1 T-1", C_NOZ's unit written "m1" instead of "m", EOM_X's equation written without spaces, "m*D(v,t)=-k_s*x", and KIN's written "D(x, t, 1) = v" (examples/spring_respelled.json) gives exactly the original digests:
D(TPK) ad9d20d633d374edf7f7a2ddfefa6e886e67132a6e8a7cd42edd0237d3927088 D(TrM) f767f3635d0cbc54473b6f889c20a94d8d37f95d627d2c856516bac9c7d37de9 D(TMS) 7a962e2297d6798801fa2593be9cd92995cc3a5f9c817cc8a19335c625784128 D(TFK) 46db0af2a3f5fd6e86447bd1764cd5b934cf0f0be3c9f91d16fd47aa435afe5b
and TPC-PY's successor classification (classify_successor in tpc_zone) against the original says:
K written "2" -> "3" YARDSTICK_ONLY (examples/spring_succ_k3.json) D(TPK) unchanged D(TrM) unchanged D(TMS) moved damping term -c_d v added to EOM_X KERNEL_CHANGED (examples/spring_succ_damped.json) D(TPK) moved D(TrM) unchanged D(TMS) unchanged EOM_X written -x * k_s for -k_s * x KERNEL_CHANGED (examples/spring_succ_reordered.json) D(TPK) moved D(TrM) unchanged D(TMS) unchanged gravity and the track's support declared KERNEL_CHANGED (examples/spring_track_draft.json) D(TPK) moved D(TrM) moved D(TMS) unchanged x_max, v, C_NOZ and two forms respelled IDENTICAL (examples/spring_respelled.json) D(TPK) unchanged D(TrM) unchanged D(TMS) unchanged
The last entry is this example; the others are on tutorial step 8.
Governing sections: TPS 2.5, 2.2, 3.2, 4.4 and 5.3.
Previous: Yardsticks. Next: Refusal messages.