Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1: the invariant errors are state-trajectory independent iff fu(ab)=fu(a)b+afu(b)−afu(Id)bf_u(ab)=f_u(a)b+af_u(b)-af_u(I_d)bfu​(ab)=fu​(a)b+afu​(b)−afu​(Id​)b

Proved
InvariantEKF.error_autonomy_iff

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 consider the system ddtχt=fut(χt)\frac{d}{dt}\chi_t=f_{u_t}(\chi_t)dtd​χt​=fut​​(χt​) on GGG, for t>0t>0t>0. Assume that for every t>0t>0t>0 and a∈Ga\in Ga∈G some trajectory passes through aaa at time ttt. Then the following are equivalent:

  1. the left-invariant error ηtL=χt−1χˉt\eta^L_t=\chi_t^{-1}\bar\chi_tηtL​=χt−1​χˉ​t​ is state-trajectory independent;
  2. the right-invariant error ηtR=χˉtχt−1\eta^R_t=\bar\chi_t\chi_t^{-1}ηtR​=χˉ​t​χt−1​ is state-trajectory independent;
  3. for all t>0t>0t>0 and a,b∈Ga,b\in Ga,b∈G,
fut(ab)=fut(a) b+a fut(b)−a fut(I) b.f_{u_t}(ab)=f_{u_t}(a)\,b+a\,f_{u_t}(b)-a\,f_{u_t}(I)\,b .fut​​(ab)=fut​​(a)b+afut​​(b)−afut​​(I)b.

Moreover, under 3, for any two trajectories and every t>0t>0t>0,

ddtηtL=fut(ηtL)−fut(I)ηtL,ddtηtR=fut(ηtR)−ηtRfut(I).\frac{d}{dt}\eta^L_t=f_{u_t}(\eta^L_t)-f_{u_t}(I)\eta^L_t,\qquad \frac{d}{dt}\eta^R_t=f_{u_t}(\eta^R_t)-\eta^R_tf_{u_t}(I).dtd​ηtL​=fut​​(ηtL​)−fut​​(I)ηtL​,dtd​ηtR​=fut​​(ηtR​)−ηtR​fut​​(I).

Formalization Note "State-trajectory independent" (Definition 1) means that a single function ggg gives ddtηt=gut(ηt)\frac{d}{dt}\eta_t=g_{u_t}(\eta_t)dtd​ηt​=gut​​(ηt​) for every pair of trajectories. The paper does not state the existence of trajectories through every point, but its proof uses it ("this has to hold for any χt\chi_tχt​ and ηtL\eta^L_tηtL​"). Without it, conditions 1 and 2 can hold vacuously.

Preamble
import Mathlib
import Definitions.Def_InvariantEKF_Basic

open MeasureTheory Matrix Filter Topology
Formal statement
namespace InvariantEKF

theorem error_autonomy_iff {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) ℝ)
    (u : ℝ → U)
    (hexist : ∀ t, 0 < t → ∀ a ∈ G, ∃ χ, IsTrajectory G f u (Set.Ioi 0) χ ∧ χ t = a) :
    (ErrorAutonomous true G f u ↔ ErrorAutonomous false G f u) ∧
    (ErrorAutonomous false G f u ↔
      ∀ t, 0 < t → ∀ a ∈ G, ∀ b ∈ G,
        f (u t) (a * b) = f (u t) a * b + a * f (u t) b - a * f (u t) 1 * b) ∧
    ((∀ t, 0 < t → ∀ a ∈ G, ∀ b ∈ G,
        f (u t) (a * b) = f (u t) a * b + a * f (u t) b - a * f (u t) 1 * b) →
      ∀ χ χbar : ℝ → Matrix (Fin N) (Fin N) ℝ,
        IsTrajectory G f u (Set.Ioi 0) χ → IsTrajectory G f u (Set.Ioi 0) χbar →
        ∀ t, 0 < t →
          HasMatDerivAt (fun s => invError true (χ s) (χbar s))
            (errField true f (u t) (invError true (χ t) (χbar t))) t ∧
          HasMatDerivAt (fun s => invError false (χ s) (χbar s))
            (errField false f (u t) (invError false (χ t) (χbar t))) t) := by sorry

end InvariantEKF
Source
Barrau and Bonnabel, The invariant extended Kalman filter as a stable observer, arXiv:1410.1465v4 (2015), Section 2.2, Definition 1 and Theorem 1, eqs. (4)-(9), pp. 5-6
Read-back

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

Setting. Fix a natural number NNN and write MNM_NMN​ for the space of real N×NN\times NN×N matrices. The statement involves the following data and hypotheses:

  • A set G⊆MNG \subseteq M_NG⊆MN​ that is a matrix Lie group in the following sense:
    • I∈GI \in GI∈G;
    • every a∈Ga \in Ga∈G has nonzero determinant and a−1∈Ga^{-1}\in Ga−1∈G;
    • GGG is closed under products;
    • whenever a sequence (xn)(x_n)(xn​) in GGG converges to an invertible matrix aaa, then a∈Ga\in Ga∈G.
  • An arbitrary set UUU of inputs.
  • A family of maps fv:MN→MNf_v : M_N \to M_Nfv​:MN​→MN​, one for each v∈Uv\in Uv∈U. Each fvf_vfv​ is defined on all of MNM_NMN​, not only on GGG.
  • A fixed input signal u:R→Uu:\mathbb R\to Uu:R→U.

Trajectories. A trajectory is a function χ:R→MN\chi:\mathbb R\to M_Nχ:R→MN​ such that, for every s>0s>0s>0:

  • χs∈G\chi_s\in Gχs​∈G, and
  • χ\chiχ is differentiable at sss, entrywise, with
χ˙s=fus(χs).\dot\chi_s = f_{u_s}(\chi_s).χ˙​s​=fus​​(χs​).

The values of χ\chiχ at s≤0s\le 0s≤0 are unconstrained.

Invariant errors. For two trajectories χ,χˉ\chi,\bar\chiχ,χˉ​, the left and right invariant errors are

ηsL=χs−1χˉs,ηsR=χˉsχs−1.\eta^L_s=\chi_s^{-1}\bar\chi_s, \qquad \eta^R_s=\bar\chi_s\chi_s^{-1}.ηsL​=χs−1​χˉ​s​,ηsR​=χˉ​s​χs−1​.

For s>0s>0s>0 these are genuine inverses, since χs∈G\chi_s\in Gχs​∈G is invertible.

Error autonomy. "The left error is autonomous" means: there exists a single function g:U×MN→MNg:U\times M_N\to M_Ng:U×MN​→MN​ such that for every pair of trajectories χ,χˉ\chi,\bar\chiχ,χˉ​ and every t>0t>0t>0, the map s↦ηsLs\mapsto\eta^L_ss↦ηsL​ is differentiable at ttt (entrywise, two-sided) with

η˙tL=gut(ηtL).\dot\eta^L_t=g_{u_t}(\eta^L_t).η˙​tL​=gut​​(ηtL​).

"The right error is autonomous" is defined the same way with ηR\eta^RηR in place of ηL\eta^LηL.

Existence hypothesis. It is assumed that for every t>0t>0t>0 and every a∈Ga\in Ga∈G there exists at least one trajectory χ\chiχ with χt=a\chi_t=aχt​=a. Uniqueness is not required. Note what this demands:

  • a solution through every point of GGG at every positive time;
  • that solution must stay in GGG and be defined on all of (0,∞)(0,\infty)(0,∞), with no finite-time blow-up.

For systems where no such trajectories exist, the theorem says nothing.

Conclusion. Under these hypotheses, the following three claims all hold.

  1. The left error is autonomous if and only if the right error is autonomous.

  2. The right error is autonomous if and only if, for every t>0t>0t>0 and all a,b∈Ga,b\in Ga,b∈G,

fut(ab)=fut(a) b+a fut(b)−a fut(I) b.f_{u_t}(ab)=f_{u_t}(a)\,b+a\,f_{u_t}(b)-a\,f_{u_t}(I)\,b.fut​​(ab)=fut​​(a)b+afut​​(b)−afut​​(I)b.

This identity is required only for the input values utu_tut​ with t>0t>0t>0, not for all v∈Uv\in Uv∈U.

  1. Suppose the identity in (2) holds for all t>0t>0t>0 and a,b∈Ga,b\in Ga,b∈G. Then for every pair of trajectories χ,χˉ\chi,\bar\chiχ,χˉ​ and every t>0t>0t>0, both errors are differentiable at ttt, with
η˙tL=fut(ηtL)−fut(I) ηtL,η˙tR=fut(ηtR)−ηtR fut(I).\dot\eta^L_t=f_{u_t}(\eta^L_t)-f_{u_t}(I)\,\eta^L_t, \qquad \dot\eta^R_t=f_{u_t}(\eta^R_t)-\eta^R_t\,f_{u_t}(I).η˙​tL​=fut​​(ηtL​)−fut​​(I)ηtL​,η˙​tR​=fut​​(ηtR​)−ηtR​fut​​(I).

Remarks.

  • Times t≤0t\le 0t≤0 play no role anywhere in the statement.
  • The closedness part of the Lie group condition is assumed but is not referenced in the conclusion.
  • When N=0N=0N=0, MNM_NMN​ is the single empty matrix, and all statements hold 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