(Excerpted from an earlier version of a study guide to logic texts more generally -- you will find the latest version here: http://www.logicmatters.net/students/tyl/)
Mere lists are fairly uninteresting and unhelpful. So let's be a bit more selective!
We should certainly distinguish books covering the elements of set theory – the beginnings that anyone really ought to know about – from those that take on advanced topics such as ‘large cardinals’, proofs using forcing, etc.
On the elements, two excellent standard ‘entry level’ treatments are
Herbert B. Enderton, The Elements of Set Theory (Academic Press,
1997) is particularly clear in marking off the informal development
of the theory of sets, cardinals, ordinals etc. (guided by the
conception of sets as constructed in a cumulative hierarchy) and the
formal axiomatization of ZFC. It is also particularly good and
non-confusing about what is involved in (apparent) talk of classes
which are too big to be sets – something that can mystify beginners.
Derek Goldrei, Classic Set Theory (Chapman & Hall/CRC 1996) is
written by a staff tutor at the Open University in the UK and has the
subtitle ‘For guided independent study’. It is as you might expect
extremely clear, and is indeed very well-structured for independent
reading.
Still starting from scratch, and initially only half a notch up in sophistication, we find two more really nice books (also widely enough used to be considered "standard", whatever exactly that means):
Karel Hrbacek and Thomas Jech, Introduction to Set Theory (Marcel
Dekker, 3rd edition 1999). This goes a bit further than Enderton or
Goldrei (more so in the 3rd edition than earlier ones). The final chapter gives a remarkably accessible glimpse
ahead towards large cardinal axioms and independence proofs.
Yiannis Moschovakis, Notes on Set Theory (Springer, 2nd edition 2006). A slightly more individual path through the material than the previously books mentioned, again with glimpses ahead and again attractively written.
My next recommendation might come as a bit of surprise, as it is something of a ‘blast from the past’: but don’t ignore old classics: they can have a lot to teach us even if we have read the modern books:
- Abraham Fraenkel, Yehoshua Bar-Hillel and Azriel Levy, Foundations of Set-Theory (North- Holland, 2nd edition 1973). This puts the development of our canonical ZFC set theory into some context, and also discusses alternative approaches. It really is attractively readable. I’m not an enthusiast for history for history’s sake: but it is very much worth knowing the stories that unfold here.
One intriguing feature of that last book is that it doesn’t at all emphasize the ‘cumulative hierarchy’ – the picture of the universe of sets as built up in a hierarchy of levels, each level containing all the sets at previous levels plus new ones (so the levels are cumulative). This picture – nowadays familiar to every beginner – comes to the foreground again in
- Michael Potter, Set Theory and Its Philosophy (OUP, 2004). For mathematicians concerned with foundational issues this surely is – at some stage – a ‘must read’, a unique blend of mathematical exposition (mostly about the level of Enderton, with a few glimpses beyond) and extensive conceptual commentary. Potter is presenting not straight ZFC but a very attractive variant due to Dana Scott whose axioms more directly encapsulate the idea of the cumulative hierarchy of sets.
Turning now to advanced topics Two books that choose themselves as classics are
Kenneth Kunen, Set Theory (North Holland, 1980), particularly for independence proofs.
Thomas Jech, Set Theory: The Third Millenium Edition (Springer 2003), for everything.
And then there are some wonderful advanced books with narrower focus (like Bell's on Set Theory: Boolean Valued Models and Independence Proofs). But this is already long enough and in fact, if you can cope with Jech's bible, you'll be able to find your own way around the copious literature!
Gosh. I wonder if those recommending Bourbaki have actually ploughed through the volume on set theory, for example. For a sceptical assessment, see the distinguished set theorist Adrian Mathias's very incisive talk https://www.dpmms.cam.ac.uk/~ardm/bourbaki.pdf
Bourbaki really isn't a good source on logical foundations. Indeed, elsewhere, Mathias quotes from an interview with Pierre Cartier (an associate of the Bourbaki group) which reports him as admitting
'Bourbaki never seriously considered logic. Dieudonné himself was very vocal against logic'
-- Dieudonné being very much the main scribe for Bourbaki. And Leo Corry and others have pointed out that Bourbaki in their later volumes don't use the (in fact too weak) system they so laboriously set out in their Volume I.
Amusingly, Mathias has computed that (in the later editions of Bourbaki) the term in the official primitive notation defining the number 1 will have
2409875496393137472149767527877436912979508338752092897
symbols. It is indeed a nice question what possible cognitive gains in "security of foundations" in e.g. our belief that 1 + 1 = 2 can be gained by defining numbers in such a system!
Best Answer
I don't think you need much topology or analysis at all.
It is however very difficult to work through an advanced text on axiomatic set theory, like Kunen's Set Theory, without having the mathematical maturity of at least an advanced undergraduate student. So, without experience with mathematical rigour (like you'd usually learn in a first course on Topology, Analysis, Group Theory, Measure Theory, and so on), it may be hard to appreciate the subtleties of set theory (and set theory is filled to the brim with subtleties).
If you've never worked through a basic text on Analysis or on Topology prior to learning Set Theory, then I'd recommend doing that just for the sake of becoming mathematically mature.
I'm not aware of books only covering the absolute minimum in Topology or Analysis, since the minimum necessary for Set Theory is too little to write a book about. In general, any undergraduate introduction to Topology or Analysis will suffice, but here are some specific references:
Topology
The most advanced topology needed is likely product topologies and compactness.
Analysis
As far as Analysis goes, if you know what a Cauchy sequence is, you're probably covered on that front as well. You can certainly ignore anything about power series or complex numbers.