/*
 * @(#)$Id: use_hypotheses,v 1.1.2.1 1999/02/01 10:25:47 rjb Exp $
 *
 * $Log: use_hypotheses,v $
 * Revision 1.1.2.1  1999/02/01 10:25:47  rjb
 * Support for proof planning with multi-predicate induction schemes.
 *
 */

method(use_hypotheses(InstHyps),
       H==>GAnn,
       [unannotated(GAnn,G),
        matrix(_,GoalM,G),
        conjunction2list(GoalM,Cs),
        unused_induction_hypotheses(H,LabelledHyps),
        map_list(LabelledHyps,(_:H1):=>H1,Hyps),
        same_length(Cs,SomeHyps), !,   % Assumes hyps are not conjunctions.
        sublist(SomeHyps,Hyps),
        permutation(SomeHyps,OrderedHyps),
        instantiate_pred_and_match(H,OrderedHyps,Cs,InstHyps)],
       [],
       [],
       use_hypotheses(InstHyps)).
