Math: proofs

in proofs, is it okay to give specific examples to prove a point? like i had a problem, in which there were sets. so i actually said let X be {1,2,3,4} and Y be {2,3,4,5} and then i proved my point. is that okay? or they always have to be generalized?