Structured proof · Unit 148
lemma Filling.exists_step_function
P.R ), n a finite index type, G a subgroup of GL_n(A),H a subgroup of G whose elements are integral matrices (i:H\le\mathtt{GL\_n}(R)\cap G),\iota a type, p:\iota\to A^{n},f:A^{n}\to[0,\infty],s\subseteq\iota a finite set and c:\iota\to\mathbb{R}_{\ge0}. Suppose (hf) that for every z\in s, for every x in some neighbourhood of p(z), every k\in H and every y\in A^{n} with k\cdot y=x satisfy c(z)\le f(y). Then there is \Phi:A^{n}\to\mathbb{R}_{\ge0} with compact support such that \Phi(x+v)=\Phi(x) for all x and all v in some neighbourhood of 0,\Phi(k\cdot x)=\Phi(x) for all k\in H and x,\Phi(x)\le f(x) for all x, and c(z)\le\Phi(p(z)) for every z\in s.hf and u\cdot(p(z)+u\cdot r)\in R^{n}. Put \Phi(x)=\max\{c(z):z\in s,\exists k\in H,u^{-1}(k\cdot x-p(z))\in R^{n}\}. \Phi is supported in the single compact lattice u^{-1}\cdot R^{n} (if u^{-1}(k\cdot x-p(z))\in R^{n} then u\cdot k\cdot x=u(p(z)+u\cdot r)\in R^{n} by the choice of u, and k preserves R^{n}), invariant under translation by u\cdot R^{n} and under H (H preserves R^{n}), \Phi\le f by hf, and \Phi(p(z))\ge c(z) (k=1).Since almost every element of A is a unit, the units are dense, so 0 is a limit of units; by compactness of R^{n} (
intVectors_open_compact_vol) andhf, for b near 0 every point p(z)+b\cdot r (z\in s,r\in R^{n}) is in the neighbourhood ofhfand b\cdot(p(z)+b\cdot r)\in R^{n}. Take such a unit u (e: the orbit condition at p(z)+u\cdot r).Uses
mem_closure_iff_nhdsRestate e for every x with u^{-1}(x-p(z))\in R^{n}: c(z)\le f(y) whenever k\cdot y=x,k\in H.
M: for k\in H (an integral invertible matrix by i) and a unit b: k\cdot(b\cdot x)\in R^{n}\iff b\cdot x\in R^{n} (
mulVec_mem_intVectors_iff).Rewrite e and M with scalar actions of units (
simp).Take \Phi(x)=\sup\{c(z):z\in s,\exists k\in H,u^{-1}(k\cdot x-p(z))\in R^{n}\}. Compact support: the support lies in the single compact set u^{-1}\cdot R^{n} (
HasCompactSupport.with the compact u^{-1}\cdot R^{n}): \Phi(x)\ne0 gives z\in s and k\in H with k\cdot x=p(z)+u\cdot r,r\in R^{n}, so u\cdot k\cdot x\in R^{n} by the choice of u (step 1), hence u\cdot x\in R^{n} (k is integral and invertible, M); local constancy: for v with u^{-1}v\in R^{n} (a neighbourhood of 0) u^{-1}(k(x+v)-p(z))\in R^{n}\iff u^{-1}(kx-p(z))\in R^{n} (M); H-invariance: reindex k\mapsto k\cdot k' (intro Equiv.); \Phi\le f: each z in the set has k\cdot x=p(z)+u\cdot r, so c(z)\le f(x) by e; \Phi(p(z))\ge c(z): k=1,u^{-1}\cdot0\in R^{n}. The remaining set-membership goals are closed bymulRight simp_allandgrind.