 This definition coincides with the algebraic topological definition above.The same definition works for compact manifolds with boundary but then "f" should send the boundary of "X" to the boundary of "Y".One can also define degree modulo 2 (deg2("f")) the same way as before but taking the "fundamental class" in Z2 homology.