AFTD Auto-Formalizing Theoretical Domains

is_trace_preserving_linear_map_id

theoremverified

The identity linear map on d × d complex matrices is trace-preserving.

Statement

theorem is_trace_preserving_linear_map_id (d : ℕ) : is_trace_preserving_linear_map d LinearMap.id
Source
folklore
Verified
01 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • is_trace_preserving_linear_mapA linear map Φ on d × d complex matrices is trace-preserving if the trace of Φ(X) equals the trace of X for all d × d complex matrices X.

Read back from the Lean

For any natural number $d$, the identity linear map on $d \times d$ complex matrices is trace-preserving (under is_trace_preserving_linear_map).

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

To show that the identity linear map on $d \times d$ complex matrices is trace-preserving, it suffices to verify that $\operatorname{Tr}(\operatorname{id}(X)) = \operatorname{Tr}(X)$ for every matrix $X$. Because the identity map returns its input unchanged, both sides of the equality are definitionally identical.

  1. The identity linear map preserves the trace of any $d \times d$ complex matrix $X$.

    By definition, a linear map $\Phi$ is trace-preserving if $\operatorname{Tr}(\Phi(X)) = \operatorname{Tr}(X)$ for all matrices $X$. Introducing an arbitrary matrix $X$, the goal becomes $\operatorname{Tr}(\operatorname{id}(X)) = \operatorname{Tr}(X)$. Since $\operatorname{LinearMap.id}(X)$ evaluates definitionally to $X$, both sides are identical, so the equality holds by reflexivity.

    lines 3–4

      intro X
      rfl

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

/-- The identity map on d × d complex matrices is trace-preserving. -/theorem is_trace_preserving_linear_map_id (d : ℕ) : is_trace_preserving_linear_map d LinearMap.id := by  intro X  rfl
See it in the graphDiscuss this resultChallenge it