(* Specifications: *)
Theorem swap_par_or_name : forall r p q : PP, pname (swap_par r p q) = swap_name (pname r) p q.
Theorem swap_is_subs_on_names : forall (n : name) (p q : PP), n <> pname p -> subs_par_name n (pname p) q = swap_name n p q.
Theorem swap_under_inp : forall (P : proc) (n : name) (p q : PP) (x : VV), swap_proc (inp n x P) p q = inp (swap_name n p q) x (swap_proc P p q).
Theorem swap_under_out : forall (P : proc) (n1 n2 : name) (p q : PP), swap_proc (out n1 n2 P) p q = out (swap_name n1 p q) (swap_name n2 p q) (swap_proc P p q).
Theorem swap_name_inefficient : forall (n : name) (p q : PP), n <> pname p -> n <> pname q -> swap_name n p q = n.
Theorem swap_proc_inefficient : forall (P : proc) (p q : PP), fresh p P -> fresh q P -> swap_proc P p q = P.
Theorem swap_under_subs_name : forall (n : name) (p q : PP) (m : name) (x : VV), swap_name (subs_var_name n m x) p q = subs_var_name (swap_name n p q) (swap_name m p q) x.
Theorem swap_under_subs : forall (P : proc) (p q : PP) (n : name) (x : VV), swap_proc (subs_var_proc P n x) p q = subs_var_proc (swap_proc P p q) (swap_name n p q) x.
Theorem swap_env_by_addenv : forall (G : env) (p q : PP), eqvenv (swap_env G p q) (addenv (addenv G p (G q)) q (G p)).
Theorem swap_on_gettype : forall (G : env) (r p q : PP), swap_env G p q r = G (swap_par r p q).
Theorem swap_par_twice : forall r p q : PP, swap_par (swap_par r p q) p q = r.
Theorem swap_on_addenv : forall (G : env) (r p q : PP) (t : type), eqvenv (swap_env (addenv G r t) p q) (addenv (swap_env G p q) (swap_par r p q) t).
Theorem fresh_after_swap_name : forall (n : name) (r p q : PP), freshname r (swap_name n p q) -> freshname (swap_par r p q) n.
Theorem fresh_after_swap : forall (P : proc) (r p q : PP), fresh r (swap_proc P p q) -> fresh (swap_par r p q) P.
Theorem swap_name_twice : forall (n : name) (p q : PP), swap_name (swap_name n p q) p q = n.
Theorem typing_after_swap : forall (G : env) (P : proc), typing G P -> forall p q : PP, typing (swap_env G p q) (swap_proc P p q).
Theorem subs_fresh_par_name : forall (n m : name) (p : PP), n <> pname p -> subs_par_name n m p = n.
Theorem subs_fresh_par : forall (P : proc) (n : name) (p : PP), fresh p P -> subs_par_proc P n p = P.
Theorem subs_par_after_subs_var_name : forall (n : name) (p q : PP) (x : VV), n <> pname q -> subs_par_name (subs_var_name n (pname q) x) (pname p) q = subs_var_name n (pname p) x.
Theorem subs_par_after_subs_var : forall (P : proc) (p q : PP) (x : VV), fresh q P -> subs_par_proc (subs_var_proc P (pname q) x) (pname p) q = subs_var_proc P (pname p) x.
Theorem subs_var_after_subs_par_name : forall (n : name) (p q : PP) (x : VV), n <> vname x -> subs_var_name (subs_par_name n (vname x) p) (pname q) x = subs_par_name n (pname q) p.
Theorem subs_var_after_subs_par : forall (P : proc) (p q : PP) (x : VV), freshvar x P -> subs_var_proc (subs_par_proc P (vname x) p) (pname q) x = subs_par_proc P (pname q) p.
Theorem inefficient_subs_par_name : forall (n : name) (p : PP), subs_par_name n (pname p) p = n.
Theorem inefficient_subs_par : forall (P : proc) (p : PP), subs_par_proc P (pname p) p = P.
Theorem switch_subs_name : forall (n n1 n2 : name) (p : PP) (x : VV), pname p <> n1 -> vname x <> n2 -> subs_var_name (subs_par_name n n2 p) n1 x = subs_par_name (subs_var_name n n1 x) n2 p.
Theorem switch_subs : forall (P : proc) (n1 n2 : name) (p : PP) (x : VV), pname p <> n1 -> vname x <> n2 -> subs_var_proc (subs_par_proc P n2 p) n1 x = subs_par_proc (subs_var_proc P n1 x) n2 p.
Theorem out_autored : forall (P P' : proc) (p q : PP), sem P (aout p q) P' -> forall G : env, typing G P -> typing G P'.
Theorem out_emits_correct_type : forall (P P' : proc) (p q : PP), sem P (aout p q) P' -> forall G : env, typing G P -> typest (G q) (getobj (G p)).
Theorem inp_autored : forall (P P' : proc) (p q : PP), sem P (ainp p q) P' -> forall G : env, typing G P -> typest (G q) (getobj (G p)) -> typing G P'.
Theorem inp_ind : forall Pr : proc -> proc -> PP -> PP -> Prop, (forall (p q : PP) (x : VV) (P : proc), Pr (inp (pname p) x P) (subs_var_proc P (pname q) x) p q) -> (forall (P P' : proc) (p q : PP) (x y : VV) (t : type), (forall r : PP, sem (subs_var_proc P (pname r) x) (ainp p q) (subs_var_proc P' (pname r) y)) -> (forall r : PP, Pr (subs_var_proc P (pname r) x) (subs_var_proc P' (pname r) y) p q) -> Pr (res x t P) (res y t P') p q) -> (forall (P P' : proc) (p q : PP), sem (par (ban P) P) (ainp p q) P' -> Pr (par (ban P) P) P' p q -> Pr (ban P) P' p q) -> (forall (P P' Q : proc) (p q : PP), sem P (ainp p q) P' -> Pr P P' p q -> Pr (par P Q) (par P' Q) p q) -> (forall (P P' Q : proc) (p q : PP), sem P (ainp p q) P' -> Pr P P' p q -> Pr (par Q P) (par Q P') p q) -> (forall (P P' Q : proc) (p q : PP), sem P (ainp p q) P' -> Pr P P' p q -> Pr (sum P Q) P' p q) -> (forall (P P' Q : proc) (p q : PP), sem P (ainp p q) P' -> Pr P P' p q -> Pr (sum Q P) P' p q) -> (forall (P P' : proc) (p q r : PP), sem P (ainp p q) P' -> Pr P P' p q -> Pr (mat (pname r) (pname r) P) P' p q) -> forall (P P' : proc) (p q : PP), sem P (ainp p q) P' -> Pr P P' p q.
Theorem out_ind : forall Pr : proc -> proc -> PP -> PP -> Prop, (forall (p q : PP) (P : proc), Pr (out (pname p) (pname q) P) P p q) -> (forall (P P' : proc) (p q : PP) (x y : VV) (t : type), (forall r : PP, sem (subs_var_proc P (pname r) x) (aout p q) (subs_var_proc P' (pname r) y)) -> (forall r : PP, Pr (subs_var_proc P (pname r) x) (subs_var_proc P' (pname r) y) p q) -> Pr (res x t P) (res y t P') p q) -> (forall (P P' : proc) (p q : PP), sem (par (ban P) P) (aout p q) P' -> Pr (par (ban P) P) P' p q -> Pr (ban P) P' p q) -> (forall (P P' Q : proc) (p q : PP), sem P (aout p q) P' -> Pr P P' p q -> Pr (par P Q) (par P' Q) p q) -> (forall (P P' Q : proc) (p q : PP), sem P (aout p q) P' -> Pr P P' p q -> Pr (par Q P) (par Q P') p q) -> (forall (P P' Q : proc) (p q : PP), sem P (aout p q) P' -> Pr P P' p q -> Pr (sum P Q) P' p q) -> (forall (P P' Q : proc) (p q : PP), sem P (aout p q) P' -> Pr P P' p q -> Pr (sum Q P) P' p q) -> (forall (P P' : proc) (p q r : PP), sem P (aout p q) P' -> Pr P P' p q -> Pr (mat (pname r) (pname r) P) P' p q) -> forall (P P' : proc) (p q : PP), sem P (aout p q) P' -> Pr P P' p q.
Theorem bout_ind : forall Pr : proc -> proc -> PP -> PP -> type -> Prop, (forall (p q : PP) (x : VV) (t : type) (P P' : proc), fresh q P -> q <> p -> sem (subs_var_proc P (pname q) x) (aout p q) P' -> Pr (res x t P) P' p q t) -> (forall (p q : PP) (x y : VV) (t t' : type) (P P' : proc), (forall r : PP, sem (subs_var_proc P (pname r) x) (about p q t) (subs_var_proc P' (pname r) y)) -> (forall r : PP, Pr (subs_var_proc P (pname r) x) (subs_var_proc P' (pname r) y) p q t) -> Pr (res x t' P) (res y t' P') p q t) -> (forall (P P' : proc) (p q : PP) (t : type), sem (par (ban P) P) (about p q t) P' -> Pr (par (ban P) P) P' p q t -> Pr (ban P) P' p q t) -> (forall (P P' Q : proc) (p q : PP) (t : type), fresh q Q -> sem P (about p q t) P' -> Pr P P' p q t -> Pr (par P Q) (par P' Q) p q t) -> (forall (P P' Q : proc) (p q : PP) (t : type), fresh q Q -> sem P (about p q t) P' -> Pr P P' p q t -> Pr (par Q P) (par Q P') p q t) -> (forall (P P' Q : proc) (p q : PP) (t : type), sem P (about p q t) P' -> Pr P P' p q t -> Pr (sum P Q) P' p q t) -> (forall (P P' Q : proc) (p q : PP) (t : type), sem P (about p q t) P' -> Pr P P' p q t -> Pr (sum Q P) P' p q t) -> (forall (P P' : proc) (p q r : PP) (t : type), sem P (about p q t) P' -> Pr P P' p q t -> Pr (mat (pname r) (pname r) P) P' p q t) -> forall (P P' : proc) (p q : PP) (t : type), sem P (about p q t) P' -> Pr P P' p q t.
Theorem tau_ind : forall Pr : proc -> proc -> Prop, (forall (P P' Q Q' : proc) (p q : PP), sem P (ainp p q) P' -> sem Q (aout p q) Q' -> Pr (par P Q) (par P' Q')) -> (forall (P P' Q Q' : proc) (p q : PP), sem P (ainp p q) P' -> sem Q (aout p q) Q' -> Pr (par Q P) (par Q' P')) -> (forall (P P' Q Q' : proc) (p q r : PP) (t : type) (x : VV), fresh q P -> freshvar x P' -> freshvar x Q' -> sem P (ainp p q) P' -> sem Q (about p r t) Q' -> Pr (par P Q) (res x t (par (subs_par_proc P' (vname x) q) (subs_par_proc Q' (vname x) r)))) -> (forall (P P' Q Q' : proc) (p q r : PP) (t : type) (x : VV), fresh q P -> freshvar x P' -> freshvar x Q' -> sem P (ainp p q) P' -> sem Q (about p r t) Q' -> Pr (par Q P) (res x t (par (subs_par_proc Q' (vname x) r) (subs_par_proc P' (vname x) q)))) -> (forall (x y : VV) (t' : type) (P P' : proc), (forall r : PP, sem (subs_var_proc P (pname r) x) tau (subs_var_proc P' (pname r) y)) -> (forall r : PP, Pr (subs_var_proc P (pname r) x) (subs_var_proc P' (pname r) y)) -> Pr (res x t' P) (res y t' P')) -> (forall P P' : proc, sem (par (ban P) P) tau P' -> Pr (par (ban P) P) P' -> Pr (ban P) P') -> (forall P P' Q : proc, sem P tau P' -> Pr P P' -> Pr (par P Q) (par P' Q)) -> (forall P P' Q : proc, sem P tau P' -> Pr P P' -> Pr (par Q P) (par Q P')) -> (forall P P' Q : proc, sem P tau P' -> Pr P P' -> Pr (sum P Q) P') -> (forall P P' Q : proc, sem P tau P' -> Pr P P' -> Pr (sum Q P) P') -> (forall (P P' : proc) (r : PP), sem P tau P' -> Pr P P' -> Pr (mat (pname r) (pname r) P) P') -> forall P P' : proc, sem P tau P' -> Pr P P'.
Theorem freshname_is : forall (p : PP) (n : name), freshname p n -> n <> pname p.
Theorem freshvarname_is : forall (x : VV) (n : name), freshvarname x n -> n <> vname x.
Theorem fresh_after_subs_name : forall (p q : PP) (x : VV) (n : name), p <> q -> freshname p n -> freshname p (subs_var_name n (pname q) x).
Theorem fresh_after_subs : forall (p q : PP) (x : VV) (P : proc), p <> q -> fresh p P -> fresh p (subs_var_proc P (pname q) x).
Theorem fresh_after_subs_par_name : forall (p q r : PP) (n : name), r <> p -> freshname r n -> freshname r (subs_par_name n (pname p) q).
Theorem fresh_after_subs_par : forall (p q r : PP) (P : proc), r <> p -> fresh r P -> fresh r (subs_par_proc P (pname p) q).
Theorem fresh_after_subs_by_var_name : forall (n : name) (p q : PP) (x : VV), freshname p n -> freshname p (subs_par_name n (vname x) q).
Theorem fresh_after_subs_by_var : forall (P : proc) (p q : PP) (x : VV), fresh p P -> fresh p (subs_par_proc P (vname x) q).
Theorem fresh_before_subs_name : forall (p q : PP) (x : VV) (n : name), freshname p (subs_var_name n (pname q) x) -> freshname p n.
Theorem fresh_before_subs : forall (p q : PP) (x : VV) (P : proc), fresh p (subs_var_proc P (pname q) x) -> fresh p P.
Theorem out_known_name : forall (P P' : proc) (p q : PP), sem P (aout p q) P' -> ~ fresh q P.
Theorem inp_on_known_name : forall (P P' : proc) (p q : PP), sem P (ainp p q) P' -> ~ fresh p P.
Theorem fresh_masked_by_var_name : forall (n : name) (p : PP) (x : VV), freshname p (subs_par_name n (vname x) p).
Theorem fresh_masked_by_var : forall (P : proc) (p : PP) (x : VV), fresh p (subs_par_proc P (vname x) p).
Theorem fresh_after_trans : forall (P P' : proc) (mu : act), sem P mu P' -> forall q : PP, fresh q P -> freshact q mu -> fresh q P'.
Theorem fresh_mask_name : forall (n : name) (p q : PP), p <> q -> freshname q (subs_par_name n (pname p) q).
Theorem fresh_mask : forall (P : proc) (p q : PP), p <> q -> fresh q (subs_par_proc P (pname p) q).
Theorem bout_autored : forall (P P' : proc) (p q : PP) (t : type), sem P (about p q t) P' -> forall G : env, typing G P -> typing (addenv G q t) P'.
Theorem bout_emits_correct_type : forall (P P' : proc) (p q : PP) (t : type), sem P (about p q t) P' -> forall G : env, typing G P -> typest t (getobj (G p)).
Theorem tau_red : forall P P' : proc, sem P tau P' -> forall G : env, typing G P -> typing G P'.
Theorem gettype_not_added_name : forall (G : env) (p q : PP) (t : type), p <> q -> addenv G p t q = G q.
Theorem gettype_added_name : forall (G : env) (p : PP) (t : type), addenv G p t p = t.
Theorem eqv_addenv : forall (G D : env) (p : PP) (t : type), eqvenv G D -> eqvenv (addenv G p t) (addenv D p t).
Theorem eqv_trans : forall G G' G'' : env, eqvenv G G' -> eqvenv G' G'' -> eqvenv G G''.
Theorem eqv_typing : forall G D : env, eqvenv G D -> forall P : proc, typing G P -> typing D P.
Theorem switch_addenv : forall (G : env) (p q : PP) (t1 t2 : type), p <> q -> eqvenv (addenv (addenv G p t1) q t2) (addenv (addenv G q t2) p t1).
Theorem trivial_addenv : forall (G : env) (p : PP), eqvenv G (addenv G p (G p)).
Theorem redundant_addenv : forall (G : env) (P : proc), typing G P -> forall (D : env) (p : PP) (t : type), fresh p P -> eqvenv G (addenv D p t) -> typing D P.
Theorem addenv_unused_name : forall (G : env) (P : proc), typing G P -> forall (q : PP) (t : type), fresh q P -> typing (addenv G q t) P.
Theorem eqe_refl : forall G : env, eqvenv G G.
Theorem eqe_sym : forall G D : env, eqvenv G D -> eqvenv D G.
Theorem eqe_mask : forall (G : env) (p : PP) (t1 t2 : type), eqvenv (addenv (addenv G p t1) p t2) (addenv G p t2).