$$
a, (P; Q), b
\Lrarr
(\exist x. a , P , x \wedge x , Q, b)
$$
Proof.
$$
\begin{align*}
&\lang a, c\rang\text{ LHS }\lang b, d\rang
\\Lrarr&, a, (P; Q) , b \and c , (R;S) , d
\\Lrarr&, (\exist x. a, P , x \and x ,Q, b) \and (\exist y. c, R , y \and y ,S, d)
\\Lrarr&, \exist x, y. (a, P , x \and x ,Q, b) \and ( c, R , y \and y ,S, d)
\\Lrarr&, \exist x, y. (a, P , x \and c, R , y) \and ( x ,Q, b \and y ,S, d)
\\Lrarr&, \exist x, y. \lang a, c\rang [P, R] \lang x, y\rang \and \lang x, y\rang [R, S] \lang b, d\rang
\\Lrarr&, \lang a, c\rang \text{ RHS } \lang b, d\rang
\& \square. \end{align*} $$
\text{row}_n, (\text{snd } Q; R; \text{fst }S) $$
\text{row}_0, (\text{snd } S; R; \text{fst }S) $$
$$ \begin{cases} \text{map}_0 , R = []\ \text{row}_0, R =\text{snd }[]; \text{swap};\text{fst }[]
\end{cases} $$
$$ \begin{align*} \text{LHS} &= \text{snd } (\text{map}_0, Q); \text{row}_0 , R; \text{fst }(\text{map}_0 , S) \&= \text{snd }[]; (\text{snd }[]; \text{swap}; \text{fst } []); \text{fst }[] \&= \text{snd } []; \text{swap} ; \text{fst }[] \&= \text{row}_0, * &= \text{RHS}
\end{align*} $$
To Proof: $$ \text{snd } (\text{map}{n+1}, Q); \text{row}{n+1} , R; \text{fst }(\text{map}_{n+1} , S)
\text{row}_{n+1}, (\text{snd } Q; R; \text{fst }S) $$
$$ \begin{align*} \text{LHS} =& \text{snd } (\text{map}_{n+1}\, Q); \text{row}_{n+1} \, R; \text{fst }(\text{map}_{n+1} \, S) \\=&\text{snd } ( \text{apl}n^{-1}; [Q; \text{map}{n}, Q]; \text{apl}_n ); \&
( \text{snd } \text{apl}_n^{-1}; (R \lrarr \text{row}_n , R); \text{fst } \text{apl}_n );
\& \text{fst }( \text{apl}n^{-1}; [S; \text{map}{n}, S]; \text{apl}_n )
\ \text{RHS}=& \text{row}_{n+1}, (\text{snd } Q; R; \text{fst }S) \=& \text{snd }\text{apl}_n^{-1}; \& ( (\text{snd } Q; R; \text{fst }S) \lrarr \text{row}_n, (\text{snd } Q; R; \text{fst }S) );
\& \text{fst }\text{apl}_n
\end{align*} $$
$$ \begin{align*} \text{LHS} =& \text{snd } (\text{map}{n+1}, Q); \text{row}{n+1} , R; \text{fst }(\text{map}_{n+1} , S) \=&
\text{snd } ( \text{apl}n^{-1}; [Q; \text{map}{n}, Q]; \text{apl}_n ); \&
( \text{snd } \text{apl}_n^{-1}; (R \lrarr \text{row}_n , R); \text{fst } \text{apl}_n );
\& \text{fst }( \text{apl}n^{-1}; [S; \text{map}{n}, S]; \text{apl}_n )
\ \text{RHS}=& \text{row}_{n+1}, (\text{snd } Q; R; \text{fst }S) \=& \text{snd }\text{apl}_n^{-1}; \& ( (\text{snd } Q; R; \text{fst }S) \lrarr \text{row}_n, (\text{snd } Q; R; \text{fst }S) );
\& \text{fst }\text{apl}_n
\end{align*} $$
$$ \begin{align*} \text{LHS} =& \text{snd } (\text{map}{n+1}, Q); \text{row}{n+1} , R; \text{fst }(\text{map}_{n+1} , S) \=&
\text{snd } ( \text{apl}n^{-1}; [Q; \text{map}{n}, Q]; \text{apl}_n ); \&
( \text{snd } \text{apl}_n^{-1}; (R \lrarr \text{row}_n , R); \text{fst } \text{apl}_n );
\& \text{fst }( \text{apl}n^{-1}; [S; \text{map}{n}, S]; \text{apl}_n )
\=& \text{snd } ( \text{apl}n^{-1}; [Q; \text{map}{n}, Q] ); \&
(R \lrarr \text{row}_n , R);
\& \text{fst }( [S; \text{map}_{n}, S]; \text{apl}_n ) \ \vdash & \text{snd }\text{apl}_n^{-1}; \& ((\text{snd } Q; R; \text{fst }S) \lrarr \text{row}_n, (\text{snd } Q; R; \text{fst }S) ); \& \text{fst }\text{apl}_n
\end{align*} $$
Given
To Proof:
$\text{snd }[A, B]; C\lrarr D;\text{fst }[E, F] =(\text{snd } A; C; \text{fst }E) \lrarr (\text{snd } B; D; \text{fst }F)$
$\Gamma_1$ : $$ \begin{align*} \text{LHS} = & \text{snd }[A, B]; C\lrarr D;\text{fst }[E, F]\ \vdash& (\text{snd } A; C; \text{fst }E) \lrarr (\text{snd } B; D; \text{fst }F)
\ \lang a, \lang b_1, b_2\rang\rang \text{ LHS }\lang \lang c_1, c_2\rang, d\rang
\Lrarr & (\exist \beta_1. b, A ,\beta_1) \and (\exist \beta_2. b, B ,\beta_2) \& \and (\exist \alpha,\theta. \lang a, \beta_1\rang , C , \lang\theta, \alpha\rang) \& \and (\exist \alpha, \beta_2, \delta. \lang\alpha, \beta_2, \delta\rang, D , \lang\delta, d \rang) \& \and (\exist \theta. \theta , E , c_1) \and (\exist \delta. \delta , F , c_2) ) \ \Lrarr& SORRY
\end{align*} $$
令




