/* -*- Prolog -*-
 * @(#)$Id: fertilize_left_or_right,v 1.1 1996/12/11 15:09:25 img Exp $
 *
 * $Log: fertilize_left_or_right,v $
 * Revision 1.1  1996/12/11 15:09:25  img
 * Merge of mthd and smthd libraries.
 *
 * Revision 1.2  1996/12/04 13:16:15  img
 * Use notraw_to_used to tidy up after fertilization.
 *
 * Revision 1.1  1994/09/16  09:34:27  dream
 * Initial revision
 */

method(fertilize_left_or_right(Dir,Ms),
       H==>G,
       [ 
        ((Dir=right,
         applicable_submethod(H==>G,weak_fertilize_right(Ms),_,[HH==>GG]))
        v
         (Dir=left,
          applicable_submethod(H==>G,weak_fertilize_left(Ms),_,[HH==>GG]))
         ) ],
	  [

    /* Any hypotheses in HH which are marked "notraw" were used during
       the iterated weak-fertilization; we tidy things up a little
       now, by marking them as "used".  This prevents them from being
       used in weak-fertilizations of subsequent inductions.  */
	notraw_to_used(HH,NewH)],
       [ NewH==>GG],
       fertilize_left_or_right(Dir,Ms) ).
