Definition. Homotopy [01FO]

Let f,g:{\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{B[x]} be two dependent functions. A homotopy from f to g is defined to be a dependent function h:{\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}}{fx=_{B[x]}gx} sending each element of A to an identification between its respective values in f and g. We will sometimes write f\sim g for the type of homotopies from f to g.