/*  This is a proof plan for theorem:
    rotlen: []==>l:int list=>p:int list=>rotate(length(l),app(l,p))=app(p,l)in int list
    planner = dplan, clam_version(2.7.0), oyster_version(1.20)

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

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

*/

proof_plan([]==>l:int list=>p:int list=>rotate(length(l),app(l,p))=app(p,l)in int list,rotlen,8080,ind_strat(induction(lemma(list_primitive)-[(l:int list)-v1::v0])then[base_case(sym_eval(normalize_term([reduction([1,1,1],[length1,equ(pnat,left)]),reduction([1,1],[rotate1,equ(int list,left)]),reduction([1,1],[app1,equ(int list,left)])]))),step_case(ripple(direction_out,wave(direction_out,[2,1,1],[app2,equ(int list,left)],[])then[wave(direction_out,[1,1,1],[length2,equ(pnat,left)],[])])then[ripple(direction_in_or_out,wave(direction_in_or_out,[1,1],[rotate2,equ(int list,left)],[])then[wave(direction_in_or_out,[1,2,1,1],[tl2,equ(int list,left)],[])then[wave(direction_in_or_out,[2,1,1],[assapp,equ(int list,right)],[])]])then[unblock_then_fertilize(weak,unblock_fertilize_lazy([idtac])then fertilize(weak,fertilize_then_ripple(fertilize_left_or_right(left,[weak_fertilize(left,in,[],v2)]))))]])])then[ind_strat(induction(lemma(list_primitive)-[(p:int list)-v1::v0])then[base_case(sym_eval(normalize_term([reduction([2,1],[app1,equ(int list,left)])]))then[elementary(identity)]),step_case(ripple(direction_out,wave(direction_out,[2,1],[app2,equ(int list,left)],[]))then[unblock_then_fertilize(weak,unblock_fertilize_lazy([idtac])then fertilize(weak,fertilize_then_ripple(fertilize_left_or_right(right,[weak_fertilize(right,in,[2],v2)]))then elementary(identity)))])]),base_case(sym_eval(normalize_term([reduction([1,2,1,1,1],[hd2,equ(int,left)])])))then[ind_strat(induction(lemma(list_primitive)-[(p:int list)-v4::v3])then[base_case(sym_eval(normalize_term([reduction([1,1,1],[app1,equ(int list,left)]),reduction([1,1],[app2,equ(int list,left)]),reduction([2,1,1],[app1,equ(int list,left)]),reduction([2,1],[app1,equ(int list,left)])]))then[elementary(identity)]),step_case(ripple(direction_out,wave(direction_out,[2,1],[app2,equ(int list,left)],[])then[wave(direction_out,[1,1,1],[app2,equ(int list,left)],[])then[wave(direction_out,[1,1],[app2,equ(int list,left)],[])]])then[unblock_then_fertilize(weak,unblock_fertilize_lazy([idtac])then fertilize(weak,fertilize_then_ripple(fertilize_left_or_right(right,[weak_fertilize(right,in,[2],v5)]))then elementary(identity)))])])]],dplan).
