diff --git a/.gitignore b/.gitignore index bad86e9..02ce48b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ _CoqProject *.glob *.pyc \#*\# +*~ diff --git a/metasrc/build.sh b/metasrc/build.sh index 9b8fc7d..78314c4 100755 --- a/metasrc/build.sh +++ b/metasrc/build.sh @@ -7,8 +7,10 @@ relsize=15 mutsize=3 python paconotation.py $maxsize > $PACOSRCDIR/paconotation.v +python paconotation_internal.py $maxsize > $PACOSRCDIR/paconotation_internal.v python pacotac.py $maxsize > $PACOSRCDIR/pacotac.v python pacotacuser.py > $PACOSRCDIR/pacotacuser.v +python pacon.py ${mutsize} > $PACOSRCDIR/pacon.v echo "" > $PACOSRCDIR/paco.v for i in `seq 0 $relsize`; do diff --git a/metasrc/paco.py b/metasrc/paco.py index 13e3e38..2ca5be5 100755 --- a/metasrc/paco.py +++ b/metasrc/paco.py @@ -1,159 +1,326 @@ -from __future__ import print_function -import sys -from pacolib import * - -if len(sys.argv) < 3: - sys.stderr.write('\nUsage: '+sys.argv[0]+' relsize mutsize\n\n') - sys.exit(1) - -relsize = int(sys.argv[1]) -mutsize = int(sys.argv[2]) - -print ('Require Export paconotation pacotacuser.') -print ('Require Import pacotac.') -print ('Set Implicit Arguments.') -print ('') - -n = relsize - -print ('(** ** Predicates of Arity '+str(n)) -print ('*)') -print ('') - -for m in range(1,mutsize+1): - print ('Section Arg'+str(n)+lev(m)+'_def.') - for i in range(n): - print ('Variable T'+str(i)+' : '+ifpstr(i,'forall'),end='') - for j in range(i): - print (' (x'+str(j)+': @T'+str(j)+itrstr(" x",j)+')',end='') - print (ifpstr(i,', ')+'Type.') - print ('Variable'+itridx(" gf",m)+' : '+m*('rel'+str(n)+itrstr(" T",n)+' -> ')+'rel'+str(n)+itrstr(" T",n)+'.') - for i in range(m): - print ('Arguments gf'+idx(m,i)+' : clear implicits.') - print ('') - print ('CoInductive ',end='') - for i in range(m): - print (ifpstr(i,"with ")+'paco'+str(n)+lev(m)+idx(m,i)+'('+itridx(' r',m)+': rel'+str(n)+itrstr(' T',n)+')'+itrstr(" x",n)+' : Prop :=') - print ('| paco'+str(n)+lev(m)+idx(m,i)+'_pfold'+itridx(' pco',m)) - for j in range(m): - print (' (LE : pco'+idx(m,j)+' <'+str(n)+'= (paco'+str(n)+lev(m)+idx(m,j)+itridx(' r',m)+' \\'+str(n)+'/ r'+idx(m,j)+'))') - print (' (SIM: gf'+idx(m,i)+itridx(' pco',m)+itrstr(" x",n)+')') - print ('.') - for i in range(m): - print ('Definition ',end='') - print ('upaco'+str(n)+lev(m)+idx(m,i)+'('+itridx(' r',m)+': rel'+str(n)+itrstr(' T',n)+')'+' := '+'paco'+str(n)+lev(m)+idx(m,i)+itridx(' r',m)+' \\'+str(n)+'/ r'+idx(m,i),end='') - print ('.') - print ('End Arg'+str(n)+lev(m)+'_def.') - for i in range(m): - print ('Arguments paco'+str(n)+lev(m)+idx(m,i)+ifpstr(n,' ['+itrstr(" T",n)+' ].'," : clear implicits.")) - print ('Arguments upaco'+str(n)+lev(m)+idx(m,i)+ifpstr(n,' ['+itrstr(" T",n)+' ].'," : clear implicits.")) - print ('Hint Unfold upaco'+str(n)+lev(m)+idx(m,i)+'.') - print ('') - -print ("(* Less than or equal - internal use only *)") -print ("Notation \"p <_paco_"+str(n)+"= q\" :=") -print (" (forall"+itrstr(" _paco_x",n)+" (PR: p"+itrstr(" _paco_x",n)+" : Prop), q"+itrstr(" _paco_x",n)+" : Prop)") -print (" (at level 50, no associativity).") -print ('') - -for m in range (1,mutsize+1): - print ('(** '+str(m)+' Mutual Coinduction *)') - print ('') - print ('Section Arg'+str(n)+'_'+str(m)+'.') - print ('') - print ("Definition monotone"+str(n)+lev(m)+itrstr(" T",n)+" (gf: "+m*("rel"+str(n)+itrstr(" T",n)+" -> ")+"rel"+str(n)+itrstr(" T",n)+") :=") - print (" forall"+itrstr(" x",n)+itridx(" r",m)+itridx(" r'",m)+" (IN: gf"+itridx(" r",m)+itrstr(" x",n)+") ",end='') - for i in range(m): - print ("(LE"+idx(m,i)+": r"+idx(m,i)+" <"+str(n)+"= r'"+idx(m,i)+")",end='') - print (", gf"+itridx(" r'",m)+itrstr(" x",n)+".") - print ('') - for i in range(n): - print ('Variable T'+str(i)+' : '+ifpstr(i,'forall'),end='') - for j in range(i): - print (' (x'+str(j)+': @T'+str(j)+itrstr(" x",j)+')',end='') - print (ifpstr(i,', ')+'Type.') - print ('Variable'+itridx(" gf",m)+' : '+m*('rel'+str(n)+itrstr(" T",n)+' -> ')+'rel'+str(n)+itrstr(" T",n)+'.') - for i in range(m): - print ('Arguments gf'+idx(m,i)+' : clear implicits.') - print ('') - for i in range(m): - print ('Theorem paco'+str(n)+lev(m)+idx(m,i)+'_acc: forall') - print (' l'+itridx(' r',m)+' (OBG: forall rr (INC: r'+idx(m,i)+' <'+str(n)+'= rr) (CIH: l <_paco_'+str(n)+'= rr), l <_paco_'+str(n)+'= paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m),end='') - for j in range(m): - if j == i: - print (' rr',end='') - else: - print (' r'+idx(m,j),end='') - print ('),') - print (' l <'+str(n)+'= paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') - print ('Proof.') - print (' intros; assert (SIM: paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m),end='') - for j in range(m): - if j == i: - print (' (r'+idx(m,j)+' \\'+str(n)+'/ l)',end='') - else: - print (' r'+idx(m,j),end='') - print (itrstr(" x",n)+') by eauto.') - print (' clear PR; repeat (try left; do '+str(n+1)+' paco_revert; paco_cofix_auto).') - print ('Qed.') - print ('') - for i in range(m): - print ('Theorem paco'+str(n)+lev(m)+idx(m,i)+'_mon: monotone'+str(n)+lev(m)+' (paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+').') - print ('Proof. paco_cofix_auto; repeat (left; do '+str(n+1)+' paco_revert; paco_cofix_auto). Qed.') - print ('') - for i in range(m): - print ('Theorem paco'+str(n)+lev(m)+idx(m,i)+'_mult_strong: forall'+itridx(' r',m)+',') - print (' paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m),end='') - for j in range(m): - print (' (upaco'+str(n)+lev(m)+idx(m,j)+itridx(" gf",m)+itridx(' r',m)+')',end='') - print (' <'+str(n)+'= paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') - print ('Proof. paco_cofix_auto; repeat (left; do '+str(n+1)+' paco_revert; paco_cofix_auto). Qed.') - print ('') - for i in range(m): - print ('Corollary paco'+str(n)+lev(m)+idx(m,i)+'_mult: forall'+itridx(' r',m)+',') - print (' paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' (paco'+str(n)+lev(m),m,itridx(" gf",m)+itridx(' r',m)+')')+' <'+str(n)+'= paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') - print ('Proof. intros; eapply paco'+str(n)+lev(m)+idx(m,i)+'_mult_strong, paco'+str(n)+lev(m)+idx(m,i)+'_mon; eauto. Qed.') - print ('') - for i in range(m): - print ('Theorem paco'+str(n)+lev(m)+idx(m,i)+'_fold: forall'+itridx(' r',m)+',') - print (' gf'+idx(m,i),end='') - for j in range(m): - print (' (upaco'+str(n)+lev(m)+idx(m,j)+itridx(" gf",m)+itridx(' r',m)+')',end='') - print (' <'+str(n)+'= paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') - print ('Proof. intros; econstructor; ['+m*' |'+'eauto]; eauto. Qed.') - print ('') - for i in range(m): - print ('Theorem paco'+str(n)+lev(m)+idx(m,i)+'_unfold: forall'+itridx(' (MON: monotone'+str(n)+lev(m)+' gf',m,')')+itridx(' r',m)+',') - print (' paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+' <'+str(n)+'= gf'+idx(m,i),end='') - for j in range(m): - print (' (upaco'+str(n)+lev(m)+idx(m,j)+itridx(" gf",m)+itridx(' r',m)+')',end='') - print ('.') - print ('Proof. unfold monotone'+str(n)+lev(m)+'; intros; destruct PR; eauto. Qed.') - print ('') - print ('End Arg'+str(n)+'_'+str(m)+'.') - print ('') - print ('Hint Unfold monotone'+str(n)+lev(m)+'.') - for i in range(m): - print ('Hint Resolve paco'+str(n)+lev(m)+idx(m,i)+'_fold.') - print ('') - for i in range(m): - print ('Arguments paco'+str(n)+lev(m)+idx(m,i)+'_acc'+ifpstr(n,' ['+itrstr(" T",n)+' ].'," : clear implicits.")) - for i in range(m): - print ('Arguments paco'+str(n)+lev(m)+idx(m,i)+'_mon'+ifpstr(n,' ['+itrstr(" T",n)+' ].'," : clear implicits.")) - for i in range(m): - print ('Arguments paco'+str(n)+lev(m)+idx(m,i)+'_mult_strong'+ifpstr(n,' ['+itrstr(" T",n)+' ].'," : clear implicits.")) - for i in range(m): - print ('Arguments paco'+str(n)+lev(m)+idx(m,i)+'_mult'+ifpstr(n,' ['+itrstr(" T",n)+' ].'," : clear implicits.")) - for i in range(m): - print ('Arguments paco'+str(n)+lev(m)+idx(m,i)+'_fold'+ifpstr(n,' ['+itrstr(" T",n)+' ].'," : clear implicits.")) - for i in range(m): - print ('Arguments paco'+str(n)+lev(m)+idx(m,i)+'_unfold'+ifpstr(n,' ['+itrstr(" T",n)+' ].'," : clear implicits.")) - print ('') - - for i in range(m): - print ("Instance paco"+str(n)+lev(m)+idx(m,i)+"_inst "+itrstr(" T",n)+" ("+itridx("gf",m," ")+": rel"+str(n)+itrstr(" T",n)+"->_)"+itridx(" r",m)+itrstr(" x",n)+" : paco_class (paco"+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(" r",m)+itrstr(" x",n)+") :=") - print ("{ pacoacc := paco"+str(n)+lev(m)+idx(m,i)+"_acc"+itridx(" gf",m)+";") - print (" pacomult := paco"+str(n)+lev(m)+idx(m,i)+"_mult"+itridx(" gf",m)+";") - print (" pacofold := paco"+str(n)+lev(m)+idx(m,i)+"_fold"+itridx(" gf",m)+";") - print (" pacounfold := paco"+str(n)+lev(m)+idx(m,i)+"_unfold"+itridx(" gf",m)+" }.") - print ('') +from __future__ import print_function +import sys +from pacolib import * + +if len(sys.argv) < 3: + sys.stderr.write('\nUsage: '+sys.argv[0]+' relsize mutsize\n\n') + sys.exit(1) + +relsize = int(sys.argv[1]) +mutsize = int(sys.argv[2]) + +print ('Require Export paconotation pacotacuser.') +print ('Require Import paconotation_internal pacotac pacon.') +print ('Set Implicit Arguments.') +print ('') + +n = relsize + +print ('Section PACO'+str(n)+'.') +print ('') + +for i in range(n): + print ('Variable T'+str(i)+' : '+ifpstr(i,'forall'),end='') + for j in range(i): + print (' (x'+str(j)+': @T'+str(j)+itrstr(" x",j)+')',end='') + print (ifpstr(i,', ')+'Type.') +print ('') + +print ('Record sig'+str(n)+'T :=') +print (' exist'+str(n)+'T { ') +for i in range(n): + print (' proj'+str(n)+'T'+str(i)+': @T'+str(i)+itrstr(' proj'+str(n)+'T', i)+';') +print (' }.') +print ('') + +print ('Definition uncurry'+str(n)+' (R: rel'+str(n)+itrstr(' T',n)+'): rel1 sig'+str(n)+'T := fun x => R'+itrstr(' (proj'+str(n)+'T', n, ' x)')+'.') +print ('') + +print ('Definition curry'+str(n)+' (R: rel1 sig'+str(n)+'T): rel'+str(n)+itrstr(' T', n)+' :=') +print (' '+ifpstr(n, 'fun'+itrstr(' x', n)+' => ')+'R (exist'+str(n)+'T'+ifpstr(n, ' x'+str(n-1))+').') +print ('') + +print ('Lemma uncurry_map'+str(n)+' r0 r1 (LE : r0 <'+str(n)+'== r1) : uncurry'+str(n)+' r0 <1== uncurry'+str(n)+' r1.') +print ('Proof. intros [] H. apply LE. auto. Qed.') +print ('') + +print ('Lemma uncurry_map_rev'+str(n)+' r0 r1 (LE: uncurry'+str(n)+' r0 <1== uncurry'+str(n)+' r1) : r0 <'+str(n)+'== r1.') +print ('Proof.') +print (' repeat_intros '+str(n)+'. intros H. apply (LE (exist'+str(n)+'T'+ifpstr(n, ' x'+str(n-1))+') H).') +print ('Qed.') +print ('') + +print ('Lemma curry_map'+str(n)+' r0 r1 (LE: r0 <1== r1) : curry'+str(n)+' r0 <'+str(n)+'== curry'+str(n)+' r1.') +print ('Proof. ') +print (' repeat_intros '+str(n)+'. intros H. apply (LE (exist'+str(n)+'T'+ifpstr(n, ' x'+str(n-1))+') H).') +print ('Qed.') +print ('') + +print ('Lemma curry_map_rev'+str(n)+' r0 r1 (LE: curry'+str(n)+' r0 <'+str(n)+'== curry'+str(n)+' r1) : r0 <1== r1.') +print ('Proof. ') +print (' intros [] H. apply LE. apply H.') +print ('Qed.') +print ('') + +print ('Lemma uncurry_bij1_'+str(n)+' r : curry'+str(n)+' (uncurry'+str(n)+' r) <'+str(n)+'== r.') +print ('Proof. unfold le'+str(n)+'. repeat_intros '+str(n)+'; auto. Qed.') +print ('') + +print ('Lemma uncurry_bij2_'+str(n)+' r : r <'+str(n)+'== curry'+str(n)+' (uncurry'+str(n)+' r).') +print ('Proof. unfold le'+str(n)+'. repeat_intros '+str(n)+'; auto. Qed.') +print ('') + +print ('Lemma curry_bij1_'+str(n)+' r : uncurry'+str(n)+' (curry'+str(n)+' r) <1== r.') +print ('Proof. intros []; auto. Qed.') +print ('') + +print ('Lemma curry_bij2_'+str(n)+' r : r <1== uncurry'+str(n)+' (curry'+str(n)+' r).') +print ('Proof. intros []; auto. Qed.') +print ('') + +print ('Lemma uncurry_adjoint1_'+str(n)+' r0 r1 (LE: uncurry'+str(n)+' r0 <1== r1) : r0 <'+str(n)+'== curry'+str(n)+' r1.') +print ('Proof.') +print (' apply uncurry_map_rev'+str(n)+'. eapply le1_trans; [eauto|]. apply curry_bij2_'+str(n)+'.') +print ('Qed.') +print ('') + +print ('Lemma uncurry_adjoint2_'+str(n)+' r0 r1 (LE: r0 <'+str(n)+'== curry'+str(n)+' r1) : uncurry'+str(n)+' r0 <1== r1.') +print ('Proof.') +print (' apply curry_map_rev'+str(n)+'. eapply le'+str(n)+'_trans; [|eauto]. apply uncurry_bij2_'+str(n)+'.') +print ('Qed.') +print ('') + +print ('Lemma curry_adjoint1_'+str(n)+' r0 r1 (LE: curry'+str(n)+' r0 <'+str(n)+'== r1) : r0 <1== uncurry'+str(n)+' r1.') +print ('Proof.') +print (' apply curry_map_rev'+str(n)+'. eapply le'+str(n)+'_trans; [eauto|]. apply uncurry_bij2_'+str(n)+'.') +print ('Qed.') +print ('') + +print ('Lemma curry_adjoint2_'+str(n)+' r0 r1 (LE: r0 <1== uncurry'+str(n)+' r1) : curry'+str(n)+' r0 <'+str(n)+'== r1.') +print ('Proof.') +print (' apply uncurry_map_rev'+str(n)+'. eapply le1_trans; [|eauto]. apply curry_bij1_'+str(n)+'.') +print ('Qed.') +print ('') + +print ('(** ** Predicates of Arity '+str(n)) +print ('*)') +print ('') + +for m in range(1,mutsize+1): + print ('Section Arg'+str(n)+lev(m)+'_def.') + print ('Variable'+itridx(" gf",m)+' : '+m*('rel'+str(n)+itrstr(" T",n)+' -> ')+'rel'+str(n)+itrstr(" T",n)+'.') + for i in range(m): + print ('Arguments gf'+idx(m,i)+' : clear implicits.') + print ('') + + for i in range(m): + print ('Definition ',end='') + print ('paco'+str(n)+lev(m)+idx(m,i)+'('+itridx(' r',m)+': rel'+str(n)+itrstr(' T',n)+')'+' : rel'+str(n)+itrstr(' T',n)+' :=') + print (' curry'+str(n)+' (paco'+lev(m)+idx(m,i), end='') + for j in range(m): + print (' (fun'+itrstr(' R', m)+' => uncurry'+str(n)+' (gf'+idx(m, j)+itrstr(' (curry'+str(n)+' R', m, ')')+'))', end='') + print (itridx(' (uncurry'+str(n)+' r', m,')')+').') + print ('') + + for i in range(m): + print ('Definition ',end='') + print ('upaco'+str(n)+lev(m)+idx(m,i)+'('+itridx(' r',m)+': rel'+str(n)+itrstr(' T',n)+')'+' := '+'paco'+str(n)+lev(m)+idx(m,i)+itridx(' r',m)+' \\'+str(n)+'/ r'+idx(m,i),end='') + print ('.') + print ('End Arg'+str(n)+lev(m)+'_def.') + for i in range(m): + print ('Arguments paco'+str(n)+lev(m)+idx(m,i)+' : clear implicits.') + print ('Arguments upaco'+str(n)+lev(m)+idx(m,i)+' : clear implicits.') + print ('Hint Unfold upaco'+str(n)+lev(m)+idx(m,i)+'.') + print ('') + +for m in range (1,mutsize+1): + print ('(** '+str(m)+' Mutual Coinduction *)') + print ('') + print ('Section Arg'+str(n)+'_'+str(m)+'.') + print ('') + print ("Definition monotone"+str(n)+lev(m)+" (gf: "+m*("rel"+str(n)+itrstr(" T",n)+" -> ")+"rel"+str(n)+itrstr(" T",n)+") :=") + print (" forall"+itrstr(" x",n)+itridx(" r",m)+itridx(" r'",m)+" (IN: gf"+itridx(" r",m)+itrstr(" x",n)+") ",end='') + for i in range(m): + print ("(LE"+idx(m,i)+": r"+idx(m,i)+" <"+str(n)+"= r'"+idx(m,i)+")",end='') + print (", gf"+itridx(" r'",m)+itrstr(" x",n)+".") + print ('') + print ("Definition _monotone"+str(n)+lev(m)+" (gf: "+m*("rel"+str(n)+itrstr(" T",n)+" -> ")+"rel"+str(n)+itrstr(" T",n)+") :=") + print (" forall"+itridx(" r",m)+itridx(" r'",m),end='') + for i in range(m): + print ("(LE"+idx(m,i)+": r"+idx(m,i)+" <"+str(n)+"= r'"+idx(m,i)+")",end='') + print (", gf"+itridx(" r",m)+' <'+str(n)+'== gf'+itridx(" r'",m)+'.') + print ('') + print ("Lemma monotone"+str(n)+lev(m)+'_eq'+" (gf: "+m*("rel"+str(n)+itrstr(" T",n)+" -> ")+"rel"+str(n)+itrstr(" T",n)+") :") + print (" monotone"+str(n)+lev(m)+' gf <-> _monotone'+str(n)+lev(m)+' gf.') + print ("Proof. unfold monotone"+str(n)+lev(m)+', _monotone'+str(n)+lev(m)+', le'+str(n)+'. split; eauto. Qed.') + print ('') + print ("Lemma monotone"+str(n)+lev(m)+'_map'+" (gf: "+m*("rel"+str(n)+itrstr(" T",n)+" -> ")+"rel"+str(n)+itrstr(" T",n)+")") + print (" (MON: _monotone"+str(n)+lev(m)+' gf) :') + print (" _monotone"+lev(m)+' (fun'+itrstr(' R', m)+' => uncurry'+str(n)+' (gf'+itrstr(' (curry'+str(n)+' R', m, ')')+')).') + print ('Proof.') + print (' repeat_intros '+str(3*m)+'. apply uncurry_map'+str(n)+'. apply MON; apply curry_map'+str(n)+'; auto.') + print ('Qed.') + print ('') + + print ('Variable'+itridx(" gf",m)+' : '+m*('rel'+str(n)+itrstr(" T",n)+' -> ')+'rel'+str(n)+itrstr(" T",n)+'.') + for i in range(m): + print ('Arguments gf'+idx(m,i)+' : clear implicits.') + print ('') + for i in range(m): + print ('Theorem _paco'+str(n)+lev(m)+idx(m,i)+'_mon: _monotone'+str(n)+lev(m)+' (paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+').') + print ('Proof.') + print (' repeat_intros '+str(m*3)+'. eapply curry_map'+str(n)+', _paco'+lev(m)+idx(m,i)+'_mon; apply uncurry_map'+str(n)+'; auto.') + print ('Qed.') + print ('') + for i in range(m): + print ('Theorem _paco'+str(n)+lev(m)+idx(m,i)+'_acc: forall') + print (' l'+itridx(' r',m)+' (OBG: forall rr (INC: r'+idx(m,i)+' <'+str(n)+'== rr) (CIH: l <'+str(n)+'== rr), l <'+str(n)+'== paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m),end='') + for j in range(m): + if j == i: + print (' rr',end='') + else: + print (' r'+idx(m,j),end='') + print ('),') + print (' l <'+str(n)+'== paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') + print ('Proof.') + print (' intros. apply uncurry_adjoint1_'+str(n)+'.') + print (' eapply _paco'+lev(m)+idx(m,i)+'_acc. intros.') + print (' apply uncurry_adjoint1_'+str(n)+' in INC. apply uncurry_adjoint1_'+str(n)+' in CIH.') + print (' apply uncurry_adjoint2_'+str(n)+'.') + print (' eapply le'+str(n)+'_trans. eapply (OBG _ INC CIH).') + print (' apply curry_map'+str(n)+'.') + print (' apply _paco'+lev(m)+idx(m,i)+'_mon; try apply le1_refl; apply curry_bij1_'+str(n)+'.') + print ('Qed.') + print ('') + for i in range(m): + print ('Theorem _paco'+str(n)+lev(m)+idx(m,i)+'_mult_strong: forall'+itridx(' r',m)+',') + print (' paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m),end='') + for j in range(m): + print (' (upaco'+str(n)+lev(m)+idx(m,j)+itridx(" gf",m)+itridx(' r',m)+')',end='') + print (' <'+str(n)+'== paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') + print ('Proof.') + print (' intros. apply curry_map'+str(n)+'.') + print (' eapply le1_trans; [| eapply _paco'+lev(m)+idx(m,i)+'_mult_strong].') + print (' apply _paco'+lev(m)+idx(m,i)+'_mon; intros []; eauto.') + print ('Qed.') + print ('') + for i in range(m): + print ('Theorem _paco'+str(n)+lev(m)+idx(m,i)+'_fold: forall'+itridx(' r',m)+',') + print (' gf'+idx(m,i),end='') + for j in range(m): + print (' (upaco'+str(n)+lev(m)+idx(m,j)+itridx(" gf",m)+itridx(' r',m)+')',end='') + print (' <'+str(n)+'== paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') + print ('Proof.') + print (' intros. apply uncurry_adjoint1_'+str(n)+'.') + print (' eapply le1_trans; [| apply _paco'+lev(m)+idx(m,i)+'_fold]. apply le1_refl.') + print ('Qed.') + print ('') + for i in range(m): + print ('Theorem _paco'+str(n)+lev(m)+idx(m,i)+'_unfold: forall'+itridx(' (MON: _monotone'+str(n)+lev(m)+' gf',m,')')+itridx(' r',m)+',') + print (' paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+' <'+str(n)+'== gf'+idx(m,i),end='') + for j in range(m): + print (' (upaco'+str(n)+lev(m)+idx(m,j)+itridx(" gf",m)+itridx(' r',m)+')',end='') + print ('.') + print ('Proof.') + print (' intros. apply curry_adjoint2_'+str(n)+'.') + print (' eapply _paco'+lev(m)+idx(m,i)+'_unfold; apply monotone'+str(n)+lev(m)+'_map; auto.') + print ('Qed.') + print ('') + + for i in range(m): + print ('Theorem paco'+str(n)+lev(m)+idx(m,i)+'_acc: forall') + print (' l'+itridx(' r',m)+' (OBG: forall rr (INC: r'+idx(m,i)+' <'+str(n)+'= rr) (CIH: l <'+str(n)+'= rr), l <'+str(n)+'= paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m),end='') + for j in range(m): + if j == i: + print (' rr',end='') + else: + print (' r'+idx(m,j),end='') + print ('),') + print (' l <'+str(n)+'= paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') + print ('Proof.') + print (' apply _paco'+str(n)+lev(m)+idx(m,i)+'_acc.') + print ('Qed.') + print ('') + for i in range(m): + print ('Theorem paco'+str(n)+lev(m)+idx(m,i)+'_mon: monotone'+str(n)+lev(m)+' (paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+').') + print ('Proof.') + print (' apply monotone'+str(n)+lev(m)+'_eq.') + print (' apply _paco'+str(n)+lev(m)+idx(m,i)+'_mon.') + print ('Qed.') + print ('') + for i in range(m): + print ('Theorem paco'+str(n)+lev(m)+idx(m,i)+'_mult_strong: forall'+itridx(' r',m)+',') + print (' paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m),end='') + for j in range(m): + print (' (upaco'+str(n)+lev(m)+idx(m,j)+itridx(" gf",m)+itridx(' r',m)+')',end='') + print (' <'+str(n)+'= paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') + print ('Proof.') + print (' apply _paco'+str(n)+lev(m)+idx(m,i)+'_mult_strong.') + print ('Qed.') + print ('') + for i in range(m): + print ('Corollary paco'+str(n)+lev(m)+idx(m,i)+'_mult: forall'+itridx(' r',m)+',') + print (' paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' (paco'+str(n)+lev(m),m,itridx(" gf",m)+itridx(' r',m)+')')+' <'+str(n)+'= paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') + print ('Proof. intros; eapply paco'+str(n)+lev(m)+idx(m,i)+'_mult_strong, paco'+str(n)+lev(m)+idx(m,i)+'_mon; eauto. Qed.') + print ('') + for i in range(m): + print ('Theorem paco'+str(n)+lev(m)+idx(m,i)+'_fold: forall'+itridx(' r',m)+',') + print (' gf'+idx(m,i),end='') + for j in range(m): + print (' (upaco'+str(n)+lev(m)+idx(m,j)+itridx(" gf",m)+itridx(' r',m)+')',end='') + print (' <'+str(n)+'= paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') + print ('Proof.') + print (' apply _paco'+str(n)+lev(m)+idx(m,i)+'_fold.') + print ('Qed.') + print ('') + for i in range(m): + print ('Theorem paco'+str(n)+lev(m)+idx(m,i)+'_unfold: forall'+itridx(' (MON: monotone'+str(n)+lev(m)+' gf',m,')')+itridx(' r',m)+',') + print (' paco'+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+' <'+str(n)+'= gf'+idx(m,i),end='') + for j in range(m): + print (' (upaco'+str(n)+lev(m)+idx(m,j)+itridx(" gf",m)+itridx(' r',m)+')',end='') + print ('.') + print ('Proof.') + print (' repeat_intros '+str(m)+'. eapply _paco'+str(n)+lev(m)+idx(m,i)+'_unfold; apply monotone'+str(n)+lev(m)+'_eq; auto.') + print ('Qed.') + print ('') + + print ('End Arg'+str(n)+'_'+str(m)+'.') + print ('') + + for i in range(m): + print ('Arguments paco'+str(n)+lev(m)+idx(m,i)+'_acc'+" : clear implicits.") + for i in range(m): + print ('Arguments paco'+str(n)+lev(m)+idx(m,i)+'_mon'+" : clear implicits.") + for i in range(m): + print ('Arguments paco'+str(n)+lev(m)+idx(m,i)+'_mult_strong'+" : clear implicits.") + for i in range(m): + print ('Arguments paco'+str(n)+lev(m)+idx(m,i)+'_mult'+" : clear implicits.") + for i in range(m): + print ('Arguments paco'+str(n)+lev(m)+idx(m,i)+'_fold'+" : clear implicits.") + for i in range(m): + print ('Arguments paco'+str(n)+lev(m)+idx(m,i)+'_unfold'+" : clear implicits.") + print ('') + + for i in range(m): + print ("Global Instance paco"+str(n)+lev(m)+idx(m,i)+"_inst "+" ("+itridx("gf",m," ")+": rel"+str(n)+itrstr(" T",n)+"->_)"+itridx(" r",m)+itrstr(" x",n)+" : paco_class (paco"+str(n)+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(" r",m)+itrstr(" x",n)+") :=") + print ("{ pacoacc := paco"+str(n)+lev(m)+idx(m,i)+"_acc"+itridx(" gf",m)+";") + print (" pacomult := paco"+str(n)+lev(m)+idx(m,i)+"_mult"+itridx(" gf",m)+";") + print (" pacofold := paco"+str(n)+lev(m)+idx(m,i)+"_fold"+itridx(" gf",m)+";") + print (" pacounfold := paco"+str(n)+lev(m)+idx(m,i)+"_unfold"+itridx(" gf",m)+" }.") + print ('') + + +print ('End PACO'+str(n)+'.') +print ('') + +for m in range(1,mutsize+1): + for i in range(m): + print ('Global Opaque paco'+str(n)+lev(m)+idx(m,i)+'.') + print ('') + + for i in range(m): + print ('Hint Unfold upaco'+str(n)+lev(m)+idx(m,i)+'.') + for i in range(m): + print ('Hint Resolve paco'+str(n)+lev(m)+idx(m,i)+'_fold.') + print ('Hint Unfold monotone'+str(n)+lev(m)+'.') + print ('') diff --git a/metasrc/pacon.py b/metasrc/pacon.py new file mode 100644 index 0000000..3efbe9d --- /dev/null +++ b/metasrc/pacon.py @@ -0,0 +1,206 @@ +from __future__ import print_function +import sys +from pacolib import * + +if len(sys.argv) < 2: + sys.stderr.write('\nUsage: '+sys.argv[0]+' relsize mutsize\n\n') + sys.exit(1) + +mutsize = int(sys.argv[1]) + +print ('Require Export paconotation pacotacuser.') +print ('Require Import pacotac paconotation_internal.') +print ('Set Implicit Arguments.') +print ('') + +n = 1 + +print ('(** ** Predicates of Arity '+str(n)) +print ('*)') +print ('') + +for m in range(1,mutsize+1): + print ('Section Arg'+str(n)+lev(m)+'_def.') + for i in range(n): + print ('Variable T'+str(i)+' : '+ifpstr(i,'forall'),end='') + for j in range(i): + print (' (x'+str(j)+': @T'+str(j)+itrstr(" x",j)+')',end='') + print (ifpstr(i,', ')+'Type.') + print ('Variable'+itridx(" gf",m)+' : '+m*('rel'+str(n)+itrstr(" T",n)+' -> ')+'rel'+str(n)+itrstr(" T",n)+'.') + for i in range(m): + print ('Arguments gf'+idx(m,i)+' : clear implicits.') + print ('') + print ('CoInductive ',end='') + for i in range(m): + print (ifpstr(i,"with ")+'paco'+lev(m)+idx(m,i)+'('+itridx(' r',m)+': rel'+str(n)+itrstr(' T',n)+')'+itrstr(" x",n)+' : Prop :=') + print ('| paco'+lev(m)+idx(m,i)+'_pfold'+itridx(' pco',m)) + for j in range(m): + print (' (LE : pco'+idx(m,j)+' <'+str(n)+'= (paco'+lev(m)+idx(m,j)+itridx(' r',m)+' \\'+str(n)+'/ r'+idx(m,j)+'))') + print (' (SIM: gf'+idx(m,i)+itridx(' pco',m)+itrstr(" x",n)+')') + print ('.') + for i in range(m): + print ('Definition ',end='') + print ('upaco'+lev(m)+idx(m,i)+'('+itridx(' r',m)+': rel'+str(n)+itrstr(' T',n)+')'+' := '+'paco'+lev(m)+idx(m,i)+itridx(' r',m)+' \\'+str(n)+'/ r'+idx(m,i),end='') + print ('.') + print ('End Arg'+str(n)+lev(m)+'_def.') + for i in range(m): + print ('Arguments paco'+lev(m)+idx(m,i)+ifpstr(n,' ['+itrstr(" T",n)+' ].'," : clear implicits.")) + print ('Arguments upaco'+lev(m)+idx(m,i)+ifpstr(n,' ['+itrstr(" T",n)+' ].'," : clear implicits.")) + print ('Hint Unfold upaco'+lev(m)+idx(m,i)+'.') + print ('') + +print ("(* Less than or equal - internal use only *)") +print ("Notation \"p <_paco_"+str(n)+"= q\" :=") +print (" (forall"+itrstr(" _paco_x",n)+" (PR: p"+itrstr(" _paco_x",n)+" : Prop), q"+itrstr(" _paco_x",n)+" : Prop)") +print (" (at level 50, no associativity).") +print ('') + +for m in range (1,mutsize+1): + print ('(** '+str(m)+' Mutual Coinduction *)') + print ('') + print ('Section Arg'+str(n)+'_'+str(m)+'.') + print ('') + print ("Definition monotone"+lev(m)+itrstr(" T",n)+" (gf: "+m*("rel"+str(n)+itrstr(" T",n)+" -> ")+"rel"+str(n)+itrstr(" T",n)+") :=") + print (" forall"+itrstr(" x",n)+itridx(" r",m)+itridx(" r'",m)+" (IN: gf"+itridx(" r",m)+itrstr(" x",n)+") ",end='') + for i in range(m): + print ("(LE"+idx(m,i)+": r"+idx(m,i)+" <"+str(n)+"= r'"+idx(m,i)+")",end='') + print (", gf"+itridx(" r'",m)+itrstr(" x",n)+".") + print ('') + print ("Definition _monotone"+lev(m)+itrstr(" T",n)+" (gf: "+m*("rel"+str(n)+itrstr(" T",n)+" -> ")+"rel"+str(n)+itrstr(" T",n)+") :=") + print (" forall"+itridx(" r",m)+itridx(" r'",m),end='') + for i in range(m): + print ("(LE"+idx(m,i)+": r"+idx(m,i)+" <"+str(n)+"= r'"+idx(m,i)+")",end='') + print (", gf"+itridx(" r",m)+' <'+str(n)+'== gf'+itridx(" r'",m)+'.') + print ('') + print ("Lemma monotone"+lev(m)+'_eq'+itrstr(" T",n)+" (gf: "+m*("rel"+str(n)+itrstr(" T",n)+" -> ")+"rel"+str(n)+itrstr(" T",n)+") :") + print (" monotone"+lev(m)+' gf <-> _monotone'+lev(m)+' gf.') + print ("Proof. unfold monotone"+lev(m)+', _monotone'+lev(m)+', le'+str(n)+'. split; eauto. Qed.') + print ('') + + for i in range(n): + print ('Variable T'+str(i)+' : '+ifpstr(i,'forall'),end='') + for j in range(i): + print (' (x'+str(j)+': @T'+str(j)+itrstr(" x",j)+')',end='') + print (ifpstr(i,', ')+'Type.') + print ('Variable'+itridx(" gf",m)+' : '+m*('rel'+str(n)+itrstr(" T",n)+' -> ')+'rel'+str(n)+itrstr(" T",n)+'.') + for i in range(m): + print ('Arguments gf'+idx(m,i)+' : clear implicits.') + print ('') + for i in range(m): + print ('Theorem paco'+lev(m)+idx(m,i)+'_acc: forall') + print (' l'+itridx(' r',m)+' (OBG: forall rr (INC: r'+idx(m,i)+' <'+str(n)+'= rr) (CIH: l <'+str(n)+'= rr), l <'+str(n)+'= paco'+lev(m)+idx(m,i)+itridx(" gf",m),end='') + for j in range(m): + if j == i: + print (' rr',end='') + else: + print (' r'+idx(m,j),end='') + print ('),') + print (' l <'+str(n)+'= paco'+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') + print ('Proof.') + print (' intros; assert (SIM: paco'+lev(m)+idx(m,i)+itridx(" gf",m),end='') + for j in range(m): + if j == i: + print (' (r'+idx(m,j)+' \\'+str(n)+'/ l)',end='') + else: + print (' r'+idx(m,j),end='') + print (itrstr(" x",n)+') by eauto.') + print (' clear PR; repeat (try left; do '+str(n+1)+' paco_revert; paco_cofix_auto).') + print ('Qed.') + print ('') + for i in range(m): + print ('Theorem paco'+lev(m)+idx(m,i)+'_mon: monotone'+lev(m)+' (paco'+lev(m)+idx(m,i)+itridx(" gf",m)+').') + print ('Proof. paco_cofix_auto; repeat (left; do '+str(n+1)+' paco_revert; paco_cofix_auto). Qed.') + print ('') + for i in range(m): + print ('Theorem paco'+lev(m)+idx(m,i)+'_mult_strong: forall'+itridx(' r',m)+',') + print (' paco'+lev(m)+idx(m,i)+itridx(" gf",m),end='') + for j in range(m): + print (' (upaco'+lev(m)+idx(m,j)+itridx(" gf",m)+itridx(' r',m)+')',end='') + print (' <'+str(n)+'= paco'+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') + print ('Proof. paco_cofix_auto; repeat (left; do '+str(n+1)+' paco_revert; paco_cofix_auto). Qed.') + print ('') + for i in range(m): + print ('Corollary paco'+lev(m)+idx(m,i)+'_mult: forall'+itridx(' r',m)+',') + print (' paco'+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' (paco'+lev(m),m,itridx(" gf",m)+itridx(' r',m)+')')+' <'+str(n)+'= paco'+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') + print ('Proof. intros; eapply paco'+lev(m)+idx(m,i)+'_mult_strong, paco'+lev(m)+idx(m,i)+'_mon; eauto. Qed.') + print ('') + for i in range(m): + print ('Theorem paco'+lev(m)+idx(m,i)+'_fold: forall'+itridx(' r',m)+',') + print (' gf'+idx(m,i),end='') + for j in range(m): + print (' (upaco'+lev(m)+idx(m,j)+itridx(" gf",m)+itridx(' r',m)+')',end='') + print (' <'+str(n)+'= paco'+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') + print ('Proof. intros; econstructor; ['+m*' |'+'eauto]; eauto. Qed.') + print ('') + for i in range(m): + print ('Theorem paco'+lev(m)+idx(m,i)+'_unfold: forall'+itridx(' (MON: monotone'+lev(m)+' gf',m,')')+itridx(' r',m)+',') + print (' paco'+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+' <'+str(n)+'= gf'+idx(m,i),end='') + for j in range(m): + print (' (upaco'+lev(m)+idx(m,j)+itridx(" gf",m)+itridx(' r',m)+')',end='') + print ('.') + print ('Proof. unfold monotone'+lev(m)+'; intros; destruct PR; eauto. Qed.') + print ('') + + for i in range(m): + print ('Theorem _paco'+lev(m)+idx(m,i)+'_acc: forall') + print (' l'+itridx(' r',m)+' (OBG: forall rr (INC: r'+idx(m,i)+' <'+str(n)+'== rr) (CIH: l <'+str(n)+'== rr), l <'+str(n)+'== paco'+lev(m)+idx(m,i)+itridx(" gf",m),end='') + for j in range(m): + if j == i: + print (' rr',end='') + else: + print (' r'+idx(m,j),end='') + print ('),') + print (' l <'+str(n)+'== paco'+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') + print ('Proof. unfold le1. eapply paco'+lev(m)+idx(m,i)+'_acc. Qed.') + print ('') + for i in range(m): + print ('Theorem _paco'+lev(m)+idx(m,i)+'_mon: _monotone'+lev(m)+' (paco'+lev(m)+idx(m,i)+itridx(" gf",m)+').') + print ('Proof. apply monotone'+lev(m)+'_eq. eapply paco'+lev(m)+idx(m,i)+'_mon. Qed.') + print ('') + for i in range(m): + print ('Theorem _paco'+lev(m)+idx(m,i)+'_mult_strong: forall'+itridx(' r',m)+',') + print (' paco'+lev(m)+idx(m,i)+itridx(" gf",m),end='') + for j in range(m): + print (' (upaco'+lev(m)+idx(m,j)+itridx(" gf",m)+itridx(' r',m)+')',end='') + print (' <'+str(n)+'== paco'+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') + print ('Proof. unfold le1. eapply paco'+lev(m)+idx(m,i)+'_mult_strong. Qed.') + print ('') + for i in range(m): + print ('Theorem _paco'+lev(m)+idx(m,i)+'_fold: forall'+itridx(' r',m)+',') + print (' gf'+idx(m,i),end='') + for j in range(m): + print (' (upaco'+lev(m)+idx(m,j)+itridx(" gf",m)+itridx(' r',m)+')',end='') + print (' <'+str(n)+'== paco'+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+'.') + print ('Proof. unfold le1. eapply paco'+lev(m)+idx(m,i)+'_fold. Qed.') + print ('') + for i in range(m): + print ('Theorem _paco'+lev(m)+idx(m,i)+'_unfold: forall'+itridx(' (MON: _monotone'+lev(m)+' gf',m,')')+itridx(' r',m)+',') + print (' paco'+lev(m)+idx(m,i)+itridx(" gf",m)+itridx(' r',m)+' <'+str(n)+'== gf'+idx(m,i),end='') + for j in range(m): + print (' (upaco'+lev(m)+idx(m,j)+itridx(" gf",m)+itridx(' r',m)+')',end='') + print ('.') + print ('Proof.') + print (' unfold le1. repeat_intros '+str(m)+'.') + print (' eapply paco'+lev(m)+idx(m,i)+'_unfold; apply monotone'+lev(m)+'_eq; eauto.') + print ('Qed.') + print ('') + + print ('End Arg'+str(n)+'_'+str(m)+'.') + print ('') + print ('Hint Unfold monotone'+lev(m)+'.') + for i in range(m): + print ('Hint Resolve paco'+lev(m)+idx(m,i)+'_fold.') + print ('') + for i in range(m): + print ('Arguments paco'+lev(m)+idx(m,i)+'_acc'+ifpstr(n,' ['+itrstr(" T",n)+' ].'," : clear implicits.")) + for i in range(m): + print ('Arguments paco'+lev(m)+idx(m,i)+'_mon'+ifpstr(n,' ['+itrstr(" T",n)+' ].'," : clear implicits.")) + for i in range(m): + print ('Arguments paco'+lev(m)+idx(m,i)+'_mult_strong'+ifpstr(n,' ['+itrstr(" T",n)+' ].'," : clear implicits.")) + for i in range(m): + print ('Arguments paco'+lev(m)+idx(m,i)+'_mult'+ifpstr(n,' ['+itrstr(" T",n)+' ].'," : clear implicits.")) + for i in range(m): + print ('Arguments paco'+lev(m)+idx(m,i)+'_fold'+ifpstr(n,' ['+itrstr(" T",n)+' ].'," : clear implicits.")) + for i in range(m): + print ('Arguments paco'+lev(m)+idx(m,i)+'_unfold'+ifpstr(n,' ['+itrstr(" T",n)+' ].'," : clear implicits.")) + print ('') diff --git a/metasrc/paconotation_internal.py b/metasrc/paconotation_internal.py new file mode 100644 index 0000000..c01c9d9 --- /dev/null +++ b/metasrc/paconotation_internal.py @@ -0,0 +1,46 @@ +from __future__ import print_function +import sys +from pacolib import * + +if len(sys.argv) < 2: + sys.stderr.write('\nUsage: '+sys.argv[0]+' relsize\n\n') + sys.exit(1) + +relsize = int(sys.argv[1]) + +print ("Require Import paconotation.") +print ("") + +print ("Tactic Notation \"repeat_intros\" int(n)") +print (" := let name := fresh \"x\" in") +print (" do n (let name := fresh \"x\" in intros name).") +print () + +print ("(** ** Less than or equal *)") +print () +for n in range (relsize+1): + print ("Definition le"+str(n)+itrstr(" T",n)+" (p q : rel"+str(n)+itrstr(" T",n)+") :=") + print (" (forall"+itrstr(" x",n)+" (PR: p"+itrstr(" x",n)+" : Prop), q"+itrstr(" x",n)+" : Prop).") + print ("Arguments le"+str(n)+ifpstr(n, " ["+itrstr(" T",n)+"].", " : clear implicits.")) + print () + +for n in range (relsize+1): + print ("Notation \"p <"+str(n)+"== q\" :=") + print (" (le"+str(n)+" p q)") + print (" (at level 50, no associativity"+ifzstr(n,", only parsing")+").") + print () + +print ("(** ** Tranisitivity and Reflexivity *)") +print () +for n in range (relsize+1): + print ("Lemma le"+str(n)+"_trans"+itrstr(" T",n)+"(r0 r1 r2 : rel"+str(n)+itrstr(" T",n)+")") + print (" (LE0 : r0 <"+str(n)+"== r1) (LE1 : r1 <"+str(n)+"== r2) :") + print (" r0 <"+str(n)+"== r2.") + print ("Proof. repeat_intros "+str(n)+". intros H. auto. Qed.") + print () + +for n in range (relsize+1): + print ("Lemma le"+str(n)+"_refl"+itrstr(" T",n)+"(r : rel"+str(n)+itrstr(" T",n)+") :") + print (" r <"+str(n)+"== r.") + print ("Proof. repeat_intros "+str(n)+". intros H. auto. Qed.") + print () diff --git a/src/paco0.v b/src/paco0.v index 69418c9..f60b91e 100644 --- a/src/paco0.v +++ b/src/paco0.v @@ -1,7 +1,69 @@ Require Export paconotation pacotacuser. -Require Import pacotac. +Require Import paconotation_internal pacotac pacon. Set Implicit Arguments. +Section PACO0. + + +Record sig0T := + exist0T { + }. + +Definition uncurry0 (R: rel0): rel1 sig0T := fun x => R. + +Definition curry0 (R: rel1 sig0T): rel0 := + R (exist0T). + +Lemma uncurry_map0 r0 r1 (LE : r0 <0== r1) : uncurry0 r0 <1== uncurry0 r1. +Proof. intros [] H. apply LE. auto. Qed. + +Lemma uncurry_map_rev0 r0 r1 (LE: uncurry0 r0 <1== uncurry0 r1) : r0 <0== r1. +Proof. + repeat_intros 0. intros H. apply (LE (exist0T) H). +Qed. + +Lemma curry_map0 r0 r1 (LE: r0 <1== r1) : curry0 r0 <0== curry0 r1. +Proof. + repeat_intros 0. intros H. apply (LE (exist0T) H). +Qed. + +Lemma curry_map_rev0 r0 r1 (LE: curry0 r0 <0== curry0 r1) : r0 <1== r1. +Proof. + intros [] H. apply LE. apply H. +Qed. + +Lemma uncurry_bij1_0 r : curry0 (uncurry0 r) <0== r. +Proof. unfold le0. repeat_intros 0; auto. Qed. + +Lemma uncurry_bij2_0 r : r <0== curry0 (uncurry0 r). +Proof. unfold le0. repeat_intros 0; auto. Qed. + +Lemma curry_bij1_0 r : uncurry0 (curry0 r) <1== r. +Proof. intros []; auto. Qed. + +Lemma curry_bij2_0 r : r <1== uncurry0 (curry0 r). +Proof. intros []; auto. Qed. + +Lemma uncurry_adjoint1_0 r0 r1 (LE: uncurry0 r0 <1== r1) : r0 <0== curry0 r1. +Proof. + apply uncurry_map_rev0. eapply le1_trans; [eauto|]. apply curry_bij2_0. +Qed. + +Lemma uncurry_adjoint2_0 r0 r1 (LE: r0 <0== curry0 r1) : uncurry0 r0 <1== r1. +Proof. + apply curry_map_rev0. eapply le0_trans; [|eauto]. apply uncurry_bij2_0. +Qed. + +Lemma curry_adjoint1_0 r0 r1 (LE: curry0 r0 <0== r1) : r0 <1== uncurry0 r1. +Proof. + apply curry_map_rev0. eapply le0_trans; [eauto|]. apply uncurry_bij2_0. +Qed. + +Lemma curry_adjoint2_0 r0 r1 (LE: r0 <1== uncurry0 r1) : curry0 r0 <0== r1. +Proof. + apply uncurry_map_rev0. eapply le1_trans; [|eauto]. apply curry_bij1_0. +Qed. + (** ** Predicates of Arity 0 *) @@ -9,11 +71,9 @@ Section Arg0_def. Variable gf : rel0 -> rel0. Arguments gf : clear implicits. -CoInductive paco0( r: rel0) : Prop := -| paco0_pfold pco - (LE : pco <0= (paco0 r \0/ r)) - (SIM: gf pco) -. +Definition paco0( r: rel0) : rel0 := + curry0 (paco (fun R0 => uncurry0 (gf (curry0 R0))) (uncurry0 r)). + Definition upaco0( r: rel0) := paco0 r \0/ r. End Arg0_def. Arguments paco0 : clear implicits. @@ -25,17 +85,12 @@ Variable gf_0 gf_1 : rel0 -> rel0 -> rel0. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. -CoInductive paco0_2_0( r_0 r_1: rel0) : Prop := -| paco0_2_0_pfold pco_0 pco_1 - (LE : pco_0 <0= (paco0_2_0 r_0 r_1 \0/ r_0)) - (LE : pco_1 <0= (paco0_2_1 r_0 r_1 \0/ r_1)) - (SIM: gf_0 pco_0 pco_1) -with paco0_2_1( r_0 r_1: rel0) : Prop := -| paco0_2_1_pfold pco_0 pco_1 - (LE : pco_0 <0= (paco0_2_0 r_0 r_1 \0/ r_0)) - (LE : pco_1 <0= (paco0_2_1 r_0 r_1 \0/ r_1)) - (SIM: gf_1 pco_0 pco_1) -. +Definition paco0_2_0( r_0 r_1: rel0) : rel0 := + curry0 (paco_2_0 (fun R0 R1 => uncurry0 (gf_0 (curry0 R0) (curry0 R1))) (fun R0 R1 => uncurry0 (gf_1 (curry0 R0) (curry0 R1))) (uncurry0 r_0) (uncurry0 r_1)). + +Definition paco0_2_1( r_0 r_1: rel0) : rel0 := + curry0 (paco_2_1 (fun R0 R1 => uncurry0 (gf_0 (curry0 R0) (curry0 R1))) (fun R0 R1 => uncurry0 (gf_1 (curry0 R0) (curry0 R1))) (uncurry0 r_0) (uncurry0 r_1)). + Definition upaco0_2_0( r_0 r_1: rel0) := paco0_2_0 r_0 r_1 \0/ r_0. Definition upaco0_2_1( r_0 r_1: rel0) := paco0_2_1 r_0 r_1 \0/ r_1. End Arg0_2_def. @@ -52,25 +107,15 @@ Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. -CoInductive paco0_3_0( r_0 r_1 r_2: rel0) : Prop := -| paco0_3_0_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <0= (paco0_3_0 r_0 r_1 r_2 \0/ r_0)) - (LE : pco_1 <0= (paco0_3_1 r_0 r_1 r_2 \0/ r_1)) - (LE : pco_2 <0= (paco0_3_2 r_0 r_1 r_2 \0/ r_2)) - (SIM: gf_0 pco_0 pco_1 pco_2) -with paco0_3_1( r_0 r_1 r_2: rel0) : Prop := -| paco0_3_1_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <0= (paco0_3_0 r_0 r_1 r_2 \0/ r_0)) - (LE : pco_1 <0= (paco0_3_1 r_0 r_1 r_2 \0/ r_1)) - (LE : pco_2 <0= (paco0_3_2 r_0 r_1 r_2 \0/ r_2)) - (SIM: gf_1 pco_0 pco_1 pco_2) -with paco0_3_2( r_0 r_1 r_2: rel0) : Prop := -| paco0_3_2_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <0= (paco0_3_0 r_0 r_1 r_2 \0/ r_0)) - (LE : pco_1 <0= (paco0_3_1 r_0 r_1 r_2 \0/ r_1)) - (LE : pco_2 <0= (paco0_3_2 r_0 r_1 r_2 \0/ r_2)) - (SIM: gf_2 pco_0 pco_1 pco_2) -. +Definition paco0_3_0( r_0 r_1 r_2: rel0) : rel0 := + curry0 (paco_3_0 (fun R0 R1 R2 => uncurry0 (gf_0 (curry0 R0) (curry0 R1) (curry0 R2))) (fun R0 R1 R2 => uncurry0 (gf_1 (curry0 R0) (curry0 R1) (curry0 R2))) (fun R0 R1 R2 => uncurry0 (gf_2 (curry0 R0) (curry0 R1) (curry0 R2))) (uncurry0 r_0) (uncurry0 r_1) (uncurry0 r_2)). + +Definition paco0_3_1( r_0 r_1 r_2: rel0) : rel0 := + curry0 (paco_3_1 (fun R0 R1 R2 => uncurry0 (gf_0 (curry0 R0) (curry0 R1) (curry0 R2))) (fun R0 R1 R2 => uncurry0 (gf_1 (curry0 R0) (curry0 R1) (curry0 R2))) (fun R0 R1 R2 => uncurry0 (gf_2 (curry0 R0) (curry0 R1) (curry0 R2))) (uncurry0 r_0) (uncurry0 r_1) (uncurry0 r_2)). + +Definition paco0_3_2( r_0 r_1 r_2: rel0) : rel0 := + curry0 (paco_3_2 (fun R0 R1 R2 => uncurry0 (gf_0 (curry0 R0) (curry0 R1) (curry0 R2))) (fun R0 R1 R2 => uncurry0 (gf_1 (curry0 R0) (curry0 R1) (curry0 R2))) (fun R0 R1 R2 => uncurry0 (gf_2 (curry0 R0) (curry0 R1) (curry0 R2))) (uncurry0 r_0) (uncurry0 r_1) (uncurry0 r_2)). + Definition upaco0_3_0( r_0 r_1 r_2: rel0) := paco0_3_0 r_0 r_1 r_2 \0/ r_0. Definition upaco0_3_1( r_0 r_1 r_2: rel0) := paco0_3_1 r_0 r_1 r_2 \0/ r_1. Definition upaco0_3_2( r_0 r_1 r_2: rel0) := paco0_3_2 r_0 r_1 r_2 \0/ r_2. @@ -85,11 +130,6 @@ Arguments paco0_3_2 : clear implicits. Arguments upaco0_3_2 : clear implicits. Hint Unfold upaco0_3_2. -(* Less than or equal - internal use only *) -Notation "p <_paco_0= q" := - (forall (PR: p : Prop), q : Prop) - (at level 50, no associativity). - (** 1 Mutual Coinduction *) Section Arg0_1. @@ -97,23 +137,81 @@ Section Arg0_1. Definition monotone0 (gf: rel0 -> rel0) := forall r r' (IN: gf r) (LE: r <0= r'), gf r'. +Definition _monotone0 (gf: rel0 -> rel0) := + forall r r'(LE: r <0= r'), gf r <0== gf r'. + +Lemma monotone0_eq (gf: rel0 -> rel0) : + monotone0 gf <-> _monotone0 gf. +Proof. unfold monotone0, _monotone0, le0. split; eauto. Qed. + +Lemma monotone0_map (gf: rel0 -> rel0) + (MON: _monotone0 gf) : + _monotone (fun R0 => uncurry0 (gf (curry0 R0))). +Proof. + repeat_intros 3. apply uncurry_map0. apply MON; apply curry_map0; auto. +Qed. + Variable gf : rel0 -> rel0. Arguments gf : clear implicits. +Theorem _paco0_mon: _monotone0 (paco0 gf). +Proof. + repeat_intros 3. eapply curry_map0, _paco_mon; apply uncurry_map0; auto. +Qed. + +Theorem _paco0_acc: forall + l r (OBG: forall rr (INC: r <0== rr) (CIH: l <0== rr), l <0== paco0 gf rr), + l <0== paco0 gf r. +Proof. + intros. apply uncurry_adjoint1_0. + eapply _paco_acc. intros. + apply uncurry_adjoint1_0 in INC. apply uncurry_adjoint1_0 in CIH. + apply uncurry_adjoint2_0. + eapply le0_trans. eapply (OBG _ INC CIH). + apply curry_map0. + apply _paco_mon; try apply le1_refl; apply curry_bij1_0. +Qed. + +Theorem _paco0_mult_strong: forall r, + paco0 gf (upaco0 gf r) <0== paco0 gf r. +Proof. + intros. apply curry_map0. + eapply le1_trans; [| eapply _paco_mult_strong]. + apply _paco_mon; intros []; eauto. +Qed. + +Theorem _paco0_fold: forall r, + gf (upaco0 gf r) <0== paco0 gf r. +Proof. + intros. apply uncurry_adjoint1_0. + eapply le1_trans; [| apply _paco_fold]. apply le1_refl. +Qed. + +Theorem _paco0_unfold: forall (MON: _monotone0 gf) r, + paco0 gf r <0== gf (upaco0 gf r). +Proof. + intros. apply curry_adjoint2_0. + eapply _paco_unfold; apply monotone0_map; auto. +Qed. + Theorem paco0_acc: forall - l r (OBG: forall rr (INC: r <0= rr) (CIH: l <_paco_0= rr), l <_paco_0= paco0 gf rr), + l r (OBG: forall rr (INC: r <0= rr) (CIH: l <0= rr), l <0= paco0 gf rr), l <0= paco0 gf r. Proof. - intros; assert (SIM: paco0 gf (r \0/ l)) by eauto. - clear PR; repeat (try left; do 1 paco_revert; paco_cofix_auto). + apply _paco0_acc. Qed. Theorem paco0_mon: monotone0 (paco0 gf). -Proof. paco_cofix_auto; repeat (left; do 1 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone0_eq. + apply _paco0_mon. +Qed. Theorem paco0_mult_strong: forall r, paco0 gf (upaco0 gf r) <0= paco0 gf r. -Proof. paco_cofix_auto; repeat (left; do 1 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco0_mult_strong. +Qed. Corollary paco0_mult: forall r, paco0 gf (paco0 gf r) <0= paco0 gf r. @@ -121,17 +219,18 @@ Proof. intros; eapply paco0_mult_strong, paco0_mon; eauto. Qed. Theorem paco0_fold: forall r, gf (upaco0 gf r) <0= paco0 gf r. -Proof. intros; econstructor; [ |eauto]; eauto. Qed. +Proof. + apply _paco0_fold. +Qed. Theorem paco0_unfold: forall (MON: monotone0 gf) r, paco0 gf r <0= gf (upaco0 gf r). -Proof. unfold monotone0; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 1. eapply _paco0_unfold; apply monotone0_eq; auto. +Qed. End Arg0_1. -Hint Unfold monotone0. -Hint Resolve paco0_fold. - Arguments paco0_acc : clear implicits. Arguments paco0_mon : clear implicits. Arguments paco0_mult_strong : clear implicits. @@ -139,7 +238,7 @@ Arguments paco0_mult : clear implicits. Arguments paco0_fold : clear implicits. Arguments paco0_unfold : clear implicits. -Instance paco0_inst (gf : rel0->_) r : paco_class (paco0 gf r) := +Global Instance paco0_inst (gf : rel0->_) r : paco_class (paco0 gf r) := { pacoacc := paco0_acc gf; pacomult := paco0_mult gf; pacofold := paco0_fold gf; @@ -152,39 +251,141 @@ Section Arg0_2. Definition monotone0_2 (gf: rel0 -> rel0 -> rel0) := forall r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1) (LE_0: r_0 <0= r'_0)(LE_1: r_1 <0= r'_1), gf r'_0 r'_1. +Definition _monotone0_2 (gf: rel0 -> rel0 -> rel0) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <0= r'_0)(LE_1: r_1 <0= r'_1), gf r_0 r_1 <0== gf r'_0 r'_1. + +Lemma monotone0_2_eq (gf: rel0 -> rel0 -> rel0) : + monotone0_2 gf <-> _monotone0_2 gf. +Proof. unfold monotone0_2, _monotone0_2, le0. split; eauto. Qed. + +Lemma monotone0_2_map (gf: rel0 -> rel0 -> rel0) + (MON: _monotone0_2 gf) : + _monotone_2 (fun R0 R1 => uncurry0 (gf (curry0 R0) (curry0 R1))). +Proof. + repeat_intros 6. apply uncurry_map0. apply MON; apply curry_map0; auto. +Qed. + Variable gf_0 gf_1 : rel0 -> rel0 -> rel0. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. +Theorem _paco0_2_0_mon: _monotone0_2 (paco0_2_0 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map0, _paco_2_0_mon; apply uncurry_map0; auto. +Qed. + +Theorem _paco0_2_1_mon: _monotone0_2 (paco0_2_1 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map0, _paco_2_1_mon; apply uncurry_map0; auto. +Qed. + +Theorem _paco0_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <0== rr) (CIH: l <0== rr), l <0== paco0_2_0 gf_0 gf_1 rr r_1), + l <0== paco0_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_0. + eapply _paco_2_0_acc. intros. + apply uncurry_adjoint1_0 in INC. apply uncurry_adjoint1_0 in CIH. + apply uncurry_adjoint2_0. + eapply le0_trans. eapply (OBG _ INC CIH). + apply curry_map0. + apply _paco_2_0_mon; try apply le1_refl; apply curry_bij1_0. +Qed. + +Theorem _paco0_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <0== rr) (CIH: l <0== rr), l <0== paco0_2_1 gf_0 gf_1 r_0 rr), + l <0== paco0_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_0. + eapply _paco_2_1_acc. intros. + apply uncurry_adjoint1_0 in INC. apply uncurry_adjoint1_0 in CIH. + apply uncurry_adjoint2_0. + eapply le0_trans. eapply (OBG _ INC CIH). + apply curry_map0. + apply _paco_2_1_mon; try apply le1_refl; apply curry_bij1_0. +Qed. + +Theorem _paco0_2_0_mult_strong: forall r_0 r_1, + paco0_2_0 gf_0 gf_1 (upaco0_2_0 gf_0 gf_1 r_0 r_1) (upaco0_2_1 gf_0 gf_1 r_0 r_1) <0== paco0_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map0. + eapply le1_trans; [| eapply _paco_2_0_mult_strong]. + apply _paco_2_0_mon; intros []; eauto. +Qed. + +Theorem _paco0_2_1_mult_strong: forall r_0 r_1, + paco0_2_1 gf_0 gf_1 (upaco0_2_0 gf_0 gf_1 r_0 r_1) (upaco0_2_1 gf_0 gf_1 r_0 r_1) <0== paco0_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map0. + eapply le1_trans; [| eapply _paco_2_1_mult_strong]. + apply _paco_2_1_mon; intros []; eauto. +Qed. + +Theorem _paco0_2_0_fold: forall r_0 r_1, + gf_0 (upaco0_2_0 gf_0 gf_1 r_0 r_1) (upaco0_2_1 gf_0 gf_1 r_0 r_1) <0== paco0_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_0. + eapply le1_trans; [| apply _paco_2_0_fold]. apply le1_refl. +Qed. + +Theorem _paco0_2_1_fold: forall r_0 r_1, + gf_1 (upaco0_2_0 gf_0 gf_1 r_0 r_1) (upaco0_2_1 gf_0 gf_1 r_0 r_1) <0== paco0_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_0. + eapply le1_trans; [| apply _paco_2_1_fold]. apply le1_refl. +Qed. + +Theorem _paco0_2_0_unfold: forall (MON: _monotone0_2 gf_0) (MON: _monotone0_2 gf_1) r_0 r_1, + paco0_2_0 gf_0 gf_1 r_0 r_1 <0== gf_0 (upaco0_2_0 gf_0 gf_1 r_0 r_1) (upaco0_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_0. + eapply _paco_2_0_unfold; apply monotone0_2_map; auto. +Qed. + +Theorem _paco0_2_1_unfold: forall (MON: _monotone0_2 gf_0) (MON: _monotone0_2 gf_1) r_0 r_1, + paco0_2_1 gf_0 gf_1 r_0 r_1 <0== gf_1 (upaco0_2_0 gf_0 gf_1 r_0 r_1) (upaco0_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_0. + eapply _paco_2_1_unfold; apply monotone0_2_map; auto. +Qed. + Theorem paco0_2_0_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_0 <0= rr) (CIH: l <_paco_0= rr), l <_paco_0= paco0_2_0 gf_0 gf_1 rr r_1), + l r_0 r_1 (OBG: forall rr (INC: r_0 <0= rr) (CIH: l <0= rr), l <0= paco0_2_0 gf_0 gf_1 rr r_1), l <0= paco0_2_0 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco0_2_0 gf_0 gf_1 (r_0 \0/ l) r_1) by eauto. - clear PR; repeat (try left; do 1 paco_revert; paco_cofix_auto). + apply _paco0_2_0_acc. Qed. Theorem paco0_2_1_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_1 <0= rr) (CIH: l <_paco_0= rr), l <_paco_0= paco0_2_1 gf_0 gf_1 r_0 rr), + l r_0 r_1 (OBG: forall rr (INC: r_1 <0= rr) (CIH: l <0= rr), l <0= paco0_2_1 gf_0 gf_1 r_0 rr), l <0= paco0_2_1 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco0_2_1 gf_0 gf_1 r_0 (r_1 \0/ l)) by eauto. - clear PR; repeat (try left; do 1 paco_revert; paco_cofix_auto). + apply _paco0_2_1_acc. Qed. Theorem paco0_2_0_mon: monotone0_2 (paco0_2_0 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 1 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone0_2_eq. + apply _paco0_2_0_mon. +Qed. Theorem paco0_2_1_mon: monotone0_2 (paco0_2_1 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 1 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone0_2_eq. + apply _paco0_2_1_mon. +Qed. Theorem paco0_2_0_mult_strong: forall r_0 r_1, paco0_2_0 gf_0 gf_1 (upaco0_2_0 gf_0 gf_1 r_0 r_1) (upaco0_2_1 gf_0 gf_1 r_0 r_1) <0= paco0_2_0 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 1 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco0_2_0_mult_strong. +Qed. Theorem paco0_2_1_mult_strong: forall r_0 r_1, paco0_2_1 gf_0 gf_1 (upaco0_2_0 gf_0 gf_1 r_0 r_1) (upaco0_2_1 gf_0 gf_1 r_0 r_1) <0= paco0_2_1 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 1 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco0_2_1_mult_strong. +Qed. Corollary paco0_2_0_mult: forall r_0 r_1, paco0_2_0 gf_0 gf_1 (paco0_2_0 gf_0 gf_1 r_0 r_1) (paco0_2_1 gf_0 gf_1 r_0 r_1) <0= paco0_2_0 gf_0 gf_1 r_0 r_1. @@ -196,26 +397,30 @@ Proof. intros; eapply paco0_2_1_mult_strong, paco0_2_1_mon; eauto. Qed. Theorem paco0_2_0_fold: forall r_0 r_1, gf_0 (upaco0_2_0 gf_0 gf_1 r_0 r_1) (upaco0_2_1 gf_0 gf_1 r_0 r_1) <0= paco0_2_0 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco0_2_0_fold. +Qed. Theorem paco0_2_1_fold: forall r_0 r_1, gf_1 (upaco0_2_0 gf_0 gf_1 r_0 r_1) (upaco0_2_1 gf_0 gf_1 r_0 r_1) <0= paco0_2_1 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco0_2_1_fold. +Qed. Theorem paco0_2_0_unfold: forall (MON: monotone0_2 gf_0) (MON: monotone0_2 gf_1) r_0 r_1, paco0_2_0 gf_0 gf_1 r_0 r_1 <0= gf_0 (upaco0_2_0 gf_0 gf_1 r_0 r_1) (upaco0_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone0_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco0_2_0_unfold; apply monotone0_2_eq; auto. +Qed. Theorem paco0_2_1_unfold: forall (MON: monotone0_2 gf_0) (MON: monotone0_2 gf_1) r_0 r_1, paco0_2_1 gf_0 gf_1 r_0 r_1 <0= gf_1 (upaco0_2_0 gf_0 gf_1 r_0 r_1) (upaco0_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone0_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco0_2_1_unfold; apply monotone0_2_eq; auto. +Qed. End Arg0_2. -Hint Unfold monotone0_2. -Hint Resolve paco0_2_0_fold. -Hint Resolve paco0_2_1_fold. - Arguments paco0_2_0_acc : clear implicits. Arguments paco0_2_1_acc : clear implicits. Arguments paco0_2_0_mon : clear implicits. @@ -229,13 +434,13 @@ Arguments paco0_2_1_fold : clear implicits. Arguments paco0_2_0_unfold : clear implicits. Arguments paco0_2_1_unfold : clear implicits. -Instance paco0_2_0_inst (gf_0 gf_1 : rel0->_) r_0 r_1 : paco_class (paco0_2_0 gf_0 gf_1 r_0 r_1) := +Global Instance paco0_2_0_inst (gf_0 gf_1 : rel0->_) r_0 r_1 : paco_class (paco0_2_0 gf_0 gf_1 r_0 r_1) := { pacoacc := paco0_2_0_acc gf_0 gf_1; pacomult := paco0_2_0_mult gf_0 gf_1; pacofold := paco0_2_0_fold gf_0 gf_1; pacounfold := paco0_2_0_unfold gf_0 gf_1 }. -Instance paco0_2_1_inst (gf_0 gf_1 : rel0->_) r_0 r_1 : paco_class (paco0_2_1 gf_0 gf_1 r_0 r_1) := +Global Instance paco0_2_1_inst (gf_0 gf_1 : rel0->_) r_0 r_1 : paco_class (paco0_2_1 gf_0 gf_1 r_0 r_1) := { pacoacc := paco0_2_1_acc gf_0 gf_1; pacomult := paco0_2_1_mult gf_0 gf_1; pacofold := paco0_2_1_fold gf_0 gf_1; @@ -248,55 +453,201 @@ Section Arg0_3. Definition monotone0_3 (gf: rel0 -> rel0 -> rel0 -> rel0) := forall r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2) (LE_0: r_0 <0= r'_0)(LE_1: r_1 <0= r'_1)(LE_2: r_2 <0= r'_2), gf r'_0 r'_1 r'_2. +Definition _monotone0_3 (gf: rel0 -> rel0 -> rel0 -> rel0) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <0= r'_0)(LE_1: r_1 <0= r'_1)(LE_2: r_2 <0= r'_2), gf r_0 r_1 r_2 <0== gf r'_0 r'_1 r'_2. + +Lemma monotone0_3_eq (gf: rel0 -> rel0 -> rel0 -> rel0) : + monotone0_3 gf <-> _monotone0_3 gf. +Proof. unfold monotone0_3, _monotone0_3, le0. split; eauto. Qed. + +Lemma monotone0_3_map (gf: rel0 -> rel0 -> rel0 -> rel0) + (MON: _monotone0_3 gf) : + _monotone_3 (fun R0 R1 R2 => uncurry0 (gf (curry0 R0) (curry0 R1) (curry0 R2))). +Proof. + repeat_intros 9. apply uncurry_map0. apply MON; apply curry_map0; auto. +Qed. + Variable gf_0 gf_1 gf_2 : rel0 -> rel0 -> rel0 -> rel0. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. +Theorem _paco0_3_0_mon: _monotone0_3 (paco0_3_0 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map0, _paco_3_0_mon; apply uncurry_map0; auto. +Qed. + +Theorem _paco0_3_1_mon: _monotone0_3 (paco0_3_1 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map0, _paco_3_1_mon; apply uncurry_map0; auto. +Qed. + +Theorem _paco0_3_2_mon: _monotone0_3 (paco0_3_2 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map0, _paco_3_2_mon; apply uncurry_map0; auto. +Qed. + +Theorem _paco0_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <0== rr) (CIH: l <0== rr), l <0== paco0_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <0== paco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_0. + eapply _paco_3_0_acc. intros. + apply uncurry_adjoint1_0 in INC. apply uncurry_adjoint1_0 in CIH. + apply uncurry_adjoint2_0. + eapply le0_trans. eapply (OBG _ INC CIH). + apply curry_map0. + apply _paco_3_0_mon; try apply le1_refl; apply curry_bij1_0. +Qed. + +Theorem _paco0_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <0== rr) (CIH: l <0== rr), l <0== paco0_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <0== paco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_0. + eapply _paco_3_1_acc. intros. + apply uncurry_adjoint1_0 in INC. apply uncurry_adjoint1_0 in CIH. + apply uncurry_adjoint2_0. + eapply le0_trans. eapply (OBG _ INC CIH). + apply curry_map0. + apply _paco_3_1_mon; try apply le1_refl; apply curry_bij1_0. +Qed. + +Theorem _paco0_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <0== rr) (CIH: l <0== rr), l <0== paco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <0== paco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_0. + eapply _paco_3_2_acc. intros. + apply uncurry_adjoint1_0 in INC. apply uncurry_adjoint1_0 in CIH. + apply uncurry_adjoint2_0. + eapply le0_trans. eapply (OBG _ INC CIH). + apply curry_map0. + apply _paco_3_2_mon; try apply le1_refl; apply curry_bij1_0. +Qed. + +Theorem _paco0_3_0_mult_strong: forall r_0 r_1 r_2, + paco0_3_0 gf_0 gf_1 gf_2 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <0== paco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map0. + eapply le1_trans; [| eapply _paco_3_0_mult_strong]. + apply _paco_3_0_mon; intros []; eauto. +Qed. + +Theorem _paco0_3_1_mult_strong: forall r_0 r_1 r_2, + paco0_3_1 gf_0 gf_1 gf_2 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <0== paco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map0. + eapply le1_trans; [| eapply _paco_3_1_mult_strong]. + apply _paco_3_1_mon; intros []; eauto. +Qed. + +Theorem _paco0_3_2_mult_strong: forall r_0 r_1 r_2, + paco0_3_2 gf_0 gf_1 gf_2 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <0== paco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map0. + eapply le1_trans; [| eapply _paco_3_2_mult_strong]. + apply _paco_3_2_mon; intros []; eauto. +Qed. + +Theorem _paco0_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <0== paco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_0. + eapply le1_trans; [| apply _paco_3_0_fold]. apply le1_refl. +Qed. + +Theorem _paco0_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <0== paco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_0. + eapply le1_trans; [| apply _paco_3_1_fold]. apply le1_refl. +Qed. + +Theorem _paco0_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <0== paco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_0. + eapply le1_trans; [| apply _paco_3_2_fold]. apply le1_refl. +Qed. + +Theorem _paco0_3_0_unfold: forall (MON: _monotone0_3 gf_0) (MON: _monotone0_3 gf_1) (MON: _monotone0_3 gf_2) r_0 r_1 r_2, + paco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <0== gf_0 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_0. + eapply _paco_3_0_unfold; apply monotone0_3_map; auto. +Qed. + +Theorem _paco0_3_1_unfold: forall (MON: _monotone0_3 gf_0) (MON: _monotone0_3 gf_1) (MON: _monotone0_3 gf_2) r_0 r_1 r_2, + paco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <0== gf_1 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_0. + eapply _paco_3_1_unfold; apply monotone0_3_map; auto. +Qed. + +Theorem _paco0_3_2_unfold: forall (MON: _monotone0_3 gf_0) (MON: _monotone0_3 gf_1) (MON: _monotone0_3 gf_2) r_0 r_1 r_2, + paco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <0== gf_2 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_0. + eapply _paco_3_2_unfold; apply monotone0_3_map; auto. +Qed. + Theorem paco0_3_0_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <0= rr) (CIH: l <_paco_0= rr), l <_paco_0= paco0_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <0= rr) (CIH: l <0= rr), l <0= paco0_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), l <0= paco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco0_3_0 gf_0 gf_1 gf_2 (r_0 \0/ l) r_1 r_2) by eauto. - clear PR; repeat (try left; do 1 paco_revert; paco_cofix_auto). + apply _paco0_3_0_acc. Qed. Theorem paco0_3_1_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <0= rr) (CIH: l <_paco_0= rr), l <_paco_0= paco0_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <0= rr) (CIH: l <0= rr), l <0= paco0_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), l <0= paco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco0_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \0/ l) r_2) by eauto. - clear PR; repeat (try left; do 1 paco_revert; paco_cofix_auto). + apply _paco0_3_1_acc. Qed. Theorem paco0_3_2_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <0= rr) (CIH: l <_paco_0= rr), l <_paco_0= paco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <0= rr) (CIH: l <0= rr), l <0= paco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), l <0= paco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \0/ l)) by eauto. - clear PR; repeat (try left; do 1 paco_revert; paco_cofix_auto). + apply _paco0_3_2_acc. Qed. Theorem paco0_3_0_mon: monotone0_3 (paco0_3_0 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 1 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone0_3_eq. + apply _paco0_3_0_mon. +Qed. Theorem paco0_3_1_mon: monotone0_3 (paco0_3_1 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 1 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone0_3_eq. + apply _paco0_3_1_mon. +Qed. Theorem paco0_3_2_mon: monotone0_3 (paco0_3_2 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 1 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone0_3_eq. + apply _paco0_3_2_mon. +Qed. Theorem paco0_3_0_mult_strong: forall r_0 r_1 r_2, paco0_3_0 gf_0 gf_1 gf_2 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <0= paco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 1 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco0_3_0_mult_strong. +Qed. Theorem paco0_3_1_mult_strong: forall r_0 r_1 r_2, paco0_3_1 gf_0 gf_1 gf_2 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <0= paco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 1 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco0_3_1_mult_strong. +Qed. Theorem paco0_3_2_mult_strong: forall r_0 r_1 r_2, paco0_3_2 gf_0 gf_1 gf_2 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <0= paco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 1 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco0_3_2_mult_strong. +Qed. Corollary paco0_3_0_mult: forall r_0 r_1 r_2, paco0_3_0 gf_0 gf_1 gf_2 (paco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <0= paco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. @@ -312,35 +663,42 @@ Proof. intros; eapply paco0_3_2_mult_strong, paco0_3_2_mon; eauto. Qed. Theorem paco0_3_0_fold: forall r_0 r_1 r_2, gf_0 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <0= paco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco0_3_0_fold. +Qed. Theorem paco0_3_1_fold: forall r_0 r_1 r_2, gf_1 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <0= paco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco0_3_1_fold. +Qed. Theorem paco0_3_2_fold: forall r_0 r_1 r_2, gf_2 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <0= paco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco0_3_2_fold. +Qed. Theorem paco0_3_0_unfold: forall (MON: monotone0_3 gf_0) (MON: monotone0_3 gf_1) (MON: monotone0_3 gf_2) r_0 r_1 r_2, paco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <0= gf_0 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone0_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco0_3_0_unfold; apply monotone0_3_eq; auto. +Qed. Theorem paco0_3_1_unfold: forall (MON: monotone0_3 gf_0) (MON: monotone0_3 gf_1) (MON: monotone0_3 gf_2) r_0 r_1 r_2, paco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <0= gf_1 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone0_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco0_3_1_unfold; apply monotone0_3_eq; auto. +Qed. Theorem paco0_3_2_unfold: forall (MON: monotone0_3 gf_0) (MON: monotone0_3 gf_1) (MON: monotone0_3 gf_2) r_0 r_1 r_2, paco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <0= gf_2 (upaco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone0_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco0_3_2_unfold; apply monotone0_3_eq; auto. +Qed. End Arg0_3. -Hint Unfold monotone0_3. -Hint Resolve paco0_3_0_fold. -Hint Resolve paco0_3_1_fold. -Hint Resolve paco0_3_2_fold. - Arguments paco0_3_0_acc : clear implicits. Arguments paco0_3_1_acc : clear implicits. Arguments paco0_3_2_acc : clear implicits. @@ -360,21 +718,50 @@ Arguments paco0_3_0_unfold : clear implicits. Arguments paco0_3_1_unfold : clear implicits. Arguments paco0_3_2_unfold : clear implicits. -Instance paco0_3_0_inst (gf_0 gf_1 gf_2 : rel0->_) r_0 r_1 r_2 : paco_class (paco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) := +Global Instance paco0_3_0_inst (gf_0 gf_1 gf_2 : rel0->_) r_0 r_1 r_2 : paco_class (paco0_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) := { pacoacc := paco0_3_0_acc gf_0 gf_1 gf_2; pacomult := paco0_3_0_mult gf_0 gf_1 gf_2; pacofold := paco0_3_0_fold gf_0 gf_1 gf_2; pacounfold := paco0_3_0_unfold gf_0 gf_1 gf_2 }. -Instance paco0_3_1_inst (gf_0 gf_1 gf_2 : rel0->_) r_0 r_1 r_2 : paco_class (paco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) := +Global Instance paco0_3_1_inst (gf_0 gf_1 gf_2 : rel0->_) r_0 r_1 r_2 : paco_class (paco0_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) := { pacoacc := paco0_3_1_acc gf_0 gf_1 gf_2; pacomult := paco0_3_1_mult gf_0 gf_1 gf_2; pacofold := paco0_3_1_fold gf_0 gf_1 gf_2; pacounfold := paco0_3_1_unfold gf_0 gf_1 gf_2 }. -Instance paco0_3_2_inst (gf_0 gf_1 gf_2 : rel0->_) r_0 r_1 r_2 : paco_class (paco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) := +Global Instance paco0_3_2_inst (gf_0 gf_1 gf_2 : rel0->_) r_0 r_1 r_2 : paco_class (paco0_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) := { pacoacc := paco0_3_2_acc gf_0 gf_1 gf_2; pacomult := paco0_3_2_mult gf_0 gf_1 gf_2; pacofold := paco0_3_2_fold gf_0 gf_1 gf_2; pacounfold := paco0_3_2_unfold gf_0 gf_1 gf_2 }. +End PACO0. + +Global Opaque paco0. + +Hint Unfold upaco0. +Hint Resolve paco0_fold. +Hint Unfold monotone0. + +Global Opaque paco0_2_0. +Global Opaque paco0_2_1. + +Hint Unfold upaco0_2_0. +Hint Unfold upaco0_2_1. +Hint Resolve paco0_2_0_fold. +Hint Resolve paco0_2_1_fold. +Hint Unfold monotone0_2. + +Global Opaque paco0_3_0. +Global Opaque paco0_3_1. +Global Opaque paco0_3_2. + +Hint Unfold upaco0_3_0. +Hint Unfold upaco0_3_1. +Hint Unfold upaco0_3_2. +Hint Resolve paco0_3_0_fold. +Hint Resolve paco0_3_1_fold. +Hint Resolve paco0_3_2_fold. +Hint Unfold monotone0_3. + diff --git a/src/paco1.v b/src/paco1.v index 05b00c2..d22b9da 100644 --- a/src/paco1.v +++ b/src/paco1.v @@ -1,123 +1,219 @@ Require Export paconotation pacotacuser. -Require Import pacotac. +Require Import paconotation_internal pacotac pacon. Set Implicit Arguments. +Section PACO1. + +Variable T0 : Type. + +Record sig1T := + exist1T { + proj1T0: @T0; + }. + +Definition uncurry1 (R: rel1 T0): rel1 sig1T := fun x => R (proj1T0 x). + +Definition curry1 (R: rel1 sig1T): rel1 T0 := + fun x0 => R (exist1T x0). + +Lemma uncurry_map1 r0 r1 (LE : r0 <1== r1) : uncurry1 r0 <1== uncurry1 r1. +Proof. intros [] H. apply LE. auto. Qed. + +Lemma uncurry_map_rev1 r0 r1 (LE: uncurry1 r0 <1== uncurry1 r1) : r0 <1== r1. +Proof. + repeat_intros 1. intros H. apply (LE (exist1T x0) H). +Qed. + +Lemma curry_map1 r0 r1 (LE: r0 <1== r1) : curry1 r0 <1== curry1 r1. +Proof. + repeat_intros 1. intros H. apply (LE (exist1T x0) H). +Qed. + +Lemma curry_map_rev1 r0 r1 (LE: curry1 r0 <1== curry1 r1) : r0 <1== r1. +Proof. + intros [] H. apply LE. apply H. +Qed. + +Lemma uncurry_bij1_1 r : curry1 (uncurry1 r) <1== r. +Proof. unfold le1. repeat_intros 1; auto. Qed. + +Lemma uncurry_bij2_1 r : r <1== curry1 (uncurry1 r). +Proof. unfold le1. repeat_intros 1; auto. Qed. + +Lemma curry_bij1_1 r : uncurry1 (curry1 r) <1== r. +Proof. intros []; auto. Qed. + +Lemma curry_bij2_1 r : r <1== uncurry1 (curry1 r). +Proof. intros []; auto. Qed. + +Lemma uncurry_adjoint1_1 r0 r1 (LE: uncurry1 r0 <1== r1) : r0 <1== curry1 r1. +Proof. + apply uncurry_map_rev1. eapply le1_trans; [eauto|]. apply curry_bij2_1. +Qed. + +Lemma uncurry_adjoint2_1 r0 r1 (LE: r0 <1== curry1 r1) : uncurry1 r0 <1== r1. +Proof. + apply curry_map_rev1. eapply le1_trans; [|eauto]. apply uncurry_bij2_1. +Qed. + +Lemma curry_adjoint1_1 r0 r1 (LE: curry1 r0 <1== r1) : r0 <1== uncurry1 r1. +Proof. + apply curry_map_rev1. eapply le1_trans; [eauto|]. apply uncurry_bij2_1. +Qed. + +Lemma curry_adjoint2_1 r0 r1 (LE: r0 <1== uncurry1 r1) : curry1 r0 <1== r1. +Proof. + apply uncurry_map_rev1. eapply le1_trans; [|eauto]. apply curry_bij1_1. +Qed. + (** ** Predicates of Arity 1 *) Section Arg1_def. -Variable T0 : Type. Variable gf : rel1 T0 -> rel1 T0. Arguments gf : clear implicits. -CoInductive paco1( r: rel1 T0) x0 : Prop := -| paco1_pfold pco - (LE : pco <1= (paco1 r \1/ r)) - (SIM: gf pco x0) -. +Definition paco1( r: rel1 T0) : rel1 T0 := + curry1 (paco (fun R0 => uncurry1 (gf (curry1 R0))) (uncurry1 r)). + Definition upaco1( r: rel1 T0) := paco1 r \1/ r. End Arg1_def. -Arguments paco1 [ T0 ]. -Arguments upaco1 [ T0 ]. +Arguments paco1 : clear implicits. +Arguments upaco1 : clear implicits. Hint Unfold upaco1. Section Arg1_2_def. -Variable T0 : Type. Variable gf_0 gf_1 : rel1 T0 -> rel1 T0 -> rel1 T0. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. -CoInductive paco1_2_0( r_0 r_1: rel1 T0) x0 : Prop := -| paco1_2_0_pfold pco_0 pco_1 - (LE : pco_0 <1= (paco1_2_0 r_0 r_1 \1/ r_0)) - (LE : pco_1 <1= (paco1_2_1 r_0 r_1 \1/ r_1)) - (SIM: gf_0 pco_0 pco_1 x0) -with paco1_2_1( r_0 r_1: rel1 T0) x0 : Prop := -| paco1_2_1_pfold pco_0 pco_1 - (LE : pco_0 <1= (paco1_2_0 r_0 r_1 \1/ r_0)) - (LE : pco_1 <1= (paco1_2_1 r_0 r_1 \1/ r_1)) - (SIM: gf_1 pco_0 pco_1 x0) -. +Definition paco1_2_0( r_0 r_1: rel1 T0) : rel1 T0 := + curry1 (paco_2_0 (fun R0 R1 => uncurry1 (gf_0 (curry1 R0) (curry1 R1))) (fun R0 R1 => uncurry1 (gf_1 (curry1 R0) (curry1 R1))) (uncurry1 r_0) (uncurry1 r_1)). + +Definition paco1_2_1( r_0 r_1: rel1 T0) : rel1 T0 := + curry1 (paco_2_1 (fun R0 R1 => uncurry1 (gf_0 (curry1 R0) (curry1 R1))) (fun R0 R1 => uncurry1 (gf_1 (curry1 R0) (curry1 R1))) (uncurry1 r_0) (uncurry1 r_1)). + Definition upaco1_2_0( r_0 r_1: rel1 T0) := paco1_2_0 r_0 r_1 \1/ r_0. Definition upaco1_2_1( r_0 r_1: rel1 T0) := paco1_2_1 r_0 r_1 \1/ r_1. End Arg1_2_def. -Arguments paco1_2_0 [ T0 ]. -Arguments upaco1_2_0 [ T0 ]. +Arguments paco1_2_0 : clear implicits. +Arguments upaco1_2_0 : clear implicits. Hint Unfold upaco1_2_0. -Arguments paco1_2_1 [ T0 ]. -Arguments upaco1_2_1 [ T0 ]. +Arguments paco1_2_1 : clear implicits. +Arguments upaco1_2_1 : clear implicits. Hint Unfold upaco1_2_1. Section Arg1_3_def. -Variable T0 : Type. Variable gf_0 gf_1 gf_2 : rel1 T0 -> rel1 T0 -> rel1 T0 -> rel1 T0. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. -CoInductive paco1_3_0( r_0 r_1 r_2: rel1 T0) x0 : Prop := -| paco1_3_0_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <1= (paco1_3_0 r_0 r_1 r_2 \1/ r_0)) - (LE : pco_1 <1= (paco1_3_1 r_0 r_1 r_2 \1/ r_1)) - (LE : pco_2 <1= (paco1_3_2 r_0 r_1 r_2 \1/ r_2)) - (SIM: gf_0 pco_0 pco_1 pco_2 x0) -with paco1_3_1( r_0 r_1 r_2: rel1 T0) x0 : Prop := -| paco1_3_1_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <1= (paco1_3_0 r_0 r_1 r_2 \1/ r_0)) - (LE : pco_1 <1= (paco1_3_1 r_0 r_1 r_2 \1/ r_1)) - (LE : pco_2 <1= (paco1_3_2 r_0 r_1 r_2 \1/ r_2)) - (SIM: gf_1 pco_0 pco_1 pco_2 x0) -with paco1_3_2( r_0 r_1 r_2: rel1 T0) x0 : Prop := -| paco1_3_2_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <1= (paco1_3_0 r_0 r_1 r_2 \1/ r_0)) - (LE : pco_1 <1= (paco1_3_1 r_0 r_1 r_2 \1/ r_1)) - (LE : pco_2 <1= (paco1_3_2 r_0 r_1 r_2 \1/ r_2)) - (SIM: gf_2 pco_0 pco_1 pco_2 x0) -. +Definition paco1_3_0( r_0 r_1 r_2: rel1 T0) : rel1 T0 := + curry1 (paco_3_0 (fun R0 R1 R2 => uncurry1 (gf_0 (curry1 R0) (curry1 R1) (curry1 R2))) (fun R0 R1 R2 => uncurry1 (gf_1 (curry1 R0) (curry1 R1) (curry1 R2))) (fun R0 R1 R2 => uncurry1 (gf_2 (curry1 R0) (curry1 R1) (curry1 R2))) (uncurry1 r_0) (uncurry1 r_1) (uncurry1 r_2)). + +Definition paco1_3_1( r_0 r_1 r_2: rel1 T0) : rel1 T0 := + curry1 (paco_3_1 (fun R0 R1 R2 => uncurry1 (gf_0 (curry1 R0) (curry1 R1) (curry1 R2))) (fun R0 R1 R2 => uncurry1 (gf_1 (curry1 R0) (curry1 R1) (curry1 R2))) (fun R0 R1 R2 => uncurry1 (gf_2 (curry1 R0) (curry1 R1) (curry1 R2))) (uncurry1 r_0) (uncurry1 r_1) (uncurry1 r_2)). + +Definition paco1_3_2( r_0 r_1 r_2: rel1 T0) : rel1 T0 := + curry1 (paco_3_2 (fun R0 R1 R2 => uncurry1 (gf_0 (curry1 R0) (curry1 R1) (curry1 R2))) (fun R0 R1 R2 => uncurry1 (gf_1 (curry1 R0) (curry1 R1) (curry1 R2))) (fun R0 R1 R2 => uncurry1 (gf_2 (curry1 R0) (curry1 R1) (curry1 R2))) (uncurry1 r_0) (uncurry1 r_1) (uncurry1 r_2)). + Definition upaco1_3_0( r_0 r_1 r_2: rel1 T0) := paco1_3_0 r_0 r_1 r_2 \1/ r_0. Definition upaco1_3_1( r_0 r_1 r_2: rel1 T0) := paco1_3_1 r_0 r_1 r_2 \1/ r_1. Definition upaco1_3_2( r_0 r_1 r_2: rel1 T0) := paco1_3_2 r_0 r_1 r_2 \1/ r_2. End Arg1_3_def. -Arguments paco1_3_0 [ T0 ]. -Arguments upaco1_3_0 [ T0 ]. +Arguments paco1_3_0 : clear implicits. +Arguments upaco1_3_0 : clear implicits. Hint Unfold upaco1_3_0. -Arguments paco1_3_1 [ T0 ]. -Arguments upaco1_3_1 [ T0 ]. +Arguments paco1_3_1 : clear implicits. +Arguments upaco1_3_1 : clear implicits. Hint Unfold upaco1_3_1. -Arguments paco1_3_2 [ T0 ]. -Arguments upaco1_3_2 [ T0 ]. +Arguments paco1_3_2 : clear implicits. +Arguments upaco1_3_2 : clear implicits. Hint Unfold upaco1_3_2. -(* Less than or equal - internal use only *) -Notation "p <_paco_1= q" := - (forall _paco_x0 (PR: p _paco_x0 : Prop), q _paco_x0 : Prop) - (at level 50, no associativity). - (** 1 Mutual Coinduction *) Section Arg1_1. -Definition monotone1 T0 (gf: rel1 T0 -> rel1 T0) := +Definition monotone1 (gf: rel1 T0 -> rel1 T0) := forall x0 r r' (IN: gf r x0) (LE: r <1= r'), gf r' x0. -Variable T0 : Type. +Definition _monotone1 (gf: rel1 T0 -> rel1 T0) := + forall r r'(LE: r <1= r'), gf r <1== gf r'. + +Lemma monotone1_eq (gf: rel1 T0 -> rel1 T0) : + monotone1 gf <-> _monotone1 gf. +Proof. unfold monotone1, _monotone1, le1. split; eauto. Qed. + +Lemma monotone1_map (gf: rel1 T0 -> rel1 T0) + (MON: _monotone1 gf) : + _monotone (fun R0 => uncurry1 (gf (curry1 R0))). +Proof. + repeat_intros 3. apply uncurry_map1. apply MON; apply curry_map1; auto. +Qed. + Variable gf : rel1 T0 -> rel1 T0. Arguments gf : clear implicits. +Theorem _paco1_mon: _monotone1 (paco1 gf). +Proof. + repeat_intros 3. eapply curry_map1, _paco_mon; apply uncurry_map1; auto. +Qed. + +Theorem _paco1_acc: forall + l r (OBG: forall rr (INC: r <1== rr) (CIH: l <1== rr), l <1== paco1 gf rr), + l <1== paco1 gf r. +Proof. + intros. apply uncurry_adjoint1_1. + eapply _paco_acc. intros. + apply uncurry_adjoint1_1 in INC. apply uncurry_adjoint1_1 in CIH. + apply uncurry_adjoint2_1. + eapply le1_trans. eapply (OBG _ INC CIH). + apply curry_map1. + apply _paco_mon; try apply le1_refl; apply curry_bij1_1. +Qed. + +Theorem _paco1_mult_strong: forall r, + paco1 gf (upaco1 gf r) <1== paco1 gf r. +Proof. + intros. apply curry_map1. + eapply le1_trans; [| eapply _paco_mult_strong]. + apply _paco_mon; intros []; eauto. +Qed. + +Theorem _paco1_fold: forall r, + gf (upaco1 gf r) <1== paco1 gf r. +Proof. + intros. apply uncurry_adjoint1_1. + eapply le1_trans; [| apply _paco_fold]. apply le1_refl. +Qed. + +Theorem _paco1_unfold: forall (MON: _monotone1 gf) r, + paco1 gf r <1== gf (upaco1 gf r). +Proof. + intros. apply curry_adjoint2_1. + eapply _paco_unfold; apply monotone1_map; auto. +Qed. + Theorem paco1_acc: forall - l r (OBG: forall rr (INC: r <1= rr) (CIH: l <_paco_1= rr), l <_paco_1= paco1 gf rr), + l r (OBG: forall rr (INC: r <1= rr) (CIH: l <1= rr), l <1= paco1 gf rr), l <1= paco1 gf r. Proof. - intros; assert (SIM: paco1 gf (r \1/ l) x0) by eauto. - clear PR; repeat (try left; do 2 paco_revert; paco_cofix_auto). + apply _paco1_acc. Qed. Theorem paco1_mon: monotone1 (paco1 gf). -Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone1_eq. + apply _paco1_mon. +Qed. Theorem paco1_mult_strong: forall r, paco1 gf (upaco1 gf r) <1= paco1 gf r. -Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco1_mult_strong. +Qed. Corollary paco1_mult: forall r, paco1 gf (paco1 gf r) <1= paco1 gf r. @@ -125,25 +221,26 @@ Proof. intros; eapply paco1_mult_strong, paco1_mon; eauto. Qed. Theorem paco1_fold: forall r, gf (upaco1 gf r) <1= paco1 gf r. -Proof. intros; econstructor; [ |eauto]; eauto. Qed. +Proof. + apply _paco1_fold. +Qed. Theorem paco1_unfold: forall (MON: monotone1 gf) r, paco1 gf r <1= gf (upaco1 gf r). -Proof. unfold monotone1; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 1. eapply _paco1_unfold; apply monotone1_eq; auto. +Qed. End Arg1_1. -Hint Unfold monotone1. -Hint Resolve paco1_fold. - -Arguments paco1_acc [ T0 ]. -Arguments paco1_mon [ T0 ]. -Arguments paco1_mult_strong [ T0 ]. -Arguments paco1_mult [ T0 ]. -Arguments paco1_fold [ T0 ]. -Arguments paco1_unfold [ T0 ]. +Arguments paco1_acc : clear implicits. +Arguments paco1_mon : clear implicits. +Arguments paco1_mult_strong : clear implicits. +Arguments paco1_mult : clear implicits. +Arguments paco1_fold : clear implicits. +Arguments paco1_unfold : clear implicits. -Instance paco1_inst T0 (gf : rel1 T0->_) r x0 : paco_class (paco1 gf r x0) := +Global Instance paco1_inst (gf : rel1 T0->_) r x0 : paco_class (paco1 gf r x0) := { pacoacc := paco1_acc gf; pacomult := paco1_mult gf; pacofold := paco1_fold gf; @@ -153,43 +250,144 @@ Instance paco1_inst T0 (gf : rel1 T0->_) r x0 : paco_class (paco1 gf r x0) := Section Arg1_2. -Definition monotone1_2 T0 (gf: rel1 T0 -> rel1 T0 -> rel1 T0) := +Definition monotone1_2 (gf: rel1 T0 -> rel1 T0 -> rel1 T0) := forall x0 r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1 x0) (LE_0: r_0 <1= r'_0)(LE_1: r_1 <1= r'_1), gf r'_0 r'_1 x0. -Variable T0 : Type. +Definition _monotone1_2 (gf: rel1 T0 -> rel1 T0 -> rel1 T0) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <1= r'_0)(LE_1: r_1 <1= r'_1), gf r_0 r_1 <1== gf r'_0 r'_1. + +Lemma monotone1_2_eq (gf: rel1 T0 -> rel1 T0 -> rel1 T0) : + monotone1_2 gf <-> _monotone1_2 gf. +Proof. unfold monotone1_2, _monotone1_2, le1. split; eauto. Qed. + +Lemma monotone1_2_map (gf: rel1 T0 -> rel1 T0 -> rel1 T0) + (MON: _monotone1_2 gf) : + _monotone_2 (fun R0 R1 => uncurry1 (gf (curry1 R0) (curry1 R1))). +Proof. + repeat_intros 6. apply uncurry_map1. apply MON; apply curry_map1; auto. +Qed. + Variable gf_0 gf_1 : rel1 T0 -> rel1 T0 -> rel1 T0. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. +Theorem _paco1_2_0_mon: _monotone1_2 (paco1_2_0 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map1, _paco_2_0_mon; apply uncurry_map1; auto. +Qed. + +Theorem _paco1_2_1_mon: _monotone1_2 (paco1_2_1 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map1, _paco_2_1_mon; apply uncurry_map1; auto. +Qed. + +Theorem _paco1_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <1== rr) (CIH: l <1== rr), l <1== paco1_2_0 gf_0 gf_1 rr r_1), + l <1== paco1_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_1. + eapply _paco_2_0_acc. intros. + apply uncurry_adjoint1_1 in INC. apply uncurry_adjoint1_1 in CIH. + apply uncurry_adjoint2_1. + eapply le1_trans. eapply (OBG _ INC CIH). + apply curry_map1. + apply _paco_2_0_mon; try apply le1_refl; apply curry_bij1_1. +Qed. + +Theorem _paco1_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <1== rr) (CIH: l <1== rr), l <1== paco1_2_1 gf_0 gf_1 r_0 rr), + l <1== paco1_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_1. + eapply _paco_2_1_acc. intros. + apply uncurry_adjoint1_1 in INC. apply uncurry_adjoint1_1 in CIH. + apply uncurry_adjoint2_1. + eapply le1_trans. eapply (OBG _ INC CIH). + apply curry_map1. + apply _paco_2_1_mon; try apply le1_refl; apply curry_bij1_1. +Qed. + +Theorem _paco1_2_0_mult_strong: forall r_0 r_1, + paco1_2_0 gf_0 gf_1 (upaco1_2_0 gf_0 gf_1 r_0 r_1) (upaco1_2_1 gf_0 gf_1 r_0 r_1) <1== paco1_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map1. + eapply le1_trans; [| eapply _paco_2_0_mult_strong]. + apply _paco_2_0_mon; intros []; eauto. +Qed. + +Theorem _paco1_2_1_mult_strong: forall r_0 r_1, + paco1_2_1 gf_0 gf_1 (upaco1_2_0 gf_0 gf_1 r_0 r_1) (upaco1_2_1 gf_0 gf_1 r_0 r_1) <1== paco1_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map1. + eapply le1_trans; [| eapply _paco_2_1_mult_strong]. + apply _paco_2_1_mon; intros []; eauto. +Qed. + +Theorem _paco1_2_0_fold: forall r_0 r_1, + gf_0 (upaco1_2_0 gf_0 gf_1 r_0 r_1) (upaco1_2_1 gf_0 gf_1 r_0 r_1) <1== paco1_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_1. + eapply le1_trans; [| apply _paco_2_0_fold]. apply le1_refl. +Qed. + +Theorem _paco1_2_1_fold: forall r_0 r_1, + gf_1 (upaco1_2_0 gf_0 gf_1 r_0 r_1) (upaco1_2_1 gf_0 gf_1 r_0 r_1) <1== paco1_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_1. + eapply le1_trans; [| apply _paco_2_1_fold]. apply le1_refl. +Qed. + +Theorem _paco1_2_0_unfold: forall (MON: _monotone1_2 gf_0) (MON: _monotone1_2 gf_1) r_0 r_1, + paco1_2_0 gf_0 gf_1 r_0 r_1 <1== gf_0 (upaco1_2_0 gf_0 gf_1 r_0 r_1) (upaco1_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_1. + eapply _paco_2_0_unfold; apply monotone1_2_map; auto. +Qed. + +Theorem _paco1_2_1_unfold: forall (MON: _monotone1_2 gf_0) (MON: _monotone1_2 gf_1) r_0 r_1, + paco1_2_1 gf_0 gf_1 r_0 r_1 <1== gf_1 (upaco1_2_0 gf_0 gf_1 r_0 r_1) (upaco1_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_1. + eapply _paco_2_1_unfold; apply monotone1_2_map; auto. +Qed. + Theorem paco1_2_0_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_0 <1= rr) (CIH: l <_paco_1= rr), l <_paco_1= paco1_2_0 gf_0 gf_1 rr r_1), + l r_0 r_1 (OBG: forall rr (INC: r_0 <1= rr) (CIH: l <1= rr), l <1= paco1_2_0 gf_0 gf_1 rr r_1), l <1= paco1_2_0 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco1_2_0 gf_0 gf_1 (r_0 \1/ l) r_1 x0) by eauto. - clear PR; repeat (try left; do 2 paco_revert; paco_cofix_auto). + apply _paco1_2_0_acc. Qed. Theorem paco1_2_1_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_1 <1= rr) (CIH: l <_paco_1= rr), l <_paco_1= paco1_2_1 gf_0 gf_1 r_0 rr), + l r_0 r_1 (OBG: forall rr (INC: r_1 <1= rr) (CIH: l <1= rr), l <1= paco1_2_1 gf_0 gf_1 r_0 rr), l <1= paco1_2_1 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco1_2_1 gf_0 gf_1 r_0 (r_1 \1/ l) x0) by eauto. - clear PR; repeat (try left; do 2 paco_revert; paco_cofix_auto). + apply _paco1_2_1_acc. Qed. Theorem paco1_2_0_mon: monotone1_2 (paco1_2_0 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone1_2_eq. + apply _paco1_2_0_mon. +Qed. Theorem paco1_2_1_mon: monotone1_2 (paco1_2_1 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone1_2_eq. + apply _paco1_2_1_mon. +Qed. Theorem paco1_2_0_mult_strong: forall r_0 r_1, paco1_2_0 gf_0 gf_1 (upaco1_2_0 gf_0 gf_1 r_0 r_1) (upaco1_2_1 gf_0 gf_1 r_0 r_1) <1= paco1_2_0 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco1_2_0_mult_strong. +Qed. Theorem paco1_2_1_mult_strong: forall r_0 r_1, paco1_2_1 gf_0 gf_1 (upaco1_2_0 gf_0 gf_1 r_0 r_1) (upaco1_2_1 gf_0 gf_1 r_0 r_1) <1= paco1_2_1 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco1_2_1_mult_strong. +Qed. Corollary paco1_2_0_mult: forall r_0 r_1, paco1_2_0 gf_0 gf_1 (paco1_2_0 gf_0 gf_1 r_0 r_1) (paco1_2_1 gf_0 gf_1 r_0 r_1) <1= paco1_2_0 gf_0 gf_1 r_0 r_1. @@ -201,46 +399,50 @@ Proof. intros; eapply paco1_2_1_mult_strong, paco1_2_1_mon; eauto. Qed. Theorem paco1_2_0_fold: forall r_0 r_1, gf_0 (upaco1_2_0 gf_0 gf_1 r_0 r_1) (upaco1_2_1 gf_0 gf_1 r_0 r_1) <1= paco1_2_0 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco1_2_0_fold. +Qed. Theorem paco1_2_1_fold: forall r_0 r_1, gf_1 (upaco1_2_0 gf_0 gf_1 r_0 r_1) (upaco1_2_1 gf_0 gf_1 r_0 r_1) <1= paco1_2_1 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco1_2_1_fold. +Qed. Theorem paco1_2_0_unfold: forall (MON: monotone1_2 gf_0) (MON: monotone1_2 gf_1) r_0 r_1, paco1_2_0 gf_0 gf_1 r_0 r_1 <1= gf_0 (upaco1_2_0 gf_0 gf_1 r_0 r_1) (upaco1_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone1_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco1_2_0_unfold; apply monotone1_2_eq; auto. +Qed. Theorem paco1_2_1_unfold: forall (MON: monotone1_2 gf_0) (MON: monotone1_2 gf_1) r_0 r_1, paco1_2_1 gf_0 gf_1 r_0 r_1 <1= gf_1 (upaco1_2_0 gf_0 gf_1 r_0 r_1) (upaco1_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone1_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco1_2_1_unfold; apply monotone1_2_eq; auto. +Qed. End Arg1_2. -Hint Unfold monotone1_2. -Hint Resolve paco1_2_0_fold. -Hint Resolve paco1_2_1_fold. - -Arguments paco1_2_0_acc [ T0 ]. -Arguments paco1_2_1_acc [ T0 ]. -Arguments paco1_2_0_mon [ T0 ]. -Arguments paco1_2_1_mon [ T0 ]. -Arguments paco1_2_0_mult_strong [ T0 ]. -Arguments paco1_2_1_mult_strong [ T0 ]. -Arguments paco1_2_0_mult [ T0 ]. -Arguments paco1_2_1_mult [ T0 ]. -Arguments paco1_2_0_fold [ T0 ]. -Arguments paco1_2_1_fold [ T0 ]. -Arguments paco1_2_0_unfold [ T0 ]. -Arguments paco1_2_1_unfold [ T0 ]. - -Instance paco1_2_0_inst T0 (gf_0 gf_1 : rel1 T0->_) r_0 r_1 x0 : paco_class (paco1_2_0 gf_0 gf_1 r_0 r_1 x0) := +Arguments paco1_2_0_acc : clear implicits. +Arguments paco1_2_1_acc : clear implicits. +Arguments paco1_2_0_mon : clear implicits. +Arguments paco1_2_1_mon : clear implicits. +Arguments paco1_2_0_mult_strong : clear implicits. +Arguments paco1_2_1_mult_strong : clear implicits. +Arguments paco1_2_0_mult : clear implicits. +Arguments paco1_2_1_mult : clear implicits. +Arguments paco1_2_0_fold : clear implicits. +Arguments paco1_2_1_fold : clear implicits. +Arguments paco1_2_0_unfold : clear implicits. +Arguments paco1_2_1_unfold : clear implicits. + +Global Instance paco1_2_0_inst (gf_0 gf_1 : rel1 T0->_) r_0 r_1 x0 : paco_class (paco1_2_0 gf_0 gf_1 r_0 r_1 x0) := { pacoacc := paco1_2_0_acc gf_0 gf_1; pacomult := paco1_2_0_mult gf_0 gf_1; pacofold := paco1_2_0_fold gf_0 gf_1; pacounfold := paco1_2_0_unfold gf_0 gf_1 }. -Instance paco1_2_1_inst T0 (gf_0 gf_1 : rel1 T0->_) r_0 r_1 x0 : paco_class (paco1_2_1 gf_0 gf_1 r_0 r_1 x0) := +Global Instance paco1_2_1_inst (gf_0 gf_1 : rel1 T0->_) r_0 r_1 x0 : paco_class (paco1_2_1 gf_0 gf_1 r_0 r_1 x0) := { pacoacc := paco1_2_1_acc gf_0 gf_1; pacomult := paco1_2_1_mult gf_0 gf_1; pacofold := paco1_2_1_fold gf_0 gf_1; @@ -250,59 +452,204 @@ Instance paco1_2_1_inst T0 (gf_0 gf_1 : rel1 T0->_) r_0 r_1 x0 : paco_class (pa Section Arg1_3. -Definition monotone1_3 T0 (gf: rel1 T0 -> rel1 T0 -> rel1 T0 -> rel1 T0) := +Definition monotone1_3 (gf: rel1 T0 -> rel1 T0 -> rel1 T0 -> rel1 T0) := forall x0 r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2 x0) (LE_0: r_0 <1= r'_0)(LE_1: r_1 <1= r'_1)(LE_2: r_2 <1= r'_2), gf r'_0 r'_1 r'_2 x0. -Variable T0 : Type. +Definition _monotone1_3 (gf: rel1 T0 -> rel1 T0 -> rel1 T0 -> rel1 T0) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <1= r'_0)(LE_1: r_1 <1= r'_1)(LE_2: r_2 <1= r'_2), gf r_0 r_1 r_2 <1== gf r'_0 r'_1 r'_2. + +Lemma monotone1_3_eq (gf: rel1 T0 -> rel1 T0 -> rel1 T0 -> rel1 T0) : + monotone1_3 gf <-> _monotone1_3 gf. +Proof. unfold monotone1_3, _monotone1_3, le1. split; eauto. Qed. + +Lemma monotone1_3_map (gf: rel1 T0 -> rel1 T0 -> rel1 T0 -> rel1 T0) + (MON: _monotone1_3 gf) : + _monotone_3 (fun R0 R1 R2 => uncurry1 (gf (curry1 R0) (curry1 R1) (curry1 R2))). +Proof. + repeat_intros 9. apply uncurry_map1. apply MON; apply curry_map1; auto. +Qed. + Variable gf_0 gf_1 gf_2 : rel1 T0 -> rel1 T0 -> rel1 T0 -> rel1 T0. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. +Theorem _paco1_3_0_mon: _monotone1_3 (paco1_3_0 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map1, _paco_3_0_mon; apply uncurry_map1; auto. +Qed. + +Theorem _paco1_3_1_mon: _monotone1_3 (paco1_3_1 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map1, _paco_3_1_mon; apply uncurry_map1; auto. +Qed. + +Theorem _paco1_3_2_mon: _monotone1_3 (paco1_3_2 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map1, _paco_3_2_mon; apply uncurry_map1; auto. +Qed. + +Theorem _paco1_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <1== rr) (CIH: l <1== rr), l <1== paco1_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <1== paco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_1. + eapply _paco_3_0_acc. intros. + apply uncurry_adjoint1_1 in INC. apply uncurry_adjoint1_1 in CIH. + apply uncurry_adjoint2_1. + eapply le1_trans. eapply (OBG _ INC CIH). + apply curry_map1. + apply _paco_3_0_mon; try apply le1_refl; apply curry_bij1_1. +Qed. + +Theorem _paco1_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <1== rr) (CIH: l <1== rr), l <1== paco1_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <1== paco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_1. + eapply _paco_3_1_acc. intros. + apply uncurry_adjoint1_1 in INC. apply uncurry_adjoint1_1 in CIH. + apply uncurry_adjoint2_1. + eapply le1_trans. eapply (OBG _ INC CIH). + apply curry_map1. + apply _paco_3_1_mon; try apply le1_refl; apply curry_bij1_1. +Qed. + +Theorem _paco1_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <1== rr) (CIH: l <1== rr), l <1== paco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <1== paco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_1. + eapply _paco_3_2_acc. intros. + apply uncurry_adjoint1_1 in INC. apply uncurry_adjoint1_1 in CIH. + apply uncurry_adjoint2_1. + eapply le1_trans. eapply (OBG _ INC CIH). + apply curry_map1. + apply _paco_3_2_mon; try apply le1_refl; apply curry_bij1_1. +Qed. + +Theorem _paco1_3_0_mult_strong: forall r_0 r_1 r_2, + paco1_3_0 gf_0 gf_1 gf_2 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1== paco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map1. + eapply le1_trans; [| eapply _paco_3_0_mult_strong]. + apply _paco_3_0_mon; intros []; eauto. +Qed. + +Theorem _paco1_3_1_mult_strong: forall r_0 r_1 r_2, + paco1_3_1 gf_0 gf_1 gf_2 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1== paco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map1. + eapply le1_trans; [| eapply _paco_3_1_mult_strong]. + apply _paco_3_1_mon; intros []; eauto. +Qed. + +Theorem _paco1_3_2_mult_strong: forall r_0 r_1 r_2, + paco1_3_2 gf_0 gf_1 gf_2 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1== paco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map1. + eapply le1_trans; [| eapply _paco_3_2_mult_strong]. + apply _paco_3_2_mon; intros []; eauto. +Qed. + +Theorem _paco1_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1== paco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_1. + eapply le1_trans; [| apply _paco_3_0_fold]. apply le1_refl. +Qed. + +Theorem _paco1_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1== paco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_1. + eapply le1_trans; [| apply _paco_3_1_fold]. apply le1_refl. +Qed. + +Theorem _paco1_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1== paco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_1. + eapply le1_trans; [| apply _paco_3_2_fold]. apply le1_refl. +Qed. + +Theorem _paco1_3_0_unfold: forall (MON: _monotone1_3 gf_0) (MON: _monotone1_3 gf_1) (MON: _monotone1_3 gf_2) r_0 r_1 r_2, + paco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <1== gf_0 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_1. + eapply _paco_3_0_unfold; apply monotone1_3_map; auto. +Qed. + +Theorem _paco1_3_1_unfold: forall (MON: _monotone1_3 gf_0) (MON: _monotone1_3 gf_1) (MON: _monotone1_3 gf_2) r_0 r_1 r_2, + paco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <1== gf_1 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_1. + eapply _paco_3_1_unfold; apply monotone1_3_map; auto. +Qed. + +Theorem _paco1_3_2_unfold: forall (MON: _monotone1_3 gf_0) (MON: _monotone1_3 gf_1) (MON: _monotone1_3 gf_2) r_0 r_1 r_2, + paco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <1== gf_2 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_1. + eapply _paco_3_2_unfold; apply monotone1_3_map; auto. +Qed. + Theorem paco1_3_0_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <1= rr) (CIH: l <_paco_1= rr), l <_paco_1= paco1_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <1= rr) (CIH: l <1= rr), l <1= paco1_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), l <1= paco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco1_3_0 gf_0 gf_1 gf_2 (r_0 \1/ l) r_1 r_2 x0) by eauto. - clear PR; repeat (try left; do 2 paco_revert; paco_cofix_auto). + apply _paco1_3_0_acc. Qed. Theorem paco1_3_1_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <1= rr) (CIH: l <_paco_1= rr), l <_paco_1= paco1_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <1= rr) (CIH: l <1= rr), l <1= paco1_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), l <1= paco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco1_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \1/ l) r_2 x0) by eauto. - clear PR; repeat (try left; do 2 paco_revert; paco_cofix_auto). + apply _paco1_3_1_acc. Qed. Theorem paco1_3_2_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <1= rr) (CIH: l <_paco_1= rr), l <_paco_1= paco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <1= rr) (CIH: l <1= rr), l <1= paco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), l <1= paco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \1/ l) x0) by eauto. - clear PR; repeat (try left; do 2 paco_revert; paco_cofix_auto). + apply _paco1_3_2_acc. Qed. Theorem paco1_3_0_mon: monotone1_3 (paco1_3_0 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone1_3_eq. + apply _paco1_3_0_mon. +Qed. Theorem paco1_3_1_mon: monotone1_3 (paco1_3_1 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone1_3_eq. + apply _paco1_3_1_mon. +Qed. Theorem paco1_3_2_mon: monotone1_3 (paco1_3_2 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone1_3_eq. + apply _paco1_3_2_mon. +Qed. Theorem paco1_3_0_mult_strong: forall r_0 r_1 r_2, paco1_3_0 gf_0 gf_1 gf_2 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1= paco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco1_3_0_mult_strong. +Qed. Theorem paco1_3_1_mult_strong: forall r_0 r_1 r_2, paco1_3_1 gf_0 gf_1 gf_2 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1= paco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco1_3_1_mult_strong. +Qed. Theorem paco1_3_2_mult_strong: forall r_0 r_1 r_2, paco1_3_2 gf_0 gf_1 gf_2 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1= paco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco1_3_2_mult_strong. +Qed. Corollary paco1_3_0_mult: forall r_0 r_1 r_2, paco1_3_0 gf_0 gf_1 gf_2 (paco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1= paco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. @@ -318,69 +665,105 @@ Proof. intros; eapply paco1_3_2_mult_strong, paco1_3_2_mon; eauto. Qed. Theorem paco1_3_0_fold: forall r_0 r_1 r_2, gf_0 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1= paco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco1_3_0_fold. +Qed. Theorem paco1_3_1_fold: forall r_0 r_1 r_2, gf_1 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1= paco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco1_3_1_fold. +Qed. Theorem paco1_3_2_fold: forall r_0 r_1 r_2, gf_2 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1= paco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco1_3_2_fold. +Qed. Theorem paco1_3_0_unfold: forall (MON: monotone1_3 gf_0) (MON: monotone1_3 gf_1) (MON: monotone1_3 gf_2) r_0 r_1 r_2, paco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <1= gf_0 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone1_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco1_3_0_unfold; apply monotone1_3_eq; auto. +Qed. Theorem paco1_3_1_unfold: forall (MON: monotone1_3 gf_0) (MON: monotone1_3 gf_1) (MON: monotone1_3 gf_2) r_0 r_1 r_2, paco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <1= gf_1 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone1_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco1_3_1_unfold; apply monotone1_3_eq; auto. +Qed. Theorem paco1_3_2_unfold: forall (MON: monotone1_3 gf_0) (MON: monotone1_3 gf_1) (MON: monotone1_3 gf_2) r_0 r_1 r_2, paco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <1= gf_2 (upaco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone1_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco1_3_2_unfold; apply monotone1_3_eq; auto. +Qed. End Arg1_3. -Hint Unfold monotone1_3. -Hint Resolve paco1_3_0_fold. -Hint Resolve paco1_3_1_fold. -Hint Resolve paco1_3_2_fold. - -Arguments paco1_3_0_acc [ T0 ]. -Arguments paco1_3_1_acc [ T0 ]. -Arguments paco1_3_2_acc [ T0 ]. -Arguments paco1_3_0_mon [ T0 ]. -Arguments paco1_3_1_mon [ T0 ]. -Arguments paco1_3_2_mon [ T0 ]. -Arguments paco1_3_0_mult_strong [ T0 ]. -Arguments paco1_3_1_mult_strong [ T0 ]. -Arguments paco1_3_2_mult_strong [ T0 ]. -Arguments paco1_3_0_mult [ T0 ]. -Arguments paco1_3_1_mult [ T0 ]. -Arguments paco1_3_2_mult [ T0 ]. -Arguments paco1_3_0_fold [ T0 ]. -Arguments paco1_3_1_fold [ T0 ]. -Arguments paco1_3_2_fold [ T0 ]. -Arguments paco1_3_0_unfold [ T0 ]. -Arguments paco1_3_1_unfold [ T0 ]. -Arguments paco1_3_2_unfold [ T0 ]. - -Instance paco1_3_0_inst T0 (gf_0 gf_1 gf_2 : rel1 T0->_) r_0 r_1 r_2 x0 : paco_class (paco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0) := +Arguments paco1_3_0_acc : clear implicits. +Arguments paco1_3_1_acc : clear implicits. +Arguments paco1_3_2_acc : clear implicits. +Arguments paco1_3_0_mon : clear implicits. +Arguments paco1_3_1_mon : clear implicits. +Arguments paco1_3_2_mon : clear implicits. +Arguments paco1_3_0_mult_strong : clear implicits. +Arguments paco1_3_1_mult_strong : clear implicits. +Arguments paco1_3_2_mult_strong : clear implicits. +Arguments paco1_3_0_mult : clear implicits. +Arguments paco1_3_1_mult : clear implicits. +Arguments paco1_3_2_mult : clear implicits. +Arguments paco1_3_0_fold : clear implicits. +Arguments paco1_3_1_fold : clear implicits. +Arguments paco1_3_2_fold : clear implicits. +Arguments paco1_3_0_unfold : clear implicits. +Arguments paco1_3_1_unfold : clear implicits. +Arguments paco1_3_2_unfold : clear implicits. + +Global Instance paco1_3_0_inst (gf_0 gf_1 gf_2 : rel1 T0->_) r_0 r_1 r_2 x0 : paco_class (paco1_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0) := { pacoacc := paco1_3_0_acc gf_0 gf_1 gf_2; pacomult := paco1_3_0_mult gf_0 gf_1 gf_2; pacofold := paco1_3_0_fold gf_0 gf_1 gf_2; pacounfold := paco1_3_0_unfold gf_0 gf_1 gf_2 }. -Instance paco1_3_1_inst T0 (gf_0 gf_1 gf_2 : rel1 T0->_) r_0 r_1 r_2 x0 : paco_class (paco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0) := +Global Instance paco1_3_1_inst (gf_0 gf_1 gf_2 : rel1 T0->_) r_0 r_1 r_2 x0 : paco_class (paco1_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0) := { pacoacc := paco1_3_1_acc gf_0 gf_1 gf_2; pacomult := paco1_3_1_mult gf_0 gf_1 gf_2; pacofold := paco1_3_1_fold gf_0 gf_1 gf_2; pacounfold := paco1_3_1_unfold gf_0 gf_1 gf_2 }. -Instance paco1_3_2_inst T0 (gf_0 gf_1 gf_2 : rel1 T0->_) r_0 r_1 r_2 x0 : paco_class (paco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0) := +Global Instance paco1_3_2_inst (gf_0 gf_1 gf_2 : rel1 T0->_) r_0 r_1 r_2 x0 : paco_class (paco1_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0) := { pacoacc := paco1_3_2_acc gf_0 gf_1 gf_2; pacomult := paco1_3_2_mult gf_0 gf_1 gf_2; pacofold := paco1_3_2_fold gf_0 gf_1 gf_2; pacounfold := paco1_3_2_unfold gf_0 gf_1 gf_2 }. +End PACO1. + +Global Opaque paco1. + +Hint Unfold upaco1. +Hint Resolve paco1_fold. +Hint Unfold monotone1. + +Global Opaque paco1_2_0. +Global Opaque paco1_2_1. + +Hint Unfold upaco1_2_0. +Hint Unfold upaco1_2_1. +Hint Resolve paco1_2_0_fold. +Hint Resolve paco1_2_1_fold. +Hint Unfold monotone1_2. + +Global Opaque paco1_3_0. +Global Opaque paco1_3_1. +Global Opaque paco1_3_2. + +Hint Unfold upaco1_3_0. +Hint Unfold upaco1_3_1. +Hint Unfold upaco1_3_2. +Hint Resolve paco1_3_0_fold. +Hint Resolve paco1_3_1_fold. +Hint Resolve paco1_3_2_fold. +Hint Unfold monotone1_3. + diff --git a/src/paco10.v b/src/paco10.v index e6e3938..a1069be 100644 --- a/src/paco10.v +++ b/src/paco10.v @@ -1,11 +1,9 @@ Require Export paconotation pacotacuser. -Require Import pacotac. +Require Import paconotation_internal pacotac pacon. Set Implicit Arguments. -(** ** Predicates of Arity 10 -*) +Section PACO10. -Section Arg10_def. Variable T0 : Type. Variable T1 : forall (x0: @T0), Type. Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. @@ -16,144 +14,224 @@ Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) ( Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. + +Record sig10T := + exist10T { + proj10T0: @T0; + proj10T1: @T1 proj10T0; + proj10T2: @T2 proj10T0 proj10T1; + proj10T3: @T3 proj10T0 proj10T1 proj10T2; + proj10T4: @T4 proj10T0 proj10T1 proj10T2 proj10T3; + proj10T5: @T5 proj10T0 proj10T1 proj10T2 proj10T3 proj10T4; + proj10T6: @T6 proj10T0 proj10T1 proj10T2 proj10T3 proj10T4 proj10T5; + proj10T7: @T7 proj10T0 proj10T1 proj10T2 proj10T3 proj10T4 proj10T5 proj10T6; + proj10T8: @T8 proj10T0 proj10T1 proj10T2 proj10T3 proj10T4 proj10T5 proj10T6 proj10T7; + proj10T9: @T9 proj10T0 proj10T1 proj10T2 proj10T3 proj10T4 proj10T5 proj10T6 proj10T7 proj10T8; + }. + +Definition uncurry10 (R: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9): rel1 sig10T := fun x => R (proj10T0 x) (proj10T1 x) (proj10T2 x) (proj10T3 x) (proj10T4 x) (proj10T5 x) (proj10T6 x) (proj10T7 x) (proj10T8 x) (proj10T9 x). + +Definition curry10 (R: rel1 sig10T): rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 := + fun x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 => R (exist10T x9). + +Lemma uncurry_map10 r0 r1 (LE : r0 <10== r1) : uncurry10 r0 <1== uncurry10 r1. +Proof. intros [] H. apply LE. auto. Qed. + +Lemma uncurry_map_rev10 r0 r1 (LE: uncurry10 r0 <1== uncurry10 r1) : r0 <10== r1. +Proof. + repeat_intros 10. intros H. apply (LE (exist10T x9) H). +Qed. + +Lemma curry_map10 r0 r1 (LE: r0 <1== r1) : curry10 r0 <10== curry10 r1. +Proof. + repeat_intros 10. intros H. apply (LE (exist10T x9) H). +Qed. + +Lemma curry_map_rev10 r0 r1 (LE: curry10 r0 <10== curry10 r1) : r0 <1== r1. +Proof. + intros [] H. apply LE. apply H. +Qed. + +Lemma uncurry_bij1_10 r : curry10 (uncurry10 r) <10== r. +Proof. unfold le10. repeat_intros 10; auto. Qed. + +Lemma uncurry_bij2_10 r : r <10== curry10 (uncurry10 r). +Proof. unfold le10. repeat_intros 10; auto. Qed. + +Lemma curry_bij1_10 r : uncurry10 (curry10 r) <1== r. +Proof. intros []; auto. Qed. + +Lemma curry_bij2_10 r : r <1== uncurry10 (curry10 r). +Proof. intros []; auto. Qed. + +Lemma uncurry_adjoint1_10 r0 r1 (LE: uncurry10 r0 <1== r1) : r0 <10== curry10 r1. +Proof. + apply uncurry_map_rev10. eapply le1_trans; [eauto|]. apply curry_bij2_10. +Qed. + +Lemma uncurry_adjoint2_10 r0 r1 (LE: r0 <10== curry10 r1) : uncurry10 r0 <1== r1. +Proof. + apply curry_map_rev10. eapply le10_trans; [|eauto]. apply uncurry_bij2_10. +Qed. + +Lemma curry_adjoint1_10 r0 r1 (LE: curry10 r0 <10== r1) : r0 <1== uncurry10 r1. +Proof. + apply curry_map_rev10. eapply le10_trans; [eauto|]. apply uncurry_bij2_10. +Qed. + +Lemma curry_adjoint2_10 r0 r1 (LE: r0 <1== uncurry10 r1) : curry10 r0 <10== r1. +Proof. + apply uncurry_map_rev10. eapply le1_trans; [|eauto]. apply curry_bij1_10. +Qed. + +(** ** Predicates of Arity 10 +*) + +Section Arg10_def. Variable gf : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9. Arguments gf : clear implicits. -CoInductive paco10( r: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : Prop := -| paco10_pfold pco - (LE : pco <10= (paco10 r \10/ r)) - (SIM: gf pco x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) -. +Definition paco10( r: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 := + curry10 (paco (fun R0 => uncurry10 (gf (curry10 R0))) (uncurry10 r)). + Definition upaco10( r: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) := paco10 r \10/ r. End Arg10_def. -Arguments paco10 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments upaco10 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. +Arguments paco10 : clear implicits. +Arguments upaco10 : clear implicits. Hint Unfold upaco10. Section Arg10_2_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. Variable gf_0 gf_1 : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. -CoInductive paco10_2_0( r_0 r_1: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : Prop := -| paco10_2_0_pfold pco_0 pco_1 - (LE : pco_0 <10= (paco10_2_0 r_0 r_1 \10/ r_0)) - (LE : pco_1 <10= (paco10_2_1 r_0 r_1 \10/ r_1)) - (SIM: gf_0 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) -with paco10_2_1( r_0 r_1: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : Prop := -| paco10_2_1_pfold pco_0 pco_1 - (LE : pco_0 <10= (paco10_2_0 r_0 r_1 \10/ r_0)) - (LE : pco_1 <10= (paco10_2_1 r_0 r_1 \10/ r_1)) - (SIM: gf_1 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) -. +Definition paco10_2_0( r_0 r_1: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 := + curry10 (paco_2_0 (fun R0 R1 => uncurry10 (gf_0 (curry10 R0) (curry10 R1))) (fun R0 R1 => uncurry10 (gf_1 (curry10 R0) (curry10 R1))) (uncurry10 r_0) (uncurry10 r_1)). + +Definition paco10_2_1( r_0 r_1: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 := + curry10 (paco_2_1 (fun R0 R1 => uncurry10 (gf_0 (curry10 R0) (curry10 R1))) (fun R0 R1 => uncurry10 (gf_1 (curry10 R0) (curry10 R1))) (uncurry10 r_0) (uncurry10 r_1)). + Definition upaco10_2_0( r_0 r_1: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) := paco10_2_0 r_0 r_1 \10/ r_0. Definition upaco10_2_1( r_0 r_1: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) := paco10_2_1 r_0 r_1 \10/ r_1. End Arg10_2_def. -Arguments paco10_2_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments upaco10_2_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. +Arguments paco10_2_0 : clear implicits. +Arguments upaco10_2_0 : clear implicits. Hint Unfold upaco10_2_0. -Arguments paco10_2_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments upaco10_2_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. +Arguments paco10_2_1 : clear implicits. +Arguments upaco10_2_1 : clear implicits. Hint Unfold upaco10_2_1. Section Arg10_3_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. Variable gf_0 gf_1 gf_2 : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. -CoInductive paco10_3_0( r_0 r_1 r_2: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : Prop := -| paco10_3_0_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <10= (paco10_3_0 r_0 r_1 r_2 \10/ r_0)) - (LE : pco_1 <10= (paco10_3_1 r_0 r_1 r_2 \10/ r_1)) - (LE : pco_2 <10= (paco10_3_2 r_0 r_1 r_2 \10/ r_2)) - (SIM: gf_0 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) -with paco10_3_1( r_0 r_1 r_2: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : Prop := -| paco10_3_1_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <10= (paco10_3_0 r_0 r_1 r_2 \10/ r_0)) - (LE : pco_1 <10= (paco10_3_1 r_0 r_1 r_2 \10/ r_1)) - (LE : pco_2 <10= (paco10_3_2 r_0 r_1 r_2 \10/ r_2)) - (SIM: gf_1 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) -with paco10_3_2( r_0 r_1 r_2: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : Prop := -| paco10_3_2_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <10= (paco10_3_0 r_0 r_1 r_2 \10/ r_0)) - (LE : pco_1 <10= (paco10_3_1 r_0 r_1 r_2 \10/ r_1)) - (LE : pco_2 <10= (paco10_3_2 r_0 r_1 r_2 \10/ r_2)) - (SIM: gf_2 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) -. +Definition paco10_3_0( r_0 r_1 r_2: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 := + curry10 (paco_3_0 (fun R0 R1 R2 => uncurry10 (gf_0 (curry10 R0) (curry10 R1) (curry10 R2))) (fun R0 R1 R2 => uncurry10 (gf_1 (curry10 R0) (curry10 R1) (curry10 R2))) (fun R0 R1 R2 => uncurry10 (gf_2 (curry10 R0) (curry10 R1) (curry10 R2))) (uncurry10 r_0) (uncurry10 r_1) (uncurry10 r_2)). + +Definition paco10_3_1( r_0 r_1 r_2: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 := + curry10 (paco_3_1 (fun R0 R1 R2 => uncurry10 (gf_0 (curry10 R0) (curry10 R1) (curry10 R2))) (fun R0 R1 R2 => uncurry10 (gf_1 (curry10 R0) (curry10 R1) (curry10 R2))) (fun R0 R1 R2 => uncurry10 (gf_2 (curry10 R0) (curry10 R1) (curry10 R2))) (uncurry10 r_0) (uncurry10 r_1) (uncurry10 r_2)). + +Definition paco10_3_2( r_0 r_1 r_2: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 := + curry10 (paco_3_2 (fun R0 R1 R2 => uncurry10 (gf_0 (curry10 R0) (curry10 R1) (curry10 R2))) (fun R0 R1 R2 => uncurry10 (gf_1 (curry10 R0) (curry10 R1) (curry10 R2))) (fun R0 R1 R2 => uncurry10 (gf_2 (curry10 R0) (curry10 R1) (curry10 R2))) (uncurry10 r_0) (uncurry10 r_1) (uncurry10 r_2)). + Definition upaco10_3_0( r_0 r_1 r_2: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) := paco10_3_0 r_0 r_1 r_2 \10/ r_0. Definition upaco10_3_1( r_0 r_1 r_2: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) := paco10_3_1 r_0 r_1 r_2 \10/ r_1. Definition upaco10_3_2( r_0 r_1 r_2: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) := paco10_3_2 r_0 r_1 r_2 \10/ r_2. End Arg10_3_def. -Arguments paco10_3_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments upaco10_3_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. +Arguments paco10_3_0 : clear implicits. +Arguments upaco10_3_0 : clear implicits. Hint Unfold upaco10_3_0. -Arguments paco10_3_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments upaco10_3_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. +Arguments paco10_3_1 : clear implicits. +Arguments upaco10_3_1 : clear implicits. Hint Unfold upaco10_3_1. -Arguments paco10_3_2 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments upaco10_3_2 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. +Arguments paco10_3_2 : clear implicits. +Arguments upaco10_3_2 : clear implicits. Hint Unfold upaco10_3_2. -(* Less than or equal - internal use only *) -Notation "p <_paco_10= q" := - (forall _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 (PR: p _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 : Prop), q _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 : Prop) - (at level 50, no associativity). - (** 1 Mutual Coinduction *) Section Arg10_1. -Definition monotone10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 (gf: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) := +Definition monotone10 (gf: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 r r' (IN: gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (LE: r <10= r'), gf r' x0 x1 x2 x3 x4 x5 x6 x7 x8 x9. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. +Definition _monotone10 (gf: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) := + forall r r'(LE: r <10= r'), gf r <10== gf r'. + +Lemma monotone10_eq (gf: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) : + monotone10 gf <-> _monotone10 gf. +Proof. unfold monotone10, _monotone10, le10. split; eauto. Qed. + +Lemma monotone10_map (gf: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) + (MON: _monotone10 gf) : + _monotone (fun R0 => uncurry10 (gf (curry10 R0))). +Proof. + repeat_intros 3. apply uncurry_map10. apply MON; apply curry_map10; auto. +Qed. + Variable gf : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9. Arguments gf : clear implicits. +Theorem _paco10_mon: _monotone10 (paco10 gf). +Proof. + repeat_intros 3. eapply curry_map10, _paco_mon; apply uncurry_map10; auto. +Qed. + +Theorem _paco10_acc: forall + l r (OBG: forall rr (INC: r <10== rr) (CIH: l <10== rr), l <10== paco10 gf rr), + l <10== paco10 gf r. +Proof. + intros. apply uncurry_adjoint1_10. + eapply _paco_acc. intros. + apply uncurry_adjoint1_10 in INC. apply uncurry_adjoint1_10 in CIH. + apply uncurry_adjoint2_10. + eapply le10_trans. eapply (OBG _ INC CIH). + apply curry_map10. + apply _paco_mon; try apply le1_refl; apply curry_bij1_10. +Qed. + +Theorem _paco10_mult_strong: forall r, + paco10 gf (upaco10 gf r) <10== paco10 gf r. +Proof. + intros. apply curry_map10. + eapply le1_trans; [| eapply _paco_mult_strong]. + apply _paco_mon; intros []; eauto. +Qed. + +Theorem _paco10_fold: forall r, + gf (upaco10 gf r) <10== paco10 gf r. +Proof. + intros. apply uncurry_adjoint1_10. + eapply le1_trans; [| apply _paco_fold]. apply le1_refl. +Qed. + +Theorem _paco10_unfold: forall (MON: _monotone10 gf) r, + paco10 gf r <10== gf (upaco10 gf r). +Proof. + intros. apply curry_adjoint2_10. + eapply _paco_unfold; apply monotone10_map; auto. +Qed. + Theorem paco10_acc: forall - l r (OBG: forall rr (INC: r <10= rr) (CIH: l <_paco_10= rr), l <_paco_10= paco10 gf rr), + l r (OBG: forall rr (INC: r <10= rr) (CIH: l <10= rr), l <10= paco10 gf rr), l <10= paco10 gf r. Proof. - intros; assert (SIM: paco10 gf (r \10/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) by eauto. - clear PR; repeat (try left; do 11 paco_revert; paco_cofix_auto). + apply _paco10_acc. Qed. Theorem paco10_mon: monotone10 (paco10 gf). -Proof. paco_cofix_auto; repeat (left; do 11 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone10_eq. + apply _paco10_mon. +Qed. Theorem paco10_mult_strong: forall r, paco10 gf (upaco10 gf r) <10= paco10 gf r. -Proof. paco_cofix_auto; repeat (left; do 11 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco10_mult_strong. +Qed. Corollary paco10_mult: forall r, paco10 gf (paco10 gf r) <10= paco10 gf r. @@ -161,25 +239,26 @@ Proof. intros; eapply paco10_mult_strong, paco10_mon; eauto. Qed. Theorem paco10_fold: forall r, gf (upaco10 gf r) <10= paco10 gf r. -Proof. intros; econstructor; [ |eauto]; eauto. Qed. +Proof. + apply _paco10_fold. +Qed. Theorem paco10_unfold: forall (MON: monotone10 gf) r, paco10 gf r <10= gf (upaco10 gf r). -Proof. unfold monotone10; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 1. eapply _paco10_unfold; apply monotone10_eq; auto. +Qed. End Arg10_1. -Hint Unfold monotone10. -Hint Resolve paco10_fold. +Arguments paco10_acc : clear implicits. +Arguments paco10_mon : clear implicits. +Arguments paco10_mult_strong : clear implicits. +Arguments paco10_mult : clear implicits. +Arguments paco10_fold : clear implicits. +Arguments paco10_unfold : clear implicits. -Arguments paco10_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. - -Instance paco10_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 (gf : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9->_) r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : paco_class (paco10 gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) := +Global Instance paco10_inst (gf : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9->_) r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : paco_class (paco10 gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) := { pacoacc := paco10_acc gf; pacomult := paco10_mult gf; pacofold := paco10_fold gf; @@ -189,52 +268,144 @@ Instance paco10_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 (gf : rel10 T0 T1 T2 T3 T4 T Section Arg10_2. -Definition monotone10_2 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 (gf: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) := +Definition monotone10_2 (gf: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (LE_0: r_0 <10= r'_0)(LE_1: r_1 <10= r'_1), gf r'_0 r'_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. +Definition _monotone10_2 (gf: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <10= r'_0)(LE_1: r_1 <10= r'_1), gf r_0 r_1 <10== gf r'_0 r'_1. + +Lemma monotone10_2_eq (gf: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) : + monotone10_2 gf <-> _monotone10_2 gf. +Proof. unfold monotone10_2, _monotone10_2, le10. split; eauto. Qed. + +Lemma monotone10_2_map (gf: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) + (MON: _monotone10_2 gf) : + _monotone_2 (fun R0 R1 => uncurry10 (gf (curry10 R0) (curry10 R1))). +Proof. + repeat_intros 6. apply uncurry_map10. apply MON; apply curry_map10; auto. +Qed. + Variable gf_0 gf_1 : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. +Theorem _paco10_2_0_mon: _monotone10_2 (paco10_2_0 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map10, _paco_2_0_mon; apply uncurry_map10; auto. +Qed. + +Theorem _paco10_2_1_mon: _monotone10_2 (paco10_2_1 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map10, _paco_2_1_mon; apply uncurry_map10; auto. +Qed. + +Theorem _paco10_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <10== rr) (CIH: l <10== rr), l <10== paco10_2_0 gf_0 gf_1 rr r_1), + l <10== paco10_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_10. + eapply _paco_2_0_acc. intros. + apply uncurry_adjoint1_10 in INC. apply uncurry_adjoint1_10 in CIH. + apply uncurry_adjoint2_10. + eapply le10_trans. eapply (OBG _ INC CIH). + apply curry_map10. + apply _paco_2_0_mon; try apply le1_refl; apply curry_bij1_10. +Qed. + +Theorem _paco10_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <10== rr) (CIH: l <10== rr), l <10== paco10_2_1 gf_0 gf_1 r_0 rr), + l <10== paco10_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_10. + eapply _paco_2_1_acc. intros. + apply uncurry_adjoint1_10 in INC. apply uncurry_adjoint1_10 in CIH. + apply uncurry_adjoint2_10. + eapply le10_trans. eapply (OBG _ INC CIH). + apply curry_map10. + apply _paco_2_1_mon; try apply le1_refl; apply curry_bij1_10. +Qed. + +Theorem _paco10_2_0_mult_strong: forall r_0 r_1, + paco10_2_0 gf_0 gf_1 (upaco10_2_0 gf_0 gf_1 r_0 r_1) (upaco10_2_1 gf_0 gf_1 r_0 r_1) <10== paco10_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map10. + eapply le1_trans; [| eapply _paco_2_0_mult_strong]. + apply _paco_2_0_mon; intros []; eauto. +Qed. + +Theorem _paco10_2_1_mult_strong: forall r_0 r_1, + paco10_2_1 gf_0 gf_1 (upaco10_2_0 gf_0 gf_1 r_0 r_1) (upaco10_2_1 gf_0 gf_1 r_0 r_1) <10== paco10_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map10. + eapply le1_trans; [| eapply _paco_2_1_mult_strong]. + apply _paco_2_1_mon; intros []; eauto. +Qed. + +Theorem _paco10_2_0_fold: forall r_0 r_1, + gf_0 (upaco10_2_0 gf_0 gf_1 r_0 r_1) (upaco10_2_1 gf_0 gf_1 r_0 r_1) <10== paco10_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_10. + eapply le1_trans; [| apply _paco_2_0_fold]. apply le1_refl. +Qed. + +Theorem _paco10_2_1_fold: forall r_0 r_1, + gf_1 (upaco10_2_0 gf_0 gf_1 r_0 r_1) (upaco10_2_1 gf_0 gf_1 r_0 r_1) <10== paco10_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_10. + eapply le1_trans; [| apply _paco_2_1_fold]. apply le1_refl. +Qed. + +Theorem _paco10_2_0_unfold: forall (MON: _monotone10_2 gf_0) (MON: _monotone10_2 gf_1) r_0 r_1, + paco10_2_0 gf_0 gf_1 r_0 r_1 <10== gf_0 (upaco10_2_0 gf_0 gf_1 r_0 r_1) (upaco10_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_10. + eapply _paco_2_0_unfold; apply monotone10_2_map; auto. +Qed. + +Theorem _paco10_2_1_unfold: forall (MON: _monotone10_2 gf_0) (MON: _monotone10_2 gf_1) r_0 r_1, + paco10_2_1 gf_0 gf_1 r_0 r_1 <10== gf_1 (upaco10_2_0 gf_0 gf_1 r_0 r_1) (upaco10_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_10. + eapply _paco_2_1_unfold; apply monotone10_2_map; auto. +Qed. + Theorem paco10_2_0_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_0 <10= rr) (CIH: l <_paco_10= rr), l <_paco_10= paco10_2_0 gf_0 gf_1 rr r_1), + l r_0 r_1 (OBG: forall rr (INC: r_0 <10= rr) (CIH: l <10= rr), l <10= paco10_2_0 gf_0 gf_1 rr r_1), l <10= paco10_2_0 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco10_2_0 gf_0 gf_1 (r_0 \10/ l) r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) by eauto. - clear PR; repeat (try left; do 11 paco_revert; paco_cofix_auto). + apply _paco10_2_0_acc. Qed. Theorem paco10_2_1_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_1 <10= rr) (CIH: l <_paco_10= rr), l <_paco_10= paco10_2_1 gf_0 gf_1 r_0 rr), + l r_0 r_1 (OBG: forall rr (INC: r_1 <10= rr) (CIH: l <10= rr), l <10= paco10_2_1 gf_0 gf_1 r_0 rr), l <10= paco10_2_1 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco10_2_1 gf_0 gf_1 r_0 (r_1 \10/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) by eauto. - clear PR; repeat (try left; do 11 paco_revert; paco_cofix_auto). + apply _paco10_2_1_acc. Qed. Theorem paco10_2_0_mon: monotone10_2 (paco10_2_0 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 11 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone10_2_eq. + apply _paco10_2_0_mon. +Qed. Theorem paco10_2_1_mon: monotone10_2 (paco10_2_1 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 11 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone10_2_eq. + apply _paco10_2_1_mon. +Qed. Theorem paco10_2_0_mult_strong: forall r_0 r_1, paco10_2_0 gf_0 gf_1 (upaco10_2_0 gf_0 gf_1 r_0 r_1) (upaco10_2_1 gf_0 gf_1 r_0 r_1) <10= paco10_2_0 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 11 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco10_2_0_mult_strong. +Qed. Theorem paco10_2_1_mult_strong: forall r_0 r_1, paco10_2_1 gf_0 gf_1 (upaco10_2_0 gf_0 gf_1 r_0 r_1) (upaco10_2_1 gf_0 gf_1 r_0 r_1) <10= paco10_2_1 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 11 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco10_2_1_mult_strong. +Qed. Corollary paco10_2_0_mult: forall r_0 r_1, paco10_2_0 gf_0 gf_1 (paco10_2_0 gf_0 gf_1 r_0 r_1) (paco10_2_1 gf_0 gf_1 r_0 r_1) <10= paco10_2_0 gf_0 gf_1 r_0 r_1. @@ -246,46 +417,50 @@ Proof. intros; eapply paco10_2_1_mult_strong, paco10_2_1_mon; eauto. Qed. Theorem paco10_2_0_fold: forall r_0 r_1, gf_0 (upaco10_2_0 gf_0 gf_1 r_0 r_1) (upaco10_2_1 gf_0 gf_1 r_0 r_1) <10= paco10_2_0 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco10_2_0_fold. +Qed. Theorem paco10_2_1_fold: forall r_0 r_1, gf_1 (upaco10_2_0 gf_0 gf_1 r_0 r_1) (upaco10_2_1 gf_0 gf_1 r_0 r_1) <10= paco10_2_1 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco10_2_1_fold. +Qed. Theorem paco10_2_0_unfold: forall (MON: monotone10_2 gf_0) (MON: monotone10_2 gf_1) r_0 r_1, paco10_2_0 gf_0 gf_1 r_0 r_1 <10= gf_0 (upaco10_2_0 gf_0 gf_1 r_0 r_1) (upaco10_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone10_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco10_2_0_unfold; apply monotone10_2_eq; auto. +Qed. Theorem paco10_2_1_unfold: forall (MON: monotone10_2 gf_0) (MON: monotone10_2 gf_1) r_0 r_1, paco10_2_1 gf_0 gf_1 r_0 r_1 <10= gf_1 (upaco10_2_0 gf_0 gf_1 r_0 r_1) (upaco10_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone10_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco10_2_1_unfold; apply monotone10_2_eq; auto. +Qed. End Arg10_2. -Hint Unfold monotone10_2. -Hint Resolve paco10_2_0_fold. -Hint Resolve paco10_2_1_fold. - -Arguments paco10_2_0_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_2_1_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_2_0_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_2_1_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_2_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_2_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_2_0_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_2_1_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_2_0_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_2_1_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_2_0_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_2_1_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. - -Instance paco10_2_0_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 (gf_0 gf_1 : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : paco_class (paco10_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) := +Arguments paco10_2_0_acc : clear implicits. +Arguments paco10_2_1_acc : clear implicits. +Arguments paco10_2_0_mon : clear implicits. +Arguments paco10_2_1_mon : clear implicits. +Arguments paco10_2_0_mult_strong : clear implicits. +Arguments paco10_2_1_mult_strong : clear implicits. +Arguments paco10_2_0_mult : clear implicits. +Arguments paco10_2_1_mult : clear implicits. +Arguments paco10_2_0_fold : clear implicits. +Arguments paco10_2_1_fold : clear implicits. +Arguments paco10_2_0_unfold : clear implicits. +Arguments paco10_2_1_unfold : clear implicits. + +Global Instance paco10_2_0_inst (gf_0 gf_1 : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : paco_class (paco10_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) := { pacoacc := paco10_2_0_acc gf_0 gf_1; pacomult := paco10_2_0_mult gf_0 gf_1; pacofold := paco10_2_0_fold gf_0 gf_1; pacounfold := paco10_2_0_unfold gf_0 gf_1 }. -Instance paco10_2_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 (gf_0 gf_1 : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : paco_class (paco10_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) := +Global Instance paco10_2_1_inst (gf_0 gf_1 : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : paco_class (paco10_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) := { pacoacc := paco10_2_1_acc gf_0 gf_1; pacomult := paco10_2_1_mult gf_0 gf_1; pacofold := paco10_2_1_fold gf_0 gf_1; @@ -295,68 +470,204 @@ Instance paco10_2_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 (gf_0 gf_1 : rel10 T0 T1 Section Arg10_3. -Definition monotone10_3 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 (gf: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) := +Definition monotone10_3 (gf: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (LE_0: r_0 <10= r'_0)(LE_1: r_1 <10= r'_1)(LE_2: r_2 <10= r'_2), gf r'_0 r'_1 r'_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. +Definition _monotone10_3 (gf: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <10= r'_0)(LE_1: r_1 <10= r'_1)(LE_2: r_2 <10= r'_2), gf r_0 r_1 r_2 <10== gf r'_0 r'_1 r'_2. + +Lemma monotone10_3_eq (gf: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) : + monotone10_3 gf <-> _monotone10_3 gf. +Proof. unfold monotone10_3, _monotone10_3, le10. split; eauto. Qed. + +Lemma monotone10_3_map (gf: rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) + (MON: _monotone10_3 gf) : + _monotone_3 (fun R0 R1 R2 => uncurry10 (gf (curry10 R0) (curry10 R1) (curry10 R2))). +Proof. + repeat_intros 9. apply uncurry_map10. apply MON; apply curry_map10; auto. +Qed. + Variable gf_0 gf_1 gf_2 : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 -> rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. +Theorem _paco10_3_0_mon: _monotone10_3 (paco10_3_0 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map10, _paco_3_0_mon; apply uncurry_map10; auto. +Qed. + +Theorem _paco10_3_1_mon: _monotone10_3 (paco10_3_1 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map10, _paco_3_1_mon; apply uncurry_map10; auto. +Qed. + +Theorem _paco10_3_2_mon: _monotone10_3 (paco10_3_2 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map10, _paco_3_2_mon; apply uncurry_map10; auto. +Qed. + +Theorem _paco10_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <10== rr) (CIH: l <10== rr), l <10== paco10_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <10== paco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_10. + eapply _paco_3_0_acc. intros. + apply uncurry_adjoint1_10 in INC. apply uncurry_adjoint1_10 in CIH. + apply uncurry_adjoint2_10. + eapply le10_trans. eapply (OBG _ INC CIH). + apply curry_map10. + apply _paco_3_0_mon; try apply le1_refl; apply curry_bij1_10. +Qed. + +Theorem _paco10_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <10== rr) (CIH: l <10== rr), l <10== paco10_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <10== paco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_10. + eapply _paco_3_1_acc. intros. + apply uncurry_adjoint1_10 in INC. apply uncurry_adjoint1_10 in CIH. + apply uncurry_adjoint2_10. + eapply le10_trans. eapply (OBG _ INC CIH). + apply curry_map10. + apply _paco_3_1_mon; try apply le1_refl; apply curry_bij1_10. +Qed. + +Theorem _paco10_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <10== rr) (CIH: l <10== rr), l <10== paco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <10== paco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_10. + eapply _paco_3_2_acc. intros. + apply uncurry_adjoint1_10 in INC. apply uncurry_adjoint1_10 in CIH. + apply uncurry_adjoint2_10. + eapply le10_trans. eapply (OBG _ INC CIH). + apply curry_map10. + apply _paco_3_2_mon; try apply le1_refl; apply curry_bij1_10. +Qed. + +Theorem _paco10_3_0_mult_strong: forall r_0 r_1 r_2, + paco10_3_0 gf_0 gf_1 gf_2 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <10== paco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map10. + eapply le1_trans; [| eapply _paco_3_0_mult_strong]. + apply _paco_3_0_mon; intros []; eauto. +Qed. + +Theorem _paco10_3_1_mult_strong: forall r_0 r_1 r_2, + paco10_3_1 gf_0 gf_1 gf_2 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <10== paco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map10. + eapply le1_trans; [| eapply _paco_3_1_mult_strong]. + apply _paco_3_1_mon; intros []; eauto. +Qed. + +Theorem _paco10_3_2_mult_strong: forall r_0 r_1 r_2, + paco10_3_2 gf_0 gf_1 gf_2 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <10== paco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map10. + eapply le1_trans; [| eapply _paco_3_2_mult_strong]. + apply _paco_3_2_mon; intros []; eauto. +Qed. + +Theorem _paco10_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <10== paco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_10. + eapply le1_trans; [| apply _paco_3_0_fold]. apply le1_refl. +Qed. + +Theorem _paco10_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <10== paco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_10. + eapply le1_trans; [| apply _paco_3_1_fold]. apply le1_refl. +Qed. + +Theorem _paco10_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <10== paco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_10. + eapply le1_trans; [| apply _paco_3_2_fold]. apply le1_refl. +Qed. + +Theorem _paco10_3_0_unfold: forall (MON: _monotone10_3 gf_0) (MON: _monotone10_3 gf_1) (MON: _monotone10_3 gf_2) r_0 r_1 r_2, + paco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <10== gf_0 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_10. + eapply _paco_3_0_unfold; apply monotone10_3_map; auto. +Qed. + +Theorem _paco10_3_1_unfold: forall (MON: _monotone10_3 gf_0) (MON: _monotone10_3 gf_1) (MON: _monotone10_3 gf_2) r_0 r_1 r_2, + paco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <10== gf_1 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_10. + eapply _paco_3_1_unfold; apply monotone10_3_map; auto. +Qed. + +Theorem _paco10_3_2_unfold: forall (MON: _monotone10_3 gf_0) (MON: _monotone10_3 gf_1) (MON: _monotone10_3 gf_2) r_0 r_1 r_2, + paco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <10== gf_2 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_10. + eapply _paco_3_2_unfold; apply monotone10_3_map; auto. +Qed. + Theorem paco10_3_0_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <10= rr) (CIH: l <_paco_10= rr), l <_paco_10= paco10_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <10= rr) (CIH: l <10= rr), l <10= paco10_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), l <10= paco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco10_3_0 gf_0 gf_1 gf_2 (r_0 \10/ l) r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) by eauto. - clear PR; repeat (try left; do 11 paco_revert; paco_cofix_auto). + apply _paco10_3_0_acc. Qed. Theorem paco10_3_1_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <10= rr) (CIH: l <_paco_10= rr), l <_paco_10= paco10_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <10= rr) (CIH: l <10= rr), l <10= paco10_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), l <10= paco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco10_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \10/ l) r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) by eauto. - clear PR; repeat (try left; do 11 paco_revert; paco_cofix_auto). + apply _paco10_3_1_acc. Qed. Theorem paco10_3_2_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <10= rr) (CIH: l <_paco_10= rr), l <_paco_10= paco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <10= rr) (CIH: l <10= rr), l <10= paco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), l <10= paco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \10/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) by eauto. - clear PR; repeat (try left; do 11 paco_revert; paco_cofix_auto). + apply _paco10_3_2_acc. Qed. Theorem paco10_3_0_mon: monotone10_3 (paco10_3_0 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 11 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone10_3_eq. + apply _paco10_3_0_mon. +Qed. Theorem paco10_3_1_mon: monotone10_3 (paco10_3_1 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 11 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone10_3_eq. + apply _paco10_3_1_mon. +Qed. Theorem paco10_3_2_mon: monotone10_3 (paco10_3_2 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 11 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone10_3_eq. + apply _paco10_3_2_mon. +Qed. Theorem paco10_3_0_mult_strong: forall r_0 r_1 r_2, paco10_3_0 gf_0 gf_1 gf_2 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <10= paco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 11 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco10_3_0_mult_strong. +Qed. Theorem paco10_3_1_mult_strong: forall r_0 r_1 r_2, paco10_3_1 gf_0 gf_1 gf_2 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <10= paco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 11 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco10_3_1_mult_strong. +Qed. Theorem paco10_3_2_mult_strong: forall r_0 r_1 r_2, paco10_3_2 gf_0 gf_1 gf_2 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <10= paco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 11 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco10_3_2_mult_strong. +Qed. Corollary paco10_3_0_mult: forall r_0 r_1 r_2, paco10_3_0 gf_0 gf_1 gf_2 (paco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <10= paco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. @@ -372,69 +683,105 @@ Proof. intros; eapply paco10_3_2_mult_strong, paco10_3_2_mon; eauto. Qed. Theorem paco10_3_0_fold: forall r_0 r_1 r_2, gf_0 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <10= paco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco10_3_0_fold. +Qed. Theorem paco10_3_1_fold: forall r_0 r_1 r_2, gf_1 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <10= paco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco10_3_1_fold. +Qed. Theorem paco10_3_2_fold: forall r_0 r_1 r_2, gf_2 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <10= paco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco10_3_2_fold. +Qed. Theorem paco10_3_0_unfold: forall (MON: monotone10_3 gf_0) (MON: monotone10_3 gf_1) (MON: monotone10_3 gf_2) r_0 r_1 r_2, paco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <10= gf_0 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone10_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco10_3_0_unfold; apply monotone10_3_eq; auto. +Qed. Theorem paco10_3_1_unfold: forall (MON: monotone10_3 gf_0) (MON: monotone10_3 gf_1) (MON: monotone10_3 gf_2) r_0 r_1 r_2, paco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <10= gf_1 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone10_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco10_3_1_unfold; apply monotone10_3_eq; auto. +Qed. Theorem paco10_3_2_unfold: forall (MON: monotone10_3 gf_0) (MON: monotone10_3 gf_1) (MON: monotone10_3 gf_2) r_0 r_1 r_2, paco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <10= gf_2 (upaco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone10_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco10_3_2_unfold; apply monotone10_3_eq; auto. +Qed. End Arg10_3. -Hint Unfold monotone10_3. -Hint Resolve paco10_3_0_fold. -Hint Resolve paco10_3_1_fold. -Hint Resolve paco10_3_2_fold. - -Arguments paco10_3_0_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_1_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_2_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_0_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_1_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_2_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_2_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_0_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_1_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_2_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_0_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_1_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_2_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_0_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_1_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. -Arguments paco10_3_2_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 ]. - -Instance paco10_3_0_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 (gf_0 gf_1 gf_2 : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : paco_class (paco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) := +Arguments paco10_3_0_acc : clear implicits. +Arguments paco10_3_1_acc : clear implicits. +Arguments paco10_3_2_acc : clear implicits. +Arguments paco10_3_0_mon : clear implicits. +Arguments paco10_3_1_mon : clear implicits. +Arguments paco10_3_2_mon : clear implicits. +Arguments paco10_3_0_mult_strong : clear implicits. +Arguments paco10_3_1_mult_strong : clear implicits. +Arguments paco10_3_2_mult_strong : clear implicits. +Arguments paco10_3_0_mult : clear implicits. +Arguments paco10_3_1_mult : clear implicits. +Arguments paco10_3_2_mult : clear implicits. +Arguments paco10_3_0_fold : clear implicits. +Arguments paco10_3_1_fold : clear implicits. +Arguments paco10_3_2_fold : clear implicits. +Arguments paco10_3_0_unfold : clear implicits. +Arguments paco10_3_1_unfold : clear implicits. +Arguments paco10_3_2_unfold : clear implicits. + +Global Instance paco10_3_0_inst (gf_0 gf_1 gf_2 : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : paco_class (paco10_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) := { pacoacc := paco10_3_0_acc gf_0 gf_1 gf_2; pacomult := paco10_3_0_mult gf_0 gf_1 gf_2; pacofold := paco10_3_0_fold gf_0 gf_1 gf_2; pacounfold := paco10_3_0_unfold gf_0 gf_1 gf_2 }. -Instance paco10_3_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 (gf_0 gf_1 gf_2 : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : paco_class (paco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) := +Global Instance paco10_3_1_inst (gf_0 gf_1 gf_2 : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : paco_class (paco10_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) := { pacoacc := paco10_3_1_acc gf_0 gf_1 gf_2; pacomult := paco10_3_1_mult gf_0 gf_1 gf_2; pacofold := paco10_3_1_fold gf_0 gf_1 gf_2; pacounfold := paco10_3_1_unfold gf_0 gf_1 gf_2 }. -Instance paco10_3_2_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 (gf_0 gf_1 gf_2 : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : paco_class (paco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) := +Global Instance paco10_3_2_inst (gf_0 gf_1 gf_2 : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : paco_class (paco10_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) := { pacoacc := paco10_3_2_acc gf_0 gf_1 gf_2; pacomult := paco10_3_2_mult gf_0 gf_1 gf_2; pacofold := paco10_3_2_fold gf_0 gf_1 gf_2; pacounfold := paco10_3_2_unfold gf_0 gf_1 gf_2 }. +End PACO10. + +Global Opaque paco10. + +Hint Unfold upaco10. +Hint Resolve paco10_fold. +Hint Unfold monotone10. + +Global Opaque paco10_2_0. +Global Opaque paco10_2_1. + +Hint Unfold upaco10_2_0. +Hint Unfold upaco10_2_1. +Hint Resolve paco10_2_0_fold. +Hint Resolve paco10_2_1_fold. +Hint Unfold monotone10_2. + +Global Opaque paco10_3_0. +Global Opaque paco10_3_1. +Global Opaque paco10_3_2. + +Hint Unfold upaco10_3_0. +Hint Unfold upaco10_3_1. +Hint Unfold upaco10_3_2. +Hint Resolve paco10_3_0_fold. +Hint Resolve paco10_3_1_fold. +Hint Resolve paco10_3_2_fold. +Hint Unfold monotone10_3. + diff --git a/src/paco11.v b/src/paco11.v index c3c1cbe..64b770e 100644 --- a/src/paco11.v +++ b/src/paco11.v @@ -1,11 +1,9 @@ Require Export paconotation pacotacuser. -Require Import pacotac. +Require Import paconotation_internal pacotac pacon. Set Implicit Arguments. -(** ** Predicates of Arity 11 -*) +Section PACO11. -Section Arg11_def. Variable T0 : Type. Variable T1 : forall (x0: @T0), Type. Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. @@ -17,147 +15,225 @@ Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) ( Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. + +Record sig11T := + exist11T { + proj11T0: @T0; + proj11T1: @T1 proj11T0; + proj11T2: @T2 proj11T0 proj11T1; + proj11T3: @T3 proj11T0 proj11T1 proj11T2; + proj11T4: @T4 proj11T0 proj11T1 proj11T2 proj11T3; + proj11T5: @T5 proj11T0 proj11T1 proj11T2 proj11T3 proj11T4; + proj11T6: @T6 proj11T0 proj11T1 proj11T2 proj11T3 proj11T4 proj11T5; + proj11T7: @T7 proj11T0 proj11T1 proj11T2 proj11T3 proj11T4 proj11T5 proj11T6; + proj11T8: @T8 proj11T0 proj11T1 proj11T2 proj11T3 proj11T4 proj11T5 proj11T6 proj11T7; + proj11T9: @T9 proj11T0 proj11T1 proj11T2 proj11T3 proj11T4 proj11T5 proj11T6 proj11T7 proj11T8; + proj11T10: @T10 proj11T0 proj11T1 proj11T2 proj11T3 proj11T4 proj11T5 proj11T6 proj11T7 proj11T8 proj11T9; + }. + +Definition uncurry11 (R: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10): rel1 sig11T := fun x => R (proj11T0 x) (proj11T1 x) (proj11T2 x) (proj11T3 x) (proj11T4 x) (proj11T5 x) (proj11T6 x) (proj11T7 x) (proj11T8 x) (proj11T9 x) (proj11T10 x). + +Definition curry11 (R: rel1 sig11T): rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 := + fun x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 => R (exist11T x10). + +Lemma uncurry_map11 r0 r1 (LE : r0 <11== r1) : uncurry11 r0 <1== uncurry11 r1. +Proof. intros [] H. apply LE. auto. Qed. + +Lemma uncurry_map_rev11 r0 r1 (LE: uncurry11 r0 <1== uncurry11 r1) : r0 <11== r1. +Proof. + repeat_intros 11. intros H. apply (LE (exist11T x10) H). +Qed. + +Lemma curry_map11 r0 r1 (LE: r0 <1== r1) : curry11 r0 <11== curry11 r1. +Proof. + repeat_intros 11. intros H. apply (LE (exist11T x10) H). +Qed. + +Lemma curry_map_rev11 r0 r1 (LE: curry11 r0 <11== curry11 r1) : r0 <1== r1. +Proof. + intros [] H. apply LE. apply H. +Qed. + +Lemma uncurry_bij1_11 r : curry11 (uncurry11 r) <11== r. +Proof. unfold le11. repeat_intros 11; auto. Qed. + +Lemma uncurry_bij2_11 r : r <11== curry11 (uncurry11 r). +Proof. unfold le11. repeat_intros 11; auto. Qed. + +Lemma curry_bij1_11 r : uncurry11 (curry11 r) <1== r. +Proof. intros []; auto. Qed. + +Lemma curry_bij2_11 r : r <1== uncurry11 (curry11 r). +Proof. intros []; auto. Qed. + +Lemma uncurry_adjoint1_11 r0 r1 (LE: uncurry11 r0 <1== r1) : r0 <11== curry11 r1. +Proof. + apply uncurry_map_rev11. eapply le1_trans; [eauto|]. apply curry_bij2_11. +Qed. + +Lemma uncurry_adjoint2_11 r0 r1 (LE: r0 <11== curry11 r1) : uncurry11 r0 <1== r1. +Proof. + apply curry_map_rev11. eapply le11_trans; [|eauto]. apply uncurry_bij2_11. +Qed. + +Lemma curry_adjoint1_11 r0 r1 (LE: curry11 r0 <11== r1) : r0 <1== uncurry11 r1. +Proof. + apply curry_map_rev11. eapply le11_trans; [eauto|]. apply uncurry_bij2_11. +Qed. + +Lemma curry_adjoint2_11 r0 r1 (LE: r0 <1== uncurry11 r1) : curry11 r0 <11== r1. +Proof. + apply uncurry_map_rev11. eapply le1_trans; [|eauto]. apply curry_bij1_11. +Qed. + +(** ** Predicates of Arity 11 +*) + +Section Arg11_def. Variable gf : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10. Arguments gf : clear implicits. -CoInductive paco11( r: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : Prop := -| paco11_pfold pco - (LE : pco <11= (paco11 r \11/ r)) - (SIM: gf pco x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) -. +Definition paco11( r: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 := + curry11 (paco (fun R0 => uncurry11 (gf (curry11 R0))) (uncurry11 r)). + Definition upaco11( r: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) := paco11 r \11/ r. End Arg11_def. -Arguments paco11 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments upaco11 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. +Arguments paco11 : clear implicits. +Arguments upaco11 : clear implicits. Hint Unfold upaco11. Section Arg11_2_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. Variable gf_0 gf_1 : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. -CoInductive paco11_2_0( r_0 r_1: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : Prop := -| paco11_2_0_pfold pco_0 pco_1 - (LE : pco_0 <11= (paco11_2_0 r_0 r_1 \11/ r_0)) - (LE : pco_1 <11= (paco11_2_1 r_0 r_1 \11/ r_1)) - (SIM: gf_0 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) -with paco11_2_1( r_0 r_1: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : Prop := -| paco11_2_1_pfold pco_0 pco_1 - (LE : pco_0 <11= (paco11_2_0 r_0 r_1 \11/ r_0)) - (LE : pco_1 <11= (paco11_2_1 r_0 r_1 \11/ r_1)) - (SIM: gf_1 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) -. +Definition paco11_2_0( r_0 r_1: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 := + curry11 (paco_2_0 (fun R0 R1 => uncurry11 (gf_0 (curry11 R0) (curry11 R1))) (fun R0 R1 => uncurry11 (gf_1 (curry11 R0) (curry11 R1))) (uncurry11 r_0) (uncurry11 r_1)). + +Definition paco11_2_1( r_0 r_1: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 := + curry11 (paco_2_1 (fun R0 R1 => uncurry11 (gf_0 (curry11 R0) (curry11 R1))) (fun R0 R1 => uncurry11 (gf_1 (curry11 R0) (curry11 R1))) (uncurry11 r_0) (uncurry11 r_1)). + Definition upaco11_2_0( r_0 r_1: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) := paco11_2_0 r_0 r_1 \11/ r_0. Definition upaco11_2_1( r_0 r_1: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) := paco11_2_1 r_0 r_1 \11/ r_1. End Arg11_2_def. -Arguments paco11_2_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments upaco11_2_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. +Arguments paco11_2_0 : clear implicits. +Arguments upaco11_2_0 : clear implicits. Hint Unfold upaco11_2_0. -Arguments paco11_2_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments upaco11_2_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. +Arguments paco11_2_1 : clear implicits. +Arguments upaco11_2_1 : clear implicits. Hint Unfold upaco11_2_1. Section Arg11_3_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. Variable gf_0 gf_1 gf_2 : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. -CoInductive paco11_3_0( r_0 r_1 r_2: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : Prop := -| paco11_3_0_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <11= (paco11_3_0 r_0 r_1 r_2 \11/ r_0)) - (LE : pco_1 <11= (paco11_3_1 r_0 r_1 r_2 \11/ r_1)) - (LE : pco_2 <11= (paco11_3_2 r_0 r_1 r_2 \11/ r_2)) - (SIM: gf_0 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) -with paco11_3_1( r_0 r_1 r_2: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : Prop := -| paco11_3_1_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <11= (paco11_3_0 r_0 r_1 r_2 \11/ r_0)) - (LE : pco_1 <11= (paco11_3_1 r_0 r_1 r_2 \11/ r_1)) - (LE : pco_2 <11= (paco11_3_2 r_0 r_1 r_2 \11/ r_2)) - (SIM: gf_1 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) -with paco11_3_2( r_0 r_1 r_2: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : Prop := -| paco11_3_2_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <11= (paco11_3_0 r_0 r_1 r_2 \11/ r_0)) - (LE : pco_1 <11= (paco11_3_1 r_0 r_1 r_2 \11/ r_1)) - (LE : pco_2 <11= (paco11_3_2 r_0 r_1 r_2 \11/ r_2)) - (SIM: gf_2 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) -. +Definition paco11_3_0( r_0 r_1 r_2: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 := + curry11 (paco_3_0 (fun R0 R1 R2 => uncurry11 (gf_0 (curry11 R0) (curry11 R1) (curry11 R2))) (fun R0 R1 R2 => uncurry11 (gf_1 (curry11 R0) (curry11 R1) (curry11 R2))) (fun R0 R1 R2 => uncurry11 (gf_2 (curry11 R0) (curry11 R1) (curry11 R2))) (uncurry11 r_0) (uncurry11 r_1) (uncurry11 r_2)). + +Definition paco11_3_1( r_0 r_1 r_2: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 := + curry11 (paco_3_1 (fun R0 R1 R2 => uncurry11 (gf_0 (curry11 R0) (curry11 R1) (curry11 R2))) (fun R0 R1 R2 => uncurry11 (gf_1 (curry11 R0) (curry11 R1) (curry11 R2))) (fun R0 R1 R2 => uncurry11 (gf_2 (curry11 R0) (curry11 R1) (curry11 R2))) (uncurry11 r_0) (uncurry11 r_1) (uncurry11 r_2)). + +Definition paco11_3_2( r_0 r_1 r_2: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 := + curry11 (paco_3_2 (fun R0 R1 R2 => uncurry11 (gf_0 (curry11 R0) (curry11 R1) (curry11 R2))) (fun R0 R1 R2 => uncurry11 (gf_1 (curry11 R0) (curry11 R1) (curry11 R2))) (fun R0 R1 R2 => uncurry11 (gf_2 (curry11 R0) (curry11 R1) (curry11 R2))) (uncurry11 r_0) (uncurry11 r_1) (uncurry11 r_2)). + Definition upaco11_3_0( r_0 r_1 r_2: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) := paco11_3_0 r_0 r_1 r_2 \11/ r_0. Definition upaco11_3_1( r_0 r_1 r_2: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) := paco11_3_1 r_0 r_1 r_2 \11/ r_1. Definition upaco11_3_2( r_0 r_1 r_2: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) := paco11_3_2 r_0 r_1 r_2 \11/ r_2. End Arg11_3_def. -Arguments paco11_3_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments upaco11_3_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. +Arguments paco11_3_0 : clear implicits. +Arguments upaco11_3_0 : clear implicits. Hint Unfold upaco11_3_0. -Arguments paco11_3_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments upaco11_3_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. +Arguments paco11_3_1 : clear implicits. +Arguments upaco11_3_1 : clear implicits. Hint Unfold upaco11_3_1. -Arguments paco11_3_2 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments upaco11_3_2 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. +Arguments paco11_3_2 : clear implicits. +Arguments upaco11_3_2 : clear implicits. Hint Unfold upaco11_3_2. -(* Less than or equal - internal use only *) -Notation "p <_paco_11= q" := - (forall _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 _paco_x10 (PR: p _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 _paco_x10 : Prop), q _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 _paco_x10 : Prop) - (at level 50, no associativity). - (** 1 Mutual Coinduction *) Section Arg11_1. -Definition monotone11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 (gf: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) := +Definition monotone11 (gf: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 r r' (IN: gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (LE: r <11= r'), gf r' x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. +Definition _monotone11 (gf: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) := + forall r r'(LE: r <11= r'), gf r <11== gf r'. + +Lemma monotone11_eq (gf: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) : + monotone11 gf <-> _monotone11 gf. +Proof. unfold monotone11, _monotone11, le11. split; eauto. Qed. + +Lemma monotone11_map (gf: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) + (MON: _monotone11 gf) : + _monotone (fun R0 => uncurry11 (gf (curry11 R0))). +Proof. + repeat_intros 3. apply uncurry_map11. apply MON; apply curry_map11; auto. +Qed. + Variable gf : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10. Arguments gf : clear implicits. +Theorem _paco11_mon: _monotone11 (paco11 gf). +Proof. + repeat_intros 3. eapply curry_map11, _paco_mon; apply uncurry_map11; auto. +Qed. + +Theorem _paco11_acc: forall + l r (OBG: forall rr (INC: r <11== rr) (CIH: l <11== rr), l <11== paco11 gf rr), + l <11== paco11 gf r. +Proof. + intros. apply uncurry_adjoint1_11. + eapply _paco_acc. intros. + apply uncurry_adjoint1_11 in INC. apply uncurry_adjoint1_11 in CIH. + apply uncurry_adjoint2_11. + eapply le11_trans. eapply (OBG _ INC CIH). + apply curry_map11. + apply _paco_mon; try apply le1_refl; apply curry_bij1_11. +Qed. + +Theorem _paco11_mult_strong: forall r, + paco11 gf (upaco11 gf r) <11== paco11 gf r. +Proof. + intros. apply curry_map11. + eapply le1_trans; [| eapply _paco_mult_strong]. + apply _paco_mon; intros []; eauto. +Qed. + +Theorem _paco11_fold: forall r, + gf (upaco11 gf r) <11== paco11 gf r. +Proof. + intros. apply uncurry_adjoint1_11. + eapply le1_trans; [| apply _paco_fold]. apply le1_refl. +Qed. + +Theorem _paco11_unfold: forall (MON: _monotone11 gf) r, + paco11 gf r <11== gf (upaco11 gf r). +Proof. + intros. apply curry_adjoint2_11. + eapply _paco_unfold; apply monotone11_map; auto. +Qed. + Theorem paco11_acc: forall - l r (OBG: forall rr (INC: r <11= rr) (CIH: l <_paco_11= rr), l <_paco_11= paco11 gf rr), + l r (OBG: forall rr (INC: r <11= rr) (CIH: l <11= rr), l <11= paco11 gf rr), l <11= paco11 gf r. Proof. - intros; assert (SIM: paco11 gf (r \11/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) by eauto. - clear PR; repeat (try left; do 12 paco_revert; paco_cofix_auto). + apply _paco11_acc. Qed. Theorem paco11_mon: monotone11 (paco11 gf). -Proof. paco_cofix_auto; repeat (left; do 12 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone11_eq. + apply _paco11_mon. +Qed. Theorem paco11_mult_strong: forall r, paco11 gf (upaco11 gf r) <11= paco11 gf r. -Proof. paco_cofix_auto; repeat (left; do 12 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco11_mult_strong. +Qed. Corollary paco11_mult: forall r, paco11 gf (paco11 gf r) <11= paco11 gf r. @@ -165,25 +241,26 @@ Proof. intros; eapply paco11_mult_strong, paco11_mon; eauto. Qed. Theorem paco11_fold: forall r, gf (upaco11 gf r) <11= paco11 gf r. -Proof. intros; econstructor; [ |eauto]; eauto. Qed. +Proof. + apply _paco11_fold. +Qed. Theorem paco11_unfold: forall (MON: monotone11 gf) r, paco11 gf r <11= gf (upaco11 gf r). -Proof. unfold monotone11; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 1. eapply _paco11_unfold; apply monotone11_eq; auto. +Qed. End Arg11_1. -Hint Unfold monotone11. -Hint Resolve paco11_fold. - -Arguments paco11_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. +Arguments paco11_acc : clear implicits. +Arguments paco11_mon : clear implicits. +Arguments paco11_mult_strong : clear implicits. +Arguments paco11_mult : clear implicits. +Arguments paco11_fold : clear implicits. +Arguments paco11_unfold : clear implicits. -Instance paco11_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 (gf : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10->_) r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : paco_class (paco11 gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) := +Global Instance paco11_inst (gf : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10->_) r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : paco_class (paco11 gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) := { pacoacc := paco11_acc gf; pacomult := paco11_mult gf; pacofold := paco11_fold gf; @@ -193,53 +270,144 @@ Instance paco11_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 (gf : rel11 T0 T1 T2 T3 Section Arg11_2. -Definition monotone11_2 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 (gf: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) := +Definition monotone11_2 (gf: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (LE_0: r_0 <11= r'_0)(LE_1: r_1 <11= r'_1), gf r'_0 r'_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. +Definition _monotone11_2 (gf: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <11= r'_0)(LE_1: r_1 <11= r'_1), gf r_0 r_1 <11== gf r'_0 r'_1. + +Lemma monotone11_2_eq (gf: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) : + monotone11_2 gf <-> _monotone11_2 gf. +Proof. unfold monotone11_2, _monotone11_2, le11. split; eauto. Qed. + +Lemma monotone11_2_map (gf: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) + (MON: _monotone11_2 gf) : + _monotone_2 (fun R0 R1 => uncurry11 (gf (curry11 R0) (curry11 R1))). +Proof. + repeat_intros 6. apply uncurry_map11. apply MON; apply curry_map11; auto. +Qed. + Variable gf_0 gf_1 : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. +Theorem _paco11_2_0_mon: _monotone11_2 (paco11_2_0 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map11, _paco_2_0_mon; apply uncurry_map11; auto. +Qed. + +Theorem _paco11_2_1_mon: _monotone11_2 (paco11_2_1 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map11, _paco_2_1_mon; apply uncurry_map11; auto. +Qed. + +Theorem _paco11_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <11== rr) (CIH: l <11== rr), l <11== paco11_2_0 gf_0 gf_1 rr r_1), + l <11== paco11_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_11. + eapply _paco_2_0_acc. intros. + apply uncurry_adjoint1_11 in INC. apply uncurry_adjoint1_11 in CIH. + apply uncurry_adjoint2_11. + eapply le11_trans. eapply (OBG _ INC CIH). + apply curry_map11. + apply _paco_2_0_mon; try apply le1_refl; apply curry_bij1_11. +Qed. + +Theorem _paco11_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <11== rr) (CIH: l <11== rr), l <11== paco11_2_1 gf_0 gf_1 r_0 rr), + l <11== paco11_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_11. + eapply _paco_2_1_acc. intros. + apply uncurry_adjoint1_11 in INC. apply uncurry_adjoint1_11 in CIH. + apply uncurry_adjoint2_11. + eapply le11_trans. eapply (OBG _ INC CIH). + apply curry_map11. + apply _paco_2_1_mon; try apply le1_refl; apply curry_bij1_11. +Qed. + +Theorem _paco11_2_0_mult_strong: forall r_0 r_1, + paco11_2_0 gf_0 gf_1 (upaco11_2_0 gf_0 gf_1 r_0 r_1) (upaco11_2_1 gf_0 gf_1 r_0 r_1) <11== paco11_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map11. + eapply le1_trans; [| eapply _paco_2_0_mult_strong]. + apply _paco_2_0_mon; intros []; eauto. +Qed. + +Theorem _paco11_2_1_mult_strong: forall r_0 r_1, + paco11_2_1 gf_0 gf_1 (upaco11_2_0 gf_0 gf_1 r_0 r_1) (upaco11_2_1 gf_0 gf_1 r_0 r_1) <11== paco11_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map11. + eapply le1_trans; [| eapply _paco_2_1_mult_strong]. + apply _paco_2_1_mon; intros []; eauto. +Qed. + +Theorem _paco11_2_0_fold: forall r_0 r_1, + gf_0 (upaco11_2_0 gf_0 gf_1 r_0 r_1) (upaco11_2_1 gf_0 gf_1 r_0 r_1) <11== paco11_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_11. + eapply le1_trans; [| apply _paco_2_0_fold]. apply le1_refl. +Qed. + +Theorem _paco11_2_1_fold: forall r_0 r_1, + gf_1 (upaco11_2_0 gf_0 gf_1 r_0 r_1) (upaco11_2_1 gf_0 gf_1 r_0 r_1) <11== paco11_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_11. + eapply le1_trans; [| apply _paco_2_1_fold]. apply le1_refl. +Qed. + +Theorem _paco11_2_0_unfold: forall (MON: _monotone11_2 gf_0) (MON: _monotone11_2 gf_1) r_0 r_1, + paco11_2_0 gf_0 gf_1 r_0 r_1 <11== gf_0 (upaco11_2_0 gf_0 gf_1 r_0 r_1) (upaco11_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_11. + eapply _paco_2_0_unfold; apply monotone11_2_map; auto. +Qed. + +Theorem _paco11_2_1_unfold: forall (MON: _monotone11_2 gf_0) (MON: _monotone11_2 gf_1) r_0 r_1, + paco11_2_1 gf_0 gf_1 r_0 r_1 <11== gf_1 (upaco11_2_0 gf_0 gf_1 r_0 r_1) (upaco11_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_11. + eapply _paco_2_1_unfold; apply monotone11_2_map; auto. +Qed. + Theorem paco11_2_0_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_0 <11= rr) (CIH: l <_paco_11= rr), l <_paco_11= paco11_2_0 gf_0 gf_1 rr r_1), + l r_0 r_1 (OBG: forall rr (INC: r_0 <11= rr) (CIH: l <11= rr), l <11= paco11_2_0 gf_0 gf_1 rr r_1), l <11= paco11_2_0 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco11_2_0 gf_0 gf_1 (r_0 \11/ l) r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) by eauto. - clear PR; repeat (try left; do 12 paco_revert; paco_cofix_auto). + apply _paco11_2_0_acc. Qed. Theorem paco11_2_1_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_1 <11= rr) (CIH: l <_paco_11= rr), l <_paco_11= paco11_2_1 gf_0 gf_1 r_0 rr), + l r_0 r_1 (OBG: forall rr (INC: r_1 <11= rr) (CIH: l <11= rr), l <11= paco11_2_1 gf_0 gf_1 r_0 rr), l <11= paco11_2_1 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco11_2_1 gf_0 gf_1 r_0 (r_1 \11/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) by eauto. - clear PR; repeat (try left; do 12 paco_revert; paco_cofix_auto). + apply _paco11_2_1_acc. Qed. Theorem paco11_2_0_mon: monotone11_2 (paco11_2_0 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 12 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone11_2_eq. + apply _paco11_2_0_mon. +Qed. Theorem paco11_2_1_mon: monotone11_2 (paco11_2_1 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 12 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone11_2_eq. + apply _paco11_2_1_mon. +Qed. Theorem paco11_2_0_mult_strong: forall r_0 r_1, paco11_2_0 gf_0 gf_1 (upaco11_2_0 gf_0 gf_1 r_0 r_1) (upaco11_2_1 gf_0 gf_1 r_0 r_1) <11= paco11_2_0 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 12 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco11_2_0_mult_strong. +Qed. Theorem paco11_2_1_mult_strong: forall r_0 r_1, paco11_2_1 gf_0 gf_1 (upaco11_2_0 gf_0 gf_1 r_0 r_1) (upaco11_2_1 gf_0 gf_1 r_0 r_1) <11= paco11_2_1 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 12 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco11_2_1_mult_strong. +Qed. Corollary paco11_2_0_mult: forall r_0 r_1, paco11_2_0 gf_0 gf_1 (paco11_2_0 gf_0 gf_1 r_0 r_1) (paco11_2_1 gf_0 gf_1 r_0 r_1) <11= paco11_2_0 gf_0 gf_1 r_0 r_1. @@ -251,46 +419,50 @@ Proof. intros; eapply paco11_2_1_mult_strong, paco11_2_1_mon; eauto. Qed. Theorem paco11_2_0_fold: forall r_0 r_1, gf_0 (upaco11_2_0 gf_0 gf_1 r_0 r_1) (upaco11_2_1 gf_0 gf_1 r_0 r_1) <11= paco11_2_0 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco11_2_0_fold. +Qed. Theorem paco11_2_1_fold: forall r_0 r_1, gf_1 (upaco11_2_0 gf_0 gf_1 r_0 r_1) (upaco11_2_1 gf_0 gf_1 r_0 r_1) <11= paco11_2_1 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco11_2_1_fold. +Qed. Theorem paco11_2_0_unfold: forall (MON: monotone11_2 gf_0) (MON: monotone11_2 gf_1) r_0 r_1, paco11_2_0 gf_0 gf_1 r_0 r_1 <11= gf_0 (upaco11_2_0 gf_0 gf_1 r_0 r_1) (upaco11_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone11_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco11_2_0_unfold; apply monotone11_2_eq; auto. +Qed. Theorem paco11_2_1_unfold: forall (MON: monotone11_2 gf_0) (MON: monotone11_2 gf_1) r_0 r_1, paco11_2_1 gf_0 gf_1 r_0 r_1 <11= gf_1 (upaco11_2_0 gf_0 gf_1 r_0 r_1) (upaco11_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone11_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco11_2_1_unfold; apply monotone11_2_eq; auto. +Qed. End Arg11_2. -Hint Unfold monotone11_2. -Hint Resolve paco11_2_0_fold. -Hint Resolve paco11_2_1_fold. - -Arguments paco11_2_0_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_2_1_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_2_0_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_2_1_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_2_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_2_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_2_0_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_2_1_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_2_0_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_2_1_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_2_0_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_2_1_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. - -Instance paco11_2_0_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 (gf_0 gf_1 : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : paco_class (paco11_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) := +Arguments paco11_2_0_acc : clear implicits. +Arguments paco11_2_1_acc : clear implicits. +Arguments paco11_2_0_mon : clear implicits. +Arguments paco11_2_1_mon : clear implicits. +Arguments paco11_2_0_mult_strong : clear implicits. +Arguments paco11_2_1_mult_strong : clear implicits. +Arguments paco11_2_0_mult : clear implicits. +Arguments paco11_2_1_mult : clear implicits. +Arguments paco11_2_0_fold : clear implicits. +Arguments paco11_2_1_fold : clear implicits. +Arguments paco11_2_0_unfold : clear implicits. +Arguments paco11_2_1_unfold : clear implicits. + +Global Instance paco11_2_0_inst (gf_0 gf_1 : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : paco_class (paco11_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) := { pacoacc := paco11_2_0_acc gf_0 gf_1; pacomult := paco11_2_0_mult gf_0 gf_1; pacofold := paco11_2_0_fold gf_0 gf_1; pacounfold := paco11_2_0_unfold gf_0 gf_1 }. -Instance paco11_2_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 (gf_0 gf_1 : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : paco_class (paco11_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) := +Global Instance paco11_2_1_inst (gf_0 gf_1 : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : paco_class (paco11_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) := { pacoacc := paco11_2_1_acc gf_0 gf_1; pacomult := paco11_2_1_mult gf_0 gf_1; pacofold := paco11_2_1_fold gf_0 gf_1; @@ -300,69 +472,204 @@ Instance paco11_2_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 (gf_0 gf_1 : rel11 T Section Arg11_3. -Definition monotone11_3 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 (gf: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) := +Definition monotone11_3 (gf: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (LE_0: r_0 <11= r'_0)(LE_1: r_1 <11= r'_1)(LE_2: r_2 <11= r'_2), gf r'_0 r'_1 r'_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. +Definition _monotone11_3 (gf: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <11= r'_0)(LE_1: r_1 <11= r'_1)(LE_2: r_2 <11= r'_2), gf r_0 r_1 r_2 <11== gf r'_0 r'_1 r'_2. + +Lemma monotone11_3_eq (gf: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) : + monotone11_3 gf <-> _monotone11_3 gf. +Proof. unfold monotone11_3, _monotone11_3, le11. split; eauto. Qed. + +Lemma monotone11_3_map (gf: rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) + (MON: _monotone11_3 gf) : + _monotone_3 (fun R0 R1 R2 => uncurry11 (gf (curry11 R0) (curry11 R1) (curry11 R2))). +Proof. + repeat_intros 9. apply uncurry_map11. apply MON; apply curry_map11; auto. +Qed. + Variable gf_0 gf_1 gf_2 : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 -> rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. +Theorem _paco11_3_0_mon: _monotone11_3 (paco11_3_0 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map11, _paco_3_0_mon; apply uncurry_map11; auto. +Qed. + +Theorem _paco11_3_1_mon: _monotone11_3 (paco11_3_1 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map11, _paco_3_1_mon; apply uncurry_map11; auto. +Qed. + +Theorem _paco11_3_2_mon: _monotone11_3 (paco11_3_2 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map11, _paco_3_2_mon; apply uncurry_map11; auto. +Qed. + +Theorem _paco11_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <11== rr) (CIH: l <11== rr), l <11== paco11_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <11== paco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_11. + eapply _paco_3_0_acc. intros. + apply uncurry_adjoint1_11 in INC. apply uncurry_adjoint1_11 in CIH. + apply uncurry_adjoint2_11. + eapply le11_trans. eapply (OBG _ INC CIH). + apply curry_map11. + apply _paco_3_0_mon; try apply le1_refl; apply curry_bij1_11. +Qed. + +Theorem _paco11_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <11== rr) (CIH: l <11== rr), l <11== paco11_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <11== paco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_11. + eapply _paco_3_1_acc. intros. + apply uncurry_adjoint1_11 in INC. apply uncurry_adjoint1_11 in CIH. + apply uncurry_adjoint2_11. + eapply le11_trans. eapply (OBG _ INC CIH). + apply curry_map11. + apply _paco_3_1_mon; try apply le1_refl; apply curry_bij1_11. +Qed. + +Theorem _paco11_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <11== rr) (CIH: l <11== rr), l <11== paco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <11== paco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_11. + eapply _paco_3_2_acc. intros. + apply uncurry_adjoint1_11 in INC. apply uncurry_adjoint1_11 in CIH. + apply uncurry_adjoint2_11. + eapply le11_trans. eapply (OBG _ INC CIH). + apply curry_map11. + apply _paco_3_2_mon; try apply le1_refl; apply curry_bij1_11. +Qed. + +Theorem _paco11_3_0_mult_strong: forall r_0 r_1 r_2, + paco11_3_0 gf_0 gf_1 gf_2 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <11== paco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map11. + eapply le1_trans; [| eapply _paco_3_0_mult_strong]. + apply _paco_3_0_mon; intros []; eauto. +Qed. + +Theorem _paco11_3_1_mult_strong: forall r_0 r_1 r_2, + paco11_3_1 gf_0 gf_1 gf_2 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <11== paco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map11. + eapply le1_trans; [| eapply _paco_3_1_mult_strong]. + apply _paco_3_1_mon; intros []; eauto. +Qed. + +Theorem _paco11_3_2_mult_strong: forall r_0 r_1 r_2, + paco11_3_2 gf_0 gf_1 gf_2 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <11== paco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map11. + eapply le1_trans; [| eapply _paco_3_2_mult_strong]. + apply _paco_3_2_mon; intros []; eauto. +Qed. + +Theorem _paco11_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <11== paco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_11. + eapply le1_trans; [| apply _paco_3_0_fold]. apply le1_refl. +Qed. + +Theorem _paco11_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <11== paco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_11. + eapply le1_trans; [| apply _paco_3_1_fold]. apply le1_refl. +Qed. + +Theorem _paco11_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <11== paco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_11. + eapply le1_trans; [| apply _paco_3_2_fold]. apply le1_refl. +Qed. + +Theorem _paco11_3_0_unfold: forall (MON: _monotone11_3 gf_0) (MON: _monotone11_3 gf_1) (MON: _monotone11_3 gf_2) r_0 r_1 r_2, + paco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <11== gf_0 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_11. + eapply _paco_3_0_unfold; apply monotone11_3_map; auto. +Qed. + +Theorem _paco11_3_1_unfold: forall (MON: _monotone11_3 gf_0) (MON: _monotone11_3 gf_1) (MON: _monotone11_3 gf_2) r_0 r_1 r_2, + paco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <11== gf_1 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_11. + eapply _paco_3_1_unfold; apply monotone11_3_map; auto. +Qed. + +Theorem _paco11_3_2_unfold: forall (MON: _monotone11_3 gf_0) (MON: _monotone11_3 gf_1) (MON: _monotone11_3 gf_2) r_0 r_1 r_2, + paco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <11== gf_2 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_11. + eapply _paco_3_2_unfold; apply monotone11_3_map; auto. +Qed. + Theorem paco11_3_0_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <11= rr) (CIH: l <_paco_11= rr), l <_paco_11= paco11_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <11= rr) (CIH: l <11= rr), l <11= paco11_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), l <11= paco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco11_3_0 gf_0 gf_1 gf_2 (r_0 \11/ l) r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) by eauto. - clear PR; repeat (try left; do 12 paco_revert; paco_cofix_auto). + apply _paco11_3_0_acc. Qed. Theorem paco11_3_1_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <11= rr) (CIH: l <_paco_11= rr), l <_paco_11= paco11_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <11= rr) (CIH: l <11= rr), l <11= paco11_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), l <11= paco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco11_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \11/ l) r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) by eauto. - clear PR; repeat (try left; do 12 paco_revert; paco_cofix_auto). + apply _paco11_3_1_acc. Qed. Theorem paco11_3_2_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <11= rr) (CIH: l <_paco_11= rr), l <_paco_11= paco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <11= rr) (CIH: l <11= rr), l <11= paco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), l <11= paco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \11/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) by eauto. - clear PR; repeat (try left; do 12 paco_revert; paco_cofix_auto). + apply _paco11_3_2_acc. Qed. Theorem paco11_3_0_mon: monotone11_3 (paco11_3_0 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 12 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone11_3_eq. + apply _paco11_3_0_mon. +Qed. Theorem paco11_3_1_mon: monotone11_3 (paco11_3_1 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 12 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone11_3_eq. + apply _paco11_3_1_mon. +Qed. Theorem paco11_3_2_mon: monotone11_3 (paco11_3_2 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 12 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone11_3_eq. + apply _paco11_3_2_mon. +Qed. Theorem paco11_3_0_mult_strong: forall r_0 r_1 r_2, paco11_3_0 gf_0 gf_1 gf_2 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <11= paco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 12 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco11_3_0_mult_strong. +Qed. Theorem paco11_3_1_mult_strong: forall r_0 r_1 r_2, paco11_3_1 gf_0 gf_1 gf_2 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <11= paco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 12 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco11_3_1_mult_strong. +Qed. Theorem paco11_3_2_mult_strong: forall r_0 r_1 r_2, paco11_3_2 gf_0 gf_1 gf_2 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <11= paco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 12 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco11_3_2_mult_strong. +Qed. Corollary paco11_3_0_mult: forall r_0 r_1 r_2, paco11_3_0 gf_0 gf_1 gf_2 (paco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <11= paco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. @@ -378,69 +685,105 @@ Proof. intros; eapply paco11_3_2_mult_strong, paco11_3_2_mon; eauto. Qed. Theorem paco11_3_0_fold: forall r_0 r_1 r_2, gf_0 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <11= paco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco11_3_0_fold. +Qed. Theorem paco11_3_1_fold: forall r_0 r_1 r_2, gf_1 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <11= paco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco11_3_1_fold. +Qed. Theorem paco11_3_2_fold: forall r_0 r_1 r_2, gf_2 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <11= paco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco11_3_2_fold. +Qed. Theorem paco11_3_0_unfold: forall (MON: monotone11_3 gf_0) (MON: monotone11_3 gf_1) (MON: monotone11_3 gf_2) r_0 r_1 r_2, paco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <11= gf_0 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone11_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco11_3_0_unfold; apply monotone11_3_eq; auto. +Qed. Theorem paco11_3_1_unfold: forall (MON: monotone11_3 gf_0) (MON: monotone11_3 gf_1) (MON: monotone11_3 gf_2) r_0 r_1 r_2, paco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <11= gf_1 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone11_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco11_3_1_unfold; apply monotone11_3_eq; auto. +Qed. Theorem paco11_3_2_unfold: forall (MON: monotone11_3 gf_0) (MON: monotone11_3 gf_1) (MON: monotone11_3 gf_2) r_0 r_1 r_2, paco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <11= gf_2 (upaco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone11_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco11_3_2_unfold; apply monotone11_3_eq; auto. +Qed. End Arg11_3. -Hint Unfold monotone11_3. -Hint Resolve paco11_3_0_fold. -Hint Resolve paco11_3_1_fold. -Hint Resolve paco11_3_2_fold. - -Arguments paco11_3_0_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_1_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_2_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_0_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_1_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_2_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_2_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_0_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_1_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_2_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_0_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_1_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_2_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_0_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_1_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. -Arguments paco11_3_2_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 ]. - -Instance paco11_3_0_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 (gf_0 gf_1 gf_2 : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : paco_class (paco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) := +Arguments paco11_3_0_acc : clear implicits. +Arguments paco11_3_1_acc : clear implicits. +Arguments paco11_3_2_acc : clear implicits. +Arguments paco11_3_0_mon : clear implicits. +Arguments paco11_3_1_mon : clear implicits. +Arguments paco11_3_2_mon : clear implicits. +Arguments paco11_3_0_mult_strong : clear implicits. +Arguments paco11_3_1_mult_strong : clear implicits. +Arguments paco11_3_2_mult_strong : clear implicits. +Arguments paco11_3_0_mult : clear implicits. +Arguments paco11_3_1_mult : clear implicits. +Arguments paco11_3_2_mult : clear implicits. +Arguments paco11_3_0_fold : clear implicits. +Arguments paco11_3_1_fold : clear implicits. +Arguments paco11_3_2_fold : clear implicits. +Arguments paco11_3_0_unfold : clear implicits. +Arguments paco11_3_1_unfold : clear implicits. +Arguments paco11_3_2_unfold : clear implicits. + +Global Instance paco11_3_0_inst (gf_0 gf_1 gf_2 : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : paco_class (paco11_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) := { pacoacc := paco11_3_0_acc gf_0 gf_1 gf_2; pacomult := paco11_3_0_mult gf_0 gf_1 gf_2; pacofold := paco11_3_0_fold gf_0 gf_1 gf_2; pacounfold := paco11_3_0_unfold gf_0 gf_1 gf_2 }. -Instance paco11_3_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 (gf_0 gf_1 gf_2 : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : paco_class (paco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) := +Global Instance paco11_3_1_inst (gf_0 gf_1 gf_2 : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : paco_class (paco11_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) := { pacoacc := paco11_3_1_acc gf_0 gf_1 gf_2; pacomult := paco11_3_1_mult gf_0 gf_1 gf_2; pacofold := paco11_3_1_fold gf_0 gf_1 gf_2; pacounfold := paco11_3_1_unfold gf_0 gf_1 gf_2 }. -Instance paco11_3_2_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 (gf_0 gf_1 gf_2 : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : paco_class (paco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) := +Global Instance paco11_3_2_inst (gf_0 gf_1 gf_2 : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : paco_class (paco11_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) := { pacoacc := paco11_3_2_acc gf_0 gf_1 gf_2; pacomult := paco11_3_2_mult gf_0 gf_1 gf_2; pacofold := paco11_3_2_fold gf_0 gf_1 gf_2; pacounfold := paco11_3_2_unfold gf_0 gf_1 gf_2 }. +End PACO11. + +Global Opaque paco11. + +Hint Unfold upaco11. +Hint Resolve paco11_fold. +Hint Unfold monotone11. + +Global Opaque paco11_2_0. +Global Opaque paco11_2_1. + +Hint Unfold upaco11_2_0. +Hint Unfold upaco11_2_1. +Hint Resolve paco11_2_0_fold. +Hint Resolve paco11_2_1_fold. +Hint Unfold monotone11_2. + +Global Opaque paco11_3_0. +Global Opaque paco11_3_1. +Global Opaque paco11_3_2. + +Hint Unfold upaco11_3_0. +Hint Unfold upaco11_3_1. +Hint Unfold upaco11_3_2. +Hint Resolve paco11_3_0_fold. +Hint Resolve paco11_3_1_fold. +Hint Resolve paco11_3_2_fold. +Hint Unfold monotone11_3. + diff --git a/src/paco12.v b/src/paco12.v index 697f596..25b8d26 100644 --- a/src/paco12.v +++ b/src/paco12.v @@ -1,11 +1,9 @@ Require Export paconotation pacotacuser. -Require Import pacotac. +Require Import paconotation_internal pacotac pacon. Set Implicit Arguments. -(** ** Predicates of Arity 12 -*) +Section PACO12. -Section Arg12_def. Variable T0 : Type. Variable T1 : forall (x0: @T0), Type. Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. @@ -18,150 +16,226 @@ Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) ( Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. + +Record sig12T := + exist12T { + proj12T0: @T0; + proj12T1: @T1 proj12T0; + proj12T2: @T2 proj12T0 proj12T1; + proj12T3: @T3 proj12T0 proj12T1 proj12T2; + proj12T4: @T4 proj12T0 proj12T1 proj12T2 proj12T3; + proj12T5: @T5 proj12T0 proj12T1 proj12T2 proj12T3 proj12T4; + proj12T6: @T6 proj12T0 proj12T1 proj12T2 proj12T3 proj12T4 proj12T5; + proj12T7: @T7 proj12T0 proj12T1 proj12T2 proj12T3 proj12T4 proj12T5 proj12T6; + proj12T8: @T8 proj12T0 proj12T1 proj12T2 proj12T3 proj12T4 proj12T5 proj12T6 proj12T7; + proj12T9: @T9 proj12T0 proj12T1 proj12T2 proj12T3 proj12T4 proj12T5 proj12T6 proj12T7 proj12T8; + proj12T10: @T10 proj12T0 proj12T1 proj12T2 proj12T3 proj12T4 proj12T5 proj12T6 proj12T7 proj12T8 proj12T9; + proj12T11: @T11 proj12T0 proj12T1 proj12T2 proj12T3 proj12T4 proj12T5 proj12T6 proj12T7 proj12T8 proj12T9 proj12T10; + }. + +Definition uncurry12 (R: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11): rel1 sig12T := fun x => R (proj12T0 x) (proj12T1 x) (proj12T2 x) (proj12T3 x) (proj12T4 x) (proj12T5 x) (proj12T6 x) (proj12T7 x) (proj12T8 x) (proj12T9 x) (proj12T10 x) (proj12T11 x). + +Definition curry12 (R: rel1 sig12T): rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 := + fun x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 => R (exist12T x11). + +Lemma uncurry_map12 r0 r1 (LE : r0 <12== r1) : uncurry12 r0 <1== uncurry12 r1. +Proof. intros [] H. apply LE. auto. Qed. + +Lemma uncurry_map_rev12 r0 r1 (LE: uncurry12 r0 <1== uncurry12 r1) : r0 <12== r1. +Proof. + repeat_intros 12. intros H. apply (LE (exist12T x11) H). +Qed. + +Lemma curry_map12 r0 r1 (LE: r0 <1== r1) : curry12 r0 <12== curry12 r1. +Proof. + repeat_intros 12. intros H. apply (LE (exist12T x11) H). +Qed. + +Lemma curry_map_rev12 r0 r1 (LE: curry12 r0 <12== curry12 r1) : r0 <1== r1. +Proof. + intros [] H. apply LE. apply H. +Qed. + +Lemma uncurry_bij1_12 r : curry12 (uncurry12 r) <12== r. +Proof. unfold le12. repeat_intros 12; auto. Qed. + +Lemma uncurry_bij2_12 r : r <12== curry12 (uncurry12 r). +Proof. unfold le12. repeat_intros 12; auto. Qed. + +Lemma curry_bij1_12 r : uncurry12 (curry12 r) <1== r. +Proof. intros []; auto. Qed. + +Lemma curry_bij2_12 r : r <1== uncurry12 (curry12 r). +Proof. intros []; auto. Qed. + +Lemma uncurry_adjoint1_12 r0 r1 (LE: uncurry12 r0 <1== r1) : r0 <12== curry12 r1. +Proof. + apply uncurry_map_rev12. eapply le1_trans; [eauto|]. apply curry_bij2_12. +Qed. + +Lemma uncurry_adjoint2_12 r0 r1 (LE: r0 <12== curry12 r1) : uncurry12 r0 <1== r1. +Proof. + apply curry_map_rev12. eapply le12_trans; [|eauto]. apply uncurry_bij2_12. +Qed. + +Lemma curry_adjoint1_12 r0 r1 (LE: curry12 r0 <12== r1) : r0 <1== uncurry12 r1. +Proof. + apply curry_map_rev12. eapply le12_trans; [eauto|]. apply uncurry_bij2_12. +Qed. + +Lemma curry_adjoint2_12 r0 r1 (LE: r0 <1== uncurry12 r1) : curry12 r0 <12== r1. +Proof. + apply uncurry_map_rev12. eapply le1_trans; [|eauto]. apply curry_bij1_12. +Qed. + +(** ** Predicates of Arity 12 +*) + +Section Arg12_def. Variable gf : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11. Arguments gf : clear implicits. -CoInductive paco12( r: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : Prop := -| paco12_pfold pco - (LE : pco <12= (paco12 r \12/ r)) - (SIM: gf pco x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) -. +Definition paco12( r: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 := + curry12 (paco (fun R0 => uncurry12 (gf (curry12 R0))) (uncurry12 r)). + Definition upaco12( r: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) := paco12 r \12/ r. End Arg12_def. -Arguments paco12 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments upaco12 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. +Arguments paco12 : clear implicits. +Arguments upaco12 : clear implicits. Hint Unfold upaco12. Section Arg12_2_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. Variable gf_0 gf_1 : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. -CoInductive paco12_2_0( r_0 r_1: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : Prop := -| paco12_2_0_pfold pco_0 pco_1 - (LE : pco_0 <12= (paco12_2_0 r_0 r_1 \12/ r_0)) - (LE : pco_1 <12= (paco12_2_1 r_0 r_1 \12/ r_1)) - (SIM: gf_0 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) -with paco12_2_1( r_0 r_1: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : Prop := -| paco12_2_1_pfold pco_0 pco_1 - (LE : pco_0 <12= (paco12_2_0 r_0 r_1 \12/ r_0)) - (LE : pco_1 <12= (paco12_2_1 r_0 r_1 \12/ r_1)) - (SIM: gf_1 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) -. +Definition paco12_2_0( r_0 r_1: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 := + curry12 (paco_2_0 (fun R0 R1 => uncurry12 (gf_0 (curry12 R0) (curry12 R1))) (fun R0 R1 => uncurry12 (gf_1 (curry12 R0) (curry12 R1))) (uncurry12 r_0) (uncurry12 r_1)). + +Definition paco12_2_1( r_0 r_1: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 := + curry12 (paco_2_1 (fun R0 R1 => uncurry12 (gf_0 (curry12 R0) (curry12 R1))) (fun R0 R1 => uncurry12 (gf_1 (curry12 R0) (curry12 R1))) (uncurry12 r_0) (uncurry12 r_1)). + Definition upaco12_2_0( r_0 r_1: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) := paco12_2_0 r_0 r_1 \12/ r_0. Definition upaco12_2_1( r_0 r_1: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) := paco12_2_1 r_0 r_1 \12/ r_1. End Arg12_2_def. -Arguments paco12_2_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments upaco12_2_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. +Arguments paco12_2_0 : clear implicits. +Arguments upaco12_2_0 : clear implicits. Hint Unfold upaco12_2_0. -Arguments paco12_2_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments upaco12_2_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. +Arguments paco12_2_1 : clear implicits. +Arguments upaco12_2_1 : clear implicits. Hint Unfold upaco12_2_1. Section Arg12_3_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. Variable gf_0 gf_1 gf_2 : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. -CoInductive paco12_3_0( r_0 r_1 r_2: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : Prop := -| paco12_3_0_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <12= (paco12_3_0 r_0 r_1 r_2 \12/ r_0)) - (LE : pco_1 <12= (paco12_3_1 r_0 r_1 r_2 \12/ r_1)) - (LE : pco_2 <12= (paco12_3_2 r_0 r_1 r_2 \12/ r_2)) - (SIM: gf_0 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) -with paco12_3_1( r_0 r_1 r_2: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : Prop := -| paco12_3_1_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <12= (paco12_3_0 r_0 r_1 r_2 \12/ r_0)) - (LE : pco_1 <12= (paco12_3_1 r_0 r_1 r_2 \12/ r_1)) - (LE : pco_2 <12= (paco12_3_2 r_0 r_1 r_2 \12/ r_2)) - (SIM: gf_1 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) -with paco12_3_2( r_0 r_1 r_2: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : Prop := -| paco12_3_2_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <12= (paco12_3_0 r_0 r_1 r_2 \12/ r_0)) - (LE : pco_1 <12= (paco12_3_1 r_0 r_1 r_2 \12/ r_1)) - (LE : pco_2 <12= (paco12_3_2 r_0 r_1 r_2 \12/ r_2)) - (SIM: gf_2 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) -. +Definition paco12_3_0( r_0 r_1 r_2: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 := + curry12 (paco_3_0 (fun R0 R1 R2 => uncurry12 (gf_0 (curry12 R0) (curry12 R1) (curry12 R2))) (fun R0 R1 R2 => uncurry12 (gf_1 (curry12 R0) (curry12 R1) (curry12 R2))) (fun R0 R1 R2 => uncurry12 (gf_2 (curry12 R0) (curry12 R1) (curry12 R2))) (uncurry12 r_0) (uncurry12 r_1) (uncurry12 r_2)). + +Definition paco12_3_1( r_0 r_1 r_2: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 := + curry12 (paco_3_1 (fun R0 R1 R2 => uncurry12 (gf_0 (curry12 R0) (curry12 R1) (curry12 R2))) (fun R0 R1 R2 => uncurry12 (gf_1 (curry12 R0) (curry12 R1) (curry12 R2))) (fun R0 R1 R2 => uncurry12 (gf_2 (curry12 R0) (curry12 R1) (curry12 R2))) (uncurry12 r_0) (uncurry12 r_1) (uncurry12 r_2)). + +Definition paco12_3_2( r_0 r_1 r_2: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 := + curry12 (paco_3_2 (fun R0 R1 R2 => uncurry12 (gf_0 (curry12 R0) (curry12 R1) (curry12 R2))) (fun R0 R1 R2 => uncurry12 (gf_1 (curry12 R0) (curry12 R1) (curry12 R2))) (fun R0 R1 R2 => uncurry12 (gf_2 (curry12 R0) (curry12 R1) (curry12 R2))) (uncurry12 r_0) (uncurry12 r_1) (uncurry12 r_2)). + Definition upaco12_3_0( r_0 r_1 r_2: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) := paco12_3_0 r_0 r_1 r_2 \12/ r_0. Definition upaco12_3_1( r_0 r_1 r_2: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) := paco12_3_1 r_0 r_1 r_2 \12/ r_1. Definition upaco12_3_2( r_0 r_1 r_2: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) := paco12_3_2 r_0 r_1 r_2 \12/ r_2. End Arg12_3_def. -Arguments paco12_3_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments upaco12_3_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. +Arguments paco12_3_0 : clear implicits. +Arguments upaco12_3_0 : clear implicits. Hint Unfold upaco12_3_0. -Arguments paco12_3_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments upaco12_3_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. +Arguments paco12_3_1 : clear implicits. +Arguments upaco12_3_1 : clear implicits. Hint Unfold upaco12_3_1. -Arguments paco12_3_2 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments upaco12_3_2 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. +Arguments paco12_3_2 : clear implicits. +Arguments upaco12_3_2 : clear implicits. Hint Unfold upaco12_3_2. -(* Less than or equal - internal use only *) -Notation "p <_paco_12= q" := - (forall _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 _paco_x10 _paco_x11 (PR: p _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 _paco_x10 _paco_x11 : Prop), q _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 _paco_x10 _paco_x11 : Prop) - (at level 50, no associativity). - (** 1 Mutual Coinduction *) Section Arg12_1. -Definition monotone12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 (gf: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) := +Definition monotone12 (gf: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 r r' (IN: gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) (LE: r <12= r'), gf r' x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. +Definition _monotone12 (gf: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) := + forall r r'(LE: r <12= r'), gf r <12== gf r'. + +Lemma monotone12_eq (gf: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) : + monotone12 gf <-> _monotone12 gf. +Proof. unfold monotone12, _monotone12, le12. split; eauto. Qed. + +Lemma monotone12_map (gf: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) + (MON: _monotone12 gf) : + _monotone (fun R0 => uncurry12 (gf (curry12 R0))). +Proof. + repeat_intros 3. apply uncurry_map12. apply MON; apply curry_map12; auto. +Qed. + Variable gf : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11. Arguments gf : clear implicits. +Theorem _paco12_mon: _monotone12 (paco12 gf). +Proof. + repeat_intros 3. eapply curry_map12, _paco_mon; apply uncurry_map12; auto. +Qed. + +Theorem _paco12_acc: forall + l r (OBG: forall rr (INC: r <12== rr) (CIH: l <12== rr), l <12== paco12 gf rr), + l <12== paco12 gf r. +Proof. + intros. apply uncurry_adjoint1_12. + eapply _paco_acc. intros. + apply uncurry_adjoint1_12 in INC. apply uncurry_adjoint1_12 in CIH. + apply uncurry_adjoint2_12. + eapply le12_trans. eapply (OBG _ INC CIH). + apply curry_map12. + apply _paco_mon; try apply le1_refl; apply curry_bij1_12. +Qed. + +Theorem _paco12_mult_strong: forall r, + paco12 gf (upaco12 gf r) <12== paco12 gf r. +Proof. + intros. apply curry_map12. + eapply le1_trans; [| eapply _paco_mult_strong]. + apply _paco_mon; intros []; eauto. +Qed. + +Theorem _paco12_fold: forall r, + gf (upaco12 gf r) <12== paco12 gf r. +Proof. + intros. apply uncurry_adjoint1_12. + eapply le1_trans; [| apply _paco_fold]. apply le1_refl. +Qed. + +Theorem _paco12_unfold: forall (MON: _monotone12 gf) r, + paco12 gf r <12== gf (upaco12 gf r). +Proof. + intros. apply curry_adjoint2_12. + eapply _paco_unfold; apply monotone12_map; auto. +Qed. + Theorem paco12_acc: forall - l r (OBG: forall rr (INC: r <12= rr) (CIH: l <_paco_12= rr), l <_paco_12= paco12 gf rr), + l r (OBG: forall rr (INC: r <12= rr) (CIH: l <12= rr), l <12= paco12 gf rr), l <12= paco12 gf r. Proof. - intros; assert (SIM: paco12 gf (r \12/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) by eauto. - clear PR; repeat (try left; do 13 paco_revert; paco_cofix_auto). + apply _paco12_acc. Qed. Theorem paco12_mon: monotone12 (paco12 gf). -Proof. paco_cofix_auto; repeat (left; do 13 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone12_eq. + apply _paco12_mon. +Qed. Theorem paco12_mult_strong: forall r, paco12 gf (upaco12 gf r) <12= paco12 gf r. -Proof. paco_cofix_auto; repeat (left; do 13 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco12_mult_strong. +Qed. Corollary paco12_mult: forall r, paco12 gf (paco12 gf r) <12= paco12 gf r. @@ -169,25 +243,26 @@ Proof. intros; eapply paco12_mult_strong, paco12_mon; eauto. Qed. Theorem paco12_fold: forall r, gf (upaco12 gf r) <12= paco12 gf r. -Proof. intros; econstructor; [ |eauto]; eauto. Qed. +Proof. + apply _paco12_fold. +Qed. Theorem paco12_unfold: forall (MON: monotone12 gf) r, paco12 gf r <12= gf (upaco12 gf r). -Proof. unfold monotone12; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 1. eapply _paco12_unfold; apply monotone12_eq; auto. +Qed. End Arg12_1. -Hint Unfold monotone12. -Hint Resolve paco12_fold. +Arguments paco12_acc : clear implicits. +Arguments paco12_mon : clear implicits. +Arguments paco12_mult_strong : clear implicits. +Arguments paco12_mult : clear implicits. +Arguments paco12_fold : clear implicits. +Arguments paco12_unfold : clear implicits. -Arguments paco12_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. - -Instance paco12_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 (gf : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11->_) r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : paco_class (paco12 gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) := +Global Instance paco12_inst (gf : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11->_) r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : paco_class (paco12 gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) := { pacoacc := paco12_acc gf; pacomult := paco12_mult gf; pacofold := paco12_fold gf; @@ -197,54 +272,144 @@ Instance paco12_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 (gf : rel12 T0 T1 T2 Section Arg12_2. -Definition monotone12_2 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 (gf: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) := +Definition monotone12_2 (gf: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) (LE_0: r_0 <12= r'_0)(LE_1: r_1 <12= r'_1), gf r'_0 r'_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. +Definition _monotone12_2 (gf: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <12= r'_0)(LE_1: r_1 <12= r'_1), gf r_0 r_1 <12== gf r'_0 r'_1. + +Lemma monotone12_2_eq (gf: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) : + monotone12_2 gf <-> _monotone12_2 gf. +Proof. unfold monotone12_2, _monotone12_2, le12. split; eauto. Qed. + +Lemma monotone12_2_map (gf: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) + (MON: _monotone12_2 gf) : + _monotone_2 (fun R0 R1 => uncurry12 (gf (curry12 R0) (curry12 R1))). +Proof. + repeat_intros 6. apply uncurry_map12. apply MON; apply curry_map12; auto. +Qed. + Variable gf_0 gf_1 : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. +Theorem _paco12_2_0_mon: _monotone12_2 (paco12_2_0 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map12, _paco_2_0_mon; apply uncurry_map12; auto. +Qed. + +Theorem _paco12_2_1_mon: _monotone12_2 (paco12_2_1 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map12, _paco_2_1_mon; apply uncurry_map12; auto. +Qed. + +Theorem _paco12_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <12== rr) (CIH: l <12== rr), l <12== paco12_2_0 gf_0 gf_1 rr r_1), + l <12== paco12_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_12. + eapply _paco_2_0_acc. intros. + apply uncurry_adjoint1_12 in INC. apply uncurry_adjoint1_12 in CIH. + apply uncurry_adjoint2_12. + eapply le12_trans. eapply (OBG _ INC CIH). + apply curry_map12. + apply _paco_2_0_mon; try apply le1_refl; apply curry_bij1_12. +Qed. + +Theorem _paco12_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <12== rr) (CIH: l <12== rr), l <12== paco12_2_1 gf_0 gf_1 r_0 rr), + l <12== paco12_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_12. + eapply _paco_2_1_acc. intros. + apply uncurry_adjoint1_12 in INC. apply uncurry_adjoint1_12 in CIH. + apply uncurry_adjoint2_12. + eapply le12_trans. eapply (OBG _ INC CIH). + apply curry_map12. + apply _paco_2_1_mon; try apply le1_refl; apply curry_bij1_12. +Qed. + +Theorem _paco12_2_0_mult_strong: forall r_0 r_1, + paco12_2_0 gf_0 gf_1 (upaco12_2_0 gf_0 gf_1 r_0 r_1) (upaco12_2_1 gf_0 gf_1 r_0 r_1) <12== paco12_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map12. + eapply le1_trans; [| eapply _paco_2_0_mult_strong]. + apply _paco_2_0_mon; intros []; eauto. +Qed. + +Theorem _paco12_2_1_mult_strong: forall r_0 r_1, + paco12_2_1 gf_0 gf_1 (upaco12_2_0 gf_0 gf_1 r_0 r_1) (upaco12_2_1 gf_0 gf_1 r_0 r_1) <12== paco12_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map12. + eapply le1_trans; [| eapply _paco_2_1_mult_strong]. + apply _paco_2_1_mon; intros []; eauto. +Qed. + +Theorem _paco12_2_0_fold: forall r_0 r_1, + gf_0 (upaco12_2_0 gf_0 gf_1 r_0 r_1) (upaco12_2_1 gf_0 gf_1 r_0 r_1) <12== paco12_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_12. + eapply le1_trans; [| apply _paco_2_0_fold]. apply le1_refl. +Qed. + +Theorem _paco12_2_1_fold: forall r_0 r_1, + gf_1 (upaco12_2_0 gf_0 gf_1 r_0 r_1) (upaco12_2_1 gf_0 gf_1 r_0 r_1) <12== paco12_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_12. + eapply le1_trans; [| apply _paco_2_1_fold]. apply le1_refl. +Qed. + +Theorem _paco12_2_0_unfold: forall (MON: _monotone12_2 gf_0) (MON: _monotone12_2 gf_1) r_0 r_1, + paco12_2_0 gf_0 gf_1 r_0 r_1 <12== gf_0 (upaco12_2_0 gf_0 gf_1 r_0 r_1) (upaco12_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_12. + eapply _paco_2_0_unfold; apply monotone12_2_map; auto. +Qed. + +Theorem _paco12_2_1_unfold: forall (MON: _monotone12_2 gf_0) (MON: _monotone12_2 gf_1) r_0 r_1, + paco12_2_1 gf_0 gf_1 r_0 r_1 <12== gf_1 (upaco12_2_0 gf_0 gf_1 r_0 r_1) (upaco12_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_12. + eapply _paco_2_1_unfold; apply monotone12_2_map; auto. +Qed. + Theorem paco12_2_0_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_0 <12= rr) (CIH: l <_paco_12= rr), l <_paco_12= paco12_2_0 gf_0 gf_1 rr r_1), + l r_0 r_1 (OBG: forall rr (INC: r_0 <12= rr) (CIH: l <12= rr), l <12= paco12_2_0 gf_0 gf_1 rr r_1), l <12= paco12_2_0 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco12_2_0 gf_0 gf_1 (r_0 \12/ l) r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) by eauto. - clear PR; repeat (try left; do 13 paco_revert; paco_cofix_auto). + apply _paco12_2_0_acc. Qed. Theorem paco12_2_1_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_1 <12= rr) (CIH: l <_paco_12= rr), l <_paco_12= paco12_2_1 gf_0 gf_1 r_0 rr), + l r_0 r_1 (OBG: forall rr (INC: r_1 <12= rr) (CIH: l <12= rr), l <12= paco12_2_1 gf_0 gf_1 r_0 rr), l <12= paco12_2_1 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco12_2_1 gf_0 gf_1 r_0 (r_1 \12/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) by eauto. - clear PR; repeat (try left; do 13 paco_revert; paco_cofix_auto). + apply _paco12_2_1_acc. Qed. Theorem paco12_2_0_mon: monotone12_2 (paco12_2_0 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 13 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone12_2_eq. + apply _paco12_2_0_mon. +Qed. Theorem paco12_2_1_mon: monotone12_2 (paco12_2_1 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 13 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone12_2_eq. + apply _paco12_2_1_mon. +Qed. Theorem paco12_2_0_mult_strong: forall r_0 r_1, paco12_2_0 gf_0 gf_1 (upaco12_2_0 gf_0 gf_1 r_0 r_1) (upaco12_2_1 gf_0 gf_1 r_0 r_1) <12= paco12_2_0 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 13 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco12_2_0_mult_strong. +Qed. Theorem paco12_2_1_mult_strong: forall r_0 r_1, paco12_2_1 gf_0 gf_1 (upaco12_2_0 gf_0 gf_1 r_0 r_1) (upaco12_2_1 gf_0 gf_1 r_0 r_1) <12= paco12_2_1 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 13 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco12_2_1_mult_strong. +Qed. Corollary paco12_2_0_mult: forall r_0 r_1, paco12_2_0 gf_0 gf_1 (paco12_2_0 gf_0 gf_1 r_0 r_1) (paco12_2_1 gf_0 gf_1 r_0 r_1) <12= paco12_2_0 gf_0 gf_1 r_0 r_1. @@ -256,46 +421,50 @@ Proof. intros; eapply paco12_2_1_mult_strong, paco12_2_1_mon; eauto. Qed. Theorem paco12_2_0_fold: forall r_0 r_1, gf_0 (upaco12_2_0 gf_0 gf_1 r_0 r_1) (upaco12_2_1 gf_0 gf_1 r_0 r_1) <12= paco12_2_0 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco12_2_0_fold. +Qed. Theorem paco12_2_1_fold: forall r_0 r_1, gf_1 (upaco12_2_0 gf_0 gf_1 r_0 r_1) (upaco12_2_1 gf_0 gf_1 r_0 r_1) <12= paco12_2_1 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco12_2_1_fold. +Qed. Theorem paco12_2_0_unfold: forall (MON: monotone12_2 gf_0) (MON: monotone12_2 gf_1) r_0 r_1, paco12_2_0 gf_0 gf_1 r_0 r_1 <12= gf_0 (upaco12_2_0 gf_0 gf_1 r_0 r_1) (upaco12_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone12_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco12_2_0_unfold; apply monotone12_2_eq; auto. +Qed. Theorem paco12_2_1_unfold: forall (MON: monotone12_2 gf_0) (MON: monotone12_2 gf_1) r_0 r_1, paco12_2_1 gf_0 gf_1 r_0 r_1 <12= gf_1 (upaco12_2_0 gf_0 gf_1 r_0 r_1) (upaco12_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone12_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco12_2_1_unfold; apply monotone12_2_eq; auto. +Qed. End Arg12_2. -Hint Unfold monotone12_2. -Hint Resolve paco12_2_0_fold. -Hint Resolve paco12_2_1_fold. - -Arguments paco12_2_0_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_2_1_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_2_0_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_2_1_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_2_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_2_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_2_0_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_2_1_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_2_0_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_2_1_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_2_0_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_2_1_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. - -Instance paco12_2_0_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 (gf_0 gf_1 : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : paco_class (paco12_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) := +Arguments paco12_2_0_acc : clear implicits. +Arguments paco12_2_1_acc : clear implicits. +Arguments paco12_2_0_mon : clear implicits. +Arguments paco12_2_1_mon : clear implicits. +Arguments paco12_2_0_mult_strong : clear implicits. +Arguments paco12_2_1_mult_strong : clear implicits. +Arguments paco12_2_0_mult : clear implicits. +Arguments paco12_2_1_mult : clear implicits. +Arguments paco12_2_0_fold : clear implicits. +Arguments paco12_2_1_fold : clear implicits. +Arguments paco12_2_0_unfold : clear implicits. +Arguments paco12_2_1_unfold : clear implicits. + +Global Instance paco12_2_0_inst (gf_0 gf_1 : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : paco_class (paco12_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) := { pacoacc := paco12_2_0_acc gf_0 gf_1; pacomult := paco12_2_0_mult gf_0 gf_1; pacofold := paco12_2_0_fold gf_0 gf_1; pacounfold := paco12_2_0_unfold gf_0 gf_1 }. -Instance paco12_2_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 (gf_0 gf_1 : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : paco_class (paco12_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) := +Global Instance paco12_2_1_inst (gf_0 gf_1 : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : paco_class (paco12_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) := { pacoacc := paco12_2_1_acc gf_0 gf_1; pacomult := paco12_2_1_mult gf_0 gf_1; pacofold := paco12_2_1_fold gf_0 gf_1; @@ -305,70 +474,204 @@ Instance paco12_2_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 (gf_0 gf_1 : rel Section Arg12_3. -Definition monotone12_3 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 (gf: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) := +Definition monotone12_3 (gf: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) (LE_0: r_0 <12= r'_0)(LE_1: r_1 <12= r'_1)(LE_2: r_2 <12= r'_2), gf r'_0 r'_1 r'_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. +Definition _monotone12_3 (gf: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <12= r'_0)(LE_1: r_1 <12= r'_1)(LE_2: r_2 <12= r'_2), gf r_0 r_1 r_2 <12== gf r'_0 r'_1 r'_2. + +Lemma monotone12_3_eq (gf: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) : + monotone12_3 gf <-> _monotone12_3 gf. +Proof. unfold monotone12_3, _monotone12_3, le12. split; eauto. Qed. + +Lemma monotone12_3_map (gf: rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) + (MON: _monotone12_3 gf) : + _monotone_3 (fun R0 R1 R2 => uncurry12 (gf (curry12 R0) (curry12 R1) (curry12 R2))). +Proof. + repeat_intros 9. apply uncurry_map12. apply MON; apply curry_map12; auto. +Qed. + Variable gf_0 gf_1 gf_2 : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 -> rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. +Theorem _paco12_3_0_mon: _monotone12_3 (paco12_3_0 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map12, _paco_3_0_mon; apply uncurry_map12; auto. +Qed. + +Theorem _paco12_3_1_mon: _monotone12_3 (paco12_3_1 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map12, _paco_3_1_mon; apply uncurry_map12; auto. +Qed. + +Theorem _paco12_3_2_mon: _monotone12_3 (paco12_3_2 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map12, _paco_3_2_mon; apply uncurry_map12; auto. +Qed. + +Theorem _paco12_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <12== rr) (CIH: l <12== rr), l <12== paco12_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <12== paco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_12. + eapply _paco_3_0_acc. intros. + apply uncurry_adjoint1_12 in INC. apply uncurry_adjoint1_12 in CIH. + apply uncurry_adjoint2_12. + eapply le12_trans. eapply (OBG _ INC CIH). + apply curry_map12. + apply _paco_3_0_mon; try apply le1_refl; apply curry_bij1_12. +Qed. + +Theorem _paco12_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <12== rr) (CIH: l <12== rr), l <12== paco12_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <12== paco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_12. + eapply _paco_3_1_acc. intros. + apply uncurry_adjoint1_12 in INC. apply uncurry_adjoint1_12 in CIH. + apply uncurry_adjoint2_12. + eapply le12_trans. eapply (OBG _ INC CIH). + apply curry_map12. + apply _paco_3_1_mon; try apply le1_refl; apply curry_bij1_12. +Qed. + +Theorem _paco12_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <12== rr) (CIH: l <12== rr), l <12== paco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <12== paco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_12. + eapply _paco_3_2_acc. intros. + apply uncurry_adjoint1_12 in INC. apply uncurry_adjoint1_12 in CIH. + apply uncurry_adjoint2_12. + eapply le12_trans. eapply (OBG _ INC CIH). + apply curry_map12. + apply _paco_3_2_mon; try apply le1_refl; apply curry_bij1_12. +Qed. + +Theorem _paco12_3_0_mult_strong: forall r_0 r_1 r_2, + paco12_3_0 gf_0 gf_1 gf_2 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <12== paco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map12. + eapply le1_trans; [| eapply _paco_3_0_mult_strong]. + apply _paco_3_0_mon; intros []; eauto. +Qed. + +Theorem _paco12_3_1_mult_strong: forall r_0 r_1 r_2, + paco12_3_1 gf_0 gf_1 gf_2 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <12== paco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map12. + eapply le1_trans; [| eapply _paco_3_1_mult_strong]. + apply _paco_3_1_mon; intros []; eauto. +Qed. + +Theorem _paco12_3_2_mult_strong: forall r_0 r_1 r_2, + paco12_3_2 gf_0 gf_1 gf_2 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <12== paco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map12. + eapply le1_trans; [| eapply _paco_3_2_mult_strong]. + apply _paco_3_2_mon; intros []; eauto. +Qed. + +Theorem _paco12_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <12== paco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_12. + eapply le1_trans; [| apply _paco_3_0_fold]. apply le1_refl. +Qed. + +Theorem _paco12_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <12== paco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_12. + eapply le1_trans; [| apply _paco_3_1_fold]. apply le1_refl. +Qed. + +Theorem _paco12_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <12== paco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_12. + eapply le1_trans; [| apply _paco_3_2_fold]. apply le1_refl. +Qed. + +Theorem _paco12_3_0_unfold: forall (MON: _monotone12_3 gf_0) (MON: _monotone12_3 gf_1) (MON: _monotone12_3 gf_2) r_0 r_1 r_2, + paco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <12== gf_0 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_12. + eapply _paco_3_0_unfold; apply monotone12_3_map; auto. +Qed. + +Theorem _paco12_3_1_unfold: forall (MON: _monotone12_3 gf_0) (MON: _monotone12_3 gf_1) (MON: _monotone12_3 gf_2) r_0 r_1 r_2, + paco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <12== gf_1 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_12. + eapply _paco_3_1_unfold; apply monotone12_3_map; auto. +Qed. + +Theorem _paco12_3_2_unfold: forall (MON: _monotone12_3 gf_0) (MON: _monotone12_3 gf_1) (MON: _monotone12_3 gf_2) r_0 r_1 r_2, + paco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <12== gf_2 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_12. + eapply _paco_3_2_unfold; apply monotone12_3_map; auto. +Qed. + Theorem paco12_3_0_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <12= rr) (CIH: l <_paco_12= rr), l <_paco_12= paco12_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <12= rr) (CIH: l <12= rr), l <12= paco12_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), l <12= paco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco12_3_0 gf_0 gf_1 gf_2 (r_0 \12/ l) r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) by eauto. - clear PR; repeat (try left; do 13 paco_revert; paco_cofix_auto). + apply _paco12_3_0_acc. Qed. Theorem paco12_3_1_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <12= rr) (CIH: l <_paco_12= rr), l <_paco_12= paco12_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <12= rr) (CIH: l <12= rr), l <12= paco12_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), l <12= paco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco12_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \12/ l) r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) by eauto. - clear PR; repeat (try left; do 13 paco_revert; paco_cofix_auto). + apply _paco12_3_1_acc. Qed. Theorem paco12_3_2_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <12= rr) (CIH: l <_paco_12= rr), l <_paco_12= paco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <12= rr) (CIH: l <12= rr), l <12= paco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), l <12= paco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \12/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) by eauto. - clear PR; repeat (try left; do 13 paco_revert; paco_cofix_auto). + apply _paco12_3_2_acc. Qed. Theorem paco12_3_0_mon: monotone12_3 (paco12_3_0 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 13 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone12_3_eq. + apply _paco12_3_0_mon. +Qed. Theorem paco12_3_1_mon: monotone12_3 (paco12_3_1 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 13 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone12_3_eq. + apply _paco12_3_1_mon. +Qed. Theorem paco12_3_2_mon: monotone12_3 (paco12_3_2 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 13 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone12_3_eq. + apply _paco12_3_2_mon. +Qed. Theorem paco12_3_0_mult_strong: forall r_0 r_1 r_2, paco12_3_0 gf_0 gf_1 gf_2 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <12= paco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 13 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco12_3_0_mult_strong. +Qed. Theorem paco12_3_1_mult_strong: forall r_0 r_1 r_2, paco12_3_1 gf_0 gf_1 gf_2 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <12= paco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 13 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco12_3_1_mult_strong. +Qed. Theorem paco12_3_2_mult_strong: forall r_0 r_1 r_2, paco12_3_2 gf_0 gf_1 gf_2 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <12= paco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 13 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco12_3_2_mult_strong. +Qed. Corollary paco12_3_0_mult: forall r_0 r_1 r_2, paco12_3_0 gf_0 gf_1 gf_2 (paco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <12= paco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. @@ -384,69 +687,105 @@ Proof. intros; eapply paco12_3_2_mult_strong, paco12_3_2_mon; eauto. Qed. Theorem paco12_3_0_fold: forall r_0 r_1 r_2, gf_0 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <12= paco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco12_3_0_fold. +Qed. Theorem paco12_3_1_fold: forall r_0 r_1 r_2, gf_1 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <12= paco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco12_3_1_fold. +Qed. Theorem paco12_3_2_fold: forall r_0 r_1 r_2, gf_2 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <12= paco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco12_3_2_fold. +Qed. Theorem paco12_3_0_unfold: forall (MON: monotone12_3 gf_0) (MON: monotone12_3 gf_1) (MON: monotone12_3 gf_2) r_0 r_1 r_2, paco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <12= gf_0 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone12_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco12_3_0_unfold; apply monotone12_3_eq; auto. +Qed. Theorem paco12_3_1_unfold: forall (MON: monotone12_3 gf_0) (MON: monotone12_3 gf_1) (MON: monotone12_3 gf_2) r_0 r_1 r_2, paco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <12= gf_1 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone12_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco12_3_1_unfold; apply monotone12_3_eq; auto. +Qed. Theorem paco12_3_2_unfold: forall (MON: monotone12_3 gf_0) (MON: monotone12_3 gf_1) (MON: monotone12_3 gf_2) r_0 r_1 r_2, paco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <12= gf_2 (upaco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone12_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco12_3_2_unfold; apply monotone12_3_eq; auto. +Qed. End Arg12_3. -Hint Unfold monotone12_3. -Hint Resolve paco12_3_0_fold. -Hint Resolve paco12_3_1_fold. -Hint Resolve paco12_3_2_fold. - -Arguments paco12_3_0_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_1_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_2_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_0_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_1_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_2_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_2_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_0_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_1_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_2_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_0_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_1_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_2_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_0_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_1_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. -Arguments paco12_3_2_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 ]. - -Instance paco12_3_0_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 (gf_0 gf_1 gf_2 : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : paco_class (paco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) := +Arguments paco12_3_0_acc : clear implicits. +Arguments paco12_3_1_acc : clear implicits. +Arguments paco12_3_2_acc : clear implicits. +Arguments paco12_3_0_mon : clear implicits. +Arguments paco12_3_1_mon : clear implicits. +Arguments paco12_3_2_mon : clear implicits. +Arguments paco12_3_0_mult_strong : clear implicits. +Arguments paco12_3_1_mult_strong : clear implicits. +Arguments paco12_3_2_mult_strong : clear implicits. +Arguments paco12_3_0_mult : clear implicits. +Arguments paco12_3_1_mult : clear implicits. +Arguments paco12_3_2_mult : clear implicits. +Arguments paco12_3_0_fold : clear implicits. +Arguments paco12_3_1_fold : clear implicits. +Arguments paco12_3_2_fold : clear implicits. +Arguments paco12_3_0_unfold : clear implicits. +Arguments paco12_3_1_unfold : clear implicits. +Arguments paco12_3_2_unfold : clear implicits. + +Global Instance paco12_3_0_inst (gf_0 gf_1 gf_2 : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : paco_class (paco12_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) := { pacoacc := paco12_3_0_acc gf_0 gf_1 gf_2; pacomult := paco12_3_0_mult gf_0 gf_1 gf_2; pacofold := paco12_3_0_fold gf_0 gf_1 gf_2; pacounfold := paco12_3_0_unfold gf_0 gf_1 gf_2 }. -Instance paco12_3_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 (gf_0 gf_1 gf_2 : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : paco_class (paco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) := +Global Instance paco12_3_1_inst (gf_0 gf_1 gf_2 : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : paco_class (paco12_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) := { pacoacc := paco12_3_1_acc gf_0 gf_1 gf_2; pacomult := paco12_3_1_mult gf_0 gf_1 gf_2; pacofold := paco12_3_1_fold gf_0 gf_1 gf_2; pacounfold := paco12_3_1_unfold gf_0 gf_1 gf_2 }. -Instance paco12_3_2_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 (gf_0 gf_1 gf_2 : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : paco_class (paco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) := +Global Instance paco12_3_2_inst (gf_0 gf_1 gf_2 : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : paco_class (paco12_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) := { pacoacc := paco12_3_2_acc gf_0 gf_1 gf_2; pacomult := paco12_3_2_mult gf_0 gf_1 gf_2; pacofold := paco12_3_2_fold gf_0 gf_1 gf_2; pacounfold := paco12_3_2_unfold gf_0 gf_1 gf_2 }. +End PACO12. + +Global Opaque paco12. + +Hint Unfold upaco12. +Hint Resolve paco12_fold. +Hint Unfold monotone12. + +Global Opaque paco12_2_0. +Global Opaque paco12_2_1. + +Hint Unfold upaco12_2_0. +Hint Unfold upaco12_2_1. +Hint Resolve paco12_2_0_fold. +Hint Resolve paco12_2_1_fold. +Hint Unfold monotone12_2. + +Global Opaque paco12_3_0. +Global Opaque paco12_3_1. +Global Opaque paco12_3_2. + +Hint Unfold upaco12_3_0. +Hint Unfold upaco12_3_1. +Hint Unfold upaco12_3_2. +Hint Resolve paco12_3_0_fold. +Hint Resolve paco12_3_1_fold. +Hint Resolve paco12_3_2_fold. +Hint Unfold monotone12_3. + diff --git a/src/paco13.v b/src/paco13.v index a410d46..b787352 100644 --- a/src/paco13.v +++ b/src/paco13.v @@ -1,11 +1,9 @@ Require Export paconotation pacotacuser. -Require Import pacotac. +Require Import paconotation_internal pacotac pacon. Set Implicit Arguments. -(** ** Predicates of Arity 13 -*) +Section PACO13. -Section Arg13_def. Variable T0 : Type. Variable T1 : forall (x0: @T0), Type. Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. @@ -19,153 +17,227 @@ Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) ( Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. + +Record sig13T := + exist13T { + proj13T0: @T0; + proj13T1: @T1 proj13T0; + proj13T2: @T2 proj13T0 proj13T1; + proj13T3: @T3 proj13T0 proj13T1 proj13T2; + proj13T4: @T4 proj13T0 proj13T1 proj13T2 proj13T3; + proj13T5: @T5 proj13T0 proj13T1 proj13T2 proj13T3 proj13T4; + proj13T6: @T6 proj13T0 proj13T1 proj13T2 proj13T3 proj13T4 proj13T5; + proj13T7: @T7 proj13T0 proj13T1 proj13T2 proj13T3 proj13T4 proj13T5 proj13T6; + proj13T8: @T8 proj13T0 proj13T1 proj13T2 proj13T3 proj13T4 proj13T5 proj13T6 proj13T7; + proj13T9: @T9 proj13T0 proj13T1 proj13T2 proj13T3 proj13T4 proj13T5 proj13T6 proj13T7 proj13T8; + proj13T10: @T10 proj13T0 proj13T1 proj13T2 proj13T3 proj13T4 proj13T5 proj13T6 proj13T7 proj13T8 proj13T9; + proj13T11: @T11 proj13T0 proj13T1 proj13T2 proj13T3 proj13T4 proj13T5 proj13T6 proj13T7 proj13T8 proj13T9 proj13T10; + proj13T12: @T12 proj13T0 proj13T1 proj13T2 proj13T3 proj13T4 proj13T5 proj13T6 proj13T7 proj13T8 proj13T9 proj13T10 proj13T11; + }. + +Definition uncurry13 (R: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12): rel1 sig13T := fun x => R (proj13T0 x) (proj13T1 x) (proj13T2 x) (proj13T3 x) (proj13T4 x) (proj13T5 x) (proj13T6 x) (proj13T7 x) (proj13T8 x) (proj13T9 x) (proj13T10 x) (proj13T11 x) (proj13T12 x). + +Definition curry13 (R: rel1 sig13T): rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 := + fun x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 => R (exist13T x12). + +Lemma uncurry_map13 r0 r1 (LE : r0 <13== r1) : uncurry13 r0 <1== uncurry13 r1. +Proof. intros [] H. apply LE. auto. Qed. + +Lemma uncurry_map_rev13 r0 r1 (LE: uncurry13 r0 <1== uncurry13 r1) : r0 <13== r1. +Proof. + repeat_intros 13. intros H. apply (LE (exist13T x12) H). +Qed. + +Lemma curry_map13 r0 r1 (LE: r0 <1== r1) : curry13 r0 <13== curry13 r1. +Proof. + repeat_intros 13. intros H. apply (LE (exist13T x12) H). +Qed. + +Lemma curry_map_rev13 r0 r1 (LE: curry13 r0 <13== curry13 r1) : r0 <1== r1. +Proof. + intros [] H. apply LE. apply H. +Qed. + +Lemma uncurry_bij1_13 r : curry13 (uncurry13 r) <13== r. +Proof. unfold le13. repeat_intros 13; auto. Qed. + +Lemma uncurry_bij2_13 r : r <13== curry13 (uncurry13 r). +Proof. unfold le13. repeat_intros 13; auto. Qed. + +Lemma curry_bij1_13 r : uncurry13 (curry13 r) <1== r. +Proof. intros []; auto. Qed. + +Lemma curry_bij2_13 r : r <1== uncurry13 (curry13 r). +Proof. intros []; auto. Qed. + +Lemma uncurry_adjoint1_13 r0 r1 (LE: uncurry13 r0 <1== r1) : r0 <13== curry13 r1. +Proof. + apply uncurry_map_rev13. eapply le1_trans; [eauto|]. apply curry_bij2_13. +Qed. + +Lemma uncurry_adjoint2_13 r0 r1 (LE: r0 <13== curry13 r1) : uncurry13 r0 <1== r1. +Proof. + apply curry_map_rev13. eapply le13_trans; [|eauto]. apply uncurry_bij2_13. +Qed. + +Lemma curry_adjoint1_13 r0 r1 (LE: curry13 r0 <13== r1) : r0 <1== uncurry13 r1. +Proof. + apply curry_map_rev13. eapply le13_trans; [eauto|]. apply uncurry_bij2_13. +Qed. + +Lemma curry_adjoint2_13 r0 r1 (LE: r0 <1== uncurry13 r1) : curry13 r0 <13== r1. +Proof. + apply uncurry_map_rev13. eapply le1_trans; [|eauto]. apply curry_bij1_13. +Qed. + +(** ** Predicates of Arity 13 +*) + +Section Arg13_def. Variable gf : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12. Arguments gf : clear implicits. -CoInductive paco13( r: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : Prop := -| paco13_pfold pco - (LE : pco <13= (paco13 r \13/ r)) - (SIM: gf pco x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) -. +Definition paco13( r: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 := + curry13 (paco (fun R0 => uncurry13 (gf (curry13 R0))) (uncurry13 r)). + Definition upaco13( r: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) := paco13 r \13/ r. End Arg13_def. -Arguments paco13 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments upaco13 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. +Arguments paco13 : clear implicits. +Arguments upaco13 : clear implicits. Hint Unfold upaco13. Section Arg13_2_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. -Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. Variable gf_0 gf_1 : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. -CoInductive paco13_2_0( r_0 r_1: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : Prop := -| paco13_2_0_pfold pco_0 pco_1 - (LE : pco_0 <13= (paco13_2_0 r_0 r_1 \13/ r_0)) - (LE : pco_1 <13= (paco13_2_1 r_0 r_1 \13/ r_1)) - (SIM: gf_0 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) -with paco13_2_1( r_0 r_1: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : Prop := -| paco13_2_1_pfold pco_0 pco_1 - (LE : pco_0 <13= (paco13_2_0 r_0 r_1 \13/ r_0)) - (LE : pco_1 <13= (paco13_2_1 r_0 r_1 \13/ r_1)) - (SIM: gf_1 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) -. +Definition paco13_2_0( r_0 r_1: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 := + curry13 (paco_2_0 (fun R0 R1 => uncurry13 (gf_0 (curry13 R0) (curry13 R1))) (fun R0 R1 => uncurry13 (gf_1 (curry13 R0) (curry13 R1))) (uncurry13 r_0) (uncurry13 r_1)). + +Definition paco13_2_1( r_0 r_1: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 := + curry13 (paco_2_1 (fun R0 R1 => uncurry13 (gf_0 (curry13 R0) (curry13 R1))) (fun R0 R1 => uncurry13 (gf_1 (curry13 R0) (curry13 R1))) (uncurry13 r_0) (uncurry13 r_1)). + Definition upaco13_2_0( r_0 r_1: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) := paco13_2_0 r_0 r_1 \13/ r_0. Definition upaco13_2_1( r_0 r_1: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) := paco13_2_1 r_0 r_1 \13/ r_1. End Arg13_2_def. -Arguments paco13_2_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments upaco13_2_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. +Arguments paco13_2_0 : clear implicits. +Arguments upaco13_2_0 : clear implicits. Hint Unfold upaco13_2_0. -Arguments paco13_2_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments upaco13_2_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. +Arguments paco13_2_1 : clear implicits. +Arguments upaco13_2_1 : clear implicits. Hint Unfold upaco13_2_1. Section Arg13_3_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. -Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. Variable gf_0 gf_1 gf_2 : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. -CoInductive paco13_3_0( r_0 r_1 r_2: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : Prop := -| paco13_3_0_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <13= (paco13_3_0 r_0 r_1 r_2 \13/ r_0)) - (LE : pco_1 <13= (paco13_3_1 r_0 r_1 r_2 \13/ r_1)) - (LE : pco_2 <13= (paco13_3_2 r_0 r_1 r_2 \13/ r_2)) - (SIM: gf_0 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) -with paco13_3_1( r_0 r_1 r_2: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : Prop := -| paco13_3_1_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <13= (paco13_3_0 r_0 r_1 r_2 \13/ r_0)) - (LE : pco_1 <13= (paco13_3_1 r_0 r_1 r_2 \13/ r_1)) - (LE : pco_2 <13= (paco13_3_2 r_0 r_1 r_2 \13/ r_2)) - (SIM: gf_1 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) -with paco13_3_2( r_0 r_1 r_2: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : Prop := -| paco13_3_2_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <13= (paco13_3_0 r_0 r_1 r_2 \13/ r_0)) - (LE : pco_1 <13= (paco13_3_1 r_0 r_1 r_2 \13/ r_1)) - (LE : pco_2 <13= (paco13_3_2 r_0 r_1 r_2 \13/ r_2)) - (SIM: gf_2 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) -. +Definition paco13_3_0( r_0 r_1 r_2: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 := + curry13 (paco_3_0 (fun R0 R1 R2 => uncurry13 (gf_0 (curry13 R0) (curry13 R1) (curry13 R2))) (fun R0 R1 R2 => uncurry13 (gf_1 (curry13 R0) (curry13 R1) (curry13 R2))) (fun R0 R1 R2 => uncurry13 (gf_2 (curry13 R0) (curry13 R1) (curry13 R2))) (uncurry13 r_0) (uncurry13 r_1) (uncurry13 r_2)). + +Definition paco13_3_1( r_0 r_1 r_2: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 := + curry13 (paco_3_1 (fun R0 R1 R2 => uncurry13 (gf_0 (curry13 R0) (curry13 R1) (curry13 R2))) (fun R0 R1 R2 => uncurry13 (gf_1 (curry13 R0) (curry13 R1) (curry13 R2))) (fun R0 R1 R2 => uncurry13 (gf_2 (curry13 R0) (curry13 R1) (curry13 R2))) (uncurry13 r_0) (uncurry13 r_1) (uncurry13 r_2)). + +Definition paco13_3_2( r_0 r_1 r_2: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 := + curry13 (paco_3_2 (fun R0 R1 R2 => uncurry13 (gf_0 (curry13 R0) (curry13 R1) (curry13 R2))) (fun R0 R1 R2 => uncurry13 (gf_1 (curry13 R0) (curry13 R1) (curry13 R2))) (fun R0 R1 R2 => uncurry13 (gf_2 (curry13 R0) (curry13 R1) (curry13 R2))) (uncurry13 r_0) (uncurry13 r_1) (uncurry13 r_2)). + Definition upaco13_3_0( r_0 r_1 r_2: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) := paco13_3_0 r_0 r_1 r_2 \13/ r_0. Definition upaco13_3_1( r_0 r_1 r_2: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) := paco13_3_1 r_0 r_1 r_2 \13/ r_1. Definition upaco13_3_2( r_0 r_1 r_2: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) := paco13_3_2 r_0 r_1 r_2 \13/ r_2. End Arg13_3_def. -Arguments paco13_3_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments upaco13_3_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. +Arguments paco13_3_0 : clear implicits. +Arguments upaco13_3_0 : clear implicits. Hint Unfold upaco13_3_0. -Arguments paco13_3_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments upaco13_3_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. +Arguments paco13_3_1 : clear implicits. +Arguments upaco13_3_1 : clear implicits. Hint Unfold upaco13_3_1. -Arguments paco13_3_2 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments upaco13_3_2 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. +Arguments paco13_3_2 : clear implicits. +Arguments upaco13_3_2 : clear implicits. Hint Unfold upaco13_3_2. -(* Less than or equal - internal use only *) -Notation "p <_paco_13= q" := - (forall _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 _paco_x10 _paco_x11 _paco_x12 (PR: p _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 _paco_x10 _paco_x11 _paco_x12 : Prop), q _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 _paco_x10 _paco_x11 _paco_x12 : Prop) - (at level 50, no associativity). - (** 1 Mutual Coinduction *) Section Arg13_1. -Definition monotone13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 (gf: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) := +Definition monotone13 (gf: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 r r' (IN: gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) (LE: r <13= r'), gf r' x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. -Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. +Definition _monotone13 (gf: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) := + forall r r'(LE: r <13= r'), gf r <13== gf r'. + +Lemma monotone13_eq (gf: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) : + monotone13 gf <-> _monotone13 gf. +Proof. unfold monotone13, _monotone13, le13. split; eauto. Qed. + +Lemma monotone13_map (gf: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) + (MON: _monotone13 gf) : + _monotone (fun R0 => uncurry13 (gf (curry13 R0))). +Proof. + repeat_intros 3. apply uncurry_map13. apply MON; apply curry_map13; auto. +Qed. + Variable gf : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12. Arguments gf : clear implicits. +Theorem _paco13_mon: _monotone13 (paco13 gf). +Proof. + repeat_intros 3. eapply curry_map13, _paco_mon; apply uncurry_map13; auto. +Qed. + +Theorem _paco13_acc: forall + l r (OBG: forall rr (INC: r <13== rr) (CIH: l <13== rr), l <13== paco13 gf rr), + l <13== paco13 gf r. +Proof. + intros. apply uncurry_adjoint1_13. + eapply _paco_acc. intros. + apply uncurry_adjoint1_13 in INC. apply uncurry_adjoint1_13 in CIH. + apply uncurry_adjoint2_13. + eapply le13_trans. eapply (OBG _ INC CIH). + apply curry_map13. + apply _paco_mon; try apply le1_refl; apply curry_bij1_13. +Qed. + +Theorem _paco13_mult_strong: forall r, + paco13 gf (upaco13 gf r) <13== paco13 gf r. +Proof. + intros. apply curry_map13. + eapply le1_trans; [| eapply _paco_mult_strong]. + apply _paco_mon; intros []; eauto. +Qed. + +Theorem _paco13_fold: forall r, + gf (upaco13 gf r) <13== paco13 gf r. +Proof. + intros. apply uncurry_adjoint1_13. + eapply le1_trans; [| apply _paco_fold]. apply le1_refl. +Qed. + +Theorem _paco13_unfold: forall (MON: _monotone13 gf) r, + paco13 gf r <13== gf (upaco13 gf r). +Proof. + intros. apply curry_adjoint2_13. + eapply _paco_unfold; apply monotone13_map; auto. +Qed. + Theorem paco13_acc: forall - l r (OBG: forall rr (INC: r <13= rr) (CIH: l <_paco_13= rr), l <_paco_13= paco13 gf rr), + l r (OBG: forall rr (INC: r <13= rr) (CIH: l <13= rr), l <13= paco13 gf rr), l <13= paco13 gf r. Proof. - intros; assert (SIM: paco13 gf (r \13/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) by eauto. - clear PR; repeat (try left; do 14 paco_revert; paco_cofix_auto). + apply _paco13_acc. Qed. Theorem paco13_mon: monotone13 (paco13 gf). -Proof. paco_cofix_auto; repeat (left; do 14 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone13_eq. + apply _paco13_mon. +Qed. Theorem paco13_mult_strong: forall r, paco13 gf (upaco13 gf r) <13= paco13 gf r. -Proof. paco_cofix_auto; repeat (left; do 14 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco13_mult_strong. +Qed. Corollary paco13_mult: forall r, paco13 gf (paco13 gf r) <13= paco13 gf r. @@ -173,25 +245,26 @@ Proof. intros; eapply paco13_mult_strong, paco13_mon; eauto. Qed. Theorem paco13_fold: forall r, gf (upaco13 gf r) <13= paco13 gf r. -Proof. intros; econstructor; [ |eauto]; eauto. Qed. +Proof. + apply _paco13_fold. +Qed. Theorem paco13_unfold: forall (MON: monotone13 gf) r, paco13 gf r <13= gf (upaco13 gf r). -Proof. unfold monotone13; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 1. eapply _paco13_unfold; apply monotone13_eq; auto. +Qed. End Arg13_1. -Hint Unfold monotone13. -Hint Resolve paco13_fold. +Arguments paco13_acc : clear implicits. +Arguments paco13_mon : clear implicits. +Arguments paco13_mult_strong : clear implicits. +Arguments paco13_mult : clear implicits. +Arguments paco13_fold : clear implicits. +Arguments paco13_unfold : clear implicits. -Arguments paco13_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. - -Instance paco13_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 (gf : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12->_) r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : paco_class (paco13 gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) := +Global Instance paco13_inst (gf : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12->_) r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : paco_class (paco13 gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) := { pacoacc := paco13_acc gf; pacomult := paco13_mult gf; pacofold := paco13_fold gf; @@ -201,55 +274,144 @@ Instance paco13_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 (gf : rel13 T0 T Section Arg13_2. -Definition monotone13_2 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 (gf: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) := +Definition monotone13_2 (gf: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) (LE_0: r_0 <13= r'_0)(LE_1: r_1 <13= r'_1), gf r'_0 r'_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. -Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. +Definition _monotone13_2 (gf: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <13= r'_0)(LE_1: r_1 <13= r'_1), gf r_0 r_1 <13== gf r'_0 r'_1. + +Lemma monotone13_2_eq (gf: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) : + monotone13_2 gf <-> _monotone13_2 gf. +Proof. unfold monotone13_2, _monotone13_2, le13. split; eauto. Qed. + +Lemma monotone13_2_map (gf: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) + (MON: _monotone13_2 gf) : + _monotone_2 (fun R0 R1 => uncurry13 (gf (curry13 R0) (curry13 R1))). +Proof. + repeat_intros 6. apply uncurry_map13. apply MON; apply curry_map13; auto. +Qed. + Variable gf_0 gf_1 : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. +Theorem _paco13_2_0_mon: _monotone13_2 (paco13_2_0 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map13, _paco_2_0_mon; apply uncurry_map13; auto. +Qed. + +Theorem _paco13_2_1_mon: _monotone13_2 (paco13_2_1 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map13, _paco_2_1_mon; apply uncurry_map13; auto. +Qed. + +Theorem _paco13_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <13== rr) (CIH: l <13== rr), l <13== paco13_2_0 gf_0 gf_1 rr r_1), + l <13== paco13_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_13. + eapply _paco_2_0_acc. intros. + apply uncurry_adjoint1_13 in INC. apply uncurry_adjoint1_13 in CIH. + apply uncurry_adjoint2_13. + eapply le13_trans. eapply (OBG _ INC CIH). + apply curry_map13. + apply _paco_2_0_mon; try apply le1_refl; apply curry_bij1_13. +Qed. + +Theorem _paco13_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <13== rr) (CIH: l <13== rr), l <13== paco13_2_1 gf_0 gf_1 r_0 rr), + l <13== paco13_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_13. + eapply _paco_2_1_acc. intros. + apply uncurry_adjoint1_13 in INC. apply uncurry_adjoint1_13 in CIH. + apply uncurry_adjoint2_13. + eapply le13_trans. eapply (OBG _ INC CIH). + apply curry_map13. + apply _paco_2_1_mon; try apply le1_refl; apply curry_bij1_13. +Qed. + +Theorem _paco13_2_0_mult_strong: forall r_0 r_1, + paco13_2_0 gf_0 gf_1 (upaco13_2_0 gf_0 gf_1 r_0 r_1) (upaco13_2_1 gf_0 gf_1 r_0 r_1) <13== paco13_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map13. + eapply le1_trans; [| eapply _paco_2_0_mult_strong]. + apply _paco_2_0_mon; intros []; eauto. +Qed. + +Theorem _paco13_2_1_mult_strong: forall r_0 r_1, + paco13_2_1 gf_0 gf_1 (upaco13_2_0 gf_0 gf_1 r_0 r_1) (upaco13_2_1 gf_0 gf_1 r_0 r_1) <13== paco13_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map13. + eapply le1_trans; [| eapply _paco_2_1_mult_strong]. + apply _paco_2_1_mon; intros []; eauto. +Qed. + +Theorem _paco13_2_0_fold: forall r_0 r_1, + gf_0 (upaco13_2_0 gf_0 gf_1 r_0 r_1) (upaco13_2_1 gf_0 gf_1 r_0 r_1) <13== paco13_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_13. + eapply le1_trans; [| apply _paco_2_0_fold]. apply le1_refl. +Qed. + +Theorem _paco13_2_1_fold: forall r_0 r_1, + gf_1 (upaco13_2_0 gf_0 gf_1 r_0 r_1) (upaco13_2_1 gf_0 gf_1 r_0 r_1) <13== paco13_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_13. + eapply le1_trans; [| apply _paco_2_1_fold]. apply le1_refl. +Qed. + +Theorem _paco13_2_0_unfold: forall (MON: _monotone13_2 gf_0) (MON: _monotone13_2 gf_1) r_0 r_1, + paco13_2_0 gf_0 gf_1 r_0 r_1 <13== gf_0 (upaco13_2_0 gf_0 gf_1 r_0 r_1) (upaco13_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_13. + eapply _paco_2_0_unfold; apply monotone13_2_map; auto. +Qed. + +Theorem _paco13_2_1_unfold: forall (MON: _monotone13_2 gf_0) (MON: _monotone13_2 gf_1) r_0 r_1, + paco13_2_1 gf_0 gf_1 r_0 r_1 <13== gf_1 (upaco13_2_0 gf_0 gf_1 r_0 r_1) (upaco13_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_13. + eapply _paco_2_1_unfold; apply monotone13_2_map; auto. +Qed. + Theorem paco13_2_0_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_0 <13= rr) (CIH: l <_paco_13= rr), l <_paco_13= paco13_2_0 gf_0 gf_1 rr r_1), + l r_0 r_1 (OBG: forall rr (INC: r_0 <13= rr) (CIH: l <13= rr), l <13= paco13_2_0 gf_0 gf_1 rr r_1), l <13= paco13_2_0 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco13_2_0 gf_0 gf_1 (r_0 \13/ l) r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) by eauto. - clear PR; repeat (try left; do 14 paco_revert; paco_cofix_auto). + apply _paco13_2_0_acc. Qed. Theorem paco13_2_1_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_1 <13= rr) (CIH: l <_paco_13= rr), l <_paco_13= paco13_2_1 gf_0 gf_1 r_0 rr), + l r_0 r_1 (OBG: forall rr (INC: r_1 <13= rr) (CIH: l <13= rr), l <13= paco13_2_1 gf_0 gf_1 r_0 rr), l <13= paco13_2_1 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco13_2_1 gf_0 gf_1 r_0 (r_1 \13/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) by eauto. - clear PR; repeat (try left; do 14 paco_revert; paco_cofix_auto). + apply _paco13_2_1_acc. Qed. Theorem paco13_2_0_mon: monotone13_2 (paco13_2_0 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 14 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone13_2_eq. + apply _paco13_2_0_mon. +Qed. Theorem paco13_2_1_mon: monotone13_2 (paco13_2_1 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 14 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone13_2_eq. + apply _paco13_2_1_mon. +Qed. Theorem paco13_2_0_mult_strong: forall r_0 r_1, paco13_2_0 gf_0 gf_1 (upaco13_2_0 gf_0 gf_1 r_0 r_1) (upaco13_2_1 gf_0 gf_1 r_0 r_1) <13= paco13_2_0 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 14 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco13_2_0_mult_strong. +Qed. Theorem paco13_2_1_mult_strong: forall r_0 r_1, paco13_2_1 gf_0 gf_1 (upaco13_2_0 gf_0 gf_1 r_0 r_1) (upaco13_2_1 gf_0 gf_1 r_0 r_1) <13= paco13_2_1 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 14 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco13_2_1_mult_strong. +Qed. Corollary paco13_2_0_mult: forall r_0 r_1, paco13_2_0 gf_0 gf_1 (paco13_2_0 gf_0 gf_1 r_0 r_1) (paco13_2_1 gf_0 gf_1 r_0 r_1) <13= paco13_2_0 gf_0 gf_1 r_0 r_1. @@ -261,46 +423,50 @@ Proof. intros; eapply paco13_2_1_mult_strong, paco13_2_1_mon; eauto. Qed. Theorem paco13_2_0_fold: forall r_0 r_1, gf_0 (upaco13_2_0 gf_0 gf_1 r_0 r_1) (upaco13_2_1 gf_0 gf_1 r_0 r_1) <13= paco13_2_0 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco13_2_0_fold. +Qed. Theorem paco13_2_1_fold: forall r_0 r_1, gf_1 (upaco13_2_0 gf_0 gf_1 r_0 r_1) (upaco13_2_1 gf_0 gf_1 r_0 r_1) <13= paco13_2_1 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco13_2_1_fold. +Qed. Theorem paco13_2_0_unfold: forall (MON: monotone13_2 gf_0) (MON: monotone13_2 gf_1) r_0 r_1, paco13_2_0 gf_0 gf_1 r_0 r_1 <13= gf_0 (upaco13_2_0 gf_0 gf_1 r_0 r_1) (upaco13_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone13_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco13_2_0_unfold; apply monotone13_2_eq; auto. +Qed. Theorem paco13_2_1_unfold: forall (MON: monotone13_2 gf_0) (MON: monotone13_2 gf_1) r_0 r_1, paco13_2_1 gf_0 gf_1 r_0 r_1 <13= gf_1 (upaco13_2_0 gf_0 gf_1 r_0 r_1) (upaco13_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone13_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco13_2_1_unfold; apply monotone13_2_eq; auto. +Qed. End Arg13_2. -Hint Unfold monotone13_2. -Hint Resolve paco13_2_0_fold. -Hint Resolve paco13_2_1_fold. - -Arguments paco13_2_0_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_2_1_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_2_0_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_2_1_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_2_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_2_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_2_0_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_2_1_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_2_0_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_2_1_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_2_0_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_2_1_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. - -Instance paco13_2_0_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 (gf_0 gf_1 : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : paco_class (paco13_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) := +Arguments paco13_2_0_acc : clear implicits. +Arguments paco13_2_1_acc : clear implicits. +Arguments paco13_2_0_mon : clear implicits. +Arguments paco13_2_1_mon : clear implicits. +Arguments paco13_2_0_mult_strong : clear implicits. +Arguments paco13_2_1_mult_strong : clear implicits. +Arguments paco13_2_0_mult : clear implicits. +Arguments paco13_2_1_mult : clear implicits. +Arguments paco13_2_0_fold : clear implicits. +Arguments paco13_2_1_fold : clear implicits. +Arguments paco13_2_0_unfold : clear implicits. +Arguments paco13_2_1_unfold : clear implicits. + +Global Instance paco13_2_0_inst (gf_0 gf_1 : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : paco_class (paco13_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) := { pacoacc := paco13_2_0_acc gf_0 gf_1; pacomult := paco13_2_0_mult gf_0 gf_1; pacofold := paco13_2_0_fold gf_0 gf_1; pacounfold := paco13_2_0_unfold gf_0 gf_1 }. -Instance paco13_2_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 (gf_0 gf_1 : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : paco_class (paco13_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) := +Global Instance paco13_2_1_inst (gf_0 gf_1 : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : paco_class (paco13_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) := { pacoacc := paco13_2_1_acc gf_0 gf_1; pacomult := paco13_2_1_mult gf_0 gf_1; pacofold := paco13_2_1_fold gf_0 gf_1; @@ -310,71 +476,204 @@ Instance paco13_2_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 (gf_0 gf_1 : Section Arg13_3. -Definition monotone13_3 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 (gf: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) := +Definition monotone13_3 (gf: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) (LE_0: r_0 <13= r'_0)(LE_1: r_1 <13= r'_1)(LE_2: r_2 <13= r'_2), gf r'_0 r'_1 r'_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. -Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. +Definition _monotone13_3 (gf: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <13= r'_0)(LE_1: r_1 <13= r'_1)(LE_2: r_2 <13= r'_2), gf r_0 r_1 r_2 <13== gf r'_0 r'_1 r'_2. + +Lemma monotone13_3_eq (gf: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) : + monotone13_3 gf <-> _monotone13_3 gf. +Proof. unfold monotone13_3, _monotone13_3, le13. split; eauto. Qed. + +Lemma monotone13_3_map (gf: rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) + (MON: _monotone13_3 gf) : + _monotone_3 (fun R0 R1 R2 => uncurry13 (gf (curry13 R0) (curry13 R1) (curry13 R2))). +Proof. + repeat_intros 9. apply uncurry_map13. apply MON; apply curry_map13; auto. +Qed. + Variable gf_0 gf_1 gf_2 : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 -> rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. +Theorem _paco13_3_0_mon: _monotone13_3 (paco13_3_0 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map13, _paco_3_0_mon; apply uncurry_map13; auto. +Qed. + +Theorem _paco13_3_1_mon: _monotone13_3 (paco13_3_1 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map13, _paco_3_1_mon; apply uncurry_map13; auto. +Qed. + +Theorem _paco13_3_2_mon: _monotone13_3 (paco13_3_2 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map13, _paco_3_2_mon; apply uncurry_map13; auto. +Qed. + +Theorem _paco13_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <13== rr) (CIH: l <13== rr), l <13== paco13_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <13== paco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_13. + eapply _paco_3_0_acc. intros. + apply uncurry_adjoint1_13 in INC. apply uncurry_adjoint1_13 in CIH. + apply uncurry_adjoint2_13. + eapply le13_trans. eapply (OBG _ INC CIH). + apply curry_map13. + apply _paco_3_0_mon; try apply le1_refl; apply curry_bij1_13. +Qed. + +Theorem _paco13_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <13== rr) (CIH: l <13== rr), l <13== paco13_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <13== paco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_13. + eapply _paco_3_1_acc. intros. + apply uncurry_adjoint1_13 in INC. apply uncurry_adjoint1_13 in CIH. + apply uncurry_adjoint2_13. + eapply le13_trans. eapply (OBG _ INC CIH). + apply curry_map13. + apply _paco_3_1_mon; try apply le1_refl; apply curry_bij1_13. +Qed. + +Theorem _paco13_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <13== rr) (CIH: l <13== rr), l <13== paco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <13== paco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_13. + eapply _paco_3_2_acc. intros. + apply uncurry_adjoint1_13 in INC. apply uncurry_adjoint1_13 in CIH. + apply uncurry_adjoint2_13. + eapply le13_trans. eapply (OBG _ INC CIH). + apply curry_map13. + apply _paco_3_2_mon; try apply le1_refl; apply curry_bij1_13. +Qed. + +Theorem _paco13_3_0_mult_strong: forall r_0 r_1 r_2, + paco13_3_0 gf_0 gf_1 gf_2 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <13== paco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map13. + eapply le1_trans; [| eapply _paco_3_0_mult_strong]. + apply _paco_3_0_mon; intros []; eauto. +Qed. + +Theorem _paco13_3_1_mult_strong: forall r_0 r_1 r_2, + paco13_3_1 gf_0 gf_1 gf_2 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <13== paco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map13. + eapply le1_trans; [| eapply _paco_3_1_mult_strong]. + apply _paco_3_1_mon; intros []; eauto. +Qed. + +Theorem _paco13_3_2_mult_strong: forall r_0 r_1 r_2, + paco13_3_2 gf_0 gf_1 gf_2 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <13== paco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map13. + eapply le1_trans; [| eapply _paco_3_2_mult_strong]. + apply _paco_3_2_mon; intros []; eauto. +Qed. + +Theorem _paco13_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <13== paco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_13. + eapply le1_trans; [| apply _paco_3_0_fold]. apply le1_refl. +Qed. + +Theorem _paco13_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <13== paco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_13. + eapply le1_trans; [| apply _paco_3_1_fold]. apply le1_refl. +Qed. + +Theorem _paco13_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <13== paco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_13. + eapply le1_trans; [| apply _paco_3_2_fold]. apply le1_refl. +Qed. + +Theorem _paco13_3_0_unfold: forall (MON: _monotone13_3 gf_0) (MON: _monotone13_3 gf_1) (MON: _monotone13_3 gf_2) r_0 r_1 r_2, + paco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <13== gf_0 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_13. + eapply _paco_3_0_unfold; apply monotone13_3_map; auto. +Qed. + +Theorem _paco13_3_1_unfold: forall (MON: _monotone13_3 gf_0) (MON: _monotone13_3 gf_1) (MON: _monotone13_3 gf_2) r_0 r_1 r_2, + paco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <13== gf_1 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_13. + eapply _paco_3_1_unfold; apply monotone13_3_map; auto. +Qed. + +Theorem _paco13_3_2_unfold: forall (MON: _monotone13_3 gf_0) (MON: _monotone13_3 gf_1) (MON: _monotone13_3 gf_2) r_0 r_1 r_2, + paco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <13== gf_2 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_13. + eapply _paco_3_2_unfold; apply monotone13_3_map; auto. +Qed. + Theorem paco13_3_0_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <13= rr) (CIH: l <_paco_13= rr), l <_paco_13= paco13_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <13= rr) (CIH: l <13= rr), l <13= paco13_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), l <13= paco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco13_3_0 gf_0 gf_1 gf_2 (r_0 \13/ l) r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) by eauto. - clear PR; repeat (try left; do 14 paco_revert; paco_cofix_auto). + apply _paco13_3_0_acc. Qed. Theorem paco13_3_1_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <13= rr) (CIH: l <_paco_13= rr), l <_paco_13= paco13_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <13= rr) (CIH: l <13= rr), l <13= paco13_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), l <13= paco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco13_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \13/ l) r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) by eauto. - clear PR; repeat (try left; do 14 paco_revert; paco_cofix_auto). + apply _paco13_3_1_acc. Qed. Theorem paco13_3_2_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <13= rr) (CIH: l <_paco_13= rr), l <_paco_13= paco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <13= rr) (CIH: l <13= rr), l <13= paco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), l <13= paco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \13/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) by eauto. - clear PR; repeat (try left; do 14 paco_revert; paco_cofix_auto). + apply _paco13_3_2_acc. Qed. Theorem paco13_3_0_mon: monotone13_3 (paco13_3_0 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 14 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone13_3_eq. + apply _paco13_3_0_mon. +Qed. Theorem paco13_3_1_mon: monotone13_3 (paco13_3_1 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 14 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone13_3_eq. + apply _paco13_3_1_mon. +Qed. Theorem paco13_3_2_mon: monotone13_3 (paco13_3_2 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 14 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone13_3_eq. + apply _paco13_3_2_mon. +Qed. Theorem paco13_3_0_mult_strong: forall r_0 r_1 r_2, paco13_3_0 gf_0 gf_1 gf_2 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <13= paco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 14 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco13_3_0_mult_strong. +Qed. Theorem paco13_3_1_mult_strong: forall r_0 r_1 r_2, paco13_3_1 gf_0 gf_1 gf_2 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <13= paco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 14 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco13_3_1_mult_strong. +Qed. Theorem paco13_3_2_mult_strong: forall r_0 r_1 r_2, paco13_3_2 gf_0 gf_1 gf_2 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <13= paco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 14 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco13_3_2_mult_strong. +Qed. Corollary paco13_3_0_mult: forall r_0 r_1 r_2, paco13_3_0 gf_0 gf_1 gf_2 (paco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <13= paco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. @@ -390,69 +689,105 @@ Proof. intros; eapply paco13_3_2_mult_strong, paco13_3_2_mon; eauto. Qed. Theorem paco13_3_0_fold: forall r_0 r_1 r_2, gf_0 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <13= paco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco13_3_0_fold. +Qed. Theorem paco13_3_1_fold: forall r_0 r_1 r_2, gf_1 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <13= paco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco13_3_1_fold. +Qed. Theorem paco13_3_2_fold: forall r_0 r_1 r_2, gf_2 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <13= paco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco13_3_2_fold. +Qed. Theorem paco13_3_0_unfold: forall (MON: monotone13_3 gf_0) (MON: monotone13_3 gf_1) (MON: monotone13_3 gf_2) r_0 r_1 r_2, paco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <13= gf_0 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone13_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco13_3_0_unfold; apply monotone13_3_eq; auto. +Qed. Theorem paco13_3_1_unfold: forall (MON: monotone13_3 gf_0) (MON: monotone13_3 gf_1) (MON: monotone13_3 gf_2) r_0 r_1 r_2, paco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <13= gf_1 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone13_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco13_3_1_unfold; apply monotone13_3_eq; auto. +Qed. Theorem paco13_3_2_unfold: forall (MON: monotone13_3 gf_0) (MON: monotone13_3 gf_1) (MON: monotone13_3 gf_2) r_0 r_1 r_2, paco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <13= gf_2 (upaco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone13_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco13_3_2_unfold; apply monotone13_3_eq; auto. +Qed. End Arg13_3. -Hint Unfold monotone13_3. -Hint Resolve paco13_3_0_fold. -Hint Resolve paco13_3_1_fold. -Hint Resolve paco13_3_2_fold. - -Arguments paco13_3_0_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_1_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_2_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_0_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_1_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_2_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_2_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_0_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_1_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_2_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_0_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_1_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_2_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_0_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_1_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. -Arguments paco13_3_2_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 ]. - -Instance paco13_3_0_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 (gf_0 gf_1 gf_2 : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : paco_class (paco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) := +Arguments paco13_3_0_acc : clear implicits. +Arguments paco13_3_1_acc : clear implicits. +Arguments paco13_3_2_acc : clear implicits. +Arguments paco13_3_0_mon : clear implicits. +Arguments paco13_3_1_mon : clear implicits. +Arguments paco13_3_2_mon : clear implicits. +Arguments paco13_3_0_mult_strong : clear implicits. +Arguments paco13_3_1_mult_strong : clear implicits. +Arguments paco13_3_2_mult_strong : clear implicits. +Arguments paco13_3_0_mult : clear implicits. +Arguments paco13_3_1_mult : clear implicits. +Arguments paco13_3_2_mult : clear implicits. +Arguments paco13_3_0_fold : clear implicits. +Arguments paco13_3_1_fold : clear implicits. +Arguments paco13_3_2_fold : clear implicits. +Arguments paco13_3_0_unfold : clear implicits. +Arguments paco13_3_1_unfold : clear implicits. +Arguments paco13_3_2_unfold : clear implicits. + +Global Instance paco13_3_0_inst (gf_0 gf_1 gf_2 : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : paco_class (paco13_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) := { pacoacc := paco13_3_0_acc gf_0 gf_1 gf_2; pacomult := paco13_3_0_mult gf_0 gf_1 gf_2; pacofold := paco13_3_0_fold gf_0 gf_1 gf_2; pacounfold := paco13_3_0_unfold gf_0 gf_1 gf_2 }. -Instance paco13_3_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 (gf_0 gf_1 gf_2 : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : paco_class (paco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) := +Global Instance paco13_3_1_inst (gf_0 gf_1 gf_2 : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : paco_class (paco13_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) := { pacoacc := paco13_3_1_acc gf_0 gf_1 gf_2; pacomult := paco13_3_1_mult gf_0 gf_1 gf_2; pacofold := paco13_3_1_fold gf_0 gf_1 gf_2; pacounfold := paco13_3_1_unfold gf_0 gf_1 gf_2 }. -Instance paco13_3_2_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 (gf_0 gf_1 gf_2 : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : paco_class (paco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) := +Global Instance paco13_3_2_inst (gf_0 gf_1 gf_2 : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : paco_class (paco13_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) := { pacoacc := paco13_3_2_acc gf_0 gf_1 gf_2; pacomult := paco13_3_2_mult gf_0 gf_1 gf_2; pacofold := paco13_3_2_fold gf_0 gf_1 gf_2; pacounfold := paco13_3_2_unfold gf_0 gf_1 gf_2 }. +End PACO13. + +Global Opaque paco13. + +Hint Unfold upaco13. +Hint Resolve paco13_fold. +Hint Unfold monotone13. + +Global Opaque paco13_2_0. +Global Opaque paco13_2_1. + +Hint Unfold upaco13_2_0. +Hint Unfold upaco13_2_1. +Hint Resolve paco13_2_0_fold. +Hint Resolve paco13_2_1_fold. +Hint Unfold monotone13_2. + +Global Opaque paco13_3_0. +Global Opaque paco13_3_1. +Global Opaque paco13_3_2. + +Hint Unfold upaco13_3_0. +Hint Unfold upaco13_3_1. +Hint Unfold upaco13_3_2. +Hint Resolve paco13_3_0_fold. +Hint Resolve paco13_3_1_fold. +Hint Resolve paco13_3_2_fold. +Hint Unfold monotone13_3. + diff --git a/src/paco14.v b/src/paco14.v index 65eb0c6..96882e9 100644 --- a/src/paco14.v +++ b/src/paco14.v @@ -1,11 +1,9 @@ Require Export paconotation pacotacuser. -Require Import pacotac. +Require Import paconotation_internal pacotac pacon. Set Implicit Arguments. -(** ** Predicates of Arity 14 -*) +Section PACO14. -Section Arg14_def. Variable T0 : Type. Variable T1 : forall (x0: @T0), Type. Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. @@ -20,156 +18,228 @@ Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. Variable T13 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11), Type. + +Record sig14T := + exist14T { + proj14T0: @T0; + proj14T1: @T1 proj14T0; + proj14T2: @T2 proj14T0 proj14T1; + proj14T3: @T3 proj14T0 proj14T1 proj14T2; + proj14T4: @T4 proj14T0 proj14T1 proj14T2 proj14T3; + proj14T5: @T5 proj14T0 proj14T1 proj14T2 proj14T3 proj14T4; + proj14T6: @T6 proj14T0 proj14T1 proj14T2 proj14T3 proj14T4 proj14T5; + proj14T7: @T7 proj14T0 proj14T1 proj14T2 proj14T3 proj14T4 proj14T5 proj14T6; + proj14T8: @T8 proj14T0 proj14T1 proj14T2 proj14T3 proj14T4 proj14T5 proj14T6 proj14T7; + proj14T9: @T9 proj14T0 proj14T1 proj14T2 proj14T3 proj14T4 proj14T5 proj14T6 proj14T7 proj14T8; + proj14T10: @T10 proj14T0 proj14T1 proj14T2 proj14T3 proj14T4 proj14T5 proj14T6 proj14T7 proj14T8 proj14T9; + proj14T11: @T11 proj14T0 proj14T1 proj14T2 proj14T3 proj14T4 proj14T5 proj14T6 proj14T7 proj14T8 proj14T9 proj14T10; + proj14T12: @T12 proj14T0 proj14T1 proj14T2 proj14T3 proj14T4 proj14T5 proj14T6 proj14T7 proj14T8 proj14T9 proj14T10 proj14T11; + proj14T13: @T13 proj14T0 proj14T1 proj14T2 proj14T3 proj14T4 proj14T5 proj14T6 proj14T7 proj14T8 proj14T9 proj14T10 proj14T11 proj14T12; + }. + +Definition uncurry14 (R: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13): rel1 sig14T := fun x => R (proj14T0 x) (proj14T1 x) (proj14T2 x) (proj14T3 x) (proj14T4 x) (proj14T5 x) (proj14T6 x) (proj14T7 x) (proj14T8 x) (proj14T9 x) (proj14T10 x) (proj14T11 x) (proj14T12 x) (proj14T13 x). + +Definition curry14 (R: rel1 sig14T): rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 := + fun x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 => R (exist14T x13). + +Lemma uncurry_map14 r0 r1 (LE : r0 <14== r1) : uncurry14 r0 <1== uncurry14 r1. +Proof. intros [] H. apply LE. auto. Qed. + +Lemma uncurry_map_rev14 r0 r1 (LE: uncurry14 r0 <1== uncurry14 r1) : r0 <14== r1. +Proof. + repeat_intros 14. intros H. apply (LE (exist14T x13) H). +Qed. + +Lemma curry_map14 r0 r1 (LE: r0 <1== r1) : curry14 r0 <14== curry14 r1. +Proof. + repeat_intros 14. intros H. apply (LE (exist14T x13) H). +Qed. + +Lemma curry_map_rev14 r0 r1 (LE: curry14 r0 <14== curry14 r1) : r0 <1== r1. +Proof. + intros [] H. apply LE. apply H. +Qed. + +Lemma uncurry_bij1_14 r : curry14 (uncurry14 r) <14== r. +Proof. unfold le14. repeat_intros 14; auto. Qed. + +Lemma uncurry_bij2_14 r : r <14== curry14 (uncurry14 r). +Proof. unfold le14. repeat_intros 14; auto. Qed. + +Lemma curry_bij1_14 r : uncurry14 (curry14 r) <1== r. +Proof. intros []; auto. Qed. + +Lemma curry_bij2_14 r : r <1== uncurry14 (curry14 r). +Proof. intros []; auto. Qed. + +Lemma uncurry_adjoint1_14 r0 r1 (LE: uncurry14 r0 <1== r1) : r0 <14== curry14 r1. +Proof. + apply uncurry_map_rev14. eapply le1_trans; [eauto|]. apply curry_bij2_14. +Qed. + +Lemma uncurry_adjoint2_14 r0 r1 (LE: r0 <14== curry14 r1) : uncurry14 r0 <1== r1. +Proof. + apply curry_map_rev14. eapply le14_trans; [|eauto]. apply uncurry_bij2_14. +Qed. + +Lemma curry_adjoint1_14 r0 r1 (LE: curry14 r0 <14== r1) : r0 <1== uncurry14 r1. +Proof. + apply curry_map_rev14. eapply le14_trans; [eauto|]. apply uncurry_bij2_14. +Qed. + +Lemma curry_adjoint2_14 r0 r1 (LE: r0 <1== uncurry14 r1) : curry14 r0 <14== r1. +Proof. + apply uncurry_map_rev14. eapply le1_trans; [|eauto]. apply curry_bij1_14. +Qed. + +(** ** Predicates of Arity 14 +*) + +Section Arg14_def. Variable gf : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13. Arguments gf : clear implicits. -CoInductive paco14( r: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : Prop := -| paco14_pfold pco - (LE : pco <14= (paco14 r \14/ r)) - (SIM: gf pco x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) -. +Definition paco14( r: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 := + curry14 (paco (fun R0 => uncurry14 (gf (curry14 R0))) (uncurry14 r)). + Definition upaco14( r: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) := paco14 r \14/ r. End Arg14_def. -Arguments paco14 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments upaco14 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. +Arguments paco14 : clear implicits. +Arguments upaco14 : clear implicits. Hint Unfold upaco14. Section Arg14_2_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. -Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. -Variable T13 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11), Type. Variable gf_0 gf_1 : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. -CoInductive paco14_2_0( r_0 r_1: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : Prop := -| paco14_2_0_pfold pco_0 pco_1 - (LE : pco_0 <14= (paco14_2_0 r_0 r_1 \14/ r_0)) - (LE : pco_1 <14= (paco14_2_1 r_0 r_1 \14/ r_1)) - (SIM: gf_0 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) -with paco14_2_1( r_0 r_1: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : Prop := -| paco14_2_1_pfold pco_0 pco_1 - (LE : pco_0 <14= (paco14_2_0 r_0 r_1 \14/ r_0)) - (LE : pco_1 <14= (paco14_2_1 r_0 r_1 \14/ r_1)) - (SIM: gf_1 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) -. +Definition paco14_2_0( r_0 r_1: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 := + curry14 (paco_2_0 (fun R0 R1 => uncurry14 (gf_0 (curry14 R0) (curry14 R1))) (fun R0 R1 => uncurry14 (gf_1 (curry14 R0) (curry14 R1))) (uncurry14 r_0) (uncurry14 r_1)). + +Definition paco14_2_1( r_0 r_1: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 := + curry14 (paco_2_1 (fun R0 R1 => uncurry14 (gf_0 (curry14 R0) (curry14 R1))) (fun R0 R1 => uncurry14 (gf_1 (curry14 R0) (curry14 R1))) (uncurry14 r_0) (uncurry14 r_1)). + Definition upaco14_2_0( r_0 r_1: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) := paco14_2_0 r_0 r_1 \14/ r_0. Definition upaco14_2_1( r_0 r_1: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) := paco14_2_1 r_0 r_1 \14/ r_1. End Arg14_2_def. -Arguments paco14_2_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments upaco14_2_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. +Arguments paco14_2_0 : clear implicits. +Arguments upaco14_2_0 : clear implicits. Hint Unfold upaco14_2_0. -Arguments paco14_2_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments upaco14_2_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. +Arguments paco14_2_1 : clear implicits. +Arguments upaco14_2_1 : clear implicits. Hint Unfold upaco14_2_1. Section Arg14_3_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. -Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. -Variable T13 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11), Type. Variable gf_0 gf_1 gf_2 : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. -CoInductive paco14_3_0( r_0 r_1 r_2: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : Prop := -| paco14_3_0_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <14= (paco14_3_0 r_0 r_1 r_2 \14/ r_0)) - (LE : pco_1 <14= (paco14_3_1 r_0 r_1 r_2 \14/ r_1)) - (LE : pco_2 <14= (paco14_3_2 r_0 r_1 r_2 \14/ r_2)) - (SIM: gf_0 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) -with paco14_3_1( r_0 r_1 r_2: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : Prop := -| paco14_3_1_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <14= (paco14_3_0 r_0 r_1 r_2 \14/ r_0)) - (LE : pco_1 <14= (paco14_3_1 r_0 r_1 r_2 \14/ r_1)) - (LE : pco_2 <14= (paco14_3_2 r_0 r_1 r_2 \14/ r_2)) - (SIM: gf_1 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) -with paco14_3_2( r_0 r_1 r_2: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : Prop := -| paco14_3_2_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <14= (paco14_3_0 r_0 r_1 r_2 \14/ r_0)) - (LE : pco_1 <14= (paco14_3_1 r_0 r_1 r_2 \14/ r_1)) - (LE : pco_2 <14= (paco14_3_2 r_0 r_1 r_2 \14/ r_2)) - (SIM: gf_2 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) -. +Definition paco14_3_0( r_0 r_1 r_2: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 := + curry14 (paco_3_0 (fun R0 R1 R2 => uncurry14 (gf_0 (curry14 R0) (curry14 R1) (curry14 R2))) (fun R0 R1 R2 => uncurry14 (gf_1 (curry14 R0) (curry14 R1) (curry14 R2))) (fun R0 R1 R2 => uncurry14 (gf_2 (curry14 R0) (curry14 R1) (curry14 R2))) (uncurry14 r_0) (uncurry14 r_1) (uncurry14 r_2)). + +Definition paco14_3_1( r_0 r_1 r_2: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 := + curry14 (paco_3_1 (fun R0 R1 R2 => uncurry14 (gf_0 (curry14 R0) (curry14 R1) (curry14 R2))) (fun R0 R1 R2 => uncurry14 (gf_1 (curry14 R0) (curry14 R1) (curry14 R2))) (fun R0 R1 R2 => uncurry14 (gf_2 (curry14 R0) (curry14 R1) (curry14 R2))) (uncurry14 r_0) (uncurry14 r_1) (uncurry14 r_2)). + +Definition paco14_3_2( r_0 r_1 r_2: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 := + curry14 (paco_3_2 (fun R0 R1 R2 => uncurry14 (gf_0 (curry14 R0) (curry14 R1) (curry14 R2))) (fun R0 R1 R2 => uncurry14 (gf_1 (curry14 R0) (curry14 R1) (curry14 R2))) (fun R0 R1 R2 => uncurry14 (gf_2 (curry14 R0) (curry14 R1) (curry14 R2))) (uncurry14 r_0) (uncurry14 r_1) (uncurry14 r_2)). + Definition upaco14_3_0( r_0 r_1 r_2: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) := paco14_3_0 r_0 r_1 r_2 \14/ r_0. Definition upaco14_3_1( r_0 r_1 r_2: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) := paco14_3_1 r_0 r_1 r_2 \14/ r_1. Definition upaco14_3_2( r_0 r_1 r_2: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) := paco14_3_2 r_0 r_1 r_2 \14/ r_2. End Arg14_3_def. -Arguments paco14_3_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments upaco14_3_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. +Arguments paco14_3_0 : clear implicits. +Arguments upaco14_3_0 : clear implicits. Hint Unfold upaco14_3_0. -Arguments paco14_3_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments upaco14_3_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. +Arguments paco14_3_1 : clear implicits. +Arguments upaco14_3_1 : clear implicits. Hint Unfold upaco14_3_1. -Arguments paco14_3_2 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments upaco14_3_2 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. +Arguments paco14_3_2 : clear implicits. +Arguments upaco14_3_2 : clear implicits. Hint Unfold upaco14_3_2. -(* Less than or equal - internal use only *) -Notation "p <_paco_14= q" := - (forall _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 _paco_x10 _paco_x11 _paco_x12 _paco_x13 (PR: p _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 _paco_x10 _paco_x11 _paco_x12 _paco_x13 : Prop), q _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 _paco_x10 _paco_x11 _paco_x12 _paco_x13 : Prop) - (at level 50, no associativity). - (** 1 Mutual Coinduction *) Section Arg14_1. -Definition monotone14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 (gf: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) := +Definition monotone14 (gf: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 r r' (IN: gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) (LE: r <14= r'), gf r' x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. -Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. -Variable T13 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11), Type. +Definition _monotone14 (gf: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) := + forall r r'(LE: r <14= r'), gf r <14== gf r'. + +Lemma monotone14_eq (gf: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) : + monotone14 gf <-> _monotone14 gf. +Proof. unfold monotone14, _monotone14, le14. split; eauto. Qed. + +Lemma monotone14_map (gf: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) + (MON: _monotone14 gf) : + _monotone (fun R0 => uncurry14 (gf (curry14 R0))). +Proof. + repeat_intros 3. apply uncurry_map14. apply MON; apply curry_map14; auto. +Qed. + Variable gf : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13. Arguments gf : clear implicits. +Theorem _paco14_mon: _monotone14 (paco14 gf). +Proof. + repeat_intros 3. eapply curry_map14, _paco_mon; apply uncurry_map14; auto. +Qed. + +Theorem _paco14_acc: forall + l r (OBG: forall rr (INC: r <14== rr) (CIH: l <14== rr), l <14== paco14 gf rr), + l <14== paco14 gf r. +Proof. + intros. apply uncurry_adjoint1_14. + eapply _paco_acc. intros. + apply uncurry_adjoint1_14 in INC. apply uncurry_adjoint1_14 in CIH. + apply uncurry_adjoint2_14. + eapply le14_trans. eapply (OBG _ INC CIH). + apply curry_map14. + apply _paco_mon; try apply le1_refl; apply curry_bij1_14. +Qed. + +Theorem _paco14_mult_strong: forall r, + paco14 gf (upaco14 gf r) <14== paco14 gf r. +Proof. + intros. apply curry_map14. + eapply le1_trans; [| eapply _paco_mult_strong]. + apply _paco_mon; intros []; eauto. +Qed. + +Theorem _paco14_fold: forall r, + gf (upaco14 gf r) <14== paco14 gf r. +Proof. + intros. apply uncurry_adjoint1_14. + eapply le1_trans; [| apply _paco_fold]. apply le1_refl. +Qed. + +Theorem _paco14_unfold: forall (MON: _monotone14 gf) r, + paco14 gf r <14== gf (upaco14 gf r). +Proof. + intros. apply curry_adjoint2_14. + eapply _paco_unfold; apply monotone14_map; auto. +Qed. + Theorem paco14_acc: forall - l r (OBG: forall rr (INC: r <14= rr) (CIH: l <_paco_14= rr), l <_paco_14= paco14 gf rr), + l r (OBG: forall rr (INC: r <14= rr) (CIH: l <14= rr), l <14= paco14 gf rr), l <14= paco14 gf r. Proof. - intros; assert (SIM: paco14 gf (r \14/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) by eauto. - clear PR; repeat (try left; do 15 paco_revert; paco_cofix_auto). + apply _paco14_acc. Qed. Theorem paco14_mon: monotone14 (paco14 gf). -Proof. paco_cofix_auto; repeat (left; do 15 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone14_eq. + apply _paco14_mon. +Qed. Theorem paco14_mult_strong: forall r, paco14 gf (upaco14 gf r) <14= paco14 gf r. -Proof. paco_cofix_auto; repeat (left; do 15 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco14_mult_strong. +Qed. Corollary paco14_mult: forall r, paco14 gf (paco14 gf r) <14= paco14 gf r. @@ -177,25 +247,26 @@ Proof. intros; eapply paco14_mult_strong, paco14_mon; eauto. Qed. Theorem paco14_fold: forall r, gf (upaco14 gf r) <14= paco14 gf r. -Proof. intros; econstructor; [ |eauto]; eauto. Qed. +Proof. + apply _paco14_fold. +Qed. Theorem paco14_unfold: forall (MON: monotone14 gf) r, paco14 gf r <14= gf (upaco14 gf r). -Proof. unfold monotone14; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 1. eapply _paco14_unfold; apply monotone14_eq; auto. +Qed. End Arg14_1. -Hint Unfold monotone14. -Hint Resolve paco14_fold. - -Arguments paco14_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. +Arguments paco14_acc : clear implicits. +Arguments paco14_mon : clear implicits. +Arguments paco14_mult_strong : clear implicits. +Arguments paco14_mult : clear implicits. +Arguments paco14_fold : clear implicits. +Arguments paco14_unfold : clear implicits. -Instance paco14_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 (gf : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13->_) r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : paco_class (paco14 gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) := +Global Instance paco14_inst (gf : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13->_) r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : paco_class (paco14 gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) := { pacoacc := paco14_acc gf; pacomult := paco14_mult gf; pacofold := paco14_fold gf; @@ -205,56 +276,144 @@ Instance paco14_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 (gf : rel14 Section Arg14_2. -Definition monotone14_2 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 (gf: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) := +Definition monotone14_2 (gf: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) (LE_0: r_0 <14= r'_0)(LE_1: r_1 <14= r'_1), gf r'_0 r'_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. -Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. -Variable T13 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11), Type. +Definition _monotone14_2 (gf: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <14= r'_0)(LE_1: r_1 <14= r'_1), gf r_0 r_1 <14== gf r'_0 r'_1. + +Lemma monotone14_2_eq (gf: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) : + monotone14_2 gf <-> _monotone14_2 gf. +Proof. unfold monotone14_2, _monotone14_2, le14. split; eauto. Qed. + +Lemma monotone14_2_map (gf: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) + (MON: _monotone14_2 gf) : + _monotone_2 (fun R0 R1 => uncurry14 (gf (curry14 R0) (curry14 R1))). +Proof. + repeat_intros 6. apply uncurry_map14. apply MON; apply curry_map14; auto. +Qed. + Variable gf_0 gf_1 : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. +Theorem _paco14_2_0_mon: _monotone14_2 (paco14_2_0 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map14, _paco_2_0_mon; apply uncurry_map14; auto. +Qed. + +Theorem _paco14_2_1_mon: _monotone14_2 (paco14_2_1 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map14, _paco_2_1_mon; apply uncurry_map14; auto. +Qed. + +Theorem _paco14_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <14== rr) (CIH: l <14== rr), l <14== paco14_2_0 gf_0 gf_1 rr r_1), + l <14== paco14_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_14. + eapply _paco_2_0_acc. intros. + apply uncurry_adjoint1_14 in INC. apply uncurry_adjoint1_14 in CIH. + apply uncurry_adjoint2_14. + eapply le14_trans. eapply (OBG _ INC CIH). + apply curry_map14. + apply _paco_2_0_mon; try apply le1_refl; apply curry_bij1_14. +Qed. + +Theorem _paco14_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <14== rr) (CIH: l <14== rr), l <14== paco14_2_1 gf_0 gf_1 r_0 rr), + l <14== paco14_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_14. + eapply _paco_2_1_acc. intros. + apply uncurry_adjoint1_14 in INC. apply uncurry_adjoint1_14 in CIH. + apply uncurry_adjoint2_14. + eapply le14_trans. eapply (OBG _ INC CIH). + apply curry_map14. + apply _paco_2_1_mon; try apply le1_refl; apply curry_bij1_14. +Qed. + +Theorem _paco14_2_0_mult_strong: forall r_0 r_1, + paco14_2_0 gf_0 gf_1 (upaco14_2_0 gf_0 gf_1 r_0 r_1) (upaco14_2_1 gf_0 gf_1 r_0 r_1) <14== paco14_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map14. + eapply le1_trans; [| eapply _paco_2_0_mult_strong]. + apply _paco_2_0_mon; intros []; eauto. +Qed. + +Theorem _paco14_2_1_mult_strong: forall r_0 r_1, + paco14_2_1 gf_0 gf_1 (upaco14_2_0 gf_0 gf_1 r_0 r_1) (upaco14_2_1 gf_0 gf_1 r_0 r_1) <14== paco14_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map14. + eapply le1_trans; [| eapply _paco_2_1_mult_strong]. + apply _paco_2_1_mon; intros []; eauto. +Qed. + +Theorem _paco14_2_0_fold: forall r_0 r_1, + gf_0 (upaco14_2_0 gf_0 gf_1 r_0 r_1) (upaco14_2_1 gf_0 gf_1 r_0 r_1) <14== paco14_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_14. + eapply le1_trans; [| apply _paco_2_0_fold]. apply le1_refl. +Qed. + +Theorem _paco14_2_1_fold: forall r_0 r_1, + gf_1 (upaco14_2_0 gf_0 gf_1 r_0 r_1) (upaco14_2_1 gf_0 gf_1 r_0 r_1) <14== paco14_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_14. + eapply le1_trans; [| apply _paco_2_1_fold]. apply le1_refl. +Qed. + +Theorem _paco14_2_0_unfold: forall (MON: _monotone14_2 gf_0) (MON: _monotone14_2 gf_1) r_0 r_1, + paco14_2_0 gf_0 gf_1 r_0 r_1 <14== gf_0 (upaco14_2_0 gf_0 gf_1 r_0 r_1) (upaco14_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_14. + eapply _paco_2_0_unfold; apply monotone14_2_map; auto. +Qed. + +Theorem _paco14_2_1_unfold: forall (MON: _monotone14_2 gf_0) (MON: _monotone14_2 gf_1) r_0 r_1, + paco14_2_1 gf_0 gf_1 r_0 r_1 <14== gf_1 (upaco14_2_0 gf_0 gf_1 r_0 r_1) (upaco14_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_14. + eapply _paco_2_1_unfold; apply monotone14_2_map; auto. +Qed. + Theorem paco14_2_0_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_0 <14= rr) (CIH: l <_paco_14= rr), l <_paco_14= paco14_2_0 gf_0 gf_1 rr r_1), + l r_0 r_1 (OBG: forall rr (INC: r_0 <14= rr) (CIH: l <14= rr), l <14= paco14_2_0 gf_0 gf_1 rr r_1), l <14= paco14_2_0 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco14_2_0 gf_0 gf_1 (r_0 \14/ l) r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) by eauto. - clear PR; repeat (try left; do 15 paco_revert; paco_cofix_auto). + apply _paco14_2_0_acc. Qed. Theorem paco14_2_1_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_1 <14= rr) (CIH: l <_paco_14= rr), l <_paco_14= paco14_2_1 gf_0 gf_1 r_0 rr), + l r_0 r_1 (OBG: forall rr (INC: r_1 <14= rr) (CIH: l <14= rr), l <14= paco14_2_1 gf_0 gf_1 r_0 rr), l <14= paco14_2_1 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco14_2_1 gf_0 gf_1 r_0 (r_1 \14/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) by eauto. - clear PR; repeat (try left; do 15 paco_revert; paco_cofix_auto). + apply _paco14_2_1_acc. Qed. Theorem paco14_2_0_mon: monotone14_2 (paco14_2_0 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 15 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone14_2_eq. + apply _paco14_2_0_mon. +Qed. Theorem paco14_2_1_mon: monotone14_2 (paco14_2_1 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 15 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone14_2_eq. + apply _paco14_2_1_mon. +Qed. Theorem paco14_2_0_mult_strong: forall r_0 r_1, paco14_2_0 gf_0 gf_1 (upaco14_2_0 gf_0 gf_1 r_0 r_1) (upaco14_2_1 gf_0 gf_1 r_0 r_1) <14= paco14_2_0 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 15 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco14_2_0_mult_strong. +Qed. Theorem paco14_2_1_mult_strong: forall r_0 r_1, paco14_2_1 gf_0 gf_1 (upaco14_2_0 gf_0 gf_1 r_0 r_1) (upaco14_2_1 gf_0 gf_1 r_0 r_1) <14= paco14_2_1 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 15 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco14_2_1_mult_strong. +Qed. Corollary paco14_2_0_mult: forall r_0 r_1, paco14_2_0 gf_0 gf_1 (paco14_2_0 gf_0 gf_1 r_0 r_1) (paco14_2_1 gf_0 gf_1 r_0 r_1) <14= paco14_2_0 gf_0 gf_1 r_0 r_1. @@ -266,46 +425,50 @@ Proof. intros; eapply paco14_2_1_mult_strong, paco14_2_1_mon; eauto. Qed. Theorem paco14_2_0_fold: forall r_0 r_1, gf_0 (upaco14_2_0 gf_0 gf_1 r_0 r_1) (upaco14_2_1 gf_0 gf_1 r_0 r_1) <14= paco14_2_0 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco14_2_0_fold. +Qed. Theorem paco14_2_1_fold: forall r_0 r_1, gf_1 (upaco14_2_0 gf_0 gf_1 r_0 r_1) (upaco14_2_1 gf_0 gf_1 r_0 r_1) <14= paco14_2_1 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco14_2_1_fold. +Qed. Theorem paco14_2_0_unfold: forall (MON: monotone14_2 gf_0) (MON: monotone14_2 gf_1) r_0 r_1, paco14_2_0 gf_0 gf_1 r_0 r_1 <14= gf_0 (upaco14_2_0 gf_0 gf_1 r_0 r_1) (upaco14_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone14_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco14_2_0_unfold; apply monotone14_2_eq; auto. +Qed. Theorem paco14_2_1_unfold: forall (MON: monotone14_2 gf_0) (MON: monotone14_2 gf_1) r_0 r_1, paco14_2_1 gf_0 gf_1 r_0 r_1 <14= gf_1 (upaco14_2_0 gf_0 gf_1 r_0 r_1) (upaco14_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone14_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco14_2_1_unfold; apply monotone14_2_eq; auto. +Qed. End Arg14_2. -Hint Unfold monotone14_2. -Hint Resolve paco14_2_0_fold. -Hint Resolve paco14_2_1_fold. - -Arguments paco14_2_0_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_2_1_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_2_0_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_2_1_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_2_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_2_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_2_0_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_2_1_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_2_0_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_2_1_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_2_0_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_2_1_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. - -Instance paco14_2_0_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 (gf_0 gf_1 : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : paco_class (paco14_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) := +Arguments paco14_2_0_acc : clear implicits. +Arguments paco14_2_1_acc : clear implicits. +Arguments paco14_2_0_mon : clear implicits. +Arguments paco14_2_1_mon : clear implicits. +Arguments paco14_2_0_mult_strong : clear implicits. +Arguments paco14_2_1_mult_strong : clear implicits. +Arguments paco14_2_0_mult : clear implicits. +Arguments paco14_2_1_mult : clear implicits. +Arguments paco14_2_0_fold : clear implicits. +Arguments paco14_2_1_fold : clear implicits. +Arguments paco14_2_0_unfold : clear implicits. +Arguments paco14_2_1_unfold : clear implicits. + +Global Instance paco14_2_0_inst (gf_0 gf_1 : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : paco_class (paco14_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) := { pacoacc := paco14_2_0_acc gf_0 gf_1; pacomult := paco14_2_0_mult gf_0 gf_1; pacofold := paco14_2_0_fold gf_0 gf_1; pacounfold := paco14_2_0_unfold gf_0 gf_1 }. -Instance paco14_2_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 (gf_0 gf_1 : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : paco_class (paco14_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) := +Global Instance paco14_2_1_inst (gf_0 gf_1 : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : paco_class (paco14_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) := { pacoacc := paco14_2_1_acc gf_0 gf_1; pacomult := paco14_2_1_mult gf_0 gf_1; pacofold := paco14_2_1_fold gf_0 gf_1; @@ -315,72 +478,204 @@ Instance paco14_2_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 (gf_0 gf Section Arg14_3. -Definition monotone14_3 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 (gf: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) := +Definition monotone14_3 (gf: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) (LE_0: r_0 <14= r'_0)(LE_1: r_1 <14= r'_1)(LE_2: r_2 <14= r'_2), gf r'_0 r'_1 r'_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. -Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. -Variable T13 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11), Type. +Definition _monotone14_3 (gf: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <14= r'_0)(LE_1: r_1 <14= r'_1)(LE_2: r_2 <14= r'_2), gf r_0 r_1 r_2 <14== gf r'_0 r'_1 r'_2. + +Lemma monotone14_3_eq (gf: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) : + monotone14_3 gf <-> _monotone14_3 gf. +Proof. unfold monotone14_3, _monotone14_3, le14. split; eauto. Qed. + +Lemma monotone14_3_map (gf: rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) + (MON: _monotone14_3 gf) : + _monotone_3 (fun R0 R1 R2 => uncurry14 (gf (curry14 R0) (curry14 R1) (curry14 R2))). +Proof. + repeat_intros 9. apply uncurry_map14. apply MON; apply curry_map14; auto. +Qed. + Variable gf_0 gf_1 gf_2 : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 -> rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. +Theorem _paco14_3_0_mon: _monotone14_3 (paco14_3_0 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map14, _paco_3_0_mon; apply uncurry_map14; auto. +Qed. + +Theorem _paco14_3_1_mon: _monotone14_3 (paco14_3_1 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map14, _paco_3_1_mon; apply uncurry_map14; auto. +Qed. + +Theorem _paco14_3_2_mon: _monotone14_3 (paco14_3_2 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map14, _paco_3_2_mon; apply uncurry_map14; auto. +Qed. + +Theorem _paco14_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <14== rr) (CIH: l <14== rr), l <14== paco14_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <14== paco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_14. + eapply _paco_3_0_acc. intros. + apply uncurry_adjoint1_14 in INC. apply uncurry_adjoint1_14 in CIH. + apply uncurry_adjoint2_14. + eapply le14_trans. eapply (OBG _ INC CIH). + apply curry_map14. + apply _paco_3_0_mon; try apply le1_refl; apply curry_bij1_14. +Qed. + +Theorem _paco14_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <14== rr) (CIH: l <14== rr), l <14== paco14_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <14== paco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_14. + eapply _paco_3_1_acc. intros. + apply uncurry_adjoint1_14 in INC. apply uncurry_adjoint1_14 in CIH. + apply uncurry_adjoint2_14. + eapply le14_trans. eapply (OBG _ INC CIH). + apply curry_map14. + apply _paco_3_1_mon; try apply le1_refl; apply curry_bij1_14. +Qed. + +Theorem _paco14_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <14== rr) (CIH: l <14== rr), l <14== paco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <14== paco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_14. + eapply _paco_3_2_acc. intros. + apply uncurry_adjoint1_14 in INC. apply uncurry_adjoint1_14 in CIH. + apply uncurry_adjoint2_14. + eapply le14_trans. eapply (OBG _ INC CIH). + apply curry_map14. + apply _paco_3_2_mon; try apply le1_refl; apply curry_bij1_14. +Qed. + +Theorem _paco14_3_0_mult_strong: forall r_0 r_1 r_2, + paco14_3_0 gf_0 gf_1 gf_2 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <14== paco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map14. + eapply le1_trans; [| eapply _paco_3_0_mult_strong]. + apply _paco_3_0_mon; intros []; eauto. +Qed. + +Theorem _paco14_3_1_mult_strong: forall r_0 r_1 r_2, + paco14_3_1 gf_0 gf_1 gf_2 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <14== paco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map14. + eapply le1_trans; [| eapply _paco_3_1_mult_strong]. + apply _paco_3_1_mon; intros []; eauto. +Qed. + +Theorem _paco14_3_2_mult_strong: forall r_0 r_1 r_2, + paco14_3_2 gf_0 gf_1 gf_2 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <14== paco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map14. + eapply le1_trans; [| eapply _paco_3_2_mult_strong]. + apply _paco_3_2_mon; intros []; eauto. +Qed. + +Theorem _paco14_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <14== paco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_14. + eapply le1_trans; [| apply _paco_3_0_fold]. apply le1_refl. +Qed. + +Theorem _paco14_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <14== paco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_14. + eapply le1_trans; [| apply _paco_3_1_fold]. apply le1_refl. +Qed. + +Theorem _paco14_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <14== paco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_14. + eapply le1_trans; [| apply _paco_3_2_fold]. apply le1_refl. +Qed. + +Theorem _paco14_3_0_unfold: forall (MON: _monotone14_3 gf_0) (MON: _monotone14_3 gf_1) (MON: _monotone14_3 gf_2) r_0 r_1 r_2, + paco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <14== gf_0 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_14. + eapply _paco_3_0_unfold; apply monotone14_3_map; auto. +Qed. + +Theorem _paco14_3_1_unfold: forall (MON: _monotone14_3 gf_0) (MON: _monotone14_3 gf_1) (MON: _monotone14_3 gf_2) r_0 r_1 r_2, + paco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <14== gf_1 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_14. + eapply _paco_3_1_unfold; apply monotone14_3_map; auto. +Qed. + +Theorem _paco14_3_2_unfold: forall (MON: _monotone14_3 gf_0) (MON: _monotone14_3 gf_1) (MON: _monotone14_3 gf_2) r_0 r_1 r_2, + paco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <14== gf_2 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_14. + eapply _paco_3_2_unfold; apply monotone14_3_map; auto. +Qed. + Theorem paco14_3_0_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <14= rr) (CIH: l <_paco_14= rr), l <_paco_14= paco14_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <14= rr) (CIH: l <14= rr), l <14= paco14_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), l <14= paco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco14_3_0 gf_0 gf_1 gf_2 (r_0 \14/ l) r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) by eauto. - clear PR; repeat (try left; do 15 paco_revert; paco_cofix_auto). + apply _paco14_3_0_acc. Qed. Theorem paco14_3_1_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <14= rr) (CIH: l <_paco_14= rr), l <_paco_14= paco14_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <14= rr) (CIH: l <14= rr), l <14= paco14_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), l <14= paco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco14_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \14/ l) r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) by eauto. - clear PR; repeat (try left; do 15 paco_revert; paco_cofix_auto). + apply _paco14_3_1_acc. Qed. Theorem paco14_3_2_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <14= rr) (CIH: l <_paco_14= rr), l <_paco_14= paco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <14= rr) (CIH: l <14= rr), l <14= paco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), l <14= paco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \14/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) by eauto. - clear PR; repeat (try left; do 15 paco_revert; paco_cofix_auto). + apply _paco14_3_2_acc. Qed. Theorem paco14_3_0_mon: monotone14_3 (paco14_3_0 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 15 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone14_3_eq. + apply _paco14_3_0_mon. +Qed. Theorem paco14_3_1_mon: monotone14_3 (paco14_3_1 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 15 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone14_3_eq. + apply _paco14_3_1_mon. +Qed. Theorem paco14_3_2_mon: monotone14_3 (paco14_3_2 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 15 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone14_3_eq. + apply _paco14_3_2_mon. +Qed. Theorem paco14_3_0_mult_strong: forall r_0 r_1 r_2, paco14_3_0 gf_0 gf_1 gf_2 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <14= paco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 15 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco14_3_0_mult_strong. +Qed. Theorem paco14_3_1_mult_strong: forall r_0 r_1 r_2, paco14_3_1 gf_0 gf_1 gf_2 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <14= paco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 15 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco14_3_1_mult_strong. +Qed. Theorem paco14_3_2_mult_strong: forall r_0 r_1 r_2, paco14_3_2 gf_0 gf_1 gf_2 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <14= paco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 15 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco14_3_2_mult_strong. +Qed. Corollary paco14_3_0_mult: forall r_0 r_1 r_2, paco14_3_0 gf_0 gf_1 gf_2 (paco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <14= paco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. @@ -396,69 +691,105 @@ Proof. intros; eapply paco14_3_2_mult_strong, paco14_3_2_mon; eauto. Qed. Theorem paco14_3_0_fold: forall r_0 r_1 r_2, gf_0 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <14= paco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco14_3_0_fold. +Qed. Theorem paco14_3_1_fold: forall r_0 r_1 r_2, gf_1 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <14= paco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco14_3_1_fold. +Qed. Theorem paco14_3_2_fold: forall r_0 r_1 r_2, gf_2 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <14= paco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco14_3_2_fold. +Qed. Theorem paco14_3_0_unfold: forall (MON: monotone14_3 gf_0) (MON: monotone14_3 gf_1) (MON: monotone14_3 gf_2) r_0 r_1 r_2, paco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <14= gf_0 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone14_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco14_3_0_unfold; apply monotone14_3_eq; auto. +Qed. Theorem paco14_3_1_unfold: forall (MON: monotone14_3 gf_0) (MON: monotone14_3 gf_1) (MON: monotone14_3 gf_2) r_0 r_1 r_2, paco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <14= gf_1 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone14_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco14_3_1_unfold; apply monotone14_3_eq; auto. +Qed. Theorem paco14_3_2_unfold: forall (MON: monotone14_3 gf_0) (MON: monotone14_3 gf_1) (MON: monotone14_3 gf_2) r_0 r_1 r_2, paco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <14= gf_2 (upaco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone14_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco14_3_2_unfold; apply monotone14_3_eq; auto. +Qed. End Arg14_3. -Hint Unfold monotone14_3. -Hint Resolve paco14_3_0_fold. -Hint Resolve paco14_3_1_fold. -Hint Resolve paco14_3_2_fold. - -Arguments paco14_3_0_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_1_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_2_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_0_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_1_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_2_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_2_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_0_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_1_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_2_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_0_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_1_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_2_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_0_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_1_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. -Arguments paco14_3_2_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 ]. - -Instance paco14_3_0_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 (gf_0 gf_1 gf_2 : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : paco_class (paco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) := +Arguments paco14_3_0_acc : clear implicits. +Arguments paco14_3_1_acc : clear implicits. +Arguments paco14_3_2_acc : clear implicits. +Arguments paco14_3_0_mon : clear implicits. +Arguments paco14_3_1_mon : clear implicits. +Arguments paco14_3_2_mon : clear implicits. +Arguments paco14_3_0_mult_strong : clear implicits. +Arguments paco14_3_1_mult_strong : clear implicits. +Arguments paco14_3_2_mult_strong : clear implicits. +Arguments paco14_3_0_mult : clear implicits. +Arguments paco14_3_1_mult : clear implicits. +Arguments paco14_3_2_mult : clear implicits. +Arguments paco14_3_0_fold : clear implicits. +Arguments paco14_3_1_fold : clear implicits. +Arguments paco14_3_2_fold : clear implicits. +Arguments paco14_3_0_unfold : clear implicits. +Arguments paco14_3_1_unfold : clear implicits. +Arguments paco14_3_2_unfold : clear implicits. + +Global Instance paco14_3_0_inst (gf_0 gf_1 gf_2 : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : paco_class (paco14_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) := { pacoacc := paco14_3_0_acc gf_0 gf_1 gf_2; pacomult := paco14_3_0_mult gf_0 gf_1 gf_2; pacofold := paco14_3_0_fold gf_0 gf_1 gf_2; pacounfold := paco14_3_0_unfold gf_0 gf_1 gf_2 }. -Instance paco14_3_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 (gf_0 gf_1 gf_2 : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : paco_class (paco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) := +Global Instance paco14_3_1_inst (gf_0 gf_1 gf_2 : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : paco_class (paco14_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) := { pacoacc := paco14_3_1_acc gf_0 gf_1 gf_2; pacomult := paco14_3_1_mult gf_0 gf_1 gf_2; pacofold := paco14_3_1_fold gf_0 gf_1 gf_2; pacounfold := paco14_3_1_unfold gf_0 gf_1 gf_2 }. -Instance paco14_3_2_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 (gf_0 gf_1 gf_2 : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : paco_class (paco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) := +Global Instance paco14_3_2_inst (gf_0 gf_1 gf_2 : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : paco_class (paco14_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) := { pacoacc := paco14_3_2_acc gf_0 gf_1 gf_2; pacomult := paco14_3_2_mult gf_0 gf_1 gf_2; pacofold := paco14_3_2_fold gf_0 gf_1 gf_2; pacounfold := paco14_3_2_unfold gf_0 gf_1 gf_2 }. +End PACO14. + +Global Opaque paco14. + +Hint Unfold upaco14. +Hint Resolve paco14_fold. +Hint Unfold monotone14. + +Global Opaque paco14_2_0. +Global Opaque paco14_2_1. + +Hint Unfold upaco14_2_0. +Hint Unfold upaco14_2_1. +Hint Resolve paco14_2_0_fold. +Hint Resolve paco14_2_1_fold. +Hint Unfold monotone14_2. + +Global Opaque paco14_3_0. +Global Opaque paco14_3_1. +Global Opaque paco14_3_2. + +Hint Unfold upaco14_3_0. +Hint Unfold upaco14_3_1. +Hint Unfold upaco14_3_2. +Hint Resolve paco14_3_0_fold. +Hint Resolve paco14_3_1_fold. +Hint Resolve paco14_3_2_fold. +Hint Unfold monotone14_3. + diff --git a/src/paco15.v b/src/paco15.v index ab5a4b4..0e9aa1c 100644 --- a/src/paco15.v +++ b/src/paco15.v @@ -1,11 +1,9 @@ Require Export paconotation pacotacuser. -Require Import pacotac. +Require Import paconotation_internal pacotac pacon. Set Implicit Arguments. -(** ** Predicates of Arity 15 -*) +Section PACO15. -Section Arg15_def. Variable T0 : Type. Variable T1 : forall (x0: @T0), Type. Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. @@ -21,159 +19,229 @@ Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. Variable T13 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11), Type. Variable T14 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) (x13: @T13 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12), Type. + +Record sig15T := + exist15T { + proj15T0: @T0; + proj15T1: @T1 proj15T0; + proj15T2: @T2 proj15T0 proj15T1; + proj15T3: @T3 proj15T0 proj15T1 proj15T2; + proj15T4: @T4 proj15T0 proj15T1 proj15T2 proj15T3; + proj15T5: @T5 proj15T0 proj15T1 proj15T2 proj15T3 proj15T4; + proj15T6: @T6 proj15T0 proj15T1 proj15T2 proj15T3 proj15T4 proj15T5; + proj15T7: @T7 proj15T0 proj15T1 proj15T2 proj15T3 proj15T4 proj15T5 proj15T6; + proj15T8: @T8 proj15T0 proj15T1 proj15T2 proj15T3 proj15T4 proj15T5 proj15T6 proj15T7; + proj15T9: @T9 proj15T0 proj15T1 proj15T2 proj15T3 proj15T4 proj15T5 proj15T6 proj15T7 proj15T8; + proj15T10: @T10 proj15T0 proj15T1 proj15T2 proj15T3 proj15T4 proj15T5 proj15T6 proj15T7 proj15T8 proj15T9; + proj15T11: @T11 proj15T0 proj15T1 proj15T2 proj15T3 proj15T4 proj15T5 proj15T6 proj15T7 proj15T8 proj15T9 proj15T10; + proj15T12: @T12 proj15T0 proj15T1 proj15T2 proj15T3 proj15T4 proj15T5 proj15T6 proj15T7 proj15T8 proj15T9 proj15T10 proj15T11; + proj15T13: @T13 proj15T0 proj15T1 proj15T2 proj15T3 proj15T4 proj15T5 proj15T6 proj15T7 proj15T8 proj15T9 proj15T10 proj15T11 proj15T12; + proj15T14: @T14 proj15T0 proj15T1 proj15T2 proj15T3 proj15T4 proj15T5 proj15T6 proj15T7 proj15T8 proj15T9 proj15T10 proj15T11 proj15T12 proj15T13; + }. + +Definition uncurry15 (R: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14): rel1 sig15T := fun x => R (proj15T0 x) (proj15T1 x) (proj15T2 x) (proj15T3 x) (proj15T4 x) (proj15T5 x) (proj15T6 x) (proj15T7 x) (proj15T8 x) (proj15T9 x) (proj15T10 x) (proj15T11 x) (proj15T12 x) (proj15T13 x) (proj15T14 x). + +Definition curry15 (R: rel1 sig15T): rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 := + fun x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 => R (exist15T x14). + +Lemma uncurry_map15 r0 r1 (LE : r0 <15== r1) : uncurry15 r0 <1== uncurry15 r1. +Proof. intros [] H. apply LE. auto. Qed. + +Lemma uncurry_map_rev15 r0 r1 (LE: uncurry15 r0 <1== uncurry15 r1) : r0 <15== r1. +Proof. + repeat_intros 15. intros H. apply (LE (exist15T x14) H). +Qed. + +Lemma curry_map15 r0 r1 (LE: r0 <1== r1) : curry15 r0 <15== curry15 r1. +Proof. + repeat_intros 15. intros H. apply (LE (exist15T x14) H). +Qed. + +Lemma curry_map_rev15 r0 r1 (LE: curry15 r0 <15== curry15 r1) : r0 <1== r1. +Proof. + intros [] H. apply LE. apply H. +Qed. + +Lemma uncurry_bij1_15 r : curry15 (uncurry15 r) <15== r. +Proof. unfold le15. repeat_intros 15; auto. Qed. + +Lemma uncurry_bij2_15 r : r <15== curry15 (uncurry15 r). +Proof. unfold le15. repeat_intros 15; auto. Qed. + +Lemma curry_bij1_15 r : uncurry15 (curry15 r) <1== r. +Proof. intros []; auto. Qed. + +Lemma curry_bij2_15 r : r <1== uncurry15 (curry15 r). +Proof. intros []; auto. Qed. + +Lemma uncurry_adjoint1_15 r0 r1 (LE: uncurry15 r0 <1== r1) : r0 <15== curry15 r1. +Proof. + apply uncurry_map_rev15. eapply le1_trans; [eauto|]. apply curry_bij2_15. +Qed. + +Lemma uncurry_adjoint2_15 r0 r1 (LE: r0 <15== curry15 r1) : uncurry15 r0 <1== r1. +Proof. + apply curry_map_rev15. eapply le15_trans; [|eauto]. apply uncurry_bij2_15. +Qed. + +Lemma curry_adjoint1_15 r0 r1 (LE: curry15 r0 <15== r1) : r0 <1== uncurry15 r1. +Proof. + apply curry_map_rev15. eapply le15_trans; [eauto|]. apply uncurry_bij2_15. +Qed. + +Lemma curry_adjoint2_15 r0 r1 (LE: r0 <1== uncurry15 r1) : curry15 r0 <15== r1. +Proof. + apply uncurry_map_rev15. eapply le1_trans; [|eauto]. apply curry_bij1_15. +Qed. + +(** ** Predicates of Arity 15 +*) + +Section Arg15_def. Variable gf : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14. Arguments gf : clear implicits. -CoInductive paco15( r: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : Prop := -| paco15_pfold pco - (LE : pco <15= (paco15 r \15/ r)) - (SIM: gf pco x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) -. +Definition paco15( r: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 := + curry15 (paco (fun R0 => uncurry15 (gf (curry15 R0))) (uncurry15 r)). + Definition upaco15( r: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) := paco15 r \15/ r. End Arg15_def. -Arguments paco15 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments upaco15 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. +Arguments paco15 : clear implicits. +Arguments upaco15 : clear implicits. Hint Unfold upaco15. Section Arg15_2_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. -Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. -Variable T13 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11), Type. -Variable T14 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) (x13: @T13 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12), Type. Variable gf_0 gf_1 : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. -CoInductive paco15_2_0( r_0 r_1: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : Prop := -| paco15_2_0_pfold pco_0 pco_1 - (LE : pco_0 <15= (paco15_2_0 r_0 r_1 \15/ r_0)) - (LE : pco_1 <15= (paco15_2_1 r_0 r_1 \15/ r_1)) - (SIM: gf_0 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) -with paco15_2_1( r_0 r_1: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : Prop := -| paco15_2_1_pfold pco_0 pco_1 - (LE : pco_0 <15= (paco15_2_0 r_0 r_1 \15/ r_0)) - (LE : pco_1 <15= (paco15_2_1 r_0 r_1 \15/ r_1)) - (SIM: gf_1 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) -. +Definition paco15_2_0( r_0 r_1: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 := + curry15 (paco_2_0 (fun R0 R1 => uncurry15 (gf_0 (curry15 R0) (curry15 R1))) (fun R0 R1 => uncurry15 (gf_1 (curry15 R0) (curry15 R1))) (uncurry15 r_0) (uncurry15 r_1)). + +Definition paco15_2_1( r_0 r_1: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 := + curry15 (paco_2_1 (fun R0 R1 => uncurry15 (gf_0 (curry15 R0) (curry15 R1))) (fun R0 R1 => uncurry15 (gf_1 (curry15 R0) (curry15 R1))) (uncurry15 r_0) (uncurry15 r_1)). + Definition upaco15_2_0( r_0 r_1: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) := paco15_2_0 r_0 r_1 \15/ r_0. Definition upaco15_2_1( r_0 r_1: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) := paco15_2_1 r_0 r_1 \15/ r_1. End Arg15_2_def. -Arguments paco15_2_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments upaco15_2_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. +Arguments paco15_2_0 : clear implicits. +Arguments upaco15_2_0 : clear implicits. Hint Unfold upaco15_2_0. -Arguments paco15_2_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments upaco15_2_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. +Arguments paco15_2_1 : clear implicits. +Arguments upaco15_2_1 : clear implicits. Hint Unfold upaco15_2_1. Section Arg15_3_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. -Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. -Variable T13 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11), Type. -Variable T14 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) (x13: @T13 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12), Type. Variable gf_0 gf_1 gf_2 : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. -CoInductive paco15_3_0( r_0 r_1 r_2: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : Prop := -| paco15_3_0_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <15= (paco15_3_0 r_0 r_1 r_2 \15/ r_0)) - (LE : pco_1 <15= (paco15_3_1 r_0 r_1 r_2 \15/ r_1)) - (LE : pco_2 <15= (paco15_3_2 r_0 r_1 r_2 \15/ r_2)) - (SIM: gf_0 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) -with paco15_3_1( r_0 r_1 r_2: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : Prop := -| paco15_3_1_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <15= (paco15_3_0 r_0 r_1 r_2 \15/ r_0)) - (LE : pco_1 <15= (paco15_3_1 r_0 r_1 r_2 \15/ r_1)) - (LE : pco_2 <15= (paco15_3_2 r_0 r_1 r_2 \15/ r_2)) - (SIM: gf_1 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) -with paco15_3_2( r_0 r_1 r_2: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : Prop := -| paco15_3_2_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <15= (paco15_3_0 r_0 r_1 r_2 \15/ r_0)) - (LE : pco_1 <15= (paco15_3_1 r_0 r_1 r_2 \15/ r_1)) - (LE : pco_2 <15= (paco15_3_2 r_0 r_1 r_2 \15/ r_2)) - (SIM: gf_2 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) -. +Definition paco15_3_0( r_0 r_1 r_2: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 := + curry15 (paco_3_0 (fun R0 R1 R2 => uncurry15 (gf_0 (curry15 R0) (curry15 R1) (curry15 R2))) (fun R0 R1 R2 => uncurry15 (gf_1 (curry15 R0) (curry15 R1) (curry15 R2))) (fun R0 R1 R2 => uncurry15 (gf_2 (curry15 R0) (curry15 R1) (curry15 R2))) (uncurry15 r_0) (uncurry15 r_1) (uncurry15 r_2)). + +Definition paco15_3_1( r_0 r_1 r_2: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 := + curry15 (paco_3_1 (fun R0 R1 R2 => uncurry15 (gf_0 (curry15 R0) (curry15 R1) (curry15 R2))) (fun R0 R1 R2 => uncurry15 (gf_1 (curry15 R0) (curry15 R1) (curry15 R2))) (fun R0 R1 R2 => uncurry15 (gf_2 (curry15 R0) (curry15 R1) (curry15 R2))) (uncurry15 r_0) (uncurry15 r_1) (uncurry15 r_2)). + +Definition paco15_3_2( r_0 r_1 r_2: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 := + curry15 (paco_3_2 (fun R0 R1 R2 => uncurry15 (gf_0 (curry15 R0) (curry15 R1) (curry15 R2))) (fun R0 R1 R2 => uncurry15 (gf_1 (curry15 R0) (curry15 R1) (curry15 R2))) (fun R0 R1 R2 => uncurry15 (gf_2 (curry15 R0) (curry15 R1) (curry15 R2))) (uncurry15 r_0) (uncurry15 r_1) (uncurry15 r_2)). + Definition upaco15_3_0( r_0 r_1 r_2: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) := paco15_3_0 r_0 r_1 r_2 \15/ r_0. Definition upaco15_3_1( r_0 r_1 r_2: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) := paco15_3_1 r_0 r_1 r_2 \15/ r_1. Definition upaco15_3_2( r_0 r_1 r_2: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) := paco15_3_2 r_0 r_1 r_2 \15/ r_2. End Arg15_3_def. -Arguments paco15_3_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments upaco15_3_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. +Arguments paco15_3_0 : clear implicits. +Arguments upaco15_3_0 : clear implicits. Hint Unfold upaco15_3_0. -Arguments paco15_3_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments upaco15_3_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. +Arguments paco15_3_1 : clear implicits. +Arguments upaco15_3_1 : clear implicits. Hint Unfold upaco15_3_1. -Arguments paco15_3_2 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments upaco15_3_2 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. +Arguments paco15_3_2 : clear implicits. +Arguments upaco15_3_2 : clear implicits. Hint Unfold upaco15_3_2. -(* Less than or equal - internal use only *) -Notation "p <_paco_15= q" := - (forall _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 _paco_x10 _paco_x11 _paco_x12 _paco_x13 _paco_x14 (PR: p _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 _paco_x10 _paco_x11 _paco_x12 _paco_x13 _paco_x14 : Prop), q _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 _paco_x9 _paco_x10 _paco_x11 _paco_x12 _paco_x13 _paco_x14 : Prop) - (at level 50, no associativity). - (** 1 Mutual Coinduction *) Section Arg15_1. -Definition monotone15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 (gf: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) := +Definition monotone15 (gf: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 r r' (IN: gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) (LE: r <15= r'), gf r' x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. -Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. -Variable T13 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11), Type. -Variable T14 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) (x13: @T13 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12), Type. +Definition _monotone15 (gf: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) := + forall r r'(LE: r <15= r'), gf r <15== gf r'. + +Lemma monotone15_eq (gf: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) : + monotone15 gf <-> _monotone15 gf. +Proof. unfold monotone15, _monotone15, le15. split; eauto. Qed. + +Lemma monotone15_map (gf: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) + (MON: _monotone15 gf) : + _monotone (fun R0 => uncurry15 (gf (curry15 R0))). +Proof. + repeat_intros 3. apply uncurry_map15. apply MON; apply curry_map15; auto. +Qed. + Variable gf : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14. Arguments gf : clear implicits. +Theorem _paco15_mon: _monotone15 (paco15 gf). +Proof. + repeat_intros 3. eapply curry_map15, _paco_mon; apply uncurry_map15; auto. +Qed. + +Theorem _paco15_acc: forall + l r (OBG: forall rr (INC: r <15== rr) (CIH: l <15== rr), l <15== paco15 gf rr), + l <15== paco15 gf r. +Proof. + intros. apply uncurry_adjoint1_15. + eapply _paco_acc. intros. + apply uncurry_adjoint1_15 in INC. apply uncurry_adjoint1_15 in CIH. + apply uncurry_adjoint2_15. + eapply le15_trans. eapply (OBG _ INC CIH). + apply curry_map15. + apply _paco_mon; try apply le1_refl; apply curry_bij1_15. +Qed. + +Theorem _paco15_mult_strong: forall r, + paco15 gf (upaco15 gf r) <15== paco15 gf r. +Proof. + intros. apply curry_map15. + eapply le1_trans; [| eapply _paco_mult_strong]. + apply _paco_mon; intros []; eauto. +Qed. + +Theorem _paco15_fold: forall r, + gf (upaco15 gf r) <15== paco15 gf r. +Proof. + intros. apply uncurry_adjoint1_15. + eapply le1_trans; [| apply _paco_fold]. apply le1_refl. +Qed. + +Theorem _paco15_unfold: forall (MON: _monotone15 gf) r, + paco15 gf r <15== gf (upaco15 gf r). +Proof. + intros. apply curry_adjoint2_15. + eapply _paco_unfold; apply monotone15_map; auto. +Qed. + Theorem paco15_acc: forall - l r (OBG: forall rr (INC: r <15= rr) (CIH: l <_paco_15= rr), l <_paco_15= paco15 gf rr), + l r (OBG: forall rr (INC: r <15= rr) (CIH: l <15= rr), l <15= paco15 gf rr), l <15= paco15 gf r. Proof. - intros; assert (SIM: paco15 gf (r \15/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) by eauto. - clear PR; repeat (try left; do 16 paco_revert; paco_cofix_auto). + apply _paco15_acc. Qed. Theorem paco15_mon: monotone15 (paco15 gf). -Proof. paco_cofix_auto; repeat (left; do 16 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone15_eq. + apply _paco15_mon. +Qed. Theorem paco15_mult_strong: forall r, paco15 gf (upaco15 gf r) <15= paco15 gf r. -Proof. paco_cofix_auto; repeat (left; do 16 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco15_mult_strong. +Qed. Corollary paco15_mult: forall r, paco15 gf (paco15 gf r) <15= paco15 gf r. @@ -181,25 +249,26 @@ Proof. intros; eapply paco15_mult_strong, paco15_mon; eauto. Qed. Theorem paco15_fold: forall r, gf (upaco15 gf r) <15= paco15 gf r. -Proof. intros; econstructor; [ |eauto]; eauto. Qed. +Proof. + apply _paco15_fold. +Qed. Theorem paco15_unfold: forall (MON: monotone15 gf) r, paco15 gf r <15= gf (upaco15 gf r). -Proof. unfold monotone15; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 1. eapply _paco15_unfold; apply monotone15_eq; auto. +Qed. End Arg15_1. -Hint Unfold monotone15. -Hint Resolve paco15_fold. +Arguments paco15_acc : clear implicits. +Arguments paco15_mon : clear implicits. +Arguments paco15_mult_strong : clear implicits. +Arguments paco15_mult : clear implicits. +Arguments paco15_fold : clear implicits. +Arguments paco15_unfold : clear implicits. -Arguments paco15_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. - -Instance paco15_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 (gf : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14->_) r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : paco_class (paco15 gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) := +Global Instance paco15_inst (gf : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14->_) r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : paco_class (paco15 gf r x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) := { pacoacc := paco15_acc gf; pacomult := paco15_mult gf; pacofold := paco15_fold gf; @@ -209,57 +278,144 @@ Instance paco15_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 (gf : re Section Arg15_2. -Definition monotone15_2 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 (gf: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) := +Definition monotone15_2 (gf: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) (LE_0: r_0 <15= r'_0)(LE_1: r_1 <15= r'_1), gf r'_0 r'_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. -Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. -Variable T13 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11), Type. -Variable T14 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) (x13: @T13 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12), Type. +Definition _monotone15_2 (gf: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <15= r'_0)(LE_1: r_1 <15= r'_1), gf r_0 r_1 <15== gf r'_0 r'_1. + +Lemma monotone15_2_eq (gf: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) : + monotone15_2 gf <-> _monotone15_2 gf. +Proof. unfold monotone15_2, _monotone15_2, le15. split; eauto. Qed. + +Lemma monotone15_2_map (gf: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) + (MON: _monotone15_2 gf) : + _monotone_2 (fun R0 R1 => uncurry15 (gf (curry15 R0) (curry15 R1))). +Proof. + repeat_intros 6. apply uncurry_map15. apply MON; apply curry_map15; auto. +Qed. + Variable gf_0 gf_1 : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. +Theorem _paco15_2_0_mon: _monotone15_2 (paco15_2_0 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map15, _paco_2_0_mon; apply uncurry_map15; auto. +Qed. + +Theorem _paco15_2_1_mon: _monotone15_2 (paco15_2_1 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map15, _paco_2_1_mon; apply uncurry_map15; auto. +Qed. + +Theorem _paco15_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <15== rr) (CIH: l <15== rr), l <15== paco15_2_0 gf_0 gf_1 rr r_1), + l <15== paco15_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_15. + eapply _paco_2_0_acc. intros. + apply uncurry_adjoint1_15 in INC. apply uncurry_adjoint1_15 in CIH. + apply uncurry_adjoint2_15. + eapply le15_trans. eapply (OBG _ INC CIH). + apply curry_map15. + apply _paco_2_0_mon; try apply le1_refl; apply curry_bij1_15. +Qed. + +Theorem _paco15_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <15== rr) (CIH: l <15== rr), l <15== paco15_2_1 gf_0 gf_1 r_0 rr), + l <15== paco15_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_15. + eapply _paco_2_1_acc. intros. + apply uncurry_adjoint1_15 in INC. apply uncurry_adjoint1_15 in CIH. + apply uncurry_adjoint2_15. + eapply le15_trans. eapply (OBG _ INC CIH). + apply curry_map15. + apply _paco_2_1_mon; try apply le1_refl; apply curry_bij1_15. +Qed. + +Theorem _paco15_2_0_mult_strong: forall r_0 r_1, + paco15_2_0 gf_0 gf_1 (upaco15_2_0 gf_0 gf_1 r_0 r_1) (upaco15_2_1 gf_0 gf_1 r_0 r_1) <15== paco15_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map15. + eapply le1_trans; [| eapply _paco_2_0_mult_strong]. + apply _paco_2_0_mon; intros []; eauto. +Qed. + +Theorem _paco15_2_1_mult_strong: forall r_0 r_1, + paco15_2_1 gf_0 gf_1 (upaco15_2_0 gf_0 gf_1 r_0 r_1) (upaco15_2_1 gf_0 gf_1 r_0 r_1) <15== paco15_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map15. + eapply le1_trans; [| eapply _paco_2_1_mult_strong]. + apply _paco_2_1_mon; intros []; eauto. +Qed. + +Theorem _paco15_2_0_fold: forall r_0 r_1, + gf_0 (upaco15_2_0 gf_0 gf_1 r_0 r_1) (upaco15_2_1 gf_0 gf_1 r_0 r_1) <15== paco15_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_15. + eapply le1_trans; [| apply _paco_2_0_fold]. apply le1_refl. +Qed. + +Theorem _paco15_2_1_fold: forall r_0 r_1, + gf_1 (upaco15_2_0 gf_0 gf_1 r_0 r_1) (upaco15_2_1 gf_0 gf_1 r_0 r_1) <15== paco15_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_15. + eapply le1_trans; [| apply _paco_2_1_fold]. apply le1_refl. +Qed. + +Theorem _paco15_2_0_unfold: forall (MON: _monotone15_2 gf_0) (MON: _monotone15_2 gf_1) r_0 r_1, + paco15_2_0 gf_0 gf_1 r_0 r_1 <15== gf_0 (upaco15_2_0 gf_0 gf_1 r_0 r_1) (upaco15_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_15. + eapply _paco_2_0_unfold; apply monotone15_2_map; auto. +Qed. + +Theorem _paco15_2_1_unfold: forall (MON: _monotone15_2 gf_0) (MON: _monotone15_2 gf_1) r_0 r_1, + paco15_2_1 gf_0 gf_1 r_0 r_1 <15== gf_1 (upaco15_2_0 gf_0 gf_1 r_0 r_1) (upaco15_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_15. + eapply _paco_2_1_unfold; apply monotone15_2_map; auto. +Qed. + Theorem paco15_2_0_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_0 <15= rr) (CIH: l <_paco_15= rr), l <_paco_15= paco15_2_0 gf_0 gf_1 rr r_1), + l r_0 r_1 (OBG: forall rr (INC: r_0 <15= rr) (CIH: l <15= rr), l <15= paco15_2_0 gf_0 gf_1 rr r_1), l <15= paco15_2_0 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco15_2_0 gf_0 gf_1 (r_0 \15/ l) r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) by eauto. - clear PR; repeat (try left; do 16 paco_revert; paco_cofix_auto). + apply _paco15_2_0_acc. Qed. Theorem paco15_2_1_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_1 <15= rr) (CIH: l <_paco_15= rr), l <_paco_15= paco15_2_1 gf_0 gf_1 r_0 rr), + l r_0 r_1 (OBG: forall rr (INC: r_1 <15= rr) (CIH: l <15= rr), l <15= paco15_2_1 gf_0 gf_1 r_0 rr), l <15= paco15_2_1 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco15_2_1 gf_0 gf_1 r_0 (r_1 \15/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) by eauto. - clear PR; repeat (try left; do 16 paco_revert; paco_cofix_auto). + apply _paco15_2_1_acc. Qed. Theorem paco15_2_0_mon: monotone15_2 (paco15_2_0 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 16 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone15_2_eq. + apply _paco15_2_0_mon. +Qed. Theorem paco15_2_1_mon: monotone15_2 (paco15_2_1 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 16 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone15_2_eq. + apply _paco15_2_1_mon. +Qed. Theorem paco15_2_0_mult_strong: forall r_0 r_1, paco15_2_0 gf_0 gf_1 (upaco15_2_0 gf_0 gf_1 r_0 r_1) (upaco15_2_1 gf_0 gf_1 r_0 r_1) <15= paco15_2_0 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 16 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco15_2_0_mult_strong. +Qed. Theorem paco15_2_1_mult_strong: forall r_0 r_1, paco15_2_1 gf_0 gf_1 (upaco15_2_0 gf_0 gf_1 r_0 r_1) (upaco15_2_1 gf_0 gf_1 r_0 r_1) <15= paco15_2_1 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 16 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco15_2_1_mult_strong. +Qed. Corollary paco15_2_0_mult: forall r_0 r_1, paco15_2_0 gf_0 gf_1 (paco15_2_0 gf_0 gf_1 r_0 r_1) (paco15_2_1 gf_0 gf_1 r_0 r_1) <15= paco15_2_0 gf_0 gf_1 r_0 r_1. @@ -271,46 +427,50 @@ Proof. intros; eapply paco15_2_1_mult_strong, paco15_2_1_mon; eauto. Qed. Theorem paco15_2_0_fold: forall r_0 r_1, gf_0 (upaco15_2_0 gf_0 gf_1 r_0 r_1) (upaco15_2_1 gf_0 gf_1 r_0 r_1) <15= paco15_2_0 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco15_2_0_fold. +Qed. Theorem paco15_2_1_fold: forall r_0 r_1, gf_1 (upaco15_2_0 gf_0 gf_1 r_0 r_1) (upaco15_2_1 gf_0 gf_1 r_0 r_1) <15= paco15_2_1 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco15_2_1_fold. +Qed. Theorem paco15_2_0_unfold: forall (MON: monotone15_2 gf_0) (MON: monotone15_2 gf_1) r_0 r_1, paco15_2_0 gf_0 gf_1 r_0 r_1 <15= gf_0 (upaco15_2_0 gf_0 gf_1 r_0 r_1) (upaco15_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone15_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco15_2_0_unfold; apply monotone15_2_eq; auto. +Qed. Theorem paco15_2_1_unfold: forall (MON: monotone15_2 gf_0) (MON: monotone15_2 gf_1) r_0 r_1, paco15_2_1 gf_0 gf_1 r_0 r_1 <15= gf_1 (upaco15_2_0 gf_0 gf_1 r_0 r_1) (upaco15_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone15_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco15_2_1_unfold; apply monotone15_2_eq; auto. +Qed. End Arg15_2. -Hint Unfold monotone15_2. -Hint Resolve paco15_2_0_fold. -Hint Resolve paco15_2_1_fold. - -Arguments paco15_2_0_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_2_1_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_2_0_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_2_1_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_2_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_2_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_2_0_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_2_1_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_2_0_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_2_1_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_2_0_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_2_1_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. - -Instance paco15_2_0_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 (gf_0 gf_1 : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : paco_class (paco15_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) := +Arguments paco15_2_0_acc : clear implicits. +Arguments paco15_2_1_acc : clear implicits. +Arguments paco15_2_0_mon : clear implicits. +Arguments paco15_2_1_mon : clear implicits. +Arguments paco15_2_0_mult_strong : clear implicits. +Arguments paco15_2_1_mult_strong : clear implicits. +Arguments paco15_2_0_mult : clear implicits. +Arguments paco15_2_1_mult : clear implicits. +Arguments paco15_2_0_fold : clear implicits. +Arguments paco15_2_1_fold : clear implicits. +Arguments paco15_2_0_unfold : clear implicits. +Arguments paco15_2_1_unfold : clear implicits. + +Global Instance paco15_2_0_inst (gf_0 gf_1 : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : paco_class (paco15_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) := { pacoacc := paco15_2_0_acc gf_0 gf_1; pacomult := paco15_2_0_mult gf_0 gf_1; pacofold := paco15_2_0_fold gf_0 gf_1; pacounfold := paco15_2_0_unfold gf_0 gf_1 }. -Instance paco15_2_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 (gf_0 gf_1 : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : paco_class (paco15_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) := +Global Instance paco15_2_1_inst (gf_0 gf_1 : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : paco_class (paco15_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) := { pacoacc := paco15_2_1_acc gf_0 gf_1; pacomult := paco15_2_1_mult gf_0 gf_1; pacofold := paco15_2_1_fold gf_0 gf_1; @@ -320,73 +480,204 @@ Instance paco15_2_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 (gf_ Section Arg15_3. -Definition monotone15_3 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 (gf: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) := +Definition monotone15_3 (gf: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) (LE_0: r_0 <15= r'_0)(LE_1: r_1 <15= r'_1)(LE_2: r_2 <15= r'_2), gf r'_0 r'_1 r'_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. -Variable T9 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7), Type. -Variable T10 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8), Type. -Variable T11 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9), Type. -Variable T12 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10), Type. -Variable T13 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11), Type. -Variable T14 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6) (x8: @T8 x0 x1 x2 x3 x4 x5 x6 x7) (x9: @T9 x0 x1 x2 x3 x4 x5 x6 x7 x8) (x10: @T10 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9) (x11: @T11 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) (x12: @T12 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11) (x13: @T13 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12), Type. +Definition _monotone15_3 (gf: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <15= r'_0)(LE_1: r_1 <15= r'_1)(LE_2: r_2 <15= r'_2), gf r_0 r_1 r_2 <15== gf r'_0 r'_1 r'_2. + +Lemma monotone15_3_eq (gf: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) : + monotone15_3 gf <-> _monotone15_3 gf. +Proof. unfold monotone15_3, _monotone15_3, le15. split; eauto. Qed. + +Lemma monotone15_3_map (gf: rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) + (MON: _monotone15_3 gf) : + _monotone_3 (fun R0 R1 R2 => uncurry15 (gf (curry15 R0) (curry15 R1) (curry15 R2))). +Proof. + repeat_intros 9. apply uncurry_map15. apply MON; apply curry_map15; auto. +Qed. + Variable gf_0 gf_1 gf_2 : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 -> rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. +Theorem _paco15_3_0_mon: _monotone15_3 (paco15_3_0 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map15, _paco_3_0_mon; apply uncurry_map15; auto. +Qed. + +Theorem _paco15_3_1_mon: _monotone15_3 (paco15_3_1 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map15, _paco_3_1_mon; apply uncurry_map15; auto. +Qed. + +Theorem _paco15_3_2_mon: _monotone15_3 (paco15_3_2 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map15, _paco_3_2_mon; apply uncurry_map15; auto. +Qed. + +Theorem _paco15_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <15== rr) (CIH: l <15== rr), l <15== paco15_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <15== paco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_15. + eapply _paco_3_0_acc. intros. + apply uncurry_adjoint1_15 in INC. apply uncurry_adjoint1_15 in CIH. + apply uncurry_adjoint2_15. + eapply le15_trans. eapply (OBG _ INC CIH). + apply curry_map15. + apply _paco_3_0_mon; try apply le1_refl; apply curry_bij1_15. +Qed. + +Theorem _paco15_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <15== rr) (CIH: l <15== rr), l <15== paco15_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <15== paco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_15. + eapply _paco_3_1_acc. intros. + apply uncurry_adjoint1_15 in INC. apply uncurry_adjoint1_15 in CIH. + apply uncurry_adjoint2_15. + eapply le15_trans. eapply (OBG _ INC CIH). + apply curry_map15. + apply _paco_3_1_mon; try apply le1_refl; apply curry_bij1_15. +Qed. + +Theorem _paco15_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <15== rr) (CIH: l <15== rr), l <15== paco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <15== paco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_15. + eapply _paco_3_2_acc. intros. + apply uncurry_adjoint1_15 in INC. apply uncurry_adjoint1_15 in CIH. + apply uncurry_adjoint2_15. + eapply le15_trans. eapply (OBG _ INC CIH). + apply curry_map15. + apply _paco_3_2_mon; try apply le1_refl; apply curry_bij1_15. +Qed. + +Theorem _paco15_3_0_mult_strong: forall r_0 r_1 r_2, + paco15_3_0 gf_0 gf_1 gf_2 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <15== paco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map15. + eapply le1_trans; [| eapply _paco_3_0_mult_strong]. + apply _paco_3_0_mon; intros []; eauto. +Qed. + +Theorem _paco15_3_1_mult_strong: forall r_0 r_1 r_2, + paco15_3_1 gf_0 gf_1 gf_2 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <15== paco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map15. + eapply le1_trans; [| eapply _paco_3_1_mult_strong]. + apply _paco_3_1_mon; intros []; eauto. +Qed. + +Theorem _paco15_3_2_mult_strong: forall r_0 r_1 r_2, + paco15_3_2 gf_0 gf_1 gf_2 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <15== paco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map15. + eapply le1_trans; [| eapply _paco_3_2_mult_strong]. + apply _paco_3_2_mon; intros []; eauto. +Qed. + +Theorem _paco15_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <15== paco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_15. + eapply le1_trans; [| apply _paco_3_0_fold]. apply le1_refl. +Qed. + +Theorem _paco15_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <15== paco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_15. + eapply le1_trans; [| apply _paco_3_1_fold]. apply le1_refl. +Qed. + +Theorem _paco15_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <15== paco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_15. + eapply le1_trans; [| apply _paco_3_2_fold]. apply le1_refl. +Qed. + +Theorem _paco15_3_0_unfold: forall (MON: _monotone15_3 gf_0) (MON: _monotone15_3 gf_1) (MON: _monotone15_3 gf_2) r_0 r_1 r_2, + paco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <15== gf_0 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_15. + eapply _paco_3_0_unfold; apply monotone15_3_map; auto. +Qed. + +Theorem _paco15_3_1_unfold: forall (MON: _monotone15_3 gf_0) (MON: _monotone15_3 gf_1) (MON: _monotone15_3 gf_2) r_0 r_1 r_2, + paco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <15== gf_1 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_15. + eapply _paco_3_1_unfold; apply monotone15_3_map; auto. +Qed. + +Theorem _paco15_3_2_unfold: forall (MON: _monotone15_3 gf_0) (MON: _monotone15_3 gf_1) (MON: _monotone15_3 gf_2) r_0 r_1 r_2, + paco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <15== gf_2 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_15. + eapply _paco_3_2_unfold; apply monotone15_3_map; auto. +Qed. + Theorem paco15_3_0_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <15= rr) (CIH: l <_paco_15= rr), l <_paco_15= paco15_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <15= rr) (CIH: l <15= rr), l <15= paco15_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), l <15= paco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco15_3_0 gf_0 gf_1 gf_2 (r_0 \15/ l) r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) by eauto. - clear PR; repeat (try left; do 16 paco_revert; paco_cofix_auto). + apply _paco15_3_0_acc. Qed. Theorem paco15_3_1_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <15= rr) (CIH: l <_paco_15= rr), l <_paco_15= paco15_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <15= rr) (CIH: l <15= rr), l <15= paco15_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), l <15= paco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco15_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \15/ l) r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) by eauto. - clear PR; repeat (try left; do 16 paco_revert; paco_cofix_auto). + apply _paco15_3_1_acc. Qed. Theorem paco15_3_2_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <15= rr) (CIH: l <_paco_15= rr), l <_paco_15= paco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <15= rr) (CIH: l <15= rr), l <15= paco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), l <15= paco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \15/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) by eauto. - clear PR; repeat (try left; do 16 paco_revert; paco_cofix_auto). + apply _paco15_3_2_acc. Qed. Theorem paco15_3_0_mon: monotone15_3 (paco15_3_0 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 16 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone15_3_eq. + apply _paco15_3_0_mon. +Qed. Theorem paco15_3_1_mon: monotone15_3 (paco15_3_1 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 16 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone15_3_eq. + apply _paco15_3_1_mon. +Qed. Theorem paco15_3_2_mon: monotone15_3 (paco15_3_2 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 16 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone15_3_eq. + apply _paco15_3_2_mon. +Qed. Theorem paco15_3_0_mult_strong: forall r_0 r_1 r_2, paco15_3_0 gf_0 gf_1 gf_2 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <15= paco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 16 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco15_3_0_mult_strong. +Qed. Theorem paco15_3_1_mult_strong: forall r_0 r_1 r_2, paco15_3_1 gf_0 gf_1 gf_2 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <15= paco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 16 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco15_3_1_mult_strong. +Qed. Theorem paco15_3_2_mult_strong: forall r_0 r_1 r_2, paco15_3_2 gf_0 gf_1 gf_2 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <15= paco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 16 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco15_3_2_mult_strong. +Qed. Corollary paco15_3_0_mult: forall r_0 r_1 r_2, paco15_3_0 gf_0 gf_1 gf_2 (paco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <15= paco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. @@ -402,69 +693,105 @@ Proof. intros; eapply paco15_3_2_mult_strong, paco15_3_2_mon; eauto. Qed. Theorem paco15_3_0_fold: forall r_0 r_1 r_2, gf_0 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <15= paco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco15_3_0_fold. +Qed. Theorem paco15_3_1_fold: forall r_0 r_1 r_2, gf_1 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <15= paco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco15_3_1_fold. +Qed. Theorem paco15_3_2_fold: forall r_0 r_1 r_2, gf_2 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <15= paco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco15_3_2_fold. +Qed. Theorem paco15_3_0_unfold: forall (MON: monotone15_3 gf_0) (MON: monotone15_3 gf_1) (MON: monotone15_3 gf_2) r_0 r_1 r_2, paco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <15= gf_0 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone15_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco15_3_0_unfold; apply monotone15_3_eq; auto. +Qed. Theorem paco15_3_1_unfold: forall (MON: monotone15_3 gf_0) (MON: monotone15_3 gf_1) (MON: monotone15_3 gf_2) r_0 r_1 r_2, paco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <15= gf_1 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone15_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco15_3_1_unfold; apply monotone15_3_eq; auto. +Qed. Theorem paco15_3_2_unfold: forall (MON: monotone15_3 gf_0) (MON: monotone15_3 gf_1) (MON: monotone15_3 gf_2) r_0 r_1 r_2, paco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <15= gf_2 (upaco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone15_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco15_3_2_unfold; apply monotone15_3_eq; auto. +Qed. End Arg15_3. -Hint Unfold monotone15_3. -Hint Resolve paco15_3_0_fold. -Hint Resolve paco15_3_1_fold. -Hint Resolve paco15_3_2_fold. - -Arguments paco15_3_0_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_1_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_2_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_0_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_1_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_2_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_2_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_0_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_1_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_2_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_0_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_1_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_2_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_0_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_1_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. -Arguments paco15_3_2_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 ]. - -Instance paco15_3_0_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 (gf_0 gf_1 gf_2 : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : paco_class (paco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) := +Arguments paco15_3_0_acc : clear implicits. +Arguments paco15_3_1_acc : clear implicits. +Arguments paco15_3_2_acc : clear implicits. +Arguments paco15_3_0_mon : clear implicits. +Arguments paco15_3_1_mon : clear implicits. +Arguments paco15_3_2_mon : clear implicits. +Arguments paco15_3_0_mult_strong : clear implicits. +Arguments paco15_3_1_mult_strong : clear implicits. +Arguments paco15_3_2_mult_strong : clear implicits. +Arguments paco15_3_0_mult : clear implicits. +Arguments paco15_3_1_mult : clear implicits. +Arguments paco15_3_2_mult : clear implicits. +Arguments paco15_3_0_fold : clear implicits. +Arguments paco15_3_1_fold : clear implicits. +Arguments paco15_3_2_fold : clear implicits. +Arguments paco15_3_0_unfold : clear implicits. +Arguments paco15_3_1_unfold : clear implicits. +Arguments paco15_3_2_unfold : clear implicits. + +Global Instance paco15_3_0_inst (gf_0 gf_1 gf_2 : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : paco_class (paco15_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) := { pacoacc := paco15_3_0_acc gf_0 gf_1 gf_2; pacomult := paco15_3_0_mult gf_0 gf_1 gf_2; pacofold := paco15_3_0_fold gf_0 gf_1 gf_2; pacounfold := paco15_3_0_unfold gf_0 gf_1 gf_2 }. -Instance paco15_3_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 (gf_0 gf_1 gf_2 : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : paco_class (paco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) := +Global Instance paco15_3_1_inst (gf_0 gf_1 gf_2 : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : paco_class (paco15_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) := { pacoacc := paco15_3_1_acc gf_0 gf_1 gf_2; pacomult := paco15_3_1_mult gf_0 gf_1 gf_2; pacofold := paco15_3_1_fold gf_0 gf_1 gf_2; pacounfold := paco15_3_1_unfold gf_0 gf_1 gf_2 }. -Instance paco15_3_2_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 (gf_0 gf_1 gf_2 : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : paco_class (paco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) := +Global Instance paco15_3_2_inst (gf_0 gf_1 gf_2 : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : paco_class (paco15_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14) := { pacoacc := paco15_3_2_acc gf_0 gf_1 gf_2; pacomult := paco15_3_2_mult gf_0 gf_1 gf_2; pacofold := paco15_3_2_fold gf_0 gf_1 gf_2; pacounfold := paco15_3_2_unfold gf_0 gf_1 gf_2 }. +End PACO15. + +Global Opaque paco15. + +Hint Unfold upaco15. +Hint Resolve paco15_fold. +Hint Unfold monotone15. + +Global Opaque paco15_2_0. +Global Opaque paco15_2_1. + +Hint Unfold upaco15_2_0. +Hint Unfold upaco15_2_1. +Hint Resolve paco15_2_0_fold. +Hint Resolve paco15_2_1_fold. +Hint Unfold monotone15_2. + +Global Opaque paco15_3_0. +Global Opaque paco15_3_1. +Global Opaque paco15_3_2. + +Hint Unfold upaco15_3_0. +Hint Unfold upaco15_3_1. +Hint Unfold upaco15_3_2. +Hint Resolve paco15_3_0_fold. +Hint Resolve paco15_3_1_fold. +Hint Resolve paco15_3_2_fold. +Hint Unfold monotone15_3. + diff --git a/src/paco2.v b/src/paco2.v index fd89b71..1b96c59 100644 --- a/src/paco2.v +++ b/src/paco2.v @@ -1,127 +1,221 @@ Require Export paconotation pacotacuser. -Require Import pacotac. +Require Import paconotation_internal pacotac pacon. Set Implicit Arguments. +Section PACO2. + +Variable T0 : Type. +Variable T1 : forall (x0: @T0), Type. + +Record sig2T := + exist2T { + proj2T0: @T0; + proj2T1: @T1 proj2T0; + }. + +Definition uncurry2 (R: rel2 T0 T1): rel1 sig2T := fun x => R (proj2T0 x) (proj2T1 x). + +Definition curry2 (R: rel1 sig2T): rel2 T0 T1 := + fun x0 x1 => R (exist2T x1). + +Lemma uncurry_map2 r0 r1 (LE : r0 <2== r1) : uncurry2 r0 <1== uncurry2 r1. +Proof. intros [] H. apply LE. auto. Qed. + +Lemma uncurry_map_rev2 r0 r1 (LE: uncurry2 r0 <1== uncurry2 r1) : r0 <2== r1. +Proof. + repeat_intros 2. intros H. apply (LE (exist2T x1) H). +Qed. + +Lemma curry_map2 r0 r1 (LE: r0 <1== r1) : curry2 r0 <2== curry2 r1. +Proof. + repeat_intros 2. intros H. apply (LE (exist2T x1) H). +Qed. + +Lemma curry_map_rev2 r0 r1 (LE: curry2 r0 <2== curry2 r1) : r0 <1== r1. +Proof. + intros [] H. apply LE. apply H. +Qed. + +Lemma uncurry_bij1_2 r : curry2 (uncurry2 r) <2== r. +Proof. unfold le2. repeat_intros 2; auto. Qed. + +Lemma uncurry_bij2_2 r : r <2== curry2 (uncurry2 r). +Proof. unfold le2. repeat_intros 2; auto. Qed. + +Lemma curry_bij1_2 r : uncurry2 (curry2 r) <1== r. +Proof. intros []; auto. Qed. + +Lemma curry_bij2_2 r : r <1== uncurry2 (curry2 r). +Proof. intros []; auto. Qed. + +Lemma uncurry_adjoint1_2 r0 r1 (LE: uncurry2 r0 <1== r1) : r0 <2== curry2 r1. +Proof. + apply uncurry_map_rev2. eapply le1_trans; [eauto|]. apply curry_bij2_2. +Qed. + +Lemma uncurry_adjoint2_2 r0 r1 (LE: r0 <2== curry2 r1) : uncurry2 r0 <1== r1. +Proof. + apply curry_map_rev2. eapply le2_trans; [|eauto]. apply uncurry_bij2_2. +Qed. + +Lemma curry_adjoint1_2 r0 r1 (LE: curry2 r0 <2== r1) : r0 <1== uncurry2 r1. +Proof. + apply curry_map_rev2. eapply le2_trans; [eauto|]. apply uncurry_bij2_2. +Qed. + +Lemma curry_adjoint2_2 r0 r1 (LE: r0 <1== uncurry2 r1) : curry2 r0 <2== r1. +Proof. + apply uncurry_map_rev2. eapply le1_trans; [|eauto]. apply curry_bij1_2. +Qed. + (** ** Predicates of Arity 2 *) Section Arg2_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. Variable gf : rel2 T0 T1 -> rel2 T0 T1. Arguments gf : clear implicits. -CoInductive paco2( r: rel2 T0 T1) x0 x1 : Prop := -| paco2_pfold pco - (LE : pco <2= (paco2 r \2/ r)) - (SIM: gf pco x0 x1) -. +Definition paco2( r: rel2 T0 T1) : rel2 T0 T1 := + curry2 (paco (fun R0 => uncurry2 (gf (curry2 R0))) (uncurry2 r)). + Definition upaco2( r: rel2 T0 T1) := paco2 r \2/ r. End Arg2_def. -Arguments paco2 [ T0 T1 ]. -Arguments upaco2 [ T0 T1 ]. +Arguments paco2 : clear implicits. +Arguments upaco2 : clear implicits. Hint Unfold upaco2. Section Arg2_2_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. Variable gf_0 gf_1 : rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. -CoInductive paco2_2_0( r_0 r_1: rel2 T0 T1) x0 x1 : Prop := -| paco2_2_0_pfold pco_0 pco_1 - (LE : pco_0 <2= (paco2_2_0 r_0 r_1 \2/ r_0)) - (LE : pco_1 <2= (paco2_2_1 r_0 r_1 \2/ r_1)) - (SIM: gf_0 pco_0 pco_1 x0 x1) -with paco2_2_1( r_0 r_1: rel2 T0 T1) x0 x1 : Prop := -| paco2_2_1_pfold pco_0 pco_1 - (LE : pco_0 <2= (paco2_2_0 r_0 r_1 \2/ r_0)) - (LE : pco_1 <2= (paco2_2_1 r_0 r_1 \2/ r_1)) - (SIM: gf_1 pco_0 pco_1 x0 x1) -. +Definition paco2_2_0( r_0 r_1: rel2 T0 T1) : rel2 T0 T1 := + curry2 (paco_2_0 (fun R0 R1 => uncurry2 (gf_0 (curry2 R0) (curry2 R1))) (fun R0 R1 => uncurry2 (gf_1 (curry2 R0) (curry2 R1))) (uncurry2 r_0) (uncurry2 r_1)). + +Definition paco2_2_1( r_0 r_1: rel2 T0 T1) : rel2 T0 T1 := + curry2 (paco_2_1 (fun R0 R1 => uncurry2 (gf_0 (curry2 R0) (curry2 R1))) (fun R0 R1 => uncurry2 (gf_1 (curry2 R0) (curry2 R1))) (uncurry2 r_0) (uncurry2 r_1)). + Definition upaco2_2_0( r_0 r_1: rel2 T0 T1) := paco2_2_0 r_0 r_1 \2/ r_0. Definition upaco2_2_1( r_0 r_1: rel2 T0 T1) := paco2_2_1 r_0 r_1 \2/ r_1. End Arg2_2_def. -Arguments paco2_2_0 [ T0 T1 ]. -Arguments upaco2_2_0 [ T0 T1 ]. +Arguments paco2_2_0 : clear implicits. +Arguments upaco2_2_0 : clear implicits. Hint Unfold upaco2_2_0. -Arguments paco2_2_1 [ T0 T1 ]. -Arguments upaco2_2_1 [ T0 T1 ]. +Arguments paco2_2_1 : clear implicits. +Arguments upaco2_2_1 : clear implicits. Hint Unfold upaco2_2_1. Section Arg2_3_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. Variable gf_0 gf_1 gf_2 : rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. -CoInductive paco2_3_0( r_0 r_1 r_2: rel2 T0 T1) x0 x1 : Prop := -| paco2_3_0_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <2= (paco2_3_0 r_0 r_1 r_2 \2/ r_0)) - (LE : pco_1 <2= (paco2_3_1 r_0 r_1 r_2 \2/ r_1)) - (LE : pco_2 <2= (paco2_3_2 r_0 r_1 r_2 \2/ r_2)) - (SIM: gf_0 pco_0 pco_1 pco_2 x0 x1) -with paco2_3_1( r_0 r_1 r_2: rel2 T0 T1) x0 x1 : Prop := -| paco2_3_1_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <2= (paco2_3_0 r_0 r_1 r_2 \2/ r_0)) - (LE : pco_1 <2= (paco2_3_1 r_0 r_1 r_2 \2/ r_1)) - (LE : pco_2 <2= (paco2_3_2 r_0 r_1 r_2 \2/ r_2)) - (SIM: gf_1 pco_0 pco_1 pco_2 x0 x1) -with paco2_3_2( r_0 r_1 r_2: rel2 T0 T1) x0 x1 : Prop := -| paco2_3_2_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <2= (paco2_3_0 r_0 r_1 r_2 \2/ r_0)) - (LE : pco_1 <2= (paco2_3_1 r_0 r_1 r_2 \2/ r_1)) - (LE : pco_2 <2= (paco2_3_2 r_0 r_1 r_2 \2/ r_2)) - (SIM: gf_2 pco_0 pco_1 pco_2 x0 x1) -. +Definition paco2_3_0( r_0 r_1 r_2: rel2 T0 T1) : rel2 T0 T1 := + curry2 (paco_3_0 (fun R0 R1 R2 => uncurry2 (gf_0 (curry2 R0) (curry2 R1) (curry2 R2))) (fun R0 R1 R2 => uncurry2 (gf_1 (curry2 R0) (curry2 R1) (curry2 R2))) (fun R0 R1 R2 => uncurry2 (gf_2 (curry2 R0) (curry2 R1) (curry2 R2))) (uncurry2 r_0) (uncurry2 r_1) (uncurry2 r_2)). + +Definition paco2_3_1( r_0 r_1 r_2: rel2 T0 T1) : rel2 T0 T1 := + curry2 (paco_3_1 (fun R0 R1 R2 => uncurry2 (gf_0 (curry2 R0) (curry2 R1) (curry2 R2))) (fun R0 R1 R2 => uncurry2 (gf_1 (curry2 R0) (curry2 R1) (curry2 R2))) (fun R0 R1 R2 => uncurry2 (gf_2 (curry2 R0) (curry2 R1) (curry2 R2))) (uncurry2 r_0) (uncurry2 r_1) (uncurry2 r_2)). + +Definition paco2_3_2( r_0 r_1 r_2: rel2 T0 T1) : rel2 T0 T1 := + curry2 (paco_3_2 (fun R0 R1 R2 => uncurry2 (gf_0 (curry2 R0) (curry2 R1) (curry2 R2))) (fun R0 R1 R2 => uncurry2 (gf_1 (curry2 R0) (curry2 R1) (curry2 R2))) (fun R0 R1 R2 => uncurry2 (gf_2 (curry2 R0) (curry2 R1) (curry2 R2))) (uncurry2 r_0) (uncurry2 r_1) (uncurry2 r_2)). + Definition upaco2_3_0( r_0 r_1 r_2: rel2 T0 T1) := paco2_3_0 r_0 r_1 r_2 \2/ r_0. Definition upaco2_3_1( r_0 r_1 r_2: rel2 T0 T1) := paco2_3_1 r_0 r_1 r_2 \2/ r_1. Definition upaco2_3_2( r_0 r_1 r_2: rel2 T0 T1) := paco2_3_2 r_0 r_1 r_2 \2/ r_2. End Arg2_3_def. -Arguments paco2_3_0 [ T0 T1 ]. -Arguments upaco2_3_0 [ T0 T1 ]. +Arguments paco2_3_0 : clear implicits. +Arguments upaco2_3_0 : clear implicits. Hint Unfold upaco2_3_0. -Arguments paco2_3_1 [ T0 T1 ]. -Arguments upaco2_3_1 [ T0 T1 ]. +Arguments paco2_3_1 : clear implicits. +Arguments upaco2_3_1 : clear implicits. Hint Unfold upaco2_3_1. -Arguments paco2_3_2 [ T0 T1 ]. -Arguments upaco2_3_2 [ T0 T1 ]. +Arguments paco2_3_2 : clear implicits. +Arguments upaco2_3_2 : clear implicits. Hint Unfold upaco2_3_2. -(* Less than or equal - internal use only *) -Notation "p <_paco_2= q" := - (forall _paco_x0 _paco_x1 (PR: p _paco_x0 _paco_x1 : Prop), q _paco_x0 _paco_x1 : Prop) - (at level 50, no associativity). - (** 1 Mutual Coinduction *) Section Arg2_1. -Definition monotone2 T0 T1 (gf: rel2 T0 T1 -> rel2 T0 T1) := +Definition monotone2 (gf: rel2 T0 T1 -> rel2 T0 T1) := forall x0 x1 r r' (IN: gf r x0 x1) (LE: r <2= r'), gf r' x0 x1. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. +Definition _monotone2 (gf: rel2 T0 T1 -> rel2 T0 T1) := + forall r r'(LE: r <2= r'), gf r <2== gf r'. + +Lemma monotone2_eq (gf: rel2 T0 T1 -> rel2 T0 T1) : + monotone2 gf <-> _monotone2 gf. +Proof. unfold monotone2, _monotone2, le2. split; eauto. Qed. + +Lemma monotone2_map (gf: rel2 T0 T1 -> rel2 T0 T1) + (MON: _monotone2 gf) : + _monotone (fun R0 => uncurry2 (gf (curry2 R0))). +Proof. + repeat_intros 3. apply uncurry_map2. apply MON; apply curry_map2; auto. +Qed. + Variable gf : rel2 T0 T1 -> rel2 T0 T1. Arguments gf : clear implicits. +Theorem _paco2_mon: _monotone2 (paco2 gf). +Proof. + repeat_intros 3. eapply curry_map2, _paco_mon; apply uncurry_map2; auto. +Qed. + +Theorem _paco2_acc: forall + l r (OBG: forall rr (INC: r <2== rr) (CIH: l <2== rr), l <2== paco2 gf rr), + l <2== paco2 gf r. +Proof. + intros. apply uncurry_adjoint1_2. + eapply _paco_acc. intros. + apply uncurry_adjoint1_2 in INC. apply uncurry_adjoint1_2 in CIH. + apply uncurry_adjoint2_2. + eapply le2_trans. eapply (OBG _ INC CIH). + apply curry_map2. + apply _paco_mon; try apply le1_refl; apply curry_bij1_2. +Qed. + +Theorem _paco2_mult_strong: forall r, + paco2 gf (upaco2 gf r) <2== paco2 gf r. +Proof. + intros. apply curry_map2. + eapply le1_trans; [| eapply _paco_mult_strong]. + apply _paco_mon; intros []; eauto. +Qed. + +Theorem _paco2_fold: forall r, + gf (upaco2 gf r) <2== paco2 gf r. +Proof. + intros. apply uncurry_adjoint1_2. + eapply le1_trans; [| apply _paco_fold]. apply le1_refl. +Qed. + +Theorem _paco2_unfold: forall (MON: _monotone2 gf) r, + paco2 gf r <2== gf (upaco2 gf r). +Proof. + intros. apply curry_adjoint2_2. + eapply _paco_unfold; apply monotone2_map; auto. +Qed. + Theorem paco2_acc: forall - l r (OBG: forall rr (INC: r <2= rr) (CIH: l <_paco_2= rr), l <_paco_2= paco2 gf rr), + l r (OBG: forall rr (INC: r <2= rr) (CIH: l <2= rr), l <2= paco2 gf rr), l <2= paco2 gf r. Proof. - intros; assert (SIM: paco2 gf (r \2/ l) x0 x1) by eauto. - clear PR; repeat (try left; do 3 paco_revert; paco_cofix_auto). + apply _paco2_acc. Qed. Theorem paco2_mon: monotone2 (paco2 gf). -Proof. paco_cofix_auto; repeat (left; do 3 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone2_eq. + apply _paco2_mon. +Qed. Theorem paco2_mult_strong: forall r, paco2 gf (upaco2 gf r) <2= paco2 gf r. -Proof. paco_cofix_auto; repeat (left; do 3 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco2_mult_strong. +Qed. Corollary paco2_mult: forall r, paco2 gf (paco2 gf r) <2= paco2 gf r. @@ -129,25 +223,26 @@ Proof. intros; eapply paco2_mult_strong, paco2_mon; eauto. Qed. Theorem paco2_fold: forall r, gf (upaco2 gf r) <2= paco2 gf r. -Proof. intros; econstructor; [ |eauto]; eauto. Qed. +Proof. + apply _paco2_fold. +Qed. Theorem paco2_unfold: forall (MON: monotone2 gf) r, paco2 gf r <2= gf (upaco2 gf r). -Proof. unfold monotone2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 1. eapply _paco2_unfold; apply monotone2_eq; auto. +Qed. End Arg2_1. -Hint Unfold monotone2. -Hint Resolve paco2_fold. - -Arguments paco2_acc [ T0 T1 ]. -Arguments paco2_mon [ T0 T1 ]. -Arguments paco2_mult_strong [ T0 T1 ]. -Arguments paco2_mult [ T0 T1 ]. -Arguments paco2_fold [ T0 T1 ]. -Arguments paco2_unfold [ T0 T1 ]. +Arguments paco2_acc : clear implicits. +Arguments paco2_mon : clear implicits. +Arguments paco2_mult_strong : clear implicits. +Arguments paco2_mult : clear implicits. +Arguments paco2_fold : clear implicits. +Arguments paco2_unfold : clear implicits. -Instance paco2_inst T0 T1 (gf : rel2 T0 T1->_) r x0 x1 : paco_class (paco2 gf r x0 x1) := +Global Instance paco2_inst (gf : rel2 T0 T1->_) r x0 x1 : paco_class (paco2 gf r x0 x1) := { pacoacc := paco2_acc gf; pacomult := paco2_mult gf; pacofold := paco2_fold gf; @@ -157,44 +252,144 @@ Instance paco2_inst T0 T1 (gf : rel2 T0 T1->_) r x0 x1 : paco_class (paco2 gf r Section Arg2_2. -Definition monotone2_2 T0 T1 (gf: rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1) := +Definition monotone2_2 (gf: rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1) := forall x0 x1 r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1 x0 x1) (LE_0: r_0 <2= r'_0)(LE_1: r_1 <2= r'_1), gf r'_0 r'_1 x0 x1. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. +Definition _monotone2_2 (gf: rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <2= r'_0)(LE_1: r_1 <2= r'_1), gf r_0 r_1 <2== gf r'_0 r'_1. + +Lemma monotone2_2_eq (gf: rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1) : + monotone2_2 gf <-> _monotone2_2 gf. +Proof. unfold monotone2_2, _monotone2_2, le2. split; eauto. Qed. + +Lemma monotone2_2_map (gf: rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1) + (MON: _monotone2_2 gf) : + _monotone_2 (fun R0 R1 => uncurry2 (gf (curry2 R0) (curry2 R1))). +Proof. + repeat_intros 6. apply uncurry_map2. apply MON; apply curry_map2; auto. +Qed. + Variable gf_0 gf_1 : rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. +Theorem _paco2_2_0_mon: _monotone2_2 (paco2_2_0 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map2, _paco_2_0_mon; apply uncurry_map2; auto. +Qed. + +Theorem _paco2_2_1_mon: _monotone2_2 (paco2_2_1 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map2, _paco_2_1_mon; apply uncurry_map2; auto. +Qed. + +Theorem _paco2_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <2== rr) (CIH: l <2== rr), l <2== paco2_2_0 gf_0 gf_1 rr r_1), + l <2== paco2_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_2. + eapply _paco_2_0_acc. intros. + apply uncurry_adjoint1_2 in INC. apply uncurry_adjoint1_2 in CIH. + apply uncurry_adjoint2_2. + eapply le2_trans. eapply (OBG _ INC CIH). + apply curry_map2. + apply _paco_2_0_mon; try apply le1_refl; apply curry_bij1_2. +Qed. + +Theorem _paco2_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <2== rr) (CIH: l <2== rr), l <2== paco2_2_1 gf_0 gf_1 r_0 rr), + l <2== paco2_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_2. + eapply _paco_2_1_acc. intros. + apply uncurry_adjoint1_2 in INC. apply uncurry_adjoint1_2 in CIH. + apply uncurry_adjoint2_2. + eapply le2_trans. eapply (OBG _ INC CIH). + apply curry_map2. + apply _paco_2_1_mon; try apply le1_refl; apply curry_bij1_2. +Qed. + +Theorem _paco2_2_0_mult_strong: forall r_0 r_1, + paco2_2_0 gf_0 gf_1 (upaco2_2_0 gf_0 gf_1 r_0 r_1) (upaco2_2_1 gf_0 gf_1 r_0 r_1) <2== paco2_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map2. + eapply le1_trans; [| eapply _paco_2_0_mult_strong]. + apply _paco_2_0_mon; intros []; eauto. +Qed. + +Theorem _paco2_2_1_mult_strong: forall r_0 r_1, + paco2_2_1 gf_0 gf_1 (upaco2_2_0 gf_0 gf_1 r_0 r_1) (upaco2_2_1 gf_0 gf_1 r_0 r_1) <2== paco2_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map2. + eapply le1_trans; [| eapply _paco_2_1_mult_strong]. + apply _paco_2_1_mon; intros []; eauto. +Qed. + +Theorem _paco2_2_0_fold: forall r_0 r_1, + gf_0 (upaco2_2_0 gf_0 gf_1 r_0 r_1) (upaco2_2_1 gf_0 gf_1 r_0 r_1) <2== paco2_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_2. + eapply le1_trans; [| apply _paco_2_0_fold]. apply le1_refl. +Qed. + +Theorem _paco2_2_1_fold: forall r_0 r_1, + gf_1 (upaco2_2_0 gf_0 gf_1 r_0 r_1) (upaco2_2_1 gf_0 gf_1 r_0 r_1) <2== paco2_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_2. + eapply le1_trans; [| apply _paco_2_1_fold]. apply le1_refl. +Qed. + +Theorem _paco2_2_0_unfold: forall (MON: _monotone2_2 gf_0) (MON: _monotone2_2 gf_1) r_0 r_1, + paco2_2_0 gf_0 gf_1 r_0 r_1 <2== gf_0 (upaco2_2_0 gf_0 gf_1 r_0 r_1) (upaco2_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_2. + eapply _paco_2_0_unfold; apply monotone2_2_map; auto. +Qed. + +Theorem _paco2_2_1_unfold: forall (MON: _monotone2_2 gf_0) (MON: _monotone2_2 gf_1) r_0 r_1, + paco2_2_1 gf_0 gf_1 r_0 r_1 <2== gf_1 (upaco2_2_0 gf_0 gf_1 r_0 r_1) (upaco2_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_2. + eapply _paco_2_1_unfold; apply monotone2_2_map; auto. +Qed. + Theorem paco2_2_0_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_0 <2= rr) (CIH: l <_paco_2= rr), l <_paco_2= paco2_2_0 gf_0 gf_1 rr r_1), + l r_0 r_1 (OBG: forall rr (INC: r_0 <2= rr) (CIH: l <2= rr), l <2= paco2_2_0 gf_0 gf_1 rr r_1), l <2= paco2_2_0 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco2_2_0 gf_0 gf_1 (r_0 \2/ l) r_1 x0 x1) by eauto. - clear PR; repeat (try left; do 3 paco_revert; paco_cofix_auto). + apply _paco2_2_0_acc. Qed. Theorem paco2_2_1_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_1 <2= rr) (CIH: l <_paco_2= rr), l <_paco_2= paco2_2_1 gf_0 gf_1 r_0 rr), + l r_0 r_1 (OBG: forall rr (INC: r_1 <2= rr) (CIH: l <2= rr), l <2= paco2_2_1 gf_0 gf_1 r_0 rr), l <2= paco2_2_1 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco2_2_1 gf_0 gf_1 r_0 (r_1 \2/ l) x0 x1) by eauto. - clear PR; repeat (try left; do 3 paco_revert; paco_cofix_auto). + apply _paco2_2_1_acc. Qed. Theorem paco2_2_0_mon: monotone2_2 (paco2_2_0 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 3 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone2_2_eq. + apply _paco2_2_0_mon. +Qed. Theorem paco2_2_1_mon: monotone2_2 (paco2_2_1 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 3 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone2_2_eq. + apply _paco2_2_1_mon. +Qed. Theorem paco2_2_0_mult_strong: forall r_0 r_1, paco2_2_0 gf_0 gf_1 (upaco2_2_0 gf_0 gf_1 r_0 r_1) (upaco2_2_1 gf_0 gf_1 r_0 r_1) <2= paco2_2_0 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 3 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco2_2_0_mult_strong. +Qed. Theorem paco2_2_1_mult_strong: forall r_0 r_1, paco2_2_1 gf_0 gf_1 (upaco2_2_0 gf_0 gf_1 r_0 r_1) (upaco2_2_1 gf_0 gf_1 r_0 r_1) <2= paco2_2_1 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 3 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco2_2_1_mult_strong. +Qed. Corollary paco2_2_0_mult: forall r_0 r_1, paco2_2_0 gf_0 gf_1 (paco2_2_0 gf_0 gf_1 r_0 r_1) (paco2_2_1 gf_0 gf_1 r_0 r_1) <2= paco2_2_0 gf_0 gf_1 r_0 r_1. @@ -206,46 +401,50 @@ Proof. intros; eapply paco2_2_1_mult_strong, paco2_2_1_mon; eauto. Qed. Theorem paco2_2_0_fold: forall r_0 r_1, gf_0 (upaco2_2_0 gf_0 gf_1 r_0 r_1) (upaco2_2_1 gf_0 gf_1 r_0 r_1) <2= paco2_2_0 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco2_2_0_fold. +Qed. Theorem paco2_2_1_fold: forall r_0 r_1, gf_1 (upaco2_2_0 gf_0 gf_1 r_0 r_1) (upaco2_2_1 gf_0 gf_1 r_0 r_1) <2= paco2_2_1 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco2_2_1_fold. +Qed. Theorem paco2_2_0_unfold: forall (MON: monotone2_2 gf_0) (MON: monotone2_2 gf_1) r_0 r_1, paco2_2_0 gf_0 gf_1 r_0 r_1 <2= gf_0 (upaco2_2_0 gf_0 gf_1 r_0 r_1) (upaco2_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone2_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco2_2_0_unfold; apply monotone2_2_eq; auto. +Qed. Theorem paco2_2_1_unfold: forall (MON: monotone2_2 gf_0) (MON: monotone2_2 gf_1) r_0 r_1, paco2_2_1 gf_0 gf_1 r_0 r_1 <2= gf_1 (upaco2_2_0 gf_0 gf_1 r_0 r_1) (upaco2_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone2_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco2_2_1_unfold; apply monotone2_2_eq; auto. +Qed. End Arg2_2. -Hint Unfold monotone2_2. -Hint Resolve paco2_2_0_fold. -Hint Resolve paco2_2_1_fold. - -Arguments paco2_2_0_acc [ T0 T1 ]. -Arguments paco2_2_1_acc [ T0 T1 ]. -Arguments paco2_2_0_mon [ T0 T1 ]. -Arguments paco2_2_1_mon [ T0 T1 ]. -Arguments paco2_2_0_mult_strong [ T0 T1 ]. -Arguments paco2_2_1_mult_strong [ T0 T1 ]. -Arguments paco2_2_0_mult [ T0 T1 ]. -Arguments paco2_2_1_mult [ T0 T1 ]. -Arguments paco2_2_0_fold [ T0 T1 ]. -Arguments paco2_2_1_fold [ T0 T1 ]. -Arguments paco2_2_0_unfold [ T0 T1 ]. -Arguments paco2_2_1_unfold [ T0 T1 ]. - -Instance paco2_2_0_inst T0 T1 (gf_0 gf_1 : rel2 T0 T1->_) r_0 r_1 x0 x1 : paco_class (paco2_2_0 gf_0 gf_1 r_0 r_1 x0 x1) := +Arguments paco2_2_0_acc : clear implicits. +Arguments paco2_2_1_acc : clear implicits. +Arguments paco2_2_0_mon : clear implicits. +Arguments paco2_2_1_mon : clear implicits. +Arguments paco2_2_0_mult_strong : clear implicits. +Arguments paco2_2_1_mult_strong : clear implicits. +Arguments paco2_2_0_mult : clear implicits. +Arguments paco2_2_1_mult : clear implicits. +Arguments paco2_2_0_fold : clear implicits. +Arguments paco2_2_1_fold : clear implicits. +Arguments paco2_2_0_unfold : clear implicits. +Arguments paco2_2_1_unfold : clear implicits. + +Global Instance paco2_2_0_inst (gf_0 gf_1 : rel2 T0 T1->_) r_0 r_1 x0 x1 : paco_class (paco2_2_0 gf_0 gf_1 r_0 r_1 x0 x1) := { pacoacc := paco2_2_0_acc gf_0 gf_1; pacomult := paco2_2_0_mult gf_0 gf_1; pacofold := paco2_2_0_fold gf_0 gf_1; pacounfold := paco2_2_0_unfold gf_0 gf_1 }. -Instance paco2_2_1_inst T0 T1 (gf_0 gf_1 : rel2 T0 T1->_) r_0 r_1 x0 x1 : paco_class (paco2_2_1 gf_0 gf_1 r_0 r_1 x0 x1) := +Global Instance paco2_2_1_inst (gf_0 gf_1 : rel2 T0 T1->_) r_0 r_1 x0 x1 : paco_class (paco2_2_1 gf_0 gf_1 r_0 r_1 x0 x1) := { pacoacc := paco2_2_1_acc gf_0 gf_1; pacomult := paco2_2_1_mult gf_0 gf_1; pacofold := paco2_2_1_fold gf_0 gf_1; @@ -255,60 +454,204 @@ Instance paco2_2_1_inst T0 T1 (gf_0 gf_1 : rel2 T0 T1->_) r_0 r_1 x0 x1 : paco_ Section Arg2_3. -Definition monotone2_3 T0 T1 (gf: rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1) := +Definition monotone2_3 (gf: rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1) := forall x0 x1 r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2 x0 x1) (LE_0: r_0 <2= r'_0)(LE_1: r_1 <2= r'_1)(LE_2: r_2 <2= r'_2), gf r'_0 r'_1 r'_2 x0 x1. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. +Definition _monotone2_3 (gf: rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <2= r'_0)(LE_1: r_1 <2= r'_1)(LE_2: r_2 <2= r'_2), gf r_0 r_1 r_2 <2== gf r'_0 r'_1 r'_2. + +Lemma monotone2_3_eq (gf: rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1) : + monotone2_3 gf <-> _monotone2_3 gf. +Proof. unfold monotone2_3, _monotone2_3, le2. split; eauto. Qed. + +Lemma monotone2_3_map (gf: rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1) + (MON: _monotone2_3 gf) : + _monotone_3 (fun R0 R1 R2 => uncurry2 (gf (curry2 R0) (curry2 R1) (curry2 R2))). +Proof. + repeat_intros 9. apply uncurry_map2. apply MON; apply curry_map2; auto. +Qed. + Variable gf_0 gf_1 gf_2 : rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1 -> rel2 T0 T1. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. +Theorem _paco2_3_0_mon: _monotone2_3 (paco2_3_0 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map2, _paco_3_0_mon; apply uncurry_map2; auto. +Qed. + +Theorem _paco2_3_1_mon: _monotone2_3 (paco2_3_1 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map2, _paco_3_1_mon; apply uncurry_map2; auto. +Qed. + +Theorem _paco2_3_2_mon: _monotone2_3 (paco2_3_2 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map2, _paco_3_2_mon; apply uncurry_map2; auto. +Qed. + +Theorem _paco2_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <2== rr) (CIH: l <2== rr), l <2== paco2_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <2== paco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_2. + eapply _paco_3_0_acc. intros. + apply uncurry_adjoint1_2 in INC. apply uncurry_adjoint1_2 in CIH. + apply uncurry_adjoint2_2. + eapply le2_trans. eapply (OBG _ INC CIH). + apply curry_map2. + apply _paco_3_0_mon; try apply le1_refl; apply curry_bij1_2. +Qed. + +Theorem _paco2_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <2== rr) (CIH: l <2== rr), l <2== paco2_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <2== paco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_2. + eapply _paco_3_1_acc. intros. + apply uncurry_adjoint1_2 in INC. apply uncurry_adjoint1_2 in CIH. + apply uncurry_adjoint2_2. + eapply le2_trans. eapply (OBG _ INC CIH). + apply curry_map2. + apply _paco_3_1_mon; try apply le1_refl; apply curry_bij1_2. +Qed. + +Theorem _paco2_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <2== rr) (CIH: l <2== rr), l <2== paco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <2== paco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_2. + eapply _paco_3_2_acc. intros. + apply uncurry_adjoint1_2 in INC. apply uncurry_adjoint1_2 in CIH. + apply uncurry_adjoint2_2. + eapply le2_trans. eapply (OBG _ INC CIH). + apply curry_map2. + apply _paco_3_2_mon; try apply le1_refl; apply curry_bij1_2. +Qed. + +Theorem _paco2_3_0_mult_strong: forall r_0 r_1 r_2, + paco2_3_0 gf_0 gf_1 gf_2 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <2== paco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map2. + eapply le1_trans; [| eapply _paco_3_0_mult_strong]. + apply _paco_3_0_mon; intros []; eauto. +Qed. + +Theorem _paco2_3_1_mult_strong: forall r_0 r_1 r_2, + paco2_3_1 gf_0 gf_1 gf_2 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <2== paco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map2. + eapply le1_trans; [| eapply _paco_3_1_mult_strong]. + apply _paco_3_1_mon; intros []; eauto. +Qed. + +Theorem _paco2_3_2_mult_strong: forall r_0 r_1 r_2, + paco2_3_2 gf_0 gf_1 gf_2 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <2== paco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map2. + eapply le1_trans; [| eapply _paco_3_2_mult_strong]. + apply _paco_3_2_mon; intros []; eauto. +Qed. + +Theorem _paco2_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <2== paco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_2. + eapply le1_trans; [| apply _paco_3_0_fold]. apply le1_refl. +Qed. + +Theorem _paco2_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <2== paco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_2. + eapply le1_trans; [| apply _paco_3_1_fold]. apply le1_refl. +Qed. + +Theorem _paco2_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <2== paco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_2. + eapply le1_trans; [| apply _paco_3_2_fold]. apply le1_refl. +Qed. + +Theorem _paco2_3_0_unfold: forall (MON: _monotone2_3 gf_0) (MON: _monotone2_3 gf_1) (MON: _monotone2_3 gf_2) r_0 r_1 r_2, + paco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <2== gf_0 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_2. + eapply _paco_3_0_unfold; apply monotone2_3_map; auto. +Qed. + +Theorem _paco2_3_1_unfold: forall (MON: _monotone2_3 gf_0) (MON: _monotone2_3 gf_1) (MON: _monotone2_3 gf_2) r_0 r_1 r_2, + paco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <2== gf_1 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_2. + eapply _paco_3_1_unfold; apply monotone2_3_map; auto. +Qed. + +Theorem _paco2_3_2_unfold: forall (MON: _monotone2_3 gf_0) (MON: _monotone2_3 gf_1) (MON: _monotone2_3 gf_2) r_0 r_1 r_2, + paco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <2== gf_2 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_2. + eapply _paco_3_2_unfold; apply monotone2_3_map; auto. +Qed. + Theorem paco2_3_0_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <2= rr) (CIH: l <_paco_2= rr), l <_paco_2= paco2_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <2= rr) (CIH: l <2= rr), l <2= paco2_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), l <2= paco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco2_3_0 gf_0 gf_1 gf_2 (r_0 \2/ l) r_1 r_2 x0 x1) by eauto. - clear PR; repeat (try left; do 3 paco_revert; paco_cofix_auto). + apply _paco2_3_0_acc. Qed. Theorem paco2_3_1_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <2= rr) (CIH: l <_paco_2= rr), l <_paco_2= paco2_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <2= rr) (CIH: l <2= rr), l <2= paco2_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), l <2= paco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco2_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \2/ l) r_2 x0 x1) by eauto. - clear PR; repeat (try left; do 3 paco_revert; paco_cofix_auto). + apply _paco2_3_1_acc. Qed. Theorem paco2_3_2_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <2= rr) (CIH: l <_paco_2= rr), l <_paco_2= paco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <2= rr) (CIH: l <2= rr), l <2= paco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), l <2= paco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \2/ l) x0 x1) by eauto. - clear PR; repeat (try left; do 3 paco_revert; paco_cofix_auto). + apply _paco2_3_2_acc. Qed. Theorem paco2_3_0_mon: monotone2_3 (paco2_3_0 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 3 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone2_3_eq. + apply _paco2_3_0_mon. +Qed. Theorem paco2_3_1_mon: monotone2_3 (paco2_3_1 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 3 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone2_3_eq. + apply _paco2_3_1_mon. +Qed. Theorem paco2_3_2_mon: monotone2_3 (paco2_3_2 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 3 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone2_3_eq. + apply _paco2_3_2_mon. +Qed. Theorem paco2_3_0_mult_strong: forall r_0 r_1 r_2, paco2_3_0 gf_0 gf_1 gf_2 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <2= paco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 3 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco2_3_0_mult_strong. +Qed. Theorem paco2_3_1_mult_strong: forall r_0 r_1 r_2, paco2_3_1 gf_0 gf_1 gf_2 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <2= paco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 3 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco2_3_1_mult_strong. +Qed. Theorem paco2_3_2_mult_strong: forall r_0 r_1 r_2, paco2_3_2 gf_0 gf_1 gf_2 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <2= paco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 3 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco2_3_2_mult_strong. +Qed. Corollary paco2_3_0_mult: forall r_0 r_1 r_2, paco2_3_0 gf_0 gf_1 gf_2 (paco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <2= paco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. @@ -324,69 +667,105 @@ Proof. intros; eapply paco2_3_2_mult_strong, paco2_3_2_mon; eauto. Qed. Theorem paco2_3_0_fold: forall r_0 r_1 r_2, gf_0 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <2= paco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco2_3_0_fold. +Qed. Theorem paco2_3_1_fold: forall r_0 r_1 r_2, gf_1 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <2= paco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco2_3_1_fold. +Qed. Theorem paco2_3_2_fold: forall r_0 r_1 r_2, gf_2 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <2= paco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco2_3_2_fold. +Qed. Theorem paco2_3_0_unfold: forall (MON: monotone2_3 gf_0) (MON: monotone2_3 gf_1) (MON: monotone2_3 gf_2) r_0 r_1 r_2, paco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <2= gf_0 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone2_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco2_3_0_unfold; apply monotone2_3_eq; auto. +Qed. Theorem paco2_3_1_unfold: forall (MON: monotone2_3 gf_0) (MON: monotone2_3 gf_1) (MON: monotone2_3 gf_2) r_0 r_1 r_2, paco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <2= gf_1 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone2_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco2_3_1_unfold; apply monotone2_3_eq; auto. +Qed. Theorem paco2_3_2_unfold: forall (MON: monotone2_3 gf_0) (MON: monotone2_3 gf_1) (MON: monotone2_3 gf_2) r_0 r_1 r_2, paco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <2= gf_2 (upaco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone2_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco2_3_2_unfold; apply monotone2_3_eq; auto. +Qed. End Arg2_3. -Hint Unfold monotone2_3. -Hint Resolve paco2_3_0_fold. -Hint Resolve paco2_3_1_fold. -Hint Resolve paco2_3_2_fold. - -Arguments paco2_3_0_acc [ T0 T1 ]. -Arguments paco2_3_1_acc [ T0 T1 ]. -Arguments paco2_3_2_acc [ T0 T1 ]. -Arguments paco2_3_0_mon [ T0 T1 ]. -Arguments paco2_3_1_mon [ T0 T1 ]. -Arguments paco2_3_2_mon [ T0 T1 ]. -Arguments paco2_3_0_mult_strong [ T0 T1 ]. -Arguments paco2_3_1_mult_strong [ T0 T1 ]. -Arguments paco2_3_2_mult_strong [ T0 T1 ]. -Arguments paco2_3_0_mult [ T0 T1 ]. -Arguments paco2_3_1_mult [ T0 T1 ]. -Arguments paco2_3_2_mult [ T0 T1 ]. -Arguments paco2_3_0_fold [ T0 T1 ]. -Arguments paco2_3_1_fold [ T0 T1 ]. -Arguments paco2_3_2_fold [ T0 T1 ]. -Arguments paco2_3_0_unfold [ T0 T1 ]. -Arguments paco2_3_1_unfold [ T0 T1 ]. -Arguments paco2_3_2_unfold [ T0 T1 ]. - -Instance paco2_3_0_inst T0 T1 (gf_0 gf_1 gf_2 : rel2 T0 T1->_) r_0 r_1 r_2 x0 x1 : paco_class (paco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1) := +Arguments paco2_3_0_acc : clear implicits. +Arguments paco2_3_1_acc : clear implicits. +Arguments paco2_3_2_acc : clear implicits. +Arguments paco2_3_0_mon : clear implicits. +Arguments paco2_3_1_mon : clear implicits. +Arguments paco2_3_2_mon : clear implicits. +Arguments paco2_3_0_mult_strong : clear implicits. +Arguments paco2_3_1_mult_strong : clear implicits. +Arguments paco2_3_2_mult_strong : clear implicits. +Arguments paco2_3_0_mult : clear implicits. +Arguments paco2_3_1_mult : clear implicits. +Arguments paco2_3_2_mult : clear implicits. +Arguments paco2_3_0_fold : clear implicits. +Arguments paco2_3_1_fold : clear implicits. +Arguments paco2_3_2_fold : clear implicits. +Arguments paco2_3_0_unfold : clear implicits. +Arguments paco2_3_1_unfold : clear implicits. +Arguments paco2_3_2_unfold : clear implicits. + +Global Instance paco2_3_0_inst (gf_0 gf_1 gf_2 : rel2 T0 T1->_) r_0 r_1 r_2 x0 x1 : paco_class (paco2_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1) := { pacoacc := paco2_3_0_acc gf_0 gf_1 gf_2; pacomult := paco2_3_0_mult gf_0 gf_1 gf_2; pacofold := paco2_3_0_fold gf_0 gf_1 gf_2; pacounfold := paco2_3_0_unfold gf_0 gf_1 gf_2 }. -Instance paco2_3_1_inst T0 T1 (gf_0 gf_1 gf_2 : rel2 T0 T1->_) r_0 r_1 r_2 x0 x1 : paco_class (paco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1) := +Global Instance paco2_3_1_inst (gf_0 gf_1 gf_2 : rel2 T0 T1->_) r_0 r_1 r_2 x0 x1 : paco_class (paco2_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1) := { pacoacc := paco2_3_1_acc gf_0 gf_1 gf_2; pacomult := paco2_3_1_mult gf_0 gf_1 gf_2; pacofold := paco2_3_1_fold gf_0 gf_1 gf_2; pacounfold := paco2_3_1_unfold gf_0 gf_1 gf_2 }. -Instance paco2_3_2_inst T0 T1 (gf_0 gf_1 gf_2 : rel2 T0 T1->_) r_0 r_1 r_2 x0 x1 : paco_class (paco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1) := +Global Instance paco2_3_2_inst (gf_0 gf_1 gf_2 : rel2 T0 T1->_) r_0 r_1 r_2 x0 x1 : paco_class (paco2_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1) := { pacoacc := paco2_3_2_acc gf_0 gf_1 gf_2; pacomult := paco2_3_2_mult gf_0 gf_1 gf_2; pacofold := paco2_3_2_fold gf_0 gf_1 gf_2; pacounfold := paco2_3_2_unfold gf_0 gf_1 gf_2 }. +End PACO2. + +Global Opaque paco2. + +Hint Unfold upaco2. +Hint Resolve paco2_fold. +Hint Unfold monotone2. + +Global Opaque paco2_2_0. +Global Opaque paco2_2_1. + +Hint Unfold upaco2_2_0. +Hint Unfold upaco2_2_1. +Hint Resolve paco2_2_0_fold. +Hint Resolve paco2_2_1_fold. +Hint Unfold monotone2_2. + +Global Opaque paco2_3_0. +Global Opaque paco2_3_1. +Global Opaque paco2_3_2. + +Hint Unfold upaco2_3_0. +Hint Unfold upaco2_3_1. +Hint Unfold upaco2_3_2. +Hint Resolve paco2_3_0_fold. +Hint Resolve paco2_3_1_fold. +Hint Resolve paco2_3_2_fold. +Hint Unfold monotone2_3. + diff --git a/src/paco3.v b/src/paco3.v index 99e4cae..c5733df 100644 --- a/src/paco3.v +++ b/src/paco3.v @@ -1,131 +1,223 @@ Require Export paconotation pacotacuser. -Require Import pacotac. +Require Import paconotation_internal pacotac pacon. Set Implicit Arguments. -(** ** Predicates of Arity 3 -*) +Section PACO3. -Section Arg3_def. Variable T0 : Type. Variable T1 : forall (x0: @T0), Type. Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. + +Record sig3T := + exist3T { + proj3T0: @T0; + proj3T1: @T1 proj3T0; + proj3T2: @T2 proj3T0 proj3T1; + }. + +Definition uncurry3 (R: rel3 T0 T1 T2): rel1 sig3T := fun x => R (proj3T0 x) (proj3T1 x) (proj3T2 x). + +Definition curry3 (R: rel1 sig3T): rel3 T0 T1 T2 := + fun x0 x1 x2 => R (exist3T x2). + +Lemma uncurry_map3 r0 r1 (LE : r0 <3== r1) : uncurry3 r0 <1== uncurry3 r1. +Proof. intros [] H. apply LE. auto. Qed. + +Lemma uncurry_map_rev3 r0 r1 (LE: uncurry3 r0 <1== uncurry3 r1) : r0 <3== r1. +Proof. + repeat_intros 3. intros H. apply (LE (exist3T x2) H). +Qed. + +Lemma curry_map3 r0 r1 (LE: r0 <1== r1) : curry3 r0 <3== curry3 r1. +Proof. + repeat_intros 3. intros H. apply (LE (exist3T x2) H). +Qed. + +Lemma curry_map_rev3 r0 r1 (LE: curry3 r0 <3== curry3 r1) : r0 <1== r1. +Proof. + intros [] H. apply LE. apply H. +Qed. + +Lemma uncurry_bij1_3 r : curry3 (uncurry3 r) <3== r. +Proof. unfold le3. repeat_intros 3; auto. Qed. + +Lemma uncurry_bij2_3 r : r <3== curry3 (uncurry3 r). +Proof. unfold le3. repeat_intros 3; auto. Qed. + +Lemma curry_bij1_3 r : uncurry3 (curry3 r) <1== r. +Proof. intros []; auto. Qed. + +Lemma curry_bij2_3 r : r <1== uncurry3 (curry3 r). +Proof. intros []; auto. Qed. + +Lemma uncurry_adjoint1_3 r0 r1 (LE: uncurry3 r0 <1== r1) : r0 <3== curry3 r1. +Proof. + apply uncurry_map_rev3. eapply le1_trans; [eauto|]. apply curry_bij2_3. +Qed. + +Lemma uncurry_adjoint2_3 r0 r1 (LE: r0 <3== curry3 r1) : uncurry3 r0 <1== r1. +Proof. + apply curry_map_rev3. eapply le3_trans; [|eauto]. apply uncurry_bij2_3. +Qed. + +Lemma curry_adjoint1_3 r0 r1 (LE: curry3 r0 <3== r1) : r0 <1== uncurry3 r1. +Proof. + apply curry_map_rev3. eapply le3_trans; [eauto|]. apply uncurry_bij2_3. +Qed. + +Lemma curry_adjoint2_3 r0 r1 (LE: r0 <1== uncurry3 r1) : curry3 r0 <3== r1. +Proof. + apply uncurry_map_rev3. eapply le1_trans; [|eauto]. apply curry_bij1_3. +Qed. + +(** ** Predicates of Arity 3 +*) + +Section Arg3_def. Variable gf : rel3 T0 T1 T2 -> rel3 T0 T1 T2. Arguments gf : clear implicits. -CoInductive paco3( r: rel3 T0 T1 T2) x0 x1 x2 : Prop := -| paco3_pfold pco - (LE : pco <3= (paco3 r \3/ r)) - (SIM: gf pco x0 x1 x2) -. +Definition paco3( r: rel3 T0 T1 T2) : rel3 T0 T1 T2 := + curry3 (paco (fun R0 => uncurry3 (gf (curry3 R0))) (uncurry3 r)). + Definition upaco3( r: rel3 T0 T1 T2) := paco3 r \3/ r. End Arg3_def. -Arguments paco3 [ T0 T1 T2 ]. -Arguments upaco3 [ T0 T1 T2 ]. +Arguments paco3 : clear implicits. +Arguments upaco3 : clear implicits. Hint Unfold upaco3. Section Arg3_2_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. Variable gf_0 gf_1 : rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. -CoInductive paco3_2_0( r_0 r_1: rel3 T0 T1 T2) x0 x1 x2 : Prop := -| paco3_2_0_pfold pco_0 pco_1 - (LE : pco_0 <3= (paco3_2_0 r_0 r_1 \3/ r_0)) - (LE : pco_1 <3= (paco3_2_1 r_0 r_1 \3/ r_1)) - (SIM: gf_0 pco_0 pco_1 x0 x1 x2) -with paco3_2_1( r_0 r_1: rel3 T0 T1 T2) x0 x1 x2 : Prop := -| paco3_2_1_pfold pco_0 pco_1 - (LE : pco_0 <3= (paco3_2_0 r_0 r_1 \3/ r_0)) - (LE : pco_1 <3= (paco3_2_1 r_0 r_1 \3/ r_1)) - (SIM: gf_1 pco_0 pco_1 x0 x1 x2) -. +Definition paco3_2_0( r_0 r_1: rel3 T0 T1 T2) : rel3 T0 T1 T2 := + curry3 (paco_2_0 (fun R0 R1 => uncurry3 (gf_0 (curry3 R0) (curry3 R1))) (fun R0 R1 => uncurry3 (gf_1 (curry3 R0) (curry3 R1))) (uncurry3 r_0) (uncurry3 r_1)). + +Definition paco3_2_1( r_0 r_1: rel3 T0 T1 T2) : rel3 T0 T1 T2 := + curry3 (paco_2_1 (fun R0 R1 => uncurry3 (gf_0 (curry3 R0) (curry3 R1))) (fun R0 R1 => uncurry3 (gf_1 (curry3 R0) (curry3 R1))) (uncurry3 r_0) (uncurry3 r_1)). + Definition upaco3_2_0( r_0 r_1: rel3 T0 T1 T2) := paco3_2_0 r_0 r_1 \3/ r_0. Definition upaco3_2_1( r_0 r_1: rel3 T0 T1 T2) := paco3_2_1 r_0 r_1 \3/ r_1. End Arg3_2_def. -Arguments paco3_2_0 [ T0 T1 T2 ]. -Arguments upaco3_2_0 [ T0 T1 T2 ]. +Arguments paco3_2_0 : clear implicits. +Arguments upaco3_2_0 : clear implicits. Hint Unfold upaco3_2_0. -Arguments paco3_2_1 [ T0 T1 T2 ]. -Arguments upaco3_2_1 [ T0 T1 T2 ]. +Arguments paco3_2_1 : clear implicits. +Arguments upaco3_2_1 : clear implicits. Hint Unfold upaco3_2_1. Section Arg3_3_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. Variable gf_0 gf_1 gf_2 : rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. -CoInductive paco3_3_0( r_0 r_1 r_2: rel3 T0 T1 T2) x0 x1 x2 : Prop := -| paco3_3_0_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <3= (paco3_3_0 r_0 r_1 r_2 \3/ r_0)) - (LE : pco_1 <3= (paco3_3_1 r_0 r_1 r_2 \3/ r_1)) - (LE : pco_2 <3= (paco3_3_2 r_0 r_1 r_2 \3/ r_2)) - (SIM: gf_0 pco_0 pco_1 pco_2 x0 x1 x2) -with paco3_3_1( r_0 r_1 r_2: rel3 T0 T1 T2) x0 x1 x2 : Prop := -| paco3_3_1_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <3= (paco3_3_0 r_0 r_1 r_2 \3/ r_0)) - (LE : pco_1 <3= (paco3_3_1 r_0 r_1 r_2 \3/ r_1)) - (LE : pco_2 <3= (paco3_3_2 r_0 r_1 r_2 \3/ r_2)) - (SIM: gf_1 pco_0 pco_1 pco_2 x0 x1 x2) -with paco3_3_2( r_0 r_1 r_2: rel3 T0 T1 T2) x0 x1 x2 : Prop := -| paco3_3_2_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <3= (paco3_3_0 r_0 r_1 r_2 \3/ r_0)) - (LE : pco_1 <3= (paco3_3_1 r_0 r_1 r_2 \3/ r_1)) - (LE : pco_2 <3= (paco3_3_2 r_0 r_1 r_2 \3/ r_2)) - (SIM: gf_2 pco_0 pco_1 pco_2 x0 x1 x2) -. +Definition paco3_3_0( r_0 r_1 r_2: rel3 T0 T1 T2) : rel3 T0 T1 T2 := + curry3 (paco_3_0 (fun R0 R1 R2 => uncurry3 (gf_0 (curry3 R0) (curry3 R1) (curry3 R2))) (fun R0 R1 R2 => uncurry3 (gf_1 (curry3 R0) (curry3 R1) (curry3 R2))) (fun R0 R1 R2 => uncurry3 (gf_2 (curry3 R0) (curry3 R1) (curry3 R2))) (uncurry3 r_0) (uncurry3 r_1) (uncurry3 r_2)). + +Definition paco3_3_1( r_0 r_1 r_2: rel3 T0 T1 T2) : rel3 T0 T1 T2 := + curry3 (paco_3_1 (fun R0 R1 R2 => uncurry3 (gf_0 (curry3 R0) (curry3 R1) (curry3 R2))) (fun R0 R1 R2 => uncurry3 (gf_1 (curry3 R0) (curry3 R1) (curry3 R2))) (fun R0 R1 R2 => uncurry3 (gf_2 (curry3 R0) (curry3 R1) (curry3 R2))) (uncurry3 r_0) (uncurry3 r_1) (uncurry3 r_2)). + +Definition paco3_3_2( r_0 r_1 r_2: rel3 T0 T1 T2) : rel3 T0 T1 T2 := + curry3 (paco_3_2 (fun R0 R1 R2 => uncurry3 (gf_0 (curry3 R0) (curry3 R1) (curry3 R2))) (fun R0 R1 R2 => uncurry3 (gf_1 (curry3 R0) (curry3 R1) (curry3 R2))) (fun R0 R1 R2 => uncurry3 (gf_2 (curry3 R0) (curry3 R1) (curry3 R2))) (uncurry3 r_0) (uncurry3 r_1) (uncurry3 r_2)). + Definition upaco3_3_0( r_0 r_1 r_2: rel3 T0 T1 T2) := paco3_3_0 r_0 r_1 r_2 \3/ r_0. Definition upaco3_3_1( r_0 r_1 r_2: rel3 T0 T1 T2) := paco3_3_1 r_0 r_1 r_2 \3/ r_1. Definition upaco3_3_2( r_0 r_1 r_2: rel3 T0 T1 T2) := paco3_3_2 r_0 r_1 r_2 \3/ r_2. End Arg3_3_def. -Arguments paco3_3_0 [ T0 T1 T2 ]. -Arguments upaco3_3_0 [ T0 T1 T2 ]. +Arguments paco3_3_0 : clear implicits. +Arguments upaco3_3_0 : clear implicits. Hint Unfold upaco3_3_0. -Arguments paco3_3_1 [ T0 T1 T2 ]. -Arguments upaco3_3_1 [ T0 T1 T2 ]. +Arguments paco3_3_1 : clear implicits. +Arguments upaco3_3_1 : clear implicits. Hint Unfold upaco3_3_1. -Arguments paco3_3_2 [ T0 T1 T2 ]. -Arguments upaco3_3_2 [ T0 T1 T2 ]. +Arguments paco3_3_2 : clear implicits. +Arguments upaco3_3_2 : clear implicits. Hint Unfold upaco3_3_2. -(* Less than or equal - internal use only *) -Notation "p <_paco_3= q" := - (forall _paco_x0 _paco_x1 _paco_x2 (PR: p _paco_x0 _paco_x1 _paco_x2 : Prop), q _paco_x0 _paco_x1 _paco_x2 : Prop) - (at level 50, no associativity). - (** 1 Mutual Coinduction *) Section Arg3_1. -Definition monotone3 T0 T1 T2 (gf: rel3 T0 T1 T2 -> rel3 T0 T1 T2) := +Definition monotone3 (gf: rel3 T0 T1 T2 -> rel3 T0 T1 T2) := forall x0 x1 x2 r r' (IN: gf r x0 x1 x2) (LE: r <3= r'), gf r' x0 x1 x2. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. +Definition _monotone3 (gf: rel3 T0 T1 T2 -> rel3 T0 T1 T2) := + forall r r'(LE: r <3= r'), gf r <3== gf r'. + +Lemma monotone3_eq (gf: rel3 T0 T1 T2 -> rel3 T0 T1 T2) : + monotone3 gf <-> _monotone3 gf. +Proof. unfold monotone3, _monotone3, le3. split; eauto. Qed. + +Lemma monotone3_map (gf: rel3 T0 T1 T2 -> rel3 T0 T1 T2) + (MON: _monotone3 gf) : + _monotone (fun R0 => uncurry3 (gf (curry3 R0))). +Proof. + repeat_intros 3. apply uncurry_map3. apply MON; apply curry_map3; auto. +Qed. + Variable gf : rel3 T0 T1 T2 -> rel3 T0 T1 T2. Arguments gf : clear implicits. +Theorem _paco3_mon: _monotone3 (paco3 gf). +Proof. + repeat_intros 3. eapply curry_map3, _paco_mon; apply uncurry_map3; auto. +Qed. + +Theorem _paco3_acc: forall + l r (OBG: forall rr (INC: r <3== rr) (CIH: l <3== rr), l <3== paco3 gf rr), + l <3== paco3 gf r. +Proof. + intros. apply uncurry_adjoint1_3. + eapply _paco_acc. intros. + apply uncurry_adjoint1_3 in INC. apply uncurry_adjoint1_3 in CIH. + apply uncurry_adjoint2_3. + eapply le3_trans. eapply (OBG _ INC CIH). + apply curry_map3. + apply _paco_mon; try apply le1_refl; apply curry_bij1_3. +Qed. + +Theorem _paco3_mult_strong: forall r, + paco3 gf (upaco3 gf r) <3== paco3 gf r. +Proof. + intros. apply curry_map3. + eapply le1_trans; [| eapply _paco_mult_strong]. + apply _paco_mon; intros []; eauto. +Qed. + +Theorem _paco3_fold: forall r, + gf (upaco3 gf r) <3== paco3 gf r. +Proof. + intros. apply uncurry_adjoint1_3. + eapply le1_trans; [| apply _paco_fold]. apply le1_refl. +Qed. + +Theorem _paco3_unfold: forall (MON: _monotone3 gf) r, + paco3 gf r <3== gf (upaco3 gf r). +Proof. + intros. apply curry_adjoint2_3. + eapply _paco_unfold; apply monotone3_map; auto. +Qed. + Theorem paco3_acc: forall - l r (OBG: forall rr (INC: r <3= rr) (CIH: l <_paco_3= rr), l <_paco_3= paco3 gf rr), + l r (OBG: forall rr (INC: r <3= rr) (CIH: l <3= rr), l <3= paco3 gf rr), l <3= paco3 gf r. Proof. - intros; assert (SIM: paco3 gf (r \3/ l) x0 x1 x2) by eauto. - clear PR; repeat (try left; do 4 paco_revert; paco_cofix_auto). + apply _paco3_acc. Qed. Theorem paco3_mon: monotone3 (paco3 gf). -Proof. paco_cofix_auto; repeat (left; do 4 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone3_eq. + apply _paco3_mon. +Qed. Theorem paco3_mult_strong: forall r, paco3 gf (upaco3 gf r) <3= paco3 gf r. -Proof. paco_cofix_auto; repeat (left; do 4 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco3_mult_strong. +Qed. Corollary paco3_mult: forall r, paco3 gf (paco3 gf r) <3= paco3 gf r. @@ -133,25 +225,26 @@ Proof. intros; eapply paco3_mult_strong, paco3_mon; eauto. Qed. Theorem paco3_fold: forall r, gf (upaco3 gf r) <3= paco3 gf r. -Proof. intros; econstructor; [ |eauto]; eauto. Qed. +Proof. + apply _paco3_fold. +Qed. Theorem paco3_unfold: forall (MON: monotone3 gf) r, paco3 gf r <3= gf (upaco3 gf r). -Proof. unfold monotone3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 1. eapply _paco3_unfold; apply monotone3_eq; auto. +Qed. End Arg3_1. -Hint Unfold monotone3. -Hint Resolve paco3_fold. - -Arguments paco3_acc [ T0 T1 T2 ]. -Arguments paco3_mon [ T0 T1 T2 ]. -Arguments paco3_mult_strong [ T0 T1 T2 ]. -Arguments paco3_mult [ T0 T1 T2 ]. -Arguments paco3_fold [ T0 T1 T2 ]. -Arguments paco3_unfold [ T0 T1 T2 ]. +Arguments paco3_acc : clear implicits. +Arguments paco3_mon : clear implicits. +Arguments paco3_mult_strong : clear implicits. +Arguments paco3_mult : clear implicits. +Arguments paco3_fold : clear implicits. +Arguments paco3_unfold : clear implicits. -Instance paco3_inst T0 T1 T2 (gf : rel3 T0 T1 T2->_) r x0 x1 x2 : paco_class (paco3 gf r x0 x1 x2) := +Global Instance paco3_inst (gf : rel3 T0 T1 T2->_) r x0 x1 x2 : paco_class (paco3 gf r x0 x1 x2) := { pacoacc := paco3_acc gf; pacomult := paco3_mult gf; pacofold := paco3_fold gf; @@ -161,45 +254,144 @@ Instance paco3_inst T0 T1 T2 (gf : rel3 T0 T1 T2->_) r x0 x1 x2 : paco_class (p Section Arg3_2. -Definition monotone3_2 T0 T1 T2 (gf: rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2) := +Definition monotone3_2 (gf: rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2) := forall x0 x1 x2 r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1 x0 x1 x2) (LE_0: r_0 <3= r'_0)(LE_1: r_1 <3= r'_1), gf r'_0 r'_1 x0 x1 x2. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. +Definition _monotone3_2 (gf: rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <3= r'_0)(LE_1: r_1 <3= r'_1), gf r_0 r_1 <3== gf r'_0 r'_1. + +Lemma monotone3_2_eq (gf: rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2) : + monotone3_2 gf <-> _monotone3_2 gf. +Proof. unfold monotone3_2, _monotone3_2, le3. split; eauto. Qed. + +Lemma monotone3_2_map (gf: rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2) + (MON: _monotone3_2 gf) : + _monotone_2 (fun R0 R1 => uncurry3 (gf (curry3 R0) (curry3 R1))). +Proof. + repeat_intros 6. apply uncurry_map3. apply MON; apply curry_map3; auto. +Qed. + Variable gf_0 gf_1 : rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. +Theorem _paco3_2_0_mon: _monotone3_2 (paco3_2_0 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map3, _paco_2_0_mon; apply uncurry_map3; auto. +Qed. + +Theorem _paco3_2_1_mon: _monotone3_2 (paco3_2_1 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map3, _paco_2_1_mon; apply uncurry_map3; auto. +Qed. + +Theorem _paco3_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <3== rr) (CIH: l <3== rr), l <3== paco3_2_0 gf_0 gf_1 rr r_1), + l <3== paco3_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_3. + eapply _paco_2_0_acc. intros. + apply uncurry_adjoint1_3 in INC. apply uncurry_adjoint1_3 in CIH. + apply uncurry_adjoint2_3. + eapply le3_trans. eapply (OBG _ INC CIH). + apply curry_map3. + apply _paco_2_0_mon; try apply le1_refl; apply curry_bij1_3. +Qed. + +Theorem _paco3_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <3== rr) (CIH: l <3== rr), l <3== paco3_2_1 gf_0 gf_1 r_0 rr), + l <3== paco3_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_3. + eapply _paco_2_1_acc. intros. + apply uncurry_adjoint1_3 in INC. apply uncurry_adjoint1_3 in CIH. + apply uncurry_adjoint2_3. + eapply le3_trans. eapply (OBG _ INC CIH). + apply curry_map3. + apply _paco_2_1_mon; try apply le1_refl; apply curry_bij1_3. +Qed. + +Theorem _paco3_2_0_mult_strong: forall r_0 r_1, + paco3_2_0 gf_0 gf_1 (upaco3_2_0 gf_0 gf_1 r_0 r_1) (upaco3_2_1 gf_0 gf_1 r_0 r_1) <3== paco3_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map3. + eapply le1_trans; [| eapply _paco_2_0_mult_strong]. + apply _paco_2_0_mon; intros []; eauto. +Qed. + +Theorem _paco3_2_1_mult_strong: forall r_0 r_1, + paco3_2_1 gf_0 gf_1 (upaco3_2_0 gf_0 gf_1 r_0 r_1) (upaco3_2_1 gf_0 gf_1 r_0 r_1) <3== paco3_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map3. + eapply le1_trans; [| eapply _paco_2_1_mult_strong]. + apply _paco_2_1_mon; intros []; eauto. +Qed. + +Theorem _paco3_2_0_fold: forall r_0 r_1, + gf_0 (upaco3_2_0 gf_0 gf_1 r_0 r_1) (upaco3_2_1 gf_0 gf_1 r_0 r_1) <3== paco3_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_3. + eapply le1_trans; [| apply _paco_2_0_fold]. apply le1_refl. +Qed. + +Theorem _paco3_2_1_fold: forall r_0 r_1, + gf_1 (upaco3_2_0 gf_0 gf_1 r_0 r_1) (upaco3_2_1 gf_0 gf_1 r_0 r_1) <3== paco3_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_3. + eapply le1_trans; [| apply _paco_2_1_fold]. apply le1_refl. +Qed. + +Theorem _paco3_2_0_unfold: forall (MON: _monotone3_2 gf_0) (MON: _monotone3_2 gf_1) r_0 r_1, + paco3_2_0 gf_0 gf_1 r_0 r_1 <3== gf_0 (upaco3_2_0 gf_0 gf_1 r_0 r_1) (upaco3_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_3. + eapply _paco_2_0_unfold; apply monotone3_2_map; auto. +Qed. + +Theorem _paco3_2_1_unfold: forall (MON: _monotone3_2 gf_0) (MON: _monotone3_2 gf_1) r_0 r_1, + paco3_2_1 gf_0 gf_1 r_0 r_1 <3== gf_1 (upaco3_2_0 gf_0 gf_1 r_0 r_1) (upaco3_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_3. + eapply _paco_2_1_unfold; apply monotone3_2_map; auto. +Qed. + Theorem paco3_2_0_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_0 <3= rr) (CIH: l <_paco_3= rr), l <_paco_3= paco3_2_0 gf_0 gf_1 rr r_1), + l r_0 r_1 (OBG: forall rr (INC: r_0 <3= rr) (CIH: l <3= rr), l <3= paco3_2_0 gf_0 gf_1 rr r_1), l <3= paco3_2_0 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco3_2_0 gf_0 gf_1 (r_0 \3/ l) r_1 x0 x1 x2) by eauto. - clear PR; repeat (try left; do 4 paco_revert; paco_cofix_auto). + apply _paco3_2_0_acc. Qed. Theorem paco3_2_1_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_1 <3= rr) (CIH: l <_paco_3= rr), l <_paco_3= paco3_2_1 gf_0 gf_1 r_0 rr), + l r_0 r_1 (OBG: forall rr (INC: r_1 <3= rr) (CIH: l <3= rr), l <3= paco3_2_1 gf_0 gf_1 r_0 rr), l <3= paco3_2_1 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco3_2_1 gf_0 gf_1 r_0 (r_1 \3/ l) x0 x1 x2) by eauto. - clear PR; repeat (try left; do 4 paco_revert; paco_cofix_auto). + apply _paco3_2_1_acc. Qed. Theorem paco3_2_0_mon: monotone3_2 (paco3_2_0 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 4 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone3_2_eq. + apply _paco3_2_0_mon. +Qed. Theorem paco3_2_1_mon: monotone3_2 (paco3_2_1 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 4 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone3_2_eq. + apply _paco3_2_1_mon. +Qed. Theorem paco3_2_0_mult_strong: forall r_0 r_1, paco3_2_0 gf_0 gf_1 (upaco3_2_0 gf_0 gf_1 r_0 r_1) (upaco3_2_1 gf_0 gf_1 r_0 r_1) <3= paco3_2_0 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 4 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco3_2_0_mult_strong. +Qed. Theorem paco3_2_1_mult_strong: forall r_0 r_1, paco3_2_1 gf_0 gf_1 (upaco3_2_0 gf_0 gf_1 r_0 r_1) (upaco3_2_1 gf_0 gf_1 r_0 r_1) <3= paco3_2_1 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 4 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco3_2_1_mult_strong. +Qed. Corollary paco3_2_0_mult: forall r_0 r_1, paco3_2_0 gf_0 gf_1 (paco3_2_0 gf_0 gf_1 r_0 r_1) (paco3_2_1 gf_0 gf_1 r_0 r_1) <3= paco3_2_0 gf_0 gf_1 r_0 r_1. @@ -211,46 +403,50 @@ Proof. intros; eapply paco3_2_1_mult_strong, paco3_2_1_mon; eauto. Qed. Theorem paco3_2_0_fold: forall r_0 r_1, gf_0 (upaco3_2_0 gf_0 gf_1 r_0 r_1) (upaco3_2_1 gf_0 gf_1 r_0 r_1) <3= paco3_2_0 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco3_2_0_fold. +Qed. Theorem paco3_2_1_fold: forall r_0 r_1, gf_1 (upaco3_2_0 gf_0 gf_1 r_0 r_1) (upaco3_2_1 gf_0 gf_1 r_0 r_1) <3= paco3_2_1 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco3_2_1_fold. +Qed. Theorem paco3_2_0_unfold: forall (MON: monotone3_2 gf_0) (MON: monotone3_2 gf_1) r_0 r_1, paco3_2_0 gf_0 gf_1 r_0 r_1 <3= gf_0 (upaco3_2_0 gf_0 gf_1 r_0 r_1) (upaco3_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone3_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco3_2_0_unfold; apply monotone3_2_eq; auto. +Qed. Theorem paco3_2_1_unfold: forall (MON: monotone3_2 gf_0) (MON: monotone3_2 gf_1) r_0 r_1, paco3_2_1 gf_0 gf_1 r_0 r_1 <3= gf_1 (upaco3_2_0 gf_0 gf_1 r_0 r_1) (upaco3_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone3_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco3_2_1_unfold; apply monotone3_2_eq; auto. +Qed. End Arg3_2. -Hint Unfold monotone3_2. -Hint Resolve paco3_2_0_fold. -Hint Resolve paco3_2_1_fold. - -Arguments paco3_2_0_acc [ T0 T1 T2 ]. -Arguments paco3_2_1_acc [ T0 T1 T2 ]. -Arguments paco3_2_0_mon [ T0 T1 T2 ]. -Arguments paco3_2_1_mon [ T0 T1 T2 ]. -Arguments paco3_2_0_mult_strong [ T0 T1 T2 ]. -Arguments paco3_2_1_mult_strong [ T0 T1 T2 ]. -Arguments paco3_2_0_mult [ T0 T1 T2 ]. -Arguments paco3_2_1_mult [ T0 T1 T2 ]. -Arguments paco3_2_0_fold [ T0 T1 T2 ]. -Arguments paco3_2_1_fold [ T0 T1 T2 ]. -Arguments paco3_2_0_unfold [ T0 T1 T2 ]. -Arguments paco3_2_1_unfold [ T0 T1 T2 ]. - -Instance paco3_2_0_inst T0 T1 T2 (gf_0 gf_1 : rel3 T0 T1 T2->_) r_0 r_1 x0 x1 x2 : paco_class (paco3_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2) := +Arguments paco3_2_0_acc : clear implicits. +Arguments paco3_2_1_acc : clear implicits. +Arguments paco3_2_0_mon : clear implicits. +Arguments paco3_2_1_mon : clear implicits. +Arguments paco3_2_0_mult_strong : clear implicits. +Arguments paco3_2_1_mult_strong : clear implicits. +Arguments paco3_2_0_mult : clear implicits. +Arguments paco3_2_1_mult : clear implicits. +Arguments paco3_2_0_fold : clear implicits. +Arguments paco3_2_1_fold : clear implicits. +Arguments paco3_2_0_unfold : clear implicits. +Arguments paco3_2_1_unfold : clear implicits. + +Global Instance paco3_2_0_inst (gf_0 gf_1 : rel3 T0 T1 T2->_) r_0 r_1 x0 x1 x2 : paco_class (paco3_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2) := { pacoacc := paco3_2_0_acc gf_0 gf_1; pacomult := paco3_2_0_mult gf_0 gf_1; pacofold := paco3_2_0_fold gf_0 gf_1; pacounfold := paco3_2_0_unfold gf_0 gf_1 }. -Instance paco3_2_1_inst T0 T1 T2 (gf_0 gf_1 : rel3 T0 T1 T2->_) r_0 r_1 x0 x1 x2 : paco_class (paco3_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2) := +Global Instance paco3_2_1_inst (gf_0 gf_1 : rel3 T0 T1 T2->_) r_0 r_1 x0 x1 x2 : paco_class (paco3_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2) := { pacoacc := paco3_2_1_acc gf_0 gf_1; pacomult := paco3_2_1_mult gf_0 gf_1; pacofold := paco3_2_1_fold gf_0 gf_1; @@ -260,61 +456,204 @@ Instance paco3_2_1_inst T0 T1 T2 (gf_0 gf_1 : rel3 T0 T1 T2->_) r_0 r_1 x0 x1 x Section Arg3_3. -Definition monotone3_3 T0 T1 T2 (gf: rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2) := +Definition monotone3_3 (gf: rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2) := forall x0 x1 x2 r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2 x0 x1 x2) (LE_0: r_0 <3= r'_0)(LE_1: r_1 <3= r'_1)(LE_2: r_2 <3= r'_2), gf r'_0 r'_1 r'_2 x0 x1 x2. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. +Definition _monotone3_3 (gf: rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <3= r'_0)(LE_1: r_1 <3= r'_1)(LE_2: r_2 <3= r'_2), gf r_0 r_1 r_2 <3== gf r'_0 r'_1 r'_2. + +Lemma monotone3_3_eq (gf: rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2) : + monotone3_3 gf <-> _monotone3_3 gf. +Proof. unfold monotone3_3, _monotone3_3, le3. split; eauto. Qed. + +Lemma monotone3_3_map (gf: rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2) + (MON: _monotone3_3 gf) : + _monotone_3 (fun R0 R1 R2 => uncurry3 (gf (curry3 R0) (curry3 R1) (curry3 R2))). +Proof. + repeat_intros 9. apply uncurry_map3. apply MON; apply curry_map3; auto. +Qed. + Variable gf_0 gf_1 gf_2 : rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2 -> rel3 T0 T1 T2. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. +Theorem _paco3_3_0_mon: _monotone3_3 (paco3_3_0 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map3, _paco_3_0_mon; apply uncurry_map3; auto. +Qed. + +Theorem _paco3_3_1_mon: _monotone3_3 (paco3_3_1 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map3, _paco_3_1_mon; apply uncurry_map3; auto. +Qed. + +Theorem _paco3_3_2_mon: _monotone3_3 (paco3_3_2 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map3, _paco_3_2_mon; apply uncurry_map3; auto. +Qed. + +Theorem _paco3_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <3== rr) (CIH: l <3== rr), l <3== paco3_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <3== paco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_3. + eapply _paco_3_0_acc. intros. + apply uncurry_adjoint1_3 in INC. apply uncurry_adjoint1_3 in CIH. + apply uncurry_adjoint2_3. + eapply le3_trans. eapply (OBG _ INC CIH). + apply curry_map3. + apply _paco_3_0_mon; try apply le1_refl; apply curry_bij1_3. +Qed. + +Theorem _paco3_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <3== rr) (CIH: l <3== rr), l <3== paco3_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <3== paco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_3. + eapply _paco_3_1_acc. intros. + apply uncurry_adjoint1_3 in INC. apply uncurry_adjoint1_3 in CIH. + apply uncurry_adjoint2_3. + eapply le3_trans. eapply (OBG _ INC CIH). + apply curry_map3. + apply _paco_3_1_mon; try apply le1_refl; apply curry_bij1_3. +Qed. + +Theorem _paco3_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <3== rr) (CIH: l <3== rr), l <3== paco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <3== paco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_3. + eapply _paco_3_2_acc. intros. + apply uncurry_adjoint1_3 in INC. apply uncurry_adjoint1_3 in CIH. + apply uncurry_adjoint2_3. + eapply le3_trans. eapply (OBG _ INC CIH). + apply curry_map3. + apply _paco_3_2_mon; try apply le1_refl; apply curry_bij1_3. +Qed. + +Theorem _paco3_3_0_mult_strong: forall r_0 r_1 r_2, + paco3_3_0 gf_0 gf_1 gf_2 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <3== paco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map3. + eapply le1_trans; [| eapply _paco_3_0_mult_strong]. + apply _paco_3_0_mon; intros []; eauto. +Qed. + +Theorem _paco3_3_1_mult_strong: forall r_0 r_1 r_2, + paco3_3_1 gf_0 gf_1 gf_2 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <3== paco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map3. + eapply le1_trans; [| eapply _paco_3_1_mult_strong]. + apply _paco_3_1_mon; intros []; eauto. +Qed. + +Theorem _paco3_3_2_mult_strong: forall r_0 r_1 r_2, + paco3_3_2 gf_0 gf_1 gf_2 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <3== paco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map3. + eapply le1_trans; [| eapply _paco_3_2_mult_strong]. + apply _paco_3_2_mon; intros []; eauto. +Qed. + +Theorem _paco3_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <3== paco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_3. + eapply le1_trans; [| apply _paco_3_0_fold]. apply le1_refl. +Qed. + +Theorem _paco3_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <3== paco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_3. + eapply le1_trans; [| apply _paco_3_1_fold]. apply le1_refl. +Qed. + +Theorem _paco3_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <3== paco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_3. + eapply le1_trans; [| apply _paco_3_2_fold]. apply le1_refl. +Qed. + +Theorem _paco3_3_0_unfold: forall (MON: _monotone3_3 gf_0) (MON: _monotone3_3 gf_1) (MON: _monotone3_3 gf_2) r_0 r_1 r_2, + paco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <3== gf_0 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_3. + eapply _paco_3_0_unfold; apply monotone3_3_map; auto. +Qed. + +Theorem _paco3_3_1_unfold: forall (MON: _monotone3_3 gf_0) (MON: _monotone3_3 gf_1) (MON: _monotone3_3 gf_2) r_0 r_1 r_2, + paco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <3== gf_1 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_3. + eapply _paco_3_1_unfold; apply monotone3_3_map; auto. +Qed. + +Theorem _paco3_3_2_unfold: forall (MON: _monotone3_3 gf_0) (MON: _monotone3_3 gf_1) (MON: _monotone3_3 gf_2) r_0 r_1 r_2, + paco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <3== gf_2 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_3. + eapply _paco_3_2_unfold; apply monotone3_3_map; auto. +Qed. + Theorem paco3_3_0_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <3= rr) (CIH: l <_paco_3= rr), l <_paco_3= paco3_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <3= rr) (CIH: l <3= rr), l <3= paco3_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), l <3= paco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco3_3_0 gf_0 gf_1 gf_2 (r_0 \3/ l) r_1 r_2 x0 x1 x2) by eauto. - clear PR; repeat (try left; do 4 paco_revert; paco_cofix_auto). + apply _paco3_3_0_acc. Qed. Theorem paco3_3_1_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <3= rr) (CIH: l <_paco_3= rr), l <_paco_3= paco3_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <3= rr) (CIH: l <3= rr), l <3= paco3_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), l <3= paco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco3_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \3/ l) r_2 x0 x1 x2) by eauto. - clear PR; repeat (try left; do 4 paco_revert; paco_cofix_auto). + apply _paco3_3_1_acc. Qed. Theorem paco3_3_2_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <3= rr) (CIH: l <_paco_3= rr), l <_paco_3= paco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <3= rr) (CIH: l <3= rr), l <3= paco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), l <3= paco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \3/ l) x0 x1 x2) by eauto. - clear PR; repeat (try left; do 4 paco_revert; paco_cofix_auto). + apply _paco3_3_2_acc. Qed. Theorem paco3_3_0_mon: monotone3_3 (paco3_3_0 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 4 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone3_3_eq. + apply _paco3_3_0_mon. +Qed. Theorem paco3_3_1_mon: monotone3_3 (paco3_3_1 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 4 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone3_3_eq. + apply _paco3_3_1_mon. +Qed. Theorem paco3_3_2_mon: monotone3_3 (paco3_3_2 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 4 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone3_3_eq. + apply _paco3_3_2_mon. +Qed. Theorem paco3_3_0_mult_strong: forall r_0 r_1 r_2, paco3_3_0 gf_0 gf_1 gf_2 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <3= paco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 4 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco3_3_0_mult_strong. +Qed. Theorem paco3_3_1_mult_strong: forall r_0 r_1 r_2, paco3_3_1 gf_0 gf_1 gf_2 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <3= paco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 4 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco3_3_1_mult_strong. +Qed. Theorem paco3_3_2_mult_strong: forall r_0 r_1 r_2, paco3_3_2 gf_0 gf_1 gf_2 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <3= paco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 4 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco3_3_2_mult_strong. +Qed. Corollary paco3_3_0_mult: forall r_0 r_1 r_2, paco3_3_0 gf_0 gf_1 gf_2 (paco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <3= paco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. @@ -330,69 +669,105 @@ Proof. intros; eapply paco3_3_2_mult_strong, paco3_3_2_mon; eauto. Qed. Theorem paco3_3_0_fold: forall r_0 r_1 r_2, gf_0 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <3= paco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco3_3_0_fold. +Qed. Theorem paco3_3_1_fold: forall r_0 r_1 r_2, gf_1 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <3= paco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco3_3_1_fold. +Qed. Theorem paco3_3_2_fold: forall r_0 r_1 r_2, gf_2 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <3= paco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco3_3_2_fold. +Qed. Theorem paco3_3_0_unfold: forall (MON: monotone3_3 gf_0) (MON: monotone3_3 gf_1) (MON: monotone3_3 gf_2) r_0 r_1 r_2, paco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <3= gf_0 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone3_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco3_3_0_unfold; apply monotone3_3_eq; auto. +Qed. Theorem paco3_3_1_unfold: forall (MON: monotone3_3 gf_0) (MON: monotone3_3 gf_1) (MON: monotone3_3 gf_2) r_0 r_1 r_2, paco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <3= gf_1 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone3_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco3_3_1_unfold; apply monotone3_3_eq; auto. +Qed. Theorem paco3_3_2_unfold: forall (MON: monotone3_3 gf_0) (MON: monotone3_3 gf_1) (MON: monotone3_3 gf_2) r_0 r_1 r_2, paco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <3= gf_2 (upaco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone3_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco3_3_2_unfold; apply monotone3_3_eq; auto. +Qed. End Arg3_3. -Hint Unfold monotone3_3. -Hint Resolve paco3_3_0_fold. -Hint Resolve paco3_3_1_fold. -Hint Resolve paco3_3_2_fold. - -Arguments paco3_3_0_acc [ T0 T1 T2 ]. -Arguments paco3_3_1_acc [ T0 T1 T2 ]. -Arguments paco3_3_2_acc [ T0 T1 T2 ]. -Arguments paco3_3_0_mon [ T0 T1 T2 ]. -Arguments paco3_3_1_mon [ T0 T1 T2 ]. -Arguments paco3_3_2_mon [ T0 T1 T2 ]. -Arguments paco3_3_0_mult_strong [ T0 T1 T2 ]. -Arguments paco3_3_1_mult_strong [ T0 T1 T2 ]. -Arguments paco3_3_2_mult_strong [ T0 T1 T2 ]. -Arguments paco3_3_0_mult [ T0 T1 T2 ]. -Arguments paco3_3_1_mult [ T0 T1 T2 ]. -Arguments paco3_3_2_mult [ T0 T1 T2 ]. -Arguments paco3_3_0_fold [ T0 T1 T2 ]. -Arguments paco3_3_1_fold [ T0 T1 T2 ]. -Arguments paco3_3_2_fold [ T0 T1 T2 ]. -Arguments paco3_3_0_unfold [ T0 T1 T2 ]. -Arguments paco3_3_1_unfold [ T0 T1 T2 ]. -Arguments paco3_3_2_unfold [ T0 T1 T2 ]. - -Instance paco3_3_0_inst T0 T1 T2 (gf_0 gf_1 gf_2 : rel3 T0 T1 T2->_) r_0 r_1 r_2 x0 x1 x2 : paco_class (paco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2) := +Arguments paco3_3_0_acc : clear implicits. +Arguments paco3_3_1_acc : clear implicits. +Arguments paco3_3_2_acc : clear implicits. +Arguments paco3_3_0_mon : clear implicits. +Arguments paco3_3_1_mon : clear implicits. +Arguments paco3_3_2_mon : clear implicits. +Arguments paco3_3_0_mult_strong : clear implicits. +Arguments paco3_3_1_mult_strong : clear implicits. +Arguments paco3_3_2_mult_strong : clear implicits. +Arguments paco3_3_0_mult : clear implicits. +Arguments paco3_3_1_mult : clear implicits. +Arguments paco3_3_2_mult : clear implicits. +Arguments paco3_3_0_fold : clear implicits. +Arguments paco3_3_1_fold : clear implicits. +Arguments paco3_3_2_fold : clear implicits. +Arguments paco3_3_0_unfold : clear implicits. +Arguments paco3_3_1_unfold : clear implicits. +Arguments paco3_3_2_unfold : clear implicits. + +Global Instance paco3_3_0_inst (gf_0 gf_1 gf_2 : rel3 T0 T1 T2->_) r_0 r_1 r_2 x0 x1 x2 : paco_class (paco3_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2) := { pacoacc := paco3_3_0_acc gf_0 gf_1 gf_2; pacomult := paco3_3_0_mult gf_0 gf_1 gf_2; pacofold := paco3_3_0_fold gf_0 gf_1 gf_2; pacounfold := paco3_3_0_unfold gf_0 gf_1 gf_2 }. -Instance paco3_3_1_inst T0 T1 T2 (gf_0 gf_1 gf_2 : rel3 T0 T1 T2->_) r_0 r_1 r_2 x0 x1 x2 : paco_class (paco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2) := +Global Instance paco3_3_1_inst (gf_0 gf_1 gf_2 : rel3 T0 T1 T2->_) r_0 r_1 r_2 x0 x1 x2 : paco_class (paco3_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2) := { pacoacc := paco3_3_1_acc gf_0 gf_1 gf_2; pacomult := paco3_3_1_mult gf_0 gf_1 gf_2; pacofold := paco3_3_1_fold gf_0 gf_1 gf_2; pacounfold := paco3_3_1_unfold gf_0 gf_1 gf_2 }. -Instance paco3_3_2_inst T0 T1 T2 (gf_0 gf_1 gf_2 : rel3 T0 T1 T2->_) r_0 r_1 r_2 x0 x1 x2 : paco_class (paco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2) := +Global Instance paco3_3_2_inst (gf_0 gf_1 gf_2 : rel3 T0 T1 T2->_) r_0 r_1 r_2 x0 x1 x2 : paco_class (paco3_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2) := { pacoacc := paco3_3_2_acc gf_0 gf_1 gf_2; pacomult := paco3_3_2_mult gf_0 gf_1 gf_2; pacofold := paco3_3_2_fold gf_0 gf_1 gf_2; pacounfold := paco3_3_2_unfold gf_0 gf_1 gf_2 }. +End PACO3. + +Global Opaque paco3. + +Hint Unfold upaco3. +Hint Resolve paco3_fold. +Hint Unfold monotone3. + +Global Opaque paco3_2_0. +Global Opaque paco3_2_1. + +Hint Unfold upaco3_2_0. +Hint Unfold upaco3_2_1. +Hint Resolve paco3_2_0_fold. +Hint Resolve paco3_2_1_fold. +Hint Unfold monotone3_2. + +Global Opaque paco3_3_0. +Global Opaque paco3_3_1. +Global Opaque paco3_3_2. + +Hint Unfold upaco3_3_0. +Hint Unfold upaco3_3_1. +Hint Unfold upaco3_3_2. +Hint Resolve paco3_3_0_fold. +Hint Resolve paco3_3_1_fold. +Hint Resolve paco3_3_2_fold. +Hint Unfold monotone3_3. + diff --git a/src/paco4.v b/src/paco4.v index 57c30e6..1b52523 100644 --- a/src/paco4.v +++ b/src/paco4.v @@ -1,135 +1,225 @@ Require Export paconotation pacotacuser. -Require Import pacotac. +Require Import paconotation_internal pacotac pacon. Set Implicit Arguments. -(** ** Predicates of Arity 4 -*) +Section PACO4. -Section Arg4_def. Variable T0 : Type. Variable T1 : forall (x0: @T0), Type. Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. + +Record sig4T := + exist4T { + proj4T0: @T0; + proj4T1: @T1 proj4T0; + proj4T2: @T2 proj4T0 proj4T1; + proj4T3: @T3 proj4T0 proj4T1 proj4T2; + }. + +Definition uncurry4 (R: rel4 T0 T1 T2 T3): rel1 sig4T := fun x => R (proj4T0 x) (proj4T1 x) (proj4T2 x) (proj4T3 x). + +Definition curry4 (R: rel1 sig4T): rel4 T0 T1 T2 T3 := + fun x0 x1 x2 x3 => R (exist4T x3). + +Lemma uncurry_map4 r0 r1 (LE : r0 <4== r1) : uncurry4 r0 <1== uncurry4 r1. +Proof. intros [] H. apply LE. auto. Qed. + +Lemma uncurry_map_rev4 r0 r1 (LE: uncurry4 r0 <1== uncurry4 r1) : r0 <4== r1. +Proof. + repeat_intros 4. intros H. apply (LE (exist4T x3) H). +Qed. + +Lemma curry_map4 r0 r1 (LE: r0 <1== r1) : curry4 r0 <4== curry4 r1. +Proof. + repeat_intros 4. intros H. apply (LE (exist4T x3) H). +Qed. + +Lemma curry_map_rev4 r0 r1 (LE: curry4 r0 <4== curry4 r1) : r0 <1== r1. +Proof. + intros [] H. apply LE. apply H. +Qed. + +Lemma uncurry_bij1_4 r : curry4 (uncurry4 r) <4== r. +Proof. unfold le4. repeat_intros 4; auto. Qed. + +Lemma uncurry_bij2_4 r : r <4== curry4 (uncurry4 r). +Proof. unfold le4. repeat_intros 4; auto. Qed. + +Lemma curry_bij1_4 r : uncurry4 (curry4 r) <1== r. +Proof. intros []; auto. Qed. + +Lemma curry_bij2_4 r : r <1== uncurry4 (curry4 r). +Proof. intros []; auto. Qed. + +Lemma uncurry_adjoint1_4 r0 r1 (LE: uncurry4 r0 <1== r1) : r0 <4== curry4 r1. +Proof. + apply uncurry_map_rev4. eapply le1_trans; [eauto|]. apply curry_bij2_4. +Qed. + +Lemma uncurry_adjoint2_4 r0 r1 (LE: r0 <4== curry4 r1) : uncurry4 r0 <1== r1. +Proof. + apply curry_map_rev4. eapply le4_trans; [|eauto]. apply uncurry_bij2_4. +Qed. + +Lemma curry_adjoint1_4 r0 r1 (LE: curry4 r0 <4== r1) : r0 <1== uncurry4 r1. +Proof. + apply curry_map_rev4. eapply le4_trans; [eauto|]. apply uncurry_bij2_4. +Qed. + +Lemma curry_adjoint2_4 r0 r1 (LE: r0 <1== uncurry4 r1) : curry4 r0 <4== r1. +Proof. + apply uncurry_map_rev4. eapply le1_trans; [|eauto]. apply curry_bij1_4. +Qed. + +(** ** Predicates of Arity 4 +*) + +Section Arg4_def. Variable gf : rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3. Arguments gf : clear implicits. -CoInductive paco4( r: rel4 T0 T1 T2 T3) x0 x1 x2 x3 : Prop := -| paco4_pfold pco - (LE : pco <4= (paco4 r \4/ r)) - (SIM: gf pco x0 x1 x2 x3) -. +Definition paco4( r: rel4 T0 T1 T2 T3) : rel4 T0 T1 T2 T3 := + curry4 (paco (fun R0 => uncurry4 (gf (curry4 R0))) (uncurry4 r)). + Definition upaco4( r: rel4 T0 T1 T2 T3) := paco4 r \4/ r. End Arg4_def. -Arguments paco4 [ T0 T1 T2 T3 ]. -Arguments upaco4 [ T0 T1 T2 T3 ]. +Arguments paco4 : clear implicits. +Arguments upaco4 : clear implicits. Hint Unfold upaco4. Section Arg4_2_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. Variable gf_0 gf_1 : rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. -CoInductive paco4_2_0( r_0 r_1: rel4 T0 T1 T2 T3) x0 x1 x2 x3 : Prop := -| paco4_2_0_pfold pco_0 pco_1 - (LE : pco_0 <4= (paco4_2_0 r_0 r_1 \4/ r_0)) - (LE : pco_1 <4= (paco4_2_1 r_0 r_1 \4/ r_1)) - (SIM: gf_0 pco_0 pco_1 x0 x1 x2 x3) -with paco4_2_1( r_0 r_1: rel4 T0 T1 T2 T3) x0 x1 x2 x3 : Prop := -| paco4_2_1_pfold pco_0 pco_1 - (LE : pco_0 <4= (paco4_2_0 r_0 r_1 \4/ r_0)) - (LE : pco_1 <4= (paco4_2_1 r_0 r_1 \4/ r_1)) - (SIM: gf_1 pco_0 pco_1 x0 x1 x2 x3) -. +Definition paco4_2_0( r_0 r_1: rel4 T0 T1 T2 T3) : rel4 T0 T1 T2 T3 := + curry4 (paco_2_0 (fun R0 R1 => uncurry4 (gf_0 (curry4 R0) (curry4 R1))) (fun R0 R1 => uncurry4 (gf_1 (curry4 R0) (curry4 R1))) (uncurry4 r_0) (uncurry4 r_1)). + +Definition paco4_2_1( r_0 r_1: rel4 T0 T1 T2 T3) : rel4 T0 T1 T2 T3 := + curry4 (paco_2_1 (fun R0 R1 => uncurry4 (gf_0 (curry4 R0) (curry4 R1))) (fun R0 R1 => uncurry4 (gf_1 (curry4 R0) (curry4 R1))) (uncurry4 r_0) (uncurry4 r_1)). + Definition upaco4_2_0( r_0 r_1: rel4 T0 T1 T2 T3) := paco4_2_0 r_0 r_1 \4/ r_0. Definition upaco4_2_1( r_0 r_1: rel4 T0 T1 T2 T3) := paco4_2_1 r_0 r_1 \4/ r_1. End Arg4_2_def. -Arguments paco4_2_0 [ T0 T1 T2 T3 ]. -Arguments upaco4_2_0 [ T0 T1 T2 T3 ]. +Arguments paco4_2_0 : clear implicits. +Arguments upaco4_2_0 : clear implicits. Hint Unfold upaco4_2_0. -Arguments paco4_2_1 [ T0 T1 T2 T3 ]. -Arguments upaco4_2_1 [ T0 T1 T2 T3 ]. +Arguments paco4_2_1 : clear implicits. +Arguments upaco4_2_1 : clear implicits. Hint Unfold upaco4_2_1. Section Arg4_3_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. Variable gf_0 gf_1 gf_2 : rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. -CoInductive paco4_3_0( r_0 r_1 r_2: rel4 T0 T1 T2 T3) x0 x1 x2 x3 : Prop := -| paco4_3_0_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <4= (paco4_3_0 r_0 r_1 r_2 \4/ r_0)) - (LE : pco_1 <4= (paco4_3_1 r_0 r_1 r_2 \4/ r_1)) - (LE : pco_2 <4= (paco4_3_2 r_0 r_1 r_2 \4/ r_2)) - (SIM: gf_0 pco_0 pco_1 pco_2 x0 x1 x2 x3) -with paco4_3_1( r_0 r_1 r_2: rel4 T0 T1 T2 T3) x0 x1 x2 x3 : Prop := -| paco4_3_1_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <4= (paco4_3_0 r_0 r_1 r_2 \4/ r_0)) - (LE : pco_1 <4= (paco4_3_1 r_0 r_1 r_2 \4/ r_1)) - (LE : pco_2 <4= (paco4_3_2 r_0 r_1 r_2 \4/ r_2)) - (SIM: gf_1 pco_0 pco_1 pco_2 x0 x1 x2 x3) -with paco4_3_2( r_0 r_1 r_2: rel4 T0 T1 T2 T3) x0 x1 x2 x3 : Prop := -| paco4_3_2_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <4= (paco4_3_0 r_0 r_1 r_2 \4/ r_0)) - (LE : pco_1 <4= (paco4_3_1 r_0 r_1 r_2 \4/ r_1)) - (LE : pco_2 <4= (paco4_3_2 r_0 r_1 r_2 \4/ r_2)) - (SIM: gf_2 pco_0 pco_1 pco_2 x0 x1 x2 x3) -. +Definition paco4_3_0( r_0 r_1 r_2: rel4 T0 T1 T2 T3) : rel4 T0 T1 T2 T3 := + curry4 (paco_3_0 (fun R0 R1 R2 => uncurry4 (gf_0 (curry4 R0) (curry4 R1) (curry4 R2))) (fun R0 R1 R2 => uncurry4 (gf_1 (curry4 R0) (curry4 R1) (curry4 R2))) (fun R0 R1 R2 => uncurry4 (gf_2 (curry4 R0) (curry4 R1) (curry4 R2))) (uncurry4 r_0) (uncurry4 r_1) (uncurry4 r_2)). + +Definition paco4_3_1( r_0 r_1 r_2: rel4 T0 T1 T2 T3) : rel4 T0 T1 T2 T3 := + curry4 (paco_3_1 (fun R0 R1 R2 => uncurry4 (gf_0 (curry4 R0) (curry4 R1) (curry4 R2))) (fun R0 R1 R2 => uncurry4 (gf_1 (curry4 R0) (curry4 R1) (curry4 R2))) (fun R0 R1 R2 => uncurry4 (gf_2 (curry4 R0) (curry4 R1) (curry4 R2))) (uncurry4 r_0) (uncurry4 r_1) (uncurry4 r_2)). + +Definition paco4_3_2( r_0 r_1 r_2: rel4 T0 T1 T2 T3) : rel4 T0 T1 T2 T3 := + curry4 (paco_3_2 (fun R0 R1 R2 => uncurry4 (gf_0 (curry4 R0) (curry4 R1) (curry4 R2))) (fun R0 R1 R2 => uncurry4 (gf_1 (curry4 R0) (curry4 R1) (curry4 R2))) (fun R0 R1 R2 => uncurry4 (gf_2 (curry4 R0) (curry4 R1) (curry4 R2))) (uncurry4 r_0) (uncurry4 r_1) (uncurry4 r_2)). + Definition upaco4_3_0( r_0 r_1 r_2: rel4 T0 T1 T2 T3) := paco4_3_0 r_0 r_1 r_2 \4/ r_0. Definition upaco4_3_1( r_0 r_1 r_2: rel4 T0 T1 T2 T3) := paco4_3_1 r_0 r_1 r_2 \4/ r_1. Definition upaco4_3_2( r_0 r_1 r_2: rel4 T0 T1 T2 T3) := paco4_3_2 r_0 r_1 r_2 \4/ r_2. End Arg4_3_def. -Arguments paco4_3_0 [ T0 T1 T2 T3 ]. -Arguments upaco4_3_0 [ T0 T1 T2 T3 ]. +Arguments paco4_3_0 : clear implicits. +Arguments upaco4_3_0 : clear implicits. Hint Unfold upaco4_3_0. -Arguments paco4_3_1 [ T0 T1 T2 T3 ]. -Arguments upaco4_3_1 [ T0 T1 T2 T3 ]. +Arguments paco4_3_1 : clear implicits. +Arguments upaco4_3_1 : clear implicits. Hint Unfold upaco4_3_1. -Arguments paco4_3_2 [ T0 T1 T2 T3 ]. -Arguments upaco4_3_2 [ T0 T1 T2 T3 ]. +Arguments paco4_3_2 : clear implicits. +Arguments upaco4_3_2 : clear implicits. Hint Unfold upaco4_3_2. -(* Less than or equal - internal use only *) -Notation "p <_paco_4= q" := - (forall _paco_x0 _paco_x1 _paco_x2 _paco_x3 (PR: p _paco_x0 _paco_x1 _paco_x2 _paco_x3 : Prop), q _paco_x0 _paco_x1 _paco_x2 _paco_x3 : Prop) - (at level 50, no associativity). - (** 1 Mutual Coinduction *) Section Arg4_1. -Definition monotone4 T0 T1 T2 T3 (gf: rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3) := +Definition monotone4 (gf: rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3) := forall x0 x1 x2 x3 r r' (IN: gf r x0 x1 x2 x3) (LE: r <4= r'), gf r' x0 x1 x2 x3. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. +Definition _monotone4 (gf: rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3) := + forall r r'(LE: r <4= r'), gf r <4== gf r'. + +Lemma monotone4_eq (gf: rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3) : + monotone4 gf <-> _monotone4 gf. +Proof. unfold monotone4, _monotone4, le4. split; eauto. Qed. + +Lemma monotone4_map (gf: rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3) + (MON: _monotone4 gf) : + _monotone (fun R0 => uncurry4 (gf (curry4 R0))). +Proof. + repeat_intros 3. apply uncurry_map4. apply MON; apply curry_map4; auto. +Qed. + Variable gf : rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3. Arguments gf : clear implicits. +Theorem _paco4_mon: _monotone4 (paco4 gf). +Proof. + repeat_intros 3. eapply curry_map4, _paco_mon; apply uncurry_map4; auto. +Qed. + +Theorem _paco4_acc: forall + l r (OBG: forall rr (INC: r <4== rr) (CIH: l <4== rr), l <4== paco4 gf rr), + l <4== paco4 gf r. +Proof. + intros. apply uncurry_adjoint1_4. + eapply _paco_acc. intros. + apply uncurry_adjoint1_4 in INC. apply uncurry_adjoint1_4 in CIH. + apply uncurry_adjoint2_4. + eapply le4_trans. eapply (OBG _ INC CIH). + apply curry_map4. + apply _paco_mon; try apply le1_refl; apply curry_bij1_4. +Qed. + +Theorem _paco4_mult_strong: forall r, + paco4 gf (upaco4 gf r) <4== paco4 gf r. +Proof. + intros. apply curry_map4. + eapply le1_trans; [| eapply _paco_mult_strong]. + apply _paco_mon; intros []; eauto. +Qed. + +Theorem _paco4_fold: forall r, + gf (upaco4 gf r) <4== paco4 gf r. +Proof. + intros. apply uncurry_adjoint1_4. + eapply le1_trans; [| apply _paco_fold]. apply le1_refl. +Qed. + +Theorem _paco4_unfold: forall (MON: _monotone4 gf) r, + paco4 gf r <4== gf (upaco4 gf r). +Proof. + intros. apply curry_adjoint2_4. + eapply _paco_unfold; apply monotone4_map; auto. +Qed. + Theorem paco4_acc: forall - l r (OBG: forall rr (INC: r <4= rr) (CIH: l <_paco_4= rr), l <_paco_4= paco4 gf rr), + l r (OBG: forall rr (INC: r <4= rr) (CIH: l <4= rr), l <4= paco4 gf rr), l <4= paco4 gf r. Proof. - intros; assert (SIM: paco4 gf (r \4/ l) x0 x1 x2 x3) by eauto. - clear PR; repeat (try left; do 5 paco_revert; paco_cofix_auto). + apply _paco4_acc. Qed. Theorem paco4_mon: monotone4 (paco4 gf). -Proof. paco_cofix_auto; repeat (left; do 5 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone4_eq. + apply _paco4_mon. +Qed. Theorem paco4_mult_strong: forall r, paco4 gf (upaco4 gf r) <4= paco4 gf r. -Proof. paco_cofix_auto; repeat (left; do 5 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco4_mult_strong. +Qed. Corollary paco4_mult: forall r, paco4 gf (paco4 gf r) <4= paco4 gf r. @@ -137,25 +227,26 @@ Proof. intros; eapply paco4_mult_strong, paco4_mon; eauto. Qed. Theorem paco4_fold: forall r, gf (upaco4 gf r) <4= paco4 gf r. -Proof. intros; econstructor; [ |eauto]; eauto. Qed. +Proof. + apply _paco4_fold. +Qed. Theorem paco4_unfold: forall (MON: monotone4 gf) r, paco4 gf r <4= gf (upaco4 gf r). -Proof. unfold monotone4; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 1. eapply _paco4_unfold; apply monotone4_eq; auto. +Qed. End Arg4_1. -Hint Unfold monotone4. -Hint Resolve paco4_fold. - -Arguments paco4_acc [ T0 T1 T2 T3 ]. -Arguments paco4_mon [ T0 T1 T2 T3 ]. -Arguments paco4_mult_strong [ T0 T1 T2 T3 ]. -Arguments paco4_mult [ T0 T1 T2 T3 ]. -Arguments paco4_fold [ T0 T1 T2 T3 ]. -Arguments paco4_unfold [ T0 T1 T2 T3 ]. +Arguments paco4_acc : clear implicits. +Arguments paco4_mon : clear implicits. +Arguments paco4_mult_strong : clear implicits. +Arguments paco4_mult : clear implicits. +Arguments paco4_fold : clear implicits. +Arguments paco4_unfold : clear implicits. -Instance paco4_inst T0 T1 T2 T3 (gf : rel4 T0 T1 T2 T3->_) r x0 x1 x2 x3 : paco_class (paco4 gf r x0 x1 x2 x3) := +Global Instance paco4_inst (gf : rel4 T0 T1 T2 T3->_) r x0 x1 x2 x3 : paco_class (paco4 gf r x0 x1 x2 x3) := { pacoacc := paco4_acc gf; pacomult := paco4_mult gf; pacofold := paco4_fold gf; @@ -165,46 +256,144 @@ Instance paco4_inst T0 T1 T2 T3 (gf : rel4 T0 T1 T2 T3->_) r x0 x1 x2 x3 : paco Section Arg4_2. -Definition monotone4_2 T0 T1 T2 T3 (gf: rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3) := +Definition monotone4_2 (gf: rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3) := forall x0 x1 x2 x3 r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1 x0 x1 x2 x3) (LE_0: r_0 <4= r'_0)(LE_1: r_1 <4= r'_1), gf r'_0 r'_1 x0 x1 x2 x3. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. +Definition _monotone4_2 (gf: rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <4= r'_0)(LE_1: r_1 <4= r'_1), gf r_0 r_1 <4== gf r'_0 r'_1. + +Lemma monotone4_2_eq (gf: rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3) : + monotone4_2 gf <-> _monotone4_2 gf. +Proof. unfold monotone4_2, _monotone4_2, le4. split; eauto. Qed. + +Lemma monotone4_2_map (gf: rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3) + (MON: _monotone4_2 gf) : + _monotone_2 (fun R0 R1 => uncurry4 (gf (curry4 R0) (curry4 R1))). +Proof. + repeat_intros 6. apply uncurry_map4. apply MON; apply curry_map4; auto. +Qed. + Variable gf_0 gf_1 : rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. +Theorem _paco4_2_0_mon: _monotone4_2 (paco4_2_0 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map4, _paco_2_0_mon; apply uncurry_map4; auto. +Qed. + +Theorem _paco4_2_1_mon: _monotone4_2 (paco4_2_1 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map4, _paco_2_1_mon; apply uncurry_map4; auto. +Qed. + +Theorem _paco4_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <4== rr) (CIH: l <4== rr), l <4== paco4_2_0 gf_0 gf_1 rr r_1), + l <4== paco4_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_4. + eapply _paco_2_0_acc. intros. + apply uncurry_adjoint1_4 in INC. apply uncurry_adjoint1_4 in CIH. + apply uncurry_adjoint2_4. + eapply le4_trans. eapply (OBG _ INC CIH). + apply curry_map4. + apply _paco_2_0_mon; try apply le1_refl; apply curry_bij1_4. +Qed. + +Theorem _paco4_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <4== rr) (CIH: l <4== rr), l <4== paco4_2_1 gf_0 gf_1 r_0 rr), + l <4== paco4_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_4. + eapply _paco_2_1_acc. intros. + apply uncurry_adjoint1_4 in INC. apply uncurry_adjoint1_4 in CIH. + apply uncurry_adjoint2_4. + eapply le4_trans. eapply (OBG _ INC CIH). + apply curry_map4. + apply _paco_2_1_mon; try apply le1_refl; apply curry_bij1_4. +Qed. + +Theorem _paco4_2_0_mult_strong: forall r_0 r_1, + paco4_2_0 gf_0 gf_1 (upaco4_2_0 gf_0 gf_1 r_0 r_1) (upaco4_2_1 gf_0 gf_1 r_0 r_1) <4== paco4_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map4. + eapply le1_trans; [| eapply _paco_2_0_mult_strong]. + apply _paco_2_0_mon; intros []; eauto. +Qed. + +Theorem _paco4_2_1_mult_strong: forall r_0 r_1, + paco4_2_1 gf_0 gf_1 (upaco4_2_0 gf_0 gf_1 r_0 r_1) (upaco4_2_1 gf_0 gf_1 r_0 r_1) <4== paco4_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map4. + eapply le1_trans; [| eapply _paco_2_1_mult_strong]. + apply _paco_2_1_mon; intros []; eauto. +Qed. + +Theorem _paco4_2_0_fold: forall r_0 r_1, + gf_0 (upaco4_2_0 gf_0 gf_1 r_0 r_1) (upaco4_2_1 gf_0 gf_1 r_0 r_1) <4== paco4_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_4. + eapply le1_trans; [| apply _paco_2_0_fold]. apply le1_refl. +Qed. + +Theorem _paco4_2_1_fold: forall r_0 r_1, + gf_1 (upaco4_2_0 gf_0 gf_1 r_0 r_1) (upaco4_2_1 gf_0 gf_1 r_0 r_1) <4== paco4_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_4. + eapply le1_trans; [| apply _paco_2_1_fold]. apply le1_refl. +Qed. + +Theorem _paco4_2_0_unfold: forall (MON: _monotone4_2 gf_0) (MON: _monotone4_2 gf_1) r_0 r_1, + paco4_2_0 gf_0 gf_1 r_0 r_1 <4== gf_0 (upaco4_2_0 gf_0 gf_1 r_0 r_1) (upaco4_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_4. + eapply _paco_2_0_unfold; apply monotone4_2_map; auto. +Qed. + +Theorem _paco4_2_1_unfold: forall (MON: _monotone4_2 gf_0) (MON: _monotone4_2 gf_1) r_0 r_1, + paco4_2_1 gf_0 gf_1 r_0 r_1 <4== gf_1 (upaco4_2_0 gf_0 gf_1 r_0 r_1) (upaco4_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_4. + eapply _paco_2_1_unfold; apply monotone4_2_map; auto. +Qed. + Theorem paco4_2_0_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_0 <4= rr) (CIH: l <_paco_4= rr), l <_paco_4= paco4_2_0 gf_0 gf_1 rr r_1), + l r_0 r_1 (OBG: forall rr (INC: r_0 <4= rr) (CIH: l <4= rr), l <4= paco4_2_0 gf_0 gf_1 rr r_1), l <4= paco4_2_0 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco4_2_0 gf_0 gf_1 (r_0 \4/ l) r_1 x0 x1 x2 x3) by eauto. - clear PR; repeat (try left; do 5 paco_revert; paco_cofix_auto). + apply _paco4_2_0_acc. Qed. Theorem paco4_2_1_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_1 <4= rr) (CIH: l <_paco_4= rr), l <_paco_4= paco4_2_1 gf_0 gf_1 r_0 rr), + l r_0 r_1 (OBG: forall rr (INC: r_1 <4= rr) (CIH: l <4= rr), l <4= paco4_2_1 gf_0 gf_1 r_0 rr), l <4= paco4_2_1 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco4_2_1 gf_0 gf_1 r_0 (r_1 \4/ l) x0 x1 x2 x3) by eauto. - clear PR; repeat (try left; do 5 paco_revert; paco_cofix_auto). + apply _paco4_2_1_acc. Qed. Theorem paco4_2_0_mon: monotone4_2 (paco4_2_0 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 5 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone4_2_eq. + apply _paco4_2_0_mon. +Qed. Theorem paco4_2_1_mon: monotone4_2 (paco4_2_1 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 5 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone4_2_eq. + apply _paco4_2_1_mon. +Qed. Theorem paco4_2_0_mult_strong: forall r_0 r_1, paco4_2_0 gf_0 gf_1 (upaco4_2_0 gf_0 gf_1 r_0 r_1) (upaco4_2_1 gf_0 gf_1 r_0 r_1) <4= paco4_2_0 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 5 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco4_2_0_mult_strong. +Qed. Theorem paco4_2_1_mult_strong: forall r_0 r_1, paco4_2_1 gf_0 gf_1 (upaco4_2_0 gf_0 gf_1 r_0 r_1) (upaco4_2_1 gf_0 gf_1 r_0 r_1) <4= paco4_2_1 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 5 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco4_2_1_mult_strong. +Qed. Corollary paco4_2_0_mult: forall r_0 r_1, paco4_2_0 gf_0 gf_1 (paco4_2_0 gf_0 gf_1 r_0 r_1) (paco4_2_1 gf_0 gf_1 r_0 r_1) <4= paco4_2_0 gf_0 gf_1 r_0 r_1. @@ -216,46 +405,50 @@ Proof. intros; eapply paco4_2_1_mult_strong, paco4_2_1_mon; eauto. Qed. Theorem paco4_2_0_fold: forall r_0 r_1, gf_0 (upaco4_2_0 gf_0 gf_1 r_0 r_1) (upaco4_2_1 gf_0 gf_1 r_0 r_1) <4= paco4_2_0 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco4_2_0_fold. +Qed. Theorem paco4_2_1_fold: forall r_0 r_1, gf_1 (upaco4_2_0 gf_0 gf_1 r_0 r_1) (upaco4_2_1 gf_0 gf_1 r_0 r_1) <4= paco4_2_1 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco4_2_1_fold. +Qed. Theorem paco4_2_0_unfold: forall (MON: monotone4_2 gf_0) (MON: monotone4_2 gf_1) r_0 r_1, paco4_2_0 gf_0 gf_1 r_0 r_1 <4= gf_0 (upaco4_2_0 gf_0 gf_1 r_0 r_1) (upaco4_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone4_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco4_2_0_unfold; apply monotone4_2_eq; auto. +Qed. Theorem paco4_2_1_unfold: forall (MON: monotone4_2 gf_0) (MON: monotone4_2 gf_1) r_0 r_1, paco4_2_1 gf_0 gf_1 r_0 r_1 <4= gf_1 (upaco4_2_0 gf_0 gf_1 r_0 r_1) (upaco4_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone4_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco4_2_1_unfold; apply monotone4_2_eq; auto. +Qed. End Arg4_2. -Hint Unfold monotone4_2. -Hint Resolve paco4_2_0_fold. -Hint Resolve paco4_2_1_fold. - -Arguments paco4_2_0_acc [ T0 T1 T2 T3 ]. -Arguments paco4_2_1_acc [ T0 T1 T2 T3 ]. -Arguments paco4_2_0_mon [ T0 T1 T2 T3 ]. -Arguments paco4_2_1_mon [ T0 T1 T2 T3 ]. -Arguments paco4_2_0_mult_strong [ T0 T1 T2 T3 ]. -Arguments paco4_2_1_mult_strong [ T0 T1 T2 T3 ]. -Arguments paco4_2_0_mult [ T0 T1 T2 T3 ]. -Arguments paco4_2_1_mult [ T0 T1 T2 T3 ]. -Arguments paco4_2_0_fold [ T0 T1 T2 T3 ]. -Arguments paco4_2_1_fold [ T0 T1 T2 T3 ]. -Arguments paco4_2_0_unfold [ T0 T1 T2 T3 ]. -Arguments paco4_2_1_unfold [ T0 T1 T2 T3 ]. - -Instance paco4_2_0_inst T0 T1 T2 T3 (gf_0 gf_1 : rel4 T0 T1 T2 T3->_) r_0 r_1 x0 x1 x2 x3 : paco_class (paco4_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3) := +Arguments paco4_2_0_acc : clear implicits. +Arguments paco4_2_1_acc : clear implicits. +Arguments paco4_2_0_mon : clear implicits. +Arguments paco4_2_1_mon : clear implicits. +Arguments paco4_2_0_mult_strong : clear implicits. +Arguments paco4_2_1_mult_strong : clear implicits. +Arguments paco4_2_0_mult : clear implicits. +Arguments paco4_2_1_mult : clear implicits. +Arguments paco4_2_0_fold : clear implicits. +Arguments paco4_2_1_fold : clear implicits. +Arguments paco4_2_0_unfold : clear implicits. +Arguments paco4_2_1_unfold : clear implicits. + +Global Instance paco4_2_0_inst (gf_0 gf_1 : rel4 T0 T1 T2 T3->_) r_0 r_1 x0 x1 x2 x3 : paco_class (paco4_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3) := { pacoacc := paco4_2_0_acc gf_0 gf_1; pacomult := paco4_2_0_mult gf_0 gf_1; pacofold := paco4_2_0_fold gf_0 gf_1; pacounfold := paco4_2_0_unfold gf_0 gf_1 }. -Instance paco4_2_1_inst T0 T1 T2 T3 (gf_0 gf_1 : rel4 T0 T1 T2 T3->_) r_0 r_1 x0 x1 x2 x3 : paco_class (paco4_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3) := +Global Instance paco4_2_1_inst (gf_0 gf_1 : rel4 T0 T1 T2 T3->_) r_0 r_1 x0 x1 x2 x3 : paco_class (paco4_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3) := { pacoacc := paco4_2_1_acc gf_0 gf_1; pacomult := paco4_2_1_mult gf_0 gf_1; pacofold := paco4_2_1_fold gf_0 gf_1; @@ -265,62 +458,204 @@ Instance paco4_2_1_inst T0 T1 T2 T3 (gf_0 gf_1 : rel4 T0 T1 T2 T3->_) r_0 r_1 x Section Arg4_3. -Definition monotone4_3 T0 T1 T2 T3 (gf: rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3) := +Definition monotone4_3 (gf: rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3) := forall x0 x1 x2 x3 r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2 x0 x1 x2 x3) (LE_0: r_0 <4= r'_0)(LE_1: r_1 <4= r'_1)(LE_2: r_2 <4= r'_2), gf r'_0 r'_1 r'_2 x0 x1 x2 x3. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. +Definition _monotone4_3 (gf: rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <4= r'_0)(LE_1: r_1 <4= r'_1)(LE_2: r_2 <4= r'_2), gf r_0 r_1 r_2 <4== gf r'_0 r'_1 r'_2. + +Lemma monotone4_3_eq (gf: rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3) : + monotone4_3 gf <-> _monotone4_3 gf. +Proof. unfold monotone4_3, _monotone4_3, le4. split; eauto. Qed. + +Lemma monotone4_3_map (gf: rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3) + (MON: _monotone4_3 gf) : + _monotone_3 (fun R0 R1 R2 => uncurry4 (gf (curry4 R0) (curry4 R1) (curry4 R2))). +Proof. + repeat_intros 9. apply uncurry_map4. apply MON; apply curry_map4; auto. +Qed. + Variable gf_0 gf_1 gf_2 : rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3 -> rel4 T0 T1 T2 T3. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. +Theorem _paco4_3_0_mon: _monotone4_3 (paco4_3_0 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map4, _paco_3_0_mon; apply uncurry_map4; auto. +Qed. + +Theorem _paco4_3_1_mon: _monotone4_3 (paco4_3_1 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map4, _paco_3_1_mon; apply uncurry_map4; auto. +Qed. + +Theorem _paco4_3_2_mon: _monotone4_3 (paco4_3_2 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map4, _paco_3_2_mon; apply uncurry_map4; auto. +Qed. + +Theorem _paco4_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <4== rr) (CIH: l <4== rr), l <4== paco4_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <4== paco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_4. + eapply _paco_3_0_acc. intros. + apply uncurry_adjoint1_4 in INC. apply uncurry_adjoint1_4 in CIH. + apply uncurry_adjoint2_4. + eapply le4_trans. eapply (OBG _ INC CIH). + apply curry_map4. + apply _paco_3_0_mon; try apply le1_refl; apply curry_bij1_4. +Qed. + +Theorem _paco4_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <4== rr) (CIH: l <4== rr), l <4== paco4_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <4== paco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_4. + eapply _paco_3_1_acc. intros. + apply uncurry_adjoint1_4 in INC. apply uncurry_adjoint1_4 in CIH. + apply uncurry_adjoint2_4. + eapply le4_trans. eapply (OBG _ INC CIH). + apply curry_map4. + apply _paco_3_1_mon; try apply le1_refl; apply curry_bij1_4. +Qed. + +Theorem _paco4_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <4== rr) (CIH: l <4== rr), l <4== paco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <4== paco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_4. + eapply _paco_3_2_acc. intros. + apply uncurry_adjoint1_4 in INC. apply uncurry_adjoint1_4 in CIH. + apply uncurry_adjoint2_4. + eapply le4_trans. eapply (OBG _ INC CIH). + apply curry_map4. + apply _paco_3_2_mon; try apply le1_refl; apply curry_bij1_4. +Qed. + +Theorem _paco4_3_0_mult_strong: forall r_0 r_1 r_2, + paco4_3_0 gf_0 gf_1 gf_2 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <4== paco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map4. + eapply le1_trans; [| eapply _paco_3_0_mult_strong]. + apply _paco_3_0_mon; intros []; eauto. +Qed. + +Theorem _paco4_3_1_mult_strong: forall r_0 r_1 r_2, + paco4_3_1 gf_0 gf_1 gf_2 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <4== paco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map4. + eapply le1_trans; [| eapply _paco_3_1_mult_strong]. + apply _paco_3_1_mon; intros []; eauto. +Qed. + +Theorem _paco4_3_2_mult_strong: forall r_0 r_1 r_2, + paco4_3_2 gf_0 gf_1 gf_2 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <4== paco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map4. + eapply le1_trans; [| eapply _paco_3_2_mult_strong]. + apply _paco_3_2_mon; intros []; eauto. +Qed. + +Theorem _paco4_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <4== paco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_4. + eapply le1_trans; [| apply _paco_3_0_fold]. apply le1_refl. +Qed. + +Theorem _paco4_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <4== paco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_4. + eapply le1_trans; [| apply _paco_3_1_fold]. apply le1_refl. +Qed. + +Theorem _paco4_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <4== paco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_4. + eapply le1_trans; [| apply _paco_3_2_fold]. apply le1_refl. +Qed. + +Theorem _paco4_3_0_unfold: forall (MON: _monotone4_3 gf_0) (MON: _monotone4_3 gf_1) (MON: _monotone4_3 gf_2) r_0 r_1 r_2, + paco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <4== gf_0 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_4. + eapply _paco_3_0_unfold; apply monotone4_3_map; auto. +Qed. + +Theorem _paco4_3_1_unfold: forall (MON: _monotone4_3 gf_0) (MON: _monotone4_3 gf_1) (MON: _monotone4_3 gf_2) r_0 r_1 r_2, + paco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <4== gf_1 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_4. + eapply _paco_3_1_unfold; apply monotone4_3_map; auto. +Qed. + +Theorem _paco4_3_2_unfold: forall (MON: _monotone4_3 gf_0) (MON: _monotone4_3 gf_1) (MON: _monotone4_3 gf_2) r_0 r_1 r_2, + paco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <4== gf_2 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_4. + eapply _paco_3_2_unfold; apply monotone4_3_map; auto. +Qed. + Theorem paco4_3_0_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <4= rr) (CIH: l <_paco_4= rr), l <_paco_4= paco4_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <4= rr) (CIH: l <4= rr), l <4= paco4_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), l <4= paco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco4_3_0 gf_0 gf_1 gf_2 (r_0 \4/ l) r_1 r_2 x0 x1 x2 x3) by eauto. - clear PR; repeat (try left; do 5 paco_revert; paco_cofix_auto). + apply _paco4_3_0_acc. Qed. Theorem paco4_3_1_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <4= rr) (CIH: l <_paco_4= rr), l <_paco_4= paco4_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <4= rr) (CIH: l <4= rr), l <4= paco4_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), l <4= paco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco4_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \4/ l) r_2 x0 x1 x2 x3) by eauto. - clear PR; repeat (try left; do 5 paco_revert; paco_cofix_auto). + apply _paco4_3_1_acc. Qed. Theorem paco4_3_2_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <4= rr) (CIH: l <_paco_4= rr), l <_paco_4= paco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <4= rr) (CIH: l <4= rr), l <4= paco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), l <4= paco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \4/ l) x0 x1 x2 x3) by eauto. - clear PR; repeat (try left; do 5 paco_revert; paco_cofix_auto). + apply _paco4_3_2_acc. Qed. Theorem paco4_3_0_mon: monotone4_3 (paco4_3_0 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 5 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone4_3_eq. + apply _paco4_3_0_mon. +Qed. Theorem paco4_3_1_mon: monotone4_3 (paco4_3_1 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 5 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone4_3_eq. + apply _paco4_3_1_mon. +Qed. Theorem paco4_3_2_mon: monotone4_3 (paco4_3_2 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 5 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone4_3_eq. + apply _paco4_3_2_mon. +Qed. Theorem paco4_3_0_mult_strong: forall r_0 r_1 r_2, paco4_3_0 gf_0 gf_1 gf_2 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <4= paco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 5 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco4_3_0_mult_strong. +Qed. Theorem paco4_3_1_mult_strong: forall r_0 r_1 r_2, paco4_3_1 gf_0 gf_1 gf_2 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <4= paco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 5 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco4_3_1_mult_strong. +Qed. Theorem paco4_3_2_mult_strong: forall r_0 r_1 r_2, paco4_3_2 gf_0 gf_1 gf_2 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <4= paco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 5 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco4_3_2_mult_strong. +Qed. Corollary paco4_3_0_mult: forall r_0 r_1 r_2, paco4_3_0 gf_0 gf_1 gf_2 (paco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <4= paco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. @@ -336,69 +671,105 @@ Proof. intros; eapply paco4_3_2_mult_strong, paco4_3_2_mon; eauto. Qed. Theorem paco4_3_0_fold: forall r_0 r_1 r_2, gf_0 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <4= paco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco4_3_0_fold. +Qed. Theorem paco4_3_1_fold: forall r_0 r_1 r_2, gf_1 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <4= paco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco4_3_1_fold. +Qed. Theorem paco4_3_2_fold: forall r_0 r_1 r_2, gf_2 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <4= paco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco4_3_2_fold. +Qed. Theorem paco4_3_0_unfold: forall (MON: monotone4_3 gf_0) (MON: monotone4_3 gf_1) (MON: monotone4_3 gf_2) r_0 r_1 r_2, paco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <4= gf_0 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone4_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco4_3_0_unfold; apply monotone4_3_eq; auto. +Qed. Theorem paco4_3_1_unfold: forall (MON: monotone4_3 gf_0) (MON: monotone4_3 gf_1) (MON: monotone4_3 gf_2) r_0 r_1 r_2, paco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <4= gf_1 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone4_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco4_3_1_unfold; apply monotone4_3_eq; auto. +Qed. Theorem paco4_3_2_unfold: forall (MON: monotone4_3 gf_0) (MON: monotone4_3 gf_1) (MON: monotone4_3 gf_2) r_0 r_1 r_2, paco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <4= gf_2 (upaco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone4_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco4_3_2_unfold; apply monotone4_3_eq; auto. +Qed. End Arg4_3. -Hint Unfold monotone4_3. -Hint Resolve paco4_3_0_fold. -Hint Resolve paco4_3_1_fold. -Hint Resolve paco4_3_2_fold. - -Arguments paco4_3_0_acc [ T0 T1 T2 T3 ]. -Arguments paco4_3_1_acc [ T0 T1 T2 T3 ]. -Arguments paco4_3_2_acc [ T0 T1 T2 T3 ]. -Arguments paco4_3_0_mon [ T0 T1 T2 T3 ]. -Arguments paco4_3_1_mon [ T0 T1 T2 T3 ]. -Arguments paco4_3_2_mon [ T0 T1 T2 T3 ]. -Arguments paco4_3_0_mult_strong [ T0 T1 T2 T3 ]. -Arguments paco4_3_1_mult_strong [ T0 T1 T2 T3 ]. -Arguments paco4_3_2_mult_strong [ T0 T1 T2 T3 ]. -Arguments paco4_3_0_mult [ T0 T1 T2 T3 ]. -Arguments paco4_3_1_mult [ T0 T1 T2 T3 ]. -Arguments paco4_3_2_mult [ T0 T1 T2 T3 ]. -Arguments paco4_3_0_fold [ T0 T1 T2 T3 ]. -Arguments paco4_3_1_fold [ T0 T1 T2 T3 ]. -Arguments paco4_3_2_fold [ T0 T1 T2 T3 ]. -Arguments paco4_3_0_unfold [ T0 T1 T2 T3 ]. -Arguments paco4_3_1_unfold [ T0 T1 T2 T3 ]. -Arguments paco4_3_2_unfold [ T0 T1 T2 T3 ]. - -Instance paco4_3_0_inst T0 T1 T2 T3 (gf_0 gf_1 gf_2 : rel4 T0 T1 T2 T3->_) r_0 r_1 r_2 x0 x1 x2 x3 : paco_class (paco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3) := +Arguments paco4_3_0_acc : clear implicits. +Arguments paco4_3_1_acc : clear implicits. +Arguments paco4_3_2_acc : clear implicits. +Arguments paco4_3_0_mon : clear implicits. +Arguments paco4_3_1_mon : clear implicits. +Arguments paco4_3_2_mon : clear implicits. +Arguments paco4_3_0_mult_strong : clear implicits. +Arguments paco4_3_1_mult_strong : clear implicits. +Arguments paco4_3_2_mult_strong : clear implicits. +Arguments paco4_3_0_mult : clear implicits. +Arguments paco4_3_1_mult : clear implicits. +Arguments paco4_3_2_mult : clear implicits. +Arguments paco4_3_0_fold : clear implicits. +Arguments paco4_3_1_fold : clear implicits. +Arguments paco4_3_2_fold : clear implicits. +Arguments paco4_3_0_unfold : clear implicits. +Arguments paco4_3_1_unfold : clear implicits. +Arguments paco4_3_2_unfold : clear implicits. + +Global Instance paco4_3_0_inst (gf_0 gf_1 gf_2 : rel4 T0 T1 T2 T3->_) r_0 r_1 r_2 x0 x1 x2 x3 : paco_class (paco4_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3) := { pacoacc := paco4_3_0_acc gf_0 gf_1 gf_2; pacomult := paco4_3_0_mult gf_0 gf_1 gf_2; pacofold := paco4_3_0_fold gf_0 gf_1 gf_2; pacounfold := paco4_3_0_unfold gf_0 gf_1 gf_2 }. -Instance paco4_3_1_inst T0 T1 T2 T3 (gf_0 gf_1 gf_2 : rel4 T0 T1 T2 T3->_) r_0 r_1 r_2 x0 x1 x2 x3 : paco_class (paco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3) := +Global Instance paco4_3_1_inst (gf_0 gf_1 gf_2 : rel4 T0 T1 T2 T3->_) r_0 r_1 r_2 x0 x1 x2 x3 : paco_class (paco4_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3) := { pacoacc := paco4_3_1_acc gf_0 gf_1 gf_2; pacomult := paco4_3_1_mult gf_0 gf_1 gf_2; pacofold := paco4_3_1_fold gf_0 gf_1 gf_2; pacounfold := paco4_3_1_unfold gf_0 gf_1 gf_2 }. -Instance paco4_3_2_inst T0 T1 T2 T3 (gf_0 gf_1 gf_2 : rel4 T0 T1 T2 T3->_) r_0 r_1 r_2 x0 x1 x2 x3 : paco_class (paco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3) := +Global Instance paco4_3_2_inst (gf_0 gf_1 gf_2 : rel4 T0 T1 T2 T3->_) r_0 r_1 r_2 x0 x1 x2 x3 : paco_class (paco4_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3) := { pacoacc := paco4_3_2_acc gf_0 gf_1 gf_2; pacomult := paco4_3_2_mult gf_0 gf_1 gf_2; pacofold := paco4_3_2_fold gf_0 gf_1 gf_2; pacounfold := paco4_3_2_unfold gf_0 gf_1 gf_2 }. +End PACO4. + +Global Opaque paco4. + +Hint Unfold upaco4. +Hint Resolve paco4_fold. +Hint Unfold monotone4. + +Global Opaque paco4_2_0. +Global Opaque paco4_2_1. + +Hint Unfold upaco4_2_0. +Hint Unfold upaco4_2_1. +Hint Resolve paco4_2_0_fold. +Hint Resolve paco4_2_1_fold. +Hint Unfold monotone4_2. + +Global Opaque paco4_3_0. +Global Opaque paco4_3_1. +Global Opaque paco4_3_2. + +Hint Unfold upaco4_3_0. +Hint Unfold upaco4_3_1. +Hint Unfold upaco4_3_2. +Hint Resolve paco4_3_0_fold. +Hint Resolve paco4_3_1_fold. +Hint Resolve paco4_3_2_fold. +Hint Unfold monotone4_3. + diff --git a/src/paco5.v b/src/paco5.v index 0238e60..882a7f7 100644 --- a/src/paco5.v +++ b/src/paco5.v @@ -1,139 +1,227 @@ Require Export paconotation pacotacuser. -Require Import pacotac. +Require Import paconotation_internal pacotac pacon. Set Implicit Arguments. -(** ** Predicates of Arity 5 -*) +Section PACO5. -Section Arg5_def. Variable T0 : Type. Variable T1 : forall (x0: @T0), Type. Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. + +Record sig5T := + exist5T { + proj5T0: @T0; + proj5T1: @T1 proj5T0; + proj5T2: @T2 proj5T0 proj5T1; + proj5T3: @T3 proj5T0 proj5T1 proj5T2; + proj5T4: @T4 proj5T0 proj5T1 proj5T2 proj5T3; + }. + +Definition uncurry5 (R: rel5 T0 T1 T2 T3 T4): rel1 sig5T := fun x => R (proj5T0 x) (proj5T1 x) (proj5T2 x) (proj5T3 x) (proj5T4 x). + +Definition curry5 (R: rel1 sig5T): rel5 T0 T1 T2 T3 T4 := + fun x0 x1 x2 x3 x4 => R (exist5T x4). + +Lemma uncurry_map5 r0 r1 (LE : r0 <5== r1) : uncurry5 r0 <1== uncurry5 r1. +Proof. intros [] H. apply LE. auto. Qed. + +Lemma uncurry_map_rev5 r0 r1 (LE: uncurry5 r0 <1== uncurry5 r1) : r0 <5== r1. +Proof. + repeat_intros 5. intros H. apply (LE (exist5T x4) H). +Qed. + +Lemma curry_map5 r0 r1 (LE: r0 <1== r1) : curry5 r0 <5== curry5 r1. +Proof. + repeat_intros 5. intros H. apply (LE (exist5T x4) H). +Qed. + +Lemma curry_map_rev5 r0 r1 (LE: curry5 r0 <5== curry5 r1) : r0 <1== r1. +Proof. + intros [] H. apply LE. apply H. +Qed. + +Lemma uncurry_bij1_5 r : curry5 (uncurry5 r) <5== r. +Proof. unfold le5. repeat_intros 5; auto. Qed. + +Lemma uncurry_bij2_5 r : r <5== curry5 (uncurry5 r). +Proof. unfold le5. repeat_intros 5; auto. Qed. + +Lemma curry_bij1_5 r : uncurry5 (curry5 r) <1== r. +Proof. intros []; auto. Qed. + +Lemma curry_bij2_5 r : r <1== uncurry5 (curry5 r). +Proof. intros []; auto. Qed. + +Lemma uncurry_adjoint1_5 r0 r1 (LE: uncurry5 r0 <1== r1) : r0 <5== curry5 r1. +Proof. + apply uncurry_map_rev5. eapply le1_trans; [eauto|]. apply curry_bij2_5. +Qed. + +Lemma uncurry_adjoint2_5 r0 r1 (LE: r0 <5== curry5 r1) : uncurry5 r0 <1== r1. +Proof. + apply curry_map_rev5. eapply le5_trans; [|eauto]. apply uncurry_bij2_5. +Qed. + +Lemma curry_adjoint1_5 r0 r1 (LE: curry5 r0 <5== r1) : r0 <1== uncurry5 r1. +Proof. + apply curry_map_rev5. eapply le5_trans; [eauto|]. apply uncurry_bij2_5. +Qed. + +Lemma curry_adjoint2_5 r0 r1 (LE: r0 <1== uncurry5 r1) : curry5 r0 <5== r1. +Proof. + apply uncurry_map_rev5. eapply le1_trans; [|eauto]. apply curry_bij1_5. +Qed. + +(** ** Predicates of Arity 5 +*) + +Section Arg5_def. Variable gf : rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4. Arguments gf : clear implicits. -CoInductive paco5( r: rel5 T0 T1 T2 T3 T4) x0 x1 x2 x3 x4 : Prop := -| paco5_pfold pco - (LE : pco <5= (paco5 r \5/ r)) - (SIM: gf pco x0 x1 x2 x3 x4) -. +Definition paco5( r: rel5 T0 T1 T2 T3 T4) : rel5 T0 T1 T2 T3 T4 := + curry5 (paco (fun R0 => uncurry5 (gf (curry5 R0))) (uncurry5 r)). + Definition upaco5( r: rel5 T0 T1 T2 T3 T4) := paco5 r \5/ r. End Arg5_def. -Arguments paco5 [ T0 T1 T2 T3 T4 ]. -Arguments upaco5 [ T0 T1 T2 T3 T4 ]. +Arguments paco5 : clear implicits. +Arguments upaco5 : clear implicits. Hint Unfold upaco5. Section Arg5_2_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. Variable gf_0 gf_1 : rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. -CoInductive paco5_2_0( r_0 r_1: rel5 T0 T1 T2 T3 T4) x0 x1 x2 x3 x4 : Prop := -| paco5_2_0_pfold pco_0 pco_1 - (LE : pco_0 <5= (paco5_2_0 r_0 r_1 \5/ r_0)) - (LE : pco_1 <5= (paco5_2_1 r_0 r_1 \5/ r_1)) - (SIM: gf_0 pco_0 pco_1 x0 x1 x2 x3 x4) -with paco5_2_1( r_0 r_1: rel5 T0 T1 T2 T3 T4) x0 x1 x2 x3 x4 : Prop := -| paco5_2_1_pfold pco_0 pco_1 - (LE : pco_0 <5= (paco5_2_0 r_0 r_1 \5/ r_0)) - (LE : pco_1 <5= (paco5_2_1 r_0 r_1 \5/ r_1)) - (SIM: gf_1 pco_0 pco_1 x0 x1 x2 x3 x4) -. +Definition paco5_2_0( r_0 r_1: rel5 T0 T1 T2 T3 T4) : rel5 T0 T1 T2 T3 T4 := + curry5 (paco_2_0 (fun R0 R1 => uncurry5 (gf_0 (curry5 R0) (curry5 R1))) (fun R0 R1 => uncurry5 (gf_1 (curry5 R0) (curry5 R1))) (uncurry5 r_0) (uncurry5 r_1)). + +Definition paco5_2_1( r_0 r_1: rel5 T0 T1 T2 T3 T4) : rel5 T0 T1 T2 T3 T4 := + curry5 (paco_2_1 (fun R0 R1 => uncurry5 (gf_0 (curry5 R0) (curry5 R1))) (fun R0 R1 => uncurry5 (gf_1 (curry5 R0) (curry5 R1))) (uncurry5 r_0) (uncurry5 r_1)). + Definition upaco5_2_0( r_0 r_1: rel5 T0 T1 T2 T3 T4) := paco5_2_0 r_0 r_1 \5/ r_0. Definition upaco5_2_1( r_0 r_1: rel5 T0 T1 T2 T3 T4) := paco5_2_1 r_0 r_1 \5/ r_1. End Arg5_2_def. -Arguments paco5_2_0 [ T0 T1 T2 T3 T4 ]. -Arguments upaco5_2_0 [ T0 T1 T2 T3 T4 ]. +Arguments paco5_2_0 : clear implicits. +Arguments upaco5_2_0 : clear implicits. Hint Unfold upaco5_2_0. -Arguments paco5_2_1 [ T0 T1 T2 T3 T4 ]. -Arguments upaco5_2_1 [ T0 T1 T2 T3 T4 ]. +Arguments paco5_2_1 : clear implicits. +Arguments upaco5_2_1 : clear implicits. Hint Unfold upaco5_2_1. Section Arg5_3_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. Variable gf_0 gf_1 gf_2 : rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. -CoInductive paco5_3_0( r_0 r_1 r_2: rel5 T0 T1 T2 T3 T4) x0 x1 x2 x3 x4 : Prop := -| paco5_3_0_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <5= (paco5_3_0 r_0 r_1 r_2 \5/ r_0)) - (LE : pco_1 <5= (paco5_3_1 r_0 r_1 r_2 \5/ r_1)) - (LE : pco_2 <5= (paco5_3_2 r_0 r_1 r_2 \5/ r_2)) - (SIM: gf_0 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4) -with paco5_3_1( r_0 r_1 r_2: rel5 T0 T1 T2 T3 T4) x0 x1 x2 x3 x4 : Prop := -| paco5_3_1_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <5= (paco5_3_0 r_0 r_1 r_2 \5/ r_0)) - (LE : pco_1 <5= (paco5_3_1 r_0 r_1 r_2 \5/ r_1)) - (LE : pco_2 <5= (paco5_3_2 r_0 r_1 r_2 \5/ r_2)) - (SIM: gf_1 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4) -with paco5_3_2( r_0 r_1 r_2: rel5 T0 T1 T2 T3 T4) x0 x1 x2 x3 x4 : Prop := -| paco5_3_2_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <5= (paco5_3_0 r_0 r_1 r_2 \5/ r_0)) - (LE : pco_1 <5= (paco5_3_1 r_0 r_1 r_2 \5/ r_1)) - (LE : pco_2 <5= (paco5_3_2 r_0 r_1 r_2 \5/ r_2)) - (SIM: gf_2 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4) -. +Definition paco5_3_0( r_0 r_1 r_2: rel5 T0 T1 T2 T3 T4) : rel5 T0 T1 T2 T3 T4 := + curry5 (paco_3_0 (fun R0 R1 R2 => uncurry5 (gf_0 (curry5 R0) (curry5 R1) (curry5 R2))) (fun R0 R1 R2 => uncurry5 (gf_1 (curry5 R0) (curry5 R1) (curry5 R2))) (fun R0 R1 R2 => uncurry5 (gf_2 (curry5 R0) (curry5 R1) (curry5 R2))) (uncurry5 r_0) (uncurry5 r_1) (uncurry5 r_2)). + +Definition paco5_3_1( r_0 r_1 r_2: rel5 T0 T1 T2 T3 T4) : rel5 T0 T1 T2 T3 T4 := + curry5 (paco_3_1 (fun R0 R1 R2 => uncurry5 (gf_0 (curry5 R0) (curry5 R1) (curry5 R2))) (fun R0 R1 R2 => uncurry5 (gf_1 (curry5 R0) (curry5 R1) (curry5 R2))) (fun R0 R1 R2 => uncurry5 (gf_2 (curry5 R0) (curry5 R1) (curry5 R2))) (uncurry5 r_0) (uncurry5 r_1) (uncurry5 r_2)). + +Definition paco5_3_2( r_0 r_1 r_2: rel5 T0 T1 T2 T3 T4) : rel5 T0 T1 T2 T3 T4 := + curry5 (paco_3_2 (fun R0 R1 R2 => uncurry5 (gf_0 (curry5 R0) (curry5 R1) (curry5 R2))) (fun R0 R1 R2 => uncurry5 (gf_1 (curry5 R0) (curry5 R1) (curry5 R2))) (fun R0 R1 R2 => uncurry5 (gf_2 (curry5 R0) (curry5 R1) (curry5 R2))) (uncurry5 r_0) (uncurry5 r_1) (uncurry5 r_2)). + Definition upaco5_3_0( r_0 r_1 r_2: rel5 T0 T1 T2 T3 T4) := paco5_3_0 r_0 r_1 r_2 \5/ r_0. Definition upaco5_3_1( r_0 r_1 r_2: rel5 T0 T1 T2 T3 T4) := paco5_3_1 r_0 r_1 r_2 \5/ r_1. Definition upaco5_3_2( r_0 r_1 r_2: rel5 T0 T1 T2 T3 T4) := paco5_3_2 r_0 r_1 r_2 \5/ r_2. End Arg5_3_def. -Arguments paco5_3_0 [ T0 T1 T2 T3 T4 ]. -Arguments upaco5_3_0 [ T0 T1 T2 T3 T4 ]. +Arguments paco5_3_0 : clear implicits. +Arguments upaco5_3_0 : clear implicits. Hint Unfold upaco5_3_0. -Arguments paco5_3_1 [ T0 T1 T2 T3 T4 ]. -Arguments upaco5_3_1 [ T0 T1 T2 T3 T4 ]. +Arguments paco5_3_1 : clear implicits. +Arguments upaco5_3_1 : clear implicits. Hint Unfold upaco5_3_1. -Arguments paco5_3_2 [ T0 T1 T2 T3 T4 ]. -Arguments upaco5_3_2 [ T0 T1 T2 T3 T4 ]. +Arguments paco5_3_2 : clear implicits. +Arguments upaco5_3_2 : clear implicits. Hint Unfold upaco5_3_2. -(* Less than or equal - internal use only *) -Notation "p <_paco_5= q" := - (forall _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 (PR: p _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 : Prop), q _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 : Prop) - (at level 50, no associativity). - (** 1 Mutual Coinduction *) Section Arg5_1. -Definition monotone5 T0 T1 T2 T3 T4 (gf: rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4) := +Definition monotone5 (gf: rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4) := forall x0 x1 x2 x3 x4 r r' (IN: gf r x0 x1 x2 x3 x4) (LE: r <5= r'), gf r' x0 x1 x2 x3 x4. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. +Definition _monotone5 (gf: rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4) := + forall r r'(LE: r <5= r'), gf r <5== gf r'. + +Lemma monotone5_eq (gf: rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4) : + monotone5 gf <-> _monotone5 gf. +Proof. unfold monotone5, _monotone5, le5. split; eauto. Qed. + +Lemma monotone5_map (gf: rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4) + (MON: _monotone5 gf) : + _monotone (fun R0 => uncurry5 (gf (curry5 R0))). +Proof. + repeat_intros 3. apply uncurry_map5. apply MON; apply curry_map5; auto. +Qed. + Variable gf : rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4. Arguments gf : clear implicits. +Theorem _paco5_mon: _monotone5 (paco5 gf). +Proof. + repeat_intros 3. eapply curry_map5, _paco_mon; apply uncurry_map5; auto. +Qed. + +Theorem _paco5_acc: forall + l r (OBG: forall rr (INC: r <5== rr) (CIH: l <5== rr), l <5== paco5 gf rr), + l <5== paco5 gf r. +Proof. + intros. apply uncurry_adjoint1_5. + eapply _paco_acc. intros. + apply uncurry_adjoint1_5 in INC. apply uncurry_adjoint1_5 in CIH. + apply uncurry_adjoint2_5. + eapply le5_trans. eapply (OBG _ INC CIH). + apply curry_map5. + apply _paco_mon; try apply le1_refl; apply curry_bij1_5. +Qed. + +Theorem _paco5_mult_strong: forall r, + paco5 gf (upaco5 gf r) <5== paco5 gf r. +Proof. + intros. apply curry_map5. + eapply le1_trans; [| eapply _paco_mult_strong]. + apply _paco_mon; intros []; eauto. +Qed. + +Theorem _paco5_fold: forall r, + gf (upaco5 gf r) <5== paco5 gf r. +Proof. + intros. apply uncurry_adjoint1_5. + eapply le1_trans; [| apply _paco_fold]. apply le1_refl. +Qed. + +Theorem _paco5_unfold: forall (MON: _monotone5 gf) r, + paco5 gf r <5== gf (upaco5 gf r). +Proof. + intros. apply curry_adjoint2_5. + eapply _paco_unfold; apply monotone5_map; auto. +Qed. + Theorem paco5_acc: forall - l r (OBG: forall rr (INC: r <5= rr) (CIH: l <_paco_5= rr), l <_paco_5= paco5 gf rr), + l r (OBG: forall rr (INC: r <5= rr) (CIH: l <5= rr), l <5= paco5 gf rr), l <5= paco5 gf r. Proof. - intros; assert (SIM: paco5 gf (r \5/ l) x0 x1 x2 x3 x4) by eauto. - clear PR; repeat (try left; do 6 paco_revert; paco_cofix_auto). + apply _paco5_acc. Qed. Theorem paco5_mon: monotone5 (paco5 gf). -Proof. paco_cofix_auto; repeat (left; do 6 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone5_eq. + apply _paco5_mon. +Qed. Theorem paco5_mult_strong: forall r, paco5 gf (upaco5 gf r) <5= paco5 gf r. -Proof. paco_cofix_auto; repeat (left; do 6 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco5_mult_strong. +Qed. Corollary paco5_mult: forall r, paco5 gf (paco5 gf r) <5= paco5 gf r. @@ -141,25 +229,26 @@ Proof. intros; eapply paco5_mult_strong, paco5_mon; eauto. Qed. Theorem paco5_fold: forall r, gf (upaco5 gf r) <5= paco5 gf r. -Proof. intros; econstructor; [ |eauto]; eauto. Qed. +Proof. + apply _paco5_fold. +Qed. Theorem paco5_unfold: forall (MON: monotone5 gf) r, paco5 gf r <5= gf (upaco5 gf r). -Proof. unfold monotone5; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 1. eapply _paco5_unfold; apply monotone5_eq; auto. +Qed. End Arg5_1. -Hint Unfold monotone5. -Hint Resolve paco5_fold. - -Arguments paco5_acc [ T0 T1 T2 T3 T4 ]. -Arguments paco5_mon [ T0 T1 T2 T3 T4 ]. -Arguments paco5_mult_strong [ T0 T1 T2 T3 T4 ]. -Arguments paco5_mult [ T0 T1 T2 T3 T4 ]. -Arguments paco5_fold [ T0 T1 T2 T3 T4 ]. -Arguments paco5_unfold [ T0 T1 T2 T3 T4 ]. +Arguments paco5_acc : clear implicits. +Arguments paco5_mon : clear implicits. +Arguments paco5_mult_strong : clear implicits. +Arguments paco5_mult : clear implicits. +Arguments paco5_fold : clear implicits. +Arguments paco5_unfold : clear implicits. -Instance paco5_inst T0 T1 T2 T3 T4 (gf : rel5 T0 T1 T2 T3 T4->_) r x0 x1 x2 x3 x4 : paco_class (paco5 gf r x0 x1 x2 x3 x4) := +Global Instance paco5_inst (gf : rel5 T0 T1 T2 T3 T4->_) r x0 x1 x2 x3 x4 : paco_class (paco5 gf r x0 x1 x2 x3 x4) := { pacoacc := paco5_acc gf; pacomult := paco5_mult gf; pacofold := paco5_fold gf; @@ -169,47 +258,144 @@ Instance paco5_inst T0 T1 T2 T3 T4 (gf : rel5 T0 T1 T2 T3 T4->_) r x0 x1 x2 x3 Section Arg5_2. -Definition monotone5_2 T0 T1 T2 T3 T4 (gf: rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4) := +Definition monotone5_2 (gf: rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4) := forall x0 x1 x2 x3 x4 r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1 x0 x1 x2 x3 x4) (LE_0: r_0 <5= r'_0)(LE_1: r_1 <5= r'_1), gf r'_0 r'_1 x0 x1 x2 x3 x4. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. +Definition _monotone5_2 (gf: rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <5= r'_0)(LE_1: r_1 <5= r'_1), gf r_0 r_1 <5== gf r'_0 r'_1. + +Lemma monotone5_2_eq (gf: rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4) : + monotone5_2 gf <-> _monotone5_2 gf. +Proof. unfold monotone5_2, _monotone5_2, le5. split; eauto. Qed. + +Lemma monotone5_2_map (gf: rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4) + (MON: _monotone5_2 gf) : + _monotone_2 (fun R0 R1 => uncurry5 (gf (curry5 R0) (curry5 R1))). +Proof. + repeat_intros 6. apply uncurry_map5. apply MON; apply curry_map5; auto. +Qed. + Variable gf_0 gf_1 : rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. +Theorem _paco5_2_0_mon: _monotone5_2 (paco5_2_0 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map5, _paco_2_0_mon; apply uncurry_map5; auto. +Qed. + +Theorem _paco5_2_1_mon: _monotone5_2 (paco5_2_1 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map5, _paco_2_1_mon; apply uncurry_map5; auto. +Qed. + +Theorem _paco5_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <5== rr) (CIH: l <5== rr), l <5== paco5_2_0 gf_0 gf_1 rr r_1), + l <5== paco5_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_5. + eapply _paco_2_0_acc. intros. + apply uncurry_adjoint1_5 in INC. apply uncurry_adjoint1_5 in CIH. + apply uncurry_adjoint2_5. + eapply le5_trans. eapply (OBG _ INC CIH). + apply curry_map5. + apply _paco_2_0_mon; try apply le1_refl; apply curry_bij1_5. +Qed. + +Theorem _paco5_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <5== rr) (CIH: l <5== rr), l <5== paco5_2_1 gf_0 gf_1 r_0 rr), + l <5== paco5_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_5. + eapply _paco_2_1_acc. intros. + apply uncurry_adjoint1_5 in INC. apply uncurry_adjoint1_5 in CIH. + apply uncurry_adjoint2_5. + eapply le5_trans. eapply (OBG _ INC CIH). + apply curry_map5. + apply _paco_2_1_mon; try apply le1_refl; apply curry_bij1_5. +Qed. + +Theorem _paco5_2_0_mult_strong: forall r_0 r_1, + paco5_2_0 gf_0 gf_1 (upaco5_2_0 gf_0 gf_1 r_0 r_1) (upaco5_2_1 gf_0 gf_1 r_0 r_1) <5== paco5_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map5. + eapply le1_trans; [| eapply _paco_2_0_mult_strong]. + apply _paco_2_0_mon; intros []; eauto. +Qed. + +Theorem _paco5_2_1_mult_strong: forall r_0 r_1, + paco5_2_1 gf_0 gf_1 (upaco5_2_0 gf_0 gf_1 r_0 r_1) (upaco5_2_1 gf_0 gf_1 r_0 r_1) <5== paco5_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map5. + eapply le1_trans; [| eapply _paco_2_1_mult_strong]. + apply _paco_2_1_mon; intros []; eauto. +Qed. + +Theorem _paco5_2_0_fold: forall r_0 r_1, + gf_0 (upaco5_2_0 gf_0 gf_1 r_0 r_1) (upaco5_2_1 gf_0 gf_1 r_0 r_1) <5== paco5_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_5. + eapply le1_trans; [| apply _paco_2_0_fold]. apply le1_refl. +Qed. + +Theorem _paco5_2_1_fold: forall r_0 r_1, + gf_1 (upaco5_2_0 gf_0 gf_1 r_0 r_1) (upaco5_2_1 gf_0 gf_1 r_0 r_1) <5== paco5_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_5. + eapply le1_trans; [| apply _paco_2_1_fold]. apply le1_refl. +Qed. + +Theorem _paco5_2_0_unfold: forall (MON: _monotone5_2 gf_0) (MON: _monotone5_2 gf_1) r_0 r_1, + paco5_2_0 gf_0 gf_1 r_0 r_1 <5== gf_0 (upaco5_2_0 gf_0 gf_1 r_0 r_1) (upaco5_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_5. + eapply _paco_2_0_unfold; apply monotone5_2_map; auto. +Qed. + +Theorem _paco5_2_1_unfold: forall (MON: _monotone5_2 gf_0) (MON: _monotone5_2 gf_1) r_0 r_1, + paco5_2_1 gf_0 gf_1 r_0 r_1 <5== gf_1 (upaco5_2_0 gf_0 gf_1 r_0 r_1) (upaco5_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_5. + eapply _paco_2_1_unfold; apply monotone5_2_map; auto. +Qed. + Theorem paco5_2_0_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_0 <5= rr) (CIH: l <_paco_5= rr), l <_paco_5= paco5_2_0 gf_0 gf_1 rr r_1), + l r_0 r_1 (OBG: forall rr (INC: r_0 <5= rr) (CIH: l <5= rr), l <5= paco5_2_0 gf_0 gf_1 rr r_1), l <5= paco5_2_0 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco5_2_0 gf_0 gf_1 (r_0 \5/ l) r_1 x0 x1 x2 x3 x4) by eauto. - clear PR; repeat (try left; do 6 paco_revert; paco_cofix_auto). + apply _paco5_2_0_acc. Qed. Theorem paco5_2_1_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_1 <5= rr) (CIH: l <_paco_5= rr), l <_paco_5= paco5_2_1 gf_0 gf_1 r_0 rr), + l r_0 r_1 (OBG: forall rr (INC: r_1 <5= rr) (CIH: l <5= rr), l <5= paco5_2_1 gf_0 gf_1 r_0 rr), l <5= paco5_2_1 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco5_2_1 gf_0 gf_1 r_0 (r_1 \5/ l) x0 x1 x2 x3 x4) by eauto. - clear PR; repeat (try left; do 6 paco_revert; paco_cofix_auto). + apply _paco5_2_1_acc. Qed. Theorem paco5_2_0_mon: monotone5_2 (paco5_2_0 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 6 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone5_2_eq. + apply _paco5_2_0_mon. +Qed. Theorem paco5_2_1_mon: monotone5_2 (paco5_2_1 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 6 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone5_2_eq. + apply _paco5_2_1_mon. +Qed. Theorem paco5_2_0_mult_strong: forall r_0 r_1, paco5_2_0 gf_0 gf_1 (upaco5_2_0 gf_0 gf_1 r_0 r_1) (upaco5_2_1 gf_0 gf_1 r_0 r_1) <5= paco5_2_0 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 6 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco5_2_0_mult_strong. +Qed. Theorem paco5_2_1_mult_strong: forall r_0 r_1, paco5_2_1 gf_0 gf_1 (upaco5_2_0 gf_0 gf_1 r_0 r_1) (upaco5_2_1 gf_0 gf_1 r_0 r_1) <5= paco5_2_1 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 6 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco5_2_1_mult_strong. +Qed. Corollary paco5_2_0_mult: forall r_0 r_1, paco5_2_0 gf_0 gf_1 (paco5_2_0 gf_0 gf_1 r_0 r_1) (paco5_2_1 gf_0 gf_1 r_0 r_1) <5= paco5_2_0 gf_0 gf_1 r_0 r_1. @@ -221,46 +407,50 @@ Proof. intros; eapply paco5_2_1_mult_strong, paco5_2_1_mon; eauto. Qed. Theorem paco5_2_0_fold: forall r_0 r_1, gf_0 (upaco5_2_0 gf_0 gf_1 r_0 r_1) (upaco5_2_1 gf_0 gf_1 r_0 r_1) <5= paco5_2_0 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco5_2_0_fold. +Qed. Theorem paco5_2_1_fold: forall r_0 r_1, gf_1 (upaco5_2_0 gf_0 gf_1 r_0 r_1) (upaco5_2_1 gf_0 gf_1 r_0 r_1) <5= paco5_2_1 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco5_2_1_fold. +Qed. Theorem paco5_2_0_unfold: forall (MON: monotone5_2 gf_0) (MON: monotone5_2 gf_1) r_0 r_1, paco5_2_0 gf_0 gf_1 r_0 r_1 <5= gf_0 (upaco5_2_0 gf_0 gf_1 r_0 r_1) (upaco5_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone5_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco5_2_0_unfold; apply monotone5_2_eq; auto. +Qed. Theorem paco5_2_1_unfold: forall (MON: monotone5_2 gf_0) (MON: monotone5_2 gf_1) r_0 r_1, paco5_2_1 gf_0 gf_1 r_0 r_1 <5= gf_1 (upaco5_2_0 gf_0 gf_1 r_0 r_1) (upaco5_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone5_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco5_2_1_unfold; apply monotone5_2_eq; auto. +Qed. End Arg5_2. -Hint Unfold monotone5_2. -Hint Resolve paco5_2_0_fold. -Hint Resolve paco5_2_1_fold. - -Arguments paco5_2_0_acc [ T0 T1 T2 T3 T4 ]. -Arguments paco5_2_1_acc [ T0 T1 T2 T3 T4 ]. -Arguments paco5_2_0_mon [ T0 T1 T2 T3 T4 ]. -Arguments paco5_2_1_mon [ T0 T1 T2 T3 T4 ]. -Arguments paco5_2_0_mult_strong [ T0 T1 T2 T3 T4 ]. -Arguments paco5_2_1_mult_strong [ T0 T1 T2 T3 T4 ]. -Arguments paco5_2_0_mult [ T0 T1 T2 T3 T4 ]. -Arguments paco5_2_1_mult [ T0 T1 T2 T3 T4 ]. -Arguments paco5_2_0_fold [ T0 T1 T2 T3 T4 ]. -Arguments paco5_2_1_fold [ T0 T1 T2 T3 T4 ]. -Arguments paco5_2_0_unfold [ T0 T1 T2 T3 T4 ]. -Arguments paco5_2_1_unfold [ T0 T1 T2 T3 T4 ]. - -Instance paco5_2_0_inst T0 T1 T2 T3 T4 (gf_0 gf_1 : rel5 T0 T1 T2 T3 T4->_) r_0 r_1 x0 x1 x2 x3 x4 : paco_class (paco5_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4) := +Arguments paco5_2_0_acc : clear implicits. +Arguments paco5_2_1_acc : clear implicits. +Arguments paco5_2_0_mon : clear implicits. +Arguments paco5_2_1_mon : clear implicits. +Arguments paco5_2_0_mult_strong : clear implicits. +Arguments paco5_2_1_mult_strong : clear implicits. +Arguments paco5_2_0_mult : clear implicits. +Arguments paco5_2_1_mult : clear implicits. +Arguments paco5_2_0_fold : clear implicits. +Arguments paco5_2_1_fold : clear implicits. +Arguments paco5_2_0_unfold : clear implicits. +Arguments paco5_2_1_unfold : clear implicits. + +Global Instance paco5_2_0_inst (gf_0 gf_1 : rel5 T0 T1 T2 T3 T4->_) r_0 r_1 x0 x1 x2 x3 x4 : paco_class (paco5_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4) := { pacoacc := paco5_2_0_acc gf_0 gf_1; pacomult := paco5_2_0_mult gf_0 gf_1; pacofold := paco5_2_0_fold gf_0 gf_1; pacounfold := paco5_2_0_unfold gf_0 gf_1 }. -Instance paco5_2_1_inst T0 T1 T2 T3 T4 (gf_0 gf_1 : rel5 T0 T1 T2 T3 T4->_) r_0 r_1 x0 x1 x2 x3 x4 : paco_class (paco5_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4) := +Global Instance paco5_2_1_inst (gf_0 gf_1 : rel5 T0 T1 T2 T3 T4->_) r_0 r_1 x0 x1 x2 x3 x4 : paco_class (paco5_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4) := { pacoacc := paco5_2_1_acc gf_0 gf_1; pacomult := paco5_2_1_mult gf_0 gf_1; pacofold := paco5_2_1_fold gf_0 gf_1; @@ -270,63 +460,204 @@ Instance paco5_2_1_inst T0 T1 T2 T3 T4 (gf_0 gf_1 : rel5 T0 T1 T2 T3 T4->_) r_0 Section Arg5_3. -Definition monotone5_3 T0 T1 T2 T3 T4 (gf: rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4) := +Definition monotone5_3 (gf: rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4) := forall x0 x1 x2 x3 x4 r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2 x0 x1 x2 x3 x4) (LE_0: r_0 <5= r'_0)(LE_1: r_1 <5= r'_1)(LE_2: r_2 <5= r'_2), gf r'_0 r'_1 r'_2 x0 x1 x2 x3 x4. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. +Definition _monotone5_3 (gf: rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <5= r'_0)(LE_1: r_1 <5= r'_1)(LE_2: r_2 <5= r'_2), gf r_0 r_1 r_2 <5== gf r'_0 r'_1 r'_2. + +Lemma monotone5_3_eq (gf: rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4) : + monotone5_3 gf <-> _monotone5_3 gf. +Proof. unfold monotone5_3, _monotone5_3, le5. split; eauto. Qed. + +Lemma monotone5_3_map (gf: rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4) + (MON: _monotone5_3 gf) : + _monotone_3 (fun R0 R1 R2 => uncurry5 (gf (curry5 R0) (curry5 R1) (curry5 R2))). +Proof. + repeat_intros 9. apply uncurry_map5. apply MON; apply curry_map5; auto. +Qed. + Variable gf_0 gf_1 gf_2 : rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4 -> rel5 T0 T1 T2 T3 T4. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. +Theorem _paco5_3_0_mon: _monotone5_3 (paco5_3_0 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map5, _paco_3_0_mon; apply uncurry_map5; auto. +Qed. + +Theorem _paco5_3_1_mon: _monotone5_3 (paco5_3_1 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map5, _paco_3_1_mon; apply uncurry_map5; auto. +Qed. + +Theorem _paco5_3_2_mon: _monotone5_3 (paco5_3_2 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map5, _paco_3_2_mon; apply uncurry_map5; auto. +Qed. + +Theorem _paco5_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <5== rr) (CIH: l <5== rr), l <5== paco5_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <5== paco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_5. + eapply _paco_3_0_acc. intros. + apply uncurry_adjoint1_5 in INC. apply uncurry_adjoint1_5 in CIH. + apply uncurry_adjoint2_5. + eapply le5_trans. eapply (OBG _ INC CIH). + apply curry_map5. + apply _paco_3_0_mon; try apply le1_refl; apply curry_bij1_5. +Qed. + +Theorem _paco5_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <5== rr) (CIH: l <5== rr), l <5== paco5_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <5== paco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_5. + eapply _paco_3_1_acc. intros. + apply uncurry_adjoint1_5 in INC. apply uncurry_adjoint1_5 in CIH. + apply uncurry_adjoint2_5. + eapply le5_trans. eapply (OBG _ INC CIH). + apply curry_map5. + apply _paco_3_1_mon; try apply le1_refl; apply curry_bij1_5. +Qed. + +Theorem _paco5_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <5== rr) (CIH: l <5== rr), l <5== paco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <5== paco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_5. + eapply _paco_3_2_acc. intros. + apply uncurry_adjoint1_5 in INC. apply uncurry_adjoint1_5 in CIH. + apply uncurry_adjoint2_5. + eapply le5_trans. eapply (OBG _ INC CIH). + apply curry_map5. + apply _paco_3_2_mon; try apply le1_refl; apply curry_bij1_5. +Qed. + +Theorem _paco5_3_0_mult_strong: forall r_0 r_1 r_2, + paco5_3_0 gf_0 gf_1 gf_2 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <5== paco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map5. + eapply le1_trans; [| eapply _paco_3_0_mult_strong]. + apply _paco_3_0_mon; intros []; eauto. +Qed. + +Theorem _paco5_3_1_mult_strong: forall r_0 r_1 r_2, + paco5_3_1 gf_0 gf_1 gf_2 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <5== paco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map5. + eapply le1_trans; [| eapply _paco_3_1_mult_strong]. + apply _paco_3_1_mon; intros []; eauto. +Qed. + +Theorem _paco5_3_2_mult_strong: forall r_0 r_1 r_2, + paco5_3_2 gf_0 gf_1 gf_2 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <5== paco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map5. + eapply le1_trans; [| eapply _paco_3_2_mult_strong]. + apply _paco_3_2_mon; intros []; eauto. +Qed. + +Theorem _paco5_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <5== paco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_5. + eapply le1_trans; [| apply _paco_3_0_fold]. apply le1_refl. +Qed. + +Theorem _paco5_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <5== paco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_5. + eapply le1_trans; [| apply _paco_3_1_fold]. apply le1_refl. +Qed. + +Theorem _paco5_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <5== paco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_5. + eapply le1_trans; [| apply _paco_3_2_fold]. apply le1_refl. +Qed. + +Theorem _paco5_3_0_unfold: forall (MON: _monotone5_3 gf_0) (MON: _monotone5_3 gf_1) (MON: _monotone5_3 gf_2) r_0 r_1 r_2, + paco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <5== gf_0 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_5. + eapply _paco_3_0_unfold; apply monotone5_3_map; auto. +Qed. + +Theorem _paco5_3_1_unfold: forall (MON: _monotone5_3 gf_0) (MON: _monotone5_3 gf_1) (MON: _monotone5_3 gf_2) r_0 r_1 r_2, + paco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <5== gf_1 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_5. + eapply _paco_3_1_unfold; apply monotone5_3_map; auto. +Qed. + +Theorem _paco5_3_2_unfold: forall (MON: _monotone5_3 gf_0) (MON: _monotone5_3 gf_1) (MON: _monotone5_3 gf_2) r_0 r_1 r_2, + paco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <5== gf_2 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_5. + eapply _paco_3_2_unfold; apply monotone5_3_map; auto. +Qed. + Theorem paco5_3_0_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <5= rr) (CIH: l <_paco_5= rr), l <_paco_5= paco5_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <5= rr) (CIH: l <5= rr), l <5= paco5_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), l <5= paco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco5_3_0 gf_0 gf_1 gf_2 (r_0 \5/ l) r_1 r_2 x0 x1 x2 x3 x4) by eauto. - clear PR; repeat (try left; do 6 paco_revert; paco_cofix_auto). + apply _paco5_3_0_acc. Qed. Theorem paco5_3_1_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <5= rr) (CIH: l <_paco_5= rr), l <_paco_5= paco5_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <5= rr) (CIH: l <5= rr), l <5= paco5_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), l <5= paco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco5_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \5/ l) r_2 x0 x1 x2 x3 x4) by eauto. - clear PR; repeat (try left; do 6 paco_revert; paco_cofix_auto). + apply _paco5_3_1_acc. Qed. Theorem paco5_3_2_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <5= rr) (CIH: l <_paco_5= rr), l <_paco_5= paco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <5= rr) (CIH: l <5= rr), l <5= paco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), l <5= paco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \5/ l) x0 x1 x2 x3 x4) by eauto. - clear PR; repeat (try left; do 6 paco_revert; paco_cofix_auto). + apply _paco5_3_2_acc. Qed. Theorem paco5_3_0_mon: monotone5_3 (paco5_3_0 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 6 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone5_3_eq. + apply _paco5_3_0_mon. +Qed. Theorem paco5_3_1_mon: monotone5_3 (paco5_3_1 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 6 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone5_3_eq. + apply _paco5_3_1_mon. +Qed. Theorem paco5_3_2_mon: monotone5_3 (paco5_3_2 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 6 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone5_3_eq. + apply _paco5_3_2_mon. +Qed. Theorem paco5_3_0_mult_strong: forall r_0 r_1 r_2, paco5_3_0 gf_0 gf_1 gf_2 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <5= paco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 6 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco5_3_0_mult_strong. +Qed. Theorem paco5_3_1_mult_strong: forall r_0 r_1 r_2, paco5_3_1 gf_0 gf_1 gf_2 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <5= paco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 6 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco5_3_1_mult_strong. +Qed. Theorem paco5_3_2_mult_strong: forall r_0 r_1 r_2, paco5_3_2 gf_0 gf_1 gf_2 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <5= paco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 6 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco5_3_2_mult_strong. +Qed. Corollary paco5_3_0_mult: forall r_0 r_1 r_2, paco5_3_0 gf_0 gf_1 gf_2 (paco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <5= paco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. @@ -342,69 +673,105 @@ Proof. intros; eapply paco5_3_2_mult_strong, paco5_3_2_mon; eauto. Qed. Theorem paco5_3_0_fold: forall r_0 r_1 r_2, gf_0 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <5= paco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco5_3_0_fold. +Qed. Theorem paco5_3_1_fold: forall r_0 r_1 r_2, gf_1 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <5= paco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco5_3_1_fold. +Qed. Theorem paco5_3_2_fold: forall r_0 r_1 r_2, gf_2 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <5= paco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco5_3_2_fold. +Qed. Theorem paco5_3_0_unfold: forall (MON: monotone5_3 gf_0) (MON: monotone5_3 gf_1) (MON: monotone5_3 gf_2) r_0 r_1 r_2, paco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <5= gf_0 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone5_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco5_3_0_unfold; apply monotone5_3_eq; auto. +Qed. Theorem paco5_3_1_unfold: forall (MON: monotone5_3 gf_0) (MON: monotone5_3 gf_1) (MON: monotone5_3 gf_2) r_0 r_1 r_2, paco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <5= gf_1 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone5_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco5_3_1_unfold; apply monotone5_3_eq; auto. +Qed. Theorem paco5_3_2_unfold: forall (MON: monotone5_3 gf_0) (MON: monotone5_3 gf_1) (MON: monotone5_3 gf_2) r_0 r_1 r_2, paco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <5= gf_2 (upaco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone5_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco5_3_2_unfold; apply monotone5_3_eq; auto. +Qed. End Arg5_3. -Hint Unfold monotone5_3. -Hint Resolve paco5_3_0_fold. -Hint Resolve paco5_3_1_fold. -Hint Resolve paco5_3_2_fold. - -Arguments paco5_3_0_acc [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_1_acc [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_2_acc [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_0_mon [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_1_mon [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_2_mon [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_0_mult_strong [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_1_mult_strong [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_2_mult_strong [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_0_mult [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_1_mult [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_2_mult [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_0_fold [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_1_fold [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_2_fold [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_0_unfold [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_1_unfold [ T0 T1 T2 T3 T4 ]. -Arguments paco5_3_2_unfold [ T0 T1 T2 T3 T4 ]. - -Instance paco5_3_0_inst T0 T1 T2 T3 T4 (gf_0 gf_1 gf_2 : rel5 T0 T1 T2 T3 T4->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 : paco_class (paco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4) := +Arguments paco5_3_0_acc : clear implicits. +Arguments paco5_3_1_acc : clear implicits. +Arguments paco5_3_2_acc : clear implicits. +Arguments paco5_3_0_mon : clear implicits. +Arguments paco5_3_1_mon : clear implicits. +Arguments paco5_3_2_mon : clear implicits. +Arguments paco5_3_0_mult_strong : clear implicits. +Arguments paco5_3_1_mult_strong : clear implicits. +Arguments paco5_3_2_mult_strong : clear implicits. +Arguments paco5_3_0_mult : clear implicits. +Arguments paco5_3_1_mult : clear implicits. +Arguments paco5_3_2_mult : clear implicits. +Arguments paco5_3_0_fold : clear implicits. +Arguments paco5_3_1_fold : clear implicits. +Arguments paco5_3_2_fold : clear implicits. +Arguments paco5_3_0_unfold : clear implicits. +Arguments paco5_3_1_unfold : clear implicits. +Arguments paco5_3_2_unfold : clear implicits. + +Global Instance paco5_3_0_inst (gf_0 gf_1 gf_2 : rel5 T0 T1 T2 T3 T4->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 : paco_class (paco5_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4) := { pacoacc := paco5_3_0_acc gf_0 gf_1 gf_2; pacomult := paco5_3_0_mult gf_0 gf_1 gf_2; pacofold := paco5_3_0_fold gf_0 gf_1 gf_2; pacounfold := paco5_3_0_unfold gf_0 gf_1 gf_2 }. -Instance paco5_3_1_inst T0 T1 T2 T3 T4 (gf_0 gf_1 gf_2 : rel5 T0 T1 T2 T3 T4->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 : paco_class (paco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4) := +Global Instance paco5_3_1_inst (gf_0 gf_1 gf_2 : rel5 T0 T1 T2 T3 T4->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 : paco_class (paco5_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4) := { pacoacc := paco5_3_1_acc gf_0 gf_1 gf_2; pacomult := paco5_3_1_mult gf_0 gf_1 gf_2; pacofold := paco5_3_1_fold gf_0 gf_1 gf_2; pacounfold := paco5_3_1_unfold gf_0 gf_1 gf_2 }. -Instance paco5_3_2_inst T0 T1 T2 T3 T4 (gf_0 gf_1 gf_2 : rel5 T0 T1 T2 T3 T4->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 : paco_class (paco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4) := +Global Instance paco5_3_2_inst (gf_0 gf_1 gf_2 : rel5 T0 T1 T2 T3 T4->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 : paco_class (paco5_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4) := { pacoacc := paco5_3_2_acc gf_0 gf_1 gf_2; pacomult := paco5_3_2_mult gf_0 gf_1 gf_2; pacofold := paco5_3_2_fold gf_0 gf_1 gf_2; pacounfold := paco5_3_2_unfold gf_0 gf_1 gf_2 }. +End PACO5. + +Global Opaque paco5. + +Hint Unfold upaco5. +Hint Resolve paco5_fold. +Hint Unfold monotone5. + +Global Opaque paco5_2_0. +Global Opaque paco5_2_1. + +Hint Unfold upaco5_2_0. +Hint Unfold upaco5_2_1. +Hint Resolve paco5_2_0_fold. +Hint Resolve paco5_2_1_fold. +Hint Unfold monotone5_2. + +Global Opaque paco5_3_0. +Global Opaque paco5_3_1. +Global Opaque paco5_3_2. + +Hint Unfold upaco5_3_0. +Hint Unfold upaco5_3_1. +Hint Unfold upaco5_3_2. +Hint Resolve paco5_3_0_fold. +Hint Resolve paco5_3_1_fold. +Hint Resolve paco5_3_2_fold. +Hint Unfold monotone5_3. + diff --git a/src/paco6.v b/src/paco6.v index 2ae0b55..5668b31 100644 --- a/src/paco6.v +++ b/src/paco6.v @@ -1,143 +1,229 @@ Require Export paconotation pacotacuser. -Require Import pacotac. +Require Import paconotation_internal pacotac pacon. Set Implicit Arguments. -(** ** Predicates of Arity 6 -*) +Section PACO6. -Section Arg6_def. Variable T0 : Type. Variable T1 : forall (x0: @T0), Type. Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. + +Record sig6T := + exist6T { + proj6T0: @T0; + proj6T1: @T1 proj6T0; + proj6T2: @T2 proj6T0 proj6T1; + proj6T3: @T3 proj6T0 proj6T1 proj6T2; + proj6T4: @T4 proj6T0 proj6T1 proj6T2 proj6T3; + proj6T5: @T5 proj6T0 proj6T1 proj6T2 proj6T3 proj6T4; + }. + +Definition uncurry6 (R: rel6 T0 T1 T2 T3 T4 T5): rel1 sig6T := fun x => R (proj6T0 x) (proj6T1 x) (proj6T2 x) (proj6T3 x) (proj6T4 x) (proj6T5 x). + +Definition curry6 (R: rel1 sig6T): rel6 T0 T1 T2 T3 T4 T5 := + fun x0 x1 x2 x3 x4 x5 => R (exist6T x5). + +Lemma uncurry_map6 r0 r1 (LE : r0 <6== r1) : uncurry6 r0 <1== uncurry6 r1. +Proof. intros [] H. apply LE. auto. Qed. + +Lemma uncurry_map_rev6 r0 r1 (LE: uncurry6 r0 <1== uncurry6 r1) : r0 <6== r1. +Proof. + repeat_intros 6. intros H. apply (LE (exist6T x5) H). +Qed. + +Lemma curry_map6 r0 r1 (LE: r0 <1== r1) : curry6 r0 <6== curry6 r1. +Proof. + repeat_intros 6. intros H. apply (LE (exist6T x5) H). +Qed. + +Lemma curry_map_rev6 r0 r1 (LE: curry6 r0 <6== curry6 r1) : r0 <1== r1. +Proof. + intros [] H. apply LE. apply H. +Qed. + +Lemma uncurry_bij1_6 r : curry6 (uncurry6 r) <6== r. +Proof. unfold le6. repeat_intros 6; auto. Qed. + +Lemma uncurry_bij2_6 r : r <6== curry6 (uncurry6 r). +Proof. unfold le6. repeat_intros 6; auto. Qed. + +Lemma curry_bij1_6 r : uncurry6 (curry6 r) <1== r. +Proof. intros []; auto. Qed. + +Lemma curry_bij2_6 r : r <1== uncurry6 (curry6 r). +Proof. intros []; auto. Qed. + +Lemma uncurry_adjoint1_6 r0 r1 (LE: uncurry6 r0 <1== r1) : r0 <6== curry6 r1. +Proof. + apply uncurry_map_rev6. eapply le1_trans; [eauto|]. apply curry_bij2_6. +Qed. + +Lemma uncurry_adjoint2_6 r0 r1 (LE: r0 <6== curry6 r1) : uncurry6 r0 <1== r1. +Proof. + apply curry_map_rev6. eapply le6_trans; [|eauto]. apply uncurry_bij2_6. +Qed. + +Lemma curry_adjoint1_6 r0 r1 (LE: curry6 r0 <6== r1) : r0 <1== uncurry6 r1. +Proof. + apply curry_map_rev6. eapply le6_trans; [eauto|]. apply uncurry_bij2_6. +Qed. + +Lemma curry_adjoint2_6 r0 r1 (LE: r0 <1== uncurry6 r1) : curry6 r0 <6== r1. +Proof. + apply uncurry_map_rev6. eapply le1_trans; [|eauto]. apply curry_bij1_6. +Qed. + +(** ** Predicates of Arity 6 +*) + +Section Arg6_def. Variable gf : rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5. Arguments gf : clear implicits. -CoInductive paco6( r: rel6 T0 T1 T2 T3 T4 T5) x0 x1 x2 x3 x4 x5 : Prop := -| paco6_pfold pco - (LE : pco <6= (paco6 r \6/ r)) - (SIM: gf pco x0 x1 x2 x3 x4 x5) -. +Definition paco6( r: rel6 T0 T1 T2 T3 T4 T5) : rel6 T0 T1 T2 T3 T4 T5 := + curry6 (paco (fun R0 => uncurry6 (gf (curry6 R0))) (uncurry6 r)). + Definition upaco6( r: rel6 T0 T1 T2 T3 T4 T5) := paco6 r \6/ r. End Arg6_def. -Arguments paco6 [ T0 T1 T2 T3 T4 T5 ]. -Arguments upaco6 [ T0 T1 T2 T3 T4 T5 ]. +Arguments paco6 : clear implicits. +Arguments upaco6 : clear implicits. Hint Unfold upaco6. Section Arg6_2_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. Variable gf_0 gf_1 : rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. -CoInductive paco6_2_0( r_0 r_1: rel6 T0 T1 T2 T3 T4 T5) x0 x1 x2 x3 x4 x5 : Prop := -| paco6_2_0_pfold pco_0 pco_1 - (LE : pco_0 <6= (paco6_2_0 r_0 r_1 \6/ r_0)) - (LE : pco_1 <6= (paco6_2_1 r_0 r_1 \6/ r_1)) - (SIM: gf_0 pco_0 pco_1 x0 x1 x2 x3 x4 x5) -with paco6_2_1( r_0 r_1: rel6 T0 T1 T2 T3 T4 T5) x0 x1 x2 x3 x4 x5 : Prop := -| paco6_2_1_pfold pco_0 pco_1 - (LE : pco_0 <6= (paco6_2_0 r_0 r_1 \6/ r_0)) - (LE : pco_1 <6= (paco6_2_1 r_0 r_1 \6/ r_1)) - (SIM: gf_1 pco_0 pco_1 x0 x1 x2 x3 x4 x5) -. +Definition paco6_2_0( r_0 r_1: rel6 T0 T1 T2 T3 T4 T5) : rel6 T0 T1 T2 T3 T4 T5 := + curry6 (paco_2_0 (fun R0 R1 => uncurry6 (gf_0 (curry6 R0) (curry6 R1))) (fun R0 R1 => uncurry6 (gf_1 (curry6 R0) (curry6 R1))) (uncurry6 r_0) (uncurry6 r_1)). + +Definition paco6_2_1( r_0 r_1: rel6 T0 T1 T2 T3 T4 T5) : rel6 T0 T1 T2 T3 T4 T5 := + curry6 (paco_2_1 (fun R0 R1 => uncurry6 (gf_0 (curry6 R0) (curry6 R1))) (fun R0 R1 => uncurry6 (gf_1 (curry6 R0) (curry6 R1))) (uncurry6 r_0) (uncurry6 r_1)). + Definition upaco6_2_0( r_0 r_1: rel6 T0 T1 T2 T3 T4 T5) := paco6_2_0 r_0 r_1 \6/ r_0. Definition upaco6_2_1( r_0 r_1: rel6 T0 T1 T2 T3 T4 T5) := paco6_2_1 r_0 r_1 \6/ r_1. End Arg6_2_def. -Arguments paco6_2_0 [ T0 T1 T2 T3 T4 T5 ]. -Arguments upaco6_2_0 [ T0 T1 T2 T3 T4 T5 ]. +Arguments paco6_2_0 : clear implicits. +Arguments upaco6_2_0 : clear implicits. Hint Unfold upaco6_2_0. -Arguments paco6_2_1 [ T0 T1 T2 T3 T4 T5 ]. -Arguments upaco6_2_1 [ T0 T1 T2 T3 T4 T5 ]. +Arguments paco6_2_1 : clear implicits. +Arguments upaco6_2_1 : clear implicits. Hint Unfold upaco6_2_1. Section Arg6_3_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. Variable gf_0 gf_1 gf_2 : rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. -CoInductive paco6_3_0( r_0 r_1 r_2: rel6 T0 T1 T2 T3 T4 T5) x0 x1 x2 x3 x4 x5 : Prop := -| paco6_3_0_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <6= (paco6_3_0 r_0 r_1 r_2 \6/ r_0)) - (LE : pco_1 <6= (paco6_3_1 r_0 r_1 r_2 \6/ r_1)) - (LE : pco_2 <6= (paco6_3_2 r_0 r_1 r_2 \6/ r_2)) - (SIM: gf_0 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5) -with paco6_3_1( r_0 r_1 r_2: rel6 T0 T1 T2 T3 T4 T5) x0 x1 x2 x3 x4 x5 : Prop := -| paco6_3_1_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <6= (paco6_3_0 r_0 r_1 r_2 \6/ r_0)) - (LE : pco_1 <6= (paco6_3_1 r_0 r_1 r_2 \6/ r_1)) - (LE : pco_2 <6= (paco6_3_2 r_0 r_1 r_2 \6/ r_2)) - (SIM: gf_1 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5) -with paco6_3_2( r_0 r_1 r_2: rel6 T0 T1 T2 T3 T4 T5) x0 x1 x2 x3 x4 x5 : Prop := -| paco6_3_2_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <6= (paco6_3_0 r_0 r_1 r_2 \6/ r_0)) - (LE : pco_1 <6= (paco6_3_1 r_0 r_1 r_2 \6/ r_1)) - (LE : pco_2 <6= (paco6_3_2 r_0 r_1 r_2 \6/ r_2)) - (SIM: gf_2 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5) -. +Definition paco6_3_0( r_0 r_1 r_2: rel6 T0 T1 T2 T3 T4 T5) : rel6 T0 T1 T2 T3 T4 T5 := + curry6 (paco_3_0 (fun R0 R1 R2 => uncurry6 (gf_0 (curry6 R0) (curry6 R1) (curry6 R2))) (fun R0 R1 R2 => uncurry6 (gf_1 (curry6 R0) (curry6 R1) (curry6 R2))) (fun R0 R1 R2 => uncurry6 (gf_2 (curry6 R0) (curry6 R1) (curry6 R2))) (uncurry6 r_0) (uncurry6 r_1) (uncurry6 r_2)). + +Definition paco6_3_1( r_0 r_1 r_2: rel6 T0 T1 T2 T3 T4 T5) : rel6 T0 T1 T2 T3 T4 T5 := + curry6 (paco_3_1 (fun R0 R1 R2 => uncurry6 (gf_0 (curry6 R0) (curry6 R1) (curry6 R2))) (fun R0 R1 R2 => uncurry6 (gf_1 (curry6 R0) (curry6 R1) (curry6 R2))) (fun R0 R1 R2 => uncurry6 (gf_2 (curry6 R0) (curry6 R1) (curry6 R2))) (uncurry6 r_0) (uncurry6 r_1) (uncurry6 r_2)). + +Definition paco6_3_2( r_0 r_1 r_2: rel6 T0 T1 T2 T3 T4 T5) : rel6 T0 T1 T2 T3 T4 T5 := + curry6 (paco_3_2 (fun R0 R1 R2 => uncurry6 (gf_0 (curry6 R0) (curry6 R1) (curry6 R2))) (fun R0 R1 R2 => uncurry6 (gf_1 (curry6 R0) (curry6 R1) (curry6 R2))) (fun R0 R1 R2 => uncurry6 (gf_2 (curry6 R0) (curry6 R1) (curry6 R2))) (uncurry6 r_0) (uncurry6 r_1) (uncurry6 r_2)). + Definition upaco6_3_0( r_0 r_1 r_2: rel6 T0 T1 T2 T3 T4 T5) := paco6_3_0 r_0 r_1 r_2 \6/ r_0. Definition upaco6_3_1( r_0 r_1 r_2: rel6 T0 T1 T2 T3 T4 T5) := paco6_3_1 r_0 r_1 r_2 \6/ r_1. Definition upaco6_3_2( r_0 r_1 r_2: rel6 T0 T1 T2 T3 T4 T5) := paco6_3_2 r_0 r_1 r_2 \6/ r_2. End Arg6_3_def. -Arguments paco6_3_0 [ T0 T1 T2 T3 T4 T5 ]. -Arguments upaco6_3_0 [ T0 T1 T2 T3 T4 T5 ]. +Arguments paco6_3_0 : clear implicits. +Arguments upaco6_3_0 : clear implicits. Hint Unfold upaco6_3_0. -Arguments paco6_3_1 [ T0 T1 T2 T3 T4 T5 ]. -Arguments upaco6_3_1 [ T0 T1 T2 T3 T4 T5 ]. +Arguments paco6_3_1 : clear implicits. +Arguments upaco6_3_1 : clear implicits. Hint Unfold upaco6_3_1. -Arguments paco6_3_2 [ T0 T1 T2 T3 T4 T5 ]. -Arguments upaco6_3_2 [ T0 T1 T2 T3 T4 T5 ]. +Arguments paco6_3_2 : clear implicits. +Arguments upaco6_3_2 : clear implicits. Hint Unfold upaco6_3_2. -(* Less than or equal - internal use only *) -Notation "p <_paco_6= q" := - (forall _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 (PR: p _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 : Prop), q _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 : Prop) - (at level 50, no associativity). - (** 1 Mutual Coinduction *) Section Arg6_1. -Definition monotone6 T0 T1 T2 T3 T4 T5 (gf: rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5) := +Definition monotone6 (gf: rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5) := forall x0 x1 x2 x3 x4 x5 r r' (IN: gf r x0 x1 x2 x3 x4 x5) (LE: r <6= r'), gf r' x0 x1 x2 x3 x4 x5. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. +Definition _monotone6 (gf: rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5) := + forall r r'(LE: r <6= r'), gf r <6== gf r'. + +Lemma monotone6_eq (gf: rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5) : + monotone6 gf <-> _monotone6 gf. +Proof. unfold monotone6, _monotone6, le6. split; eauto. Qed. + +Lemma monotone6_map (gf: rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5) + (MON: _monotone6 gf) : + _monotone (fun R0 => uncurry6 (gf (curry6 R0))). +Proof. + repeat_intros 3. apply uncurry_map6. apply MON; apply curry_map6; auto. +Qed. + Variable gf : rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5. Arguments gf : clear implicits. +Theorem _paco6_mon: _monotone6 (paco6 gf). +Proof. + repeat_intros 3. eapply curry_map6, _paco_mon; apply uncurry_map6; auto. +Qed. + +Theorem _paco6_acc: forall + l r (OBG: forall rr (INC: r <6== rr) (CIH: l <6== rr), l <6== paco6 gf rr), + l <6== paco6 gf r. +Proof. + intros. apply uncurry_adjoint1_6. + eapply _paco_acc. intros. + apply uncurry_adjoint1_6 in INC. apply uncurry_adjoint1_6 in CIH. + apply uncurry_adjoint2_6. + eapply le6_trans. eapply (OBG _ INC CIH). + apply curry_map6. + apply _paco_mon; try apply le1_refl; apply curry_bij1_6. +Qed. + +Theorem _paco6_mult_strong: forall r, + paco6 gf (upaco6 gf r) <6== paco6 gf r. +Proof. + intros. apply curry_map6. + eapply le1_trans; [| eapply _paco_mult_strong]. + apply _paco_mon; intros []; eauto. +Qed. + +Theorem _paco6_fold: forall r, + gf (upaco6 gf r) <6== paco6 gf r. +Proof. + intros. apply uncurry_adjoint1_6. + eapply le1_trans; [| apply _paco_fold]. apply le1_refl. +Qed. + +Theorem _paco6_unfold: forall (MON: _monotone6 gf) r, + paco6 gf r <6== gf (upaco6 gf r). +Proof. + intros. apply curry_adjoint2_6. + eapply _paco_unfold; apply monotone6_map; auto. +Qed. + Theorem paco6_acc: forall - l r (OBG: forall rr (INC: r <6= rr) (CIH: l <_paco_6= rr), l <_paco_6= paco6 gf rr), + l r (OBG: forall rr (INC: r <6= rr) (CIH: l <6= rr), l <6= paco6 gf rr), l <6= paco6 gf r. Proof. - intros; assert (SIM: paco6 gf (r \6/ l) x0 x1 x2 x3 x4 x5) by eauto. - clear PR; repeat (try left; do 7 paco_revert; paco_cofix_auto). + apply _paco6_acc. Qed. Theorem paco6_mon: monotone6 (paco6 gf). -Proof. paco_cofix_auto; repeat (left; do 7 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone6_eq. + apply _paco6_mon. +Qed. Theorem paco6_mult_strong: forall r, paco6 gf (upaco6 gf r) <6= paco6 gf r. -Proof. paco_cofix_auto; repeat (left; do 7 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco6_mult_strong. +Qed. Corollary paco6_mult: forall r, paco6 gf (paco6 gf r) <6= paco6 gf r. @@ -145,25 +231,26 @@ Proof. intros; eapply paco6_mult_strong, paco6_mon; eauto. Qed. Theorem paco6_fold: forall r, gf (upaco6 gf r) <6= paco6 gf r. -Proof. intros; econstructor; [ |eauto]; eauto. Qed. +Proof. + apply _paco6_fold. +Qed. Theorem paco6_unfold: forall (MON: monotone6 gf) r, paco6 gf r <6= gf (upaco6 gf r). -Proof. unfold monotone6; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 1. eapply _paco6_unfold; apply monotone6_eq; auto. +Qed. End Arg6_1. -Hint Unfold monotone6. -Hint Resolve paco6_fold. - -Arguments paco6_acc [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_mon [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_mult_strong [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_mult [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_fold [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_unfold [ T0 T1 T2 T3 T4 T5 ]. +Arguments paco6_acc : clear implicits. +Arguments paco6_mon : clear implicits. +Arguments paco6_mult_strong : clear implicits. +Arguments paco6_mult : clear implicits. +Arguments paco6_fold : clear implicits. +Arguments paco6_unfold : clear implicits. -Instance paco6_inst T0 T1 T2 T3 T4 T5 (gf : rel6 T0 T1 T2 T3 T4 T5->_) r x0 x1 x2 x3 x4 x5 : paco_class (paco6 gf r x0 x1 x2 x3 x4 x5) := +Global Instance paco6_inst (gf : rel6 T0 T1 T2 T3 T4 T5->_) r x0 x1 x2 x3 x4 x5 : paco_class (paco6 gf r x0 x1 x2 x3 x4 x5) := { pacoacc := paco6_acc gf; pacomult := paco6_mult gf; pacofold := paco6_fold gf; @@ -173,48 +260,144 @@ Instance paco6_inst T0 T1 T2 T3 T4 T5 (gf : rel6 T0 T1 T2 T3 T4 T5->_) r x0 x1 Section Arg6_2. -Definition monotone6_2 T0 T1 T2 T3 T4 T5 (gf: rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5) := +Definition monotone6_2 (gf: rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5) := forall x0 x1 x2 x3 x4 x5 r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1 x0 x1 x2 x3 x4 x5) (LE_0: r_0 <6= r'_0)(LE_1: r_1 <6= r'_1), gf r'_0 r'_1 x0 x1 x2 x3 x4 x5. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. +Definition _monotone6_2 (gf: rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <6= r'_0)(LE_1: r_1 <6= r'_1), gf r_0 r_1 <6== gf r'_0 r'_1. + +Lemma monotone6_2_eq (gf: rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5) : + monotone6_2 gf <-> _monotone6_2 gf. +Proof. unfold monotone6_2, _monotone6_2, le6. split; eauto. Qed. + +Lemma monotone6_2_map (gf: rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5) + (MON: _monotone6_2 gf) : + _monotone_2 (fun R0 R1 => uncurry6 (gf (curry6 R0) (curry6 R1))). +Proof. + repeat_intros 6. apply uncurry_map6. apply MON; apply curry_map6; auto. +Qed. + Variable gf_0 gf_1 : rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. +Theorem _paco6_2_0_mon: _monotone6_2 (paco6_2_0 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map6, _paco_2_0_mon; apply uncurry_map6; auto. +Qed. + +Theorem _paco6_2_1_mon: _monotone6_2 (paco6_2_1 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map6, _paco_2_1_mon; apply uncurry_map6; auto. +Qed. + +Theorem _paco6_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <6== rr) (CIH: l <6== rr), l <6== paco6_2_0 gf_0 gf_1 rr r_1), + l <6== paco6_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_6. + eapply _paco_2_0_acc. intros. + apply uncurry_adjoint1_6 in INC. apply uncurry_adjoint1_6 in CIH. + apply uncurry_adjoint2_6. + eapply le6_trans. eapply (OBG _ INC CIH). + apply curry_map6. + apply _paco_2_0_mon; try apply le1_refl; apply curry_bij1_6. +Qed. + +Theorem _paco6_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <6== rr) (CIH: l <6== rr), l <6== paco6_2_1 gf_0 gf_1 r_0 rr), + l <6== paco6_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_6. + eapply _paco_2_1_acc. intros. + apply uncurry_adjoint1_6 in INC. apply uncurry_adjoint1_6 in CIH. + apply uncurry_adjoint2_6. + eapply le6_trans. eapply (OBG _ INC CIH). + apply curry_map6. + apply _paco_2_1_mon; try apply le1_refl; apply curry_bij1_6. +Qed. + +Theorem _paco6_2_0_mult_strong: forall r_0 r_1, + paco6_2_0 gf_0 gf_1 (upaco6_2_0 gf_0 gf_1 r_0 r_1) (upaco6_2_1 gf_0 gf_1 r_0 r_1) <6== paco6_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map6. + eapply le1_trans; [| eapply _paco_2_0_mult_strong]. + apply _paco_2_0_mon; intros []; eauto. +Qed. + +Theorem _paco6_2_1_mult_strong: forall r_0 r_1, + paco6_2_1 gf_0 gf_1 (upaco6_2_0 gf_0 gf_1 r_0 r_1) (upaco6_2_1 gf_0 gf_1 r_0 r_1) <6== paco6_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map6. + eapply le1_trans; [| eapply _paco_2_1_mult_strong]. + apply _paco_2_1_mon; intros []; eauto. +Qed. + +Theorem _paco6_2_0_fold: forall r_0 r_1, + gf_0 (upaco6_2_0 gf_0 gf_1 r_0 r_1) (upaco6_2_1 gf_0 gf_1 r_0 r_1) <6== paco6_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_6. + eapply le1_trans; [| apply _paco_2_0_fold]. apply le1_refl. +Qed. + +Theorem _paco6_2_1_fold: forall r_0 r_1, + gf_1 (upaco6_2_0 gf_0 gf_1 r_0 r_1) (upaco6_2_1 gf_0 gf_1 r_0 r_1) <6== paco6_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_6. + eapply le1_trans; [| apply _paco_2_1_fold]. apply le1_refl. +Qed. + +Theorem _paco6_2_0_unfold: forall (MON: _monotone6_2 gf_0) (MON: _monotone6_2 gf_1) r_0 r_1, + paco6_2_0 gf_0 gf_1 r_0 r_1 <6== gf_0 (upaco6_2_0 gf_0 gf_1 r_0 r_1) (upaco6_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_6. + eapply _paco_2_0_unfold; apply monotone6_2_map; auto. +Qed. + +Theorem _paco6_2_1_unfold: forall (MON: _monotone6_2 gf_0) (MON: _monotone6_2 gf_1) r_0 r_1, + paco6_2_1 gf_0 gf_1 r_0 r_1 <6== gf_1 (upaco6_2_0 gf_0 gf_1 r_0 r_1) (upaco6_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_6. + eapply _paco_2_1_unfold; apply monotone6_2_map; auto. +Qed. + Theorem paco6_2_0_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_0 <6= rr) (CIH: l <_paco_6= rr), l <_paco_6= paco6_2_0 gf_0 gf_1 rr r_1), + l r_0 r_1 (OBG: forall rr (INC: r_0 <6= rr) (CIH: l <6= rr), l <6= paco6_2_0 gf_0 gf_1 rr r_1), l <6= paco6_2_0 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco6_2_0 gf_0 gf_1 (r_0 \6/ l) r_1 x0 x1 x2 x3 x4 x5) by eauto. - clear PR; repeat (try left; do 7 paco_revert; paco_cofix_auto). + apply _paco6_2_0_acc. Qed. Theorem paco6_2_1_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_1 <6= rr) (CIH: l <_paco_6= rr), l <_paco_6= paco6_2_1 gf_0 gf_1 r_0 rr), + l r_0 r_1 (OBG: forall rr (INC: r_1 <6= rr) (CIH: l <6= rr), l <6= paco6_2_1 gf_0 gf_1 r_0 rr), l <6= paco6_2_1 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco6_2_1 gf_0 gf_1 r_0 (r_1 \6/ l) x0 x1 x2 x3 x4 x5) by eauto. - clear PR; repeat (try left; do 7 paco_revert; paco_cofix_auto). + apply _paco6_2_1_acc. Qed. Theorem paco6_2_0_mon: monotone6_2 (paco6_2_0 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 7 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone6_2_eq. + apply _paco6_2_0_mon. +Qed. Theorem paco6_2_1_mon: monotone6_2 (paco6_2_1 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 7 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone6_2_eq. + apply _paco6_2_1_mon. +Qed. Theorem paco6_2_0_mult_strong: forall r_0 r_1, paco6_2_0 gf_0 gf_1 (upaco6_2_0 gf_0 gf_1 r_0 r_1) (upaco6_2_1 gf_0 gf_1 r_0 r_1) <6= paco6_2_0 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 7 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco6_2_0_mult_strong. +Qed. Theorem paco6_2_1_mult_strong: forall r_0 r_1, paco6_2_1 gf_0 gf_1 (upaco6_2_0 gf_0 gf_1 r_0 r_1) (upaco6_2_1 gf_0 gf_1 r_0 r_1) <6= paco6_2_1 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 7 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco6_2_1_mult_strong. +Qed. Corollary paco6_2_0_mult: forall r_0 r_1, paco6_2_0 gf_0 gf_1 (paco6_2_0 gf_0 gf_1 r_0 r_1) (paco6_2_1 gf_0 gf_1 r_0 r_1) <6= paco6_2_0 gf_0 gf_1 r_0 r_1. @@ -226,46 +409,50 @@ Proof. intros; eapply paco6_2_1_mult_strong, paco6_2_1_mon; eauto. Qed. Theorem paco6_2_0_fold: forall r_0 r_1, gf_0 (upaco6_2_0 gf_0 gf_1 r_0 r_1) (upaco6_2_1 gf_0 gf_1 r_0 r_1) <6= paco6_2_0 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco6_2_0_fold. +Qed. Theorem paco6_2_1_fold: forall r_0 r_1, gf_1 (upaco6_2_0 gf_0 gf_1 r_0 r_1) (upaco6_2_1 gf_0 gf_1 r_0 r_1) <6= paco6_2_1 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco6_2_1_fold. +Qed. Theorem paco6_2_0_unfold: forall (MON: monotone6_2 gf_0) (MON: monotone6_2 gf_1) r_0 r_1, paco6_2_0 gf_0 gf_1 r_0 r_1 <6= gf_0 (upaco6_2_0 gf_0 gf_1 r_0 r_1) (upaco6_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone6_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco6_2_0_unfold; apply monotone6_2_eq; auto. +Qed. Theorem paco6_2_1_unfold: forall (MON: monotone6_2 gf_0) (MON: monotone6_2 gf_1) r_0 r_1, paco6_2_1 gf_0 gf_1 r_0 r_1 <6= gf_1 (upaco6_2_0 gf_0 gf_1 r_0 r_1) (upaco6_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone6_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco6_2_1_unfold; apply monotone6_2_eq; auto. +Qed. End Arg6_2. -Hint Unfold monotone6_2. -Hint Resolve paco6_2_0_fold. -Hint Resolve paco6_2_1_fold. - -Arguments paco6_2_0_acc [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_2_1_acc [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_2_0_mon [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_2_1_mon [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_2_0_mult_strong [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_2_1_mult_strong [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_2_0_mult [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_2_1_mult [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_2_0_fold [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_2_1_fold [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_2_0_unfold [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_2_1_unfold [ T0 T1 T2 T3 T4 T5 ]. - -Instance paco6_2_0_inst T0 T1 T2 T3 T4 T5 (gf_0 gf_1 : rel6 T0 T1 T2 T3 T4 T5->_) r_0 r_1 x0 x1 x2 x3 x4 x5 : paco_class (paco6_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5) := +Arguments paco6_2_0_acc : clear implicits. +Arguments paco6_2_1_acc : clear implicits. +Arguments paco6_2_0_mon : clear implicits. +Arguments paco6_2_1_mon : clear implicits. +Arguments paco6_2_0_mult_strong : clear implicits. +Arguments paco6_2_1_mult_strong : clear implicits. +Arguments paco6_2_0_mult : clear implicits. +Arguments paco6_2_1_mult : clear implicits. +Arguments paco6_2_0_fold : clear implicits. +Arguments paco6_2_1_fold : clear implicits. +Arguments paco6_2_0_unfold : clear implicits. +Arguments paco6_2_1_unfold : clear implicits. + +Global Instance paco6_2_0_inst (gf_0 gf_1 : rel6 T0 T1 T2 T3 T4 T5->_) r_0 r_1 x0 x1 x2 x3 x4 x5 : paco_class (paco6_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5) := { pacoacc := paco6_2_0_acc gf_0 gf_1; pacomult := paco6_2_0_mult gf_0 gf_1; pacofold := paco6_2_0_fold gf_0 gf_1; pacounfold := paco6_2_0_unfold gf_0 gf_1 }. -Instance paco6_2_1_inst T0 T1 T2 T3 T4 T5 (gf_0 gf_1 : rel6 T0 T1 T2 T3 T4 T5->_) r_0 r_1 x0 x1 x2 x3 x4 x5 : paco_class (paco6_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5) := +Global Instance paco6_2_1_inst (gf_0 gf_1 : rel6 T0 T1 T2 T3 T4 T5->_) r_0 r_1 x0 x1 x2 x3 x4 x5 : paco_class (paco6_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5) := { pacoacc := paco6_2_1_acc gf_0 gf_1; pacomult := paco6_2_1_mult gf_0 gf_1; pacofold := paco6_2_1_fold gf_0 gf_1; @@ -275,64 +462,204 @@ Instance paco6_2_1_inst T0 T1 T2 T3 T4 T5 (gf_0 gf_1 : rel6 T0 T1 T2 T3 T4 T5-> Section Arg6_3. -Definition monotone6_3 T0 T1 T2 T3 T4 T5 (gf: rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5) := +Definition monotone6_3 (gf: rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5) := forall x0 x1 x2 x3 x4 x5 r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2 x0 x1 x2 x3 x4 x5) (LE_0: r_0 <6= r'_0)(LE_1: r_1 <6= r'_1)(LE_2: r_2 <6= r'_2), gf r'_0 r'_1 r'_2 x0 x1 x2 x3 x4 x5. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. +Definition _monotone6_3 (gf: rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <6= r'_0)(LE_1: r_1 <6= r'_1)(LE_2: r_2 <6= r'_2), gf r_0 r_1 r_2 <6== gf r'_0 r'_1 r'_2. + +Lemma monotone6_3_eq (gf: rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5) : + monotone6_3 gf <-> _monotone6_3 gf. +Proof. unfold monotone6_3, _monotone6_3, le6. split; eauto. Qed. + +Lemma monotone6_3_map (gf: rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5) + (MON: _monotone6_3 gf) : + _monotone_3 (fun R0 R1 R2 => uncurry6 (gf (curry6 R0) (curry6 R1) (curry6 R2))). +Proof. + repeat_intros 9. apply uncurry_map6. apply MON; apply curry_map6; auto. +Qed. + Variable gf_0 gf_1 gf_2 : rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5 -> rel6 T0 T1 T2 T3 T4 T5. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. +Theorem _paco6_3_0_mon: _monotone6_3 (paco6_3_0 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map6, _paco_3_0_mon; apply uncurry_map6; auto. +Qed. + +Theorem _paco6_3_1_mon: _monotone6_3 (paco6_3_1 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map6, _paco_3_1_mon; apply uncurry_map6; auto. +Qed. + +Theorem _paco6_3_2_mon: _monotone6_3 (paco6_3_2 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map6, _paco_3_2_mon; apply uncurry_map6; auto. +Qed. + +Theorem _paco6_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <6== rr) (CIH: l <6== rr), l <6== paco6_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <6== paco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_6. + eapply _paco_3_0_acc. intros. + apply uncurry_adjoint1_6 in INC. apply uncurry_adjoint1_6 in CIH. + apply uncurry_adjoint2_6. + eapply le6_trans. eapply (OBG _ INC CIH). + apply curry_map6. + apply _paco_3_0_mon; try apply le1_refl; apply curry_bij1_6. +Qed. + +Theorem _paco6_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <6== rr) (CIH: l <6== rr), l <6== paco6_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <6== paco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_6. + eapply _paco_3_1_acc. intros. + apply uncurry_adjoint1_6 in INC. apply uncurry_adjoint1_6 in CIH. + apply uncurry_adjoint2_6. + eapply le6_trans. eapply (OBG _ INC CIH). + apply curry_map6. + apply _paco_3_1_mon; try apply le1_refl; apply curry_bij1_6. +Qed. + +Theorem _paco6_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <6== rr) (CIH: l <6== rr), l <6== paco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <6== paco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_6. + eapply _paco_3_2_acc. intros. + apply uncurry_adjoint1_6 in INC. apply uncurry_adjoint1_6 in CIH. + apply uncurry_adjoint2_6. + eapply le6_trans. eapply (OBG _ INC CIH). + apply curry_map6. + apply _paco_3_2_mon; try apply le1_refl; apply curry_bij1_6. +Qed. + +Theorem _paco6_3_0_mult_strong: forall r_0 r_1 r_2, + paco6_3_0 gf_0 gf_1 gf_2 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <6== paco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map6. + eapply le1_trans; [| eapply _paco_3_0_mult_strong]. + apply _paco_3_0_mon; intros []; eauto. +Qed. + +Theorem _paco6_3_1_mult_strong: forall r_0 r_1 r_2, + paco6_3_1 gf_0 gf_1 gf_2 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <6== paco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map6. + eapply le1_trans; [| eapply _paco_3_1_mult_strong]. + apply _paco_3_1_mon; intros []; eauto. +Qed. + +Theorem _paco6_3_2_mult_strong: forall r_0 r_1 r_2, + paco6_3_2 gf_0 gf_1 gf_2 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <6== paco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map6. + eapply le1_trans; [| eapply _paco_3_2_mult_strong]. + apply _paco_3_2_mon; intros []; eauto. +Qed. + +Theorem _paco6_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <6== paco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_6. + eapply le1_trans; [| apply _paco_3_0_fold]. apply le1_refl. +Qed. + +Theorem _paco6_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <6== paco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_6. + eapply le1_trans; [| apply _paco_3_1_fold]. apply le1_refl. +Qed. + +Theorem _paco6_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <6== paco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_6. + eapply le1_trans; [| apply _paco_3_2_fold]. apply le1_refl. +Qed. + +Theorem _paco6_3_0_unfold: forall (MON: _monotone6_3 gf_0) (MON: _monotone6_3 gf_1) (MON: _monotone6_3 gf_2) r_0 r_1 r_2, + paco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <6== gf_0 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_6. + eapply _paco_3_0_unfold; apply monotone6_3_map; auto. +Qed. + +Theorem _paco6_3_1_unfold: forall (MON: _monotone6_3 gf_0) (MON: _monotone6_3 gf_1) (MON: _monotone6_3 gf_2) r_0 r_1 r_2, + paco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <6== gf_1 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_6. + eapply _paco_3_1_unfold; apply monotone6_3_map; auto. +Qed. + +Theorem _paco6_3_2_unfold: forall (MON: _monotone6_3 gf_0) (MON: _monotone6_3 gf_1) (MON: _monotone6_3 gf_2) r_0 r_1 r_2, + paco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <6== gf_2 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_6. + eapply _paco_3_2_unfold; apply monotone6_3_map; auto. +Qed. + Theorem paco6_3_0_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <6= rr) (CIH: l <_paco_6= rr), l <_paco_6= paco6_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <6= rr) (CIH: l <6= rr), l <6= paco6_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), l <6= paco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco6_3_0 gf_0 gf_1 gf_2 (r_0 \6/ l) r_1 r_2 x0 x1 x2 x3 x4 x5) by eauto. - clear PR; repeat (try left; do 7 paco_revert; paco_cofix_auto). + apply _paco6_3_0_acc. Qed. Theorem paco6_3_1_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <6= rr) (CIH: l <_paco_6= rr), l <_paco_6= paco6_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <6= rr) (CIH: l <6= rr), l <6= paco6_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), l <6= paco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco6_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \6/ l) r_2 x0 x1 x2 x3 x4 x5) by eauto. - clear PR; repeat (try left; do 7 paco_revert; paco_cofix_auto). + apply _paco6_3_1_acc. Qed. Theorem paco6_3_2_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <6= rr) (CIH: l <_paco_6= rr), l <_paco_6= paco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <6= rr) (CIH: l <6= rr), l <6= paco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), l <6= paco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \6/ l) x0 x1 x2 x3 x4 x5) by eauto. - clear PR; repeat (try left; do 7 paco_revert; paco_cofix_auto). + apply _paco6_3_2_acc. Qed. Theorem paco6_3_0_mon: monotone6_3 (paco6_3_0 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 7 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone6_3_eq. + apply _paco6_3_0_mon. +Qed. Theorem paco6_3_1_mon: monotone6_3 (paco6_3_1 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 7 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone6_3_eq. + apply _paco6_3_1_mon. +Qed. Theorem paco6_3_2_mon: monotone6_3 (paco6_3_2 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 7 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone6_3_eq. + apply _paco6_3_2_mon. +Qed. Theorem paco6_3_0_mult_strong: forall r_0 r_1 r_2, paco6_3_0 gf_0 gf_1 gf_2 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <6= paco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 7 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco6_3_0_mult_strong. +Qed. Theorem paco6_3_1_mult_strong: forall r_0 r_1 r_2, paco6_3_1 gf_0 gf_1 gf_2 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <6= paco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 7 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco6_3_1_mult_strong. +Qed. Theorem paco6_3_2_mult_strong: forall r_0 r_1 r_2, paco6_3_2 gf_0 gf_1 gf_2 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <6= paco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 7 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco6_3_2_mult_strong. +Qed. Corollary paco6_3_0_mult: forall r_0 r_1 r_2, paco6_3_0 gf_0 gf_1 gf_2 (paco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <6= paco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. @@ -348,69 +675,105 @@ Proof. intros; eapply paco6_3_2_mult_strong, paco6_3_2_mon; eauto. Qed. Theorem paco6_3_0_fold: forall r_0 r_1 r_2, gf_0 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <6= paco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco6_3_0_fold. +Qed. Theorem paco6_3_1_fold: forall r_0 r_1 r_2, gf_1 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <6= paco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco6_3_1_fold. +Qed. Theorem paco6_3_2_fold: forall r_0 r_1 r_2, gf_2 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <6= paco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco6_3_2_fold. +Qed. Theorem paco6_3_0_unfold: forall (MON: monotone6_3 gf_0) (MON: monotone6_3 gf_1) (MON: monotone6_3 gf_2) r_0 r_1 r_2, paco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <6= gf_0 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone6_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco6_3_0_unfold; apply monotone6_3_eq; auto. +Qed. Theorem paco6_3_1_unfold: forall (MON: monotone6_3 gf_0) (MON: monotone6_3 gf_1) (MON: monotone6_3 gf_2) r_0 r_1 r_2, paco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <6= gf_1 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone6_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco6_3_1_unfold; apply monotone6_3_eq; auto. +Qed. Theorem paco6_3_2_unfold: forall (MON: monotone6_3 gf_0) (MON: monotone6_3 gf_1) (MON: monotone6_3 gf_2) r_0 r_1 r_2, paco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <6= gf_2 (upaco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone6_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco6_3_2_unfold; apply monotone6_3_eq; auto. +Qed. End Arg6_3. -Hint Unfold monotone6_3. -Hint Resolve paco6_3_0_fold. -Hint Resolve paco6_3_1_fold. -Hint Resolve paco6_3_2_fold. - -Arguments paco6_3_0_acc [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_1_acc [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_2_acc [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_0_mon [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_1_mon [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_2_mon [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_0_mult_strong [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_1_mult_strong [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_2_mult_strong [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_0_mult [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_1_mult [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_2_mult [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_0_fold [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_1_fold [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_2_fold [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_0_unfold [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_1_unfold [ T0 T1 T2 T3 T4 T5 ]. -Arguments paco6_3_2_unfold [ T0 T1 T2 T3 T4 T5 ]. - -Instance paco6_3_0_inst T0 T1 T2 T3 T4 T5 (gf_0 gf_1 gf_2 : rel6 T0 T1 T2 T3 T4 T5->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 : paco_class (paco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5) := +Arguments paco6_3_0_acc : clear implicits. +Arguments paco6_3_1_acc : clear implicits. +Arguments paco6_3_2_acc : clear implicits. +Arguments paco6_3_0_mon : clear implicits. +Arguments paco6_3_1_mon : clear implicits. +Arguments paco6_3_2_mon : clear implicits. +Arguments paco6_3_0_mult_strong : clear implicits. +Arguments paco6_3_1_mult_strong : clear implicits. +Arguments paco6_3_2_mult_strong : clear implicits. +Arguments paco6_3_0_mult : clear implicits. +Arguments paco6_3_1_mult : clear implicits. +Arguments paco6_3_2_mult : clear implicits. +Arguments paco6_3_0_fold : clear implicits. +Arguments paco6_3_1_fold : clear implicits. +Arguments paco6_3_2_fold : clear implicits. +Arguments paco6_3_0_unfold : clear implicits. +Arguments paco6_3_1_unfold : clear implicits. +Arguments paco6_3_2_unfold : clear implicits. + +Global Instance paco6_3_0_inst (gf_0 gf_1 gf_2 : rel6 T0 T1 T2 T3 T4 T5->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 : paco_class (paco6_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5) := { pacoacc := paco6_3_0_acc gf_0 gf_1 gf_2; pacomult := paco6_3_0_mult gf_0 gf_1 gf_2; pacofold := paco6_3_0_fold gf_0 gf_1 gf_2; pacounfold := paco6_3_0_unfold gf_0 gf_1 gf_2 }. -Instance paco6_3_1_inst T0 T1 T2 T3 T4 T5 (gf_0 gf_1 gf_2 : rel6 T0 T1 T2 T3 T4 T5->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 : paco_class (paco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5) := +Global Instance paco6_3_1_inst (gf_0 gf_1 gf_2 : rel6 T0 T1 T2 T3 T4 T5->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 : paco_class (paco6_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5) := { pacoacc := paco6_3_1_acc gf_0 gf_1 gf_2; pacomult := paco6_3_1_mult gf_0 gf_1 gf_2; pacofold := paco6_3_1_fold gf_0 gf_1 gf_2; pacounfold := paco6_3_1_unfold gf_0 gf_1 gf_2 }. -Instance paco6_3_2_inst T0 T1 T2 T3 T4 T5 (gf_0 gf_1 gf_2 : rel6 T0 T1 T2 T3 T4 T5->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 : paco_class (paco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5) := +Global Instance paco6_3_2_inst (gf_0 gf_1 gf_2 : rel6 T0 T1 T2 T3 T4 T5->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 : paco_class (paco6_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5) := { pacoacc := paco6_3_2_acc gf_0 gf_1 gf_2; pacomult := paco6_3_2_mult gf_0 gf_1 gf_2; pacofold := paco6_3_2_fold gf_0 gf_1 gf_2; pacounfold := paco6_3_2_unfold gf_0 gf_1 gf_2 }. +End PACO6. + +Global Opaque paco6. + +Hint Unfold upaco6. +Hint Resolve paco6_fold. +Hint Unfold monotone6. + +Global Opaque paco6_2_0. +Global Opaque paco6_2_1. + +Hint Unfold upaco6_2_0. +Hint Unfold upaco6_2_1. +Hint Resolve paco6_2_0_fold. +Hint Resolve paco6_2_1_fold. +Hint Unfold monotone6_2. + +Global Opaque paco6_3_0. +Global Opaque paco6_3_1. +Global Opaque paco6_3_2. + +Hint Unfold upaco6_3_0. +Hint Unfold upaco6_3_1. +Hint Unfold upaco6_3_2. +Hint Resolve paco6_3_0_fold. +Hint Resolve paco6_3_1_fold. +Hint Resolve paco6_3_2_fold. +Hint Unfold monotone6_3. + diff --git a/src/paco7.v b/src/paco7.v index 1f9d3c4..cc24550 100644 --- a/src/paco7.v +++ b/src/paco7.v @@ -1,11 +1,9 @@ Require Export paconotation pacotacuser. -Require Import pacotac. +Require Import paconotation_internal pacotac pacon. Set Implicit Arguments. -(** ** Predicates of Arity 7 -*) +Section PACO7. -Section Arg7_def. Variable T0 : Type. Variable T1 : forall (x0: @T0), Type. Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. @@ -13,135 +11,221 @@ Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. + +Record sig7T := + exist7T { + proj7T0: @T0; + proj7T1: @T1 proj7T0; + proj7T2: @T2 proj7T0 proj7T1; + proj7T3: @T3 proj7T0 proj7T1 proj7T2; + proj7T4: @T4 proj7T0 proj7T1 proj7T2 proj7T3; + proj7T5: @T5 proj7T0 proj7T1 proj7T2 proj7T3 proj7T4; + proj7T6: @T6 proj7T0 proj7T1 proj7T2 proj7T3 proj7T4 proj7T5; + }. + +Definition uncurry7 (R: rel7 T0 T1 T2 T3 T4 T5 T6): rel1 sig7T := fun x => R (proj7T0 x) (proj7T1 x) (proj7T2 x) (proj7T3 x) (proj7T4 x) (proj7T5 x) (proj7T6 x). + +Definition curry7 (R: rel1 sig7T): rel7 T0 T1 T2 T3 T4 T5 T6 := + fun x0 x1 x2 x3 x4 x5 x6 => R (exist7T x6). + +Lemma uncurry_map7 r0 r1 (LE : r0 <7== r1) : uncurry7 r0 <1== uncurry7 r1. +Proof. intros [] H. apply LE. auto. Qed. + +Lemma uncurry_map_rev7 r0 r1 (LE: uncurry7 r0 <1== uncurry7 r1) : r0 <7== r1. +Proof. + repeat_intros 7. intros H. apply (LE (exist7T x6) H). +Qed. + +Lemma curry_map7 r0 r1 (LE: r0 <1== r1) : curry7 r0 <7== curry7 r1. +Proof. + repeat_intros 7. intros H. apply (LE (exist7T x6) H). +Qed. + +Lemma curry_map_rev7 r0 r1 (LE: curry7 r0 <7== curry7 r1) : r0 <1== r1. +Proof. + intros [] H. apply LE. apply H. +Qed. + +Lemma uncurry_bij1_7 r : curry7 (uncurry7 r) <7== r. +Proof. unfold le7. repeat_intros 7; auto. Qed. + +Lemma uncurry_bij2_7 r : r <7== curry7 (uncurry7 r). +Proof. unfold le7. repeat_intros 7; auto. Qed. + +Lemma curry_bij1_7 r : uncurry7 (curry7 r) <1== r. +Proof. intros []; auto. Qed. + +Lemma curry_bij2_7 r : r <1== uncurry7 (curry7 r). +Proof. intros []; auto. Qed. + +Lemma uncurry_adjoint1_7 r0 r1 (LE: uncurry7 r0 <1== r1) : r0 <7== curry7 r1. +Proof. + apply uncurry_map_rev7. eapply le1_trans; [eauto|]. apply curry_bij2_7. +Qed. + +Lemma uncurry_adjoint2_7 r0 r1 (LE: r0 <7== curry7 r1) : uncurry7 r0 <1== r1. +Proof. + apply curry_map_rev7. eapply le7_trans; [|eauto]. apply uncurry_bij2_7. +Qed. + +Lemma curry_adjoint1_7 r0 r1 (LE: curry7 r0 <7== r1) : r0 <1== uncurry7 r1. +Proof. + apply curry_map_rev7. eapply le7_trans; [eauto|]. apply uncurry_bij2_7. +Qed. + +Lemma curry_adjoint2_7 r0 r1 (LE: r0 <1== uncurry7 r1) : curry7 r0 <7== r1. +Proof. + apply uncurry_map_rev7. eapply le1_trans; [|eauto]. apply curry_bij1_7. +Qed. + +(** ** Predicates of Arity 7 +*) + +Section Arg7_def. Variable gf : rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6. Arguments gf : clear implicits. -CoInductive paco7( r: rel7 T0 T1 T2 T3 T4 T5 T6) x0 x1 x2 x3 x4 x5 x6 : Prop := -| paco7_pfold pco - (LE : pco <7= (paco7 r \7/ r)) - (SIM: gf pco x0 x1 x2 x3 x4 x5 x6) -. +Definition paco7( r: rel7 T0 T1 T2 T3 T4 T5 T6) : rel7 T0 T1 T2 T3 T4 T5 T6 := + curry7 (paco (fun R0 => uncurry7 (gf (curry7 R0))) (uncurry7 r)). + Definition upaco7( r: rel7 T0 T1 T2 T3 T4 T5 T6) := paco7 r \7/ r. End Arg7_def. -Arguments paco7 [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments upaco7 [ T0 T1 T2 T3 T4 T5 T6 ]. +Arguments paco7 : clear implicits. +Arguments upaco7 : clear implicits. Hint Unfold upaco7. Section Arg7_2_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. Variable gf_0 gf_1 : rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. -CoInductive paco7_2_0( r_0 r_1: rel7 T0 T1 T2 T3 T4 T5 T6) x0 x1 x2 x3 x4 x5 x6 : Prop := -| paco7_2_0_pfold pco_0 pco_1 - (LE : pco_0 <7= (paco7_2_0 r_0 r_1 \7/ r_0)) - (LE : pco_1 <7= (paco7_2_1 r_0 r_1 \7/ r_1)) - (SIM: gf_0 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6) -with paco7_2_1( r_0 r_1: rel7 T0 T1 T2 T3 T4 T5 T6) x0 x1 x2 x3 x4 x5 x6 : Prop := -| paco7_2_1_pfold pco_0 pco_1 - (LE : pco_0 <7= (paco7_2_0 r_0 r_1 \7/ r_0)) - (LE : pco_1 <7= (paco7_2_1 r_0 r_1 \7/ r_1)) - (SIM: gf_1 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6) -. +Definition paco7_2_0( r_0 r_1: rel7 T0 T1 T2 T3 T4 T5 T6) : rel7 T0 T1 T2 T3 T4 T5 T6 := + curry7 (paco_2_0 (fun R0 R1 => uncurry7 (gf_0 (curry7 R0) (curry7 R1))) (fun R0 R1 => uncurry7 (gf_1 (curry7 R0) (curry7 R1))) (uncurry7 r_0) (uncurry7 r_1)). + +Definition paco7_2_1( r_0 r_1: rel7 T0 T1 T2 T3 T4 T5 T6) : rel7 T0 T1 T2 T3 T4 T5 T6 := + curry7 (paco_2_1 (fun R0 R1 => uncurry7 (gf_0 (curry7 R0) (curry7 R1))) (fun R0 R1 => uncurry7 (gf_1 (curry7 R0) (curry7 R1))) (uncurry7 r_0) (uncurry7 r_1)). + Definition upaco7_2_0( r_0 r_1: rel7 T0 T1 T2 T3 T4 T5 T6) := paco7_2_0 r_0 r_1 \7/ r_0. Definition upaco7_2_1( r_0 r_1: rel7 T0 T1 T2 T3 T4 T5 T6) := paco7_2_1 r_0 r_1 \7/ r_1. End Arg7_2_def. -Arguments paco7_2_0 [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments upaco7_2_0 [ T0 T1 T2 T3 T4 T5 T6 ]. +Arguments paco7_2_0 : clear implicits. +Arguments upaco7_2_0 : clear implicits. Hint Unfold upaco7_2_0. -Arguments paco7_2_1 [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments upaco7_2_1 [ T0 T1 T2 T3 T4 T5 T6 ]. +Arguments paco7_2_1 : clear implicits. +Arguments upaco7_2_1 : clear implicits. Hint Unfold upaco7_2_1. Section Arg7_3_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. Variable gf_0 gf_1 gf_2 : rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. -CoInductive paco7_3_0( r_0 r_1 r_2: rel7 T0 T1 T2 T3 T4 T5 T6) x0 x1 x2 x3 x4 x5 x6 : Prop := -| paco7_3_0_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <7= (paco7_3_0 r_0 r_1 r_2 \7/ r_0)) - (LE : pco_1 <7= (paco7_3_1 r_0 r_1 r_2 \7/ r_1)) - (LE : pco_2 <7= (paco7_3_2 r_0 r_1 r_2 \7/ r_2)) - (SIM: gf_0 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6) -with paco7_3_1( r_0 r_1 r_2: rel7 T0 T1 T2 T3 T4 T5 T6) x0 x1 x2 x3 x4 x5 x6 : Prop := -| paco7_3_1_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <7= (paco7_3_0 r_0 r_1 r_2 \7/ r_0)) - (LE : pco_1 <7= (paco7_3_1 r_0 r_1 r_2 \7/ r_1)) - (LE : pco_2 <7= (paco7_3_2 r_0 r_1 r_2 \7/ r_2)) - (SIM: gf_1 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6) -with paco7_3_2( r_0 r_1 r_2: rel7 T0 T1 T2 T3 T4 T5 T6) x0 x1 x2 x3 x4 x5 x6 : Prop := -| paco7_3_2_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <7= (paco7_3_0 r_0 r_1 r_2 \7/ r_0)) - (LE : pco_1 <7= (paco7_3_1 r_0 r_1 r_2 \7/ r_1)) - (LE : pco_2 <7= (paco7_3_2 r_0 r_1 r_2 \7/ r_2)) - (SIM: gf_2 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6) -. +Definition paco7_3_0( r_0 r_1 r_2: rel7 T0 T1 T2 T3 T4 T5 T6) : rel7 T0 T1 T2 T3 T4 T5 T6 := + curry7 (paco_3_0 (fun R0 R1 R2 => uncurry7 (gf_0 (curry7 R0) (curry7 R1) (curry7 R2))) (fun R0 R1 R2 => uncurry7 (gf_1 (curry7 R0) (curry7 R1) (curry7 R2))) (fun R0 R1 R2 => uncurry7 (gf_2 (curry7 R0) (curry7 R1) (curry7 R2))) (uncurry7 r_0) (uncurry7 r_1) (uncurry7 r_2)). + +Definition paco7_3_1( r_0 r_1 r_2: rel7 T0 T1 T2 T3 T4 T5 T6) : rel7 T0 T1 T2 T3 T4 T5 T6 := + curry7 (paco_3_1 (fun R0 R1 R2 => uncurry7 (gf_0 (curry7 R0) (curry7 R1) (curry7 R2))) (fun R0 R1 R2 => uncurry7 (gf_1 (curry7 R0) (curry7 R1) (curry7 R2))) (fun R0 R1 R2 => uncurry7 (gf_2 (curry7 R0) (curry7 R1) (curry7 R2))) (uncurry7 r_0) (uncurry7 r_1) (uncurry7 r_2)). + +Definition paco7_3_2( r_0 r_1 r_2: rel7 T0 T1 T2 T3 T4 T5 T6) : rel7 T0 T1 T2 T3 T4 T5 T6 := + curry7 (paco_3_2 (fun R0 R1 R2 => uncurry7 (gf_0 (curry7 R0) (curry7 R1) (curry7 R2))) (fun R0 R1 R2 => uncurry7 (gf_1 (curry7 R0) (curry7 R1) (curry7 R2))) (fun R0 R1 R2 => uncurry7 (gf_2 (curry7 R0) (curry7 R1) (curry7 R2))) (uncurry7 r_0) (uncurry7 r_1) (uncurry7 r_2)). + Definition upaco7_3_0( r_0 r_1 r_2: rel7 T0 T1 T2 T3 T4 T5 T6) := paco7_3_0 r_0 r_1 r_2 \7/ r_0. Definition upaco7_3_1( r_0 r_1 r_2: rel7 T0 T1 T2 T3 T4 T5 T6) := paco7_3_1 r_0 r_1 r_2 \7/ r_1. Definition upaco7_3_2( r_0 r_1 r_2: rel7 T0 T1 T2 T3 T4 T5 T6) := paco7_3_2 r_0 r_1 r_2 \7/ r_2. End Arg7_3_def. -Arguments paco7_3_0 [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments upaco7_3_0 [ T0 T1 T2 T3 T4 T5 T6 ]. +Arguments paco7_3_0 : clear implicits. +Arguments upaco7_3_0 : clear implicits. Hint Unfold upaco7_3_0. -Arguments paco7_3_1 [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments upaco7_3_1 [ T0 T1 T2 T3 T4 T5 T6 ]. +Arguments paco7_3_1 : clear implicits. +Arguments upaco7_3_1 : clear implicits. Hint Unfold upaco7_3_1. -Arguments paco7_3_2 [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments upaco7_3_2 [ T0 T1 T2 T3 T4 T5 T6 ]. +Arguments paco7_3_2 : clear implicits. +Arguments upaco7_3_2 : clear implicits. Hint Unfold upaco7_3_2. -(* Less than or equal - internal use only *) -Notation "p <_paco_7= q" := - (forall _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 (PR: p _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 : Prop), q _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 : Prop) - (at level 50, no associativity). - (** 1 Mutual Coinduction *) Section Arg7_1. -Definition monotone7 T0 T1 T2 T3 T4 T5 T6 (gf: rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6) := +Definition monotone7 (gf: rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6) := forall x0 x1 x2 x3 x4 x5 x6 r r' (IN: gf r x0 x1 x2 x3 x4 x5 x6) (LE: r <7= r'), gf r' x0 x1 x2 x3 x4 x5 x6. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. +Definition _monotone7 (gf: rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6) := + forall r r'(LE: r <7= r'), gf r <7== gf r'. + +Lemma monotone7_eq (gf: rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6) : + monotone7 gf <-> _monotone7 gf. +Proof. unfold monotone7, _monotone7, le7. split; eauto. Qed. + +Lemma monotone7_map (gf: rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6) + (MON: _monotone7 gf) : + _monotone (fun R0 => uncurry7 (gf (curry7 R0))). +Proof. + repeat_intros 3. apply uncurry_map7. apply MON; apply curry_map7; auto. +Qed. + Variable gf : rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6. Arguments gf : clear implicits. +Theorem _paco7_mon: _monotone7 (paco7 gf). +Proof. + repeat_intros 3. eapply curry_map7, _paco_mon; apply uncurry_map7; auto. +Qed. + +Theorem _paco7_acc: forall + l r (OBG: forall rr (INC: r <7== rr) (CIH: l <7== rr), l <7== paco7 gf rr), + l <7== paco7 gf r. +Proof. + intros. apply uncurry_adjoint1_7. + eapply _paco_acc. intros. + apply uncurry_adjoint1_7 in INC. apply uncurry_adjoint1_7 in CIH. + apply uncurry_adjoint2_7. + eapply le7_trans. eapply (OBG _ INC CIH). + apply curry_map7. + apply _paco_mon; try apply le1_refl; apply curry_bij1_7. +Qed. + +Theorem _paco7_mult_strong: forall r, + paco7 gf (upaco7 gf r) <7== paco7 gf r. +Proof. + intros. apply curry_map7. + eapply le1_trans; [| eapply _paco_mult_strong]. + apply _paco_mon; intros []; eauto. +Qed. + +Theorem _paco7_fold: forall r, + gf (upaco7 gf r) <7== paco7 gf r. +Proof. + intros. apply uncurry_adjoint1_7. + eapply le1_trans; [| apply _paco_fold]. apply le1_refl. +Qed. + +Theorem _paco7_unfold: forall (MON: _monotone7 gf) r, + paco7 gf r <7== gf (upaco7 gf r). +Proof. + intros. apply curry_adjoint2_7. + eapply _paco_unfold; apply monotone7_map; auto. +Qed. + Theorem paco7_acc: forall - l r (OBG: forall rr (INC: r <7= rr) (CIH: l <_paco_7= rr), l <_paco_7= paco7 gf rr), + l r (OBG: forall rr (INC: r <7= rr) (CIH: l <7= rr), l <7= paco7 gf rr), l <7= paco7 gf r. Proof. - intros; assert (SIM: paco7 gf (r \7/ l) x0 x1 x2 x3 x4 x5 x6) by eauto. - clear PR; repeat (try left; do 8 paco_revert; paco_cofix_auto). + apply _paco7_acc. Qed. Theorem paco7_mon: monotone7 (paco7 gf). -Proof. paco_cofix_auto; repeat (left; do 8 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone7_eq. + apply _paco7_mon. +Qed. Theorem paco7_mult_strong: forall r, paco7 gf (upaco7 gf r) <7= paco7 gf r. -Proof. paco_cofix_auto; repeat (left; do 8 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco7_mult_strong. +Qed. Corollary paco7_mult: forall r, paco7 gf (paco7 gf r) <7= paco7 gf r. @@ -149,25 +233,26 @@ Proof. intros; eapply paco7_mult_strong, paco7_mon; eauto. Qed. Theorem paco7_fold: forall r, gf (upaco7 gf r) <7= paco7 gf r. -Proof. intros; econstructor; [ |eauto]; eauto. Qed. +Proof. + apply _paco7_fold. +Qed. Theorem paco7_unfold: forall (MON: monotone7 gf) r, paco7 gf r <7= gf (upaco7 gf r). -Proof. unfold monotone7; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 1. eapply _paco7_unfold; apply monotone7_eq; auto. +Qed. End Arg7_1. -Hint Unfold monotone7. -Hint Resolve paco7_fold. +Arguments paco7_acc : clear implicits. +Arguments paco7_mon : clear implicits. +Arguments paco7_mult_strong : clear implicits. +Arguments paco7_mult : clear implicits. +Arguments paco7_fold : clear implicits. +Arguments paco7_unfold : clear implicits. -Arguments paco7_acc [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_mon [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_mult_strong [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_mult [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_fold [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_unfold [ T0 T1 T2 T3 T4 T5 T6 ]. - -Instance paco7_inst T0 T1 T2 T3 T4 T5 T6 (gf : rel7 T0 T1 T2 T3 T4 T5 T6->_) r x0 x1 x2 x3 x4 x5 x6 : paco_class (paco7 gf r x0 x1 x2 x3 x4 x5 x6) := +Global Instance paco7_inst (gf : rel7 T0 T1 T2 T3 T4 T5 T6->_) r x0 x1 x2 x3 x4 x5 x6 : paco_class (paco7 gf r x0 x1 x2 x3 x4 x5 x6) := { pacoacc := paco7_acc gf; pacomult := paco7_mult gf; pacofold := paco7_fold gf; @@ -177,49 +262,144 @@ Instance paco7_inst T0 T1 T2 T3 T4 T5 T6 (gf : rel7 T0 T1 T2 T3 T4 T5 T6->_) r Section Arg7_2. -Definition monotone7_2 T0 T1 T2 T3 T4 T5 T6 (gf: rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6) := +Definition monotone7_2 (gf: rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6) := forall x0 x1 x2 x3 x4 x5 x6 r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1 x0 x1 x2 x3 x4 x5 x6) (LE_0: r_0 <7= r'_0)(LE_1: r_1 <7= r'_1), gf r'_0 r'_1 x0 x1 x2 x3 x4 x5 x6. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. +Definition _monotone7_2 (gf: rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <7= r'_0)(LE_1: r_1 <7= r'_1), gf r_0 r_1 <7== gf r'_0 r'_1. + +Lemma monotone7_2_eq (gf: rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6) : + monotone7_2 gf <-> _monotone7_2 gf. +Proof. unfold monotone7_2, _monotone7_2, le7. split; eauto. Qed. + +Lemma monotone7_2_map (gf: rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6) + (MON: _monotone7_2 gf) : + _monotone_2 (fun R0 R1 => uncurry7 (gf (curry7 R0) (curry7 R1))). +Proof. + repeat_intros 6. apply uncurry_map7. apply MON; apply curry_map7; auto. +Qed. + Variable gf_0 gf_1 : rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. +Theorem _paco7_2_0_mon: _monotone7_2 (paco7_2_0 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map7, _paco_2_0_mon; apply uncurry_map7; auto. +Qed. + +Theorem _paco7_2_1_mon: _monotone7_2 (paco7_2_1 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map7, _paco_2_1_mon; apply uncurry_map7; auto. +Qed. + +Theorem _paco7_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <7== rr) (CIH: l <7== rr), l <7== paco7_2_0 gf_0 gf_1 rr r_1), + l <7== paco7_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_7. + eapply _paco_2_0_acc. intros. + apply uncurry_adjoint1_7 in INC. apply uncurry_adjoint1_7 in CIH. + apply uncurry_adjoint2_7. + eapply le7_trans. eapply (OBG _ INC CIH). + apply curry_map7. + apply _paco_2_0_mon; try apply le1_refl; apply curry_bij1_7. +Qed. + +Theorem _paco7_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <7== rr) (CIH: l <7== rr), l <7== paco7_2_1 gf_0 gf_1 r_0 rr), + l <7== paco7_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_7. + eapply _paco_2_1_acc. intros. + apply uncurry_adjoint1_7 in INC. apply uncurry_adjoint1_7 in CIH. + apply uncurry_adjoint2_7. + eapply le7_trans. eapply (OBG _ INC CIH). + apply curry_map7. + apply _paco_2_1_mon; try apply le1_refl; apply curry_bij1_7. +Qed. + +Theorem _paco7_2_0_mult_strong: forall r_0 r_1, + paco7_2_0 gf_0 gf_1 (upaco7_2_0 gf_0 gf_1 r_0 r_1) (upaco7_2_1 gf_0 gf_1 r_0 r_1) <7== paco7_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map7. + eapply le1_trans; [| eapply _paco_2_0_mult_strong]. + apply _paco_2_0_mon; intros []; eauto. +Qed. + +Theorem _paco7_2_1_mult_strong: forall r_0 r_1, + paco7_2_1 gf_0 gf_1 (upaco7_2_0 gf_0 gf_1 r_0 r_1) (upaco7_2_1 gf_0 gf_1 r_0 r_1) <7== paco7_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map7. + eapply le1_trans; [| eapply _paco_2_1_mult_strong]. + apply _paco_2_1_mon; intros []; eauto. +Qed. + +Theorem _paco7_2_0_fold: forall r_0 r_1, + gf_0 (upaco7_2_0 gf_0 gf_1 r_0 r_1) (upaco7_2_1 gf_0 gf_1 r_0 r_1) <7== paco7_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_7. + eapply le1_trans; [| apply _paco_2_0_fold]. apply le1_refl. +Qed. + +Theorem _paco7_2_1_fold: forall r_0 r_1, + gf_1 (upaco7_2_0 gf_0 gf_1 r_0 r_1) (upaco7_2_1 gf_0 gf_1 r_0 r_1) <7== paco7_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_7. + eapply le1_trans; [| apply _paco_2_1_fold]. apply le1_refl. +Qed. + +Theorem _paco7_2_0_unfold: forall (MON: _monotone7_2 gf_0) (MON: _monotone7_2 gf_1) r_0 r_1, + paco7_2_0 gf_0 gf_1 r_0 r_1 <7== gf_0 (upaco7_2_0 gf_0 gf_1 r_0 r_1) (upaco7_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_7. + eapply _paco_2_0_unfold; apply monotone7_2_map; auto. +Qed. + +Theorem _paco7_2_1_unfold: forall (MON: _monotone7_2 gf_0) (MON: _monotone7_2 gf_1) r_0 r_1, + paco7_2_1 gf_0 gf_1 r_0 r_1 <7== gf_1 (upaco7_2_0 gf_0 gf_1 r_0 r_1) (upaco7_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_7. + eapply _paco_2_1_unfold; apply monotone7_2_map; auto. +Qed. + Theorem paco7_2_0_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_0 <7= rr) (CIH: l <_paco_7= rr), l <_paco_7= paco7_2_0 gf_0 gf_1 rr r_1), + l r_0 r_1 (OBG: forall rr (INC: r_0 <7= rr) (CIH: l <7= rr), l <7= paco7_2_0 gf_0 gf_1 rr r_1), l <7= paco7_2_0 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco7_2_0 gf_0 gf_1 (r_0 \7/ l) r_1 x0 x1 x2 x3 x4 x5 x6) by eauto. - clear PR; repeat (try left; do 8 paco_revert; paco_cofix_auto). + apply _paco7_2_0_acc. Qed. Theorem paco7_2_1_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_1 <7= rr) (CIH: l <_paco_7= rr), l <_paco_7= paco7_2_1 gf_0 gf_1 r_0 rr), + l r_0 r_1 (OBG: forall rr (INC: r_1 <7= rr) (CIH: l <7= rr), l <7= paco7_2_1 gf_0 gf_1 r_0 rr), l <7= paco7_2_1 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco7_2_1 gf_0 gf_1 r_0 (r_1 \7/ l) x0 x1 x2 x3 x4 x5 x6) by eauto. - clear PR; repeat (try left; do 8 paco_revert; paco_cofix_auto). + apply _paco7_2_1_acc. Qed. Theorem paco7_2_0_mon: monotone7_2 (paco7_2_0 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 8 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone7_2_eq. + apply _paco7_2_0_mon. +Qed. Theorem paco7_2_1_mon: monotone7_2 (paco7_2_1 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 8 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone7_2_eq. + apply _paco7_2_1_mon. +Qed. Theorem paco7_2_0_mult_strong: forall r_0 r_1, paco7_2_0 gf_0 gf_1 (upaco7_2_0 gf_0 gf_1 r_0 r_1) (upaco7_2_1 gf_0 gf_1 r_0 r_1) <7= paco7_2_0 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 8 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco7_2_0_mult_strong. +Qed. Theorem paco7_2_1_mult_strong: forall r_0 r_1, paco7_2_1 gf_0 gf_1 (upaco7_2_0 gf_0 gf_1 r_0 r_1) (upaco7_2_1 gf_0 gf_1 r_0 r_1) <7= paco7_2_1 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 8 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco7_2_1_mult_strong. +Qed. Corollary paco7_2_0_mult: forall r_0 r_1, paco7_2_0 gf_0 gf_1 (paco7_2_0 gf_0 gf_1 r_0 r_1) (paco7_2_1 gf_0 gf_1 r_0 r_1) <7= paco7_2_0 gf_0 gf_1 r_0 r_1. @@ -231,46 +411,50 @@ Proof. intros; eapply paco7_2_1_mult_strong, paco7_2_1_mon; eauto. Qed. Theorem paco7_2_0_fold: forall r_0 r_1, gf_0 (upaco7_2_0 gf_0 gf_1 r_0 r_1) (upaco7_2_1 gf_0 gf_1 r_0 r_1) <7= paco7_2_0 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco7_2_0_fold. +Qed. Theorem paco7_2_1_fold: forall r_0 r_1, gf_1 (upaco7_2_0 gf_0 gf_1 r_0 r_1) (upaco7_2_1 gf_0 gf_1 r_0 r_1) <7= paco7_2_1 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco7_2_1_fold. +Qed. Theorem paco7_2_0_unfold: forall (MON: monotone7_2 gf_0) (MON: monotone7_2 gf_1) r_0 r_1, paco7_2_0 gf_0 gf_1 r_0 r_1 <7= gf_0 (upaco7_2_0 gf_0 gf_1 r_0 r_1) (upaco7_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone7_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco7_2_0_unfold; apply monotone7_2_eq; auto. +Qed. Theorem paco7_2_1_unfold: forall (MON: monotone7_2 gf_0) (MON: monotone7_2 gf_1) r_0 r_1, paco7_2_1 gf_0 gf_1 r_0 r_1 <7= gf_1 (upaco7_2_0 gf_0 gf_1 r_0 r_1) (upaco7_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone7_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco7_2_1_unfold; apply monotone7_2_eq; auto. +Qed. End Arg7_2. -Hint Unfold monotone7_2. -Hint Resolve paco7_2_0_fold. -Hint Resolve paco7_2_1_fold. - -Arguments paco7_2_0_acc [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_2_1_acc [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_2_0_mon [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_2_1_mon [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_2_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_2_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_2_0_mult [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_2_1_mult [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_2_0_fold [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_2_1_fold [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_2_0_unfold [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_2_1_unfold [ T0 T1 T2 T3 T4 T5 T6 ]. - -Instance paco7_2_0_inst T0 T1 T2 T3 T4 T5 T6 (gf_0 gf_1 : rel7 T0 T1 T2 T3 T4 T5 T6->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 : paco_class (paco7_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6) := +Arguments paco7_2_0_acc : clear implicits. +Arguments paco7_2_1_acc : clear implicits. +Arguments paco7_2_0_mon : clear implicits. +Arguments paco7_2_1_mon : clear implicits. +Arguments paco7_2_0_mult_strong : clear implicits. +Arguments paco7_2_1_mult_strong : clear implicits. +Arguments paco7_2_0_mult : clear implicits. +Arguments paco7_2_1_mult : clear implicits. +Arguments paco7_2_0_fold : clear implicits. +Arguments paco7_2_1_fold : clear implicits. +Arguments paco7_2_0_unfold : clear implicits. +Arguments paco7_2_1_unfold : clear implicits. + +Global Instance paco7_2_0_inst (gf_0 gf_1 : rel7 T0 T1 T2 T3 T4 T5 T6->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 : paco_class (paco7_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6) := { pacoacc := paco7_2_0_acc gf_0 gf_1; pacomult := paco7_2_0_mult gf_0 gf_1; pacofold := paco7_2_0_fold gf_0 gf_1; pacounfold := paco7_2_0_unfold gf_0 gf_1 }. -Instance paco7_2_1_inst T0 T1 T2 T3 T4 T5 T6 (gf_0 gf_1 : rel7 T0 T1 T2 T3 T4 T5 T6->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 : paco_class (paco7_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6) := +Global Instance paco7_2_1_inst (gf_0 gf_1 : rel7 T0 T1 T2 T3 T4 T5 T6->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 : paco_class (paco7_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6) := { pacoacc := paco7_2_1_acc gf_0 gf_1; pacomult := paco7_2_1_mult gf_0 gf_1; pacofold := paco7_2_1_fold gf_0 gf_1; @@ -280,65 +464,204 @@ Instance paco7_2_1_inst T0 T1 T2 T3 T4 T5 T6 (gf_0 gf_1 : rel7 T0 T1 T2 T3 T4 T Section Arg7_3. -Definition monotone7_3 T0 T1 T2 T3 T4 T5 T6 (gf: rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6) := +Definition monotone7_3 (gf: rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6) := forall x0 x1 x2 x3 x4 x5 x6 r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6) (LE_0: r_0 <7= r'_0)(LE_1: r_1 <7= r'_1)(LE_2: r_2 <7= r'_2), gf r'_0 r'_1 r'_2 x0 x1 x2 x3 x4 x5 x6. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. +Definition _monotone7_3 (gf: rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <7= r'_0)(LE_1: r_1 <7= r'_1)(LE_2: r_2 <7= r'_2), gf r_0 r_1 r_2 <7== gf r'_0 r'_1 r'_2. + +Lemma monotone7_3_eq (gf: rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6) : + monotone7_3 gf <-> _monotone7_3 gf. +Proof. unfold monotone7_3, _monotone7_3, le7. split; eauto. Qed. + +Lemma monotone7_3_map (gf: rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6) + (MON: _monotone7_3 gf) : + _monotone_3 (fun R0 R1 R2 => uncurry7 (gf (curry7 R0) (curry7 R1) (curry7 R2))). +Proof. + repeat_intros 9. apply uncurry_map7. apply MON; apply curry_map7; auto. +Qed. + Variable gf_0 gf_1 gf_2 : rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6 -> rel7 T0 T1 T2 T3 T4 T5 T6. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. +Theorem _paco7_3_0_mon: _monotone7_3 (paco7_3_0 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map7, _paco_3_0_mon; apply uncurry_map7; auto. +Qed. + +Theorem _paco7_3_1_mon: _monotone7_3 (paco7_3_1 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map7, _paco_3_1_mon; apply uncurry_map7; auto. +Qed. + +Theorem _paco7_3_2_mon: _monotone7_3 (paco7_3_2 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map7, _paco_3_2_mon; apply uncurry_map7; auto. +Qed. + +Theorem _paco7_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <7== rr) (CIH: l <7== rr), l <7== paco7_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <7== paco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_7. + eapply _paco_3_0_acc. intros. + apply uncurry_adjoint1_7 in INC. apply uncurry_adjoint1_7 in CIH. + apply uncurry_adjoint2_7. + eapply le7_trans. eapply (OBG _ INC CIH). + apply curry_map7. + apply _paco_3_0_mon; try apply le1_refl; apply curry_bij1_7. +Qed. + +Theorem _paco7_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <7== rr) (CIH: l <7== rr), l <7== paco7_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <7== paco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_7. + eapply _paco_3_1_acc. intros. + apply uncurry_adjoint1_7 in INC. apply uncurry_adjoint1_7 in CIH. + apply uncurry_adjoint2_7. + eapply le7_trans. eapply (OBG _ INC CIH). + apply curry_map7. + apply _paco_3_1_mon; try apply le1_refl; apply curry_bij1_7. +Qed. + +Theorem _paco7_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <7== rr) (CIH: l <7== rr), l <7== paco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <7== paco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_7. + eapply _paco_3_2_acc. intros. + apply uncurry_adjoint1_7 in INC. apply uncurry_adjoint1_7 in CIH. + apply uncurry_adjoint2_7. + eapply le7_trans. eapply (OBG _ INC CIH). + apply curry_map7. + apply _paco_3_2_mon; try apply le1_refl; apply curry_bij1_7. +Qed. + +Theorem _paco7_3_0_mult_strong: forall r_0 r_1 r_2, + paco7_3_0 gf_0 gf_1 gf_2 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <7== paco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map7. + eapply le1_trans; [| eapply _paco_3_0_mult_strong]. + apply _paco_3_0_mon; intros []; eauto. +Qed. + +Theorem _paco7_3_1_mult_strong: forall r_0 r_1 r_2, + paco7_3_1 gf_0 gf_1 gf_2 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <7== paco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map7. + eapply le1_trans; [| eapply _paco_3_1_mult_strong]. + apply _paco_3_1_mon; intros []; eauto. +Qed. + +Theorem _paco7_3_2_mult_strong: forall r_0 r_1 r_2, + paco7_3_2 gf_0 gf_1 gf_2 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <7== paco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map7. + eapply le1_trans; [| eapply _paco_3_2_mult_strong]. + apply _paco_3_2_mon; intros []; eauto. +Qed. + +Theorem _paco7_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <7== paco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_7. + eapply le1_trans; [| apply _paco_3_0_fold]. apply le1_refl. +Qed. + +Theorem _paco7_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <7== paco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_7. + eapply le1_trans; [| apply _paco_3_1_fold]. apply le1_refl. +Qed. + +Theorem _paco7_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <7== paco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_7. + eapply le1_trans; [| apply _paco_3_2_fold]. apply le1_refl. +Qed. + +Theorem _paco7_3_0_unfold: forall (MON: _monotone7_3 gf_0) (MON: _monotone7_3 gf_1) (MON: _monotone7_3 gf_2) r_0 r_1 r_2, + paco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <7== gf_0 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_7. + eapply _paco_3_0_unfold; apply monotone7_3_map; auto. +Qed. + +Theorem _paco7_3_1_unfold: forall (MON: _monotone7_3 gf_0) (MON: _monotone7_3 gf_1) (MON: _monotone7_3 gf_2) r_0 r_1 r_2, + paco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <7== gf_1 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_7. + eapply _paco_3_1_unfold; apply monotone7_3_map; auto. +Qed. + +Theorem _paco7_3_2_unfold: forall (MON: _monotone7_3 gf_0) (MON: _monotone7_3 gf_1) (MON: _monotone7_3 gf_2) r_0 r_1 r_2, + paco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <7== gf_2 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_7. + eapply _paco_3_2_unfold; apply monotone7_3_map; auto. +Qed. + Theorem paco7_3_0_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <7= rr) (CIH: l <_paco_7= rr), l <_paco_7= paco7_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <7= rr) (CIH: l <7= rr), l <7= paco7_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), l <7= paco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco7_3_0 gf_0 gf_1 gf_2 (r_0 \7/ l) r_1 r_2 x0 x1 x2 x3 x4 x5 x6) by eauto. - clear PR; repeat (try left; do 8 paco_revert; paco_cofix_auto). + apply _paco7_3_0_acc. Qed. Theorem paco7_3_1_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <7= rr) (CIH: l <_paco_7= rr), l <_paco_7= paco7_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <7= rr) (CIH: l <7= rr), l <7= paco7_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), l <7= paco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco7_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \7/ l) r_2 x0 x1 x2 x3 x4 x5 x6) by eauto. - clear PR; repeat (try left; do 8 paco_revert; paco_cofix_auto). + apply _paco7_3_1_acc. Qed. Theorem paco7_3_2_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <7= rr) (CIH: l <_paco_7= rr), l <_paco_7= paco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <7= rr) (CIH: l <7= rr), l <7= paco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), l <7= paco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \7/ l) x0 x1 x2 x3 x4 x5 x6) by eauto. - clear PR; repeat (try left; do 8 paco_revert; paco_cofix_auto). + apply _paco7_3_2_acc. Qed. Theorem paco7_3_0_mon: monotone7_3 (paco7_3_0 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 8 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone7_3_eq. + apply _paco7_3_0_mon. +Qed. Theorem paco7_3_1_mon: monotone7_3 (paco7_3_1 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 8 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone7_3_eq. + apply _paco7_3_1_mon. +Qed. Theorem paco7_3_2_mon: monotone7_3 (paco7_3_2 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 8 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone7_3_eq. + apply _paco7_3_2_mon. +Qed. Theorem paco7_3_0_mult_strong: forall r_0 r_1 r_2, paco7_3_0 gf_0 gf_1 gf_2 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <7= paco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 8 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco7_3_0_mult_strong. +Qed. Theorem paco7_3_1_mult_strong: forall r_0 r_1 r_2, paco7_3_1 gf_0 gf_1 gf_2 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <7= paco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 8 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco7_3_1_mult_strong. +Qed. Theorem paco7_3_2_mult_strong: forall r_0 r_1 r_2, paco7_3_2 gf_0 gf_1 gf_2 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <7= paco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 8 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco7_3_2_mult_strong. +Qed. Corollary paco7_3_0_mult: forall r_0 r_1 r_2, paco7_3_0 gf_0 gf_1 gf_2 (paco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <7= paco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. @@ -354,69 +677,105 @@ Proof. intros; eapply paco7_3_2_mult_strong, paco7_3_2_mon; eauto. Qed. Theorem paco7_3_0_fold: forall r_0 r_1 r_2, gf_0 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <7= paco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco7_3_0_fold. +Qed. Theorem paco7_3_1_fold: forall r_0 r_1 r_2, gf_1 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <7= paco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco7_3_1_fold. +Qed. Theorem paco7_3_2_fold: forall r_0 r_1 r_2, gf_2 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <7= paco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco7_3_2_fold. +Qed. Theorem paco7_3_0_unfold: forall (MON: monotone7_3 gf_0) (MON: monotone7_3 gf_1) (MON: monotone7_3 gf_2) r_0 r_1 r_2, paco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <7= gf_0 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone7_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco7_3_0_unfold; apply monotone7_3_eq; auto. +Qed. Theorem paco7_3_1_unfold: forall (MON: monotone7_3 gf_0) (MON: monotone7_3 gf_1) (MON: monotone7_3 gf_2) r_0 r_1 r_2, paco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <7= gf_1 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone7_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco7_3_1_unfold; apply monotone7_3_eq; auto. +Qed. Theorem paco7_3_2_unfold: forall (MON: monotone7_3 gf_0) (MON: monotone7_3 gf_1) (MON: monotone7_3 gf_2) r_0 r_1 r_2, paco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <7= gf_2 (upaco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone7_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco7_3_2_unfold; apply monotone7_3_eq; auto. +Qed. End Arg7_3. -Hint Unfold monotone7_3. -Hint Resolve paco7_3_0_fold. -Hint Resolve paco7_3_1_fold. -Hint Resolve paco7_3_2_fold. - -Arguments paco7_3_0_acc [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_1_acc [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_2_acc [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_0_mon [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_1_mon [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_2_mon [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_2_mult_strong [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_0_mult [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_1_mult [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_2_mult [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_0_fold [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_1_fold [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_2_fold [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_0_unfold [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_1_unfold [ T0 T1 T2 T3 T4 T5 T6 ]. -Arguments paco7_3_2_unfold [ T0 T1 T2 T3 T4 T5 T6 ]. - -Instance paco7_3_0_inst T0 T1 T2 T3 T4 T5 T6 (gf_0 gf_1 gf_2 : rel7 T0 T1 T2 T3 T4 T5 T6->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 : paco_class (paco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6) := +Arguments paco7_3_0_acc : clear implicits. +Arguments paco7_3_1_acc : clear implicits. +Arguments paco7_3_2_acc : clear implicits. +Arguments paco7_3_0_mon : clear implicits. +Arguments paco7_3_1_mon : clear implicits. +Arguments paco7_3_2_mon : clear implicits. +Arguments paco7_3_0_mult_strong : clear implicits. +Arguments paco7_3_1_mult_strong : clear implicits. +Arguments paco7_3_2_mult_strong : clear implicits. +Arguments paco7_3_0_mult : clear implicits. +Arguments paco7_3_1_mult : clear implicits. +Arguments paco7_3_2_mult : clear implicits. +Arguments paco7_3_0_fold : clear implicits. +Arguments paco7_3_1_fold : clear implicits. +Arguments paco7_3_2_fold : clear implicits. +Arguments paco7_3_0_unfold : clear implicits. +Arguments paco7_3_1_unfold : clear implicits. +Arguments paco7_3_2_unfold : clear implicits. + +Global Instance paco7_3_0_inst (gf_0 gf_1 gf_2 : rel7 T0 T1 T2 T3 T4 T5 T6->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 : paco_class (paco7_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6) := { pacoacc := paco7_3_0_acc gf_0 gf_1 gf_2; pacomult := paco7_3_0_mult gf_0 gf_1 gf_2; pacofold := paco7_3_0_fold gf_0 gf_1 gf_2; pacounfold := paco7_3_0_unfold gf_0 gf_1 gf_2 }. -Instance paco7_3_1_inst T0 T1 T2 T3 T4 T5 T6 (gf_0 gf_1 gf_2 : rel7 T0 T1 T2 T3 T4 T5 T6->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 : paco_class (paco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6) := +Global Instance paco7_3_1_inst (gf_0 gf_1 gf_2 : rel7 T0 T1 T2 T3 T4 T5 T6->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 : paco_class (paco7_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6) := { pacoacc := paco7_3_1_acc gf_0 gf_1 gf_2; pacomult := paco7_3_1_mult gf_0 gf_1 gf_2; pacofold := paco7_3_1_fold gf_0 gf_1 gf_2; pacounfold := paco7_3_1_unfold gf_0 gf_1 gf_2 }. -Instance paco7_3_2_inst T0 T1 T2 T3 T4 T5 T6 (gf_0 gf_1 gf_2 : rel7 T0 T1 T2 T3 T4 T5 T6->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 : paco_class (paco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6) := +Global Instance paco7_3_2_inst (gf_0 gf_1 gf_2 : rel7 T0 T1 T2 T3 T4 T5 T6->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 : paco_class (paco7_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6) := { pacoacc := paco7_3_2_acc gf_0 gf_1 gf_2; pacomult := paco7_3_2_mult gf_0 gf_1 gf_2; pacofold := paco7_3_2_fold gf_0 gf_1 gf_2; pacounfold := paco7_3_2_unfold gf_0 gf_1 gf_2 }. +End PACO7. + +Global Opaque paco7. + +Hint Unfold upaco7. +Hint Resolve paco7_fold. +Hint Unfold monotone7. + +Global Opaque paco7_2_0. +Global Opaque paco7_2_1. + +Hint Unfold upaco7_2_0. +Hint Unfold upaco7_2_1. +Hint Resolve paco7_2_0_fold. +Hint Resolve paco7_2_1_fold. +Hint Unfold monotone7_2. + +Global Opaque paco7_3_0. +Global Opaque paco7_3_1. +Global Opaque paco7_3_2. + +Hint Unfold upaco7_3_0. +Hint Unfold upaco7_3_1. +Hint Unfold upaco7_3_2. +Hint Resolve paco7_3_0_fold. +Hint Resolve paco7_3_1_fold. +Hint Resolve paco7_3_2_fold. +Hint Unfold monotone7_3. + diff --git a/src/paco8.v b/src/paco8.v index e2f9953..04854a6 100644 --- a/src/paco8.v +++ b/src/paco8.v @@ -1,11 +1,9 @@ Require Export paconotation pacotacuser. -Require Import pacotac. +Require Import paconotation_internal pacotac pacon. Set Implicit Arguments. -(** ** Predicates of Arity 8 -*) +Section PACO8. -Section Arg8_def. Variable T0 : Type. Variable T1 : forall (x0: @T0), Type. Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. @@ -14,138 +12,222 @@ Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. + +Record sig8T := + exist8T { + proj8T0: @T0; + proj8T1: @T1 proj8T0; + proj8T2: @T2 proj8T0 proj8T1; + proj8T3: @T3 proj8T0 proj8T1 proj8T2; + proj8T4: @T4 proj8T0 proj8T1 proj8T2 proj8T3; + proj8T5: @T5 proj8T0 proj8T1 proj8T2 proj8T3 proj8T4; + proj8T6: @T6 proj8T0 proj8T1 proj8T2 proj8T3 proj8T4 proj8T5; + proj8T7: @T7 proj8T0 proj8T1 proj8T2 proj8T3 proj8T4 proj8T5 proj8T6; + }. + +Definition uncurry8 (R: rel8 T0 T1 T2 T3 T4 T5 T6 T7): rel1 sig8T := fun x => R (proj8T0 x) (proj8T1 x) (proj8T2 x) (proj8T3 x) (proj8T4 x) (proj8T5 x) (proj8T6 x) (proj8T7 x). + +Definition curry8 (R: rel1 sig8T): rel8 T0 T1 T2 T3 T4 T5 T6 T7 := + fun x0 x1 x2 x3 x4 x5 x6 x7 => R (exist8T x7). + +Lemma uncurry_map8 r0 r1 (LE : r0 <8== r1) : uncurry8 r0 <1== uncurry8 r1. +Proof. intros [] H. apply LE. auto. Qed. + +Lemma uncurry_map_rev8 r0 r1 (LE: uncurry8 r0 <1== uncurry8 r1) : r0 <8== r1. +Proof. + repeat_intros 8. intros H. apply (LE (exist8T x7) H). +Qed. + +Lemma curry_map8 r0 r1 (LE: r0 <1== r1) : curry8 r0 <8== curry8 r1. +Proof. + repeat_intros 8. intros H. apply (LE (exist8T x7) H). +Qed. + +Lemma curry_map_rev8 r0 r1 (LE: curry8 r0 <8== curry8 r1) : r0 <1== r1. +Proof. + intros [] H. apply LE. apply H. +Qed. + +Lemma uncurry_bij1_8 r : curry8 (uncurry8 r) <8== r. +Proof. unfold le8. repeat_intros 8; auto. Qed. + +Lemma uncurry_bij2_8 r : r <8== curry8 (uncurry8 r). +Proof. unfold le8. repeat_intros 8; auto. Qed. + +Lemma curry_bij1_8 r : uncurry8 (curry8 r) <1== r. +Proof. intros []; auto. Qed. + +Lemma curry_bij2_8 r : r <1== uncurry8 (curry8 r). +Proof. intros []; auto. Qed. + +Lemma uncurry_adjoint1_8 r0 r1 (LE: uncurry8 r0 <1== r1) : r0 <8== curry8 r1. +Proof. + apply uncurry_map_rev8. eapply le1_trans; [eauto|]. apply curry_bij2_8. +Qed. + +Lemma uncurry_adjoint2_8 r0 r1 (LE: r0 <8== curry8 r1) : uncurry8 r0 <1== r1. +Proof. + apply curry_map_rev8. eapply le8_trans; [|eauto]. apply uncurry_bij2_8. +Qed. + +Lemma curry_adjoint1_8 r0 r1 (LE: curry8 r0 <8== r1) : r0 <1== uncurry8 r1. +Proof. + apply curry_map_rev8. eapply le8_trans; [eauto|]. apply uncurry_bij2_8. +Qed. + +Lemma curry_adjoint2_8 r0 r1 (LE: r0 <1== uncurry8 r1) : curry8 r0 <8== r1. +Proof. + apply uncurry_map_rev8. eapply le1_trans; [|eauto]. apply curry_bij1_8. +Qed. + +(** ** Predicates of Arity 8 +*) + +Section Arg8_def. Variable gf : rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7. Arguments gf : clear implicits. -CoInductive paco8( r: rel8 T0 T1 T2 T3 T4 T5 T6 T7) x0 x1 x2 x3 x4 x5 x6 x7 : Prop := -| paco8_pfold pco - (LE : pco <8= (paco8 r \8/ r)) - (SIM: gf pco x0 x1 x2 x3 x4 x5 x6 x7) -. +Definition paco8( r: rel8 T0 T1 T2 T3 T4 T5 T6 T7) : rel8 T0 T1 T2 T3 T4 T5 T6 T7 := + curry8 (paco (fun R0 => uncurry8 (gf (curry8 R0))) (uncurry8 r)). + Definition upaco8( r: rel8 T0 T1 T2 T3 T4 T5 T6 T7) := paco8 r \8/ r. End Arg8_def. -Arguments paco8 [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments upaco8 [ T0 T1 T2 T3 T4 T5 T6 T7 ]. +Arguments paco8 : clear implicits. +Arguments upaco8 : clear implicits. Hint Unfold upaco8. Section Arg8_2_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. Variable gf_0 gf_1 : rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. -CoInductive paco8_2_0( r_0 r_1: rel8 T0 T1 T2 T3 T4 T5 T6 T7) x0 x1 x2 x3 x4 x5 x6 x7 : Prop := -| paco8_2_0_pfold pco_0 pco_1 - (LE : pco_0 <8= (paco8_2_0 r_0 r_1 \8/ r_0)) - (LE : pco_1 <8= (paco8_2_1 r_0 r_1 \8/ r_1)) - (SIM: gf_0 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6 x7) -with paco8_2_1( r_0 r_1: rel8 T0 T1 T2 T3 T4 T5 T6 T7) x0 x1 x2 x3 x4 x5 x6 x7 : Prop := -| paco8_2_1_pfold pco_0 pco_1 - (LE : pco_0 <8= (paco8_2_0 r_0 r_1 \8/ r_0)) - (LE : pco_1 <8= (paco8_2_1 r_0 r_1 \8/ r_1)) - (SIM: gf_1 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6 x7) -. +Definition paco8_2_0( r_0 r_1: rel8 T0 T1 T2 T3 T4 T5 T6 T7) : rel8 T0 T1 T2 T3 T4 T5 T6 T7 := + curry8 (paco_2_0 (fun R0 R1 => uncurry8 (gf_0 (curry8 R0) (curry8 R1))) (fun R0 R1 => uncurry8 (gf_1 (curry8 R0) (curry8 R1))) (uncurry8 r_0) (uncurry8 r_1)). + +Definition paco8_2_1( r_0 r_1: rel8 T0 T1 T2 T3 T4 T5 T6 T7) : rel8 T0 T1 T2 T3 T4 T5 T6 T7 := + curry8 (paco_2_1 (fun R0 R1 => uncurry8 (gf_0 (curry8 R0) (curry8 R1))) (fun R0 R1 => uncurry8 (gf_1 (curry8 R0) (curry8 R1))) (uncurry8 r_0) (uncurry8 r_1)). + Definition upaco8_2_0( r_0 r_1: rel8 T0 T1 T2 T3 T4 T5 T6 T7) := paco8_2_0 r_0 r_1 \8/ r_0. Definition upaco8_2_1( r_0 r_1: rel8 T0 T1 T2 T3 T4 T5 T6 T7) := paco8_2_1 r_0 r_1 \8/ r_1. End Arg8_2_def. -Arguments paco8_2_0 [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments upaco8_2_0 [ T0 T1 T2 T3 T4 T5 T6 T7 ]. +Arguments paco8_2_0 : clear implicits. +Arguments upaco8_2_0 : clear implicits. Hint Unfold upaco8_2_0. -Arguments paco8_2_1 [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments upaco8_2_1 [ T0 T1 T2 T3 T4 T5 T6 T7 ]. +Arguments paco8_2_1 : clear implicits. +Arguments upaco8_2_1 : clear implicits. Hint Unfold upaco8_2_1. Section Arg8_3_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. Variable gf_0 gf_1 gf_2 : rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. -CoInductive paco8_3_0( r_0 r_1 r_2: rel8 T0 T1 T2 T3 T4 T5 T6 T7) x0 x1 x2 x3 x4 x5 x6 x7 : Prop := -| paco8_3_0_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <8= (paco8_3_0 r_0 r_1 r_2 \8/ r_0)) - (LE : pco_1 <8= (paco8_3_1 r_0 r_1 r_2 \8/ r_1)) - (LE : pco_2 <8= (paco8_3_2 r_0 r_1 r_2 \8/ r_2)) - (SIM: gf_0 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7) -with paco8_3_1( r_0 r_1 r_2: rel8 T0 T1 T2 T3 T4 T5 T6 T7) x0 x1 x2 x3 x4 x5 x6 x7 : Prop := -| paco8_3_1_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <8= (paco8_3_0 r_0 r_1 r_2 \8/ r_0)) - (LE : pco_1 <8= (paco8_3_1 r_0 r_1 r_2 \8/ r_1)) - (LE : pco_2 <8= (paco8_3_2 r_0 r_1 r_2 \8/ r_2)) - (SIM: gf_1 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7) -with paco8_3_2( r_0 r_1 r_2: rel8 T0 T1 T2 T3 T4 T5 T6 T7) x0 x1 x2 x3 x4 x5 x6 x7 : Prop := -| paco8_3_2_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <8= (paco8_3_0 r_0 r_1 r_2 \8/ r_0)) - (LE : pco_1 <8= (paco8_3_1 r_0 r_1 r_2 \8/ r_1)) - (LE : pco_2 <8= (paco8_3_2 r_0 r_1 r_2 \8/ r_2)) - (SIM: gf_2 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7) -. +Definition paco8_3_0( r_0 r_1 r_2: rel8 T0 T1 T2 T3 T4 T5 T6 T7) : rel8 T0 T1 T2 T3 T4 T5 T6 T7 := + curry8 (paco_3_0 (fun R0 R1 R2 => uncurry8 (gf_0 (curry8 R0) (curry8 R1) (curry8 R2))) (fun R0 R1 R2 => uncurry8 (gf_1 (curry8 R0) (curry8 R1) (curry8 R2))) (fun R0 R1 R2 => uncurry8 (gf_2 (curry8 R0) (curry8 R1) (curry8 R2))) (uncurry8 r_0) (uncurry8 r_1) (uncurry8 r_2)). + +Definition paco8_3_1( r_0 r_1 r_2: rel8 T0 T1 T2 T3 T4 T5 T6 T7) : rel8 T0 T1 T2 T3 T4 T5 T6 T7 := + curry8 (paco_3_1 (fun R0 R1 R2 => uncurry8 (gf_0 (curry8 R0) (curry8 R1) (curry8 R2))) (fun R0 R1 R2 => uncurry8 (gf_1 (curry8 R0) (curry8 R1) (curry8 R2))) (fun R0 R1 R2 => uncurry8 (gf_2 (curry8 R0) (curry8 R1) (curry8 R2))) (uncurry8 r_0) (uncurry8 r_1) (uncurry8 r_2)). + +Definition paco8_3_2( r_0 r_1 r_2: rel8 T0 T1 T2 T3 T4 T5 T6 T7) : rel8 T0 T1 T2 T3 T4 T5 T6 T7 := + curry8 (paco_3_2 (fun R0 R1 R2 => uncurry8 (gf_0 (curry8 R0) (curry8 R1) (curry8 R2))) (fun R0 R1 R2 => uncurry8 (gf_1 (curry8 R0) (curry8 R1) (curry8 R2))) (fun R0 R1 R2 => uncurry8 (gf_2 (curry8 R0) (curry8 R1) (curry8 R2))) (uncurry8 r_0) (uncurry8 r_1) (uncurry8 r_2)). + Definition upaco8_3_0( r_0 r_1 r_2: rel8 T0 T1 T2 T3 T4 T5 T6 T7) := paco8_3_0 r_0 r_1 r_2 \8/ r_0. Definition upaco8_3_1( r_0 r_1 r_2: rel8 T0 T1 T2 T3 T4 T5 T6 T7) := paco8_3_1 r_0 r_1 r_2 \8/ r_1. Definition upaco8_3_2( r_0 r_1 r_2: rel8 T0 T1 T2 T3 T4 T5 T6 T7) := paco8_3_2 r_0 r_1 r_2 \8/ r_2. End Arg8_3_def. -Arguments paco8_3_0 [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments upaco8_3_0 [ T0 T1 T2 T3 T4 T5 T6 T7 ]. +Arguments paco8_3_0 : clear implicits. +Arguments upaco8_3_0 : clear implicits. Hint Unfold upaco8_3_0. -Arguments paco8_3_1 [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments upaco8_3_1 [ T0 T1 T2 T3 T4 T5 T6 T7 ]. +Arguments paco8_3_1 : clear implicits. +Arguments upaco8_3_1 : clear implicits. Hint Unfold upaco8_3_1. -Arguments paco8_3_2 [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments upaco8_3_2 [ T0 T1 T2 T3 T4 T5 T6 T7 ]. +Arguments paco8_3_2 : clear implicits. +Arguments upaco8_3_2 : clear implicits. Hint Unfold upaco8_3_2. -(* Less than or equal - internal use only *) -Notation "p <_paco_8= q" := - (forall _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 (PR: p _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 : Prop), q _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 : Prop) - (at level 50, no associativity). - (** 1 Mutual Coinduction *) Section Arg8_1. -Definition monotone8 T0 T1 T2 T3 T4 T5 T6 T7 (gf: rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7) := +Definition monotone8 (gf: rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7) := forall x0 x1 x2 x3 x4 x5 x6 x7 r r' (IN: gf r x0 x1 x2 x3 x4 x5 x6 x7) (LE: r <8= r'), gf r' x0 x1 x2 x3 x4 x5 x6 x7. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. +Definition _monotone8 (gf: rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7) := + forall r r'(LE: r <8= r'), gf r <8== gf r'. + +Lemma monotone8_eq (gf: rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7) : + monotone8 gf <-> _monotone8 gf. +Proof. unfold monotone8, _monotone8, le8. split; eauto. Qed. + +Lemma monotone8_map (gf: rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7) + (MON: _monotone8 gf) : + _monotone (fun R0 => uncurry8 (gf (curry8 R0))). +Proof. + repeat_intros 3. apply uncurry_map8. apply MON; apply curry_map8; auto. +Qed. + Variable gf : rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7. Arguments gf : clear implicits. +Theorem _paco8_mon: _monotone8 (paco8 gf). +Proof. + repeat_intros 3. eapply curry_map8, _paco_mon; apply uncurry_map8; auto. +Qed. + +Theorem _paco8_acc: forall + l r (OBG: forall rr (INC: r <8== rr) (CIH: l <8== rr), l <8== paco8 gf rr), + l <8== paco8 gf r. +Proof. + intros. apply uncurry_adjoint1_8. + eapply _paco_acc. intros. + apply uncurry_adjoint1_8 in INC. apply uncurry_adjoint1_8 in CIH. + apply uncurry_adjoint2_8. + eapply le8_trans. eapply (OBG _ INC CIH). + apply curry_map8. + apply _paco_mon; try apply le1_refl; apply curry_bij1_8. +Qed. + +Theorem _paco8_mult_strong: forall r, + paco8 gf (upaco8 gf r) <8== paco8 gf r. +Proof. + intros. apply curry_map8. + eapply le1_trans; [| eapply _paco_mult_strong]. + apply _paco_mon; intros []; eauto. +Qed. + +Theorem _paco8_fold: forall r, + gf (upaco8 gf r) <8== paco8 gf r. +Proof. + intros. apply uncurry_adjoint1_8. + eapply le1_trans; [| apply _paco_fold]. apply le1_refl. +Qed. + +Theorem _paco8_unfold: forall (MON: _monotone8 gf) r, + paco8 gf r <8== gf (upaco8 gf r). +Proof. + intros. apply curry_adjoint2_8. + eapply _paco_unfold; apply monotone8_map; auto. +Qed. + Theorem paco8_acc: forall - l r (OBG: forall rr (INC: r <8= rr) (CIH: l <_paco_8= rr), l <_paco_8= paco8 gf rr), + l r (OBG: forall rr (INC: r <8= rr) (CIH: l <8= rr), l <8= paco8 gf rr), l <8= paco8 gf r. Proof. - intros; assert (SIM: paco8 gf (r \8/ l) x0 x1 x2 x3 x4 x5 x6 x7) by eauto. - clear PR; repeat (try left; do 9 paco_revert; paco_cofix_auto). + apply _paco8_acc. Qed. Theorem paco8_mon: monotone8 (paco8 gf). -Proof. paco_cofix_auto; repeat (left; do 9 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone8_eq. + apply _paco8_mon. +Qed. Theorem paco8_mult_strong: forall r, paco8 gf (upaco8 gf r) <8= paco8 gf r. -Proof. paco_cofix_auto; repeat (left; do 9 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco8_mult_strong. +Qed. Corollary paco8_mult: forall r, paco8 gf (paco8 gf r) <8= paco8 gf r. @@ -153,25 +235,26 @@ Proof. intros; eapply paco8_mult_strong, paco8_mon; eauto. Qed. Theorem paco8_fold: forall r, gf (upaco8 gf r) <8= paco8 gf r. -Proof. intros; econstructor; [ |eauto]; eauto. Qed. +Proof. + apply _paco8_fold. +Qed. Theorem paco8_unfold: forall (MON: monotone8 gf) r, paco8 gf r <8= gf (upaco8 gf r). -Proof. unfold monotone8; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 1. eapply _paco8_unfold; apply monotone8_eq; auto. +Qed. End Arg8_1. -Hint Unfold monotone8. -Hint Resolve paco8_fold. +Arguments paco8_acc : clear implicits. +Arguments paco8_mon : clear implicits. +Arguments paco8_mult_strong : clear implicits. +Arguments paco8_mult : clear implicits. +Arguments paco8_fold : clear implicits. +Arguments paco8_unfold : clear implicits. -Arguments paco8_acc [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_mon [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_mult [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_fold [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 ]. - -Instance paco8_inst T0 T1 T2 T3 T4 T5 T6 T7 (gf : rel8 T0 T1 T2 T3 T4 T5 T6 T7->_) r x0 x1 x2 x3 x4 x5 x6 x7 : paco_class (paco8 gf r x0 x1 x2 x3 x4 x5 x6 x7) := +Global Instance paco8_inst (gf : rel8 T0 T1 T2 T3 T4 T5 T6 T7->_) r x0 x1 x2 x3 x4 x5 x6 x7 : paco_class (paco8 gf r x0 x1 x2 x3 x4 x5 x6 x7) := { pacoacc := paco8_acc gf; pacomult := paco8_mult gf; pacofold := paco8_fold gf; @@ -181,50 +264,144 @@ Instance paco8_inst T0 T1 T2 T3 T4 T5 T6 T7 (gf : rel8 T0 T1 T2 T3 T4 T5 T6 T7- Section Arg8_2. -Definition monotone8_2 T0 T1 T2 T3 T4 T5 T6 T7 (gf: rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7) := +Definition monotone8_2 (gf: rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7) := forall x0 x1 x2 x3 x4 x5 x6 x7 r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7) (LE_0: r_0 <8= r'_0)(LE_1: r_1 <8= r'_1), gf r'_0 r'_1 x0 x1 x2 x3 x4 x5 x6 x7. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. +Definition _monotone8_2 (gf: rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <8= r'_0)(LE_1: r_1 <8= r'_1), gf r_0 r_1 <8== gf r'_0 r'_1. + +Lemma monotone8_2_eq (gf: rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7) : + monotone8_2 gf <-> _monotone8_2 gf. +Proof. unfold monotone8_2, _monotone8_2, le8. split; eauto. Qed. + +Lemma monotone8_2_map (gf: rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7) + (MON: _monotone8_2 gf) : + _monotone_2 (fun R0 R1 => uncurry8 (gf (curry8 R0) (curry8 R1))). +Proof. + repeat_intros 6. apply uncurry_map8. apply MON; apply curry_map8; auto. +Qed. + Variable gf_0 gf_1 : rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. +Theorem _paco8_2_0_mon: _monotone8_2 (paco8_2_0 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map8, _paco_2_0_mon; apply uncurry_map8; auto. +Qed. + +Theorem _paco8_2_1_mon: _monotone8_2 (paco8_2_1 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map8, _paco_2_1_mon; apply uncurry_map8; auto. +Qed. + +Theorem _paco8_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <8== rr) (CIH: l <8== rr), l <8== paco8_2_0 gf_0 gf_1 rr r_1), + l <8== paco8_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_8. + eapply _paco_2_0_acc. intros. + apply uncurry_adjoint1_8 in INC. apply uncurry_adjoint1_8 in CIH. + apply uncurry_adjoint2_8. + eapply le8_trans. eapply (OBG _ INC CIH). + apply curry_map8. + apply _paco_2_0_mon; try apply le1_refl; apply curry_bij1_8. +Qed. + +Theorem _paco8_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <8== rr) (CIH: l <8== rr), l <8== paco8_2_1 gf_0 gf_1 r_0 rr), + l <8== paco8_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_8. + eapply _paco_2_1_acc. intros. + apply uncurry_adjoint1_8 in INC. apply uncurry_adjoint1_8 in CIH. + apply uncurry_adjoint2_8. + eapply le8_trans. eapply (OBG _ INC CIH). + apply curry_map8. + apply _paco_2_1_mon; try apply le1_refl; apply curry_bij1_8. +Qed. + +Theorem _paco8_2_0_mult_strong: forall r_0 r_1, + paco8_2_0 gf_0 gf_1 (upaco8_2_0 gf_0 gf_1 r_0 r_1) (upaco8_2_1 gf_0 gf_1 r_0 r_1) <8== paco8_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map8. + eapply le1_trans; [| eapply _paco_2_0_mult_strong]. + apply _paco_2_0_mon; intros []; eauto. +Qed. + +Theorem _paco8_2_1_mult_strong: forall r_0 r_1, + paco8_2_1 gf_0 gf_1 (upaco8_2_0 gf_0 gf_1 r_0 r_1) (upaco8_2_1 gf_0 gf_1 r_0 r_1) <8== paco8_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map8. + eapply le1_trans; [| eapply _paco_2_1_mult_strong]. + apply _paco_2_1_mon; intros []; eauto. +Qed. + +Theorem _paco8_2_0_fold: forall r_0 r_1, + gf_0 (upaco8_2_0 gf_0 gf_1 r_0 r_1) (upaco8_2_1 gf_0 gf_1 r_0 r_1) <8== paco8_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_8. + eapply le1_trans; [| apply _paco_2_0_fold]. apply le1_refl. +Qed. + +Theorem _paco8_2_1_fold: forall r_0 r_1, + gf_1 (upaco8_2_0 gf_0 gf_1 r_0 r_1) (upaco8_2_1 gf_0 gf_1 r_0 r_1) <8== paco8_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_8. + eapply le1_trans; [| apply _paco_2_1_fold]. apply le1_refl. +Qed. + +Theorem _paco8_2_0_unfold: forall (MON: _monotone8_2 gf_0) (MON: _monotone8_2 gf_1) r_0 r_1, + paco8_2_0 gf_0 gf_1 r_0 r_1 <8== gf_0 (upaco8_2_0 gf_0 gf_1 r_0 r_1) (upaco8_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_8. + eapply _paco_2_0_unfold; apply monotone8_2_map; auto. +Qed. + +Theorem _paco8_2_1_unfold: forall (MON: _monotone8_2 gf_0) (MON: _monotone8_2 gf_1) r_0 r_1, + paco8_2_1 gf_0 gf_1 r_0 r_1 <8== gf_1 (upaco8_2_0 gf_0 gf_1 r_0 r_1) (upaco8_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_8. + eapply _paco_2_1_unfold; apply monotone8_2_map; auto. +Qed. + Theorem paco8_2_0_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_0 <8= rr) (CIH: l <_paco_8= rr), l <_paco_8= paco8_2_0 gf_0 gf_1 rr r_1), + l r_0 r_1 (OBG: forall rr (INC: r_0 <8= rr) (CIH: l <8= rr), l <8= paco8_2_0 gf_0 gf_1 rr r_1), l <8= paco8_2_0 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco8_2_0 gf_0 gf_1 (r_0 \8/ l) r_1 x0 x1 x2 x3 x4 x5 x6 x7) by eauto. - clear PR; repeat (try left; do 9 paco_revert; paco_cofix_auto). + apply _paco8_2_0_acc. Qed. Theorem paco8_2_1_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_1 <8= rr) (CIH: l <_paco_8= rr), l <_paco_8= paco8_2_1 gf_0 gf_1 r_0 rr), + l r_0 r_1 (OBG: forall rr (INC: r_1 <8= rr) (CIH: l <8= rr), l <8= paco8_2_1 gf_0 gf_1 r_0 rr), l <8= paco8_2_1 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco8_2_1 gf_0 gf_1 r_0 (r_1 \8/ l) x0 x1 x2 x3 x4 x5 x6 x7) by eauto. - clear PR; repeat (try left; do 9 paco_revert; paco_cofix_auto). + apply _paco8_2_1_acc. Qed. Theorem paco8_2_0_mon: monotone8_2 (paco8_2_0 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 9 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone8_2_eq. + apply _paco8_2_0_mon. +Qed. Theorem paco8_2_1_mon: monotone8_2 (paco8_2_1 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 9 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone8_2_eq. + apply _paco8_2_1_mon. +Qed. Theorem paco8_2_0_mult_strong: forall r_0 r_1, paco8_2_0 gf_0 gf_1 (upaco8_2_0 gf_0 gf_1 r_0 r_1) (upaco8_2_1 gf_0 gf_1 r_0 r_1) <8= paco8_2_0 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 9 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco8_2_0_mult_strong. +Qed. Theorem paco8_2_1_mult_strong: forall r_0 r_1, paco8_2_1 gf_0 gf_1 (upaco8_2_0 gf_0 gf_1 r_0 r_1) (upaco8_2_1 gf_0 gf_1 r_0 r_1) <8= paco8_2_1 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 9 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco8_2_1_mult_strong. +Qed. Corollary paco8_2_0_mult: forall r_0 r_1, paco8_2_0 gf_0 gf_1 (paco8_2_0 gf_0 gf_1 r_0 r_1) (paco8_2_1 gf_0 gf_1 r_0 r_1) <8= paco8_2_0 gf_0 gf_1 r_0 r_1. @@ -236,46 +413,50 @@ Proof. intros; eapply paco8_2_1_mult_strong, paco8_2_1_mon; eauto. Qed. Theorem paco8_2_0_fold: forall r_0 r_1, gf_0 (upaco8_2_0 gf_0 gf_1 r_0 r_1) (upaco8_2_1 gf_0 gf_1 r_0 r_1) <8= paco8_2_0 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco8_2_0_fold. +Qed. Theorem paco8_2_1_fold: forall r_0 r_1, gf_1 (upaco8_2_0 gf_0 gf_1 r_0 r_1) (upaco8_2_1 gf_0 gf_1 r_0 r_1) <8= paco8_2_1 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco8_2_1_fold. +Qed. Theorem paco8_2_0_unfold: forall (MON: monotone8_2 gf_0) (MON: monotone8_2 gf_1) r_0 r_1, paco8_2_0 gf_0 gf_1 r_0 r_1 <8= gf_0 (upaco8_2_0 gf_0 gf_1 r_0 r_1) (upaco8_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone8_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco8_2_0_unfold; apply monotone8_2_eq; auto. +Qed. Theorem paco8_2_1_unfold: forall (MON: monotone8_2 gf_0) (MON: monotone8_2 gf_1) r_0 r_1, paco8_2_1 gf_0 gf_1 r_0 r_1 <8= gf_1 (upaco8_2_0 gf_0 gf_1 r_0 r_1) (upaco8_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone8_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco8_2_1_unfold; apply monotone8_2_eq; auto. +Qed. End Arg8_2. -Hint Unfold monotone8_2. -Hint Resolve paco8_2_0_fold. -Hint Resolve paco8_2_1_fold. - -Arguments paco8_2_0_acc [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_2_1_acc [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_2_0_mon [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_2_1_mon [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_2_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_2_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_2_0_mult [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_2_1_mult [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_2_0_fold [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_2_1_fold [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_2_0_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_2_1_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 ]. - -Instance paco8_2_0_inst T0 T1 T2 T3 T4 T5 T6 T7 (gf_0 gf_1 : rel8 T0 T1 T2 T3 T4 T5 T6 T7->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 : paco_class (paco8_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7) := +Arguments paco8_2_0_acc : clear implicits. +Arguments paco8_2_1_acc : clear implicits. +Arguments paco8_2_0_mon : clear implicits. +Arguments paco8_2_1_mon : clear implicits. +Arguments paco8_2_0_mult_strong : clear implicits. +Arguments paco8_2_1_mult_strong : clear implicits. +Arguments paco8_2_0_mult : clear implicits. +Arguments paco8_2_1_mult : clear implicits. +Arguments paco8_2_0_fold : clear implicits. +Arguments paco8_2_1_fold : clear implicits. +Arguments paco8_2_0_unfold : clear implicits. +Arguments paco8_2_1_unfold : clear implicits. + +Global Instance paco8_2_0_inst (gf_0 gf_1 : rel8 T0 T1 T2 T3 T4 T5 T6 T7->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 : paco_class (paco8_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7) := { pacoacc := paco8_2_0_acc gf_0 gf_1; pacomult := paco8_2_0_mult gf_0 gf_1; pacofold := paco8_2_0_fold gf_0 gf_1; pacounfold := paco8_2_0_unfold gf_0 gf_1 }. -Instance paco8_2_1_inst T0 T1 T2 T3 T4 T5 T6 T7 (gf_0 gf_1 : rel8 T0 T1 T2 T3 T4 T5 T6 T7->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 : paco_class (paco8_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7) := +Global Instance paco8_2_1_inst (gf_0 gf_1 : rel8 T0 T1 T2 T3 T4 T5 T6 T7->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 : paco_class (paco8_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7) := { pacoacc := paco8_2_1_acc gf_0 gf_1; pacomult := paco8_2_1_mult gf_0 gf_1; pacofold := paco8_2_1_fold gf_0 gf_1; @@ -285,66 +466,204 @@ Instance paco8_2_1_inst T0 T1 T2 T3 T4 T5 T6 T7 (gf_0 gf_1 : rel8 T0 T1 T2 T3 T Section Arg8_3. -Definition monotone8_3 T0 T1 T2 T3 T4 T5 T6 T7 (gf: rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7) := +Definition monotone8_3 (gf: rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7) := forall x0 x1 x2 x3 x4 x5 x6 x7 r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7) (LE_0: r_0 <8= r'_0)(LE_1: r_1 <8= r'_1)(LE_2: r_2 <8= r'_2), gf r'_0 r'_1 r'_2 x0 x1 x2 x3 x4 x5 x6 x7. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. +Definition _monotone8_3 (gf: rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <8= r'_0)(LE_1: r_1 <8= r'_1)(LE_2: r_2 <8= r'_2), gf r_0 r_1 r_2 <8== gf r'_0 r'_1 r'_2. + +Lemma monotone8_3_eq (gf: rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7) : + monotone8_3 gf <-> _monotone8_3 gf. +Proof. unfold monotone8_3, _monotone8_3, le8. split; eauto. Qed. + +Lemma monotone8_3_map (gf: rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7) + (MON: _monotone8_3 gf) : + _monotone_3 (fun R0 R1 R2 => uncurry8 (gf (curry8 R0) (curry8 R1) (curry8 R2))). +Proof. + repeat_intros 9. apply uncurry_map8. apply MON; apply curry_map8; auto. +Qed. + Variable gf_0 gf_1 gf_2 : rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7 -> rel8 T0 T1 T2 T3 T4 T5 T6 T7. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. +Theorem _paco8_3_0_mon: _monotone8_3 (paco8_3_0 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map8, _paco_3_0_mon; apply uncurry_map8; auto. +Qed. + +Theorem _paco8_3_1_mon: _monotone8_3 (paco8_3_1 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map8, _paco_3_1_mon; apply uncurry_map8; auto. +Qed. + +Theorem _paco8_3_2_mon: _monotone8_3 (paco8_3_2 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map8, _paco_3_2_mon; apply uncurry_map8; auto. +Qed. + +Theorem _paco8_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <8== rr) (CIH: l <8== rr), l <8== paco8_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <8== paco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_8. + eapply _paco_3_0_acc. intros. + apply uncurry_adjoint1_8 in INC. apply uncurry_adjoint1_8 in CIH. + apply uncurry_adjoint2_8. + eapply le8_trans. eapply (OBG _ INC CIH). + apply curry_map8. + apply _paco_3_0_mon; try apply le1_refl; apply curry_bij1_8. +Qed. + +Theorem _paco8_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <8== rr) (CIH: l <8== rr), l <8== paco8_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <8== paco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_8. + eapply _paco_3_1_acc. intros. + apply uncurry_adjoint1_8 in INC. apply uncurry_adjoint1_8 in CIH. + apply uncurry_adjoint2_8. + eapply le8_trans. eapply (OBG _ INC CIH). + apply curry_map8. + apply _paco_3_1_mon; try apply le1_refl; apply curry_bij1_8. +Qed. + +Theorem _paco8_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <8== rr) (CIH: l <8== rr), l <8== paco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <8== paco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_8. + eapply _paco_3_2_acc. intros. + apply uncurry_adjoint1_8 in INC. apply uncurry_adjoint1_8 in CIH. + apply uncurry_adjoint2_8. + eapply le8_trans. eapply (OBG _ INC CIH). + apply curry_map8. + apply _paco_3_2_mon; try apply le1_refl; apply curry_bij1_8. +Qed. + +Theorem _paco8_3_0_mult_strong: forall r_0 r_1 r_2, + paco8_3_0 gf_0 gf_1 gf_2 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <8== paco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map8. + eapply le1_trans; [| eapply _paco_3_0_mult_strong]. + apply _paco_3_0_mon; intros []; eauto. +Qed. + +Theorem _paco8_3_1_mult_strong: forall r_0 r_1 r_2, + paco8_3_1 gf_0 gf_1 gf_2 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <8== paco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map8. + eapply le1_trans; [| eapply _paco_3_1_mult_strong]. + apply _paco_3_1_mon; intros []; eauto. +Qed. + +Theorem _paco8_3_2_mult_strong: forall r_0 r_1 r_2, + paco8_3_2 gf_0 gf_1 gf_2 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <8== paco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map8. + eapply le1_trans; [| eapply _paco_3_2_mult_strong]. + apply _paco_3_2_mon; intros []; eauto. +Qed. + +Theorem _paco8_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <8== paco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_8. + eapply le1_trans; [| apply _paco_3_0_fold]. apply le1_refl. +Qed. + +Theorem _paco8_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <8== paco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_8. + eapply le1_trans; [| apply _paco_3_1_fold]. apply le1_refl. +Qed. + +Theorem _paco8_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <8== paco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_8. + eapply le1_trans; [| apply _paco_3_2_fold]. apply le1_refl. +Qed. + +Theorem _paco8_3_0_unfold: forall (MON: _monotone8_3 gf_0) (MON: _monotone8_3 gf_1) (MON: _monotone8_3 gf_2) r_0 r_1 r_2, + paco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <8== gf_0 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_8. + eapply _paco_3_0_unfold; apply monotone8_3_map; auto. +Qed. + +Theorem _paco8_3_1_unfold: forall (MON: _monotone8_3 gf_0) (MON: _monotone8_3 gf_1) (MON: _monotone8_3 gf_2) r_0 r_1 r_2, + paco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <8== gf_1 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_8. + eapply _paco_3_1_unfold; apply monotone8_3_map; auto. +Qed. + +Theorem _paco8_3_2_unfold: forall (MON: _monotone8_3 gf_0) (MON: _monotone8_3 gf_1) (MON: _monotone8_3 gf_2) r_0 r_1 r_2, + paco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <8== gf_2 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_8. + eapply _paco_3_2_unfold; apply monotone8_3_map; auto. +Qed. + Theorem paco8_3_0_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <8= rr) (CIH: l <_paco_8= rr), l <_paco_8= paco8_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <8= rr) (CIH: l <8= rr), l <8= paco8_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), l <8= paco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco8_3_0 gf_0 gf_1 gf_2 (r_0 \8/ l) r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7) by eauto. - clear PR; repeat (try left; do 9 paco_revert; paco_cofix_auto). + apply _paco8_3_0_acc. Qed. Theorem paco8_3_1_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <8= rr) (CIH: l <_paco_8= rr), l <_paco_8= paco8_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <8= rr) (CIH: l <8= rr), l <8= paco8_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), l <8= paco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco8_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \8/ l) r_2 x0 x1 x2 x3 x4 x5 x6 x7) by eauto. - clear PR; repeat (try left; do 9 paco_revert; paco_cofix_auto). + apply _paco8_3_1_acc. Qed. Theorem paco8_3_2_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <8= rr) (CIH: l <_paco_8= rr), l <_paco_8= paco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <8= rr) (CIH: l <8= rr), l <8= paco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), l <8= paco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \8/ l) x0 x1 x2 x3 x4 x5 x6 x7) by eauto. - clear PR; repeat (try left; do 9 paco_revert; paco_cofix_auto). + apply _paco8_3_2_acc. Qed. Theorem paco8_3_0_mon: monotone8_3 (paco8_3_0 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 9 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone8_3_eq. + apply _paco8_3_0_mon. +Qed. Theorem paco8_3_1_mon: monotone8_3 (paco8_3_1 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 9 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone8_3_eq. + apply _paco8_3_1_mon. +Qed. Theorem paco8_3_2_mon: monotone8_3 (paco8_3_2 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 9 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone8_3_eq. + apply _paco8_3_2_mon. +Qed. Theorem paco8_3_0_mult_strong: forall r_0 r_1 r_2, paco8_3_0 gf_0 gf_1 gf_2 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <8= paco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 9 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco8_3_0_mult_strong. +Qed. Theorem paco8_3_1_mult_strong: forall r_0 r_1 r_2, paco8_3_1 gf_0 gf_1 gf_2 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <8= paco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 9 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco8_3_1_mult_strong. +Qed. Theorem paco8_3_2_mult_strong: forall r_0 r_1 r_2, paco8_3_2 gf_0 gf_1 gf_2 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <8= paco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 9 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco8_3_2_mult_strong. +Qed. Corollary paco8_3_0_mult: forall r_0 r_1 r_2, paco8_3_0 gf_0 gf_1 gf_2 (paco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <8= paco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. @@ -360,69 +679,105 @@ Proof. intros; eapply paco8_3_2_mult_strong, paco8_3_2_mon; eauto. Qed. Theorem paco8_3_0_fold: forall r_0 r_1 r_2, gf_0 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <8= paco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco8_3_0_fold. +Qed. Theorem paco8_3_1_fold: forall r_0 r_1 r_2, gf_1 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <8= paco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco8_3_1_fold. +Qed. Theorem paco8_3_2_fold: forall r_0 r_1 r_2, gf_2 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <8= paco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco8_3_2_fold. +Qed. Theorem paco8_3_0_unfold: forall (MON: monotone8_3 gf_0) (MON: monotone8_3 gf_1) (MON: monotone8_3 gf_2) r_0 r_1 r_2, paco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <8= gf_0 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone8_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco8_3_0_unfold; apply monotone8_3_eq; auto. +Qed. Theorem paco8_3_1_unfold: forall (MON: monotone8_3 gf_0) (MON: monotone8_3 gf_1) (MON: monotone8_3 gf_2) r_0 r_1 r_2, paco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <8= gf_1 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone8_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco8_3_1_unfold; apply monotone8_3_eq; auto. +Qed. Theorem paco8_3_2_unfold: forall (MON: monotone8_3 gf_0) (MON: monotone8_3 gf_1) (MON: monotone8_3 gf_2) r_0 r_1 r_2, paco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <8= gf_2 (upaco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone8_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco8_3_2_unfold; apply monotone8_3_eq; auto. +Qed. End Arg8_3. -Hint Unfold monotone8_3. -Hint Resolve paco8_3_0_fold. -Hint Resolve paco8_3_1_fold. -Hint Resolve paco8_3_2_fold. - -Arguments paco8_3_0_acc [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_1_acc [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_2_acc [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_0_mon [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_1_mon [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_2_mon [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_2_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_0_mult [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_1_mult [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_2_mult [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_0_fold [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_1_fold [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_2_fold [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_0_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_1_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 ]. -Arguments paco8_3_2_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 ]. - -Instance paco8_3_0_inst T0 T1 T2 T3 T4 T5 T6 T7 (gf_0 gf_1 gf_2 : rel8 T0 T1 T2 T3 T4 T5 T6 T7->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 : paco_class (paco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7) := +Arguments paco8_3_0_acc : clear implicits. +Arguments paco8_3_1_acc : clear implicits. +Arguments paco8_3_2_acc : clear implicits. +Arguments paco8_3_0_mon : clear implicits. +Arguments paco8_3_1_mon : clear implicits. +Arguments paco8_3_2_mon : clear implicits. +Arguments paco8_3_0_mult_strong : clear implicits. +Arguments paco8_3_1_mult_strong : clear implicits. +Arguments paco8_3_2_mult_strong : clear implicits. +Arguments paco8_3_0_mult : clear implicits. +Arguments paco8_3_1_mult : clear implicits. +Arguments paco8_3_2_mult : clear implicits. +Arguments paco8_3_0_fold : clear implicits. +Arguments paco8_3_1_fold : clear implicits. +Arguments paco8_3_2_fold : clear implicits. +Arguments paco8_3_0_unfold : clear implicits. +Arguments paco8_3_1_unfold : clear implicits. +Arguments paco8_3_2_unfold : clear implicits. + +Global Instance paco8_3_0_inst (gf_0 gf_1 gf_2 : rel8 T0 T1 T2 T3 T4 T5 T6 T7->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 : paco_class (paco8_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7) := { pacoacc := paco8_3_0_acc gf_0 gf_1 gf_2; pacomult := paco8_3_0_mult gf_0 gf_1 gf_2; pacofold := paco8_3_0_fold gf_0 gf_1 gf_2; pacounfold := paco8_3_0_unfold gf_0 gf_1 gf_2 }. -Instance paco8_3_1_inst T0 T1 T2 T3 T4 T5 T6 T7 (gf_0 gf_1 gf_2 : rel8 T0 T1 T2 T3 T4 T5 T6 T7->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 : paco_class (paco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7) := +Global Instance paco8_3_1_inst (gf_0 gf_1 gf_2 : rel8 T0 T1 T2 T3 T4 T5 T6 T7->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 : paco_class (paco8_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7) := { pacoacc := paco8_3_1_acc gf_0 gf_1 gf_2; pacomult := paco8_3_1_mult gf_0 gf_1 gf_2; pacofold := paco8_3_1_fold gf_0 gf_1 gf_2; pacounfold := paco8_3_1_unfold gf_0 gf_1 gf_2 }. -Instance paco8_3_2_inst T0 T1 T2 T3 T4 T5 T6 T7 (gf_0 gf_1 gf_2 : rel8 T0 T1 T2 T3 T4 T5 T6 T7->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 : paco_class (paco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7) := +Global Instance paco8_3_2_inst (gf_0 gf_1 gf_2 : rel8 T0 T1 T2 T3 T4 T5 T6 T7->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 : paco_class (paco8_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7) := { pacoacc := paco8_3_2_acc gf_0 gf_1 gf_2; pacomult := paco8_3_2_mult gf_0 gf_1 gf_2; pacofold := paco8_3_2_fold gf_0 gf_1 gf_2; pacounfold := paco8_3_2_unfold gf_0 gf_1 gf_2 }. +End PACO8. + +Global Opaque paco8. + +Hint Unfold upaco8. +Hint Resolve paco8_fold. +Hint Unfold monotone8. + +Global Opaque paco8_2_0. +Global Opaque paco8_2_1. + +Hint Unfold upaco8_2_0. +Hint Unfold upaco8_2_1. +Hint Resolve paco8_2_0_fold. +Hint Resolve paco8_2_1_fold. +Hint Unfold monotone8_2. + +Global Opaque paco8_3_0. +Global Opaque paco8_3_1. +Global Opaque paco8_3_2. + +Hint Unfold upaco8_3_0. +Hint Unfold upaco8_3_1. +Hint Unfold upaco8_3_2. +Hint Resolve paco8_3_0_fold. +Hint Resolve paco8_3_1_fold. +Hint Resolve paco8_3_2_fold. +Hint Unfold monotone8_3. + diff --git a/src/paco9.v b/src/paco9.v index ba2d1c6..2a45bcb 100644 --- a/src/paco9.v +++ b/src/paco9.v @@ -1,11 +1,9 @@ Require Export paconotation pacotacuser. -Require Import pacotac. +Require Import paconotation_internal pacotac pacon. Set Implicit Arguments. -(** ** Predicates of Arity 9 -*) +Section PACO9. -Section Arg9_def. Variable T0 : Type. Variable T1 : forall (x0: @T0), Type. Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. @@ -15,141 +13,223 @@ Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) ( Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. + +Record sig9T := + exist9T { + proj9T0: @T0; + proj9T1: @T1 proj9T0; + proj9T2: @T2 proj9T0 proj9T1; + proj9T3: @T3 proj9T0 proj9T1 proj9T2; + proj9T4: @T4 proj9T0 proj9T1 proj9T2 proj9T3; + proj9T5: @T5 proj9T0 proj9T1 proj9T2 proj9T3 proj9T4; + proj9T6: @T6 proj9T0 proj9T1 proj9T2 proj9T3 proj9T4 proj9T5; + proj9T7: @T7 proj9T0 proj9T1 proj9T2 proj9T3 proj9T4 proj9T5 proj9T6; + proj9T8: @T8 proj9T0 proj9T1 proj9T2 proj9T3 proj9T4 proj9T5 proj9T6 proj9T7; + }. + +Definition uncurry9 (R: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8): rel1 sig9T := fun x => R (proj9T0 x) (proj9T1 x) (proj9T2 x) (proj9T3 x) (proj9T4 x) (proj9T5 x) (proj9T6 x) (proj9T7 x) (proj9T8 x). + +Definition curry9 (R: rel1 sig9T): rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 := + fun x0 x1 x2 x3 x4 x5 x6 x7 x8 => R (exist9T x8). + +Lemma uncurry_map9 r0 r1 (LE : r0 <9== r1) : uncurry9 r0 <1== uncurry9 r1. +Proof. intros [] H. apply LE. auto. Qed. + +Lemma uncurry_map_rev9 r0 r1 (LE: uncurry9 r0 <1== uncurry9 r1) : r0 <9== r1. +Proof. + repeat_intros 9. intros H. apply (LE (exist9T x8) H). +Qed. + +Lemma curry_map9 r0 r1 (LE: r0 <1== r1) : curry9 r0 <9== curry9 r1. +Proof. + repeat_intros 9. intros H. apply (LE (exist9T x8) H). +Qed. + +Lemma curry_map_rev9 r0 r1 (LE: curry9 r0 <9== curry9 r1) : r0 <1== r1. +Proof. + intros [] H. apply LE. apply H. +Qed. + +Lemma uncurry_bij1_9 r : curry9 (uncurry9 r) <9== r. +Proof. unfold le9. repeat_intros 9; auto. Qed. + +Lemma uncurry_bij2_9 r : r <9== curry9 (uncurry9 r). +Proof. unfold le9. repeat_intros 9; auto. Qed. + +Lemma curry_bij1_9 r : uncurry9 (curry9 r) <1== r. +Proof. intros []; auto. Qed. + +Lemma curry_bij2_9 r : r <1== uncurry9 (curry9 r). +Proof. intros []; auto. Qed. + +Lemma uncurry_adjoint1_9 r0 r1 (LE: uncurry9 r0 <1== r1) : r0 <9== curry9 r1. +Proof. + apply uncurry_map_rev9. eapply le1_trans; [eauto|]. apply curry_bij2_9. +Qed. + +Lemma uncurry_adjoint2_9 r0 r1 (LE: r0 <9== curry9 r1) : uncurry9 r0 <1== r1. +Proof. + apply curry_map_rev9. eapply le9_trans; [|eauto]. apply uncurry_bij2_9. +Qed. + +Lemma curry_adjoint1_9 r0 r1 (LE: curry9 r0 <9== r1) : r0 <1== uncurry9 r1. +Proof. + apply curry_map_rev9. eapply le9_trans; [eauto|]. apply uncurry_bij2_9. +Qed. + +Lemma curry_adjoint2_9 r0 r1 (LE: r0 <1== uncurry9 r1) : curry9 r0 <9== r1. +Proof. + apply uncurry_map_rev9. eapply le1_trans; [|eauto]. apply curry_bij1_9. +Qed. + +(** ** Predicates of Arity 9 +*) + +Section Arg9_def. Variable gf : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8. Arguments gf : clear implicits. -CoInductive paco9( r: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) x0 x1 x2 x3 x4 x5 x6 x7 x8 : Prop := -| paco9_pfold pco - (LE : pco <9= (paco9 r \9/ r)) - (SIM: gf pco x0 x1 x2 x3 x4 x5 x6 x7 x8) -. +Definition paco9( r: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 := + curry9 (paco (fun R0 => uncurry9 (gf (curry9 R0))) (uncurry9 r)). + Definition upaco9( r: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) := paco9 r \9/ r. End Arg9_def. -Arguments paco9 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments upaco9 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. +Arguments paco9 : clear implicits. +Arguments upaco9 : clear implicits. Hint Unfold upaco9. Section Arg9_2_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. Variable gf_0 gf_1 : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. -CoInductive paco9_2_0( r_0 r_1: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) x0 x1 x2 x3 x4 x5 x6 x7 x8 : Prop := -| paco9_2_0_pfold pco_0 pco_1 - (LE : pco_0 <9= (paco9_2_0 r_0 r_1 \9/ r_0)) - (LE : pco_1 <9= (paco9_2_1 r_0 r_1 \9/ r_1)) - (SIM: gf_0 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6 x7 x8) -with paco9_2_1( r_0 r_1: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) x0 x1 x2 x3 x4 x5 x6 x7 x8 : Prop := -| paco9_2_1_pfold pco_0 pco_1 - (LE : pco_0 <9= (paco9_2_0 r_0 r_1 \9/ r_0)) - (LE : pco_1 <9= (paco9_2_1 r_0 r_1 \9/ r_1)) - (SIM: gf_1 pco_0 pco_1 x0 x1 x2 x3 x4 x5 x6 x7 x8) -. +Definition paco9_2_0( r_0 r_1: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 := + curry9 (paco_2_0 (fun R0 R1 => uncurry9 (gf_0 (curry9 R0) (curry9 R1))) (fun R0 R1 => uncurry9 (gf_1 (curry9 R0) (curry9 R1))) (uncurry9 r_0) (uncurry9 r_1)). + +Definition paco9_2_1( r_0 r_1: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 := + curry9 (paco_2_1 (fun R0 R1 => uncurry9 (gf_0 (curry9 R0) (curry9 R1))) (fun R0 R1 => uncurry9 (gf_1 (curry9 R0) (curry9 R1))) (uncurry9 r_0) (uncurry9 r_1)). + Definition upaco9_2_0( r_0 r_1: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) := paco9_2_0 r_0 r_1 \9/ r_0. Definition upaco9_2_1( r_0 r_1: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) := paco9_2_1 r_0 r_1 \9/ r_1. End Arg9_2_def. -Arguments paco9_2_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments upaco9_2_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. +Arguments paco9_2_0 : clear implicits. +Arguments upaco9_2_0 : clear implicits. Hint Unfold upaco9_2_0. -Arguments paco9_2_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments upaco9_2_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. +Arguments paco9_2_1 : clear implicits. +Arguments upaco9_2_1 : clear implicits. Hint Unfold upaco9_2_1. Section Arg9_3_def. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. Variable gf_0 gf_1 gf_2 : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. -CoInductive paco9_3_0( r_0 r_1 r_2: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) x0 x1 x2 x3 x4 x5 x6 x7 x8 : Prop := -| paco9_3_0_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <9= (paco9_3_0 r_0 r_1 r_2 \9/ r_0)) - (LE : pco_1 <9= (paco9_3_1 r_0 r_1 r_2 \9/ r_1)) - (LE : pco_2 <9= (paco9_3_2 r_0 r_1 r_2 \9/ r_2)) - (SIM: gf_0 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8) -with paco9_3_1( r_0 r_1 r_2: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) x0 x1 x2 x3 x4 x5 x6 x7 x8 : Prop := -| paco9_3_1_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <9= (paco9_3_0 r_0 r_1 r_2 \9/ r_0)) - (LE : pco_1 <9= (paco9_3_1 r_0 r_1 r_2 \9/ r_1)) - (LE : pco_2 <9= (paco9_3_2 r_0 r_1 r_2 \9/ r_2)) - (SIM: gf_1 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8) -with paco9_3_2( r_0 r_1 r_2: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) x0 x1 x2 x3 x4 x5 x6 x7 x8 : Prop := -| paco9_3_2_pfold pco_0 pco_1 pco_2 - (LE : pco_0 <9= (paco9_3_0 r_0 r_1 r_2 \9/ r_0)) - (LE : pco_1 <9= (paco9_3_1 r_0 r_1 r_2 \9/ r_1)) - (LE : pco_2 <9= (paco9_3_2 r_0 r_1 r_2 \9/ r_2)) - (SIM: gf_2 pco_0 pco_1 pco_2 x0 x1 x2 x3 x4 x5 x6 x7 x8) -. +Definition paco9_3_0( r_0 r_1 r_2: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 := + curry9 (paco_3_0 (fun R0 R1 R2 => uncurry9 (gf_0 (curry9 R0) (curry9 R1) (curry9 R2))) (fun R0 R1 R2 => uncurry9 (gf_1 (curry9 R0) (curry9 R1) (curry9 R2))) (fun R0 R1 R2 => uncurry9 (gf_2 (curry9 R0) (curry9 R1) (curry9 R2))) (uncurry9 r_0) (uncurry9 r_1) (uncurry9 r_2)). + +Definition paco9_3_1( r_0 r_1 r_2: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 := + curry9 (paco_3_1 (fun R0 R1 R2 => uncurry9 (gf_0 (curry9 R0) (curry9 R1) (curry9 R2))) (fun R0 R1 R2 => uncurry9 (gf_1 (curry9 R0) (curry9 R1) (curry9 R2))) (fun R0 R1 R2 => uncurry9 (gf_2 (curry9 R0) (curry9 R1) (curry9 R2))) (uncurry9 r_0) (uncurry9 r_1) (uncurry9 r_2)). + +Definition paco9_3_2( r_0 r_1 r_2: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 := + curry9 (paco_3_2 (fun R0 R1 R2 => uncurry9 (gf_0 (curry9 R0) (curry9 R1) (curry9 R2))) (fun R0 R1 R2 => uncurry9 (gf_1 (curry9 R0) (curry9 R1) (curry9 R2))) (fun R0 R1 R2 => uncurry9 (gf_2 (curry9 R0) (curry9 R1) (curry9 R2))) (uncurry9 r_0) (uncurry9 r_1) (uncurry9 r_2)). + Definition upaco9_3_0( r_0 r_1 r_2: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) := paco9_3_0 r_0 r_1 r_2 \9/ r_0. Definition upaco9_3_1( r_0 r_1 r_2: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) := paco9_3_1 r_0 r_1 r_2 \9/ r_1. Definition upaco9_3_2( r_0 r_1 r_2: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) := paco9_3_2 r_0 r_1 r_2 \9/ r_2. End Arg9_3_def. -Arguments paco9_3_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments upaco9_3_0 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. +Arguments paco9_3_0 : clear implicits. +Arguments upaco9_3_0 : clear implicits. Hint Unfold upaco9_3_0. -Arguments paco9_3_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments upaco9_3_1 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. +Arguments paco9_3_1 : clear implicits. +Arguments upaco9_3_1 : clear implicits. Hint Unfold upaco9_3_1. -Arguments paco9_3_2 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments upaco9_3_2 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. +Arguments paco9_3_2 : clear implicits. +Arguments upaco9_3_2 : clear implicits. Hint Unfold upaco9_3_2. -(* Less than or equal - internal use only *) -Notation "p <_paco_9= q" := - (forall _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 (PR: p _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 : Prop), q _paco_x0 _paco_x1 _paco_x2 _paco_x3 _paco_x4 _paco_x5 _paco_x6 _paco_x7 _paco_x8 : Prop) - (at level 50, no associativity). - (** 1 Mutual Coinduction *) Section Arg9_1. -Definition monotone9 T0 T1 T2 T3 T4 T5 T6 T7 T8 (gf: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) := +Definition monotone9 (gf: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 r r' (IN: gf r x0 x1 x2 x3 x4 x5 x6 x7 x8) (LE: r <9= r'), gf r' x0 x1 x2 x3 x4 x5 x6 x7 x8. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. +Definition _monotone9 (gf: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) := + forall r r'(LE: r <9= r'), gf r <9== gf r'. + +Lemma monotone9_eq (gf: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) : + monotone9 gf <-> _monotone9 gf. +Proof. unfold monotone9, _monotone9, le9. split; eauto. Qed. + +Lemma monotone9_map (gf: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) + (MON: _monotone9 gf) : + _monotone (fun R0 => uncurry9 (gf (curry9 R0))). +Proof. + repeat_intros 3. apply uncurry_map9. apply MON; apply curry_map9; auto. +Qed. + Variable gf : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8. Arguments gf : clear implicits. +Theorem _paco9_mon: _monotone9 (paco9 gf). +Proof. + repeat_intros 3. eapply curry_map9, _paco_mon; apply uncurry_map9; auto. +Qed. + +Theorem _paco9_acc: forall + l r (OBG: forall rr (INC: r <9== rr) (CIH: l <9== rr), l <9== paco9 gf rr), + l <9== paco9 gf r. +Proof. + intros. apply uncurry_adjoint1_9. + eapply _paco_acc. intros. + apply uncurry_adjoint1_9 in INC. apply uncurry_adjoint1_9 in CIH. + apply uncurry_adjoint2_9. + eapply le9_trans. eapply (OBG _ INC CIH). + apply curry_map9. + apply _paco_mon; try apply le1_refl; apply curry_bij1_9. +Qed. + +Theorem _paco9_mult_strong: forall r, + paco9 gf (upaco9 gf r) <9== paco9 gf r. +Proof. + intros. apply curry_map9. + eapply le1_trans; [| eapply _paco_mult_strong]. + apply _paco_mon; intros []; eauto. +Qed. + +Theorem _paco9_fold: forall r, + gf (upaco9 gf r) <9== paco9 gf r. +Proof. + intros. apply uncurry_adjoint1_9. + eapply le1_trans; [| apply _paco_fold]. apply le1_refl. +Qed. + +Theorem _paco9_unfold: forall (MON: _monotone9 gf) r, + paco9 gf r <9== gf (upaco9 gf r). +Proof. + intros. apply curry_adjoint2_9. + eapply _paco_unfold; apply monotone9_map; auto. +Qed. + Theorem paco9_acc: forall - l r (OBG: forall rr (INC: r <9= rr) (CIH: l <_paco_9= rr), l <_paco_9= paco9 gf rr), + l r (OBG: forall rr (INC: r <9= rr) (CIH: l <9= rr), l <9= paco9 gf rr), l <9= paco9 gf r. Proof. - intros; assert (SIM: paco9 gf (r \9/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8) by eauto. - clear PR; repeat (try left; do 10 paco_revert; paco_cofix_auto). + apply _paco9_acc. Qed. Theorem paco9_mon: monotone9 (paco9 gf). -Proof. paco_cofix_auto; repeat (left; do 10 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone9_eq. + apply _paco9_mon. +Qed. Theorem paco9_mult_strong: forall r, paco9 gf (upaco9 gf r) <9= paco9 gf r. -Proof. paco_cofix_auto; repeat (left; do 10 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco9_mult_strong. +Qed. Corollary paco9_mult: forall r, paco9 gf (paco9 gf r) <9= paco9 gf r. @@ -157,25 +237,26 @@ Proof. intros; eapply paco9_mult_strong, paco9_mon; eauto. Qed. Theorem paco9_fold: forall r, gf (upaco9 gf r) <9= paco9 gf r. -Proof. intros; econstructor; [ |eauto]; eauto. Qed. +Proof. + apply _paco9_fold. +Qed. Theorem paco9_unfold: forall (MON: monotone9 gf) r, paco9 gf r <9= gf (upaco9 gf r). -Proof. unfold monotone9; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 1. eapply _paco9_unfold; apply monotone9_eq; auto. +Qed. End Arg9_1. -Hint Unfold monotone9. -Hint Resolve paco9_fold. - -Arguments paco9_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. +Arguments paco9_acc : clear implicits. +Arguments paco9_mon : clear implicits. +Arguments paco9_mult_strong : clear implicits. +Arguments paco9_mult : clear implicits. +Arguments paco9_fold : clear implicits. +Arguments paco9_unfold : clear implicits. -Instance paco9_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 (gf : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8->_) r x0 x1 x2 x3 x4 x5 x6 x7 x8 : paco_class (paco9 gf r x0 x1 x2 x3 x4 x5 x6 x7 x8) := +Global Instance paco9_inst (gf : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8->_) r x0 x1 x2 x3 x4 x5 x6 x7 x8 : paco_class (paco9 gf r x0 x1 x2 x3 x4 x5 x6 x7 x8) := { pacoacc := paco9_acc gf; pacomult := paco9_mult gf; pacofold := paco9_fold gf; @@ -185,51 +266,144 @@ Instance paco9_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 (gf : rel9 T0 T1 T2 T3 T4 T5 T6 Section Arg9_2. -Definition monotone9_2 T0 T1 T2 T3 T4 T5 T6 T7 T8 (gf: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) := +Definition monotone9_2 (gf: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8) (LE_0: r_0 <9= r'_0)(LE_1: r_1 <9= r'_1), gf r'_0 r'_1 x0 x1 x2 x3 x4 x5 x6 x7 x8. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. +Definition _monotone9_2 (gf: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <9= r'_0)(LE_1: r_1 <9= r'_1), gf r_0 r_1 <9== gf r'_0 r'_1. + +Lemma monotone9_2_eq (gf: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) : + monotone9_2 gf <-> _monotone9_2 gf. +Proof. unfold monotone9_2, _monotone9_2, le9. split; eauto. Qed. + +Lemma monotone9_2_map (gf: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) + (MON: _monotone9_2 gf) : + _monotone_2 (fun R0 R1 => uncurry9 (gf (curry9 R0) (curry9 R1))). +Proof. + repeat_intros 6. apply uncurry_map9. apply MON; apply curry_map9; auto. +Qed. + Variable gf_0 gf_1 : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. +Theorem _paco9_2_0_mon: _monotone9_2 (paco9_2_0 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map9, _paco_2_0_mon; apply uncurry_map9; auto. +Qed. + +Theorem _paco9_2_1_mon: _monotone9_2 (paco9_2_1 gf_0 gf_1). +Proof. + repeat_intros 6. eapply curry_map9, _paco_2_1_mon; apply uncurry_map9; auto. +Qed. + +Theorem _paco9_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <9== rr) (CIH: l <9== rr), l <9== paco9_2_0 gf_0 gf_1 rr r_1), + l <9== paco9_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_9. + eapply _paco_2_0_acc. intros. + apply uncurry_adjoint1_9 in INC. apply uncurry_adjoint1_9 in CIH. + apply uncurry_adjoint2_9. + eapply le9_trans. eapply (OBG _ INC CIH). + apply curry_map9. + apply _paco_2_0_mon; try apply le1_refl; apply curry_bij1_9. +Qed. + +Theorem _paco9_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <9== rr) (CIH: l <9== rr), l <9== paco9_2_1 gf_0 gf_1 r_0 rr), + l <9== paco9_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_9. + eapply _paco_2_1_acc. intros. + apply uncurry_adjoint1_9 in INC. apply uncurry_adjoint1_9 in CIH. + apply uncurry_adjoint2_9. + eapply le9_trans. eapply (OBG _ INC CIH). + apply curry_map9. + apply _paco_2_1_mon; try apply le1_refl; apply curry_bij1_9. +Qed. + +Theorem _paco9_2_0_mult_strong: forall r_0 r_1, + paco9_2_0 gf_0 gf_1 (upaco9_2_0 gf_0 gf_1 r_0 r_1) (upaco9_2_1 gf_0 gf_1 r_0 r_1) <9== paco9_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map9. + eapply le1_trans; [| eapply _paco_2_0_mult_strong]. + apply _paco_2_0_mon; intros []; eauto. +Qed. + +Theorem _paco9_2_1_mult_strong: forall r_0 r_1, + paco9_2_1 gf_0 gf_1 (upaco9_2_0 gf_0 gf_1 r_0 r_1) (upaco9_2_1 gf_0 gf_1 r_0 r_1) <9== paco9_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply curry_map9. + eapply le1_trans; [| eapply _paco_2_1_mult_strong]. + apply _paco_2_1_mon; intros []; eauto. +Qed. + +Theorem _paco9_2_0_fold: forall r_0 r_1, + gf_0 (upaco9_2_0 gf_0 gf_1 r_0 r_1) (upaco9_2_1 gf_0 gf_1 r_0 r_1) <9== paco9_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_9. + eapply le1_trans; [| apply _paco_2_0_fold]. apply le1_refl. +Qed. + +Theorem _paco9_2_1_fold: forall r_0 r_1, + gf_1 (upaco9_2_0 gf_0 gf_1 r_0 r_1) (upaco9_2_1 gf_0 gf_1 r_0 r_1) <9== paco9_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros. apply uncurry_adjoint1_9. + eapply le1_trans; [| apply _paco_2_1_fold]. apply le1_refl. +Qed. + +Theorem _paco9_2_0_unfold: forall (MON: _monotone9_2 gf_0) (MON: _monotone9_2 gf_1) r_0 r_1, + paco9_2_0 gf_0 gf_1 r_0 r_1 <9== gf_0 (upaco9_2_0 gf_0 gf_1 r_0 r_1) (upaco9_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_9. + eapply _paco_2_0_unfold; apply monotone9_2_map; auto. +Qed. + +Theorem _paco9_2_1_unfold: forall (MON: _monotone9_2 gf_0) (MON: _monotone9_2 gf_1) r_0 r_1, + paco9_2_1 gf_0 gf_1 r_0 r_1 <9== gf_1 (upaco9_2_0 gf_0 gf_1 r_0 r_1) (upaco9_2_1 gf_0 gf_1 r_0 r_1). +Proof. + intros. apply curry_adjoint2_9. + eapply _paco_2_1_unfold; apply monotone9_2_map; auto. +Qed. + Theorem paco9_2_0_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_0 <9= rr) (CIH: l <_paco_9= rr), l <_paco_9= paco9_2_0 gf_0 gf_1 rr r_1), + l r_0 r_1 (OBG: forall rr (INC: r_0 <9= rr) (CIH: l <9= rr), l <9= paco9_2_0 gf_0 gf_1 rr r_1), l <9= paco9_2_0 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco9_2_0 gf_0 gf_1 (r_0 \9/ l) r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8) by eauto. - clear PR; repeat (try left; do 10 paco_revert; paco_cofix_auto). + apply _paco9_2_0_acc. Qed. Theorem paco9_2_1_acc: forall - l r_0 r_1 (OBG: forall rr (INC: r_1 <9= rr) (CIH: l <_paco_9= rr), l <_paco_9= paco9_2_1 gf_0 gf_1 r_0 rr), + l r_0 r_1 (OBG: forall rr (INC: r_1 <9= rr) (CIH: l <9= rr), l <9= paco9_2_1 gf_0 gf_1 r_0 rr), l <9= paco9_2_1 gf_0 gf_1 r_0 r_1. Proof. - intros; assert (SIM: paco9_2_1 gf_0 gf_1 r_0 (r_1 \9/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8) by eauto. - clear PR; repeat (try left; do 10 paco_revert; paco_cofix_auto). + apply _paco9_2_1_acc. Qed. Theorem paco9_2_0_mon: monotone9_2 (paco9_2_0 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 10 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone9_2_eq. + apply _paco9_2_0_mon. +Qed. Theorem paco9_2_1_mon: monotone9_2 (paco9_2_1 gf_0 gf_1). -Proof. paco_cofix_auto; repeat (left; do 10 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone9_2_eq. + apply _paco9_2_1_mon. +Qed. Theorem paco9_2_0_mult_strong: forall r_0 r_1, paco9_2_0 gf_0 gf_1 (upaco9_2_0 gf_0 gf_1 r_0 r_1) (upaco9_2_1 gf_0 gf_1 r_0 r_1) <9= paco9_2_0 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 10 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco9_2_0_mult_strong. +Qed. Theorem paco9_2_1_mult_strong: forall r_0 r_1, paco9_2_1 gf_0 gf_1 (upaco9_2_0 gf_0 gf_1 r_0 r_1) (upaco9_2_1 gf_0 gf_1 r_0 r_1) <9= paco9_2_1 gf_0 gf_1 r_0 r_1. -Proof. paco_cofix_auto; repeat (left; do 10 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco9_2_1_mult_strong. +Qed. Corollary paco9_2_0_mult: forall r_0 r_1, paco9_2_0 gf_0 gf_1 (paco9_2_0 gf_0 gf_1 r_0 r_1) (paco9_2_1 gf_0 gf_1 r_0 r_1) <9= paco9_2_0 gf_0 gf_1 r_0 r_1. @@ -241,46 +415,50 @@ Proof. intros; eapply paco9_2_1_mult_strong, paco9_2_1_mon; eauto. Qed. Theorem paco9_2_0_fold: forall r_0 r_1, gf_0 (upaco9_2_0 gf_0 gf_1 r_0 r_1) (upaco9_2_1 gf_0 gf_1 r_0 r_1) <9= paco9_2_0 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco9_2_0_fold. +Qed. Theorem paco9_2_1_fold: forall r_0 r_1, gf_1 (upaco9_2_0 gf_0 gf_1 r_0 r_1) (upaco9_2_1 gf_0 gf_1 r_0 r_1) <9= paco9_2_1 gf_0 gf_1 r_0 r_1. -Proof. intros; econstructor; [ | |eauto]; eauto. Qed. +Proof. + apply _paco9_2_1_fold. +Qed. Theorem paco9_2_0_unfold: forall (MON: monotone9_2 gf_0) (MON: monotone9_2 gf_1) r_0 r_1, paco9_2_0 gf_0 gf_1 r_0 r_1 <9= gf_0 (upaco9_2_0 gf_0 gf_1 r_0 r_1) (upaco9_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone9_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco9_2_0_unfold; apply monotone9_2_eq; auto. +Qed. Theorem paco9_2_1_unfold: forall (MON: monotone9_2 gf_0) (MON: monotone9_2 gf_1) r_0 r_1, paco9_2_1 gf_0 gf_1 r_0 r_1 <9= gf_1 (upaco9_2_0 gf_0 gf_1 r_0 r_1) (upaco9_2_1 gf_0 gf_1 r_0 r_1). -Proof. unfold monotone9_2; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 2. eapply _paco9_2_1_unfold; apply monotone9_2_eq; auto. +Qed. End Arg9_2. -Hint Unfold monotone9_2. -Hint Resolve paco9_2_0_fold. -Hint Resolve paco9_2_1_fold. - -Arguments paco9_2_0_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_2_1_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_2_0_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_2_1_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_2_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_2_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_2_0_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_2_1_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_2_0_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_2_1_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_2_0_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_2_1_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. - -Instance paco9_2_0_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 (gf_0 gf_1 : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 : paco_class (paco9_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8) := +Arguments paco9_2_0_acc : clear implicits. +Arguments paco9_2_1_acc : clear implicits. +Arguments paco9_2_0_mon : clear implicits. +Arguments paco9_2_1_mon : clear implicits. +Arguments paco9_2_0_mult_strong : clear implicits. +Arguments paco9_2_1_mult_strong : clear implicits. +Arguments paco9_2_0_mult : clear implicits. +Arguments paco9_2_1_mult : clear implicits. +Arguments paco9_2_0_fold : clear implicits. +Arguments paco9_2_1_fold : clear implicits. +Arguments paco9_2_0_unfold : clear implicits. +Arguments paco9_2_1_unfold : clear implicits. + +Global Instance paco9_2_0_inst (gf_0 gf_1 : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 : paco_class (paco9_2_0 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8) := { pacoacc := paco9_2_0_acc gf_0 gf_1; pacomult := paco9_2_0_mult gf_0 gf_1; pacofold := paco9_2_0_fold gf_0 gf_1; pacounfold := paco9_2_0_unfold gf_0 gf_1 }. -Instance paco9_2_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 (gf_0 gf_1 : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 : paco_class (paco9_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8) := +Global Instance paco9_2_1_inst (gf_0 gf_1 : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8->_) r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8 : paco_class (paco9_2_1 gf_0 gf_1 r_0 r_1 x0 x1 x2 x3 x4 x5 x6 x7 x8) := { pacoacc := paco9_2_1_acc gf_0 gf_1; pacomult := paco9_2_1_mult gf_0 gf_1; pacofold := paco9_2_1_fold gf_0 gf_1; @@ -290,67 +468,204 @@ Instance paco9_2_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 (gf_0 gf_1 : rel9 T0 T1 T2 T Section Arg9_3. -Definition monotone9_3 T0 T1 T2 T3 T4 T5 T6 T7 T8 (gf: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) := +Definition monotone9_3 (gf: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) := forall x0 x1 x2 x3 x4 x5 x6 x7 x8 r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8) (LE_0: r_0 <9= r'_0)(LE_1: r_1 <9= r'_1)(LE_2: r_2 <9= r'_2), gf r'_0 r'_1 r'_2 x0 x1 x2 x3 x4 x5 x6 x7 x8. -Variable T0 : Type. -Variable T1 : forall (x0: @T0), Type. -Variable T2 : forall (x0: @T0) (x1: @T1 x0), Type. -Variable T3 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1), Type. -Variable T4 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2), Type. -Variable T5 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3), Type. -Variable T6 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4), Type. -Variable T7 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5), Type. -Variable T8 : forall (x0: @T0) (x1: @T1 x0) (x2: @T2 x0 x1) (x3: @T3 x0 x1 x2) (x4: @T4 x0 x1 x2 x3) (x5: @T5 x0 x1 x2 x3 x4) (x6: @T6 x0 x1 x2 x3 x4 x5) (x7: @T7 x0 x1 x2 x3 x4 x5 x6), Type. +Definition _monotone9_3 (gf: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <9= r'_0)(LE_1: r_1 <9= r'_1)(LE_2: r_2 <9= r'_2), gf r_0 r_1 r_2 <9== gf r'_0 r'_1 r'_2. + +Lemma monotone9_3_eq (gf: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) : + monotone9_3 gf <-> _monotone9_3 gf. +Proof. unfold monotone9_3, _monotone9_3, le9. split; eauto. Qed. + +Lemma monotone9_3_map (gf: rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) + (MON: _monotone9_3 gf) : + _monotone_3 (fun R0 R1 R2 => uncurry9 (gf (curry9 R0) (curry9 R1) (curry9 R2))). +Proof. + repeat_intros 9. apply uncurry_map9. apply MON; apply curry_map9; auto. +Qed. + Variable gf_0 gf_1 gf_2 : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8 -> rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8. Arguments gf_0 : clear implicits. Arguments gf_1 : clear implicits. Arguments gf_2 : clear implicits. +Theorem _paco9_3_0_mon: _monotone9_3 (paco9_3_0 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map9, _paco_3_0_mon; apply uncurry_map9; auto. +Qed. + +Theorem _paco9_3_1_mon: _monotone9_3 (paco9_3_1 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map9, _paco_3_1_mon; apply uncurry_map9; auto. +Qed. + +Theorem _paco9_3_2_mon: _monotone9_3 (paco9_3_2 gf_0 gf_1 gf_2). +Proof. + repeat_intros 9. eapply curry_map9, _paco_3_2_mon; apply uncurry_map9; auto. +Qed. + +Theorem _paco9_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <9== rr) (CIH: l <9== rr), l <9== paco9_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <9== paco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_9. + eapply _paco_3_0_acc. intros. + apply uncurry_adjoint1_9 in INC. apply uncurry_adjoint1_9 in CIH. + apply uncurry_adjoint2_9. + eapply le9_trans. eapply (OBG _ INC CIH). + apply curry_map9. + apply _paco_3_0_mon; try apply le1_refl; apply curry_bij1_9. +Qed. + +Theorem _paco9_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <9== rr) (CIH: l <9== rr), l <9== paco9_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <9== paco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_9. + eapply _paco_3_1_acc. intros. + apply uncurry_adjoint1_9 in INC. apply uncurry_adjoint1_9 in CIH. + apply uncurry_adjoint2_9. + eapply le9_trans. eapply (OBG _ INC CIH). + apply curry_map9. + apply _paco_3_1_mon; try apply le1_refl; apply curry_bij1_9. +Qed. + +Theorem _paco9_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <9== rr) (CIH: l <9== rr), l <9== paco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <9== paco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_9. + eapply _paco_3_2_acc. intros. + apply uncurry_adjoint1_9 in INC. apply uncurry_adjoint1_9 in CIH. + apply uncurry_adjoint2_9. + eapply le9_trans. eapply (OBG _ INC CIH). + apply curry_map9. + apply _paco_3_2_mon; try apply le1_refl; apply curry_bij1_9. +Qed. + +Theorem _paco9_3_0_mult_strong: forall r_0 r_1 r_2, + paco9_3_0 gf_0 gf_1 gf_2 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <9== paco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map9. + eapply le1_trans; [| eapply _paco_3_0_mult_strong]. + apply _paco_3_0_mon; intros []; eauto. +Qed. + +Theorem _paco9_3_1_mult_strong: forall r_0 r_1 r_2, + paco9_3_1 gf_0 gf_1 gf_2 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <9== paco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map9. + eapply le1_trans; [| eapply _paco_3_1_mult_strong]. + apply _paco_3_1_mon; intros []; eauto. +Qed. + +Theorem _paco9_3_2_mult_strong: forall r_0 r_1 r_2, + paco9_3_2 gf_0 gf_1 gf_2 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <9== paco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply curry_map9. + eapply le1_trans; [| eapply _paco_3_2_mult_strong]. + apply _paco_3_2_mon; intros []; eauto. +Qed. + +Theorem _paco9_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <9== paco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_9. + eapply le1_trans; [| apply _paco_3_0_fold]. apply le1_refl. +Qed. + +Theorem _paco9_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <9== paco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_9. + eapply le1_trans; [| apply _paco_3_1_fold]. apply le1_refl. +Qed. + +Theorem _paco9_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <9== paco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros. apply uncurry_adjoint1_9. + eapply le1_trans; [| apply _paco_3_2_fold]. apply le1_refl. +Qed. + +Theorem _paco9_3_0_unfold: forall (MON: _monotone9_3 gf_0) (MON: _monotone9_3 gf_1) (MON: _monotone9_3 gf_2) r_0 r_1 r_2, + paco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <9== gf_0 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_9. + eapply _paco_3_0_unfold; apply monotone9_3_map; auto. +Qed. + +Theorem _paco9_3_1_unfold: forall (MON: _monotone9_3 gf_0) (MON: _monotone9_3 gf_1) (MON: _monotone9_3 gf_2) r_0 r_1 r_2, + paco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <9== gf_1 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_9. + eapply _paco_3_1_unfold; apply monotone9_3_map; auto. +Qed. + +Theorem _paco9_3_2_unfold: forall (MON: _monotone9_3 gf_0) (MON: _monotone9_3 gf_1) (MON: _monotone9_3 gf_2) r_0 r_1 r_2, + paco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <9== gf_2 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + intros. apply curry_adjoint2_9. + eapply _paco_3_2_unfold; apply monotone9_3_map; auto. +Qed. + Theorem paco9_3_0_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <9= rr) (CIH: l <_paco_9= rr), l <_paco_9= paco9_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <9= rr) (CIH: l <9= rr), l <9= paco9_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), l <9= paco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco9_3_0 gf_0 gf_1 gf_2 (r_0 \9/ l) r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8) by eauto. - clear PR; repeat (try left; do 10 paco_revert; paco_cofix_auto). + apply _paco9_3_0_acc. Qed. Theorem paco9_3_1_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <9= rr) (CIH: l <_paco_9= rr), l <_paco_9= paco9_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <9= rr) (CIH: l <9= rr), l <9= paco9_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), l <9= paco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco9_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \9/ l) r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8) by eauto. - clear PR; repeat (try left; do 10 paco_revert; paco_cofix_auto). + apply _paco9_3_1_acc. Qed. Theorem paco9_3_2_acc: forall - l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <9= rr) (CIH: l <_paco_9= rr), l <_paco_9= paco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <9= rr) (CIH: l <9= rr), l <9= paco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), l <9= paco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. Proof. - intros; assert (SIM: paco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \9/ l) x0 x1 x2 x3 x4 x5 x6 x7 x8) by eauto. - clear PR; repeat (try left; do 10 paco_revert; paco_cofix_auto). + apply _paco9_3_2_acc. Qed. Theorem paco9_3_0_mon: monotone9_3 (paco9_3_0 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 10 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone9_3_eq. + apply _paco9_3_0_mon. +Qed. Theorem paco9_3_1_mon: monotone9_3 (paco9_3_1 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 10 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone9_3_eq. + apply _paco9_3_1_mon. +Qed. Theorem paco9_3_2_mon: monotone9_3 (paco9_3_2 gf_0 gf_1 gf_2). -Proof. paco_cofix_auto; repeat (left; do 10 paco_revert; paco_cofix_auto). Qed. +Proof. + apply monotone9_3_eq. + apply _paco9_3_2_mon. +Qed. Theorem paco9_3_0_mult_strong: forall r_0 r_1 r_2, paco9_3_0 gf_0 gf_1 gf_2 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <9= paco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 10 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco9_3_0_mult_strong. +Qed. Theorem paco9_3_1_mult_strong: forall r_0 r_1 r_2, paco9_3_1 gf_0 gf_1 gf_2 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <9= paco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 10 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco9_3_1_mult_strong. +Qed. Theorem paco9_3_2_mult_strong: forall r_0 r_1 r_2, paco9_3_2 gf_0 gf_1 gf_2 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <9= paco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. paco_cofix_auto; repeat (left; do 10 paco_revert; paco_cofix_auto). Qed. +Proof. + apply _paco9_3_2_mult_strong. +Qed. Corollary paco9_3_0_mult: forall r_0 r_1 r_2, paco9_3_0 gf_0 gf_1 gf_2 (paco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <9= paco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. @@ -366,69 +681,105 @@ Proof. intros; eapply paco9_3_2_mult_strong, paco9_3_2_mon; eauto. Qed. Theorem paco9_3_0_fold: forall r_0 r_1 r_2, gf_0 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <9= paco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco9_3_0_fold. +Qed. Theorem paco9_3_1_fold: forall r_0 r_1 r_2, gf_1 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <9= paco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco9_3_1_fold. +Qed. Theorem paco9_3_2_fold: forall r_0 r_1 r_2, gf_2 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <9= paco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. -Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. +Proof. + apply _paco9_3_2_fold. +Qed. Theorem paco9_3_0_unfold: forall (MON: monotone9_3 gf_0) (MON: monotone9_3 gf_1) (MON: monotone9_3 gf_2) r_0 r_1 r_2, paco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <9= gf_0 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone9_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco9_3_0_unfold; apply monotone9_3_eq; auto. +Qed. Theorem paco9_3_1_unfold: forall (MON: monotone9_3 gf_0) (MON: monotone9_3 gf_1) (MON: monotone9_3 gf_2) r_0 r_1 r_2, paco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <9= gf_1 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone9_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco9_3_1_unfold; apply monotone9_3_eq; auto. +Qed. Theorem paco9_3_2_unfold: forall (MON: monotone9_3 gf_0) (MON: monotone9_3 gf_1) (MON: monotone9_3 gf_2) r_0 r_1 r_2, paco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <9= gf_2 (upaco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). -Proof. unfold monotone9_3; intros; destruct PR; eauto. Qed. +Proof. + repeat_intros 3. eapply _paco9_3_2_unfold; apply monotone9_3_eq; auto. +Qed. End Arg9_3. -Hint Unfold monotone9_3. -Hint Resolve paco9_3_0_fold. -Hint Resolve paco9_3_1_fold. -Hint Resolve paco9_3_2_fold. - -Arguments paco9_3_0_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_1_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_2_acc [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_0_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_1_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_2_mon [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_0_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_1_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_2_mult_strong [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_0_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_1_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_2_mult [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_0_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_1_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_2_fold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_0_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_1_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. -Arguments paco9_3_2_unfold [ T0 T1 T2 T3 T4 T5 T6 T7 T8 ]. - -Instance paco9_3_0_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 (gf_0 gf_1 gf_2 : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 : paco_class (paco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8) := +Arguments paco9_3_0_acc : clear implicits. +Arguments paco9_3_1_acc : clear implicits. +Arguments paco9_3_2_acc : clear implicits. +Arguments paco9_3_0_mon : clear implicits. +Arguments paco9_3_1_mon : clear implicits. +Arguments paco9_3_2_mon : clear implicits. +Arguments paco9_3_0_mult_strong : clear implicits. +Arguments paco9_3_1_mult_strong : clear implicits. +Arguments paco9_3_2_mult_strong : clear implicits. +Arguments paco9_3_0_mult : clear implicits. +Arguments paco9_3_1_mult : clear implicits. +Arguments paco9_3_2_mult : clear implicits. +Arguments paco9_3_0_fold : clear implicits. +Arguments paco9_3_1_fold : clear implicits. +Arguments paco9_3_2_fold : clear implicits. +Arguments paco9_3_0_unfold : clear implicits. +Arguments paco9_3_1_unfold : clear implicits. +Arguments paco9_3_2_unfold : clear implicits. + +Global Instance paco9_3_0_inst (gf_0 gf_1 gf_2 : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 : paco_class (paco9_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8) := { pacoacc := paco9_3_0_acc gf_0 gf_1 gf_2; pacomult := paco9_3_0_mult gf_0 gf_1 gf_2; pacofold := paco9_3_0_fold gf_0 gf_1 gf_2; pacounfold := paco9_3_0_unfold gf_0 gf_1 gf_2 }. -Instance paco9_3_1_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 (gf_0 gf_1 gf_2 : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 : paco_class (paco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8) := +Global Instance paco9_3_1_inst (gf_0 gf_1 gf_2 : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 : paco_class (paco9_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8) := { pacoacc := paco9_3_1_acc gf_0 gf_1 gf_2; pacomult := paco9_3_1_mult gf_0 gf_1 gf_2; pacofold := paco9_3_1_fold gf_0 gf_1 gf_2; pacounfold := paco9_3_1_unfold gf_0 gf_1 gf_2 }. -Instance paco9_3_2_inst T0 T1 T2 T3 T4 T5 T6 T7 T8 (gf_0 gf_1 gf_2 : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 : paco_class (paco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8) := +Global Instance paco9_3_2_inst (gf_0 gf_1 gf_2 : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8->_) r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8 : paco_class (paco9_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 x0 x1 x2 x3 x4 x5 x6 x7 x8) := { pacoacc := paco9_3_2_acc gf_0 gf_1 gf_2; pacomult := paco9_3_2_mult gf_0 gf_1 gf_2; pacofold := paco9_3_2_fold gf_0 gf_1 gf_2; pacounfold := paco9_3_2_unfold gf_0 gf_1 gf_2 }. +End PACO9. + +Global Opaque paco9. + +Hint Unfold upaco9. +Hint Resolve paco9_fold. +Hint Unfold monotone9. + +Global Opaque paco9_2_0. +Global Opaque paco9_2_1. + +Hint Unfold upaco9_2_0. +Hint Unfold upaco9_2_1. +Hint Resolve paco9_2_0_fold. +Hint Resolve paco9_2_1_fold. +Hint Unfold monotone9_2. + +Global Opaque paco9_3_0. +Global Opaque paco9_3_1. +Global Opaque paco9_3_2. + +Hint Unfold upaco9_3_0. +Hint Unfold upaco9_3_1. +Hint Unfold upaco9_3_2. +Hint Resolve paco9_3_0_fold. +Hint Resolve paco9_3_1_fold. +Hint Resolve paco9_3_2_fold. +Hint Unfold monotone9_3. + diff --git a/src/pacon.v b/src/pacon.v new file mode 100644 index 0000000..e9fda90 --- /dev/null +++ b/src/pacon.v @@ -0,0 +1,509 @@ +Require Export paconotation pacotacuser. +Require Import pacotac paconotation_internal. +Set Implicit Arguments. + +(** ** Predicates of Arity 1 +*) + +Section Arg1_def. +Variable T0 : Type. +Variable gf : rel1 T0 -> rel1 T0. +Arguments gf : clear implicits. + +CoInductive paco( r: rel1 T0) x0 : Prop := +| paco_pfold pco + (LE : pco <1= (paco r \1/ r)) + (SIM: gf pco x0) +. +Definition upaco( r: rel1 T0) := paco r \1/ r. +End Arg1_def. +Arguments paco [ T0 ]. +Arguments upaco [ T0 ]. +Hint Unfold upaco. + +Section Arg1_2_def. +Variable T0 : Type. +Variable gf_0 gf_1 : rel1 T0 -> rel1 T0 -> rel1 T0. +Arguments gf_0 : clear implicits. +Arguments gf_1 : clear implicits. + +CoInductive paco_2_0( r_0 r_1: rel1 T0) x0 : Prop := +| paco_2_0_pfold pco_0 pco_1 + (LE : pco_0 <1= (paco_2_0 r_0 r_1 \1/ r_0)) + (LE : pco_1 <1= (paco_2_1 r_0 r_1 \1/ r_1)) + (SIM: gf_0 pco_0 pco_1 x0) +with paco_2_1( r_0 r_1: rel1 T0) x0 : Prop := +| paco_2_1_pfold pco_0 pco_1 + (LE : pco_0 <1= (paco_2_0 r_0 r_1 \1/ r_0)) + (LE : pco_1 <1= (paco_2_1 r_0 r_1 \1/ r_1)) + (SIM: gf_1 pco_0 pco_1 x0) +. +Definition upaco_2_0( r_0 r_1: rel1 T0) := paco_2_0 r_0 r_1 \1/ r_0. +Definition upaco_2_1( r_0 r_1: rel1 T0) := paco_2_1 r_0 r_1 \1/ r_1. +End Arg1_2_def. +Arguments paco_2_0 [ T0 ]. +Arguments upaco_2_0 [ T0 ]. +Hint Unfold upaco_2_0. +Arguments paco_2_1 [ T0 ]. +Arguments upaco_2_1 [ T0 ]. +Hint Unfold upaco_2_1. + +Section Arg1_3_def. +Variable T0 : Type. +Variable gf_0 gf_1 gf_2 : rel1 T0 -> rel1 T0 -> rel1 T0 -> rel1 T0. +Arguments gf_0 : clear implicits. +Arguments gf_1 : clear implicits. +Arguments gf_2 : clear implicits. + +CoInductive paco_3_0( r_0 r_1 r_2: rel1 T0) x0 : Prop := +| paco_3_0_pfold pco_0 pco_1 pco_2 + (LE : pco_0 <1= (paco_3_0 r_0 r_1 r_2 \1/ r_0)) + (LE : pco_1 <1= (paco_3_1 r_0 r_1 r_2 \1/ r_1)) + (LE : pco_2 <1= (paco_3_2 r_0 r_1 r_2 \1/ r_2)) + (SIM: gf_0 pco_0 pco_1 pco_2 x0) +with paco_3_1( r_0 r_1 r_2: rel1 T0) x0 : Prop := +| paco_3_1_pfold pco_0 pco_1 pco_2 + (LE : pco_0 <1= (paco_3_0 r_0 r_1 r_2 \1/ r_0)) + (LE : pco_1 <1= (paco_3_1 r_0 r_1 r_2 \1/ r_1)) + (LE : pco_2 <1= (paco_3_2 r_0 r_1 r_2 \1/ r_2)) + (SIM: gf_1 pco_0 pco_1 pco_2 x0) +with paco_3_2( r_0 r_1 r_2: rel1 T0) x0 : Prop := +| paco_3_2_pfold pco_0 pco_1 pco_2 + (LE : pco_0 <1= (paco_3_0 r_0 r_1 r_2 \1/ r_0)) + (LE : pco_1 <1= (paco_3_1 r_0 r_1 r_2 \1/ r_1)) + (LE : pco_2 <1= (paco_3_2 r_0 r_1 r_2 \1/ r_2)) + (SIM: gf_2 pco_0 pco_1 pco_2 x0) +. +Definition upaco_3_0( r_0 r_1 r_2: rel1 T0) := paco_3_0 r_0 r_1 r_2 \1/ r_0. +Definition upaco_3_1( r_0 r_1 r_2: rel1 T0) := paco_3_1 r_0 r_1 r_2 \1/ r_1. +Definition upaco_3_2( r_0 r_1 r_2: rel1 T0) := paco_3_2 r_0 r_1 r_2 \1/ r_2. +End Arg1_3_def. +Arguments paco_3_0 [ T0 ]. +Arguments upaco_3_0 [ T0 ]. +Hint Unfold upaco_3_0. +Arguments paco_3_1 [ T0 ]. +Arguments upaco_3_1 [ T0 ]. +Hint Unfold upaco_3_1. +Arguments paco_3_2 [ T0 ]. +Arguments upaco_3_2 [ T0 ]. +Hint Unfold upaco_3_2. + +(* Less than or equal - internal use only *) +Notation "p <_paco_1= q" := + (forall _paco_x0 (PR: p _paco_x0 : Prop), q _paco_x0 : Prop) + (at level 50, no associativity). + +(** 1 Mutual Coinduction *) + +Section Arg1_1. + +Definition monotone T0 (gf: rel1 T0 -> rel1 T0) := + forall x0 r r' (IN: gf r x0) (LE: r <1= r'), gf r' x0. + +Definition _monotone T0 (gf: rel1 T0 -> rel1 T0) := + forall r r'(LE: r <1= r'), gf r <1== gf r'. + +Lemma monotone_eq T0 (gf: rel1 T0 -> rel1 T0) : + monotone gf <-> _monotone gf. +Proof. unfold monotone, _monotone, le1. split; eauto. Qed. + +Variable T0 : Type. +Variable gf : rel1 T0 -> rel1 T0. +Arguments gf : clear implicits. + +Theorem paco_acc: forall + l r (OBG: forall rr (INC: r <1= rr) (CIH: l <1= rr), l <1= paco gf rr), + l <1= paco gf r. +Proof. + intros; assert (SIM: paco gf (r \1/ l) x0) by eauto. + clear PR; repeat (try left; do 2 paco_revert; paco_cofix_auto). +Qed. + +Theorem paco_mon: monotone (paco gf). +Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. + +Theorem paco_mult_strong: forall r, + paco gf (upaco gf r) <1= paco gf r. +Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. + +Corollary paco_mult: forall r, + paco gf (paco gf r) <1= paco gf r. +Proof. intros; eapply paco_mult_strong, paco_mon; eauto. Qed. + +Theorem paco_fold: forall r, + gf (upaco gf r) <1= paco gf r. +Proof. intros; econstructor; [ |eauto]; eauto. Qed. + +Theorem paco_unfold: forall (MON: monotone gf) r, + paco gf r <1= gf (upaco gf r). +Proof. unfold monotone; intros; destruct PR; eauto. Qed. + +Theorem _paco_acc: forall + l r (OBG: forall rr (INC: r <1== rr) (CIH: l <1== rr), l <1== paco gf rr), + l <1== paco gf r. +Proof. unfold le1. eapply paco_acc. Qed. + +Theorem _paco_mon: _monotone (paco gf). +Proof. apply monotone_eq. eapply paco_mon. Qed. + +Theorem _paco_mult_strong: forall r, + paco gf (upaco gf r) <1== paco gf r. +Proof. unfold le1. eapply paco_mult_strong. Qed. + +Theorem _paco_fold: forall r, + gf (upaco gf r) <1== paco gf r. +Proof. unfold le1. eapply paco_fold. Qed. + +Theorem _paco_unfold: forall (MON: _monotone gf) r, + paco gf r <1== gf (upaco gf r). +Proof. + unfold le1. repeat_intros 1. + eapply paco_unfold; apply monotone_eq; eauto. +Qed. + +End Arg1_1. + +Hint Unfold monotone. +Hint Resolve paco_fold. + +Arguments paco_acc [ T0 ]. +Arguments paco_mon [ T0 ]. +Arguments paco_mult_strong [ T0 ]. +Arguments paco_mult [ T0 ]. +Arguments paco_fold [ T0 ]. +Arguments paco_unfold [ T0 ]. + +(** 2 Mutual Coinduction *) + +Section Arg1_2. + +Definition monotone_2 T0 (gf: rel1 T0 -> rel1 T0 -> rel1 T0) := + forall x0 r_0 r_1 r'_0 r'_1 (IN: gf r_0 r_1 x0) (LE_0: r_0 <1= r'_0)(LE_1: r_1 <1= r'_1), gf r'_0 r'_1 x0. + +Definition _monotone_2 T0 (gf: rel1 T0 -> rel1 T0 -> rel1 T0) := + forall r_0 r_1 r'_0 r'_1(LE_0: r_0 <1= r'_0)(LE_1: r_1 <1= r'_1), gf r_0 r_1 <1== gf r'_0 r'_1. + +Lemma monotone_2_eq T0 (gf: rel1 T0 -> rel1 T0 -> rel1 T0) : + monotone_2 gf <-> _monotone_2 gf. +Proof. unfold monotone_2, _monotone_2, le1. split; eauto. Qed. + +Variable T0 : Type. +Variable gf_0 gf_1 : rel1 T0 -> rel1 T0 -> rel1 T0. +Arguments gf_0 : clear implicits. +Arguments gf_1 : clear implicits. + +Theorem paco_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <1= rr) (CIH: l <1= rr), l <1= paco_2_0 gf_0 gf_1 rr r_1), + l <1= paco_2_0 gf_0 gf_1 r_0 r_1. +Proof. + intros; assert (SIM: paco_2_0 gf_0 gf_1 (r_0 \1/ l) r_1 x0) by eauto. + clear PR; repeat (try left; do 2 paco_revert; paco_cofix_auto). +Qed. + +Theorem paco_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <1= rr) (CIH: l <1= rr), l <1= paco_2_1 gf_0 gf_1 r_0 rr), + l <1= paco_2_1 gf_0 gf_1 r_0 r_1. +Proof. + intros; assert (SIM: paco_2_1 gf_0 gf_1 r_0 (r_1 \1/ l) x0) by eauto. + clear PR; repeat (try left; do 2 paco_revert; paco_cofix_auto). +Qed. + +Theorem paco_2_0_mon: monotone_2 (paco_2_0 gf_0 gf_1). +Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. + +Theorem paco_2_1_mon: monotone_2 (paco_2_1 gf_0 gf_1). +Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. + +Theorem paco_2_0_mult_strong: forall r_0 r_1, + paco_2_0 gf_0 gf_1 (upaco_2_0 gf_0 gf_1 r_0 r_1) (upaco_2_1 gf_0 gf_1 r_0 r_1) <1= paco_2_0 gf_0 gf_1 r_0 r_1. +Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. + +Theorem paco_2_1_mult_strong: forall r_0 r_1, + paco_2_1 gf_0 gf_1 (upaco_2_0 gf_0 gf_1 r_0 r_1) (upaco_2_1 gf_0 gf_1 r_0 r_1) <1= paco_2_1 gf_0 gf_1 r_0 r_1. +Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. + +Corollary paco_2_0_mult: forall r_0 r_1, + paco_2_0 gf_0 gf_1 (paco_2_0 gf_0 gf_1 r_0 r_1) (paco_2_1 gf_0 gf_1 r_0 r_1) <1= paco_2_0 gf_0 gf_1 r_0 r_1. +Proof. intros; eapply paco_2_0_mult_strong, paco_2_0_mon; eauto. Qed. + +Corollary paco_2_1_mult: forall r_0 r_1, + paco_2_1 gf_0 gf_1 (paco_2_0 gf_0 gf_1 r_0 r_1) (paco_2_1 gf_0 gf_1 r_0 r_1) <1= paco_2_1 gf_0 gf_1 r_0 r_1. +Proof. intros; eapply paco_2_1_mult_strong, paco_2_1_mon; eauto. Qed. + +Theorem paco_2_0_fold: forall r_0 r_1, + gf_0 (upaco_2_0 gf_0 gf_1 r_0 r_1) (upaco_2_1 gf_0 gf_1 r_0 r_1) <1= paco_2_0 gf_0 gf_1 r_0 r_1. +Proof. intros; econstructor; [ | |eauto]; eauto. Qed. + +Theorem paco_2_1_fold: forall r_0 r_1, + gf_1 (upaco_2_0 gf_0 gf_1 r_0 r_1) (upaco_2_1 gf_0 gf_1 r_0 r_1) <1= paco_2_1 gf_0 gf_1 r_0 r_1. +Proof. intros; econstructor; [ | |eauto]; eauto. Qed. + +Theorem paco_2_0_unfold: forall (MON: monotone_2 gf_0) (MON: monotone_2 gf_1) r_0 r_1, + paco_2_0 gf_0 gf_1 r_0 r_1 <1= gf_0 (upaco_2_0 gf_0 gf_1 r_0 r_1) (upaco_2_1 gf_0 gf_1 r_0 r_1). +Proof. unfold monotone_2; intros; destruct PR; eauto. Qed. + +Theorem paco_2_1_unfold: forall (MON: monotone_2 gf_0) (MON: monotone_2 gf_1) r_0 r_1, + paco_2_1 gf_0 gf_1 r_0 r_1 <1= gf_1 (upaco_2_0 gf_0 gf_1 r_0 r_1) (upaco_2_1 gf_0 gf_1 r_0 r_1). +Proof. unfold monotone_2; intros; destruct PR; eauto. Qed. + +Theorem _paco_2_0_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_0 <1== rr) (CIH: l <1== rr), l <1== paco_2_0 gf_0 gf_1 rr r_1), + l <1== paco_2_0 gf_0 gf_1 r_0 r_1. +Proof. unfold le1. eapply paco_2_0_acc. Qed. + +Theorem _paco_2_1_acc: forall + l r_0 r_1 (OBG: forall rr (INC: r_1 <1== rr) (CIH: l <1== rr), l <1== paco_2_1 gf_0 gf_1 r_0 rr), + l <1== paco_2_1 gf_0 gf_1 r_0 r_1. +Proof. unfold le1. eapply paco_2_1_acc. Qed. + +Theorem _paco_2_0_mon: _monotone_2 (paco_2_0 gf_0 gf_1). +Proof. apply monotone_2_eq. eapply paco_2_0_mon. Qed. + +Theorem _paco_2_1_mon: _monotone_2 (paco_2_1 gf_0 gf_1). +Proof. apply monotone_2_eq. eapply paco_2_1_mon. Qed. + +Theorem _paco_2_0_mult_strong: forall r_0 r_1, + paco_2_0 gf_0 gf_1 (upaco_2_0 gf_0 gf_1 r_0 r_1) (upaco_2_1 gf_0 gf_1 r_0 r_1) <1== paco_2_0 gf_0 gf_1 r_0 r_1. +Proof. unfold le1. eapply paco_2_0_mult_strong. Qed. + +Theorem _paco_2_1_mult_strong: forall r_0 r_1, + paco_2_1 gf_0 gf_1 (upaco_2_0 gf_0 gf_1 r_0 r_1) (upaco_2_1 gf_0 gf_1 r_0 r_1) <1== paco_2_1 gf_0 gf_1 r_0 r_1. +Proof. unfold le1. eapply paco_2_1_mult_strong. Qed. + +Theorem _paco_2_0_fold: forall r_0 r_1, + gf_0 (upaco_2_0 gf_0 gf_1 r_0 r_1) (upaco_2_1 gf_0 gf_1 r_0 r_1) <1== paco_2_0 gf_0 gf_1 r_0 r_1. +Proof. unfold le1. eapply paco_2_0_fold. Qed. + +Theorem _paco_2_1_fold: forall r_0 r_1, + gf_1 (upaco_2_0 gf_0 gf_1 r_0 r_1) (upaco_2_1 gf_0 gf_1 r_0 r_1) <1== paco_2_1 gf_0 gf_1 r_0 r_1. +Proof. unfold le1. eapply paco_2_1_fold. Qed. + +Theorem _paco_2_0_unfold: forall (MON: _monotone_2 gf_0) (MON: _monotone_2 gf_1) r_0 r_1, + paco_2_0 gf_0 gf_1 r_0 r_1 <1== gf_0 (upaco_2_0 gf_0 gf_1 r_0 r_1) (upaco_2_1 gf_0 gf_1 r_0 r_1). +Proof. + unfold le1. repeat_intros 2. + eapply paco_2_0_unfold; apply monotone_2_eq; eauto. +Qed. + +Theorem _paco_2_1_unfold: forall (MON: _monotone_2 gf_0) (MON: _monotone_2 gf_1) r_0 r_1, + paco_2_1 gf_0 gf_1 r_0 r_1 <1== gf_1 (upaco_2_0 gf_0 gf_1 r_0 r_1) (upaco_2_1 gf_0 gf_1 r_0 r_1). +Proof. + unfold le1. repeat_intros 2. + eapply paco_2_1_unfold; apply monotone_2_eq; eauto. +Qed. + +End Arg1_2. + +Hint Unfold monotone_2. +Hint Resolve paco_2_0_fold. +Hint Resolve paco_2_1_fold. + +Arguments paco_2_0_acc [ T0 ]. +Arguments paco_2_1_acc [ T0 ]. +Arguments paco_2_0_mon [ T0 ]. +Arguments paco_2_1_mon [ T0 ]. +Arguments paco_2_0_mult_strong [ T0 ]. +Arguments paco_2_1_mult_strong [ T0 ]. +Arguments paco_2_0_mult [ T0 ]. +Arguments paco_2_1_mult [ T0 ]. +Arguments paco_2_0_fold [ T0 ]. +Arguments paco_2_1_fold [ T0 ]. +Arguments paco_2_0_unfold [ T0 ]. +Arguments paco_2_1_unfold [ T0 ]. + +(** 3 Mutual Coinduction *) + +Section Arg1_3. + +Definition monotone_3 T0 (gf: rel1 T0 -> rel1 T0 -> rel1 T0 -> rel1 T0) := + forall x0 r_0 r_1 r_2 r'_0 r'_1 r'_2 (IN: gf r_0 r_1 r_2 x0) (LE_0: r_0 <1= r'_0)(LE_1: r_1 <1= r'_1)(LE_2: r_2 <1= r'_2), gf r'_0 r'_1 r'_2 x0. + +Definition _monotone_3 T0 (gf: rel1 T0 -> rel1 T0 -> rel1 T0 -> rel1 T0) := + forall r_0 r_1 r_2 r'_0 r'_1 r'_2(LE_0: r_0 <1= r'_0)(LE_1: r_1 <1= r'_1)(LE_2: r_2 <1= r'_2), gf r_0 r_1 r_2 <1== gf r'_0 r'_1 r'_2. + +Lemma monotone_3_eq T0 (gf: rel1 T0 -> rel1 T0 -> rel1 T0 -> rel1 T0) : + monotone_3 gf <-> _monotone_3 gf. +Proof. unfold monotone_3, _monotone_3, le1. split; eauto. Qed. + +Variable T0 : Type. +Variable gf_0 gf_1 gf_2 : rel1 T0 -> rel1 T0 -> rel1 T0 -> rel1 T0. +Arguments gf_0 : clear implicits. +Arguments gf_1 : clear implicits. +Arguments gf_2 : clear implicits. + +Theorem paco_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <1= rr) (CIH: l <1= rr), l <1= paco_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <1= paco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros; assert (SIM: paco_3_0 gf_0 gf_1 gf_2 (r_0 \1/ l) r_1 r_2 x0) by eauto. + clear PR; repeat (try left; do 2 paco_revert; paco_cofix_auto). +Qed. + +Theorem paco_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <1= rr) (CIH: l <1= rr), l <1= paco_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <1= paco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros; assert (SIM: paco_3_1 gf_0 gf_1 gf_2 r_0 (r_1 \1/ l) r_2 x0) by eauto. + clear PR; repeat (try left; do 2 paco_revert; paco_cofix_auto). +Qed. + +Theorem paco_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <1= rr) (CIH: l <1= rr), l <1= paco_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <1= paco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. + intros; assert (SIM: paco_3_2 gf_0 gf_1 gf_2 r_0 r_1 (r_2 \1/ l) x0) by eauto. + clear PR; repeat (try left; do 2 paco_revert; paco_cofix_auto). +Qed. + +Theorem paco_3_0_mon: monotone_3 (paco_3_0 gf_0 gf_1 gf_2). +Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. + +Theorem paco_3_1_mon: monotone_3 (paco_3_1 gf_0 gf_1 gf_2). +Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. + +Theorem paco_3_2_mon: monotone_3 (paco_3_2 gf_0 gf_1 gf_2). +Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. + +Theorem paco_3_0_mult_strong: forall r_0 r_1 r_2, + paco_3_0 gf_0 gf_1 gf_2 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1= paco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. + +Theorem paco_3_1_mult_strong: forall r_0 r_1 r_2, + paco_3_1 gf_0 gf_1 gf_2 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1= paco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. + +Theorem paco_3_2_mult_strong: forall r_0 r_1 r_2, + paco_3_2 gf_0 gf_1 gf_2 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1= paco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. paco_cofix_auto; repeat (left; do 2 paco_revert; paco_cofix_auto). Qed. + +Corollary paco_3_0_mult: forall r_0 r_1 r_2, + paco_3_0 gf_0 gf_1 gf_2 (paco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1= paco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. intros; eapply paco_3_0_mult_strong, paco_3_0_mon; eauto. Qed. + +Corollary paco_3_1_mult: forall r_0 r_1 r_2, + paco_3_1 gf_0 gf_1 gf_2 (paco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1= paco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. intros; eapply paco_3_1_mult_strong, paco_3_1_mon; eauto. Qed. + +Corollary paco_3_2_mult: forall r_0 r_1 r_2, + paco_3_2 gf_0 gf_1 gf_2 (paco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (paco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1= paco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. intros; eapply paco_3_2_mult_strong, paco_3_2_mon; eauto. Qed. + +Theorem paco_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1= paco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. + +Theorem paco_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1= paco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. + +Theorem paco_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1= paco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. intros; econstructor; [ | | |eauto]; eauto. Qed. + +Theorem paco_3_0_unfold: forall (MON: monotone_3 gf_0) (MON: monotone_3 gf_1) (MON: monotone_3 gf_2) r_0 r_1 r_2, + paco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <1= gf_0 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. unfold monotone_3; intros; destruct PR; eauto. Qed. + +Theorem paco_3_1_unfold: forall (MON: monotone_3 gf_0) (MON: monotone_3 gf_1) (MON: monotone_3 gf_2) r_0 r_1 r_2, + paco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <1= gf_1 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. unfold monotone_3; intros; destruct PR; eauto. Qed. + +Theorem paco_3_2_unfold: forall (MON: monotone_3 gf_0) (MON: monotone_3 gf_1) (MON: monotone_3 gf_2) r_0 r_1 r_2, + paco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <1= gf_2 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. unfold monotone_3; intros; destruct PR; eauto. Qed. + +Theorem _paco_3_0_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_0 <1== rr) (CIH: l <1== rr), l <1== paco_3_0 gf_0 gf_1 gf_2 rr r_1 r_2), + l <1== paco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. unfold le1. eapply paco_3_0_acc. Qed. + +Theorem _paco_3_1_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_1 <1== rr) (CIH: l <1== rr), l <1== paco_3_1 gf_0 gf_1 gf_2 r_0 rr r_2), + l <1== paco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. unfold le1. eapply paco_3_1_acc. Qed. + +Theorem _paco_3_2_acc: forall + l r_0 r_1 r_2 (OBG: forall rr (INC: r_2 <1== rr) (CIH: l <1== rr), l <1== paco_3_2 gf_0 gf_1 gf_2 r_0 r_1 rr), + l <1== paco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. unfold le1. eapply paco_3_2_acc. Qed. + +Theorem _paco_3_0_mon: _monotone_3 (paco_3_0 gf_0 gf_1 gf_2). +Proof. apply monotone_3_eq. eapply paco_3_0_mon. Qed. + +Theorem _paco_3_1_mon: _monotone_3 (paco_3_1 gf_0 gf_1 gf_2). +Proof. apply monotone_3_eq. eapply paco_3_1_mon. Qed. + +Theorem _paco_3_2_mon: _monotone_3 (paco_3_2 gf_0 gf_1 gf_2). +Proof. apply monotone_3_eq. eapply paco_3_2_mon. Qed. + +Theorem _paco_3_0_mult_strong: forall r_0 r_1 r_2, + paco_3_0 gf_0 gf_1 gf_2 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1== paco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. unfold le1. eapply paco_3_0_mult_strong. Qed. + +Theorem _paco_3_1_mult_strong: forall r_0 r_1 r_2, + paco_3_1 gf_0 gf_1 gf_2 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1== paco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. unfold le1. eapply paco_3_1_mult_strong. Qed. + +Theorem _paco_3_2_mult_strong: forall r_0 r_1 r_2, + paco_3_2 gf_0 gf_1 gf_2 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1== paco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. unfold le1. eapply paco_3_2_mult_strong. Qed. + +Theorem _paco_3_0_fold: forall r_0 r_1 r_2, + gf_0 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1== paco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. unfold le1. eapply paco_3_0_fold. Qed. + +Theorem _paco_3_1_fold: forall r_0 r_1 r_2, + gf_1 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1== paco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. unfold le1. eapply paco_3_1_fold. Qed. + +Theorem _paco_3_2_fold: forall r_0 r_1 r_2, + gf_2 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2) <1== paco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2. +Proof. unfold le1. eapply paco_3_2_fold. Qed. + +Theorem _paco_3_0_unfold: forall (MON: _monotone_3 gf_0) (MON: _monotone_3 gf_1) (MON: _monotone_3 gf_2) r_0 r_1 r_2, + paco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2 <1== gf_0 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + unfold le1. repeat_intros 3. + eapply paco_3_0_unfold; apply monotone_3_eq; eauto. +Qed. + +Theorem _paco_3_1_unfold: forall (MON: _monotone_3 gf_0) (MON: _monotone_3 gf_1) (MON: _monotone_3 gf_2) r_0 r_1 r_2, + paco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2 <1== gf_1 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + unfold le1. repeat_intros 3. + eapply paco_3_1_unfold; apply monotone_3_eq; eauto. +Qed. + +Theorem _paco_3_2_unfold: forall (MON: _monotone_3 gf_0) (MON: _monotone_3 gf_1) (MON: _monotone_3 gf_2) r_0 r_1 r_2, + paco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2 <1== gf_2 (upaco_3_0 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_1 gf_0 gf_1 gf_2 r_0 r_1 r_2) (upaco_3_2 gf_0 gf_1 gf_2 r_0 r_1 r_2). +Proof. + unfold le1. repeat_intros 3. + eapply paco_3_2_unfold; apply monotone_3_eq; eauto. +Qed. + +End Arg1_3. + +Hint Unfold monotone_3. +Hint Resolve paco_3_0_fold. +Hint Resolve paco_3_1_fold. +Hint Resolve paco_3_2_fold. + +Arguments paco_3_0_acc [ T0 ]. +Arguments paco_3_1_acc [ T0 ]. +Arguments paco_3_2_acc [ T0 ]. +Arguments paco_3_0_mon [ T0 ]. +Arguments paco_3_1_mon [ T0 ]. +Arguments paco_3_2_mon [ T0 ]. +Arguments paco_3_0_mult_strong [ T0 ]. +Arguments paco_3_1_mult_strong [ T0 ]. +Arguments paco_3_2_mult_strong [ T0 ]. +Arguments paco_3_0_mult [ T0 ]. +Arguments paco_3_1_mult [ T0 ]. +Arguments paco_3_2_mult [ T0 ]. +Arguments paco_3_0_fold [ T0 ]. +Arguments paco_3_1_fold [ T0 ]. +Arguments paco_3_2_fold [ T0 ]. +Arguments paco_3_0_unfold [ T0 ]. +Arguments paco_3_1_unfold [ T0 ]. +Arguments paco_3_2_unfold [ T0 ]. + diff --git a/src/paconotation_internal.v b/src/paconotation_internal.v new file mode 100644 index 0000000..c21812d --- /dev/null +++ b/src/paconotation_internal.v @@ -0,0 +1,282 @@ +Require Import paconotation. + +Tactic Notation "repeat_intros" int(n) + := let name := fresh "x" in + do n (let name := fresh "x" in intros name). + +(** ** Less than or equal *) + +Definition le0 (p q : rel0) := + (forall (PR: p : Prop), q : Prop). +Arguments le0 : clear implicits. + +Definition le1 T0 (p q : rel1 T0) := + (forall x0 (PR: p x0 : Prop), q x0 : Prop). +Arguments le1 [ T0]. + +Definition le2 T0 T1 (p q : rel2 T0 T1) := + (forall x0 x1 (PR: p x0 x1 : Prop), q x0 x1 : Prop). +Arguments le2 [ T0 T1]. + +Definition le3 T0 T1 T2 (p q : rel3 T0 T1 T2) := + (forall x0 x1 x2 (PR: p x0 x1 x2 : Prop), q x0 x1 x2 : Prop). +Arguments le3 [ T0 T1 T2]. + +Definition le4 T0 T1 T2 T3 (p q : rel4 T0 T1 T2 T3) := + (forall x0 x1 x2 x3 (PR: p x0 x1 x2 x3 : Prop), q x0 x1 x2 x3 : Prop). +Arguments le4 [ T0 T1 T2 T3]. + +Definition le5 T0 T1 T2 T3 T4 (p q : rel5 T0 T1 T2 T3 T4) := + (forall x0 x1 x2 x3 x4 (PR: p x0 x1 x2 x3 x4 : Prop), q x0 x1 x2 x3 x4 : Prop). +Arguments le5 [ T0 T1 T2 T3 T4]. + +Definition le6 T0 T1 T2 T3 T4 T5 (p q : rel6 T0 T1 T2 T3 T4 T5) := + (forall x0 x1 x2 x3 x4 x5 (PR: p x0 x1 x2 x3 x4 x5 : Prop), q x0 x1 x2 x3 x4 x5 : Prop). +Arguments le6 [ T0 T1 T2 T3 T4 T5]. + +Definition le7 T0 T1 T2 T3 T4 T5 T6 (p q : rel7 T0 T1 T2 T3 T4 T5 T6) := + (forall x0 x1 x2 x3 x4 x5 x6 (PR: p x0 x1 x2 x3 x4 x5 x6 : Prop), q x0 x1 x2 x3 x4 x5 x6 : Prop). +Arguments le7 [ T0 T1 T2 T3 T4 T5 T6]. + +Definition le8 T0 T1 T2 T3 T4 T5 T6 T7 (p q : rel8 T0 T1 T2 T3 T4 T5 T6 T7) := + (forall x0 x1 x2 x3 x4 x5 x6 x7 (PR: p x0 x1 x2 x3 x4 x5 x6 x7 : Prop), q x0 x1 x2 x3 x4 x5 x6 x7 : Prop). +Arguments le8 [ T0 T1 T2 T3 T4 T5 T6 T7]. + +Definition le9 T0 T1 T2 T3 T4 T5 T6 T7 T8 (p q : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) := + (forall x0 x1 x2 x3 x4 x5 x6 x7 x8 (PR: p x0 x1 x2 x3 x4 x5 x6 x7 x8 : Prop), q x0 x1 x2 x3 x4 x5 x6 x7 x8 : Prop). +Arguments le9 [ T0 T1 T2 T3 T4 T5 T6 T7 T8]. + +Definition le10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 (p q : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) := + (forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 (PR: p x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : Prop), q x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 : Prop). +Arguments le10 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9]. + +Definition le11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 (p q : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) := + (forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 (PR: p x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : Prop), q x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : Prop). +Arguments le11 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10]. + +Definition le12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 (p q : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) := + (forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 (PR: p x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : Prop), q x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 : Prop). +Arguments le12 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11]. + +Definition le13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 (p q : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) := + (forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 (PR: p x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : Prop), q x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 : Prop). +Arguments le13 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12]. + +Definition le14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 (p q : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) := + (forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 (PR: p x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : Prop), q x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 : Prop). +Arguments le14 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13]. + +Definition le15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 (p q : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) := + (forall x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 (PR: p x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : Prop), q x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 : Prop). +Arguments le15 [ T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14]. + +Notation "p <0== q" := + (le0 p q) + (at level 50, no associativity, only parsing). + +Notation "p <1== q" := + (le1 p q) + (at level 50, no associativity). + +Notation "p <2== q" := + (le2 p q) + (at level 50, no associativity). + +Notation "p <3== q" := + (le3 p q) + (at level 50, no associativity). + +Notation "p <4== q" := + (le4 p q) + (at level 50, no associativity). + +Notation "p <5== q" := + (le5 p q) + (at level 50, no associativity). + +Notation "p <6== q" := + (le6 p q) + (at level 50, no associativity). + +Notation "p <7== q" := + (le7 p q) + (at level 50, no associativity). + +Notation "p <8== q" := + (le8 p q) + (at level 50, no associativity). + +Notation "p <9== q" := + (le9 p q) + (at level 50, no associativity). + +Notation "p <10== q" := + (le10 p q) + (at level 50, no associativity). + +Notation "p <11== q" := + (le11 p q) + (at level 50, no associativity). + +Notation "p <12== q" := + (le12 p q) + (at level 50, no associativity). + +Notation "p <13== q" := + (le13 p q) + (at level 50, no associativity). + +Notation "p <14== q" := + (le14 p q) + (at level 50, no associativity). + +Notation "p <15== q" := + (le15 p q) + (at level 50, no associativity). + +(** ** Tranisitivity and Reflexivity *) + +Lemma le0_trans(r0 r1 r2 : rel0) + (LE0 : r0 <0== r1) (LE1 : r1 <0== r2) : + r0 <0== r2. +Proof. repeat_intros 0. intros H. auto. Qed. + +Lemma le1_trans T0(r0 r1 r2 : rel1 T0) + (LE0 : r0 <1== r1) (LE1 : r1 <1== r2) : + r0 <1== r2. +Proof. repeat_intros 1. intros H. auto. Qed. + +Lemma le2_trans T0 T1(r0 r1 r2 : rel2 T0 T1) + (LE0 : r0 <2== r1) (LE1 : r1 <2== r2) : + r0 <2== r2. +Proof. repeat_intros 2. intros H. auto. Qed. + +Lemma le3_trans T0 T1 T2(r0 r1 r2 : rel3 T0 T1 T2) + (LE0 : r0 <3== r1) (LE1 : r1 <3== r2) : + r0 <3== r2. +Proof. repeat_intros 3. intros H. auto. Qed. + +Lemma le4_trans T0 T1 T2 T3(r0 r1 r2 : rel4 T0 T1 T2 T3) + (LE0 : r0 <4== r1) (LE1 : r1 <4== r2) : + r0 <4== r2. +Proof. repeat_intros 4. intros H. auto. Qed. + +Lemma le5_trans T0 T1 T2 T3 T4(r0 r1 r2 : rel5 T0 T1 T2 T3 T4) + (LE0 : r0 <5== r1) (LE1 : r1 <5== r2) : + r0 <5== r2. +Proof. repeat_intros 5. intros H. auto. Qed. + +Lemma le6_trans T0 T1 T2 T3 T4 T5(r0 r1 r2 : rel6 T0 T1 T2 T3 T4 T5) + (LE0 : r0 <6== r1) (LE1 : r1 <6== r2) : + r0 <6== r2. +Proof. repeat_intros 6. intros H. auto. Qed. + +Lemma le7_trans T0 T1 T2 T3 T4 T5 T6(r0 r1 r2 : rel7 T0 T1 T2 T3 T4 T5 T6) + (LE0 : r0 <7== r1) (LE1 : r1 <7== r2) : + r0 <7== r2. +Proof. repeat_intros 7. intros H. auto. Qed. + +Lemma le8_trans T0 T1 T2 T3 T4 T5 T6 T7(r0 r1 r2 : rel8 T0 T1 T2 T3 T4 T5 T6 T7) + (LE0 : r0 <8== r1) (LE1 : r1 <8== r2) : + r0 <8== r2. +Proof. repeat_intros 8. intros H. auto. Qed. + +Lemma le9_trans T0 T1 T2 T3 T4 T5 T6 T7 T8(r0 r1 r2 : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) + (LE0 : r0 <9== r1) (LE1 : r1 <9== r2) : + r0 <9== r2. +Proof. repeat_intros 9. intros H. auto. Qed. + +Lemma le10_trans T0 T1 T2 T3 T4 T5 T6 T7 T8 T9(r0 r1 r2 : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) + (LE0 : r0 <10== r1) (LE1 : r1 <10== r2) : + r0 <10== r2. +Proof. repeat_intros 10. intros H. auto. Qed. + +Lemma le11_trans T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10(r0 r1 r2 : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) + (LE0 : r0 <11== r1) (LE1 : r1 <11== r2) : + r0 <11== r2. +Proof. repeat_intros 11. intros H. auto. Qed. + +Lemma le12_trans T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11(r0 r1 r2 : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) + (LE0 : r0 <12== r1) (LE1 : r1 <12== r2) : + r0 <12== r2. +Proof. repeat_intros 12. intros H. auto. Qed. + +Lemma le13_trans T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12(r0 r1 r2 : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) + (LE0 : r0 <13== r1) (LE1 : r1 <13== r2) : + r0 <13== r2. +Proof. repeat_intros 13. intros H. auto. Qed. + +Lemma le14_trans T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13(r0 r1 r2 : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) + (LE0 : r0 <14== r1) (LE1 : r1 <14== r2) : + r0 <14== r2. +Proof. repeat_intros 14. intros H. auto. Qed. + +Lemma le15_trans T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14(r0 r1 r2 : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) + (LE0 : r0 <15== r1) (LE1 : r1 <15== r2) : + r0 <15== r2. +Proof. repeat_intros 15. intros H. auto. Qed. + +Lemma le0_refl(r : rel0) : + r <0== r. +Proof. repeat_intros 0. intros H. auto. Qed. + +Lemma le1_refl T0(r : rel1 T0) : + r <1== r. +Proof. repeat_intros 1. intros H. auto. Qed. + +Lemma le2_refl T0 T1(r : rel2 T0 T1) : + r <2== r. +Proof. repeat_intros 2. intros H. auto. Qed. + +Lemma le3_refl T0 T1 T2(r : rel3 T0 T1 T2) : + r <3== r. +Proof. repeat_intros 3. intros H. auto. Qed. + +Lemma le4_refl T0 T1 T2 T3(r : rel4 T0 T1 T2 T3) : + r <4== r. +Proof. repeat_intros 4. intros H. auto. Qed. + +Lemma le5_refl T0 T1 T2 T3 T4(r : rel5 T0 T1 T2 T3 T4) : + r <5== r. +Proof. repeat_intros 5. intros H. auto. Qed. + +Lemma le6_refl T0 T1 T2 T3 T4 T5(r : rel6 T0 T1 T2 T3 T4 T5) : + r <6== r. +Proof. repeat_intros 6. intros H. auto. Qed. + +Lemma le7_refl T0 T1 T2 T3 T4 T5 T6(r : rel7 T0 T1 T2 T3 T4 T5 T6) : + r <7== r. +Proof. repeat_intros 7. intros H. auto. Qed. + +Lemma le8_refl T0 T1 T2 T3 T4 T5 T6 T7(r : rel8 T0 T1 T2 T3 T4 T5 T6 T7) : + r <8== r. +Proof. repeat_intros 8. intros H. auto. Qed. + +Lemma le9_refl T0 T1 T2 T3 T4 T5 T6 T7 T8(r : rel9 T0 T1 T2 T3 T4 T5 T6 T7 T8) : + r <9== r. +Proof. repeat_intros 9. intros H. auto. Qed. + +Lemma le10_refl T0 T1 T2 T3 T4 T5 T6 T7 T8 T9(r : rel10 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9) : + r <10== r. +Proof. repeat_intros 10. intros H. auto. Qed. + +Lemma le11_refl T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10(r : rel11 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10) : + r <11== r. +Proof. repeat_intros 11. intros H. auto. Qed. + +Lemma le12_refl T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11(r : rel12 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11) : + r <12== r. +Proof. repeat_intros 12. intros H. auto. Qed. + +Lemma le13_refl T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12(r : rel13 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12) : + r <13== r. +Proof. repeat_intros 13. intros H. auto. Qed. + +Lemma le14_refl T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13(r : rel14 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13) : + r <14== r. +Proof. repeat_intros 14. intros H. auto. Qed. + +Lemma le15_refl T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14(r : rel15 T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14) : + r <15== r. +Proof. repeat_intros 15. intros H. auto. Qed. +