src/HOL/HOLCF/IOA/NTP/Impl.thy
changeset 62116 bc178c0fe1a1
parent 62002 f1599e98c4d0
child 62390 842917225d56
equal deleted inserted replaced
62115:57895801cb57 62116:bc178c0fe1a1
    16 definition
    16 definition
    17   impl_ioa :: "('m action, 'm impl_state)ioa" where
    17   impl_ioa :: "('m action, 'm impl_state)ioa" where
    18   impl_def: "impl_ioa == (sender_ioa \<parallel> receiver_ioa \<parallel> srch_ioa \<parallel> rsch_ioa)"
    18   impl_def: "impl_ioa == (sender_ioa \<parallel> receiver_ioa \<parallel> srch_ioa \<parallel> rsch_ioa)"
    19 
    19 
    20 definition sen :: "'m impl_state => 'm sender_state" where "sen = fst"
    20 definition sen :: "'m impl_state => 'm sender_state" where "sen = fst"
    21 definition rec :: "'m impl_state => 'm receiver_state" where "rec = fst o snd"
    21 definition rec :: "'m impl_state => 'm receiver_state" where "rec = fst \<circ> snd"
    22 definition srch :: "'m impl_state => 'm packet multiset" where "srch = fst o snd o snd"
    22 definition srch :: "'m impl_state => 'm packet multiset" where "srch = fst \<circ> snd \<circ> snd"
    23 definition rsch :: "'m impl_state => bool multiset" where "rsch = snd o snd o snd"
    23 definition rsch :: "'m impl_state => bool multiset" where "rsch = snd \<circ> snd \<circ> snd"
    24 
    24 
    25 definition
    25 definition
    26   hdr_sum :: "'m packet multiset => bool => nat" where
    26   hdr_sum :: "'m packet multiset => bool => nat" where
    27   "hdr_sum M b == countm M (%pkt. hdr(pkt) = b)"
    27   "hdr_sum M b == countm M (%pkt. hdr(pkt) = b)"
    28 
    28