/*  This is a proof plan for theorem:
    leqnth: []==>l:int list=>n:pnat=>leq(length(nth(n,l)),length(l))
    planner = dplan, clam_version(2.7.0), oyster_version(1.20)

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

/* This is the pretty-printed form
ind_strat([(l:int list)-v2::v1,(n:pnat)-s(v0)]) then 
  [generalise(length(v0),v1:pnat) then 
     ind_strat([(v1:pnat)-s(v2)]),
   generalise(length(v1),v4:pnat) then 
     ind_strat([(v4:pnat)-s(v5)])
  ]

*/

proof_plan([]==>l:int list=>n:pnat=>leq(length(nth(n,l)),length(l)),leqnth,1100,ind_strat(induction(lemma(nat_list_pair)-[(l:int list)-v2::v1,(n:pnat)-s(v0)])then[base_case(sym_eval(normalize_term([reduction([1,1],[nth2,equ(int list,left)]),reduction([1],[length1,equ(pnat,left)]),reduction([],[leq1,equ(u(1),left)])]))then[elementary(istrue)]),base_case(sym_eval(normalize_term([reduction([1,1],[nth1,equ(int list,left)])]))),step_case(ripple(direction_out,wave(direction_out,[2],[length2,equ(pnat,left)],[])then[wave(direction_out,[1,1],[nth3,equ(int list,left)],[])])then[unblock_then_fertilize(weak,unblock_fertilize_lazy([idtac])then fertilize(weak,fertilize_then_ripple(fertilize_left_or_right(left,[weak_fertilize(left,leq,[],v3)]))))])])then[generalise(length(v0),v1:pnat)then[ind_strat(induction(lemma(pnat_primitive)-[(v1:pnat)-s(v2)])then[base_case(sym_eval(normalize_term([reduction([],[leq1,equ(u(1),left)])]))then[elementary(istrue)]),step_case(ripple(direction_out,wave(direction_out,[],[leq3,equ(u(1),left)],[]))then[unblock_then_fertilize(strong,unblock_fertilize_lazy([idtac])then fertilize(strong,v3))])])],generalise(length(v1),v4:pnat)then[ind_strat(induction(lemma(pnat_primitive)-[(v4:pnat)-s(v5)])then[base_case(sym_eval(normalize_term([reduction([],[leq1,equ(u(1),left)])]))then[elementary(istrue)]),step_case(ripple(direction_out,unblock_then_wave(direction_out,unblock_lazy([unblock(meta_ripple,unused,unused),idtac])then wave(direction_out,[],[leq3,equ(u(1),left)],[])))then[unblock_then_fertilize(strong,unblock_fertilize_lazy([idtac])then fertilize(strong,v6))])])]],dplan).
