theoremhomExactAt_of_injective (e : K→ₗ[R] L) (d : L→ₗ[R] M)
(hex : LinearMap.range e = LinearMap.ker d) : HomExactAt e d :=by
proof · 19
lines
intro f hf
havehk : LinearMap.ker d ≤LinearMap.ker f :=by
rw [← hex]
rintro _ ⟨x, rfl⟩
exact DFunLike.congr_fun hf x
letu : LinearMap.range d →ₗ[R] R:=
((LinearMap.ker d).liftQ f hk).comp d.quotKerEquivRange.symm.toLinearMap
obtain ⟨g, hg⟩ :=Module.Injective.extension_property RR (LinearMap.range d) M
(LinearMap.range d).subtype Subtype.val_injective u
refine ⟨g, ?_⟩
apply LinearMap.ext
intro x
have h :=DFunLike.congr_fun hg (d.rangeRestrict x)
change g (d x) = f x
calc
g (d x) = u (d.rangeRestrict x) := h
_ = f x :=by
exact congrArg ((LinearMap.ker d).liftQ f hk)
(d.quotKerEquivRange_symm_apply_image x (LinearMap.mem_range_self d x))