Logic, theory of sets, and quantum mechanics