This guide might be of use when you are in a situation where you know exactly what you want to do "in real life" in your proof, but don't know how to do it in Lean. For example, you might be faced with a hypothesis of the form p ∧ q
and you need a proof of p
, or you might be faced with a goal of the form p ∨ q
which you want to deduce from a proof of p
.
Let's say that you know your next step involves p ∧ q
in some way. Which tactic you use depends on whether p ∧ q
is a hypothesis (i.e. you have the assumption H : p ∧ q
in your local context) or the goal (i.e. what you are trying to prove). If it is a hypothesis then you need to eliminate it, whereas if it is the goal then you need to introduce it
Once you have established whether you want to introduce or eliminate it, find the function in the list below and you will see the tactic you need. Click on the link to see an example of usage.