Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 1: guRg^R_uguR​ and guLg^L_uguL​ satisfy gu(ab)=agu(b)+gu(a)bg_u(ab)=ag_u(b)+g_u(a)bgu​(ab)=agu​(b)+gu​(a)b and govern the invariant errors

Proved
InvariantEKF.error_fields_homogeneous

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

control-theorykalman-filterlie-groupsnonlinear-observersriccati-equation

Let GGG be a matrix Lie group and let the system ddtχt=fut(χt)\frac{d}{dt}\chi_t=f_{u_t}(\chi_t)dtd​χt​=fut​​(χt​), t≥0t\ge0t≥0, be group affine: fu(ab)=afu(b)+fu(a)b−afu(I)bf_u(ab)=af_u(b)+f_u(a)b-af_u(I)bfu​(ab)=afu​(b)+fu​(a)b−afu​(I)b for all inputs uuu and a,b∈Ga,b\in Ga,b∈G. Then:

  1. guR(η)=fu(η)−ηfu(I)g^R_u(\eta)=f_u(\eta)-\eta f_u(I)guR​(η)=fu​(η)−ηfu​(I) satisfies guR(ab)=a guR(b)+guR(a) bg^R_u(ab)=a\,g^R_u(b)+g^R_u(a)\,bguR​(ab)=aguR​(b)+guR​(a)b for all a,b∈Ga,b\in Ga,b∈G. For any two trajectories χ,χˉ\chi,\bar\chiχ,χˉ​ one has χt=ηtRχˉt\chi_t=\eta^R_t\bar\chi_tχt​=ηtR​χˉ​t​ with ηtR=χtχˉt−1\eta^R_t=\chi_t\bar\chi_t^{-1}ηtR​=χt​χˉ​t−1​, and ddtηtR=gutR(ηtR)\frac{d}{dt}\eta^R_t=g^R_{u_t}(\eta^R_t)dtd​ηtR​=gut​R​(ηtR​).
  2. guL(η)=fu(η)−fu(I)ηg^L_u(\eta)=f_u(\eta)-f_u(I)\etaguL​(η)=fu​(η)−fu​(I)η satisfies guL(ab)=a guL(b)+guL(a) bg^L_u(ab)=a\,g^L_u(b)+g^L_u(a)\,bguL​(ab)=aguL​(b)+guL​(a)b for all a,b∈Ga,b\in Ga,b∈G. For any two trajectories one has χt=χˉtηtL\chi_t=\bar\chi_t\eta^L_tχt​=χˉ​t​ηtL​ with ηtL=χˉt−1χt\eta^L_t=\bar\chi_t^{-1}\chi_tηtL​=χˉ​t−1​χt​, and ddtηtL=gutL(ηtL)\frac{d}{dt}\eta^L_t=g^L_{u_t}(\eta^L_t)dtd​ηtL​=gut​L​(ηtL​).

Formalization Note "All the solutions have the form χt=ηtRχˉt\chi_t=\eta^R_t\bar\chi_tχt​=ηtR​χˉ​t​" is stated as: for every solution χ\chiχ, the matrix ηtR=χtχˉt−1\eta^R_t=\chi_t\bar\chi_t^{-1}ηtR​=χt​χˉ​t−1​ satisfies the error equation. Derivatives at t=0t=0t=0 are one-sided.

Preamble
import Mathlib
import Definitions.Def_InvariantEKF_Basic

open MeasureTheory Matrix Filter Topology
Formal statement
namespace InvariantEKF

theorem error_fields_homogeneous {N : ℕ} {U : Type*} (G : Set (Matrix (Fin N) (Fin N) ℝ))
    (hG : IsMatrixLieGroup G) (f : U → Matrix (Fin N) (Fin N) ℝ → Matrix (Fin N) (Fin N) ℝ)
    (hf : IsGroupAffine G f) (u : ℝ → U) :
    (∀ v, ∀ a ∈ G, ∀ b ∈ G,
      errField false f v (a * b) = a * errField false f v b + errField false f v a * b) ∧
    (∀ χ χbar : ℝ → Matrix (Fin N) (Fin N) ℝ,
      IsTrajectory G f u (Set.Ici 0) χ → IsTrajectory G f u (Set.Ici 0) χbar →
      ∀ t, 0 ≤ t → χ t = invError false (χbar t) (χ t) * χbar t ∧
        HasMatDerivWithinAt (fun s => invError false (χbar s) (χ s))
          (errField false f (u t) (invError false (χbar t) (χ t))) (Set.Ici 0) t) ∧
    (∀ v, ∀ a ∈ G, ∀ b ∈ G,
      errField true f v (a * b) = a * errField true f v b + errField true f v a * b) ∧
    (∀ χ χbar : ℝ → Matrix (Fin N) (Fin N) ℝ,
      IsTrajectory G f u (Set.Ici 0) χ → IsTrajectory G f u (Set.Ici 0) χbar →
      ∀ t, 0 ≤ t → χ t = χbar t * invError true (χbar t) (χ t) ∧
        HasMatDerivWithinAt (fun s => invError true (χbar s) (χ s))
          (errField true f (u t) (invError true (χbar t) (χ t))) (Set.Ici 0) t) := by sorry

end InvariantEKF
Source
Barrau and Bonnabel, The invariant extended Kalman filter as a stable observer, arXiv:1410.1465v4 (2015), Appendix B, Lemma 1, eq. (57), p. 26
Read-back

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

Let NNN be a natural number and RN×N\mathbb{R}^{N\times N}RN×N the real N×NN\times NN×N matrices, with identity III. Matrix inversion X−1X^{-1}X−1 is total: it is the usual inverse when det⁡X≠0\det X \neq 0detX=0 and the zero matrix otherwise.

Data and hypotheses. The statement is about the following objects.

  • The set G⊆RN×NG \subseteq \mathbb{R}^{N\times N}G⊆RN×N, assumed to be a "matrix Lie group" in this specific sense:

    • I∈GI \in GI∈G;
    • every a∈Ga \in Ga∈G has det⁡a≠0\det a \neq 0deta=0 and a−1∈Ga^{-1} \in Ga−1∈G;
    • GGG is closed under products;
    • if a sequence (xn)(x_n)(xn​) in GGG converges to a matrix aaa with det⁡a≠0\det a \neq 0deta=0, then a∈Ga \in Ga∈G.

    No smoothness or manifold structure is required beyond this.

  • An arbitrary type UUU of inputs.

  • A family of maps fv:RN×N→RN×Nf_v : \mathbb{R}^{N\times N}\to\mathbb{R}^{N\times N}fv​:RN×N→RN×N, one for each v∈Uv\in Uv∈U. It is assumed "group-affine": for every v∈Uv \in Uv∈U and all a,b∈Ga, b \in Ga,b∈G,

fv(ab)=fv(a) b+a fv(b)−a fv(I) b.f_v(ab) = f_v(a)\,b + a\,f_v(b) - a\,f_v(I)\,b.fv​(ab)=fv​(a)b+afv​(b)−afv​(I)b.

No continuity or regularity of fff is assumed.

  • An arbitrary input signal u:R→Uu:\mathbb{R}\to Uu:R→U, with no regularity assumed. If UUU is empty, no such uuu exists and the statement is vacuous.

The error fields. For v∈Uv\in Uv∈U and a matrix η\etaη, define

gvR(η)=fv(η)−η fv(I),gvL(η)=fv(η)−fv(I) η.g^R_v(\eta) = f_v(\eta) - \eta\, f_v(I), \qquad g^L_v(\eta) = f_v(\eta) - f_v(I)\,\eta.gvR​(η)=fv​(η)−ηfv​(I),gvL​(η)=fv​(η)−fv​(I)η.

Trajectories. A trajectory on [0,∞)[0,\infty)[0,∞) is a function χ:R→RN×N\chi:\mathbb{R}\to\mathbb{R}^{N\times N}χ:R→RN×N with two properties:

  • χt∈G\chi_t\in Gχt​∈G for every t≥0t\ge 0t≥0;
  • for every t≥0t \ge 0t≥0, each entry of χ\chiχ has derivative within [0,∞)[0,\infty)[0,∞) at ttt equal to the corresponding entry of fut(χt)f_{u_t}(\chi_t)fut​​(χt​).

The derivative is one-sided (right derivative) at t=0t=0t=0. Nothing is required of χ\chiχ for t<0t<0t<0, and no initial condition is imposed.

Conclusion. Under these hypotheses, all four of the following hold.

  1. Right error field identity. For every v∈Uv\in Uv∈U and all a,b∈Ga,b\in Ga,b∈G:
gvR(ab)=a gvR(b)+gvR(a) b.g^R_v(ab) = a\,g^R_v(b) + g^R_v(a)\,b.gvR​(ab)=agvR​(b)+gvR​(a)b.
  1. Right-invariant error. For any two trajectories χ,χˉ\chi,\bar\chiχ,χˉ​ on [0,∞)[0,\infty)[0,∞) and every t≥0t\ge 0t≥0, set ηsR=χs χˉs−1\eta^R_s = \chi_s\,\bar\chi_s^{-1}ηsR​=χs​χˉ​s−1​. Then:
    • χt=ηtR χˉt\chi_t = \eta^R_t\,\bar\chi_tχt​=ηtR​χˉ​t​;
    • the function s↦ηsRs\mapsto \eta^R_ss↦ηsR​ has, entrywise, derivative within [0,∞)[0,\infty)[0,∞) at ttt equal to gutR(ηtR)g^R_{u_t}(\eta^R_t)gut​R​(ηtR​).
  2. Left error field identity. For every v∈Uv\in Uv∈U and all a,b∈Ga,b\in Ga,b∈G:
gvL(ab)=a gvL(b)+gvL(a) b.g^L_v(ab) = a\,g^L_v(b) + g^L_v(a)\,b.gvL​(ab)=agvL​(b)+gvL​(a)b.
  1. Left-invariant error. For any two trajectories χ,χˉ\chi,\bar\chiχ,χˉ​ on [0,∞)[0,\infty)[0,∞) and every t≥0t\ge 0t≥0, set ηsL=χˉs−1χs\eta^L_s = \bar\chi_s^{-1}\chi_sηsL​=χˉ​s−1​χs​. Then:
    • χt=χˉt ηtL\chi_t = \bar\chi_t\,\eta^L_tχt​=χˉ​t​ηtL​;
    • the function s↦ηsLs\mapsto\eta^L_ss↦ηsL​ has, entrywise, derivative within [0,∞)[0,\infty)[0,∞) at ttt equal to gutL(ηtL)g^L_{u_t}(\eta^L_t)gut​L​(ηtL​).

Scope.

  • The algebraic identities in (1) and (3) are asserted only for arguments in GGG.
  • The error-dynamics claims in (2) and (4) are asserted only at times t≥0t\ge 0t≥0, with one-sided derivatives at t=0t = 0t=0.
  • The same input signal uuu drives both trajectories.
  • The degenerate case N=0N=0N=0 is included, where all matrices are the empty matrix and every claim holds trivially.
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