INDUCT_THEN : (thm -> thm_tactic -> tactic)
The second argument to INDUCT_THEN is a function that determines what is be done with the induction hypotheses in the goal-directed proof by structural induction. Suppose that th is a structural induction theorem for a concrete data type ty, and that A ?- !x.P is a universally-quantified goal in which the variable x ranges over values of type ty. If the type ty has n constructors C1, ..., Cn and ‘Ci(vs)’ represents a (curried) application of the ith constructor to a sequence of variables, then if ttac is a function that maps the induction hypotheses hypi of the ith subgoal to the tactic:
A ?- P[Ci(vs)/x] ====================== MAP_EVERY ttac hypi A1 ?- Gi
A ?- !x.P ================================ INDUCT_THEN th ttac A1 ?- G1 ... An ?- Gn
|- !P. P[] /\ (!t. P t ==> (!h. P(CONS h t))) ==> (!l. P l)
- val LIST_INDUCT_THEN = INDUCT_THEN listTheory.list_INDUCT;
LIST_INDUCT_THEN ASSUME_TAC
A ?- !l. P ======================================================= A |- P[NIL/l] A u {P[l'/l]} ?- !h. P[(CONS h l')/l]
LIST_INDUCT_THEN MP_TAC
A ?- !l. P ===================================================== A |- P[NIL/l] A ?- P[l'/l] ==> !h. P[CONS h l'/l]