English
Under a chosen finite basis, the trace equals the contraction via the basis-induced dual isomorphism.
Русский
При заданном конечном базисе след равен конкракции через дуальное изоморфирование, индукированное базисом.
LaTeX
$$$\\text{trace}_R M = \\mathrm{contractLeft}_R M \\circ (\\text{dualTensorHomEquivOfBasis } b)^{-1}$$$
Lean4
/-- Auxiliary lemma for `trace_eq_matrix_trace`. -/
theorem trace_eq_matrix_trace_of_finset {s : Finset M} (b : Basis s R M) (f : M →ₗ[R] M) :
trace R M f = Matrix.trace (LinearMap.toMatrix b b f) :=
by
have : ∃ s : Finset M, Nonempty (Basis s R M) := ⟨s, ⟨b⟩⟩
rw [trace, dif_pos this, ← traceAux_def]
congr 1
apply traceAux_eq