Let [yl1,...,yln] represent a list of variable lists, each of length zero or
more, and xl1,...,xln each represent a vector of zero or more variables, so
that the variables in each of yl1...yln have the same types as the
corresponding xli. The function X_CASES_THENL expects a list of variable
lists, [yl1,...,yln], a list of tactic-generating functions
[f1,...,fn]:(thm->tactic)list, and a disjunctive theorem, where each disjunct
may be existentially quantified:
th = |-(?xl1.B1) \/...\/ (?xln.Bn)
each disjunct having the form (?xi1 ... xim. Bi). If applying each
fi to the theorem obtained by introducing witness variables yli for the
objects xli whose existence is asserted by the ith disjunct,
({Bi[yli/xli]} |- Bi[yli/xli]), produces the following results when applied
to a goal (A ?- t):
A ?- t
========= f1 ({B1[yl1/xl1]} |- B1[yl1/xl1])
A ?- t1
...
A ?- t
========= fn ({Bn[yln/xln]} |- Bn[yln/xln])
A ?- tn
then applying X_CASES_THENL [yl1,...,yln] [f1,...,fn] th
to the goal (A ?- t) produces n subgoals.
A ?- t
======================= X_CASES_THENL [yl1,...,yln] [f1,...,fn] th
A ?- t1 ... A ?- tn