# HG changeset patch # User wenzelm # Date 1354114758 -3600 # Node ID 4aa34bd43228519583bb834341a84142a660c17d # Parent 227477f17c26397c62e3fbbb7c0a57957bd2f03e eliminated slightly odd identifiers; diff -r 227477f17c26 -r 4aa34bd43228 src/HOL/Decision_Procs/Cooper.thy --- a/src/HOL/Decision_Procs/Cooper.thy Wed Nov 28 15:38:12 2012 +0100 +++ b/src/HOL/Decision_Procs/Cooper.thy Wed Nov 28 15:59:18 2012 +0100 @@ -1004,7 +1004,7 @@ plusinf:: "fm \ fm" (* Virtual substitution of +\*) minusinf:: "fm \ fm" (* Virtual substitution of -\*) \ :: "fm \ int" (* Compute lcm {d| N\<^isup>? Dvd c*x+t \ p}*) - d\ :: "fm \ int \ bool" (* checks if a given l divides all the ds above*) + d_\ :: "fm \ int \ bool" (* checks if a given l divides all the ds above*) recdef minusinf "measure size" "minusinf (And p q) = And (minusinf p) (minusinf q)" @@ -1038,18 +1038,18 @@ "\ (NDvd i (CN 0 c e)) = i" "\ p = 1" -recdef d\ "measure size" - "d\ (And p q) = (\ d. d\ p d \ d\ q d)" - "d\ (Or p q) = (\ d. d\ p d \ d\ q d)" - "d\ (Dvd i (CN 0 c e)) = (\ d. i dvd d)" - "d\ (NDvd i (CN 0 c e)) = (\ d. i dvd d)" - "d\ p = (\ d. True)" +recdef d_\ "measure size" + "d_\ (And p q) = (\ d. d_\ p d \ d_\ q d)" + "d_\ (Or p q) = (\ d. d_\ p d \ d_\ q d)" + "d_\ (Dvd i (CN 0 c e)) = (\ d. i dvd d)" + "d_\ (NDvd i (CN 0 c e)) = (\ d. i dvd d)" + "d_\ p = (\ d. True)" lemma delta_mono: assumes lin: "iszlfm p" and d: "d dvd d'" - and ad: "d\ p d" - shows "d\ p d'" + and ad: "d_\ p d" + shows "d_\ p d'" using lin ad d proof(induct p rule: iszlfm.induct) case (9 i c e) thus ?case using d @@ -1060,61 +1060,61 @@ qed simp_all lemma \ : assumes lin:"iszlfm p" - shows "d\ p (\ p) \ \ p >0" + shows "d_\ p (\ p) \ \ p >0" using lin proof (induct p rule: iszlfm.induct) case (1 p q) let ?d = "\ (And p q)" from 1 lcm_pos_int have dp: "?d >0" by simp have d1: "\ p dvd \ (And p q)" using 1 by simp - hence th: "d\ p ?d" using delta_mono 1(2,3) by(simp only: iszlfm.simps) + hence th: "d_\ p ?d" using delta_mono 1(2,3) by(simp only: iszlfm.simps) have "\ q dvd \ (And p q)" using 1 by simp - hence th': "d\ q ?d" using delta_mono 1 by(simp only: iszlfm.simps) + hence th': "d_\ q ?d" using delta_mono 1 by(simp only: iszlfm.simps) from th th' dp show ?case by simp next case (2 p q) let ?d = "\ (And p q)" from 2 lcm_pos_int have dp: "?d >0" by simp have "\ p dvd \ (And p q)" using 2 by simp - hence th: "d\ p ?d" using delta_mono 2 by(simp only: iszlfm.simps) + hence th: "d_\ p ?d" using delta_mono 2 by(simp only: iszlfm.simps) have "\ q dvd \ (And p q)" using 2 by simp - hence th': "d\ q ?d" using delta_mono 2 by(simp only: iszlfm.simps) + hence th': "d_\ q ?d" using delta_mono 2 by(simp only: iszlfm.simps) from th th' dp show ?case by simp qed simp_all consts - a\ :: "fm \ int \ fm" (* adjusts the coeffitients of a formula *) - d\ :: "fm \ int \ bool" (* tests if all coeffs c of c divide a given l*) + a_\ :: "fm \ int \ fm" (* adjusts the coeffitients of a formula *) + d_\ :: "fm \ int \ bool" (* tests if all coeffs c of c divide a given l*) \ :: "fm \ int" (* computes the lcm of all coefficients of x*) \ :: "fm \ num list" \ :: "fm \ num list" -recdef a\ "measure size" - "a\ (And p q) = (\ k. And (a\ p k) (a\ q k))" - "a\ (Or p q) = (\ k. Or (a\ p k) (a\ q k))" - "a\ (Eq (CN 0 c e)) = (\ k. Eq (CN 0 1 (Mul (k div c) e)))" - "a\ (NEq (CN 0 c e)) = (\ k. NEq (CN 0 1 (Mul (k div c) e)))" - "a\ (Lt (CN 0 c e)) = (\ k. Lt (CN 0 1 (Mul (k div c) e)))" - "a\ (Le (CN 0 c e)) = (\ k. Le (CN 0 1 (Mul (k div c) e)))" - "a\ (Gt (CN 0 c e)) = (\ k. Gt (CN 0 1 (Mul (k div c) e)))" - "a\ (Ge (CN 0 c e)) = (\ k. Ge (CN 0 1 (Mul (k div c) e)))" - "a\ (Dvd i (CN 0 c e)) =(\ k. Dvd ((k div c)*i) (CN 0 1 (Mul (k div c) e)))" - "a\ (NDvd i (CN 0 c e))=(\ k. NDvd ((k div c)*i) (CN 0 1 (Mul (k div c) e)))" - "a\ p = (\ k. p)" +recdef a_\ "measure size" + "a_\ (And p q) = (\ k. And (a_\ p k) (a_\ q k))" + "a_\ (Or p q) = (\ k. Or (a_\ p k) (a_\ q k))" + "a_\ (Eq (CN 0 c e)) = (\ k. Eq (CN 0 1 (Mul (k div c) e)))" + "a_\ (NEq (CN 0 c e)) = (\ k. NEq (CN 0 1 (Mul (k div c) e)))" + "a_\ (Lt (CN 0 c e)) = (\ k. Lt (CN 0 1 (Mul (k div c) e)))" + "a_\ (Le (CN 0 c e)) = (\ k. Le (CN 0 1 (Mul (k div c) e)))" + "a_\ (Gt (CN 0 c e)) = (\ k. Gt (CN 0 1 (Mul (k div c) e)))" + "a_\ (Ge (CN 0 c e)) = (\ k. Ge (CN 0 1 (Mul (k div c) e)))" + "a_\ (Dvd i (CN 0 c e)) =(\ k. Dvd ((k div c)*i) (CN 0 1 (Mul (k div c) e)))" + "a_\ (NDvd i (CN 0 c e))=(\ k. NDvd ((k div c)*i) (CN 0 1 (Mul (k div c) e)))" + "a_\ p = (\ k. p)" -recdef d\ "measure size" - "d\ (And p q) = (\ k. (d\ p k) \ (d\ q k))" - "d\ (Or p q) = (\ k. (d\ p k) \ (d\ q k))" - "d\ (Eq (CN 0 c e)) = (\ k. c dvd k)" - "d\ (NEq (CN 0 c e)) = (\ k. c dvd k)" - "d\ (Lt (CN 0 c e)) = (\ k. c dvd k)" - "d\ (Le (CN 0 c e)) = (\ k. c dvd k)" - "d\ (Gt (CN 0 c e)) = (\ k. c dvd k)" - "d\ (Ge (CN 0 c e)) = (\ k. c dvd k)" - "d\ (Dvd i (CN 0 c e)) =(\ k. c dvd k)" - "d\ (NDvd i (CN 0 c e))=(\ k. c dvd k)" - "d\ p = (\ k. True)" +recdef d_\ "measure size" + "d_\ (And p q) = (\ k. (d_\ p k) \ (d_\ q k))" + "d_\ (Or p q) = (\ k. (d_\ p k) \ (d_\ q k))" + "d_\ (Eq (CN 0 c e)) = (\ k. c dvd k)" + "d_\ (NEq (CN 0 c e)) = (\ k. c dvd k)" + "d_\ (Lt (CN 0 c e)) = (\ k. c dvd k)" + "d_\ (Le (CN 0 c e)) = (\ k. c dvd k)" + "d_\ (Gt (CN 0 c e)) = (\ k. c dvd k)" + "d_\ (Ge (CN 0 c e)) = (\ k. c dvd k)" + "d_\ (Dvd i (CN 0 c e)) =(\ k. c dvd k)" + "d_\ (NDvd i (CN 0 c e))=(\ k. c dvd k)" + "d_\ p = (\ k. True)" recdef \ "measure size" "\ (And p q) = lcm (\ p) (\ q)" @@ -1169,7 +1169,7 @@ lemma minusinf_inf: assumes linp: "iszlfm p" - and u: "d\ p 1" + and u: "d_\ p 1" shows "\ (z::int). \ x < z. Ifm bbs (x#bs) (minusinf p) = Ifm bbs (x#bs) p" (is "?P p" is "\ (z::int). \ x < z. ?I x (?M p) = ?I x p") using linp u @@ -1242,7 +1242,7 @@ qed auto lemma minusinf_repeats: - assumes d: "d\ p d" and linp: "iszlfm p" + assumes d: "d_\ p d" and linp: "iszlfm p" shows "Ifm bbs ((x - k*d)#bs) (minusinf p) = Ifm bbs (x #bs) (minusinf p)" using linp d proof(induct p rule: iszlfm.induct) @@ -1301,7 +1301,7 @@ qed qed (auto simp add: gr0_conv_Suc numbound0_I[where bs="bs" and b="x - k*d" and b'="x"]) -lemma mirror\\: +lemma mirror_\_\: assumes lp: "iszlfm p" shows "(Inum (i#bs)) ` set (\ p) = (Inum (i#bs)) ` set (\ (mirror p))" using lp @@ -1337,8 +1337,8 @@ finally show ?case by simp qed (auto simp add: numbound0_I[where bs="bs" and b="x" and b'="- x"] gr0_conv_Suc) -lemma mirror_l: "iszlfm p \ d\ p 1 - \ iszlfm (mirror p) \ d\ (mirror p) 1" +lemma mirror_l: "iszlfm p \ d_\ p 1 + \ iszlfm (mirror p) \ d_\ (mirror p) 1" by (induct p rule: mirror.induct) auto lemma mirror_\: "iszlfm p \ \ (mirror p) = \ p" @@ -1348,11 +1348,11 @@ shows "\ b\ set (\ p). numbound0 b" using lp by (induct p rule: \.induct) auto -lemma d\_mono: +lemma d_\_mono: assumes linp: "iszlfm p" - and dr: "d\ p l" + and dr: "d_\ p l" and d: "l dvd l'" - shows "d\ p l'" + shows "d_\ p l'" using dr linp dvd_trans[of _ "l" "l'", simplified d] by (induct p rule: iszlfm.induct) simp_all @@ -1363,26 +1363,26 @@ lemma \: assumes linp: "iszlfm p" - shows "\ p > 0 \ d\ p (\ p)" + shows "\ p > 0 \ d_\ p (\ p)" using linp proof(induct p rule: iszlfm.induct) case (1 p q) from 1 have dl1: "\ p dvd lcm (\ p) (\ q)" by simp from 1 have dl2: "\ q dvd lcm (\ p) (\ q)" by simp - from 1 d\_mono[where p = "p" and l="\ p" and l'="lcm (\ p) (\ q)"] - d\_mono[where p = "q" and l="\ q" and l'="lcm (\ p) (\ q)"] + from 1 d_\_mono[where p = "p" and l="\ p" and l'="lcm (\ p) (\ q)"] + d_\_mono[where p = "q" and l="\ q" and l'="lcm (\ p) (\ q)"] dl1 dl2 show ?case by (auto simp add: lcm_pos_int) next case (2 p q) from 2 have dl1: "\ p dvd lcm (\ p) (\ q)" by simp from 2 have dl2: "\ q dvd lcm (\ p) (\ q)" by simp - from 2 d\_mono[where p = "p" and l="\ p" and l'="lcm (\ p) (\ q)"] - d\_mono[where p = "q" and l="\ q" and l'="lcm (\ p) (\ q)"] + from 2 d_\_mono[where p = "p" and l="\ p" and l'="lcm (\ p) (\ q)"] + d_\_mono[where p = "q" and l="\ q" and l'="lcm (\ p) (\ q)"] dl1 dl2 show ?case by (auto simp add: lcm_pos_int) qed (auto simp add: lcm_pos_int) -lemma a\: assumes linp: "iszlfm p" and d: "d\ p l" and lp: "l > 0" - shows "iszlfm (a\ p l) \ d\ (a\ p l) 1 \ (Ifm bbs (l*x #bs) (a\ p l) = Ifm bbs (x#bs) p)" +lemma a_\: assumes linp: "iszlfm p" and d: "d_\ p l" and lp: "l > 0" + shows "iszlfm (a_\ p l) \ d_\ (a_\ p l) 1 \ (Ifm bbs (l*x #bs) (a_\ p l) = Ifm bbs (x#bs) p)" using linp d proof (induct p rule: iszlfm.induct) case (5 c e) hence cp: "c>0" and be: "numbound0 e" and d': "c dvd l" by simp+ @@ -1530,20 +1530,20 @@ 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) qed (auto simp add: gr0_conv_Suc numbound0_I[where bs="bs" and b="(l * x)" and b'="x"]) -lemma a\_ex: assumes linp: "iszlfm p" and d: "d\ p l" and lp: "l>0" - shows "(\ x. l dvd x \ Ifm bbs (x #bs) (a\ p l)) = (\ (x::int). Ifm bbs (x#bs) p)" +lemma a_\_ex: assumes linp: "iszlfm p" and d: "d_\ p l" and lp: "l>0" + shows "(\ x. l dvd x \ Ifm bbs (x #bs) (a_\ p l)) = (\ (x::int). Ifm bbs (x#bs) p)" (is "(\ x. l dvd x \ ?P x) = (\ x. ?P' x)") proof- have "(\ x. l dvd x \ ?P x) = (\ (x::int). ?P (l*x))" using unity_coeff_ex[where l="l" and P="?P", simplified] by simp - also have "\ = (\ (x::int). ?P' x)" using a\[OF linp d lp] by simp + also have "\ = (\ (x::int). ?P' x)" using a_\[OF linp d lp] by simp finally show ?thesis . qed lemma \: assumes lp: "iszlfm p" - and u: "d\ p 1" - and d: "d\ p d" + and u: "d_\ p 1" + and d: "d_\ p d" and dp: "d > 0" and nob: "\(\(j::int) \ {1 .. d}. \ b\ (Inum (a#bs)) ` set(\ p). x = b + j)" and p: "Ifm bbs (x#bs) p" (is "?P x") @@ -1637,8 +1637,8 @@ lemma \': assumes lp: "iszlfm p" - and u: "d\ p 1" - and d: "d\ p d" + and u: "d_\ p 1" + and d: "d_\ p d" and dp: "d > 0" shows "\ x. \(\(j::int) \ {1 .. d}. \ b\ set(\ p). Ifm bbs ((Inum (a#bs) b + j) #bs) p) \ Ifm bbs (x#bs) p \ Ifm bbs ((x - d)#bs) p" (is "\ x. ?b \ ?P x \ ?P (x - d)") proof(clarify) @@ -1672,8 +1672,8 @@ theorem cp_thm: assumes lp: "iszlfm p" - and u: "d\ p 1" - and d: "d\ p d" + and u: "d_\ p 1" + and d: "d_\ p d" and dp: "d > 0" shows "(\ (x::int). Ifm bbs (x #bs) p) = (\ j\ {1.. d}. Ifm bbs (j #bs) (minusinf p) \ (\ b \ set (\ p). Ifm bbs ((Inum (i#bs) b + j) #bs) p))" (is "(\ (x::int). ?P (x)) = (\ j\ ?D. ?M j \ (\ b\ ?B. ?P (?I b + j)))") @@ -1706,27 +1706,27 @@ lemma cp_thm': assumes lp: "iszlfm p" - and up: "d\ p 1" and dd: "d\ p d" and dp: "d > 0" + and up: "d_\ p 1" and dd: "d_\ p d" and dp: "d > 0" shows "(\ x. Ifm bbs (x#bs) p) = ((\ j\ {1 .. d}. Ifm bbs (j#bs) (minusinf p)) \ (\ j\ {1.. d}. \ b\ (Inum (i#bs)) ` set (\ p). Ifm bbs ((b+j)#bs) p))" using cp_thm[OF lp up dd dp,where i="i"] by auto definition unit :: "fm \ fm \ num list \ int" where - "unit p \ (let p' = zlfm p ; l = \ p' ; q = And (Dvd l (CN 0 1 (C 0))) (a\ p' l); d = \ q; + "unit p \ (let p' = zlfm p ; l = \ p' ; q = And (Dvd l (CN 0 1 (C 0))) (a_\ p' l); d = \ q; B = remdups (map simpnum (\ q)) ; a = remdups (map simpnum (\ q)) in if length B \ length a then (q,B,d) else (mirror q, a,d))" lemma unit: assumes qf: "qfree p" - shows "\ q B d. unit p = (q,B,d) \ ((\ x. Ifm bbs (x#bs) p) = (\ x. Ifm bbs (x#bs) q)) \ (Inum (i#bs)) ` set B = (Inum (i#bs)) ` set (\ q) \ d\ q 1 \ d\ q d \ d >0 \ iszlfm q \ (\ b\ set B. numbound0 b)" + shows "\ q B d. unit p = (q,B,d) \ ((\ x. Ifm bbs (x#bs) p) = (\ x. Ifm bbs (x#bs) q)) \ (Inum (i#bs)) ` set B = (Inum (i#bs)) ` set (\ q) \ d_\ q 1 \ d_\ q d \ d >0 \ iszlfm q \ (\ b\ set B. numbound0 b)" proof- fix q B d assume qBd: "unit p = (q,B,d)" let ?thes = "((\ x. Ifm bbs (x#bs) p) = (\ x. Ifm bbs (x#bs) q)) \ Inum (i#bs) ` set B = Inum (i#bs) ` set (\ q) \ - d\ q 1 \ d\ q d \ 0 < d \ iszlfm q \ (\ b\ set B. numbound0 b)" + d_\ q 1 \ d_\ q d \ 0 < d \ iszlfm q \ (\ b\ set B. numbound0 b)" let ?I = "\ x p. Ifm bbs (x#bs) p" let ?p' = "zlfm p" let ?l = "\ ?p'" - let ?q = "And (Dvd ?l (CN 0 1 (C 0))) (a\ ?p' ?l)" + let ?q = "And (Dvd ?l (CN 0 1 (C 0))) (a_\ ?p' ?l)" let ?d = "\ ?q" let ?B = "set (\ ?q)" let ?B'= "remdups (map simpnum (\ ?q))" @@ -1736,11 +1736,11 @@ have pp': "\ i. ?I i ?p' = ?I i p" by auto from conjunct2[OF zlfm_I[OF qf, where bs="bs" and i="i"]] have lp': "iszlfm ?p'" . - from lp' \[where p="?p'"] have lp: "?l >0" and dl: "d\ ?p' ?l" by auto - from a\_ex[where p="?p'" and l="?l" and bs="bs", OF lp' dl lp] pp' + from lp' \[where p="?p'"] have lp: "?l >0" and dl: "d_\ ?p' ?l" by auto + from a_\_ex[where p="?p'" and l="?l" and bs="bs", OF lp' dl lp] pp' have pq_ex:"(\ (x::int). ?I x p) = (\ x. ?I x ?q)" by simp - from lp' lp a\[OF lp' dl lp] have lq:"iszlfm ?q" and uq: "d\ ?q 1" by auto - from \[OF lq] have dp:"?d >0" and dd: "d\ ?q ?d" by blast+ + from lp' lp a_\[OF lp' dl lp] have lq:"iszlfm ?q" and uq: "d_\ ?q 1" by auto + from \[OF lq] have dp:"?d >0" and dd: "d_\ ?q ?d" by blast+ let ?N = "\ t. Inum (i#bs) t" have "?N ` set ?B' = ((?N o simpnum) ` ?B)" by auto also have "\ = ?N ` ?B" using simpnum_ci[where bs="i#bs"] by auto @@ -1762,13 +1762,13 @@ {assume "\ (length ?B' \ length ?A')" hence q:"q=mirror ?q" and "B = ?A'" and d:"d = ?d" using qBd by (auto simp add: Let_def unit_def) - with AA' mirror\\[OF lq] A_nb have b:"?N ` (set B) = ?N ` set (\ q)" + with AA' mirror_\_\[OF lq] A_nb have b:"?N ` (set B) = ?N ` set (\ q)" and bn: "\b\ set B. numbound0 b" by simp+ from mirror_ex[OF lq] pq_ex q have pqm_eq:"(\ (x::int). ?I x p) = (\ (x::int). ?I x q)" by simp from lq uq q mirror_l[where p="?q"] - have lq': "iszlfm q" and uq: "d\ q 1" by auto - from \[OF lq'] mirror_\[OF lq] q d have dq:"d\ q d " by auto + have lq': "iszlfm q" and uq: "d_\ q 1" by auto + from \[OF lq'] mirror_\[OF lq] q d have dq:"d_\ q d " by auto from pqm_eq b bn uq lq' dp dq q dp d have ?thes by simp } ultimately show ?thes by blast @@ -1803,7 +1803,7 @@ have qbf:"unit p = (?q,?B,?d)" by simp from unit[OF qf qbf] have pq_ex: "(\(x::int). ?I x p) = (\ (x::int). ?I x ?q)" and B:"?N ` set ?B = ?N ` set (\ ?q)" and - uq:"d\ ?q 1" and dd: "d\ ?q ?d" and dp: "?d > 0" and + uq:"d_\ ?q 1" and dd: "d_\ ?q ?d" and dp: "?d > 0" and lq: "iszlfm ?q" and Bn: "\ b\ set ?B. numbound0 b" by auto from zlin_qfree[OF lq] have qfq: "qfree ?q" . diff -r 227477f17c26 -r 4aa34bd43228 src/HOL/Decision_Procs/MIR.thy --- a/src/HOL/Decision_Procs/MIR.thy Wed Nov 28 15:38:12 2012 +0100 +++ b/src/HOL/Decision_Procs/MIR.thy Wed Nov 28 15:59:18 2012 +0100 @@ -1947,7 +1947,7 @@ text{* plusinf : Virtual substitution of @{text "+\"} minusinf: Virtual substitution of @{text "-\"} @{text "\"} Compute lcm @{text "d| Dvd d c*x+t \ p"} - @{text "d\"} checks if a given l divides all the ds above*} + @{text "d_\"} checks if a given l divides all the ds above*} fun minusinf:: "fm \ fm" where "minusinf (And p q) = conj (minusinf p) (minusinf q)" @@ -1981,18 +1981,18 @@ | "\ (NDvd i (CN 0 c e)) = i" | "\ p = 1" -fun d\ :: "fm \ int \ bool" where - "d\ (And p q) = (\ d. d\ p d \ d\ q d)" -| "d\ (Or p q) = (\ d. d\ p d \ d\ q d)" -| "d\ (Dvd i (CN 0 c e)) = (\ d. i dvd d)" -| "d\ (NDvd i (CN 0 c e)) = (\ d. i dvd d)" -| "d\ p = (\ d. True)" +fun d_\ :: "fm \ int \ bool" where + "d_\ (And p q) = (\ d. d_\ p d \ d_\ q d)" +| "d_\ (Or p q) = (\ d. d_\ p d \ d_\ q d)" +| "d_\ (Dvd i (CN 0 c e)) = (\ d. i dvd d)" +| "d_\ (NDvd i (CN 0 c e)) = (\ d. i dvd d)" +| "d_\ p = (\ d. True)" lemma delta_mono: assumes lin: "iszlfm p bs" and d: "d dvd d'" - and ad: "d\ p d" - shows "d\ p d'" + and ad: "d_\ p d" + shows "d_\ p d'" using lin ad d proof(induct p rule: iszlfm.induct) case (9 i c e) thus ?case using d @@ -2003,26 +2003,26 @@ qed simp_all lemma \ : assumes lin:"iszlfm p bs" - shows "d\ p (\ p) \ \ p >0" + shows "d_\ p (\ p) \ \ p >0" using lin proof (induct p rule: iszlfm.induct) case (1 p q) let ?d = "\ (And p q)" from 1 lcm_pos_int have dp: "?d >0" by simp have d1: "\ p dvd \ (And p q)" using 1 by simp - hence th: "d\ p ?d" + hence th: "d_\ p ?d" using delta_mono 1 by (simp only: iszlfm.simps) blast have "\ q dvd \ (And p q)" using 1 by simp - hence th': "d\ q ?d" using delta_mono 1 by (simp only: iszlfm.simps) blast + hence th': "d_\ q ?d" using delta_mono 1 by (simp only: iszlfm.simps) blast from th th' dp show ?case by simp next case (2 p q) let ?d = "\ (And p q)" from 2 lcm_pos_int have dp: "?d >0" by simp have "\ p dvd \ (And p q)" using 2 by simp - hence th: "d\ p ?d" using delta_mono 2 by (simp only: iszlfm.simps) blast + hence th: "d_\ p ?d" using delta_mono 2 by (simp only: iszlfm.simps) blast have "\ q dvd \ (And p q)" using 2 by simp - hence th': "d\ q ?d" using delta_mono 2 by (simp only: iszlfm.simps) blast + hence th': "d_\ q ?d" using delta_mono 2 by (simp only: iszlfm.simps) blast from th th' dp show ?case by simp qed simp_all @@ -2152,7 +2152,7 @@ qed simp_all lemma minusinf_repeats: - assumes d: "d\ p d" and linp: "iszlfm p (a # bs)" + assumes d: "d_\ p d" and linp: "iszlfm p (a # bs)" shows "Ifm ((real(x - k*d))#bs) (minusinf p) = Ifm (real x #bs) (minusinf p)" using linp d proof(induct p rule: iszlfm.induct) @@ -2218,7 +2218,7 @@ proof- let ?d = "\ p" from \ [OF lin] have dpos: "?d >0" by simp - from \ [OF lin] have alld: "d\ p ?d" by simp + from \ [OF lin] have alld: "d_\ p ?d" by simp from minusinf_repeats[OF alld lin] have th1:"\ x k. ?P1 x = ?P1 (x - (k * ?d))" by simp from minusinf_inf[OF lin] have th2:"\ z. \ x. x (?P x = ?P1 x)" by blast from minusinfinity [OF dpos th1 th2] exmi show ?thesis by blast @@ -2232,7 +2232,7 @@ proof- let ?d = "\ p" from \ [OF lin] have dpos: "?d >0" by simp - from \ [OF lin] have alld: "d\ p ?d" by simp + from \ [OF lin] have alld: "d_\ p ?d" by simp from minusinf_repeats[OF alld lin] have th1:"\ x k. ?P x = ?P (x - (k * ?d))" by simp from periodic_finite_ex[OF dpos th1] show ?thesis by blast qed @@ -2240,37 +2240,37 @@ lemma dvd1_eq1: "x >0 \ (x::int) dvd 1 = (x = 1)" by auto consts - a\ :: "fm \ int \ fm" (* adjusts the coeffitients of a formula *) - d\ :: "fm \ int \ bool" (* tests if all coeffs c of c divide a given l*) + a_\ :: "fm \ int \ fm" (* adjusts the coeffitients of a formula *) + d_\ :: "fm \ int \ bool" (* tests if all coeffs c of c divide a given l*) \ :: "fm \ int" (* computes the lcm of all coefficients of x*) \ :: "fm \ num list" \ :: "fm \ num list" -recdef a\ "measure size" - "a\ (And p q) = (\ k. And (a\ p k) (a\ q k))" - "a\ (Or p q) = (\ k. Or (a\ p k) (a\ q k))" - "a\ (Eq (CN 0 c e)) = (\ k. Eq (CN 0 1 (Mul (k div c) e)))" - "a\ (NEq (CN 0 c e)) = (\ k. NEq (CN 0 1 (Mul (k div c) e)))" - "a\ (Lt (CN 0 c e)) = (\ k. Lt (CN 0 1 (Mul (k div c) e)))" - "a\ (Le (CN 0 c e)) = (\ k. Le (CN 0 1 (Mul (k div c) e)))" - "a\ (Gt (CN 0 c e)) = (\ k. Gt (CN 0 1 (Mul (k div c) e)))" - "a\ (Ge (CN 0 c e)) = (\ k. Ge (CN 0 1 (Mul (k div c) e)))" - "a\ (Dvd i (CN 0 c e)) =(\ k. Dvd ((k div c)*i) (CN 0 1 (Mul (k div c) e)))" - "a\ (NDvd i (CN 0 c e))=(\ k. NDvd ((k div c)*i) (CN 0 1 (Mul (k div c) e)))" - "a\ p = (\ k. p)" - -recdef d\ "measure size" - "d\ (And p q) = (\ k. (d\ p k) \ (d\ q k))" - "d\ (Or p q) = (\ k. (d\ p k) \ (d\ q k))" - "d\ (Eq (CN 0 c e)) = (\ k. c dvd k)" - "d\ (NEq (CN 0 c e)) = (\ k. c dvd k)" - "d\ (Lt (CN 0 c e)) = (\ k. c dvd k)" - "d\ (Le (CN 0 c e)) = (\ k. c dvd k)" - "d\ (Gt (CN 0 c e)) = (\ k. c dvd k)" - "d\ (Ge (CN 0 c e)) = (\ k. c dvd k)" - "d\ (Dvd i (CN 0 c e)) =(\ k. c dvd k)" - "d\ (NDvd i (CN 0 c e))=(\ k. c dvd k)" - "d\ p = (\ k. True)" +recdef a_\ "measure size" + "a_\ (And p q) = (\ k. And (a_\ p k) (a_\ q k))" + "a_\ (Or p q) = (\ k. Or (a_\ p k) (a_\ q k))" + "a_\ (Eq (CN 0 c e)) = (\ k. Eq (CN 0 1 (Mul (k div c) e)))" + "a_\ (NEq (CN 0 c e)) = (\ k. NEq (CN 0 1 (Mul (k div c) e)))" + "a_\ (Lt (CN 0 c e)) = (\ k. Lt (CN 0 1 (Mul (k div c) e)))" + "a_\ (Le (CN 0 c e)) = (\ k. Le (CN 0 1 (Mul (k div c) e)))" + "a_\ (Gt (CN 0 c e)) = (\ k. Gt (CN 0 1 (Mul (k div c) e)))" + "a_\ (Ge (CN 0 c e)) = (\ k. Ge (CN 0 1 (Mul (k div c) e)))" + "a_\ (Dvd i (CN 0 c e)) =(\ k. Dvd ((k div c)*i) (CN 0 1 (Mul (k div c) e)))" + "a_\ (NDvd i (CN 0 c e))=(\ k. NDvd ((k div c)*i) (CN 0 1 (Mul (k div c) e)))" + "a_\ p = (\ k. p)" + +recdef d_\ "measure size" + "d_\ (And p q) = (\ k. (d_\ p k) \ (d_\ q k))" + "d_\ (Or p q) = (\ k. (d_\ p k) \ (d_\ q k))" + "d_\ (Eq (CN 0 c e)) = (\ k. c dvd k)" + "d_\ (NEq (CN 0 c e)) = (\ k. c dvd k)" + "d_\ (Lt (CN 0 c e)) = (\ k. c dvd k)" + "d_\ (Le (CN 0 c e)) = (\ k. c dvd k)" + "d_\ (Gt (CN 0 c e)) = (\ k. c dvd k)" + "d_\ (Ge (CN 0 c e)) = (\ k. c dvd k)" + "d_\ (Dvd i (CN 0 c e)) =(\ k. c dvd k)" + "d_\ (NDvd i (CN 0 c e))=(\ k. c dvd k)" + "d_\ p = (\ k. True)" recdef \ "measure size" "\ (And p q) = lcm (\ p) (\ q)" @@ -2320,7 +2320,7 @@ "mirror (NDvd i (CN 0 c e)) = NDvd i (CN 0 c (Neg e))" "mirror p = p" -lemma mirror\\: +lemma mirror_\_\: assumes lp: "iszlfm p (a#bs)" shows "(Inum (real (i::int)#bs)) ` set (\ p) = (Inum (real i#bs)) ` set (\ (mirror p))" using lp @@ -2351,8 +2351,8 @@ lemma mirror_l: "iszlfm p (a#bs) \ iszlfm (mirror p) (a#bs)" by (induct p rule: mirror.induct, auto simp add: isint_neg) -lemma mirror_d\: "iszlfm p (a#bs) \ d\ p 1 - \ iszlfm (mirror p) (a#bs) \ d\ (mirror p) 1" +lemma mirror_d_\: "iszlfm p (a#bs) \ d_\ p 1 + \ iszlfm (mirror p) (a#bs) \ d_\ (mirror p) 1" by (induct p rule: mirror.induct, auto simp add: isint_neg) lemma mirror_\: "iszlfm p (a#bs) \ \ (mirror p) = \ p" @@ -2376,11 +2376,11 @@ shows "\ b\ set (\ p). numbound0 b" using lp by (induct p rule: \.induct,auto) -lemma d\_mono: +lemma d_\_mono: assumes linp: "iszlfm p (a #bs)" - and dr: "d\ p l" + and dr: "d_\ p l" and d: "l dvd l'" - shows "d\ p l'" + shows "d_\ p l'" using dr linp dvd_trans[of _ "l" "l'", simplified d] by (induct p rule: iszlfm.induct) simp_all @@ -2391,26 +2391,26 @@ lemma \: assumes linp: "iszlfm p (a #bs)" - shows "\ p > 0 \ d\ p (\ p)" + shows "\ p > 0 \ d_\ p (\ p)" using linp proof(induct p rule: iszlfm.induct) case (1 p q) then have dl1: "\ p dvd lcm (\ p) (\ q)" by simp from 1 have dl2: "\ q dvd lcm (\ p) (\ q)" by simp - from 1 d\_mono[where p = "p" and l="\ p" and l'="lcm (\ p) (\ q)"] - d\_mono[where p = "q" and l="\ q" and l'="lcm (\ p) (\ q)"] + from 1 d_\_mono[where p = "p" and l="\ p" and l'="lcm (\ p) (\ q)"] + d_\_mono[where p = "q" and l="\ q" and l'="lcm (\ p) (\ q)"] dl1 dl2 show ?case by (auto simp add: lcm_pos_int) next case (2 p q) then have dl1: "\ p dvd lcm (\ p) (\ q)" by simp from 2 have dl2: "\ q dvd lcm (\ p) (\ q)" by simp - from 2 d\_mono[where p = "p" and l="\ p" and l'="lcm (\ p) (\ q)"] - d\_mono[where p = "q" and l="\ q" and l'="lcm (\ p) (\ q)"] + from 2 d_\_mono[where p = "p" and l="\ p" and l'="lcm (\ p) (\ q)"] + d_\_mono[where p = "q" and l="\ q" and l'="lcm (\ p) (\ q)"] dl1 dl2 show ?case by (auto simp add: lcm_pos_int) qed (auto simp add: lcm_pos_int) -lemma a\: assumes linp: "iszlfm p (a #bs)" and d: "d\ p l" and lp: "l > 0" - shows "iszlfm (a\ p l) (a #bs) \ d\ (a\ p l) 1 \ (Ifm (real (l * x) #bs) (a\ p l) = Ifm ((real x)#bs) p)" +lemma a_\: assumes linp: "iszlfm p (a #bs)" and d: "d_\ p l" and lp: "l > 0" + shows "iszlfm (a_\ p l) (a #bs) \ d_\ (a_\ p l) 1 \ (Ifm (real (l * x) #bs) (a_\ p l) = Ifm ((real x)#bs) p)" using linp d proof (induct p rule: iszlfm.induct) 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+ @@ -2556,20 +2556,20 @@ 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 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) -lemma a\_ex: assumes linp: "iszlfm p (a#bs)" and d: "d\ p l" and lp: "l>0" - shows "(\ x. l dvd x \ Ifm (real x #bs) (a\ p l)) = (\ (x::int). Ifm (real x#bs) p)" +lemma a_\_ex: assumes linp: "iszlfm p (a#bs)" and d: "d_\ p l" and lp: "l>0" + shows "(\ x. l dvd x \ Ifm (real x #bs) (a_\ p l)) = (\ (x::int). Ifm (real x#bs) p)" (is "(\ x. l dvd x \ ?P x) = (\ x. ?P' x)") proof- have "(\ x. l dvd x \ ?P x) = (\ (x::int). ?P (l*x))" using unity_coeff_ex[where l="l" and P="?P", simplified] by simp - also have "\ = (\ (x::int). ?P' x)" using a\[OF linp d lp] by simp + also have "\ = (\ (x::int). ?P' x)" using a_\[OF linp d lp] by simp finally show ?thesis . qed lemma \: assumes lp: "iszlfm p (a#bs)" - and u: "d\ p 1" - and d: "d\ p d" + and u: "d_\ p 1" + and d: "d_\ p d" and dp: "d > 0" and nob: "\(\(j::int) \ {1 .. d}. \ b\ (Inum (a#bs)) ` set(\ p). real x = b + real j)" and p: "Ifm (real x#bs) p" (is "?P x") @@ -2705,8 +2705,8 @@ lemma \': assumes lp: "iszlfm p (a #bs)" - and u: "d\ p 1" - and d: "d\ p d" + and u: "d_\ p 1" + and d: "d_\ p d" and dp: "d > 0" shows "\ x. \(\(j::int) \ {1 .. d}. \ b\ set(\ p). Ifm ((Inum (a#bs) b + real j) #bs) p) \ Ifm (real x#bs) p \ Ifm (real (x - d)#bs) p" (is "\ x. ?b \ ?P x \ ?P (x - d)") proof(clarify) @@ -2746,8 +2746,8 @@ theorem cp_thm: assumes lp: "iszlfm p (a #bs)" - and u: "d\ p 1" - and d: "d\ p d" + and u: "d_\ p 1" + and d: "d_\ p d" and dp: "d > 0" shows "(\ (x::int). Ifm (real x #bs) p) = (\ j\ {1.. d}. Ifm (real j #bs) (minusinf p) \ (\ b \ set (\ p). Ifm ((Inum (a#bs) b + real j) #bs) p))" (is "(\ (x::int). ?P (real x)) = (\ j\ ?D. ?M j \ (\ b\ ?B. ?P (?I b + real j)))") @@ -2775,9 +2775,9 @@ consts \ :: "fm \ (num \ int) list" (* Compute the Reddy and Loveland Bset*) - \\:: "fm \ num \ int \ fm" (* Performs the modified substitution of Reddy and Loveland*) - \\ :: "fm \ (num\int) list" - a\ :: "fm \ int \ fm" + \_\:: "fm \ num \ int \ fm" (* Performs the modified substitution of Reddy and Loveland*) + \_\ :: "fm \ (num\int) list" + a_\ :: "fm \ int \ fm" recdef \ "measure size" "\ (And p q) = (\ p @ \ q)" "\ (Or p q) = (\ p @ \ q)" @@ -2789,52 +2789,52 @@ "\ (Ge (CN 0 c e)) = [(Sub (C (-1)) e, c)]" "\ p = []" -recdef \\ "measure size" - "\\ (And p q) = (\ (t,k). And (\\ p (t,k)) (\\ q (t,k)))" - "\\ (Or p q) = (\ (t,k). Or (\\ p (t,k)) (\\ q (t,k)))" - "\\ (Eq (CN 0 c e)) = (\ (t,k). if k dvd c then (Eq (Add (Mul (c div k) t) e)) +recdef \_\ "measure size" + "\_\ (And p q) = (\ (t,k). And (\_\ p (t,k)) (\_\ q (t,k)))" + "\_\ (Or p q) = (\ (t,k). Or (\_\ p (t,k)) (\_\ q (t,k)))" + "\_\ (Eq (CN 0 c e)) = (\ (t,k). if k dvd c then (Eq (Add (Mul (c div k) t) e)) else (Eq (Add (Mul c t) (Mul k e))))" - "\\ (NEq (CN 0 c e)) = (\ (t,k). if k dvd c then (NEq (Add (Mul (c div k) t) e)) + "\_\ (NEq (CN 0 c e)) = (\ (t,k). if k dvd c then (NEq (Add (Mul (c div k) t) e)) else (NEq (Add (Mul c t) (Mul k e))))" - "\\ (Lt (CN 0 c e)) = (\ (t,k). if k dvd c then (Lt (Add (Mul (c div k) t) e)) + "\_\ (Lt (CN 0 c e)) = (\ (t,k). if k dvd c then (Lt (Add (Mul (c div k) t) e)) else (Lt (Add (Mul c t) (Mul k e))))" - "\\ (Le (CN 0 c e)) = (\ (t,k). if k dvd c then (Le (Add (Mul (c div k) t) e)) + "\_\ (Le (CN 0 c e)) = (\ (t,k). if k dvd c then (Le (Add (Mul (c div k) t) e)) else (Le (Add (Mul c t) (Mul k e))))" - "\\ (Gt (CN 0 c e)) = (\ (t,k). if k dvd c then (Gt (Add (Mul (c div k) t) e)) + "\_\ (Gt (CN 0 c e)) = (\ (t,k). if k dvd c then (Gt (Add (Mul (c div k) t) e)) else (Gt (Add (Mul c t) (Mul k e))))" - "\\ (Ge (CN 0 c e)) = (\ (t,k). if k dvd c then (Ge (Add (Mul (c div k) t) e)) + "\_\ (Ge (CN 0 c e)) = (\ (t,k). if k dvd c then (Ge (Add (Mul (c div k) t) e)) else (Ge (Add (Mul c t) (Mul k e))))" - "\\ (Dvd i (CN 0 c e)) =(\ (t,k). if k dvd c then (Dvd i (Add (Mul (c div k) t) e)) + "\_\ (Dvd i (CN 0 c e)) =(\ (t,k). if k dvd c then (Dvd i (Add (Mul (c div k) t) e)) else (Dvd (i*k) (Add (Mul c t) (Mul k e))))" - "\\ (NDvd i (CN 0 c e))=(\ (t,k). if k dvd c then (NDvd i (Add (Mul (c div k) t) e)) + "\_\ (NDvd i (CN 0 c e))=(\ (t,k). if k dvd c then (NDvd i (Add (Mul (c div k) t) e)) else (NDvd (i*k) (Add (Mul c t) (Mul k e))))" - "\\ p = (\ (t,k). p)" - -recdef \\ "measure size" - "\\ (And p q) = (\\ p @ \\ q)" - "\\ (Or p q) = (\\ p @ \\ q)" - "\\ (Eq (CN 0 c e)) = [(Add (C -1) e,c)]" - "\\ (NEq (CN 0 c e)) = [(e,c)]" - "\\ (Lt (CN 0 c e)) = [(e,c)]" - "\\ (Le (CN 0 c e)) = [(Add (C -1) e,c)]" - "\\ p = []" + "\_\ p = (\ (t,k). p)" + +recdef \_\ "measure size" + "\_\ (And p q) = (\_\ p @ \_\ q)" + "\_\ (Or p q) = (\_\ p @ \_\ q)" + "\_\ (Eq (CN 0 c e)) = [(Add (C -1) e,c)]" + "\_\ (NEq (CN 0 c e)) = [(e,c)]" + "\_\ (Lt (CN 0 c e)) = [(e,c)]" + "\_\ (Le (CN 0 c e)) = [(Add (C -1) e,c)]" + "\_\ p = []" (* Simulates normal substituion by modifying the formula see correctness theorem *) definition \ :: "fm \ int \ num \ fm" where - "\ p k t \ And (Dvd k t) (\\ p (t,k))" - -lemma \\: + "\ p k t \ And (Dvd k t) (\_\ p (t,k))" + +lemma \_\: assumes linp: "iszlfm p (real (x::int)#bs)" and kpos: "real k > 0" and tnb: "numbound0 t" and tint: "isint t (real x#bs)" and kdt: "k dvd floor (Inum (b'#bs) t)" - shows "Ifm (real x#bs) (\\ p (t,k)) = + shows "Ifm (real x#bs) (\_\ p (t,k)) = (Ifm ((real ((floor (Inum (b'#bs) t)) div k))#bs) p)" (is "?I (real x) (?s p) = (?I (real ((floor (?N b' t)) div k)) p)" is "_ = (?I ?tk p)") using linp kpos tnb -proof(induct p rule: \\.induct) +proof(induct p rule: \_\.induct) case (3 c e) from 3 have cp: "c > 0" and nb: "numbound0 e" by auto { assume kdc: "k dvd c" @@ -3033,8 +3033,8 @@ numbound0_I[where bs="bs" and b="real ((floor (?N b' t)) div k)" and b'="real x"]) -lemma \\_nb: assumes lp:"iszlfm p (a#bs)" and nb: "numbound0 t" - shows "bound0 (\\ p (t,k))" +lemma \_\_nb: assumes lp:"iszlfm p (a#bs)" and nb: "numbound0 t" + shows "bound0 (\_\ p (t,k))" using lp by (induct p rule: iszlfm.induct, auto simp add: nb) @@ -3043,15 +3043,15 @@ shows "\ (b,k) \ set (\ p). k >0 \ numbound0 b \ isint b (real i#bs)" using lp by (induct p rule: \.induct, auto simp add: isint_sub isint_neg) -lemma \\_l: +lemma \_\_l: assumes lp: "iszlfm p (real (i::int)#bs)" - shows "\ (b,k) \ set (\\ p). k >0 \ numbound0 b \ isint b (real i#bs)" + shows "\ (b,k) \ set (\_\ p). k >0 \ numbound0 b \ isint b (real i#bs)" using lp isint_add [OF isint_c[where j="- 1"],where bs="real i#bs"] - by (induct p rule: \\.induct, auto) + by (induct p rule: \_\.induct, auto) lemma \: assumes lp: "iszlfm p (real (i::int) #bs)" and pi: "Ifm (real i#bs) p" - and d: "d\ p d" + and d: "d_\ p d" and dp: "d > 0" and nob: "\(e,c) \ set (\ p). \ j\ {1 .. c*d}. real (c*i) \ Inum (real i#bs) e + real j" (is "\(e,c) \ set (\ p). \ j\ {1 .. c*d}. _ \ ?N i e + _") @@ -3187,10 +3187,10 @@ lemma \_nb: assumes lp: "iszlfm p (a#bs)" and nb: "numbound0 t" shows "bound0 (\ p k t)" - using \\_nb[OF lp nb] nb by (simp add: \_def) + using \_\_nb[OF lp nb] nb by (simp add: \_def) lemma \': assumes lp: "iszlfm p (a #bs)" - and d: "d\ p d" + and d: "d_\ p d" and dp: "d > 0" shows "\ x. \(\ (e,c) \ set(\ p). \(j::int) \ {1 .. c*d}. Ifm (a #bs) (\ p c (Add e (C j)))) \ Ifm (real x#bs) p \ Ifm (real (x - d)#bs) p" (is "\ x. ?b x \ ?P x \ ?P (x - d)") proof(clarify) @@ -3219,8 +3219,8 @@ from nb have nb': "numbound0 (Add e (C j))" by simp have ji: "isint (C j) (real x#bs)" by (simp add: isint_def) from isint_add[OF ei ji] have ei':"isint (Add e (C j)) (real x#bs)" . - from th \\[where b'="real x", OF lp' cp' nb' ei' cdej',symmetric] - have "Ifm (real x#bs) (\\ p (Add e (C j), c))" by simp + from th \_\[where b'="real x", OF lp' cp' nb' ei' cdej',symmetric] + have "Ifm (real x#bs) (\_\ p (Add e (C j), c))" by simp with rcdej have th: "Ifm (real x#bs) (\ p c (Add e (C j)))" by (simp add: \_def) from th bound0_I[OF \_nb[OF lp nb', where k="c"],where bs="bs" and b="real x" and b'="a"] have "Ifm (a#bs) (\ p c (Add e (C j)))" by blast @@ -3237,7 +3237,7 @@ is "?lhs = (?MD \ ?RD)" is "?lhs = ?rhs") proof- let ?d= "\ p" - from \[OF lp] have d:"d\ p ?d" and dp: "?d > 0" by auto + from \[OF lp] have d:"d_\ p ?d" and dp: "?d > 0" by auto { assume H:"?MD" hence th:"\ (x::int). ?MP x" by blast from H minusinf_ex[OF lp th] have ?thesis by blast} moreover @@ -3251,12 +3251,12 @@ from spx bound0_I[OF \_nb[OF lp nb', where k="c"], where bs="bs" and b="a" and b'="real i"] have spx': "Ifm (real i # bs) (\ p c (Add e (C j)))" by blast from spx' have rcdej:"real c rdvd (Inum (real i#bs) (Add e (C j)))" - and sr:"Ifm (real i#bs) (\\ p (Add e (C j),c))" by (simp add: \_def)+ + and sr:"Ifm (real i#bs) (\_\ p (Add e (C j),c))" by (simp add: \_def)+ from rcdej eji[simplified isint_iff] have "real c rdvd real (floor (Inum (real i#bs) (Add e (C j))))" by simp hence cdej:"c dvd floor (Inum (real i#bs) (Add e (C j)))" by (simp only: int_rdvd_iff) from cp have cp': "real c > 0" by simp - from \\[OF lp cp' nb' eji cdej] spx' have "?P (\Inum (real i # bs) (Add e (C j))\ div c)" + from \_\[OF lp cp' nb' eji cdej] spx' have "?P (\Inum (real i # bs) (Add e (C j))\ div c)" by (simp add: \_def) hence ?lhs by blast with exR jD spx have ?thesis by blast} @@ -3272,8 +3272,8 @@ ultimately show ?thesis by blast qed -lemma mirror_\\: assumes lp: "iszlfm p (a#bs)" - shows "(\ (t,k). (Inum (a#bs) t, k)) ` set (\\ p) = (\ (t,k). (Inum (a#bs) t,k)) ` set (\ (mirror p))" +lemma mirror_\_\: assumes lp: "iszlfm p (a#bs)" + shows "(\ (t,k). (Inum (a#bs) t, k)) ` set (\_\ p) = (\ (t,k). (Inum (a#bs) t,k)) ` set (\ (mirror p))" using lp by (induct p rule: mirror.induct, simp_all add: split_def image_Un ) @@ -4714,7 +4714,7 @@ qed -lemma fr_eq\: +lemma fr_eq_\: assumes lp: "isrlfm p" shows "(\ x. Ifm (x#bs) p) = ((Ifm (x#bs) (minusinf p)) \ (Ifm (x#bs) (plusinf p)) \ (\ (t,k) \ set (\ p). \ (s,l) \ set (\ p). Ifm (x#bs) (\ p (Add(Mul l t) (Mul k s) , 2*k*l))))" (is "(\ x. ?I x p) = (?M \ ?P \ ?F)" is "?E = ?D") @@ -4856,7 +4856,7 @@ hence lqx: "?I x ?rq " using simpfm[where p="?rq" and bs="x#bs"] by auto from qf have qfq:"isrlfm ?rq" by (auto simp add: rsplit_def lt_def ge_def rlfm_I[OF qf xp x1]) - with lqx fr_eq\[OF qfq] show "?M \ ?P \ ?F" by blast + with lqx fr_eq_\[OF qfq] show "?M \ ?P \ ?F" by blast next assume D: "?D" let ?U = "set (\ ?rq )" @@ -5066,27 +5066,27 @@ lemma cp_thm': assumes lp: "iszlfm p (real (i::int)#bs)" - and up: "d\ p 1" and dd: "d\ p d" and dp: "d > 0" + and up: "d_\ p 1" and dd: "d_\ p d" and dp: "d > 0" shows "(\ (x::int). Ifm (real x#bs) p) = ((\ j\ {1 .. d}. Ifm (real j#bs) (minusinf p)) \ (\ j\ {1.. d}. \ b\ (Inum (real i#bs)) ` set (\ p). Ifm ((b+real j)#bs) p))" using cp_thm[OF lp up dd dp] by auto definition unit :: "fm \ fm \ num list \ int" where - "unit p \ (let p' = zlfm p ; l = \ p' ; q = And (Dvd l (CN 0 1 (C 0))) (a\ p' l); d = \ q; + "unit p \ (let p' = zlfm p ; l = \ p' ; q = And (Dvd l (CN 0 1 (C 0))) (a_\ p' l); d = \ q; B = remdups (map simpnum (\ q)) ; a = remdups (map simpnum (\ q)) in if length B \ length a then (q,B,d) else (mirror q, a,d))" lemma unit: assumes qf: "qfree p" - shows "\ q B d. unit p = (q,B,d) \ ((\ (x::int). Ifm (real x#bs) p) = (\ (x::int). Ifm (real x#bs) q)) \ (Inum (real i#bs)) ` set B = (Inum (real i#bs)) ` set (\ q) \ d\ q 1 \ d\ q d \ d >0 \ iszlfm q (real (i::int)#bs) \ (\ b\ set B. numbound0 b)" + shows "\ q B d. unit p = (q,B,d) \ ((\ (x::int). Ifm (real x#bs) p) = (\ (x::int). Ifm (real x#bs) q)) \ (Inum (real i#bs)) ` set B = (Inum (real i#bs)) ` set (\ q) \ d_\ q 1 \ d_\ q d \ d >0 \ iszlfm q (real (i::int)#bs) \ (\ b\ set B. numbound0 b)" proof- fix q B d assume qBd: "unit p = (q,B,d)" let ?thes = "((\ (x::int). Ifm (real x#bs) p) = (\ (x::int). Ifm (real x#bs) q)) \ Inum (real i#bs) ` set B = Inum (real i#bs) ` set (\ q) \ - d\ q 1 \ d\ q d \ 0 < d \ iszlfm q (real i # bs) \ (\ b\ set B. numbound0 b)" + d_\ q 1 \ d_\ q d \ 0 < d \ iszlfm q (real i # bs) \ (\ b\ set B. numbound0 b)" let ?I = "\ (x::int) p. Ifm (real x#bs) p" let ?p' = "zlfm p" let ?l = "\ ?p'" - let ?q = "And (Dvd ?l (CN 0 1 (C 0))) (a\ ?p' ?l)" + let ?q = "And (Dvd ?l (CN 0 1 (C 0))) (a_\ ?p' ?l)" let ?d = "\ ?q" let ?B = "set (\ ?q)" let ?B'= "remdups (map simpnum (\ ?q))" @@ -5097,12 +5097,12 @@ from iszlfm_gen[OF conjunct2[OF zlfm_I[OF qf, where bs="bs" and i="i"]]] have lp': "\ (i::int). iszlfm ?p' (real i#bs)" by simp hence lp'': "iszlfm ?p' (real (i::int)#bs)" by simp - from lp' \[where p="?p'" and bs="bs"] have lp: "?l >0" and dl: "d\ ?p' ?l" by auto - from a\_ex[where p="?p'" and l="?l" and bs="bs", OF lp'' dl lp] pp' + from lp' \[where p="?p'" and bs="bs"] have lp: "?l >0" and dl: "d_\ ?p' ?l" by auto + from a_\_ex[where p="?p'" and l="?l" and bs="bs", OF lp'' dl lp] pp' have pq_ex:"(\ (x::int). ?I x p) = (\ x. ?I x ?q)" by (simp add: int_rdvd_iff) - from lp'' lp a\[OF lp'' dl lp] have lq:"iszlfm ?q (real i#bs)" and uq: "d\ ?q 1" + from lp'' lp a_\[OF lp'' dl lp] have lq:"iszlfm ?q (real i#bs)" and uq: "d_\ ?q 1" by (auto simp add: isint_def) - from \[OF lq] have dp:"?d >0" and dd: "d\ ?q ?d" by blast+ + from \[OF lq] have dp:"?d >0" and dd: "d_\ ?q ?d" by blast+ let ?N = "\ t. Inum (real (i::int)#bs) t" have "?N ` set ?B' = ((?N o simpnum) ` ?B)" by (simp add:image_compose) also have "\ = ?N ` ?B" using simpnum_ci[where bs="real i #bs"] by auto @@ -5124,13 +5124,13 @@ {assume "\ (length ?B' \ length ?A')" hence q:"q=mirror ?q" and "B = ?A'" and d:"d = ?d" using qBd by (auto simp add: Let_def unit_def) - with AA' mirror\\[OF lq] A_nb have b:"?N ` (set B) = ?N ` set (\ q)" + with AA' mirror_\_\[OF lq] A_nb have b:"?N ` (set B) = ?N ` set (\ q)" and bn: "\b\ set B. numbound0 b" by simp+ from mirror_ex[OF lq] pq_ex q have pqm_eq:"(\ (x::int). ?I x p) = (\ (x::int). ?I x q)" by simp - from lq uq q mirror_d\ [where p="?q" and bs="bs" and a="real i"] - have lq': "iszlfm q (real i#bs)" and uq: "d\ q 1" by auto - from \[OF lq'] mirror_\[OF lq] q d have dq:"d\ q d " by auto + from lq uq q mirror_d_\ [where p="?q" and bs="bs" and a="real i"] + have lq': "iszlfm q (real i#bs)" and uq: "d_\ q 1" by auto + from \[OF lq'] mirror_\[OF lq] q d have dq:"d_\ q d " by auto from pqm_eq b bn uq lq' dp dq q dp d have ?thes by simp } ultimately show ?thes by blast @@ -5168,7 +5168,7 @@ have qbf:"unit p = (?q,?B,?d)" by simp from unit[OF qf qbf] have pq_ex: "(\(x::int). ?I x p) = (\ (x::int). ?I x ?q)" and B:"?N ` set ?B = ?N ` set (\ ?q)" and - uq:"d\ ?q 1" and dd: "d\ ?q ?d" and dp: "?d > 0" and + uq:"d_\ ?q 1" and dd: "d_\ ?q ?d" and dp: "?d > 0" and lq: "iszlfm ?q (real i#bs)" and Bn: "\ b\ set ?B. numbound0 b" by auto from zlin_qfree[OF lq] have qfq: "qfree ?q" . @@ -5231,14 +5231,14 @@ (* Redy and Loveland *) -lemma \\_cong: assumes lp: "iszlfm p (a#bs)" and tt': "Inum (a#bs) t = Inum (a#bs) t'" - shows "Ifm (a#bs) (\\ p (t,c)) = Ifm (a#bs) (\\ p (t',c))" +lemma \_\_cong: assumes lp: "iszlfm p (a#bs)" and tt': "Inum (a#bs) t = Inum (a#bs) t'" + shows "Ifm (a#bs) (\_\ p (t,c)) = Ifm (a#bs) (\_\ p (t',c))" using lp by (induct p rule: iszlfm.induct, auto simp add: tt') lemma \_cong: assumes lp: "iszlfm p (a#bs)" and tt': "Inum (a#bs) t = Inum (a#bs) t'" shows "Ifm (a#bs) (\ p c t) = Ifm (a#bs) (\ p c t')" - by (simp add: \_def tt' \\_cong[OF lp tt']) + by (simp add: \_def tt' \_\_cong[OF lp tt']) lemma \_cong: assumes lp: "iszlfm p (a#bs)" and RR: "(\(b,k). (Inum (a#bs) b,k)) ` R = (\(b,k). (Inum (a#bs) b,k)) ` set (\ p)" @@ -5284,7 +5284,7 @@ definition chooset :: "fm \ fm \ ((num\int) list) \ int" where "chooset p \ (let q = zlfm p ; d = \ q; B = remdups (map (\ (t,k). (simpnum t,k)) (\ q)) ; - a = remdups (map (\ (t,k). (simpnum t,k)) (\\ q)) + a = remdups (map (\ (t,k). (simpnum t,k)) (\_\ q)) in if length B \ length a then (q,B,d) else (mirror q, a,d))" lemma chooset: assumes qf: "qfree p" @@ -5299,8 +5299,8 @@ let ?B = "set (\ ?q)" let ?f = "\ (t,k). (simpnum t,k)" let ?B'= "remdups (map ?f (\ ?q))" - let ?A = "set (\\ ?q)" - let ?A'= "remdups (map ?f (\\ ?q))" + let ?A = "set (\_\ ?q)" + let ?A'= "remdups (map ?f (\_\ ?q))" from conjunct1[OF zlfm_I[OF qf, where bs="bs"]] have pp': "\ i. ?I i ?q = ?I i p" by auto hence pq_ex:"(\ (x::int). ?I x p) = (\ x. ?I x ?q)" by simp @@ -5318,7 +5318,7 @@ finally have AA': "?N ` set ?A' = ?N ` ?A" . from \_l[OF lq] have B_nb:"\ (e,c)\ set ?B'. numbound0 e \ c > 0" by (simp add: simpnum_numbound0 split_def) - from \\_l[OF lq] have A_nb: "\ (e,c)\ set ?A'. numbound0 e \ c > 0" + from \_\_l[OF lq] have A_nb: "\ (e,c)\ set ?A'. numbound0 e \ c > 0" by (simp add: simpnum_numbound0 split_def) {assume "length ?B' \ length ?A'" hence q:"q=?q" and "B = ?B'" and d:"d = ?d" @@ -5330,7 +5330,7 @@ {assume "\ (length ?B' \ length ?A')" hence q:"q=mirror ?q" and "B = ?A'" and d:"d = ?d" using qBd by (auto simp add: Let_def chooset_def) - with AA' mirror_\\[OF lq] A_nb have b:"?N ` (set B) = ?N ` set (\ q)" + with AA' mirror_\_\[OF lq] A_nb have b:"?N ` (set B) = ?N ` set (\ q)" and bn: "\(e,c)\ set B. numbound0 e \ c > 0" by auto from mirror_ex[OF lq] pq_ex q have pqm_eq:"(\ (x::int). ?I x p) = (\ (x::int). ?I x q)" by simp diff -r 227477f17c26 -r 4aa34bd43228 src/HOL/Matrix_LP/LP.thy --- a/src/HOL/Matrix_LP/LP.thy Wed Nov 28 15:38:12 2012 +0100 +++ b/src/HOL/Matrix_LP/LP.thy Wed Nov 28 15:59:18 2012 +0100 @@ -19,12 +19,12 @@ assumes "A * x \ (b::'a::lattice_ring)" "0 \ y" - "abs (A - A') \ \A" + "abs (A - A') \ \_A" "b \ b'" - "abs (c - c') \ \c" + "abs (c - c') \ \_c" "abs x \ r" shows - "c * x \ y * b' + (y * \A + abs (y * A' - c') + \c) * r" + "c * x \ y * b' + (y * \_A + abs (y * A' - c') + \_c) * r" proof - from assms have 1: "y * b <= y * b'" by (simp add: mult_left_mono) from assms have 2: "y * (A * x) <= y * b" by (simp add: mult_left_mono) @@ -43,20 +43,20 @@ have 10: "c'-c = -(c-c')" by (simp add: algebra_simps) have 11: "abs (c'-c) = abs (c-c')" by (subst 10, subst abs_minus_cancel, simp) - 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') + \c) * abs x" + 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') + \_c) * abs x" by (simp add: 11 assms mult_right_mono) - have 13: "(abs y * abs (A-A') + abs (y*A'-c') + \c) * abs x <= (abs y * \A + abs (y*A'-c') + \c) * abs x" + have 13: "(abs y * abs (A-A') + abs (y*A'-c') + \_c) * abs x <= (abs y * \_A + abs (y*A'-c') + \_c) * abs x" by (simp add: assms mult_right_mono mult_left_mono) - have r: "(abs y * \A + abs (y*A'-c') + \c) * abs x <= (abs y * \A + abs (y*A'-c') + \c) * r" + have r: "(abs y * \_A + abs (y*A'-c') + \_c) * abs x <= (abs y * \_A + abs (y*A'-c') + \_c) * r" apply (rule mult_left_mono) apply (simp add: assms) apply (rule_tac add_mono[of "0::'a" _ "0", simplified])+ - apply (rule mult_left_mono[of "0" "\A", simplified]) + apply (rule mult_left_mono[of "0" "\_A", simplified]) apply (simp_all) apply (rule order_trans[where y="abs (A-A')"], simp_all add: assms) apply (rule order_trans[where y="abs (c-c')"], simp_all add: assms) done - from 6 7 8 9 12 13 r have 14:" abs((y * (A - A') + (y * A' - c') + (c'-c)) * x) <=(abs y * \A + abs (y*A'-c') + \c) * r" + from 6 7 8 9 12 13 r have 14:" abs((y * (A - A') + (y * A' - c') + (c'-c)) * x) <=(abs y * \_A + abs (y*A'-c') + \_c) * r" by (simp) show ?thesis apply (rule le_add_right_mono[of _ _ "abs((y * (A - A') + (y * A' - c') + (c'-c)) * x)"]) diff -r 227477f17c26 -r 4aa34bd43228 src/HOL/Multivariate_Analysis/Finite_Cartesian_Product.thy --- a/src/HOL/Multivariate_Analysis/Finite_Cartesian_Product.thy Wed Nov 28 15:38:12 2012 +0100 +++ b/src/HOL/Multivariate_Analysis/Finite_Cartesian_Product.thy Wed Nov 28 15:59:18 2012 +0100 @@ -527,16 +527,16 @@ lemma pi'_range[intro]: "\i::'n. \' i < CARD('n::finite)" using bij_betw_pi' unfolding bij_betw_def by auto -lemma \\'[simp]: "\i::'n::finite. \ (\' i) = i" +lemma pi_pi'[simp]: "\i::'n::finite. \ (\' i) = i" using bij_betw_pi by (auto intro!: f_inv_into_f simp: \'_def bij_betw_def) -lemma \'\[simp]: "\i. i\{.. \' (\ i::'n) = i" +lemma pi'_pi[simp]: "\i. i\{.. \' (\ i::'n) = i" using bij_betw_pi by (auto intro!: inv_into_f_eq simp: \'_def bij_betw_def) -lemma \\'_alt[simp]: "\i. i \' (\ i::'n) = i" +lemma pi_pi'_alt[simp]: "\i. i \' (\ i::'n) = i" by auto -lemma \_inj_on: "inj_on (\::nat\'n::finite) {..::nat\'n::finite) {..=this def \' \ "inv_into {1..n} \" have \':"bij_betw \' {..] unfolding \'_def n_def by auto - hence \'i:"\i. i \' i \ {1..n}" unfolding bij_betw_def by auto - have \i:"\i. i\{1..n} \ \ i unfolding bij_betw_def n_def by auto - have \\'[simp]:"\i. i \ (\' i) = i" unfolding \'_def + hence \'_i:"\i. i \' i \ {1..n}" unfolding bij_betw_def by auto + have \_i:"\i. i\{1..n} \ \ i unfolding bij_betw_def n_def by auto + have \_\'[simp]:"\i. i \ (\' i) = i" unfolding \'_def apply(rule f_inv_into_f) unfolding n_def using \ unfolding bij_betw_def by auto - have \'\[simp]:"\i. i\{1..n} \ \' (\ i) = i" unfolding \'_def apply(rule inv_into_f_eq) + have \'_\[simp]:"\i. i\{1..n} \ \' (\ i) = i" unfolding \'_def apply(rule inv_into_f_eq) using \ unfolding n_def bij_betw_def by auto have "{c..d} \ {}" using assms by auto let ?p1 = "\l. {(\\ i. if \' i < l then c$$i else a$$i)::'a .. (\\ i. if \' i < l then d$$i else if \' i = l then c$$\ l else b$$i)}" @@ -943,47 +943,47 @@ assume "l \ l'" fix x have "x \ interior k \ interior k'" proof(rule,cases "l' = n+1") assume x:"x \ interior k \ interior k'" - case True hence "\i. i \' i < l'" using \'i using l' by(auto simp add:less_Suc_eq_le) + case True hence "\i. i \' i < l'" using \'_i using l' by(auto simp add:less_Suc_eq_le) hence *:"\ P Q. (\\ i. if \' i < l' then P i else Q i) = ((\\ i. P i)::'a)" apply-apply(subst euclidean_eq) by auto hence k':"k' = {c..d}" using l'(1) unfolding * by auto have ln:"l < n + 1" proof(rule ccontr) case goal1 hence l2:"l = n+1" using l by auto - hence "\i. i \' i < l" using \'i by(auto simp add:less_Suc_eq_le) + hence "\i. i \' i < l" using \'_i by(auto simp add:less_Suc_eq_le) hence *:"\ P Q. (\\ i. if \' i < l then P i else Q i) = ((\\ i. P i)::'a)" apply-apply(subst euclidean_eq) by auto - hence "k = {c..d}" using l(1) \'i unfolding * by(auto) + hence "k = {c..d}" using l(1) \'_i unfolding * by(auto) thus False using `k\k'` k' by auto - qed have **:"\' (\ l) = l" using \'\[of l] using l ln by auto + qed have **:"\' (\ l) = l" using \'_\[of l] using l ln by auto have "x $$ \ l < c $$ \ l \ d $$ \ l < x $$ \ l" using l(1) apply- proof(erule disjE) assume as:"k = ?p1 l" note * = conjunct1[OF x[unfolded as Int_iff interior_closed_interval mem_interval],rule_format] - show ?thesis using *[of "\ l"] using ln l(2) using \i[of l] by(auto simp add:** not_less) + show ?thesis using *[of "\ l"] using ln l(2) using \_i[of l] by(auto simp add:** not_less) next assume as:"k = ?p2 l" note * = conjunct1[OF x[unfolded as Int_iff interior_closed_interval mem_interval],rule_format] - show ?thesis using *[of "\ l"] using ln l(2) using \i[of l] unfolding ** by auto + show ?thesis using *[of "\ l"] using ln l(2) using \_i[of l] unfolding ** by auto qed thus False using x unfolding k' unfolding Int_iff interior_closed_interval mem_interval by(auto elim!:allE[where x="\ l"]) next case False hence "l < n + 1" using l'(2) using `l\l'` by auto hence ln:"l \ {1..n}" "l' \ {1..n}" using l l' False by auto - note \l = \'\[OF ln(1)] \'\[OF ln(2)] + note \_l = \'_\[OF ln(1)] \'_\[OF ln(2)] assume x:"x \ interior k \ interior k'" show False using l(1) l'(1) apply- proof(erule_tac[!] disjE)+ assume as:"k = ?p1 l" "k' = ?p1 l'" note * = conjunctD2[OF x[unfolded as Int_iff interior_closed_interval mem_interval],rule_format] have "l \ l'" using k'(2)[unfolded as] by auto - thus False using *[of "\ l'"] *[of "\ l"] ln using \i[OF ln(1)] \i[OF ln(2)] apply(cases "ll \i n_def) + thus False using *[of "\ l'"] *[of "\ l"] ln using \_i[OF ln(1)] \_i[OF ln(2)] apply(cases "l_l \_i n_def) next assume as:"k = ?p2 l" "k' = ?p2 l'" note * = conjunctD2[OF x[unfolded as Int_iff interior_closed_interval mem_interval],rule_format] have "l \ l'" apply(rule) using k'(2)[unfolded as] by auto - thus False using *[of "\ l"] *[of "\ l'"] `l \ l'` ln by(auto simp add:euclidean_lambda_beta' \l \i n_def) + thus False using *[of "\ l"] *[of "\ l'"] `l \ l'` ln by(auto simp add:euclidean_lambda_beta' \_l \_i n_def) next assume as:"k = ?p1 l" "k' = ?p2 l'" note * = conjunctD2[OF x[unfolded as Int_iff interior_closed_interval mem_interval],rule_format] show False using abcd[of "\ l'"] using *[of "\ l"] *[of "\ l'"] `l \ l'` ln apply(cases "l=l'") - by(auto simp add:euclidean_lambda_beta' \l \i n_def) + by(auto simp add:euclidean_lambda_beta' \_l \_i n_def) next assume as:"k = ?p2 l" "k' = ?p1 l'" note * = conjunctD2[OF x[unfolded as Int_iff interior_closed_interval mem_interval],rule_format] show False using *[of "\ l"] *[of "\ l'"] ln `l \ l'` apply(cases "l=l'") using abcd[of "\ l'"] - by(auto simp add:euclidean_lambda_beta' \l \i n_def) + by(auto simp add:euclidean_lambda_beta' \_l \_i n_def) qed qed } from this[OF k l k' l'] this[OF k'(1) l' k _ l] have "\x. x \ interior k \ interior k'" apply - apply(cases "l' \ l") using k'(2) by auto diff -r 227477f17c26 -r 4aa34bd43228 src/HOL/Nominal/Examples/Class3.thy --- a/src/HOL/Nominal/Examples/Class3.thy Wed Nov 28 15:38:12 2012 +0100 +++ b/src/HOL/Nominal/Examples/Class3.thy Wed Nov 28 15:59:18 2012 +0100 @@ -3091,22 +3091,22 @@ findn :: "(name\coname\trm) list\name\(coname\trm) option" where "findn [] x = None" -| "findn ((y,c,P)#\n) x = (if y=x then Some (c,P) else findn \n x)" +| "findn ((y,c,P)#\_n) x = (if y=x then Some (c,P) else findn \_n x)" lemma findn_eqvt[eqvt]: fixes pi1::"name prm" and pi2::"coname prm" - shows "(pi1\findn \n x) = findn (pi1\\n) (pi1\x)" - and "(pi2\findn \n x) = findn (pi2\\n) (pi2\x)" -apply(induct \n) + shows "(pi1\findn \_n x) = findn (pi1\\_n) (pi1\x)" + and "(pi2\findn \_n x) = findn (pi2\\_n) (pi2\x)" +apply(induct \_n) apply(auto simp add: perm_bij) done lemma findn_fresh: - assumes a: "x\\n" - shows "findn \n x = None" + assumes a: "x\\_n" + shows "findn \_n x = None" using a -apply(induct \n) +apply(induct \_n) apply(auto simp add: fresh_list_cons fresh_atm fresh_prod) done @@ -3114,38 +3114,38 @@ findc :: "(coname\name\trm) list\coname\(name\trm) option" where "findc [] x = None" -| "findc ((c,y,P)#\c) a = (if a=c then Some (y,P) else findc \c a)" +| "findc ((c,y,P)#\_c) a = (if a=c then Some (y,P) else findc \_c a)" lemma findc_eqvt[eqvt]: fixes pi1::"name prm" and pi2::"coname prm" - shows "(pi1\findc \c a) = findc (pi1\\c) (pi1\a)" - and "(pi2\findc \c a) = findc (pi2\\c) (pi2\a)" -apply(induct \c) + shows "(pi1\findc \_c a) = findc (pi1\\_c) (pi1\a)" + and "(pi2\findc \_c a) = findc (pi2\\_c) (pi2\a)" +apply(induct \_c) apply(auto simp add: perm_bij) done lemma findc_fresh: - assumes a: "a\\c" - shows "findc \c a = None" + assumes a: "a\\_c" + shows "findc \_c a = None" using a -apply(induct \c) +apply(induct \_c) apply(auto simp add: fresh_list_cons fresh_atm fresh_prod) done abbreviation nmaps :: "(name\coname\trm) list \ name \ (coname\trm) option \ bool" ("_ nmaps _ to _" [55,55,55] 55) where - "\n nmaps x to P \ (findn \n x) = P" + "\_n nmaps x to P \ (findn \_n x) = P" abbreviation cmaps :: "(coname\name\trm) list \ coname \ (name\trm) option \ bool" ("_ cmaps _ to _" [55,55,55] 55) where - "\c cmaps a to P \ (findc \c a) = P" + "\_c cmaps a to P \ (findc \_c a) = P" lemma nmaps_fresh: - shows "\n nmaps x to Some (c,P) \ a\\n \ a\(c,P)" -apply(induct \n) + shows "\_n nmaps x to Some (c,P) \ a\\_n \ a\(c,P)" +apply(induct \_n) apply(auto simp add: fresh_list_cons fresh_prod fresh_atm) apply(case_tac "aa=x") apply(auto) @@ -3154,8 +3154,8 @@ done lemma cmaps_fresh: - shows "\c cmaps a to Some (y,P) \ x\\c \ x\(y,P)" -apply(induct \c) + shows "\_c cmaps a to Some (y,P) \ x\\_c \ x\(y,P)" +apply(induct \_c) apply(auto simp add: fresh_list_cons fresh_prod fresh_atm) apply(case_tac "a=aa") apply(auto) @@ -3164,14 +3164,14 @@ done lemma nmaps_false: - shows "\n nmaps x to Some (c,P) \ x\\n \ False" -apply(induct \n) + shows "\_n nmaps x to Some (c,P) \ x\\_n \ False" +apply(induct \_n) apply(auto simp add: fresh_list_cons fresh_prod fresh_atm) done lemma cmaps_false: - shows "\c cmaps c to Some (x,P) \ c\\c \ False" -apply(induct \c) + shows "\_c cmaps c to Some (x,P) \ c\\_c \ False" +apply(induct \_c) apply(auto simp add: fresh_list_cons fresh_prod fresh_atm) done @@ -3179,25 +3179,25 @@ lookupa :: "name\coname\(coname\name\trm) list\trm" where "lookupa x a [] = Ax x a" -| "lookupa x a ((c,y,P)#\c) = (if a=c then Cut .Ax x a (y).P else lookupa x a \c)" +| "lookupa x a ((c,y,P)#\_c) = (if a=c then Cut .Ax x a (y).P else lookupa x a \_c)" lemma lookupa_eqvt[eqvt]: fixes pi1::"name prm" and pi2::"coname prm" - shows "(pi1\(lookupa x a \c)) = lookupa (pi1\x) (pi1\a) (pi1\\c)" - and "(pi2\(lookupa x a \c)) = lookupa (pi2\x) (pi2\a) (pi2\\c)" + shows "(pi1\(lookupa x a \_c)) = lookupa (pi1\x) (pi1\a) (pi1\\_c)" + and "(pi2\(lookupa x a \_c)) = lookupa (pi2\x) (pi2\a) (pi2\\_c)" apply - -apply(induct \c) +apply(induct \_c) apply(auto simp add: eqvts) -apply(induct \c) +apply(induct \_c) apply(auto simp add: eqvts) done lemma lookupa_fire: - assumes a: "\c cmaps a to Some (y,P)" - shows "(lookupa x a \c) = Cut .Ax x a (y).P" + assumes a: "\_c cmaps a to Some (y,P)" + shows "(lookupa x a \_c) = Cut .Ax x a (y).P" using a -apply(induct \c arbitrary: x a y P) +apply(induct \_c arbitrary: x a y P) apply(auto) done @@ -3205,35 +3205,35 @@ lookupb :: "name\coname\(coname\name\trm) list\coname\trm\trm" where "lookupb x a [] c P = Cut .P (x).Ax x a" -| "lookupb x a ((d,y,N)#\c) c P = (if a=d then Cut .P (y).N else lookupb x a \c c P)" +| "lookupb x a ((d,y,N)#\_c) c P = (if a=d then Cut .P (y).N else lookupb x a \_c c P)" lemma lookupb_eqvt[eqvt]: fixes pi1::"name prm" and pi2::"coname prm" - shows "(pi1\(lookupb x a \c c P)) = lookupb (pi1\x) (pi1\a) (pi1\\c) (pi1\c) (pi1\P)" - and "(pi2\(lookupb x a \c c P)) = lookupb (pi2\x) (pi2\a) (pi2\\c) (pi2\c) (pi2\P)" + shows "(pi1\(lookupb x a \_c c P)) = lookupb (pi1\x) (pi1\a) (pi1\\_c) (pi1\c) (pi1\P)" + and "(pi2\(lookupb x a \_c c P)) = lookupb (pi2\x) (pi2\a) (pi2\\_c) (pi2\c) (pi2\P)" apply - -apply(induct \c) +apply(induct \_c) apply(auto simp add: eqvts) -apply(induct \c) +apply(induct \_c) apply(auto simp add: eqvts) done fun lookup :: "name\coname\(name\coname\trm) list\(coname\name\trm) list\trm" where - "lookup x a [] \c = lookupa x a \c" -| "lookup x a ((y,c,P)#\n) \c = (if x=y then (lookupb x a \c c P) else lookup x a \n \c)" + "lookup x a [] \_c = lookupa x a \_c" +| "lookup x a ((y,c,P)#\_n) \_c = (if x=y then (lookupb x a \_c c P) else lookup x a \_n \_c)" lemma lookup_eqvt[eqvt]: fixes pi1::"name prm" and pi2::"coname prm" - shows "(pi1\(lookup x a \n \c)) = lookup (pi1\x) (pi1\a) (pi1\\n) (pi1\\c)" - and "(pi2\(lookup x a \n \c)) = lookup (pi2\x) (pi2\a) (pi2\\n) (pi2\\c)" + shows "(pi1\(lookup x a \_n \_c)) = lookup (pi1\x) (pi1\a) (pi1\\_n) (pi1\\_c)" + and "(pi2\(lookup x a \_n \_c)) = lookup (pi2\x) (pi2\a) (pi2\\_n) (pi2\\_c)" apply - -apply(induct \n) +apply(induct \_n) apply(auto simp add: eqvts) -apply(induct \n) +apply(induct \_n) apply(auto simp add: eqvts) done @@ -3241,17 +3241,17 @@ lookupc :: "name\coname\(name\coname\trm) list\trm" where "lookupc x a [] = Ax x a" -| "lookupc x a ((y,c,P)#\n) = (if x=y then P[c\c>a] else lookupc x a \n)" +| "lookupc x a ((y,c,P)#\_n) = (if x=y then P[c\c>a] else lookupc x a \_n)" lemma lookupc_eqvt[eqvt]: fixes pi1::"name prm" and pi2::"coname prm" - shows "(pi1\(lookupc x a \n)) = lookupc (pi1\x) (pi1\a) (pi1\\n)" - and "(pi2\(lookupc x a \n)) = lookupc (pi2\x) (pi2\a) (pi2\\n)" + shows "(pi1\(lookupc x a \_n)) = lookupc (pi1\x) (pi1\a) (pi1\\_n)" + and "(pi2\(lookupc x a \_n)) = lookupc (pi2\x) (pi2\a) (pi2\\_n)" apply - -apply(induct \n) +apply(induct \_n) apply(auto simp add: eqvts) -apply(induct \n) +apply(induct \_n) apply(auto simp add: eqvts) done @@ -3259,47 +3259,47 @@ lookupd :: "name\coname\(coname\name\trm) list\trm" where "lookupd x a [] = Ax x a" -| "lookupd x a ((c,y,P)#\c) = (if a=c then P[y\n>x] else lookupd x a \c)" +| "lookupd x a ((c,y,P)#\_c) = (if a=c then P[y\n>x] else lookupd x a \_c)" lemma lookupd_eqvt[eqvt]: fixes pi1::"name prm" and pi2::"coname prm" - shows "(pi1\(lookupd x a \n)) = lookupd (pi1\x) (pi1\a) (pi1\\n)" - and "(pi2\(lookupd x a \n)) = lookupd (pi2\x) (pi2\a) (pi2\\n)" + shows "(pi1\(lookupd x a \_n)) = lookupd (pi1\x) (pi1\a) (pi1\\_n)" + and "(pi2\(lookupd x a \_n)) = lookupd (pi2\x) (pi2\a) (pi2\\_n)" apply - -apply(induct \n) +apply(induct \_n) apply(auto simp add: eqvts) -apply(induct \n) +apply(induct \_n) apply(auto simp add: eqvts) done lemma lookupa_fresh: - assumes a: "a\\c" - shows "lookupa y a \c = Ax y a" + assumes a: "a\\_c" + shows "lookupa y a \_c = Ax y a" using a -apply(induct \c) +apply(induct \_c) apply(auto simp add: fresh_prod fresh_list_cons fresh_atm) done lemma lookupa_csubst: - assumes a: "a\\c" - shows "Cut .Ax y a (x).P = (lookupa y a \c){a:=(x).P}" + assumes a: "a\\_c" + shows "Cut .Ax y a (x).P = (lookupa y a \_c){a:=(x).P}" using a by (simp add: lookupa_fresh) lemma lookupa_freshness: fixes a::"coname" and x::"name" - shows "a\(\c,c) \ a\lookupa y c \c" - and "x\(\c,y) \ x\lookupa y c \c" -apply(induct \c) + shows "a\(\_c,c) \ a\lookupa y c \_c" + and "x\(\_c,y) \ x\lookupa y c \_c" +apply(induct \_c) apply(auto simp add: fresh_prod fresh_list_cons abs_fresh fresh_atm) done lemma lookupa_unicity: - assumes a: "lookupa x a \c= Ax y b" "b\\c" "y\\c" + assumes a: "lookupa x a \_c= Ax y b" "b\\_c" "y\\_c" shows "x=y \ a=b" using a -apply(induct \c) +apply(induct \_c) apply(auto simp add: trm.inject fresh_list_cons fresh_prod fresh_atm) apply(case_tac "a=aa") apply(auto) @@ -3308,10 +3308,10 @@ done lemma lookupb_csubst: - assumes a: "a\(\c,c,N)" - shows "Cut .N (x).P = (lookupb y a \c c N){a:=(x).P}" + assumes a: "a\(\_c,c,N)" + shows "Cut .N (x).P = (lookupb y a \_c c N){a:=(x).P}" using a -apply(induct \c) +apply(induct \_c) apply(auto simp add: fresh_list_cons fresh_atm fresh_prod) apply(rule sym) apply(generate_fresh "name") @@ -3337,17 +3337,17 @@ lemma lookupb_freshness: fixes a::"coname" and x::"name" - shows "a\(\c,c,b,P) \ a\lookupb y c \c b P" - and "x\(\c,y,P) \ x\lookupb y c \c b P" -apply(induct \c) + shows "a\(\_c,c,b,P) \ a\lookupb y c \_c b P" + and "x\(\_c,y,P) \ x\lookupb y c \_c b P" +apply(induct \_c) apply(auto simp add: fresh_prod fresh_list_cons abs_fresh fresh_atm) done lemma lookupb_unicity: - assumes a: "lookupb x a \c c P = Ax y b" "b\(\c,c,P)" "y\\c" + assumes a: "lookupb x a \_c c P = Ax y b" "b\(\_c,c,P)" "y\\_c" shows "x=y \ a=b" using a -apply(induct \c) +apply(induct \_c) apply(auto simp add: fresh_list_cons fresh_prod fresh_atm) apply(case_tac "a=aa") apply(auto) @@ -3356,10 +3356,10 @@ done lemma lookupb_lookupa: - assumes a: "x\\c" - shows "lookupb x c \c a P = (lookupa x c \c){x:=.P}" + assumes a: "x\\_c" + shows "lookupb x c \_c a P = (lookupa x c \_c){x:=.P}" using a -apply(induct \c) +apply(induct \_c) apply(auto simp add: fresh_list_cons fresh_prod) apply(generate_fresh "coname") apply(generate_fresh "name") @@ -3383,10 +3383,10 @@ done lemma lookup_csubst: - assumes a: "a\(\n,\c)" - shows "lookup y c \n ((a,x,P)#\c) = (lookup y c \n \c){a:=(x).P}" + assumes a: "a\(\_n,\_c)" + shows "lookup y c \_n ((a,x,P)#\_c) = (lookup y c \_n \_c){a:=(x).P}" using a -apply(induct \n) +apply(induct \_n) apply(auto simp add: fresh_prod fresh_list_cons) apply(simp add: lookupa_csubst) apply(simp add: lookupa_freshness forget fresh_atm fresh_prod) @@ -3396,18 +3396,18 @@ done lemma lookup_fresh: - assumes a: "x\(\n,\c)" - shows "lookup x c \n \c = lookupa x c \c" + assumes a: "x\(\_n,\_c)" + shows "lookup x c \_n \_c = lookupa x c \_c" using a -apply(induct \n) +apply(induct \_n) apply(auto simp add: fresh_prod fresh_list_cons fresh_atm) done lemma lookup_unicity: - assumes a: "lookup x a \n \c= Ax y b" "b\(\c,\n)" "y\(\c,\n)" + assumes a: "lookup x a \_n \_c= Ax y b" "b\(\_c,\_n)" "y\(\_c,\_n)" shows "x=y \ a=b" using a -apply(induct \n) +apply(induct \_n) apply(auto simp add: trm.inject fresh_list_cons fresh_prod fresh_atm) apply(drule lookupa_unicity) apply(simp)+ @@ -3430,9 +3430,9 @@ lemma lookup_freshness: fixes a::"coname" and x::"name" - shows "a\(c,\c,\n) \ a\lookup y c \n \c" - and "x\(y,\c,\n) \ x\lookup y c \n \c" -apply(induct \n) + shows "a\(c,\_c,\_n) \ a\lookup y c \_n \_c" + and "x\(y,\_c,\_n) \ x\lookup y c \_n \_c" +apply(induct \_n) apply(auto simp add: fresh_prod fresh_list_cons abs_fresh fresh_atm) apply(simp add: fresh_atm fresh_prod lookupa_freshness) apply(simp add: fresh_atm fresh_prod lookupa_freshness) @@ -3443,9 +3443,9 @@ lemma lookupc_freshness: fixes a::"coname" and x::"name" - shows "a\(\c,c) \ a\lookupc y c \c" - and "x\(\c,y) \ x\lookupc y c \c" -apply(induct \c) + shows "a\(\_c,c) \ a\lookupc y c \_c" + and "x\(\_c,y) \ x\lookupc y c \_c" +apply(induct \_c) apply(auto simp add: fresh_prod fresh_list_cons abs_fresh fresh_atm) apply(rule rename_fresh) apply(simp add: fresh_atm) @@ -3454,26 +3454,26 @@ done lemma lookupc_fresh: - assumes a: "y\\n" - shows "lookupc y a \n = Ax y a" + assumes a: "y\\_n" + shows "lookupc y a \_n = Ax y a" using a -apply(induct \n) +apply(induct \_n) apply(auto simp add: fresh_prod fresh_list_cons fresh_atm) done lemma lookupc_nmaps: - assumes a: "\n nmaps x to Some (c,P)" - shows "lookupc x a \n = P[c\c>a]" + assumes a: "\_n nmaps x to Some (c,P)" + shows "lookupc x a \_n = P[c\c>a]" using a -apply(induct \n) +apply(induct \_n) apply(auto) done lemma lookupc_unicity: - assumes a: "lookupc y a \n = Ax x b" "x\\n" + assumes a: "lookupc y a \_n = Ax x b" "x\\_n" shows "y=x" using a -apply(induct \n) +apply(induct \_n) apply(auto simp add: trm.inject fresh_list_cons fresh_prod) apply(case_tac "y=aa") apply(auto) @@ -3484,18 +3484,18 @@ done lemma lookupd_fresh: - assumes a: "a\\c" - shows "lookupd y a \c = Ax y a" + assumes a: "a\\_c" + shows "lookupd y a \_c = Ax y a" using a -apply(induct \c) +apply(induct \_c) apply(auto simp add: fresh_prod fresh_list_cons fresh_atm) done lemma lookupd_unicity: - assumes a: "lookupd y a \c = Ax y b" "b\\c" + assumes a: "lookupd y a \_c = Ax y b" "b\\_c" shows "a=b" using a -apply(induct \c) +apply(induct \_c) apply(auto simp add: trm.inject fresh_list_cons fresh_prod) apply(case_tac "a=aa") apply(auto) @@ -3508,9 +3508,9 @@ lemma lookupd_freshness: fixes a::"coname" and x::"name" - shows "a\(\c,c) \ a\lookupd y c \c" - and "x\(\c,y) \ x\lookupd y c \c" -apply(induct \c) + shows "a\(\_c,c) \ a\lookupd y c \_c" + and "x\(\_c,y) \ x\lookupd y c \_c" +apply(induct \_c) apply(auto simp add: fresh_prod fresh_list_cons abs_fresh fresh_atm) apply(rule rename_fresh) apply(simp add: fresh_atm) @@ -3519,49 +3519,49 @@ done lemma lookupd_cmaps: - assumes a: "\c cmaps a to Some (x,P)" - shows "lookupd y a \c = P[x\n>y]" + assumes a: "\_c cmaps a to Some (x,P)" + shows "lookupd y a \_c = P[x\n>y]" using a -apply(induct \c) +apply(induct \_c) apply(auto) done -nominal_primrec (freshness_context: "\n::(name\coname\trm)") +nominal_primrec (freshness_context: "\_n::(name\coname\trm)") stn :: "trm\(name\coname\trm) list\trm" where - "stn (Ax x a) \n = lookupc x a \n" -| "\a\(N,\n);x\(M,\n)\ \ stn (Cut .M (x).N) \n = (Cut .M (x).N)" -| "x\\n \ stn (NotR (x).M a) \n = (NotR (x).M a)" -| "a\\n \stn (NotL .M x) \n = (NotL .M x)" -| "\a\(N,d,b,\n);b\(M,d,a,\n)\ \ stn (AndR .M .N d) \n = (AndR .M .N d)" -| "x\(z,\n) \ stn (AndL1 (x).M z) \n = (AndL1 (x).M z)" -| "x\(z,\n) \ stn (AndL2 (x).M z) \n = (AndL2 (x).M z)" -| "a\(b,\n) \ stn (OrR1 .M b) \n = (OrR1 .M b)" -| "a\(b,\n) \ stn (OrR2 .M b) \n = (OrR2 .M b)" -| "\x\(N,z,u,\n);u\(M,z,x,\n)\ \ stn (OrL (x).M (u).N z) \n = (OrL (x).M (u).N z)" -| "\a\(b,\n);x\\n\ \ stn (ImpR (x)..M b) \n = (ImpR (x)..M b)" -| "\a\(N,\n);x\(M,z,\n)\ \ stn (ImpL .M (x).N z) \n = (ImpL .M (x).N z)" + "stn (Ax x a) \_n = lookupc x a \_n" +| "\a\(N,\_n);x\(M,\_n)\ \ stn (Cut .M (x).N) \_n = (Cut .M (x).N)" +| "x\\_n \ stn (NotR (x).M a) \_n = (NotR (x).M a)" +| "a\\_n \stn (NotL .M x) \_n = (NotL .M x)" +| "\a\(N,d,b,\_n);b\(M,d,a,\_n)\ \ stn (AndR .M .N d) \_n = (AndR .M .N d)" +| "x\(z,\_n) \ stn (AndL1 (x).M z) \_n = (AndL1 (x).M z)" +| "x\(z,\_n) \ stn (AndL2 (x).M z) \_n = (AndL2 (x).M z)" +| "a\(b,\_n) \ stn (OrR1 .M b) \_n = (OrR1 .M b)" +| "a\(b,\_n) \ stn (OrR2 .M b) \_n = (OrR2 .M b)" +| "\x\(N,z,u,\_n);u\(M,z,x,\_n)\ \ stn (OrL (x).M (u).N z) \_n = (OrL (x).M (u).N z)" +| "\a\(b,\_n);x\\_n\ \ stn (ImpR (x)..M b) \_n = (ImpR (x)..M b)" +| "\a\(N,\_n);x\(M,z,\_n)\ \ stn (ImpL .M (x).N z) \_n = (ImpL .M (x).N z)" apply(finite_guess)+ apply(rule TrueI)+ apply(simp add: abs_fresh abs_supp fin_supp)+ apply(fresh_guess)+ done -nominal_primrec (freshness_context: "\c::(coname\name\trm)") +nominal_primrec (freshness_context: "\_c::(coname\name\trm)") stc :: "trm\(coname\name\trm) list\trm" where - "stc (Ax x a) \c = lookupd x a \c" -| "\a\(N,\c);x\(M,\c)\ \ stc (Cut .M (x).N) \c = (Cut .M (x).N)" -| "x\\c \ stc (NotR (x).M a) \c = (NotR (x).M a)" -| "a\\c \ stc (NotL .M x) \c = (NotL .M x)" -| "\a\(N,d,b,\c);b\(M,d,a,\c)\ \ stc (AndR .M .N d) \c = (AndR .M .N d)" -| "x\(z,\c) \ stc (AndL1 (x).M z) \c = (AndL1 (x).M z)" -| "x\(z,\c) \ stc (AndL2 (x).M z) \c = (AndL2 (x).M z)" -| "a\(b,\c) \ stc (OrR1 .M b) \c = (OrR1 .M b)" -| "a\(b,\c) \ stc (OrR2 .M b) \c = (OrR2 .M b)" -| "\x\(N,z,u,\c);u\(M,z,x,\c)\ \ stc (OrL (x).M (u).N z) \c = (OrL (x).M (u).N z)" -| "\a\(b,\c);x\\c\ \ stc (ImpR (x)..M b) \c = (ImpR (x)..M b)" -| "\a\(N,\c);x\(M,z,\c)\ \ stc (ImpL .M (x).N z) \c = (ImpL .M (x).N z)" + "stc (Ax x a) \_c = lookupd x a \_c" +| "\a\(N,\_c);x\(M,\_c)\ \ stc (Cut .M (x).N) \_c = (Cut .M (x).N)" +| "x\\_c \ stc (NotR (x).M a) \_c = (NotR (x).M a)" +| "a\\_c \ stc (NotL .M x) \_c = (NotL .M x)" +| "\a\(N,d,b,\_c);b\(M,d,a,\_c)\ \ stc (AndR .M .N d) \_c = (AndR .M .N d)" +| "x\(z,\_c) \ stc (AndL1 (x).M z) \_c = (AndL1 (x).M z)" +| "x\(z,\_c) \ stc (AndL2 (x).M z) \_c = (AndL2 (x).M z)" +| "a\(b,\_c) \ stc (OrR1 .M b) \_c = (OrR1 .M b)" +| "a\(b,\_c) \ stc (OrR2 .M b) \_c = (OrR2 .M b)" +| "\x\(N,z,u,\_c);u\(M,z,x,\_c)\ \ stc (OrL (x).M (u).N z) \_c = (OrL (x).M (u).N z)" +| "\a\(b,\_c);x\\_c\ \ stc (ImpR (x)..M b) \_c = (ImpR (x)..M b)" +| "\a\(N,\_c);x\(M,z,\_c)\ \ stc (ImpL .M (x).N z) \_c = (ImpL .M (x).N z)" apply(finite_guess)+ apply(rule TrueI)+ apply(simp add: abs_fresh abs_supp fin_supp)+ @@ -3571,33 +3571,33 @@ lemma stn_eqvt[eqvt]: fixes pi1::"name prm" and pi2::"coname prm" - shows "(pi1\(stn M \n)) = stn (pi1\M) (pi1\\n)" - and "(pi2\(stn M \n)) = stn (pi2\M) (pi2\\n)" + shows "(pi1\(stn M \_n)) = stn (pi1\M) (pi1\\_n)" + and "(pi2\(stn M \_n)) = stn (pi2\M) (pi2\\_n)" apply - -apply(nominal_induct M avoiding: \n rule: trm.strong_induct) +apply(nominal_induct M avoiding: \_n rule: trm.strong_induct) apply(auto simp add: eqvts fresh_bij fresh_prod eq_bij fresh_atm) -apply(nominal_induct M avoiding: \n rule: trm.strong_induct) +apply(nominal_induct M avoiding: \_n rule: trm.strong_induct) apply(auto simp add: eqvts fresh_bij fresh_prod eq_bij fresh_atm) done lemma stc_eqvt[eqvt]: fixes pi1::"name prm" and pi2::"coname prm" - shows "(pi1\(stc M \c)) = stc (pi1\M) (pi1\\c)" - and "(pi2\(stc M \c)) = stc (pi2\M) (pi2\\c)" + shows "(pi1\(stc M \_c)) = stc (pi1\M) (pi1\\_c)" + and "(pi2\(stc M \_c)) = stc (pi2\M) (pi2\\_c)" apply - -apply(nominal_induct M avoiding: \c rule: trm.strong_induct) +apply(nominal_induct M avoiding: \_c rule: trm.strong_induct) apply(auto simp add: eqvts fresh_bij fresh_prod eq_bij fresh_atm) -apply(nominal_induct M avoiding: \c rule: trm.strong_induct) +apply(nominal_induct M avoiding: \_c rule: trm.strong_induct) apply(auto simp add: eqvts fresh_bij fresh_prod eq_bij fresh_atm) done lemma stn_fresh: fixes a::"coname" and x::"name" - shows "a\(\n,M) \ a\stn M \n" - and "x\(\n,M) \ x\stn M \n" -apply(nominal_induct M avoiding: \n a x rule: trm.strong_induct) + shows "a\(\_n,M) \ a\stn M \_n" + and "x\(\_n,M) \ x\stn M \_n" +apply(nominal_induct M avoiding: \_n a x rule: trm.strong_induct) apply(auto simp add: abs_fresh fresh_prod fresh_atm) apply(rule lookupc_freshness) apply(simp add: fresh_atm) @@ -3608,9 +3608,9 @@ lemma stc_fresh: fixes a::"coname" and x::"name" - shows "a\(\c,M) \ a\stc M \c" - and "x\(\c,M) \ x\stc M \c" -apply(nominal_induct M avoiding: \c a x rule: trm.strong_induct) + shows "a\(\_c,M) \ a\stc M \_c" + and "x\(\_c,M) \ x\stc M \_c" +apply(nominal_induct M avoiding: \_c a x rule: trm.strong_induct) apply(auto simp add: abs_fresh fresh_prod fresh_atm) apply(rule lookupd_freshness) apply(simp add: fresh_atm) @@ -3652,58 +3652,58 @@ apply(perm_simp) done -nominal_primrec (freshness_context: "(\n::(name\coname\trm) list,\c::(coname\name\trm) list)") +nominal_primrec (freshness_context: "(\_n::(name\coname\trm) list,\_c::(coname\name\trm) list)") psubst :: "(name\coname\trm) list\(coname\name\trm) list\trm\trm" ("_,_<_>" [100,100,100] 100) where - "\n,\c = lookup x a \n \c" -| "\a\(N,\n,\c);x\(M,\n,\c)\ \ \n,\c.M (x).N> = - Cut .(if \x. M=Ax x a then stn M \n else \n,\c) - (x).(if \a. N=Ax x a then stc N \c else \n,\c)" -| "x\(\n,\c) \ \n,\c = - (case (findc \c a) of - Some (u,P) \ fresh_fun (\a'. Cut .NotR (x).(\n,\c) a' (u).P) - | None \ NotR (x).(\n,\c) a)" -| "a\(\n,\c) \ \n,\c.M x> = - (case (findn \n x) of - Some (c,P) \ fresh_fun (\x'. Cut .P (x').(NotL .(\n,\c) x')) - | None \ NotL .(\n,\c) x)" -| "\a\(N,c,\n,\c);b\(M,c,\n,\c);b\a\ \ (\n,\c.M .N c>) = - (case (findc \c c) of - Some (x,P) \ fresh_fun (\a'. Cut .(AndR .(\n,\c) .(\n,\c) a') (x).P) - | None \ AndR .(\n,\c) .(\n,\c) c)" -| "x\(z,\n,\c) \ (\n,\c) = - (case (findn \n z) of - Some (c,P) \ fresh_fun (\z'. Cut .P (z').AndL1 (x).(\n,\c) z') - | None \ AndL1 (x).(\n,\c) z)" -| "x\(z,\n,\c) \ (\n,\c) = - (case (findn \n z) of - Some (c,P) \ fresh_fun (\z'. Cut .P (z').AndL2 (x).(\n,\c) z') - | None \ AndL2 (x).(\n,\c) z)" -| "\x\(N,z,\n,\c);u\(M,z,\n,\c);x\u\ \ (\n,\c) = - (case (findn \n z) of - Some (c,P) \ fresh_fun (\z'. Cut .P (z').OrL (x).(\n,\c) (u).(\n,\c) z') - | None \ OrL (x).(\n,\c) (u).(\n,\c) z)" -| "a\(b,\n,\c) \ (\n,\c.M b>) = - (case (findc \c b) of - Some (x,P) \ fresh_fun (\a'. Cut .OrR1 .(\n,\c) a' (x).P) - | None \ OrR1 .(\n,\c) b)" -| "a\(b,\n,\c) \ (\n,\c.M b>) = - (case (findc \c b) of - Some (x,P) \ fresh_fun (\a'. Cut .OrR2 .(\n,\c) a' (x).P) - | None \ OrR2 .(\n,\c) b)" -| "\a\(b,\n,\c); x\(\n,\c)\ \ (\n,\c.M b>) = - (case (findc \c b) of - Some (z,P) \ fresh_fun (\a'. Cut .ImpR (x)..(\n,\c) a' (z).P) - | None \ ImpR (x)..(\n,\c) b)" -| "\a\(N,\n,\c); x\(z,M,\n,\c)\ \ (\n,\c.M (x).N z>) = - (case (findn \n z) of - Some (c,P) \ fresh_fun (\z'. Cut .P (z').ImpL .(\n,\c) (x).(\n,\c) z') - | None \ ImpL .(\n,\c) (x).(\n,\c) z)" + "\_n,\_c = lookup x a \_n \_c" +| "\a\(N,\_n,\_c);x\(M,\_n,\_c)\ \ \_n,\_c.M (x).N> = + Cut .(if \x. M=Ax x a then stn M \_n else \_n,\_c) + (x).(if \a. N=Ax x a then stc N \_c else \_n,\_c)" +| "x\(\_n,\_c) \ \_n,\_c = + (case (findc \_c a) of + Some (u,P) \ fresh_fun (\a'. Cut .NotR (x).(\_n,\_c) a' (u).P) + | None \ NotR (x).(\_n,\_c) a)" +| "a\(\_n,\_c) \ \_n,\_c.M x> = + (case (findn \_n x) of + Some (c,P) \ fresh_fun (\x'. Cut .P (x').(NotL .(\_n,\_c) x')) + | None \ NotL .(\_n,\_c) x)" +| "\a\(N,c,\_n,\_c);b\(M,c,\_n,\_c);b\a\ \ (\_n,\_c.M .N c>) = + (case (findc \_c c) of + Some (x,P) \ fresh_fun (\a'. Cut .(AndR .(\_n,\_c) .(\_n,\_c) a') (x).P) + | None \ AndR .(\_n,\_c) .(\_n,\_c) c)" +| "x\(z,\_n,\_c) \ (\_n,\_c) = + (case (findn \_n z) of + Some (c,P) \ fresh_fun (\z'. Cut .P (z').AndL1 (x).(\_n,\_c) z') + | None \ AndL1 (x).(\_n,\_c) z)" +| "x\(z,\_n,\_c) \ (\_n,\_c) = + (case (findn \_n z) of + Some (c,P) \ fresh_fun (\z'. Cut .P (z').AndL2 (x).(\_n,\_c) z') + | None \ AndL2 (x).(\_n,\_c) z)" +| "\x\(N,z,\_n,\_c);u\(M,z,\_n,\_c);x\u\ \ (\_n,\_c) = + (case (findn \_n z) of + Some (c,P) \ fresh_fun (\z'. Cut .P (z').OrL (x).(\_n,\_c) (u).(\_n,\_c) z') + | None \ OrL (x).(\_n,\_c) (u).(\_n,\_c) z)" +| "a\(b,\_n,\_c) \ (\_n,\_c.M b>) = + (case (findc \_c b) of + Some (x,P) \ fresh_fun (\a'. Cut .OrR1 .(\_n,\_c) a' (x).P) + | None \ OrR1 .(\_n,\_c) b)" +| "a\(b,\_n,\_c) \ (\_n,\_c.M b>) = + (case (findc \_c b) of + Some (x,P) \ fresh_fun (\a'. Cut .OrR2 .(\_n,\_c) a' (x).P) + | None \ OrR2 .(\_n,\_c) b)" +| "\a\(b,\_n,\_c); x\(\_n,\_c)\ \ (\_n,\_c.M b>) = + (case (findc \_c b) of + Some (z,P) \ fresh_fun (\a'. Cut .ImpR (x)..(\_n,\_c) a' (z).P) + | None \ ImpR (x)..(\_n,\_c) b)" +| "\a\(N,\_n,\_c); x\(z,M,\_n,\_c)\ \ (\_n,\_c.M (x).N z>) = + (case (findn \_n z) of + Some (c,P) \ fresh_fun (\z'. Cut .P (z').ImpL .(\_n,\_c) (x).(\_n,\_c) z') + | None \ ImpL .(\_n,\_c) (x).(\_n,\_c) z)" apply(finite_guess)+ apply(rule TrueI)+ apply(simp add: abs_fresh stc_fresh) apply(simp add: abs_fresh stn_fresh) -apply(case_tac "findc \c x3") +apply(case_tac "findc \_c x3") apply(simp add: abs_fresh) apply(auto)[1] apply(generate_fresh "coname") @@ -3711,7 +3711,7 @@ apply(drule cmaps_fresh) apply(auto simp add: fresh_prod)[1] apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(case_tac "findn \n x3") +apply(case_tac "findn \_n x3") apply(simp add: abs_fresh) apply(auto)[1] apply(generate_fresh "name") @@ -3719,7 +3719,7 @@ apply(drule nmaps_fresh) apply(auto simp add: fresh_prod)[1] apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(case_tac "findc \c x5") +apply(case_tac "findc \_c x5") apply(simp add: abs_fresh) apply(auto)[1] apply(generate_fresh "coname") @@ -3727,7 +3727,7 @@ apply(drule cmaps_fresh) apply(auto simp add: fresh_prod)[1] apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(case_tac "findc \c x5") +apply(case_tac "findc \_c x5") apply(simp add: abs_fresh) apply(auto)[1] apply(generate_fresh "coname") @@ -3735,7 +3735,7 @@ apply(drule_tac x="x3" in cmaps_fresh) apply(auto simp add: fresh_prod)[1] apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(case_tac "findn \n x3") +apply(case_tac "findn \_n x3") apply(simp add: abs_fresh) apply(auto)[1] apply(generate_fresh "name") @@ -3743,7 +3743,7 @@ apply(drule nmaps_fresh) apply(auto simp add: fresh_prod)[1] apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(case_tac "findn \n x3") +apply(case_tac "findn \_n x3") apply(simp add: abs_fresh) apply(auto)[1] apply(generate_fresh "name") @@ -3751,7 +3751,7 @@ apply(drule nmaps_fresh) apply(auto simp add: fresh_prod)[1] apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(case_tac "findc \c x3") +apply(case_tac "findc \_c x3") apply(simp add: abs_fresh) apply(auto)[1] apply(generate_fresh "coname") @@ -3759,7 +3759,7 @@ apply(drule cmaps_fresh) apply(auto simp add: fresh_prod)[1] apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(case_tac "findc \c x3") +apply(case_tac "findc \_c x3") apply(simp add: abs_fresh) apply(auto)[1] apply(generate_fresh "coname") @@ -3767,7 +3767,7 @@ apply(drule cmaps_fresh) apply(auto simp add: fresh_prod)[1] apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(case_tac "findn \n x5") +apply(case_tac "findn \_n x5") apply(simp add: abs_fresh) apply(auto)[1] apply(generate_fresh "name") @@ -3775,7 +3775,7 @@ apply(drule nmaps_fresh) apply(auto simp add: fresh_prod)[1] apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(case_tac "findn \n x5") +apply(case_tac "findn \_n x5") apply(simp add: abs_fresh) apply(auto)[1] apply(generate_fresh "name") @@ -3783,7 +3783,7 @@ apply(drule_tac a="x3" in nmaps_fresh) apply(auto simp add: fresh_prod)[1] apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(case_tac "findc \c x4") +apply(case_tac "findc \_c x4") apply(simp add: abs_fresh abs_supp fin_supp) apply(auto)[1] apply(generate_fresh "coname") @@ -3791,7 +3791,7 @@ apply(drule cmaps_fresh) apply(auto simp add: fresh_prod)[1] apply(simp add: abs_fresh fresh_prod fresh_atm abs_supp fin_supp) -apply(case_tac "findc \c x4") +apply(case_tac "findc \_c x4") apply(simp add: abs_fresh abs_supp fin_supp) apply(auto)[1] apply(generate_fresh "coname") @@ -3799,7 +3799,7 @@ apply(drule_tac x="x2" in cmaps_fresh) apply(auto simp add: fresh_prod)[1] apply(simp add: abs_fresh fresh_prod fresh_atm abs_supp fin_supp) -apply(case_tac "findn \n x5") +apply(case_tac "findn \_n x5") apply(simp add: abs_fresh) apply(auto)[1] apply(generate_fresh "name") @@ -3807,7 +3807,7 @@ apply(drule nmaps_fresh) apply(auto simp add: fresh_prod)[1] apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(case_tac "findn \n x5") +apply(case_tac "findn \_n x5") apply(simp add: abs_fresh) apply(auto)[1] apply(generate_fresh "name") @@ -3826,17 +3826,17 @@ done lemma find_maps: - shows "\c cmaps a to (findc \c a)" - and "\n nmaps x to (findn \n x)" + shows "\_c cmaps a to (findc \_c a)" + and "\_n nmaps x to (findn \_n x)" apply(auto) done lemma psubst_eqvt[eqvt]: fixes pi1::"name prm" and pi2::"coname prm" - shows "pi1\(\n,\c) = (pi1\\n),(pi1\\c)<(pi1\M)>" - and "pi2\(\n,\c) = (pi2\\n),(pi2\\c)<(pi2\M)>" -apply(nominal_induct M avoiding: \n \c rule: trm.strong_induct) + shows "pi1\(\_n,\_c) = (pi1\\_n),(pi1\\_c)<(pi1\M)>" + and "pi2\(\_n,\_c) = (pi2\\_n),(pi2\\_c)<(pi2\M)>" +apply(nominal_induct M avoiding: \_n \_c rule: trm.strong_induct) apply(auto simp add: eq_bij fresh_bij eqvts perm_pi_simp) apply(rule case_cong) apply(rule find_maps) @@ -3921,69 +3921,69 @@ done lemma ax_psubst: - assumes a: "\n,\c = Ax x a" - and b: "a\(\n,\c)" "x\(\n,\c)" + assumes a: "\_n,\_c = Ax x a" + and b: "a\(\_n,\_c)" "x\(\_n,\_c)" shows "M = Ax x a" using a b -apply(nominal_induct M avoiding: \n \c rule: trm.strong_induct) +apply(nominal_induct M avoiding: \_n \_c rule: trm.strong_induct) apply(auto) apply(drule lookup_unicity) apply(simp)+ -apply(case_tac "findc \c coname") +apply(case_tac "findc \_c coname") apply(simp) apply(auto)[1] apply(generate_fresh "coname") apply(fresh_fun_simp) apply(simp) -apply(case_tac "findn \n name") +apply(case_tac "findn \_n name") apply(simp) apply(auto)[1] apply(generate_fresh "name") apply(fresh_fun_simp) apply(simp) -apply(case_tac "findc \c coname3") +apply(case_tac "findc \_c coname3") apply(simp) apply(auto)[1] apply(generate_fresh "coname") apply(fresh_fun_simp) apply(simp) -apply(case_tac "findn \n name2") +apply(case_tac "findn \_n name2") apply(simp) apply(auto)[1] apply(generate_fresh "name") apply(fresh_fun_simp) apply(simp) -apply(case_tac "findn \n name2") +apply(case_tac "findn \_n name2") apply(simp) apply(auto)[1] apply(generate_fresh "name") apply(fresh_fun_simp) apply(simp) -apply(case_tac "findc \c coname2") +apply(case_tac "findc \_c coname2") apply(simp) apply(auto)[1] apply(generate_fresh "coname") apply(fresh_fun_simp) apply(simp) -apply(case_tac "findc \c coname2") +apply(case_tac "findc \_c coname2") apply(simp) apply(auto)[1] apply(generate_fresh "coname") apply(fresh_fun_simp) apply(simp) -apply(case_tac "findn \n name3") +apply(case_tac "findn \_n name3") apply(simp) apply(auto)[1] apply(generate_fresh "name") apply(fresh_fun_simp) apply(simp) -apply(case_tac "findc \c coname2") +apply(case_tac "findc \_c coname2") apply(simp) apply(auto)[1] apply(generate_fresh "coname") apply(fresh_fun_simp) apply(simp) -apply(case_tac "findn \n name2") +apply(case_tac "findn \_n name2") apply(simp) apply(auto)[1] apply(generate_fresh "name") @@ -4113,10 +4113,10 @@ lemma psubst_fresh_name: fixes x::"name" - assumes a: "x\\n" "x\\c" "x\M" - shows "x\\n,\c" + assumes a: "x\\_n" "x\\_c" "x\M" + shows "x\\_n,\_c" using a -apply(nominal_induct M avoiding: x \n \c rule: trm.strong_induct) +apply(nominal_induct M avoiding: x \_n \_c rule: trm.strong_induct) apply(simp add: lookup_freshness) apply(auto simp add: abs_fresh)[1] apply(simp add: lookupc_freshness) @@ -4126,70 +4126,70 @@ apply(simp add: lookupd_freshness) apply(simp add: lookupc_freshness) apply(simp) -apply(case_tac "findc \c coname") +apply(case_tac "findc \_c coname") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "coname") apply(fresh_fun_simp) apply(simp add: abs_fresh fresh_prod fresh_atm cmaps_fresh) apply(simp) -apply(case_tac "findn \n name") +apply(case_tac "findn \_n name") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "name") apply(fresh_fun_simp) apply(simp add: abs_fresh fresh_prod fresh_atm nmaps_fresh) apply(simp) -apply(case_tac "findc \c coname3") +apply(case_tac "findc \_c coname3") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "coname") apply(fresh_fun_simp) apply(simp add: abs_fresh fresh_prod fresh_atm cmaps_fresh) apply(simp) -apply(case_tac "findn \n name2") +apply(case_tac "findn \_n name2") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "name") apply(fresh_fun_simp) apply(simp add: abs_fresh fresh_prod fresh_atm nmaps_fresh) apply(simp) -apply(case_tac "findn \n name2") +apply(case_tac "findn \_n name2") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "name") apply(fresh_fun_simp) apply(simp add: abs_fresh fresh_prod fresh_atm nmaps_fresh) apply(simp) -apply(case_tac "findc \c coname2") +apply(case_tac "findc \_c coname2") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "coname") apply(fresh_fun_simp) apply(simp add: abs_fresh fresh_prod fresh_atm cmaps_fresh) apply(simp) -apply(case_tac "findc \c coname2") +apply(case_tac "findc \_c coname2") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "coname") apply(fresh_fun_simp) apply(simp add: abs_fresh fresh_prod fresh_atm cmaps_fresh) apply(simp) -apply(case_tac "findn \n name3") +apply(case_tac "findn \_n name3") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "name") apply(fresh_fun_simp) apply(simp add: abs_fresh fresh_prod fresh_atm nmaps_fresh) apply(simp) -apply(case_tac "findc \c coname2") +apply(case_tac "findc \_c coname2") apply(auto simp add: abs_fresh abs_supp fin_supp)[1] apply(auto)[1] apply(generate_fresh "coname") apply(fresh_fun_simp) apply(simp add: abs_fresh abs_supp fin_supp fresh_prod fresh_atm cmaps_fresh) apply(simp) -apply(case_tac "findn \n name2") +apply(case_tac "findn \_n name2") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "name") @@ -4199,10 +4199,10 @@ lemma psubst_fresh_coname: fixes a::"coname" - assumes a: "a\\n" "a\\c" "a\M" - shows "a\\n,\c" + assumes a: "a\\_n" "a\\_c" "a\M" + shows "a\\_n,\_c" using a -apply(nominal_induct M avoiding: a \n \c rule: trm.strong_induct) +apply(nominal_induct M avoiding: a \_n \_c rule: trm.strong_induct) apply(simp add: lookup_freshness) apply(auto simp add: abs_fresh)[1] apply(simp add: lookupd_freshness) @@ -4212,70 +4212,70 @@ apply(simp add: lookupc_freshness) apply(simp add: lookupd_freshness) apply(simp) -apply(case_tac "findc \c coname") +apply(case_tac "findc \_c coname") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "coname") apply(fresh_fun_simp) apply(simp add: abs_fresh fresh_prod fresh_atm cmaps_fresh) apply(simp) -apply(case_tac "findn \n name") +apply(case_tac "findn \_n name") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "name") apply(fresh_fun_simp) apply(simp add: abs_fresh fresh_prod fresh_atm nmaps_fresh) apply(simp) -apply(case_tac "findc \c coname3") +apply(case_tac "findc \_c coname3") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "coname") apply(fresh_fun_simp) apply(simp add: abs_fresh fresh_prod fresh_atm cmaps_fresh) apply(simp) -apply(case_tac "findn \n name2") +apply(case_tac "findn \_n name2") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "name") apply(fresh_fun_simp) apply(simp add: abs_fresh fresh_prod fresh_atm nmaps_fresh) apply(simp) -apply(case_tac "findn \n name2") +apply(case_tac "findn \_n name2") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "name") apply(fresh_fun_simp) apply(simp add: abs_fresh fresh_prod fresh_atm nmaps_fresh) apply(simp) -apply(case_tac "findc \c coname2") +apply(case_tac "findc \_c coname2") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "coname") apply(fresh_fun_simp) apply(simp add: abs_fresh fresh_prod fresh_atm cmaps_fresh) apply(simp) -apply(case_tac "findc \c coname2") +apply(case_tac "findc \_c coname2") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "coname") apply(fresh_fun_simp) apply(simp add: abs_fresh fresh_prod fresh_atm cmaps_fresh) apply(simp) -apply(case_tac "findn \n name3") +apply(case_tac "findn \_n name3") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "name") apply(fresh_fun_simp) apply(simp add: abs_fresh fresh_prod fresh_atm nmaps_fresh) apply(simp) -apply(case_tac "findc \c coname2") +apply(case_tac "findc \_c coname2") apply(auto simp add: abs_fresh abs_supp fin_supp)[1] apply(auto)[1] apply(generate_fresh "coname") apply(fresh_fun_simp) apply(simp add: abs_fresh abs_supp fin_supp fresh_prod fresh_atm cmaps_fresh) apply(simp) -apply(case_tac "findn \n name2") +apply(case_tac "findn \_n name2") apply(auto simp add: abs_fresh)[1] apply(auto)[1] apply(generate_fresh "name") @@ -4284,10 +4284,10 @@ done lemma psubst_csubst: - assumes a: "a\(\n,\c)" - shows "\n,((a,x,P)#\c) = ((\n,\c){a:=(x).P})" + assumes a: "a\(\_n,\_c)" + shows "\_n,((a,x,P)#\_c) = ((\_n,\_c){a:=(x).P})" using a -apply(nominal_induct M avoiding: a x \n \c P rule: trm.strong_induct) +apply(nominal_induct M avoiding: a x \_n \_c P rule: trm.strong_induct) apply(auto simp add: fresh_list_cons fresh_prod)[1] apply(simp add: lookup_csubst) apply(simp add: fresh_list_cons fresh_prod) @@ -4298,7 +4298,7 @@ apply(simp) apply(simp add: abs_fresh fresh_atm) apply(simp add: lookupd_fresh) -apply(subgoal_tac "a\lookupc xa coname \n") +apply(subgoal_tac "a\lookupc xa coname \_n") apply(simp add: forget) apply(simp add: trm.inject) apply(rule sym) @@ -4315,8 +4315,8 @@ apply(rule impI) apply(simp add: lookupd_unicity) apply(rule impI) -apply(subgoal_tac "a\lookupc xa coname \n") -apply(subgoal_tac "a\lookupd name aa \c") +apply(subgoal_tac "a\lookupc xa coname \_n") +apply(subgoal_tac "a\lookupd name aa \_c") apply(simp add: forget) apply(rule lookupd_freshness) apply(simp add: fresh_atm) @@ -4335,7 +4335,7 @@ apply(simp) apply(blast) apply(rule impI) -apply(subgoal_tac "a\lookupc xa coname \n") +apply(subgoal_tac "a\lookupc xa coname \_n") apply(simp add: forget) apply(rule lookupc_freshness) apply(simp add: fresh_atm) @@ -4362,7 +4362,7 @@ apply(rule impI) apply(simp add: lookupd_unicity) apply(rule impI) -apply(subgoal_tac "a\lookupd name aa \c") +apply(subgoal_tac "a\lookupd name aa \_c") apply(simp add: forget) apply(rule lookupd_freshness) apply(simp add: fresh_atm) @@ -4379,7 +4379,7 @@ apply(blast) (* NotR *) apply(simp) -apply(case_tac "findc \c coname") +apply(case_tac "findc \_c coname") apply(simp) apply(auto simp add: fresh_list_cons fresh_prod)[1] apply(simp) @@ -4398,7 +4398,7 @@ apply(auto simp add: fresh_prod fresh_atm)[1] (* NotL *) apply(simp) -apply(case_tac "findn \n name") +apply(case_tac "findn \_n name") apply(simp) apply(auto simp add: fresh_list_cons fresh_prod)[1] apply(simp) @@ -4417,7 +4417,7 @@ apply(simp) (* AndR *) apply(simp) -apply(case_tac "findc \c coname3") +apply(case_tac "findc \_c coname3") apply(simp) apply(auto simp add: psubst_fresh_coname fresh_list_cons fresh_prod fresh_atm)[1] apply(simp) @@ -4436,7 +4436,7 @@ apply(auto simp add: psubst_fresh_coname fresh_prod fresh_atm)[1] (* AndL1 *) apply(simp) -apply(case_tac "findn \n name2") +apply(case_tac "findn \_n name2") apply(simp) apply(auto simp add: fresh_list_cons fresh_prod)[1] apply(simp) @@ -4455,7 +4455,7 @@ apply(auto simp add: psubst_fresh_coname fresh_prod fresh_atm)[1] (* AndL2 *) apply(simp) -apply(case_tac "findn \n name2") +apply(case_tac "findn \_n name2") apply(simp) apply(auto simp add: fresh_list_cons fresh_prod)[1] apply(simp) @@ -4474,7 +4474,7 @@ apply(auto simp add: psubst_fresh_coname fresh_prod fresh_atm)[1] (* OrR1 *) apply(simp) -apply(case_tac "findc \c coname2") +apply(case_tac "findc \_c coname2") apply(simp) apply(auto simp add: psubst_fresh_coname fresh_list_cons fresh_prod fresh_atm)[1] apply(simp) @@ -4493,7 +4493,7 @@ apply(auto simp add: psubst_fresh_coname fresh_prod fresh_atm)[1] (* OrR2 *) apply(simp) -apply(case_tac "findc \c coname2") +apply(case_tac "findc \_c coname2") apply(simp) apply(auto simp add: psubst_fresh_coname fresh_list_cons fresh_prod fresh_atm)[1] apply(simp) @@ -4512,7 +4512,7 @@ apply(auto simp add: psubst_fresh_coname fresh_prod fresh_atm)[1] (* OrL *) apply(simp) -apply(case_tac "findn \n name3") +apply(case_tac "findn \_n name3") apply(simp) apply(auto simp add: fresh_list_cons psubst_fresh_name fresh_atm fresh_prod)[1] apply(simp) @@ -4531,7 +4531,7 @@ apply(auto simp add: psubst_fresh_name fresh_prod fresh_atm)[1] (* ImpR *) apply(simp) -apply(case_tac "findc \c coname2") +apply(case_tac "findc \_c coname2") apply(simp) apply(auto simp add: psubst_fresh_coname fresh_list_cons fresh_prod fresh_atm)[1] apply(simp) @@ -4550,7 +4550,7 @@ apply(auto simp add: psubst_fresh_coname fresh_prod fresh_atm)[1] (* ImpL *) apply(simp) -apply(case_tac "findn \n name2") +apply(case_tac "findn \_n name2") apply(simp) apply(auto simp add: fresh_list_cons psubst_fresh_coname psubst_fresh_name fresh_atm fresh_prod)[1] apply(simp) @@ -4571,10 +4571,10 @@ done lemma psubst_nsubst: - assumes a: "x\(\n,\c)" - shows "((x,a,P)#\n),\c = ((\n,\c){x:=.P})" + assumes a: "x\(\_n,\_c)" + shows "((x,a,P)#\_n),\_c = ((\_n,\_c){x:=.P})" using a -apply(nominal_induct M avoiding: a x \n \c P rule: trm.strong_induct) +apply(nominal_induct M avoiding: a x \_n \_c P rule: trm.strong_induct) apply(auto simp add: fresh_list_cons fresh_prod)[1] apply(simp add: lookup_fresh) apply(rule lookupb_lookupa) @@ -4591,7 +4591,7 @@ apply(simp add: abs_fresh) apply(simp add: abs_fresh fresh_atm) apply(simp add: lookupd_fresh) -apply(subgoal_tac "x\lookupd name aa \c") +apply(subgoal_tac "x\lookupd name aa \_c") apply(simp add: forget) apply(simp add: trm.inject) apply(rule sym) @@ -4608,8 +4608,8 @@ apply(rule impI) apply(simp add: lookupc_unicity) apply(rule impI) -apply(subgoal_tac "x\lookupc xa coname \n") -apply(subgoal_tac "x\lookupd name aa \c") +apply(subgoal_tac "x\lookupc xa coname \_n") +apply(subgoal_tac "x\lookupd name aa \_c") apply(simp add: forget) apply(rule lookupd_freshness) apply(simp add: fresh_atm) @@ -4638,7 +4638,7 @@ apply(rule impI) apply(simp add: lookupc_unicity) apply(rule impI) -apply(subgoal_tac "x\lookupc xa coname \n") +apply(subgoal_tac "x\lookupc xa coname \_n") apply(simp add: forget) apply(rule lookupc_freshness) apply(simp add: fresh_prod fresh_atm) @@ -4656,7 +4656,7 @@ apply(simp) apply(blast) apply(rule impI) -apply(subgoal_tac "x\lookupd name aa \c") +apply(subgoal_tac "x\lookupd name aa \_c") apply(simp add: forget) apply(rule lookupd_freshness) apply(simp add: fresh_atm) @@ -4673,7 +4673,7 @@ apply(blast) (* NotR *) apply(simp) -apply(case_tac "findc \c coname") +apply(case_tac "findc \_c coname") apply(simp) apply(auto simp add: fresh_list_cons fresh_prod)[1] apply(simp) @@ -4690,7 +4690,7 @@ apply(simp) (* NotL *) apply(simp) -apply(case_tac "findn \n name") +apply(case_tac "findn \_n name") apply(simp) apply(auto simp add: fresh_list_cons fresh_prod)[1] apply(simp) @@ -4709,7 +4709,7 @@ apply(simp add: fresh_prod fresh_atm) (* AndR *) apply(simp) -apply(case_tac "findc \c coname3") +apply(case_tac "findc \_c coname3") apply(simp) apply(auto simp add: psubst_fresh_coname fresh_list_cons fresh_prod fresh_atm)[1] apply(simp) @@ -4726,7 +4726,7 @@ apply(auto simp add: psubst_fresh_coname fresh_prod fresh_atm)[1] (* AndL1 *) apply(simp) -apply(case_tac "findn \n name2") +apply(case_tac "findn \_n name2") apply(simp) apply(auto simp add: fresh_list_cons fresh_prod)[1] apply(simp) @@ -4745,7 +4745,7 @@ apply(auto simp add: psubst_fresh_coname fresh_prod fresh_atm)[1] (* AndL2 *) apply(simp) -apply(case_tac "findn \n name2") +apply(case_tac "findn \_n name2") apply(simp) apply(auto simp add: fresh_list_cons fresh_prod)[1] apply(simp) @@ -4764,7 +4764,7 @@ apply(auto simp add: psubst_fresh_coname fresh_prod fresh_atm)[1] (* OrR1 *) apply(simp) -apply(case_tac "findc \c coname2") +apply(case_tac "findc \_c coname2") apply(simp) apply(auto simp add: psubst_fresh_coname fresh_list_cons fresh_prod fresh_atm)[1] apply(simp) @@ -4781,7 +4781,7 @@ apply(auto simp add: psubst_fresh_coname fresh_prod fresh_atm)[1] (* OrR2 *) apply(simp) -apply(case_tac "findc \c coname2") +apply(case_tac "findc \_c coname2") apply(simp) apply(auto simp add: psubst_fresh_coname fresh_list_cons fresh_prod fresh_atm)[1] apply(simp) @@ -4798,7 +4798,7 @@ apply(auto simp add: psubst_fresh_coname fresh_prod fresh_atm)[1] (* OrL *) apply(simp) -apply(case_tac "findn \n name3") +apply(case_tac "findn \_n name3") apply(simp) apply(auto simp add: fresh_list_cons psubst_fresh_name fresh_atm fresh_prod)[1] apply(simp) @@ -4817,7 +4817,7 @@ apply(auto simp add: psubst_fresh_name fresh_prod fresh_atm)[1] (* ImpR *) apply(simp) -apply(case_tac "findc \c coname2") +apply(case_tac "findc \_c coname2") apply(simp) apply(auto simp add: psubst_fresh_coname fresh_list_cons fresh_prod fresh_atm)[1] apply(simp) @@ -4834,7 +4834,7 @@ apply(auto simp add: psubst_fresh_coname fresh_prod fresh_atm)[1] (* ImpL *) apply(simp) -apply(case_tac "findn \n name2") +apply(case_tac "findn \_n name2") apply(simp) apply(auto simp add: fresh_list_cons psubst_fresh_coname psubst_fresh_name fresh_atm fresh_prod)[1] apply(simp) @@ -4856,35 +4856,35 @@ definition ncloses :: "(name\coname\trm) list\(name\ty) list \ bool" ("_ ncloses _" [55,55] 55) where - "\n ncloses \ \ \x B. ((x,B) \ set \ \ (\c P. \n nmaps x to Some (c,P) \ :P \ (\\)))" + "\_n ncloses \ \ \x B. ((x,B) \ set \ \ (\c P. \_n nmaps x to Some (c,P) \ :P \ (\\)))" definition ccloses :: "(coname\name\trm) list\(coname\ty) list \ bool" ("_ ccloses _" [55,55] 55) where - "\c ccloses \ \ \a B. ((a,B) \ set \ \ (\x P. \c cmaps a to Some (x,P) \ (x):P \ (\(B)\)))" + "\_c ccloses \ \ \a B. ((a,B) \ set \ \ (\x P. \_c cmaps a to Some (x,P) \ (x):P \ (\(B)\)))" lemma ncloses_elim: assumes a: "(x,B) \ set \" - and b: "\n ncloses \" - shows "\c P. \n nmaps x to Some (c,P) \ :P \ (\\)" + and b: "\_n ncloses \" + shows "\c P. \_n nmaps x to Some (c,P) \ :P \ (\\)" using a b by (auto simp add: ncloses_def) lemma ccloses_elim: assumes a: "(a,B) \ set \" - and b: "\c ccloses \" - shows "\x P. \c cmaps a to Some (x,P) \ (x):P \ (\(B)\)" + and b: "\_c ccloses \" + shows "\x P. \_c cmaps a to Some (x,P) \ (x):P \ (\(B)\)" using a b by (auto simp add: ccloses_def) lemma ncloses_subset: - assumes a: "\n ncloses \" + assumes a: "\_n ncloses \" and b: "set \' \ set \" - shows "\n ncloses \'" + shows "\_n ncloses \'" using a b by (auto simp add: ncloses_def) lemma ccloses_subset: - assumes a: "\c ccloses \" + assumes a: "\_c ccloses \" and b: "set \' \ set \" - shows "\c ccloses \'" + shows "\_c ccloses \'" using a b by (auto simp add: ccloses_def) lemma validc_fresh: @@ -4908,8 +4908,8 @@ done lemma ccloses_extend: - assumes a: "\c ccloses \" "a\\" "a\\c" "(x):P\\(B)\" - shows "(a,x,P)#\c ccloses (a,B)#\" + assumes a: "\_c ccloses \" "a\\" "a\\_c" "(x):P\\(B)\" + shows "(a,x,P)#\_c ccloses (a,B)#\" using a apply(simp add: ccloses_def) apply(drule validc_fresh) @@ -4917,8 +4917,8 @@ done lemma ncloses_extend: - assumes a: "\n ncloses \" "x\\" "x\\n" ":P\\\" - shows "(x,a,P)#\n ncloses (x,B)#\" + assumes a: "\_n ncloses \" "x\\" "x\\_n" ":P\\\" + shows "(x,a,P)#\_n ncloses (x,B)#\" using a apply(simp add: ncloses_def) apply(drule validn_fresh) @@ -5082,39 +5082,39 @@ done lemma psubst_Ax_aux: - assumes a: "\c cmaps a to Some (y,N)" - shows "lookupb x a \c c P = Cut .P (y).N" + assumes a: "\_c cmaps a to Some (y,N)" + shows "lookupb x a \_c c P = Cut .P (y).N" using a -apply(induct \c) +apply(induct \_c) apply(auto) done lemma psubst_Ax: - assumes a: "\n nmaps x to Some (c,P)" - and b: "\c cmaps a to Some (y,N)" - shows "\n,\c = Cut .P (y).N" + assumes a: "\_n nmaps x to Some (c,P)" + and b: "\_c cmaps a to Some (y,N)" + shows "\_n,\_c = Cut .P (y).N" using a b -apply(induct \n) +apply(induct \_n) apply(auto simp add: psubst_Ax_aux) done lemma psubst_Cut: assumes a: "\x. M\Ax x c" and b: "\a. N\Ax x a" - and c: "c\(\n,\c,N)" "x\(\n,\c,M)" - shows "\n,\c.M (x).N> = Cut .(\n,\c) (x).(\n,\c)" + and c: "c\(\_n,\_c,N)" "x\(\_n,\_c,M)" + shows "\_n,\_c.M (x).N> = Cut .(\_n,\_c) (x).(\_n,\_c)" using a b c apply(simp) done lemma all_CAND: assumes a: "\ \ M \ \" - and b: "\n ncloses \" - and c: "\c ccloses \" - shows "SNa (\n,\c)" + and b: "\_n ncloses \" + and c: "\_c ccloses \" + shows "SNa (\_n,\_c)" using a b c -proof(nominal_induct avoiding: \n \c rule: typing.strong_induct) - case (TAx \ \ x B a \n \c) +proof(nominal_induct avoiding: \_n \_c rule: typing.strong_induct) + case (TAx \ \ x B a \_n \_c) then show ?case apply - apply(drule ncloses_elim) @@ -5123,13 +5123,13 @@ apply(assumption) apply(erule exE)+ apply(erule conjE)+ - apply(rule_tac s="Cut .P (xa).Pa" and t="\n,\c" in subst) + apply(rule_tac s="Cut .P (xa).Pa" and t="\_n,\_c" in subst) apply(rule sym) apply(simp only: psubst_Ax) apply(simp add: CUT_SNa) done next - case (TNotR x \ B M \ \' a \n \c) + case (TNotR x \ B M \ \' a \_n \_c) then show ?case apply(simp) apply(subgoal_tac "(a,NOT B) \ set \'") @@ -5145,7 +5145,7 @@ apply(rule disjI2) apply(rule_tac x="c" in exI) apply(rule_tac x="x" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp) apply(rule conjI) apply(rule fic.intros) @@ -5157,13 +5157,13 @@ apply(unfold BINDINGn_def) apply(simp) apply(rule_tac x="x" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp) apply(rule allI)+ apply(rule impI) apply(simp add: psubst_nsubst[symmetric]) - apply(drule_tac x="(x,aa,Pa)#\n" in meta_spec) - apply(drule_tac x="\c" in meta_spec) + apply(drule_tac x="(x,aa,Pa)#\_n" in meta_spec) + apply(drule_tac x="\_c" in meta_spec) apply(drule meta_mp) apply(rule ncloses_extend) apply(assumption) @@ -5179,7 +5179,7 @@ apply(blast) done next - case (TNotL a \ \ M B \' x \n \c) + case (TNotL a \ \ M B \' x \_n \_c) then show ?case apply(simp) apply(subgoal_tac "(x,NOT B) \ set \'") @@ -5197,7 +5197,7 @@ apply(rule disjI2) apply(rule_tac x="a" in exI) apply(rule_tac x="ca" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp del: NEGc.simps) apply(rule conjI) apply(rule fin.intros) @@ -5209,13 +5209,13 @@ apply(unfold BINDINGc_def) apply(simp (no_asm)) apply(rule_tac x="a" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp (no_asm)) apply(rule allI)+ apply(rule impI) apply(simp del: NEGc.simps add: psubst_csubst[symmetric]) - apply(drule_tac x="\n" in meta_spec) - apply(drule_tac x="(a,xa,Pa)#\c" in meta_spec) + apply(drule_tac x="\_n" in meta_spec) + apply(drule_tac x="(a,xa,Pa)#\_c" in meta_spec) apply(drule meta_mp) apply(rule ncloses_subset) apply(assumption) @@ -5230,7 +5230,7 @@ apply(blast) done next - case (TAndL1 x \ y B1 M \ \' B2 \n \c) + case (TAndL1 x \ y B1 M \ \' B2 \_n \_c) then show ?case apply(simp) apply(subgoal_tac "(y,B1 AND B2) \ set \'") @@ -5249,7 +5249,7 @@ apply(rule disjI1) apply(rule_tac x="x" in exI) apply(rule_tac x="ca" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp del: NEGc.simps) apply(rule conjI) apply(rule fin.intros) @@ -5262,13 +5262,13 @@ apply(unfold BINDINGn_def) apply(simp (no_asm)) apply(rule_tac x="x" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp (no_asm)) apply(rule allI)+ apply(rule impI) apply(simp del: NEGc.simps add: psubst_nsubst[symmetric]) - apply(drule_tac x="(x,a,Pa)#\n" in meta_spec) - apply(drule_tac x="\c" in meta_spec) + apply(drule_tac x="(x,a,Pa)#\_n" in meta_spec) + apply(drule_tac x="\_c" in meta_spec) apply(drule meta_mp) apply(rule ncloses_extend) apply(rule ncloses_subset) @@ -5283,7 +5283,7 @@ apply(blast) done next - case (TAndL2 x \ y B2 M \ \' B1 \n \c) + case (TAndL2 x \ y B2 M \ \' B1 \_n \_c) then show ?case apply(simp) apply(subgoal_tac "(y,B1 AND B2) \ set \'") @@ -5302,7 +5302,7 @@ apply(rule disjI2) apply(rule_tac x="x" in exI) apply(rule_tac x="ca" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp del: NEGc.simps) apply(rule conjI) apply(rule fin.intros) @@ -5315,13 +5315,13 @@ apply(unfold BINDINGn_def) apply(simp (no_asm)) apply(rule_tac x="x" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp (no_asm)) apply(rule allI)+ apply(rule impI) apply(simp del: NEGc.simps add: psubst_nsubst[symmetric]) - apply(drule_tac x="(x,a,Pa)#\n" in meta_spec) - apply(drule_tac x="\c" in meta_spec) + apply(drule_tac x="(x,a,Pa)#\_n" in meta_spec) + apply(drule_tac x="\_c" in meta_spec) apply(drule meta_mp) apply(rule ncloses_extend) apply(rule ncloses_subset) @@ -5336,7 +5336,7 @@ apply(blast) done next - case (TAndR a \ N c b M \ B C \' \n \c) + case (TAndR a \ N c b M \ B C \' \_n \_c) then show ?case apply(simp) apply(subgoal_tac "(c,B AND C) \ set \'") @@ -5353,8 +5353,8 @@ apply(rule_tac x="ca" in exI) apply(rule_tac x="a" in exI) apply(rule_tac x="b" in exI) - apply(rule_tac x="\n,\c" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp) apply(rule conjI) apply(rule fic.intros) @@ -5373,13 +5373,13 @@ apply(unfold BINDINGc_def) apply(simp) apply(rule_tac x="a" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp) apply(rule allI)+ apply(rule impI) apply(simp add: psubst_csubst[symmetric]) - apply(drule_tac x="\n" in meta_spec) - apply(drule_tac x="(a,xa,Pa)#\c" in meta_spec) + apply(drule_tac x="\_n" in meta_spec) + apply(drule_tac x="(a,xa,Pa)#\_c" in meta_spec) apply(drule meta_mp) apply(assumption) apply(drule meta_mp) @@ -5395,14 +5395,14 @@ apply(unfold BINDINGc_def) apply(simp) apply(rule_tac x="b" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp) apply(rule allI)+ apply(rule impI) apply(simp add: psubst_csubst[symmetric]) apply(rotate_tac 14) - apply(drule_tac x="\n" in meta_spec) - apply(drule_tac x="(b,xa,Pa)#\c" in meta_spec) + apply(drule_tac x="\_n" in meta_spec) + apply(drule_tac x="(b,xa,Pa)#\_c" in meta_spec) apply(drule meta_mp) apply(assumption) apply(drule meta_mp) @@ -5418,7 +5418,7 @@ apply(blast) done next - case (TOrL x \ N z y M B \ C \' \n \c) + case (TOrL x \ N z y M B \ C \' \_n \_c) then show ?case apply(simp) apply(subgoal_tac "(z,B OR C) \ set \'") @@ -5437,8 +5437,8 @@ apply(rule_tac x="x" in exI) apply(rule_tac x="y" in exI) apply(rule_tac x="ca" in exI) - apply(rule_tac x="\n,\c" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp del: NEGc.simps) apply(rule conjI) apply(rule fin.intros) @@ -5457,13 +5457,13 @@ apply(unfold BINDINGn_def) apply(simp del: NEGc.simps) apply(rule_tac x="x" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp del: NEGc.simps) apply(rule allI)+ apply(rule impI) apply(simp del: NEGc.simps add: psubst_nsubst[symmetric]) - apply(drule_tac x="(x,a,Pa)#\n" in meta_spec) - apply(drule_tac x="\c" in meta_spec) + apply(drule_tac x="(x,a,Pa)#\_n" in meta_spec) + apply(drule_tac x="\_c" in meta_spec) apply(drule meta_mp) apply(rule ncloses_extend) apply(rule ncloses_subset) @@ -5479,14 +5479,14 @@ apply(unfold BINDINGn_def) apply(simp del: NEGc.simps) apply(rule_tac x="y" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp del: NEGc.simps) apply(rule allI)+ apply(rule impI) apply(simp del: NEGc.simps add: psubst_nsubst[symmetric]) apply(rotate_tac 14) - apply(drule_tac x="(y,a,Pa)#\n" in meta_spec) - apply(drule_tac x="\c" in meta_spec) + apply(drule_tac x="(y,a,Pa)#\_n" in meta_spec) + apply(drule_tac x="\_c" in meta_spec) apply(drule meta_mp) apply(rule ncloses_extend) apply(rule ncloses_subset) @@ -5501,7 +5501,7 @@ apply(blast) done next - case (TOrR1 a \ b \ M B1 \' B2 \n \c) + case (TOrR1 a \ b \ M B1 \' B2 \_n \_c) then show ?case apply(simp) apply(subgoal_tac "(b,B1 OR B2) \ set \'") @@ -5518,7 +5518,7 @@ apply(rule disjI1) apply(rule_tac x="a" in exI) apply(rule_tac x="c" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp) apply(rule conjI) apply(rule fic.intros) @@ -5531,13 +5531,13 @@ apply(unfold BINDINGc_def) apply(simp (no_asm)) apply(rule_tac x="a" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp (no_asm)) apply(rule allI)+ apply(rule impI) apply(simp del: NEGc.simps add: psubst_csubst[symmetric]) - apply(drule_tac x="\n" in meta_spec) - apply(drule_tac x="(a,xa,Pa)#\c" in meta_spec) + apply(drule_tac x="\_n" in meta_spec) + apply(drule_tac x="(a,xa,Pa)#\_c" in meta_spec) apply(drule meta_mp) apply(assumption) apply(drule meta_mp) @@ -5553,7 +5553,7 @@ apply(blast) done next - case (TOrR2 a \ b \ M B2 \' B1 \n \c) + case (TOrR2 a \ b \ M B2 \' B1 \_n \_c) then show ?case apply(simp) apply(subgoal_tac "(b,B1 OR B2) \ set \'") @@ -5570,7 +5570,7 @@ apply(rule disjI2) apply(rule_tac x="a" in exI) apply(rule_tac x="c" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp) apply(rule conjI) apply(rule fic.intros) @@ -5583,13 +5583,13 @@ apply(unfold BINDINGc_def) apply(simp (no_asm)) apply(rule_tac x="a" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp (no_asm)) apply(rule allI)+ apply(rule impI) apply(simp del: NEGc.simps add: psubst_csubst[symmetric]) - apply(drule_tac x="\n" in meta_spec) - apply(drule_tac x="(a,xa,Pa)#\c" in meta_spec) + apply(drule_tac x="\_n" in meta_spec) + apply(drule_tac x="(a,xa,Pa)#\_c" in meta_spec) apply(drule meta_mp) apply(assumption) apply(drule meta_mp) @@ -5605,7 +5605,7 @@ apply(blast) done next - case (TImpL a \ N x \ M y B C \' \n \c) + case (TImpL a \ N x \ M y B C \' \_n \_c) then show ?case apply(simp) apply(subgoal_tac "(y,B IMP C) \ set \'") @@ -5624,8 +5624,8 @@ apply(rule_tac x="x" in exI) apply(rule_tac x="a" in exI) apply(rule_tac x="ca" in exI) - apply(rule_tac x="\n,\c" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp del: NEGc.simps) apply(rule conjI) apply(rule fin.intros) @@ -5643,13 +5643,13 @@ apply(unfold BINDINGc_def) apply(simp del: NEGc.simps) apply(rule_tac x="a" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp del: NEGc.simps) apply(rule allI)+ apply(rule impI) apply(simp del: NEGc.simps add: psubst_csubst[symmetric]) - apply(drule_tac x="\n" in meta_spec) - apply(drule_tac x="(a,xa,Pa)#\c" in meta_spec) + apply(drule_tac x="\_n" in meta_spec) + apply(drule_tac x="(a,xa,Pa)#\_c" in meta_spec) apply(drule meta_mp) apply(rule ncloses_subset) apply(assumption) @@ -5665,14 +5665,14 @@ apply(unfold BINDINGn_def) apply(simp del: NEGc.simps) apply(rule_tac x="x" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp del: NEGc.simps) apply(rule allI)+ apply(rule impI) apply(simp del: NEGc.simps add: psubst_nsubst[symmetric]) apply(rotate_tac 12) - apply(drule_tac x="(x,aa,Pa)#\n" in meta_spec) - apply(drule_tac x="\c" in meta_spec) + apply(drule_tac x="(x,aa,Pa)#\_n" in meta_spec) + apply(drule_tac x="\_c" in meta_spec) apply(drule meta_mp) apply(rule ncloses_extend) apply(rule ncloses_subset) @@ -5687,7 +5687,7 @@ apply(blast) done next - case (TImpR a \ b x \ B M C \' \n \c) + case (TImpR a \ b x \ B M C \' \_n \_c) then show ?case apply(simp) apply(subgoal_tac "(b,B IMP C) \ set \'") @@ -5704,7 +5704,7 @@ apply(rule_tac x="x" in exI) apply(rule_tac x="a" in exI) apply(rule_tac x="c" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp) apply(rule conjI) apply(rule fic.intros) @@ -5721,16 +5721,16 @@ apply(unfold BINDINGn_def) apply(simp) apply(rule_tac x="x" in exI) - apply(rule_tac x="\n,((a,z,Pa)#\c)" in exI) + apply(rule_tac x="\_n,((a,z,Pa)#\_c)" in exI) apply(simp) apply(rule allI)+ apply(rule impI) - apply(rule_tac t="\n,((a,z,Pa)#\c){x:=.Pb}" and - s="((x,aa,Pb)#\n),((a,z,Pa)#\c)" in subst) + apply(rule_tac t="\_n,((a,z,Pa)#\_c){x:=.Pb}" and + s="((x,aa,Pb)#\_n),((a,z,Pa)#\_c)" in subst) apply(rule psubst_nsubst) apply(simp add: fresh_prod fresh_atm fresh_list_cons) - apply(drule_tac x="(x,aa,Pb)#\n" in meta_spec) - apply(drule_tac x="(a,z,Pa)#\c" in meta_spec) + apply(drule_tac x="(x,aa,Pb)#\_n" in meta_spec) + apply(drule_tac x="(a,z,Pa)#\_c" in meta_spec) apply(drule meta_mp) apply(rule ncloses_extend) apply(assumption) @@ -5753,16 +5753,16 @@ apply(unfold BINDINGc_def) apply(simp) apply(rule_tac x="a" in exI) - apply(rule_tac x="((x,ca,Q)#\n),\c" in exI) + apply(rule_tac x="((x,ca,Q)#\_n),\_c" in exI) apply(simp) apply(rule allI)+ apply(rule impI) - apply(rule_tac t="((x,ca,Q)#\n),\c{a:=(xaa).Pa}" and - s="((x,ca,Q)#\n),((a,xaa,Pa)#\c)" in subst) + apply(rule_tac t="((x,ca,Q)#\_n),\_c{a:=(xaa).Pa}" and + s="((x,ca,Q)#\_n),((a,xaa,Pa)#\_c)" in subst) apply(rule psubst_csubst) apply(simp add: fresh_prod fresh_atm fresh_list_cons) - apply(drule_tac x="(x,ca,Q)#\n" in meta_spec) - apply(drule_tac x="(a,xaa,Pa)#\c" in meta_spec) + apply(drule_tac x="(x,ca,Q)#\_n" in meta_spec) + apply(drule_tac x="(a,xaa,Pa)#\_c" in meta_spec) apply(drule meta_mp) apply(rule ncloses_extend) apply(assumption) @@ -5782,7 +5782,7 @@ apply(blast) done next - case (TCut a \ N x \ M B \n \c) + case (TCut a \ N x \ M B \_n \_c) then show ?case apply - apply(case_tac "\y. M\Ax y a") @@ -5793,14 +5793,14 @@ apply(unfold BINDINGc_def) apply(simp) apply(rule_tac x="a" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp) apply(rule allI) apply(rule allI) apply(rule impI) apply(simp add: psubst_csubst[symmetric]) (*?*) - apply(drule_tac x="\n" in meta_spec) - apply(drule_tac x="(a,xa,P)#\c" in meta_spec) + apply(drule_tac x="\_n" in meta_spec) + apply(drule_tac x="(a,xa,P)#\_c" in meta_spec) apply(drule meta_mp) apply(assumption) apply(drule meta_mp) @@ -5814,15 +5814,15 @@ apply(unfold BINDINGn_def) apply(simp) apply(rule_tac x="x" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp) apply(rule allI) apply(rule allI) apply(rule impI) apply(simp add: psubst_nsubst[symmetric]) (*?*) apply(rotate_tac 11) - apply(drule_tac x="(x,aa,P)#\n" in meta_spec) - apply(drule_tac x="\c" in meta_spec) + apply(drule_tac x="(x,aa,P)#\_n" in meta_spec) + apply(drule_tac x="\_c" in meta_spec) apply(drule meta_mp) apply(rule ncloses_extend) apply(assumption) @@ -5844,12 +5844,12 @@ apply(unfold BINDINGc_def) apply(simp) apply(rule_tac x="a" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp) apply(rule allI)+ apply(rule impI) - apply(drule_tac x="\n" in meta_spec) - apply(drule_tac x="(a,xa,P)#\c" in meta_spec) + apply(drule_tac x="\_n" in meta_spec) + apply(drule_tac x="(a,xa,P)#\_c" in meta_spec) apply(drule meta_mp) apply(assumption) apply(drule meta_mp) @@ -5935,15 +5935,15 @@ apply(unfold BINDINGn_def) apply(simp) apply(rule_tac x="x" in exI) - apply(rule_tac x="\n,\c" in exI) + apply(rule_tac x="\_n,\_c" in exI) apply(simp) apply(rule allI) apply(rule allI) apply(rule impI) apply(simp add: psubst_nsubst[symmetric]) (*?*) apply(rotate_tac 10) - apply(drule_tac x="(x,aa,P)#\n" in meta_spec) - apply(drule_tac x="\c" in meta_spec) + apply(drule_tac x="(x,aa,P)#\_n" in meta_spec) + apply(drule_tac x="\_c" in meta_spec) apply(drule meta_mp) apply(rule ncloses_extend) apply(assumption) @@ -6038,7 +6038,7 @@ lemma lookup1: assumes a: "x\(idn \ b)" - shows "lookup x a (idn \ b) \c = lookupa x a \c" + shows "lookup x a (idn \ b) \_c = lookupa x a \_c" using a apply(induct \) apply(auto simp add: fresh_list_cons fresh_prod fresh_atm) @@ -6046,7 +6046,7 @@ lemma lookup2: assumes a: "\(x\(idn \ b))" - shows "lookup x a (idn \ b) \c = lookupb x a \c b (Ax x b)" + shows "lookup x a (idn \ b) \_c = lookupb x a \_c b (Ax x b)" using a apply(induct \) apply(auto simp add: fresh_list_cons fresh_prod fresh_atm fresh_list_nil) diff -r 227477f17c26 -r 4aa34bd43228 src/HOL/Nominal/Examples/Fsub.thy --- a/src/HOL/Nominal/Examples/Fsub.thy Wed Nov 28 15:38:12 2012 +0100 +++ b/src/HOL/Nominal/Examples/Fsub.thy Wed Nov 28 15:59:18 2012 +0100 @@ -1501,7 +1501,7 @@ have h:"(D @ TVarB X Q # \)\S<:T" by fact then have ST: "(D[X \ P]\<^sub>e @ \) \ S[X \ P]\<^sub>\ <: T[X \ P]\<^sub>\" using SA_trans_TVar by auto from h have G_ok: "\ (D @ TVarB X Q # \) ok" by (rule subtype_implies_ok) - from G_ok and SA_trans_TVar have X\_ok: "\ (TVarB X Q # \) ok" + from G_ok and SA_trans_TVar have X_\_ok: "\ (TVarB X Q # \) ok" by (auto intro: validE_append) show "(D[X \ P]\<^sub>e @ \) \ Tvar Y[X \ P]\<^sub>\<:T[X \ P]\<^sub>\" proof (cases "X = Y") @@ -1509,7 +1509,7 @@ from eq and SA_trans_TVar have "TVarB Y Q \ set (D @ TVarB X Q # \)" by simp with G_ok have QS: "Q = S" using `TVarB Y S \ set (D @ TVarB X Q # \)` by (rule uniqueness_of_ctxt) - from X\_ok have "X \ ty_dom \" and "Q closed_in \" by auto + from X_\_ok have "X \ ty_dom \" and "Q closed_in \" by auto then have XQ: "X \ Q" by (rule closed_in_fresh) note `\\P<:Q` moreover from ST have "\ (D[X \ P]\<^sub>e @ \) ok" by (rule subtype_implies_ok) @@ -1534,7 +1534,7 @@ with neq and ST show ?thesis by auto next assume Y: "TVarB Y S \ set \" - from X\_ok have "X \ ty_dom \" and "\ \ ok" by auto + from X_\_ok have "X \ ty_dom \" and "\ \ ok" by auto then have "X \ \" by (simp add: valid_ty_dom_fresh) with Y have "X \ S" by (induct \) (auto simp add: fresh_list_nil fresh_list_cons) diff -r 227477f17c26 -r 4aa34bd43228 src/HOL/Probability/Infinite_Product_Measure.thy --- a/src/HOL/Probability/Infinite_Product_Measure.thy Wed Nov 28 15:38:12 2012 +0100 +++ b/src/HOL/Probability/Infinite_Product_Measure.thy Wed Nov 28 15:59:18 2012 +0100 @@ -19,8 +19,10 @@ assume "\ finite I" then have I_not_empty: "I \ {}" by auto interpret G!: algebra ?\ generator by (rule algebra_generator) fact - note \G_mono = - G.additive_increasing[OF positive_\G[OF I_not_empty] additive_\G[OF I_not_empty], THEN increasingD] + note mu_G_mono = + G.additive_increasing[OF positive_mu_G[OF I_not_empty] additive_mu_G[OF I_not_empty], + THEN increasingD] + write mu_G ("\G") { fix Z J assume J: "J \ {}" "finite J" "J \ I" and Z: "Z \ ?G" @@ -42,7 +44,7 @@ have ***: "((\x. merge J (I - J) (y, x)) -` Z \ space (Pi\<^isub>M I M)) \ ?G" using J K by (intro generatorI) auto have "\G ((\x. merge J (I - J) (y, x)) -` emb I K X \ space (Pi\<^isub>M I M)) = emeasure (Pi\<^isub>M (K - J) M) (?M y)" - unfolding * using K J by (subst \G_eq[OF _ _ _ **]) auto + unfolding * using K J by (subst mu_G_eq[OF _ _ _ **]) auto note * ** *** this } note merge_in_G = this @@ -61,7 +63,7 @@ fix x assume x: "x \ space (Pi\<^isub>M J M)" with K merge_in_G(2)[OF this] show "emeasure (Pi\<^isub>M (K - J) M) (?M x) = \G (?MZ x)" - unfolding `Z = emb I K X` merge_in_G(1)[OF x] by (subst \G_eq) auto + unfolding `Z = emb I K X` merge_in_G(1)[OF x] by (subst mu_G_eq) auto qed finally have fold: "\G Z = (\\<^isup>+x. \G (?MZ x) \Pi\<^isub>M J M)" . @@ -74,12 +76,12 @@ let ?q = "\y. \G ((\x. merge J (I - J) (y,x)) -` Z \ space (Pi\<^isub>M I M))" have "?q \ borel_measurable (Pi\<^isub>M J M)" unfolding `Z = emb I K X` using J K merge_in_G(3) - by (simp add: merge_in_G \G_eq emeasure_fold_measurable cong: measurable_cong) + by (simp add: merge_in_G mu_G_eq emeasure_fold_measurable cong: measurable_cong) note this fold le_1 merge_in_G(3) } note fold = this have "\\. (\s\?G. \ s = \G s) \ measure_space ?\ (sigma_sets ?\ ?G) \" - proof (rule G.caratheodory_empty_continuous[OF positive_\G additive_\G]) + proof (rule G.caratheodory_empty_continuous[OF positive_mu_G additive_mu_G]) fix A assume "A \ ?G" with generatorE guess J X . note JX = this interpret JK: finite_product_prob_space M J by default fact+ @@ -87,13 +89,13 @@ next fix A assume A: "range A \ ?G" "decseq A" "(\i. A i) = {}" then have "decseq (\i. \G (A i))" - by (auto intro!: \G_mono simp: decseq_def) + by (auto intro!: mu_G_mono simp: decseq_def) moreover have "(INF i. \G (A i)) = 0" proof (rule ccontr) assume "(INF i. \G (A i)) \ 0" (is "?a \ 0") moreover have "0 \ ?a" - using A positive_\G[OF I_not_empty] by (auto intro!: INF_greatest simp: positive_def) + using A positive_mu_G[OF I_not_empty] by (auto intro!: INF_greatest simp: positive_def) ultimately have "0 < ?a" by auto have "\n. \J X. J \ {} \ finite J \ J \ I \ X \ sets (Pi\<^isub>M J M) \ A n = emb I J X \ \G (A n) = emeasure (limP J M (\J. (Pi\<^isub>M J M))) X" @@ -114,7 +116,7 @@ interpret J: finite_product_prob_space M "J i" for i by default fact+ have a_le_1: "?a \ 1" - using \G_spec[of "J 0" "A 0" "X 0"] J A_eq + using mu_G_spec[of "J 0" "A 0" "X 0"] J A_eq by (auto intro!: INF_lower2[of 0] J.measure_le_1) let ?M = "\K Z y. (\x. merge K (I - K) (y, x)) -` Z \ space (Pi\<^isub>M I M)" @@ -166,7 +168,7 @@ fix x assume x: "x \ space (Pi\<^isub>M J' M)" assume "?a / 2^(k+1) \ ?q n x" also have "?q n x \ ?q m x" - proof (rule \G_mono) + proof (rule mu_G_mono) from fold(4)[OF J', OF Z_sets x] show "?M J' (Z n) x \ ?G" "?M J' (Z m) x \ ?G" by auto show "?M J' (Z n) x \ ?M J' (Z m) x" @@ -248,7 +250,7 @@ moreover from w have "?a / 2 ^ (k + 1) \ ?q k k (w k)" by auto then have "?M (J k) (A k) (w k) \ {}" - using positive_\G[OF I_not_empty, unfolded positive_def] `0 < ?a` `?a \ 1` + using positive_mu_G[OF I_not_empty, unfolded positive_def] `0 < ?a` `?a \ 1` by (cases ?a) (auto simp: divide_le_0_iff power_le_zero_eq) then obtain x where "x \ ?M (J k) (A k) (w k)" by auto then have "merge (J k) (I - J k) (w k, x) \ A k" by auto @@ -317,7 +319,7 @@ then have "\ (emb I J (Pi\<^isub>E J X)) = \G (emb I J (Pi\<^isub>E J X))" using \ by simp also have "\ = (\ j\J. if j \ J then emeasure (M j) (X j) else emeasure (M j) (space (M j)))" - using J `I \ {}` by (subst \G_spec[OF _ _ _ refl]) (auto simp: emeasure_PiM Pi_iff) + using J `I \ {}` by (subst mu_G_spec[OF _ _ _ refl]) (auto simp: emeasure_PiM Pi_iff) also have "\ = (\j\J \ {i \ I. emeasure (M i) (space (M i)) \ 1}. if j \ J then emeasure (M j) (X j) else emeasure (M j) (space (M j)))" using J `I \ {}` by (intro setprod_mono_one_right) (auto simp: M.emeasure_space_1) diff -r 227477f17c26 -r 4aa34bd43228 src/HOL/Probability/Lebesgue_Integration.thy --- a/src/HOL/Probability/Lebesgue_Integration.thy Wed Nov 28 15:38:12 2012 +0100 +++ b/src/HOL/Probability/Lebesgue_Integration.thy Wed Nov 28 15:59:18 2012 +0100 @@ -788,7 +788,7 @@ fix g assume g: "simple_function M g" "g \ max 0 \ f" let ?G = "{x \ space M. \ g x \ \}" note gM = g(1)[THEN borel_measurable_simple_function] - have \G_pos: "0 \ (emeasure M) ?G" using gM by auto + have \_G_pos: "0 \ (emeasure M) ?G" using gM by auto let ?g = "\y x. if g x = \ then y else max 0 (g x)" from g gM have g_in_A: "\y. 0 \ y \ y \ \ \ ?g y \ ?A" apply (safe intro!: simple_function_max simple_function_If) @@ -804,15 +804,15 @@ by (intro SUP_upper2[OF g0] simple_integral_mono_AE) (auto simp: max_def intro!: simple_function_If) next - assume \G: "(emeasure M) ?G \ 0" + assume \_G: "(emeasure M) ?G \ 0" have "SUPR ?A (integral\<^isup>S M) = \" proof (intro SUP_PInfty) fix n :: nat let ?y = "ereal (real n) / (if (emeasure M) ?G = \ then 1 else (emeasure M) ?G)" - have "0 \ ?y" "?y \ \" using \G \G_pos by (auto simp: ereal_divide_eq) + have "0 \ ?y" "?y \ \" using \_G \_G_pos by (auto simp: ereal_divide_eq) then have "?g ?y \ ?A" by (rule g_in_A) have "real n \ ?y * (emeasure M) ?G" - using \G \G_pos by (cases "(emeasure M) ?G") (auto simp: field_simps) + using \_G \_G_pos by (cases "(emeasure M) ?G") (auto simp: field_simps) also have "\ = (\\<^isup>Sx. ?y * indicator ?G x \M)" using `0 \ ?y` `?g ?y \ ?A` gM by (subst simple_integral_cmult_indicator) auto diff -r 227477f17c26 -r 4aa34bd43228 src/HOL/Probability/Projective_Family.thy --- a/src/HOL/Probability/Projective_Family.thy Wed Nov 28 15:38:12 2012 +0100 +++ b/src/HOL/Probability/Projective_Family.thy Wed Nov 28 15:59:18 2012 +0100 @@ -226,14 +226,14 @@ "J \ {} \ finite J \ J \ I \ X \ sets (Pi\<^isub>M J M) \ A = emb I J X \ A \ generator" unfolding generator_def by auto -definition +definition mu_G ("\G") where "\G A = (THE x. \J. J \ {} \ finite J \ J \ I \ (\X\sets (Pi\<^isub>M J M). A = emb I J X \ x = emeasure (limP J M P) X))" -lemma \G_spec: +lemma mu_G_spec: assumes J: "J \ {}" "finite J" "J \ I" "A = emb I J X" "X \ sets (Pi\<^isub>M J M)" shows "\G A = emeasure (limP J M P) X" - unfolding \G_def + unfolding mu_G_def proof (intro the_equality allI impI ballI) fix K Y assume K: "K \ {}" "finite K" "K \ I" "A = emb I K Y" "Y \ sets (Pi\<^isub>M K M)" have "emeasure (limP K M P) Y = emeasure (limP (K \ J) M P) (emb (K \ J) K Y)" @@ -245,9 +245,9 @@ finally show "emeasure (limP J M P) X = emeasure (limP K M P) Y" .. qed (insert J, force) -lemma \G_eq: +lemma mu_G_eq: "J \ {} \ finite J \ J \ I \ X \ sets (Pi\<^isub>M J M) \ \G (emb I J X) = emeasure (limP J M P) X" - by (intro \G_spec) auto + by (intro mu_G_spec) auto lemma generator_Ex: assumes *: "A \ generator" @@ -255,7 +255,7 @@ proof - from * obtain J X where J: "J \ {}" "finite J" "J \ I" "A = emb I J X" "X \ sets (Pi\<^isub>M J M)" unfolding generator_def by auto - with \G_spec[OF this] show ?thesis by auto + with mu_G_spec[OF this] show ?thesis by auto qed lemma generatorE: @@ -284,7 +284,7 @@ auto qed -lemma positive_\G: +lemma positive_mu_G: assumes "I \ {}" shows "positive generator \G" proof - @@ -302,7 +302,7 @@ qed qed -lemma additive_\G: +lemma additive_mu_G: assumes "I \ {}" shows "additive generator \G" proof - @@ -324,7 +324,7 @@ then have "\G (A \ B) = \G (emb I (J \ K) (emb (J \ K) J X \ emb (J \ K) K Y))" by simp also have "\ = emeasure (limP (J \ K) M P) (emb (J \ K) J X \ emb (J \ K) K Y)" - using JK J(1, 4) K(1, 4) by (simp add: \G_eq sets.Un del: prod_emb_Un) + using JK J(1, 4) K(1, 4) by (simp add: mu_G_eq sets.Un del: prod_emb_Un) also have "\ = \G A + \G B" using J K JK_disj by (simp add: plus_emeasure[symmetric]) finally show "\G (A \ B) = \G A + \G B" . diff -r 227477f17c26 -r 4aa34bd43228 src/HOL/Probability/Projective_Limit.thy --- a/src/HOL/Probability/Projective_Limit.thy Wed Nov 28 15:38:12 2012 +0100 +++ b/src/HOL/Probability/Projective_Limit.thy Wed Nov 28 15:59:18 2012 +0100 @@ -115,10 +115,13 @@ let ?\ = "\\<^isub>E i\I. space borel" let ?G = generator interpret G!: algebra ?\ generator by (intro algebra_generator) fact - note \G_mono = - G.additive_increasing[OF positive_\G[OF `I \ {}`] additive_\G[OF `I \ {}`], THEN increasingD] + note mu_G_mono = + G.additive_increasing[OF positive_mu_G[OF `I \ {}`] additive_mu_G[OF `I \ {}`], + THEN increasingD] + write mu_G ("\G") + have "\\. (\s\?G. \ s = \G s) \ measure_space ?\ (sigma_sets ?\ ?G) \" - proof (rule G.caratheodory_empty_continuous[OF positive_\G additive_\G, + proof (rule G.caratheodory_empty_continuous[OF positive_mu_G additive_mu_G, OF `I \ {}`, OF `I \ {}`]) fix A assume "A \ ?G" with generatorE guess J X . note JX = this @@ -127,13 +130,13 @@ next fix Z assume Z: "range Z \ ?G" "decseq Z" "(\i. Z i) = {}" then have "decseq (\i. \G (Z i))" - by (auto intro!: \G_mono simp: decseq_def) + by (auto intro!: mu_G_mono simp: decseq_def) moreover have "(INF i. \G (Z i)) = 0" proof (rule ccontr) assume "(INF i. \G (Z i)) \ 0" (is "?a \ 0") moreover have "0 \ ?a" - using Z positive_\G[OF `I \ {}`] by (auto intro!: INF_greatest simp: positive_def) + using Z positive_mu_G[OF `I \ {}`] by (auto intro!: INF_greatest simp: positive_def) ultimately have "0 < ?a" by auto hence "?a \ -\" by auto have "\n. \J B. J \ {} \ finite J \ J \ I \ B \ sets (Pi\<^isub>M J (\_. borel)) \ @@ -158,10 +161,10 @@ unfolding J_def B_def by (subst prod_emb_trans) (insert Z, auto) interpret prob_space "P (J i)" for i using proj_prob_space by simp have "?a \ \G (Z 0)" by (auto intro: INF_lower) - also have "\ < \" using J by (auto simp: Z_eq \G_eq limP_finite proj_sets) + also have "\ < \" using J by (auto simp: Z_eq mu_G_eq limP_finite proj_sets) finally have "?a \ \" by simp have "\n. \\G (Z n)\ \ \" unfolding Z_eq using J J_mono - by (subst \G_eq) (auto simp: limP_finite proj_sets \G_eq) + by (subst mu_G_eq) (auto simp: limP_finite proj_sets mu_G_eq) have countable_UN_J: "countable (\n. J n)" by (simp add: countable_finite) def Utn \ "to_nat_on (\n. J n)" @@ -295,7 +298,7 @@ (\ i\{1..n}. prod_emb (J n) (\_. borel) (J i) (K i))" . hence "Y n \ ?G" using J J_mono K_sets `n \ 1` by (intro generatorI[OF _ _ _ _ Y_emb]) auto hence "\\G (Y n)\ \ \" unfolding Y_emb using J J_mono K_sets `n \ 1` - by (subst \G_eq) (auto simp: limP_finite proj_sets \G_eq) + by (subst mu_G_eq) (auto simp: limP_finite proj_sets mu_G_eq) interpret finite_measure "(limP (J n) (\_. borel) P)" proof have "emeasure (limP (J n) (\_. borel) P) (J n \\<^isub>E space borel) \ \" @@ -304,14 +307,14 @@ by (simp add: space_PiM) qed have "\G (Z n) = limP (J n) (\_. borel) P (B n)" - unfolding Z_eq using J by (auto simp: \G_eq) + unfolding Z_eq using J by (auto simp: mu_G_eq) moreover have "\G (Y n) = limP (J n) (\_. borel) P (\i\{Suc 0..n}. prod_emb (J n) (\_. borel) (J i) (K i))" - unfolding Y_emb using J J_mono K_sets `n \ 1` by (subst \G_eq) auto + unfolding Y_emb using J J_mono K_sets `n \ 1` by (subst mu_G_eq) auto moreover have "\G (Z n - Y n) = limP (J n) (\_. borel) P (B n - (\i\{Suc 0..n}. prod_emb (J n) (\_. borel) (J i) (K i)))" unfolding Z_eq Y_emb prod_emb_Diff[symmetric] using J J_mono K_sets `n \ 1` - by (subst \G_eq) (auto intro!: sets.Diff) + by (subst mu_G_eq) (auto intro!: sets.Diff) ultimately have "\G (Z n) - \G (Y n) = \G (Z n - Y n)" using J J_mono K_sets `n \ 1` @@ -324,17 +327,17 @@ have "Z n - Y n \ ?G" "(\ i\{1..n}. (Z i - Z' i)) \ ?G" using `Z' _ \ ?G` `Z _ \ ?G` `Y _ \ ?G` by auto hence "\G (Z n - Y n) \ \G (\ i\{1..n}. (Z i - Z' i))" - using subs G.additive_increasing[OF positive_\G[OF `I \ {}`] additive_\G[OF `I \ {}`]] + using subs G.additive_increasing[OF positive_mu_G[OF `I \ {}`] additive_mu_G[OF `I \ {}`]] unfolding increasing_def by auto also have "\ \ (\ i\{1..n}. \G (Z i - Z' i))" using `Z _ \ ?G` `Z' _ \ ?G` - by (intro G.subadditive[OF positive_\G additive_\G, OF `I \ {}` `I \ {}`]) auto + by (intro G.subadditive[OF positive_mu_G additive_mu_G, OF `I \ {}` `I \ {}`]) auto also have "\ \ (\ i\{1..n}. 2 powr -real i * ?a)" proof (rule setsum_mono) fix i assume "i \ {1..n}" hence "i \ n" by simp have "\G (Z i - Z' i) = \G (prod_emb I (\_. borel) (J i) (B i - K i))" unfolding Z'_def Z_eq by simp also have "\ = P (J i) (B i - K i)" - apply (subst \G_eq) using J K_sets apply auto + apply (subst mu_G_eq) using J K_sets apply auto apply (subst limP_finite) apply auto done also have "\ = P (J i) (B i) - P (J i) (K i)" @@ -374,7 +377,7 @@ apply (rule ereal_less_add[OF _ R]) using `\\G (Z n)\ \ \` by auto finally have "\G (Y n) > 0" using `\\G (Z n)\ \ \` by (auto simp: ac_simps zero_ereal_def[symmetric]) - thus "Y n \ {}" using positive_\G `I \ {}` by (auto simp add: positive_def) + thus "Y n \ {}" using positive_mu_G `I \ {}` by (auto simp add: positive_def) qed hence "\n\{1..}. \y. y \ Y n" by auto then obtain y where y: "\n. n \ 1 \ y n \ Y n" unfolding bchoice_iff by force @@ -532,7 +535,7 @@ hence "\ (emb I J (Pi\<^isub>E J X)) = \G (emb I J (Pi\<^isub>E J X))" using \ by simp also have "\ = emeasure (P J) (Pi\<^isub>E J X)" using JX assms proj_sets - by (subst \G_eq) (auto simp: \G_eq limP_finite intro: sets_PiM_I_finite) + by (subst mu_G_eq) (auto simp: mu_G_eq limP_finite intro: sets_PiM_I_finite) finally show "\ (emb I J (Pi\<^isub>E J X)) = emeasure (P J) (Pi\<^isub>E J X)" . next show "emeasure (P J) (Pi\<^isub>E J B) = emeasure (limP J (\_. borel) P) (Pi\<^isub>E J B)" diff -r 227477f17c26 -r 4aa34bd43228 src/HOL/Probability/Sigma_Algebra.thy --- a/src/HOL/Probability/Sigma_Algebra.thy Wed Nov 28 15:38:12 2012 +0100 +++ b/src/HOL/Probability/Sigma_Algebra.thy Wed Nov 28 15:59:18 2012 +0100 @@ -387,7 +387,7 @@ subsection {* Binary Unions *} definition binary :: "'a \ 'a \ nat \ 'a" - where "binary a b = (\\<^isup>x. b)(0 := a)" + where "binary a b = (\x. b)(0 := a)" lemma range_binary_eq: "range(binary a b) = {a,b}" by (auto simp add: binary_def) @@ -2117,7 +2117,7 @@ subsection {* A Two-Element Series *} definition binaryset :: "'a set \ 'a set \ nat \ 'a set " - where "binaryset A B = (\\<^isup>x. {})(0 := A, Suc 0 := B)" + where "binaryset A B = (\x. {})(0 := A, Suc 0 := B)" lemma range_binaryset_eq: "range(binaryset A B) = {A,B,{}}" apply (simp add: binaryset_def)