[STATEMENT]
lemma subst_subst2:
  assumes a: "a\<sharp>(b,P,N)" "x\<sharp>(y,P,M)" "b\<sharp>(M,N)" "y\<sharp>P"
  shows "M{a:=(x).N}{y:=<b>.P} = M{y:=<b>.P}{a:=(x).N{y:=<b>.P}}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M{a:=x.N}{y:=<b>.P} = M{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
a \<sharp> (b, P, N)
x \<sharp> (y, P, M)
b \<sharp> (M, N)
y \<sharp> P

goal (1 subgoal):
 1. M{a:=x.N}{y:=<b>.P} = M{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
proof(nominal_induct M avoiding: a x N y b P rule: trm.strong_induct)
[PROOF STATE]
proof (state)
goal (12 subgoals):
 1. \<And>name coname a x N y b P. \<lbrakk>a \<sharp> (b, P, N); x \<sharp> (y, P, Ax name coname); b \<sharp> (Ax name coname, N); y \<sharp> P\<rbrakk> \<Longrightarrow> Ax name coname{a:=x.N}{y:=<b>.P} = Ax name coname{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname trm1 name trm2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname \<sharp> trm2; name \<sharp> trm1; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, Cut <coname>.trm1 name.trm2); b \<sharp> (Cut <coname>.trm1 name.trm2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> Cut <coname>.trm1 name.trm2{a:=x.N}{y:=<b>.P} = Cut <coname>.trm1 name.trm2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>name trm coname a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; name \<sharp> coname; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotR name.trm coname); b \<sharp> (NotR name.trm coname, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotR name.trm coname{a:=x.N}{y:=<b>.P} = NotR name.trm coname{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>coname trm name a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; coname \<sharp> name; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotL <coname>.trm name); b \<sharp> (NotL <coname>.trm name, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotL <coname>.trm name{a:=x.N}{y:=<b>.P} = NotL <coname>.trm name{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>coname1 trm1 coname2 trm2 coname3 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname2 \<sharp> a; coname2 \<sharp> x; coname2 \<sharp> N; coname2 \<sharp> y; coname2 \<sharp> b; coname2 \<sharp> P; coname2 \<noteq> coname1; coname1 \<sharp> trm2; coname1 \<sharp> coname3; coname2 \<sharp> trm1; coname2 \<sharp> coname3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndR <coname1>.trm1 <coname2>.trm2 coname3); b \<sharp> (AndR <coname1>.trm1 <coname2>.trm2 coname3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndR <coname1>.trm1 <coname2>.trm2 coname3{a:=x.N}{y:=<b>.P} = AndR <coname1>.trm1 <coname2>.trm2 coname3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 8. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 9. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 10. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
A total of 12 subgoals...
[PROOF STEP]
case (Ax z c)
[PROOF STATE]
proof (state)
this:
a \<sharp> (b, P, N)
x \<sharp> (y, P, Ax z c)
b \<sharp> (Ax z c, N)
y \<sharp> P

goal (12 subgoals):
 1. \<And>name coname a x N y b P. \<lbrakk>a \<sharp> (b, P, N); x \<sharp> (y, P, Ax name coname); b \<sharp> (Ax name coname, N); y \<sharp> P\<rbrakk> \<Longrightarrow> Ax name coname{a:=x.N}{y:=<b>.P} = Ax name coname{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname trm1 name trm2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname \<sharp> trm2; name \<sharp> trm1; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, Cut <coname>.trm1 name.trm2); b \<sharp> (Cut <coname>.trm1 name.trm2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> Cut <coname>.trm1 name.trm2{a:=x.N}{y:=<b>.P} = Cut <coname>.trm1 name.trm2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>name trm coname a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; name \<sharp> coname; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotR name.trm coname); b \<sharp> (NotR name.trm coname, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotR name.trm coname{a:=x.N}{y:=<b>.P} = NotR name.trm coname{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>coname trm name a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; coname \<sharp> name; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotL <coname>.trm name); b \<sharp> (NotL <coname>.trm name, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotL <coname>.trm name{a:=x.N}{y:=<b>.P} = NotL <coname>.trm name{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>coname1 trm1 coname2 trm2 coname3 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname2 \<sharp> a; coname2 \<sharp> x; coname2 \<sharp> N; coname2 \<sharp> y; coname2 \<sharp> b; coname2 \<sharp> P; coname2 \<noteq> coname1; coname1 \<sharp> trm2; coname1 \<sharp> coname3; coname2 \<sharp> trm1; coname2 \<sharp> coname3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndR <coname1>.trm1 <coname2>.trm2 coname3); b \<sharp> (AndR <coname1>.trm1 <coname2>.trm2 coname3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndR <coname1>.trm1 <coname2>.trm2 coname3{a:=x.N}{y:=<b>.P} = AndR <coname1>.trm1 <coname2>.trm2 coname3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 8. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 9. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 10. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
A total of 12 subgoals...
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<sharp> (b, P, N)
x \<sharp> (y, P, Ax z c)
b \<sharp> (Ax z c, N)
y \<sharp> P
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
a \<sharp> (b, P, N)
x \<sharp> (y, P, Ax z c)
b \<sharp> (Ax z c, N)
y \<sharp> P

goal (1 subgoal):
 1. Ax z c{a:=x.N}{y:=<b>.P} = Ax z c{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
by (auto simp add: subst_fresh abs_fresh fresh_atm fresh_prod forget trm.inject)
[PROOF STATE]
proof (state)
this:
Ax z c{a:=x.N}{y:=<b>.P} = Ax z c{y:=<b>.P}{a:=x.N{y:=<b>.P}}

goal (11 subgoals):
 1. \<And>coname trm1 name trm2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname \<sharp> trm2; name \<sharp> trm1; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, Cut <coname>.trm1 name.trm2); b \<sharp> (Cut <coname>.trm1 name.trm2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> Cut <coname>.trm1 name.trm2{a:=x.N}{y:=<b>.P} = Cut <coname>.trm1 name.trm2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>name trm coname a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; name \<sharp> coname; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotR name.trm coname); b \<sharp> (NotR name.trm coname, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotR name.trm coname{a:=x.N}{y:=<b>.P} = NotR name.trm coname{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>coname trm name a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; coname \<sharp> name; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotL <coname>.trm name); b \<sharp> (NotL <coname>.trm name, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotL <coname>.trm name{a:=x.N}{y:=<b>.P} = NotL <coname>.trm name{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>coname1 trm1 coname2 trm2 coname3 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname2 \<sharp> a; coname2 \<sharp> x; coname2 \<sharp> N; coname2 \<sharp> y; coname2 \<sharp> b; coname2 \<sharp> P; coname2 \<noteq> coname1; coname1 \<sharp> trm2; coname1 \<sharp> coname3; coname2 \<sharp> trm1; coname2 \<sharp> coname3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndR <coname1>.trm1 <coname2>.trm2 coname3); b \<sharp> (AndR <coname1>.trm1 <coname2>.trm2 coname3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndR <coname1>.trm1 <coname2>.trm2 coname3{a:=x.N}{y:=<b>.P} = AndR <coname1>.trm1 <coname2>.trm2 coname3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 8. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 9. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 10. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
A total of 11 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (11 subgoals):
 1. \<And>coname trm1 name trm2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname \<sharp> trm2; name \<sharp> trm1; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, Cut <coname>.trm1 name.trm2); b \<sharp> (Cut <coname>.trm1 name.trm2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> Cut <coname>.trm1 name.trm2{a:=x.N}{y:=<b>.P} = Cut <coname>.trm1 name.trm2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>name trm coname a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; name \<sharp> coname; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotR name.trm coname); b \<sharp> (NotR name.trm coname, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotR name.trm coname{a:=x.N}{y:=<b>.P} = NotR name.trm coname{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>coname trm name a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; coname \<sharp> name; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotL <coname>.trm name); b \<sharp> (NotL <coname>.trm name, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotL <coname>.trm name{a:=x.N}{y:=<b>.P} = NotL <coname>.trm name{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>coname1 trm1 coname2 trm2 coname3 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname2 \<sharp> a; coname2 \<sharp> x; coname2 \<sharp> N; coname2 \<sharp> y; coname2 \<sharp> b; coname2 \<sharp> P; coname2 \<noteq> coname1; coname1 \<sharp> trm2; coname1 \<sharp> coname3; coname2 \<sharp> trm1; coname2 \<sharp> coname3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndR <coname1>.trm1 <coname2>.trm2 coname3); b \<sharp> (AndR <coname1>.trm1 <coname2>.trm2 coname3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndR <coname1>.trm1 <coname2>.trm2 coname3{a:=x.N}{y:=<b>.P} = AndR <coname1>.trm1 <coname2>.trm2 coname3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 8. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 9. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 10. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
A total of 11 subgoals...
[PROOF STEP]
case (Cut d M' u M'')
[PROOF STATE]
proof (state)
this:
d \<sharp> a
d \<sharp> x
d \<sharp> N
d \<sharp> y
d \<sharp> b
d \<sharp> P
u \<sharp> a
u \<sharp> x
u \<sharp> N
u \<sharp> y
u \<sharp> b
u \<sharp> P
d \<sharp> M''
u \<sharp> M'
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M''); ?bd \<sharp> (M'', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M''{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M''{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, Cut <d>.M' u.M'')
b \<sharp> (Cut <d>.M' u.M'', N)
y \<sharp> P

goal (11 subgoals):
 1. \<And>coname trm1 name trm2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname \<sharp> trm2; name \<sharp> trm1; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, Cut <coname>.trm1 name.trm2); b \<sharp> (Cut <coname>.trm1 name.trm2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> Cut <coname>.trm1 name.trm2{a:=x.N}{y:=<b>.P} = Cut <coname>.trm1 name.trm2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>name trm coname a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; name \<sharp> coname; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotR name.trm coname); b \<sharp> (NotR name.trm coname, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotR name.trm coname{a:=x.N}{y:=<b>.P} = NotR name.trm coname{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>coname trm name a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; coname \<sharp> name; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotL <coname>.trm name); b \<sharp> (NotL <coname>.trm name, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotL <coname>.trm name{a:=x.N}{y:=<b>.P} = NotL <coname>.trm name{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>coname1 trm1 coname2 trm2 coname3 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname2 \<sharp> a; coname2 \<sharp> x; coname2 \<sharp> N; coname2 \<sharp> y; coname2 \<sharp> b; coname2 \<sharp> P; coname2 \<noteq> coname1; coname1 \<sharp> trm2; coname1 \<sharp> coname3; coname2 \<sharp> trm1; coname2 \<sharp> coname3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndR <coname1>.trm1 <coname2>.trm2 coname3); b \<sharp> (AndR <coname1>.trm1 <coname2>.trm2 coname3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndR <coname1>.trm1 <coname2>.trm2 coname3{a:=x.N}{y:=<b>.P} = AndR <coname1>.trm1 <coname2>.trm2 coname3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 8. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 9. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 10. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
A total of 11 subgoals...
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
d \<sharp> a
d \<sharp> x
d \<sharp> N
d \<sharp> y
d \<sharp> b
d \<sharp> P
u \<sharp> a
u \<sharp> x
u \<sharp> N
u \<sharp> y
u \<sharp> b
u \<sharp> P
d \<sharp> M''
u \<sharp> M'
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M''); ?bd \<sharp> (M'', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M''{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M''{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, Cut <d>.M' u.M'')
b \<sharp> (Cut <d>.M' u.M'', N)
y \<sharp> P
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
d \<sharp> a
d \<sharp> x
d \<sharp> N
d \<sharp> y
d \<sharp> b
d \<sharp> P
u \<sharp> a
u \<sharp> x
u \<sharp> N
u \<sharp> y
u \<sharp> b
u \<sharp> P
d \<sharp> M''
u \<sharp> M'
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M''); ?bd \<sharp> (M'', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M''{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M''{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, Cut <d>.M' u.M'')
b \<sharp> (Cut <d>.M' u.M'', N)
y \<sharp> P

goal (1 subgoal):
 1. Cut <d>.M' u.M''{a:=x.N}{y:=<b>.P} = Cut <d>.M' u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: fresh_atm fresh_prod trm.inject abs_fresh)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<noteq> b \<and> a \<sharp> P \<and> a \<sharp> N; x \<noteq> y \<and> x \<sharp> P \<and> x \<sharp> M' \<and> x \<sharp> M''; b \<sharp> M' \<and> b \<sharp> M'' \<and> b \<sharp> N; y \<sharp> P\<rbrakk> \<Longrightarrow> (M'{a:=x.N} = Ax y d \<longrightarrow> (M'' = Ax u a \<longrightarrow> (M' = Ax y d \<longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <b>.P u.Ax u a{a:=x.N{y:=<b>.P}}) \<and> (M' \<noteq> Ax y d \<longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}})) \<and> (M'' \<noteq> Ax u a \<longrightarrow> (M' = Ax y d \<longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}) \<and> (M' \<noteq> Ax y d \<longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}))) \<and> (M'{a:=x.N} \<noteq> Ax y d \<longrightarrow> (M'' = Ax u a \<longrightarrow> (M' = Ax y d \<longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <b>.P u.Ax u a{a:=x.N{y:=<b>.P}}) \<and> (M' \<noteq> Ax y d \<longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}})) \<and> (M'' \<noteq> Ax u a \<longrightarrow> (M' = Ax y d \<longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}) \<and> (M' \<noteq> Ax y d \<longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})))
[PROOF STEP]
apply(auto)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; M'' = Ax u a; M' = Ax y d; d \<sharp> u; d \<sharp> a; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; b \<sharp> u; b \<sharp> a; x \<sharp> y; x \<sharp> d; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <b>.P u.Ax u a{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} = Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 6. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: fresh_atm)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> y; bd \<noteq> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> u; bd \<noteq> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; M'' = Ax u a; M' = Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <b>.P u.Ax u a{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} = Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 6. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule sym)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> y; bd \<noteq> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> u; bd \<noteq> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; M'' = Ax u a; M' = Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.Ax u a{a:=x.N{y:=<b>.P}} = Cut <b>.P x.N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} = Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 6. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (7 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> y; bd \<noteq> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> u; bd \<noteq> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; M'' = Ax u a; M' = Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.Ax u a{a:=x.N{y:=<b>.P}} = ?s95
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> y; bd \<noteq> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> u; bd \<noteq> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; M'' = Ax u a; M' = Ax y d\<rbrakk> \<Longrightarrow> ?s95 = Cut <b>.P x.N{y:=<b>.P}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} = Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 7. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule better_Cut_substc)
[PROOF STATE]
proof (prove)
goal (8 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> y; bd \<noteq> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> u; bd \<noteq> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; M'' = Ax u a; M' = Ax y d\<rbrakk> \<Longrightarrow> b \<sharp> (a, N{y:=<b>.P})
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> y; bd \<noteq> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> u; bd \<noteq> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; M'' = Ax u a; M' = Ax y d\<rbrakk> \<Longrightarrow> u \<sharp> [x].N{y:=<b>.P}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> y; bd \<noteq> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> u; bd \<noteq> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; M'' = Ax u a; M' = Ax y d\<rbrakk> \<Longrightarrow> (if Ax u a = Ax u a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} u.Ax u a{a:=x.N{y:=<b>.P}}) = Cut <b>.P x.N{y:=<b>.P}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} = Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 8. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: abs_fresh subst_fresh fresh_prod fresh_atm)
[PROOF STATE]
proof (prove)
goal (7 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> y; bd \<noteq> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> u; bd \<noteq> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; M'' = Ax u a; M' = Ax y d\<rbrakk> \<Longrightarrow> u \<sharp> [x].N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> y; bd \<noteq> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> u; bd \<noteq> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; M'' = Ax u a; M' = Ax y d\<rbrakk> \<Longrightarrow> (if Ax u a = Ax u a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} u.Ax u a{a:=x.N{y:=<b>.P}}) = Cut <b>.P x.N{y:=<b>.P}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} = Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 7. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: fresh_prod subst_fresh fresh_atm abs_fresh)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> y; bd \<noteq> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> u; bd \<noteq> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; M'' = Ax u a; M' = Ax y d\<rbrakk> \<Longrightarrow> (if Ax u a = Ax u a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} u.Ax u a{a:=x.N{y:=<b>.P}}) = Cut <b>.P x.N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} = Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 6. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> y; bd \<noteq> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> u; bd \<noteq> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; M'' = Ax u a; M' = Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <b>.P x.N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} = Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 6. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: forget)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} = Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: fresh_atm)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> u; bd \<noteq> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} = Ax y d; M'' = Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(case_tac "a\<sharp>M'")
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> u; bd \<noteq> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} = Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; a \<sharp> M'\<rbrakk> \<Longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> u; bd \<noteq> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} = Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; \<not> a \<sharp> M'\<rbrakk> \<Longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 6. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: forget)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<noteq> u; bd \<noteq> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} = Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; \<not> a \<sharp> M'\<rbrakk> \<Longrightarrow> Cut <b>.P x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: not_Ax1)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule sym)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = ?s104
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> ?s104 = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule better_Cut_substc)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> b \<sharp> (a, N{y:=<b>.P})
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> u \<sharp> [x].N{y:=<b>.P}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> (if M''{y:=<b>.P} = Ax u a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}) = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 6. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: abs_fresh subst_fresh fresh_prod fresh_atm)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> u \<sharp> [x].N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> (if M''{y:=<b>.P} = Ax u a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}) = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: fresh_prod subst_fresh fresh_atm abs_fresh)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d\<rbrakk> \<Longrightarrow> (if M''{y:=<b>.P} = Ax u a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}) = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(auto)[1]
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d; M''{y:=<b>.P} = Ax u a\<rbrakk> \<Longrightarrow> Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <b>.P u.Cut <a>.Ax u a x.N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d; M''{y:=<b>.P} \<noteq> Ax u a\<rbrakk> \<Longrightarrow> Cut <b>.P{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(case_tac "y\<sharp>M''")
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d; M''{y:=<b>.P} = Ax u a; y \<sharp> M''\<rbrakk> \<Longrightarrow> Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <b>.P u.Cut <a>.Ax u a x.N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d; M''{y:=<b>.P} = Ax u a; \<not> y \<sharp> M''\<rbrakk> \<Longrightarrow> Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <b>.P u.Cut <a>.Ax u a x.N{y:=<b>.P}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d; M''{y:=<b>.P} \<noteq> Ax u a\<rbrakk> \<Longrightarrow> Cut <b>.P{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 6. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: forget)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d; M''{y:=<b>.P} = Ax u a; \<not> y \<sharp> M''\<rbrakk> \<Longrightarrow> Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <b>.P u.Cut <a>.Ax u a x.N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d; M''{y:=<b>.P} \<noteq> Ax u a\<rbrakk> \<Longrightarrow> Cut <b>.P{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: not_Ax2)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> y \<and> ba \<sharp> d; bd \<sharp> y \<and> bd \<sharp> d \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = d then Cut <d>.Ax y d ba.bb else Ax y d){bc:=<bd>.be} = (if y = bc then Cut <bd>.be bc.Ax bc d else Ax y d){b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M''; M'' \<noteq> Ax u a; M' = Ax y d; u \<sharp> y; u \<sharp> d; b \<sharp> y; b \<sharp> d; x \<sharp> y; x \<sharp> d; M''{y:=<b>.P} \<noteq> Ax u a\<rbrakk> \<Longrightarrow> Cut <b>.P{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: forget)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule sym)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = ?s122
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> ?s122 = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule better_Cut_substc)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> d \<sharp> (a, N{y:=<b>.P})
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> u \<sharp> [x].N{y:=<b>.P}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> (if M''{y:=<b>.P} = Ax u a then Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}) = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: subst_fresh fresh_atm)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> u \<sharp> [x].N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> (if M''{y:=<b>.P} = Ax u a then Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}) = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: abs_fresh subst_fresh)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> (if M''{y:=<b>.P} = Ax u a then Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}) = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(auto)[1]
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d; M''{y:=<b>.P} = Ax u a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <b>.P u.Cut <a>.Ax u a x.N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d; M''{y:=<b>.P} \<noteq> Ax u a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(case_tac "y\<sharp>M''")
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d; M''{y:=<b>.P} = Ax u a; y \<sharp> M''\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <b>.P u.Cut <a>.Ax u a x.N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d; M''{y:=<b>.P} = Ax u a; \<not> y \<sharp> M''\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <b>.P u.Cut <a>.Ax u a x.N{y:=<b>.P}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d; M''{y:=<b>.P} \<noteq> Ax u a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 5. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: forget)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d; M''{y:=<b>.P} = Ax u a; \<not> y \<sharp> M''\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <b>.P u.Cut <a>.Ax u a x.N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d; M''{y:=<b>.P} \<noteq> Ax u a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: not_Ax2)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d; M''{y:=<b>.P} \<noteq> Ax u a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(case_tac "a\<sharp>M'")
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d; M''{y:=<b>.P} \<noteq> Ax u a; a \<sharp> M'\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d; M''{y:=<b>.P} \<noteq> Ax u a; \<not> a \<sharp> M'\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: forget)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} = Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d; M''{y:=<b>.P} \<noteq> Ax u a; \<not> a \<sharp> M'\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <b>.P u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: not_Ax1)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule sym)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P} u.Ax u a{a:=x.N{y:=<b>.P}} = ?s141
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> ?s141 = Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule better_Cut_substc)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> d \<sharp> (a, N{y:=<b>.P})
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> u \<sharp> [x].N{y:=<b>.P}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> (if Ax u a = Ax u a then Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.Ax u a{a:=x.N{y:=<b>.P}}) = Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P}
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: subst_fresh)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> u \<sharp> [x].N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> (if Ax u a = Ax u a then Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.Ax u a{a:=x.N{y:=<b>.P}}) = Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: subst_fresh abs_fresh)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> u \<and> ba \<sharp> a; bd \<sharp> u \<and> bd \<sharp> a \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> (if b = a then Cut <a>.Ax u a ba.bb else Ax u a){bc:=<bd>.be} = (if u = bc then Cut <bd>.be bc.Ax bc a else Ax u a){b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> N; x \<sharp> M'; M'{a:=x.N} \<noteq> Ax y d; M'' = Ax u a; M' \<noteq> Ax y d; d \<sharp> u; d \<sharp> a; b \<sharp> u; b \<sharp> a; x \<sharp> u; x \<sharp> a\<rbrakk> \<Longrightarrow> (if Ax u a = Ax u a then Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.Ax u a{a:=x.N{y:=<b>.P}}) = Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule sym)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} = ?s149
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> ?s149 = Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule better_Cut_substc)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> d \<sharp> (a, N{y:=<b>.P})
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> u \<sharp> [x].N{y:=<b>.P}
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> (if M''{y:=<b>.P} = Ax u a then Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}) = Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: subst_fresh fresh_atm)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> u \<sharp> [x].N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> (if M''{y:=<b>.P} = Ax u a then Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}) = Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: subst_fresh abs_fresh)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d\<rbrakk> \<Longrightarrow> (if M''{y:=<b>.P} = Ax u a then Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}) = Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(auto)[1]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d; M''{y:=<b>.P} = Ax u a\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.Cut <a>.Ax u a x.N{y:=<b>.P}
[PROOF STEP]
apply(case_tac "y\<sharp>M''")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d; M''{y:=<b>.P} = Ax u a; y \<sharp> M''\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.Cut <a>.Ax u a x.N{y:=<b>.P}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d; M''{y:=<b>.P} = Ax u a; \<not> y \<sharp> M''\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.Cut <a>.Ax u a x.N{y:=<b>.P}
[PROOF STEP]
apply(simp add: forget)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; u \<noteq> x; u \<sharp> N; u \<noteq> y; u \<sharp> P; d \<sharp> M''; u \<sharp> M'; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; M'{a:=x.N} \<noteq> Ax y d; M'' \<noteq> Ax u a; M' \<noteq> Ax y d; M''{y:=<b>.P} = Ax u a; \<not> y \<sharp> M''\<rbrakk> \<Longrightarrow> Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} = Cut <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} u.Cut <a>.Ax u a x.N{y:=<b>.P}
[PROOF STEP]
apply(simp add: not_Ax2)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
Cut <d>.M' u.M''{a:=x.N}{y:=<b>.P} = Cut <d>.M' u.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}

goal (10 subgoals):
 1. \<And>name trm coname a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; name \<sharp> coname; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotR name.trm coname); b \<sharp> (NotR name.trm coname, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotR name.trm coname{a:=x.N}{y:=<b>.P} = NotR name.trm coname{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname trm name a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; coname \<sharp> name; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotL <coname>.trm name); b \<sharp> (NotL <coname>.trm name, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotL <coname>.trm name{a:=x.N}{y:=<b>.P} = NotL <coname>.trm name{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>coname1 trm1 coname2 trm2 coname3 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname2 \<sharp> a; coname2 \<sharp> x; coname2 \<sharp> N; coname2 \<sharp> y; coname2 \<sharp> b; coname2 \<sharp> P; coname2 \<noteq> coname1; coname1 \<sharp> trm2; coname1 \<sharp> coname3; coname2 \<sharp> trm1; coname2 \<sharp> coname3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndR <coname1>.trm1 <coname2>.trm2 coname3); b \<sharp> (AndR <coname1>.trm1 <coname2>.trm2 coname3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndR <coname1>.trm1 <coname2>.trm2 coname3{a:=x.N}{y:=<b>.P} = AndR <coname1>.trm1 <coname2>.trm2 coname3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 8. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 9. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 10. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (10 subgoals):
 1. \<And>name trm coname a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; name \<sharp> coname; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotR name.trm coname); b \<sharp> (NotR name.trm coname, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotR name.trm coname{a:=x.N}{y:=<b>.P} = NotR name.trm coname{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname trm name a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; coname \<sharp> name; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotL <coname>.trm name); b \<sharp> (NotL <coname>.trm name, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotL <coname>.trm name{a:=x.N}{y:=<b>.P} = NotL <coname>.trm name{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>coname1 trm1 coname2 trm2 coname3 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname2 \<sharp> a; coname2 \<sharp> x; coname2 \<sharp> N; coname2 \<sharp> y; coname2 \<sharp> b; coname2 \<sharp> P; coname2 \<noteq> coname1; coname1 \<sharp> trm2; coname1 \<sharp> coname3; coname2 \<sharp> trm1; coname2 \<sharp> coname3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndR <coname1>.trm1 <coname2>.trm2 coname3); b \<sharp> (AndR <coname1>.trm1 <coname2>.trm2 coname3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndR <coname1>.trm1 <coname2>.trm2 coname3{a:=x.N}{y:=<b>.P} = AndR <coname1>.trm1 <coname2>.trm2 coname3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 8. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 9. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 10. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
case (NotR z M' d)
[PROOF STATE]
proof (state)
this:
z \<sharp> a
z \<sharp> x
z \<sharp> N
z \<sharp> y
z \<sharp> b
z \<sharp> P
z \<sharp> d
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, NotR z.M' d)
b \<sharp> (NotR z.M' d, N)
y \<sharp> P

goal (10 subgoals):
 1. \<And>name trm coname a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; name \<sharp> coname; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotR name.trm coname); b \<sharp> (NotR name.trm coname, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotR name.trm coname{a:=x.N}{y:=<b>.P} = NotR name.trm coname{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname trm name a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; coname \<sharp> name; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotL <coname>.trm name); b \<sharp> (NotL <coname>.trm name, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotL <coname>.trm name{a:=x.N}{y:=<b>.P} = NotL <coname>.trm name{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>coname1 trm1 coname2 trm2 coname3 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname2 \<sharp> a; coname2 \<sharp> x; coname2 \<sharp> N; coname2 \<sharp> y; coname2 \<sharp> b; coname2 \<sharp> P; coname2 \<noteq> coname1; coname1 \<sharp> trm2; coname1 \<sharp> coname3; coname2 \<sharp> trm1; coname2 \<sharp> coname3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndR <coname1>.trm1 <coname2>.trm2 coname3); b \<sharp> (AndR <coname1>.trm1 <coname2>.trm2 coname3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndR <coname1>.trm1 <coname2>.trm2 coname3{a:=x.N}{y:=<b>.P} = AndR <coname1>.trm1 <coname2>.trm2 coname3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 8. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 9. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 10. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z \<sharp> a
z \<sharp> x
z \<sharp> N
z \<sharp> y
z \<sharp> b
z \<sharp> P
z \<sharp> d
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, NotR z.M' d)
b \<sharp> (NotR z.M' d, N)
y \<sharp> P
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
z \<sharp> a
z \<sharp> x
z \<sharp> N
z \<sharp> y
z \<sharp> b
z \<sharp> P
z \<sharp> d
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, NotR z.M' d)
b \<sharp> (NotR z.M' d, N)
y \<sharp> P

goal (1 subgoal):
 1. NotR z.M' d{a:=x.N}{y:=<b>.P} = NotR z.M' d{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(auto simp add: subst_fresh abs_fresh fresh_atm fresh_prod forget)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.NotR z.M'{d:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.NotR z.M'{y:=<b>.P}{d:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
[PROOF STEP]
apply(subgoal_tac "\<exists>a'::coname. a'\<sharp>(y,P,N,N{y:=<b>.P},M'{d:=(x).N},M'{y:=<b>.P}{d:=(x).N{y:=<b>.P}})")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; \<exists>a'. a' \<sharp> (y, P, N, N{y:=<b>.P}, M'{d:=x.N}, M'{y:=<b>.P}{d:=x.N{y:=<b>.P}})\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.NotR z.M'{d:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.NotR z.M'{y:=<b>.P}{d:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (y, P, N, N{y:=<b>.P}, M'{d:=x.N}, M'{y:=<b>.P}{d:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(erule exE, simp add: fresh_prod)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y \<and> a' \<sharp> P \<and> a' \<sharp> N \<and> a' \<sharp> N{y:=<b>.P} \<and> a' \<sharp> M'{d:=x.N} \<and> a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.NotR z.M'{d:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.NotR z.M'{y:=<b>.P}{d:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (y, P, N, N{y:=<b>.P}, M'{d:=x.N}, M'{y:=<b>.P}{d:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(erule conjE)+
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.NotR z.M'{d:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.NotR z.M'{y:=<b>.P}{d:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (y, P, N, N{y:=<b>.P}, M'{d:=x.N}, M'{y:=<b>.P}{d:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_fun_simp_NotR)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <a'>.NotR z.M'{d:=x.N} a' x.N{y:=<b>.P} = Cut <a'>.NotR z.M'{y:=<b>.P}{d:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P}
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (y, P, N, N{y:=<b>.P}, M'{d:=x.N}, M'{y:=<b>.P}{d:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <a'>.NotR z.M'{d:=x.N} a' x.N{y:=<b>.P} = ?s39 a'
 2. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s39 a' = Cut <a'>.NotR z.M'{y:=<b>.P}{d:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P}
 3. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (y, P, N, N{y:=<b>.P}, M'{d:=x.N}, M'{y:=<b>.P}{d:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule better_Cut_substn)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> a' \<sharp> [b].P
 2. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> x \<sharp> (y, P)
 3. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if NotR z.M'{d:=x.N} a' = Ax y a' then Cut <b>.P x.N{y:=<b>.P} else Cut <a'>.NotR z.M'{d:=x.N} a'{y:=<b>.P} x.N{y:=<b>.P}) = Cut <a'>.NotR z.M'{y:=<b>.P}{d:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P}
 4. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (y, P, N, N{y:=<b>.P}, M'{d:=x.N}, M'{y:=<b>.P}{d:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: abs_fresh subst_fresh)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> x \<sharp> (y, P)
 2. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if NotR z.M'{d:=x.N} a' = Ax y a' then Cut <b>.P x.N{y:=<b>.P} else Cut <a'>.NotR z.M'{d:=x.N} a'{y:=<b>.P} x.N{y:=<b>.P}) = Cut <a'>.NotR z.M'{y:=<b>.P}{d:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P}
 3. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (y, P, N, N{y:=<b>.P}, M'{d:=x.N}, M'{y:=<b>.P}{d:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod subst_fresh fresh_atm)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if NotR z.M'{d:=x.N} a' = Ax y a' then Cut <b>.P x.N{y:=<b>.P} else Cut <a'>.NotR z.M'{d:=x.N} a'{y:=<b>.P} x.N{y:=<b>.P}) = Cut <a'>.NotR z.M'{y:=<b>.P}{d:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P}
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (y, P, N, N{y:=<b>.P}, M'{d:=x.N}, M'{y:=<b>.P}{d:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <a'>.NotR z.M'{d:=x.N} a'{y:=<b>.P} x.N{y:=<b>.P} = Cut <a'>.NotR z.M'{y:=<b>.P}{d:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P}
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (y, P, N, N{y:=<b>.P}, M'{d:=x.N}, M'{y:=<b>.P}{d:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: trm.inject alpha)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> NotR z.M'{d:=x.N} a'{y:=<b>.P} = NotR z.M'{y:=<b>.P}{d:=x.N{y:=<b>.P}} a'
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (y, P, N, N{y:=<b>.P}, M'{d:=x.N}, M'{y:=<b>.P}{d:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> NotR z.M'{d:=x.N} a'{y:=<b>.P} = ?s45 a'
 2. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s45 a' = NotR z.M'{y:=<b>.P}{d:=x.N{y:=<b>.P}} a'
 3. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (y, P, N, N{y:=<b>.P}, M'{d:=x.N}, M'{y:=<b>.P}{d:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule substn.simps)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> z \<sharp> (y, P)
 2. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> NotR z.M'{d:=x.N}{y:=<b>.P} a' = NotR z.M'{y:=<b>.P}{d:=x.N{y:=<b>.P}} a'
 3. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (y, P, N, N{y:=<b>.P}, M'{d:=x.N}, M'{y:=<b>.P}{d:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod fresh_atm)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d; a' \<sharp> y; a' \<sharp> P; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{d:=x.N}; a' \<sharp> M'{y:=<b>.P}{d:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> NotR z.M'{d:=x.N}{y:=<b>.P} a' = NotR z.M'{y:=<b>.P}{d:=x.N{y:=<b>.P}} a'
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (y, P, N, N{y:=<b>.P}, M'{d:=x.N}, M'{y:=<b>.P}{d:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_atm)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<noteq> y; z \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; d \<sharp> P; d \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> d; b \<sharp> N; a = d\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (y, P, N, N{y:=<b>.P}, M'{d:=x.N}, M'{y:=<b>.P}{d:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule exists_fresh'(2)[OF fs_coname1])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
NotR z.M' d{a:=x.N}{y:=<b>.P} = NotR z.M' d{y:=<b>.P}{a:=x.N{y:=<b>.P}}

goal (9 subgoals):
 1. \<And>coname trm name a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; coname \<sharp> name; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotL <coname>.trm name); b \<sharp> (NotL <coname>.trm name, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotL <coname>.trm name{a:=x.N}{y:=<b>.P} = NotL <coname>.trm name{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname1 trm1 coname2 trm2 coname3 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname2 \<sharp> a; coname2 \<sharp> x; coname2 \<sharp> N; coname2 \<sharp> y; coname2 \<sharp> b; coname2 \<sharp> P; coname2 \<noteq> coname1; coname1 \<sharp> trm2; coname1 \<sharp> coname3; coname2 \<sharp> trm1; coname2 \<sharp> coname3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndR <coname1>.trm1 <coname2>.trm2 coname3); b \<sharp> (AndR <coname1>.trm1 <coname2>.trm2 coname3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndR <coname1>.trm1 <coname2>.trm2 coname3{a:=x.N}{y:=<b>.P} = AndR <coname1>.trm1 <coname2>.trm2 coname3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 8. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 9. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (9 subgoals):
 1. \<And>coname trm name a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; coname \<sharp> name; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotL <coname>.trm name); b \<sharp> (NotL <coname>.trm name, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotL <coname>.trm name{a:=x.N}{y:=<b>.P} = NotL <coname>.trm name{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname1 trm1 coname2 trm2 coname3 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname2 \<sharp> a; coname2 \<sharp> x; coname2 \<sharp> N; coname2 \<sharp> y; coname2 \<sharp> b; coname2 \<sharp> P; coname2 \<noteq> coname1; coname1 \<sharp> trm2; coname1 \<sharp> coname3; coname2 \<sharp> trm1; coname2 \<sharp> coname3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndR <coname1>.trm1 <coname2>.trm2 coname3); b \<sharp> (AndR <coname1>.trm1 <coname2>.trm2 coname3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndR <coname1>.trm1 <coname2>.trm2 coname3{a:=x.N}{y:=<b>.P} = AndR <coname1>.trm1 <coname2>.trm2 coname3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 8. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 9. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
case (NotL d M' z)
[PROOF STATE]
proof (state)
this:
d \<sharp> a
d \<sharp> x
d \<sharp> N
d \<sharp> y
d \<sharp> b
d \<sharp> P
d \<sharp> z
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, NotL <d>.M' z)
b \<sharp> (NotL <d>.M' z, N)
y \<sharp> P

goal (9 subgoals):
 1. \<And>coname trm name a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; coname \<sharp> name; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, NotL <coname>.trm name); b \<sharp> (NotL <coname>.trm name, N); y \<sharp> P\<rbrakk> \<Longrightarrow> NotL <coname>.trm name{a:=x.N}{y:=<b>.P} = NotL <coname>.trm name{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname1 trm1 coname2 trm2 coname3 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname2 \<sharp> a; coname2 \<sharp> x; coname2 \<sharp> N; coname2 \<sharp> y; coname2 \<sharp> b; coname2 \<sharp> P; coname2 \<noteq> coname1; coname1 \<sharp> trm2; coname1 \<sharp> coname3; coname2 \<sharp> trm1; coname2 \<sharp> coname3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndR <coname1>.trm1 <coname2>.trm2 coname3); b \<sharp> (AndR <coname1>.trm1 <coname2>.trm2 coname3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndR <coname1>.trm1 <coname2>.trm2 coname3{a:=x.N}{y:=<b>.P} = AndR <coname1>.trm1 <coname2>.trm2 coname3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 8. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 9. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
d \<sharp> a
d \<sharp> x
d \<sharp> N
d \<sharp> y
d \<sharp> b
d \<sharp> P
d \<sharp> z
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, NotL <d>.M' z)
b \<sharp> (NotL <d>.M' z, N)
y \<sharp> P
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
d \<sharp> a
d \<sharp> x
d \<sharp> N
d \<sharp> y
d \<sharp> b
d \<sharp> P
d \<sharp> z
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, NotL <d>.M' z)
b \<sharp> (NotL <d>.M' z, N)
y \<sharp> P

goal (1 subgoal):
 1. NotL <d>.M' z{a:=x.N}{y:=<b>.P} = NotL <d>.M' z{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(auto simp add: subst_fresh abs_fresh fresh_atm fresh_prod forget trm.inject)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>x'. Cut <b>.P x'.NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x') = fresh_fun (\<lambda>x'. Cut <b>.P x'.NotL <d>.M'{y:=<b>.P} x'){a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(subgoal_tac "\<exists>x'::name. x'\<sharp>(z,y,P,N,N{y:=<b>.P},M'{y:=<b>.P},M'{y:=<b>.P}{a:=(x).N{y:=<b>.P}})")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>x'. Cut <b>.P x'.NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x') = fresh_fun (\<lambda>x'. Cut <b>.P x'.NotL <d>.M'{y:=<b>.P} x'){a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(erule exE, simp add: fresh_prod)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y \<and> x' \<sharp> P \<and> x' \<sharp> N \<and> x' \<sharp> N{y:=<b>.P} \<and> x' \<sharp> M'{y:=<b>.P} \<and> x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>x'. Cut <b>.P x'.NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x') = fresh_fun (\<lambda>x'. Cut <b>.P x'.NotL <d>.M'{y:=<b>.P} x'){a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(erule conjE)+
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>x'. Cut <b>.P x'.NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x') = fresh_fun (\<lambda>x'. Cut <b>.P x'.NotL <d>.M'{y:=<b>.P} x'){a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_fun_simp_NotL)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P x'.NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x' = Cut <b>.P x'.NotL <d>.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule sym)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P x'.NotL <d>.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}} = Cut <b>.P x'.NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P x'.NotL <d>.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}} = ?s41 x'
 2. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s41 x' = Cut <b>.P x'.NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule better_Cut_substc)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> b \<sharp> (a, N{y:=<b>.P})
 2. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> x' \<sharp> [x].N{y:=<b>.P}
 3. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if NotL <d>.M'{y:=<b>.P} x' = Ax x' a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} x'.NotL <d>.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}}) = Cut <b>.P x'.NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 4. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: abs_fresh subst_fresh fresh_atm)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> x' \<sharp> [x].N{y:=<b>.P}
 2. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if NotL <d>.M'{y:=<b>.P} x' = Ax x' a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} x'.NotL <d>.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}}) = Cut <b>.P x'.NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod subst_fresh fresh_atm abs_fresh)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if NotL <d>.M'{y:=<b>.P} x' = Ax x' a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} x'.NotL <d>.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}}) = Cut <b>.P x'.NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P{a:=x.N{y:=<b>.P}} x'.NotL <d>.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}} = Cut <b>.P x'.NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: trm.inject alpha forget)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> NotL <d>.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}} = NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> NotL <d>.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}} = ?s47 x'
 2. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s47 x' = NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule substc.simps)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> d \<sharp> (a, N{y:=<b>.P})
 2. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x' = NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod fresh_atm)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<noteq> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> d \<sharp> N{y:=<b>.P}
 2. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x' = NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 3. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_atm subst_fresh)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y; x' \<sharp> y; x' \<sharp> P; x' \<sharp> N; x' \<sharp> N{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x' = NotL <d>.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 2. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>d \<noteq> a; d \<sharp> N; d \<noteq> b; d \<sharp> P; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; z = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (z, y, P, N, N{y:=<b>.P}, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule exists_fresh'(1)[OF fs_name1])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
NotL <d>.M' z{a:=x.N}{y:=<b>.P} = NotL <d>.M' z{y:=<b>.P}{a:=x.N{y:=<b>.P}}

goal (8 subgoals):
 1. \<And>coname1 trm1 coname2 trm2 coname3 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname2 \<sharp> a; coname2 \<sharp> x; coname2 \<sharp> N; coname2 \<sharp> y; coname2 \<sharp> b; coname2 \<sharp> P; coname2 \<noteq> coname1; coname1 \<sharp> trm2; coname1 \<sharp> coname3; coname2 \<sharp> trm1; coname2 \<sharp> coname3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndR <coname1>.trm1 <coname2>.trm2 coname3); b \<sharp> (AndR <coname1>.trm1 <coname2>.trm2 coname3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndR <coname1>.trm1 <coname2>.trm2 coname3{a:=x.N}{y:=<b>.P} = AndR <coname1>.trm1 <coname2>.trm2 coname3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 8. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (8 subgoals):
 1. \<And>coname1 trm1 coname2 trm2 coname3 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname2 \<sharp> a; coname2 \<sharp> x; coname2 \<sharp> N; coname2 \<sharp> y; coname2 \<sharp> b; coname2 \<sharp> P; coname2 \<noteq> coname1; coname1 \<sharp> trm2; coname1 \<sharp> coname3; coname2 \<sharp> trm1; coname2 \<sharp> coname3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndR <coname1>.trm1 <coname2>.trm2 coname3); b \<sharp> (AndR <coname1>.trm1 <coname2>.trm2 coname3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndR <coname1>.trm1 <coname2>.trm2 coname3{a:=x.N}{y:=<b>.P} = AndR <coname1>.trm1 <coname2>.trm2 coname3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 8. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
case (AndR d M' e M'' f)
[PROOF STATE]
proof (state)
this:
d \<sharp> a
d \<sharp> x
d \<sharp> N
d \<sharp> y
d \<sharp> b
d \<sharp> P
e \<sharp> a
e \<sharp> x
e \<sharp> N
e \<sharp> y
e \<sharp> b
e \<sharp> P
e \<noteq> d
d \<sharp> M''
d \<sharp> f
e \<sharp> M'
e \<sharp> f
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M''); ?bd \<sharp> (M'', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M''{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M''{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, AndR <d>.M' <e>.M'' f)
b \<sharp> (AndR <d>.M' <e>.M'' f, N)
y \<sharp> P

goal (8 subgoals):
 1. \<And>coname1 trm1 coname2 trm2 coname3 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname2 \<sharp> a; coname2 \<sharp> x; coname2 \<sharp> N; coname2 \<sharp> y; coname2 \<sharp> b; coname2 \<sharp> P; coname2 \<noteq> coname1; coname1 \<sharp> trm2; coname1 \<sharp> coname3; coname2 \<sharp> trm1; coname2 \<sharp> coname3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndR <coname1>.trm1 <coname2>.trm2 coname3); b \<sharp> (AndR <coname1>.trm1 <coname2>.trm2 coname3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndR <coname1>.trm1 <coname2>.trm2 coname3{a:=x.N}{y:=<b>.P} = AndR <coname1>.trm1 <coname2>.trm2 coname3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 8. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
d \<sharp> a
d \<sharp> x
d \<sharp> N
d \<sharp> y
d \<sharp> b
d \<sharp> P
e \<sharp> a
e \<sharp> x
e \<sharp> N
e \<sharp> y
e \<sharp> b
e \<sharp> P
e \<noteq> d
d \<sharp> M''
d \<sharp> f
e \<sharp> M'
e \<sharp> f
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M''); ?bd \<sharp> (M'', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M''{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M''{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, AndR <d>.M' <e>.M'' f)
b \<sharp> (AndR <d>.M' <e>.M'' f, N)
y \<sharp> P
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
d \<sharp> a
d \<sharp> x
d \<sharp> N
d \<sharp> y
d \<sharp> b
d \<sharp> P
e \<sharp> a
e \<sharp> x
e \<sharp> N
e \<sharp> y
e \<sharp> b
e \<sharp> P
e \<noteq> d
d \<sharp> M''
d \<sharp> f
e \<sharp> M'
e \<sharp> f
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M''); ?bd \<sharp> (M'', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M''{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M''{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, AndR <d>.M' <e>.M'' f)
b \<sharp> (AndR <d>.M' <e>.M'' f, N)
y \<sharp> P

goal (1 subgoal):
 1. AndR <d>.M' <e>.M'' f{a:=x.N}{y:=<b>.P} = AndR <d>.M' <e>.M'' f{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(auto simp add: subst_fresh abs_fresh fresh_atm fresh_prod forget trm.inject)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.AndR <d>.M'{f:=x.N} <e>.M''{f:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.AndR <d>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} <e>.M''{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
[PROOF STEP]
apply(subgoal_tac "\<exists>a'::coname. a'\<sharp>(P,b,d,e,N,N{y:=<b>.P},M'{f:=(x).N},M''{f:=(x).N},
                  M'{y:=<b>.P}{f:=(x).N{y:=<b>.P}},M''{y:=<b>.P}{f:=(x).N{y:=<b>.P}})")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.AndR <d>.M'{f:=x.N} <e>.M''{f:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.AndR <d>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} <e>.M''{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
 2. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(erule exE, simp add: fresh_prod)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P \<and> a' \<sharp> b \<and> a' \<sharp> d \<and> a' \<sharp> e \<and> a' \<sharp> N \<and> a' \<sharp> N{y:=<b>.P} \<and> a' \<sharp> M'{f:=x.N} \<and> a' \<sharp> M''{f:=x.N} \<and> a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} \<and> a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.AndR <d>.M'{f:=x.N} <e>.M''{f:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.AndR <d>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} <e>.M''{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
 2. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(erule conjE)+
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.AndR <d>.M'{f:=x.N} <e>.M''{f:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.AndR <d>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} <e>.M''{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
 2. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_fun_simp_AndR)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <a'>.AndR <d>.M'{f:=x.N} <e>.M''{f:=x.N} a' x.N{y:=<b>.P} = Cut <a'>.AndR <d>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} <e>.M''{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P}
 2. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <a'>.AndR <d>.M'{f:=x.N} <e>.M''{f:=x.N} a' x.N{y:=<b>.P} = ?s61 a'
 2. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s61 a' = Cut <a'>.AndR <d>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} <e>.M''{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P}
 3. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule better_Cut_substn)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> a' \<sharp> [b].P
 2. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> x \<sharp> (y, P)
 3. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if AndR <d>.M'{f:=x.N} <e>.M''{f:=x.N} a' = Ax y a' then Cut <b>.P x.N{y:=<b>.P} else Cut <a'>.AndR <d>.M'{f:=x.N} <e>.M''{f:=x.N} a'{y:=<b>.P} x.N{y:=<b>.P}) = Cut <a'>.AndR <d>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} <e>.M''{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P}
 4. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: abs_fresh subst_fresh fresh_atm)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> x \<sharp> (y, P)
 2. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if AndR <d>.M'{f:=x.N} <e>.M''{f:=x.N} a' = Ax y a' then Cut <b>.P x.N{y:=<b>.P} else Cut <a'>.AndR <d>.M'{f:=x.N} <e>.M''{f:=x.N} a'{y:=<b>.P} x.N{y:=<b>.P}) = Cut <a'>.AndR <d>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} <e>.M''{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P}
 3. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod subst_fresh fresh_atm abs_fresh)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if AndR <d>.M'{f:=x.N} <e>.M''{f:=x.N} a' = Ax y a' then Cut <b>.P x.N{y:=<b>.P} else Cut <a'>.AndR <d>.M'{f:=x.N} <e>.M''{f:=x.N} a'{y:=<b>.P} x.N{y:=<b>.P}) = Cut <a'>.AndR <d>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} <e>.M''{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P}
 2. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <a'>.AndR <d>.M'{f:=x.N} <e>.M''{f:=x.N} a'{y:=<b>.P} x.N{y:=<b>.P} = Cut <a'>.AndR <d>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} <e>.M''{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P}
 2. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: trm.inject alpha forget)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> AndR <d>.M'{f:=x.N} <e>.M''{f:=x.N} a'{y:=<b>.P} = AndR <d>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} <e>.M''{y:=<b>.P}{f:=x.N{y:=<b>.P}} a'
 2. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> AndR <d>.M'{f:=x.N} <e>.M''{f:=x.N} a'{y:=<b>.P} = ?s67 a'
 2. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s67 a' = AndR <d>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} <e>.M''{y:=<b>.P}{f:=x.N{y:=<b>.P}} a'
 3. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule substn.simps)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> d \<sharp> (b, P, M''{f:=x.N}, a')
 2. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> e \<sharp> (b, P, M'{f:=x.N}, a')
 3. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> e \<noteq> d
 4. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> AndR <d>.M'{f:=x.N}{y:=<b>.P} <e>.M''{f:=x.N}{y:=<b>.P} a' = AndR <d>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} <e>.M''{y:=<b>.P}{f:=x.N{y:=<b>.P}} a'
 5. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod fresh_atm subst_fresh)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> e \<sharp> (b, P, M'{f:=x.N}, a')
 2. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> e \<noteq> d
 3. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> AndR <d>.M'{f:=x.N}{y:=<b>.P} <e>.M''{f:=x.N}{y:=<b>.P} a' = AndR <d>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} <e>.M''{y:=<b>.P}{f:=x.N{y:=<b>.P}} a'
 4. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_atm subst_fresh)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> e \<noteq> d
 2. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> AndR <d>.M'{f:=x.N}{y:=<b>.P} <e>.M''{f:=x.N}{y:=<b>.P} a' = AndR <d>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} <e>.M''{y:=<b>.P}{f:=x.N{y:=<b>.P}} a'
 3. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_atm)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a'. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f; a' \<sharp> P; a' \<sharp> b; a' \<sharp> d; a' \<sharp> e; a' \<sharp> N; a' \<sharp> N{y:=<b>.P}; a' \<sharp> M'{f:=x.N}; a' \<sharp> M''{f:=x.N}; a' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}; a' \<sharp> M''{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> AndR <d>.M'{f:=x.N}{y:=<b>.P} <e>.M''{f:=x.N}{y:=<b>.P} a' = AndR <d>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} <e>.M''{y:=<b>.P}{f:=x.N{y:=<b>.P}} a'
 2. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>d \<sharp> N; d \<noteq> b; d \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> d; d \<sharp> M''; d \<noteq> f; e \<sharp> M'; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; b \<sharp> M''; x \<sharp> M'; x \<sharp> M''; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>a'. a' \<sharp> (P, b, d, e, N, N{y:=<b>.P}, M'{f:=x.N}, M''{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule exists_fresh'(2)[OF fs_coname1])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
AndR <d>.M' <e>.M'' f{a:=x.N}{y:=<b>.P} = AndR <d>.M' <e>.M'' f{y:=<b>.P}{a:=x.N{y:=<b>.P}}

goal (7 subgoals):
 1. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
case (AndL1 z M' u)
[PROOF STATE]
proof (state)
this:
z \<sharp> a
z \<sharp> x
z \<sharp> N
z \<sharp> y
z \<sharp> b
z \<sharp> P
z \<sharp> u
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, AndL1 z.M' u)
b \<sharp> (AndL1 z.M' u, N)
y \<sharp> P

goal (7 subgoals):
 1. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL1 name1.trm name2); b \<sharp> (AndL1 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL1 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL1 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 7. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z \<sharp> a
z \<sharp> x
z \<sharp> N
z \<sharp> y
z \<sharp> b
z \<sharp> P
z \<sharp> u
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, AndL1 z.M' u)
b \<sharp> (AndL1 z.M' u, N)
y \<sharp> P
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
z \<sharp> a
z \<sharp> x
z \<sharp> N
z \<sharp> y
z \<sharp> b
z \<sharp> P
z \<sharp> u
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, AndL1 z.M' u)
b \<sharp> (AndL1 z.M' u, N)
y \<sharp> P

goal (1 subgoal):
 1. AndL1 z.M' u{a:=x.N}{y:=<b>.P} = AndL1 z.M' u{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(auto simp add: subst_fresh abs_fresh fresh_atm fresh_prod forget trm.inject)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>z'. Cut <b>.P z'.AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} z') = fresh_fun (\<lambda>z'. Cut <b>.P z'.AndL1 z.M'{y:=<b>.P} z'){a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(subgoal_tac "\<exists>x'::name. x'\<sharp>(P,b,z,u,x,N,M'{y:=<b>.P},M'{y:=<b>.P}{a:=(x).N{y:=<b>.P}})")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>z'. Cut <b>.P z'.AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} z') = fresh_fun (\<lambda>z'. Cut <b>.P z'.AndL1 z.M'{y:=<b>.P} z'){a:=x.N{y:=<b>.P}}
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(erule exE, simp add: fresh_prod)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P \<and> x' \<sharp> b \<and> x' \<sharp> z \<and> x' \<sharp> y \<and> x' \<sharp> x \<and> x' \<sharp> N \<and> x' \<sharp> M'{y:=<b>.P} \<and> x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>z'. Cut <b>.P z'.AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} z') = fresh_fun (\<lambda>z'. Cut <b>.P z'.AndL1 z.M'{y:=<b>.P} z'){a:=x.N{y:=<b>.P}}
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(erule conjE)+
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>z'. Cut <b>.P z'.AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} z') = fresh_fun (\<lambda>z'. Cut <b>.P z'.AndL1 z.M'{y:=<b>.P} z'){a:=x.N{y:=<b>.P}}
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_fun_simp_AndL1)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P x'.AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x' = Cut <b>.P x'.AndL1 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule sym)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P x'.AndL1 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}} = Cut <b>.P x'.AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P x'.AndL1 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}} = ?s45 x'
 2. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s45 x' = Cut <b>.P x'.AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 3. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule better_Cut_substc)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> b \<sharp> (a, N{y:=<b>.P})
 2. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> x' \<sharp> [x].N{y:=<b>.P}
 3. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if AndL1 z.M'{y:=<b>.P} x' = Ax x' a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} x'.AndL1 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}}) = Cut <b>.P x'.AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 4. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: abs_fresh subst_fresh fresh_atm)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> x' \<sharp> [x].N{y:=<b>.P}
 2. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if AndL1 z.M'{y:=<b>.P} x' = Ax x' a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} x'.AndL1 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}}) = Cut <b>.P x'.AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 3. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod subst_fresh fresh_atm abs_fresh)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if AndL1 z.M'{y:=<b>.P} x' = Ax x' a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} x'.AndL1 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}}) = Cut <b>.P x'.AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P{a:=x.N{y:=<b>.P}} x'.AndL1 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}} = Cut <b>.P x'.AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: trm.inject alpha forget)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> AndL1 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}} = AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> AndL1 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}} = ?s51 x'
 2. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s51 x' = AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 3. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule substc.simps)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> z \<sharp> (x', x, N{y:=<b>.P})
 2. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x' = AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 3. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod fresh_atm subst_fresh)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x' = AndL1 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule exists_fresh'(1)[OF fs_name1])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
AndL1 z.M' u{a:=x.N}{y:=<b>.P} = AndL1 z.M' u{y:=<b>.P}{a:=x.N{y:=<b>.P}}

goal (6 subgoals):
 1. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
case (AndL2 z M' u)
[PROOF STATE]
proof (state)
this:
z \<sharp> a
z \<sharp> x
z \<sharp> N
z \<sharp> y
z \<sharp> b
z \<sharp> P
z \<sharp> u
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, AndL2 z.M' u)
b \<sharp> (AndL2 z.M' u, N)
y \<sharp> P

goal (6 subgoals):
 1. \<And>name1 trm name2 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, AndL2 name1.trm name2); b \<sharp> (AndL2 name1.trm name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> AndL2 name1.trm name2{a:=x.N}{y:=<b>.P} = AndL2 name1.trm name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 6. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z \<sharp> a
z \<sharp> x
z \<sharp> N
z \<sharp> y
z \<sharp> b
z \<sharp> P
z \<sharp> u
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, AndL2 z.M' u)
b \<sharp> (AndL2 z.M' u, N)
y \<sharp> P
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
z \<sharp> a
z \<sharp> x
z \<sharp> N
z \<sharp> y
z \<sharp> b
z \<sharp> P
z \<sharp> u
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, AndL2 z.M' u)
b \<sharp> (AndL2 z.M' u, N)
y \<sharp> P

goal (1 subgoal):
 1. AndL2 z.M' u{a:=x.N}{y:=<b>.P} = AndL2 z.M' u{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(auto simp add: subst_fresh abs_fresh fresh_atm fresh_prod forget trm.inject)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>z'. Cut <b>.P z'.AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} z') = fresh_fun (\<lambda>z'. Cut <b>.P z'.AndL2 z.M'{y:=<b>.P} z'){a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(subgoal_tac "\<exists>x'::name. x'\<sharp>(P,b,z,u,x,N,M'{y:=<b>.P},M'{y:=<b>.P}{a:=(x).N{y:=<b>.P}})")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>z'. Cut <b>.P z'.AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} z') = fresh_fun (\<lambda>z'. Cut <b>.P z'.AndL2 z.M'{y:=<b>.P} z'){a:=x.N{y:=<b>.P}}
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(erule exE, simp add: fresh_prod)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P \<and> x' \<sharp> b \<and> x' \<sharp> z \<and> x' \<sharp> y \<and> x' \<sharp> x \<and> x' \<sharp> N \<and> x' \<sharp> M'{y:=<b>.P} \<and> x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>z'. Cut <b>.P z'.AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} z') = fresh_fun (\<lambda>z'. Cut <b>.P z'.AndL2 z.M'{y:=<b>.P} z'){a:=x.N{y:=<b>.P}}
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(erule conjE)+
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>z'. Cut <b>.P z'.AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} z') = fresh_fun (\<lambda>z'. Cut <b>.P z'.AndL2 z.M'{y:=<b>.P} z'){a:=x.N{y:=<b>.P}}
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_fun_simp_AndL2)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P x'.AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x' = Cut <b>.P x'.AndL2 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule sym)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P x'.AndL2 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}} = Cut <b>.P x'.AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P x'.AndL2 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}} = ?s45 x'
 2. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s45 x' = Cut <b>.P x'.AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 3. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule better_Cut_substc)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> b \<sharp> (a, N{y:=<b>.P})
 2. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> x' \<sharp> [x].N{y:=<b>.P}
 3. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if AndL2 z.M'{y:=<b>.P} x' = Ax x' a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} x'.AndL2 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}}) = Cut <b>.P x'.AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 4. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: abs_fresh subst_fresh fresh_atm)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> x' \<sharp> [x].N{y:=<b>.P}
 2. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if AndL2 z.M'{y:=<b>.P} x' = Ax x' a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} x'.AndL2 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}}) = Cut <b>.P x'.AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 3. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod subst_fresh fresh_atm abs_fresh)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if AndL2 z.M'{y:=<b>.P} x' = Ax x' a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} x'.AndL2 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}}) = Cut <b>.P x'.AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P{a:=x.N{y:=<b>.P}} x'.AndL2 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}} = Cut <b>.P x'.AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: trm.inject alpha forget)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> AndL2 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}} = AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> AndL2 z.M'{y:=<b>.P} x'{a:=x.N{y:=<b>.P}} = ?s51 x'
 2. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s51 x' = AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 3. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule substc.simps)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> z \<sharp> (x', N{y:=<b>.P}, x)
 2. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x' = AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 3. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod fresh_atm subst_fresh)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x'. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y; x' \<sharp> P; x' \<sharp> b; x' \<sharp> z; x' \<sharp> y; x' \<sharp> x; x' \<sharp> N; x' \<sharp> M'{y:=<b>.P}; x' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x' = AndL2 z.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} x'
 2. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>z \<noteq> x; z \<sharp> N; z \<sharp> P; z \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; b \<sharp> N; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> M'; x \<noteq> y; u = y\<rbrakk> \<Longrightarrow> \<exists>x'. x' \<sharp> (P, b, z, u, x, N, M'{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule exists_fresh'(1)[OF fs_name1])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
AndL2 z.M' u{a:=x.N}{y:=<b>.P} = AndL2 z.M' u{y:=<b>.P}{a:=x.N{y:=<b>.P}}

goal (5 subgoals):
 1. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
case (OrL u M' v M'' w)
[PROOF STATE]
proof (state)
this:
u \<sharp> a
u \<sharp> x
u \<sharp> N
u \<sharp> y
u \<sharp> b
u \<sharp> P
v \<sharp> a
v \<sharp> x
v \<sharp> N
v \<sharp> y
v \<sharp> b
v \<sharp> P
v \<noteq> u
u \<sharp> M''
u \<sharp> w
v \<sharp> M'
v \<sharp> w
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M''); ?bd \<sharp> (M'', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M''{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M''{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, OrL u.M' v.M'' w)
b \<sharp> (OrL u.M' v.M'' w, N)
y \<sharp> P

goal (5 subgoals):
 1. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>name1 trm1 name2 trm2 name3 a x N y b P. \<lbrakk>name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; name2 \<sharp> a; name2 \<sharp> x; name2 \<sharp> N; name2 \<sharp> y; name2 \<sharp> b; name2 \<sharp> P; name2 \<noteq> name1; name1 \<sharp> trm2; name1 \<sharp> name3; name2 \<sharp> trm1; name2 \<sharp> name3; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrL name1.trm1 name2.trm2 name3); b \<sharp> (OrL name1.trm1 name2.trm2 name3, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrL name1.trm1 name2.trm2 name3{a:=x.N}{y:=<b>.P} = OrL name1.trm1 name2.trm2 name3{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 5. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
u \<sharp> a
u \<sharp> x
u \<sharp> N
u \<sharp> y
u \<sharp> b
u \<sharp> P
v \<sharp> a
v \<sharp> x
v \<sharp> N
v \<sharp> y
v \<sharp> b
v \<sharp> P
v \<noteq> u
u \<sharp> M''
u \<sharp> w
v \<sharp> M'
v \<sharp> w
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M''); ?bd \<sharp> (M'', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M''{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M''{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, OrL u.M' v.M'' w)
b \<sharp> (OrL u.M' v.M'' w, N)
y \<sharp> P
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
u \<sharp> a
u \<sharp> x
u \<sharp> N
u \<sharp> y
u \<sharp> b
u \<sharp> P
v \<sharp> a
v \<sharp> x
v \<sharp> N
v \<sharp> y
v \<sharp> b
v \<sharp> P
v \<noteq> u
u \<sharp> M''
u \<sharp> w
v \<sharp> M'
v \<sharp> w
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M''); ?bd \<sharp> (M'', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M''{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M''{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, OrL u.M' v.M'' w)
b \<sharp> (OrL u.M' v.M'' w, N)
y \<sharp> P

goal (1 subgoal):
 1. OrL u.M' v.M'' w{a:=x.N}{y:=<b>.P} = OrL u.M' v.M'' w{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(auto simp add: subst_fresh abs_fresh fresh_atm fresh_prod forget trm.inject)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>z'. Cut <b>.P z'.OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z') = fresh_fun (\<lambda>z'. Cut <b>.P z'.OrL u.M'{y:=<b>.P} v.M''{y:=<b>.P} z'){a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(subgoal_tac "\<exists>z'::name. z'\<sharp>(P,b,u,w,v,N,N{y:=<b>.P},M'{y:=<b>.P},M''{y:=<b>.P},
                  M'{y:=<b>.P}{a:=(x).N{y:=<b>.P}},M''{y:=<b>.P}{a:=(x).N{y:=<b>.P}})")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>z'. Cut <b>.P z'.OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z') = fresh_fun (\<lambda>z'. Cut <b>.P z'.OrL u.M'{y:=<b>.P} v.M''{y:=<b>.P} z'){a:=x.N{y:=<b>.P}}
 2. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(erule exE, simp add: fresh_prod)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P \<and> z' \<sharp> b \<and> z' \<sharp> u \<and> z' \<sharp> y \<and> z' \<sharp> v \<and> z' \<sharp> N \<and> z' \<sharp> N{y:=<b>.P} \<and> z' \<sharp> M'{y:=<b>.P} \<and> z' \<sharp> M''{y:=<b>.P} \<and> z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} \<and> z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>z'. Cut <b>.P z'.OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z') = fresh_fun (\<lambda>z'. Cut <b>.P z'.OrL u.M'{y:=<b>.P} v.M''{y:=<b>.P} z'){a:=x.N{y:=<b>.P}}
 2. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(erule conjE)+
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>z'. Cut <b>.P z'.OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z') = fresh_fun (\<lambda>z'. Cut <b>.P z'.OrL u.M'{y:=<b>.P} v.M''{y:=<b>.P} z'){a:=x.N{y:=<b>.P}}
 2. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_fun_simp_OrL)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P z'.OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z' = Cut <b>.P z'.OrL u.M'{y:=<b>.P} v.M''{y:=<b>.P} z'{a:=x.N{y:=<b>.P}}
 2. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule sym)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P z'.OrL u.M'{y:=<b>.P} v.M''{y:=<b>.P} z'{a:=x.N{y:=<b>.P}} = Cut <b>.P z'.OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z'
 2. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P z'.OrL u.M'{y:=<b>.P} v.M''{y:=<b>.P} z'{a:=x.N{y:=<b>.P}} = ?s65 z'
 2. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s65 z' = Cut <b>.P z'.OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z'
 3. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule better_Cut_substc)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> b \<sharp> (a, N{y:=<b>.P})
 2. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> z' \<sharp> [x].N{y:=<b>.P}
 3. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if OrL u.M'{y:=<b>.P} v.M''{y:=<b>.P} z' = Ax z' a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} z'.OrL u.M'{y:=<b>.P} v.M''{y:=<b>.P} z'{a:=x.N{y:=<b>.P}}) = Cut <b>.P z'.OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z'
 4. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: abs_fresh subst_fresh fresh_atm)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> z' \<sharp> [x].N{y:=<b>.P}
 2. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if OrL u.M'{y:=<b>.P} v.M''{y:=<b>.P} z' = Ax z' a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} z'.OrL u.M'{y:=<b>.P} v.M''{y:=<b>.P} z'{a:=x.N{y:=<b>.P}}) = Cut <b>.P z'.OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z'
 3. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod subst_fresh fresh_atm abs_fresh)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if OrL u.M'{y:=<b>.P} v.M''{y:=<b>.P} z' = Ax z' a then Cut <b>.P{a:=x.N{y:=<b>.P}} x.N{y:=<b>.P} else Cut <b>.P{a:=x.N{y:=<b>.P}} z'.OrL u.M'{y:=<b>.P} v.M''{y:=<b>.P} z'{a:=x.N{y:=<b>.P}}) = Cut <b>.P z'.OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z'
 2. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P{a:=x.N{y:=<b>.P}} z'.OrL u.M'{y:=<b>.P} v.M''{y:=<b>.P} z'{a:=x.N{y:=<b>.P}} = Cut <b>.P z'.OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z'
 2. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: trm.inject alpha forget)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> OrL u.M'{y:=<b>.P} v.M''{y:=<b>.P} z'{a:=x.N{y:=<b>.P}} = OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z'
 2. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> OrL u.M'{y:=<b>.P} v.M''{y:=<b>.P} z'{a:=x.N{y:=<b>.P}} = ?s71 z'
 2. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s71 z' = OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z'
 3. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule substc.simps)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> u \<sharp> (M''{y:=<b>.P}, x, N{y:=<b>.P}, z')
 2. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> v \<sharp> (M'{y:=<b>.P}, x, N{y:=<b>.P}, z')
 3. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> u \<noteq> v
 4. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z' = OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z'
 5. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod fresh_atm subst_fresh)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> v \<sharp> (M'{y:=<b>.P}, x, N{y:=<b>.P}, z')
 2. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> u \<noteq> v
 3. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z' = OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z'
 4. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_atm subst_fresh)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> u \<noteq> v
 2. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z' = OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z'
 3. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_atm)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>z'. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y; z' \<sharp> P; z' \<sharp> b; z' \<sharp> u; z' \<sharp> y; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}; z' \<sharp> M''{y:=<b>.P}; z' \<sharp> M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}; z' \<sharp> M''{y:=<b>.P}{a:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z' = OrL u.M'{y:=<b>.P}{a:=x.N{y:=<b>.P}} v.M''{y:=<b>.P}{a:=x.N{y:=<b>.P}} z'
 2. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>u \<noteq> x; u \<sharp> N; u \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; v \<noteq> u; u \<sharp> M''; u \<noteq> y; v \<sharp> M'; v \<noteq> y; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> y; w = y\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, u, w, v, N, N{y:=<b>.P}, M'{y:=<b>.P}, M''{y:=<b>.P}, M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}, M''{y:=<b>.P}{a:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule exists_fresh'(1)[OF fs_name1])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
OrL u.M' v.M'' w{a:=x.N}{y:=<b>.P} = OrL u.M' v.M'' w{y:=<b>.P}{a:=x.N{y:=<b>.P}}

goal (4 subgoals):
 1. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
case (OrR1 e M' f)
[PROOF STATE]
proof (state)
this:
e \<sharp> a
e \<sharp> x
e \<sharp> N
e \<sharp> y
e \<sharp> b
e \<sharp> P
e \<sharp> f
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, OrR1 <e>.M' f)
b \<sharp> (OrR1 <e>.M' f, N)
y \<sharp> P

goal (4 subgoals):
 1. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR1 <coname1>.trm coname2); b \<sharp> (OrR1 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR1 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR1 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 4. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
e \<sharp> a
e \<sharp> x
e \<sharp> N
e \<sharp> y
e \<sharp> b
e \<sharp> P
e \<sharp> f
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, OrR1 <e>.M' f)
b \<sharp> (OrR1 <e>.M' f, N)
y \<sharp> P
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
e \<sharp> a
e \<sharp> x
e \<sharp> N
e \<sharp> y
e \<sharp> b
e \<sharp> P
e \<sharp> f
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, OrR1 <e>.M' f)
b \<sharp> (OrR1 <e>.M' f, N)
y \<sharp> P

goal (1 subgoal):
 1. OrR1 <e>.M' f{a:=x.N}{y:=<b>.P} = OrR1 <e>.M' f{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(auto simp add: subst_fresh abs_fresh fresh_atm fresh_prod forget trm.inject)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.OrR1 <e>.M'{f:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.OrR1 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
[PROOF STEP]
apply(subgoal_tac "\<exists>c'::coname. c'\<sharp>(P,b,e,f,x,N,N{y:=<b>.P},
                                        M'{f:=(x).N},M'{y:=<b>.P}{f:=(x).N{y:=<b>.P}})")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.OrR1 <e>.M'{f:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.OrR1 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
 2. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(erule exE, simp add: fresh_prod)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P \<and> c' \<sharp> b \<and> c' \<sharp> e \<and> c' \<sharp> f \<and> c' \<sharp> x \<and> c' \<sharp> N \<and> c' \<sharp> N{y:=<b>.P} \<and> c' \<sharp> M'{f:=x.N} \<and> c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.OrR1 <e>.M'{f:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.OrR1 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
 2. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(erule conjE)+
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.OrR1 <e>.M'{f:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.OrR1 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
 2. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_fun_simp_OrR1)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <c'>.OrR1 <e>.M'{f:=x.N} c' x.N{y:=<b>.P} = Cut <c'>.OrR1 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 2. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <c'>.OrR1 <e>.M'{f:=x.N} c' x.N{y:=<b>.P} = ?s45 c'
 2. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s45 c' = Cut <c'>.OrR1 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 3. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule better_Cut_substn)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> c' \<sharp> [b].P
 2. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> x \<sharp> (y, P)
 3. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if OrR1 <e>.M'{f:=x.N} c' = Ax y c' then Cut <b>.P x.N{y:=<b>.P} else Cut <c'>.OrR1 <e>.M'{f:=x.N} c'{y:=<b>.P} x.N{y:=<b>.P}) = Cut <c'>.OrR1 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 4. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: abs_fresh subst_fresh fresh_atm)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> x \<sharp> (y, P)
 2. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if OrR1 <e>.M'{f:=x.N} c' = Ax y c' then Cut <b>.P x.N{y:=<b>.P} else Cut <c'>.OrR1 <e>.M'{f:=x.N} c'{y:=<b>.P} x.N{y:=<b>.P}) = Cut <c'>.OrR1 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 3. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod subst_fresh fresh_atm abs_fresh)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if OrR1 <e>.M'{f:=x.N} c' = Ax y c' then Cut <b>.P x.N{y:=<b>.P} else Cut <c'>.OrR1 <e>.M'{f:=x.N} c'{y:=<b>.P} x.N{y:=<b>.P}) = Cut <c'>.OrR1 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 2. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <c'>.OrR1 <e>.M'{f:=x.N} c'{y:=<b>.P} x.N{y:=<b>.P} = Cut <c'>.OrR1 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 2. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: trm.inject alpha forget)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> OrR1 <e>.M'{f:=x.N} c'{y:=<b>.P} = OrR1 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c'
 2. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> OrR1 <e>.M'{f:=x.N} c'{y:=<b>.P} = ?s51 c'
 2. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s51 c' = OrR1 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c'
 3. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule substn.simps)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> e \<sharp> (b, P, c')
 2. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> OrR1 <e>.M'{f:=x.N}{y:=<b>.P} c' = OrR1 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c'
 3. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod fresh_atm subst_fresh)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> OrR1 <e>.M'{f:=x.N}{y:=<b>.P} c' = OrR1 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c'
 2. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule exists_fresh'(2)[OF fs_coname1])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
OrR1 <e>.M' f{a:=x.N}{y:=<b>.P} = OrR1 <e>.M' f{y:=<b>.P}{a:=x.N{y:=<b>.P}}

goal (3 subgoals):
 1. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
case (OrR2 e M' f)
[PROOF STATE]
proof (state)
this:
e \<sharp> a
e \<sharp> x
e \<sharp> N
e \<sharp> y
e \<sharp> b
e \<sharp> P
e \<sharp> f
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, OrR2 <e>.M' f)
b \<sharp> (OrR2 <e>.M' f, N)
y \<sharp> P

goal (3 subgoals):
 1. \<And>coname1 trm coname2 a x N y b P. \<lbrakk>coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, OrR2 <coname1>.trm coname2); b \<sharp> (OrR2 <coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> OrR2 <coname1>.trm coname2{a:=x.N}{y:=<b>.P} = OrR2 <coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 3. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
e \<sharp> a
e \<sharp> x
e \<sharp> N
e \<sharp> y
e \<sharp> b
e \<sharp> P
e \<sharp> f
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, OrR2 <e>.M' f)
b \<sharp> (OrR2 <e>.M' f, N)
y \<sharp> P
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
e \<sharp> a
e \<sharp> x
e \<sharp> N
e \<sharp> y
e \<sharp> b
e \<sharp> P
e \<sharp> f
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, OrR2 <e>.M' f)
b \<sharp> (OrR2 <e>.M' f, N)
y \<sharp> P

goal (1 subgoal):
 1. OrR2 <e>.M' f{a:=x.N}{y:=<b>.P} = OrR2 <e>.M' f{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(auto simp add: subst_fresh abs_fresh fresh_atm fresh_prod forget trm.inject)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.OrR2 <e>.M'{f:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.OrR2 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
[PROOF STEP]
apply(subgoal_tac "\<exists>c'::coname. c'\<sharp>(P,b,e,f,x,N,N{y:=<b>.P},
                                        M'{f:=(x).N},M'{y:=<b>.P}{f:=(x).N{y:=<b>.P}})")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.OrR2 <e>.M'{f:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.OrR2 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
 2. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(erule exE, simp add: fresh_prod)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P \<and> c' \<sharp> b \<and> c' \<sharp> e \<and> c' \<sharp> f \<and> c' \<sharp> x \<and> c' \<sharp> N \<and> c' \<sharp> N{y:=<b>.P} \<and> c' \<sharp> M'{f:=x.N} \<and> c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.OrR2 <e>.M'{f:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.OrR2 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
 2. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(erule conjE)+
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.OrR2 <e>.M'{f:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.OrR2 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
 2. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_fun_simp_OrR2)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <c'>.OrR2 <e>.M'{f:=x.N} c' x.N{y:=<b>.P} = Cut <c'>.OrR2 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 2. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <c'>.OrR2 <e>.M'{f:=x.N} c' x.N{y:=<b>.P} = ?s45 c'
 2. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s45 c' = Cut <c'>.OrR2 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 3. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule better_Cut_substn)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> c' \<sharp> [b].P
 2. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> x \<sharp> (y, P)
 3. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if OrR2 <e>.M'{f:=x.N} c' = Ax y c' then Cut <b>.P x.N{y:=<b>.P} else Cut <c'>.OrR2 <e>.M'{f:=x.N} c'{y:=<b>.P} x.N{y:=<b>.P}) = Cut <c'>.OrR2 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 4. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: abs_fresh subst_fresh fresh_atm)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> x \<sharp> (y, P)
 2. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if OrR2 <e>.M'{f:=x.N} c' = Ax y c' then Cut <b>.P x.N{y:=<b>.P} else Cut <c'>.OrR2 <e>.M'{f:=x.N} c'{y:=<b>.P} x.N{y:=<b>.P}) = Cut <c'>.OrR2 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 3. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod subst_fresh fresh_atm abs_fresh)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if OrR2 <e>.M'{f:=x.N} c' = Ax y c' then Cut <b>.P x.N{y:=<b>.P} else Cut <c'>.OrR2 <e>.M'{f:=x.N} c'{y:=<b>.P} x.N{y:=<b>.P}) = Cut <c'>.OrR2 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 2. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <c'>.OrR2 <e>.M'{f:=x.N} c'{y:=<b>.P} x.N{y:=<b>.P} = Cut <c'>.OrR2 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 2. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: trm.inject alpha forget)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> OrR2 <e>.M'{f:=x.N} c'{y:=<b>.P} = OrR2 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c'
 2. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> OrR2 <e>.M'{f:=x.N} c'{y:=<b>.P} = ?s51 c'
 2. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s51 c' = OrR2 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c'
 3. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule substn.simps)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> e \<sharp> (b, P, c')
 2. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> OrR2 <e>.M'{f:=x.N}{y:=<b>.P} c' = OrR2 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c'
 3. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod fresh_atm subst_fresh)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>c'. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> OrR2 <e>.M'{f:=x.N}{y:=<b>.P} c' = OrR2 <e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c'
 2. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
[PROOF STEP]
apply(rule exists_fresh'(2)[OF fs_coname1])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
OrR2 <e>.M' f{a:=x.N}{y:=<b>.P} = OrR2 <e>.M' f{y:=<b>.P}{a:=x.N{y:=<b>.P}}

goal (2 subgoals):
 1. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
case (ImpR x e M' f)
[PROOF STATE]
proof (state)
this:
xa__ \<sharp> a
xa__ \<sharp> x
xa__ \<sharp> N
xa__ \<sharp> y
xa__ \<sharp> b
xa__ \<sharp> P
e \<sharp> a
e \<sharp> x
e \<sharp> N
e \<sharp> y
e \<sharp> b
e \<sharp> P
xa__ \<sharp> f
e \<sharp> f
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, ImpR xa__.<e>.M' f)
b \<sharp> (ImpR xa__.<e>.M' f, N)
y \<sharp> P

goal (2 subgoals):
 1. \<And>name coname1 trm coname2 a x N y b P. \<lbrakk>name \<sharp> a; name \<sharp> x; name \<sharp> N; name \<sharp> y; name \<sharp> b; name \<sharp> P; coname1 \<sharp> a; coname1 \<sharp> x; coname1 \<sharp> N; coname1 \<sharp> y; coname1 \<sharp> b; coname1 \<sharp> P; name \<sharp> coname2; coname1 \<sharp> coname2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm); bd \<sharp> (trm, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm{b:=ba.bb}{bc:=<bd>.be} = trm{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpR name.<coname1>.trm coname2); b \<sharp> (ImpR name.<coname1>.trm coname2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpR name.<coname1>.trm coname2{a:=x.N}{y:=<b>.P} = ImpR name.<coname1>.trm coname2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
 2. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
xa__ \<sharp> a
xa__ \<sharp> x
xa__ \<sharp> N
xa__ \<sharp> y
xa__ \<sharp> b
xa__ \<sharp> P
e \<sharp> a
e \<sharp> x
e \<sharp> N
e \<sharp> y
e \<sharp> b
e \<sharp> P
xa__ \<sharp> f
e \<sharp> f
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, ImpR xa__.<e>.M' f)
b \<sharp> (ImpR xa__.<e>.M' f, N)
y \<sharp> P
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
xa__ \<sharp> a
xa__ \<sharp> x
xa__ \<sharp> N
xa__ \<sharp> y
xa__ \<sharp> b
xa__ \<sharp> P
e \<sharp> a
e \<sharp> x
e \<sharp> N
e \<sharp> y
e \<sharp> b
e \<sharp> P
xa__ \<sharp> f
e \<sharp> f
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, ImpR xa__.<e>.M' f)
b \<sharp> (ImpR xa__.<e>.M' f, N)
y \<sharp> P

goal (1 subgoal):
 1. ImpR xa__.<e>.M' f{a:=x.N}{y:=<b>.P} = ImpR xa__.<e>.M' f{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(auto simp add: subst_fresh abs_fresh fresh_atm fresh_prod forget trm.inject)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.ImpR xa__.<e>.M'{f:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.ImpR xa__.<e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
 2. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(subgoal_tac "\<exists>c'::coname. c'\<sharp>(P,b,e,f,x,N,N{y:=<b>.P},
                                        M'{f:=(x).N},M'{y:=<b>.P}{f:=(x).N{y:=<b>.P}})")
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.ImpR xa__.<e>.M'{f:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.ImpR xa__.<e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
 2. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
 3. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(erule exE, simp add: fresh_prod)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P \<and> c' \<sharp> b \<and> c' \<sharp> e \<and> c' \<sharp> f \<and> c' \<sharp> x \<and> c' \<sharp> N \<and> c' \<sharp> N{y:=<b>.P} \<and> c' \<sharp> M'{f:=x.N} \<and> c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.ImpR xa__.<e>.M'{f:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.ImpR xa__.<e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
 2. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
 3. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(erule conjE)+
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>a'. Cut <a'>.ImpR xa__.<e>.M'{f:=x.N} a' x.N){y:=<b>.P} = fresh_fun (\<lambda>a'. Cut <a'>.ImpR xa__.<e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} a' x.N{y:=<b>.P})
 2. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
 3. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: fresh_fun_simp_ImpR)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <c'>.ImpR xa__.<e>.M'{f:=x.N} c' x.N{y:=<b>.P} = Cut <c'>.ImpR xa__.<e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 2. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
 3. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <c'>.ImpR xa__.<e>.M'{f:=x.N} c' x.N{y:=<b>.P} = ?s54 c'
 2. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s54 c' = Cut <c'>.ImpR xa__.<e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 3. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
 4. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule better_Cut_substn)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> c' \<sharp> [b].P
 2. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> x \<sharp> (y, P)
 3. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if ImpR xa__.<e>.M'{f:=x.N} c' = Ax y c' then Cut <b>.P x.N{y:=<b>.P} else Cut <c'>.ImpR xa__.<e>.M'{f:=x.N} c'{y:=<b>.P} x.N{y:=<b>.P}) = Cut <c'>.ImpR xa__.<e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 4. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
 5. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: abs_fresh subst_fresh fresh_atm)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> x \<sharp> (y, P)
 2. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if ImpR xa__.<e>.M'{f:=x.N} c' = Ax y c' then Cut <b>.P x.N{y:=<b>.P} else Cut <c'>.ImpR xa__.<e>.M'{f:=x.N} c'{y:=<b>.P} x.N{y:=<b>.P}) = Cut <c'>.ImpR xa__.<e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 3. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
 4. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: fresh_prod subst_fresh fresh_atm abs_fresh)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> (if ImpR xa__.<e>.M'{f:=x.N} c' = Ax y c' then Cut <b>.P x.N{y:=<b>.P} else Cut <c'>.ImpR xa__.<e>.M'{f:=x.N} c'{y:=<b>.P} x.N{y:=<b>.P}) = Cut <c'>.ImpR xa__.<e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 2. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
 3. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <c'>.ImpR xa__.<e>.M'{f:=x.N} c'{y:=<b>.P} x.N{y:=<b>.P} = Cut <c'>.ImpR xa__.<e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c' x.N{y:=<b>.P}
 2. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
 3. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: trm.inject alpha forget)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ImpR xa__.<e>.M'{f:=x.N} c'{y:=<b>.P} = ImpR xa__.<e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c'
 2. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
 3. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ImpR xa__.<e>.M'{f:=x.N} c'{y:=<b>.P} = ?s60 c'
 2. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s60 c' = ImpR xa__.<e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c'
 3. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
 4. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule substn.simps)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> e \<sharp> (c', b, P)
 2. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> xa__ \<sharp> (y, P)
 3. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ImpR xa__.<e>.M'{f:=x.N}{y:=<b>.P} c' = ImpR xa__.<e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c'
 4. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
 5. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: fresh_prod fresh_atm subst_fresh)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> xa__ \<sharp> (y, P)
 2. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ImpR xa__.<e>.M'{f:=x.N}{y:=<b>.P} c' = ImpR xa__.<e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c'
 3. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
 4. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: fresh_atm)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>c'. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f; c' \<sharp> P; c' \<sharp> b; c' \<sharp> e; c' \<sharp> f; c' \<sharp> x; c' \<sharp> N; c' \<sharp> N{y:=<b>.P}; c' \<sharp> M'{f:=x.N}; c' \<sharp> M'{y:=<b>.P}{f:=x.N{y:=<b>.P}}\<rbrakk> \<Longrightarrow> ImpR xa__.<e>.M'{f:=x.N}{y:=<b>.P} c' = ImpR xa__.<e>.M'{y:=<b>.P}{f:=x.N{y:=<b>.P}} c'
 2. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
 3. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: fresh_atm trm.inject alpha abs_fresh fin_supp abs_supp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; x \<noteq> y; b \<sharp> M'; f \<sharp> P; f \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a = f\<rbrakk> \<Longrightarrow> \<exists>c'. c' \<sharp> (P, b, e, f, x, N, N{y:=<b>.P}, M'{f:=x.N}, M'{y:=<b>.P}{f:=x.N{y:=<b>.P}})
 2. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(rule exists_fresh'(2)[OF fs_coname1])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>xa__ \<noteq> x; xa__ \<sharp> N; xa__ \<noteq> y; xa__ \<sharp> P; e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; e \<noteq> f; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; y \<sharp> P; a \<noteq> b; x \<noteq> y; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; x \<sharp> [xa__].[e].M'; b \<noteq> f; b \<sharp> N; a \<noteq> f\<rbrakk> \<Longrightarrow> [xa__].[e].M'{a:=x.N}{y:=<b>.P} = [xa__].[e].M'{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(simp add: fresh_atm trm.inject alpha abs_fresh fin_supp abs_supp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
ImpR xa__.<e>.M' f{a:=x.N}{y:=<b>.P} = ImpR xa__.<e>.M' f{y:=<b>.P}{a:=x.N{y:=<b>.P}}

goal (1 subgoal):
 1. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
case (ImpL e M' v M'' w)
[PROOF STATE]
proof (state)
this:
e \<sharp> a
e \<sharp> x
e \<sharp> N
e \<sharp> y
e \<sharp> b
e \<sharp> P
v \<sharp> a
v \<sharp> x
v \<sharp> N
v \<sharp> y
v \<sharp> b
v \<sharp> P
e \<sharp> M''
e \<sharp> w
v \<sharp> M'
v \<sharp> w
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M''); ?bd \<sharp> (M'', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M''{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M''{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, ImpL <e>.M' v.M'' w)
b \<sharp> (ImpL <e>.M' v.M'' w, N)
y \<sharp> P

goal (1 subgoal):
 1. \<And>coname trm1 name1 trm2 name2 a x N y b P. \<lbrakk>coname \<sharp> a; coname \<sharp> x; coname \<sharp> N; coname \<sharp> y; coname \<sharp> b; coname \<sharp> P; name1 \<sharp> a; name1 \<sharp> x; name1 \<sharp> N; name1 \<sharp> y; name1 \<sharp> b; name1 \<sharp> P; coname \<sharp> trm2; coname \<sharp> name2; name1 \<sharp> trm1; name1 \<sharp> name2; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm1); bd \<sharp> (trm1, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm1{b:=ba.bb}{bc:=<bd>.be} = trm1{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b ba bb bc bd be. \<lbrakk>b \<sharp> (bd, be, bb); ba \<sharp> (bc, be, trm2); bd \<sharp> (trm2, bb); bc \<sharp> be\<rbrakk> \<Longrightarrow> trm2{b:=ba.bb}{bc:=<bd>.be} = trm2{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; a \<sharp> (b, P, N); x \<sharp> (y, P, ImpL <coname>.trm1 name1.trm2 name2); b \<sharp> (ImpL <coname>.trm1 name1.trm2 name2, N); y \<sharp> P\<rbrakk> \<Longrightarrow> ImpL <coname>.trm1 name1.trm2 name2{a:=x.N}{y:=<b>.P} = ImpL <coname>.trm1 name1.trm2 name2{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
e \<sharp> a
e \<sharp> x
e \<sharp> N
e \<sharp> y
e \<sharp> b
e \<sharp> P
v \<sharp> a
v \<sharp> x
v \<sharp> N
v \<sharp> y
v \<sharp> b
v \<sharp> P
e \<sharp> M''
e \<sharp> w
v \<sharp> M'
v \<sharp> w
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M''); ?bd \<sharp> (M'', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M''{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M''{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, ImpL <e>.M' v.M'' w)
b \<sharp> (ImpL <e>.M' v.M'' w, N)
y \<sharp> P
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
e \<sharp> a
e \<sharp> x
e \<sharp> N
e \<sharp> y
e \<sharp> b
e \<sharp> P
v \<sharp> a
v \<sharp> x
v \<sharp> N
v \<sharp> y
v \<sharp> b
v \<sharp> P
e \<sharp> M''
e \<sharp> w
v \<sharp> M'
v \<sharp> w
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M'); ?bd \<sharp> (M', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M'{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M'{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
\<lbrakk>?b \<sharp> (?bd, ?be, ?bb); ?ba \<sharp> (?bc, ?be, M''); ?bd \<sharp> (M'', ?bb); ?bc \<sharp> ?be\<rbrakk> \<Longrightarrow> M''{?b:=?ba.?bb}{?bc:=<?bd>.?be} = M''{?bc:=<?bd>.?be}{?b:=?ba.?bb{?bc:=<?bd>.?be}}
a \<sharp> (b, P, N)
x \<sharp> (y, P, ImpL <e>.M' v.M'' w)
b \<sharp> (ImpL <e>.M' v.M'' w, N)
y \<sharp> P

goal (1 subgoal):
 1. ImpL <e>.M' v.M'' w{a:=x.N}{y:=<b>.P} = ImpL <e>.M' v.M'' w{y:=<b>.P}{a:=x.N{y:=<b>.P}}
[PROOF STEP]
apply(auto simp add: subst_fresh abs_fresh fresh_atm fresh_prod forget trm.inject)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>z'. Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z') = fresh_fun (\<lambda>z'. Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P} v.M''{w:=<b>.P} z'){a:=x.N{w:=<b>.P}}
[PROOF STEP]
apply(subgoal_tac "\<exists>z'::name. z'\<sharp>(P,b,e,w,v,N,N{y:=<b>.P},M'{w:=<b>.P},M''{w:=<b>.P},
                  M'{w:=<b>.P}{a:=(x).N{w:=<b>.P}},M''{w:=<b>.P}{a:=(x).N{w:=<b>.P}})")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>z'. Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z') = fresh_fun (\<lambda>z'. Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P} v.M''{w:=<b>.P} z'){a:=x.N{w:=<b>.P}}
 2. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})
[PROOF STEP]
apply(erule exE, simp add: fresh_prod)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P \<and> z' \<sharp> b \<and> z' \<sharp> e \<and> z' \<sharp> w \<and> z' \<sharp> v \<and> z' \<sharp> N \<and> z' \<sharp> N{w:=<b>.P} \<and> z' \<sharp> M'{w:=<b>.P} \<and> z' \<sharp> M''{w:=<b>.P} \<and> z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} \<and> z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>z'. Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z') = fresh_fun (\<lambda>z'. Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P} v.M''{w:=<b>.P} z'){a:=x.N{w:=<b>.P}}
 2. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})
[PROOF STEP]
apply(erule conjE)+
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> fresh_fun (\<lambda>z'. Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z') = fresh_fun (\<lambda>z'. Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P} v.M''{w:=<b>.P} z'){a:=x.N{w:=<b>.P}}
 2. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_fun_simp_ImpL)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z' = Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P} v.M''{w:=<b>.P} z'{a:=x.N{w:=<b>.P}}
 2. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})
[PROOF STEP]
apply(rule sym)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P} v.M''{w:=<b>.P} z'{a:=x.N{w:=<b>.P}} = Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z'
 2. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P} v.M''{w:=<b>.P} z'{a:=x.N{w:=<b>.P}} = ?s64 z'
 2. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s64 z' = Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z'
 3. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})
[PROOF STEP]
apply(rule better_Cut_substc)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> b \<sharp> (a, N{w:=<b>.P})
 2. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> z' \<sharp> [x].N{w:=<b>.P}
 3. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> (if ImpL <e>.M'{w:=<b>.P} v.M''{w:=<b>.P} z' = Ax z' a then Cut <b>.P{a:=x.N{w:=<b>.P}} x.N{w:=<b>.P} else Cut <b>.P{a:=x.N{w:=<b>.P}} z'.ImpL <e>.M'{w:=<b>.P} v.M''{w:=<b>.P} z'{a:=x.N{w:=<b>.P}}) = Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z'
 4. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})
[PROOF STEP]
apply(simp add: abs_fresh subst_fresh fresh_atm)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> z' \<sharp> [x].N{w:=<b>.P}
 2. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> (if ImpL <e>.M'{w:=<b>.P} v.M''{w:=<b>.P} z' = Ax z' a then Cut <b>.P{a:=x.N{w:=<b>.P}} x.N{w:=<b>.P} else Cut <b>.P{a:=x.N{w:=<b>.P}} z'.ImpL <e>.M'{w:=<b>.P} v.M''{w:=<b>.P} z'{a:=x.N{w:=<b>.P}}) = Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z'
 3. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod subst_fresh fresh_atm abs_fresh)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> (if ImpL <e>.M'{w:=<b>.P} v.M''{w:=<b>.P} z' = Ax z' a then Cut <b>.P{a:=x.N{w:=<b>.P}} x.N{w:=<b>.P} else Cut <b>.P{a:=x.N{w:=<b>.P}} z'.ImpL <e>.M'{w:=<b>.P} v.M''{w:=<b>.P} z'{a:=x.N{w:=<b>.P}}) = Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z'
 2. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> Cut <b>.P{a:=x.N{w:=<b>.P}} z'.ImpL <e>.M'{w:=<b>.P} v.M''{w:=<b>.P} z'{a:=x.N{w:=<b>.P}} = Cut <b>.P z'.ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z'
 2. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})
[PROOF STEP]
apply(simp add: trm.inject alpha forget)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> ImpL <e>.M'{w:=<b>.P} v.M''{w:=<b>.P} z'{a:=x.N{w:=<b>.P}} = ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z'
 2. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})
[PROOF STEP]
apply(rule trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> ImpL <e>.M'{w:=<b>.P} v.M''{w:=<b>.P} z'{a:=x.N{w:=<b>.P}} = ?s70 z'
 2. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> ?s70 z' = ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z'
 3. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})
[PROOF STEP]
apply(rule substc.simps)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> e \<sharp> (M''{w:=<b>.P}, a, N{w:=<b>.P})
 2. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> v \<sharp> (z', x, N{w:=<b>.P}, M'{w:=<b>.P})
 3. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z' = ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z'
 4. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_prod fresh_atm subst_fresh)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> v \<sharp> (z', x, N{w:=<b>.P}, M'{w:=<b>.P})
 2. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z' = ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z'
 3. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_atm subst_fresh)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>z'. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w; z' \<sharp> P; z' \<sharp> b; z' \<sharp> e; z' \<sharp> w; z' \<sharp> v; z' \<sharp> N; z' \<sharp> N{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}; z' \<sharp> M''{w:=<b>.P}; z' \<sharp> M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}; z' \<sharp> M''{w:=<b>.P}{a:=x.N{w:=<b>.P}}\<rbrakk> \<Longrightarrow> ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z' = ImpL <e>.M'{w:=<b>.P}{a:=x.N{w:=<b>.P}} v.M''{w:=<b>.P}{a:=x.N{w:=<b>.P}} z'
 2. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})
[PROOF STEP]
apply(simp add: fresh_atm)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>e \<noteq> a; e \<sharp> N; e \<noteq> b; e \<sharp> P; v \<noteq> x; v \<sharp> N; v \<sharp> P; e \<sharp> M''; v \<sharp> M'; v \<noteq> w; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M'; bd \<sharp> M' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M'{b:=ba.bb}{bc:=<bd>.be} = M'{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; \<And>b bd be bb ba bc. \<lbrakk>b \<noteq> bd \<and> b \<sharp> be \<and> b \<sharp> bb; ba \<noteq> bc \<and> ba \<sharp> be \<and> ba \<sharp> M''; bd \<sharp> M'' \<and> bd \<sharp> bb; bc \<sharp> be\<rbrakk> \<Longrightarrow> M''{b:=ba.bb}{bc:=<bd>.be} = M''{bc:=<bd>.be}{b:=ba.bb{bc:=<bd>.be}}; w \<sharp> P; a \<noteq> b; b \<sharp> M'; a \<sharp> P; a \<sharp> N; x \<sharp> P; b \<sharp> M''; b \<sharp> N; x \<sharp> M'; x \<sharp> M''; x \<noteq> w; y = w\<rbrakk> \<Longrightarrow> \<exists>z'. z' \<sharp> (P, b, e, w, v, N, N{y:=<b>.P}, M'{w:=<b>.P}, M''{w:=<b>.P}, M'{w:=<b>.P}{a:=x.N{w:=<b>.P}}, M''{w:=<b>.P}{a:=x.N{w:=<b>.P}})
[PROOF STEP]
apply(rule exists_fresh'(1)[OF fs_name1])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
ImpL <e>.M' v.M'' w{a:=x.N}{y:=<b>.P} = ImpL <e>.M' v.M'' w{y:=<b>.P}{a:=x.N{y:=<b>.P}}

goal:
No subgoals!
[PROOF STEP]
qed