Datasets:
expect string | gold unknown | id string | kind string | text string |
|---|---|---|---|---|
VERIFIED | {
"value": "5/6"
} | ev01 | evaluate | evaluate 1/2 + 1/3 |
VERIFIED | {
"value": "100"
} | ev02 | evaluate | evaluate (2^10 - 24)/10 |
VERIFIED | {
"value": "-4"
} | ev03 | evaluate | evaluate -2^2 |
VERIFIED | {
"value": "512"
} | ev04 | evaluate | evaluate 2^3^2 |
VERIFIED | {
"value": "9/8"
} | ev05 | evaluate | evaluate 0.25 * 4 + 1/8 |
VERIFIED | {
"value": "-2"
} | ev06 | evaluate | evaluate (3 - 5)^3 / 4 |
VERIFIED | {
"value": "-14/3"
} | ev07 | evaluate | evaluate 7/3 - 7/3 * 3 |
VERIFIED | {
"value": "111111111"
} | ev08 | evaluate | evaluate 12345679 * 9 |
VERIFIED | {
"verdict": "proved"
} | pr01 | prove | prove x^2 + 1 > 0 |
VERIFIED | {
"verdict": "proved"
} | pr02 | prove | prove x^2 - 2*x + 1 >= 0 |
VERIFIED | {
"verdict": "proved"
} | pr03 | prove | prove x > 0 => x^2 > 0 |
VERIFIED | {
"verdict": "proved"
} | pr04 | prove | prove (x - 1)^2 >= 0 |
VERIFIED | {
"verdict": "proved"
} | pr05 | prove | prove x^4 - 4*x^3 + 6*x^2 - 4*x + 1 >= 0 |
VERIFIED | {
"verdict": "proved"
} | pr06 | prove | prove x^2 >= 0 and x^4 >= 0 |
VERIFIED | {
"verdict": "proved"
} | pr07 | prove | prove x^3 >= x^2 => x >= 1 or x = 0 |
VERIFIED | {
"verdict": "disproved"
} | pr08 | prove | prove x^2 > 0 |
VERIFIED | {
"verdict": "disproved"
} | pr09 | prove | prove x^2 - 2 != 0 |
VERIFIED | {
"verdict": "disproved"
} | pr10 | prove | prove x^3 >= 0 |
VERIFIED | {
"verdict": "disproved"
} | pr11 | prove | prove x^2 >= x |
VERIFIED | {
"verdict": "disproved"
} | pr12 | prove | prove x > 1 => x^2 > 1.5 |
VERIFIED | {
"verdict": "proved"
} | pr13 | prove | prove 2^10 = 1024 |
VERIFIED | {
"verdict": "proved"
} | pr14 | prove | prove 1/3 + 1/6 = 1/2 |
SINGLE_PROVER | {
"verdict": "proved"
} | pm01 | prove | prove x^2 + y^2 >= 2*x*y |
VERIFIED | {
"verdict": "disproved"
} | pm02 | prove | prove x^2 + y^2 > 2*x*y |
SINGLE_PROVER | {
"verdict": "proved"
} | pm03 | prove | prove (x + y)^2 >= 4*x*y |
SINGLE_PROVER | {
"verdict": "proved"
} | pm04 | prove | prove x*y <= (x^2 + y^2)/2 |
SINGLE_PROVER | {
"verdict": "proved"
} | pm05 | prove | prove x > 0 and y > 0 => x*y > 0 |
VERIFIED | {
"verdict": "disproved"
} | pm06 | prove | prove x + y > x |
SINGLE_PROVER | {
"verdict": "proved"
} | pq01 | prove | prove forall x in R. x^2 >= 0 |
SINGLE_PROVER | {
"verdict": "proved"
} | pq02 | prove | prove forall x. exists y. y > x |
SINGLE_PROVER | {
"verdict": "proved"
} | pq03 | prove | prove exists x. x^2 = 2 |
SINGLE_PROVER | {
"verdict": "disproved"
} | pq04 | prove | prove forall x. x^2 > 0 |
SINGLE_PROVER | {
"verdict": "disproved"
} | pq05 | prove | prove exists x. x^2 + 1 = 0 |
VERIFIED | {
"runs": [
[
2,
true,
2,
true
],
[
3,
true,
3,
true
]
]
} | so01 | solve | solve x^2 - 5*x + 6 = 0 for x |
VERIFIED | {
"runs": [
[
-1.4142135624,
true,
1.4142135624,
true
]
]
} | so02 | solve | solve x^2 - 2 <= 0 for x |
VERIFIED | {
"runs": [
[
null,
false,
1,
false
],
[
1,
false,
null,
false
]
]
} | so03 | solve | solve (x-1)^2 > 0 for x |
VERIFIED | {
"runs": [
[
-1,
true,
0,
true
],
[
1,
true,
null,
false
]
]
} | so04 | solve | solve x^3 - x >= 0 for x |
VERIFIED | {
"runs": []
} | so05 | solve | solve x^2 + 1 = 0 for x |
VERIFIED | {
"runs": [
[
null,
false,
null,
false
]
]
} | so06 | solve | solve x^2 + 1 > 0 for x |
VERIFIED | {
"runs": [
[
0,
false,
1,
false
],
[
3,
true,
3,
true
]
]
} | so07 | solve | solve 0 < x < 1 or x = 3 for x |
VERIFIED | {
"runs": [
[
-3,
false,
-1,
false
],
[
1,
false,
3,
false
]
]
} | so08 | solve | solve x^4 - 10*x^2 + 9 < 0 for x |
VERIFIED | {
"runs": [
[
-1.4142135624,
true,
-1.4142135624,
true
],
[
1.4142135624,
true,
1.4142135624,
true
],
[
1.4422495703,
true,
1.4422495703,
true
]
]
} | so09 | solve | solve x^2 - 2 = 0 or x^3 - 3 = 0 for x |
VERIFIED | {
"runs": [
[
-1.3887919844,
true,
-1.3887919844,
true
],
[
0.3347341419,
true,
0.3347341419,
true
],
[
1.2146480427,
true,
1.2146480427,
true
]
]
} | so10 | solve | solve x^5 - 3*x + 1 = 0 for x |
VERIFIED | {
"runs": [
[
-1.8793852416,
false,
0.3472963553,
false
],
[
1.5320888862,
false,
null,
false
]
]
} | so11 | solve | solve x^3 - 3*x + 1 > 0 for x |
VERIFIED | {
"runs": [
[
-2,
true,
2,
true
]
]
} | so12 | solve | solve not (x^2 > 4) for x |
VERIFIED | {
"runs": [
[
null,
false,
0,
true
],
[
2,
false,
null,
false
]
]
} | so13 | solve | solve x > 0 => x^2 > 4 for x |
VERIFIED | {
"runs": [
[
1,
true,
1,
true
]
]
} | so14 | solve | solve (x-1)^2 = 0 for x |
VERIFIED | {
"runs": [
[
0,
true,
0,
true
]
]
} | so15 | solve | solve x^2 <= 0 for x |
VERIFIED | {
"runs": []
} | so16 | solve | solve x = 1 and x = 2 for x |
VERIFIED | {
"runs": [
[
1.5,
true,
null,
false
]
]
} | so17 | solve | solve 2*x - 3 >= 0 for x |
VERIFIED | {
"runs": [
[
2,
true,
2,
true
]
]
} | so18 | solve | solve x^3 = 8 for x |
VERIFIED | {
"runs": [
[
-1,
true,
-1,
true
],
[
1,
true,
1,
true
]
]
} | so19 | solve | solve x^4 = 1 for x |
VERIFIED | {
"runs": [
[
-2,
true,
-1,
true
],
[
1,
true,
2,
true
]
]
} | so20 | solve | solve (x^2 - 1)*(x^2 - 4) <= 0 for x |
VERIFIED | {
"runs": [
[
null,
false,
1,
false
],
[
1,
false,
null,
false
]
]
} | so21 | solve | solve x^2 - 2*x + 1 != 0 for x |
VERIFIED | {
"runs": [
[
0,
false,
1.7320508076,
false
]
]
} | so22 | solve | solve x^2 - 3 < 0 and x > 0 for x |
UNKNOWN | {} | un01 | unsupported | evaluate 7/0 |
UNKNOWN | {} | un02 | unsupported | prove x/y > 0 |
UNKNOWN | {} | un03 | unsupported | solve x + y = 1 for x |
UNKNOWN | {} | un04 | unsupported | solve sin(x) = 0 for x |
UNKNOWN | {} | un05 | unsupported | prove 2^x > 0 |
UNKNOWN | {} | un06 | unsupported | hello world |
UNKNOWN | {} | un07 | unsupported | solve x^2 = 2 for x and |
UNKNOWN | {} | un08 | unsupported | evaluate 2 x |
SINGLE_PROVER | {
"verdict": "disproved"
} | pq06 | prove | prove forall x. exists y. y^2 = x |
SINGLE_PROVER | {
"verdict": "proved"
} | pq07 | prove | prove forall x. x > 0 => exists y. y^2 = x |
VERIFIED | {
"value": "8"
} | ev09 | evaluate | evaluate 2^(1+2) |
VERIFIED | {
"coeffs": [
"2",
"0",
"3"
]
} | cd01 | derivative | derivative x^3 + 2*x wrt x |
VERIFIED | {
"coeffs": [
"3",
"6",
"3"
]
} | cd02 | derivative | derivative (x+1)^3 |
VERIFIED | {
"coeffs": [
"0",
"-1",
"0",
"20"
]
} | cd03 | derivative | derivative 5*x^4 - x^2/2 + 7 |
VERIFIED | {
"coeffs": []
} | cd04 | derivative | derivative 7 |
VERIFIED | {
"coeffs": [
"1",
"-6",
"3"
]
} | cd05 | derivative | derivative (x^2+1)*(x-3) |
VERIFIED | {
"coeffs": [
"0",
"0",
"3"
]
} | cd06 | derivative | derivative y^3 wrt y |
VERIFIED | {
"coeffs": [
"0",
"-1",
"0",
"2"
]
} | ca01 | antiderivative | antiderivative 6*x^2 - 1 |
VERIFIED | {
"coeffs": [
"0",
"1",
"1",
"1"
]
} | ca02 | antiderivative | antiderivative 3*x^2 + 2*x + 1 |
VERIFIED | {
"coeffs": [
"0",
"0",
"1/4"
]
} | ca03 | antiderivative | antiderivative x/2 wrt x |
VERIFIED | {
"coeffs": [
"0",
"5"
]
} | ca04 | antiderivative | antiderivative 5 |
VERIFIED | {
"value": "1/3"
} | ci01 | integral | integral x^2 from 0 to 1 |
VERIFIED | {
"value": "-35/12"
} | ci02 | integral | integral (x-1)*(x+2) from -1 to 3/2 |
VERIFIED | {
"value": "0"
} | ci03 | integral | integral 3*x^2 - 1 from -1 to 1 |
VERIFIED | {
"value": "4"
} | ci04 | integral | integral x^3 from 0 to 2 |
VERIFIED | {
"value": "46/3"
} | ci05 | integral | integral 1/2*x^2 + x from 2 to 4 |
VERIFIED | {
"value": "16"
} | ci06 | integral | integral 4 from 1 to 5 |
VERIFIED | {
"status": "optimal",
"value": "12"
} | lp01 | optimize | maximize 3*x + 2*y subject to x + y <= 4 and x + 3*y <= 6 and x >= 0 and y >= 0 |
VERIFIED | {
"status": "optimal",
"value": "14/5"
} | lp02 | optimize | minimize x + y subject to x + 2*y >= 4 and 3*x + y >= 6 and x >= 0 and y >= 0 |
VERIFIED | {
"status": "optimal",
"value": "5"
} | lp03 | optimize | maximize x subject to x <= 5 and x >= 1 |
VERIFIED | {
"status": "unbounded"
} | lp04 | optimize | maximize x + y subject to x >= 0 and y >= 0 |
VERIFIED | {
"status": "infeasible"
} | lp05 | optimize | maximize x subject to x >= 3 and x <= 1 |
VERIFIED | {
"status": "optimal",
"value": "-2"
} | lp06 | optimize | minimize 2*x - y subject to x + y <= 10 and x - y >= -2 and x >= 0 and y >= 0 |
VERIFIED | {
"status": "optimal",
"value": "6"
} | lp07 | optimize | maximize x + 2*y subject to x + y = 3 and x >= 0 and y >= 0 |
VERIFIED | {
"status": "optimal",
"value": "-2"
} | lp08 | optimize | minimize x subject to x >= -2 and x <= 7 |
VERIFIED | {
"status": "optimal",
"value": "20"
} | lp09 | optimize | maximize 2*x + 3*y + z subject to x + y + z <= 10 and x <= 4 and y <= 3 and z <= 5 and x >= 0 and y >= 0 and z >= 0 |
VERIFIED | {
"status": "optimal",
"value": "11"
} | lp10 | optimize | maximize 2*x + 5 subject to x <= 3 and x >= 0 |
VERIFIED | {
"status": "unbounded"
} | lp11 | optimize | minimize x subject to y >= 0 and y <= 1 |
VERIFIED | {
"status": "optimal",
"value": "2"
} | lp12 | optimize | maximize x + y subject to x <= 1 and y <= 1 and x + y <= 2 and x >= 0 and y >= 0 |
VERIFIED | {
"status": "optimal",
"value": "3"
} | lp13 | optimize | minimize 3 subject to true |
VERIFIED | {
"value": "-2"
} | ld01 | det | det [[1, 2], [3, 4]] |
VERIFIED | {
"value": "0"
} | ld02 | det | det [[2,0,1],[1,3,2],[1,1,1]] |
VERIFIED | {
"value": "-3"
} | ld03 | det | det [[1,2,3],[4,5,6],[7,8,10]] |
VERIFIED | {
"value": "2"
} | ld04 | det | det [[2]] |
VERIFIED | {
"value": "0"
} | ld05 | det | det [[0.5, 1], [2, 4]] |
LingoLOGOS math topology
A seven agent topology that solves problems written in a small mathematical language and answers either with a verified result or with an explicit UNKNOWN. It never guesses.
python tools/solve.py "solve x^3 - x >= 0 for x"
Problem as understood : solve x^3 - x >= 0 for x
Status : VERIFIED (assurance level 3 of 3)
Answer : [-1, 0] U [1, +inf)
Orchestrator Z3 check : 7 of 7 envelopes confirmed
Only the standard library and z3-solver are required, and pytest for the tests; both are named in
requirements.txt. This dataset is that folder published as it stands, code and data together: a
self contained bundle of 63 files. Every command below is written from inside the folder and works
from there whether the folder stands alone or sits inside a LingoLOGOS checkout. Section 8 says how
to put it back into a checkout, section 10 how to read the corpus.
1. The language
| Family | Sentence | Answer |
|---|---|---|
| arithmetic | evaluate <term> (also with mod, div) |
exact rational or integer |
| real logic | prove <formula> (variables are real, forall x in R., exists x in R.) |
TRUE, or FALSE with a counterexample |
| real algebra | solve <formula> for x (univariate polynomial conditions) |
union of intervals and points |
| polynomial systems | solve <equations> for x, y, ... |
the real solutions: how many, which are rational |
| integers | prove <formula> over Z, solve <formula> for n over Z (linear, mod, div, k | t) |
verdict, or the solution set as members plus residue classes |
| linear algebra | det M, rank M, inverse M, nullspace M, linsolve M b, product A B, power M n with [[1, 2], [3, 4]] literals |
value, matrix, basis, or a solution with certificate |
| optimization | maximize <linear term> subject to <constraints>, minimize ... (constraints joined by and) |
optimum and point, infeasible or unbounded |
| calculus | derivative f [wrt x], antiderivative f [wrt x], integral f from a to b [wrt x] |
polynomial or exact value |
Terms use + - * / ^, decimals, mod, div; -x^2 is -(x^2) and ^ is right associative.
Formulas use = != < <= > >= |, chains such as 0 < x < 1, not and or => <=>, true, false.
Irrational endpoints are written root(P ; ~approx). Reserved words (not usable as variable names):
evaluate prove solve for forall exists in and or not true false derivative antiderivative integral from to wrt maximize minimize subject over mod div det rank inverse nullspace linsolve product power.
The kind of the sentence picks the code path: evaluate, real prove, univariate solve go
through the original agents in lgmath/agents.py, every other kind goes through a family module
(section 6). A family answer is a small dictionary with its own kind, so the checkers, the
renderer and the corpus reader all work on the same three verdicts.
Fragment. Everything outside it ends in UNKNOWN with a reason, never in a guess: exponents are
closed integers from 0 to 1000; real prove/solve divide only by non zero constants; univariate
solve has no quantifiers; integer atoms are linear (mod/div need a positive constant divisor);
matrices are at most 5 x 5 and powers at most 4 on 4 x 4; polynomial systems have 2 to 4 unknowns,
equations only; linear programs have at most 5 variables and 14 rows with non strict constraints;
calculus covers polynomials of one variable. There are no functions such as sin, no implicit
multiplication (2 x), no sets or sequences. The abstract syntax is also given in
nodes/*/grammar.gf; that file is a specification that has not been compiled with the GF
toolchain, and the reference parsers are Python.
2. The seven agents
| Node | Trust | Job | Engine |
|---|---|---|---|
formalizer_a |
trusted | reads the sentence, encodes it as SMT-LIB text | hand written recursive descent parser |
formalizer_b |
trusted | reads it again, proves the two readings equivalent | string splitting for logic, CPython ast for arithmetic, z3py emitter |
solver_a |
untrusted | candidate answer | driven by Z3 (see the table below) |
solver_b |
untrusted | candidate answer | exact: Fractions, Sturm sequences, Groebner bases, Fourier-Motzkin, window analysis; no Z3 |
verifier |
trusted | confirms or rejects each candidate | Z3, default configuration |
adversary |
trusted | tries to refute each candidate | independent exact audit plus Z3 on formalization B |
arbiter |
trusted | applies the decision rule, restates the problem, renders the answer | pure function decide |
The solvers are generate and verify components: an answer is accepted only after every checker that is in the dossier confirms it (section 3), so a wrong or inconclusive solver costs availability, not correctness. What each family uses:
| Family | solver_a (Z3 side) | solver_b (exact) | verifier proves | adversary audits |
|---|---|---|---|---|
real solve/prove |
Z3 decides truth on exact cells | Sturm cells / sampling | answer equivalent to the formula | cell comparison, sampling |
| polynomial systems | Z3 enumerates real solutions | Groebner basis + Hermite trace form counts real roots | enumeration with another configuration | recount, exact substitution |
| integers | Z3 point by point | window decision (exact for one unknown) | answer equivalent for all integers (LIA is decidable) | window recomputation |
| linear algebra | ground SMT expansions, models with blocking | Gauss-Jordan | minors, products, rank claims over the SMT entries | Laplace expansion, minors, multiplication |
| optimization | Z3 optimizer | Fourier-Motzkin with dual / Farkas / ray certificates | no better feasible point, infeasibility, unboundedness | certificate check with plain arithmetic |
| calculus | rule based differentiation | expand first; undetermined coefficients; Richardson extrapolation | F(x+h) - F(x) - h*G(x) = h^2 R(x,h) over all reals |
finite difference functional |
Wiring. topology.json is an ordered pipeline. In this orchestrator a sender receives the
latest output of its recipient, so each edge points at the previous agent (formalizer_b -> formalizer_a, ...), and the first agent reads the user problem from the arbiter seed.
terminationCondition is FIXED_PIPELINE on purpose: the built in UNSAT_BREAKER would stop the
session at the first UNSAT, but here UNSAT is the normal way to prove something. maxTurns is 7,
exactly one round. The orchestrator forwards only the payload, so the growing record (the dossier)
travels as JSON after a @@DOSSIER@@ marker in payload.naturalLanguage. Each node ontology fixes
(set-option :timeout 8000): without a timeout one hard nonlinear query blocks the session forever
(verified: a cubic Diophantine query never returned).
Referee. Every envelope carries an SMT query and the status its author claims. The orchestrator
runs it with Z3 as it does for any node, and tools/solve.py checks claimed against actual for all
seven. A disagreement turns the verdict into UNKNOWN. The driver also recomputes the arbiter's
decision from the transcript and keeps the weaker verdict if the two differ. When both solvers are
confirmed the exact solver's answer is shown, because it is reproducible (Z3 may pick other, equally
valid witnesses or bases in another process). tests/test_orchestrator_e2e.py runs ten problems,
one per family area, through seven node processes and compares status and printed answer with the
in-memory run; eleven tests, which run when the orchestrator package is installed and skip
otherwise (section 8).
3. What "verified" means (and what it does not)
| Status | Assurance | When |
|---|---|---|
VERIFIED |
3 | formalizations proven equivalent, and an exact (non Z3) check agrees with a Z3 check |
SINGLE_PROVER |
2 | everything is consistent but only Z3 decides |
UNKNOWN |
0 | any disagreement, timeout, crash, unsupported input or missing confirmation |
VERIFIED covers evaluation, univariate real prove/solve, calculus, linear algebra, linear
programming, zero dimensional polynomial systems, univariate integer problems, and any disproof with
an exactly checked counterexample. SINGLE_PROVER covers true real or integer statements with
several unknowns or quantifiers and polynomial systems that are not zero dimensional over the
complex numbers (for example x^2 + y^2 = 0).
"Infallible" cannot be promised literally. The guarantee is sound or abstain, relative to a trusted
base: Z3, CPython, the parsers' shared reading of the written grammar, the renderer and the decision
rule. Two things no number of agents removes: a misreading that both formalizers make in the same
way (measured below), and a bug in Z3 itself. The Problem as understood line exists so that the
user can confirm the formalization, which is the only check of the meaning of the question.
The decision rule, read on its own. decide (lgmath/agents.py) is a pure function of the
dossier, which is what lets the driver recompute it from the transcript. A solver's answer is kept
when every checker that is in the dossier confirms it and none of them rejects it: the verifier
says z3, the adversary says z3b or exact. A checker that is in the dossier but could not decide
- its entry for that solver is missing, malformed, or holds no usable judgement - blocks the
answer rather than being ignored: dropping that checker's silence would keep a refutation that the
checker never made and would raise the assurance on evidence that got weaker. A checker that is not
in the dossier at all (the role was switched off in the topology being measured) simply does not
count. A sampling match can refute an answer but never confirms one by itself, because matching on
sample points is the weakest of the judgements and
UNKNOWNis defined by a missing confirmation. Assurance 3 then needs the exact (non Z3) judgement, a Z3 judgement on the same answer, and the proof that the two readings are equivalent. Anything else that is not usable evidence - a confirmation that is not a boolean, an answer that cannot be read or rendered - degrades the verdict toUNKNOWNrather than raising, since the driver has to recompute the rule on a transcript it did not write.
tests/test_decide_rule.py builds 77,760 dossiers from the evidence space, transcribes this
paragraph independently and compares every outcome; it also checks that weakening the evidence never
raises assurance, and that the driver survives dossiers it cannot read. Two looser readings of the
same rule were measured rather than argued. On the 184 problems of the corpus all four readings
(this one, one that ignores a checker that could not decide, and the same two with the cross-checking
requirement dropped) give exactly the same verdicts: 145 VERIFIED, 18 SINGLE_PROVER, 21
UNKNOWN, so being strict costs no availability on this corpus. On the 77,760 dossiers of the
evidence space the relaxations were swept as switches, each one measured against the rule as written
(which sorts them into 70 VERIFIED, 644 SINGLE_PROVER, 77,046 UNKNOWN). Ignoring a checker that
could not decide moves 112 dossiers, and every one of them goes up the assurance scale: that reading
is exactly the one that raises assurance when evidence gets weaker. Discounting the adversary whenever
formalization B is missing moves 273 dossiers, 147 upwards and 126 downwards: it discards refutations,
and it costs availability as well. Dropping the requirement that the two readings be equivalent moves
70 dossiers, all upwards. None of the three is used; section 4 reports what the second one cost in one
experiment, 52 silent errors.
Reading the printed answer. The renderer is part of the trusted base, so its precision policy is
written down. A bare rational (2, 1/3, 10000000000001/10000000000000) is the exact value. A
root that is a finite decimal is printed exactly, without a tilde: approximating an exact value loses
information. Any other root is printed as root(P ; ~d) with P the square free product of atoms and
~d rounded to 12 significant digits; if two roots of one answer would print identically both are
reprinted with two more digits, up to 30, so two different roots never share a printed form.
tests/test_answer_rendering.py reads the printed text back with an independent reader, re-evaluates
the printed formula by hand at points outside the interval, and checks each printed decimal against
the equation it is claimed to solve, which turns a rendering defect into a failing test instead of a
wrong answer on the terminal.
4. How many agents are needed
Argument. Faults come from five places: reading the problem, solving it, checking the answer,
completeness, and reporting. Solving needs no replication for soundness because it is verified.
Reading and checking are trusted, so each needs two independent implementations to detect one fault
(f faults need f+1 versions to detect, 2f+1 to also mask). With f = 1 that is 2 formalizers + 2
checkers + 1 solver = 5 agents for soundness; a second solver and the arbiter bring it to 7,
which buy availability and a second implementation of the decision rule. A hardware mapped mesh
cannot exceed 15 nodes anyway (the topology control register keeps TOTAL_NODES in 4 bits).
Experiment (tools/ablation.py, results in results/ablation.json). The 163 supported corpus
problems (the 21 unsupported rows are left out) were run in memory with the same agent code,
injecting faults from a catalogue: parser misreadings, wrong or incomplete solver answers in every
family, rubber stamping checkers, a lying arbiter. Silent error means a VERIFIED or
SINGLE_PROVER verdict that differs from the gold answer. A run is activated when the injected
fault really changed something.
| Agents | Configuration | Single fault runs activated | Silent errors | Abstained | Correct anyway |
|---|---|---|---|---|---|
| 3 | formalizer_a, solver_a, verifier | 592 | 52 | 342 | 198 |
| 4 | + formalizer_b | 680 | 0 | 482 | 198 |
| 5 | + adversary | 843 | 0 | 489 | 354 |
| 6 | + solver_b | 1161 | 0 | 173 | 988 |
| 7 | + arbiter (full) | 1324 | 0 | 173 | 1151 |
Trusting solver_a with no checks at all would have been wrong in 375 of the 1324 activated runs.
With no faults every configuration answers all 163 problems correctly; from 5 agents on, 145 are
VERIFIED and 18 SINGLE_PROVER (with 3 or 4 agents all 163 are SINGLE_PROVER, there is no
independent exact engine yet). Removing the verifier keeps the 145 VERIFIED because the adversary
still supplies the exact judgement; removing the adversary drops all 163 to SINGLE_PROVER. Removing
either formalizer makes every activated run abstain, and removing solver_a leaves 145 correct
answers and 18 abstentions.
Tolerance model: any solver faults plus at most one fault in a trusted role.
| Configuration | Experiments | Activated runs | Silent errors |
|---|---|---|---|
| 7 agents | 44 | 4240 | 0 |
| 5 agents | 40 | 3588 | 0 |
| 7 minus adversary | 4 | 652 | 94 |
| 7 minus verifier | 4 | 652 | 94 |
| 7 minus formalizer_b | 4 | 88 | 0 |
Each duplicated trusted role is therefore necessary: with one checker gone, the catalogue's pair of
identical solver faults plus a rubber stamp on the remaining checker produced 91 silent errors in one
experiment alone. Removing a solver or the arbiter never produced a silent error. Beyond the model: a
misreading shared by both formalizers produced 52 silent errors in 88 activated runs (the known
limit); identical faults in both solvers produced 0 in 341 (the checkers catch them); a faulty solver
with both checkers compromised produced 23 in 815, all on problems where the second solver cannot
answer. With formalizer_b missing the adversary loses the reading it cross checks, and the rule of
section 3 refuses to trust the remaining evidence: all 88 activated runs abstain, and the row has 0
silent errors. The contribution that added the families measured 52 silent errors in this same
experiment, because its rule stopped reading the adversary when formalization B was absent - the
second relaxation of section 3, not used here. These are measurements over this corpus and this
catalogue, not a proof.
Findings during development (measured by the contribution that added the families). Its first run
on the extended corpus showed 2 silent errors at 5 agents. They traced back to two real defects, both
fixed and covered by regression tests here: a rank claim above the smaller matrix dimension produced an
invalid SMT term, so the verifier stayed silent; and the decision rule accepted an answer when one
checker was inconclusive and the other was wrong. The rule of section 3 is the answer to the second
one, and tests/test_decide_rule.py pins it.
5. Running
python tools/solve.py "prove x^2 + y^2 >= 2*x*y" # real orchestrator, 7 node processes
python tools/solve.py --json "det [[1,2],[3,4]]" # full transcript
python tools/solve.py --corpus problems/corpus.jsonl --limit 10
python -m pytest tests -q # 731 tests, about 50 s
python tools/ablation.py --quick # redundancy experiment (minutes)
Measured on this bundle: 731 tests pass in 54.4 s inside a LingoLOGOS checkout (720 passed and 1
skipped in 33.2 s when the folder stands alone, section 8) and in 43.4 s when the suite is started
from the checkout root as python -m pytest datasets/math/tests -q. The driver and the tests locate
the orchestrator package by walking up the folder tree, so the bundle works from both placements. Three family sentences (maximize 3*x + 2*y subject to x + y <= 4 and x - y >= 0 and x >= 0 and y >= 0, det [[2,1],[1,3]], solve n mod 3 = 1 and n > 2 for n over Z) were re-run by hand through
the seven node processes on the merged bundle and came back VERIFIED with all seven envelopes
confirmed by the referee; the end to end tests cover calculus, linsolve, a two unknown system and the
real solver over the same transport.
tools/solve.py finds src/ in an ancestor when the folder sits inside a LingoLOGOS checkout;
otherwise install the orchestrator package of the project. It generates a launcher with sys.executable (a .sh file, or a
.cmd file on Windows; the .cmd launcher is what the eleven end to end tests used just here).
topology.json can also be run directly from inside this folder with
lingologos-orchestrator -c topology.json -d nodes, using the POSIX executable
agents/math_agent (on Windows tools/solve.py writes the matching .cmd launcher next to it).
tools/ablation.py regenerates results/ablation.json. --quick restricts the run to the five
main configurations; --configs, --multi and --tolerance pick one part of the experiment, and
--merge part1.json part2.json ... stitches the parts back into one file (the tables above come from
seven such parts, about fifteen minutes of compute on 24 cores; --out names the output).
6. Layout
topology.json ordered seven node pipeline
nodes/<id>/ grammar.gf, ontology.smt2, seed_payload.json for each agent (data)
problems/corpus.jsonl 184 problems with gold answers (hand written, numpy, or brute force; never the code under test)
lgmath/ library: parsers, exact arithmetic, SMT helpers, agents, decision rule, fault injection
agents/math_agent node executable, role chosen by --role
tools/solve.py driver around the real orchestrator; tools/ablation.py redundancy experiments
tests/ 731 tests: parser agreement, algorithms against brute force, corpus, faults, end to end,
printed answers read back, decision rule over 77760 dossiers, zero exponent
results/ablation.json measured redundancy results quoted above
lgmath/ holds 22 modules. The families live in lgmath/fam_*.py and implement one small interface
declared in lgmath/families.py: check_fragment, two formalization views, two solvers, two
confirmations, render, same, gold_equal and perturb. The registry loads a module only when a
sentence of its kind appears, family_of(kind) answers the question the agents ask at dispatch time,
and all_kinds() lists the 14 kinds that are not on the legacy path (derivative, antiderivative,
integral, optimize, det, rank, inverse, nullspace, linsolve, product, power,
provez, solvez, solvesys). lgmath/famsteps.py holds the agent steps shared by all of them, so
adding a family does not touch the agents. The algebraic tools are lgmath/mpoly.py (sparse
polynomials, Groebner), lgmath/linalg.py, lgmath/lp.py.
7. Verification of the pieces
During development of the families, and reported here as measured by that contribution: both parsers agreed on 15000 random sentences of the extended language and the printer round tripped through both; the Hermite real root count equalled a Z3 enumeration on 118 random polynomial systems; the Fourier-Motzkin certificates were valid on 1500 random linear programs and matched vertex enumeration. The shipped tests repeat these checks on smaller samples, and add: determinants agree across Gauss, Laplace and Leibniz; the integer window method agrees with brute force on random formulas and is proven equivalent by Z3; every perturbed answer of the corpus is rejected by at least one checker.
The three files that came from the audit of the previous bundle are permanent:
tests/test_decide_rule.py (77,760 dossiers against an independent transcription of section 3),
tests/test_answer_rendering.py (printed text read back by a separate reader, over 34,713 sampled
points) and tests/test_zero_exponent.py. Three tests were red in the family contribution before it was merged into this bundle, and are green
here: one on the exact cell decomposition in lgmath/exact.py, one on a calculus
answer, one on a Groebner basis over x^1*y^0. The merge kept the exact.py this bundle already
had and the convention that x^0 is the constant 1 in both SMT emitters, and that is what makes them
pass (section 9).
8. Putting this dataset inside a LingoLOGOS checkout
This dataset is the math/ folder of the LingoLOGOS project, published as it stands: 63 files, 184
problems, the seven node definitions, the fourteen sentence families and the decision rule of
section 3. This card is the folder's own README with the same section numbers, so the reference in
tests/test_decide_rule.py to section 3 of the README resolves either way; sections 10 to 12 are
added for readers who met the bundle here rather than in the repository.
Nothing in the bundle needs the project: lgmath/, tools/, problems/ and tests/ run with
nothing but z3-solver. Place the contents at math/ or at datasets/math/ in a checkout and two
things change: tools/solve.py and tests/test_orchestrator_e2e.py find the orchestrator package by
walking up the folder tree, so the eleven end to end tests run there and skip here, and commands
started from the checkout root gain a math/ or datasets/math/ prefix. The suite is 731 tests in a
checkout, 720 passed and 1 skipped in 33.2 s here.
Standalone, without the orchestrator package, the eleven end to end tests skip. The rest of the suite does not depend on the repository: measured on a copy of this folder placed outside the repository, the suite gives 720 passed and 1 skipped, against the 731 passed measured inside this repository.
The data are nodes/, problems/ and topology.json; the code are lgmath/, agents/ and
tools/. The federated (git) transport of the orchestrator builds every node with the fixed
executable lllayer (schema.py, to_legacy_topology), so a git delivered dataset cannot ship its
own agent programs through that path. Either keep this folder together as a classic topology bundle,
as it is now, or extend the orchestrator so that federated nodes can declare an executable.
9. Known limits
- Not covered: functions beyond polynomials (
sin,exp,log, roots, absolute value), limits and series, number theory beyond linear integer arithmetic (primes, Diophantine equations, nonlinear integer problems), probability, geometry, complex numbers, matrices beyond 5 x 5, word problems and general theorem proving. - Polynomial systems with infinitely many real solutions end in UNKNOWN; so do systems with more than
16 real solutions. Quantified
proveover several unknowns staysSINGLE_PROVERat best. - The two formalizers share a specification written by the same author; a shared misreading is invisible (measured: 52 silent errors in 88 activated runs when both make the same one).
lgmath/answers.pyrendering andlgmath/agents.py:decideare part of the trusted base: a bug in them is invisible to the topology, because the driver recomputes the same function. They used to be unchecked. A throwaway audit (a script outside this tree) over 622,080 dossiers found the rule of that time faithful to its specification (0 disagreements, and no case where weakening the evidence raised assurance) but fragile: a dossier missing a part raised and killed the driver, and a confirmation that was merely truthy ("exact": "yes please") was accepted as the exact one and bought assurance 3. The renderer printed correct sets with lost precision: over 152 random problems and 34,713 sampled points there was no semantic error, but 4 answers described the wrong set at the printed precision, 10 endpoints were ambiguous and 4 printed decimals did not solve the equation they came from. Both are fixed, and the throwaway audit is now replaced by permanent tests that a reader can rerun (section 7). What no test removes: a decision rule that is consistently wrong, in the rule and in the driver.- A second fragility was found while merging the families: an auditor that is present but silent could
be ignored, which would have hidden refutations (section 3 measures the three candidate readings).
The rule now blocks on it, and
tests/test_decide_rule.pypins that behaviour. x^0is read as the constant 1, so0^0is 1 andsolve x^0 = 1 for xis(-inf, +inf). That matches howlgmath/exact.pyevaluates and expands powers; Z3 5.3.3 leaves(^ x 0.0)unconstrained atx = 0, and that gap was one of the three tests that were red when the families were merged (section 7), until both SMT emitters started printing the constant 1. If your convention is that0^0is undefined, the answer above is wrong, and nothing in the topology will say so.- A root that is a root of a product of atoms is printed as
root(P ; ~d)withPthe square free product; the precision policy of~dand the rule that two different roots never share a printed form are in section 3.
10. The corpus file
problems/corpus.jsonl holds 184 problems, one JSON object per line, written by hand (the irrational
endpoints in some gold answers come from a numeric root finder, while the bundle itself computes
exactly). It is a benchmark for the topology: there is no prompt, no response pair and nothing to fine
tune on.
| Field | Type | Meaning |
|---|---|---|
id |
string | unique; the prefix names the area (table below) |
kind |
string | one of 18 kinds: evaluate, prove, solve, unsupported, and the 14 families of section 1 |
text |
string | the problem in the language of section 1, between 9 and 115 characters |
expect |
string | the status the topology is expected to return: VERIFIED (145), SINGLE_PROVER (18), UNKNOWN (21) |
gold |
object | the expected answer, one shape per kind (below); {} for the 21 unsupported rows |
| Id prefix | Kind | Rows | Id prefix | Kind | Rows |
|---|---|---|---|---|---|
ev, ie |
evaluate |
9, 5 | ld |
det |
7 |
pr, pm, pq |
prove |
14, 6, 7 | lr |
rank |
5 |
so |
solve |
22 | li |
inverse |
4 |
ps |
solvesys |
12 | ln |
nullspace |
4 |
iz |
solvez |
13 | ls |
linsolve |
6 |
iq |
provez |
13 | lp, lp_ |
optimize, product |
13, 3 |
cd |
derivative |
6 | lw |
power |
4 |
ci |
integral |
6 | ca |
antiderivative |
4 |
un |
unsupported |
21 |
The gold shapes, one per kind. Numbers that must stay exact are strings holding a rational, never
floats.
| Kind | gold |
|---|---|
evaluate, det, rank, integral |
{"value": "5/6"} |
prove, provez |
{"verdict": "proved"} or {"verdict": "disproved"}. A disproved statement also gets a counterexample at run time; the corpus records only the verdict |
solve |
{"runs": [[lo, lo_closed, hi, hi_closed], ...]}: the solution set as disjoint intervals and points in increasing order, null on an unbounded side, a closed end is true. Endpoints are exact integers where the answer is exact and decimal floats where the true endpoint is irrational, accurate to about 15 digits |
derivative, antiderivative |
{"coeffs": ["3", "0", "2"]}, coefficients in increasing degree order, so 2*x^2 + 3 is ["3", "0", "2"] |
optimize |
{"status": "optimal", "value": "12"}, or {"status": "unbounded"} / {"status": "infeasible"} with no value |
inverse, product, power |
{"rows": [["1/2", "0"], ["0", "2"]]}, a matrix of exact rationals |
nullspace |
{"dim": 1, "vectors": [["-2", "1"]]}: the dimension and a basis |
linsolve |
{"kind": "unique", "x": [...]}, {"kind": "none", "y": [...]} where y is a certificate that the system is inconsistent, or {"kind": "affine", "x0": [...], "basis": [...]} for a solution set that is an affine image |
solvesys |
{"count": 2, "irrational": 2, "rational": [["1", "2"], ["2", "1"]]}: the number of real solutions, how many of them are not rational points, and the rational ones listed. The twelve rows here have at most four solutions |
solvez |
{"limit": 50, "in": [...], "neg": {"L": 1, "r": []}, "pos": {"L": 1, "r": []}}: the solutions inside -limit to limit, and the description of the whole solution set on the negative and on the non negative integers as residue classes modulo L (residues r); {"L": 1, "r": []} means that side is empty |
Load it with the datasets library, or with one json.loads per line, which needs no dependency:
from datasets import load_dataset
corpus = load_dataset("tailot/lingologos-math", "corpus", split="train")
print(corpus[0])
The same file is what tools/solve.py --corpus problems/corpus.jsonl walks over, and
lgmath/corpus.py plus tests/test_corpus.py read it to compare the topology against the gold.
tests/test_corpus.py also checks the file itself: unique ids, a known kind, a gold of the shape
that kind expects, and an expect that the topology really reproduces (section 5).
11. Rights
No license is declared for this dataset, its corpus, or its code: reuse is not granted by this page.
The corpus gold answers, the grammar specification, the node data and the Python sources were written
by hand as part of the LingoLOGOS project. Ask before redistributing or building on them, and expect
the answer to be yes for academic work with attribution. Z3 is a separate product with its own license
and is not redistributed here; z3-solver is only named as a dependency in requirements.txt.
12. Citation
@misc{lingologos_math,
title = {LingoLOGOS math topology: seven agents, a verified answer or an explicit UNKNOWN},
author = {LingoLOGOS project},
year = {2026},
url = {https://huggingface.co/datasets/tailot/lingologos-math},
note = {bundle of the math folder of the LingoLOGOS repository: corpus of 184 problems, seven
node definitions, fourteen sentence families, decision rule, exact arithmetic library,
fault catalogue, 731 tests}
}
- Downloads last month
- 22