Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Appendix D.2.4 (as proved): vector field nonlinearities map regular fields to vector fields

Proved
SteerableE2CNN.vector_field_nonlinearity_equivariant

by Xeroth · Nov 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

convolutionequivariant-networksgroup-representationsorthogonal-groupsteerable-kernels

Let N≥1N\ge1N≥1 and let ρreg\rho_{\mathrm{reg}}ρreg​ be the regular representation of CNC_NCN​ on RN\mathbb{R}^NRN, with axes epe_pep​ (p∈Z/Np\in\mathbb{Z}/Np∈Z/N, corresponding to the angles 2πp/N2\pi p/N2πp/N) and ρreg(p~)ep=ep~+p\rho_{\mathrm{reg}}(\tilde p)e_p=e_{\tilde p+p}ρreg​(p~​)ep​=ep~​+p​. The vector field nonlinearity is

σvec(f)=max⁡(f)(cos⁡θsin⁡θ),θ=2πNarg⁡max⁡(f).\sigma_{\mathrm{vec}}(f)=\max(f)\begin{pmatrix}\cos\theta\\\sin\theta\end{pmatrix},\qquad\theta=\tfrac{2\pi}{N}\arg\max(f).σvec​(f)=max(f)(cosθsinθ​),θ=N2π​argmax(f).

If f∈RNf\in\mathbb{R}^Nf∈RN has a unique maximal entry, then for every p~∈Z/N\tilde p\in\mathbb{Z}/Np~​∈Z/N

σvec(ρreg(p~)f)=ψ(2πp~N) σvec(f),\sigma_{\mathrm{vec}}\big(\rho_{\mathrm{reg}}(\tilde p)f\big)=\psi\big(\tfrac{2\pi\tilde p}{N}\big)\,\sigma_{\mathrm{vec}}(f),σvec​(ρreg​(p~​)f)=ψ(N2πp~​​)σvec​(f),

where ψ(α)\psi(\alpha)ψ(α) is the rotation matrix by α\alphaα. So σvec\sigma_{\mathrm{vec}}σvec​ maps a regular field to a field that transforms under the standard representation of CNC_NCN​.

Formalization Note The paper states this for every fff. Its proof uses arg⁡max⁡(ρreg(p~)f)=p~+arg⁡max⁡(f)\arg\max(\rho_{\mathrm{reg}}(\tilde p)f)=\tilde p+\arg\max(f)argmax(ρreg​(p~​)f)=p~​+argmax(f), which holds only when the maximiser is unique. With ties the claim is false. For example, take N=2N=2N=2 and f=(1,1)f=(1,1)f=(1,1): then ρreg(1)f=f\rho_{\mathrm{reg}}(1)f=fρreg​(1)f=f, but ψ(π)σvec(f)=−σvec(f)≠σvec(f)\psi(\pi)\sigma_{\mathrm{vec}}(f)=-\sigma_{\mathrm{vec}}(f)\neq\sigma_{\mathrm{vec}}(f)ψ(π)σvec​(f)=−σvec​(f)=σvec​(f). The uniqueness hypothesis is therefore added. Lean's arg⁡max⁡\arg\maxargmax is a fixed choice among the maximisers.

Preamble
import Mathlib
import Definitions.Def_SteerableE2CNN_Basic

open Matrix MeasureTheory
Formal statement
namespace SteerableE2CNN

theorem vector_field_nonlinearity_equivariant (N : ℕ) [NeZero N] (v : ZMod N → ℝ)
    (hv : ∃! a : ZMod N, ∀ b, v b ≤ v a) (p : ZMod N) :
    vecFieldNL N (regRepCN N p *ᵥ v) = rotMat (2 * Real.pi * (p.val : ℝ) / N) *ᵥ vecFieldNL N v := by sorry

end SteerableE2CNN
Source
Weiler and Cesa, General E(2)-Equivariant Steerable CNNs, arXiv:1911.08251v2 (NeurIPS 2019), Section 2.6, p. 6; Appendix D.2.4, p. 24
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Let N≥1N \ge 1N≥1 be a natural number (the hypothesis excludes N=0N = 0N=0), and let Z/N\mathbb{Z}/NZ/N denote the integers modulo NNN. For q∈Z/Nq \in \mathbb{Z}/Nq∈Z/N, write q‾∈{0,1,…,N−1}\overline{q} \in \{0, 1, \dots, N-1\}q​∈{0,1,…,N−1} for its canonical natural-number representative. The theorem concerns:

  • a real vector v=(vq)q∈Z/N∈RZ/Nv = (v_q)_{q \in \mathbb{Z}/N} \in \mathbb{R}^{\mathbb{Z}/N}v=(vq​)q∈Z/N​∈RZ/N;
  • an element p∈Z/Np \in \mathbb{Z}/Np∈Z/N.

Hypothesis. vvv has exactly one maximising index. That is, there exists a unique a∈Z/Na \in \mathbb{Z}/Na∈Z/N such that vb≤vav_b \le v_avb​≤va​ for all b∈Z/Nb \in \mathbb{Z}/Nb∈Z/N. This hypothesis concerns vvv only. For N=1N = 1N=1 it holds automatically.

Definitions used.

  • The matrix ρreg(p)∈R(Z/N)×(Z/N)\rho_{\mathrm{reg}}(p) \in \mathbb{R}^{(\mathbb{Z}/N) \times (\mathbb{Z}/N)}ρreg​(p)∈R(Z/N)×(Z/N) has entries
ρreg(p)q,q′={1if q=p+q′ in Z/N,0otherwise.\rho_{\mathrm{reg}}(p)_{q,q'} = \begin{cases} 1 & \text{if } q = p + q' \text{ in } \mathbb{Z}/N, \\ 0 & \text{otherwise.} \end{cases}ρreg​(p)q,q′​={10​if q=p+q′ in Z/N,otherwise.​

Consequently, the vector w=ρreg(p) vw = \rho_{\mathrm{reg}}(p)\, vw=ρreg​(p)v is the cyclic shift

wq=vq−p.w_q = v_{q - p}.wq​=vq−p​.
  • For any u∈RZ/Nu \in \mathbb{R}^{\mathbb{Z}/N}u∈RZ/N, argmax⁡(u)∈Z/N\operatorname{argmax}(u) \in \mathbb{Z}/Nargmax(u)∈Z/N is a fixed but unspecified choice of index aaa with ub≤uau_b \le u_aub​≤ua​ for all bbb. When there are several maximisers, nothing further is stated about which one is chosen.

  • The vector field nonlinearity σvec:RZ/N→R2\sigma_{\mathrm{vec}} : \mathbb{R}^{\mathbb{Z}/N} \to \mathbb{R}^2σvec​:RZ/N→R2 is

σvec(u)=(max⁡q∈Z/Nuq)⋅(cos⁡θusin⁡θu),θu=2π argmax⁡(u)‾N.\sigma_{\mathrm{vec}}(u) = \Big(\max_{q \in \mathbb{Z}/N} u_q\Big) \cdot \begin{pmatrix} \cos\theta_u \\ \sin\theta_u \end{pmatrix}, \qquad \theta_u = \frac{2\pi\, \overline{\operatorname{argmax}(u)}}{N}.σvec​(u)=(q∈Z/Nmax​uq​)⋅(cosθu​sinθu​​),θu​=N2πargmax(u)​​.

The maximum value max⁡quq\max_q u_qmaxq​uq​ may be negative or zero.

  • R(θ)R(\theta)R(θ) is the rotation matrix
R(θ)=(cos⁡θ−sin⁡θsin⁡θcos⁡θ).R(\theta) = \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}.R(θ)=(cosθsinθ​−sinθcosθ​).

Conclusion. Under the hypothesis, the following identity of vectors in R2\mathbb{R}^2R2 holds:

σvec(ρreg(p) v)=R ⁣(2π p‾N)σvec(v).\sigma_{\mathrm{vec}}\big(\rho_{\mathrm{reg}}(p)\, v\big) = R\!\left(\frac{2\pi\, \overline{p}}{N}\right) \sigma_{\mathrm{vec}}(v).σvec​(ρreg​(p)v)=R(N2πp​​)σvec​(v).

The rotation angle uses the representative p‾∈{0,…,N−1}\overline{p} \in \{0, \dots, N-1\}p​∈{0,…,N−1}. For N=1N = 1N=1 the only choice is p=0p = 0p=0, and the rotation is the identity.

Human review
  • Endorsed by Shuze Chen · Nov 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 24, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me