Nuprl Theory sci_rank

(only non hidden objects are presented)

COMsci_rank_1---- General Definitions and Theorems --------------------
THMfilter_eq_intx:. l: List. P: . (P x) filter(y.(y = x);filter(P;l)) = filter(P;l)
THMfilter_eq_int_false_elx,z:. l: List. (z = x) (list_el(;x;l) list_el(;x;filter(y.(y = z);l)))
DISPrank_fn_dfrank_fn(<x:x:*><l:l:*>)== rank_fn(<x><l>)
MLrank_fn_mlrank_fn(x;l) ==r if null(l) then -1 else if (x = hd(l)) then ||tl(l)|| else rank_fn(x;tl(l)) fi fi
THMrank_fn_wfx:. l: List. rank_fn(x;l)
THMrank_fn_consx,y:. l: List. rank_fn(x;y::l) = if (x = y) then ||l|| else rank_fn(x;l) fi
THMrank_fn_elx:. l: List. rank_fn(x;l) 0 list_el(;x;l)
THMrank_fn_rangex:. l: List. -1 rank_fn(x;l) < ||l||
DISPranked_dfranked(<x:x:*><l:l:*>)== ranked(<x><l>)
ABSrankedranked(x;l) == rank_fn(x;l) 0
THMranked_wfx:. l: List. ranked(x;l)
THMranked_el_rwx:. l: List. ranked(x;l) list_el(;x;l)
THMrank_fn_uniquex,y:. l: List. ranked(x;l) rank_fn(x;l) = rank_fn(y;l) x = y
THMrank_fn_succ_charx:. l: List. ranked(x;l) (rank_fn(x;l) = ||l|| - 1 (k: List. l = (x::k)))
THMranked_filterx,y:. l: List. ranked(x;l) (x = y) ranked(x;filter(x.(x = y);l))
DISPnonranked_dfnonranked(<x:x:*><l:l:*>)== nonranked(<x><l>)
ABSnonrankednonranked(x;l) == rank_fn(x;l) = -1
THMnonranked_wfx:. l: List. nonranked(x;l)
THMranked_or_nonrankedx:. l: List. ranked(x;l) nonranked(x;l)
DISPfirst_occurrences_dffirst_occurrences(<l:l:*>)== first_occurrences(<l>)
MLfirst_occurrences_mlfirst_occurrences(l) ==r if null(l) then [] else hd(l)::filter(x.(x = hd(l));first_occurrences(tl(l))) fi
THMfirst_occurrences_wfl: List. first_occurrences(l) List
THMfirst_occurrences_charfirst_occurrences([]) = [] (y:. l: List. first_occurrences(y::l) = (y::filter(x.(x = y);first_occurrences(l))))
COMsci_rank_2---- Pid versions of theorems needed(?) for rank ---------
THMfilter_eq_pidx:PId. l:PId List. P:PId . (P x) filter(y.(y = x);filter(P;l)) = filter(P;l)
THMfilter_eq_int_false_pidP,Q:PId . x:PId. l:PId List. (Q x) (y:PId. (x = y) ((Q y) (P y))) filter(Q;l) = filter(y.(y = x);filter(P;l))
THMrank_fn_el_pidx:PId. l:PId List. rank_fn(x;l) 0 list_el(PId;x;l)
THMrank_fn_succ_char_pidx:PId. l:PId List. ranked(x;l) (rank_fn(x;l) = ||l|| - 1 (k:PId List. l = (x::k)))
THMrank_fn_le_filter_pidp,q,r:PId. l:PId List. ranked(r;l) ranked(q;l) (p = r) (p = q) (rank_fn(r;l) rank_fn(q;l) rank_fn(r;filter(x.(x = p);l)) rank_fn(q;filter(x.(x = p);l)))
THMrank_fn_lt_filter_pidp,q,r:PId. l:PId List. ranked(r;l) ranked(q;l) (p = r) (p = q) (rank_fn(r;l) < rank_fn(q;l) rank_fn(r;filter(x.(x = p);l)) < rank_fn(q;filter(x.(x = p);l)))
THMrank_fn_succ_filter_pidp,q,r:PId. l:PId List. ranked(r;l) ranked(q;l) (p = r) (p = q) rank_fn(r;l) = rank_fn(q;l) + 1 rank_fn(r;filter(x.(x = p);l)) = rank_fn(q;filter(x.(x = p);l)) + 1
THMrank_fn_zero_filter_pidp,q:PId. l:PId List. (p = q) rank_fn(q;l) = 0 rank_fn(q;filter(x.(x = p);l)) = 0
THMfirst_occurrences_wf1l:PId List. first_occurrences(l) PId List
THMfirst_occurrences_char1first_occurrences([]) = [] (y:PId. l:PId List. first_occurrences(y::l) = (y::filter(x.(x = y);first_occurrences(l))))
MLrank_simpsetmap ((simpset_add `rank`) o lemma_simp) ``assert_of_bactive rank_fn_cons``;; map (simpset_add `rank`) (lemma_simps `first_occurrences_char1`) ;; % for historic reasons only % map (simpset_add `base1`) (lemma_simps `first_occurrences_char1`) ;;
COMsci_rank_3---- SCI Rank --------------------------------------------
DISPquery_received_hist_dfquery_received_hist(<s:s:*>)== query_received_hist(<s>)
ABSquery_received_histquery_received_hist(s) == filter(he.(he.send? = false) ((he.mesg.type = read_cache_freshQ) (he.mesg.type = read_cache_goneQ));s.h)
THMquery_received_hist_wfs:state. query_received_hist(s) hist
DISPquery_received_queue_dfquery_received_queue(<s:s:*>)== query_received_queue(<s>)
ABSquery_received_queuequery_received_queue(s) == first_occurrences(map(he.he.src;query_received_hist(s)))
THMquery_received_queue_wfs:state. query_received_queue(s) PId List
THMquery_received_queue_char(v:id . query_received_queue(mk_state(v;[])) = []) (v:id . he:hist_el. h:hist. he.send? = false (he.mesg.type = read_cache_freshQ he.mesg.type = read_cache_goneQ) query_received_queue(mk_state(v;he::h)) = (he.src ::filter(x.(x = he.src);query_received_queue(mk_state(v; h))))) (v:id . he:hist_el. h:hist. (he.send? = false (he.mesg.type = read_cache_freshQ he.mesg.type = read_cache_goneQ)) query_received_queue(mk_state(v;he::h)) = query_received_queue(mk_state(v;h)))
DISPactive_queue_dfactive_queue(<s:s:*>)== active_queue(<s>)
ABSactive_queueactive_queue(s) == filter(p.bactive(s;p);query_received_queue(s))
THMactive_queue_wfs:state. active_queue(s) PId List
DISPrank_dfrank(<s:s:*><p:p:*>)== rank(<s><p>)
ABSrankrank(s;p) == rank_fn(p;active_queue(s))
THMrank_wfs:state. p:. rank(s;p)
DISPhasrank_dfhasrank(<s:s:*><p:p:*>)== hasrank(<s><p>)
ABShasrankhasrank(s;p) == rank(s;p) 0
THMhasrank_wfs:state. p:. hasrank(s;p)
THMhasrank_actives:state. p:PId. hasrank(s;p) active(s;p)
THMrank_uniques:state. p,q:. hasrank(s;p) rank(s;p) = rank(s;q) p = q
DISPmaxrank_dfmaxrank(<n:n:*><s:s:*><p:p:*>)== maxrank(<n><s><p>)
ABSmaxrankmaxrank(n;s;p) == hasrank(s;p) (q:P. hasrank(s;q) rank(s;q) rank(s;p))
THMmaxrank_wfn:. s:state. p:. maxrank(n;s;p)
DISPsmallrank_dfsmallrank(<n:n:*><s:s:*><p:p:*><q:q:*>) == smallrank(<n><s><p><q>)
ABSsmallranksmallrank(n;s;p;q) == (entering(s;q) staying(s;q)) rank(s;p) < rank(s;q) hasrank(s;q) hasrank(s;p) (r:P (entering(s;r) staying(s;r)) rank(s;p) rank(s;r) rank(s;q) rank(s;r))
THMsmallrank_wfn:. s:state. p:. q:PId. smallrank(n;s;p;q)
DISPmaxrank_visiting_dfmaxrank_visiting(<n:n:*><s:s:*><p:p:*>) == maxrank_visiting(<n><s><p>)
ABSmaxrank_visitingmaxrank_visiting(n;s;p) == visiting(s;p) hasrank(s;p) (q:P. visiting(s;q) hasrank(s;q) rank(s;q) rank(s;p))
THMmaxrank_visiting_wfn:. s:state. p:PId. maxrank_visiting(n;s;p)
DISPmaxrank_staying_dfmaxrank_staying(<n:n:*><s:s:*><p:p:*>) == maxrank_staying(<n><s><p>)
ABSmaxrank_stayingmaxrank_staying(n;s;p) == staying(s;p) hasrank(s;p) (q:P. staying(s;q) hasrank(s;q) rank(s;q) rank(s;p))
THMmaxrank_staying_wfn:. s:state. p:PId. maxrank_staying(n;s;p)
DISPmaxrank_active_dfmaxrank_active(<n:n:*><s:s:*><p:p:*>)== maxrank_active(<n><s><p>)
ABSmaxrank_activemaxrank_active(n;s;p) == active(s;p) hasrank(s;p) (q:P. active(s;q) hasrank(s;q) rank(s;q) rank(s;p))
THMmaxrank_active_wfn:. s:state. p:PId. maxrank_active(n;s;p)
COMsci_rank_4---- Lemmas for Rank Rewrites ----------------------------
THMfilter_active_iffs:state. c:com. l:PId List. (p:PId. active(cs;p) active(s;p)) filter(p.bactive(cs;p);l) = filter(p.bactive(s;p);l)
THMfilter_neq_active_iffs:state. c:com. q:. l:PId List. (p:PId. (p = q) (active(cs;p) active(s;p))) filter(p.bactive(cs;p);filter(x.(x = q);l)) = filter(p.bactive(s;p);filter(x.(x = q);l))
THMquery_received_hist_cassign_rws:state. x:id. e:zexp. query_received_hist(x:=es) = query_received_hist(s)
THMquery_received_hist_hsend_rws:state. p:PId. q:. M:mesg. query_received_hist([h<-(hsend(p;q;M)::h)]s) = query_received_hist(s)
THMquery_received_hist_hreceive_ni_rws:state. p:. (next_mesg(p;s.h).type = read_cache_freshQ) (next_mesg(p;s.h).type = read_cache_goneQ) query_received_hist([h<-(hreceive(p;h)::h)]s) = query_received_hist(s)
THMquery_received_hist_hreceive_rws:state. p:. next_mesg(p;s.h).type = read_cache_freshQ next_mesg(p;s.h).type = read_cache_goneQ query_received_hist([h<-(hreceive(p;h)::h)]s) = (hreceive(p;s.h)::query_received_hist(s))
THMquery_received_queue_cassign_rws:state. x:id. e:zexp. query_received_queue(x:=es) = query_received_queue(s)
THMquery_received_queue_hsend_rws:state. p:PId. q:. M:mesg. query_received_queue([h<-(hsend(p;q;M)::h)]s) = query_received_queue(s)
THMquery_received_queue_hreceive_ni_rws:state. p:. (next_mesg(p;s.h).type = read_cache_freshQ) (next_mesg(p;s.h).type = read_cache_goneQ) query_received_queue([h<-(hreceive(p;h)::h)]s) = query_received_queue(s)
THMquery_received_queue_hreceive_rws:state. p:. next_mesg(p;s.h).type = read_cache_freshQ next_mesg(p;s.h).type = read_cache_goneQ query_received_queue([h<-(hreceive(p;h)::h)]s) = (next_he(p;s.h).src ::filter(x.(x = next_he(p;s.h).src);query_received_queue(s) ))
THMactive_queue_cassign_rws:state. x:id. e:zexp. (p:PId. active(x:=es;p) active(s;p)) active_queue(x:=es) = active_queue(s)
THMactive_queue_hsend_rws:state. p:PId. q:. M:mesg. (r:PId. active([h<-(hsend(p;q;M)::h)]s;r) active(s;r)) active_queue([h<-(hsend(p;q;M)::h)]s) = active_queue(s)
THMactive_queue_hreceive_active_rws:state. q:. next_mesg(q;s.h).type = read_cache_freshQ next_mesg(q;s.h).type = read_cache_goneQ (p:PId (p = next_he(q;s.h).src) (active([h<-(hreceive(q;h)::h)]s;p) active(s;p))) active([h<-(hreceive(q;h)::h)]s;next_he(q;s.h).src) active_queue([h<-(hreceive(q;h)::h)]s) = (next_he(q;s.h).src ::filter(x.(x = next_he(q;s.h).src);active_queue(s)))
THMactive_queue_hreceive_inactive_rws:state. q:. (p:PId. active([h<-(hreceive(q;h)::h)]s;p) active(s;p)) active(s;next_he(q;s.h).src) active_queue([h<-(hreceive(q;h)::h)]s) = active_queue(s)
THMactive_queue_hreceive_ni_rws:state. q:. (p:PId. active([h<-(hreceive(q;h)::h)]s;p) active(s;p)) (next_mesg(q;s.h).type = read_cache_freshQ) (next_mesg(q;s.h).type = read_cache_goneQ) active_queue([h<-(hreceive(q;h)::h)]s) = active_queue(s)
THMactive_queue_inactive_rws:state. p:PId. x:id. e:zexp. active(x:=es;p) (q:PId. (p = q) (active(x:=es;q) active(s;q))) active_queue(x:=es) = filter(x.(x = p);active_queue(s))
THMactive_queue_hsend_inactive_rws:state. p,r:PId. M:mesg. active([h<-(hsend(r;p;M)::h)]s;p) (q:PId (p = q) (active([h<-(hsend(r;p;M)::h)]s;q) active(s;q))) active_queue([h<-(hsend(r;p;M)::h)]s) = filter(x.(x = p);active_queue(s))
THMrank_active_cassign_rws:state. x:id. e:zexp. (p:PId. active(x:=es;p) active(s;p)) (p:PId. rank(x:=es;p) = rank(s;p))
THMrank_active_hsend_rws:state. p:PId. q:. M:mesg. (r:PId. active([h<-(hsend(p;q;M)::h)]s;r) active(s;r)) (r:PId. rank([h<-(hsend(p;q;M)::h)]s;r) = rank(s;r))
THMrank_active_hreceive_inactive_rws:state. p:PId. q:. (p:PId. active([h<-(hreceive(q;h)::h)]s;p) active(s;p)) active(s;next_he(q;s.h).src) (p:PId. rank([h<-(hreceive(q;h)::h)]s;p) = rank(s;p))
THMrank_active_hreceive_ni_rws:state. p:PId. q:. (p:PId. active([h<-(hreceive(q;h)::h)]s;p) active(s;p)) (next_mesg(q;s.h).type = read_cache_freshQ) (next_mesg(q;s.h).type = read_cache_goneQ) (p:PId. rank([h<-(hreceive(q;h)::h)]s;p) = rank(s;p))
COMsci_rank_5---- Rank Rewrites ---------------------------------------
THMrank_hsend_gone_rws:state. p,q:PId. status-p_ = Off rank([h<-(hsend(p;m;read_cache_goneQ(p::[]))::h)]s;q) = rank(s;q)
THMrank_hsend_fresh_rws:state. p,q:PId. status-p_ = Off rank([h<-(hsend(p;m;read_cache_freshQ(p::[]))::h)]s;q) = rank(s;q)
THMrank_hsend_reject_rws:state. p,q,r:PId. rank([h<-(hsend(q;p;delleftR(q::zreject{}::[]))::h)]s;r) = rank(s;r)
THMrank_hsend_ni_rws:state. p,q:PId. r:. M:mesg. (M.type = read_cache_freshQ) (M.type = read_cache_goneQ) (M.type = delleftR) rank([h<-(hsend(q;r;M)::h)]s;p) = rank(s;p)
THMrank_hreceive_ni_rws:state. p:PId. q:. (next_mesg(q;s.h).type = read_cache_freshQ) (next_mesg(q;s.h).type = read_cache_goneQ) (next_mesg(q;s.h).type = delleftR) (next_mesg(q;s.h).type = 0) rank([h<-(hreceive(q;h)::h)]s;p) = rank(s;p)
THMrank_delleftr_reject_rws:state. p:PId. q:. (qq:. next_mesg(q;s.h) = delleftR(qq::zreject{}::[])) rank([h<-(hreceive(q;h)::h)]s;p) = rank(s;p)
THMrank_diff_id_rws:state. p:PId. x:id. e:zexp. ((x.name) = "status") ((x.name) = "cs") rank(x:=es;p) = rank(s;p)
THMrank_znil_assign_rws:state. p:PId. x:Atom. e:zexp. rank(xnil:=es;p) = rank(s;p)
THMrank_pending_rws:state. p:PId. q:PId?. list_el(mesg;read_cache_freshQ(q::[]);buf[m]_) list_el(mesg;read_cache_goneQ(q::[]);buf[m]_) rank(statusq:=Pendings;p) = rank(s;p)
THMrank_pending_inqueue_rws:state. p:PId. q:PId?. status-q_ = Pending rank(statusq:=Inqueues;p) = rank(s;p)
THMrank_pending_inlist_rws:state. p:PId. q:PId?. status-q_ = Pending rank(statusq:=Inlists;p) = rank(s;p)
THMrank_inqueue_inlist_rws:state. p:PId. q:PId?. status-q_ = Inqueue rank(statusq:=Inlists;p) = rank(s;p)
THMrank_inlist_purging_rws:state. p:PId. q:PId?. status-q_ = Inlist rank(statusq:=Purgings;p) = rank(s;p)
THMrank_inlist_ftod_rws:state. p:PId. q:PId?. status-q_ = Inlist rank(statusq:=Ftods;p) = rank(s;p)
THMrank_ftod_inlist_rws:state. p:PId. q:PId?. status-q_ = Ftod rank(statusq:=Inlists;p) = rank(s;p)
THMrank_inlist_delright_rws:state. p:PId. q:PId?. status-q_ = Inlist (cs-q_ = invalid{}) (qq:. list_el(mesg;delleftR(qq::ok{}::[]);buf[q]_)) rank(statusq:=Delrights;p) = rank(s;p)
THMrank_inlist_delleft_rws:state. p:PId. q:PId?. status-q_ = Inlist (cs-q_ = invalid{}) (qq:. list_el(mesg;delleftR(qq::ok{}::[]);buf[q]_)) rank(statusq:=Dellefts;p) = rank(s;p)
THMrank_delright_off_rws:state. p:PId. q:PId?. status-q_ = Delright cs-q_ = invalid{} rank(statusq:=Offs;p) = rank(s;p)
THMrank_delright_inlist_rws:state. p:PId. q:PId?. status-q_ = Delright (cs-q_ = invalid{}) (qq:. list_el(mesg;delleftR(qq::ok{}::[]);buf[q]_)) rank(statusq:=Inlists;p) = rank(s;p)
THMrank_delright_delleft_rws:state. p:PId. q:PId?. status-q_ = Delright rank(statusq:=Dellefts;p) = rank(s;p)
THMrank_delleft_off_rws:state. p:PId. q:PId?. status-q_ = Delleft cs-q_ = invalid{} rank(statusq:=Offs;p) = rank(s;p)
THMrank_purging_inlist_rws:state. p:PId. q:PId?. status-q_ = Purging rank(statusq:=Inlists;p) = rank(s;p)
THMrank_cs_ni_rws:state. p:PId. q:PId?. e:zexp. (status-q_ = Delleft) (status-q_ = Delright) rank(csq:=es;p) = rank(s;p)
COMsci_rank_6---- hasrank Rewrites ------------------------------------
THMhasrank_hsend_gone_rws:state. p,q:PId. status-p_ = Off (hasrank([h<-(hsend(p;m;read_cache_goneQ(p::[]))::h)]s;q) hasrank(s;q))
THMhasrank_hsend_fresh_rws:state. p,q:PId. status-p_ = Off (hasrank([h<-(hsend(p;m;read_cache_freshQ(p::[]))::h)]s;q) hasrank(s;q))
THMhasrank_hsend_reject_rws:state. p,q,r:PId. hasrank([h<-(hsend(q;p;delleftR(q::zreject{}::[]))::h)]s;r) hasrank(s;r)
THMhasrank_hsend_ni_rws:state. p,q:PId. r:. M:mesg. (M.type = read_cache_freshQ) (M.type = read_cache_goneQ) (M.type = delleftR) (hasrank([h<-(hsend(q;r;M)::h)]s;p) hasrank(s;p))
THMhasrank_hreceive_ni_rws:state. p:PId. q:. (next_mesg(q;s.h).type = read_cache_freshQ) (next_mesg(q;s.h).type = read_cache_goneQ) (next_mesg(q;s.h).type = delleftR) (next_mesg(q;s.h).type = 0) (hasrank([h<-(hreceive(q;h)::h)]s;p) hasrank(s;p))
THMhasrank_delleftr_reject_rws:state. p:PId. q:. (qq:. next_mesg(q;s.h) = delleftR(qq::zreject{}::[])) (hasrank([h<-(hreceive(q;h)::h)]s;p) hasrank(s;p))
THMhasrank_diff_id_rws:state. p:PId. x:id. e:zexp. ((x.name) = "status") ((x.name) = "cs") (hasrank(x:=es;p) hasrank(s;p))
THMhasrank_znil_assign_rws:state. p:PId. x:Atom. e:zexp. hasrank(xnil:=es;p) hasrank(s;p)
THMhasrank_pending_rws:state. p:PId. q:PId?. list_el(mesg;read_cache_freshQ(q::[]);buf[m]_) list_el(mesg;read_cache_goneQ(q::[]);buf[m]_) (hasrank(statusq:=Pendings;p) hasrank(s;p))
THMhasrank_pending_inqueue_rws:state. p:PId. q:PId?. status-q_ = Pending (hasrank(statusq:=Inqueues;p) hasrank(s;p))
THMhasrank_pending_inlist_rws:state. p:PId. q:PId?. status-q_ = Pending (hasrank(statusq:=Inlists;p) hasrank(s;p))
THMhasrank_inqueue_inlist_rws:state. p:PId. q:PId?. status-q_ = Inqueue (hasrank(statusq:=Inlists;p) hasrank(s;p))
THMhasrank_inlist_purging_rws:state. p:PId. q:PId?. status-q_ = Inlist (hasrank(statusq:=Purgings;p) hasrank(s;p))
THMhasrank_inlist_ftod_rws:state. p:PId. q:PId?. status-q_ = Inlist (hasrank(statusq:=Ftods;p) hasrank(s;p))
THMhasrank_ftod_inlist_rws:state. p:PId. q:PId?. status-q_ = Ftod (hasrank(statusq:=Inlists;p) hasrank(s;p))
THMhasrank_inlist_delright_rws:state. p:PId. q:PId?. status-q_ = Inlist (cs-q_ = invalid{}) (qq:. list_el(mesg;delleftR(qq::ok{}::[]);buf[q]_)) (hasrank(statusq:=Delrights;p) hasrank(s;p))
THMhasrank_inlist_delleft_rws:state. p:PId. q:PId?. status-q_ = Inlist (cs-q_ = invalid{}) (qq:. list_el(mesg;delleftR(qq::ok{}::[]);buf[q]_)) (hasrank(statusq:=Dellefts;p) hasrank(s;p))
THMhasrank_delright_off_rws:state. p:PId. q:PId?. status-q_ = Delright cs-q_ = invalid{} (hasrank(statusq:=Offs;p) hasrank(s;p))
THMhasrank_delright_inlist_rws:state. p:PId. q:PId?. status-q_ = Delright (cs-q_ = invalid{}) (qq:. list_el(mesg;delleftR(qq::ok{}::[]);buf[q]_)) (hasrank(statusq:=Inlists;p) hasrank(s;p))
THMhasrank_delright_delleft_rws:state. p:PId. q:PId?. status-q_ = Delright (hasrank(statusq:=Dellefts;p) hasrank(s;p))
THMhasrank_delleft_off_rws:state. p:PId. q:PId?. status-q_ = Delleft cs-q_ = invalid{} (hasrank(statusq:=Offs;p) hasrank(s;p))
THMhasrank_purging_inlist_rws:state. p:PId. q:PId?. status-q_ = Purging (hasrank(statusq:=Inlists;p) hasrank(s;p))
THMhasrank_cs_ni_rws:state. p:PId. q:PId?. e:zexp. (status-q_ = Delleft) (status-q_ = Delright) (hasrank(csq:=es;p) hasrank(s;p))
THMhasrank_off_diff_rws:state. p,r:PId. (p = r) (hasrank(statusp:=Offs;r) hasrank(s;r))
THMhasrank_invalid_diff_rws:state. p,r:PId. (p = r) (hasrank(csp:=invalid{}s;r) hasrank(s;r))
THMhasrank_delleftr_diff_rws:state. p,q,r:PId. (p = r) (hasrank([h<-(hsend(q;p;delleftR(q::ok{}::[]))::h)]s;r) hasrank(s;r))
THMhasrank_hreceive_freshq_rws:state. p:PId. next_mesg(m;s.h) = read_cache_freshQ(next_he(m;s.h).src::[]) (next_he(m;s.h).src = p) (hasrank([h<-(hreceive(m;h)::h)]s;p) hasrank(s;p))
THMhasrank_hreceive_goneq_rws:state. p:PId. next_mesg(m;s.h) = read_cache_goneQ(next_he(m;s.h).src::[]) (next_he(m;s.h).src = p) (hasrank([h<-(hreceive(m;h)::h)]s;p) hasrank(s;p))
MLsci_pred2_simpsetmap ((simpset_add `sci_pred2`) o lemma_simp) ``rank_znil_assign_rw hasrank_znil_assign_rw rank_hsend_reject_rw hasrank_hsend_reject_rw`` ;; map (simpset_add `sci_pred2`) [lemma_cond_simp `rank_diff_id_rw` [DiffIdName]; lemma_cond_simp `rank_pending_rw` [BufSimpCond]; lemma_cond_simp `rank_pending_inqueue_rw` [PendingSimpCond]; lemma_cond_simp `rank_pending_inlist_rw` [PendingSimpCond]; lemma_cond_simp `rank_inqueue_inlist_rw` [InqueueSimpCond]; lemma_cond_simp `rank_inlist_purging_rw` [InlistSimpCond]; lemma_cond_simp `rank_inlist_ftod_rw` [InlistSimpCond]; lemma_cond_simp `rank_ftod_inlist_rw` [FtodSimpCond]; lemma_cond_simp `rank_inlist_delright_rw` [InlistSimpCond;IdSimpCon d;BufSimpCond]; lemma_cond_simp `rank_inlist_delleft_rw` [InlistSimpCond;IdSimpCond ;BufSimpCond]; lemma_cond_simp `rank_delright_off_rw` [IdSimpCond]; lemma_cond_simp `rank_delright_inlist_rw` [DelrightSimpCond;IdSimpC ond;BufSimpCond]; lemma_cond_simp `rank_delright_delleft_rw` [DelrightSimpCond]; lemma_cond_simp `rank_delleft_off_rw` [DelleftSimpCond;IdSimpCond]; lemma_cond_simp `rank_purging_inlist_rw` [PurgingSimpCond]; lemma_cond_simp `rank_cs_ni_rw` [EvalExpCond]; lemma_cond_simp `rank_hsend_fresh_rw` [IdSimpCond]; lemma_cond_simp `rank_hsend_gone_rw` [IdSimpCond]; lemma_cond_simp `rank_hsend_ni_rw` [DiffMesgTypesOrTrivial]; lemma_cond_simp `rank_hreceive_ni_rw` [DiffRecTypes]; lemma_cond_simp `rank_delleftr_reject_rw` [InstDelleftR]; lemma_cond_simp `hasrank_diff_id_rw` [DiffIdName]; lemma_cond_simp `hasrank_pending_rw` [BufSimpCond]; lemma_cond_simp `hasrank_pending_inqueue_rw` [PendingSimpCond]; lemma_cond_simp `hasrank_pending_inlist_rw` [PendingSimpCond]; lemma_cond_simp `hasrank_inqueue_inlist_rw` [InqueueSimpCond]; lemma_cond_simp `hasrank_inlist_purging_rw` [InlistSimpCond]; lemma_cond_simp `hasrank_inlist_ftod_rw` [InlistSimpCond]; lemma_cond_simp `hasrank_ftod_inlist_rw` [FtodSimpCond]; lemma_cond_simp `hasrank_inlist_delright_rw` [InlistSimpCond;IdSimp Cond;BufSimpCond]; lemma_cond_simp `hasrank_inlist_delleft_rw` [InlistSimpCond;IdSimpC ond;BufSimpCond]; lemma_cond_simp `hasrank_delright_off_rw` [IdSimpCond]; lemma_cond_simp `hasrank_delright_inlist_rw` [DelrightSimpCond;IdSi mpCond;BufSimpCond]; lemma_cond_simp `hasrank_delright_delleft_rw` [DelrightSimpCond]; lemma_cond_simp `hasrank_delleft_off_rw` [DelleftSimpCond;IdSimpCon d]; lemma_cond_simp `hasrank_purging_inlist_rw` [PurgingSimpCond]; lemma_cond_simp `hasrank_cs_ni_rw` [EvalExpCond]; lemma_cond_simp `hasrank_hsend_fresh_rw` [IdSimpCond]; lemma_cond_simp `hasrank_hsend_gone_rw` [IdSimpCond]; lemma_cond_simp `hasrank_hsend_ni_rw` [DiffMesgTypesOrTrivial]; lemma_cond_simp `hasrank_hreceive_ni_rw` [DiffRecTypes]; lemma_cond_simp `hasrank_delleftr_reject_rw` [InstDelleftR]; lemma_cond_simp `hasrank_delleftr_diff_rw` [DiffBufferPids]; lemma_cond_simp `hasrank_off_diff_rw` [DiffBufferPids]; lemma_cond_simp `hasrank_invalid_diff_rw` [DiffBufferPids]; lemma_cond_simp `hasrank_hreceive_freshq_rw` [SameRecMesg;DiffRecSr c]; lemma_cond_simp `hasrank_hreceive_goneq_rw` [SameRecMesg;DiffRecSrc ] ];;
COMsci_rank_7---- Rank Rewrites for Action p15 ------------------------
THMrank_p15_invalid_rws:state. p,r:PId. argval,qval:. status-p_ = Delleft cs-p_ = invalid{} next_mesg(p;s.h).type = delleftR rank(statusp:=Off (csp:=invalid{} (predp:=nil (succp:=nil ([h<-(hreceive(p;h)::h)]("arg"nil:=argval(q:=qvals))))));r) = rank(s;r)
THMrank_p15_delleftr_rws:state. p,r:PId. argval,qval:. status-p_ = Delleft (qq:. delleftR(qq::ok{}::[]) buf[p]_) next_mesg(p;s.h).type = delleftR rank(statusp:=Off (csp:=invalid{} (predp:=nil (succp:=nil ([h<-(hreceive(p;h)::h)]("arg"nil:=argval(q:=qvals))))));r) = rank(s;r)
THMhasrank_p15_invalid_rws:state. p,r:PId. argval,qval:. status-p_ = Delleft cs-p_ = invalid{} next_mesg(p;s.h).type = delleftR (hasrank(statusp:=Off (csp:=invalid{} (predp:=nil (succp:=nil ([h<-(hreceive(p;h)::h)]("arg"nil:=argval(q:=qvals))))));r) hasrank(s;r))
THMhasrank_p15_delleftr_rws:state. p,r:PId. argval,qval:. status-p_ = Delleft (qq:. delleftR(qq::ok{}::[]) buf[p]_) next_mesg(p;s.h).type = delleftR (hasrank(statusp:=Off (csp:=invalid{} (predp:=nil (succp:=nil ([h<-(hreceive(p;h)::h)]("arg"nil:=argval(q:=qvals))))));r) hasrank(s;r))
MLrank_p15_simpset% map ((simpset_add `rank_p15`) o lemma_simp) ``rank_p15_delleftr_rw`` ;; % map (simpset_add `rank_p15`) [lemma_cond_simp `rank_p15_invalid_rw` [IdSimpCond;IdSimpCond;DiffRe cTypes]; lemma_cond_simp `rank_p15_delleftr_rw` [IdSimpCond;InstDelleftR;Dif fRecTypes]; lemma_cond_simp `hasrank_p15_invalid_rw` [IdSimpCond;IdSimpCond;Dif fRecTypes]; lemma_cond_simp `hasrank_p15_delleftr_rw` [IdSimpCond;InstDelleftR; DiffRecTypes] ] ;;
COMsci_rank_8---- Rank Comparison Rewrites ----------------------------
THMrank_le_off_diff_rws:state. p,q,r:PId. hasrank(s;r) hasrank(s;q) (p = r) (p = q) (rank(s;r) rank(s;q) rank(statusp:=Offs;r) rank(statusp:=Offs;q))
THMrank_le_invalid_diff_rws:state. p,q,r:PId. hasrank(s;r) hasrank(s;q) (p = r) (p = q) (rank(s;r) rank(s;q) rank(csp:=invalid{}s;r) rank(csp:=invalid{}s;q))
THMrank_le_delleftr_diff_rws:state. p,q,r,p':PId. hasrank(s;r) hasrank(s;q) (p = r) (p = q) (rank(s;r) rank(s;q) rank([h<-(hsend(p';p;delleftR(p'::ok{}::[]))::h)] s;r) rank([h<-(hsend(p';p;delleftR(p'::ok{}::[]))::h)] s;q))
THMrank_le_query_diff_rws:state. q,r:PId. hasrank(s;r) hasrank(s;q) next_mesg(m;s.h) = read_cache_freshQ(next_he(m;s.h).src::[]) next_mesg(m;s.h) = read_cache_goneQ(next_he(m;s.h).src::[]) (next_he(m;s.h).src = q) (next_he(m;s.h).src = r) (rank(s;r) rank(s;q) rank([h<-(hreceive(m;h)::h)]s;r) rank([h<-(hreceive(m;h) ::h)] s;q))
COMsci_rank_9---- One-Directional Rank Comparison Lemmas---------------
THMrank_succ_off_diffs:state. p,q,r:PId. hasrank(s;r) hasrank(s;q) (p = r) (p = q) rank(s;r) = rank(s;q) + 1 rank(statusp:=Offs;r) = rank(statusp:=Offs;q) + 1
THMrank_succ_invalid_diffs:state. p,q,r:PId. hasrank(s;r) hasrank(s;q) (p = r) (p = q) rank(s;r) = rank(s;q) + 1 rank(csp:=invalid{}s;r) = rank(csp:=invalid{}s;q) + 1
THMrank_succ_delleftr_diffs:state. p,q,r,p':PId. hasrank(s;r) hasrank(s;q) (p = r) (p = q) rank(s;r) = rank(s;q) + 1 rank([h<-(hsend(p';p;delleftR(p'::ok{}::[]))::h)]s;r) = rank([h<-(hsend(p';p;delleftR(p'::ok{}::[]))::h)]s;q) + 1
THMrank_succ_query_diffs:state. q,r:PId. hasrank(s;r) hasrank(s;q) next_mesg(m;s.h) = read_cache_freshQ(next_he(m;s.h).src::[]) next_mesg(m;s.h) = read_cache_goneQ(next_he(m;s.h).src::[]) (next_he(m;s.h).src = q) (next_he(m;s.h).src = r) rank(s;r) = rank(s;q) + 1 rank([h<-(hreceive(m;h)::h)]s;r) = rank([h<-(hreceive(m;h)::h)] s;q) + 1
COMsci_rank_10---- Rank Zero Lemmas ------------------------------------
THMrank_zero_invalid_diffs:state. p,q:PId. (p = q) rank(s;q) = 0 rank(csp:=invalid{}s;q) = 0

the other theories