You already know what a proof is, loosely. "I can prove the earth is round" means you have evidence and arguments that would convince a reasonable person. That's fine for everyday life.
Mathematical proof is different. It's not about evidence, experiments, or persuasion. A proof is a chain of logical steps where each step follows from the previous ones by a clear, agreed-upon rule. Nothing more. If the rules are valid and you followed them correctly, the conclusion is guaranteed to be true. No wiggle room, no exceptions, no "well, actually."
Here's one you already understand:
That's it. You just used a rule of logic called modus ponens: if you know P → Q (P implies Q) and you know P, then you can conclude Q. Formal proof is just being very precise about which rules you're using at each step.
Three reasons:
Let's see the same modus ponens proof in three notations, from informal to fully formal.
If it's raining then the ground is wet. It's raining. Therefore the ground is wet.
Clear, but imprecise. Which rule did we use? What exactly are the premises? A reader has to figure that out themselves.
This is the notation we start with on this site. Premises go on top, the conclusion goes below a horizontal bar, and the rule name sits on the right:
P P → Q
———————————————— →-Elim
Q
Read it as: "Given P and P → Q, we may conclude Q by the rule of implication elimination." Every step names its rule. Nothing is implicit.
This is what we'll work up to. Lean is a programming language and proof assistant. Here's the same proof:
theorem ground_wet (raining : P) (rain_means_wet : P → Q) : Q := by
exact rain_means_wet raining
The exact tactic tells Lean: "apply rain_means_wet to raining and that gives us Q." Lean checks this mechanically. If there's an error in the logic, it won't compile.
Don't worry if the Lean syntax looks alien. You'll get there. The point is that all three notations express the same logical step.
Pick the path that fits your background: