(* Contribution to the Coq Library   V6.3 (July 1999)                    *)
(****************************************************************************)
(* This contribution was updated for Coq V5.10 by the COQ workgroup.        *)
(* January 1995                                                             *)
(****************************************************************************)
(*                                                                          *)
(*      Coq V5.8                                                            *)
(*                                                                          *)
(*                                                                          *)
(*      Alternating Bit Protocol                                            *)
(*                                                                          *)
(*      Jan Friso Groote                                                    *)
(*      Utrecht University                                                  *)
(*                                                                          *)
(*      November 1992                                                       *)
(*                                                                          *)
(* From bezem@phil.ruu.nl Fri Apr  2 13:14:31 1993                          *)
(*                                                                          *)
(****************************************************************************)
(*                                abp_base.v                                *)
(****************************************************************************)
Global Set Asymmetric Patterns.
Inductive act : Set :=
| r1 : act
| r2 : act
| r3 : act
| r5 : act
| r6 : act
| s2 : act
| s3 : act
| s4 : act
| s5 : act
| s6 : act
| c2 : act
| c3 : act
| c5 : act
| c6 : act
| int : act
| delta : act
| tau : act.
Parameter proc : Set.
Parameter ia : forall E : Set, act -> E -> proc.
Inductive one : Set :=
i : one.
Definition Delta := ia one delta i.
Inductive list (A : Set) : Set :=
| nil : list A
| cons : A -> list A -> list A.
(* ehlist are the lists used in the hiding and the encapsulation operator *)
Inductive ehlist : Set :=
| ehnil : ehlist
| ehcons : act -> ehlist -> ehlist.
Definition In_list (N : Set) (n : N) (Y : list N) : Prop :=
(fix F (l : list N) : Prop :=
match l with
| nil => False
| cons y l0 => n = y :>N \/ F l0
end) Y.
Definition In_ehlist (a : act) (H : ehlist) : Prop :=
(fix F (e : ehlist) : Prop :=
match e with
| ehnil => False
| ehcons a0 e0 => a = a0 :>act \/ F e0
end) H.
(* Parameter lab  :act->name *)
Parameter alt : proc -> proc -> proc.
Parameter seq : proc -> proc -> proc.
Parameter mer : proc -> proc -> proc.
Parameter Lmer : proc -> proc -> proc.
Parameter comm : proc -> proc -> proc.
Parameter cond : proc -> bool -> proc -> proc.
Parameter sum : forall A : Set, (A -> proc) -> proc.
Parameter enc : ehlist -> proc -> proc.
Parameter hide : ehlist -> proc -> proc.
Parameter GRD : proc -> Prop.
Infix "+" := sum (left associativity, at level 50).
Definition gamma (a b : act) :=
match a, b with
| r2, s2 => c2
| r3, s3 => c3
| r5, s5 => c5
| r6, s5 => c6
| s2, r2 => c2
| s3, r3 => c3
| s5, r5 => c5
| s6, r6 => c6
| _, _ => delta
end.
Parameter EQ : Set -> Set -> Prop.

Axiom EQ_refl : forall S1 : Set, EQ S1 S1.
Axiom EQ_sym : forall S1 S2 : Set, EQ S1 S2 -> EQ S2 S1.