Exact symbolic calculus
Compose, differentiate, integrate, and simplify symbolic specs.
Specs are symbolic functions
RiX symbolic work is exact and structural. It does not choose a floating-point or real-number approximation. The shortest spec names one symbolic input:
{#x} is the identity symbol. {#t# t^2 - 4 } has an implied output, while the longer form explicitly names output p. RiX normally displays the compact source-like form. Use .InspectSpec when you want its structural fields.
Systems are inert symbolic data
The same braces can retain definitions and constraints without selecting a solver. name = expression is a symbolic definition inside the spec, not a runtime assignment. Comparisons are stored as constraints.
The header says which symbols the author regards as inputs and outputs. .SpecRoles also returns the complete symbols list and any unassigned auxiliaries. A consumer that ignores direction uses all symbols. A directional plugin may override roles for one operation; if it receives no override, it should use the attached header:
RiX has not solved either system. A solver, optimizer, geometry package, or other plugin chooses direction, algorithms, precision, branch policy, and evidence. This keeps the notation reusable across consumers with different tradeoffs.
Substitute and compose
Calling a spec performs positional symbolic substitution and returns another spec. It does not numerically evaluate the expression.
This makes renaming explicit: G({#x}) replaces t with x. An expression spec composes expressions, and an exact number produces a zero-input constant spec. Compile a single-output spec with .Poly when it is time to evaluate.
Arithmetic keeps names
Arithmetic combines inputs by symbolic name. Different names create a multi-input result; the same name refers to the same input. Operations preserve the written form and do not simplify automatically.
Pure exact-arithmetic functions receive attached specs automatically. Arithmetic between two such functions therefore produces another spec-backed callable.
Differentiate and integrate
Use an identity spec as the variable selector. Named-output specs retain their header and output name through a transform.
.Deriv and .Integrate also accept spec-backed functions and return executable functions. The quote forms connect to the same exact engine:
Captured coefficients stay linked to the same cell. A derived function sees a later in-place update just as its source function does.
Transformations are deliberate
Calculus removes only artifacts required by its rules. Ordinary symbolic arithmetic preserves what you wrote. .Transform returns a new symbolic value; the original is unchanged. Pass :expand to request distributive expansion in addition to exact constants, identities, and powers.
Direction names may be colon-strings or quoted strings and ignore case, so :expand, "expand", and :Expand are equivalent. Use :center for the stronger polynomial form: it expands products, collects powers, and combines exact coefficients.
The optional exact center writes the complete polynomial in powers of (x - center); it does not truncate or numerically approximate.
:decompose records ordered polynomial divisions by roots or polynomial factors that you provide. A number a denotes (x - a).
In a transformation tuple, a bare direction takes no arguments and an array holds one parameterized operation. Operations run left to right.
:gadic repeatedly divides by one polynomial and returns the flattened sum in powers of that polynomial. :distribute expands only a selected factor, unlike the global :expand direction.
The complete list of rewrites and non-rewrites is in the symbolic transformation reference.
Speccability
Automatic specs intentionally cover a safe pure subset: positional functions built from exact constants, identifiers, negation, arithmetic, division, and exact powers. .Speccability explains whether a function fits that profile; .Spec attaches and returns the spec when analysis succeeds.
The current calculus rules cover exact polynomial and rational differentiation, and structural polynomial integration. Unsupported forms fail rather than silently switching to numerical calculus.