English
If T is a unit (invertible) and f is idempotent, then f commutes with T if and only if T preserves the image and kernel of f.
Русский
Если T — модульная обратимая, а f идемпотентна, то f commuting с T эквивалентно тому, что T сохраняет образ и ядро f.
LaTeX
$$$ \text{Commute}(f,T) \iff (\operatorname{Im}(f)).map(T) = \operatorname{Im}(f) \wedge (\ker f).map(T) = \ker f $$$
Lean4
/-- An idempotent operator `f` commutes with a linear operator `T` if and only if
both `range f` and `ker f` are invariant under `T`. -/
theorem commute_iff (hf : IsIdempotentElem f) :
Commute f T ↔ (range f ∈ Module.End.invtSubmodule T ∧ ker f ∈ Module.End.invtSubmodule T) :=
by
simp_rw [hf.range_mem_invtSubmodule_iff, hf.ker_mem_invtSubmodule_iff, ← Module.End.mul_eq_comp]
exact ⟨fun h => (by simp [← h.eq, ← mul_assoc, hf.eq]), fun ⟨h1, h2⟩ => h2.symm.trans h1⟩