(* 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_lem2.v                                *)
(****************************************************************************)
unfold X at 1 in |- *.
elim ProcS; elim ProcR.
elim EXPH4.
elim LmerSn.
elim LmerK.
elim LmerL.
elim LmerRn.
elim CommLRn.
elim CommKL.
elim CommKRn.
elim CommSnK.
elim CommSnL.
elim CommSnRn.
repeat elim A6.
elim
(A6
(D +
(fun d : D =>
seq (ia D r1 d)
(enc H
(mer (seq (Sn_d d e0) (seq (Sn e1) (S i)))
(mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i)))))))))).
unfold X1 in |- *.
pattern (R i) at 1 in |- *.
elim ProcR.
apply refl_equal.
Qed.
unfold Y in |- *.
elim ProcS.
elim EXPH4.
elim LmerSn.
elim LmerK.
elim LmerL.
elim LmerRn.
elim CommLRn.
elim CommKL.
elim CommKRn.
elim CommSnK.
elim CommSnL.
elim CommSnRn.
repeat elim A6.
elim
(A6
(D +
(fun d : D =>
seq (ia D r1 d)
(enc H
(mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i))))
(mer (K i) (mer (L i) (seq (Rn e0) (R i))))))))).
unfold Y1 in |- *.
pattern (S i) at 1 in |- *.
elim ProcS.
apply refl_equal.
Qed.

Theorem Lem3 :
forall d : D,
seq (ia Frame c2 (Tuple e0 d))
(enc H
(mer (seq (Tn_d d e0) (seq (Sn e1) (S i)))
(mer
(seq
(alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d)))
(seq (ia one int i) (ia Frame s3 lce)))
(K i)) (mer (L i) (R i))))) = X1 d.