/*  This is a proof plan for theorem:
    memsort1: []==>x:int=>l:int list=>member(x,sort(l))=>member(x,l)
    planner = dplan, clam_version(2.7.0), oyster_version(1.20)

    Time taken to find plan: 2420ms
    Environment:
    []
 */

/* This is the pretty-printed form
ind_strat([(l:int list)-v1::v0]) then 
  [generalise(sort(v0),v4:int list) then 
     ind_strat([(v4:int list)-v6::v5]) then 
       [base_case(...),
        base_case(...),
        base_case(...)
       ],
   base_case(...)
  ]

*/

proof_plan([]==>x:int=>l:int list=>member(x,sort(l))=>member(x,l),memsort1,2420,ind_strat(induction(lemma(list_primitive)-[(l:int list)-v1::v0])then[base_case(sym_eval(normalize_term([reduction([2,1],[sort1,equ(int list,left)]),reduction([1],[member1,equ(u(1),left)]),reduction([2],[member1,equ(u(1),left)])]))then[elementary(intro(new[x])then[intro(new[v0])then[hyp(v0),wfftacs],wfftacs])]),step_case(ripple(direction_out,wave(direction_out,[2,1],[sort2,equ(int list,left)],[])then[casesplit(disjunction([x=v1 in int=>void,x=v1 in int]))then[wave(direction_out,[2],[member3,equ(u(1),left)],[]),wave(direction_out,[2],[member2,complementary,equ(u(1),left)],[])]])then[unblock_then_fertilize(weak,unblock_fertilize_lazy([idtac])then fertilize(weak,fertilize_then_ripple(fertilize_left_or_right(right,[weak_fertilize(right,=>,[],v2)])))),idtac])])then[generalise(sort(v0),v4:int list)then[ind_strat(induction(lemma(list_primitive)-[(v4:int list)-v6::v5])then[base_case(sym_eval(normalize_term([reduction([2,1],[insert1,equ(int list,left)]),reduction([1],[member3,equ(u(1),left)]),reduction([1],[member1,equ(u(1),left)]),reduction([2],[member1,equ(u(1),left)])]))then[elementary(intro(new[v5])then[hyp(v5),wfftacs])]),step_case(ripple(direction_out,casesplit(disjunction([v1<v6=>void,v1<v6]))then[wave(direction_out,[2,1],[insert3,equ(int list,left)],[])then[casesplit(disjunction([x=v6 in int=>void,x=v6 in int]))then[wave(direction_out,[2],[member3,equ(u(1),left)],[])then[wave(direction_out,[1],[member3,equ(u(1),left)],[])],wave(direction_out,[2],[member2,complementary,equ(u(1),left)],[])]],wave(direction_out,[2,1],[insert2,complementary,equ(int list,left)],[])then[casesplit(disjunction([x=v6 in int=>void,x=v6 in int]))then[idtac,idtac]]])then[unblock_then_fertilize(strong,unblock_fertilize_lazy([idtac])then fertilize(strong,v7)),idtac,idtac,idtac])])then[base_case(elementary(intro(new[v10])then[istrue,wfftacs])),base_case(sym_eval(normalize_term([reduction([1],[member3,equ(u(1),left)]),reduction([1],[member3,equ(u(1),left)]),reduction([2],[member3,equ(u(1),left)])]))then[elementary(intro(new[v10])then[hyp(v10),wfftacs])]),base_case(sym_eval(equal(v9,right)then[normalize_term([reduction([2],[member2,equ(u(1),left)])])then[casesplit(disjunction([v6=v1 in int=>void,v6=v1 in int]))then[normalize_term([reduction([1],[member3,equ(u(1),left)]),reduction([1],[member2,equ(u(1),left)])]),equal(v9,right)then[normalize_term([reduction([1],[member2,equ(u(1),left)])])]]]])then[elementary(intro(new[v10])then[hyp(v10),wfftacs]),elementary(intro(new[v9])then[hyp(v9),wfftacs])])]],base_case(elementary(intro(new[v4])then[istrue,wfftacs]))],dplan).
