Expand description
The run-time half of the supertask engine: the exact operations the statements it writes call,
generic over a value model (ValueAlgebra) so the interpreter and a compiled program run one
implementation.
The engine resolves a supertask by rewriting the loop into ordinary statements; what those statements cannot express in arithmetic alone lives here, each as a builtin every tier runs the same way.
trip_count: how many times a loop stepped by a clock runs — an infinite natural when the step is infinitesimal.affine_power:Aᴺ·xfor an exact matrix whose eigenvalues are roots of unity, at an infiniteN. WithA^z·(A^p − I)^m = 0(read off the characteristic polynomial, then checked by multiplying it out),q ↦ A^(z + r + p·q)·xis a polynomial of degree belowminqfor each residuer, somsamples and their forward differences giveAᴺ·x = Σ_j C(q, j)·Δʲexactly, read on each residue class ofN.polynomial_flow:NEuler steps of a polynomial differential equation, ending on the validated solution’s germ.hybrid_flow:Nsteps of a loop whose state flows by a polynomial Euler step between jumps: the values of the ideal hybrid system it follows (seecrate::hybrid), Zeno tails and continuous firing included, each a germ known by its standard part or, where the loop’s own value is exactly it, that value.cycle_at: the state at stepNof a recorded run that has entered a cycle.first_exit: how many passes a loop makes whose guard compares terms linear in a counter it steps —While not (n <= x and x < n + 1):, the floor of Imamura’s Lemma 1 — read where the guard’s truth can change, and on each residue class of the generator where those points depend on it.search_candidates: the naturals at which a search over every natural must look. A predicate built from linear termsa·n + band remainders modulomis constant between the integers where somea·n + bchanges sign and periodic with the periodlcm(m)there, so its first witness, if any, lies at a sign change or within one period after one.
Functions§
- affine_
power Aᴺ·x. See the module documentation.- check_
annihilator - The certificate the closed form rests on, checked by multiplying it out:
A^z·(A^p − I)^m = 0. - cycle_
at - The state at step
nof a run recorded asstates(the state before each step) up to the step whose state,repeated, had been seen before: the run is eventually periodic from the first occurrence ofrepeated. - first_
exit - How many passes
While <guard>:makes when each pass addsstepto its counter, fromt0: the first naturalkat which the guard fails att0 + k·step. The guard compares terms linear in the counter (the formulaGuard::readtakes), so its truth can change only where one of them crosses zero and otherwise repeats with the period of its remainders; its first failure lies at a crossing or within one period after one, and is found by evaluating the guard there alone. Where those points depend on the residue of the generator —⌊1/(2·dt)⌋— each class is read on its own scale and the count is the infinite integer the classes’ answers make. - hybrid_
flow Nsteps of a loop whose body is polynomial Euler steps and jumps, asmodelencodes them:[body, jumps], the body its parts in order —["flow", field]a run of flow statements as one polynomial update per slot, as forpolynomial_flow,["check", k]the check of jumpk— and each jump[guard, block]. A finiteNruns the steps themselves. An infinite one,N = T/dt + δon each residue class, ends on the values of the ideal hybrid system the loop follows for timeT(seecrate::hybrid): a value the flow moves is a germ known by its standard part, a value the loop holds exactly is that value.- polynomial_
flow Npasses ofx ← x + dt·f(x) + O(dt²),fpolynomial with rational coefficients. A finiteNruns the update itself. An infinite one,N = T/dt + δon each residue class, ends infinitely close to the solution ofx' = f(x)from the start’s standard part at timeT, a germ known by its standard part; a scalar solution certified to leave every bound beforeTleaves an unlimited germ.- search_
candidates - The naturals a search over every natural must examine, in increasing order; empty when the predicate’s coefficients or periods are not ones this reading decides. See the module documentation.
- state_
size - The bits a state occupies — a number by its magnitude, text by its length, a list or tuple by its items, an exact value by its canonical encoding — the measure the cycle search stops a growing state by.
- trip_
count - How many times
While t <relation> bound:runs when each step addssteptot, starting fromt0:⌈(bound − t0)/step⌉for a strict bound,⌊…⌋ + 1for an inclusive one,0when the guard is false at the start.−1— not counted, so the loop runs as written — when the clock is not a number, or when a standard step walks away from its bound; a refusal when an infinitesimal step does, since that loop could never end.
Type Aliases§
- Matrix
- A square matrix of values, row by row.