/-- **Short five lemma, surjectivity half.** In the same diagram, if `g` is surjective, the bottom
row is exact at `B'`, and `α`, `γ` are surjective, then `β` is surjective. Element chase: given
`b'`, write `g' b' = γ d` and `d = g b`; then `g' (b' - β b) = 0`, so `b' - β b = f' a'` with
`a' = α a`, and `b' = β (b + f a)`. -/
theorem short_five_surjective (f : A →ₗ[R] B) (g : B →ₗ[R] D) (f' : A' →ₗ[R] B')
(g' : B' →ₗ[R] D') (α : A →ₗ[R] A') (β : B →ₗ[R] B') (γ : D →ₗ[R] D')
(hg : Function.Surjective g) (hfg' : Function.Exact f' g')
(comm₁ : ∀ a, β (f a) = f' (α a)) (comm₂ : ∀ b, γ (g b) = g' (β b))
(hα : Function.Surjective α) (hγ : Function.Surjective γ) : Function.Surjective β := by
intro b'
obtain ⟨d, hd⟩ := hγ (g' b')
obtain ⟨b, rfl⟩ := hg d
have hker : g' (b' - β b) = 0 := by
rw [map_sub, ← comm₂, hd, sub_self]
obtain ⟨a', ha'⟩ := (hfg' _).mp hker
obtain ⟨a, rfl⟩ := hα a'
refine ⟨b + f a, ?_⟩
rw [map_add, comm₁, ha', add_sub_cancel]