English
The determinant function on endomorphisms equals the piecewise construction given by existence of a finite basis; otherwise it is 1.
Русский
Детерминант на конечных отображениях равен составному по существованию базиса; иначеDet=1.
LaTeX
$$$\det = \begin{cases} \detAux(\text{Trunc}, b) & \text{if } \exists s, \text{Basis}(s, A, M) \\ 1 & \text{otherwise} \end{cases}$$$
Lean4
theorem coe_det [DecidableEq M] :
⇑(LinearMap.det : (M →ₗ[A] M) →* A) =
if H : ∃ s : Finset M, Nonempty (Basis s A M) then LinearMap.detAux (Trunc.mk H.choose_spec.some) else 1 :=
by
ext
rw [LinearMap.det_def]
split_ifs
·
congr -- use the correct `DecidableEq` instance
rfl