destruct

destruct (H0 ... Hn) skip (K0 ... Km)

Synopsis:

destruct [(id)] [skip (id)]

Pre-conditions:

Each hypothesis Hi must be either a Leibniz or a John Major equality where the two sides of the equality are possibly applied constructors of an inductive type.

Action:

The tactic recursively compare the two sides of each equality looking for different constructors in corresponding position. If two of them are found, the tactic closes the current sequent by proving the absurdity of p. Otherwise it adds a new hypothesis for each leaf of the formula that states the equality of the subformulae in the corresponding positions on the two sides of the equality. If the newly added hypothesis is an equality between a variable and a term, the variable is substituted for the term everywhere in the sequent, except for the hypotheses Kj, and it is then cleared from the list of hypotheses.

New sequents to prove:

None.