eliminated slightly odd identifiers;
authorwenzelm
Wed Nov 28 15:59:18 2012 +0100 (2012-11-28)
changeset 502524aa34bd43228
parent 50251 227477f17c26
child 50253 41fd9f68614b
eliminated slightly odd identifiers;
src/HOL/Decision_Procs/Cooper.thy
src/HOL/Decision_Procs/MIR.thy
src/HOL/Matrix_LP/LP.thy
src/HOL/Multivariate_Analysis/Finite_Cartesian_Product.thy
src/HOL/Multivariate_Analysis/Integration.thy
src/HOL/Nominal/Examples/Class3.thy
src/HOL/Nominal/Examples/Fsub.thy
src/HOL/Probability/Infinite_Product_Measure.thy
src/HOL/Probability/Lebesgue_Integration.thy
src/HOL/Probability/Projective_Family.thy
src/HOL/Probability/Projective_Limit.thy
src/HOL/Probability/Sigma_Algebra.thy
     1.1 --- a/src/HOL/Decision_Procs/Cooper.thy	Wed Nov 28 15:38:12 2012 +0100
     1.2 +++ b/src/HOL/Decision_Procs/Cooper.thy	Wed Nov 28 15:59:18 2012 +0100
     1.3 @@ -1004,7 +1004,7 @@
     1.4    plusinf:: "fm \<Rightarrow> fm" (* Virtual substitution of +\<infinity>*)
     1.5    minusinf:: "fm \<Rightarrow> fm" (* Virtual substitution of -\<infinity>*)
     1.6    \<delta> :: "fm \<Rightarrow> int" (* Compute lcm {d| N\<^isup>? Dvd c*x+t \<in> p}*)
     1.7 -  d\<delta> :: "fm \<Rightarrow> int \<Rightarrow> bool" (* checks if a given l divides all the ds above*)
     1.8 +  d_\<delta> :: "fm \<Rightarrow> int \<Rightarrow> bool" (* checks if a given l divides all the ds above*)
     1.9  
    1.10  recdef minusinf "measure size"
    1.11    "minusinf (And p q) = And (minusinf p) (minusinf q)" 
    1.12 @@ -1038,18 +1038,18 @@
    1.13    "\<delta> (NDvd i (CN 0 c e)) = i"
    1.14    "\<delta> p = 1"
    1.15  
    1.16 -recdef d\<delta> "measure size"
    1.17 -  "d\<delta> (And p q) = (\<lambda> d. d\<delta> p d \<and> d\<delta> q d)" 
    1.18 -  "d\<delta> (Or p q) = (\<lambda> d. d\<delta> p d \<and> d\<delta> q d)" 
    1.19 -  "d\<delta> (Dvd i (CN 0 c e)) = (\<lambda> d. i dvd d)"
    1.20 -  "d\<delta> (NDvd i (CN 0 c e)) = (\<lambda> d. i dvd d)"
    1.21 -  "d\<delta> p = (\<lambda> d. True)"
    1.22 +recdef d_\<delta> "measure size"
    1.23 +  "d_\<delta> (And p q) = (\<lambda> d. d_\<delta> p d \<and> d_\<delta> q d)" 
    1.24 +  "d_\<delta> (Or p q) = (\<lambda> d. d_\<delta> p d \<and> d_\<delta> q d)" 
    1.25 +  "d_\<delta> (Dvd i (CN 0 c e)) = (\<lambda> d. i dvd d)"
    1.26 +  "d_\<delta> (NDvd i (CN 0 c e)) = (\<lambda> d. i dvd d)"
    1.27 +  "d_\<delta> p = (\<lambda> d. True)"
    1.28  
    1.29  lemma delta_mono: 
    1.30    assumes lin: "iszlfm p"
    1.31    and d: "d dvd d'"
    1.32 -  and ad: "d\<delta> p d"
    1.33 -  shows "d\<delta> p d'"
    1.34 +  and ad: "d_\<delta> p d"
    1.35 +  shows "d_\<delta> p d'"
    1.36    using lin ad d
    1.37  proof(induct p rule: iszlfm.induct)
    1.38    case (9 i c e)  thus ?case using d
    1.39 @@ -1060,61 +1060,61 @@
    1.40  qed simp_all
    1.41  
    1.42  lemma \<delta> : assumes lin:"iszlfm p"
    1.43 -  shows "d\<delta> p (\<delta> p) \<and> \<delta> p >0"
    1.44 +  shows "d_\<delta> p (\<delta> p) \<and> \<delta> p >0"
    1.45  using lin
    1.46  proof (induct p rule: iszlfm.induct)
    1.47    case (1 p q) 
    1.48    let ?d = "\<delta> (And p q)"
    1.49    from 1 lcm_pos_int have dp: "?d >0" by simp
    1.50    have d1: "\<delta> p dvd \<delta> (And p q)" using 1 by simp
    1.51 -  hence th: "d\<delta> p ?d" using delta_mono 1(2,3) by(simp only: iszlfm.simps)
    1.52 +  hence th: "d_\<delta> p ?d" using delta_mono 1(2,3) by(simp only: iszlfm.simps)
    1.53    have "\<delta> q dvd \<delta> (And p q)" using 1 by simp
    1.54 -  hence th': "d\<delta> q ?d" using delta_mono 1 by(simp only: iszlfm.simps)
    1.55 +  hence th': "d_\<delta> q ?d" using delta_mono 1 by(simp only: iszlfm.simps)
    1.56    from th th' dp show ?case by simp
    1.57  next
    1.58    case (2 p q)  
    1.59    let ?d = "\<delta> (And p q)"
    1.60    from 2 lcm_pos_int have dp: "?d >0" by simp
    1.61    have "\<delta> p dvd \<delta> (And p q)" using 2 by simp
    1.62 -  hence th: "d\<delta> p ?d" using delta_mono 2 by(simp only: iszlfm.simps)
    1.63 +  hence th: "d_\<delta> p ?d" using delta_mono 2 by(simp only: iszlfm.simps)
    1.64    have "\<delta> q dvd \<delta> (And p q)" using 2 by simp
    1.65 -  hence th': "d\<delta> q ?d" using delta_mono 2 by(simp only: iszlfm.simps)
    1.66 +  hence th': "d_\<delta> q ?d" using delta_mono 2 by(simp only: iszlfm.simps)
    1.67    from th th' dp show ?case by simp
    1.68  qed simp_all
    1.69  
    1.70  
    1.71  consts 
    1.72 -  a\<beta> :: "fm \<Rightarrow> int \<Rightarrow> fm" (* adjusts the coeffitients of a formula *)
    1.73 -  d\<beta> :: "fm \<Rightarrow> int \<Rightarrow> bool" (* tests if all coeffs c of c divide a given l*)
    1.74 +  a_\<beta> :: "fm \<Rightarrow> int \<Rightarrow> fm" (* adjusts the coeffitients of a formula *)
    1.75 +  d_\<beta> :: "fm \<Rightarrow> int \<Rightarrow> bool" (* tests if all coeffs c of c divide a given l*)
    1.76    \<zeta>  :: "fm \<Rightarrow> int" (* computes the lcm of all coefficients of x*)
    1.77    \<beta> :: "fm \<Rightarrow> num list"
    1.78    \<alpha> :: "fm \<Rightarrow> num list"
    1.79  
    1.80 -recdef a\<beta> "measure size"
    1.81 -  "a\<beta> (And p q) = (\<lambda> k. And (a\<beta> p k) (a\<beta> q k))" 
    1.82 -  "a\<beta> (Or p q) = (\<lambda> k. Or (a\<beta> p k) (a\<beta> q k))" 
    1.83 -  "a\<beta> (Eq  (CN 0 c e)) = (\<lambda> k. Eq (CN 0 1 (Mul (k div c) e)))"
    1.84 -  "a\<beta> (NEq (CN 0 c e)) = (\<lambda> k. NEq (CN 0 1 (Mul (k div c) e)))"
    1.85 -  "a\<beta> (Lt  (CN 0 c e)) = (\<lambda> k. Lt (CN 0 1 (Mul (k div c) e)))"
    1.86 -  "a\<beta> (Le  (CN 0 c e)) = (\<lambda> k. Le (CN 0 1 (Mul (k div c) e)))"
    1.87 -  "a\<beta> (Gt  (CN 0 c e)) = (\<lambda> k. Gt (CN 0 1 (Mul (k div c) e)))"
    1.88 -  "a\<beta> (Ge  (CN 0 c e)) = (\<lambda> k. Ge (CN 0 1 (Mul (k div c) e)))"
    1.89 -  "a\<beta> (Dvd i (CN 0 c e)) =(\<lambda> k. Dvd ((k div c)*i) (CN 0 1 (Mul (k div c) e)))"
    1.90 -  "a\<beta> (NDvd i (CN 0 c e))=(\<lambda> k. NDvd ((k div c)*i) (CN 0 1 (Mul (k div c) e)))"
    1.91 -  "a\<beta> p = (\<lambda> k. p)"
    1.92 +recdef a_\<beta> "measure size"
    1.93 +  "a_\<beta> (And p q) = (\<lambda> k. And (a_\<beta> p k) (a_\<beta> q k))" 
    1.94 +  "a_\<beta> (Or p q) = (\<lambda> k. Or (a_\<beta> p k) (a_\<beta> q k))" 
    1.95 +  "a_\<beta> (Eq  (CN 0 c e)) = (\<lambda> k. Eq (CN 0 1 (Mul (k div c) e)))"
    1.96 +  "a_\<beta> (NEq (CN 0 c e)) = (\<lambda> k. NEq (CN 0 1 (Mul (k div c) e)))"
    1.97 +  "a_\<beta> (Lt  (CN 0 c e)) = (\<lambda> k. Lt (CN 0 1 (Mul (k div c) e)))"
    1.98 +  "a_\<beta> (Le  (CN 0 c e)) = (\<lambda> k. Le (CN 0 1 (Mul (k div c) e)))"
    1.99 +  "a_\<beta> (Gt  (CN 0 c e)) = (\<lambda> k. Gt (CN 0 1 (Mul (k div c) e)))"
   1.100 +  "a_\<beta> (Ge  (CN 0 c e)) = (\<lambda> k. Ge (CN 0 1 (Mul (k div c) e)))"
   1.101 +  "a_\<beta> (Dvd i (CN 0 c e)) =(\<lambda> k. Dvd ((k div c)*i) (CN 0 1 (Mul (k div c) e)))"
   1.102 +  "a_\<beta> (NDvd i (CN 0 c e))=(\<lambda> k. NDvd ((k div c)*i) (CN 0 1 (Mul (k div c) e)))"
   1.103 +  "a_\<beta> p = (\<lambda> k. p)"
   1.104  
   1.105 -recdef d\<beta> "measure size"
   1.106 -  "d\<beta> (And p q) = (\<lambda> k. (d\<beta> p k) \<and> (d\<beta> q k))" 
   1.107 -  "d\<beta> (Or p q) = (\<lambda> k. (d\<beta> p k) \<and> (d\<beta> q k))" 
   1.108 -  "d\<beta> (Eq  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   1.109 -  "d\<beta> (NEq (CN 0 c e)) = (\<lambda> k. c dvd k)"
   1.110 -  "d\<beta> (Lt  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   1.111 -  "d\<beta> (Le  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   1.112 -  "d\<beta> (Gt  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   1.113 -  "d\<beta> (Ge  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   1.114 -  "d\<beta> (Dvd i (CN 0 c e)) =(\<lambda> k. c dvd k)"
   1.115 -  "d\<beta> (NDvd i (CN 0 c e))=(\<lambda> k. c dvd k)"
   1.116 -  "d\<beta> p = (\<lambda> k. True)"
   1.117 +recdef d_\<beta> "measure size"
   1.118 +  "d_\<beta> (And p q) = (\<lambda> k. (d_\<beta> p k) \<and> (d_\<beta> q k))" 
   1.119 +  "d_\<beta> (Or p q) = (\<lambda> k. (d_\<beta> p k) \<and> (d_\<beta> q k))" 
   1.120 +  "d_\<beta> (Eq  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   1.121 +  "d_\<beta> (NEq (CN 0 c e)) = (\<lambda> k. c dvd k)"
   1.122 +  "d_\<beta> (Lt  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   1.123 +  "d_\<beta> (Le  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   1.124 +  "d_\<beta> (Gt  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   1.125 +  "d_\<beta> (Ge  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   1.126 +  "d_\<beta> (Dvd i (CN 0 c e)) =(\<lambda> k. c dvd k)"
   1.127 +  "d_\<beta> (NDvd i (CN 0 c e))=(\<lambda> k. c dvd k)"
   1.128 +  "d_\<beta> p = (\<lambda> k. True)"
   1.129  
   1.130  recdef \<zeta> "measure size"
   1.131    "\<zeta> (And p q) = lcm (\<zeta> p) (\<zeta> q)" 
   1.132 @@ -1169,7 +1169,7 @@
   1.133  
   1.134  lemma minusinf_inf:
   1.135    assumes linp: "iszlfm p"
   1.136 -  and u: "d\<beta> p 1"
   1.137 +  and u: "d_\<beta> p 1"
   1.138    shows "\<exists> (z::int). \<forall> x < z. Ifm bbs (x#bs) (minusinf p) = Ifm bbs (x#bs) p"
   1.139    (is "?P p" is "\<exists> (z::int). \<forall> x < z. ?I x (?M p) = ?I x p")
   1.140  using linp u
   1.141 @@ -1242,7 +1242,7 @@
   1.142  qed auto
   1.143  
   1.144  lemma minusinf_repeats:
   1.145 -  assumes d: "d\<delta> p d" and linp: "iszlfm p"
   1.146 +  assumes d: "d_\<delta> p d" and linp: "iszlfm p"
   1.147    shows "Ifm bbs ((x - k*d)#bs) (minusinf p) = Ifm bbs (x #bs) (minusinf p)"
   1.148  using linp d
   1.149  proof(induct p rule: iszlfm.induct) 
   1.150 @@ -1301,7 +1301,7 @@
   1.151      qed
   1.152  qed (auto simp add: gr0_conv_Suc numbound0_I[where bs="bs" and b="x - k*d" and b'="x"])
   1.153  
   1.154 -lemma mirror\<alpha>\<beta>:
   1.155 +lemma mirror_\<alpha>_\<beta>:
   1.156    assumes lp: "iszlfm p"
   1.157    shows "(Inum (i#bs)) ` set (\<alpha> p) = (Inum (i#bs)) ` set (\<beta> (mirror p))"
   1.158  using lp
   1.159 @@ -1337,8 +1337,8 @@
   1.160    finally show ?case by simp
   1.161  qed (auto simp add: numbound0_I[where bs="bs" and b="x" and b'="- x"] gr0_conv_Suc)
   1.162  
   1.163 -lemma mirror_l: "iszlfm p \<and> d\<beta> p 1 
   1.164 -  \<Longrightarrow> iszlfm (mirror p) \<and> d\<beta> (mirror p) 1"
   1.165 +lemma mirror_l: "iszlfm p \<and> d_\<beta> p 1 
   1.166 +  \<Longrightarrow> iszlfm (mirror p) \<and> d_\<beta> (mirror p) 1"
   1.167    by (induct p rule: mirror.induct) auto
   1.168  
   1.169  lemma mirror_\<delta>: "iszlfm p \<Longrightarrow> \<delta> (mirror p) = \<delta> p"
   1.170 @@ -1348,11 +1348,11 @@
   1.171    shows "\<forall> b\<in> set (\<beta> p). numbound0 b"
   1.172    using lp by (induct p rule: \<beta>.induct) auto
   1.173  
   1.174 -lemma d\<beta>_mono: 
   1.175 +lemma d_\<beta>_mono: 
   1.176    assumes linp: "iszlfm p"
   1.177 -  and dr: "d\<beta> p l"
   1.178 +  and dr: "d_\<beta> p l"
   1.179    and d: "l dvd l'"
   1.180 -  shows "d\<beta> p l'"
   1.181 +  shows "d_\<beta> p l'"
   1.182  using dr linp dvd_trans[of _ "l" "l'", simplified d]
   1.183    by (induct p rule: iszlfm.induct) simp_all
   1.184  
   1.185 @@ -1363,26 +1363,26 @@
   1.186  
   1.187  lemma \<zeta>: 
   1.188    assumes linp: "iszlfm p"
   1.189 -  shows "\<zeta> p > 0 \<and> d\<beta> p (\<zeta> p)"
   1.190 +  shows "\<zeta> p > 0 \<and> d_\<beta> p (\<zeta> p)"
   1.191  using linp
   1.192  proof(induct p rule: iszlfm.induct)
   1.193    case (1 p q)
   1.194    from 1 have dl1: "\<zeta> p dvd lcm (\<zeta> p) (\<zeta> q)" by simp
   1.195    from 1 have dl2: "\<zeta> q dvd lcm (\<zeta> p) (\<zeta> q)" by simp
   1.196 -  from 1 d\<beta>_mono[where p = "p" and l="\<zeta> p" and l'="lcm (\<zeta> p) (\<zeta> q)"] 
   1.197 -    d\<beta>_mono[where p = "q" and l="\<zeta> q" and l'="lcm (\<zeta> p) (\<zeta> q)"] 
   1.198 +  from 1 d_\<beta>_mono[where p = "p" and l="\<zeta> p" and l'="lcm (\<zeta> p) (\<zeta> q)"] 
   1.199 +    d_\<beta>_mono[where p = "q" and l="\<zeta> q" and l'="lcm (\<zeta> p) (\<zeta> q)"] 
   1.200      dl1 dl2 show ?case by (auto simp add: lcm_pos_int)
   1.201  next
   1.202    case (2 p q)
   1.203    from 2 have dl1: "\<zeta> p dvd lcm (\<zeta> p) (\<zeta> q)" by simp
   1.204    from 2 have dl2: "\<zeta> q dvd lcm (\<zeta> p) (\<zeta> q)" by simp
   1.205 -  from 2 d\<beta>_mono[where p = "p" and l="\<zeta> p" and l'="lcm (\<zeta> p) (\<zeta> q)"] 
   1.206 -    d\<beta>_mono[where p = "q" and l="\<zeta> q" and l'="lcm (\<zeta> p) (\<zeta> q)"] 
   1.207 +  from 2 d_\<beta>_mono[where p = "p" and l="\<zeta> p" and l'="lcm (\<zeta> p) (\<zeta> q)"] 
   1.208 +    d_\<beta>_mono[where p = "q" and l="\<zeta> q" and l'="lcm (\<zeta> p) (\<zeta> q)"] 
   1.209      dl1 dl2 show ?case by (auto simp add: lcm_pos_int)
   1.210  qed (auto simp add: lcm_pos_int)
   1.211  
   1.212 -lemma a\<beta>: assumes linp: "iszlfm p" and d: "d\<beta> p l" and lp: "l > 0"
   1.213 -  shows "iszlfm (a\<beta> p l) \<and> d\<beta> (a\<beta> p l) 1 \<and> (Ifm bbs (l*x #bs) (a\<beta> p l) = Ifm bbs (x#bs) p)"
   1.214 +lemma a_\<beta>: assumes linp: "iszlfm p" and d: "d_\<beta> p l" and lp: "l > 0"
   1.215 +  shows "iszlfm (a_\<beta> p l) \<and> d_\<beta> (a_\<beta> p l) 1 \<and> (Ifm bbs (l*x #bs) (a_\<beta> p l) = Ifm bbs (x#bs) p)"
   1.216  using linp d
   1.217  proof (induct p rule: iszlfm.induct)
   1.218    case (5 c e) hence cp: "c>0" and be: "numbound0 e" and d': "c dvd l" by simp+
   1.219 @@ -1530,20 +1530,20 @@
   1.220    finally show ?case using numbound0_I[OF be,where b="(l * x)" and b'="x" and bs="bs"] be  mult_strict_mono[OF ldcp jp ldcp ] by (simp add: dvd_def)
   1.221  qed (auto simp add: gr0_conv_Suc numbound0_I[where bs="bs" and b="(l * x)" and b'="x"])
   1.222  
   1.223 -lemma a\<beta>_ex: assumes linp: "iszlfm p" and d: "d\<beta> p l" and lp: "l>0"
   1.224 -  shows "(\<exists> x. l dvd x \<and> Ifm bbs (x #bs) (a\<beta> p l)) = (\<exists> (x::int). Ifm bbs (x#bs) p)"
   1.225 +lemma a_\<beta>_ex: assumes linp: "iszlfm p" and d: "d_\<beta> p l" and lp: "l>0"
   1.226 +  shows "(\<exists> x. l dvd x \<and> Ifm bbs (x #bs) (a_\<beta> p l)) = (\<exists> (x::int). Ifm bbs (x#bs) p)"
   1.227    (is "(\<exists> x. l dvd x \<and> ?P x) = (\<exists> x. ?P' x)")
   1.228  proof-
   1.229    have "(\<exists> x. l dvd x \<and> ?P x) = (\<exists> (x::int). ?P (l*x))"
   1.230      using unity_coeff_ex[where l="l" and P="?P", simplified] by simp
   1.231 -  also have "\<dots> = (\<exists> (x::int). ?P' x)" using a\<beta>[OF linp d lp] by simp
   1.232 +  also have "\<dots> = (\<exists> (x::int). ?P' x)" using a_\<beta>[OF linp d lp] by simp
   1.233    finally show ?thesis  . 
   1.234  qed
   1.235  
   1.236  lemma \<beta>:
   1.237    assumes lp: "iszlfm p"
   1.238 -  and u: "d\<beta> p 1"
   1.239 -  and d: "d\<delta> p d"
   1.240 +  and u: "d_\<beta> p 1"
   1.241 +  and d: "d_\<delta> p d"
   1.242    and dp: "d > 0"
   1.243    and nob: "\<not>(\<exists>(j::int) \<in> {1 .. d}. \<exists> b\<in> (Inum (a#bs)) ` set(\<beta> p). x = b + j)"
   1.244    and p: "Ifm bbs (x#bs) p" (is "?P x")
   1.245 @@ -1637,8 +1637,8 @@
   1.246  
   1.247  lemma \<beta>':   
   1.248    assumes lp: "iszlfm p"
   1.249 -  and u: "d\<beta> p 1"
   1.250 -  and d: "d\<delta> p d"
   1.251 +  and u: "d_\<beta> p 1"
   1.252 +  and d: "d_\<delta> p d"
   1.253    and dp: "d > 0"
   1.254    shows "\<forall> x. \<not>(\<exists>(j::int) \<in> {1 .. d}. \<exists> b\<in> set(\<beta> p). Ifm bbs ((Inum (a#bs) b + j) #bs) p) \<longrightarrow> Ifm bbs (x#bs) p \<longrightarrow> Ifm bbs ((x - d)#bs) p" (is "\<forall> x. ?b \<longrightarrow> ?P x \<longrightarrow> ?P (x - d)")
   1.255  proof(clarify)
   1.256 @@ -1672,8 +1672,8 @@
   1.257  
   1.258  theorem cp_thm:
   1.259    assumes lp: "iszlfm p"
   1.260 -  and u: "d\<beta> p 1"
   1.261 -  and d: "d\<delta> p d"
   1.262 +  and u: "d_\<beta> p 1"
   1.263 +  and d: "d_\<delta> p d"
   1.264    and dp: "d > 0"
   1.265    shows "(\<exists> (x::int). Ifm bbs (x #bs) p) = (\<exists> j\<in> {1.. d}. Ifm bbs (j #bs) (minusinf p) \<or> (\<exists> b \<in> set (\<beta> p). Ifm bbs ((Inum (i#bs) b + j) #bs) p))"
   1.266    (is "(\<exists> (x::int). ?P (x)) = (\<exists> j\<in> ?D. ?M j \<or> (\<exists> b\<in> ?B. ?P (?I b + j)))")
   1.267 @@ -1706,27 +1706,27 @@
   1.268  
   1.269  lemma cp_thm': 
   1.270    assumes lp: "iszlfm p"
   1.271 -  and up: "d\<beta> p 1" and dd: "d\<delta> p d" and dp: "d > 0"
   1.272 +  and up: "d_\<beta> p 1" and dd: "d_\<delta> p d" and dp: "d > 0"
   1.273    shows "(\<exists> x. Ifm bbs (x#bs) p) = ((\<exists> j\<in> {1 .. d}. Ifm bbs (j#bs) (minusinf p)) \<or> (\<exists> j\<in> {1.. d}. \<exists> b\<in> (Inum (i#bs)) ` set (\<beta> p). Ifm bbs ((b+j)#bs) p))"
   1.274    using cp_thm[OF lp up dd dp,where i="i"] by auto
   1.275  
   1.276  definition unit :: "fm \<Rightarrow> fm \<times> num list \<times> int" where
   1.277 -  "unit p \<equiv> (let p' = zlfm p ; l = \<zeta> p' ; q = And (Dvd l (CN 0 1 (C 0))) (a\<beta> p' l); d = \<delta> q;
   1.278 +  "unit p \<equiv> (let p' = zlfm p ; l = \<zeta> p' ; q = And (Dvd l (CN 0 1 (C 0))) (a_\<beta> p' l); d = \<delta> q;
   1.279               B = remdups (map simpnum (\<beta> q)) ; a = remdups (map simpnum (\<alpha> q))
   1.280               in if length B \<le> length a then (q,B,d) else (mirror q, a,d))"
   1.281  
   1.282  lemma unit: assumes qf: "qfree p"
   1.283 -  shows "\<And> q B d. unit p = (q,B,d) \<Longrightarrow> ((\<exists> x. Ifm bbs (x#bs) p) = (\<exists> x. Ifm bbs (x#bs) q)) \<and> (Inum (i#bs)) ` set B = (Inum (i#bs)) ` set (\<beta> q) \<and> d\<beta> q 1 \<and> d\<delta> q d \<and> d >0 \<and> iszlfm q \<and> (\<forall> b\<in> set B. numbound0 b)"
   1.284 +  shows "\<And> q B d. unit p = (q,B,d) \<Longrightarrow> ((\<exists> x. Ifm bbs (x#bs) p) = (\<exists> x. Ifm bbs (x#bs) q)) \<and> (Inum (i#bs)) ` set B = (Inum (i#bs)) ` set (\<beta> q) \<and> d_\<beta> q 1 \<and> d_\<delta> q d \<and> d >0 \<and> iszlfm q \<and> (\<forall> b\<in> set B. numbound0 b)"
   1.285  proof-
   1.286    fix q B d 
   1.287    assume qBd: "unit p = (q,B,d)"
   1.288    let ?thes = "((\<exists> x. Ifm bbs (x#bs) p) = (\<exists> x. Ifm bbs (x#bs) q)) \<and>
   1.289      Inum (i#bs) ` set B = Inum (i#bs) ` set (\<beta> q) \<and>
   1.290 -    d\<beta> q 1 \<and> d\<delta> q d \<and> 0 < d \<and> iszlfm q \<and> (\<forall> b\<in> set B. numbound0 b)"
   1.291 +    d_\<beta> q 1 \<and> d_\<delta> q d \<and> 0 < d \<and> iszlfm q \<and> (\<forall> b\<in> set B. numbound0 b)"
   1.292    let ?I = "\<lambda> x p. Ifm bbs (x#bs) p"
   1.293    let ?p' = "zlfm p"
   1.294    let ?l = "\<zeta> ?p'"
   1.295 -  let ?q = "And (Dvd ?l (CN 0 1 (C 0))) (a\<beta> ?p' ?l)"
   1.296 +  let ?q = "And (Dvd ?l (CN 0 1 (C 0))) (a_\<beta> ?p' ?l)"
   1.297    let ?d = "\<delta> ?q"
   1.298    let ?B = "set (\<beta> ?q)"
   1.299    let ?B'= "remdups (map simpnum (\<beta> ?q))"
   1.300 @@ -1736,11 +1736,11 @@
   1.301    have pp': "\<forall> i. ?I i ?p' = ?I i p" by auto
   1.302    from conjunct2[OF zlfm_I[OF qf, where bs="bs" and i="i"]]
   1.303    have lp': "iszlfm ?p'" . 
   1.304 -  from lp' \<zeta>[where p="?p'"] have lp: "?l >0" and dl: "d\<beta> ?p' ?l" by auto
   1.305 -  from a\<beta>_ex[where p="?p'" and l="?l" and bs="bs", OF lp' dl lp] pp'
   1.306 +  from lp' \<zeta>[where p="?p'"] have lp: "?l >0" and dl: "d_\<beta> ?p' ?l" by auto
   1.307 +  from a_\<beta>_ex[where p="?p'" and l="?l" and bs="bs", OF lp' dl lp] pp'
   1.308    have pq_ex:"(\<exists> (x::int). ?I x p) = (\<exists> x. ?I x ?q)" by simp 
   1.309 -  from lp' lp a\<beta>[OF lp' dl lp] have lq:"iszlfm ?q" and uq: "d\<beta> ?q 1"  by auto
   1.310 -  from \<delta>[OF lq] have dp:"?d >0" and dd: "d\<delta> ?q ?d" by blast+
   1.311 +  from lp' lp a_\<beta>[OF lp' dl lp] have lq:"iszlfm ?q" and uq: "d_\<beta> ?q 1"  by auto
   1.312 +  from \<delta>[OF lq] have dp:"?d >0" and dd: "d_\<delta> ?q ?d" by blast+
   1.313    let ?N = "\<lambda> t. Inum (i#bs) t"
   1.314    have "?N ` set ?B' = ((?N o simpnum) ` ?B)" by auto 
   1.315    also have "\<dots> = ?N ` ?B" using simpnum_ci[where bs="i#bs"] by auto
   1.316 @@ -1762,13 +1762,13 @@
   1.317    {assume "\<not> (length ?B' \<le> length ?A')"
   1.318      hence q:"q=mirror ?q" and "B = ?A'" and d:"d = ?d"
   1.319        using qBd by (auto simp add: Let_def unit_def)
   1.320 -    with AA' mirror\<alpha>\<beta>[OF lq] A_nb have b:"?N ` (set B) = ?N ` set (\<beta> q)" 
   1.321 +    with AA' mirror_\<alpha>_\<beta>[OF lq] A_nb have b:"?N ` (set B) = ?N ` set (\<beta> q)" 
   1.322        and bn: "\<forall>b\<in> set B. numbound0 b" by simp+
   1.323      from mirror_ex[OF lq] pq_ex q 
   1.324      have pqm_eq:"(\<exists> (x::int). ?I x p) = (\<exists> (x::int). ?I x q)" by simp
   1.325      from lq uq q mirror_l[where p="?q"]
   1.326 -    have lq': "iszlfm q" and uq: "d\<beta> q 1" by auto
   1.327 -    from \<delta>[OF lq'] mirror_\<delta>[OF lq] q d have dq:"d\<delta> q d " by auto
   1.328 +    have lq': "iszlfm q" and uq: "d_\<beta> q 1" by auto
   1.329 +    from \<delta>[OF lq'] mirror_\<delta>[OF lq] q d have dq:"d_\<delta> q d " by auto
   1.330      from pqm_eq b bn uq lq' dp dq q dp d have ?thes by simp
   1.331    }
   1.332    ultimately show ?thes by blast
   1.333 @@ -1803,7 +1803,7 @@
   1.334    have qbf:"unit p = (?q,?B,?d)" by simp
   1.335    from unit[OF qf qbf] have pq_ex: "(\<exists>(x::int). ?I x p) = (\<exists> (x::int). ?I x ?q)" and 
   1.336      B:"?N ` set ?B = ?N ` set (\<beta> ?q)" and 
   1.337 -    uq:"d\<beta> ?q 1" and dd: "d\<delta> ?q ?d" and dp: "?d > 0" and 
   1.338 +    uq:"d_\<beta> ?q 1" and dd: "d_\<delta> ?q ?d" and dp: "?d > 0" and 
   1.339      lq: "iszlfm ?q" and 
   1.340      Bn: "\<forall> b\<in> set ?B. numbound0 b" by auto
   1.341    from zlin_qfree[OF lq] have qfq: "qfree ?q" .
     2.1 --- a/src/HOL/Decision_Procs/MIR.thy	Wed Nov 28 15:38:12 2012 +0100
     2.2 +++ b/src/HOL/Decision_Procs/MIR.thy	Wed Nov 28 15:59:18 2012 +0100
     2.3 @@ -1947,7 +1947,7 @@
     2.4  text{* plusinf : Virtual substitution of @{text "+\<infinity>"}
     2.5         minusinf: Virtual substitution of @{text "-\<infinity>"}
     2.6         @{text "\<delta>"} Compute lcm @{text "d| Dvd d  c*x+t \<in> p"}
     2.7 -       @{text "d\<delta>"} checks if a given l divides all the ds above*}
     2.8 +       @{text "d_\<delta>"} checks if a given l divides all the ds above*}
     2.9  
    2.10  fun minusinf:: "fm \<Rightarrow> fm" where
    2.11    "minusinf (And p q) = conj (minusinf p) (minusinf q)" 
    2.12 @@ -1981,18 +1981,18 @@
    2.13  | "\<delta> (NDvd i (CN 0 c e)) = i"
    2.14  | "\<delta> p = 1"
    2.15  
    2.16 -fun d\<delta> :: "fm \<Rightarrow> int \<Rightarrow> bool" where
    2.17 -  "d\<delta> (And p q) = (\<lambda> d. d\<delta> p d \<and> d\<delta> q d)" 
    2.18 -| "d\<delta> (Or p q) = (\<lambda> d. d\<delta> p d \<and> d\<delta> q d)" 
    2.19 -| "d\<delta> (Dvd i (CN 0 c e)) = (\<lambda> d. i dvd d)"
    2.20 -| "d\<delta> (NDvd i (CN 0 c e)) = (\<lambda> d. i dvd d)"
    2.21 -| "d\<delta> p = (\<lambda> d. True)"
    2.22 +fun d_\<delta> :: "fm \<Rightarrow> int \<Rightarrow> bool" where
    2.23 +  "d_\<delta> (And p q) = (\<lambda> d. d_\<delta> p d \<and> d_\<delta> q d)" 
    2.24 +| "d_\<delta> (Or p q) = (\<lambda> d. d_\<delta> p d \<and> d_\<delta> q d)" 
    2.25 +| "d_\<delta> (Dvd i (CN 0 c e)) = (\<lambda> d. i dvd d)"
    2.26 +| "d_\<delta> (NDvd i (CN 0 c e)) = (\<lambda> d. i dvd d)"
    2.27 +| "d_\<delta> p = (\<lambda> d. True)"
    2.28  
    2.29  lemma delta_mono: 
    2.30    assumes lin: "iszlfm p bs"
    2.31    and d: "d dvd d'"
    2.32 -  and ad: "d\<delta> p d"
    2.33 -  shows "d\<delta> p d'"
    2.34 +  and ad: "d_\<delta> p d"
    2.35 +  shows "d_\<delta> p d'"
    2.36    using lin ad d
    2.37  proof(induct p rule: iszlfm.induct)
    2.38    case (9 i c e)  thus ?case using d
    2.39 @@ -2003,26 +2003,26 @@
    2.40  qed simp_all
    2.41  
    2.42  lemma \<delta> : assumes lin:"iszlfm p bs"
    2.43 -  shows "d\<delta> p (\<delta> p) \<and> \<delta> p >0"
    2.44 +  shows "d_\<delta> p (\<delta> p) \<and> \<delta> p >0"
    2.45  using lin
    2.46  proof (induct p rule: iszlfm.induct)
    2.47    case (1 p q) 
    2.48    let ?d = "\<delta> (And p q)"
    2.49    from 1 lcm_pos_int have dp: "?d >0" by simp
    2.50    have d1: "\<delta> p dvd \<delta> (And p q)" using 1 by simp 
    2.51 -  hence th: "d\<delta> p ?d" 
    2.52 +  hence th: "d_\<delta> p ?d" 
    2.53      using delta_mono 1 by (simp only: iszlfm.simps) blast
    2.54    have "\<delta> q dvd \<delta> (And p q)" using 1 by simp 
    2.55 -  hence th': "d\<delta> q ?d" using delta_mono 1 by (simp only: iszlfm.simps) blast
    2.56 +  hence th': "d_\<delta> q ?d" using delta_mono 1 by (simp only: iszlfm.simps) blast
    2.57    from th th' dp show ?case by simp 
    2.58  next
    2.59    case (2 p q)  
    2.60    let ?d = "\<delta> (And p q)"
    2.61    from 2 lcm_pos_int have dp: "?d >0" by simp
    2.62    have "\<delta> p dvd \<delta> (And p q)" using 2 by simp
    2.63 -  hence th: "d\<delta> p ?d" using delta_mono 2 by (simp only: iszlfm.simps) blast
    2.64 +  hence th: "d_\<delta> p ?d" using delta_mono 2 by (simp only: iszlfm.simps) blast
    2.65    have "\<delta> q dvd \<delta> (And p q)" using 2 by simp
    2.66 -  hence th': "d\<delta> q ?d" using delta_mono 2 by (simp only: iszlfm.simps) blast
    2.67 +  hence th': "d_\<delta> q ?d" using delta_mono 2 by (simp only: iszlfm.simps) blast
    2.68    from th th' dp show ?case by simp
    2.69  qed simp_all
    2.70  
    2.71 @@ -2152,7 +2152,7 @@
    2.72  qed simp_all
    2.73  
    2.74  lemma minusinf_repeats:
    2.75 -  assumes d: "d\<delta> p d" and linp: "iszlfm p (a # bs)"
    2.76 +  assumes d: "d_\<delta> p d" and linp: "iszlfm p (a # bs)"
    2.77    shows "Ifm ((real(x - k*d))#bs) (minusinf p) = Ifm (real x #bs) (minusinf p)"
    2.78  using linp d
    2.79  proof(induct p rule: iszlfm.induct) 
    2.80 @@ -2218,7 +2218,7 @@
    2.81  proof-
    2.82    let ?d = "\<delta> p"
    2.83    from \<delta> [OF lin] have dpos: "?d >0" by simp
    2.84 -  from \<delta> [OF lin] have alld: "d\<delta> p ?d" by simp
    2.85 +  from \<delta> [OF lin] have alld: "d_\<delta> p ?d" by simp
    2.86    from minusinf_repeats[OF alld lin] have th1:"\<forall> x k. ?P1 x = ?P1 (x - (k * ?d))" by simp
    2.87    from minusinf_inf[OF lin] have th2:"\<exists> z. \<forall> x. x<z \<longrightarrow> (?P x = ?P1 x)" by blast
    2.88    from minusinfinity [OF dpos th1 th2] exmi show ?thesis by blast
    2.89 @@ -2232,7 +2232,7 @@
    2.90  proof-
    2.91    let ?d = "\<delta> p"
    2.92    from \<delta> [OF lin] have dpos: "?d >0" by simp
    2.93 -  from \<delta> [OF lin] have alld: "d\<delta> p ?d" by simp
    2.94 +  from \<delta> [OF lin] have alld: "d_\<delta> p ?d" by simp
    2.95    from minusinf_repeats[OF alld lin] have th1:"\<forall> x k. ?P x = ?P (x - (k * ?d))" by simp
    2.96    from periodic_finite_ex[OF dpos th1] show ?thesis by blast
    2.97  qed
    2.98 @@ -2240,37 +2240,37 @@
    2.99  lemma dvd1_eq1: "x >0 \<Longrightarrow> (x::int) dvd 1 = (x = 1)" by auto
   2.100  
   2.101  consts 
   2.102 -  a\<beta> :: "fm \<Rightarrow> int \<Rightarrow> fm" (* adjusts the coeffitients of a formula *)
   2.103 -  d\<beta> :: "fm \<Rightarrow> int \<Rightarrow> bool" (* tests if all coeffs c of c divide a given l*)
   2.104 +  a_\<beta> :: "fm \<Rightarrow> int \<Rightarrow> fm" (* adjusts the coeffitients of a formula *)
   2.105 +  d_\<beta> :: "fm \<Rightarrow> int \<Rightarrow> bool" (* tests if all coeffs c of c divide a given l*)
   2.106    \<zeta>  :: "fm \<Rightarrow> int" (* computes the lcm of all coefficients of x*)
   2.107    \<beta> :: "fm \<Rightarrow> num list"
   2.108    \<alpha> :: "fm \<Rightarrow> num list"
   2.109  
   2.110 -recdef a\<beta> "measure size"
   2.111 -  "a\<beta> (And p q) = (\<lambda> k. And (a\<beta> p k) (a\<beta> q k))" 
   2.112 -  "a\<beta> (Or p q) = (\<lambda> k. Or (a\<beta> p k) (a\<beta> q k))" 
   2.113 -  "a\<beta> (Eq  (CN 0 c e)) = (\<lambda> k. Eq (CN 0 1 (Mul (k div c) e)))"
   2.114 -  "a\<beta> (NEq (CN 0 c e)) = (\<lambda> k. NEq (CN 0 1 (Mul (k div c) e)))"
   2.115 -  "a\<beta> (Lt  (CN 0 c e)) = (\<lambda> k. Lt (CN 0 1 (Mul (k div c) e)))"
   2.116 -  "a\<beta> (Le  (CN 0 c e)) = (\<lambda> k. Le (CN 0 1 (Mul (k div c) e)))"
   2.117 -  "a\<beta> (Gt  (CN 0 c e)) = (\<lambda> k. Gt (CN 0 1 (Mul (k div c) e)))"
   2.118 -  "a\<beta> (Ge  (CN 0 c e)) = (\<lambda> k. Ge (CN 0 1 (Mul (k div c) e)))"
   2.119 -  "a\<beta> (Dvd i (CN 0 c e)) =(\<lambda> k. Dvd ((k div c)*i) (CN 0 1 (Mul (k div c) e)))"
   2.120 -  "a\<beta> (NDvd i (CN 0 c e))=(\<lambda> k. NDvd ((k div c)*i) (CN 0 1 (Mul (k div c) e)))"
   2.121 -  "a\<beta> p = (\<lambda> k. p)"
   2.122 -
   2.123 -recdef d\<beta> "measure size"
   2.124 -  "d\<beta> (And p q) = (\<lambda> k. (d\<beta> p k) \<and> (d\<beta> q k))" 
   2.125 -  "d\<beta> (Or p q) = (\<lambda> k. (d\<beta> p k) \<and> (d\<beta> q k))" 
   2.126 -  "d\<beta> (Eq  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   2.127 -  "d\<beta> (NEq (CN 0 c e)) = (\<lambda> k. c dvd k)"
   2.128 -  "d\<beta> (Lt  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   2.129 -  "d\<beta> (Le  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   2.130 -  "d\<beta> (Gt  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   2.131 -  "d\<beta> (Ge  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   2.132 -  "d\<beta> (Dvd i (CN 0 c e)) =(\<lambda> k. c dvd k)"
   2.133 -  "d\<beta> (NDvd i (CN 0 c e))=(\<lambda> k. c dvd k)"
   2.134 -  "d\<beta> p = (\<lambda> k. True)"
   2.135 +recdef a_\<beta> "measure size"
   2.136 +  "a_\<beta> (And p q) = (\<lambda> k. And (a_\<beta> p k) (a_\<beta> q k))" 
   2.137 +  "a_\<beta> (Or p q) = (\<lambda> k. Or (a_\<beta> p k) (a_\<beta> q k))" 
   2.138 +  "a_\<beta> (Eq  (CN 0 c e)) = (\<lambda> k. Eq (CN 0 1 (Mul (k div c) e)))"
   2.139 +  "a_\<beta> (NEq (CN 0 c e)) = (\<lambda> k. NEq (CN 0 1 (Mul (k div c) e)))"
   2.140 +  "a_\<beta> (Lt  (CN 0 c e)) = (\<lambda> k. Lt (CN 0 1 (Mul (k div c) e)))"
   2.141 +  "a_\<beta> (Le  (CN 0 c e)) = (\<lambda> k. Le (CN 0 1 (Mul (k div c) e)))"
   2.142 +  "a_\<beta> (Gt  (CN 0 c e)) = (\<lambda> k. Gt (CN 0 1 (Mul (k div c) e)))"
   2.143 +  "a_\<beta> (Ge  (CN 0 c e)) = (\<lambda> k. Ge (CN 0 1 (Mul (k div c) e)))"
   2.144 +  "a_\<beta> (Dvd i (CN 0 c e)) =(\<lambda> k. Dvd ((k div c)*i) (CN 0 1 (Mul (k div c) e)))"
   2.145 +  "a_\<beta> (NDvd i (CN 0 c e))=(\<lambda> k. NDvd ((k div c)*i) (CN 0 1 (Mul (k div c) e)))"
   2.146 +  "a_\<beta> p = (\<lambda> k. p)"
   2.147 +
   2.148 +recdef d_\<beta> "measure size"
   2.149 +  "d_\<beta> (And p q) = (\<lambda> k. (d_\<beta> p k) \<and> (d_\<beta> q k))" 
   2.150 +  "d_\<beta> (Or p q) = (\<lambda> k. (d_\<beta> p k) \<and> (d_\<beta> q k))" 
   2.151 +  "d_\<beta> (Eq  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   2.152 +  "d_\<beta> (NEq (CN 0 c e)) = (\<lambda> k. c dvd k)"
   2.153 +  "d_\<beta> (Lt  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   2.154 +  "d_\<beta> (Le  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   2.155 +  "d_\<beta> (Gt  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   2.156 +  "d_\<beta> (Ge  (CN 0 c e)) = (\<lambda> k. c dvd k)"
   2.157 +  "d_\<beta> (Dvd i (CN 0 c e)) =(\<lambda> k. c dvd k)"
   2.158 +  "d_\<beta> (NDvd i (CN 0 c e))=(\<lambda> k. c dvd k)"
   2.159 +  "d_\<beta> p = (\<lambda> k. True)"
   2.160  
   2.161  recdef \<zeta> "measure size"
   2.162    "\<zeta> (And p q) = lcm (\<zeta> p) (\<zeta> q)" 
   2.163 @@ -2320,7 +2320,7 @@
   2.164    "mirror (NDvd i (CN 0 c e)) = NDvd i (CN 0 c (Neg e))"
   2.165    "mirror p = p"
   2.166  
   2.167 -lemma mirror\<alpha>\<beta>:
   2.168 +lemma mirror_\<alpha>_\<beta>:
   2.169    assumes lp: "iszlfm p (a#bs)"
   2.170    shows "(Inum (real (i::int)#bs)) ` set (\<alpha> p) = (Inum (real i#bs)) ` set (\<beta> (mirror p))"
   2.171  using lp
   2.172 @@ -2351,8 +2351,8 @@
   2.173  lemma mirror_l: "iszlfm p (a#bs) \<Longrightarrow> iszlfm (mirror p) (a#bs)"
   2.174  by (induct p rule: mirror.induct, auto simp add: isint_neg)
   2.175  
   2.176 -lemma mirror_d\<beta>: "iszlfm p (a#bs) \<and> d\<beta> p 1 
   2.177 -  \<Longrightarrow> iszlfm (mirror p) (a#bs) \<and> d\<beta> (mirror p) 1"
   2.178 +lemma mirror_d_\<beta>: "iszlfm p (a#bs) \<and> d_\<beta> p 1 
   2.179 +  \<Longrightarrow> iszlfm (mirror p) (a#bs) \<and> d_\<beta> (mirror p) 1"
   2.180  by (induct p rule: mirror.induct, auto simp add: isint_neg)
   2.181  
   2.182  lemma mirror_\<delta>: "iszlfm p (a#bs) \<Longrightarrow> \<delta> (mirror p) = \<delta> p"
   2.183 @@ -2376,11 +2376,11 @@
   2.184    shows "\<forall> b\<in> set (\<beta> p). numbound0 b"
   2.185    using lp by (induct p rule: \<beta>.induct,auto)
   2.186  
   2.187 -lemma d\<beta>_mono: 
   2.188 +lemma d_\<beta>_mono: 
   2.189    assumes linp: "iszlfm p (a #bs)"
   2.190 -  and dr: "d\<beta> p l"
   2.191 +  and dr: "d_\<beta> p l"
   2.192    and d: "l dvd l'"
   2.193 -  shows "d\<beta> p l'"
   2.194 +  shows "d_\<beta> p l'"
   2.195  using dr linp dvd_trans[of _ "l" "l'", simplified d]
   2.196  by (induct p rule: iszlfm.induct) simp_all
   2.197  
   2.198 @@ -2391,26 +2391,26 @@
   2.199  
   2.200  lemma \<zeta>: 
   2.201    assumes linp: "iszlfm p (a #bs)"
   2.202 -  shows "\<zeta> p > 0 \<and> d\<beta> p (\<zeta> p)"
   2.203 +  shows "\<zeta> p > 0 \<and> d_\<beta> p (\<zeta> p)"
   2.204  using linp
   2.205  proof(induct p rule: iszlfm.induct)
   2.206    case (1 p q)
   2.207    then  have dl1: "\<zeta> p dvd lcm (\<zeta> p) (\<zeta> q)" by simp
   2.208    from 1 have dl2: "\<zeta> q dvd lcm (\<zeta> p) (\<zeta> q)" by simp
   2.209 -  from 1 d\<beta>_mono[where p = "p" and l="\<zeta> p" and l'="lcm (\<zeta> p) (\<zeta> q)"] 
   2.210 -    d\<beta>_mono[where p = "q" and l="\<zeta> q" and l'="lcm (\<zeta> p) (\<zeta> q)"] 
   2.211 +  from 1 d_\<beta>_mono[where p = "p" and l="\<zeta> p" and l'="lcm (\<zeta> p) (\<zeta> q)"] 
   2.212 +    d_\<beta>_mono[where p = "q" and l="\<zeta> q" and l'="lcm (\<zeta> p) (\<zeta> q)"] 
   2.213      dl1 dl2 show ?case by (auto simp add: lcm_pos_int)
   2.214  next
   2.215    case (2 p q)
   2.216    then have dl1: "\<zeta> p dvd lcm (\<zeta> p) (\<zeta> q)" by simp
   2.217    from 2 have dl2: "\<zeta> q dvd lcm (\<zeta> p) (\<zeta> q)" by simp
   2.218 -  from 2 d\<beta>_mono[where p = "p" and l="\<zeta> p" and l'="lcm (\<zeta> p) (\<zeta> q)"] 
   2.219 -    d\<beta>_mono[where p = "q" and l="\<zeta> q" and l'="lcm (\<zeta> p) (\<zeta> q)"] 
   2.220 +  from 2 d_\<beta>_mono[where p = "p" and l="\<zeta> p" and l'="lcm (\<zeta> p) (\<zeta> q)"] 
   2.221 +    d_\<beta>_mono[where p = "q" and l="\<zeta> q" and l'="lcm (\<zeta> p) (\<zeta> q)"] 
   2.222      dl1 dl2 show ?case by (auto simp add: lcm_pos_int)
   2.223  qed (auto simp add: lcm_pos_int)
   2.224  
   2.225 -lemma a\<beta>: assumes linp: "iszlfm p (a #bs)" and d: "d\<beta> p l" and lp: "l > 0"
   2.226 -  shows "iszlfm (a\<beta> p l) (a #bs) \<and> d\<beta> (a\<beta> p l) 1 \<and> (Ifm (real (l * x) #bs) (a\<beta> p l) = Ifm ((real x)#bs) p)"
   2.227 +lemma a_\<beta>: assumes linp: "iszlfm p (a #bs)" and d: "d_\<beta> p l" and lp: "l > 0"
   2.228 +  shows "iszlfm (a_\<beta> p l) (a #bs) \<and> d_\<beta> (a_\<beta> p l) 1 \<and> (Ifm (real (l * x) #bs) (a_\<beta> p l) = Ifm ((real x)#bs) p)"
   2.229  using linp d
   2.230  proof (induct p rule: iszlfm.induct)
   2.231    case (5 c e) hence cp: "c>0" and be: "numbound0 e" and ei:"isint e (a#bs)" and d': "c dvd l" by simp+
   2.232 @@ -2556,20 +2556,20 @@
   2.233    finally show ?case using numbound0_I[OF be,where b="real (l * x)" and b'="real x" and bs="bs"] rdvd_def  be  isint_Mul[OF ei]  mult_strict_mono[OF ldcp jp ldcp ] by simp
   2.234  qed (simp_all add: numbound0_I[where bs="bs" and b="real (l * x)" and b'="real x"] isint_Mul del: real_of_int_mult)
   2.235  
   2.236 -lemma a\<beta>_ex: assumes linp: "iszlfm p (a#bs)" and d: "d\<beta> p l" and lp: "l>0"
   2.237 -  shows "(\<exists> x. l dvd x \<and> Ifm (real x #bs) (a\<beta> p l)) = (\<exists> (x::int). Ifm (real x#bs) p)"
   2.238 +lemma a_\<beta>_ex: assumes linp: "iszlfm p (a#bs)" and d: "d_\<beta> p l" and lp: "l>0"
   2.239 +  shows "(\<exists> x. l dvd x \<and> Ifm (real x #bs) (a_\<beta> p l)) = (\<exists> (x::int). Ifm (real x#bs) p)"
   2.240    (is "(\<exists> x. l dvd x \<and> ?P x) = (\<exists> x. ?P' x)")
   2.241  proof-
   2.242    have "(\<exists> x. l dvd x \<and> ?P x) = (\<exists> (x::int). ?P (l*x))"
   2.243      using unity_coeff_ex[where l="l" and P="?P", simplified] by simp
   2.244 -  also have "\<dots> = (\<exists> (x::int). ?P' x)" using a\<beta>[OF linp d lp] by simp
   2.245 +  also have "\<dots> = (\<exists> (x::int). ?P' x)" using a_\<beta>[OF linp d lp] by simp
   2.246    finally show ?thesis  . 
   2.247  qed
   2.248  
   2.249  lemma \<beta>:
   2.250    assumes lp: "iszlfm p (a#bs)"
   2.251 -  and u: "d\<beta> p 1"
   2.252 -  and d: "d\<delta> p d"
   2.253 +  and u: "d_\<beta> p 1"
   2.254 +  and d: "d_\<delta> p d"
   2.255    and dp: "d > 0"
   2.256    and nob: "\<not>(\<exists>(j::int) \<in> {1 .. d}. \<exists> b\<in> (Inum (a#bs)) ` set(\<beta> p). real x = b + real j)"
   2.257    and p: "Ifm (real x#bs) p" (is "?P x")
   2.258 @@ -2705,8 +2705,8 @@
   2.259  
   2.260  lemma \<beta>':   
   2.261    assumes lp: "iszlfm p (a #bs)"
   2.262 -  and u: "d\<beta> p 1"
   2.263 -  and d: "d\<delta> p d"
   2.264 +  and u: "d_\<beta> p 1"
   2.265 +  and d: "d_\<delta> p d"
   2.266    and dp: "d > 0"
   2.267    shows "\<forall> x. \<not>(\<exists>(j::int) \<in> {1 .. d}. \<exists> b\<in> set(\<beta> p). Ifm ((Inum (a#bs) b + real j) #bs) p) \<longrightarrow> Ifm (real x#bs) p \<longrightarrow> Ifm (real (x - d)#bs) p" (is "\<forall> x. ?b \<longrightarrow> ?P x \<longrightarrow> ?P (x - d)")
   2.268  proof(clarify)
   2.269 @@ -2746,8 +2746,8 @@
   2.270  
   2.271  theorem cp_thm:
   2.272    assumes lp: "iszlfm p (a #bs)"
   2.273 -  and u: "d\<beta> p 1"
   2.274 -  and d: "d\<delta> p d"
   2.275 +  and u: "d_\<beta> p 1"
   2.276 +  and d: "d_\<delta> p d"
   2.277    and dp: "d > 0"
   2.278    shows "(\<exists> (x::int). Ifm (real x #bs) p) = (\<exists> j\<in> {1.. d}. Ifm (real j #bs) (minusinf p) \<or> (\<exists> b \<in> set (\<beta> p). Ifm ((Inum (a#bs) b + real j) #bs) p))"
   2.279    (is "(\<exists> (x::int). ?P (real x)) = (\<exists> j\<in> ?D. ?M j \<or> (\<exists> b\<in> ?B. ?P (?I b + real j)))")
   2.280 @@ -2775,9 +2775,9 @@
   2.281  
   2.282  consts 
   2.283    \<rho> :: "fm \<Rightarrow> (num \<times> int) list" (* Compute the Reddy and Loveland Bset*)
   2.284 -  \<sigma>\<rho>:: "fm \<Rightarrow> num \<times> int \<Rightarrow> fm" (* Performs the modified substitution of Reddy and Loveland*)
   2.285 -  \<alpha>\<rho> :: "fm \<Rightarrow> (num\<times>int) list"
   2.286 -  a\<rho> :: "fm \<Rightarrow> int \<Rightarrow> fm"
   2.287 +  \<sigma>_\<rho>:: "fm \<Rightarrow> num \<times> int \<Rightarrow> fm" (* Performs the modified substitution of Reddy and Loveland*)
   2.288 +  \<alpha>_\<rho> :: "fm \<Rightarrow> (num\<times>int) list"
   2.289 +  a_\<rho> :: "fm \<Rightarrow> int \<Rightarrow> fm"
   2.290  recdef \<rho> "measure size"
   2.291    "\<rho> (And p q) = (\<rho> p @ \<rho> q)" 
   2.292    "\<rho> (Or p q) = (\<rho> p @ \<rho> q)" 
   2.293 @@ -2789,52 +2789,52 @@
   2.294    "\<rho> (Ge  (CN 0 c e)) = [(Sub (C (-1)) e, c)]"
   2.295    "\<rho> p = []"
   2.296  
   2.297 -recdef \<sigma>\<rho> "measure size"
   2.298 -  "\<sigma>\<rho> (And p q) = (\<lambda> (t,k). And (\<sigma>\<rho> p (t,k)) (\<sigma>\<rho> q (t,k)))" 
   2.299 -  "\<sigma>\<rho> (Or p q) = (\<lambda> (t,k). Or (\<sigma>\<rho> p (t,k)) (\<sigma>\<rho> q (t,k)))" 
   2.300 -  "\<sigma>\<rho> (Eq  (CN 0 c e)) = (\<lambda> (t,k). if k dvd c then (Eq (Add (Mul (c div k) t) e)) 
   2.301 +recdef \<sigma>_\<rho> "measure size"
   2.302 +  "\<sigma>_\<rho> (And p q) = (\<lambda> (t,k). And (\<sigma>_\<rho> p (t,k)) (\<sigma>_\<rho> q (t,k)))" 
   2.303 +  "\<sigma>_\<rho> (Or p q) = (\<lambda> (t,k). Or (\<sigma>_\<rho> p (t,k)) (\<sigma>_\<rho> q (t,k)))" 
   2.304 +  "\<sigma>_\<rho> (Eq  (CN 0 c e)) = (\<lambda> (t,k). if k dvd c then (Eq (Add (Mul (c div k) t) e)) 
   2.305                                              else (Eq (Add (Mul c t) (Mul k e))))"
   2.306 -  "\<sigma>\<rho> (NEq (CN 0 c e)) = (\<lambda> (t,k). if k dvd c then (NEq (Add (Mul (c div k) t) e)) 
   2.307 +  "\<sigma>_\<rho> (NEq (CN 0 c e)) = (\<lambda> (t,k). if k dvd c then (NEq (Add (Mul (c div k) t) e)) 
   2.308                                              else (NEq (Add (Mul c t) (Mul k e))))"
   2.309 -  "\<sigma>\<rho> (Lt  (CN 0 c e)) = (\<lambda> (t,k). if k dvd c then (Lt (Add (Mul (c div k) t) e)) 
   2.310 +  "\<sigma>_\<rho> (Lt  (CN 0 c e)) = (\<lambda> (t,k). if k dvd c then (Lt (Add (Mul (c div k) t) e)) 
   2.311                                              else (Lt (Add (Mul c t) (Mul k e))))"
   2.312 -  "\<sigma>\<rho> (Le  (CN 0 c e)) = (\<lambda> (t,k). if k dvd c then (Le (Add (Mul (c div k) t) e)) 
   2.313 +  "\<sigma>_\<rho> (Le  (CN 0 c e)) = (\<lambda> (t,k). if k dvd c then (Le (Add (Mul (c div k) t) e)) 
   2.314                                              else (Le (Add (Mul c t) (Mul k e))))"
   2.315 -  "\<sigma>\<rho> (Gt  (CN 0 c e)) = (\<lambda> (t,k). if k dvd c then (Gt (Add (Mul (c div k) t) e)) 
   2.316 +  "\<sigma>_\<rho> (Gt  (CN 0 c e)) = (\<lambda> (t,k). if k dvd c then (Gt (Add (Mul (c div k) t) e)) 
   2.317                                              else (Gt (Add (Mul c t) (Mul k e))))"
   2.318 -  "\<sigma>\<rho> (Ge  (CN 0 c e)) = (\<lambda> (t,k). if k dvd c then (Ge (Add (Mul (c div k) t) e)) 
   2.319 +  "\<sigma>_\<rho> (Ge  (CN 0 c e)) = (\<lambda> (t,k). if k dvd c then (Ge (Add (Mul (c div k) t) e)) 
   2.320                                              else (Ge (Add (Mul c t) (Mul k e))))"
   2.321 -  "\<sigma>\<rho> (Dvd i (CN 0 c e)) =(\<lambda> (t,k). if k dvd c then (Dvd i (Add (Mul (c div k) t) e)) 
   2.322 +  "\<sigma>_\<rho> (Dvd i (CN 0 c e)) =(\<lambda> (t,k). if k dvd c then (Dvd i (Add (Mul (c div k) t) e)) 
   2.323                                              else (Dvd (i*k) (Add (Mul c t) (Mul k e))))"
   2.324 -  "\<sigma>\<rho> (NDvd i (CN 0 c e))=(\<lambda> (t,k). if k dvd c then (NDvd i (Add (Mul (c div k) t) e)) 
   2.325 +  "\<sigma>_\<rho> (NDvd i (CN 0 c e))=(\<lambda> (t,k). if k dvd c then (NDvd i (Add (Mul (c div k) t) e)) 
   2.326                                              else (NDvd (i*k) (Add (Mul c t) (Mul k e))))"
   2.327 -  "\<sigma>\<rho> p = (\<lambda> (t,k). p)"
   2.328 -
   2.329 -recdef \<alpha>\<rho> "measure size"
   2.330 -  "\<alpha>\<rho> (And p q) = (\<alpha>\<rho> p @ \<alpha>\<rho> q)" 
   2.331 -  "\<alpha>\<rho> (Or p q) = (\<alpha>\<rho> p @ \<alpha>\<rho> q)" 
   2.332 -  "\<alpha>\<rho> (Eq  (CN 0 c e)) = [(Add (C -1) e,c)]"
   2.333 -  "\<alpha>\<rho> (NEq (CN 0 c e)) = [(e,c)]"
   2.334 -  "\<alpha>\<rho> (Lt  (CN 0 c e)) = [(e,c)]"
   2.335 -  "\<alpha>\<rho> (Le  (CN 0 c e)) = [(Add (C -1) e,c)]"
   2.336 -  "\<alpha>\<rho> p = []"
   2.337 +  "\<sigma>_\<rho> p = (\<lambda> (t,k). p)"
   2.338 +
   2.339 +recdef \<alpha>_\<rho> "measure size"
   2.340 +  "\<alpha>_\<rho> (And p q) = (\<alpha>_\<rho> p @ \<alpha>_\<rho> q)" 
   2.341 +  "\<alpha>_\<rho> (Or p q) = (\<alpha>_\<rho> p @ \<alpha>_\<rho> q)" 
   2.342 +  "\<alpha>_\<rho> (Eq  (CN 0 c e)) = [(Add (C -1) e,c)]"
   2.343 +  "\<alpha>_\<rho> (NEq (CN 0 c e)) = [(e,c)]"
   2.344 +  "\<alpha>_\<rho> (Lt  (CN 0 c e)) = [(e,c)]"
   2.345 +  "\<alpha>_\<rho> (Le  (CN 0 c e)) = [(Add (C -1) e,c)]"
   2.346 +  "\<alpha>_\<rho> p = []"
   2.347  
   2.348      (* Simulates normal substituion by modifying the formula see correctness theorem *)
   2.349  
   2.350  definition \<sigma> :: "fm \<Rightarrow> int \<Rightarrow> num \<Rightarrow> fm" where
   2.351 -  "\<sigma> p k t \<equiv> And (Dvd k t) (\<sigma>\<rho> p (t,k))"
   2.352 -
   2.353 -lemma \<sigma>\<rho>:
   2.354 +  "\<sigma> p k t \<equiv> And (Dvd k t) (\<sigma>_\<rho> p (t,k))"
   2.355 +
   2.356 +lemma \<sigma>_\<rho>:
   2.357    assumes linp: "iszlfm p (real (x::int)#bs)"
   2.358    and kpos: "real k > 0"
   2.359    and tnb: "numbound0 t"
   2.360    and tint: "isint t (real x#bs)"
   2.361    and kdt: "k dvd floor (Inum (b'#bs) t)"
   2.362 -  shows "Ifm (real x#bs) (\<sigma>\<rho> p (t,k)) = 
   2.363 +  shows "Ifm (real x#bs) (\<sigma>_\<rho> p (t,k)) = 
   2.364    (Ifm ((real ((floor (Inum (b'#bs) t)) div k))#bs) p)" 
   2.365    (is "?I (real x) (?s p) = (?I (real ((floor (?N b' t)) div k)) p)" is "_ = (?I ?tk p)")
   2.366  using linp kpos tnb
   2.367 -proof(induct p rule: \<sigma>\<rho>.induct)
   2.368 +proof(induct p rule: \<sigma>_\<rho>.induct)
   2.369    case (3 c e) 
   2.370    from 3 have cp: "c > 0" and nb: "numbound0 e" by auto
   2.371    { assume kdc: "k dvd c" 
   2.372 @@ -3033,8 +3033,8 @@
   2.373    numbound0_I[where bs="bs" and b="real ((floor (?N b' t)) div k)" and b'="real x"])
   2.374  
   2.375  
   2.376 -lemma \<sigma>\<rho>_nb: assumes lp:"iszlfm p (a#bs)" and nb: "numbound0 t"
   2.377 -  shows "bound0 (\<sigma>\<rho> p (t,k))"
   2.378 +lemma \<sigma>_\<rho>_nb: assumes lp:"iszlfm p (a#bs)" and nb: "numbound0 t"
   2.379 +  shows "bound0 (\<sigma>_\<rho> p (t,k))"
   2.380    using lp
   2.381    by (induct p rule: iszlfm.induct, auto simp add: nb)
   2.382  
   2.383 @@ -3043,15 +3043,15 @@
   2.384    shows "\<forall> (b,k) \<in> set (\<rho> p). k >0 \<and> numbound0 b \<and> isint b (real i#bs)"
   2.385  using lp by (induct p rule: \<rho>.induct, auto simp add: isint_sub isint_neg)
   2.386  
   2.387 -lemma \<alpha>\<rho>_l:
   2.388 +lemma \<alpha>_\<rho>_l:
   2.389    assumes lp: "iszlfm p (real (i::int)#bs)"
   2.390 -  shows "\<forall> (b,k) \<in> set (\<alpha>\<rho> p). k >0 \<and> numbound0 b \<and> isint b (real i#bs)"
   2.391 +  shows "\<forall> (b,k) \<in> set (\<alpha>_\<rho> p). k >0 \<and> numbound0 b \<and> isint b (real i#bs)"
   2.392  using lp isint_add [OF isint_c[where j="- 1"],where bs="real i#bs"]
   2.393 - by (induct p rule: \<alpha>\<rho>.induct, auto)
   2.394 + by (induct p rule: \<alpha>_\<rho>.induct, auto)
   2.395  
   2.396  lemma \<rho>: assumes lp: "iszlfm p (real (i::int) #bs)"
   2.397    and pi: "Ifm (real i#bs) p"
   2.398 -  and d: "d\<delta> p d"
   2.399 +  and d: "d_\<delta> p d"
   2.400    and dp: "d > 0"
   2.401    and nob: "\<forall>(e,c) \<in> set (\<rho> p). \<forall> j\<in> {1 .. c*d}. real (c*i) \<noteq> Inum (real i#bs) e + real j"
   2.402    (is "\<forall>(e,c) \<in> set (\<rho> p). \<forall> j\<in> {1 .. c*d}. _ \<noteq> ?N i e + _")
   2.403 @@ -3187,10 +3187,10 @@
   2.404  
   2.405  lemma \<sigma>_nb: assumes lp: "iszlfm p (a#bs)" and nb: "numbound0 t"
   2.406    shows "bound0 (\<sigma> p k t)"
   2.407 -  using \<sigma>\<rho>_nb[OF lp nb] nb by (simp add: \<sigma>_def)
   2.408 +  using \<sigma>_\<rho>_nb[OF lp nb] nb by (simp add: \<sigma>_def)
   2.409    
   2.410  lemma \<rho>':   assumes lp: "iszlfm p (a #bs)"
   2.411 -  and d: "d\<delta> p d"
   2.412 +  and d: "d_\<delta> p d"
   2.413    and dp: "d > 0"
   2.414    shows "\<forall> x. \<not>(\<exists> (e,c) \<in> set(\<rho> p). \<exists>(j::int) \<in> {1 .. c*d}. Ifm (a #bs) (\<sigma> p c (Add e (C j)))) \<longrightarrow> Ifm (real x#bs) p \<longrightarrow> Ifm (real (x - d)#bs) p" (is "\<forall> x. ?b x \<longrightarrow> ?P x \<longrightarrow> ?P (x - d)")
   2.415  proof(clarify)
   2.416 @@ -3219,8 +3219,8 @@
   2.417      from nb have nb': "numbound0 (Add e (C j))" by simp
   2.418      have ji: "isint (C j) (real x#bs)" by (simp add: isint_def)
   2.419      from isint_add[OF ei ji] have ei':"isint (Add e (C j)) (real x#bs)" .
   2.420 -    from th \<sigma>\<rho>[where b'="real x", OF lp' cp' nb' ei' cdej',symmetric]
   2.421 -    have "Ifm (real x#bs) (\<sigma>\<rho> p (Add e (C j), c))" by simp
   2.422 +    from th \<sigma>_\<rho>[where b'="real x", OF lp' cp' nb' ei' cdej',symmetric]
   2.423 +    have "Ifm (real x#bs) (\<sigma>_\<rho> p (Add e (C j), c))" by simp
   2.424      with rcdej have th: "Ifm (real x#bs) (\<sigma> p c (Add e (C j)))" by (simp add: \<sigma>_def)
   2.425      from th bound0_I[OF \<sigma>_nb[OF lp nb', where k="c"],where bs="bs" and b="real x" and b'="a"]
   2.426      have "Ifm (a#bs) (\<sigma> p c (Add e (C j)))" by blast
   2.427 @@ -3237,7 +3237,7 @@
   2.428      is "?lhs = (?MD \<or> ?RD)"  is "?lhs = ?rhs")
   2.429  proof-
   2.430    let ?d= "\<delta> p"
   2.431 -  from \<delta>[OF lp] have d:"d\<delta> p ?d" and dp: "?d > 0" by auto
   2.432 +  from \<delta>[OF lp] have d:"d_\<delta> p ?d" and dp: "?d > 0" by auto
   2.433    { assume H:"?MD" hence th:"\<exists> (x::int). ?MP x" by blast
   2.434      from H minusinf_ex[OF lp th] have ?thesis  by blast}
   2.435    moreover
   2.436 @@ -3251,12 +3251,12 @@
   2.437      from spx bound0_I[OF \<sigma>_nb[OF lp nb', where k="c"], where bs="bs" and b="a" and b'="real i"]
   2.438      have spx': "Ifm (real i # bs) (\<sigma> p c (Add e (C j)))" by blast
   2.439      from spx' have rcdej:"real c rdvd (Inum (real i#bs) (Add e (C j)))" 
   2.440 -      and sr:"Ifm (real i#bs) (\<sigma>\<rho> p (Add e (C j),c))" by (simp add: \<sigma>_def)+
   2.441 +      and sr:"Ifm (real i#bs) (\<sigma>_\<rho> p (Add e (C j),c))" by (simp add: \<sigma>_def)+
   2.442      from rcdej eji[simplified isint_iff] 
   2.443      have "real c rdvd real (floor (Inum (real i#bs) (Add e (C j))))" by simp
   2.444      hence cdej:"c dvd floor (Inum (real i#bs) (Add e (C j)))" by (simp only: int_rdvd_iff)
   2.445      from cp have cp': "real c > 0" by simp
   2.446 -    from \<sigma>\<rho>[OF lp cp' nb' eji cdej] spx' have "?P (\<lfloor>Inum (real i # bs) (Add e (C j))\<rfloor> div c)"
   2.447 +    from \<sigma>_\<rho>[OF lp cp' nb' eji cdej] spx' have "?P (\<lfloor>Inum (real i # bs) (Add e (C j))\<rfloor> div c)"
   2.448        by (simp add: \<sigma>_def)
   2.449      hence ?lhs by blast
   2.450      with exR jD spx have ?thesis by blast}
   2.451 @@ -3272,8 +3272,8 @@
   2.452    ultimately show ?thesis by blast
   2.453  qed
   2.454  
   2.455 -lemma mirror_\<alpha>\<rho>:   assumes lp: "iszlfm p (a#bs)"
   2.456 -  shows "(\<lambda> (t,k). (Inum (a#bs) t, k)) ` set (\<alpha>\<rho> p) = (\<lambda> (t,k). (Inum (a#bs) t,k)) ` set (\<rho> (mirror p))"
   2.457 +lemma mirror_\<alpha>_\<rho>:   assumes lp: "iszlfm p (a#bs)"
   2.458 +  shows "(\<lambda> (t,k). (Inum (a#bs) t, k)) ` set (\<alpha>_\<rho> p) = (\<lambda> (t,k). (Inum (a#bs) t,k)) ` set (\<rho> (mirror p))"
   2.459  using lp
   2.460  by (induct p rule: mirror.induct, simp_all add: split_def image_Un )
   2.461    
   2.462 @@ -4714,7 +4714,7 @@
   2.463  qed
   2.464  
   2.465  
   2.466 -lemma fr_eq\<upsilon>: 
   2.467 +lemma fr_eq_\<upsilon>: 
   2.468    assumes lp: "isrlfm p"
   2.469    shows "(\<exists> x. Ifm (x#bs) p) = ((Ifm (x#bs) (minusinf p)) \<or> (Ifm (x#bs) (plusinf p)) \<or> (\<exists> (t,k) \<in> set (\<Upsilon> p). \<exists> (s,l) \<in> set (\<Upsilon> p). Ifm (x#bs) (\<upsilon> p (Add(Mul l t) (Mul k s) , 2*k*l))))"
   2.470    (is "(\<exists> x. ?I x p) = (?M \<or> ?P \<or> ?F)" is "?E = ?D")
   2.471 @@ -4856,7 +4856,7 @@
   2.472      hence lqx: "?I x ?rq " using simpfm[where p="?rq" and bs="x#bs"] by auto
   2.473      from qf have qfq:"isrlfm ?rq"  
   2.474        by (auto simp add: rsplit_def lt_def ge_def rlfm_I[OF qf xp x1])
   2.475 -    with lqx fr_eq\<upsilon>[OF qfq] show "?M \<or> ?P \<or> ?F" by blast
   2.476 +    with lqx fr_eq_\<upsilon>[OF qfq] show "?M \<or> ?P \<or> ?F" by blast
   2.477    next
   2.478      assume D: "?D"
   2.479      let ?U = "set (\<Upsilon> ?rq )"
   2.480 @@ -5066,27 +5066,27 @@
   2.481  
   2.482  lemma cp_thm': 
   2.483    assumes lp: "iszlfm p (real (i::int)#bs)"
   2.484 -  and up: "d\<beta> p 1" and dd: "d\<delta> p d" and dp: "d > 0"
   2.485 +  and up: "d_\<beta> p 1" and dd: "d_\<delta> p d" and dp: "d > 0"
   2.486    shows "(\<exists> (x::int). Ifm (real x#bs) p) = ((\<exists> j\<in> {1 .. d}. Ifm (real j#bs) (minusinf p)) \<or> (\<exists> j\<in> {1.. d}. \<exists> b\<in> (Inum (real i#bs)) ` set (\<beta> p). Ifm ((b+real j)#bs) p))"
   2.487    using cp_thm[OF lp up dd dp] by auto
   2.488  
   2.489  definition unit :: "fm \<Rightarrow> fm \<times> num list \<times> int" where
   2.490 -  "unit p \<equiv> (let p' = zlfm p ; l = \<zeta> p' ; q = And (Dvd l (CN 0 1 (C 0))) (a\<beta> p' l); d = \<delta> q;
   2.491 +  "unit p \<equiv> (let p' = zlfm p ; l = \<zeta> p' ; q = And (Dvd l (CN 0 1 (C 0))) (a_\<beta> p' l); d = \<delta> q;
   2.492               B = remdups (map simpnum (\<beta> q)) ; a = remdups (map simpnum (\<alpha> q))
   2.493               in if length B \<le> length a then (q,B,d) else (mirror q, a,d))"
   2.494  
   2.495  lemma unit: assumes qf: "qfree p"
   2.496 -  shows "\<And> q B d. unit p = (q,B,d) \<Longrightarrow> ((\<exists> (x::int). Ifm (real x#bs) p) = (\<exists> (x::int). Ifm (real x#bs) q)) \<and> (Inum (real i#bs)) ` set B = (Inum (real i#bs)) ` set (\<beta> q) \<and> d\<beta> q 1 \<and> d\<delta> q d \<and> d >0 \<and> iszlfm q (real (i::int)#bs) \<and> (\<forall> b\<in> set B. numbound0 b)"
   2.497 +  shows "\<And> q B d. unit p = (q,B,d) \<Longrightarrow> ((\<exists> (x::int). Ifm (real x#bs) p) = (\<exists> (x::int). Ifm (real x#bs) q)) \<and> (Inum (real i#bs)) ` set B = (Inum (real i#bs)) ` set (\<beta> q) \<and> d_\<beta> q 1 \<and> d_\<delta> q d \<and> d >0 \<and> iszlfm q (real (i::int)#bs) \<and> (\<forall> b\<in> set B. numbound0 b)"
   2.498  proof-
   2.499    fix q B d 
   2.500    assume qBd: "unit p = (q,B,d)"
   2.501    let ?thes = "((\<exists> (x::int). Ifm (real x#bs) p) = (\<exists> (x::int). Ifm (real x#bs) q)) \<and>
   2.502      Inum (real i#bs) ` set B = Inum (real i#bs) ` set (\<beta> q) \<and>
   2.503 -    d\<beta> q 1 \<and> d\<delta> q d \<and> 0 < d \<and> iszlfm q (real i # bs) \<and> (\<forall> b\<in> set B. numbound0 b)"
   2.504 +    d_\<beta> q 1 \<and> d_\<delta> q d \<and> 0 < d \<and> iszlfm q (real i # bs) \<and> (\<forall> b\<in> set B. numbound0 b)"
   2.505    let ?I = "\<lambda> (x::int) p. Ifm (real x#bs) p"
   2.506    let ?p' = "zlfm p"
   2.507    let ?l = "\<zeta> ?p'"
   2.508 -  let ?q = "And (Dvd ?l (CN 0 1 (C 0))) (a\<beta> ?p' ?l)"
   2.509 +  let ?q = "And (Dvd ?l (CN 0 1 (C 0))) (a_\<beta> ?p' ?l)"
   2.510    let ?d = "\<delta> ?q"
   2.511    let ?B = "set (\<beta> ?q)"
   2.512    let ?B'= "remdups (map simpnum (\<beta> ?q))"
   2.513 @@ -5097,12 +5097,12 @@
   2.514    from iszlfm_gen[OF conjunct2[OF zlfm_I[OF qf, where bs="bs" and i="i"]]]
   2.515    have lp': "\<forall> (i::int). iszlfm ?p' (real i#bs)" by simp 
   2.516    hence lp'': "iszlfm ?p' (real (i::int)#bs)" by simp
   2.517 -  from lp' \<zeta>[where p="?p'" and bs="bs"] have lp: "?l >0" and dl: "d\<beta> ?p' ?l" by auto
   2.518 -  from a\<beta>_ex[where p="?p'" and l="?l" and bs="bs", OF lp'' dl lp] pp'
   2.519 +  from lp' \<zeta>[where p="?p'" and bs="bs"] have lp: "?l >0" and dl: "d_\<beta> ?p' ?l" by auto
   2.520 +  from a_\<beta>_ex[where p="?p'" and l="?l" and bs="bs", OF lp'' dl lp] pp'
   2.521    have pq_ex:"(\<exists> (x::int). ?I x p) = (\<exists> x. ?I x ?q)" by (simp add: int_rdvd_iff) 
   2.522 -  from lp'' lp a\<beta>[OF lp'' dl lp] have lq:"iszlfm ?q (real i#bs)" and uq: "d\<beta> ?q 1" 
   2.523 +  from lp'' lp a_\<beta>[OF lp'' dl lp] have lq:"iszlfm ?q (real i#bs)" and uq: "d_\<beta> ?q 1" 
   2.524      by (auto simp add: isint_def)
   2.525 -  from \<delta>[OF lq] have dp:"?d >0" and dd: "d\<delta> ?q ?d" by blast+
   2.526 +  from \<delta>[OF lq] have dp:"?d >0" and dd: "d_\<delta> ?q ?d" by blast+
   2.527    let ?N = "\<lambda> t. Inum (real (i::int)#bs) t"
   2.528    have "?N ` set ?B' = ((?N o simpnum) ` ?B)" by (simp add:image_compose) 
   2.529    also have "\<dots> = ?N ` ?B" using simpnum_ci[where bs="real i #bs"] by auto
   2.530 @@ -5124,13 +5124,13 @@
   2.531    {assume "\<not> (length ?B' \<le> length ?A')"
   2.532      hence q:"q=mirror ?q" and "B = ?A'" and d:"d = ?d"
   2.533        using qBd by (auto simp add: Let_def unit_def)
   2.534 -    with AA' mirror\<alpha>\<beta>[OF lq] A_nb have b:"?N ` (set B) = ?N ` set (\<beta> q)" 
   2.535 +    with AA' mirror_\<alpha>_\<beta>[OF lq] A_nb have b:"?N ` (set B) = ?N ` set (\<beta> q)" 
   2.536        and bn: "\<forall>b\<in> set B. numbound0 b" by simp+
   2.537      from mirror_ex[OF lq] pq_ex q 
   2.538      have pqm_eq:"(\<exists> (x::int). ?I x p) = (\<exists> (x::int). ?I x q)" by simp
   2.539 -    from lq uq q mirror_d\<beta> [where p="?q" and bs="bs" and a="real i"]
   2.540 -    have lq': "iszlfm q (real i#bs)" and uq: "d\<beta> q 1" by auto
   2.541 -    from \<delta>[OF lq'] mirror_\<delta>[OF lq] q d have dq:"d\<delta> q d " by auto
   2.542 +    from lq uq q mirror_d_\<beta> [where p="?q" and bs="bs" and a="real i"]
   2.543 +    have lq': "iszlfm q (real i#bs)" and uq: "d_\<beta> q 1" by auto
   2.544 +    from \<delta>[OF lq'] mirror_\<delta>[OF lq] q d have dq:"d_\<delta> q d " by auto
   2.545      from pqm_eq b bn uq lq' dp dq q dp d have ?thes by simp
   2.546    }
   2.547    ultimately show ?thes by blast
   2.548 @@ -5168,7 +5168,7 @@
   2.549    have qbf:"unit p = (?q,?B,?d)" by simp
   2.550    from unit[OF qf qbf] have pq_ex: "(\<exists>(x::int). ?I x p) = (\<exists> (x::int). ?I x ?q)" and 
   2.551      B:"?N ` set ?B = ?N ` set (\<beta> ?q)" and 
   2.552 -    uq:"d\<beta> ?q 1" and dd: "d\<delta> ?q ?d" and dp: "?d > 0" and 
   2.553 +    uq:"d_\<beta> ?q 1" and dd: "d_\<delta> ?q ?d" and dp: "?d > 0" and 
   2.554      lq: "iszlfm ?q (real i#bs)" and 
   2.555      Bn: "\<forall> b\<in> set ?B. numbound0 b" by auto
   2.556    from zlin_qfree[OF lq] have qfq: "qfree ?q" .
   2.557 @@ -5231,14 +5231,14 @@
   2.558  
   2.559      (* Redy and Loveland *)
   2.560  
   2.561 -lemma \<sigma>\<rho>_cong: assumes lp: "iszlfm p (a#bs)" and tt': "Inum (a#bs) t = Inum (a#bs) t'"
   2.562 -  shows "Ifm (a#bs) (\<sigma>\<rho> p (t,c)) = Ifm (a#bs) (\<sigma>\<rho> p (t',c))"
   2.563 +lemma \<sigma>_\<rho>_cong: assumes lp: "iszlfm p (a#bs)" and tt': "Inum (a#bs) t = Inum (a#bs) t'"
   2.564 +  shows "Ifm (a#bs) (\<sigma>_\<rho> p (t,c)) = Ifm (a#bs) (\<sigma>_\<rho> p (t',c))"
   2.565    using lp 
   2.566    by (induct p rule: iszlfm.induct, auto simp add: tt')
   2.567  
   2.568  lemma \<sigma>_cong: assumes lp: "iszlfm p (a#bs)" and tt': "Inum (a#bs) t = Inum (a#bs) t'"
   2.569    shows "Ifm (a#bs) (\<sigma> p c t) = Ifm (a#bs) (\<sigma> p c t')"
   2.570 -  by (simp add: \<sigma>_def tt' \<sigma>\<rho>_cong[OF lp tt'])
   2.571 +  by (simp add: \<sigma>_def tt' \<sigma>_\<rho>_cong[OF lp tt'])
   2.572  
   2.573  lemma \<rho>_cong: assumes lp: "iszlfm p (a#bs)" 
   2.574    and RR: "(\<lambda>(b,k). (Inum (a#bs) b,k)) ` R =  (\<lambda>(b,k). (Inum (a#bs) b,k)) ` set (\<rho> p)"
   2.575 @@ -5284,7 +5284,7 @@
   2.576  definition chooset :: "fm \<Rightarrow> fm \<times> ((num\<times>int) list) \<times> int" where
   2.577    "chooset p \<equiv> (let q = zlfm p ; d = \<delta> q;
   2.578               B = remdups (map (\<lambda> (t,k). (simpnum t,k)) (\<rho> q)) ; 
   2.579 -             a = remdups (map (\<lambda> (t,k). (simpnum t,k)) (\<alpha>\<rho> q))
   2.580 +             a = remdups (map (\<lambda> (t,k). (simpnum t,k)) (\<alpha>_\<rho> q))
   2.581               in if length B \<le> length a then (q,B,d) else (mirror q, a,d))"
   2.582  
   2.583  lemma chooset: assumes qf: "qfree p"
   2.584 @@ -5299,8 +5299,8 @@
   2.585    let ?B = "set (\<rho> ?q)"
   2.586    let ?f = "\<lambda> (t,k). (simpnum t,k)"
   2.587    let ?B'= "remdups (map ?f (\<rho> ?q))"
   2.588 -  let ?A = "set (\<alpha>\<rho> ?q)"
   2.589 -  let ?A'= "remdups (map ?f (\<alpha>\<rho> ?q))"
   2.590 +  let ?A = "set (\<alpha>_\<rho> ?q)"
   2.591 +  let ?A'= "remdups (map ?f (\<alpha>_\<rho> ?q))"
   2.592    from conjunct1[OF zlfm_I[OF qf, where bs="bs"]] 
   2.593    have pp': "\<forall> i. ?I i ?q = ?I i p" by auto
   2.594    hence pq_ex:"(\<exists> (x::int). ?I x p) = (\<exists> x. ?I x ?q)" by simp 
   2.595 @@ -5318,7 +5318,7 @@
   2.596    finally have AA': "?N ` set ?A' = ?N ` ?A" .
   2.597    from \<rho>_l[OF lq] have B_nb:"\<forall> (e,c)\<in> set ?B'. numbound0 e \<and> c > 0"
   2.598      by (simp add: simpnum_numbound0 split_def)
   2.599 -  from \<alpha>\<rho>_l[OF lq] have A_nb: "\<forall> (e,c)\<in> set ?A'. numbound0 e \<and> c > 0"
   2.600 +  from \<alpha>_\<rho>_l[OF lq] have A_nb: "\<forall> (e,c)\<in> set ?A'. numbound0 e \<and> c > 0"
   2.601      by (simp add: simpnum_numbound0 split_def)
   2.602      {assume "length ?B' \<le> length ?A'"
   2.603      hence q:"q=?q" and "B = ?B'" and d:"d = ?d"
   2.604 @@ -5330,7 +5330,7 @@
   2.605    {assume "\<not> (length ?B' \<le> length ?A')"
   2.606      hence q:"q=mirror ?q" and "B = ?A'" and d:"d = ?d"
   2.607        using qBd by (auto simp add: Let_def chooset_def)
   2.608 -    with AA' mirror_\<alpha>\<rho>[OF lq] A_nb have b:"?N ` (set B) = ?N ` set (\<rho> q)" 
   2.609 +    with AA' mirror_\<alpha>_\<rho>[OF lq] A_nb have b:"?N ` (set B) = ?N ` set (\<rho> q)" 
   2.610        and bn: "\<forall>(e,c)\<in> set B. numbound0 e \<and> c > 0" by auto 
   2.611      from mirror_ex[OF lq] pq_ex q 
   2.612      have pqm_eq:"(\<exists> (x::int). ?I x p) = (\<exists> (x::int). ?I x q)" by simp
     3.1 --- a/src/HOL/Matrix_LP/LP.thy	Wed Nov 28 15:38:12 2012 +0100
     3.2 +++ b/src/HOL/Matrix_LP/LP.thy	Wed Nov 28 15:59:18 2012 +0100
     3.3 @@ -19,12 +19,12 @@
     3.4    assumes
     3.5    "A * x \<le> (b::'a::lattice_ring)"
     3.6    "0 \<le> y"
     3.7 -  "abs (A - A') \<le> \<delta>A"
     3.8 +  "abs (A - A') \<le> \<delta>_A"
     3.9    "b \<le> b'"
    3.10 -  "abs (c - c') \<le> \<delta>c"
    3.11 +  "abs (c - c') \<le> \<delta>_c"
    3.12    "abs x \<le> r"
    3.13    shows
    3.14 -  "c * x \<le> y * b' + (y * \<delta>A + abs (y * A' - c') + \<delta>c) * r"
    3.15 +  "c * x \<le> y * b' + (y * \<delta>_A + abs (y * A' - c') + \<delta>_c) * r"
    3.16  proof -
    3.17    from assms have 1: "y * b <= y * b'" by (simp add: mult_left_mono)
    3.18    from assms have 2: "y * (A * x) <= y * b" by (simp add: mult_left_mono) 
    3.19 @@ -43,20 +43,20 @@
    3.20    have 10: "c'-c = -(c-c')" by (simp add: algebra_simps)
    3.21    have 11: "abs (c'-c) = abs (c-c')" 
    3.22      by (subst 10, subst abs_minus_cancel, simp)
    3.23 -  have 12: "(abs y * abs (A-A') + abs (y*A'-c') + abs (c'-c)) * abs x <= (abs y * abs (A-A') + abs (y*A'-c') + \<delta>c) * abs x"
    3.24 +  have 12: "(abs y * abs (A-A') + abs (y*A'-c') + abs (c'-c)) * abs x <= (abs y * abs (A-A') + abs (y*A'-c') + \<delta>_c) * abs x"
    3.25      by (simp add: 11 assms mult_right_mono)
    3.26 -  have 13: "(abs y * abs (A-A') + abs (y*A'-c') + \<delta>c) * abs x <= (abs y * \<delta>A + abs (y*A'-c') + \<delta>c) * abs x"
    3.27 +  have 13: "(abs y * abs (A-A') + abs (y*A'-c') + \<delta>_c) * abs x <= (abs y * \<delta>_A + abs (y*A'-c') + \<delta>_c) * abs x"
    3.28      by (simp add: assms mult_right_mono mult_left_mono)  
    3.29 -  have r: "(abs y * \<delta>A + abs (y*A'-c') + \<delta>c) * abs x <=  (abs y * \<delta>A + abs (y*A'-c') + \<delta>c) * r"
    3.30 +  have r: "(abs y * \<delta>_A + abs (y*A'-c') + \<delta>_c) * abs x <=  (abs y * \<delta>_A + abs (y*A'-c') + \<delta>_c) * r"
    3.31      apply (rule mult_left_mono)
    3.32      apply (simp add: assms)
    3.33      apply (rule_tac add_mono[of "0::'a" _ "0", simplified])+
    3.34 -    apply (rule mult_left_mono[of "0" "\<delta>A", simplified])
    3.35 +    apply (rule mult_left_mono[of "0" "\<delta>_A", simplified])
    3.36      apply (simp_all)
    3.37      apply (rule order_trans[where y="abs (A-A')"], simp_all add: assms)
    3.38      apply (rule order_trans[where y="abs (c-c')"], simp_all add: assms)
    3.39      done    
    3.40 -  from 6 7 8 9 12 13 r have 14:" abs((y * (A - A') + (y * A' - c') + (c'-c)) * x) <=(abs y * \<delta>A + abs (y*A'-c') + \<delta>c) * r"     
    3.41 +  from 6 7 8 9 12 13 r have 14:" abs((y * (A - A') + (y * A' - c') + (c'-c)) * x) <=(abs y * \<delta>_A + abs (y*A'-c') + \<delta>_c) * r"     
    3.42      by (simp)
    3.43    show ?thesis
    3.44      apply (rule le_add_right_mono[of _ _ "abs((y * (A - A') + (y * A' - c') + (c'-c)) * x)"])
     4.1 --- a/src/HOL/Multivariate_Analysis/Finite_Cartesian_Product.thy	Wed Nov 28 15:38:12 2012 +0100
     4.2 +++ b/src/HOL/Multivariate_Analysis/Finite_Cartesian_Product.thy	Wed Nov 28 15:59:18 2012 +0100
     4.3 @@ -527,16 +527,16 @@
     4.4  lemma pi'_range[intro]: "\<And>i::'n. \<pi>' i < CARD('n::finite)"
     4.5    using bij_betw_pi' unfolding bij_betw_def by auto
     4.6  
     4.7 -lemma \<pi>\<pi>'[simp]: "\<And>i::'n::finite. \<pi> (\<pi>' i) = i"
     4.8 +lemma pi_pi'[simp]: "\<And>i::'n::finite. \<pi> (\<pi>' i) = i"
     4.9    using bij_betw_pi by (auto intro!: f_inv_into_f simp: \<pi>'_def bij_betw_def)
    4.10  
    4.11 -lemma \<pi>'\<pi>[simp]: "\<And>i. i\<in>{..<CARD('n::finite)} \<Longrightarrow> \<pi>' (\<pi> i::'n) = i"
    4.12 +lemma pi'_pi[simp]: "\<And>i. i\<in>{..<CARD('n::finite)} \<Longrightarrow> \<pi>' (\<pi> i::'n) = i"
    4.13    using bij_betw_pi by (auto intro!: inv_into_f_eq simp: \<pi>'_def bij_betw_def)
    4.14  
    4.15 -lemma \<pi>\<pi>'_alt[simp]: "\<And>i. i<CARD('n::finite) \<Longrightarrow> \<pi>' (\<pi> i::'n) = i"
    4.16 +lemma pi_pi'_alt[simp]: "\<And>i. i<CARD('n::finite) \<Longrightarrow> \<pi>' (\<pi> i::'n) = i"
    4.17    by auto
    4.18  
    4.19 -lemma \<pi>_inj_on: "inj_on (\<pi>::nat\<Rightarrow>'n::finite) {..<CARD('n)}"
    4.20 +lemma pi_inj_on: "inj_on (\<pi>::nat\<Rightarrow>'n::finite) {..<CARD('n)}"
    4.21    using bij_betw_pi[where 'n='n] by (simp add: bij_betw_def)
    4.22  
    4.23  instantiation vec :: (euclidean_space, finite) euclidean_space
     5.1 --- a/src/HOL/Multivariate_Analysis/Integration.thy	Wed Nov 28 15:38:12 2012 +0100
     5.2 +++ b/src/HOL/Multivariate_Analysis/Integration.thy	Wed Nov 28 15:59:18 2012 +0100
     5.3 @@ -867,11 +867,11 @@
     5.4    guess \<pi> using ex_bij_betw_nat_finite_1[OF finite_lessThan[of "DIM('a)"]] .. note \<pi>=this
     5.5    def \<pi>' \<equiv> "inv_into {1..n} \<pi>"
     5.6    have \<pi>':"bij_betw \<pi>' {..<DIM('a)} {1..n}" using bij_betw_inv_into[OF \<pi>] unfolding \<pi>'_def n_def by auto
     5.7 -  hence \<pi>'i:"\<And>i. i<DIM('a) \<Longrightarrow> \<pi>' i \<in> {1..n}" unfolding bij_betw_def by auto 
     5.8 -  have \<pi>i:"\<And>i. i\<in>{1..n} \<Longrightarrow> \<pi> i <DIM('a)" using \<pi> unfolding bij_betw_def n_def by auto 
     5.9 -  have \<pi>\<pi>'[simp]:"\<And>i. i<DIM('a) \<Longrightarrow> \<pi> (\<pi>' i) = i" unfolding \<pi>'_def
    5.10 +  hence \<pi>'_i:"\<And>i. i<DIM('a) \<Longrightarrow> \<pi>' i \<in> {1..n}" unfolding bij_betw_def by auto 
    5.11 +  have \<pi>_i:"\<And>i. i\<in>{1..n} \<Longrightarrow> \<pi> i <DIM('a)" using \<pi> unfolding bij_betw_def n_def by auto 
    5.12 +  have \<pi>_\<pi>'[simp]:"\<And>i. i<DIM('a) \<Longrightarrow> \<pi> (\<pi>' i) = i" unfolding \<pi>'_def
    5.13      apply(rule f_inv_into_f) unfolding n_def using \<pi> unfolding bij_betw_def by auto
    5.14 -  have \<pi>'\<pi>[simp]:"\<And>i. i\<in>{1..n} \<Longrightarrow> \<pi>' (\<pi> i) = i" unfolding \<pi>'_def apply(rule inv_into_f_eq)
    5.15 +  have \<pi>'_\<pi>[simp]:"\<And>i. i\<in>{1..n} \<Longrightarrow> \<pi>' (\<pi> i) = i" unfolding \<pi>'_def apply(rule inv_into_f_eq)
    5.16      using \<pi> unfolding n_def bij_betw_def by auto
    5.17    have "{c..d} \<noteq> {}" using assms by auto
    5.18    let ?p1 = "\<lambda>l. {(\<chi>\<chi> i. if \<pi>' i < l then c$$i else a$$i)::'a .. (\<chi>\<chi> i. if \<pi>' i < l then d$$i else if \<pi>' i = l then c$$\<pi> l else b$$i)}"
    5.19 @@ -943,47 +943,47 @@
    5.20        assume "l \<le> l'" fix x
    5.21        have "x \<notin> interior k \<inter> interior k'" 
    5.22        proof(rule,cases "l' = n+1") assume x:"x \<in> interior k \<inter> interior k'"
    5.23 -        case True hence "\<And>i. i<DIM('a) \<Longrightarrow> \<pi>' i < l'" using \<pi>'i using l' by(auto simp add:less_Suc_eq_le)
    5.24 +        case True hence "\<And>i. i<DIM('a) \<Longrightarrow> \<pi>' i < l'" using \<pi>'_i using l' by(auto simp add:less_Suc_eq_le)
    5.25          hence *:"\<And> P Q. (\<chi>\<chi> i. if \<pi>' i < l' then P i else Q i) = ((\<chi>\<chi> i. P i)::'a)" apply-apply(subst euclidean_eq) by auto
    5.26          hence k':"k' = {c..d}" using l'(1) unfolding * by auto
    5.27          have ln:"l < n + 1" 
    5.28          proof(rule ccontr) case goal1 hence l2:"l = n+1" using l by auto
    5.29 -          hence "\<And>i. i<DIM('a) \<Longrightarrow> \<pi>' i < l" using \<pi>'i by(auto simp add:less_Suc_eq_le)
    5.30 +          hence "\<And>i. i<DIM('a) \<Longrightarrow> \<pi>' i < l" using \<pi>'_i by(auto simp add:less_Suc_eq_le)
    5.31            hence *:"\<And> P Q. (\<chi>\<chi> i. if \<pi>' i < l then P i else Q i) = ((\<chi>\<chi> i. P i)::'a)" apply-apply(subst euclidean_eq) by auto
    5.32 -          hence "k = {c..d}" using l(1) \<pi>'i unfolding * by(auto)
    5.33 +          hence "k = {c..d}" using l(1) \<pi>'_i unfolding * by(auto)
    5.34            thus False using `k\<noteq>k'` k' by auto
    5.35 -        qed have **:"\<pi>' (\<pi> l) = l" using \<pi>'\<pi>[of l] using l ln by auto
    5.36 +        qed have **:"\<pi>' (\<pi> l) = l" using \<pi>'_\<pi>[of l] using l ln by auto
    5.37          have "x $$ \<pi> l < c $$ \<pi> l \<or> d $$ \<pi> l < x $$ \<pi> l" using l(1) apply-
    5.38          proof(erule disjE)
    5.39            assume as:"k = ?p1 l" note * = conjunct1[OF x[unfolded as Int_iff interior_closed_interval mem_interval],rule_format]
    5.40 -          show ?thesis using *[of "\<pi> l"] using ln l(2) using \<pi>i[of l] by(auto simp add:** not_less)
    5.41 +          show ?thesis using *[of "\<pi> l"] using ln l(2) using \<pi>_i[of l] by(auto simp add:** not_less)
    5.42          next assume as:"k = ?p2 l" note * = conjunct1[OF x[unfolded as Int_iff interior_closed_interval mem_interval],rule_format]
    5.43 -          show ?thesis using *[of "\<pi> l"] using ln l(2) using \<pi>i[of l] unfolding ** by auto
    5.44 +          show ?thesis using *[of "\<pi> l"] using ln l(2) using \<pi>_i[of l] unfolding ** by auto
    5.45          qed thus False using x unfolding k' unfolding Int_iff interior_closed_interval mem_interval
    5.46            by(auto elim!:allE[where x="\<pi> l"])
    5.47        next case False hence "l < n + 1" using l'(2) using `l\<le>l'` by auto
    5.48          hence ln:"l \<in> {1..n}" "l' \<in> {1..n}" using l l' False by auto
    5.49 -        note \<pi>l = \<pi>'\<pi>[OF ln(1)] \<pi>'\<pi>[OF ln(2)]
    5.50 +        note \<pi>_l = \<pi>'_\<pi>[OF ln(1)] \<pi>'_\<pi>[OF ln(2)]
    5.51          assume x:"x \<in> interior k \<inter> interior k'"
    5.52          show False using l(1) l'(1) apply-
    5.53          proof(erule_tac[!] disjE)+
    5.54            assume as:"k = ?p1 l" "k' = ?p1 l'"
    5.55            note * = conjunctD2[OF x[unfolded as Int_iff interior_closed_interval mem_interval],rule_format]
    5.56            have "l \<noteq> l'" using k'(2)[unfolded as] by auto
    5.57 -          thus False using *[of "\<pi> l'"] *[of "\<pi> l"] ln using \<pi>i[OF ln(1)] \<pi>i[OF ln(2)] apply(cases "l<l'")
    5.58 -            by(auto simp add:euclidean_lambda_beta' \<pi>l \<pi>i n_def)
    5.59 +          thus False using *[of "\<pi> l'"] *[of "\<pi> l"] ln using \<pi>_i[OF ln(1)] \<pi>_i[OF ln(2)] apply(cases "l<l'")
    5.60 +            by(auto simp add:euclidean_lambda_beta' \<pi>_l \<pi>_i n_def)
    5.61          next assume as:"k = ?p2 l" "k' = ?p2 l'"
    5.62            note * = conjunctD2[OF x[unfolded as Int_iff interior_closed_interval mem_interval],rule_format]
    5.63            have "l \<noteq> l'" apply(rule) using k'(2)[unfolded as] by auto
    5.64 -          thus False using *[of "\<pi> l"] *[of "\<pi> l'"]  `l \<le> l'` ln by(auto simp add:euclidean_lambda_beta' \<pi>l \<pi>i n_def)
    5.65 +          thus False using *[of "\<pi> l"] *[of "\<pi> l'"]  `l \<le> l'` ln by(auto simp add:euclidean_lambda_beta' \<pi>_l \<pi>_i n_def)
    5.66          next assume as:"k = ?p1 l" "k' = ?p2 l'"
    5.67            note * = conjunctD2[OF x[unfolded as Int_iff interior_closed_interval mem_interval],rule_format]
    5.68            show False using abcd[of "\<pi> l'"] using *[of "\<pi> l"] *[of "\<pi> l'"]  `l \<le> l'` ln apply(cases "l=l'")
    5.69 -            by(auto simp add:euclidean_lambda_beta' \<pi>l \<pi>i n_def)
    5.70 +            by(auto simp add:euclidean_lambda_beta' \<pi>_l \<pi>_i n_def)
    5.71          next assume as:"k = ?p2 l" "k' = ?p1 l'"
    5.72            note * = conjunctD2[OF x[unfolded as Int_iff interior_closed_interval mem_interval],rule_format]
    5.73            show False using *[of "\<pi> l"] *[of "\<pi> l'"] ln `l \<le> l'` apply(cases "l=l'") using abcd[of "\<pi> l'"] 
    5.74 -            by(auto simp add:euclidean_lambda_beta' \<pi>l \<pi>i n_def)
    5.75 +            by(auto simp add:euclidean_lambda_beta' \<pi>_l \<pi>_i n_def)
    5.76          qed qed } 
    5.77      from this[OF k l k' l'] this[OF k'(1) l' k _ l] have "\<And>x. x \<notin> interior k \<inter> interior k'"
    5.78        apply - apply(cases "l' \<le> l") using k'(2) by auto            
     6.1 --- a/src/HOL/Nominal/Examples/Class3.thy	Wed Nov 28 15:38:12 2012 +0100
     6.2 +++ b/src/HOL/Nominal/Examples/Class3.thy	Wed Nov 28 15:59:18 2012 +0100
     6.3 @@ -3091,22 +3091,22 @@
     6.4   findn :: "(name\<times>coname\<times>trm) list\<Rightarrow>name\<Rightarrow>(coname\<times>trm) option"
     6.5  where
     6.6    "findn [] x = None"
     6.7 -| "findn ((y,c,P)#\<theta>n) x = (if y=x then Some (c,P) else findn \<theta>n x)"
     6.8 +| "findn ((y,c,P)#\<theta>_n) x = (if y=x then Some (c,P) else findn \<theta>_n x)"
     6.9  
    6.10  lemma findn_eqvt[eqvt]:
    6.11    fixes pi1::"name prm"
    6.12    and   pi2::"coname prm"
    6.13 -  shows "(pi1\<bullet>findn \<theta>n x) = findn (pi1\<bullet>\<theta>n) (pi1\<bullet>x)" 
    6.14 -  and   "(pi2\<bullet>findn \<theta>n x) = findn (pi2\<bullet>\<theta>n) (pi2\<bullet>x)"
    6.15 -apply(induct \<theta>n)
    6.16 +  shows "(pi1\<bullet>findn \<theta>_n x) = findn (pi1\<bullet>\<theta>_n) (pi1\<bullet>x)" 
    6.17 +  and   "(pi2\<bullet>findn \<theta>_n x) = findn (pi2\<bullet>\<theta>_n) (pi2\<bullet>x)"
    6.18 +apply(induct \<theta>_n)
    6.19  apply(auto simp add: perm_bij) 
    6.20  done
    6.21  
    6.22  lemma findn_fresh:
    6.23 -  assumes a: "x\<sharp>\<theta>n"
    6.24 -  shows "findn \<theta>n x = None"
    6.25 +  assumes a: "x\<sharp>\<theta>_n"
    6.26 +  shows "findn \<theta>_n x = None"
    6.27  using a
    6.28 -apply(induct \<theta>n)
    6.29 +apply(induct \<theta>_n)
    6.30  apply(auto simp add: fresh_list_cons fresh_atm fresh_prod)
    6.31  done
    6.32  
    6.33 @@ -3114,38 +3114,38 @@
    6.34   findc :: "(coname\<times>name\<times>trm) list\<Rightarrow>coname\<Rightarrow>(name\<times>trm) option"
    6.35  where
    6.36    "findc [] x = None"
    6.37 -| "findc ((c,y,P)#\<theta>c) a = (if a=c then Some (y,P) else findc \<theta>c a)"
    6.38 +| "findc ((c,y,P)#\<theta>_c) a = (if a=c then Some (y,P) else findc \<theta>_c a)"
    6.39  
    6.40  lemma findc_eqvt[eqvt]:
    6.41    fixes pi1::"name prm"
    6.42    and   pi2::"coname prm"
    6.43 -  shows "(pi1\<bullet>findc \<theta>c a) = findc (pi1\<bullet>\<theta>c) (pi1\<bullet>a)" 
    6.44 -  and   "(pi2\<bullet>findc \<theta>c a) = findc (pi2\<bullet>\<theta>c) (pi2\<bullet>a)"
    6.45 -apply(induct \<theta>c)
    6.46 +  shows "(pi1\<bullet>findc \<theta>_c a) = findc (pi1\<bullet>\<theta>_c) (pi1\<bullet>a)" 
    6.47 +  and   "(pi2\<bullet>findc \<theta>_c a) = findc (pi2\<bullet>\<theta>_c) (pi2\<bullet>a)"
    6.48 +apply(induct \<theta>_c)
    6.49  apply(auto simp add: perm_bij) 
    6.50  done
    6.51  
    6.52  lemma findc_fresh:
    6.53 -  assumes a: "a\<sharp>\<theta>c"
    6.54 -  shows "findc \<theta>c a = None"
    6.55 +  assumes a: "a\<sharp>\<theta>_c"
    6.56 +  shows "findc \<theta>_c a = None"
    6.57  using a
    6.58 -apply(induct \<theta>c)
    6.59 +apply(induct \<theta>_c)
    6.60  apply(auto simp add: fresh_list_cons fresh_atm fresh_prod)
    6.61  done
    6.62  
    6.63  abbreviation 
    6.64   nmaps :: "(name\<times>coname\<times>trm) list \<Rightarrow> name \<Rightarrow> (coname\<times>trm) option \<Rightarrow> bool" ("_ nmaps _ to _" [55,55,55] 55) 
    6.65  where
    6.66 - "\<theta>n nmaps x to P \<equiv> (findn \<theta>n x) = P"
    6.67 + "\<theta>_n nmaps x to P \<equiv> (findn \<theta>_n x) = P"
    6.68  
    6.69  abbreviation 
    6.70   cmaps :: "(coname\<times>name\<times>trm) list \<Rightarrow> coname \<Rightarrow> (name\<times>trm) option \<Rightarrow> bool" ("_ cmaps _ to _" [55,55,55] 55) 
    6.71  where
    6.72 - "\<theta>c cmaps a to P \<equiv> (findc \<theta>c a) = P"
    6.73 + "\<theta>_c cmaps a to P \<equiv> (findc \<theta>_c a) = P"
    6.74  
    6.75  lemma nmaps_fresh:
    6.76 -  shows "\<theta>n nmaps x to Some (c,P) \<Longrightarrow> a\<sharp>\<theta>n \<Longrightarrow> a\<sharp>(c,P)"
    6.77 -apply(induct \<theta>n)
    6.78 +  shows "\<theta>_n nmaps x to Some (c,P) \<Longrightarrow> a\<sharp>\<theta>_n \<Longrightarrow> a\<sharp>(c,P)"
    6.79 +apply(induct \<theta>_n)
    6.80  apply(auto simp add: fresh_list_cons fresh_prod fresh_atm)
    6.81  apply(case_tac "aa=x")
    6.82  apply(auto)
    6.83 @@ -3154,8 +3154,8 @@
    6.84  done
    6.85  
    6.86  lemma cmaps_fresh:
    6.87 -  shows "\<theta>c cmaps a to Some (y,P) \<Longrightarrow> x\<sharp>\<theta>c \<Longrightarrow> x\<sharp>(y,P)"
    6.88 -apply(induct \<theta>c)
    6.89 +  shows "\<theta>_c cmaps a to Some (y,P) \<Longrightarrow> x\<sharp>\<theta>_c \<Longrightarrow> x\<sharp>(y,P)"
    6.90 +apply(induct \<theta>_c)
    6.91  apply(auto simp add: fresh_list_cons fresh_prod fresh_atm)
    6.92  apply(case_tac "a=aa")
    6.93  apply(auto)
    6.94 @@ -3164,14 +3164,14 @@
    6.95  done
    6.96  
    6.97  lemma nmaps_false:
    6.98 -  shows "\<theta>n nmaps x to Some (c,P) \<Longrightarrow> x\<sharp>\<theta>n \<Longrightarrow> False"
    6.99 -apply(induct \<theta>n)
   6.100 +  shows "\<theta>_n nmaps x to Some (c,P) \<Longrightarrow> x\<sharp>\<theta>_n \<Longrightarrow> False"
   6.101 +apply(induct \<theta>_n)
   6.102  apply(auto simp add: fresh_list_cons fresh_prod fresh_atm)
   6.103  done
   6.104  
   6.105  lemma cmaps_false:
   6.106 -  shows "\<theta>c cmaps c to Some (x,P) \<Longrightarrow> c\<sharp>\<theta>c \<Longrightarrow> False"
   6.107 -apply(induct \<theta>c)
   6.108 +  shows "\<theta>_c cmaps c to Some (x,P) \<Longrightarrow> c\<sharp>\<theta>_c \<Longrightarrow> False"
   6.109 +apply(induct \<theta>_c)
   6.110  apply(auto simp add: fresh_list_cons fresh_prod fresh_atm)
   6.111  done
   6.112  
   6.113 @@ -3179,25 +3179,25 @@
   6.114   lookupa :: "name\<Rightarrow>coname\<Rightarrow>(coname\<times>name\<times>trm) list\<Rightarrow>trm"
   6.115  where
   6.116    "lookupa x a [] = Ax x a"
   6.117 -| "lookupa x a ((c,y,P)#\<theta>c) = (if a=c then Cut <a>.Ax x a (y).P else lookupa x a \<theta>c)"
   6.118 +| "lookupa x a ((c,y,P)#\<theta>_c) = (if a=c then Cut <a>.Ax x a (y).P else lookupa x a \<theta>_c)"
   6.119  
   6.120  lemma lookupa_eqvt[eqvt]:
   6.121    fixes pi1::"name prm"
   6.122    and   pi2::"coname prm"
   6.123 -  shows "(pi1\<bullet>(lookupa x a \<theta>c)) = lookupa (pi1\<bullet>x) (pi1\<bullet>a) (pi1\<bullet>\<theta>c)"
   6.124 -  and   "(pi2\<bullet>(lookupa x a \<theta>c)) = lookupa (pi2\<bullet>x) (pi2\<bullet>a) (pi2\<bullet>\<theta>c)"
   6.125 +  shows "(pi1\<bullet>(lookupa x a \<theta>_c)) = lookupa (pi1\<bullet>x) (pi1\<bullet>a) (pi1\<bullet>\<theta>_c)"
   6.126 +  and   "(pi2\<bullet>(lookupa x a \<theta>_c)) = lookupa (pi2\<bullet>x) (pi2\<bullet>a) (pi2\<bullet>\<theta>_c)"
   6.127  apply -
   6.128 -apply(induct \<theta>c)
   6.129 +apply(induct \<theta>_c)
   6.130  apply(auto simp add: eqvts)
   6.131 -apply(induct \<theta>c)
   6.132 +apply(induct \<theta>_c)
   6.133  apply(auto simp add: eqvts)
   6.134  done
   6.135  
   6.136  lemma lookupa_fire:
   6.137 -  assumes a: "\<theta>c cmaps a to Some (y,P)"
   6.138 -  shows "(lookupa x a \<theta>c) = Cut <a>.Ax x a (y).P"
   6.139 +  assumes a: "\<theta>_c cmaps a to Some (y,P)"
   6.140 +  shows "(lookupa x a \<theta>_c) = Cut <a>.Ax x a (y).P"
   6.141  using a
   6.142 -apply(induct \<theta>c arbitrary: x a y P)
   6.143 +apply(induct \<theta>_c arbitrary: x a y P)
   6.144  apply(auto)
   6.145  done
   6.146  
   6.147 @@ -3205,35 +3205,35 @@
   6.148   lookupb :: "name\<Rightarrow>coname\<Rightarrow>(coname\<times>name\<times>trm) list\<Rightarrow>coname\<Rightarrow>trm\<Rightarrow>trm"
   6.149  where
   6.150    "lookupb x a [] c P = Cut <c>.P (x).Ax x a"
   6.151 -| "lookupb x a ((d,y,N)#\<theta>c) c P = (if a=d then Cut <c>.P (y).N  else lookupb x a \<theta>c c P)"
   6.152 +| "lookupb x a ((d,y,N)#\<theta>_c) c P = (if a=d then Cut <c>.P (y).N  else lookupb x a \<theta>_c c P)"
   6.153  
   6.154  lemma lookupb_eqvt[eqvt]:
   6.155    fixes pi1::"name prm"
   6.156    and   pi2::"coname prm"
   6.157 -  shows "(pi1\<bullet>(lookupb x a \<theta>c c P)) = lookupb (pi1\<bullet>x) (pi1\<bullet>a) (pi1\<bullet>\<theta>c) (pi1\<bullet>c) (pi1\<bullet>P)"
   6.158 -  and   "(pi2\<bullet>(lookupb x a \<theta>c c P)) = lookupb (pi2\<bullet>x) (pi2\<bullet>a) (pi2\<bullet>\<theta>c) (pi2\<bullet>c) (pi2\<bullet>P)"
   6.159 +  shows "(pi1\<bullet>(lookupb x a \<theta>_c c P)) = lookupb (pi1\<bullet>x) (pi1\<bullet>a) (pi1\<bullet>\<theta>_c) (pi1\<bullet>c) (pi1\<bullet>P)"
   6.160 +  and   "(pi2\<bullet>(lookupb x a \<theta>_c c P)) = lookupb (pi2\<bullet>x) (pi2\<bullet>a) (pi2\<bullet>\<theta>_c) (pi2\<bullet>c) (pi2\<bullet>P)"
   6.161  apply -
   6.162 -apply(induct \<theta>c)
   6.163 +apply(induct \<theta>_c)
   6.164  apply(auto simp add: eqvts)
   6.165 -apply(induct \<theta>c)
   6.166 +apply(induct \<theta>_c)
   6.167  apply(auto simp add: eqvts)
   6.168  done
   6.169  
   6.170  fun 
   6.171    lookup :: "name\<Rightarrow>coname\<Rightarrow>(name\<times>coname\<times>trm) list\<Rightarrow>(coname\<times>name\<times>trm) list\<Rightarrow>trm"
   6.172  where
   6.173 -  "lookup x a [] \<theta>c = lookupa x a \<theta>c"
   6.174 -| "lookup x a ((y,c,P)#\<theta>n) \<theta>c = (if x=y then (lookupb x a \<theta>c c P) else lookup x a \<theta>n \<theta>c)"
   6.175 +  "lookup x a [] \<theta>_c = lookupa x a \<theta>_c"
   6.176 +| "lookup x a ((y,c,P)#\<theta>_n) \<theta>_c = (if x=y then (lookupb x a \<theta>_c c P) else lookup x a \<theta>_n \<theta>_c)"
   6.177  
   6.178  lemma lookup_eqvt[eqvt]:
   6.179    fixes pi1::"name prm"
   6.180    and   pi2::"coname prm"
   6.181 -  shows "(pi1\<bullet>(lookup x a \<theta>n \<theta>c)) = lookup (pi1\<bullet>x) (pi1\<bullet>a) (pi1\<bullet>\<theta>n) (pi1\<bullet>\<theta>c)"
   6.182 -  and   "(pi2\<bullet>(lookup x a \<theta>n \<theta>c)) = lookup (pi2\<bullet>x) (pi2\<bullet>a) (pi2\<bullet>\<theta>n) (pi2\<bullet>\<theta>c)"
   6.183 +  shows "(pi1\<bullet>(lookup x a \<theta>_n \<theta>_c)) = lookup (pi1\<bullet>x) (pi1\<bullet>a) (pi1\<bullet>\<theta>_n) (pi1\<bullet>\<theta>_c)"
   6.184 +  and   "(pi2\<bullet>(lookup x a \<theta>_n \<theta>_c)) = lookup (pi2\<bullet>x) (pi2\<bullet>a) (pi2\<bullet>\<theta>_n) (pi2\<bullet>\<theta>_c)"
   6.185  apply -
   6.186 -apply(induct \<theta>n)
   6.187 +apply(induct \<theta>_n)
   6.188  apply(auto simp add: eqvts)
   6.189 -apply(induct \<theta>n)
   6.190 +apply(induct \<theta>_n)
   6.191  apply(auto simp add: eqvts)
   6.192  done
   6.193  
   6.194 @@ -3241,17 +3241,17 @@
   6.195    lookupc :: "name\<Rightarrow>coname\<Rightarrow>(name\<times>coname\<times>trm) list\<Rightarrow>trm"
   6.196  where
   6.197    "lookupc x a [] = Ax x a"
   6.198 -| "lookupc x a ((y,c,P)#\<theta>n) = (if x=y then P[c\<turnstile>c>a] else lookupc x a \<theta>n)"
   6.199 +| "lookupc x a ((y,c,P)#\<theta>_n) = (if x=y then P[c\<turnstile>c>a] else lookupc x a \<theta>_n)"
   6.200  
   6.201  lemma lookupc_eqvt[eqvt]:
   6.202    fixes pi1::"name prm"
   6.203    and   pi2::"coname prm"
   6.204 -  shows "(pi1\<bullet>(lookupc x a \<theta>n)) = lookupc (pi1\<bullet>x) (pi1\<bullet>a) (pi1\<bullet>\<theta>n)"
   6.205 -  and   "(pi2\<bullet>(lookupc x a \<theta>n)) = lookupc (pi2\<bullet>x) (pi2\<bullet>a) (pi2\<bullet>\<theta>n)"
   6.206 +  shows "(pi1\<bullet>(lookupc x a \<theta>_n)) = lookupc (pi1\<bullet>x) (pi1\<bullet>a) (pi1\<bullet>\<theta>_n)"
   6.207 +  and   "(pi2\<bullet>(lookupc x a \<theta>_n)) = lookupc (pi2\<bullet>x) (pi2\<bullet>a) (pi2\<bullet>\<theta>_n)"
   6.208  apply -
   6.209 -apply(induct \<theta>n)
   6.210 +apply(induct \<theta>_n)
   6.211  apply(auto simp add: eqvts)
   6.212 -apply(induct \<theta>n)
   6.213 +apply(induct \<theta>_n)
   6.214  apply(auto simp add: eqvts)
   6.215  done
   6.216  
   6.217 @@ -3259,47 +3259,47 @@
   6.218    lookupd :: "name\<Rightarrow>coname\<Rightarrow>(coname\<times>name\<times>trm) list\<Rightarrow>trm"
   6.219  where
   6.220    "lookupd x a [] = Ax x a"
   6.221 -| "lookupd x a ((c,y,P)#\<theta>c) = (if a=c then P[y\<turnstile>n>x] else lookupd x a \<theta>c)"
   6.222 +| "lookupd x a ((c,y,P)#\<theta>_c) = (if a=c then P[y\<turnstile>n>x] else lookupd x a \<theta>_c)"
   6.223  
   6.224  lemma lookupd_eqvt[eqvt]:
   6.225    fixes pi1::"name prm"
   6.226    and   pi2::"coname prm"
   6.227 -  shows "(pi1\<bullet>(lookupd x a \<theta>n)) = lookupd (pi1\<bullet>x) (pi1\<bullet>a) (pi1\<bullet>\<theta>n)"
   6.228 -  and   "(pi2\<bullet>(lookupd x a \<theta>n)) = lookupd (pi2\<bullet>x) (pi2\<bullet>a) (pi2\<bullet>\<theta>n)"
   6.229 +  shows "(pi1\<bullet>(lookupd x a \<theta>_n)) = lookupd (pi1\<bullet>x) (pi1\<bullet>a) (pi1\<bullet>\<theta>_n)"
   6.230 +  and   "(pi2\<bullet>(lookupd x a \<theta>_n)) = lookupd (pi2\<bullet>x) (pi2\<bullet>a) (pi2\<bullet>\<theta>_n)"
   6.231  apply -
   6.232 -apply(induct \<theta>n)
   6.233 +apply(induct \<theta>_n)
   6.234  apply(auto simp add: eqvts)
   6.235 -apply(induct \<theta>n)
   6.236 +apply(induct \<theta>_n)
   6.237  apply(auto simp add: eqvts)
   6.238  done
   6.239  
   6.240  lemma lookupa_fresh:
   6.241 -  assumes a: "a\<sharp>\<theta>c"
   6.242 -  shows "lookupa y a \<theta>c = Ax y a"
   6.243 +  assumes a: "a\<sharp>\<theta>_c"
   6.244 +  shows "lookupa y a \<theta>_c = Ax y a"
   6.245  using a
   6.246 -apply(induct \<theta>c)
   6.247 +apply(induct \<theta>_c)
   6.248  apply(auto simp add: fresh_prod fresh_list_cons fresh_atm)
   6.249  done
   6.250  
   6.251  lemma lookupa_csubst:
   6.252 -  assumes a: "a\<sharp>\<theta>c"
   6.253 -  shows "Cut <a>.Ax y a (x).P = (lookupa y a \<theta>c){a:=(x).P}"
   6.254 +  assumes a: "a\<sharp>\<theta>_c"
   6.255 +  shows "Cut <a>.Ax y a (x).P = (lookupa y a \<theta>_c){a:=(x).P}"
   6.256  using a by (simp add: lookupa_fresh)
   6.257  
   6.258  lemma lookupa_freshness:
   6.259    fixes a::"coname"
   6.260    and   x::"name"
   6.261 -  shows "a\<sharp>(\<theta>c,c) \<Longrightarrow> a\<sharp>lookupa y c \<theta>c"
   6.262 -  and   "x\<sharp>(\<theta>c,y) \<Longrightarrow> x\<sharp>lookupa y c \<theta>c"
   6.263 -apply(induct \<theta>c)
   6.264 +  shows "a\<sharp>(\<theta>_c,c) \<Longrightarrow> a\<sharp>lookupa y c \<theta>_c"
   6.265 +  and   "x\<sharp>(\<theta>_c,y) \<Longrightarrow> x\<sharp>lookupa y c \<theta>_c"
   6.266 +apply(induct \<theta>_c)
   6.267  apply(auto simp add: fresh_prod fresh_list_cons abs_fresh fresh_atm)
   6.268  done
   6.269  
   6.270  lemma lookupa_unicity:
   6.271 -  assumes a: "lookupa x a \<theta>c= Ax y b" "b\<sharp>\<theta>c" "y\<sharp>\<theta>c"
   6.272 +  assumes a: "lookupa x a \<theta>_c= Ax y b" "b\<sharp>\<theta>_c" "y\<sharp>\<theta>_c"
   6.273    shows "x=y \<and> a=b"
   6.274  using a
   6.275 -apply(induct \<theta>c)
   6.276 +apply(induct \<theta>_c)
   6.277  apply(auto simp add: trm.inject fresh_list_cons fresh_prod fresh_atm)
   6.278  apply(case_tac "a=aa")
   6.279  apply(auto)
   6.280 @@ -3308,10 +3308,10 @@
   6.281  done
   6.282  
   6.283  lemma lookupb_csubst:
   6.284 -  assumes a: "a\<sharp>(\<theta>c,c,N)"
   6.285 -  shows "Cut <c>.N (x).P = (lookupb y a \<theta>c c N){a:=(x).P}"
   6.286 +  assumes a: "a\<sharp>(\<theta>_c,c,N)"
   6.287 +  shows "Cut <c>.N (x).P = (lookupb y a \<theta>_c c N){a:=(x).P}"
   6.288  using a
   6.289 -apply(induct \<theta>c)
   6.290 +apply(induct \<theta>_c)
   6.291  apply(auto simp add: fresh_list_cons fresh_atm fresh_prod)
   6.292  apply(rule sym)
   6.293  apply(generate_fresh "name")
   6.294 @@ -3337,17 +3337,17 @@
   6.295  lemma lookupb_freshness:
   6.296    fixes a::"coname"
   6.297    and   x::"name"
   6.298 -  shows "a\<sharp>(\<theta>c,c,b,P) \<Longrightarrow> a\<sharp>lookupb y c \<theta>c b P"
   6.299 -  and   "x\<sharp>(\<theta>c,y,P) \<Longrightarrow> x\<sharp>lookupb y c \<theta>c b P"
   6.300 -apply(induct \<theta>c)
   6.301 +  shows "a\<sharp>(\<theta>_c,c,b,P) \<Longrightarrow> a\<sharp>lookupb y c \<theta>_c b P"
   6.302 +  and   "x\<sharp>(\<theta>_c,y,P) \<Longrightarrow> x\<sharp>lookupb y c \<theta>_c b P"
   6.303 +apply(induct \<theta>_c)
   6.304  apply(auto simp add: fresh_prod fresh_list_cons abs_fresh fresh_atm)
   6.305  done
   6.306  
   6.307  lemma lookupb_unicity:
   6.308 -  assumes a: "lookupb x a \<theta>c c P = Ax y b" "b\<sharp>(\<theta>c,c,P)" "y\<sharp>\<theta>c"
   6.309 +  assumes a: "lookupb x a \<theta>_c c P = Ax y b" "b\<sharp>(\<theta>_c,c,P)" "y\<sharp>\<theta>_c"
   6.310    shows "x=y \<and> a=b"
   6.311  using a
   6.312 -apply(induct \<theta>c)
   6.313 +apply(induct \<theta>_c)
   6.314  apply(auto simp add: fresh_list_cons fresh_prod fresh_atm)
   6.315  apply(case_tac "a=aa")
   6.316  apply(auto)
   6.317 @@ -3356,10 +3356,10 @@
   6.318  done
   6.319  
   6.320  lemma lookupb_lookupa:
   6.321 -  assumes a: "x\<sharp>\<theta>c"
   6.322 -  shows "lookupb x c \<theta>c a P = (lookupa x c \<theta>c){x:=<a>.P}"
   6.323 +  assumes a: "x\<sharp>\<theta>_c"
   6.324 +  shows "lookupb x c \<theta>_c a P = (lookupa x c \<theta>_c){x:=<a>.P}"
   6.325  using a
   6.326 -apply(induct \<theta>c)
   6.327 +apply(induct \<theta>_c)
   6.328  apply(auto simp add: fresh_list_cons fresh_prod)
   6.329  apply(generate_fresh "coname")
   6.330  apply(generate_fresh "name")
   6.331 @@ -3383,10 +3383,10 @@
   6.332  done
   6.333  
   6.334  lemma lookup_csubst:
   6.335 -  assumes a: "a\<sharp>(\<theta>n,\<theta>c)"
   6.336 -  shows "lookup y c \<theta>n ((a,x,P)#\<theta>c) = (lookup y c \<theta>n \<theta>c){a:=(x).P}"
   6.337 +  assumes a: "a\<sharp>(\<theta>_n,\<theta>_c)"
   6.338 +  shows "lookup y c \<theta>_n ((a,x,P)#\<theta>_c) = (lookup y c \<theta>_n \<theta>_c){a:=(x).P}"
   6.339  using a
   6.340 -apply(induct \<theta>n)
   6.341 +apply(induct \<theta>_n)
   6.342  apply(auto simp add: fresh_prod fresh_list_cons)
   6.343  apply(simp add: lookupa_csubst)
   6.344  apply(simp add: lookupa_freshness forget fresh_atm fresh_prod)
   6.345 @@ -3396,18 +3396,18 @@
   6.346  done
   6.347  
   6.348  lemma lookup_fresh:
   6.349 -  assumes a: "x\<sharp>(\<theta>n,\<theta>c)"
   6.350 -  shows "lookup x c \<theta>n \<theta>c = lookupa x c \<theta>c"
   6.351 +  assumes a: "x\<sharp>(\<theta>_n,\<theta>_c)"
   6.352 +  shows "lookup x c \<theta>_n \<theta>_c = lookupa x c \<theta>_c"
   6.353  using a
   6.354 -apply(induct \<theta>n)
   6.355 +apply(induct \<theta>_n)
   6.356  apply(auto simp add: fresh_prod fresh_list_cons fresh_atm)
   6.357  done
   6.358  
   6.359  lemma lookup_unicity:
   6.360 -  assumes a: "lookup x a \<theta>n \<theta>c= Ax y b" "b\<sharp>(\<theta>c,\<theta>n)" "y\<sharp>(\<theta>c,\<theta>n)"
   6.361 +  assumes a: "lookup x a \<theta>_n \<theta>_c= Ax y b" "b\<sharp>(\<theta>_c,\<theta>_n)" "y\<sharp>(\<theta>_c,\<theta>_n)"
   6.362    shows "x=y \<and> a=b"
   6.363  using a
   6.364 -apply(induct \<theta>n)
   6.365 +apply(induct \<theta>_n)
   6.366  apply(auto simp add: trm.inject fresh_list_cons fresh_prod fresh_atm)
   6.367  apply(drule lookupa_unicity)
   6.368  apply(simp)+
   6.369 @@ -3430,9 +3430,9 @@
   6.370  lemma lookup_freshness:
   6.371    fixes a::"coname"
   6.372    and   x::"name"
   6.373 -  shows "a\<sharp>(c,\<theta>c,\<theta>n) \<Longrightarrow> a\<sharp>lookup y c \<theta>n \<theta>c"
   6.374 -  and   "x\<sharp>(y,\<theta>c,\<theta>n) \<Longrightarrow> x\<sharp>lookup y c \<theta>n \<theta>c"   
   6.375 -apply(induct \<theta>n)
   6.376 +  shows "a\<sharp>(c,\<theta>_c,\<theta>_n) \<Longrightarrow> a\<sharp>lookup y c \<theta>_n \<theta>_c"
   6.377 +  and   "x\<sharp>(y,\<theta>_c,\<theta>_n) \<Longrightarrow> x\<sharp>lookup y c \<theta>_n \<theta>_c"   
   6.378 +apply(induct \<theta>_n)
   6.379  apply(auto simp add: fresh_prod fresh_list_cons abs_fresh fresh_atm)
   6.380  apply(simp add: fresh_atm fresh_prod lookupa_freshness)
   6.381  apply(simp add: fresh_atm fresh_prod lookupa_freshness)
   6.382 @@ -3443,9 +3443,9 @@
   6.383  lemma lookupc_freshness:
   6.384    fixes a::"coname"
   6.385    and   x::"name"
   6.386 -  shows "a\<sharp>(\<theta>c,c) \<Longrightarrow> a\<sharp>lookupc y c \<theta>c"
   6.387 -  and   "x\<sharp>(\<theta>c,y) \<Longrightarrow> x\<sharp>lookupc y c \<theta>c"
   6.388 -apply(induct \<theta>c)
   6.389 +  shows "a\<sharp>(\<theta>_c,c) \<Longrightarrow> a\<sharp>lookupc y c \<theta>_c"
   6.390 +  and   "x\<sharp>(\<theta>_c,y) \<Longrightarrow> x\<sharp>lookupc y c \<theta>_c"
   6.391 +apply(induct \<theta>_c)
   6.392  apply(auto simp add: fresh_prod fresh_list_cons abs_fresh fresh_atm)
   6.393  apply(rule rename_fresh)
   6.394  apply(simp add: fresh_atm)
   6.395 @@ -3454,26 +3454,26 @@
   6.396  done
   6.397  
   6.398  lemma lookupc_fresh:
   6.399 -  assumes a: "y\<sharp>\<theta>n"
   6.400 -  shows "lookupc y a \<theta>n = Ax y a"
   6.401 +  assumes a: "y\<sharp>\<theta>_n"
   6.402 +  shows "lookupc y a \<theta>_n = Ax y a"
   6.403  using a
   6.404 -apply(induct \<theta>n)
   6.405 +apply(induct \<theta>_n)
   6.406  apply(auto simp add: fresh_prod fresh_list_cons fresh_atm)
   6.407  done
   6.408  
   6.409  lemma lookupc_nmaps:
   6.410 -  assumes a: "\<theta>n nmaps x to Some (c,P)"
   6.411 -  shows "lookupc x a \<theta>n = P[c\<turnstile>c>a]"
   6.412 +  assumes a: "\<theta>_n nmaps x to Some (c,P)"
   6.413 +  shows "lookupc x a \<theta>_n = P[c\<turnstile>c>a]"
   6.414  using a
   6.415 -apply(induct \<theta>n)
   6.416 +apply(induct \<theta>_n)
   6.417  apply(auto)
   6.418  done 
   6.419  
   6.420  lemma lookupc_unicity:
   6.421 -  assumes a: "lookupc y a \<theta>n = Ax x b" "x\<sharp>\<theta>n"
   6.422 +  assumes a: "lookupc y a \<theta>_n = Ax x b" "x\<sharp>\<theta>_n"
   6.423    shows "y=x"
   6.424  using a
   6.425 -apply(induct \<theta>n)
   6.426 +apply(induct \<theta>_n)
   6.427  apply(auto simp add: trm.inject fresh_list_cons fresh_prod)
   6.428  apply(case_tac "y=aa")
   6.429  apply(auto)
   6.430 @@ -3484,18 +3484,18 @@
   6.431  done
   6.432  
   6.433  lemma lookupd_fresh:
   6.434 -  assumes a: "a\<sharp>\<theta>c"
   6.435 -  shows "lookupd y a \<theta>c = Ax y a"
   6.436 +  assumes a: "a\<sharp>\<theta>_c"
   6.437 +  shows "lookupd y a \<theta>_c = Ax y a"
   6.438  using a
   6.439 -apply(induct \<theta>c)
   6.440 +apply(induct \<theta>_c)
   6.441  apply(auto simp add: fresh_prod fresh_list_cons fresh_atm)
   6.442  done 
   6.443  
   6.444  lemma lookupd_unicity:
   6.445 -  assumes a: "lookupd y a \<theta>c = Ax y b" "b\<sharp>\<theta>c"
   6.446 +  assumes a: "lookupd y a \<theta>_c = Ax y b" "b\<sharp>\<theta>_c"
   6.447    shows "a=b"
   6.448  using a
   6.449 -apply(induct \<theta>c)
   6.450 +apply(induct \<theta>_c)
   6.451  apply(auto simp add: trm.inject fresh_list_cons fresh_prod)
   6.452  apply(case_tac "a=aa")
   6.453  apply(auto)
   6.454 @@ -3508,9 +3508,9 @@
   6.455  lemma lookupd_freshness:
   6.456    fixes a::"coname"
   6.457    and   x::"name"
   6.458 -  shows "a\<sharp>(\<theta>c,c) \<Longrightarrow> a\<sharp>lookupd y c \<theta>c"
   6.459 -  and   "x\<sharp>(\<theta>c,y) \<Longrightarrow> x\<sharp>lookupd y c \<theta>c"
   6.460 -apply(induct \<theta>c)
   6.461 +  shows "a\<sharp>(\<theta>_c,c) \<Longrightarrow> a\<sharp>lookupd y c \<theta>_c"
   6.462 +  and   "x\<sharp>(\<theta>_c,y) \<Longrightarrow> x\<sharp>lookupd y c \<theta>_c"
   6.463 +apply(induct \<theta>_c)
   6.464  apply(auto simp add: fresh_prod fresh_list_cons abs_fresh fresh_atm)
   6.465  apply(rule rename_fresh)
   6.466  apply(simp add: fresh_atm)
   6.467 @@ -3519,49 +3519,49 @@
   6.468  done
   6.469  
   6.470  lemma lookupd_cmaps:
   6.471 -  assumes a: "\<theta>c cmaps a to Some (x,P)"
   6.472 -  shows "lookupd y a \<theta>c = P[x\<turnstile>n>y]"
   6.473 +  assumes a: "\<theta>_c cmaps a to Some (x,P)"
   6.474 +  shows "lookupd y a \<theta>_c = P[x\<turnstile>n>y]"
   6.475  using a
   6.476 -apply(induct \<theta>c)
   6.477 +apply(induct \<theta>_c)
   6.478  apply(auto)
   6.479  done 
   6.480  
   6.481 -nominal_primrec (freshness_context: "\<theta>n::(name\<times>coname\<times>trm)")
   6.482 +nominal_primrec (freshness_context: "\<theta>_n::(name\<times>coname\<times>trm)")
   6.483    stn :: "trm\<Rightarrow>(name\<times>coname\<times>trm) list\<Rightarrow>trm" 
   6.484  where
   6.485 -  "stn (Ax x a) \<theta>n = lookupc x a \<theta>n"
   6.486 -| "\<lbrakk>a\<sharp>(N,\<theta>n);x\<sharp>(M,\<theta>n)\<rbrakk> \<Longrightarrow> stn (Cut <a>.M (x).N) \<theta>n = (Cut <a>.M (x).N)" 
   6.487 -| "x\<sharp>\<theta>n \<Longrightarrow> stn (NotR (x).M a) \<theta>n = (NotR (x).M a)"
   6.488 -| "a\<sharp>\<theta>n \<Longrightarrow>stn (NotL <a>.M x) \<theta>n = (NotL <a>.M x)"
   6.489 -| "\<lbrakk>a\<sharp>(N,d,b,\<theta>n);b\<sharp>(M,d,a,\<theta>n)\<rbrakk> \<Longrightarrow> stn (AndR <a>.M <b>.N d) \<theta>n = (AndR <a>.M <b>.N d)"
   6.490 -| "x\<sharp>(z,\<theta>n) \<Longrightarrow> stn (AndL1 (x).M z) \<theta>n = (AndL1 (x).M z)"
   6.491 -| "x\<sharp>(z,\<theta>n) \<Longrightarrow> stn (AndL2 (x).M z) \<theta>n = (AndL2 (x).M z)"
   6.492 -| "a\<sharp>(b,\<theta>n) \<Longrightarrow> stn (OrR1 <a>.M b) \<theta>n = (OrR1 <a>.M b)"
   6.493 -| "a\<sharp>(b,\<theta>n) \<Longrightarrow> stn (OrR2 <a>.M b) \<theta>n = (OrR2 <a>.M b)"
   6.494 -| "\<lbrakk>x\<sharp>(N,z,u,\<theta>n);u\<sharp>(M,z,x,\<theta>n)\<rbrakk> \<Longrightarrow> stn (OrL (x).M (u).N z) \<theta>n = (OrL (x).M (u).N z)"
   6.495 -| "\<lbrakk>a\<sharp>(b,\<theta>n);x\<sharp>\<theta>n\<rbrakk> \<Longrightarrow> stn (ImpR (x).<a>.M b) \<theta>n = (ImpR (x).<a>.M b)"
   6.496 -| "\<lbrakk>a\<sharp>(N,\<theta>n);x\<sharp>(M,z,\<theta>n)\<rbrakk> \<Longrightarrow> stn (ImpL <a>.M (x).N z) \<theta>n = (ImpL <a>.M (x).N z)"
   6.497 +  "stn (Ax x a) \<theta>_n = lookupc x a \<theta>_n"
   6.498 +| "\<lbrakk>a\<sharp>(N,\<theta>_n);x\<sharp>(M,\<theta>_n)\<rbrakk> \<Longrightarrow> stn (Cut <a>.M (x).N) \<theta>_n = (Cut <a>.M (x).N)" 
   6.499 +| "x\<sharp>\<theta>_n \<Longrightarrow> stn (NotR (x).M a) \<theta>_n = (NotR (x).M a)"
   6.500 +| "a\<sharp>\<theta>_n \<Longrightarrow>stn (NotL <a>.M x) \<theta>_n = (NotL <a>.M x)"
   6.501 +| "\<lbrakk>a\<sharp>(N,d,b,\<theta>_n);b\<sharp>(M,d,a,\<theta>_n)\<rbrakk> \<Longrightarrow> stn (AndR <a>.M <b>.N d) \<theta>_n = (AndR <a>.M <b>.N d)"
   6.502 +| "x\<sharp>(z,\<theta>_n) \<Longrightarrow> stn (AndL1 (x).M z) \<theta>_n = (AndL1 (x).M z)"
   6.503 +| "x\<sharp>(z,\<theta>_n) \<Longrightarrow> stn (AndL2 (x).M z) \<theta>_n = (AndL2 (x).M z)"
   6.504 +| "a\<sharp>(b,\<theta>_n) \<Longrightarrow> stn (OrR1 <a>.M b) \<theta>_n = (OrR1 <a>.M b)"
   6.505 +| "a\<sharp>(b,\<theta>_n) \<Longrightarrow> stn (OrR2 <a>.M b) \<theta>_n = (OrR2 <a>.M b)"
   6.506 +| "\<lbrakk>x\<sharp>(N,z,u,\<theta>_n);u\<sharp>(M,z,x,\<theta>_n)\<rbrakk> \<Longrightarrow> stn (OrL (x).M (u).N z) \<theta>_n = (OrL (x).M (u).N z)"
   6.507 +| "\<lbrakk>a\<sharp>(b,\<theta>_n);x\<sharp>\<theta>_n\<rbrakk> \<Longrightarrow> stn (ImpR (x).<a>.M b) \<theta>_n = (ImpR (x).<a>.M b)"
   6.508 +| "\<lbrakk>a\<sharp>(N,\<theta>_n);x\<sharp>(M,z,\<theta>_n)\<rbrakk> \<Longrightarrow> stn (ImpL <a>.M (x).N z) \<theta>_n = (ImpL <a>.M (x).N z)"
   6.509  apply(finite_guess)+
   6.510  apply(rule TrueI)+
   6.511  apply(simp add: abs_fresh abs_supp fin_supp)+
   6.512  apply(fresh_guess)+
   6.513  done
   6.514  
   6.515 -nominal_primrec (freshness_context: "\<theta>c::(coname\<times>name\<times>trm)")
   6.516 +nominal_primrec (freshness_context: "\<theta>_c::(coname\<times>name\<times>trm)")
   6.517    stc :: "trm\<Rightarrow>(coname\<times>name\<times>trm) list\<Rightarrow>trm" 
   6.518  where
   6.519 -  "stc (Ax x a) \<theta>c = lookupd x a \<theta>c"
   6.520 -| "\<lbrakk>a\<sharp>(N,\<theta>c);x\<sharp>(M,\<theta>c)\<rbrakk> \<Longrightarrow> stc (Cut <a>.M (x).N) \<theta>c = (Cut <a>.M (x).N)" 
   6.521 -| "x\<sharp>\<theta>c \<Longrightarrow> stc (NotR (x).M a) \<theta>c = (NotR (x).M a)"
   6.522 -| "a\<sharp>\<theta>c \<Longrightarrow> stc (NotL <a>.M x) \<theta>c = (NotL <a>.M x)"
   6.523 -| "\<lbrakk>a\<sharp>(N,d,b,\<theta>c);b\<sharp>(M,d,a,\<theta>c)\<rbrakk> \<Longrightarrow> stc (AndR <a>.M <b>.N d) \<theta>c = (AndR <a>.M <b>.N d)"
   6.524 -| "x\<sharp>(z,\<theta>c) \<Longrightarrow> stc (AndL1 (x).M z) \<theta>c = (AndL1 (x).M z)"
   6.525 -| "x\<sharp>(z,\<theta>c) \<Longrightarrow> stc (AndL2 (x).M z) \<theta>c = (AndL2 (x).M z)"
   6.526 -| "a\<sharp>(b,\<theta>c) \<Longrightarrow> stc (OrR1 <a>.M b) \<theta>c = (OrR1 <a>.M b)"
   6.527 -| "a\<sharp>(b,\<theta>c) \<Longrightarrow> stc (OrR2 <a>.M b) \<theta>c = (OrR2 <a>.M b)"
   6.528 -| "\<lbrakk>x\<sharp>(N,z,u,\<theta>c);u\<sharp>(M,z,x,\<theta>c)\<rbrakk> \<Longrightarrow> stc (OrL (x).M (u).N z) \<theta>c = (OrL (x).M (u).N z)"
   6.529 -| "\<lbrakk>a\<sharp>(b,\<theta>c);x\<sharp>\<theta>c\<rbrakk> \<Longrightarrow> stc (ImpR (x).<a>.M b) \<theta>c = (ImpR (x).<a>.M b)"
   6.530 -| "\<lbrakk>a\<sharp>(N,\<theta>c);x\<sharp>(M,z,\<theta>c)\<rbrakk> \<Longrightarrow> stc (ImpL <a>.M (x).N z) \<theta>c = (ImpL <a>.M (x).N z)"
   6.531 +  "stc (Ax x a) \<theta>_c = lookupd x a \<theta>_c"
   6.532 +| "\<lbrakk>a\<sharp>(N,\<theta>_c);x\<sharp>(M,\<theta>_c)\<rbrakk> \<Longrightarrow> stc (Cut <a>.M (x).N) \<theta>_c = (Cut <a>.M (x).N)" 
   6.533 +| "x\<sharp>\<theta>_c \<Longrightarrow> stc (NotR (x).M a) \<theta>_c = (NotR (x).M a)"
   6.534 +| "a\<sharp>\<theta>_c \<Longrightarrow> stc (NotL <a>.M x) \<theta>_c = (NotL <a>.M x)"
   6.535 +| "\<lbrakk>a\<sharp>(N,d,b,\<theta>_c);b\<sharp>(M,d,a,\<theta>_c)\<rbrakk> \<Longrightarrow> stc (AndR <a>.M <b>.N d) \<theta>_c = (AndR <a>.M <b>.N d)"
   6.536 +| "x\<sharp>(z,\<theta>_c) \<Longrightarrow> stc (AndL1 (x).M z) \<theta>_c = (AndL1 (x).M z)"
   6.537 +| "x\<sharp>(z,\<theta>_c) \<Longrightarrow> stc (AndL2 (x).M z) \<theta>_c = (AndL2 (x).M z)"
   6.538 +| "a\<sharp>(b,\<theta>_c) \<Longrightarrow> stc (OrR1 <a>.M b) \<theta>_c = (OrR1 <a>.M b)"
   6.539 +| "a\<sharp>(b,\<theta>_c) \<Longrightarrow> stc (OrR2 <a>.M b) \<theta>_c = (OrR2 <a>.M b)"
   6.540 +| "\<lbrakk>x\<sharp>(N,z,u,\<theta>_c);u\<sharp>(M,z,x,\<theta>_c)\<rbrakk> \<Longrightarrow> stc (OrL (x).M (u).N z) \<theta>_c = (OrL (x).M (u).N z)"
   6.541 +| "\<lbrakk>a\<sharp>(b,\<theta>_c);x\<sharp>\<theta>_c\<rbrakk> \<Longrightarrow> stc (ImpR (x).<a>.M b) \<theta>_c = (ImpR (x).<a>.M b)"
   6.542 +| "\<lbrakk>a\<sharp>(N,\<theta>_c);x\<sharp>(M,z,\<theta>_c)\<rbrakk> \<Longrightarrow> stc (ImpL <a>.M (x).N z) \<theta>_c = (ImpL <a>.M (x).N z)"
   6.543  apply(finite_guess)+
   6.544  apply(rule TrueI)+
   6.545  apply(simp add: abs_fresh abs_supp fin_supp)+
   6.546 @@ -3571,33 +3571,33 @@
   6.547  lemma stn_eqvt[eqvt]:
   6.548    fixes pi1::"name prm"
   6.549    and   pi2::"coname prm"
   6.550 -  shows "(pi1\<bullet>(stn M \<theta>n)) = stn (pi1\<bullet>M) (pi1\<bullet>\<theta>n)"
   6.551 -  and   "(pi2\<bullet>(stn M \<theta>n)) = stn (pi2\<bullet>M) (pi2\<bullet>\<theta>n)"
   6.552 +  shows "(pi1\<bullet>(stn M \<theta>_n)) = stn (pi1\<bullet>M) (pi1\<bullet>\<theta>_n)"
   6.553 +  and   "(pi2\<bullet>(stn M \<theta>_n)) = stn (pi2\<bullet>M) (pi2\<bullet>\<theta>_n)"
   6.554  apply -
   6.555 -apply(nominal_induct M avoiding: \<theta>n rule: trm.strong_induct)
   6.556 +apply(nominal_induct M avoiding: \<theta>_n rule: trm.strong_induct)
   6.557  apply(auto simp add: eqvts fresh_bij fresh_prod eq_bij fresh_atm)
   6.558 -apply(nominal_induct M avoiding: \<theta>n rule: trm.strong_induct)
   6.559 +apply(nominal_induct M avoiding: \<theta>_n rule: trm.strong_induct)
   6.560  apply(auto simp add: eqvts fresh_bij fresh_prod eq_bij fresh_atm)
   6.561  done
   6.562  
   6.563  lemma stc_eqvt[eqvt]:
   6.564    fixes pi1::"name prm"
   6.565    and   pi2::"coname prm"
   6.566 -  shows "(pi1\<bullet>(stc M \<theta>c)) = stc (pi1\<bullet>M) (pi1\<bullet>\<theta>c)"
   6.567 -  and   "(pi2\<bullet>(stc M \<theta>c)) = stc (pi2\<bullet>M) (pi2\<bullet>\<theta>c)"
   6.568 +  shows "(pi1\<bullet>(stc M \<theta>_c)) = stc (pi1\<bullet>M) (pi1\<bullet>\<theta>_c)"
   6.569 +  and   "(pi2\<bullet>(stc M \<theta>_c)) = stc (pi2\<bullet>M) (pi2\<bullet>\<theta>_c)"
   6.570  apply -
   6.571 -apply(nominal_induct M avoiding: \<theta>c rule: trm.strong_induct)
   6.572 +apply(nominal_induct M avoiding: \<theta>_c rule: trm.strong_induct)
   6.573  apply(auto simp add: eqvts fresh_bij fresh_prod eq_bij fresh_atm)
   6.574 -apply(nominal_induct M avoiding: \<theta>c rule: trm.strong_induct)
   6.575 +apply(nominal_induct M avoiding: \<theta>_c rule: trm.strong_induct)
   6.576  apply(auto simp add: eqvts fresh_bij fresh_prod eq_bij fresh_atm)
   6.577  done
   6.578  
   6.579  lemma stn_fresh:
   6.580    fixes a::"coname"
   6.581    and   x::"name"
   6.582 -  shows "a\<sharp>(\<theta>n,M) \<Longrightarrow> a\<sharp>stn M \<theta>n"
   6.583 -  and   "x\<sharp>(\<theta>n,M) \<Longrightarrow> x\<sharp>stn M \<theta>n"
   6.584 -apply(nominal_induct M avoiding: \<theta>n a x rule: trm.strong_induct)
   6.585 +  shows "a\<sharp>(\<theta>_n,M) \<Longrightarrow> a\<sharp>stn M \<theta>_n"
   6.586 +  and   "x\<sharp>(\<theta>_n,M) \<Longrightarrow> x\<sharp>stn M \<theta>_n"
   6.587 +apply(nominal_induct M avoiding: \<theta>_n a x rule: trm.strong_induct)
   6.588  apply(auto simp add: abs_fresh fresh_prod fresh_atm)
   6.589  apply(rule lookupc_freshness)
   6.590  apply(simp add: fresh_atm)
   6.591 @@ -3608,9 +3608,9 @@
   6.592  lemma stc_fresh:
   6.593    fixes a::"coname"
   6.594    and   x::"name"
   6.595 -  shows "a\<sharp>(\<theta>c,M) \<Longrightarrow> a\<sharp>stc M \<theta>c"
   6.596 -  and   "x\<sharp>(\<theta>c,M) \<Longrightarrow> x\<sharp>stc M \<theta>c"
   6.597 -apply(nominal_induct M avoiding: \<theta>c a x rule: trm.strong_induct)
   6.598 +  shows "a\<sharp>(\<theta>_c,M) \<Longrightarrow> a\<sharp>stc M \<theta>_c"
   6.599 +  and   "x\<sharp>(\<theta>_c,M) \<Longrightarrow> x\<sharp>stc M \<theta>_c"
   6.600 +apply(nominal_induct M avoiding: \<theta>_c a x rule: trm.strong_induct)
   6.601  apply(auto simp add: abs_fresh fresh_prod fresh_atm)
   6.602  apply(rule lookupd_freshness)
   6.603  apply(simp add: fresh_atm)
   6.604 @@ -3652,58 +3652,58 @@
   6.605  apply(perm_simp)
   6.606  done
   6.607  
   6.608 -nominal_primrec (freshness_context: "(\<theta>n::(name\<times>coname\<times>trm) list,\<theta>c::(coname\<times>name\<times>trm) list)")
   6.609 +nominal_primrec (freshness_context: "(\<theta>_n::(name\<times>coname\<times>trm) list,\<theta>_c::(coname\<times>name\<times>trm) list)")
   6.610    psubst :: "(name\<times>coname\<times>trm) list\<Rightarrow>(coname\<times>name\<times>trm) list\<Rightarrow>trm\<Rightarrow>trm" ("_,_<_>" [100,100,100] 100) 
   6.611  where
   6.612 -  "\<theta>n,\<theta>c<Ax x a> = lookup x a \<theta>n \<theta>c" 
   6.613 -| "\<lbrakk>a\<sharp>(N,\<theta>n,\<theta>c);x\<sharp>(M,\<theta>n,\<theta>c)\<rbrakk> \<Longrightarrow> \<theta>n,\<theta>c<Cut <a>.M (x).N> = 
   6.614 -   Cut <a>.(if \<exists>x. M=Ax x a then stn M \<theta>n else \<theta>n,\<theta>c<M>) 
   6.615 -       (x).(if \<exists>a. N=Ax x a then stc N \<theta>c else \<theta>n,\<theta>c<N>)" 
   6.616 -| "x\<sharp>(\<theta>n,\<theta>c) \<Longrightarrow> \<theta>n,\<theta>c<NotR (x).M a> = 
   6.617 -  (case (findc \<theta>c a) of 
   6.618 -       Some (u,P) \<Rightarrow> fresh_fun (\<lambda>a'. Cut <a'>.NotR (x).(\<theta>n,\<theta>c<M>) a' (u).P) 
   6.619 -     | None \<Rightarrow> NotR (x).(\<theta>n,\<theta>c<M>) a)"
   6.620 -| "a\<sharp>(\<theta>n,\<theta>c) \<Longrightarrow> \<theta>n,\<theta>c<NotL <a>.M x> = 
   6.621 -  (case (findn \<theta>n x) of 
   6.622 -       Some (c,P) \<Rightarrow> fresh_fun (\<lambda>x'. Cut <c>.P (x').(NotL <a>.(\<theta>n,\<theta>c<M>) x')) 
   6.623 -     | None \<Rightarrow> NotL <a>.(\<theta>n,\<theta>c<M>) x)"
   6.624 -| "\<lbrakk>a\<sharp>(N,c,\<theta>n,\<theta>c);b\<sharp>(M,c,\<theta>n,\<theta>c);b\<noteq>a\<rbrakk> \<Longrightarrow> (\<theta>n,\<theta>c<AndR <a>.M <b>.N c>) = 
   6.625 -  (case (findc \<theta>c c) of 
   6.626 -       Some (x,P) \<Rightarrow> fresh_fun (\<lambda>a'. Cut <a'>.(AndR <a>.(\<theta>n,\<theta>c<M>) <b>.(\<theta>n,\<theta>c<N>) a') (x).P)
   6.627 -     | None \<Rightarrow> AndR <a>.(\<theta>n,\<theta>c<M>) <b>.(\<theta>n,\<theta>c<N>) c)"
   6.628 -| "x\<sharp>(z,\<theta>n,\<theta>c) \<Longrightarrow> (\<theta>n,\<theta>c<AndL1 (x).M z>) = 
   6.629 -  (case (findn \<theta>n z) of 
   6.630 -       Some (c,P) \<Rightarrow> fresh_fun (\<lambda>z'. Cut <c>.P (z').AndL1 (x).(\<theta>n,\<theta>c<M>) z') 
   6.631 -     | None \<Rightarrow> AndL1 (x).(\<theta>n,\<theta>c<M>) z)"
   6.632 -| "x\<sharp>(z,\<theta>n,\<theta>c) \<Longrightarrow> (\<theta>n,\<theta>c<AndL2 (x).M z>) = 
   6.633 -  (case (findn \<theta>n z) of 
   6.634 -       Some (c,P) \<Rightarrow> fresh_fun (\<lambda>z'. Cut <c>.P (z').AndL2 (x).(\<theta>n,\<theta>c<M>) z') 
   6.635 -     | None \<Rightarrow> AndL2 (x).(\<theta>n,\<theta>c<M>) z)"
   6.636 -| "\<lbrakk>x\<sharp>(N,z,\<theta>n,\<theta>c);u\<sharp>(M,z,\<theta>n,\<theta>c);x\<noteq>u\<rbrakk> \<Longrightarrow> (\<theta>n,\<theta>c<OrL (x).M (u).N z>) =
   6.637 -  (case (findn \<theta>n z) of  
   6.638 -       Some (c,P) \<Rightarrow> fresh_fun (\<lambda>z'. Cut <c>.P (z').OrL (x).(\<theta>n,\<theta>c<M>) (u).(\<theta>n,\<theta>c<N>) z') 
   6.639 -     | None \<Rightarrow> OrL (x).(\<theta>n,\<theta>c<M>) (u).(\<theta>n,\<theta>c<N>) z)"
   6.640 -| "a\<sharp>(b,\<theta>n,\<theta>c) \<Longrightarrow> (\<theta>n,\<theta>c<OrR1 <a>.M b>) = 
   6.641 -  (case (findc \<theta>c b) of
   6.642 -       Some (x,P) \<Rightarrow> fresh_fun (\<lambda>a'. Cut <a'>.OrR1 <a>.(\<theta>n,\<theta>c<M>) a' (x).P) 
   6.643 -     | None \<Rightarrow> OrR1 <a>.(\<theta>n,\<theta>c<M>) b)"
   6.644 -| "a\<sharp>(b,\<theta>n,\<theta>c) \<Longrightarrow> (\<theta>n,\<theta>c<OrR2 <a>.M b>) = 
   6.645 -  (case (findc \<theta>c b) of
   6.646 -       Some (x,P) \<Rightarrow> fresh_fun (\<lambda>a'. Cut <a'>.OrR2 <a>.(\<theta>n,\<theta>c<M>) a' (x).P) 
   6.647 -     | None \<Rightarrow> OrR2 <a>.(\<theta>n,\<theta>c<M>) b)"
   6.648 -| "\<lbrakk>a\<sharp>(b,\<theta>n,\<theta>c); x\<sharp>(\<theta>n,\<theta>c)\<rbrakk> \<Longrightarrow> (\<theta>n,\<theta>c<ImpR (x).<a>.M b>) = 
   6.649 -  (case (findc \<theta>c b) of
   6.650 -       Some (z,P) \<Rightarrow> fresh_fun (\<lambda>a'. Cut <a'>.ImpR (x).<a>.(\<theta>n,\<theta>c<M>) a' (z).P)
   6.651 -     | None \<Rightarrow> ImpR (x).<a>.(\<theta>n,\<theta>c<M>) b)"
   6.652 -| "\<lbrakk>a\<sharp>(N,\<theta>n,\<theta>c); x\<sharp>(z,M,\<theta>n,\<theta>c)\<rbrakk> \<Longrightarrow> (\<theta>n,\<theta>c<ImpL <a>.M (x).N z>) = 
   6.653 -  (case (findn \<theta>n z) of
   6.654 -       Some (c,P) \<Rightarrow> fresh_fun (\<lambda>z'. Cut <c>.P (z').ImpL <a>.(\<theta>n,\<theta>c<M>) (x).(\<theta>n,\<theta>c<N>) z') 
   6.655 -     | None \<Rightarrow> ImpL <a>.(\<theta>n,\<theta>c<M>) (x).(\<theta>n,\<theta>c<N>) z)"
   6.656 +  "\<theta>_n,\<theta>_c<Ax x a> = lookup x a \<theta>_n \<theta>_c" 
   6.657 +| "\<lbrakk>a\<sharp>(N,\<theta>_n,\<theta>_c);x\<sharp>(M,\<theta>_n,\<theta>_c)\<rbrakk> \<Longrightarrow> \<theta>_n,\<theta>_c<Cut <a>.M (x).N> = 
   6.658 +   Cut <a>.(if \<exists>x. M=Ax x a then stn M \<theta>_n else \<theta>_n,\<theta>_c<M>) 
   6.659 +       (x).(if \<exists>a. N=Ax x a then stc N \<theta>_c else \<theta>_n,\<theta>_c<N>)" 
   6.660 +| "x\<sharp>(\<theta>_n,\<theta>_c) \<Longrightarrow> \<theta>_n,\<theta>_c<NotR (x).M a> = 
   6.661 +  (case (findc \<theta>_c a) of 
   6.662 +       Some (u,P) \<Rightarrow> fresh_fun (\<lambda>a'. Cut <a'>.NotR (x).(\<theta>_n,\<theta>_c<M>) a' (u).P) 
   6.663 +     | None \<Rightarrow> NotR (x).(\<theta>_n,\<theta>_c<M>) a)"
   6.664 +| "a\<sharp>(\<theta>_n,\<theta>_c) \<Longrightarrow> \<theta>_n,\<theta>_c<NotL <a>.M x> = 
   6.665 +  (case (findn \<theta>_n x) of 
   6.666 +       Some (c,P) \<Rightarrow> fresh_fun (\<lambda>x'. Cut <c>.P (x').(NotL <a>.(\<theta>_n,\<theta>_c<M>) x')) 
   6.667 +     | None \<Rightarrow> NotL <a>.(\<theta>_n,\<theta>_c<M>) x)"
   6.668 +| "\<lbrakk>a\<sharp>(N,c,\<theta>_n,\<theta>_c);b\<sharp>(M,c,\<theta>_n,\<theta>_c);b\<noteq>a\<rbrakk> \<Longrightarrow> (\<theta>_n,\<theta>_c<AndR <a>.M <b>.N c>) = 
   6.669 +  (case (findc \<theta>_c c) of 
   6.670 +       Some (x,P) \<Rightarrow> fresh_fun (\<lambda>a'. Cut <a'>.(AndR <a>.(\<theta>_n,\<theta>_c<M>) <b>.(\<theta>_n,\<theta>_c<N>) a') (x).P)
   6.671 +     | None \<Rightarrow> AndR <a>.(\<theta>_n,\<theta>_c<M>) <b>.(\<theta>_n,\<theta>_c<N>) c)"
   6.672 +| "x\<sharp>(z,\<theta>_n,\<theta>_c) \<Longrightarrow> (\<theta>_n,\<theta>_c<AndL1 (x).M z>) = 
   6.673 +  (case (findn \<theta>_n z) of 
   6.674 +       Some (c,P) \<Rightarrow> fresh_fun (\<lambda>z'. Cut <c>.P (z').AndL1 (x).(\<theta>_n,\<theta>_c<M>) z') 
   6.675 +     | None \<Rightarrow> AndL1 (x).(\<theta>_n,\<theta>_c<M>) z)"
   6.676 +| "x\<sharp>(z,\<theta>_n,\<theta>_c) \<Longrightarrow> (\<theta>_n,\<theta>_c<AndL2 (x).M z>) = 
   6.677 +  (case (findn \<theta>_n z) of 
   6.678 +       Some (c,P) \<Rightarrow> fresh_fun (\<lambda>z'. Cut <c>.P (z').AndL2 (x).(\<theta>_n,\<theta>_c<M>) z') 
   6.679 +     | None \<Rightarrow> AndL2 (x).(\<theta>_n,\<theta>_c<M>) z)"
   6.680 +| "\<lbrakk>x\<sharp>(N,z,\<theta>_n,\<theta>_c);u\<sharp>(M,z,\<theta>_n,\<theta>_c);x\<noteq>u\<rbrakk> \<Longrightarrow> (\<theta>_n,\<theta>_c<OrL (x).M (u).N z>) =
   6.681 +  (case (findn \<theta>_n z) of  
   6.682 +       Some (c,P) \<Rightarrow> fresh_fun (\<lambda>z'. Cut <c>.P (z').OrL (x).(\<theta>_n,\<theta>_c<M>) (u).(\<theta>_n,\<theta>_c<N>) z') 
   6.683 +     | None \<Rightarrow> OrL (x).(\<theta>_n,\<theta>_c<M>) (u).(\<theta>_n,\<theta>_c<N>) z)"
   6.684 +| "a\<sharp>(b,\<theta>_n,\<theta>_c) \<Longrightarrow> (\<theta>_n,\<theta>_c<OrR1 <a>.M b>) = 
   6.685 +  (case (findc \<theta>_c b) of
   6.686 +       Some (x,P) \<Rightarrow> fresh_fun (\<lambda>a'. Cut <a'>.OrR1 <a>.(\<theta>_n,\<theta>_c<M>) a' (x).P) 
   6.687 +     | None \<Rightarrow> OrR1 <a>.(\<theta>_n,\<theta>_c<M>) b)"
   6.688 +| "a\<sharp>(b,\<theta>_n,\<theta>_c) \<Longrightarrow> (\<theta>_n,\<theta>_c<OrR2 <a>.M b>) = 
   6.689 +  (case (findc \<theta>_c b) of
   6.690 +       Some (x,P) \<Rightarrow> fresh_fun (\<lambda>a'. Cut <a'>.OrR2 <a>.(\<theta>_n,\<theta>_c<M>) a' (x).P) 
   6.691 +     | None \<Rightarrow> OrR2 <a>.(\<theta>_n,\<theta>_c<M>) b)"
   6.692 +| "\<lbrakk>a\<sharp>(b,\<theta>_n,\<theta>_c); x\<sharp>(\<theta>_n,\<theta>_c)\<rbrakk> \<Longrightarrow> (\<theta>_n,\<theta>_c<ImpR (x).<a>.M b>) = 
   6.693 +  (case (findc \<theta>_c b) of
   6.694 +       Some (z,P) \<Rightarrow> fresh_fun (\<lambda>a'. Cut <a'>.ImpR (x).<a>.(\<theta>_n,\<theta>_c<M>) a' (z).P)
   6.695 +     | None \<Rightarrow> ImpR (x).<a>.(\<theta>_n,\<theta>_c<M>) b)"
   6.696 +| "\<lbrakk>a\<sharp>(N,\<theta>_n,\<theta>_c); x\<sharp>(z,M,\<theta>_n,\<theta>_c)\<rbrakk> \<Longrightarrow> (\<theta>_n,\<theta>_c<ImpL <a>.M (x).N z>) = 
   6.697 +  (case (findn \<theta>_n z) of
   6.698 +       Some (c,P) \<Rightarrow> fresh_fun (\<lambda>z'. Cut <c>.P (z').ImpL <a>.(\<theta>_n,\<theta>_c<M>) (x).(\<theta>_n,\<theta>_c<N>) z') 
   6.699 +     | None \<Rightarrow> ImpL <a>.(\<theta>_n,\<theta>_c<M>) (x).(\<theta>_n,\<theta>_c<N>) z)"
   6.700  apply(finite_guess)+
   6.701  apply(rule TrueI)+
   6.702  apply(simp add: abs_fresh stc_fresh)
   6.703  apply(simp add: abs_fresh stn_fresh)
   6.704 -apply(case_tac "findc \<theta>c x3")
   6.705 +apply(case_tac "findc \<theta>_c x3")
   6.706  apply(simp add: abs_fresh)
   6.707  apply(auto)[1]
   6.708  apply(generate_fresh "coname")
   6.709 @@ -3711,7 +3711,7 @@
   6.710  apply(drule cmaps_fresh)
   6.711  apply(auto simp add: fresh_prod)[1]
   6.712  apply(simp add: abs_fresh fresh_prod fresh_atm)
   6.713 -apply(case_tac "findn \<theta>n x3")
   6.714 +apply(case_tac "findn \<theta>_n x3")
   6.715  apply(simp add: abs_fresh)
   6.716  apply(auto)[1]
   6.717  apply(generate_fresh "name")
   6.718 @@ -3719,7 +3719,7 @@
   6.719  apply(drule nmaps_fresh)
   6.720  apply(auto simp add: fresh_prod)[1]
   6.721  apply(simp add: abs_fresh fresh_prod fresh_atm)
   6.722 -apply(case_tac "findc \<theta>c x5")
   6.723 +apply(case_tac "findc \<theta>_c x5")
   6.724  apply(simp add: abs_fresh)
   6.725  apply(auto)[1]
   6.726  apply(generate_fresh "coname")
   6.727 @@ -3727,7 +3727,7 @@
   6.728  apply(drule cmaps_fresh)
   6.729  apply(auto simp add: fresh_prod)[1]
   6.730  apply(simp add: abs_fresh fresh_prod fresh_atm)
   6.731 -apply(case_tac "findc \<theta>c x5")
   6.732 +apply(case_tac "findc \<theta>_c x5")
   6.733  apply(simp add: abs_fresh)
   6.734  apply(auto)[1]
   6.735  apply(generate_fresh "coname")
   6.736 @@ -3735,7 +3735,7 @@
   6.737  apply(drule_tac x="x3" in cmaps_fresh)
   6.738  apply(auto simp add: fresh_prod)[1]
   6.739  apply(simp add: abs_fresh fresh_prod fresh_atm)
   6.740 -apply(case_tac "findn \<theta>n x3")
   6.741 +apply(case_tac "findn \<theta>_n x3")
   6.742  apply(simp add: abs_fresh)
   6.743  apply(auto)[1]
   6.744  apply(generate_fresh "name")
   6.745 @@ -3743,7 +3743,7 @@
   6.746  apply(drule nmaps_fresh)
   6.747  apply(auto simp add: fresh_prod)[1]
   6.748  apply(simp add: abs_fresh fresh_prod fresh_atm)
   6.749 -apply(case_tac "findn \<theta>n x3")
   6.750 +apply(case_tac "findn \<theta>_n x3")
   6.751  apply(simp add: abs_fresh)
   6.752  apply(auto)[1]
   6.753  apply(generate_fresh "name")
   6.754 @@ -3751,7 +3751,7 @@
   6.755  apply(drule nmaps_fresh)
   6.756  apply(auto simp add: fresh_prod)[1]
   6.757  apply(simp add: abs_fresh fresh_prod fresh_atm)
   6.758 -apply(case_tac "findc \<theta>c x3")
   6.759 +apply(case_tac "findc \<theta>_c x3")
   6.760  apply(simp add: abs_fresh)
   6.761  apply(auto)[1]
   6.762  apply(generate_fresh "coname")
   6.763 @@ -3759,7 +3759,7 @@
   6.764  apply(drule cmaps_fresh)
   6.765  apply(auto simp add: fresh_prod)[1]
   6.766  apply(simp add: abs_fresh fresh_prod fresh_atm)
   6.767 -apply(case_tac "findc \<theta>c x3")
   6.768 +apply(case_tac "findc \<theta>_c x3")
   6.769  apply(simp add: abs_fresh)
   6.770  apply(auto)[1]
   6.771  apply(generate_fresh "coname")
   6.772 @@ -3767,7 +3767,7 @@
   6.773  apply(drule cmaps_fresh)
   6.774  apply(auto simp add: fresh_prod)[1]
   6.775  apply(simp add: abs_fresh fresh_prod fresh_atm)
   6.776 -apply(case_tac "findn \<theta>n x5")
   6.777 +apply(case_tac "findn \<theta>_n x5")
   6.778  apply(simp add: abs_fresh)
   6.779  apply(auto)[1]
   6.780  apply(generate_fresh "name")
   6.781 @@ -3775,7 +3775,7 @@
   6.782  apply(drule nmaps_fresh)
   6.783  apply(auto simp add: fresh_prod)[1]
   6.784  apply(simp add: abs_fresh fresh_prod fresh_atm)
   6.785 -apply(case_tac "findn \<theta>n x5")
   6.786 +apply(case_tac "findn \<theta>_n x5")
   6.787  apply(simp add: abs_fresh)
   6.788  apply(auto)[1]
   6.789  apply(generate_fresh "name")
   6.790 @@ -3783,7 +3783,7 @@
   6.791  apply(drule_tac a="x3" in nmaps_fresh)
   6.792  apply(auto simp add: fresh_prod)[1]
   6.793  apply(simp add: abs_fresh fresh_prod fresh_atm)
   6.794 -apply(case_tac "findc \<theta>c x4")
   6.795 +apply(case_tac "findc \<theta>_c x4")
   6.796  apply(simp add: abs_fresh abs_supp fin_supp)
   6.797  apply(auto)[1]
   6.798  apply(generate_fresh "coname")
   6.799 @@ -3791,7 +3791,7 @@
   6.800  apply(drule cmaps_fresh)
   6.801  apply(auto simp add: fresh_prod)[1]
   6.802  apply(simp add: abs_fresh fresh_prod fresh_atm abs_supp fin_supp)
   6.803 -apply(case_tac "findc \<theta>c x4")
   6.804 +apply(case_tac "findc \<theta>_c x4")
   6.805  apply(simp add: abs_fresh abs_supp fin_supp)
   6.806  apply(auto)[1]
   6.807  apply(generate_fresh "coname")
   6.808 @@ -3799,7 +3799,7 @@
   6.809  apply(drule_tac x="x2" in cmaps_fresh)
   6.810  apply(auto simp add: fresh_prod)[1]
   6.811  apply(simp add: abs_fresh fresh_prod fresh_atm abs_supp fin_supp)
   6.812 -apply(case_tac "findn \<theta>n x5")
   6.813 +apply(case_tac "findn \<theta>_n x5")
   6.814  apply(simp add: abs_fresh)
   6.815  apply(auto)[1]
   6.816  apply(generate_fresh "name")
   6.817 @@ -3807,7 +3807,7 @@
   6.818  apply(drule nmaps_fresh)
   6.819  apply(auto simp add: fresh_prod)[1]
   6.820  apply(simp add: abs_fresh fresh_prod fresh_atm)
   6.821 -apply(case_tac "findn \<theta>n x5")
   6.822 +apply(case_tac "findn \<theta>_n x5")
   6.823  apply(simp add: abs_fresh)
   6.824  apply(auto)[1]
   6.825  apply(generate_fresh "name")
   6.826 @@ -3826,17 +3826,17 @@
   6.827  done
   6.828  
   6.829  lemma find_maps:
   6.830 -  shows "\<theta>c cmaps a to (findc \<theta>c a)"
   6.831 -  and   "\<theta>n nmaps x to (findn \<theta>n x)"
   6.832 +  shows "\<theta>_c cmaps a to (findc \<theta>_c a)"
   6.833 +  and   "\<theta>_n nmaps x to (findn \<theta>_n x)"
   6.834  apply(auto)
   6.835  done
   6.836  
   6.837  lemma psubst_eqvt[eqvt]:
   6.838    fixes pi1::"name prm"
   6.839    and   pi2::"coname prm"
   6.840 -  shows "pi1\<bullet>(\<theta>n,\<theta>c<M>) = (pi1\<bullet>\<theta>n),(pi1\<bullet>\<theta>c)<(pi1\<bullet>M)>"
   6.841 -  and   "pi2\<bullet>(\<theta>n,\<theta>c<M>) = (pi2\<bullet>\<theta>n),(pi2\<bullet>\<theta>c)<(pi2\<bullet>M)>"
   6.842 -apply(nominal_induct M avoiding: \<theta>n \<theta>c rule: trm.strong_induct)
   6.843 +  shows "pi1\<bullet>(\<theta>_n,\<theta>_c<M>) = (pi1\<bullet>\<theta>_n),(pi1\<bullet>\<theta>_c)<(pi1\<bullet>M)>"
   6.844 +  and   "pi2\<bullet>(\<theta>_n,\<theta>_c<M>) = (pi2\<bullet>\<theta>_n),(pi2\<bullet>\<theta>_c)<(pi2\<bullet>M)>"
   6.845 +apply(nominal_induct M avoiding: \<theta>_n \<theta>_c rule: trm.strong_induct)
   6.846  apply(auto simp add: eq_bij fresh_bij eqvts perm_pi_simp)
   6.847  apply(rule case_cong)
   6.848  apply(rule find_maps)
   6.849 @@ -3921,69 +3921,69 @@
   6.850  done
   6.851  
   6.852  lemma ax_psubst:
   6.853 -  assumes a: "\<theta>n,\<theta>c<M> = Ax x a"
   6.854 -  and     b: "a\<sharp>(\<theta>n,\<theta>c)" "x\<sharp>(\<theta>n,\<theta>c)"
   6.855 +  assumes a: "\<theta>_n,\<theta>_c<M> = Ax x a"
   6.856 +  and     b: "a\<sharp>(\<theta>_n,\<theta>_c)" "x\<sharp>(\<theta>_n,\<theta>_c)"
   6.857    shows "M = Ax x a"
   6.858  using a b
   6.859 -apply(nominal_induct M avoiding: \<theta>n \<theta>c rule: trm.strong_induct)
   6.860 +apply(nominal_induct M avoiding: \<theta>_n \<theta>_c rule: trm.strong_induct)
   6.861  apply(auto)
   6.862  apply(drule lookup_unicity)
   6.863  apply(simp)+
   6.864 -apply(case_tac "findc \<theta>c coname")
   6.865 +apply(case_tac "findc \<theta>_c coname")
   6.866  apply(simp)
   6.867  apply(auto)[1]
   6.868  apply(generate_fresh "coname")
   6.869  apply(fresh_fun_simp)
   6.870  apply(simp)
   6.871 -apply(case_tac "findn \<theta>n name")
   6.872 +apply(case_tac "findn \<theta>_n name")
   6.873  apply(simp)
   6.874  apply(auto)[1]
   6.875  apply(generate_fresh "name")
   6.876  apply(fresh_fun_simp)
   6.877  apply(simp)
   6.878 -apply(case_tac "findc \<theta>c coname3")
   6.879 +apply(case_tac "findc \<theta>_c coname3")
   6.880  apply(simp)
   6.881  apply(auto)[1]
   6.882  apply(generate_fresh "coname")
   6.883  apply(fresh_fun_simp)
   6.884  apply(simp)
   6.885 -apply(case_tac "findn \<theta>n name2")
   6.886 +apply(case_tac "findn \<theta>_n name2")
   6.887  apply(simp)
   6.888  apply(auto)[1]
   6.889  apply(generate_fresh "name")
   6.890  apply(fresh_fun_simp)
   6.891  apply(simp)
   6.892 -apply(case_tac "findn \<theta>n name2")
   6.893 +apply(case_tac "findn \<theta>_n name2")
   6.894  apply(simp)
   6.895  apply(auto)[1]
   6.896  apply(generate_fresh "name")
   6.897  apply(fresh_fun_simp)
   6.898  apply(simp)
   6.899 -apply(case_tac "findc \<theta>c coname2")
   6.900 +apply(case_tac "findc \<theta>_c coname2")
   6.901  apply(simp)
   6.902  apply(auto)[1]
   6.903  apply(generate_fresh "coname")
   6.904  apply(fresh_fun_simp)
   6.905  apply(simp)
   6.906 -apply(case_tac "findc \<theta>c coname2")
   6.907 +apply(case_tac "findc \<theta>_c coname2")
   6.908  apply(simp)
   6.909  apply(auto)[1]
   6.910  apply(generate_fresh "coname")
   6.911  apply(fresh_fun_simp)
   6.912  apply(simp)
   6.913 -apply(case_tac "findn \<theta>n name3")
   6.914 +apply(case_tac "findn \<theta>_n name3")
   6.915  apply(simp)
   6.916  apply(auto)[1]
   6.917  apply(generate_fresh "name")
   6.918  apply(fresh_fun_simp)
   6.919  apply(simp)
   6.920 -apply(case_tac "findc \<theta>c coname2")
   6.921 +apply(case_tac "findc \<theta>_c coname2")
   6.922  apply(simp)
   6.923  apply(auto)[1]
   6.924  apply(generate_fresh "coname")
   6.925  apply(fresh_fun_simp)
   6.926  apply(simp)
   6.927 -apply(case_tac "findn \<theta>n name2")
   6.928 +apply(case_tac "findn \<theta>_n name2")
   6.929  apply(simp)
   6.930  apply(auto)[1]
   6.931  apply(generate_fresh "name")
   6.932 @@ -4113,10 +4113,10 @@
   6.933  
   6.934  lemma psubst_fresh_name:
   6.935    fixes x::"name"
   6.936 -  assumes a: "x\<sharp>\<theta>n" "x\<sharp>\<theta>c" "x\<sharp>M"
   6.937 -  shows "x\<sharp>\<theta>n,\<theta>c<M>"
   6.938 +  assumes a: "x\<sharp>\<theta>_n" "x\<sharp>\<theta>_c" "x\<sharp>M"
   6.939 +  shows "x\<sharp>\<theta>_n,\<theta>_c<M>"
   6.940  using a
   6.941 -apply(nominal_induct M avoiding: x \<theta>n \<theta>c rule: trm.strong_induct)
   6.942 +apply(nominal_induct M avoiding: x \<theta>_n \<theta>_c rule: trm.strong_induct)
   6.943  apply(simp add: lookup_freshness)
   6.944  apply(auto simp add: abs_fresh)[1]
   6.945  apply(simp add: lookupc_freshness)
   6.946 @@ -4126,70 +4126,70 @@
   6.947  apply(simp add: lookupd_freshness)
   6.948  apply(simp add: lookupc_freshness)
   6.949  apply(simp)
   6.950 -apply(case_tac "findc \<theta>c coname")
   6.951 +apply(case_tac "findc \<theta>_c coname")
   6.952  apply(auto simp add: abs_fresh)[1]
   6.953  apply(auto)[1]
   6.954  apply(generate_fresh "coname")
   6.955  apply(fresh_fun_simp)
   6.956  apply(simp add: abs_fresh fresh_prod fresh_atm cmaps_fresh)
   6.957  apply(simp)
   6.958 -apply(case_tac "findn \<theta>n name")
   6.959 +apply(case_tac "findn \<theta>_n name")
   6.960  apply(auto simp add: abs_fresh)[1]
   6.961  apply(auto)[1]
   6.962  apply(generate_fresh "name")
   6.963  apply(fresh_fun_simp)
   6.964  apply(simp add: abs_fresh fresh_prod fresh_atm nmaps_fresh)
   6.965  apply(simp)
   6.966 -apply(case_tac "findc \<theta>c coname3")
   6.967 +apply(case_tac "findc \<theta>_c coname3")
   6.968  apply(auto simp add: abs_fresh)[1]
   6.969  apply(auto)[1]
   6.970  apply(generate_fresh "coname")
   6.971  apply(fresh_fun_simp)
   6.972  apply(simp add: abs_fresh fresh_prod fresh_atm cmaps_fresh)
   6.973  apply(simp)
   6.974 -apply(case_tac "findn \<theta>n name2")
   6.975 +apply(case_tac "findn \<theta>_n name2")
   6.976  apply(auto simp add: abs_fresh)[1]
   6.977  apply(auto)[1]
   6.978  apply(generate_fresh "name")
   6.979  apply(fresh_fun_simp)
   6.980  apply(simp add: abs_fresh fresh_prod fresh_atm nmaps_fresh)
   6.981  apply(simp)
   6.982 -apply(case_tac "findn \<theta>n name2")
   6.983 +apply(case_tac "findn \<theta>_n name2")
   6.984  apply(auto simp add: abs_fresh)[1]
   6.985  apply(auto)[1]
   6.986  apply(generate_fresh "name")
   6.987  apply(fresh_fun_simp)
   6.988  apply(simp add: abs_fresh fresh_prod fresh_atm nmaps_fresh)
   6.989  apply(simp)
   6.990 -apply(case_tac "findc \<theta>c coname2")
   6.991 +apply(case_tac "findc \<theta>_c coname2")
   6.992  apply(auto simp add: abs_fresh)[1]
   6.993  apply(auto)[1]
   6.994  apply(generate_fresh "coname")
   6.995  apply(fresh_fun_simp)
   6.996  apply(simp add: abs_fresh fresh_prod fresh_atm cmaps_fresh)
   6.997  apply(simp)
   6.998 -apply(case_tac "findc \<theta>c coname2")
   6.999 +apply(case_tac "findc \<theta>_c coname2")
  6.1000  apply(auto simp add: abs_fresh)[1]
  6.1001  apply(auto)[1]
  6.1002  apply(generate_fresh "coname")
  6.1003  apply(fresh_fun_simp)
  6.1004  apply(simp add: abs_fresh fresh_prod fresh_atm cmaps_fresh)
  6.1005  apply(simp)
  6.1006 -apply(case_tac "findn \<theta>n name3")
  6.1007 +apply(case_tac "findn \<theta>_n name3")
  6.1008  apply(auto simp add: abs_fresh)[1]
  6.1009  apply(auto)[1]
  6.1010  apply(generate_fresh "name")
  6.1011  apply(fresh_fun_simp)
  6.1012  apply(simp add: abs_fresh fresh_prod fresh_atm nmaps_fresh)
  6.1013  apply(simp)
  6.1014 -apply(case_tac "findc \<theta>c coname2")
  6.1015 +apply(case_tac "findc \<theta>_c coname2")
  6.1016  apply(auto simp add: abs_fresh abs_supp fin_supp)[1]
  6.1017  apply(auto)[1]
  6.1018  apply(generate_fresh "coname")
  6.1019  apply(fresh_fun_simp)
  6.1020  apply(simp add: abs_fresh abs_supp fin_supp fresh_prod fresh_atm cmaps_fresh)
  6.1021  apply(simp)
  6.1022 -apply(case_tac "findn \<theta>n name2")
  6.1023 +apply(case_tac "findn \<theta>_n name2")
  6.1024  apply(auto simp add: abs_fresh)[1]
  6.1025  apply(auto)[1]
  6.1026  apply(generate_fresh "name")
  6.1027 @@ -4199,10 +4199,10 @@
  6.1028  
  6.1029  lemma psubst_fresh_coname:
  6.1030    fixes a::"coname"
  6.1031 -  assumes a: "a\<sharp>\<theta>n" "a\<sharp>\<theta>c" "a\<sharp>M"
  6.1032 -  shows "a\<sharp>\<theta>n,\<theta>c<M>"
  6.1033 +  assumes a: "a\<sharp>\<theta>_n" "a\<sharp>\<theta>_c" "a\<sharp>M"
  6.1034 +  shows "a\<sharp>\<theta>_n,\<theta>_c<M>"
  6.1035  using a
  6.1036 -apply(nominal_induct M avoiding: a \<theta>n \<theta>c rule: trm.strong_induct)
  6.1037 +apply(nominal_induct M avoiding: a \<theta>_n \<theta>_c rule: trm.strong_induct)
  6.1038  apply(simp add: lookup_freshness)
  6.1039  apply(auto simp add: abs_fresh)[1]
  6.1040  apply(simp add: lookupd_freshness)
  6.1041 @@ -4212,70 +4212,70 @@
  6.1042  apply(simp add: lookupc_freshness)
  6.1043  apply(simp add: lookupd_freshness)
  6.1044  apply(simp)
  6.1045 -apply(case_tac "findc \<theta>c coname")
  6.1046 +apply(case_tac "findc \<theta>_c coname")
  6.1047  apply(auto simp add: abs_fresh)[1]
  6.1048  apply(auto)[1]
  6.1049  apply(generate_fresh "coname")
  6.1050  apply(fresh_fun_simp)
  6.1051  apply(simp add: abs_fresh fresh_prod fresh_atm cmaps_fresh)
  6.1052  apply(simp)
  6.1053 -apply(case_tac "findn \<theta>n name")
  6.1054 +apply(case_tac "findn \<theta>_n name")
  6.1055  apply(auto simp add: abs_fresh)[1]
  6.1056  apply(auto)[1]
  6.1057  apply(generate_fresh "name")
  6.1058  apply(fresh_fun_simp)
  6.1059  apply(simp add: abs_fresh fresh_prod fresh_atm nmaps_fresh)
  6.1060  apply(simp)
  6.1061 -apply(case_tac "findc \<theta>c coname3")
  6.1062 +apply(case_tac "findc \<theta>_c coname3")
  6.1063  apply(auto simp add: abs_fresh)[1]
  6.1064  apply(auto)[1]
  6.1065  apply(generate_fresh "coname")
  6.1066  apply(fresh_fun_simp)
  6.1067  apply(simp add: abs_fresh fresh_prod fresh_atm cmaps_fresh)
  6.1068  apply(simp)
  6.1069 -apply(case_tac "findn \<theta>n name2")
  6.1070 +apply(case_tac "findn \<theta>_n name2")
  6.1071  apply(auto simp add: abs_fresh)[1]
  6.1072  apply(auto)[1]
  6.1073  apply(generate_fresh "name")
  6.1074  apply(fresh_fun_simp)
  6.1075  apply(simp add: abs_fresh fresh_prod fresh_atm nmaps_fresh)
  6.1076  apply(simp)
  6.1077 -apply(case_tac "findn \<theta>n name2")
  6.1078 +apply(case_tac "findn \<theta>_n name2")
  6.1079  apply(auto simp add: abs_fresh)[1]
  6.1080  apply(auto)[1]
  6.1081  apply(generate_fresh "name")
  6.1082  apply(fresh_fun_simp)
  6.1083  apply(simp add: abs_fresh fresh_prod fresh_atm nmaps_fresh)
  6.1084  apply(simp)
  6.1085 -apply(case_tac "findc \<theta>c coname2")
  6.1086 +apply(case_tac "findc \<theta>_c coname2")
  6.1087  apply(auto simp add: abs_fresh)[1]
  6.1088  apply(auto)[1]
  6.1089  apply(generate_fresh "coname")
  6.1090  apply(fresh_fun_simp)
  6.1091  apply(simp add: abs_fresh fresh_prod fresh_atm cmaps_fresh)
  6.1092  apply(simp)
  6.1093 -apply(case_tac "findc \<theta>c coname2")
  6.1094 +apply(case_tac "findc \<theta>_c coname2")
  6.1095  apply(auto simp add: abs_fresh)[1]
  6.1096  apply(auto)[1]
  6.1097  apply(generate_fresh "coname")
  6.1098  apply(fresh_fun_simp)
  6.1099  apply(simp add: abs_fresh fresh_prod fresh_atm cmaps_fresh)
  6.1100  apply(simp)
  6.1101 -apply(case_tac "findn \<theta>n name3")
  6.1102 +apply(case_tac "findn \<theta>_n name3")
  6.1103  apply(auto simp add: abs_fresh)[1]
  6.1104  apply(auto)[1]
  6.1105  apply(generate_fresh "name")
  6.1106  apply(fresh_fun_simp)
  6.1107  apply(simp add: abs_fresh fresh_prod fresh_atm nmaps_fresh)
  6.1108  apply(simp)
  6.1109 -apply(case_tac "findc \<theta>c coname2")
  6.1110 +apply(case_tac "findc \<theta>_c coname2")
  6.1111  apply(auto simp add: abs_fresh abs_supp fin_supp)[1]
  6.1112  apply(auto)[1]
  6.1113  apply(generate_fresh "coname")
  6.1114  apply(fresh_fun_simp)
  6.1115  apply(simp add: abs_fresh abs_supp fin_supp fresh_prod fresh_atm cmaps_fresh)
  6.1116  apply(simp)
  6.1117 -apply(case_tac "findn \<theta>n name2")
  6.1118 +apply(case_tac "findn \<theta>_n name2")
  6.1119  apply(auto simp add: abs_fresh)[1]
  6.1120  apply(auto)[1]
  6.1121  apply(generate_fresh "name")
  6.1122 @@ -4284,10 +4284,10 @@
  6.1123  done
  6.1124  
  6.1125  lemma psubst_csubst:
  6.1126 -  assumes a: "a\<sharp>(\<theta>n,\<theta>c)"
  6.1127 -  shows "\<theta>n,((a,x,P)#\<theta>c)<M> = ((\<theta>n,\<theta>c<M>){a:=(x).P})"
  6.1128 +  assumes a: "a\<sharp>(\<theta>_n,\<theta>_c)"
  6.1129 +  shows "\<theta>_n,((a,x,P)#\<theta>_c)<M> = ((\<theta>_n,\<theta>_c<M>){a:=(x).P})"
  6.1130  using a
  6.1131 -apply(nominal_induct M avoiding: a x \<theta>n \<theta>c P rule: trm.strong_induct)
  6.1132 +apply(nominal_induct M avoiding: a x \<theta>_n \<theta>_c P rule: trm.strong_induct)
  6.1133  apply(auto simp add: fresh_list_cons fresh_prod)[1]
  6.1134  apply(simp add: lookup_csubst)
  6.1135  apply(simp add: fresh_list_cons fresh_prod)
  6.1136 @@ -4298,7 +4298,7 @@
  6.1137  apply(simp)
  6.1138  apply(simp add: abs_fresh fresh_atm)
  6.1139  apply(simp add: lookupd_fresh)
  6.1140 -apply(subgoal_tac "a\<sharp>lookupc xa coname \<theta>n")
  6.1141 +apply(subgoal_tac "a\<sharp>lookupc xa coname \<theta>_n")
  6.1142  apply(simp add: forget)
  6.1143  apply(simp add: trm.inject)
  6.1144  apply(rule sym)
  6.1145 @@ -4315,8 +4315,8 @@
  6.1146  apply(rule impI)
  6.1147  apply(simp add: lookupd_unicity)
  6.1148  apply(rule impI)
  6.1149 -apply(subgoal_tac "a\<sharp>lookupc xa coname \<theta>n")
  6.1150 -apply(subgoal_tac "a\<sharp>lookupd name aa \<theta>c")
  6.1151 +apply(subgoal_tac "a\<sharp>lookupc xa coname \<theta>_n")
  6.1152 +apply(subgoal_tac "a\<sharp>lookupd name aa \<theta>_c")
  6.1153  apply(simp add: forget)
  6.1154  apply(rule lookupd_freshness)
  6.1155  apply(simp add: fresh_atm)
  6.1156 @@ -4335,7 +4335,7 @@
  6.1157  apply(simp)
  6.1158  apply(blast)
  6.1159  apply(rule impI)
  6.1160 -apply(subgoal_tac "a\<sharp>lookupc xa coname \<theta>n")
  6.1161 +apply(subgoal_tac "a\<sharp>lookupc xa coname \<theta>_n")
  6.1162  apply(simp add: forget)
  6.1163  apply(rule lookupc_freshness)
  6.1164  apply(simp add: fresh_atm)
  6.1165 @@ -4362,7 +4362,7 @@
  6.1166  apply(rule impI)
  6.1167  apply(simp add: lookupd_unicity)
  6.1168  apply(rule impI)
  6.1169 -apply(subgoal_tac "a\<sharp>lookupd name aa \<theta>c")
  6.1170 +apply(subgoal_tac "a\<sharp>lookupd name aa \<theta>_c")
  6.1171  apply(simp add: forget)
  6.1172  apply(rule lookupd_freshness)
  6.1173  apply(simp add: fresh_atm)
  6.1174 @@ -4379,7 +4379,7 @@
  6.1175  apply(blast)
  6.1176  (* NotR *)
  6.1177  apply(simp)
  6.1178 -apply(case_tac "findc \<theta>c coname")
  6.1179 +apply(case_tac "findc \<theta>_c coname")
  6.1180  apply(simp)
  6.1181  apply(auto simp add: fresh_list_cons fresh_prod)[1]
  6.1182  apply(simp)
  6.1183 @@ -4398,7 +4398,7 @@
  6.1184  apply(auto simp add: fresh_prod fresh_atm)[1]
  6.1185  (* NotL *)
  6.1186  apply(simp)
  6.1187 -apply(case_tac "findn \<theta>n name")
  6.1188 +apply(case_tac "findn \<theta>_n name")
  6.1189  apply(simp)
  6.1190  apply(auto simp add: fresh_list_cons fresh_prod)[1]
  6.1191  apply(simp)
  6.1192 @@ -4417,7 +4417,7 @@
  6.1193  apply(simp)
  6.1194  (* AndR *)
  6.1195  apply(simp)
  6.1196 -apply(case_tac "findc \<theta>c coname3")
  6.1197 +apply(case_tac "findc \<theta>_c coname3")
  6.1198  apply(simp)
  6.1199  apply(auto simp add: psubst_fresh_coname fresh_list_cons fresh_prod fresh_atm)[1]
  6.1200  apply(simp)
  6.1201 @@ -4436,7 +4436,7 @@
  6.1202  apply(auto simp add:  psubst_fresh_coname fresh_prod fresh_atm)[1]
  6.1203  (* AndL1 *)
  6.1204  apply(simp)
  6.1205 -apply(case_tac "findn \<theta>n name2")
  6.1206 +apply(case_tac "findn \<theta>_n name2")
  6.1207  apply(simp)
  6.1208  apply(auto simp add: fresh_list_cons fresh_prod)[1]
  6.1209  apply(simp)
  6.1210 @@ -4455,7 +4455,7 @@
  6.1211  apply(auto simp add:  psubst_fresh_coname fresh_prod fresh_atm)[1]
  6.1212  (* AndL2 *)
  6.1213  apply(simp)
  6.1214 -apply(case_tac "findn \<theta>n name2")
  6.1215 +apply(case_tac "findn \<theta>_n name2")
  6.1216  apply(simp)
  6.1217  apply(auto simp add: fresh_list_cons fresh_prod)[1]
  6.1218  apply(simp)
  6.1219 @@ -4474,7 +4474,7 @@
  6.1220  apply(auto simp add:  psubst_fresh_coname fresh_prod fresh_atm)[1]
  6.1221  (* OrR1 *)
  6.1222  apply(simp)
  6.1223 -apply(case_tac "findc \<theta>c coname2")
  6.1224 +apply(case_tac "findc \<theta>_c coname2")
  6.1225  apply(simp)
  6.1226  apply(auto simp add: psubst_fresh_coname fresh_list_cons fresh_prod fresh_atm)[1]
  6.1227  apply(simp)
  6.1228 @@ -4493,7 +4493,7 @@
  6.1229  apply(auto simp add:  psubst_fresh_coname fresh_prod fresh_atm)[1]
  6.1230  (* OrR2 *)
  6.1231  apply(simp)
  6.1232 -apply(case_tac "findc \<theta>c coname2")
  6.1233 +apply(case_tac "findc \<theta>_c coname2")
  6.1234  apply(simp)
  6.1235  apply(auto simp add: psubst_fresh_coname fresh_list_cons fresh_prod fresh_atm)[1]
  6.1236  apply(simp)
  6.1237 @@ -4512,7 +4512,7 @@
  6.1238  apply(auto simp add:  psubst_fresh_coname fresh_prod fresh_atm)[1]
  6.1239  (* OrL *)
  6.1240  apply(simp)
  6.1241 -apply(case_tac "findn \<theta>n name3")
  6.1242 +apply(case_tac "findn \<theta>_n name3")
  6.1243  apply(simp)
  6.1244  apply(auto simp add: fresh_list_cons psubst_fresh_name fresh_atm fresh_prod)[1]
  6.1245  apply(simp)
  6.1246 @@ -4531,7 +4531,7 @@
  6.1247  apply(auto simp add:  psubst_fresh_name fresh_prod fresh_atm)[1]
  6.1248  (* ImpR *)
  6.1249  apply(simp)
  6.1250 -apply(case_tac "findc \<theta>c coname2")
  6.1251 +apply(case_tac "findc \<theta>_c coname2")
  6.1252  apply(simp)
  6.1253  apply(auto simp add: psubst_fresh_coname fresh_list_cons fresh_prod fresh_atm)[1]
  6.1254  apply(simp)
  6.1255 @@ -4550,7 +4550,7 @@
  6.1256  apply(auto simp add:  psubst_fresh_coname fresh_prod fresh_atm)[1]
  6.1257  (* ImpL *)
  6.1258  apply(simp)
  6.1259 -apply(case_tac "findn \<theta>n name2")
  6.1260 +apply(case_tac "findn \<theta>_n name2")
  6.1261  apply(simp)
  6.1262  apply(auto simp add: fresh_list_cons psubst_fresh_coname psubst_fresh_name fresh_atm fresh_prod)[1]
  6.1263  apply(simp)
  6.1264 @@ -4571,10 +4571,10 @@
  6.1265  done
  6.1266  
  6.1267  lemma psubst_nsubst:
  6.1268 -  assumes a: "x\<sharp>(\<theta>n,\<theta>c)"
  6.1269 -  shows "((x,a,P)#\<theta>n),\<theta>c<M> = ((\<theta>n,\<theta>c<M>){x:=<a>.P})"
  6.1270 +  assumes a: "x\<sharp>(\<theta>_n,\<theta>_c)"
  6.1271 +  shows "((x,a,P)#\<theta>_n),\<theta>_c<M> = ((\<theta>_n,\<theta>_c<M>){x:=<a>.P})"
  6.1272  using a
  6.1273 -apply(nominal_induct M avoiding: a x \<theta>n \<theta>c P rule: trm.strong_induct)
  6.1274 +apply(nominal_induct M avoiding: a x \<theta>_n \<theta>_c P rule: trm.strong_induct)
  6.1275  apply(auto simp add: fresh_list_cons fresh_prod)[1]
  6.1276  apply(simp add: lookup_fresh)
  6.1277  apply(rule lookupb_lookupa)
  6.1278 @@ -4591,7 +4591,7 @@
  6.1279  apply(simp add: abs_fresh)
  6.1280  apply(simp add: abs_fresh fresh_atm)
  6.1281  apply(simp add: lookupd_fresh)
  6.1282 -apply(subgoal_tac "x\<sharp>lookupd name aa \<theta>c")
  6.1283 +apply(subgoal_tac "x\<sharp>lookupd name aa \<theta>_c")
  6.1284  apply(simp add: forget)
  6.1285  apply(simp add: trm.inject)
  6.1286  apply(rule sym)
  6.1287 @@ -4608,8 +4608,8 @@
  6.1288  apply(rule impI)
  6.1289  apply(simp add: lookupc_unicity)
  6.1290  apply(rule impI)
  6.1291 -apply(subgoal_tac "x\<sharp>lookupc xa coname \<theta>n")
  6.1292 -apply(subgoal_tac "x\<sharp>lookupd name aa \<theta>c")
  6.1293 +apply(subgoal_tac "x\<sharp>lookupc xa coname \<theta>_n")
  6.1294 +apply(subgoal_tac "x\<sharp>lookupd name aa \<theta>_c")
  6.1295  apply(simp add: forget)
  6.1296  apply(rule lookupd_freshness)
  6.1297  apply(simp add: fresh_atm)
  6.1298 @@ -4638,7 +4638,7 @@
  6.1299  apply(rule impI)
  6.1300  apply(simp add: lookupc_unicity)
  6.1301  apply(rule impI)
  6.1302 -apply(subgoal_tac "x\<sharp>lookupc xa coname \<theta>n")
  6.1303 +apply(subgoal_tac "x\<sharp>lookupc xa coname \<theta>_n")
  6.1304  apply(simp add: forget)
  6.1305  apply(rule lookupc_freshness)
  6.1306  apply(simp add: fresh_prod fresh_atm)
  6.1307 @@ -4656,7 +4656,7 @@
  6.1308  apply(simp)
  6.1309  apply(blast)
  6.1310  apply(rule impI)
  6.1311 -apply(subgoal_tac "x\<sharp>lookupd name aa \<theta>c")
  6.1312 +apply(subgoal_tac "x\<sharp>lookupd name aa \<theta>_c")
  6.1313  apply(simp add: forget)
  6.1314  apply(rule lookupd_freshness)
  6.1315  apply(simp add: fresh_atm)
  6.1316 @@ -4673,7 +4673,7 @@
  6.1317  apply(blast)
  6.1318  (* NotR *)
  6.1319  apply(simp)
  6.1320 -apply(case_tac "findc \<theta>c coname")
  6.1321 +apply(case_tac "findc \<theta>_c coname")
  6.1322  apply(simp)
  6.1323  apply(auto simp add: fresh_list_cons fresh_prod)[1]
  6.1324  apply(simp)
  6.1325 @@ -4690,7 +4690,7 @@
  6.1326  apply(simp)
  6.1327  (* NotL *)
  6.1328  apply(simp)
  6.1329 -apply(case_tac "findn \<theta>n name")
  6.1330 +apply(case_tac "findn \<theta>_n name")
  6.1331  apply(simp)
  6.1332  apply(auto simp add: fresh_list_cons fresh_prod)[1]
  6.1333  apply(simp)
  6.1334 @@ -4709,7 +4709,7 @@
  6.1335  apply(simp add: fresh_prod fresh_atm)
  6.1336  (* AndR *)
  6.1337  apply(simp)
  6.1338 -apply(case_tac "findc \<theta>c coname3")
  6.1339 +apply(case_tac "findc \<theta>_c coname3")
  6.1340  apply(simp)
  6.1341  apply(auto simp add: psubst_fresh_coname fresh_list_cons fresh_prod fresh_atm)[1]
  6.1342  apply(simp)
  6.1343 @@ -4726,7 +4726,7 @@
  6.1344  apply(auto simp add:  psubst_fresh_coname fresh_prod fresh_atm)[1]
  6.1345  (* AndL1 *)
  6.1346  apply(simp)
  6.1347 -apply(case_tac "findn \<theta>n name2")
  6.1348 +apply(case_tac "findn \<theta>_n name2")
  6.1349  apply(simp)
  6.1350  apply(auto simp add: fresh_list_cons fresh_prod)[1]
  6.1351  apply(simp)
  6.1352 @@ -4745,7 +4745,7 @@
  6.1353  apply(auto simp add:  psubst_fresh_coname fresh_prod fresh_atm)[1]
  6.1354  (* AndL2 *)
  6.1355  apply(simp)
  6.1356 -apply(case_tac "findn \<theta>n name2")
  6.1357 +apply(case_tac "findn \<theta>_n name2")
  6.1358  apply(simp)
  6.1359  apply(auto simp add: fresh_list_cons fresh_prod)[1]
  6.1360  apply(simp)
  6.1361 @@ -4764,7 +4764,7 @@
  6.1362  apply(auto simp add:  psubst_fresh_coname fresh_prod fresh_atm)[1]
  6.1363  (* OrR1 *)
  6.1364  apply(simp)
  6.1365 -apply(case_tac "findc \<theta>c coname2")
  6.1366 +apply(case_tac "findc \<theta>_c coname2")
  6.1367  apply(simp)
  6.1368  apply(auto simp add: psubst_fresh_coname fresh_list_cons fresh_prod fresh_atm)[1]
  6.1369  apply(simp)
  6.1370 @@ -4781,7 +4781,7 @@
  6.1371  apply(auto simp add:  psubst_fresh_coname fresh_prod fresh_atm)[1]
  6.1372  (* OrR2 *)
  6.1373  apply(simp)
  6.1374 -apply(case_tac "findc \<theta>c coname2")
  6.1375 +apply(case_tac "findc \<theta>_c coname2")
  6.1376  apply(simp)
  6.1377  apply(auto simp add: psubst_fresh_coname fresh_list_cons fresh_prod fresh_atm)[1]
  6.1378  apply(simp)
  6.1379 @@ -4798,7 +4798,7 @@
  6.1380  apply(auto simp add:  psubst_fresh_coname fresh_prod fresh_atm)[1]
  6.1381  (* OrL *)
  6.1382  apply(simp)
  6.1383 -apply(case_tac "findn \<theta>n name3")
  6.1384 +apply(case_tac "findn \<theta>_n name3")
  6.1385  apply(simp)
  6.1386  apply(auto simp add: fresh_list_cons psubst_fresh_name fresh_atm fresh_prod)[1]
  6.1387  apply(simp)
  6.1388 @@ -4817,7 +4817,7 @@
  6.1389  apply(auto simp add:  psubst_fresh_name fresh_prod fresh_atm)[1]
  6.1390  (* ImpR *)
  6.1391  apply(simp)
  6.1392 -apply(case_tac "findc \<theta>c coname2")
  6.1393 +apply(case_tac "findc \<theta>_c coname2")
  6.1394  apply(simp)
  6.1395  apply(auto simp add: psubst_fresh_coname fresh_list_cons fresh_prod fresh_atm)[1]
  6.1396  apply(simp)
  6.1397 @@ -4834,7 +4834,7 @@
  6.1398  apply(auto simp add:  psubst_fresh_coname fresh_prod fresh_atm)[1]
  6.1399  (* ImpL *)
  6.1400  apply(simp)
  6.1401 -apply(case_tac "findn \<theta>n name2")
  6.1402 +apply(case_tac "findn \<theta>_n name2")
  6.1403  apply(simp)
  6.1404  apply(auto simp add: fresh_list_cons psubst_fresh_coname psubst_fresh_name fresh_atm fresh_prod)[1]
  6.1405  apply(simp)
  6.1406 @@ -4856,35 +4856,35 @@
  6.1407  definition 
  6.1408    ncloses :: "(name\<times>coname\<times>trm) list\<Rightarrow>(name\<times>ty) list \<Rightarrow> bool" ("_ ncloses _" [55,55] 55) 
  6.1409  where
  6.1410 -  "\<theta>n ncloses \<Gamma> \<equiv> \<forall>x B. ((x,B) \<in> set \<Gamma> \<longrightarrow> (\<exists>c P. \<theta>n nmaps x to Some (c,P) \<and> <c>:P \<in> (\<parallel><B>\<parallel>)))"
  6.1411 +  "\<theta>_n ncloses \<Gamma> \<equiv> \<forall>x B. ((x,B) \<in> set \<Gamma> \<longrightarrow> (\<exists>c P. \<theta>_n nmaps x to Some (c,P) \<and> <c>:P \<in> (\<parallel><B>\<parallel>)))"
  6.1412    
  6.1413  definition 
  6.1414    ccloses :: "(coname\<times>name\<times>trm) list\<Rightarrow>(coname\<times>ty) list \<Rightarrow> bool" ("_ ccloses _" [55,55] 55) 
  6.1415  where
  6.1416 -  "\<theta>c ccloses \<Delta> \<equiv> \<forall>a B. ((a,B) \<in> set \<Delta> \<longrightarrow> (\<exists>x P. \<theta>c cmaps a to Some (x,P) \<and> (x):P \<in> (\<parallel>(B)\<parallel>)))"
  6.1417 +  "\<theta>_c ccloses \<Delta> \<equiv> \<forall>a B. ((a,B) \<in> set \<Delta> \<longrightarrow> (\<exists>x P. \<theta>_c cmaps a to Some (x,P) \<and> (x):P \<in> (\<parallel>(B)\<parallel>)))"
  6.1418  
  6.1419  lemma ncloses_elim:
  6.1420    assumes a: "(x,B) \<in> set \<Gamma>"
  6.1421 -  and     b: "\<theta>n ncloses \<Gamma>"
  6.1422 -  shows "\<exists>c P. \<theta>n nmaps x to Some (c,P) \<and> <c>:P \<in> (\<parallel><B>\<parallel>)"
  6.1423 +  and     b: "\<theta>_n ncloses \<Gamma>"
  6.1424 +  shows "\<exists>c P. \<theta>_n nmaps x to Some (c,P) \<and> <c>:P \<in> (\<parallel><B>\<parallel>)"
  6.1425  using a b by (auto simp add: ncloses_def)
  6.1426  
  6.1427  lemma ccloses_elim:
  6.1428    assumes a: "(a,B) \<in> set \<Delta>"
  6.1429 -  and     b: "\<theta>c ccloses \<Delta>"
  6.1430 -  shows "\<exists>x P. \<theta>c cmaps a to Some (x,P) \<and> (x):P \<in> (\<parallel>(B)\<parallel>)"
  6.1431 +  and     b: "\<theta>_c ccloses \<Delta>"
  6.1432 +  shows "\<exists>x P. \<theta>_c cmaps a to Some (x,P) \<and> (x):P \<in> (\<parallel>(B)\<parallel>)"
  6.1433  using a b by (auto simp add: ccloses_def)
  6.1434  
  6.1435  lemma ncloses_subset:
  6.1436 -  assumes a: "\<theta>n ncloses \<Gamma>"
  6.1437 +  assumes a: "\<theta>_n ncloses \<Gamma>"
  6.1438    and     b: "set \<Gamma>' \<subseteq> set \<Gamma>"
  6.1439 -  shows "\<theta>n ncloses \<Gamma>'"
  6.1440 +  shows "\<theta>_n ncloses \<Gamma>'"
  6.1441  using a b by (auto  simp add: ncloses_def)
  6.1442  
  6.1443  lemma ccloses_subset:
  6.1444 -  assumes a: "\<theta>c ccloses \<Delta>"
  6.1445 +  assumes a: "\<theta>_c ccloses \<Delta>"
  6.1446    and     b: "set \<Delta>' \<subseteq> set \<Delta>"
  6.1447 -  shows "\<theta>c ccloses \<Delta>'"
  6.1448 +  shows "\<theta>_c ccloses \<Delta>'"
  6.1449  using a b by (auto  simp add: ccloses_def)
  6.1450  
  6.1451  lemma validc_fresh:
  6.1452 @@ -4908,8 +4908,8 @@
  6.1453  done
  6.1454  
  6.1455  lemma ccloses_extend:
  6.1456 -  assumes a: "\<theta>c ccloses \<Delta>" "a\<sharp>\<Delta>" "a\<sharp>\<theta>c" "(x):P\<in>\<parallel>(B)\<parallel>"
  6.1457 -  shows "(a,x,P)#\<theta>c ccloses (a,B)#\<Delta>"
  6.1458 +  assumes a: "\<theta>_c ccloses \<Delta>" "a\<sharp>\<Delta>" "a\<sharp>\<theta>_c" "(x):P\<in>\<parallel>(B)\<parallel>"
  6.1459 +  shows "(a,x,P)#\<theta>_c ccloses (a,B)#\<Delta>"
  6.1460  using a
  6.1461  apply(simp add: ccloses_def)
  6.1462  apply(drule validc_fresh)
  6.1463 @@ -4917,8 +4917,8 @@
  6.1464  done
  6.1465  
  6.1466  lemma ncloses_extend:
  6.1467 -  assumes a: "\<theta>n ncloses \<Gamma>" "x\<sharp>\<Gamma>" "x\<sharp>\<theta>n" "<a>:P\<in>\<parallel><B>\<parallel>"
  6.1468 -  shows "(x,a,P)#\<theta>n ncloses (x,B)#\<Gamma>"
  6.1469 +  assumes a: "\<theta>_n ncloses \<Gamma>" "x\<sharp>\<Gamma>" "x\<sharp>\<theta>_n" "<a>:P\<in>\<parallel><B>\<parallel>"
  6.1470 +  shows "(x,a,P)#\<theta>_n ncloses (x,B)#\<Gamma>"
  6.1471  using a
  6.1472  apply(simp add: ncloses_def)
  6.1473  apply(drule validn_fresh)
  6.1474 @@ -5082,39 +5082,39 @@
  6.1475  done
  6.1476  
  6.1477  lemma psubst_Ax_aux: 
  6.1478 -  assumes a: "\<theta>c cmaps a to Some (y,N)"
  6.1479 -  shows "lookupb x a \<theta>c c P = Cut <c>.P (y).N"
  6.1480 +  assumes a: "\<theta>_c cmaps a to Some (y,N)"
  6.1481 +  shows "lookupb x a \<theta>_c c P = Cut <c>.P (y).N"
  6.1482  using a
  6.1483 -apply(induct \<theta>c)
  6.1484 +apply(induct \<theta>_c)
  6.1485  apply(auto)
  6.1486  done
  6.1487  
  6.1488  lemma psubst_Ax:
  6.1489 -  assumes a: "\<theta>n nmaps x to Some (c,P)"
  6.1490 -  and     b: "\<theta>c cmaps a to Some (y,N)"
  6.1491 -  shows "\<theta>n,\<theta>c<Ax x a> = Cut <c>.P (y).N"
  6.1492 +  assumes a: "\<theta>_n nmaps x to Some (c,P)"
  6.1493 +  and     b: "\<theta>_c cmaps a to Some (y,N)"
  6.1494 +  shows "\<theta>_n,\<theta>_c<Ax x a> = Cut <c>.P (y).N"
  6.1495  using a b
  6.1496 -apply(induct \<theta>n)
  6.1497 +apply(induct \<theta>_n)
  6.1498  apply(auto simp add: psubst_Ax_aux)
  6.1499  done
  6.1500  
  6.1501  lemma psubst_Cut:
  6.1502    assumes a: "\<forall>x. M\<noteq>Ax x c"
  6.1503    and     b: "\<forall>a. N\<noteq>Ax x a"
  6.1504 -  and     c: "c\<sharp>(\<theta>n,\<theta>c,N)" "x\<sharp>(\<theta>n,\<theta>c,M)"
  6.1505 -  shows "\<theta>n,\<theta>c<Cut <c>.M (x).N> = Cut <c>.(\<theta>n,\<theta>c<M>) (x).(\<theta>n,\<theta>c<N>)"
  6.1506 +  and     c: "c\<sharp>(\<theta>_n,\<theta>_c,N)" "x\<sharp>(\<theta>_n,\<theta>_c,M)"
  6.1507 +  shows "\<theta>_n,\<theta>_c<Cut <c>.M (x).N> = Cut <c>.(\<theta>_n,\<theta>_c<M>) (x).(\<theta>_n,\<theta>_c<N>)"
  6.1508  using a b c
  6.1509  apply(simp)
  6.1510  done
  6.1511  
  6.1512  lemma all_CAND: 
  6.1513    assumes a: "\<Gamma> \<turnstile> M \<turnstile> \<Delta>"
  6.1514 -  and     b: "\<theta>n ncloses \<Gamma>"
  6.1515 -  and     c: "\<theta>c ccloses \<Delta>"
  6.1516 -  shows "SNa (\<theta>n,\<theta>c<M>)"
  6.1517 +  and     b: "\<theta>_n ncloses \<Gamma>"
  6.1518 +  and     c: "\<theta>_c ccloses \<Delta>"
  6.1519 +  shows "SNa (\<theta>_n,\<theta>_c<M>)"
  6.1520  using a b c
  6.1521 -proof(nominal_induct avoiding: \<theta>n \<theta>c rule: typing.strong_induct)
  6.1522 -  case (TAx \<Gamma> \<Delta> x B a \<theta>n \<theta>c)
  6.1523 +proof(nominal_induct avoiding: \<theta>_n \<theta>_c rule: typing.strong_induct)
  6.1524 +  case (TAx \<Gamma> \<Delta> x B a \<theta>_n \<theta>_c)
  6.1525    then show ?case
  6.1526      apply -
  6.1527      apply(drule ncloses_elim)
  6.1528 @@ -5123,13 +5123,13 @@
  6.1529      apply(assumption)
  6.1530      apply(erule exE)+
  6.1531      apply(erule conjE)+
  6.1532 -    apply(rule_tac s="Cut <c>.P (xa).Pa" and t="\<theta>n,\<theta>c<Ax x a>" in subst)
  6.1533 +    apply(rule_tac s="Cut <c>.P (xa).Pa" and t="\<theta>_n,\<theta>_c<Ax x a>" in subst)
  6.1534      apply(rule sym)
  6.1535      apply(simp only: psubst_Ax)
  6.1536      apply(simp add: CUT_SNa)
  6.1537      done
  6.1538  next
  6.1539 -  case (TNotR x \<Gamma> B M \<Delta> \<Delta>' a \<theta>n \<theta>c) 
  6.1540 +  case (TNotR x \<Gamma> B M \<Delta> \<Delta>' a \<theta>_n \<theta>_c) 
  6.1541    then show ?case 
  6.1542      apply(simp)
  6.1543      apply(subgoal_tac "(a,NOT B) \<in> set \<Delta>'")
  6.1544 @@ -5145,7 +5145,7 @@
  6.1545      apply(rule disjI2)
  6.1546      apply(rule_tac x="c" in exI)
  6.1547      apply(rule_tac x="x" in exI)
  6.1548 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1549 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1550      apply(simp)
  6.1551      apply(rule conjI)
  6.1552      apply(rule fic.intros)
  6.1553 @@ -5157,13 +5157,13 @@
  6.1554      apply(unfold BINDINGn_def)
  6.1555      apply(simp)
  6.1556      apply(rule_tac x="x" in exI)
  6.1557 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1558 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1559      apply(simp)
  6.1560      apply(rule allI)+
  6.1561      apply(rule impI)
  6.1562      apply(simp add: psubst_nsubst[symmetric])
  6.1563 -    apply(drule_tac x="(x,aa,Pa)#\<theta>n" in meta_spec)
  6.1564 -    apply(drule_tac x="\<theta>c" in meta_spec)
  6.1565 +    apply(drule_tac x="(x,aa,Pa)#\<theta>_n" in meta_spec)
  6.1566 +    apply(drule_tac x="\<theta>_c" in meta_spec)
  6.1567      apply(drule meta_mp)
  6.1568      apply(rule ncloses_extend)
  6.1569      apply(assumption)
  6.1570 @@ -5179,7 +5179,7 @@
  6.1571      apply(blast)
  6.1572      done
  6.1573  next
  6.1574 -  case (TNotL a \<Delta> \<Gamma> M B \<Gamma>' x \<theta>n \<theta>c)
  6.1575 +  case (TNotL a \<Delta> \<Gamma> M B \<Gamma>' x \<theta>_n \<theta>_c)
  6.1576    then show ?case
  6.1577      apply(simp)
  6.1578      apply(subgoal_tac "(x,NOT B) \<in> set \<Gamma>'")
  6.1579 @@ -5197,7 +5197,7 @@
  6.1580      apply(rule disjI2)
  6.1581      apply(rule_tac x="a" in exI)
  6.1582      apply(rule_tac x="ca" in exI)
  6.1583 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1584 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1585      apply(simp del: NEGc.simps)
  6.1586      apply(rule conjI)
  6.1587      apply(rule fin.intros)
  6.1588 @@ -5209,13 +5209,13 @@
  6.1589      apply(unfold BINDINGc_def)
  6.1590      apply(simp (no_asm))
  6.1591      apply(rule_tac x="a" in exI)
  6.1592 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1593 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1594      apply(simp (no_asm))
  6.1595      apply(rule allI)+
  6.1596      apply(rule impI)
  6.1597      apply(simp del: NEGc.simps add: psubst_csubst[symmetric])
  6.1598 -    apply(drule_tac x="\<theta>n" in meta_spec)
  6.1599 -    apply(drule_tac x="(a,xa,Pa)#\<theta>c" in meta_spec)
  6.1600 +    apply(drule_tac x="\<theta>_n" in meta_spec)
  6.1601 +    apply(drule_tac x="(a,xa,Pa)#\<theta>_c" in meta_spec)
  6.1602      apply(drule meta_mp)
  6.1603      apply(rule ncloses_subset)
  6.1604      apply(assumption)
  6.1605 @@ -5230,7 +5230,7 @@
  6.1606      apply(blast)
  6.1607      done
  6.1608  next
  6.1609 -  case (TAndL1 x \<Gamma> y B1 M \<Delta> \<Gamma>' B2 \<theta>n \<theta>c)
  6.1610 +  case (TAndL1 x \<Gamma> y B1 M \<Delta> \<Gamma>' B2 \<theta>_n \<theta>_c)
  6.1611    then show ?case     
  6.1612      apply(simp)
  6.1613      apply(subgoal_tac "(y,B1 AND B2) \<in> set \<Gamma>'")
  6.1614 @@ -5249,7 +5249,7 @@
  6.1615      apply(rule disjI1)
  6.1616      apply(rule_tac x="x" in exI)
  6.1617      apply(rule_tac x="ca" in exI)
  6.1618 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1619 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1620      apply(simp del: NEGc.simps)
  6.1621      apply(rule conjI)
  6.1622      apply(rule fin.intros)
  6.1623 @@ -5262,13 +5262,13 @@
  6.1624      apply(unfold BINDINGn_def)
  6.1625      apply(simp (no_asm))
  6.1626      apply(rule_tac x="x" in exI)
  6.1627 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1628 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1629      apply(simp (no_asm))
  6.1630      apply(rule allI)+
  6.1631      apply(rule impI)
  6.1632      apply(simp del: NEGc.simps add: psubst_nsubst[symmetric])
  6.1633 -    apply(drule_tac x="(x,a,Pa)#\<theta>n" in meta_spec)
  6.1634 -    apply(drule_tac x="\<theta>c" in meta_spec)
  6.1635 +    apply(drule_tac x="(x,a,Pa)#\<theta>_n" in meta_spec)
  6.1636 +    apply(drule_tac x="\<theta>_c" in meta_spec)
  6.1637      apply(drule meta_mp)
  6.1638      apply(rule ncloses_extend)
  6.1639      apply(rule ncloses_subset)
  6.1640 @@ -5283,7 +5283,7 @@
  6.1641      apply(blast)
  6.1642      done
  6.1643  next
  6.1644 -  case (TAndL2 x \<Gamma> y B2 M \<Delta> \<Gamma>' B1 \<theta>n \<theta>c)
  6.1645 +  case (TAndL2 x \<Gamma> y B2 M \<Delta> \<Gamma>' B1 \<theta>_n \<theta>_c)
  6.1646    then show ?case 
  6.1647      apply(simp)
  6.1648      apply(subgoal_tac "(y,B1 AND B2) \<in> set \<Gamma>'")
  6.1649 @@ -5302,7 +5302,7 @@
  6.1650      apply(rule disjI2)
  6.1651      apply(rule_tac x="x" in exI)
  6.1652      apply(rule_tac x="ca" in exI)
  6.1653 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1654 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1655      apply(simp del: NEGc.simps)
  6.1656      apply(rule conjI)
  6.1657      apply(rule fin.intros)
  6.1658 @@ -5315,13 +5315,13 @@
  6.1659      apply(unfold BINDINGn_def)
  6.1660      apply(simp (no_asm))
  6.1661      apply(rule_tac x="x" in exI)
  6.1662 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1663 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1664      apply(simp (no_asm))
  6.1665      apply(rule allI)+
  6.1666      apply(rule impI)
  6.1667      apply(simp del: NEGc.simps add: psubst_nsubst[symmetric])
  6.1668 -    apply(drule_tac x="(x,a,Pa)#\<theta>n" in meta_spec)
  6.1669 -    apply(drule_tac x="\<theta>c" in meta_spec)
  6.1670 +    apply(drule_tac x="(x,a,Pa)#\<theta>_n" in meta_spec)
  6.1671 +    apply(drule_tac x="\<theta>_c" in meta_spec)
  6.1672      apply(drule meta_mp)
  6.1673      apply(rule ncloses_extend)
  6.1674      apply(rule ncloses_subset)
  6.1675 @@ -5336,7 +5336,7 @@
  6.1676      apply(blast)
  6.1677      done
  6.1678  next
  6.1679 -  case (TAndR a \<Delta> N c b M \<Gamma> B C \<Delta>' \<theta>n \<theta>c)
  6.1680 +  case (TAndR a \<Delta> N c b M \<Gamma> B C \<Delta>' \<theta>_n \<theta>_c)
  6.1681    then show ?case 
  6.1682      apply(simp)
  6.1683      apply(subgoal_tac "(c,B AND C) \<in> set \<Delta>'")
  6.1684 @@ -5353,8 +5353,8 @@
  6.1685      apply(rule_tac x="ca" in exI)
  6.1686      apply(rule_tac x="a" in exI)
  6.1687      apply(rule_tac x="b" in exI)
  6.1688 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1689 -    apply(rule_tac x="\<theta>n,\<theta>c<N>" in exI)
  6.1690 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1691 +    apply(rule_tac x="\<theta>_n,\<theta>_c<N>" in exI)
  6.1692      apply(simp)
  6.1693      apply(rule conjI)
  6.1694      apply(rule fic.intros)
  6.1695 @@ -5373,13 +5373,13 @@
  6.1696      apply(unfold BINDINGc_def)
  6.1697      apply(simp)
  6.1698      apply(rule_tac x="a" in exI)
  6.1699 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1700 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1701      apply(simp)
  6.1702      apply(rule allI)+
  6.1703      apply(rule impI)
  6.1704      apply(simp add: psubst_csubst[symmetric])
  6.1705 -    apply(drule_tac x="\<theta>n" in meta_spec)
  6.1706 -    apply(drule_tac x="(a,xa,Pa)#\<theta>c" in meta_spec)
  6.1707 +    apply(drule_tac x="\<theta>_n" in meta_spec)
  6.1708 +    apply(drule_tac x="(a,xa,Pa)#\<theta>_c" in meta_spec)
  6.1709      apply(drule meta_mp)
  6.1710      apply(assumption)
  6.1711      apply(drule meta_mp)
  6.1712 @@ -5395,14 +5395,14 @@
  6.1713      apply(unfold BINDINGc_def)
  6.1714      apply(simp)
  6.1715      apply(rule_tac x="b" in exI)
  6.1716 -    apply(rule_tac x="\<theta>n,\<theta>c<N>" in exI)
  6.1717 +    apply(rule_tac x="\<theta>_n,\<theta>_c<N>" in exI)
  6.1718      apply(simp)
  6.1719      apply(rule allI)+
  6.1720      apply(rule impI)
  6.1721      apply(simp add: psubst_csubst[symmetric])
  6.1722      apply(rotate_tac 14)
  6.1723 -    apply(drule_tac x="\<theta>n" in meta_spec)
  6.1724 -    apply(drule_tac x="(b,xa,Pa)#\<theta>c" in meta_spec)
  6.1725 +    apply(drule_tac x="\<theta>_n" in meta_spec)
  6.1726 +    apply(drule_tac x="(b,xa,Pa)#\<theta>_c" in meta_spec)
  6.1727      apply(drule meta_mp)
  6.1728      apply(assumption)
  6.1729      apply(drule meta_mp)
  6.1730 @@ -5418,7 +5418,7 @@
  6.1731      apply(blast)
  6.1732      done
  6.1733  next
  6.1734 -  case (TOrL x \<Gamma> N z y M B \<Delta> C \<Gamma>' \<theta>n \<theta>c)
  6.1735 +  case (TOrL x \<Gamma> N z y M B \<Delta> C \<Gamma>' \<theta>_n \<theta>_c)
  6.1736    then show ?case 
  6.1737      apply(simp)
  6.1738      apply(subgoal_tac "(z,B OR C) \<in> set \<Gamma>'")
  6.1739 @@ -5437,8 +5437,8 @@
  6.1740      apply(rule_tac x="x" in exI)
  6.1741      apply(rule_tac x="y" in exI)
  6.1742      apply(rule_tac x="ca" in exI)
  6.1743 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1744 -    apply(rule_tac x="\<theta>n,\<theta>c<N>" in exI)
  6.1745 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1746 +    apply(rule_tac x="\<theta>_n,\<theta>_c<N>" in exI)
  6.1747      apply(simp del: NEGc.simps)
  6.1748      apply(rule conjI)
  6.1749      apply(rule fin.intros)
  6.1750 @@ -5457,13 +5457,13 @@
  6.1751      apply(unfold BINDINGn_def)
  6.1752      apply(simp del: NEGc.simps)
  6.1753      apply(rule_tac x="x" in exI)
  6.1754 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1755 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1756      apply(simp del: NEGc.simps)
  6.1757      apply(rule allI)+
  6.1758      apply(rule impI)
  6.1759      apply(simp del: NEGc.simps add: psubst_nsubst[symmetric])
  6.1760 -    apply(drule_tac x="(x,a,Pa)#\<theta>n" in meta_spec)
  6.1761 -    apply(drule_tac x="\<theta>c" in meta_spec)
  6.1762 +    apply(drule_tac x="(x,a,Pa)#\<theta>_n" in meta_spec)
  6.1763 +    apply(drule_tac x="\<theta>_c" in meta_spec)
  6.1764      apply(drule meta_mp)
  6.1765      apply(rule ncloses_extend)
  6.1766      apply(rule ncloses_subset)
  6.1767 @@ -5479,14 +5479,14 @@
  6.1768      apply(unfold BINDINGn_def)
  6.1769      apply(simp del: NEGc.simps)
  6.1770      apply(rule_tac x="y" in exI)
  6.1771 -    apply(rule_tac x="\<theta>n,\<theta>c<N>" in exI)
  6.1772 +    apply(rule_tac x="\<theta>_n,\<theta>_c<N>" in exI)
  6.1773      apply(simp del: NEGc.simps)
  6.1774      apply(rule allI)+
  6.1775      apply(rule impI)
  6.1776      apply(simp del: NEGc.simps add: psubst_nsubst[symmetric])
  6.1777      apply(rotate_tac 14)
  6.1778 -    apply(drule_tac x="(y,a,Pa)#\<theta>n" in meta_spec)
  6.1779 -    apply(drule_tac x="\<theta>c" in meta_spec)
  6.1780 +    apply(drule_tac x="(y,a,Pa)#\<theta>_n" in meta_spec)
  6.1781 +    apply(drule_tac x="\<theta>_c" in meta_spec)
  6.1782      apply(drule meta_mp)
  6.1783      apply(rule ncloses_extend)
  6.1784      apply(rule ncloses_subset)
  6.1785 @@ -5501,7 +5501,7 @@
  6.1786      apply(blast)
  6.1787      done
  6.1788  next
  6.1789 -  case (TOrR1 a \<Delta> b \<Gamma> M B1 \<Delta>' B2 \<theta>n \<theta>c)
  6.1790 +  case (TOrR1 a \<Delta> b \<Gamma> M B1 \<Delta>' B2 \<theta>_n \<theta>_c)
  6.1791    then show ?case
  6.1792      apply(simp)
  6.1793      apply(subgoal_tac "(b,B1 OR B2) \<in> set \<Delta>'")
  6.1794 @@ -5518,7 +5518,7 @@
  6.1795      apply(rule disjI1)
  6.1796      apply(rule_tac x="a" in exI)
  6.1797      apply(rule_tac x="c" in exI)
  6.1798 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1799 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1800      apply(simp)
  6.1801      apply(rule conjI)
  6.1802      apply(rule fic.intros)
  6.1803 @@ -5531,13 +5531,13 @@
  6.1804      apply(unfold BINDINGc_def)
  6.1805      apply(simp (no_asm))
  6.1806      apply(rule_tac x="a" in exI)
  6.1807 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1808 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1809      apply(simp (no_asm))
  6.1810      apply(rule allI)+
  6.1811      apply(rule impI)    
  6.1812      apply(simp del: NEGc.simps add: psubst_csubst[symmetric])
  6.1813 -    apply(drule_tac x="\<theta>n" in meta_spec)
  6.1814 -    apply(drule_tac x="(a,xa,Pa)#\<theta>c" in meta_spec)
  6.1815 +    apply(drule_tac x="\<theta>_n" in meta_spec)
  6.1816 +    apply(drule_tac x="(a,xa,Pa)#\<theta>_c" in meta_spec)
  6.1817      apply(drule meta_mp)
  6.1818      apply(assumption)
  6.1819      apply(drule meta_mp)
  6.1820 @@ -5553,7 +5553,7 @@
  6.1821      apply(blast)
  6.1822      done
  6.1823  next
  6.1824 -  case (TOrR2 a \<Delta> b \<Gamma> M B2 \<Delta>' B1 \<theta>n \<theta>c)
  6.1825 +  case (TOrR2 a \<Delta> b \<Gamma> M B2 \<Delta>' B1 \<theta>_n \<theta>_c)
  6.1826    then show ?case 
  6.1827      apply(simp)
  6.1828      apply(subgoal_tac "(b,B1 OR B2) \<in> set \<Delta>'")
  6.1829 @@ -5570,7 +5570,7 @@
  6.1830      apply(rule disjI2)
  6.1831      apply(rule_tac x="a" in exI)
  6.1832      apply(rule_tac x="c" in exI)
  6.1833 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1834 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1835      apply(simp)
  6.1836      apply(rule conjI)
  6.1837      apply(rule fic.intros)
  6.1838 @@ -5583,13 +5583,13 @@
  6.1839      apply(unfold BINDINGc_def)
  6.1840      apply(simp (no_asm))
  6.1841      apply(rule_tac x="a" in exI)
  6.1842 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1843 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1844      apply(simp (no_asm))
  6.1845      apply(rule allI)+
  6.1846      apply(rule impI)    
  6.1847      apply(simp del: NEGc.simps add: psubst_csubst[symmetric])
  6.1848 -    apply(drule_tac x="\<theta>n" in meta_spec)
  6.1849 -    apply(drule_tac x="(a,xa,Pa)#\<theta>c" in meta_spec)
  6.1850 +    apply(drule_tac x="\<theta>_n" in meta_spec)
  6.1851 +    apply(drule_tac x="(a,xa,Pa)#\<theta>_c" in meta_spec)
  6.1852      apply(drule meta_mp)
  6.1853      apply(assumption)
  6.1854      apply(drule meta_mp)
  6.1855 @@ -5605,7 +5605,7 @@
  6.1856      apply(blast)
  6.1857      done
  6.1858  next
  6.1859 -  case (TImpL a \<Delta> N x \<Gamma> M y B C \<Gamma>' \<theta>n \<theta>c)
  6.1860 +  case (TImpL a \<Delta> N x \<Gamma> M y B C \<Gamma>' \<theta>_n \<theta>_c)
  6.1861    then show ?case
  6.1862      apply(simp)
  6.1863      apply(subgoal_tac "(y,B IMP C) \<in> set \<Gamma>'")
  6.1864 @@ -5624,8 +5624,8 @@
  6.1865      apply(rule_tac x="x" in exI)
  6.1866      apply(rule_tac x="a" in exI)
  6.1867      apply(rule_tac x="ca" in exI)
  6.1868 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1869 -    apply(rule_tac x="\<theta>n,\<theta>c<N>" in exI)
  6.1870 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1871 +    apply(rule_tac x="\<theta>_n,\<theta>_c<N>" in exI)
  6.1872      apply(simp del: NEGc.simps)
  6.1873      apply(rule conjI)
  6.1874      apply(rule fin.intros)
  6.1875 @@ -5643,13 +5643,13 @@
  6.1876      apply(unfold BINDINGc_def)
  6.1877      apply(simp del: NEGc.simps)
  6.1878      apply(rule_tac x="a" in exI)
  6.1879 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1880 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1881      apply(simp del: NEGc.simps)
  6.1882      apply(rule allI)+
  6.1883      apply(rule impI)
  6.1884      apply(simp del: NEGc.simps add: psubst_csubst[symmetric])
  6.1885 -    apply(drule_tac x="\<theta>n" in meta_spec)
  6.1886 -    apply(drule_tac x="(a,xa,Pa)#\<theta>c" in meta_spec)
  6.1887 +    apply(drule_tac x="\<theta>_n" in meta_spec)
  6.1888 +    apply(drule_tac x="(a,xa,Pa)#\<theta>_c" in meta_spec)
  6.1889      apply(drule meta_mp)
  6.1890      apply(rule ncloses_subset)
  6.1891      apply(assumption)
  6.1892 @@ -5665,14 +5665,14 @@
  6.1893      apply(unfold BINDINGn_def)
  6.1894      apply(simp del: NEGc.simps)
  6.1895      apply(rule_tac x="x" in exI)
  6.1896 -    apply(rule_tac x="\<theta>n,\<theta>c<N>" in exI)
  6.1897 +    apply(rule_tac x="\<theta>_n,\<theta>_c<N>" in exI)
  6.1898      apply(simp del: NEGc.simps)
  6.1899      apply(rule allI)+
  6.1900      apply(rule impI)
  6.1901      apply(simp del: NEGc.simps add: psubst_nsubst[symmetric])
  6.1902      apply(rotate_tac 12)
  6.1903 -    apply(drule_tac x="(x,aa,Pa)#\<theta>n" in meta_spec)
  6.1904 -    apply(drule_tac x="\<theta>c" in meta_spec)
  6.1905 +    apply(drule_tac x="(x,aa,Pa)#\<theta>_n" in meta_spec)
  6.1906 +    apply(drule_tac x="\<theta>_c" in meta_spec)
  6.1907      apply(drule meta_mp)
  6.1908      apply(rule ncloses_extend)
  6.1909      apply(rule ncloses_subset)
  6.1910 @@ -5687,7 +5687,7 @@
  6.1911      apply(blast)
  6.1912      done
  6.1913  next
  6.1914 -  case (TImpR a \<Delta> b x \<Gamma> B M C \<Delta>' \<theta>n \<theta>c)
  6.1915 +  case (TImpR a \<Delta> b x \<Gamma> B M C \<Delta>' \<theta>_n \<theta>_c)
  6.1916    then show ?case
  6.1917      apply(simp)
  6.1918      apply(subgoal_tac "(b,B IMP C) \<in> set \<Delta>'")
  6.1919 @@ -5704,7 +5704,7 @@
  6.1920      apply(rule_tac x="x" in exI)
  6.1921      apply(rule_tac x="a" in exI)
  6.1922      apply(rule_tac x="c" in exI)
  6.1923 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1924 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1925      apply(simp)
  6.1926      apply(rule conjI)
  6.1927      apply(rule fic.intros)
  6.1928 @@ -5721,16 +5721,16 @@
  6.1929      apply(unfold BINDINGn_def)
  6.1930      apply(simp)
  6.1931      apply(rule_tac x="x" in exI)
  6.1932 -    apply(rule_tac x="\<theta>n,((a,z,Pa)#\<theta>c)<M>" in exI)
  6.1933 +    apply(rule_tac x="\<theta>_n,((a,z,Pa)#\<theta>_c)<M>" in exI)
  6.1934      apply(simp)
  6.1935      apply(rule allI)+
  6.1936      apply(rule impI)
  6.1937 -    apply(rule_tac t="\<theta>n,((a,z,Pa)#\<theta>c)<M>{x:=<aa>.Pb}" and 
  6.1938 -                   s="((x,aa,Pb)#\<theta>n),((a,z,Pa)#\<theta>c)<M>" in subst)
  6.1939 +    apply(rule_tac t="\<theta>_n,((a,z,Pa)#\<theta>_c)<M>{x:=<aa>.Pb}" and 
  6.1940 +                   s="((x,aa,Pb)#\<theta>_n),((a,z,Pa)#\<theta>_c)<M>" in subst)
  6.1941      apply(rule psubst_nsubst)
  6.1942      apply(simp add: fresh_prod fresh_atm fresh_list_cons)
  6.1943 -    apply(drule_tac x="(x,aa,Pb)#\<theta>n" in meta_spec)
  6.1944 -    apply(drule_tac x="(a,z,Pa)#\<theta>c" in meta_spec)
  6.1945 +    apply(drule_tac x="(x,aa,Pb)#\<theta>_n" in meta_spec)
  6.1946 +    apply(drule_tac x="(a,z,Pa)#\<theta>_c" in meta_spec)
  6.1947      apply(drule meta_mp)
  6.1948      apply(rule ncloses_extend)
  6.1949      apply(assumption)
  6.1950 @@ -5753,16 +5753,16 @@
  6.1951      apply(unfold BINDINGc_def)
  6.1952      apply(simp)
  6.1953      apply(rule_tac x="a" in exI)
  6.1954 -    apply(rule_tac x="((x,ca,Q)#\<theta>n),\<theta>c<M>" in exI)
  6.1955 +    apply(rule_tac x="((x,ca,Q)#\<theta>_n),\<theta>_c<M>" in exI)
  6.1956      apply(simp)
  6.1957      apply(rule allI)+
  6.1958      apply(rule impI)
  6.1959 -    apply(rule_tac t="((x,ca,Q)#\<theta>n),\<theta>c<M>{a:=(xaa).Pa}" and 
  6.1960 -                   s="((x,ca,Q)#\<theta>n),((a,xaa,Pa)#\<theta>c)<M>" in subst)
  6.1961 +    apply(rule_tac t="((x,ca,Q)#\<theta>_n),\<theta>_c<M>{a:=(xaa).Pa}" and 
  6.1962 +                   s="((x,ca,Q)#\<theta>_n),((a,xaa,Pa)#\<theta>_c)<M>" in subst)
  6.1963      apply(rule psubst_csubst)
  6.1964      apply(simp add: fresh_prod fresh_atm fresh_list_cons)
  6.1965 -    apply(drule_tac x="(x,ca,Q)#\<theta>n" in meta_spec)
  6.1966 -    apply(drule_tac x="(a,xaa,Pa)#\<theta>c" in meta_spec)
  6.1967 +    apply(drule_tac x="(x,ca,Q)#\<theta>_n" in meta_spec)
  6.1968 +    apply(drule_tac x="(a,xaa,Pa)#\<theta>_c" in meta_spec)
  6.1969      apply(drule meta_mp)
  6.1970      apply(rule ncloses_extend)
  6.1971      apply(assumption)
  6.1972 @@ -5782,7 +5782,7 @@
  6.1973      apply(blast)
  6.1974      done
  6.1975  next
  6.1976 -  case (TCut a \<Delta> N x \<Gamma> M B \<theta>n \<theta>c)
  6.1977 +  case (TCut a \<Delta> N x \<Gamma> M B \<theta>_n \<theta>_c)
  6.1978    then show ?case 
  6.1979      apply -
  6.1980      apply(case_tac "\<forall>y. M\<noteq>Ax y a")
  6.1981 @@ -5793,14 +5793,14 @@
  6.1982      apply(unfold BINDINGc_def)
  6.1983      apply(simp)
  6.1984      apply(rule_tac x="a" in exI)
  6.1985 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.1986 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.1987      apply(simp)
  6.1988      apply(rule allI)
  6.1989      apply(rule allI)
  6.1990      apply(rule impI)
  6.1991      apply(simp add: psubst_csubst[symmetric]) (*?*)
  6.1992 -    apply(drule_tac x="\<theta>n" in meta_spec)
  6.1993 -    apply(drule_tac x="(a,xa,P)#\<theta>c" in meta_spec)
  6.1994 +    apply(drule_tac x="\<theta>_n" in meta_spec)
  6.1995 +    apply(drule_tac x="(a,xa,P)#\<theta>_c" in meta_spec)
  6.1996      apply(drule meta_mp)
  6.1997      apply(assumption)
  6.1998      apply(drule meta_mp)
  6.1999 @@ -5814,15 +5814,15 @@
  6.2000      apply(unfold BINDINGn_def)
  6.2001      apply(simp)
  6.2002      apply(rule_tac x="x" in exI)
  6.2003 -    apply(rule_tac x="\<theta>n,\<theta>c<N>" in exI)
  6.2004 +    apply(rule_tac x="\<theta>_n,\<theta>_c<N>" in exI)
  6.2005      apply(simp)
  6.2006      apply(rule allI)
  6.2007      apply(rule allI)
  6.2008      apply(rule impI)
  6.2009      apply(simp add: psubst_nsubst[symmetric]) (*?*)
  6.2010      apply(rotate_tac 11)
  6.2011 -    apply(drule_tac x="(x,aa,P)#\<theta>n" in meta_spec)
  6.2012 -    apply(drule_tac x="\<theta>c" in meta_spec)
  6.2013 +    apply(drule_tac x="(x,aa,P)#\<theta>_n" in meta_spec)
  6.2014 +    apply(drule_tac x="\<theta>_c" in meta_spec)
  6.2015      apply(drule meta_mp)
  6.2016      apply(rule ncloses_extend)
  6.2017      apply(assumption)
  6.2018 @@ -5844,12 +5844,12 @@
  6.2019      apply(unfold BINDINGc_def)
  6.2020      apply(simp)
  6.2021      apply(rule_tac x="a" in exI)
  6.2022 -    apply(rule_tac x="\<theta>n,\<theta>c<M>" in exI)
  6.2023 +    apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
  6.2024      apply(simp)
  6.2025      apply(rule allI)+
  6.2026      apply(rule impI)
  6.2027 -    apply(drule_tac x="\<theta>n" in meta_spec)
  6.2028 -    apply(drule_tac x="(a,xa,P)#\<theta>c" in meta_spec)
  6.2029 +    apply(drule_tac x="\<theta>_n" in meta_spec)
  6.2030 +    apply(drule_tac x="(a,xa,P)#\<theta>_c" in meta_spec)
  6.2031      apply(drule meta_mp)
  6.2032      apply(assumption)
  6.2033      apply(drule meta_mp)
  6.2034 @@ -5935,15 +5935,15 @@
  6.2035      apply(unfold BINDINGn_def)
  6.2036      apply(simp)
  6.2037      apply(rule_tac x="x" in exI)
  6.2038 -    apply(rule_tac x="\<theta>n,\<theta>c<N>" in exI)
  6.2039 +    apply(rule_tac x="\<theta>_n,\<theta>_c<N>" in exI)
  6.2040      apply(simp)
  6.2041      apply(rule allI)
  6.2042      apply(rule allI)
  6.2043      apply(rule impI)
  6.2044      apply(simp add: psubst_nsubst[symmetric]) (*?*)
  6.2045      apply(rotate_tac 10)
  6.2046 -    apply(drule_tac x="(x,aa,P)#\<theta>n" in meta_spec)
  6.2047 -    apply(drule_tac x="\<theta>c" in meta_spec)
  6.2048 +    apply(drule_tac x="(x,aa,P)#\<theta>_n" in meta_spec)
  6.2049 +    apply(drule_tac x="\<theta>_c" in meta_spec)
  6.2050      apply(drule meta_mp)
  6.2051      apply(rule ncloses_extend)
  6.2052      apply(assumption)
  6.2053 @@ -6038,7 +6038,7 @@
  6.2054  
  6.2055  lemma lookup1:
  6.2056    assumes a: "x\<sharp>(idn \<Gamma> b)"
  6.2057 -  shows "lookup x a (idn \<Gamma> b) \<theta>c = lookupa x a \<theta>c"
  6.2058 +  shows "lookup x a (idn \<Gamma> b) \<theta>_c = lookupa x a \<theta>_c"
  6.2059  using a
  6.2060  apply(induct \<Gamma>)
  6.2061  apply(auto simp add: fresh_list_cons fresh_prod fresh_atm)
  6.2062 @@ -6046,7 +6046,7 @@
  6.2063  
  6.2064  lemma lookup2:
  6.2065    assumes a: "\<not>(x\<sharp>(idn \<Gamma> b))"
  6.2066 -  shows "lookup x a (idn \<Gamma> b) \<theta>c = lookupb x a \<theta>c b (Ax x b)"
  6.2067 +  shows "lookup x a (idn \<Gamma> b) \<theta>_c = lookupb x a \<theta>_c b (Ax x b)"
  6.2068  using a
  6.2069  apply(induct \<Gamma>)
  6.2070  apply(auto simp add: fresh_list_cons fresh_prod fresh_atm fresh_list_nil)
     7.1 --- a/src/HOL/Nominal/Examples/Fsub.thy	Wed Nov 28 15:38:12 2012 +0100
     7.2 +++ b/src/HOL/Nominal/Examples/Fsub.thy	Wed Nov 28 15:59:18 2012 +0100
     7.3 @@ -1501,7 +1501,7 @@
     7.4    have h:"(D @ TVarB X Q # \<Gamma>)\<turnstile>S<:T" by fact
     7.5    then have ST: "(D[X \<mapsto> P]\<^sub>e @ \<Gamma>) \<turnstile> S[X \<mapsto> P]\<^sub>\<tau> <: T[X \<mapsto> P]\<^sub>\<tau>" using SA_trans_TVar by auto
     7.6    from h have G_ok: "\<turnstile> (D @ TVarB X Q # \<Gamma>) ok" by (rule subtype_implies_ok)
     7.7 -  from G_ok and SA_trans_TVar have X\<Gamma>_ok: "\<turnstile> (TVarB X Q # \<Gamma>) ok"
     7.8 +  from G_ok and SA_trans_TVar have X_\<Gamma>_ok: "\<turnstile> (TVarB X Q # \<Gamma>) ok"
     7.9      by (auto intro: validE_append)
    7.10    show "(D[X \<mapsto> P]\<^sub>e @ \<Gamma>) \<turnstile> Tvar Y[X \<mapsto> P]\<^sub>\<tau><:T[X \<mapsto> P]\<^sub>\<tau>"
    7.11    proof (cases "X = Y")
    7.12 @@ -1509,7 +1509,7 @@
    7.13      from eq and SA_trans_TVar have "TVarB Y Q \<in> set (D @ TVarB X Q # \<Gamma>)" by simp
    7.14      with G_ok have QS: "Q = S" using `TVarB Y S \<in> set (D @ TVarB X Q # \<Gamma>)`
    7.15        by (rule uniqueness_of_ctxt)
    7.16 -    from X\<Gamma>_ok have "X \<sharp> ty_dom \<Gamma>" and "Q closed_in \<Gamma>" by auto
    7.17 +    from X_\<Gamma>_ok have "X \<sharp> ty_dom \<Gamma>" and "Q closed_in \<Gamma>" by auto
    7.18      then have XQ: "X \<sharp> Q" by (rule closed_in_fresh)
    7.19      note `\<Gamma>\<turnstile>P<:Q`
    7.20      moreover from ST have "\<turnstile> (D[X \<mapsto> P]\<^sub>e @ \<Gamma>) ok" by (rule subtype_implies_ok)
    7.21 @@ -1534,7 +1534,7 @@
    7.22        with neq and ST show ?thesis by auto
    7.23      next
    7.24        assume Y: "TVarB Y S \<in> set \<Gamma>"
    7.25 -      from X\<Gamma>_ok have "X \<sharp> ty_dom \<Gamma>" and "\<turnstile> \<Gamma> ok" by auto
    7.26 +      from X_\<Gamma>_ok have "X \<sharp> ty_dom \<Gamma>" and "\<turnstile> \<Gamma> ok" by auto
    7.27        then have "X \<sharp> \<Gamma>" by (simp add: valid_ty_dom_fresh)
    7.28        with Y have "X \<sharp> S"
    7.29          by (induct \<Gamma>) (auto simp add: fresh_list_nil fresh_list_cons)
     8.1 --- a/src/HOL/Probability/Infinite_Product_Measure.thy	Wed Nov 28 15:38:12 2012 +0100
     8.2 +++ b/src/HOL/Probability/Infinite_Product_Measure.thy	Wed Nov 28 15:59:18 2012 +0100
     8.3 @@ -19,8 +19,10 @@
     8.4    assume "\<not> finite I"
     8.5    then have I_not_empty: "I \<noteq> {}" by auto
     8.6    interpret G!: algebra ?\<Omega> generator by (rule algebra_generator) fact
     8.7 -  note \<mu>G_mono =
     8.8 -    G.additive_increasing[OF positive_\<mu>G[OF I_not_empty] additive_\<mu>G[OF I_not_empty], THEN increasingD]
     8.9 +  note mu_G_mono =
    8.10 +    G.additive_increasing[OF positive_mu_G[OF I_not_empty] additive_mu_G[OF I_not_empty],
    8.11 +      THEN increasingD]
    8.12 +  write mu_G  ("\<mu>G")
    8.13  
    8.14    { fix Z J assume J: "J \<noteq> {}" "finite J" "J \<subseteq> I" and Z: "Z \<in> ?G"
    8.15  
    8.16 @@ -42,7 +44,7 @@
    8.17        have ***: "((\<lambda>x. merge J (I - J) (y, x)) -` Z \<inter> space (Pi\<^isub>M I M)) \<in> ?G"
    8.18          using J K by (intro generatorI) auto
    8.19        have "\<mu>G ((\<lambda>x. merge J (I - J) (y, x)) -` emb I K X \<inter> space (Pi\<^isub>M I M)) = emeasure (Pi\<^isub>M (K - J) M) (?M y)"
    8.20 -        unfolding * using K J by (subst \<mu>G_eq[OF _ _ _ **]) auto
    8.21 +        unfolding * using K J by (subst mu_G_eq[OF _ _ _ **]) auto
    8.22        note * ** *** this }
    8.23      note merge_in_G = this
    8.24  
    8.25 @@ -61,7 +63,7 @@
    8.26        fix x assume x: "x \<in> space (Pi\<^isub>M J M)"
    8.27        with K merge_in_G(2)[OF this]
    8.28        show "emeasure (Pi\<^isub>M (K - J) M) (?M x) = \<mu>G (?MZ x)"
    8.29 -        unfolding `Z = emb I K X` merge_in_G(1)[OF x] by (subst \<mu>G_eq) auto
    8.30 +        unfolding `Z = emb I K X` merge_in_G(1)[OF x] by (subst mu_G_eq) auto
    8.31      qed
    8.32      finally have fold: "\<mu>G Z = (\<integral>\<^isup>+x. \<mu>G (?MZ x) \<partial>Pi\<^isub>M J M)" .
    8.33  
    8.34 @@ -74,12 +76,12 @@
    8.35      let ?q = "\<lambda>y. \<mu>G ((\<lambda>x. merge J (I - J) (y,x)) -` Z \<inter> space (Pi\<^isub>M I M))"
    8.36      have "?q \<in> borel_measurable (Pi\<^isub>M J M)"
    8.37        unfolding `Z = emb I K X` using J K merge_in_G(3)
    8.38 -      by (simp add: merge_in_G  \<mu>G_eq emeasure_fold_measurable cong: measurable_cong)
    8.39 +      by (simp add: merge_in_G  mu_G_eq emeasure_fold_measurable cong: measurable_cong)
    8.40      note this fold le_1 merge_in_G(3) }
    8.41    note fold = this
    8.42  
    8.43    have "\<exists>\<mu>. (\<forall>s\<in>?G. \<mu> s = \<mu>G s) \<and> measure_space ?\<Omega> (sigma_sets ?\<Omega> ?G) \<mu>"
    8.44 -  proof (rule G.caratheodory_empty_continuous[OF positive_\<mu>G additive_\<mu>G])
    8.45 +  proof (rule G.caratheodory_empty_continuous[OF positive_mu_G additive_mu_G])
    8.46      fix A assume "A \<in> ?G"
    8.47      with generatorE guess J X . note JX = this
    8.48      interpret JK: finite_product_prob_space M J by default fact+ 
    8.49 @@ -87,13 +89,13 @@
    8.50    next
    8.51      fix A assume A: "range A \<subseteq> ?G" "decseq A" "(\<Inter>i. A i) = {}"
    8.52      then have "decseq (\<lambda>i. \<mu>G (A i))"
    8.53 -      by (auto intro!: \<mu>G_mono simp: decseq_def)
    8.54 +      by (auto intro!: mu_G_mono simp: decseq_def)
    8.55      moreover
    8.56      have "(INF i. \<mu>G (A i)) = 0"
    8.57      proof (rule ccontr)
    8.58        assume "(INF i. \<mu>G (A i)) \<noteq> 0" (is "?a \<noteq> 0")
    8.59        moreover have "0 \<le> ?a"
    8.60 -        using A positive_\<mu>G[OF I_not_empty] by (auto intro!: INF_greatest simp: positive_def)
    8.61 +        using A positive_mu_G[OF I_not_empty] by (auto intro!: INF_greatest simp: positive_def)
    8.62        ultimately have "0 < ?a" by auto
    8.63  
    8.64        have "\<forall>n. \<exists>J X. J \<noteq> {} \<and> finite J \<and> J \<subseteq> I \<and> X \<in> sets (Pi\<^isub>M J M) \<and> A n = emb I J X \<and> \<mu>G (A n) = emeasure (limP J M (\<lambda>J. (Pi\<^isub>M J M))) X"
    8.65 @@ -114,7 +116,7 @@
    8.66        interpret J: finite_product_prob_space M "J i" for i by default fact+
    8.67  
    8.68        have a_le_1: "?a \<le> 1"
    8.69 -        using \<mu>G_spec[of "J 0" "A 0" "X 0"] J A_eq
    8.70 +        using mu_G_spec[of "J 0" "A 0" "X 0"] J A_eq
    8.71          by (auto intro!: INF_lower2[of 0] J.measure_le_1)
    8.72  
    8.73        let ?M = "\<lambda>K Z y. (\<lambda>x. merge K (I - K) (y, x)) -` Z \<inter> space (Pi\<^isub>M I M)"
    8.74 @@ -166,7 +168,7 @@
    8.75              fix x assume x: "x \<in> space (Pi\<^isub>M J' M)"
    8.76              assume "?a / 2^(k+1) \<le> ?q n x"
    8.77              also have "?q n x \<le> ?q m x"
    8.78 -            proof (rule \<mu>G_mono)
    8.79 +            proof (rule mu_G_mono)
    8.80                from fold(4)[OF J', OF Z_sets x]
    8.81                show "?M J' (Z n) x \<in> ?G" "?M J' (Z m) x \<in> ?G" by auto
    8.82                show "?M J' (Z n) x \<subseteq> ?M J' (Z m) x"
    8.83 @@ -248,7 +250,7 @@
    8.84          moreover
    8.85          from w have "?a / 2 ^ (k + 1) \<le> ?q k k (w k)" by auto
    8.86          then have "?M (J k) (A k) (w k) \<noteq> {}"
    8.87 -          using positive_\<mu>G[OF I_not_empty, unfolded positive_def] `0 < ?a` `?a \<le> 1`
    8.88 +          using positive_mu_G[OF I_not_empty, unfolded positive_def] `0 < ?a` `?a \<le> 1`
    8.89            by (cases ?a) (auto simp: divide_le_0_iff power_le_zero_eq)
    8.90          then obtain x where "x \<in> ?M (J k) (A k) (w k)" by auto
    8.91          then have "merge (J k) (I - J k) (w k, x) \<in> A k" by auto
    8.92 @@ -317,7 +319,7 @@
    8.93      then have "\<mu> (emb I J (Pi\<^isub>E J X)) = \<mu>G (emb I J (Pi\<^isub>E J X))"
    8.94        using \<mu> by simp
    8.95      also have "\<dots> = (\<Prod> j\<in>J. if j \<in> J then emeasure (M j) (X j) else emeasure (M j) (space (M j)))"
    8.96 -      using J  `I \<noteq> {}` by (subst \<mu>G_spec[OF _ _ _ refl]) (auto simp: emeasure_PiM Pi_iff)
    8.97 +      using J  `I \<noteq> {}` by (subst mu_G_spec[OF _ _ _ refl]) (auto simp: emeasure_PiM Pi_iff)
    8.98      also have "\<dots> = (\<Prod>j\<in>J \<union> {i \<in> I. emeasure (M i) (space (M i)) \<noteq> 1}.
    8.99        if j \<in> J then emeasure (M j) (X j) else emeasure (M j) (space (M j)))"
   8.100        using J `I \<noteq> {}` by (intro setprod_mono_one_right) (auto simp: M.emeasure_space_1)
     9.1 --- a/src/HOL/Probability/Lebesgue_Integration.thy	Wed Nov 28 15:38:12 2012 +0100
     9.2 +++ b/src/HOL/Probability/Lebesgue_Integration.thy	Wed Nov 28 15:59:18 2012 +0100
     9.3 @@ -788,7 +788,7 @@
     9.4    fix g assume g: "simple_function M g" "g \<le> max 0 \<circ> f"
     9.5    let ?G = "{x \<in> space M. \<not> g x \<noteq> \<infinity>}"
     9.6    note gM = g(1)[THEN borel_measurable_simple_function]
     9.7 -  have \<mu>G_pos: "0 \<le> (emeasure M) ?G" using gM by auto
     9.8 +  have \<mu>_G_pos: "0 \<le> (emeasure M) ?G" using gM by auto
     9.9    let ?g = "\<lambda>y x. if g x = \<infinity> then y else max 0 (g x)"
    9.10    from g gM have g_in_A: "\<And>y. 0 \<le> y \<Longrightarrow> y \<noteq> \<infinity> \<Longrightarrow> ?g y \<in> ?A"
    9.11      apply (safe intro!: simple_function_max simple_function_If)
    9.12 @@ -804,15 +804,15 @@
    9.13        by (intro SUP_upper2[OF g0] simple_integral_mono_AE)
    9.14           (auto simp: max_def intro!: simple_function_If)
    9.15    next
    9.16 -    assume \<mu>G: "(emeasure M) ?G \<noteq> 0"
    9.17 +    assume \<mu>_G: "(emeasure M) ?G \<noteq> 0"
    9.18      have "SUPR ?A (integral\<^isup>S M) = \<infinity>"
    9.19      proof (intro SUP_PInfty)
    9.20        fix n :: nat
    9.21        let ?y = "ereal (real n) / (if (emeasure M) ?G = \<infinity> then 1 else (emeasure M) ?G)"
    9.22 -      have "0 \<le> ?y" "?y \<noteq> \<infinity>" using \<mu>G \<mu>G_pos by (auto simp: ereal_divide_eq)
    9.23 +      have "0 \<le> ?y" "?y \<noteq> \<infinity>" using \<mu>_G \<mu>_G_pos by (auto simp: ereal_divide_eq)
    9.24        then have "?g ?y \<in> ?A" by (rule g_in_A)
    9.25        have "real n \<le> ?y * (emeasure M) ?G"
    9.26 -        using \<mu>G \<mu>G_pos by (cases "(emeasure M) ?G") (auto simp: field_simps)
    9.27 +        using \<mu>_G \<mu>_G_pos by (cases "(emeasure M) ?G") (auto simp: field_simps)
    9.28        also have "\<dots> = (\<integral>\<^isup>Sx. ?y * indicator ?G x \<partial>M)"
    9.29          using `0 \<le> ?y` `?g ?y \<in> ?A` gM
    9.30          by (subst simple_integral_cmult_indicator) auto
    10.1 --- a/src/HOL/Probability/Projective_Family.thy	Wed Nov 28 15:38:12 2012 +0100
    10.2 +++ b/src/HOL/Probability/Projective_Family.thy	Wed Nov 28 15:59:18 2012 +0100
    10.3 @@ -226,14 +226,14 @@
    10.4    "J \<noteq> {} \<Longrightarrow> finite J \<Longrightarrow> J \<subseteq> I \<Longrightarrow> X \<in> sets (Pi\<^isub>M J M) \<Longrightarrow> A = emb I J X \<Longrightarrow> A \<in> generator"
    10.5    unfolding generator_def by auto
    10.6  
    10.7 -definition
    10.8 +definition mu_G ("\<mu>G") where
    10.9    "\<mu>G A =
   10.10      (THE x. \<forall>J. J \<noteq> {} \<longrightarrow> finite J \<longrightarrow> J \<subseteq> I \<longrightarrow> (\<forall>X\<in>sets (Pi\<^isub>M J M). A = emb I J X \<longrightarrow> x = emeasure (limP J M P) X))"
   10.11  
   10.12 -lemma \<mu>G_spec:
   10.13 +lemma mu_G_spec:
   10.14    assumes J: "J \<noteq> {}" "finite J" "J \<subseteq> I" "A = emb I J X" "X \<in> sets (Pi\<^isub>M J M)"
   10.15    shows "\<mu>G A = emeasure (limP J M P) X"
   10.16 -  unfolding \<mu>G_def
   10.17 +  unfolding mu_G_def
   10.18  proof (intro the_equality allI impI ballI)
   10.19    fix K Y assume K: "K \<noteq> {}" "finite K" "K \<subseteq> I" "A = emb I K Y" "Y \<in> sets (Pi\<^isub>M K M)"
   10.20    have "emeasure (limP K M P) Y = emeasure (limP (K \<union> J) M P) (emb (K \<union> J) K Y)"
   10.21 @@ -245,9 +245,9 @@
   10.22    finally show "emeasure (limP J M P) X = emeasure (limP K M P) Y" ..
   10.23  qed (insert J, force)
   10.24  
   10.25 -lemma \<mu>G_eq:
   10.26 +lemma mu_G_eq:
   10.27    "J \<noteq> {} \<Longrightarrow> finite J \<Longrightarrow> J \<subseteq> I \<Longrightarrow> X \<in> sets (Pi\<^isub>M J M) \<Longrightarrow> \<mu>G (emb I J X) = emeasure (limP J M P) X"
   10.28 -  by (intro \<mu>G_spec) auto
   10.29 +  by (intro mu_G_spec) auto
   10.30  
   10.31  lemma generator_Ex:
   10.32    assumes *: "A \<in> generator"
   10.33 @@ -255,7 +255,7 @@
   10.34  proof -
   10.35    from * obtain J X where J: "J \<noteq> {}" "finite J" "J \<subseteq> I" "A = emb I J X" "X \<in> sets (Pi\<^isub>M J M)"
   10.36      unfolding generator_def by auto
   10.37 -  with \<mu>G_spec[OF this] show ?thesis by auto
   10.38 +  with mu_G_spec[OF this] show ?thesis by auto
   10.39  qed
   10.40  
   10.41  lemma generatorE:
   10.42 @@ -284,7 +284,7 @@
   10.43         auto
   10.44  qed
   10.45  
   10.46 -lemma positive_\<mu>G:
   10.47 +lemma positive_mu_G:
   10.48    assumes "I \<noteq> {}"
   10.49    shows "positive generator \<mu>G"
   10.50  proof -
   10.51 @@ -302,7 +302,7 @@
   10.52    qed
   10.53  qed
   10.54  
   10.55 -lemma additive_\<mu>G:
   10.56 +lemma additive_mu_G:
   10.57    assumes "I \<noteq> {}"
   10.58    shows "additive generator \<mu>G"
   10.59  proof -
   10.60 @@ -324,7 +324,7 @@
   10.61      then have "\<mu>G (A \<union> B) = \<mu>G (emb I (J \<union> K) (emb (J \<union> K) J X \<union> emb (J \<union> K) K Y))"
   10.62        by simp
   10.63      also have "\<dots> = emeasure (limP (J \<union> K) M P) (emb (J \<union> K) J X \<union> emb (J \<union> K) K Y)"
   10.64 -      using JK J(1, 4) K(1, 4) by (simp add: \<mu>G_eq sets.Un del: prod_emb_Un)
   10.65 +      using JK J(1, 4) K(1, 4) by (simp add: mu_G_eq sets.Un del: prod_emb_Un)
   10.66      also have "\<dots> = \<mu>G A + \<mu>G B"
   10.67        using J K JK_disj by (simp add: plus_emeasure[symmetric])
   10.68      finally show "\<mu>G (A \<union> B) = \<mu>G A + \<mu>G B" .
    11.1 --- a/src/HOL/Probability/Projective_Limit.thy	Wed Nov 28 15:38:12 2012 +0100
    11.2 +++ b/src/HOL/Probability/Projective_Limit.thy	Wed Nov 28 15:59:18 2012 +0100
    11.3 @@ -115,10 +115,13 @@
    11.4    let ?\<Omega> = "\<Pi>\<^isub>E i\<in>I. space borel"
    11.5    let ?G = generator
    11.6    interpret G!: algebra ?\<Omega> generator by (intro  algebra_generator) fact
    11.7 -  note \<mu>G_mono =
    11.8 -    G.additive_increasing[OF positive_\<mu>G[OF `I \<noteq> {}`] additive_\<mu>G[OF `I \<noteq> {}`], THEN increasingD]
    11.9 +  note mu_G_mono =
   11.10 +    G.additive_increasing[OF positive_mu_G[OF `I \<noteq> {}`] additive_mu_G[OF `I \<noteq> {}`],
   11.11 +      THEN increasingD]
   11.12 +  write mu_G  ("\<mu>G")
   11.13 +
   11.14    have "\<exists>\<mu>. (\<forall>s\<in>?G. \<mu> s = \<mu>G s) \<and> measure_space ?\<Omega> (sigma_sets ?\<Omega> ?G) \<mu>"
   11.15 -  proof (rule G.caratheodory_empty_continuous[OF positive_\<mu>G additive_\<mu>G,
   11.16 +  proof (rule G.caratheodory_empty_continuous[OF positive_mu_G additive_mu_G,
   11.17        OF `I \<noteq> {}`, OF `I \<noteq> {}`])
   11.18      fix A assume "A \<in> ?G"
   11.19      with generatorE guess J X . note JX = this
   11.20 @@ -127,13 +130,13 @@
   11.21    next
   11.22      fix Z assume Z: "range Z \<subseteq> ?G" "decseq Z" "(\<Inter>i. Z i) = {}"
   11.23      then have "decseq (\<lambda>i. \<mu>G (Z i))"
   11.24 -      by (auto intro!: \<mu>G_mono simp: decseq_def)
   11.25 +      by (auto intro!: mu_G_mono simp: decseq_def)
   11.26      moreover
   11.27      have "(INF i. \<mu>G (Z i)) = 0"
   11.28      proof (rule ccontr)
   11.29        assume "(INF i. \<mu>G (Z i)) \<noteq> 0" (is "?a \<noteq> 0")
   11.30        moreover have "0 \<le> ?a"
   11.31 -        using Z positive_\<mu>G[OF `I \<noteq> {}`] by (auto intro!: INF_greatest simp: positive_def)
   11.32 +        using Z positive_mu_G[OF `I \<noteq> {}`] by (auto intro!: INF_greatest simp: positive_def)
   11.33        ultimately have "0 < ?a" by auto
   11.34        hence "?a \<noteq> -\<infinity>" by auto
   11.35        have "\<forall>n. \<exists>J B. J \<noteq> {} \<and> finite J \<and> J \<subseteq> I \<and> B \<in> sets (Pi\<^isub>M J (\<lambda>_. borel)) \<and>
   11.36 @@ -158,10 +161,10 @@
   11.37          unfolding J_def B_def by (subst prod_emb_trans) (insert Z, auto)
   11.38        interpret prob_space "P (J i)" for i using proj_prob_space by simp
   11.39        have "?a \<le> \<mu>G (Z 0)" by (auto intro: INF_lower)
   11.40 -      also have "\<dots> < \<infinity>" using J by (auto simp: Z_eq \<mu>G_eq limP_finite proj_sets)
   11.41 +      also have "\<dots> < \<infinity>" using J by (auto simp: Z_eq mu_G_eq limP_finite proj_sets)
   11.42        finally have "?a \<noteq> \<infinity>" by simp
   11.43        have "\<And>n. \<bar>\<mu>G (Z n)\<bar> \<noteq> \<infinity>" unfolding Z_eq using J J_mono
   11.44 -        by (subst \<mu>G_eq) (auto simp: limP_finite proj_sets \<mu>G_eq)
   11.45 +        by (subst mu_G_eq) (auto simp: limP_finite proj_sets mu_G_eq)
   11.46  
   11.47        have countable_UN_J: "countable (\<Union>n. J n)" by (simp add: countable_finite)
   11.48        def Utn \<equiv> "to_nat_on (\<Union>n. J n)"
   11.49 @@ -295,7 +298,7 @@
   11.50              (\<Inter> i\<in>{1..n}. prod_emb (J n) (\<lambda>_. borel) (J i) (K i))" .
   11.51          hence "Y n \<in> ?G" using J J_mono K_sets `n \<ge> 1` by (intro generatorI[OF _ _ _ _ Y_emb]) auto
   11.52          hence "\<bar>\<mu>G (Y n)\<bar> \<noteq> \<infinity>" unfolding Y_emb using J J_mono K_sets `n \<ge> 1`
   11.53 -          by (subst \<mu>G_eq) (auto simp: limP_finite proj_sets \<mu>G_eq)
   11.54 +          by (subst mu_G_eq) (auto simp: limP_finite proj_sets mu_G_eq)
   11.55          interpret finite_measure "(limP (J n) (\<lambda>_. borel) P)"
   11.56          proof
   11.57            have "emeasure (limP (J n) (\<lambda>_. borel) P) (J n \<rightarrow>\<^isub>E space borel) \<noteq> \<infinity>"
   11.58 @@ -304,14 +307,14 @@
   11.59               by (simp add: space_PiM)
   11.60          qed
   11.61          have "\<mu>G (Z n) = limP (J n) (\<lambda>_. borel) P (B n)"
   11.62 -          unfolding Z_eq using J by (auto simp: \<mu>G_eq)
   11.63 +          unfolding Z_eq using J by (auto simp: mu_G_eq)
   11.64          moreover have "\<mu>G (Y n) =
   11.65            limP (J n) (\<lambda>_. borel) P (\<Inter>i\<in>{Suc 0..n}. prod_emb (J n) (\<lambda>_. borel) (J i) (K i))"
   11.66 -          unfolding Y_emb using J J_mono K_sets `n \<ge> 1` by (subst \<mu>G_eq) auto
   11.67 +          unfolding Y_emb using J J_mono K_sets `n \<ge> 1` by (subst mu_G_eq) auto
   11.68          moreover have "\<mu>G (Z n - Y n) = limP (J n) (\<lambda>_. borel) P
   11.69            (B n - (\<Inter>i\<in>{Suc 0..n}. prod_emb (J n) (\<lambda>_. borel) (J i) (K i)))"
   11.70            unfolding Z_eq Y_emb prod_emb_Diff[symmetric] using J J_mono K_sets `n \<ge> 1`
   11.71 -          by (subst \<mu>G_eq) (auto intro!: sets.Diff)
   11.72 +          by (subst mu_G_eq) (auto intro!: sets.Diff)
   11.73          ultimately
   11.74          have "\<mu>G (Z n) - \<mu>G (Y n) = \<mu>G (Z n - Y n)"
   11.75            using J J_mono K_sets `n \<ge> 1`
   11.76 @@ -324,17 +327,17 @@
   11.77          have "Z n - Y n \<in> ?G" "(\<Union> i\<in>{1..n}. (Z i - Z' i)) \<in> ?G"
   11.78            using `Z' _ \<in> ?G` `Z _ \<in> ?G` `Y _ \<in> ?G` by auto
   11.79          hence "\<mu>G (Z n - Y n) \<le> \<mu>G (\<Union> i\<in>{1..n}. (Z i - Z' i))"
   11.80 -          using subs G.additive_increasing[OF positive_\<mu>G[OF `I \<noteq> {}`] additive_\<mu>G[OF `I \<noteq> {}`]]
   11.81 +          using subs G.additive_increasing[OF positive_mu_G[OF `I \<noteq> {}`] additive_mu_G[OF `I \<noteq> {}`]]
   11.82            unfolding increasing_def by auto
   11.83          also have "\<dots> \<le> (\<Sum> i\<in>{1..n}. \<mu>G (Z i - Z' i))" using `Z _ \<in> ?G` `Z' _ \<in> ?G`
   11.84 -          by (intro G.subadditive[OF positive_\<mu>G additive_\<mu>G, OF `I \<noteq> {}` `I \<noteq> {}`]) auto
   11.85 +          by (intro G.subadditive[OF positive_mu_G additive_mu_G, OF `I \<noteq> {}` `I \<noteq> {}`]) auto
   11.86          also have "\<dots> \<le> (\<Sum> i\<in>{1..n}. 2 powr -real i * ?a)"
   11.87          proof (rule setsum_mono)
   11.88            fix i assume "i \<in> {1..n}" hence "i \<le> n" by simp
   11.89            have "\<mu>G (Z i - Z' i) = \<mu>G (prod_emb I (\<lambda>_. borel) (J i) (B i - K i))"
   11.90              unfolding Z'_def Z_eq by simp
   11.91            also have "\<dots> = P (J i) (B i - K i)"
   11.92 -            apply (subst \<mu>G_eq) using J K_sets apply auto
   11.93 +            apply (subst mu_G_eq) using J K_sets apply auto
   11.94              apply (subst limP_finite) apply auto
   11.95              done
   11.96            also have "\<dots> = P (J i) (B i) - P (J i) (K i)"
   11.97 @@ -374,7 +377,7 @@
   11.98            apply (rule ereal_less_add[OF _ R]) using `\<bar>\<mu>G (Z n)\<bar> \<noteq> \<infinity>` by auto
   11.99          finally have "\<mu>G (Y n) > 0"
  11.100            using `\<bar>\<mu>G (Z n)\<bar> \<noteq> \<infinity>` by (auto simp: ac_simps zero_ereal_def[symmetric])
  11.101 -        thus "Y n \<noteq> {}" using positive_\<mu>G `I \<noteq> {}` by (auto simp add: positive_def)
  11.102 +        thus "Y n \<noteq> {}" using positive_mu_G `I \<noteq> {}` by (auto simp add: positive_def)
  11.103        qed
  11.104        hence "\<forall>n\<in>{1..}. \<exists>y. y \<in> Y n" by auto
  11.105        then obtain y where y: "\<And>n. n \<ge> 1 \<Longrightarrow> y n \<in> Y n" unfolding bchoice_iff by force
  11.106 @@ -532,7 +535,7 @@
  11.107      hence "\<mu> (emb I J (Pi\<^isub>E J X)) = \<mu>G (emb I J (Pi\<^isub>E J X))" using \<mu> by simp
  11.108      also have "\<dots> = emeasure (P J) (Pi\<^isub>E J X)"
  11.109        using JX assms proj_sets
  11.110 -      by (subst \<mu>G_eq) (auto simp: \<mu>G_eq limP_finite intro: sets_PiM_I_finite)
  11.111 +      by (subst mu_G_eq) (auto simp: mu_G_eq limP_finite intro: sets_PiM_I_finite)
  11.112      finally show "\<mu> (emb I J (Pi\<^isub>E J X)) = emeasure (P J) (Pi\<^isub>E J X)" .
  11.113    next
  11.114      show "emeasure (P J) (Pi\<^isub>E J B) = emeasure (limP J (\<lambda>_. borel) P) (Pi\<^isub>E J B)"
    12.1 --- a/src/HOL/Probability/Sigma_Algebra.thy	Wed Nov 28 15:38:12 2012 +0100
    12.2 +++ b/src/HOL/Probability/Sigma_Algebra.thy	Wed Nov 28 15:59:18 2012 +0100
    12.3 @@ -387,7 +387,7 @@
    12.4  subsection {* Binary Unions *}
    12.5  
    12.6  definition binary :: "'a \<Rightarrow> 'a \<Rightarrow> nat \<Rightarrow> 'a"
    12.7 -  where "binary a b =  (\<lambda>\<^isup>x. b)(0 := a)"
    12.8 +  where "binary a b =  (\<lambda>x. b)(0 := a)"
    12.9  
   12.10  lemma range_binary_eq: "range(binary a b) = {a,b}"
   12.11    by (auto simp add: binary_def)
   12.12 @@ -2117,7 +2117,7 @@
   12.13  subsection {* A Two-Element Series *}
   12.14  
   12.15  definition binaryset :: "'a set \<Rightarrow> 'a set \<Rightarrow> nat \<Rightarrow> 'a set "
   12.16 -  where "binaryset A B = (\<lambda>\<^isup>x. {})(0 := A, Suc 0 := B)"
   12.17 +  where "binaryset A B = (\<lambda>x. {})(0 := A, Suc 0 := B)"
   12.18  
   12.19  lemma range_binaryset_eq: "range(binaryset A B) = {A,B,{}}"
   12.20    apply (simp add: binaryset_def)