Global analysis#
Local identifiability leaves finitely many coordinate values with the output of a generic one.
A discrete symmetry is a map \(\sigma\) with \(\Psi_N(\sigma(\theta)) =
\Psi_N(\theta)\) and \(\sigma(\theta) \ne \theta\), which no generator shows. It matters
for estimation only where \(\sigma(\theta) \in \Theta\): \(\theta \mapsto -\theta\)
of a positive coordinate that enters as \(\theta^2\) is no symmetry of the model on
\(\Theta\). Counts over the algebraic closure, as in [28, 29],
include such values; the global analysis (detect(mode="global"),
discrete()) counts in \(\Theta\) as well.
The global analysis sets up the fiber of a generic point as a polynomial system (The fiber, Conditions, events, resting states and switches, Rational form of the fiber), counts the points modulo a prime and reconstructs the maps between them (Maps between the points of the fiber), and certifies the count, exactly by the field of the output coefficients (The exact count), with an error bound over \(\mathbb{Q}\) (The verified count, Several experiments), or not (Certificates). Points proposed numerically and certified by interval arithmetic (Monodromy and certified points) propose maps only.
The fiber#
A model with directions is reduced first (reduce()); the reduced model is
locally identifiable, so the fiber \(\Psi_N^{-1}(\Psi_N(\theta^\ast))\) is finite. The
fiber at a point \(\theta^\ast\) is the solution set of the polynomial system that equates the
Taylor coefficients of the observables up to order \(N\) with their values at
\(\theta^\ast\), away from zeros of coordinates and denominators. msolve
[30] counts the points of the system over the algebraic closure modulo a prime, an upper bound
for the size of the fiber of the model, which more equations can only lower. As in SIAN
[28], the derivatives of the states at the start are unknowns of the system, tied by the
Taylor coefficients of \(D(x)\,\dot x = N(x)\) and \(E(x)\, g = M(x)\). Every
observable starts one order above the highest of the orders whose next coefficient adds no rank to
the Jacobian in the coordinates: at a given start, a coefficient that adds no rank can still remove
points. The orders rise together until the count is the same at two successive steps, or equals
the size of the orbit of the proven candidates, one if there are none, which no higher order
changes, since more equations give a fiber within the one before and the orbit stays in it. The
count of a block is the number of distinct values of a random linear form in the coordinates on
the points of the block: msolve gives the reduced Gröbner basis, the standard monomials span the
quotient, and the number of distinct eigenvalues of the multiplication by the form is the degree of
the square-free part of the minimal polynomial of that multiplication. Points that differ only in the derivatives of the states, or that are
multiple, count once. The series of a known input is a number, a variable
that a linear equation fixes to a number is substituted, a derivative that enters one equation
only, there linearly with a numeric coefficient, leaves with that equation, and the rest splits
into blocks without a shared variable, whose fibers multiply. msolve runs over \(\mathbb{F}_p\)
with the probabilistic sparse linear algebra of msolve.
Stages. A block is counted stage by stage. Let \(A\) be a set of variables of the block, \(P_A\)
the equations and factors of the saturation that read only variables in \(A\), and \(P_R\)
the others. A point of the block is a pair \((a, r)\) with \(P_A(a) = 0\) and
\(P_R(a, r) = 0\), the factors nonzero, so the points of the block are the disjoint union over
the points \(a\) of \(P_A\) of the points of \(P_R(a, \cdot)\), and the count of the
block is the sum of the counts of the rest at each \(a\). This holds for every \(A\); the
block triangular form of the incidence of equations and variables [31] only proposes one:
a maximum matching of equations to variables, the graph in which a variable points to the variables
the matched equation of the variable reads, and as \(A\) the smallest proper set closed under this graph that
holds a strongly connected part of more than one variable, so that the equations in \(P_A\)
match every variable of \(A\). The block is first counted at once under an eighth of msolve_entries,
since the rest after a stage is often small. Then msolve gives the rational parametrization of
\(P_A\); where every distinct root of the eliminating polynomial lies in
\(\mathbb{F}_p\) (in \(\mathbb{Q}\) for the count over \(\mathbb{Q}\), at most 16
roots), each point is substituted, the fixings above run again, and the rest is counted by stages;
otherwise the block is counted at once. Over \(\mathbb{Q}\) the stage is first
solved modulo a prime and skipped where a point lies outside \(\mathbb{F}_p\), since rational
points reduce to points in \(\mathbb{F}_p\) for a prime that divides no denominator; the choice
of the route never changes the count. Points \(a\) that differ only in the derivatives of the states count apart, so
the sum is never below the number of points with distinct coordinates.
Conditions, events, resting states and switches#
The conditions are stacked as in the local analysis: each has separate derivatives, the
coordinates are shared. After an event the gaps are \(\varepsilon\, \Delta t_i^0\) as in
Conditions and events: the state at the end of a gap is the series of the segment before
evaluated at \(\varepsilon\, \Delta t_i^0\), the event maps it to the start of the next
segment, and every coefficient after the event is a power series in \(\varepsilon\), kept up
to the gap order, which rises with the order. A segment whose start holds coordinates, an event
at an estimated time, is expanded at the start of the condition on the flow continued backward,
so that the coefficients of the segment depend on the time of the event. Under equilibrate the start of a
condition is the solution of the balances over \(\mathbb{Q}(\theta)\), exponentials of the coordinates
included, with the inputs at zero,
the states that are coordinates at their free resting value and the states without dynamics at
their initial value; where the balances have more than one rational solution, the one with the
most states away from zero, and none without one rational solution. States that no observable
depends on are left out. With switches, as in Switching models, each condition enters from the
start in the regime of the start, decided at a random point, and each allowed regime as a copy
whose start is free on a switching surface \(\gamma_j = 0\) to an allowed neighbor: at the point
the surface is solved for a state in which it is linear, and in the fiber
\(\gamma_j(z', \theta') = 0\) is an equation; the clock and the jets of known inputs of a copy
start at known values. A map is exact with a map of the states in every regime that takes each
surface to itself, \(\gamma_j(\varphi(x), \sigma(\theta)) = c\, \gamma_j(x, \theta)\) with
\(c\) free of the states and positive on \(\Theta\). A switch on the parameters alone puts
the model in one regime and is not handled. A map reconstructed from the fiber is
checked on the coefficients four orders further up, in \(t\) and in \(\varepsilon\); a
map that fails shows a fiber too large at that order, and the orders rise.
Rational form of the fiber#
The fiber needs a model rational in the states and coordinates. Three rewrites before the count
keep the fiber. A coordinate \(\theta\) that enters only through \(b^{c\theta}\), with
rational \(c\), is read as \(X = b^{\theta/L}\), \(L\) the common denominator of the
exponents, a bijection of \(\mathbb{R}\) onto the positive reals; a map is reported back as
\(\theta' = L \log_b \sigma(X)\), so a swap stays a swap and a discrete scaling becomes a
translation. An observable \(h\) for which \(e^{c h}\) is rational, \(c \in \{1,
\log 10, \log 2\}\), is replaced by \(e^{c h}\), one of the form \(e^{r}\) by \(r\),
and an odd power \(r^{p/q}\) by \(r\): these maps are injective where the observable is
real, so two values of the coordinates have the same output before the rewrite if and only if
they have it after. A factor \(e^{a t}\), with \(a\) free of the states and the clock,
becomes a state \(E\) with \(\dot E = a E\) and \(E(0) = 1\), whose unique solution it
is; this needs conditions that start at \(t = 0\). A coordinate \(\theta\) that
enters only through \(e^{c/\theta}\), with rational \(c\), is read as \(X = e^{a/\theta}\), \(a\)
the positive rational greatest common divisor of these \(c\), so that \(X\) enters with integer powers;
\(\theta \mapsto X\) is a bijection of the positive reals onto \((1, \infty)\) and of the negative reals
onto \((0, 1)\), and a map is reported back as \(\theta' = a / \log \sigma(X)\). The counts in the domain
take \(X > 0\), which holds \(\theta\) real but not positive. A state without dynamics that starts at a
number and that every event sets to a number, such as a clamped input, is that number within each segment, and is
substituted there where a non-rational term reads it. info["discrete"]["rewrites"] lists the rewrites, and a
term that stays non-rational is named in the error.
Non-rational terms. A term \(\varphi(\psi)\) of the states that these rewrites leave, \(\varphi\) an exponential, a logarithm or a power \(b^\mu\) with a non-integer exponent and \(\psi\) rational, becomes \(W \nu\) (\(W + \nu\) for the logarithm), innermost first, with a new state \(\nu\) and a new coordinate \(W = \varphi(\psi_0)\), \(\psi_0\) the value at the start:
A term of the coordinates alone becomes a new coordinate \(P\), the \(W\) of a term with the
same start or an integer power of it, and a coordinate that no
equation reads afterwards is dropped where one \(P\) determines it on the positive reals
(\(b^\mu\) or \(\log b\) with \(b = c\, \theta^{\pm 1}\), or \(e^{a \theta^{\pm 1} + d}\),
with \(c, \mu, a, d\) free of \(\theta\)). A positive state \(x\) that the model reads only through
\(\log x\), through the factor \(x\) of \(\dot x = x R\) and through observables \(x^k\) with an
integer \(k \neq 0\) is replaced first by \(L = \log x\), with \(\dot L = R\), the observable
\(k L\) and the start \(P = \log x_0\). This keeps the fiber: \(x = e^L\) is the unique positive
solution, \(x^k \mapsto k \log x\) is injective on the positive reals, and \(x_0 \mapsto P\) is a
bijection onto the reals, so \(x_0\) is dropped and no relation between a \(W\) and \(x_0\) is lost. A term with a known input or the clock, and a root or rational
power, whose start is algebraic, are not rewritten. The relaxed model is rational in
\(\tilde\theta = (\theta, W, P)\), and the output of the model is the relaxed output on the graph
\(\Gamma\) of \(\theta \mapsto \omega(\theta)\), the starts of the new coordinates.
discrete() counts the relaxed model modulo the continuous directions, as above, and
info["discrete"]["relaxed"] lists the terms, the starts and the dropped coordinates.
Proposition. Suppose (a) every direction of the relaxed model that moves a \(W\) is exact, a scaling or a shift of the \(W\) it moves by constants, and moves no coordinate read by a start \(\omega\), with an invertible matrix of the weights and shifts on the \(W\) these directions move, (b) no direction moves a coordinate read by the start of a \(W\) that no scaling moves, and (c) these starts are algebraically independent over \(\mathbb{Q}(\theta)\). Then at a generic point the fiber of the model has at most \(k\) connected components, \(k\) the count of the relaxed model modulo the continuous directions, and exactly \(k\) where \(k = 1\) or where the exact maps of the relaxed model that fix every \(W\) and every coordinate read by a start have an orbit of \(k\) points.
Proof. By (a) these directions reach every value of the \(W\) they move from any point (every positive value for a scaling), and by (c) the image of \(\theta \mapsto (\theta, \omega(\theta))\) on the other \(W\) is Zariski dense, so a generic \(\theta\) lies on a generic orbit of the relaxed model. A point \(\theta'\) of the fiber of the model gives the point \((\theta', \omega(\theta'))\) of the relaxed fiber. On an orbit \(O\) of the relaxed fiber, the \(W\) that no scaling moves and, by (b), the coordinates their starts read are constant, so either no point of \(O\) or every point after one group element meets these starts; the element \(s(q)\) of the directions of (a) that brings \(q \in O\) to the starts of the moved \(W\) is unique and continuous in \(q\) by (a), since these directions fix what the starts read. So \(O \cap \Gamma\) is empty or the image of the connected \(O\) under \(q \mapsto s(q)\, q\), and the fiber of the model is the union of at most \(k\) connected sets. A map that fixes the \(W\) and what the starts read takes \(\Gamma\) to itself, so an orbit of \(k\) points meets \(k\) relaxed orbits on \(\Gamma\). \(\square\)
For exponentials alone, (c) holds where the Jacobian of the exponents \(\psi_0\) in the
coordinates has full rank at a random point: an integer combination of the \(\psi_0\) that
is constant has a zero differential, and the lemma of Kolchin and Ostrowski in Non-rational terms
gives the independence. For logarithms alone the same holds with \(\mathrm{d} \log
\psi_0\): a combination \(\sum_i c_i \log \psi_{0,i}\) that is rational has a differential with
simple poles only, so it is constant. Otherwise (c) is a premise, named in
certificate["premise"], and the certificate is axiom. Where (a) or (b) fails,
certificate["relaxed_why"] names the direction, the count is not reported (count None,
the relaxed count under relaxed["count"]), and the certificate is open.
Free powers of a state at 0. A power \(x^{c_0 + c\alpha}\) of a state \(x\) that starts at the number 0, with integers \(c_0 \ge 0\), \(c > 0\) and a coordinate \(\alpha\) declared positive, has no start \(\psi_0 \neq 0\) to relax. With \(k\) and \(c_x\) as in Singular starts, \(x^\alpha = Z N\) with \(Z = c_x^\alpha\) and the normalized power \(N = (x/c_x)^\alpha = \tilde S Q\), \(\tilde S = t^{k\alpha}\), a series in \(t\) and \(\tilde S\) whose coefficients are polynomials in \(\alpha\), the coefficients of \(x\) and \(1/c_x\). The model with \(x^\alpha = 0\) gives the coefficients of \(x\) of layer 0; \(k\) is the first order at which the coefficient is nonzero at a random point, which shows it nonzero as a function, and the coefficients below \(k\) are computed over \(\mathbb{Q}(\theta)\) and vanish identically.
\(Z\) leaves the model in one of three ways. (i) It cancels against a factor \(c_x^{-\alpha}\): the model is written in \(N\). (ii) The model is invariant under \(Z \mapsto \lambda Z\), \(P_i \mapsto \lambda^{q_i} P_i\) for the new coordinates \(P_i = b_i^{q_i \alpha}\) of the relaxation above: then the output depends on \(Z\) and \(P_i\) only through \(\tilde P_i = P_i Z^{-q_i} = (b_i / c_x)^{q_i \alpha}\), the model is taken on the slice \(Z = 1\) with \(\tilde P_i\) in place of \(P_i\), and a \(\tilde P_i\) determines a dropped coordinate as before where \(c_x\) is positive on the domain and free of it. The map from \(\theta\) to the slice is then a bijection, so this step needs no premise. (iii) Otherwise \(Z\) is a new coordinate \(W\) with the start \(c_x^\alpha\), under the proposition above. \(c_x\) must be positive on the domain by the declared signs and free of the known inputs.
In the prolonged model each state has the coefficients \(x_{n,m}\) of index \(n\) and layer \(m\), standing for \(t^{n - km + km\alpha}\), and the derivative of index \(n\) is \(\lambda_{n+1,m}\, x_{n+1,m}\), \(\lambda_{n,m} = n - km + km\alpha\). The coefficients \(Q_n\) are unknowns with \(n\, c_x Q_n = \sum_{j=1}^n (\alpha j + j - n) x_{k+j} Q_{n-j}\), \(Q_0 = 1\), and \(N\) has \(Q_{n-k}\) in index \(n\) and layer \(m+1\) for layer \(m\) of \(Q\); \(c_x = x_{k,0}\) is saturated. Let \(v_N = 0\) and \(v_i = 1 + \min_j v_j\) over the states and \(N\) that the right-hand side of state \(i\) reads, and \(v_h = \min_j v_j\) over those an observable reads. By induction on the index, every term of layer \(m \ge 1\) of state \(i\) has \(n - km \ge v_i\) where the base has \(v_x \ge k\), so that every term of \(Q\) has \(n - km \ge 0\); a power with \(v_x < k\) enters the dynamics of the base below \(t^k\) and is refused. Unknowns exist only for these terms, layer \(m\) up to \(\lfloor N/k \rfloor\) at order \(N\), and only up to the index that the outputs read: an observable reads the states at the order of the observable, the equation of index \(n\) of a state reads the right-hand side at index \(n - 1\), and \(N\) reads the base at the same index. The unknowns above are determined by the ones below and change no count.
Lemma. Let \(c_x\) have one sign on the domain, and let the coefficient \(d = h_{v_h + k, 1}\) of an observable \(h\) have one sign on the domain. Then every point \(\theta'\) of the domain with the output of a generic \(\theta\) has \(\alpha' = \alpha\).
Proof. The expansions converge (Singular starts) and have exponents \(e = (n - km) + km \alpha'\). At \(\theta'\), \(c_x \neq 0\) gives the same \(k\); the terms of layer \(m \ge 1\) have \(n - km \ge v_h\), so for \(\alpha' > 0\) the least exponent among them is \(e' = v_h + k\alpha'\), attained by \(d(\theta') \neq 0\) alone. Likewise \(e = v_h + k\alpha\) with \(d(\theta) \neq 0\), and \(e \notin \mathbb{Q}\) for generic \(\alpha\). The layers 0 have integer exponents. If \(e < e'\), the term \(t^e\) has the coefficient \(d(\theta) \neq 0\) at \(\theta\) and none at \(\theta'\), as \(e\) is no integer and lies below \(e'\); this contradicts the lemma of Singular starts. If \(e' < e\) and \(k\alpha'\) is no integer, the same holds for \(t^{e'}\). If \(k\alpha'\) is an integer, every exponent at \(\theta'\) is an integer and \(t^e\) again has no coefficient at \(\theta'\). So \(e = e'\) and \(\alpha' = \alpha\). \(\square\)
The coefficients \(c_x\) and \(d\) are computed over \(\mathbb{Q}(\theta)\), and one
sign means numerator and denominator positive or negative by the declared signs; where this is not
shown the condition is a premise, certificate["premise"], and a count otherwise verified is
axiom. The fiber then has the equation \(\alpha' = \alpha\) and the equations of all
layers, and the bound of the verified count takes the degrees of all of them. The maps are
reconstructed and checked as before but have no state maps, since \(N\) is no rational
function of the states, and the exact count of the field of the outputs is not taken.
info["discrete"]["start_powers"] names per power \(k\), \(c_x\), the observable,
\(d\) and the premises. One such power per condition is taken, without events.
Resting states inside a term. Under equilibrate the start of the relaxed model is a resting
state, and a state \(x_H\) inside a transcendental term has a resting value that solves a
transcendental balance. Such resting values \(R_H\) become coordinates of a resting chart: the
transcendental terms at rest are leaves \(W = \varphi(\psi(R_H, \theta))\), the balances of the other states
are solved one at a time where each is linear in the state it belongs to, and one coordinate \(p_h\) per state of
\(H\) that enters the remaining balances linearly is solved from them, with an invertible coefficient matrix
(a nonzero determinant at a random rational point, which proves it nonzero as a function). Coordinates without a
declared sign come first, then those in the fewest balances. The chart
is a bijection onto the points \((\theta, x^\ast)\) of the resting set where the coefficient matrix and the
coefficients of the solved states do not vanish: \(R_H\) reads \(x^\ast_H\) off a point, and the
balances, linear in \(x^\ast_N\) and \(p\), have the given point as their unique solution. The output of
a point of the resting set is the output from the resting state of the point, so the fiber of the model, as a set of points
\((\theta, x^\ast)\), is the fiber in the chart; the chart model, rational up to the leaves \(W\) and
with the start \((R_H, x^\ast_N)\), is relaxed as above. In the chart the leaves are exponentials of
coordinates, so (c) follows from the rank of their exponents as before. Several resting states with the same
\(\theta\) are distinct points of the fiber. The declared sign of \(p\) is no sign of a chart coordinate,
so the counts in the domain do not hold it (info["limits"]). An event on a state inside a term, a known input,
a condition grid and a trafo of the states are not handled. A model with directions and a term of the states is
relaxed first; where the relaxed count bounds the fiber (no relaxed_why), the reduction of the model itself is
skipped.
Unknown inputs. An unknown input enters the fiber through the jets at the start, unknowns that are no coordinates: the chain of Unknown and known inputs with free starts. A point of the fiber is then a value of the coordinates with some input of the same output, and points that differ only in the jets count once. An observable of relative degree \(r\) in the input \(w\), the least order whose Lie derivative reads a jet of \(w\), has
by induction on \(m\), since \(L^r h\) reads \(w\) but no derivative of it. So the
Taylor coefficient of order \(n\) reads exactly the jets up to \(n - r\); \(r\) comes
from symbolic Lie derivatives over \(\mathbb{Q}\). At the orders of a count, the jets above the
highest order that an observable reads are zero: no output coefficient up to these orders depends
on them, so the coordinates of the fiber are the same, and the equations of the derivatives of the
states, which read them, keep no free direction. An unknown of the system that is no coordinate
and enters no equation is left out, which keeps the coordinates of every point. The model has one
condition, no events, switches or equilibrate, and the exact count by the field of the
outputs is not taken. A map \(\sigma\) is checked where the equations of the fiber four
orders higher, with the coordinates at \(\sigma(\theta)\), have a solution modulo a prime at
random points, and exact where the map of the states fails without the inputs and a map
\(\psi(x, \theta, w)\) of the input values, solved where linear, satisfies
over \(\mathbb{Q}(x, \theta, w)\), \(\varphi\) reading no input. Then \((\varphi(x(t)),
\psi(x(t), \theta, w(t)))\) solves the model at \(\sigma(\theta)\) with the output of the
solution at \(\theta\); state_maps lists \(\psi\) under the name of the input.
Maps between the points of the fiber#
Permutations of the coordinates are tested before the count. If \(\sigma\) permutes the
coordinates and keeps every Taylor coefficient \(c\), then \(c(\sigma(\theta)) =
c(\theta)\) gives \(\partial_i c(\theta) = (\partial_{\sigma(i)} c)(\sigma(\theta))\), so
\(c\) depends on \(\theta_i\) if and only if it depends on \(\theta_{\sigma(i)}\), and
\(\sigma\) maps each coordinate onto one with the same set of coefficients that depend on it.
These sets come from one evaluation of the Jacobian at a random point modulo a prime. The
transpositions within each class of equal sets, and then the products of two transpositions that
fail alone, are tested on the coefficients up to four orders past the rank criterion at a random
point modulo the prime, and a candidate that passes is proven as below or kept as checked.
The candidates join the maps of the fiber; they need no count, which only decides whether the
maps are complete.
Where the other points are rational functions \(\sigma_j(\theta)\), they are reconstructed
without matching points across samples. For a coordinate \(\theta_i\), the characteristic
polynomial \(\prod_j (Z - \sigma_{j,i}(\theta))\) over the fiber is invariant under
permutations of the points, so the coefficients are rational functions of \(\theta\); msolve
gives them modulo a prime from the rational univariate representation, and they are
interpolated as the generators are. A linear factor over \(\mathbb{Q}(\theta)\) is a rational
\(\sigma_{j,i}\). Coordinates with the fewest arguments come first, until their rational
roots separate the points of the fiber; each other coordinate is then interpolated on each
point, labeled by those roots. A map is checked when the coefficients agree at random
rational points, and exact with a map \(\varphi\) of the states such that
over \(\mathbb{Q}(x, \theta)\): \(\varphi\) is \(\sigma\) on a state whose initial value
is a coordinate, a different one per state, and the identity on the others, with \(x \mapsto x^c\) for a state
that starts at 1 with \(\dot x = x\, R\) where \(R(\sigma) = c\, R\) for a rational
\(c\), or, where these fail, the
solution of \(h(\varphi(x), \sigma(\theta)) = h(x, \theta)\) and the Lie derivatives of these
equations where they are linear in \(\varphi\), or \(\varphi\) affine in the states of the
block that \(\sigma\) reaches, the states whose right-hand side or start holds a coordinate
that \(\sigma\) moves, closed under the states that read them, and the identity elsewhere, with
coefficients solved from the identities where they are linear in them. With events, each segment has such a map, and
at each event \(\varphi_{\text{after}}(E(x, \theta)) = E(\varphi_{\text{before}}(x),
\sigma(\theta))\), in every condition. The exact maps generate a group \(G\); at a point
outside the fixed sets of the elements of \(G\) the orbit is \(|G|\) points of the fiber. When
\(|G|\) equals the count, the count is final (count_final): the exact maps give a lower
bound equal to the upper one. info["discrete"]["certificate"] lists the state maps, \(|G|\),
the count and the prime. complete is "exact" where the field fixed by the exact maps lies
in the field of the output coefficients, which proves the fiber to be the orbit (The exact count); else "verified" where a count over \(\mathbb{Q}\) at a random integer point
equals the orbit, with the probability count_bound that the fiber at a generic point has more
points. Otherwise the certificate names the step that is not proven: that the count modulo the
prime at a random point is the count over \(\mathbb{C}\) at a generic point, an axiom
(complete: "axiom", with count_bound_why). A map with a positivity certificate for each
image coordinate preserves \(\Theta\); a map with an image coordinate negative on
\(\Theta\) never meets it; otherwise the conditions on \(\theta\) are listed. Where the fiber is
proven to be the orbit and every element of the group either preserves \(\Theta\) or never meets
it, count_domain is one plus the number of elements that preserve it, exactly. Ordering the
coordinates and keeping in each orbit the point that is least in the first coordinate a map
moves gives a fundamental domain, a set of inequalities such as \(k_{01} < k_{12}\).
The counts in \(\Theta\) at the sample points end at the work limits of the global analysis, and where the proven maps account for the count, the points are the orbits. Over \(\mathbb{Q}\), msolve isolates the real points in boxes, refined until each box decides the sign of every coordinate declared positive; the count in \(\Theta\) follows at rational sample points. Where the rational maps of the next paragraph account for every point counted at a sample point, and the images give the coefficients of the point exactly, the point and the images are the fiber, and the count needs no isolation. The number of points in \(\Theta\) is constant only between the hypersurfaces on which two points meet or a point crosses the boundary of \(\Theta\), so the count is reported per point and never taken as a global verdict.
The exact count#
Let \(L = \mathbb{Q}(\theta)\), \(G\) the group of the exact maps
of Maps between the points of the fiber, acting on \(L\) by \(\sigma(f) = f \circ \sigma\), and
\(c\) the Taylor coefficients of the observables at the start of the experiments, the first
segment of each condition, with the known inputs at the values drawn for them. Let \(T\) be
the fiber at a generic point \(\theta\) for these inputs: the values \(\sigma\) over
\(\overline{L}\) with the output of \(\theta\). A value with the output of \(\theta\)
for every input lies in \(T\).
Theorem. Let \(F = \mathbb{Q}(c)\) and \(\alpha \in L\) with \(P_\alpha(Z) = \prod_{\sigma \in G} (Z - \sigma(\alpha)) \in F[Z]\) and \(L = F(\alpha)\). Then \(T\) is the orbit of \(\theta\) under \(G\), of \(|G|\) points.
Proof. The output is a function of \(\theta\) whose coefficients generate a field \(\mathbb{Q}(\Psi) \supseteq F\), and \(L\) is finite over it, since it is finite over \(F\). A point \(\sigma \in T\) has coordinates algebraically independent over \(\mathbb{Q}\) (the output there has transcendence degree \(n\)), so \(\theta \mapsto \sigma\) defines an embedding of \(L\) into \(\overline{L}\) over \(\mathbb{Q}(\Psi)\), and every such embedding gives a point of \(T\); so \(|T| = [L : \mathbb{Q}(\Psi)]\) in characteristic 0. The exact maps keep the output, so the orbit of \(\theta\) lies in \(T\). \(\alpha\) is a root of \(P_\alpha \in F[Z]\), of degree \(|G|\), so \(|T| = [L : \mathbb{Q}(\Psi)] \le [L : F] = [F(\alpha) : F] \le |G|\). \(\square\)
The test of the theorem has no random step: random points only propose candidates, and each candidate is checked exactly. Membership in \(F\) is proven as a tower: a function is in \(F\) once it is a rational function of output coefficients and of functions already shown in \(F\), \(f = A(w)/B(w)\), by the identity \(A(w(\theta))\, \mathrm{den}_f(\theta) = \mathrm{num}_f(\theta)\, B(w(\theta))\) with \(B(w(\theta)) \ne 0\), checked as polynomials in \(\theta\) over a common denominator. The output coefficients enter as quotients of polynomials in \(\theta\) over powers of a shared list of factors, the denominators of the starts of the states and the values of the denominators of the right-hand sides and observables at the start, from the Taylor recursion of \(D(x)\, x' = N(x)\) order by order: a sum takes the largest power of each factor, so that no gcd is needed and the denominators grow linearly with the order. The candidates \(A, B\) come from linear algebra modulo primes at random points, with rising degree, rebuilt over \(\mathbb{Q}\). The functions shown in \(F\) are:
Coefficients of input-output relations. Let \(\phi_1, \dots, \phi_r\) be the monomials of degree at most \(\delta\) in the derivatives of each observable up to an order chosen per observable, which leaves it out where negative, and in the known inputs that the right-hand sides read, with their derivatives, the configurations taken with the fewest monomials first (for more than three observables each one alone and all at one order) and those holding one that gave relations left out, and \(M(c)\) the matrix of the Taylor coefficients of \(\phi_j\) along the trajectory of the first condition, whose entries are polynomials in output coefficients and the input values. A vector \(\lambda(\theta)\) with \(\sum_j \lambda_j \phi_j(g, u) = 0\) along every trajectory lies in the kernel of \(M(c(\theta))\); this is checked exactly, the derivatives of the observables as Lie derivatives, a polynomial identity in the states, the inputs and the coordinates. Where the rank of \(M\) at one point modulo a prime is \(r - s\) and \(s\) such vectors are proven, each the identity on the same \(s\) columns, they are the basis of the kernel over \(\mathbb{Q}(\theta)\) with that identity, since a nonzero minor at one point is nonzero over \(\mathbb{Q}(\theta)\); the same basis solves the system over \(F\), so the entries of the basis lie in \(F\) by Cramer’s rule. They are interpolated as rational functions of the parameters from the relations among the \(\phi_j\) at random states for random values of the parameters, the other coordinates held at one value, as polynomials of all entries at once, else over the denominator of one entry; the identity check decides. Rational right-hand sides and observables enter as rational functions of the states.
Coefficients of projections. A profile \(h\) gives per observable \(g_r\) a number \(h_r\) such that the derivatives \(g_r^{(k)}\), \(k < h_r\), of all observables are algebraically independent over \(L\) and the next derivative of each one is algebraic over them; the rank of their Jacobian in the states at a random point modulo a prime proposes it, in rounds over the observables and one observable after the other. The projection of \(g_i\) is a polynomial relation of \(g_i^{(h_i)}\) with these derivatives and the input states read, the generator of the ideal of the relations in these variables [32]. The monomials \(\phi_j\) of the projection are the support of the kernel of the values of the monomials at random states, for one random value of the parameters, modulo a prime: first with rising total degree and degree in \(g_i^{(h_i)}\), at most 1500 monomials, then inside bounds on the Newton polytope of the projection, at most 10000, then again by degrees, at most 6000: the largest sets of degrees below a cap that doubles, since one without a relation holds none of the smaller ones, and where the kernel has more than one vector, the least set with one. The bounds on the Newton polytope are counts of points. Let \(\Phi\) be the map from the states to the base functions (the derivatives and the inputs of the projection), the parameters at their value, on a slice of the states: those whose columns keep the Jacobian of \(\Phi\) at rank \(|\Phi| - 1\) stay free, the others take random values, so that the image is dense in the hypersurface \(P = 0\) of the projection and a generic point of it has the same number \(k\) of preimages. For a weight vector \(w\) of nonnegative integers and random vectors \(c, b\), the points of the slice with \(\Phi(x) = c + b\, t^w\) lie over the roots of \(P(c + b\, t^w)\), a polynomial in \(t\) of degree \(\max_{m \in \mathrm{supp}\, P} \langle w, m \rangle\), \(k\) points over each; with \(c = 0\) and \(t \ne 0\) over the nonzero roots, \(\max - \min\) of \(\langle w, m \rangle\) in number. msolve [30] counts the solutions of these systems over the algebraic closure of \(\mathrm{GF}(p)\), the denominators of the base functions inverted by a new unknown, and \(k\) as the number of solutions of \(\Phi(x) = \Phi(x_0)\) at a random \(x_0\). The weights are the total degree, each base function alone, the order of each derivative plus one and the reverse order, and random weights in \(\{0, \dots, 3\}\) while more than 10000 monomials meet the bounds. A point modulo a prime that is not generic can make a count too small and leave a monomial of \(P\) out; then the kernel has no vector or the identity check below fails, so the bounds, like the rest of the support, only propose. [32] computes the projections by resultants over \(\mathbb{Q}(\theta)\), the extraneous factors removed by a membership test along power series solutions; here the support comes from one kernel at one value of the parameters, and the coefficients as follows. The coefficients are normalized at the one of least degree on a random line and interpolated as rational functions of the parameters over one denominator \(D\): a monomial where the restriction to every line parallel to an axis is a power of the variable, else interpolated from the values \(D(\theta) = \ell(1) / \ell(0)\) with \(D(\beta) = 1\), \(\ell\) the denominator of a random combination of the coefficients on the line \(\beta + t (\theta - \beta)\); the numerators \(a_j D\) by sparse interpolation [19] or in the box of their degrees per parameter, rebuilt over \(\mathbb{Q}\) from more primes, at most 32, until two successive reconstructions agree. The projections of a profile are found first and taken with the fewest monomials first. A derivative is \(N / (Q^a E^b)\), \(Q\) the product of the distinct denominators of the right-hand sides and \(E\) the denominator of the observable, by \(L(N / (Q^a E^b)) = (\tilde N Q E - N (a \tilde Q E + b \tilde E Q)) / (Q^{a + 2} E^{b + 1})\) with \(L(P) = \tilde P / Q\), so that the relation \(\sum_j a_j \phi_j = 0\) is checked as one identity of polynomials in the states and coordinates, each term over the powers of \(Q\) and \(E\) that it lacks, without gcds. With rank \(r - 1\) of \(M\) at one point modulo a prime, \(r\) the number of monomials, the coefficients lie in \(F\) as in the item before. Every step that proposes (the profile, the monomials, the degrees, the interpolation) can only make the search fail, never prove a wrong function.
Coefficients of relations by elimination. Where the projections give no proof, the states are eliminated as in [28] (StructuralIdentifiability.jl), with python-flint: the equation of an observable is differentiated along the flow, the derivatives of the states are removed with the equations of the model, and one state at a time is removed by a resultant over \(\mathbb{Z}[\theta]\), the determinant of the Bezout matrix (the Sylvester matrix where one degree is one) after the greatest common divisors of the rows and columns. Every polynomial of this process vanishes along every trajectory: the equations of the model do, and derivatives, combinations and resultants of such polynomials do. Of the irreducible factors of such a polynomial and of the divisors taken out, one vanishes along every trajectory: along one trajectory their product is zero in the domain of power series, so one factor is, and the coordinates and starts at which a given factor vanishes along the trajectory form a closed subset of the open set without a pole at the start, so one of these finitely many subsets is all of it. A factor nonzero at a point of a trajectory at random coordinates modulo a prime is not that one, so the product of the factors that vanish at three such points vanishes along every trajectory, without a random step. The relation of an observable at the end is the only one on the support where the rank of the Taylor coefficients of the monomials along the trajectory is one less than their number at a point modulo a prime, as for the projections; the coefficients over one of fewest terms then lie in \(F\), and those whose gradients in the parameters raise the rank at a random point modulo a prime, fewest terms first, with as many more, join the functions shown. Where a state \(x_i\) is removed, an equation \(A x_i + B\) of degree one in it (one of the two equations, else their first subresultant, a combination of both) whose coefficient \(A\) is nonzero at a point of a trajectory gives \(x_i(0) = -B / A\), rational in the output coefficients, the coordinates and the starts of the states removed after it: the start lies in \(F\) once these do. The elimination runs in a separate process while the share of
search_entriesfor the relations is not spent and ends atelimination_terms.the coordinates that \(G\) fixes and the coefficients of \(P_\alpha\), each a rational function of the functions before it on the same coordinates, then of small systems of them (the functions shown in \(F\) whose coordinates not yet shown lie in those of the function and at most two more, each divided by the largest monomial in the coordinates shown that divides the numerator and by the denominator where that reads coordinates shown only, again a function in \(F\), with the coordinates shown that they read, in degrees counted apart for both), then of all of them, then with the output coefficients added lowest order first; the traces \(\sum_{\sigma \in G} \sigma(\theta_i)\) of the moved coordinates and sums over \(G\) of monomials in them join where they are proven.
\(\alpha\) is a moved coordinate with \(|G|\) distinct images, else a combination of two or three, with the simplest images. \(L = F(\alpha)\) is shown coordinate by coordinate, each a member of \(F(\alpha)\) once shown, in two ways:
as a rational function of functions in \(F\), of \(\alpha\) and of the coordinates shown before, checked as above;
for the start of a state \(x_i\), by a relation \(\sum_j \lambda_j \phi_j(g, u) + x_i \sum_k \mu_k \psi_k(g, u) = 0\) along every trajectory, \(\psi_k\) the monomials of one degree less, found and checked as the input-output relations, with \(\sum_k \mu_k \psi_k\) nonzero also at the start, and with coefficients rational in parameters already shown in \(F(\alpha)\): at the start, \(x_i(0) = -\sum_j \lambda_j \phi_j / \sum_k \mu_k \psi_k\), with \(\phi_j, \psi_k\) there polynomials in output coefficients and input values. Fixed starts join \(F\) the same way. Such a state \(x_i(t)\) is the same quotient along the whole trajectory, so the Taylor coefficients of the state lie in \(F\) as well, and it joins the observables of the relations that follow. After the relations among at most 40 of these monomials, the projection of \(x_i\) gives it: the relation of \(x_i\) with the derivatives \(g_r^{(k)}\), \(k < h_r\), of degree one in \(x_i\), found, interpolated and checked as a projection, with \(\sum_k \mu_k \psi_k\) nonzero at the start shown by the value at one point modulo a prime. Where \(x_i\) is algebraic of higher degree over these derivatives, the base takes also \(g_r^{(h_r)}\) of one observable, at a degree below the degree \(d_r\) of the projection of \(g_r\) in it: the monomials of lower degree in \(g_r^{(h_r)}\) are a normal form modulo the projection, so no multiple of it enters the kernel.
The relations are tried in the order: monomials of the item on input-output relations up to 120,
projections, the elimination, then the others up to 300; the relations of a start among the
monomials up to 40 and then up to 300, after the projection of the start. A configuration or a
profile that needs the derivative of one with more than 5000 terms is left out. The search ends at
the work limits search_entries, msolve_entries and elimination_terms, or where the relations are tried and none is found. Past a
limit the count is reported without the exact certificate, and the certificate names what was not
reached. A call of msolve fails past the address space memory of discrete(), 8 GiB by
default.
Constants of the model that are no coordinates are known symbols \(\kappa\): \(\mathbb{Q}\)
is replaced by \(\mathbb{Q}(\kappa)\) throughout, and the theorem holds for generic values of the
constants. info["discrete"]["certificate"]["exact"] lists the functions with their expressions,
the relations used and \(\alpha\), and complete: "exact". A short count modulo a prime comes first: where it equals the orbit of the proven candidates, or ends without a count, the
exact count is tried with the group of the candidates, and where it holds, neither the full count
nor the reconstruction of the maps runs. A second search, with the group of all exact maps, starts
from the functions the first one proved to lie in \(F\).
Where the search stops before \(L = F(\alpha)\) is shown, the functions \(f_1, \dots,
f_m\) it proved to lie in \(F\) are counted instead of expressed. Every point of \(T\) has
the values \(f_i(\theta)\), so \(T\) lies in the fiber of \(\theta \mapsto (f(\theta),
c_0(\theta), \dots, c_N(\theta))\) for any orders \(N\), the starts entering through the output
coefficients. The orders are those of the rank criterion with the gradients of the \(f_i\) in the
basis first, so that the \(f_i\) stand for the higher coefficients; the route runs only where
they lower the orders. The \(f_i\) of least degree whose gradients raise the rank, with as many
more, are counted first, then all of them. As in the count, the orders start one above and rise,
at most to those of the rank criterion of the outputs alone, until the count modulo the prime at a
random point is below \(2|G|\); then the count over
\(\mathbb{Q}\) of the next paragraph, with these \(f_i\) as pins, bounds \(|T|\), and
a count \(k\) with \(|G| \le k < 2|G|\) gives \(|T| = |G|\), since \(|G|\) divides
\(|T|\) (The orbit in Several experiments). The smaller variety of the bound takes the
\(n\) rows from the \(f_i\) and the output coefficients, those of least degree first.
certificate["pinned"] lists the functions counted, the orders, the counts modulo the prime and
over \(\mathbb{Q}\), the bound with the bits of the point and the Bezout number, or why the
route gave none.
Coefficients of a large projection, verified. Where the elimination gives no relation for the observable of a projection with more than 1500 terms, a few coefficients of the projection join the \(f_i\) with an error bound. Let \(S\) be the support of \(r\) monomials \(\phi_j\) in the base functions \(b_v = N_v / \prod_k F_k^{e_{vk}}\), found as above.
(a) The Taylor coefficients of the \(\phi_j\) along the trajectory have rank \(r - 1\) at a random point modulo a prime, so at most one relation on \(S\) holds along the trajectory, and if one exists, the coefficients over one of them lie in \(F\) by Cramer’s rule, as above.
(b) The relation exists, verified. A trial takes \(r + 6\) random states and a random \(\theta\) modulo a prime \(q\) uniform among the primes from \(2^{29}\) to the largest engine prime. Times \(\prod_k F_k^{T_k}\), \(T_k = \max_j t_{jk}\), \(t_{jk} = \sum_v m_{jv} e_{vk}\), a row of the values of the \(\phi_j\) becomes the values of the polynomials \(P_j = \prod_v N_v^{m_{jv}} \prod_k F_k^{T_k - t_{jk}}\) of degree \(d_j\). Without a relation, the determinant of the first \(r\) rows is a nonzero polynomial in \(\theta\) and the states, of degree at most \(D = \sum_j d_j\) and with integer coefficients whose content is at most \(H\), \(\log_2 H \le \log_2 r! + \sum_j \log_2 \|P_j\|_1\), the norms bounded by those of the \(N_v\) and \(F_k\) cleared to integers. A kernel of the values makes it vanish at the point. At most \(\lceil \log_2 H / 29 \rceil\) of the primes divide the content, and the primes drawn from number at least \(N\) by \(x / \ln x < \pi(x) < 1.25506\, x / \ln x\) [33]; a row where a denominator vanishes is drawn again, which conditions on an event of probability \(a \ge 1 - (r + 6) \deg \prod_k F_k / (q - 1)\). So a trial shows a kernel with probability at most \(\varepsilon = D / ((2^{29} - 1)\, a) + \lceil \log_2 H / 29 \rceil / N\) by [12], and \(k = 5\) independent trials, each with a kernel of one vector, with probability at most \(\varepsilon^k\).
(c) The coefficients. Where a coefficient \(c_{j_0}\) is a monomial in the parameters, the others over it are Laurent polynomials. Axis lines through a random point, of 24 points at the start, show such a \(j_0\): the quotient of every other entry by it has a power of \(t\) as denominator on every line, which gives the range of the exponents of each entry per parameter. The entries with the fewest exponent vectors in their ranges are interpolated by Ben-Or and Tiwari [19] modulo two primes and rebuilt over \(\mathbb{Q}\), those whose gradients raise the rank first, until the rank of the gradients of all entries found on the lines, then as many more. At every trial of (b) each of them equals the entry of the kernel over entry \(j_0\). A wrong function \(w = M / (L\, \theta^a)\) would make \(M C_{j_0} - L\, \theta^a C_j\), with \(C\) the cofactors of the first \(r - 1\) rows, a nonzero polynomial that vanishes at the point, so a trial passes with probability at most \(\varepsilon_w\), as \(\varepsilon\) with the degree and the height of \(w\) added, and \(k\) trials with \(\varepsilon_w^k\).
These functions join the \(f_i\) of the count, and where they
are counted, the bound of the count is that over \(\mathbb{Q}\) plus \(\varepsilon^k\) and
\(\varepsilon_w^k\) per function counted. certificate["pinned"]["relation"] lists the
functions, the monomial \(j_0\), the trials, the kernels, \(D\), \(\log_2 H\) and the
probabilities, relation_bound their sum and count_bound_q the bound over
\(\mathbb{Q}\) alone.
The verified count#
Where the exact count is not found, the count is taken again over \(\mathbb{Q}\), by the rational parametrization of msolve, at an integer point \(\theta^\ast\) uniform in \(\{1, \dots, 2^b\}^n\). A count \(k\) there bounds the fiber:
with \(N_u\) the number of unknowns and \(D\) the Bezout number below; \(b \ge 64\)
is chosen so that the bound is at most \(10^{-6}\), up to \(b = 256\)
(count_bits, bezout). The bound holds for a model without events and switches, with every
start a coordinate, a number, a rational function of the coordinates or a jet of an unknown input
(Unknown inputs below), at orders no lower than those of the rank criterion; otherwise, or where the count differs, the count stays under the
axiom of Certificates and count_bound_why names the reason. msolve is taken to be
correct. The count over \(\mathbb{Q}\) calls msolve per block, plain and, where that fails, with a
separating linear form. Before a count, modulo a prime or over \(\mathbb{Q}\), a variable \(v\) that an
equation \(a v + b\, m\) sets to a monomial \(m\) free of \(v\) is substituted, a
coordinate only for a monomial in coordinates: on the variety \(v\) is a function of the other
unknowns, so the substitution maps the points one to one onto those of the smaller system, and
points with distinct coordinates keep distinct coordinates. The count, and the bound below, which
is computed for the system before the substitution, do not change. Equations of the fiber with more
than 400000 terms, or with a power, product or sum of series of more terms while they are built, or
with more than 10000 unknowns, are not counted: the count stops at that order, and limits names
the limit.
The system. The unknowns \(u = (x, z, w)\) are the coordinates, the derivatives of the states at the start and the variable of the saturation. The Taylor coefficients \(b(\theta)\) of the observables are rational functions; written over one denominator \(q(\theta)\), the equations of the fiber become \(F_1, \dots, F_s \in \mathbb{Q}[\theta, u]\): the equations of the model, the output equations \(\sum_l E_l(u)\, q\, b_{k-l} - q M_k(u)\) and \(w\, s(u) - 1\), with \(s\) the product of the coordinates and the denominators at the start. Their degrees in \(\theta\) follow from the recursion of the series run on degree bounds instead of values, a division adding the numerator of the divisor to the denominators. \(V = V(F) \subset \mathbb{A}^{n + N_u}\) has degree at most \(D = \prod_i \deg F_i\), by the Bezout inequality \(\deg(V \cap W) \le \deg V \deg W\) [21].
Step 1: the points of T are isolated. For \(\sigma \in T\) the point \(P_\sigma = (\theta, \sigma, z(\sigma), 1/s)\) lies on \(V\). The Jacobian of \(F\) in \(u\) has full column rank there: the equation \(\mathrm{den}(x)\, z_0 = \mathrm{num}(x)\) of a start rational in the coordinates has the coefficient \(\mathrm{den}(\sigma) \ne 0\), the equation of the derivative of order \(k + 1\) of a state has the coefficient \((k + 1) D_i(x_0)\), nonzero by the saturation, and no derivative of higher order, so the derivatives are local functions of \(x\); then the output equations have the Jacobian \(-E_0 \cdot \partial_x \Psi_N\) up to a triangular factor, and the rank criterion gives \(\operatorname{rank} \partial_x \Psi_N = n\) at a random point modulo a prime, so at every point whose coordinates are algebraically independent over \(\mathbb{Q}\), as those of \(\sigma\) are. So \(P_\sigma\) is an isolated point of \(V\) over \(K = \mathbb{Q}(\theta)\) and lies on the union \(V_0\) of the components of \(V\) of dimension \(n\) that dominate the coordinates, which has at most \(D\) points over \(\theta\).
Step 2: polynomials of bounded degree. For each unknown \(u_j\) the closure of the image of \(V_0\) under \((\theta, u) \mapsto (\theta, u_j)\) is a hypersurface \(V(E_j)\), \(E_j \in \mathbb{Q}[\theta, U]\) square-free, of degree at most \(D\), since a linear map does not raise the degree. A linear form \(\lambda(x)\) with integer coefficients separates the at most \(D\) values of \(x\) on \(V_0\) over \(\theta\); the image under \((\theta, u) \mapsto (\theta, \lambda(x))\) is \(V(E_\lambda)\), of degree at most \(D\), square-free in \(U\) over \(K\), so \(R_\lambda = \operatorname{Res}_U(E_\lambda, \partial_U E_\lambda) \in \mathbb{Q}[\theta]\) is nonzero, of degree at most \((2D - 1) D\).
Step 3: specialization. Let \(a_j\), \(a_\lambda\) be the leading coefficients in \(U\) and \(\Delta = a_\lambda R_\lambda \prod_j a_j\), nonzero of degree at most \((N_u + 2D) D\); by [12] \(\Delta(\theta^\ast) = 0\) with probability at most the right side of (1). Suppose \(\Delta(\theta^\ast) \ne 0\). The map \(\theta \mapsto \theta^\ast\) extends to a place of \(\bar K\) with residue field \(\bar{\mathbb{Q}}\) (Chevalley’s extension theorem). Every \(u_j\) of a point of \(V_0\) is a root of \(E_j\) with a leading coefficient nonzero at \(\theta^\ast\), so finite at the place, and the point maps to a solution of \(F(\theta^\ast, u) = 0\) with \(w\) finite, so away from the saturation. The values \(\lambda(x)\) are the roots of \(E_\lambda\), and with \(a_\lambda R_\lambda \ne 0\) at \(\theta^\ast\) they stay distinct. The series at \(\theta^\ast\) is the same recursion as over \(K\); without a division by zero, \(q(\theta^\ast) \ne 0\) and the values are those of \(b\), so the system solved is \(F(\theta^\ast, \cdot)\) up to nonzero factors. The substitutions of the fixed variables, the derivatives that leave with their equation and the saturation by one variable per block keep the values of \(x\). The system solved then has at least \(|T|\) points with distinct \(x\), and the count of msolve, the degree of the rational parametrization, at least the number of distinct solutions, is at least \(|T|\). Counted by stages, each point of a stage is exact and rational, and the sum over these points of the degrees of the rest is at least the number of points with distinct \(x\), again at least \(|T|\).
A smaller variety. The same steps hold for \(V' \subset \mathbb{A}^{n} \times \mathbb{A}^{n + 1}\) in \((\theta, x, w)\), cut out by \(n\) output equations \(\mathrm{num}_i(x)\, \mathrm{den}_i(\theta) - \mathrm{num}_i(\theta)\, \mathrm{den}_i(x)\) whose gradients in \(x\) are independent at a random point modulo a prime, and by \(w\, s'(x) = 1\), \(s'\) the product of the coordinates, the denominators of the starts and the denominators of the right-hand sides and observables at the start. A point of \(T\) is an isolated point of \(V'\) over \(K\), since these gradients are independent at every point with algebraically independent coordinates. A point of \(T\) satisfies every output equation, so the specialization of the point, with \(s' \ne 0\) there, gives the derivatives at the start and a solution of the system solved. With \(D' = (1 + \deg s') \prod_i \deg(\mathrm{num}_i\, \mathrm{den}_i)\) and \(n + 1\) unknowns in place of \(D\) and \(N_u\), the smaller of the two bounds is used.
Pins. A function \(f = a/b\) that the search of the exact count proves to lie in \(F\) takes the same value at every point of \(T\): with \(f = A(c)/B(c)\) and \(c(\sigma) = c(\theta)\), \(f(\sigma) = f(\theta)\). The count, the counts at the sample points and the verified count therefore add the equation \(a(x)\, b(\theta) - b(x)\, a(\theta)\) per such function, of degree at most \(2 \max(\deg a, \deg b)\) in \((\theta, x)\), which only removes points outside \(T\); a coordinate so proven becomes the linear equation \(x_i = \theta_i\) and is substituted. Every point of \(T\) satisfies these equations, so Steps 1 to 3 hold for \(V\) with them, and the smaller variety takes the \(p\) pinned coordinates, each of degree one, with \(n - p\) output equations whose gradients are independent modulo the pinned columns, \(D' = (1 + \deg s') \prod_i \deg(\mathrm{num}_i\, \mathrm{den}_i)\) over these \(n - p\) equations.
Unknown inputs. The jets \(v\) of the inputs that the output coefficients read (Unknown inputs in the count below) are coordinates of the point, drawn uniform in \(\{1, \dots, 2^b\}\) with \(\theta^\ast\), and \(K = \mathbb{Q}(\theta, \hat v)\); the jets above them are zero in the system and at the point. The unknowns \(u\) add these jets and the derivatives of the chains, and \(D\) takes the degrees in \((\theta, \hat v, u)\), the series run on degree bounds with the jets of the point as variables. Step 1 needs the Jacobian of the output coefficients in \((x, v)\) of full column rank \(n + q\), \(q\) the number of jets read; it is checked at a random point modulo a prime, and a minor that is not zero there is not zero over \(\mathbb{Q}\), so the rank holds at every point with algebraically independent coordinates. A point \((\sigma, v_\sigma)\) with the output of \((\theta, \hat v)\) is one: \((\theta, \hat v)\) is an isolated solution of \(b(\cdot) = b(\sigma, v_\sigma)\), so algebraic over \(\mathbb{Q}(\sigma, v_\sigma)\), which therefore has transcendence degree \(n + q\). The derivatives of the states and of the chains are local functions of \((x, v)\) as before, the chain equations having the coefficient \(k + 1\). Steps 2 and 3 hold as stated with \(\theta\) replaced by \((\theta, \hat v)\); the bound of Equation (1) keeps the same form, since it does not depend on the number of coordinates of the point. The smaller variety is not used, since the output equations of that variety are in \(x\) alone.
Several experiments#
The fiber of one experiment needs the Taylor coefficients up to an order near the number of coordinates over the number of observables, and the degrees of the equations grow with the order. Experiments that share the parameters need lower orders: \(K\) copies of the model with the parameters \(\theta\) shared and starts \(x_0^1, \dots, x_0^K\) of their own, each with another draw of the known inputs. Let \(T(\theta, x_0)\) be the fiber of one experiment, \(T_K\) the fiber of the \(K\) experiments at \((\theta, x_0^1, \dots, x_0^K)\), and \(\pi\) the projection onto \((\theta', x_0'^1)\); always \(\pi(T_K) \subseteq T(\theta, x_0^1)\). The route takes a model with one condition and no events, switches or clock in the equations, every state with a free start: a coordinate that nothing else reads [34, 35].
Proposition 1. If \(\dot x = f(x, \theta, u)\) at a constant input \(u\) has no nonconstant rational first integral over \(\mathbb{Q}(\theta, u)\), then \(\pi(T_K) = T(\theta, x_0^1)\) at a generic point.
Proof. Let \(\kappa\) be the jets of the known inputs at the start, \(\Theta'(\theta, x_0, \kappa)\) the finite set of the \(\theta'\) of \(T(\theta, x_0)\), and \(e\) the coefficients of \(\prod_{\theta' \in \Theta'} (Z - \lambda(\theta'))\) for a linear form \(\lambda\). \(T\) is cut out by finitely many output equations over \(\mathbb{Q}( \theta, x_0, \kappa)\) and is stable under the automorphisms of the algebraic closure over this field, so \(e \in \mathbb{Q}(\theta, x_0, \kappa_0, \dots, \kappa_M)\) for some \(M\). The experiment that starts at time \(s\) from \(x(s)\), with the jets \(\kappa(s)\) of the inputs there, has the output shifted by \(s\), for \(\theta\) and for every \(\theta' \in \Theta'\); so \(\Theta'\) is constant along the flow of \(X = f \cdot \partial_x + \sum_j \kappa_{j+1} \partial_{\kappa_j}\), and \(X e = 0\). In \(X e\) only \(\kappa_{M+1} \partial_{\kappa_M} e\) reads \(\kappa_{M+1}\), so \(e\) does not read \(\kappa_M\), and down to \(\kappa_0\): \(f(x, \theta, \kappa_0) \cdot \partial_x e = 0\) for every \(\kappa_0\), a rational first integral at a constant input, so \(e \in \mathbb{Q}(\theta)\). \(\Theta'\) therefore does not depend on the starts or the inputs: for \((\theta', x_0'^1) \in T(\theta, x_0^1)\) each experiment \(k\) has an \(x_0'^k\) with \((\theta', x_0'^k) \in T(\theta, x_0^k)\), and these form a point of \(T_K\) over \((\theta', x_0'^1)\). \(\square\)
Conservation laws. Where linear forms \(\ell(x) = C(\theta)\, x\) in the states, \(C\) of rank \(c\) with entries rational in the parameters, satisfy \(C f = 0\) identically in the states and inputs, symident finds a basis of them over \(\mathbb{Q}(\theta)\) and takes the premise on the level sets: if the system restricted to \(\ell = \gamma\) has no nonconstant rational first integral over \(\mathbb{Q}(\theta, \gamma, u)\), every rational first integral \(h\) of \(f\) is a function of \(\ell\), since \(h\) restricted to a generic level set is constant there. The pairs \((\theta', \ell_{\theta'}(x_0'))\) over \(T(\theta, x_0)\) are then, as in the proof, functions of \((\theta, \ell_\theta(x_0))\) alone, \(\ell_{\theta'}\) being constant along the flow at \(\theta'\); so the experiments start on the level set of the first: per law, a pivot state of the reduced echelon form of \(C\) starts at the value that makes \(\ell(x_0^k) = \ell(x_0^1)\), a rational function of the coordinates, and Proposition 1 holds for the fiber of these experiments.
The twisted oscillator \(\dot x_1 = (\omega + x_3) x_2\), \(\dot x_2 = -\omega x_1\), \(\dot x_3 = 0\), \(h = (x_2, x_3)\) of [34] (Example 2.7) shows that the premise is needed: \(x_3\) is a first integral, one experiment leaves \(\omega\) and \(-(\omega + x_3)\), and two experiments with different \(x_3\) leave \(\omega\) alone.
The premise at one point. A system \(\dot x = F(x)\) analytic at an equilibrium \(x^\ast\) has at most as many functionally independent rational first integrals near \(x^\ast\) as the dimension of the span of \(\{k \in \mathbb{Z}^n \setminus 0 : \sum_i k_i \lambda_i = 0\}\), \(\lambda\) the eigenvalues of \(DF(x^\ast)\) [36] (Theorem 1): none where the eigenvalues are linearly independent over \(\mathbb{Z}\). The parameters (the constant inputs and known constants among them) where \(F\), cleared of denominators, has a nonconstant rational first integral \(A/B\) with \(\deg A, \deg B \le d\) form a closed set \(S_d\) defined over \(\mathbb{Q}\): \(A/B\) is one exactly where \(A \wedge B \ne 0\) and \(B\, L A - A\, L B = 0\), \(L\) the Lie derivative, a condition linear in \(A \wedge B\) and so closed on the Grassmannian of planes of polynomials of degree at most \(d\), whose projection onto the parameters is closed since the Grassmannian is projective. A point \(\theta^\ast\), rational or algebraic, outside every \(S_d\) puts a generic point outside every \(S_d\): the premise of Proposition 1 holds.
The test. symident takes the constant inputs at random values and the equilibrium first: the states at random values away from zero, the parameters in products of parameters at random values until the balances are linear in the others, and those solved over the field \(F\) of the point (\(\mathbb{Q}\), or \(\mathbb{Q}(\alpha)\) below), in a random order of the parameters; a point that forces a parameter to zero is not taken. Where the balances have no such solution, it draws \(\theta^\ast\), solves \(f = 0\) and \(\ell = \gamma^\ast\) at random \(\gamma^\ast\) with msolve over \(\mathbb{Q}\), and takes each Galois orbit of the at most 120 equilibria as a number field \(F = \mathbb{Q}[s]/(W)\), \(W\) monic over \(\mathbb{Z}\) of degree at most 12. \(J = Df(x^\ast)\) over \(F\) splits into diagonal blocks, the strongly connected components of the nonzero entries. \(CJ = 0\) gives \(J\) the eigenvalue 0 at least \(c\) times, and the eigenvalues of \(J\) on the tangent space of the level set are the others. With \(\chi_j\) the characteristic polynomial of block \(j\) without the factor \(z^{m_j}\), \(\sum_j m_j = c\), of degree \(n_j\), these eigenvalues are linearly independent over \(\mathbb{Q}\) if
the Galois group of each \(\chi_j\) over \(F\) acts 2-transitively on the roots,
the splitting fields \(L_j\) of the blocks with \(n_j \ge 2\) are pairwise distinct, and
the traces \(t_j\) of the blocks are linearly independent over \(\mathbb{Q}\).
Proof. The group \(G\) of the compositum over \(F\) permutes the eigenvalues, so the \(F\)-linear relations among them form a submodule \(R\) of \(\bigoplus_j F^{n_j}\). \(F^{n_j}\) is the trivial module plus \(V_j\), the vectors of sum zero, which is absolutely irreducible since the permutation character of a 2-transitive group is the trivial character plus an irreducible one [37] (Chapter 5); \(G\) acts on \(V_j\) faithfully through \(\mathrm{Gal}(L_j/F)\), so by (b) the \(V_j\) are pairwise non-isomorphic. \(R\) is the sum of the intersections of \(R\) with the isotypic parts. \(R \supseteq V_j\) would make two roots of \(\chi_j\) equal, which is irreducible by (a) and so separable; so \(R\) lies in the span of the block sums, and a relation over \(\mathbb{Q}\) is \(\sum_j c_j t_j = 0\) with \(c_j \in \mathbb{Q}\), which (c) excludes. \(\square\) For one block this is a case of [38]: with the Galois group \(S_n\), the only linear relation among the roots is a vanishing trace.
(a) and (b) follow from Frobenius elements. At a prime \(\mathfrak{p} = (p, s - \tau)\) of
degree one, with \(W\) square-free modulo \(p\) (so that \(\mathbb{Z}[s]\) is maximal at
\(p\)), the entries of \(J\) integral at \(p\) and \(\chi_j\) square-free modulo
\(\mathfrak{p}\), the degrees of the irreducible factors of \(\chi_j\) modulo
\(\mathfrak{p}\) are the cycle type of a Frobenius element on the roots (Dedekind,
[39], Chapter I). Reduction commutes with the characteristic polynomial, so it is taken
of \(J\) modulo \(\mathfrak{p}\). The multiplicity of the eigenvalue 0 of a block over
\(F\) is at most the one modulo \(\mathfrak{p}\), and the multiplicities add up to at least
\(c\); a prime where those modulo \(\mathfrak{p}\) add up to \(c\) gives the
\(m_j\). An \(n_j\)-cycle makes the group transitive, an \((n_j - 1)\)-cycle then
2-transitive; a cycle type with one 2-cycle and odd cycles otherwise gives a transposition, and the
group is \(S_{n_j}\) (group). Equal splitting fields would let one Frobenius element act on
both blocks, with the same order: a prime at which the orders differ proves (b). The primes are read
from 10007 on, at most 3000 prime ideals. Rational traces of two blocks are always dependent over
\(\mathbb{Q}\), and so are traces that an identity of the balances ties with a factor rational
in the states; where (c) fails with \(r\) blocks, the point is drawn again in
\(\mathbb{Q}(\alpha)\), \(\alpha\) a root of an irreducible polynomial of degree \(r\),
the states of a chosen equilibrium as well. The test refuses, with the reason, where the eigenvalue
0 is more frequent than the laws give (a state without dynamics is a law) or a single trace is 0,
the equilibria form a family, or the primes read do not show the cycles.
info["discrete"]["experiments"]["first_integrals"] holds \(\theta^\ast\), \(F\), the
equilibrium and per block the primes of the cycles.
The count. For \(K = 2, \dots, \min(8, \lceil n_\theta / n_y \rceil + 1)\), \(n_\theta\) the coordinates other than the starts and \(n_y\) the observables, the stacked model gets the orders of the rank criterion; the \(K\) with the lowest highest order is taken, the fewest experiments among equal ones, and the orders rise as in the count of one experiment. The count modulo \(p\) is that of the distinct values of a random linear form in \((\theta', x_0'^1)\) on the points of each block (the projection of a product is the product of the projections); a coordinate outside the projection is substituted as a jet is, a coordinate inside only for a monomial in the coordinates inside, and a count by stages adds the counts of the rest over the points of a stage, at least the number of distinct projections.
The verified count. (1) holds for the \(K\) experiments as one model, with the projection: in Step 2, \(\lambda\) is a linear form in \((\theta', x_0'^1)\) that separates the projections of the at most \(D\) points of \(V_0\) over \(\mathbb{Q}( \theta, x_0^1, \dots, x_0^K)\), and in Step 3 the values of \(\lambda\) stay distinct at the random point, so the solutions there have at least \(|\pi(T_K)|\) distinct projections, with \(D\) and \(N_u\) those of the stacked system. Over \(\mathbb{Q}\) a block of at most 64 points counts the distinct values of the projected coordinates on the points of the rational parametrization: with \(w\) the square-free eliminating polynomial, \(\mathbb{Q}[t]/(w)\) is the algebra of functions on the points, and the dimension of the subalgebra the projected coordinates generate, found by exact linear algebra, is the number of their distinct values; a larger block counts all points. Either count bounds \(|\pi(T_K)|\), and by Proposition 1 it bounds \(|T|\).
The orbit. The exact maps form a group \(G\) that acts on \(T\) without fixed points at a
generic point: an element that fixes a point of \(T\) fixes a point with algebraically
independent coordinates and is the identity. So \(T\) is a union of orbits of \(|G|\)
points, \(|G|\) divides \(|T|\), and a count below \(2|G|\) proves \(|T| = |G|\):
count_final, complete: "verified" with count_bound where the count over
\(\mathbb{Q}\) is below \(2|G|\), else "axiom". The certificate lists the route
(route: the number of experiments, the orders, the count and the premise) and adds the premise
and the divisibility to proven. experiments of discrete() takes
the route first, with True or a number of experiments; by default it runs where a short count of
one experiment finds none, after the exact count and before the full count. Where the count of one experiment fails too, the count of the experiments stands for it
without maps. A fixed start (a known initial value, a start at rest, \(\nu(0) = 1\) of the
relaxed model, a start fixed by a reduction), events, conditions, switches or the clock in the
equations leave the route out, and info["discrete"]["experiments"]["why"] names the reason.
Monodromy and certified points#
Where the exact maps have an orbit smaller than the count, or no count exists, points of the fiber
are proposed numerically at a random rational point \(\theta^\ast\). The coefficients are
evaluated by the recursion of the series in complex floating point, with gradients in the
coordinates, never expanded. \(n\) coefficients \(c_I\) whose gradients are independent at a
random point modulo a prime, lowest order first, form a square system \(c_I(x) = w\). The
coordinates range over \(\mathbb{C}^n\), which is irreducible, so the monodromy group of
\(c_I\) acts transitively on the fiber of \(c_I\) over a value off the branch locus
[40]: from \(x = \theta^\ast\) over \(w_0 = c_I(\theta^\ast)\), the known points are
tracked along the triangle \(w_0 \to w_1 \to w_2 \to w_0\), \(w_1, w_2\) random complex
vectors, by an Euler predictor and a Newton corrector with step control, and the end points join
the known ones, until five triangles add none or as many points of the fiber as the count are
known. This runs where \(c_I\) has at most 200 points modulo a prime at a random point, since
the fiber of \(c_I\) holds the fiber of the model several times over; otherwise, or where it
stops short, the points are the roots of the rational parametrization of msolve over
\(\mathbb{Q}\) at \(\theta^\ast\), taken numerically. A point is kept where every coefficient
up to the order of the count agrees with the one at \(\theta^\ast\) to a relative
\(10^{-7}\). info["discrete"]["monodromy"] lists the number of points, the source, the
number of points of \(c_I\) modulo the prime, the boxes below and the maps.
Proposition (Krawczyk [41, 42, 43]). Let \(\phi: U \to \mathbb{C}^n\) be holomorphic, \(X \subset U\) a product of closed complex rectangles \(X_i\) with radii \(r_i > 0\), \(m \in X\), \(Y\) a complex \(n \times n\) matrix and \(J(X)\) a matrix of rectangles that holds \(\partial \phi(\xi)\) for every \(\xi \in X\). Let \(E = I - Y J(X)\) and \(K = m - Y \phi(m) + E\, (X - m)\) in rectangle arithmetic. If \(K_i\) lies in the interior of \(X_i\) and \(\sum_j |E_{ij}|\, r_j < r_i\) for every \(i\), with \(|E_{ij}|\) the largest modulus on the rectangle, then \(\phi\) has exactly one zero in \(X\), and \(\partial \phi\) is invertible there.
Proof. Let \(k(x) = x - Y \phi(x)\). For \(x, x' \in X\) the segment between them lies in the convex \(X\), and \(\phi_l(x) - \phi_l(x') = \int_0^1 \partial \phi_l(x' + s(x - x'))\, ds\, (x - x')\); the integral lies in the closed convex row \(J_l(X)\). So \(k(x) - k(x') = (I - Y \bar J)(x - x')\) with every row of \(\bar J\) in \(J(X)\), the entries of \(I - Y \bar J\) lie in those of \(E\), and in the norm \(\max_i |v_i| / r_i\) the map \(k\) is a contraction on \(X\). With \(x' = m\), \(k(x) \in K \subset X\). By Banach’s fixed point theorem \(k\) has exactly one fixed point \(x^\ast\) in \(X\). The row sums give \(\|I - Y \bar J\| < 1\) for every such \(\bar J\), so \(Y \bar J\) and \(Y\) are invertible: \(Y \phi(x^\ast) = 0\) gives \(\phi(x^\ast) = 0\), every zero of \(\phi\) in \(X\) is a fixed point of \(k\), and \(\partial \phi(x^\ast)\) is invertible. \(\square\)
For a kept point \(\hat x\), \(\phi = c_{I'} - c_{I'}(\theta^\ast)\) with \(n\) rows
\(I'\) of the coefficients up to the order of the count, chosen by a QR decomposition with
pivoting of the Jacobian at \(\hat x\) with rows of unit norm, \(m = \hat x\), \(Y\) a
floating-point inverse of the Jacobian at \(\hat x\) and radii \(10^{-10}\) and then
\(10^{-7}\) times \(1 + |\hat x_i|\). \(\phi(m)\) and \(J(X)\) are evaluated by the same
recursion in rectangle arithmetic: every operation in IEEE double precision is correctly rounded, so
the result moved by one floating-point number outward encloses the exact one, and the enclosures
hold the exact values for every point of the operands; \(\theta^\ast\) and the constants enter
as enclosures of the rationals. Boxes with disjoint rectangles in some coordinate hold distinct
zeros, so the boxes kept, pairwise disjoint, prove that many simple zeros of \(\phi\)
(certified). These are zeros of the square system: a point of the fiber needs every
coefficient equal, an identity that no enclosure shows, since an overdetermined system loses the
solutions under any perturbation. The certified boxes are therefore no lower bound of the count;
the lower bound is the orbit of the exact maps. Where the enclosures of the recursion grow past the
radii, the point stays without a box.
A map is read from a point \(\hat x \ne \theta^\ast\): each image coordinate is matched to
\(c\, \theta_j^{\pm 1}\) or \(\theta_i + d\) with Gaussian rationals \(c, d\) of
denominators up to 12 that reproduce \(\hat x_i\), and a combination is kept where the
coefficients at two random points and their images agree to a relative \(10^{-7}\). Nothing is
concluded from these numbers: a map proposed so is exact once the identities of Maps between the points of the fiber
hold over \(\mathbb{Q}(i)(x, \theta)\), and then joins the group \(G\). A map
over \(\mathbb{Q}(i)\) whose image of a real point is not real never meets \(\Theta\). For
such maps the theorem of the exact count holds as stated: the proof uses that the orbit of
\(\theta\) lies in \(T\) and has \(|G|\) points, that \(P_\alpha \in F[Z]\), whose
coefficients are checked to lie in \(\mathbb{Q}(\theta)\), and that \(L = F(\alpha)\).
Certificates#
info["discrete"]["certificate"] states what the count rests on, and complete sums it up:
"exact"the field fixed by the exact maps lies in the field of the output coefficients (The exact count), so the fiber at a generic point is the orbit of the exact maps; no random step enters.
"verified"a count over \(\mathbb{Q}\) at a random integer point equals the orbit, directly (The verified count) or for several experiments (Several experiments), with the probability
count_boundthat the fiber at a generic point has more points."axiom"the count holds under an axiom: that the count modulo the prime at a random point is the count over \(\mathbb{C}\) at a generic point, or a premise of the rewrites (
premise), such as the algebraic independence of the starts of new coordinates;count_bound_whynames the reason."no"the count exceeds the orbit of the exact maps: further points exist at the sample point, and the maps between them are not proven.
"open"no count or no orbit was reached;
limitsnames the work limits that stopped the analysis.
count_final is true where the exact maps account for every point of the count. Each map has a
level: exact with a map of the states (Maps between the points of the fiber), checked where the coefficients
agree at random points. preserves_domain and domain_conditions say whether the map keeps
\(\Theta\), and count_domain gives the number of points of the fiber in
\(\Theta\) where it is exact. The rewritten model and the result in it are listed under
rewrites, relaxed and start_powers.