(* 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_lem3.v                                *)
(****************************************************************************)

Require Import abp_base.
Require Import abp_defs.
Require Import abp_lem1.
Require Import abp_lem2.
Require Import abp_lem25.

Theorem Lem20 :
 forall d : D,
 seq (ia frame c6 (tuple e0)) (Y1 d) =
 enc H
   (mer (seq (ia frame s6 (tuple e0)) (L i))
      (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))) :>proc.
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))) *)
elim EXPH4.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt (enc H (Lmer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (K i))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim Lmers6.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (K i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim LmerK.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerTnd.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommTn_dK.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (L i) (seq (Sn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e0) (R i))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (Rn e0) (R i)) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e0) (R i)))))))))))))) *)
elim (SC3 (seq (Rn e0) (R i)) (K i)).
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommKRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *)
elim (SC3 (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommKs6.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommRns6.
(* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *)
pattern e0 at 1 2 in |- *.
(* Goal: (fun b : bit => @eq proc (seq (ia frame c6 (tuple b)) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia frame s6 (tuple b)) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))))))))))))) e0 *)
elimtype (toggle e1 = e0).
(* Goal: @eq proc (seq (ia frame c6 (tuple (toggle e1))) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia frame s6 (tuple (toggle e1))) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *)
(* Goal: @eq bit (toggle e1) e0 *)
elim CommTn_ds6_b.
 
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.
(* Goal: @eq bit (toggle e1) e0 *)
elim Toggle2.
(* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i)))))) *)
unfold Y1 in |- *.
elim
 (SC6 (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i))) (L i)).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn e1) (S i)) (mer (seq (Rn e0) (R i)) (mer (K i) (L i)))))) *)
elim (SC6 (mer (K i) (L i)) (seq (Rn e0) (R i))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
(* Goal: @eq bit (toggle e1) e0 *)
elim Toggle2.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
Qed.



Theorem Lem21 :
 forall d : D,
 seq (ia frame c6 sce) (Y1 d) =
 enc H
   (mer (seq (ia frame s6 sce) (L i))
      (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))).
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))) *)
elim EXPH4.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt (enc H (Lmer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (K i))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim Lmers6.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (K i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim LmerK.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerTnd.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommTn_dK.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (L i) (seq (Sn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e0) (R i))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (Rn e0) (R i)) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e0) (R i)))))))))))))) *)
elim (SC3 (seq (Rn e0) (R i)) (K i)).
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommKRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *)
elim (SC3 (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommKs6.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommRns6.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) Delta))))))))) *)
elim CommTn_ds6_sce.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.
(* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i)))))) *)
unfold Y1 in |- *.
elim
 (SC6 (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i))) (L i)).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
elimtype
 (mer (K i) (mer (L i) (seq (Rn e0) (R i))) =
  mer (seq (Rn e0) (R i)) (mer (K i) (L i))).
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
(* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn e1) (S i)) (mer (seq (Rn e0) (R i)) (mer (K i) (L i)))))) *)
elim (SC6 (mer (K i) (L i)) (seq (Rn e0) (R i))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
Qed.


Goal
forall d : D,
seq (ia Frame c2 (Tuple e1 d))
  (alt
     (seq (ia one int i)
        (seq (ia Frame c3 (Tuple e1 d)) (seq (ia D s4 d) (Y2 d))))
     (seq (ia one int i)
        (seq (ia Frame c3 lce)
           (seq (ia frame c5 (tuple e0))
              (seq
                 (alt (seq (ia one int i) (ia frame c6 (tuple e0)))
                    (seq (ia one int i) (ia frame c6 sce))) 
                 (Y1 d)))))) = Y1 d.
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (seq (ia D s4 d) (Y2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e0)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e0))) (seq (ia one int i) (ia frame c6 sce))) (Y1 d))))))) (Y1 d) *)
pattern (Y1 d) at 2 in |- *.
(* Goal: (fun p : proc => @eq proc (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (seq (ia D s4 d) (Y2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e0)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e0))) (seq (ia one int i) (ia frame c6 sce))) (Y1 d))))))) p) (Y1 d) *)
elim Lem13.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (seq (ia D s4 d) (Y2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e0)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e0))) (seq (ia one int i) (ia frame c6 sce))) (Y1 d))))))) (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) *)
elim Lem14.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (seq (ia D s4 d) (Y2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e0)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e0))) (seq (ia one int i) (ia frame c6 sce))) (Y1 d))))))) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))))) *)
elim Lem15.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (seq (ia D s4 d) (Y2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e0)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e0))) (seq (ia one int i) (ia frame c6 sce))) (Y1 d))))))) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))) *)
elim Lem16.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (seq (ia D s4 d) (Y2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e0)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e0))) (seq (ia one int i) (ia frame c6 sce))) (Y1 d))))))) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))) (seq (ia one int i) (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))) *)
elim Lem17.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (seq (ia D s4 d) (Y2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e0)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e0))) (seq (ia one int i) (ia frame c6 sce))) (Y1 d))))))) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (seq (ia D s4 d) (Y2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))) *)
elim Lem18.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (seq (ia D s4 d) (Y2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e0)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e0))) (seq (ia one int i) (ia frame c6 sce))) (Y1 d))))))) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (seq (ia D s4 d) (Y2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))))))) *)
elim Lem19.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (seq (ia D s4 d) (Y2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e0)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e0))) (seq (ia one int i) (ia frame c6 sce))) (Y1 d))))))) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (seq (ia D s4 d) (Y2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))))))))) *)
elim Lem20.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (seq (ia D s4 d) (Y2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e0)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e0))) (seq (ia one int i) (ia frame c6 sce))) (Y1 d))))))) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (seq (ia D s4 d) (Y2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e0)) (Y1 d))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))))))))) *)
elim Lem21.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
elim A4.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (seq (ia one int i) (ia Frame c3 (Tuple e1 d))) (Y2 d)))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
elim A5.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (seq (ia one int i) (ia Frame c3 (Tuple e1 d))) (Y2 d)))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
elim A5.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
 
Save Lem22.

Goal
forall d : D,
seq (ia frame c5 (tuple e0))
  (enc H
     (mer (seq (Rn e0) (R i))
        (mer
           (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i)))
              (seq (ia one int i) (seq (ia frame s6 sce) (L i))))
           (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i))))) = 
X2 d.

(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (X2 d)) (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) *)
unfold X2 in |- *.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (seq (Rn e0) (R i)))))))) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (seq (Rn e0) (R i)))))) *)
elim (EXPH4 (seq (Tn_d d e0) (seq (Sn e1) (S i)))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerTnd.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (K i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim LmerK.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerL.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e1) (S i)) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia frame s5 (tuple e1)) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (ia frame s5 (tuple e1)) (R i))) (mer (K i) (L i))))))))))))) *)
elim Lmers5.
(* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))))) (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *)
elim (SC3 (L i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))).
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia frame s5 (tuple e1)) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (ia frame s5 (tuple e1)) (R i))) (mer (K i) (L i))))))))))))) *)
elim CommLs5.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommKL.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (alt Delta (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia frame s5 (tuple e1)) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (ia frame s5 (tuple e1)) (R i))) (mer (K i) (L i))))))))))))) *)
elim CommKs5.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (Rn e0) (R i)) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *)
elim (SC3 (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)).
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommTn_dK.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dL.
elim
 (SC3 (seq (Tn_d d e0) (seq (Sn e1) (S i)))
    (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))).
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e1) (S i))) (mer (K i) (L i))))))))))))) *)
elim CommTn_ds5.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.

Save Lem23.

Goal
forall d : D,
alt
  (seq (ia one int i)
     (enc H
        (mer (seq (ia frame s6 (tuple e0)) (L i))
           (mer (seq (Rn e0) (R i))
              (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i))))))
  (seq (ia one int i)
     (enc H
        (mer (seq (ia frame s6 sce) (L i))
           (mer (seq (Rn e0) (R i))
              (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))))) =
enc H
  (mer (seq (Rn e0) (R i))
     (mer
        (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i)))
           (seq (ia one int i) (seq (ia frame s6 sce) (L i))))
        (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))).
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i))))))) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i))))) *)
elim (EXPH4 (seq (Rn e0) (R i))). 
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerRn.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt (enc H (Lmer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *)
elim Lmeri.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerTnd.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (K i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim LmerK.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (Rn e0) (R i)) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *)
elim (SC3 (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)).
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommTn_dK.
elim
 (SC3 (seq (Rn e0) (R i))
    (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i)))
       (seq (ia one int i) (seq (ia frame s6 sce) (L i))))).
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt Delta (alt Delta Delta))))))))) *)
elim CommiRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (Rn e0) (R i)) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *)
elim (SC3 (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dRn.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (L i) (seq (Sn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e0) (R i))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (Rn e0) (R i)) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e0) (R i)))))))))))))) *)
elim (SC3 (seq (Rn e0) (R i)) (K i)).
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommKRn.
elim
 (SC3
    (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i)))
       (seq (ia one int i) (seq (ia frame s6 sce) (L i))))
    (seq (Tn_d d e0) (seq (Sn e1) (S i)))).
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt Delta Delta))))))))) *)
elim CommTn_di.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e1) (S i))))) (alt Delta (alt Delta Delta))))))))) *)
elim CommiK. 
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6. 
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
Save Lem24.

Goal
forall d : D,
seq (ia frame c6 (tuple e0)) Y =
enc H
  (mer (seq (ia frame s6 (tuple e0)) (L i))
     (mer (seq (Rn e0) (R i))
        (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))).
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))) *)
elim EXPH4. 
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt (enc H (Lmer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (K i))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim Lmers6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerTnd.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (K i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim LmerK.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (Rn e0) (R i)) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *)
elim (SC3 (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)).
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommTn_dK.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (Rn e0) (R i)) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *)
elim (SC3 (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommRns6.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (L i) (seq (Sn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e0) (R i))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (Rn e0) (R i)) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e0) (R i)))))))))))))) *)
elim (SC3 (seq (Rn e0) (R i)) (K i)).
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommKRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommKs6.
(* Goal: @eq proc (seq (ia frame c6 (tuple e1)) X) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) Delta))))))))) *)
elim CommTn_ds6_b'.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.
(* Goal: @eq proc (seq (ia frame c6 (tuple e0)) Y) (seq (ia frame c6 (tuple e0)) (enc H (mer (L i) (mer (seq (Sn e1) (S i)) (mer (seq (Rn e0) (R i)) (K i)))))) *)
unfold Y in |- *.
(* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia frame c6 (tuple e0)) (enc H (mer (L i) (mer (seq (Sn e1) (S i)) (mer (seq (Rn e0) (R i)) (K i)))))) *)
elim (SC6 (mer (seq (Sn e1) (S i)) (mer (seq (Rn e0) (R i)) (K i))) (L i)).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn e1) (S i)) (mer (seq (Rn e0) (R i)) (mer (K i) (L i)))))) *)
elim (SC6 (mer (K i) (L i)) (seq (Rn e0) (R i))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
Save Lem25.

Goal
forall d : D,
seq (ia frame c6 sce)
  (enc H
     (mer (L i)
        (mer (seq (Sn_d d e0) (seq (Sn e1) (S i)))
           (mer (seq (Rn e0) (R i)) (K i))))) =
enc H
  (mer (seq (ia frame s6 sce) (L i))
     (mer (seq (Rn e0) (R i))
        (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))).
     
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))) *)
elim (EXPH4 (seq (ia frame s6 sce) (L i))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt (enc H (Lmer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (K i))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim Lmers6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerTnd.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (K i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim LmerK.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (Rn e0) (R i)) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *)
elim (SC3 (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)).
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommTn_dK.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (Rn e0) (R i)) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *)
elim (SC3 (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommRns6. 
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (L i) (seq (Sn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e0) (R i))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (Rn e0) (R i)) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e0) (R i)))))))))))))) *)
elim (SC3 (seq (Rn e0) (R i)) (K i)).
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommKRn.  
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommKs6.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) Delta))))))))) *)
elim CommTn_ds6_sce.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.

Save Lem26.


Goal
forall d : D,
seq (ia Frame c2 (Tuple e0 d))
  (enc H
     (mer (seq (Tn_d d e0) (seq (Sn e1) (S i)))
        (mer
           (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i)))
              (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))
           (mer (L i) (seq (Rn e0) (R i)))))) =
enc H
  (mer (L i)
     (mer (seq (Sn_d d e0) (seq (Sn e1) (S i)))
        (mer (seq (Rn e0) (R i)) (K i)))).
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i))))) *)
elim (EXPH4 (L i)).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerL.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt (enc H (Lmer (seq (Sn_d d e1) (S i)) (mer (L i) (mer (R i) (K i))))) (alt (enc H (Lmer (R i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (K i))))) (alt (enc H (Lmer (K i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (R i)) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Sn_d d e1) (S i)) (K i)))) (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim LmerSnd.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerRn.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (K i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim LmerK.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommLRn.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (L i) (seq (Sn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e0) (R i))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (Rn e0) (R i)) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e0) (R i)))))))))))))) *)
elim (SC3 (seq (Rn e0) (R i)) (K i)).
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommKRn.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommSn_dK.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e0) (R i))) (mer (L i) (K i)))) (alt (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (seq (Rn e0) (R i))))))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (Rn e0) (R i)) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e0) (R i)))))))))))))) *)
elim (SC3 (L i) (seq (Sn_d d e0) (seq (Sn e1) (S i)))).
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (L i)) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommSn_dL.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim (SC3 (L i) (K i)).
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommKL.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta Delta))))))))) *)
elim CommSn_dRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.

Save Lem27.

Goal
forall d : D,
alt
  (seq (ia one int i)
     (enc H
        (mer (seq (ia Frame s3 (Tuple e0 d)) (K i))
           (mer (seq (Tn_d d e0) (seq (Sn e1) (S i)))
              (mer (L i) (seq (Rn e0) (R i)))))))
  (seq (ia one int i)
     (enc H
        (mer (seq (ia Frame s3 lce) (K i))
           (mer (seq (Tn_d d e0) (seq (Sn e1) (S i)))
              (mer (L i) (seq (Rn e0) (R i))))))) =
enc H
  (mer (seq (Tn_d d e0) (seq (Sn e1) (S i)))
     (mer
        (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i)))
           (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))
        (mer (L i) (seq (Rn e0) (R i))))).
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (seq (Rn e0) (R i)))))))) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (seq (Rn e0) (R i)))))) *)
elim (EXPH4 (seq (Tn_d d e0) (seq (Sn e1) (S i)))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerTnd.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt (enc H (Lmer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *)
elim Lmeri.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerL.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dL.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt Delta Delta))))))))) *)
elim CommTn_di.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommLRn.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt Delta (alt Delta Delta))))))))) *)
elim CommiRn.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (alt Delta (alt Delta (alt Delta Delta))))))))) *)
elim CommiL.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
Save Lem28.

Goal
forall d : D,
seq (ia Frame c3 lce) (X2 d) =
enc H
  (mer (seq (ia Frame s3 lce) (K i))
     (mer (seq (Tn_d d e0) (seq (Sn e1) (S i)))
        (mer (L i) (seq (Rn e0) (R i))))).
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.   
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))) *)
elim EXPH4. 
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt (enc H (Lmer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim Lmers3.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerTnd.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerL.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommLRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dL.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim Comms3Tn_d.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim Comms3L.
(* Goal: @eq proc (seq (ia Frame c3 lce) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim Comms3Rn_lce.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.

(* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (X2 d)) (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) *)
unfold X2 in |- *.
elim
 (SC6 (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))
    (mer (K i) (seq (seq (ia frame s5 (tuple e0)) (Rn e0)) (R i)))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))))))) (seq (ia Frame c3 lce) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (mer (K i) (seq (seq (ia frame s5 (tuple e0)) (Rn e0)) (R i))))))) *)
elim (SC6 (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)).
elim
 (SC6 (mer (K i) (seq (seq (ia frame s5 (tuple e0)) (Rn e0)) (R i))) (L i)).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (seq (ia one int i) (ia Frame c3 (Tuple e1 d))) (Y2 d)))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
elim A5.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
Save Lem29.

Goal
forall d : D,
seq (ia Frame c3 (Tuple e0 d)) (X2 d) =
enc H
  (mer (seq (ia Frame s3 (Tuple e0 d)) (K i))
     (mer (seq (Tn_d d e0) (seq (Sn e1) (S i)))
        (mer (L i) (seq (Rn e0) (R i))))). 
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.   
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))) *)
elim EXPH4.  
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt (enc H (Lmer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim Lmers3. 
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerTnd.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerL. 
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommLRn. 
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dL.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim Comms3Tn_d. 
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim Comms3L. 
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim Comms3Rn_b'.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6. 
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'. 
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (X2 d)) (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) *)
unfold X2 in |- *.
elim
 (SC6 (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))
    (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (K i))).

(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
elim
 (SC6 (mer (L i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (K i)).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
Save Lem30.

Goal
forall d : D,
seq (ia frame c5 (tuple e0))
  (alt
     (seq (ia one int i)
        (seq (ia frame c6 sce)
           (seq (ia Frame c2 (Tuple e0 d))
              (seq
                 (alt (seq (ia one int i) (ia Frame c3 lce))
                    (seq (ia one int i) (ia Frame c3 (Tuple e0 d)))) 
                 (X2 d)))))
     (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y))) = 
X2 d.
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e0 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e0 d)))) (X2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y)))) (X2 d) *)
pattern (X2 d) at 2 in |- *.
(* Goal: (fun p : proc => @eq proc (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e0 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e0 d)))) (X2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y)))) p) (X2 d) *)
elim Lem23.
(* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e0 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e0 d)))) (X2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y)))) (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))))) *)
elim Lem24.
(* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e0 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e0 d)))) (X2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y)))) (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))))))) *)
elim Lem25.
(* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e0 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e0 d)))) (X2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y)))) (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y)) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))))))) *)
elim Lem26.
(* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e0 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e0 d)))) (X2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y)))) (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y)) (seq (ia one int i) (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))) *)
elim Lem27.
(* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e0 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e0 d)))) (X2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y)))) (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y)) (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (seq (Rn e0) (R i))))))))))) *)
elim Lem28.
(* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e0 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e0 d)))) (X2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y)))) (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y)) (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))))))))))) *)
elim Lem29.
(* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e0 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e0 d)))) (X2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y)))) (seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y)) (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (seq (ia Frame c3 lce) (X2 d))))))))) *)
elim Lem30.
elim
 (A1
    (seq (ia one int i)
       (seq (ia frame c6 sce)
          (seq (ia Frame c2 (Tuple e0 d))
             (alt
                (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (X2 d)))
                (seq (ia one int i) (seq (ia Frame c3 lce) (X2 d)))))))
    (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y))).
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
elim A4.
elim
 (A1 (seq (ia one int i) (seq (ia Frame c3 lce) (X2 d)))
    (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (X2 d)))).
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (seq (ia one int i) (ia Frame c3 (Tuple e1 d))) (Y2 d)))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
elim A5.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (seq (ia one int i) (ia Frame c3 (Tuple e1 d))) (Y2 d)))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
elim A5.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
Save Lem31.

Goal
forall d : D,
seq (ia frame c5 (tuple e1))
  (enc H
     (mer (R i)
        (mer
           (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i)))
              (seq (ia one int i) (seq (ia frame s6 sce) (L i))))
           (mer (seq (Tn_d d e1) (S i)) (K i))))) = 
Y2 d.

(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) *)
unfold Y2 in |- *.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i))))) *)
elim (EXPH4 (seq (Tn_d d e1) (S i))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerTnd.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (K i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim LmerK.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerL.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e1) (S i)) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia frame s5 (tuple e1)) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (ia frame s5 (tuple e1)) (R i))) (mer (K i) (L i))))))))))))) *)
elim Lmers5.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia frame s5 (tuple e1)) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (ia frame s5 (tuple e1)) (R i))) (mer (K i) (L i))))))))))))) *)
elim (SC3 (L i) (seq (ia frame s5 (tuple e1)) (R i))).
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia frame s5 (tuple e1)) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (ia frame s5 (tuple e1)) (R i))) (mer (K i) (L i))))))))))))) *)
elim CommLs5.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommKL.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (alt Delta (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia frame s5 (tuple e1)) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (ia frame s5 (tuple e1)) (R i))) (mer (K i) (L i))))))))))))) *)
elim CommKs5.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim (SC3 (seq (Tn_d d e1) (S i)) (K i)).
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommTn_dK.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dL.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (ia frame s5 (tuple e1)) (R i))) (mer (K i) (L i))))))))))))) *)
elim (SC3 (seq (Tn_d d e1) (S i)) (seq (ia frame s5 (tuple e1)) (R i))).
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e1) (S i))) (mer (K i) (L i))))))))))))) *)
elim CommTn_ds5.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
Save Lem33.


Goal
forall d : D,
alt
  (seq (ia one int i)
     (enc H
        (mer (seq (ia frame s6 (tuple e1)) (L i))
           (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))))
  (seq (ia one int i)
     (enc H
        (mer (seq (ia frame s6 sce) (L i))
           (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))))) =
enc H
  (mer (R i)
     (mer
        (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i)))
           (seq (ia one int i) (seq (ia frame s6 sce) (L i))))
        (mer (seq (Tn_d d e1) (S i)) (K i)))).
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))))) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i))))) *)
elim (EXPH4 (R i)).
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt (enc H (Lmer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *)
elim Lmeri.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerTnd.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (K i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim LmerK.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))))) (alt (enc H (Lmer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i))))) (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (R i) (seq (Tn_d d e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)))) (enc H (Lmer (comm (R i) (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i)))))))))))))) *)
pattern (R i) at 3 9 10 11 in |- *.
(* Goal: (fun p : proc => @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) p) (K i)))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i))))))) (R i) *)
elim ProcR.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim (SC3 (seq (Tn_d d e1) (S i)) (K i)).
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommTn_dK.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (K i)).
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommKRn.

elim
 (SC3 (seq (Rn e1) (seq (Rn e0) (R i)))
    (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i)))
       (seq (ia one int i) (seq (ia frame s6 sce) (L i))))).
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt Delta (alt Delta Delta))))))))) *)
elim CommiRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dRn.
elim
 (SC3
    (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i)))
       (seq (ia one int i) (seq (ia frame s6 sce) (L i))))
    (seq (Tn_d d e1) (S i))).

(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt Delta Delta))))))))) *)
elim CommTn_di.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e1) (S i))))) (alt Delta (alt Delta Delta))))))))) *)
elim CommiK.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
Save Lem34.

Goal
forall d : D,
seq (ia frame c6 (tuple e1)) X =
enc H
  (mer (seq (ia frame s6 (tuple e1)) (L i))
     (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))).

(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))) *)
elim EXPH4.
(* Goal: @eq proc (seq (ia frame c6 (tuple e1)) X) (alt (enc H (Lmer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))) (alt (enc H (Lmer (R i) (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (seq (Tn_d d e1) (S i)) (K i))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (K i))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (seq (ia frame s6 (tuple e1)) (L i)) (R i)))) (alt (enc H (Lmer (comm (R i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (K i)))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
pattern (R i) at 2 6 7 8 in |- *.
(* Goal: (fun p : proc => @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) p) (K i)))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i))))))) (R i) *)
elim ProcR.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt (enc H (Lmer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (K i))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim Lmers6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerTnd.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (K i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim LmerK.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim (SC3 (seq (Tn_d d e1) (S i)) (K i)).
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommTn_dK.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommRns6.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (K i)).
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommKRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommKs6.
(* Goal: @eq proc (seq (ia frame c6 (tuple e1)) X) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) Delta))))))))) *)
elim CommTn_ds6_b'.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.
(* Goal: @eq proc (seq (ia frame c6 (tuple e1)) X) (seq (ia frame c6 (tuple e1)) (enc H (mer (L i) (mer (S i) (mer (R i) (K i)))))) *)
unfold X in |- *.
(* Goal: @eq proc (seq (ia frame c6 (tuple e1)) (enc H (mer (S i) (mer (K i) (mer (L i) (R i)))))) (seq (ia frame c6 (tuple e1)) (enc H (mer (L i) (mer (S i) (mer (R i) (K i)))))) *)
elim (SC6 (mer (S i) (mer (R i) (K i))) (L i)).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia frame c6 (tuple e1)) (enc H (mer (S i) (mer (K i) (mer (L i) (R i)))))) (seq (ia frame c6 (tuple e1)) (enc H (mer (S i) (mer (R i) (mer (K i) (L i)))))) *)
elim (SC6 (mer (K i) (L i)) (R i)).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
Save Lem35.

Goal
forall d : D,
seq (ia frame c6 sce)
  (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i))))) =
enc H
  (mer (seq (ia frame s6 sce) (L i))
     (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))).

     
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))) *)
elim (EXPH4 (seq (ia frame s6 sce) (L i))).
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt (enc H (Lmer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))) (alt (enc H (Lmer (R i) (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Tn_d d e1) (S i)) (K i))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (K i))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (R i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
pattern (R i) at 3 7 8 9 in |- *.
(* Goal: (fun p : proc => @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) p) (K i)))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i))))))) (R i) *)
elim ProcR.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt (enc H (Lmer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i))))) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (K i))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim Lmers6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerTnd.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (K i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim LmerK.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim (SC3 (seq (Tn_d d e1) (S i)) (K i)).
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommTn_dK.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommRns6.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (K i)).
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommKRn.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e1) (S i)))))))))))))) *)
elim CommKs6.
(* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (R i) (K i)))) Delta))))))))) *)
elim CommTn_ds6_sce.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
Save Lem36.

Goal
forall d : D,
seq (ia Frame c2 (Tuple e1 d))
  (enc H
     (mer (seq (Tn_d d e1) (S i))
        (mer
           (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i)))
              (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))
           (mer (L i) (R i))))) =
enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))).
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i))))) *)
elim (EXPH4 (L i)).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerL.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt (enc H (Lmer (seq (Sn_d d e1) (S i)) (mer (L i) (mer (R i) (K i))))) (alt (enc H (Lmer (R i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (K i))))) (alt (enc H (Lmer (K i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (R i)) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Sn_d d e1) (S i)) (K i)))) (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim LmerSnd.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt (enc H (Lmer (R i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (K i))))) (alt (enc H (Lmer (K i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (R i)) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Sn_d d e1) (S i)) (K i)))) (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
pattern (R i) at 2 4 5 8 in |- *.
(* Goal: (fun p : proc => @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) p) (K i)))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i))))))) (R i) *)
elim ProcR.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerRn.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (K i) (mer (L i) (mer (seq (Sn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim LmerK.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommLRn.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (K i)).
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (seq (Sn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommKRn.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommSn_dK.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt (enc H (Lmer (comm (L i) (seq (Sn_d d e1) (S i))) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim (SC3 (L i) (seq (Sn_d d e1) (S i))).
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (L i)) (mer (R i) (K i)))) (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommSn_dL.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (enc H (Lmer (comm (L i) (K i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim (SC3 (L i) (K i)).
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e1) (S i)) (R i))))))))))))) *)
elim CommKL.
(* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (L i) (K i)))) (alt (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))) (alt Delta (alt Delta Delta))))))))) *)
elim CommSn_dRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
Save Lem37.

Goal
forall d : D,
alt
  (seq (ia one int i)
     (enc H
        (mer (seq (ia Frame s3 (Tuple e1 d)) (K i))
           (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))
  (seq (ia one int i)
     (enc H
        (mer (seq (ia Frame s3 lce) (K i))
           (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) =
enc H
  (mer (seq (Tn_d d e1) (S i))
     (mer
        (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i)))
           (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))
        (mer (L i) (R i)))).
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i))))) *)
elim (EXPH4 (seq (Tn_d d e1) (S i))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerTnd.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt (enc H (Lmer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *)
elim Lmeri.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerL.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt (enc H (Lmer (R i) (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *)
pattern (R i) at 5 6 8 11 in |- *.
(* Goal: (fun p : proc => @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) p) (K i)))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i))))))) (R i) *)
elim ProcR.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dL.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt Delta Delta))))))))) *)
elim CommTn_di.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommLRn.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt Delta (alt Delta Delta))))))))) *)
elim CommiRn.
(* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (alt Delta (alt Delta (alt Delta Delta))))))))) *)
elim CommiL.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.

Save Lem38.



Goal
forall d : D,
seq (ia Frame c3 lce) (Y2 d) =
enc H
  (mer (seq (ia Frame s3 lce) (K i))
     (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))).
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))) *)
elim EXPH4.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt (enc H (Lmer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim Lmers3.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerTnd.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerL.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
pattern (R i) at 1 2 4 7 in |- *.
(* Goal: (fun p : proc => @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) p) (K i)))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i))))))) (R i) *)
elim ProcR.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommLRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dL.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim Comms3Tn_d.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim Comms3L.
(* Goal: @eq proc (seq (ia Frame c3 lce) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim Comms3Rn_lce.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.
 
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) *)
unfold Y2 in |- *.
elim
 (SC6 (mer (seq (Tn_d d e1) (S i)) (L i))
    (mer (K i)
       (seq (seq (ia frame s5 (tuple e1)) (Rn e1)) (seq (Rn e0) (R i))))).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))))))) (seq (ia Frame c3 lce) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (K i) (seq (seq (ia frame s5 (tuple e1)) (Rn e1)) (seq (Rn e0) (R i)))))))) *)
elim (SC6 (seq (ia frame s5 (tuple e1)) (R i)) (L i)).
elim
 (SC6
    (mer (K i)
       (seq (seq (ia frame s5 (tuple e1)) (Rn e1)) (seq (Rn e0) (R i))))
    (L i)).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (seq (ia one int i) (ia Frame c3 (Tuple e1 d))) (Y2 d)))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
elim A5.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (K i)))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
pattern (R i) at 1 in |- *.
(* Goal: (fun p : proc => @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) p) (K i)))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i))))))) (R i) *)
elim ProcR.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
Save Lem39.

Goal
forall d : D,
seq (ia Frame c3 (Tuple e1 d)) (Y2 d) =
enc H
  (mer (seq (ia Frame s3 (Tuple e1 d)) (K i))
     (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))).
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))) *)
elim EXPH4.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt (enc H (Lmer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim Lmers3.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerTnd.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerL.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
pattern (R i) at 1 2 4 7 in |- *.
(* Goal: (fun p : proc => @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) p) (K i)))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i))))))) (R i) *)
elim ProcR.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim LmerRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommLRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dL.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim CommTn_dRn.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim Comms3Tn_d.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim Comms3L.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *)
elim Comms3Rn_b'.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *)
repeat elim A6'.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) *)
unfold Y2 in |- *.
elim
 (SC6 (mer (seq (Tn_d d e1) (S i)) (L i))
    (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i))))
       (K i))).
 
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim (SC6 (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i)).
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
elim SC7.
(* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (K i)))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i)))))) *)
pattern (R i) at 1 in |- *.
(* Goal: (fun p : proc => @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) p) (K i)))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (L i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i))))))) (R i) *)
elim ProcR.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.
Save Lem40.

Goal
forall d : D,
seq (ia frame c5 (tuple e1))
  (alt
     (seq (ia one int i)
        (seq (ia frame c6 sce)
           (seq (ia Frame c2 (Tuple e1 d))
              (seq
                 (alt (seq (ia one int i) (ia Frame c3 lce))
                    (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) 
                 (Y2 d)))))
     (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X))) = 
Y2 d.
(* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
intros.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (Y2 d) *)
pattern (Y2 d) at 2 in |- *.
(* Goal: (fun p : proc => @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) p) (Y2 d) *)
elim Lem33.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))))) *)
elim Lem34.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))))))) *)
elim Lem35.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))))))) *)
elim Lem36.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)) (seq (ia one int i) (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i))))))))) *)
elim Lem37.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)) (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))))))))) *)
elim Lem38.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)) (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))))))))) *)
elim Lem39.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)) (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))))))))) *)
elim Lem40.
elim
 (A1
    (seq (ia one int i)
       (seq (ia frame c6 sce)
          (seq (ia Frame c2 (Tuple e1 d))
             (alt
                (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)))
                (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d)))))))
    (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X))).
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
elim A4.
elim
 (A1 (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d)))
    (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)))).
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (seq (ia one int i) (ia Frame c3 (Tuple e1 d))) (Y2 d)))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
elim A5.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (seq (ia one int i) (ia Frame c3 (Tuple e1 d))) (Y2 d)))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
elim A5.
(* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X)))) *)
apply refl_equal.

Save Lem41.
