Use cases · Cognition · Mathematics
Taught mathematics
in four days. No calculator required.
Senua AI was never given a rule of arithmetic. It learned to add, subtract, multiply, divide, compose rotations, and solve equations by watching how numbers move. The same real-time learning engine that taught itself to speak was simply pointed at a new signal. By the fourth morning, complex numbers, eigenvalues, inequalities, calculus, and primality testing had followed as pure definitions over what was already learned. It now solves equations live over its API, computes exactly or honestly declines, and carries the core of it in 3.4 KB.
The problem
Every other AI fakes its maths or borrows it.
Large language models do learn arithmetic from data, but what they learn is approximate statistics. The learned circuits are inexact, and the model has no way to know when they are wrong, which is why it can confidently return wrong numbers. The architectural workarounds are to have the model write out its working and hope, or to bolt a calculator or code interpreter onto it. The answer then comes back right, but the exact computation was never learned. It was delegated to something hard-coded. Classical symbolic systems have the opposite flaw. Every rule is authored by a human, so the machine computes exactly but never learns.
What we wanted does not exist in the wild. We wanted a system where the computation itself is learned, acquired from raw data, executed exactly, verified by the same learned machinery, and honest about where its knowledge ends. No approximation, no delegation, no authored rules in the serving path.
That meant holding a hard line. No adder circuit, no operator table, no quadratic formula, no carry variable anywhere in the serving path. If the engine couldn’t acquire the mathematics from the signal itself, the way it acquired speech, the claim of a general learning substrate would not survive. So we made the claim falsifiable, and spent four days testing it.
How it happened
One pivot changed everything.
Act 1 · The prototype points the way
The first maths facet was a deliberate prototype. A parser read mathematical notation, with hand-built rules behind it. This was MVP scaffolding, always going to be rebuilt, and its real job was to expose the shape of the problem. It did exactly that. Underneath the symbols, honest attempts to learn arithmetic stalled completely. The engine could see the numbers, but no understanding formed over them.
Act 2 · The pivot to the change in value
The breakthrough was to stop parsing symbology altogether. The digits, the operator glyphs, the equation on the page are the static surface mathematics casts, and nothing causal lives in them. The atom of mathematics is the simplest thing there is, the change in a value. Not the number 7, but the movement that produced it. Not the symbol for addition, but what addition does to a value. Pointed at the movement instead of the symbols, learning immediately took off.
Act 3 · Every equation maps back to it
The pivot is total. Every branch of mathematics reduces to three base movements of value, namely shifting, rotating, and scaling. Calculus is the change of the change. Algebra is the structure of composed changes. Complex numbers are rotation and scaling as one move. So one learning engine covers all of it with no per-branch machinery, and the notation becomes what it always was, a thin surface over the movements, learned from data like everything else.
The result
Thousands of held-out problems. Zero wrong answers.
Every capability below was gated on problems the engine had never seen, with the outcome pre-registered before the run. The failures are recorded alongside the passes.
Exact, or honestly silent
The engine computes exactly or declines to answer. It never guesses. Asked for the roots of an equation whose answer is irrational, it says so rather than approximating with false confidence. Across every validated gate in the arc, the only failure mode is an honest “I don’t know.” No hallucinated numbers, ever.
3.4 KB. Zero-second recall.
Four complete learned faculties for arithmetic, long-form composition, algebra, and quadratics persist in a 3.4 KB store. The first boot spends under two minutes learning from the raw corpora on a commodity CPU. Every boot after answers instantly from what it learned. Compare that with billions of parameters that still get long division wrong.
The rules were never written
The carry in addition, the borrow in subtraction, the discipline of long division, the fact that rotation order matters, algebra’s sense of when to stop. None of it was programmed. Each one emerged as learned structure, and each was proven load-bearing. Strip the learned state away and accuracy collapses from 200/200 to near zero.
The recorded arc
Four days. Every stage, measured.
Each stage below is a pre-registered gate on held-out problems, reproducible from committed code. The failures are here alongside the successes. The progress is measured, not asserted.
The prototype, scaffolding built to be replaced
A deliberate MVP. Parse the notation, route to hand-built transforms, check with an authored verifier. Created to guide ideation and pin down the thesis for the pure pathway. Its most valuable output was a negative result. Learning over static symbols went nowhere. The categories froze at six in, six out, no matter how much data flowed.
The pivot. The atom is the change in value
Stop parsing symbology. Mathematics is the movement of numbers, and every equation in every branch maps back to the simplest possible atom, the change in a value, through three base movements. Shift, rotate, scale. The claim was staked with pre-registered falsifiers. If learning fixpoints again, or any branch needs bespoke machinery, the thesis dies.
Learning climbs where it used to freeze
Pointed at the change instead of the value, the engine’s layered learning consolidates 3,730 raw patterns down to 7, and stops by itself exactly at the motion’s true complexity. The same climb repeats for rotation and for scaling. The tower it builds is, recognisably, differentiation. Each layer is the change of the change.
Generation is the descent, and calculus falls out
Run the learned structure forward and integrate the changes back, and the engine generates valid motion, choosing correctly at genuine forks in proportion to what it observed. Climbing the tower is differentiation. Descending it is integration. The two are verified as exact inverses. The fundamental theorem of calculus, as the two directions of one learning loop.
Addition with no adder inside
The engine watches additions happen column by column, the carry never named, and learns a machine that then performs additions it has never seen. 200/200 held-out, exact. There is no adder, no operator table, no carry variable in the serving path. The carry lives entirely in the learned states. Strip that memory away and the same machine scores 1/200. The learning is load-bearing, not decorative.
One learned machine, four operations, exact fractions
One learning pass over mixed traces yields one machine that computes addition, subtraction, multiplication and division, each 200/200 on unseen problems, every intermediate digit machine-computed. Fractions follow for free as exact pairs, including reduction to lowest terms. No floating point, no rounding error. The arithmetic is exact because it was learned exactly.
The honest failure. 49 abstentions, zero wrong answers
A multiplication battery was drawn from the wrong distribution. The engine abstained on 49 of 200 problems and got zero wrong. It knew exactly what it hadn’t learned. The fix was better training data, never a patch to the mechanism. This is the failure mode we ship. Where other systems hallucinate a number, Senua declines.
The engine on trial, and made better
One pre-registered gate would not pass, so instead of tuning it to green we measured why. The investigation found a real defect in the core learning engine’s candidate search, fixed it in a principled way, and A/B-validated the fix across every existing benchmark before it landed. The maths arc didn’t just use the engine. It hardened it.
Long arithmetic learns its own discipline
Long multiplication and long division need ordered steps and a decision to stop. Both were learned as a second layer over the first. In serving there is no loop bound and no step counter. The next step is whichever the learned structure supports, and the walk ends when that support runs out. 100/100 long multiplications, 100/100 long divisions, every step machine-decided.
Rotation in 3D. Order matters, and the engine learns that it does
Rotate a cube around X then Y and you get a different result than Y then X. The engine, shown only sequences of orientations, learns this non-commutativity as internal structure. 200/200 held-out rotation compositions land on the correct final orientation, with the order-sensitive pairs distinguished. A control that ignores order collapses to 10/200. Scaled to the finest exact rotation group there is, it holds at 200/200 again.
The machine shows its work
Because long arithmetic is a learned process, emitting the process is a worked solution. The engine writes out its long multiplications and divisions step by step, every line generated by the machine and independently verified true. 150/150 complete worked solutions. Not an explanation bolted on afterwards but the actual computation, shown.
Algebra. The equation is a movement too
Collect terms, subtract, divide through. Each algebraic step is a movement on the equation. Learned as a process, the engine solves unseen linear equations 200/200, choosing the strategy, the order, and the moment to stop. The revealing control runs without the learned state. It still picks valid moves but solves 0/200, failing precisely at knowing when it is finished. Quadratics follow with no formula and no square root routine, 200/200 by a learned trial process.
Verification is computation. The prototype’s checker retires
To verify a root, substitute it back and let the learned machine evaluate both sides. The verdict is the machine’s own equality. 400/400 true roots verified, 800/800 deliberately planted wrong roots rejected, zero false confirmations. The prototype’s authored checker steps down to the role it was always destined for, a test-side referee, out of the product entirely.
Live. Solve an equation over the wire
The learned faculties went into the serving engine, first in line. Send
2x + 3 = x + 10 to the API and the answer comes back, x = 7, computed
and verified by the learned machines. Quadratics, signed numbers, fractions in the roots. Ask in
words, “twelve times seven”, and the vocabulary, itself learned from data, carries the
meaning to the same machines. 12 × 7 = 84. Ask for the roots of
x² − 2 = 0 and it honestly declines. The answer is irrational, and this
engine does not approximate with false confidence.
The completion layer. Every branch falls in one morning
The thesis said every branch of mathematics is a layer over the one atom, so with the core machines in place the rest should cost only definitions. It did. In about ninety minutes came complex numbers (i² = −1, computed), 2×2 matrices with eigenvalues found by the existing quadratic faculty, inequalities (the comparison is the machine’s own subtraction decision), integer nth roots (the cube root of 10 honestly declined), and polynomial calculus with an exact derivative and integral round-trip. No new machinery for any of them.
Width reads itself, and number theory arrives
Two results worth pausing on. First, how many bits the engine can handle stopped being a configured number. It is now a property the machine reads from its own learned structure, so moving from 24-bit to 32-bit arithmetic changed zero lines of serving code, only training data. Second, factoring and primality testing arrived as a trial loop in which every division remainder and every stopping comparison is a bit the learned machine emits, and it certified the Mersenne number 131,071 (2¹⁷ − 1) prime, one machine-emitted decision at a time.
3.4 KB of mathematics, and the prototype retires on schedule
Everything the engine learned for arithmetic, long-form composition, algebra, and quadratics persists in a 3.4 KB store. The first boot spends under two minutes learning on a commodity CPU. Every boot after answers instantly. The prototype’s router, rules, and rewriters are deleted, replaced by the pathway they were built to find. The maths facet is now pure. Learned end to end, exact in serving, honest at its limits.
Why it matters
An AI whose arithmetic you can trust.
Hallucinated numbers are not a cosmetic flaw. A model that returns a confident wrong figure in a financial summary, a dosage calculation, or an engineering estimate is worse than no model at all, and post-hoc guardrails cannot fix what the architecture gets wrong. A language model approximates its arithmetic and has no way to know when the approximation fails.
Senua’s mathematics is the opposite by construction. Every answer is produced by a machine that learned the operation and executes it exactly, every result is verified by substitution through the same machine, and anything outside what was genuinely learned is declined out loud. The failure modes are transparent. Right, or honest. That property was not added for mathematics. It is how the substrate answers everything, now demonstrated in the one domain where wrong answers are indisputable.
And the economics compound. Four mathematical faculties fit in 3.4 KB and recall instantly on hardware you already own, the same node that hears, speaks, watches telemetry, and flies missions. No GPU was involved at any point in the four days.
Ecosystem integration
Mathematics is now part of every Senua AI surface.
Not a plugin calling out to a solver. A learned faculty inside the engine, reachable from every surface the engine serves.
Web API
A dedicated maths route accepts an equation and returns the solved, verified result. Any application in the Senua ecosystem can hand an equation to the node and get an exact answer or an honest abstention, with nothing leaving the device.
CLI
The command-line client exposes the same faculty directly. Type an equation at the terminal and get the machine-computed solution back. The same capability, from the shell, with no additional tooling.
Chat
Arithmetic in ordinary conversation is computed, not pattern-matched. Ask “12 × 7” or “twelve times seven” in a chat session and the learned machines produce the answer. Word meanings come from a learned vocabulary, so coverage grows with data, not code.
What’s next
The mathematics is complete. Now comes code.
The claim that every branch maps back to one atom has now been cashed in full. Arithmetic in all four operations, signed, rational, and wide. Equations linear and quadratic, with inequalities. Complex numbers, matrices, and eigenvalues. Polynomial calculus. Number theory through factoring and primality. All of it serves through learned machines with honest abstention, all of it persists, and all of it is reachable over the API, the CLI, and chat. What remains is polish and data campaigns, wider number formats, richer geometry corpora, surface plotting. None of it is new machinery, and none of it blocks what comes next.
And the arc points somewhere specific. The same movement atom that carried mathematics has already been shown to carry program state. Code is movement too. The completed mathematics faculty this story describes is the foundation the Senua coder builds on, and the next story in this series.
One mind. Now it computes.
The same learning substrate that taught itself to speak has now taught itself mathematics. Exactly, verifiably, on the hardware you already own, with honesty as the only failure mode.