diff --git a/src/Thorn_Calculus-Derived-Channels-Synchronous.thy b/src/Thorn_Calculus-Derived-Channels-Synchronous.thy index 53058bc..82f3855 100644 --- a/src/Thorn_Calculus-Derived-Channels-Synchronous.thy +++ b/src/Thorn_Calculus-Derived-Channels-Synchronous.thy @@ -10,20 +10,16 @@ theory "Thorn_Calculus-Derived-Channels-Synchronous" "Thorn_Calculus-Processes" begin +consts + sync_send :: "'c \ 'v \ 'p \ 'p" (\(_ \\<^bsub>s\<^esub> _;/ _)\ [53, 0, 52] 52) + sync_receive :: "'c \ ('v \ 'p) \ 'p" + typedef 'a sync_channel = "UNIV :: 'a channel channel set" morphisms sync_channel_to_nested_channel sync_channel_from_nested_channel .. instance sync_channel :: (type) embeddable by standard (meson sync_channel_to_nested_channel_inject ex_inj inj_def) -lift_definition - sync_send :: "'a sync_channel \ 'a::embeddable \ process \ process" - (\(_ \\<^bsub>s\<^esub> _;/ _)\ [53, 0, 52] 52) - is "\A x p. A \ (a :: 'a channel). (a \ x \ p)" . - -lift_definition sync_receive :: "'a sync_channel \ ('a::embeddable \ process) \ process" - is "\A P. \ (a :: 'a channel). (A \ a \ a \ x. P x)" . - syntax "_sync_receive" :: "'a::embeddable sync_channel \ pttrn \ process \ process" (\(3_ \\<^bsub>s\<^esub> _./ _)\ [53, 0, 52] 52) @@ -33,6 +29,32 @@ print_translation \ [preserve_binder_abs_receive_tr' @{const_syntax sync_receive} @{syntax_const "_sync_receive"}] \ +overloading + plain_sync_send \ "sync_send :: chan \ val \ process \ process" + plain_sync_receive \ "receive :: chan \ (val \ process) \ process" +begin + +lift_definition plain_sync_send :: "'a sync_channel \ 'a \ process \ process" + is "\A x p. A \ (a :: 'a channel). (a \ x \ p)" . + +lift_definition plain_sync_receive :: "'a sync_channel \ ('a \ process) \ process" + is "\A P. \ (a :: 'a channel). (A \ a \ a \ x. P x)" . + +end + +overloading + sync_send_family \ "sync_send :: chan family \ val family \ process family \ process family" + sync_receive_family \ "sync_receive :: chan family \ (val \ process family) \ process family" +begin + +definition sync_send_family :: "chan family \ val family \ process family \ process family" where + [simp]: "sync_send_family A X P = (\e. A e \\<^bsub>s\<^esub> X e; P e)" + +definition sync_receive_family :: "chan family \ (val \ process family) \ process family" where + [simp]: "sync_receive_family A \

= (\e. A e \\<^bsub>s\<^esub> x. \

x e)" + +end + typedef sync_chan = "UNIV :: chan set" morphisms sync_chan_to_chan sync_chan_from_chan .. instance sync_chan :: embeddable