Is there an analysis book with a proper introduction to mathematical proofs? I am taking my first analysis course in university. Since I am studying in Germany, there is no real distinction between calculus and real analysis, meaning this is the first university course on anything analysis that can be taken here. Therefore, I am new to the concepts of mathematical proofs. However, they are regularly used in the course and I often have problems following them. Since I am taking classes on mathematical principles and logic as well, my initial idea was to buy a dedicated textbook on proofs, e.g. Hammack's Book of Proof, Velleman's How to Prove It or Chartrand's Mathematical Proofs: A Transition to Advanced Mathematics, which I could use for analysis as well as the other classes.
However, some answers to this question imply that this might not be the best way to go and I should rather buy a book on a certain mathematical field, in my case analysis, that contains a rigorous introduction to proofs in itself and applies them. Additionally, since time is limited, I am not quite sure whether it makes sense to focus on a book on mathematical proofs (which sometimes have several hundred pages) rather than the course itself.
Since I am missing an introductory text to analysis anyway, I thought about following the recommendations in the answers and getting a book that teaches introductory analysis with a focus on formal notation as well as writing and understanding mathematical proofs. From what I have read so far, Abbott's Understanding Analysis and Tao's Analysis I + II might be great options for that purpose, however, one answer on the question I was referring to earlier suggests there might be a specific book which is specifically designed that way.
Should I get a separate book on mathematical proofs or would I be better off with one of the analysis books I mentioned (or a completely different one)?
 A: Analysis $1$ by Tao has an appendix on the basics of mathematical logic. So you can first read that before you begin to attempt the exercises.
But before you read that appendix, I would advise you to read the first chapter(technically the second) of the book on the construction of the natural numbers. This is where you will get introduced to the Principle of mathematical induction and use that principle to prove many statements regarding the natural numbers such as addition and multiplication for natural numbers is commutative, associative and so on.
The only benefit of these introductory proof courses or books is that you won't be wasting time looking those things up again. For example, I didn't read the whole book "How to prove it" but only some of it. And I didn't know what the sentence "if and only if" meant in terms of proving a mathematical statement. I only understood it when I went to check if my proof was correct.
Honestly speaking, I only ever learnt all the things in proving mathematical statements by reading proofs in the book I was learning from and solutions for those exercises.
A: You may try chapter 1 of Robert Ash's Real Variables with Basic Metric Space Topology. It covers all the basics for proof-writing, including in particular elementary set theory (basic set operations, cardinality, countable and uncountable sets etc.), predicate calculus ($\forall,\,\exists$, negation of logical predicate, contrapositive,... etc.), and mathematical induction.
The book is well written and concise. It contains full solutions to its exercises. Its paper edition is cheap (USD 11.95 at the time of writing) and has very good print quality. There is also a free-of-charge and legal electronic edition for download, although the fonts in this edition are deliberately greyed-out.
The only downside of Ash's text is that, although it covers a broad range of topics (e.g. as an introductory text, it provides even an example of a continuous but nowhere differentiable function), it doesn't go deep enough. As an analysis text, I think it is more suitable for non-math majors or enthusiasts. However, for an analysis book with a proper introduction to mathematical proofs, it is a viable choice.
