An undefined function is a named unknown: a function symbol with no definition,
such as the y of an ordinary differential equation. It is not an expression.
It is a handle from which two things are built — a cally(x), and a
structural derivativey′′(x) — and those expressions are what the solvers,
classifiers, and verifiers read.
Three different operations in this manual are spelled derivative or
differentiate. They are not interchangeable:
A callable proxy for a user-named function. The handle belongs to the context
that made it, and every expression built from it belongs to that same context.
The module-level undefined_function(name) in Python and undefinedFunction
in Kotlin and Swift build the handle in the default context. There is no direct class constructor: the factory is the one way to
make a handle, so its context is never ambiguous.
The function-call expression name(arguments...). Argument order is the
function's own argument order and is preserved exactly; it is what
derivative indexes its orders against. Python spells the same
operation as ordinary call syntax, y(x).
The structural derivative node of the named function — the shape the ODE and
PDE classifiers recognise. There is one order per argument, matched
positionally against arguments: y.derivative([1], [x]) is y′(x),
y.derivative([2], [x]) is y′′(x), and u.derivative([1, 2], [x, t]) is
∂x∂t2u(x,t). An order list whose length differs from the
argument list is an error rather than a padded guess.
This is distinct from derivative on a
context or an expression, which wraps an arbitrary expression in a deferred
differentiation placeholder. Equations built from that placeholder are not
recognised by the differential-equation classifiers, so an equation whose
unknown is a named function must use the operation on this page.
With nothing known about f, the equation f(x)2+f(x)−2=0 can only be solved up to
the preimage condition f(x)∈{1,−2}: f may take either value anywhere. A declaration
says more. It is durable for the context, like an assumption, replaces any earlier declaration
for the same function, and is seen by every later solve.
Declares that function maps the set source — its whole domain — one to one onto the set
target. Solving a polynomial equation in the function's values then discards every root
proved outside the target: a bijection onto the real line never takes the value i. Each other
root keeps its exact preimage condition, since the preimage has no name.
The same declaration, naming inverse as the function that maps each target point back to
its one source point. A root proved inside the target then has exactly the preimage
inverse(root), so f(x)2+f(x)−2=0 with f a bijection of the complex plane solves to
{g(1),g(−2)} for the inverse g; with an inner argument, f(3x−1)=1 is solved as
3x−1=g(1). Over the reals the preimages are named only when the declared source
lies in the real line. A root whose membership in the target cannot be decided keeps its
preimage condition rather than being named or discarded.
These members are owner-qualified here because name, session, and
is_stale are member names many unrelated types share; each entry below
documents the UndefinedFunction member and nothing else.
Whether the owning context has moved past the generation this handle belongs
to. The concept, and what to do about it, is explained once in
Context safety.