If you're doing the same routing in reverse on the way back you'll also have to pick up any checked luggage at YUL when clearing customs and recheck it at the connections counter. You'll then go through security again as well. You won't have to touch your bags at YYZ however as they'll be sent to USCBP automatically. You'll arrive at DTW as if you were on a domestic flight.