A rigorous proof of the scallop theorem and a finite mass effect of a microswimmer