/*
 * @(#)$Id: induction,v 1.7.2.3 1999/02/05 18:46:59 rjb Exp $
 *
 * $Log: induction,v $
 * Revision 1.7.2.3  1999/02/05 18:46:59  rjb
 * Annotations removed from `Instances' argument.
 *
 * Revision 1.7.2.2  1999/02/01 10:39:48  rjb
 * `Instances' data added to plan: the lambda terms used to instantiate the
 * induction predicates. For this method the list will always have one element.
 * Base-case induction terms now listed as well as step-case induction terms.
 * The order of the induction terms follows the order of the cases in the
 * induction scheme. For each case there is a list of terms, one for each
 * argument of the induction predicate.
 *
 * Revision 1.7.2.1  1998/08/24 12:39:39  rjb
 * The induction suggestion may now be extended with trivial substitutions.
 *
 * Revision 1.7  1997/11/08 12:18:06  img
 * typo fix
 *
 * Revision 1.6  1997/10/17 14:25:58  rjb
 * Added source of induction lemma to method arguments.
 *
 * Revision 1.5  1996/12/11 14:06:16  img
 * Merge mthd and smthd libraries.
 *
 * Revision 1.4  1995/10/03  12:55:38  img
 * arity changed to induction/1;  new scheme mechanism
 *
 * Revision 1.3  1995/03/01  02:37:25  img
 * 	* Checking induction scheme is a precondition
 *
 * Revision 1.2  1994/12/07  18:45:46  dream
 * 	* dynamic version --- uses induction_pre
 *
 * Revision 1.1  1994/09/16  09:33:29  dream
 * Initial revision
 *
 */

method(induction(Lemma-Instances-IndTerms),
       H==>G,
       [ induction_suggestion(H,G,Suggestion),
         scheme(Lemma,InstancesAnn,IndTerms,_SubPlans,Suggestion,H==>G,
                BaseSeqsAndPlans,StepSeqsAndPlans)
       ],
       [
        zip(BaseSeqsAndPlans,BaseSeqs,_),
        zip(StepSeqsAndPlans,StepSeqs,_),
        append(BaseSeqs,StepSeqs,Seqs),
        map_list(InstancesAnn,IA:=>I,unannotated(IA,I),Instances)
       ],
       Seqs,
       induction(Lemma-Instances-IndTerms)).
	

