/*
 * @(#)$Id: use_hypotheses,v 1.1.2.2 2000/07/17 16:24:53 rjb Exp $
 *
 * $Log: use_hypotheses,v $
 * Revision 1.1.2.2  2000/07/17 16:24:53  rjb
 * Filter out trivial (true) conjuncts.
 *
 * 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,AllCs),
        boolean_type(_,True,_),
        map_list_filter(AllCs,C:=>C,C \= True,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)).
