Which should I study first: Logic or set theory? I'm an undergraduate student in a college of sciences and technics studying maths, physics, computing and some chimestry so we studied elementary materials in logic and set theory. As I am interested in maths, I decided to self study logic and set theory. The books I chose are Mathematical Logic by Ian Chiswell and Wilfrid Hodges and Elements of Set Theory by Herbert B. Enderton.
Since it seems that logic and set theory are closely related, I wonder which should I study first?
Thank you for your consideration.
 A: First, you've chosen a pair of terrific books, both very much suited to self-study. There are alternatives, of course, but I can't think of obviously better introductions to their respective fields.
If you have already studied, as you put it, elementary materials in logic and set theory, you'll already understand the  small amount of logical notation etc. that Enderton uses, and you'll already understand the  small amount of set notation etc. that Chiswell and Hodges use. So I'm sure you could proceed in either order fairly happily. 
But in traditional introductory math. logic courses, it is in fact usual to cover the basics of first-order logic, as in Chiswell and Hodges, before tackling set theory, as in Enderton. And there is certainly something to be said for sticking to the traditional order. Enderton, as I recall, is rightly careful to emphasize the difference between informal set theory and formalised ZFC, and if you are to really appreciate what is going on here it will help to already be familiar with the difference between an informal and a formalised theory in the sense discussed by e.g. Chiswell and Hodges.
A: Set theory is a subfield of mathematical logic. I really recommend studying the calculus of natural deduction first. Then you can go on studying elementary theorems of mathematical logic. You need to have some knowledge in predicates logic and these elementary theorems before studying set theory. Good luck.
A: I'm studying logic, and have been through most of Goldrei's "Propositional and Predicate Calculus: A Model of Argument", which is quite good. I've also perused quite a few other logic books, including Stoll's "Set theory and Logic". All the logic books start out with some set theory, or assume the reader is familiar with certain set theory results prior to commencing the logic chapters. The reason is that you need some set theory to complete the logic proofs. For example, Goldrei assumes you know how to prove that a countable union of countable sets is countable and this is required in Godel's completeness theorem in chapter 5.
I must admit that I had difficulty understanding Godel's completeness theorem from the lay explanations I read prior to reading Goldrei and it's only by actually going through the definitions and proofs that I have a better understanding of its meaning.
In the reverse direction, do you need logic to understand set theory? You need an understanding of how to apply the logic and inference axioms (and you need these to study any branch of mathematics), but this is not really what logic is about. It's about reasoning about the process of mathematical reasoning itself and coming up with results like the soundness theorem, completeness theorem, incompleteness theorems etc. I believe these aren't pre-requisites to set theory, although they may give you an appreciation of the strengths and limitations of the axiomatic approach.
Or, in other words, when we do logic, we need to cite (some) set theoretic results, but when we do set theory (or any other branch of maths), we don’t really need to cite any results from logic (although happy to be corrected on this point).
