Book on the Rigorous Foundations of Mathematics- Logic and Set Theory

Solution 1:

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!

Solution 2:

Curry's Foundations of Mathematical Logic is very conscious of what is presupposed in terms of mathematical content in the development of logic. The writings of Paul Lorenzen might also be of some interest for you.