The following definitions maintain a path compression datastructure, i.e. a forest such that:
- every node is the type of a hypothesis
- there is a edge between two nodes only if they are provably equivalent
- every edge is labelled with a proof of equivalence for its vertices
- edges are added when normalizing propositions.
This tactic (with shorthand tauto
) breaks down assumptions of the form
_ ∧ _
, _ ∨ _
, _ ↔ _
and ∃ _, _
and splits a goal of the form _ ∧ _
, _ ↔ _
or ∃ _, _
until it can be discharged
using reflexivity
or solve_by_elim
. This is a finishing tactic: it
either closes the goal or raises an error.
The variants tautology!
and tauto!
use the law of excluded middle.
For instance, one can write:
example (p q r : Prop) [decidable p] [decidable r] : p ∨ (q ∧ r) ↔ (p ∨ q) ∧ (r ∨ p ∨ r) := by tauto
and the decidability assumptions can be dropped if tauto!
is used
instead of tauto
.
tauto {closer := tac}
will use tac
on any subgoals created by tauto
that it is unable to solve before failing.