corrected proof of theorem thm:det-sampling-theorem
all the edits from alex, and some corrections