I am going to teach the standard undergraduate Logic course for math and engineering majors. What are good (bad) textbooks and why. I have not taught that course for a while and wonder if there are new good books. Also those who took/taught such a course recently, please let me know your opinion about the text you used. I do not need Computer Science applications (I can include them myself, if needed). Just a standard first course in Mathematical Logic.

3$\begingroup$ A standard logic course for math majors, that I've heard, but for engineering majors too? There must be some really philosophically inclined engineering students at Vanderbilt. :) $\endgroup$ – KConrad Nov 2 '10 at 23:08

4$\begingroup$ @Keith: cicadas are discussed here: mathoverflow.net/questions/43397/…. Seriously though, engineers use propositional logic and all sorts of nonstandard logics alot, in problems related to control of complex systems, for example. I once helped supervise a PhD student in engineering applying nonstandard logics $\endgroup$ – user6976 Nov 3 '10 at 0:18

$\begingroup$ Hmm, interesting. $\endgroup$ – KConrad Nov 3 '10 at 8:29

1$\begingroup$ One problem with mathematical logic is that the point of much of the care that some seemingly obvious issues need to be addressed is lost without deep examples. I felt like Kunen's book on Set Theory and Independence Proofs, for example, was the first time I really truly understood some of the import of abstract notions of incompleteness one learns in logic. When you actually see models with CH and with notCH, you see why this stuff matters in a way that is hard to just learning logic alone. Of course, you do need some logic to understand Kunen. $\endgroup$ – TLss Sep 17 '12 at 16:36
I have taught an undergrad course out of Enderton's "A Mathematical Introduction to Logic". I thought it was very accessible and was relatively modern in its viewpoint. I chose it somewhat by default, and at first I wasn't sure about it, but it grew on me during the semester. It's certainly worth looking into.
The best undergraduate textbook I've ever seen on mathematical logic is Wolfe's A Tour Through Mathematical Logic. I couldn't put it down,it was THAT fascinating. It covers virtually a complete overview of mathematical logic with many historical notes and sidebars illustrating the field in the context of a grand story with a cast of thousands and touches on virtualy all aspects of the field, from classical logic to axiomatic set theory to computability to forcing and large cardinals.What it lacks in depth,it more then makes up for in both breadth and a fascinating selection of topics and insights.
Imagine that: a READABLE text on mathematical logic.And best of all,unlike most standard logic books,the reader's not left wondering,"Yeah,okbut why is all that important?"
Wolfe works really hard to not only show why HE thinks it's importantbut why the founders of the subject thought it was in thier own words.
I would VERY STRONGLY suggest checking out that book,Mark.
The best introduction to logic that I have seen is Kenneth Kunen's recent book, "The Foundations of Mathematics" (ISBN: 9781904987147), published in 2009. The book provides a brief introduction to axiomatic set theory, model theory, and computability theory; and it culminates with a proof of Godel's incompleteness theorems and Tarski's theorem on the nondefinability of truth. There are also a couple brief discussions of the philosophy of mathematics; these are given from the perspective of the working mathematician, and they are used to motivate the material. And they are very helpful. In fact, the most salient thing about this book is that it is exceptionally clear, wellwritten, and easy to learn from. (Kunen also wrote "Set Theory: An Introduction To Independence Proofs" which is also exceptionally clear, wellwritten, and easy to learn from). The book's only prerequisite is the mathematical maturity that an Introduction to Analysis course would provide, and it is available (new) on amazon.com for less than $25.
Kaye, R., 'Mathematics of Logic' is a good firstyear text. Also consider Boolos 'Computability and Logic', but this could get in the way if you have a particular way of teaching CS/computability topics.
I prefer these to the Mendelson  which I found a bit confusing for the sake of formal accuracy. Kaye, by example, avoids too much technical jargon, and keeps to the ideas in play, building to a completeness theorem.
Hope this helps!

$\begingroup$ Thank you! I used classical texts mentioned above. Both are too formal and treat computability, in particular, in a very outdated way. So I had to write my own notes. Also I included Ehrenfeucht games and elementary equivalence in general which is also missing in these texts. If I teach logic again, I will choose a different text. $\endgroup$ – user6976 Jun 15 '11 at 0:16

$\begingroup$ From what I have read (which is quite a bit) I haven't found many textbooks that treat logic in the way it is researched/studied today. Unfortunately, this means that writing your own notes seems to be the norm! Then again, there's probably a lot of monographs waiting to be fleshed out! Every cloud, silver lining... $\endgroup$ – user15756 Jun 15 '11 at 7:01
I would recommend A Friendly Introduction to Mathematical Logic by Christopher Leary. It covers all the important things up to the Incompleteness Theorem, and really is Friendly.
(I have heard rumours that it's out of print, though.)
I'm fond of Cori and Lascar's "Mathematical logic"  it comes in two volumes ; the first covers propositional calculus, boolean algebras, predicate calculus and completeness theorems, while the second dives into recursion theory, Gödel's theorems, set theory and model theory. It's well explained, with detailed proofs and nice exercises.
I really like "Introduction to Mathematical Logic" by Mendelson. It covers the topics with appropriate rigor and thoroughness. It covers up through (in)completeness and has two extra chapters on set theory and computability. Plenty of exercises (with partial solutions) too.

$\begingroup$ Thanks! You mean the classic text by Mendelson? I have the Russian translation, I think. Amazon says that the 5th edition (2009) is available and is in stock. $\endgroup$ – user6976 Nov 2 '10 at 22:14

$\begingroup$ That's the one. It even has a fancy new cover now. $\endgroup$ – Joe Johnson Nov 2 '10 at 22:28

$\begingroup$ I checked: yet I do have the Russian translation (1971). That means I probably used this book as a textbook when I took my first Logic course (1974). $\endgroup$ – user6976 Nov 2 '10 at 22:31

1$\begingroup$ I've self studied by "Introduction to Mathematical Logic" by Mendelson (russian translation) in 1985 and liked it, mostly because this was the only game in town. Today I would enjoy LPL by Barwise & Etchhemendy more for 2 reasons: it is less dry, and it has supporting software. $\endgroup$ – Tegiri Nenashi Jun 14 '11 at 21:34

$\begingroup$ I really wouldn't recommend Mendelson. Great when it first came out in the sixties, but most students will find it quite unnecessarily hard going (it's logical systems are not nice ones to use, and the book goes for excess rigour at the expense of attractive explanations of why the subject unfolds as it does). $\endgroup$ – Peter Smith Sep 16 '12 at 13:17
Manin, A Course in Mathematical Logic for Mathematicians, Springer
You may want to consider the following ebooks to complement the required literature:
[Apologies, but I can't vote nor comment]
@Andrew & @Mark  Just read the 3rd and 4th chapters (that is, the ones that overlap with my current research) and yes, the book by Wolf is excellent! (Preview is on Google Books) I can secondarily recommend it! The start of each chapter is verbose, and scant in technical detail, but it fleshes out the ideas very nicely and succinctly. Also, it reads like most lecturers talk  then you turn around and see just how much ground and technical detail HAS been covered, and I have to say, I was very impressed. If you don't choose it as a textbook, then most certainly secondary/precourse reading! There are a few typos (one in a definition... :S ), but the survey of the subjects, without getting bogged down in detail that those starting out don't appreciate nor necessarily need, is excellent.
Although it is only tangential to math logics books, have you seen Pierce's "Software Foundations"? This is not what, but more about how. And here is a talk on how it worked out.
Boolos, Burges, and Jeffreys' book "Computability and Logic" (I think it's now in its fifth edition?) is by far the best logic book I've ever run into. The first chunk of the book is focused specifically on computability theory, but one can skip right to the presentation of firstorder logic, which is absolutely fantastic. The book covers a number of topics which don't tend to appear in basic logic books  modal logic, secondorder logic, forcing in arithmetic  but is still a first introduction to the subject. It's wonderfully written, too.
I also quite like Ebbinghaus, Flum, and Thomas' book "Mathematical Logic," but not as much.

1$\begingroup$ If I remember correctly, the book of Ebbinghaus, Flum, and Thomas contains details of some basic arguments that are often swept under the rug. So if you don't want to talk about these in class and don't trust your students to do them as exercises, then this book would be a useful text or supplementary reference. It also covers some material not usually done in first courses in logic, like Lindström's characterization of firstorder logic by abstract properties. (I'm away from home, so I can't easily verify that my memory about this book is correct.) $\endgroup$ – Andreas Blass Sep 17 '12 at 12:33
Here's my list of about 46 logic textbooks from Quine's 1940 "Mathematical logic" to Huth & Ryan's 2004 "Logic in computer science". These are mostly the low to medium price books about mathematical logic.
http://www.geometry.org/tex/conc/logicbooks.html
For something modern and practical, not getting into advanced model theory, I would suggest "Mathematical logic for computer science" by BenAri. The Huth and Ryan book is pretty good too.
I gave a course in logic using the lecture notes "Sets, Models and Proofs" by Moerdijk and van Oosten, and the course went quite well. The text is very well written and can be recommended for selfstudying. The book does not start with first order formula, but with set theory. I think this is an advantage, because the formal arguments involving the syntax of first order logic are considered boring or confusing or both by many students.
Computability theory is missing, as is incompleteness, so unless you want to teach logic as an introduction to model theory you have to take some other text for these parts.
The notes are freely available via the authors homepage http://www.staff.science.uu.nl/~ooste110/onderwijs.html .
This from a colleague of mine: a member of the maths department at SFU noticed that term after term one portion of her 3rd year class did extremely well and the other comparatively poorly. Deciding to try to figure out why, she looked at their transcripts. She found almost without exception that those who did well had taken a logic course in the philosophy department using Jennings & Friedrich, Proof and Consequence. It's treatment is clear and accurate. It has Simon, the most extensive software package available, with lots of editors and detects and explains errors in proofs on the student's computer. It also manages the course records. (Friedrich, who created the software, was the first to decrypt the first stage of the CIA code.) There's an introduction and a Chinese translation of the text on the LLEP site at SFU.