Exercise. Coherence for equivalences / contractible maps [01IR]

Let f:A\to B be a function. Show that the type \mathsf {isEquiv}(f) \equiv {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:B)}} \mathsf {isContr}(\mathsf {fib}_f(x)) of witnesses that f is an equivalence is a proposition

(Hint: you will need to use lemmas that we have proved so far! Don’t try to prove it directly.)