A question: is mathematics a formal system?
Yes.
If it is, does it have a formal logic?
It's complicated.
There is something called "mathematical logic", but this is a field of study, not a method of logic.
There are different methods which are considered and studied in this field and are considered
by mathematicians as "logics", like paraconsistent logic, relevance logic, first order logic, etc. but most of them are not what we originally mean by logic. They are best understood not as logic proper but as mathematical theories that have some similarities with logic. 1st order logic, in particular, since it is the de facto standard as far as mathematical logic goes, is at best an approximation of logic. In fact, there is an irony in the name itself, "1st order logic", because it is exactly what it is, a 1st order of approximation of logic as we think of it. As such, it has been shown to give the correct results for a number logical formulas that are basic, which is why it got selected in the first place, but you won't necessarily know if the result is still correct whenever you try with more complex formulas, and many formulas are known to give the wrong result, as exemplified in my Squid argument.
Then there is the entirely different Gentzen method of formal proof. It is used to prove mathematical theorems and produce formal proofs. However, it is still based on logical formulas, namely "rules of inference", that are themselves not proven true and therefore just admitted as true on the face of them, i.e. we all agree intuitively they must be true (e.g. "A and B implies B"). Still, as such, it is a method which is both formal and probably logical, i.e. consistent with logic as we think of it, although I couldn't possibly guaranty that.
So, Gentzem is indeed a formal method of logic for proving mathematical theorems, but it works like Aristotle's syllogism in that it is based on rules of inference admitted as true, not proven true. As far as I can tell, it is a mathematical formalisation and generalisation of Aristotle's method of formal logic.
However, very few mathematicians actually use it. It is used mainly in the context of theorem provers.
Are there any sets of rule-based "mathematical logic"?
Yes, that's Gentzen.
can I just write down an intuitive equation that says 2 + 3 = 4?
Mathematicians start with any arbitrary axioms they want and then they try to work out all the
logical consequences of those, and nearly always that will be on the basis of their own logical intuitions, not any method of formal logic.
A mathematician could start an axiomatic system with an axiom saying 2 + 3 = 4. As long as it is not logically inconsistent with another of his axioms, he will be happy. No problem with that.
However, me, I'm talking only of
logical intuitions. And there's nothing
logically intuitive in 2 + 3 = 4 (and there is nothing intuitive in 2+2 = 4 until you get trained in the addition). Logical intuitions are not just arbitrary ideas. A logical intuition is the
subjectively certain impression that a logical relation, like for example "
A and B implies A", is true. I have very good reasons to think that logical intuitions are not dependent on training in formal logic. Rather the reverse. We understand formal logic because we have logical intuitions prior to being exposed to it.
Although, I can't guarantee this applies to everybody, or even to most of us.
EB