have
Summary
The have tactic lets you introduce new hypotheses into the system.
Examples
If you have hypotheses
hPQ : P → Q
hP : P
then from these hypotheses you know that you can prove Q. If your goal is Q then you can just apply hPQ, exact hP. But if you need Q for some other reason (e.g. perhaps Q is of the form x = y and you want to rewrite it) then one way of making it is by writing have hQ : Q,. This creates a new goal of Q, which you can prove with apply hPQ, exact hP, and after this you’ll find that you have a new hypothesis hQ : Q in your tactic state.
If you can directly write the term of the type that you want to have, then you can do it using
have hQ : Q := .... For instance, in the example above you could writehave hQ : Q := hPQ hP,, becausehPQis a function from proofs ofPto proofs ofQso you can just feed it a proof ofP.
Further notes
The let and set tactics are related; they are however used to construct data rather than proofs.