Datasets:
Modalities:
Text
Formats:
json
Size:
< 1K
Tags:
multilingual
physics
dimensional-analysis
unit-conversion
natural-language-to-formal-language
multi-agent-systems
physics-stratum: the conversational layer over the physics topology
Browse filesFiles changed (2)
- README.md+411-411
- tools/publish_dataset.py+1-1
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411---language:- it- en- es- zh- hi- artags:- multilingual- physics- dimensional-analysis- unit-conversion- natural-language-to-formal-language- multi-agent-systems- benchmark- conversational-interfaces- formal-verification- semantic-parsingpretty_name: "LingoLOGOS physics-stratum: a question in six written varieties, the answer of the physics stratum, and an assurance that includes the reading"configs:- config_name: corpusdata_files:- split: trainpath: problems/corpus.jsonlsize_categories:- n<1K---# LingoLOGOS physics-stratum topologyA conversational layer over the `physics` topology: a person asks in one of six written varieties, andgets the verdict of the physics stratum back in that same language, at an assurance that includes thefallibility of the reading. The layer never converts a unit, never checks a dimension and never raisesa verdict; the only direction it can move the assurance of the physics stratum is down.```python tools/ask.py --lang it "converti 3 chilometri in metri"Reading state : AGREEDAssurance shown : 2 (reading ceiling 2, physics assurance 2)Physics layer status : VERIFIEDOrchestrator Z3 check : 8 of 8 envelopes confirmedAnswer in the language of the question (Italiano):Stato: accordata: due lettori indipendenti piu il vincolo SMTProblema capito (convert): convert 3 km to mRisposta: 3 km = 3000 m (L)livello 2 di 2strato fisica: VERIFIEDControllo SMT dello strato : 8 di 8 buste confermate```This dataset is the `physics-stratum/` folder of the LingoLOGOS project published as it stands: 67 files,code and data together, plus this card in place of their README. Only the standard library and `z3-solver`are required, and `pytest` for the tests; both are named in `requirements.txt`. Every command below iswritten from inside the folder. The physics layer is not part of this dataset: it lives in the `physics`bundle, published at https://huggingface.co/datasets/tailot/lingologos-physics, and section 10 says how topoint this folder at a copy of it.## 1. What the stratum is, and what it refusesThe certainty of a translation cannot be verified the way the certainty of a dimensional check can:there is no SMT constraint that says that a sentence of Hindi was read correctly. That is thedefinition this bundle works with, and it is why the topology is built the way it is: two readers thatreach their sentence by different roads, an SMT claim about what each reading kept, a referee thatrechecks every envelope, and a decision that is re-derived from the transcript instead of being trustedfrom the arbiter.The rule the whole bundle exists to enforce:```assurance shown = min(assurance of the physics stratum, ceiling of the reading)```| Reading state | ceiling | when ||---|---|---|| `AGREED` | 2 | both readers produced the same sentence, and the physics stratum is what decides it || `PASSTHROUGH` | 2 | the question was already a sentence of the physics language: nothing was translated || `SINGLE` | 1 | one reader understood it and the other abstained: no witness, one level less || `DISPUTED` | 0 | the two readers produced different sentences, or a reading lost a number: the physics stratum is not even asked || `AMBIGUOUS` | 0 | a reader reports that the question announces more than one problem, or leaves a slot with several readings: the person has to choose || `NOT COVERED` | 0 | neither reader found anything: this variety does not say it in a covered way || `TAMPERED` | 0 | the physics stratum says it answered something other than the agreed sentence |Three is never shown, and for once that is not a limit of this layer: the physics stratum itself stopsat two, because its two formalizers and its referee work on a sentence they wrote themselves and thereis no third road to a number there. A sentence in a human language adds one fallible step before that,so here the ceiling of an agreed reading is the level of the layer itself, and a reading can only everlower the confidence -- it has nothing above it to be capped by.The ceiling is not the only thing that holds on its own. The count of literals is checked on a lonereading too: a reading that no longer holds the numbers the person wrote is a different problem, not aweaker reading of the same one, and it ends `DISPUTED` even when it is the only reader that understoodthe question. A single witness therefore answers at level one only when it kept every number.## 2. The eight nodesThe session runs through the orchestrator (`src/lingologos_orchestrator`) with the same envelopeprotocol as the `physics` topology: a marker `@@DOSSIER@@` inside `payload.naturalLanguage`, and`payload.smtConstraints` carrying what each node claims about its own output, which the referee ofevery node recomputes with Z3. The seed sits in the `arbiter`; `maxTurns` is the number of arcs.| Node | What it does | The claim it carries ||---|---|---|| `reader_a` | reads the question against the frames written in the lexicon | the numerals of the question are still in my sentence || `reader_b` | reads it by following the joints of the physics language | the same, independently || `equivalence` | proves the two sentences the same, slot by slot and then with SMT | `not (A = B)` is unsatisfiable || `coverage` | counts that every literal the person wrote survived into the sentence | conjunction of the element equalities || `invoker` | asks the physics stratum, in a separate process, the agreed sentence | the sentence I sent equals the one that came back || `boundary` | checks the echo of the physics stratum instead of trusting it | elementwise on the echo, or the empty claim || `adversary` | re-derives the bound and writes its negation | `shown > ceiling` is unsatisfiable || `arbiter` | runs the decision and renders the answer in the language of the question | the same inequality |The sentence of the physics language has three shapes in this fragment and two joints, `to` and `from`,so the claims are shorter than in the math stratum and the equivalence node works on units, formulas andlists of quantities rather than on polynomials.## 3. Two readers, one lexicon`read_a.py` matches the shapes stored in `lexicon/<lang>.json` (`patterns`: one template per kind ofproblem, with slots). `read_b.py` never looks at those shapes: it finds the verb that announces aproblem, then walks the joints of the physics language (`to`, `from`, in the words of the variety) andcuts the slots out of the gaps between them. They share only the lexicon, the atomizer (`segment.py`)and the templates of the physics language (`canonical.py`).That sharing is deliberate and it is also the known blind spot: a wrong description of a variety is awrong description for both readers, and the topology cannot see it. What shows it is the corpus ofsection 5, whose questions were written and checked by a person. When the two readers disagree theassurance goes down, never up: `DISPUTED` does not even consult the physics stratum.A phrase of a variety that runs over several atoms -- the Italian phrase for "starting from", theChinese phrase for a dimensional analysis -- is one joint for `reader_b`, not one per atom, because theframe of a sentence has as many joints as its shape has gaps.## 4. Talking to the physics stratum`invoker.py` is the only door. It launches `python <root>/tools/ask.py --json <sentence>` as a separateprocess and reads its JSON verdict back; nothing in this folder imports the physics package to decideanything here. One module, `compare.py`, imports it for the SMT plumbing of the equivalence node, and agate in `tests/test_topology.py` pins that exception. The referee then checks the echo: the sentencethe physics stratum says it answered has to be the sentence the readers agreed on, otherwise thesession is `TAMPERED`.| Variable | Meaning ||---|---|| `LINGOLOGOS_PHYSSTRATUM_PHYSICS_ROOT` | where the `physics` bundle is (default: the sibling folder `datasets/physics`) || `LINGOLOGOS_PHYSSTRATUM_PHYSICS_BACKEND` | `subprocess` (default), or `none` to disable the physics layer entirely || `LINGOLOGOS_PHYSSTRATUM_PHYSICS_TIMEOUT` | how long one call of the layer may take (default 240 seconds) || `LINGOLOGOS_PHYSSTRATUM_FAULTS` | comma separated `node:fault` pairs, experiments only |What the layer says decides what a person is shown:| Status of the physics stratum | Its assurance | What this stratum shows ||---|---|---|| `VERIFIED` | 2 | the answer, at the ceiling of the reading || `SINGLE_PROVER` | 1 | the answer, one road produced the number where two were expected || `REFUSED` | 0 | the explanation the layer wrote, and no answer || `GUARD_BLOCKED`, `ABSTAINED`, `UNKNOWN` | 0 | nothing: the reading stands, the assurance is zero |A refusal is a verdict and not a failure: `convert 3 kilograms to meters` is a well read question abouta dimensionally impossible conversion, the layer says so, and this stratum repeats that it was refusedwithout dressing it up as an answer. A disabled physics layer is not tampering either: the readingstands, the assurance falls to zero because there is no physics assurance to take the minimum with, andno answer is shown.## 5. The corpus`problems/corpus.jsonl` holds 64 questions: three kinds of problem in 6 varieties, plus items alreadywritten in the physics language, gibberish, questions in a word order this bundle does not read,symbols carried inside an article, units outside the fragment of the layer, and questions whose physicsthe layer refuses. Each line carries what the answer has to look like (`state`, `sentence`,`answer_contains`, `min_assurance`, `max_assurance`, `no_answer`, `referee_clean`) and a `why` that sayswhy, including the cases where the expected outcome is an abstention. Here `negative` means "nothing maybe shown at a positive assurance", which covers both a question that cannot be read and a question thatis read well and refused by the layer.Graded against the in-process pipeline with the physics layer running: **64 of 64** rows agree with theirgold (`lingologos_physstratum/corpus.py` grades one row, `tests/test_corpus.py` runs all of them). Thestates come out 45 `AGREED`, 11 `NOT COVERED`, 4 `PASSTHROUGH`, 3 `SINGLE`, 1 `AMBIGUOUS`.`tools/coverage_report.py` writes `results/coverage.json` and counts **45** questions read by bothreaders, **3** by `reader_b` alone and **12** by neither, over six lexicons that carry 14 to 20 frames and2 to 5 joints each. Eight rows (`it-06`, `it-10`, `it-13`, `en-11`, `es-11`, `zh-10`, `ar-09`, `hi-10`)are agreed readings on which the physics layer refuses: assurance 0 and no answer, which is the stratumrefusing to add an availability it does not have. Three rows (`it-03`, `zh-03`, `hi-07`) stay at `SINGLE`,assurance 1, for the reasons in section 7.## 6. Commands```python tools/ask.py --lang it "converti 3 chilometri in metri" # one session, eight processespython tools/ask.py --lang en --json "convert 3 km to m"python tools/ask.py --corpus problems/corpus.jsonl --limit 6python tools/coverage_report.py --physics --out results/coverage.jsonpython tools/ablation.py --out results/ablation.json # the run shipped under results/python tools/ablation.py --probe 6 --out results/ablation.json````tools/ask.py` prints the verdict it re-derives from the transcript, not the one the arbiter wrote,and exits with code 3 when that re-derivation disagrees with a node about its own envelope, with code2 when the assurance is zero, and with code 1 in corpus mode when a gold expectation fails.`tools/ablation.py` walks the configurations of the topologyone node at a time, injects every fault of the catalogue singly and in pairs, and reports each cell as`raised | lowered | masked | caught | abstained | silent_error`: a cell counted `raised` is a violationof the rule of section 1, and the tool exits 1 if any happened. A `caught` cell is one where an answerwas shown that the gold does not accept, but the session said so itself -- a claim fell to the refereeof its node, or the assurance sits below the honest one because the configuration lost a node.On this checkout the default probe -- twelve questions, the two conversions `*-01` and `*-02` of section5 in each of the six varieties -- fills **147** cells and **1764** sessions, the fault takes hold in**1356** of them, and the totals are `raised 0`, `lowered 0`, `silent_error 12`, `caught 8`,`abstained 1084`, `masked 252` -- 3428.9 seconds, just under an hour. Nothing was ever raised above thehonest assurance, which is the invariant section 1 states.Twelve sessions are silent errors, and they are one cell: the full topology with **both** readerscommitting `same_units` at the same time, so that each writes the target unit of the question as itssource unit. The two readings agree, every envelope is confirmed, the numbers the person wrote are allstill there, and the physics stratum answers the sentence it was sent -- `convert 3 km to km` -- with`3 km = 3 km` at assurance 2. No claim of this bundle can see it: the equivalence node compares the tworeadings with each other, the coverage node counts the literals, and the echo checks that the layeranswered the sentence it was given. That is the blind spot of section 3 in its purest form -- a faultcommon to both readers -- and the bundle reports it rather than hiding it: the units of a reading arepoliced between the readers and by the physics stratum, never against a third authority. The same faulttaken by one reader only -- in the two configurations that have lost the other reader, 24 sessions --never reaches the assurance of the honest run: 8 are answered at assurance 1 with the sentence and theanswer reported as wrong, and the other 16 withdraw the answer outright.## 7. Limits that are written down, not hidden* Three word orders are described in one of the two readers only, so those questions stand on onewitness and stay at `SINGLE`, assurance 1: the Italian conversion with the joint `a` (`riduci 250centimetri a metri`, read by `reader_b` only), the Chinese `ba` frame with the verb at the end(`read_a` knows no pattern for it), and the Hindi noun phrase analysis with no verb (`reader_a` asksfor a symbol it does not find). `tools/coverage_report.py` shows them as one of two readers.* Hindi also writes the verb last (`badlo 3 kilometron ko mitar mein`), and neither reader was giventhat order: the question is `NOT COVERED` (`hi-03`) rather than guessed.* The connective `e` in Italian also means *and*, so `bilancia forza e lunghezza uguale a energia` isread as a list of quantities and the layer refuses a list where it needs a product (`it-10`). Thereading is reported, the answer is not.* The physics language is not case free: `v` is the speed and `V` is the volt, `p` is the momentum and`P` is the power, the gram is `g` and gravity is `g`. Both readers fold a sentence before they cut itsslots, so the canonical printer (`canonical.py`) puts the spelling of the physics language back onevery slot value -- the one place in this stratum where a letter is changed, and a change of spellingrather than of content. One letter is genuinely lost on the way: a bare `p` arrives folded from boththe momentum and the power, and the printer writes the momentum, because that is the form the physicslanguage puts in lower case. Writing the word ("power") is how a person keeps the distinction.* An Arabic quantity written inside the definite article (`al-tul`, "the length") is not in thelexicon: `reader_a` strips what it can and both readers abstain (`ar-07`), so the stratum says `NOTCOVERED` instead of guessing the two symbols.* Units outside the fragment of the physics layer (`litres`, `gallons`) are outside this bundle too(`it-12`, `en-10`, `es-10`): the lexicons do not name what the layer cannot carry, so the question isnot read rather than read into a wrong unit.* The physics bundle has a fourth family, the circuits of `potential`. No variety of this bundle asksit -- it is in the grammar specifications of the eight nodes and in no lexicon -- so a circuit isreachable only through the direct mode, when the person writes the sentence of the physics languagethemselves.* The equivalence node compares readings with SMT over their numbers; units and formulas are comparedslot by slot, which is why a reading that swapped `km` for `kWh` is caught by the slot comparison andnot by the constraint.* The two readers share their data, so a systematic error in the description of a variety is invisibleto the topology and can only be found in the corpus. The ablation of section 6 shows the extreme caseof it: the same fault in both readers at once leaves an answer shown at the full assurance of thephysics stratum, and nothing inside this bundle can contradict it.## 8. TestsFrom the repository root:```python -m pytest -q datasets/physics-stratum/tests```The suite is **271** tests: 109 on the two readers against every row of the corpus, 70 on thecorpus itself, 38 on the pinned invariant, 14 on the topology file, 13 on the faults, 14 on the decisiontable, 11 on the lexicons and 2 end-to-end sessions. It checks the topology fileagainst the node order, the shape and the completeness of the lexicons, both readers against thecorpus, the decision table, the faults, and every gold answer of the corpus;`tests/test_pinned_invariant.py` runs the same questions through every node configuration and everyfault and asserts that the verdict of the physics stratum does not move, and that nothing is ever shownabove it. `tests/test_orchestrator_e2e.py` runs two real sessions through the orchestrator and isskipped when `lingologos_orchestrator` is not importable. The corpus and the invariant tests call thephysics stratum as subprocesses, and the suite took 6 minutes 13 seconds on the machine that built thissnapshot.Real sessions, measured: `converti 3 chilometri in metri` comes back `AGREED` at assurance 2 against aphysics assurance of 2 -- the ceiling of that layer, so the reading cost nothing here -- with **8 of 8**envelope claims confirmed by the referee of the session, and `python tools/ask.py --corpusproblems/corpus.jsonl` grades **64 of 64** real sessions against gold, in 249 seconds. One question pervariety outside Italian (`zh-01`, `ar-01`, `hi-01`, `en-04`) comes back the same way: `AGREED`, assurance2, the physics layer `VERIFIED`, 8 of 8 claims confirmed, nothing detected -- and the block the personreads is written in the language of the question (48, 98 and 99 non-ASCII characters in the Chinese,Arabic and Hindi replies).A gate in `tests/test_topology.py` keeps every Python source of this bundle ASCII only, and pins that`lingologos_phys` may be imported for its SMT plumbing by `lingologos_physstratum/compare.py` alone.## 9. Language policyThe prose of this folder -- code, docstrings, comments, tool output, test messages -- is English, andthe Python sources are ASCII, as the repository requires. The exception is the language under study,and it is confined to data: `lexicon/*.json` (the words, frames, joints and labels of the sixvarieties), `problems/corpus.jsonl` (the questions and their gold answers), and the answer block that`tools/ask.py` shows a person, which is written in the language of the question because that block isthe object this bundle measures.## 10. Putting this dataset back into a LingoLOGOS checkoutThis folder is a published snapshot. To work on it as a conversational layer again, clonehttps://huggingface.co/datasets/tailot/lingologos-physics next to it, name the physics copy with`LINGOLOGOS_PHYSSTRATUM_PHYSICS_ROOT`, and run the sessions of section 3; with that variable unset thefolder looks for a sibling `physics`. Its code is the same as the snapshot published on the hub, which isthis folder with sections1 to 10 of its README rewritten in place and sections 11 to 14 appended. Every file of this folder iscompared by sha256 after the upload, the card that replaces this README among them: the hub holds oneobject per file of this folder plus `.gitattributes`, so the remote count is one above the number`tools/publish_dataset.py` prints here. The physics bundle lives athttps://huggingface.co/datasets/tailot/lingologos-physics, and the project that built both ishttps://github.com/Tailot/LingoLOGOS.An earlier published revision of this dataset held its library as `lgphysstratum/` and read its fourhandles as `LGPHYSSTRATUM_FAULTS`, `LGPHYSSTRATUM_PHYSICS_ROOT`, `LGPHYSSTRATUM_PHYSICS_BACKEND` and`LGPHYSSTRATUM_PHYSICS_TIMEOUT`. The names moved and nothing else: the 67 files, the 64 questions, the sixlexicons, the eight node definitions, the two readers, the decision rule of section 1 and the 271 testsare the ones that revision published, and the physics bundle this stratum talks to left `lgphys/` underthe same rule.## 11. The corpus file`problems/corpus.jsonl` holds 64 questions, one JSON object per line, each asking one thing in one of sixwritten varieties: 13 Italian, 11 English, 11 Spanish, 10 Chinese, 10 Hindi, 9 Arabic. Three of the sixvarieties -- Chinese, Hindi and Arabic -- are written outside the Latin alphabet, and that is the point ofthe file: the reading layer is measured across all six, in both directions.| field | meaning ||---|---|| `id` | `<variety>-<number>`; the prefix names the variety, so rows can be grouped without reading the question || `lang` | the ISO code of the variety the person wrote in: `it`, `en`, `es`, `zh`, `hi` or `ar` || `kind` | what the row is for: `convert`, `audit`, `pi`, `negative` or `passthrough` || `question` | the sentence a person would actually type, between 4 and 69 characters || `why` | what the row is meant to show, in English || `expect` | what a correct run must produce |The kind of a row says what kind of question it is. Note that this corpus is a graded record of what thereading layer can do, so some rows have no `sentence` to point at: an `audit` row, for instance, is botha question whose surface this layer covers (the physics stratum then checks the equation and rules on it)and one whose surface it does not (the readers abstain, the stratum says nothing, and the assurance is 0).| kind | rows | what the row tests ||---|---|---|| `convert` | 17 | a change of unit: km to m, km/h to m/s, cm to m, days to hours || `audit` | 13 | a claim that two products carry the same dimensions, checked or rejected by the physics stratum || `pi` | 12 | a dimensional derivation: the dimensions of speed, or the period of a mass on a spring || `negative` | 18 | a question that must not be read, or must not be answered: two problems in one sentence, an uncovered surface, a false physics || `passthrough` | 4 | the question is already a sentence of the physics language, so nothing is translated |The `expect` object, field by field:| field | rows | what it pins ||---|---|---|| `state` | 64 | the reading outcome: 45 `AGREED`, 11 `NOT COVERED`, 4 `PASSTHROUGH`, 3 `SINGLE`, 1 `AMBIGUOUS` || `sentence` | 44 | the physics sentence both readers are expected to write || `answer_contains` | 44 | a string the answer of the physics stratum has to contain || `min_assurance` | 41 | the assurance floor of the row (all 41 are 2, the ceiling of this layer) || `max_assurance` | 23 | the assurance ceiling: 0 on the 20 rows that must not answer, 1 on the 3 single-witness rows || `no_answer` | 20 | the row must come back with no answer at all || `referee_clean` | 64 | no envelope claim of the session may fall to the referee of its node |The 20 rows with no `sentence` are the 18 `negative` rows plus `it-06` and `ar-07`: eleven of the`negative` rows are not read at all, `it-09` announces two problems in one sentence and is refused, andseven are read and then refused by the physics stratum -- with `it-06` that makes eight read-and-refusedrows, at assurance 0 and with no answer. The two readers agree exactly on each of them. The 3single-witness rows are `it-03`, `zh-03` and `hi-07`, and they answer at assurance 1 because only onereader reached the sentence and that reader kept every number.## 12. Loading it```pythonfrom datasets import load_datasetcorpus = load_dataset("tailot/physics-stratum", "corpus", split="train")print(len(corpus)) # 64print(corpus[0]["question"]) # converti 3 chilometri in metriprint(corpus[0]["expect"]["sentence"]) # convert 3 km to m```The loader is metadata only, and no test of this bundle needs it: every row can be read with `json.loads`on one line of `problems/corpus.jsonl`, as `lingologos_physstratum/corpus.py` does. Every row agrees withwhat this folder produces: `python tools/ask.py --corpus problems/corpus.jsonl` runs every questionthrough the eight nodes and grades it against `expect`, and all 64 of 64 rows agree, in 249 seconds on themachine that built this snapshot. `python tools/coverage_report.py --physics --out results/coverage.json`gives a reading report on each row without a verdict; the verdicts are in `results/coverage.json`, thefaults in `results/ablation.json`.## 13. RightsThe same rights as the rest of the LingoLOGOS project, of which this folder is one published bundle. Thequestions are sentences written for this bundle, not text taken from anywhere; they ask about kilometres,hours, force, energy and the period of a mass on a spring. The Hindi and Arabic lexicons, like the otherfour, were written for this bundle inside the repository, and a reader of either is the right person tocheck them before this bundle is used for anything other than a measurement.## 14. Citation```bibtex@misc{lingologos_physics_stratum,title = {LingoLOGOS physics-stratum: a question in six written varieties, the answer of the physics stratum, and an assurance that includes the reading},author = {LingoLOGOS},year = {2026},howpublished = {the folder as it stands, 67 files, code and data together, with this card as the README},note = {A conversational layer over the physics topology of the same project: 64 questions, 271 tests. The assurance it shows is the minimum of the assurance of the physics stratum and the ceiling of the reading, so a reading that stands alone or loses a number lowers the confidence and can take the answer away. The bundle carries its fault catalogue and an ablation over every subset of its eight nodes, and reports the one blind spot that experiment found: a unit fault taken by both readers at once.}}```123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411---language:- it- en- es- zh- hi- artags:- multilingual- physics- dimensional-analysis- unit-conversion- natural-language-to-formal-language- multi-agent-systems- benchmark- conversational-interfaces- formal-verification- semantic-parsingpretty_name: "LingoLOGOS physics-stratum: a question in six written varieties, the answer of the physics stratum, and an assurance that includes the reading"configs:- config_name: corpusdata_files:- split: trainpath: problems/corpus.jsonlsize_categories:- n<1K---# LingoLOGOS physics-stratum topologyA conversational layer over the `physics` topology: a person asks in one of six written varieties, andgets the verdict of the physics stratum back in that same language, at an assurance that includes thefallibility of the reading. The layer never converts a unit, never checks a dimension and never raisesa verdict; the only direction it can move the assurance of the physics stratum is down.```python tools/ask.py --lang it "converti 3 chilometri in metri"Reading state : AGREEDAssurance shown : 2 (reading ceiling 2, physics assurance 2)Physics layer status : VERIFIEDOrchestrator Z3 check : 8 of 8 envelopes confirmedAnswer in the language of the question (Italiano):Stato: accordata: due lettori indipendenti piu il vincolo SMTProblema capito (convert): convert 3 km to mRisposta: 3 km = 3000 m (L)livello 2 di 2strato fisica: VERIFIEDControllo SMT dello strato : 8 di 8 buste confermate```This dataset is the `physics-stratum/` folder of the LingoLOGOS project published as it stands: 67 files,code and data together, plus this card in place of their README. Only the standard library and `z3-solver`are required, and `pytest` for the tests; both are named in `requirements.txt`. Every command below iswritten from inside the folder. The physics layer is not part of this dataset: it lives in the `physics`bundle, published at https://huggingface.co/datasets/tailot/lingologos-physics, and section 10 says how topoint this folder at a copy of it.## 1. What the stratum is, and what it refusesThe certainty of a translation cannot be verified the way the certainty of a dimensional check can:there is no SMT constraint that says that a sentence of Hindi was read correctly. That is thedefinition this bundle works with, and it is why the topology is built the way it is: two readers thatreach their sentence by different roads, an SMT claim about what each reading kept, a referee thatrechecks every envelope, and a decision that is re-derived from the transcript instead of being trustedfrom the arbiter.The rule the whole bundle exists to enforce:```assurance shown = min(assurance of the physics stratum, ceiling of the reading)```| Reading state | ceiling | when ||---|---|---|| `AGREED` | 2 | both readers produced the same sentence, and the physics stratum is what decides it || `PASSTHROUGH` | 2 | the question was already a sentence of the physics language: nothing was translated || `SINGLE` | 1 | one reader understood it and the other abstained: no witness, one level less || `DISPUTED` | 0 | the two readers produced different sentences, or a reading lost a number: the physics stratum is not even asked || `AMBIGUOUS` | 0 | a reader reports that the question announces more than one problem, or leaves a slot with several readings: the person has to choose || `NOT COVERED` | 0 | neither reader found anything: this variety does not say it in a covered way || `TAMPERED` | 0 | the physics stratum says it answered something other than the agreed sentence |Three is never shown, and for once that is not a limit of this layer: the physics stratum itself stopsat two, because its two formalizers and its referee work on a sentence they wrote themselves and thereis no third road to a number there. A sentence in a human language adds one fallible step before that,so here the ceiling of an agreed reading is the level of the layer itself, and a reading can only everlower the confidence -- it has nothing above it to be capped by.The ceiling is not the only thing that holds on its own. The count of literals is checked on a lonereading too: a reading that no longer holds the numbers the person wrote is a different problem, not aweaker reading of the same one, and it ends `DISPUTED` even when it is the only reader that understoodthe question. A single witness therefore answers at level one only when it kept every number.## 2. The eight nodesThe session runs through the orchestrator (`src/lingologos_orchestrator`) with the same envelopeprotocol as the `physics` topology: a marker `@@DOSSIER@@` inside `payload.naturalLanguage`, and`payload.smtConstraints` carrying what each node claims about its own output, which the referee ofevery node recomputes with Z3. The seed sits in the `arbiter`; `maxTurns` is the number of arcs.| Node | What it does | The claim it carries ||---|---|---|| `reader_a` | reads the question against the frames written in the lexicon | the numerals of the question are still in my sentence || `reader_b` | reads it by following the joints of the physics language | the same, independently || `equivalence` | proves the two sentences the same, slot by slot and then with SMT | `not (A = B)` is unsatisfiable || `coverage` | counts that every literal the person wrote survived into the sentence | conjunction of the element equalities || `invoker` | asks the physics stratum, in a separate process, the agreed sentence | the sentence I sent equals the one that came back || `boundary` | checks the echo of the physics stratum instead of trusting it | elementwise on the echo, or the empty claim || `adversary` | re-derives the bound and writes its negation | `shown > ceiling` is unsatisfiable || `arbiter` | runs the decision and renders the answer in the language of the question | the same inequality |The sentence of the physics language has three shapes in this fragment and two joints, `to` and `from`,so the claims are shorter than in the math stratum and the equivalence node works on units, formulas andlists of quantities rather than on polynomials.## 3. Two readers, one lexicon`read_a.py` matches the shapes stored in `lexicon/<lang>.json` (`patterns`: one template per kind ofproblem, with slots). `read_b.py` never looks at those shapes: it finds the verb that announces aproblem, then walks the joints of the physics language (`to`, `from`, in the words of the variety) andcuts the slots out of the gaps between them. They share only the lexicon, the atomizer (`segment.py`)and the templates of the physics language (`canonical.py`).That sharing is deliberate and it is also the known blind spot: a wrong description of a variety is awrong description for both readers, and the topology cannot see it. What shows it is the corpus ofsection 5, whose questions were written and checked by a person. When the two readers disagree theassurance goes down, never up: `DISPUTED` does not even consult the physics stratum.A phrase of a variety that runs over several atoms -- the Italian phrase for "starting from", theChinese phrase for a dimensional analysis -- is one joint for `reader_b`, not one per atom, because theframe of a sentence has as many joints as its shape has gaps.## 4. Talking to the physics stratum`invoker.py` is the only door. It launches `python <root>/tools/ask.py --json <sentence>` as a separateprocess and reads its JSON verdict back; nothing in this folder imports the physics package to decideanything here. One module, `compare.py`, imports it for the SMT plumbing of the equivalence node, and agate in `tests/test_topology.py` pins that exception. The referee then checks the echo: the sentencethe physics stratum says it answered has to be the sentence the readers agreed on, otherwise thesession is `TAMPERED`.| Variable | Meaning ||---|---|| `LINGOLOGOS_PHYSSTRATUM_PHYSICS_ROOT` | where the `physics` bundle is (default: the sibling folder `datasets/physics`) || `LINGOLOGOS_PHYSSTRATUM_PHYSICS_BACKEND` | `subprocess` (default), or `none` to disable the physics layer entirely || `LINGOLOGOS_PHYSSTRATUM_PHYSICS_TIMEOUT` | how long one call of the layer may take (default 240 seconds) || `LINGOLOGOS_PHYSSTRATUM_FAULTS` | comma separated `node:fault` pairs, experiments only |What the layer says decides what a person is shown:| Status of the physics stratum | Its assurance | What this stratum shows ||---|---|---|| `VERIFIED` | 2 | the answer, at the ceiling of the reading || `SINGLE_PROVER` | 1 | the answer, one road produced the number where two were expected || `REFUSED` | 0 | the explanation the layer wrote, and no answer || `GUARD_BLOCKED`, `ABSTAINED`, `UNKNOWN` | 0 | nothing: the reading stands, the assurance is zero |A refusal is a verdict and not a failure: `convert 3 kilograms to meters` is a well read question abouta dimensionally impossible conversion, the layer says so, and this stratum repeats that it was refusedwithout dressing it up as an answer. A disabled physics layer is not tampering either: the readingstands, the assurance falls to zero because there is no physics assurance to take the minimum with, andno answer is shown.## 5. The corpus`problems/corpus.jsonl` holds 64 questions: three kinds of problem in 6 varieties, plus items alreadywritten in the physics language, gibberish, questions in a word order this bundle does not read,symbols carried inside an article, units outside the fragment of the layer, and questions whose physicsthe layer refuses. Each line carries what the answer has to look like (`state`, `sentence`,`answer_contains`, `min_assurance`, `max_assurance`, `no_answer`, `referee_clean`) and a `why` that sayswhy, including the cases where the expected outcome is an abstention. Here `negative` means "nothing maybe shown at a positive assurance", which covers both a question that cannot be read and a question thatis read well and refused by the layer.Graded against the in-process pipeline with the physics layer running: **64 of 64** rows agree with theirgold (`lingologos_physstratum/corpus.py` grades one row, `tests/test_corpus.py` runs all of them). Thestates come out 45 `AGREED`, 11 `NOT COVERED`, 4 `PASSTHROUGH`, 3 `SINGLE`, 1 `AMBIGUOUS`.`tools/coverage_report.py` writes `results/coverage.json` and counts **45** questions read by bothreaders, **3** by `reader_b` alone and **12** by neither, over six lexicons that carry 14 to 20 frames and2 to 5 joints each. Eight rows (`it-06`, `it-10`, `it-13`, `en-11`, `es-11`, `zh-10`, `ar-09`, `hi-10`)are agreed readings on which the physics layer refuses: assurance 0 and no answer, which is the stratumrefusing to add an availability it does not have. Three rows (`it-03`, `zh-03`, `hi-07`) stay at `SINGLE`,assurance 1, for the reasons in section 7.## 6. Commands```python tools/ask.py --lang it "converti 3 chilometri in metri" # one session, eight processespython tools/ask.py --lang en --json "convert 3 km to m"python tools/ask.py --corpus problems/corpus.jsonl --limit 6python tools/coverage_report.py --physics --out results/coverage.jsonpython tools/ablation.py --out results/ablation.json # the run shipped under results/python tools/ablation.py --probe 6 --out results/ablation.json````tools/ask.py` prints the verdict it re-derives from the transcript, not the one the arbiter wrote,and exits with code 3 when that re-derivation disagrees with a node about its own envelope, with code2 when the assurance is zero, and with code 1 in corpus mode when a gold expectation fails.`tools/ablation.py` walks the configurations of the topologyone node at a time, injects every fault of the catalogue singly and in pairs, and reports each cell as`raised | lowered | masked | caught | abstained | silent_error`: a cell counted `raised` is a violationof the rule of section 1, and the tool exits 1 if any happened. A `caught` cell is one where an answerwas shown that the gold does not accept, but the session said so itself -- a claim fell to the refereeof its node, or the assurance sits below the honest one because the configuration lost a node.On this checkout the default probe -- twelve questions, the two conversions `*-01` and `*-02` of section5 in each of the six varieties -- fills **147** cells and **1764** sessions, the fault takes hold in**1356** of them, and the totals are `raised 0`, `lowered 0`, `silent_error 12`, `caught 8`,`abstained 1084`, `masked 252` -- 3428.9 seconds, just under an hour. Nothing was ever raised above thehonest assurance, which is the invariant section 1 states.Twelve sessions are silent errors, and they are one cell: the full topology with **both** readerscommitting `same_units` at the same time, so that each writes the target unit of the question as itssource unit. The two readings agree, every envelope is confirmed, the numbers the person wrote are allstill there, and the physics stratum answers the sentence it was sent -- `convert 3 km to km` -- with`3 km = 3 km` at assurance 2. No claim of this bundle can see it: the equivalence node compares the tworeadings with each other, the coverage node counts the literals, and the echo checks that the layeranswered the sentence it was given. That is the blind spot of section 3 in its purest form -- a faultcommon to both readers -- and the bundle reports it rather than hiding it: the units of a reading arepoliced between the readers and by the physics stratum, never against a third authority. The same faulttaken by one reader only -- in the two configurations that have lost the other reader, 24 sessions --never reaches the assurance of the honest run: 8 are answered at assurance 1 with the sentence and theanswer reported as wrong, and the other 16 withdraw the answer outright.## 7. Limits that are written down, not hidden* Three word orders are described in one of the two readers only, so those questions stand on onewitness and stay at `SINGLE`, assurance 1: the Italian conversion with the joint `a` (`riduci 250centimetri a metri`, read by `reader_b` only), the Chinese `ba` frame with the verb at the end(`read_a` knows no pattern for it), and the Hindi noun phrase analysis with no verb (`reader_a` asksfor a symbol it does not find). `tools/coverage_report.py` shows them as one of two readers.* Hindi also writes the verb last (`badlo 3 kilometron ko mitar mein`), and neither reader was giventhat order: the question is `NOT COVERED` (`hi-03`) rather than guessed.* The connective `e` in Italian also means *and*, so `bilancia forza e lunghezza uguale a energia` isread as a list of quantities and the layer refuses a list where it needs a product (`it-10`). Thereading is reported, the answer is not.* The physics language is not case free: `v` is the speed and `V` is the volt, `p` is the momentum and`P` is the power, the gram is `g` and gravity is `g`. Both readers fold a sentence before they cut itsslots, so the canonical printer (`canonical.py`) puts the spelling of the physics language back onevery slot value -- the one place in this stratum where a letter is changed, and a change of spellingrather than of content. One letter is genuinely lost on the way: a bare `p` arrives folded from boththe momentum and the power, and the printer writes the momentum, because that is the form the physicslanguage puts in lower case. Writing the word ("power") is how a person keeps the distinction.* An Arabic quantity written inside the definite article (`al-tul`, "the length") is not in thelexicon: `reader_a` strips what it can and both readers abstain (`ar-07`), so the stratum says `NOTCOVERED` instead of guessing the two symbols.* Units outside the fragment of the physics layer (`litres`, `gallons`) are outside this bundle too(`it-12`, `en-10`, `es-10`): the lexicons do not name what the layer cannot carry, so the question isnot read rather than read into a wrong unit.* The physics bundle has a fourth family, the circuits of `potential`. No variety of this bundle asksit -- it is in the grammar specifications of the eight nodes and in no lexicon -- so a circuit isreachable only through the direct mode, when the person writes the sentence of the physics languagethemselves.* The equivalence node compares readings with SMT over their numbers; units and formulas are comparedslot by slot, which is why a reading that swapped `km` for `kWh` is caught by the slot comparison andnot by the constraint.* The two readers share their data, so a systematic error in the description of a variety is invisibleto the topology and can only be found in the corpus. The ablation of section 6 shows the extreme caseof it: the same fault in both readers at once leaves an answer shown at the full assurance of thephysics stratum, and nothing inside this bundle can contradict it.## 8. TestsFrom the repository root:```python -m pytest -q datasets/physics-stratum/tests```The suite is **271** tests: 109 on the two readers against every row of the corpus, 70 on thecorpus itself, 38 on the pinned invariant, 14 on the topology file, 13 on the faults, 14 on the decisiontable, 11 on the lexicons and 2 end-to-end sessions. It checks the topology fileagainst the node order, the shape and the completeness of the lexicons, both readers against thecorpus, the decision table, the faults, and every gold answer of the corpus;`tests/test_pinned_invariant.py` runs the same questions through every node configuration and everyfault and asserts that the verdict of the physics stratum does not move, and that nothing is ever shownabove it. `tests/test_orchestrator_e2e.py` runs two real sessions through the orchestrator and isskipped when `lingologos_orchestrator` is not importable. The corpus and the invariant tests call thephysics stratum as subprocesses, and the suite took 6 minutes 13 seconds on the machine that built thissnapshot.Real sessions, measured: `converti 3 chilometri in metri` comes back `AGREED` at assurance 2 against aphysics assurance of 2 -- the ceiling of that layer, so the reading cost nothing here -- with **8 of 8**envelope claims confirmed by the referee of the session, and `python tools/ask.py --corpusproblems/corpus.jsonl` grades **64 of 64** real sessions against gold, in 249 seconds. One question pervariety outside Italian (`zh-01`, `ar-01`, `hi-01`, `en-04`) comes back the same way: `AGREED`, assurance2, the physics layer `VERIFIED`, 8 of 8 claims confirmed, nothing detected -- and the block the personreads is written in the language of the question (48, 98 and 99 non-ASCII characters in the Chinese,Arabic and Hindi replies).A gate in `tests/test_topology.py` keeps every Python source of this bundle ASCII only, and pins that`lingologos_phys` may be imported for its SMT plumbing by `lingologos_physstratum/compare.py` alone.## 9. Language policyThe prose of this folder -- code, docstrings, comments, tool output, test messages -- is English, andthe Python sources are ASCII, as the repository requires. The exception is the language under study,and it is confined to data: `lexicon/*.json` (the words, frames, joints and labels of the sixvarieties), `problems/corpus.jsonl` (the questions and their gold answers), and the answer block that`tools/ask.py` shows a person, which is written in the language of the question because that block isthe object this bundle measures.## 10. Putting this dataset back into a LingoLOGOS checkoutThis folder is a published snapshot. To work on it as a conversational layer again, clonehttps://huggingface.co/datasets/tailot/lingologos-physics next to it, name the physics copy with`LINGOLOGOS_PHYSSTRATUM_PHYSICS_ROOT`, and run the sessions of section 3; with that variable unset thefolder looks for a sibling `physics`. Its code is the same as the snapshot published on the hub, which isthis folder with sections1 to 10 of its README rewritten in place and sections 11 to 14 appended. Every file of this folder iscompared by sha256 after the upload, the card that replaces this README among them: the hub holds oneobject per file of this folder plus `.gitattributes`, so the remote count is one above the number`tools/publish_dataset.py` prints here. The physics bundle lives athttps://huggingface.co/datasets/tailot/lingologos-physics, and the project that built both ishttps://github.com/Tailot/LingoLOGOS.An earlier published revision of this dataset held its library as `lgphysstratum/` and read its fourhandles as `LGPHYSSTRATUM_FAULTS`, `LGPHYSSTRATUM_PHYSICS_ROOT`, `LGPHYSSTRATUM_PHYSICS_BACKEND` and`LGPHYSSTRATUM_PHYSICS_TIMEOUT`. The names moved and nothing else: the 67 files, the 64 questions, the sixlexicons, the eight node definitions, the two readers, the decision rule of section 1 and the 271 testsare the ones that revision published, and the physics bundle this stratum talks to left `lgphys/` underthe same rule.## 11. The corpus file`problems/corpus.jsonl` holds 64 questions, one JSON object per line, each asking one thing in one of sixwritten varieties: 13 Italian, 11 English, 11 Spanish, 10 Chinese, 10 Hindi, 9 Arabic. Three of the sixvarieties -- Chinese, Hindi and Arabic -- are written outside the Latin alphabet, and that is the point ofthe file: the reading layer is measured across all six, in both directions.| field | meaning ||---|---|| `id` | `<variety>-<number>`; the prefix names the variety, so rows can be grouped without reading the question || `lang` | the ISO code of the variety the person wrote in: `it`, `en`, `es`, `zh`, `hi` or `ar` || `kind` | what the row is for: `convert`, `audit`, `pi`, `negative` or `passthrough` || `question` | the sentence a person would actually type, between 4 and 69 characters || `why` | what the row is meant to show, in English || `expect` | what a correct run must produce |The kind of a row says what kind of question it is. Note that this corpus is a graded record of what thereading layer can do, so some rows have no `sentence` to point at: an `audit` row, for instance, is botha question whose surface this layer covers (the physics stratum then checks the equation and rules on it)and one whose surface it does not (the readers abstain, the stratum says nothing, and the assurance is 0).| kind | rows | what the row tests ||---|---|---|| `convert` | 17 | a change of unit: km to m, km/h to m/s, cm to m, days to hours || `audit` | 13 | a claim that two products carry the same dimensions, checked or rejected by the physics stratum || `pi` | 12 | a dimensional derivation: the dimensions of speed, or the period of a mass on a spring || `negative` | 18 | a question that must not be read, or must not be answered: two problems in one sentence, an uncovered surface, a false physics || `passthrough` | 4 | the question is already a sentence of the physics language, so nothing is translated |The `expect` object, field by field:| field | rows | what it pins ||---|---|---|| `state` | 64 | the reading outcome: 45 `AGREED`, 11 `NOT COVERED`, 4 `PASSTHROUGH`, 3 `SINGLE`, 1 `AMBIGUOUS` || `sentence` | 44 | the physics sentence both readers are expected to write || `answer_contains` | 44 | a string the answer of the physics stratum has to contain || `min_assurance` | 41 | the assurance floor of the row (all 41 are 2, the ceiling of this layer) || `max_assurance` | 23 | the assurance ceiling: 0 on the 20 rows that must not answer, 1 on the 3 single-witness rows || `no_answer` | 20 | the row must come back with no answer at all || `referee_clean` | 64 | no envelope claim of the session may fall to the referee of its node |The 20 rows with no `sentence` are the 18 `negative` rows plus `it-06` and `ar-07`: eleven of the`negative` rows are not read at all, `it-09` announces two problems in one sentence and is refused, andseven are read and then refused by the physics stratum -- with `it-06` that makes eight read-and-refusedrows, at assurance 0 and with no answer. The two readers agree exactly on each of them. The 3single-witness rows are `it-03`, `zh-03` and `hi-07`, and they answer at assurance 1 because only onereader reached the sentence and that reader kept every number.## 12. Loading it```pythonfrom datasets import load_datasetcorpus = load_dataset("tailot/physics-stratum", "corpus", split="train")print(len(corpus)) # 64print(corpus[0]["question"]) # converti 3 chilometri in metriprint(corpus[0]["expect"]["sentence"]) # convert 3 km to m```The loader is metadata only, and no test of this bundle needs it: every row can be read with `json.loads`on one line of `problems/corpus.jsonl`, as `lingologos_physstratum/corpus.py` does. Every row agrees withwhat this folder produces: `python tools/ask.py --corpus problems/corpus.jsonl` runs every questionthrough the eight nodes and grades it against `expect`, and all 64 of 64 rows agree, in 249 seconds on themachine that built this snapshot. `python tools/coverage_report.py --physics --out results/coverage.json`gives a reading report on each row without a verdict; the verdicts are in `results/coverage.json`, thefaults in `results/ablation.json`.## 13. RightsThe same rights as the rest of the LingoLOGOS project, of which this folder is one published bundle. Thequestions are sentences written for this bundle, not text taken from anywhere; they ask about kilometres,hours, force, energy and the period of a mass on a spring. The Hindi and Arabic lexicons, like the otherfour, were written for this bundle inside the repository, and a reader of either is the right person tocheck them before this bundle is used for anything other than a measurement.## 14. Citation```bibtex@misc{lingologos_physics_stratum,title = {LingoLOGOS physics-stratum: a question in six written varieties, the answer of the physics stratum, and an assurance that includes the reading},author = {LingoLOGOS},year = {2026},howpublished = {the folder as it stands, 67 files, code and data together, with this card as the README},note = {A conversational layer over the physics topology of the same project: 64 questions, 271 tests. The assurance it shows is the minimum of the assurance of the physics stratum and the ceiling of the reading, so a reading that stands alone or loses a number lowers the confidence and can take the answer away. The bundle carries its fault catalogue and an ablation over every subset of its eight nodes, and reports the one blind spot that experiment found: a unit fault taken by both readers at once.}}```
255 unmodified lines256257258259260261262255 unmodified linestarget = staging / relativetarget.parent.mkdir(parents=True, exist_ok=True)if relative.as_posix() == "README.md":target.write_text(card, encoding="utf-8")else:shutil.copy2(path, target)return staging255 unmodified lines256257258259260261262255 unmodified linestarget = staging / relativetarget.parent.mkdir(parents=True, exist_ok=True)if relative.as_posix() == "README.md":target.write_text(card, encoding="utf-8", newline="\n")else:shutil.copy2(path, target)return staging
README.md+411-411
tools/publish_dataset.py+1-1