/*  This is a proof plan for theorem:
    minus_plus: []==>x:pnat=>y:pnat=>z:pnat=>minus(plus(z,x),plus(z,y))=minus(x,y)in pnat
    planner = dplan, clam_version(2.7.0), oyster_version(1.20)

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

/* This is the pretty-printed form
ind_strat([(z:pnat)-s(v0)]) then 
  generalise(plus(v0,y),v2:pnat) then 
    generalise(plus(v0,x),v3:pnat) then 
      ind_strat([(v2:pnat)-s(v4)])

*/

proof_plan([]==>x:pnat=>y:pnat=>z:pnat=>minus(plus(z,x),plus(z,y))=minus(x,y)in pnat,minus_plus,2500,ind_strat(induction(lemma(pnat_primitive)-[(z:pnat)-s(v0)])then[base_case(sym_eval(normalize_term([reduction([1,1,1],[plus1,equ(pnat,left)]),reduction([2,1,1],[plus1,equ(pnat,left)])]))then[elementary(intro(new[x])then[intro(new[y])then[identity,wfftacs],wfftacs])]),step_case(ripple(direction_out,wave(direction_out,[2,1,1],[plus2,equ(pnat,left)],[])then[wave(direction_out,[1,1],[minus2,equ(pnat,left)],[])then[wave(direction_out,[1,1,1,1],[plus2,equ(pnat,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,[],v1)]))))])])then[generalise(plus(v0,y),v2:pnat)then[generalise(plus(v0,x),v3:pnat)then[ind_strat(induction(lemma(pnat_primitive)-[(v2:pnat)-s(v4)])then[base_case(sym_eval(normalize_term([reduction([1,1,1],[minus1,equ(pnat,left)]),reduction([1,1],[pred2,equ(pnat,left)]),reduction([2,1],[minus1,equ(pnat,left)])]))then[elementary(intro(new[v3])then[intro(new[x])then[intro(new[y])then[identity,wfftacs],wfftacs],wfftacs])]),step_case(ripple(direction_out,wave(direction_out,[2,1],[minus2,equ(pnat,left)],[])then[wave(direction_out,[1,1,1],[minus2,equ(pnat,left)],[])then[unblock_then_wave(direction_out,unblock_lazy([unblock(meta_ripple,unused,unused),idtac])then wave(direction_out,[],[cnc_pred,imp(right)],[]))]])then[unblock_then_fertilize(strong,unblock_fertilize_lazy([idtac])then fertilize(strong,v5))])])]]],dplan).
