When do all recursive field guards stabilize?

A recursive value may have a finite convex typing at every safe ground caller, even though no finite public polyhedron describes all its safe callers. For a family with any number of isometric recursive fields we can decide which behaviour occurs. The criterion uses the part of the guard normal that every field fixes.

A shared guard and expanding slack

Let a node have public rational indices \((p,t)\), with \(p\in\mathbb Q^d\), \(t\ge1\) and guard \(a\cdot p\le1+t\). Take \(a\ne0\). Each of finitely many recursive fields maps \((p,t)\) to \((O_e p,r_e t)\), where \(O_e\) is a rational orthogonal matrix and every rational \(r_e>1\). There is at least one field. For a word \(w\) of fields put \(a_w=O_w^T a\) and \(r_w=\prod_{e\in w}r_e\). The empty word has \(a_w=a\) and \(r_w=1\). An exact unfolding through depth \(j\) imposes all guards of word length less than \(j\). The limiting predicate is the greatest safe domain on \(t\ge1\). This is the maximal output admissible set for these switched linear updates with the stated guard. Gilbert and Tan on maximal output admissible sets · The single-rotation instance and its exact depths

At \(t=1\), take the convex hull \(H\) of zero and all \(v_w=a_w/(1+r_w)\). This hull is compact. The nonzero points have zero as their only possible accumulation point along words of unbounded length, since \(r_w\ge (\min_e r_e)^{|w|}\). The safe slice is the polar \(H^\circ\). It contains a ball about zero, so its rational points are dense and we may take the real polar. A finite subset of word guards describes the slice exactly when its scaled normals together with zero generate \(H\).

The same subset describes every slice \(t\ge1\). Express each omitted \(v_w\) as a convex combination allowing zero. After undoing the scalings we have \(a_w=\sum_i c_i a_i\) and \(\sum_i c_i(1+r_i)\le1+r_w\) with \(c_i\ge0\). All the normals have the same nonzero Euclidean length, hence \(\sum_i c_i\ge1\). It follows that \(\sum_i c_i r_i\le r_w\). The weights prove the omitted guard at every larger slack. If the slice is any polyhedron at all, polarity makes \(H\) a polytope. Its extreme points belong to the compact generating set, so a finite set of word guards suffices. A finite public polyhedron, finite determination by unfolding, and polytopality of \(H\) are therefore equivalent here. Unit-slice transfer in Lean

The fixed part of the guard decides stabilization

Write \(F=\bigcap_e\ker(O_e^T-I)\) and let \(f\) be the orthogonal projection of \(a\) on \(F\). The exact public iteration stabilizes if and only if \(f=0\) or the orbit of \(a\) is finite.

First, \(H\) is a polytope exactly when finitely many actual orbit directions generate the positive cone of all orbit directions. One implication follows by taking the positive cone of its finite vertex set. For the converse, take scaled representatives of a finite conical generating set and add zero. Their convex hull contains its cone in a sufficiently small ball about zero. Indeed, facets through zero already hold on the cone, and every other facet has positive distance from zero in the span. All sufficiently long words fall inside this hull. Only finitely many shorter words remain to be added.

If \(f\ne0\), every \(a_w\) lies on \(f\cdot y=\lVert f\rVert^2\). Intersect the cone with this hyperplane. Every distinct \(a_w\) is an exposed point of the section, since its dot product with itself is strictly larger than with any other point of the orbit. An infinite orbit therefore gives infinitely many extreme rays. A finite orbit directly supplies a finite generating set.

If \(f=0\), take the closed convex hull \(C\) of the unscaled orbit. Each field preserves \(C\) onto itself. Positive powers of an orthogonal map approximate the identity by compactness, so the closure of the semigroup contains its inverse. The centroid of \(C\) in its affine hull is therefore fixed by all the fields. The whole orbit is perpendicular to \(F\), so this centroid is zero. A compact convex body’s centroid lies in its relative interior: a supporting hyperplane through the centroid would put a positive-volume subset strictly to one side. Thus \(C\) contains a relative ball about zero. Finitely many actual orbit points have zero in the interior of their convex hull in that span. For example, approximate the vertices of a small cross-polytope inside the ball by finite convex combinations of orbit points, keeping the approximation smaller than its inradius. These points positively span the entire orbit span, as required.

This criterion is effective over the rationals. Linear equations give \(f\). For the other test compute the reachable linear span of dimension \(k\) by closing a basis under the field transposes. If the orbit is finite, the restrictions of the field maps permute a finite spanning set faithfully, so their group is finite. A finite subgroup of \(\mathrm{GL}_k(\mathbb Q)\) preserves a full lattice, obtained by summing the images of the integer lattice in a rational basis. It embeds in \(\mathrm{GL}_k(\mathbb F_3)\) by reduction modulo three on that lattice. For the last step, a nontrivial element in the kernel of prime order \(p\) would be \(I+3^sB\), \(s\ge1\), with \(B\) nonzero modulo three. Taking its \(p\)th power modulo \(3^{s+1}\) forces \(p=3\). Cubing modulo \(3^{s+2}\) is then impossible. Thus breadth-first enumeration can stop on closure or after exceeding \(|\mathrm{GL}_k(\mathbb F_3)|<3^{k^2}\) distinct vectors. This bound establishes decidability. A single infinite-order action on the guard can give a much shorter proof in a given input. Serre on Minkowski’s lemma and finite rational matrix groups

The criterion also applies when the public basis hides the metric. For rational field matrices \(T_e\), solve the simultaneous linear equations \(T_e^T Q T_e=Q\) on symmetric matrices. The rational solution space contains a positive-definite matrix exactly when its real span does. Positive definiteness is open, so rational approximation within the solution space suffices. Feasibility can be decided by testing positivity of the leading principal minors over the reals. Such a \(Q\) makes the fields orthogonal after a real change of basis and gives the corresponding dual metric \(Q^{-1}\) on guard normals. The fixed-space projection and orbit enumeration can both be carried out in the original rational coordinates. The seed construction below uses any rational upper bound on the ratio between the resulting norm and the coordinate norms in both directions. Discovering a preserved quadratic from field equations

Every safe individual caller still has a convex typing

Let \(b=1/\lVert a\rVert_1\) and \(B=\{t\ge1,\ \lVert p\rVert_\infty\le b t\}\). This rational box implies the guard. Choose \(m\) with \((\min_e r_e)^m\ge\sqrt d\). Every word of length \(m\) sends \(B\) back into \(B\), since \(\lVert O_w p\rVert_\infty\le\lVert p\rVert_2\le\sqrt d\,\lVert p\rVert_\infty\). The intersection \(S=\bigcap_{|w|<m} f_w^{-1}(B)\), where \(f_w(p,t)=(O_w p,r_wt)\), is consequently a rational convex, one-step inductive seed.

For a fixed rational caller \((p_0,t_0)\) choose \(N\) such that \(b(\min_e r_e)^N t_0\ge\lVert p_0\rVert_2\). Every descendant at depth \(N\) lies in \(S\), because its entire future lies in \(B\). Check the finitely many guards before \(N\). A failure gives an unsafe word. On success, unfolding the guarded predecessor of \(S\) exactly \(N\) times gives an inductive rational polyhedron containing the caller. This argument also works uniformly for a family of callers with a common bound on \(\lVert p_0\rVert_2/t_0\). Thus even in the nonstabilizing case the greatest safe domain is the union of its conjunctive polyhedral typings. General induction from a seed in Lean

When \(f=0\), the increasing seed iteration can recover the whole greatest safe domain as well. Work on the span \(W\) of the normals. Its orthogonal complement is invisible to the guard and invariant under the fields, so the seed may ignore that component. The finitely many positively spanning normals imply a constant bound on \(\lVert \operatorname{proj}_W p\rVert_2/t\) for all safe tuples with \(t\ge1\). Indeed, a relative ball about zero lies in their convex hull, while their guards bound their dot products with \(p/t\) uniformly. The preceding \(N\) now works for the whole safe domain. A rational implementation can use the infinity norm of the projected vector in the original coordinates. Orthogonal projection onto the rational subspace \(W\) is rational.

The increasing and decreasing iterations can have very different depths. In the slowly turning three-index family, the box used above is \(\lVert p\rVert_\infty\le t\). Every descendant of the fixed caller has \(\lVert p\rVert_\infty\ge\sqrt2\). The caller therefore cannot reach \(S\) before \(\lambda^N\ge\sqrt2\), and it certainly reaches \(S\) once \(\lambda^N\ge2\). With \(\lambda=1+2^{-3n}/16\), the increasing iteration takes \(\Theta(2^{3n})\) rounds just to include this caller, against \(\Theta(2^n)\) for stabilization from the public guard. Both counts concern exact predecessor updates with the specified initial predicates. An induction jump that changes the representation can follow a different sequence. Matching bound from the guard

For an example take \(a=(1,0,1)\) and one field that rotates the first two coordinates by \((3/5,4/5)\), fixes the third and doubles \(t\). Its fixed axis contributes \((0,0,1)\) to \(a\). The rotation has infinite order. In Gaussian integers \((3+4i)^2\equiv3+4i\pmod5\), so every positive power of \((3+4i)/5\) retains a denominator divisible by five. The exact public domains never stabilize. Adding one more recursive field makes them stabilize. Let the new field negate the third coordinate, fix the other two and double \(t\). Now the common fixed subspace is zero. Both programmes have finite certificates at each safe ground caller. Exact switched example replay

One family of callers can require more than all its ground instances

Return to the one-field example with its fixed third coordinate \(z\). Every member of \((s,0,-2s,1)\), \(s\ge0\), is safe: every future planar \(x\) coordinate is at most \(s\). No finite convex polyhedral typing covers the whole family. The obstruction persists at this strict radial margin. In source terms the caller asks for

let family : ∀m[0≤m]. Node (m,0,-2 m,1) = node

Each fixed \(s\) permits its own inductive typing. This annotation requires one typing of node for all \(s\). It gives a source example of the distinction between pointwise witnesses and uniform coverage at a designated parameter. Witness compatibility in the repair to Theorem 4.5

Indeed, let \(E\) be any nonempty convex polyhedral typing and let \(K=\operatorname{rec}(E)\). The field preserves \(K\), and \(K\) satisfies the homogeneous guard \(\Delta x+\Delta z\le\Delta t\). Suppose \(K\) contains a direction \((u,v,z,0)\) with nonzero planar component. Intersect \(K\) with the plane at this fixed \(z\) and \(\Delta t=0\). All positive rotations preserve this closed section. The rotation is dense on the circle, so all rotations preserve it. Their guard bounds it by the disk of radius \(-z\). A bounded convex polygon preserved by all rotations can only be the origin: a nonzero point of maximum norm would give infinitely many exposed points. Yet the section contains \((u,v)\). Covering the whole ray would put \((1,0,-2,0)\) in \(K\), a contradiction. Finitely many disjuncts and private linear indices do not help, since projection and closed convex hull would give an inductive public polyhedron. In a quadratic language the three public inequalities \(z\le0\), \(x^2+y^2\le z^2\) and \(t\ge1\) cover the whole ray. Fixed-axis quadratic certificate in Lean

This gives a decision test for arbitrary nonempty rational polyhedral caller families \(C\subseteq\{t\ge1\}\) on this example. Every recession direction with \(\Delta t=0\) must lie on the negative \(z\) axis, including zero. Conversely, suppose they all do. There is no lineality, since both signs of a nonzero direction cannot lie on that ray. Write \(C=D+K_0\) using its vertices and recession rays, putting the zero-slack rays in \(K_0\) and retaining every vertex and positive-slack ray in \(D\). On \(D\) the ratio \(\lVert p\rVert_2/t\) is bounded by the largest ratio on a vertex or a retained ray. Thus the finite-depth test above either finds an unsafe member of \(D\) or supplies a common inductive polyhedron \(P\). In the latter case \(P+K_0\) covers \(C\), is polyhedral, preserves the guard, and is inductive because the field fixes \(K_0\). This proves both directions. There is a direct implementation with linear feasibility tests alone. Check the zero-slack recession directions first. Then double \(M\) until the caller implies \(\pm x,\pm y,z\le Mt\). The one-sided seed \(\lVert(x,y)\rVert_\infty\le t/2,\ z\le t/2,\ t\ge1\) is inductive for this field. Choose \(2^N\ge4M\), test the first \(N\) guards, and use the \(N\)th guarded predecessor of this seed. The validator checks the resulting predicate against the entire family and the field. A written type covers \((1,0,-s,1)\) for every \(s\ge0\). Every individual caller

Replay

With Python and z3-solver, the replay checks six cases of the decision procedure, including two rational reflections whose product has infinite order. Five further symbolic families exercise the recession obstruction, successful common typings and a guard that fails after one field. The fixed-axis replay checks independently that each of its first 26 layers adds a guard. The switched example reaches its exact fixed point at depth six. Eleven distinct word guards, together with \(t\ge1\), suffice. Z3 checks each field on the full unbounded public domain. InvarGenT checks the written recursive type, accepts the caller \((1,0,1,1)\) and rejects \((2,0,1,1)\). OCaml verifies that both emitted fields point to the original node. On the unannotated switched binding, inference at a caller requesting the full exact domain reached a 45-second diagnostic limit. Source generator and checks

python3 thesis-review-60.py --compiler /path/to/InvarGenT.native
python3 thesis-review-60.py --source

A folded witness construction now lets InvarGenT infer a compact type directly on the slowly rotating family, including an affinely reindexed example with a nonsquare quadratic weight. Inference and its precision bound