Exercise. Dependent types I › The product of a family of types › Extensionality [01DJ]

Show that the uniqueness rule for the product {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{B[x]} is equivalent to the following extensionality rule:

\frac { u,v:{\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{B[x]} \quad x:A\vdash ux\equiv vx:B[x] }{ u\equiv v:{\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{B[x]} }