Avoiding the human translation gap (and then some)
Charles Grisar
Abstract
Connecting mathematics to an interactive graph often requires translating it into program code. That translation introduces opportunities for error: a single missing factor in a Fourier series can still produce a convincing plot, just the wrong one. This talk presents 4ier, a system that connects mathematical notation to interactive JSXGraph visualisations while retaining the conditions under which its results apply.
Starting from LaTeX, 4ier builds a structured expression tree. Prolog recognises mathematical structure and plans operations whose applicability has been established; SageMath supplies symbolic results and verification. Assumptions, branch conditions and source provenance accompany the admitted results into compilation. Execution supports exact symbolic results through SageMath, arbitrary-precision decimal arithmetic, and IEEE 754 double precision.
The double-precision artifact is a guarded evaluator. It returns a value together with the selected branch, or a status explaining why evaluation could not produce an admissible value. Where established, the solution interval containing the initial point is enforced too: an algebraic expression beyond a blow-up is not presented as a continuation of the initial-value solution.
For modal solutions, compilation distinguishes established finite support from series requiring numerical truncation. Applicable optimisations include invariant hoisting, caching per-mode terms and compensated summation. Comments in the generated code are derived from facts established upstream.
A generic adapter connects these evaluators to JSXGraph.
Demonstrations use the logistic ODE and the Telegrapher’s equation with non-homogeneous Dirichlet boundaries, tracing how mathematical evidence becomes executable behaviour in interactive graphs.