# HG changeset patch # User wenzelm # Date 1474054847 -7200 # Node ID 8c9dc05fc055592df8711ae18860b34c7392cbe9 # Parent 2359e995264107456fd892f037457f60f085c673# Parent f83ef97d8d7d8f28260dfb1a45efd047c4018845 merged diff -r 2359e9952641 -r 8c9dc05fc055 src/Doc/Main/Main_Doc.thy --- a/src/Doc/Main/Main_Doc.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/Doc/Main/Main_Doc.thy Fri Sep 16 21:40:47 2016 +0200 @@ -31,7 +31,9 @@ \section*{HOL} -The basic logic: @{prop "x = y"}, @{const True}, @{const False}, @{prop"Not P"}, @{prop"P & Q"}, @{prop "P | Q"}, @{prop "P --> Q"}, @{prop"ALL x. P"}, @{prop"EX x. P"}, @{prop"EX! x. P"}, @{term"THE x. P"}. +The basic logic: @{prop "x = y"}, @{const True}, @{const False}, @{prop "\ P"}, @{prop"P \ Q"}, +@{prop "P \ Q"}, @{prop "P \ Q"}, @{prop "\x. P"}, @{prop "\x. P"}, @{prop"\! x. P"}, +@{term"THE x. P"}. \<^smallskip> \begin{tabular}{@ {} l @ {~::~} l @ {}} @@ -42,10 +44,10 @@ \subsubsection*{Syntax} \begin{supertabular}{@ {} l @ {\quad$\equiv$\quad} l l @ {}} -@{term"~(x = y)"} & @{term[source]"\ (x = y)"} & (\<^verbatim>\~=\)\\ +@{term"\ (x = y)"} & @{term[source]"\ (x = y)"} & (\<^verbatim>\~=\)\\ @{term[source]"P \ Q"} & @{term"P \ Q"} \\ @{term"If x y z"} & @{term[source]"If x y z"}\\ -@{term"Let e\<^sub>1 (%x. e\<^sub>2)"} & @{term[source]"Let e\<^sub>1 (\x. e\<^sub>2)"}\\ +@{term"Let e\<^sub>1 (\x. e\<^sub>2)"} & @{term[source]"Let e\<^sub>1 (\x. e\<^sub>2)"}\\ \end{supertabular} @@ -72,10 +74,10 @@ \begin{supertabular}{@ {} l @ {\quad$\equiv$\quad} l l @ {}} @{term[source]"x \ y"} & @{term"x \ y"} & (\<^verbatim>\>=\)\\ @{term[source]"x > y"} & @{term"x > y"}\\ -@{term"ALL x<=y. P"} & @{term[source]"\x. x \ y \ P"}\\ -@{term"EX x<=y. P"} & @{term[source]"\x. x \ y \ P"}\\ +@{term "\x\y. P"} & @{term[source]"\x. x \ y \ P"}\\ +@{term "\x\y. P"} & @{term[source]"\x. x \ y \ P"}\\ \multicolumn{2}{@ {}l@ {}}{Similarly for $<$, $\ge$ and $>$}\\ -@{term"LEAST x. P"} & @{term[source]"Least (\x. P)"}\\ +@{term "LEAST x. P"} & @{term[source]"Least (\x. P)"}\\ \end{supertabular} @@ -131,20 +133,20 @@ \begin{supertabular}{@ {} l @ {\quad$\equiv$\quad} l l @ {}} \{a\<^sub>1,\,a\<^sub>n}\ & \insert a\<^sub>1 (\ (insert a\<^sub>n {})\)\\\ -@{term"a ~: A"} & @{term[source]"\(x \ A)"}\\ -@{term"A \ B"} & @{term[source]"A \ B"}\\ -@{term"A \ B"} & @{term[source]"A < B"}\\ +@{term "a \ A"} & @{term[source]"\(x \ A)"}\\ +@{term "A \ B"} & @{term[source]"A \ B"}\\ +@{term "A \ B"} & @{term[source]"A < B"}\\ @{term[source]"A \ B"} & @{term[source]"B \ A"}\\ @{term[source]"A \ B"} & @{term[source]"B < A"}\\ -@{term"{x. P}"} & @{term[source]"Collect (\x. P)"}\\ +@{term "{x. P}"} & @{term[source]"Collect (\x. P)"}\\ \{t | x\<^sub>1 \ x\<^sub>n. P}\ & \{v. \x\<^sub>1 \ x\<^sub>n. v = t \ P}\\\ @{term[source]"\x\I. A"} & @{term[source]"UNION I (\x. A)"} & (\texttt{UN})\\ @{term[source]"\x. A"} & @{term[source]"UNION UNIV (\x. A)"}\\ @{term[source]"\x\I. A"} & @{term[source]"INTER I (\x. A)"} & (\texttt{INT})\\ @{term[source]"\x. A"} & @{term[source]"INTER UNIV (\x. A)"}\\ -@{term"ALL x:A. P"} & @{term[source]"Ball A (\x. P)"}\\ -@{term"EX x:A. P"} & @{term[source]"Bex A (\x. P)"}\\ -@{term"range f"} & @{term[source]"f ` UNIV"}\\ +@{term "\x\A. P"} & @{term[source]"Ball A (\x. P)"}\\ +@{term "\x\A. P"} & @{term[source]"Bex A (\x. P)"}\\ +@{term "range f"} & @{term[source]"f ` UNIV"}\\ \end{supertabular} @@ -225,15 +227,15 @@ \subsubsection*{Syntax} \begin{tabular}{@ {} l @ {\quad$\equiv$\quad} ll @ {}} -@{term"Pair a b"} & @{term[source]"Pair a b"}\\ -@{term"case_prod (\x y. t)"} & @{term[source]"case_prod (\x y. t)"}\\ -@{term"A \ B"} & \Sigma A (\\<^raw:\_>. B)\ +@{term "Pair a b"} & @{term[source]"Pair a b"}\\ +@{term "case_prod (\x y. t)"} & @{term[source]"case_prod (\x y. t)"}\\ +@{term "A \ B"} & \Sigma A (\\<^raw:\_>. B)\ \end{tabular} Pairs may be nested. Nesting to the right is printed as a tuple, -e.g.\ \mbox{@{term"(a,b,c)"}} is really \mbox{\(a, (b, c))\.} +e.g.\ \mbox{@{term "(a,b,c)"}} is really \mbox{\(a, (b, c))\.} Pattern matching with pairs and tuples extends to all binders, -e.g.\ \mbox{@{prop"ALL (x,y):A. P"},} @{term"{(x,y). P}"}, etc. +e.g.\ \mbox{@{prop "\(x,y)\A. P"},} @{term "{(x,y). P}"}, etc. \section*{Relation} @@ -331,7 +333,7 @@ \subsubsection*{Syntax} \begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}} -@{term"abs x"} & @{term[source]"abs x"} +@{term "\x\"} & @{term[source] "abs x"} \end{tabular} @@ -404,19 +406,19 @@ \begin{supertabular}{@ {} l @ {~::~} l @ {}} @{const Finite_Set.finite} & @{term_type_only Finite_Set.finite "'a set\bool"}\\ -@{const Finite_Set.card} & @{term_type_only Finite_Set.card "'a set => nat"}\\ +@{const Finite_Set.card} & @{term_type_only Finite_Set.card "'a set \ nat"}\\ @{const Finite_Set.fold} & @{term_type_only Finite_Set.fold "('a \ 'b \ 'b) \ 'b \ 'a set \ 'b"}\\ -@{const Groups_Big.setsum} & @{term_type_only Groups_Big.setsum "('a => 'b) => 'a set => 'b::comm_monoid_add"}\\ -@{const Groups_Big.setprod} & @{term_type_only Groups_Big.setprod "('a => 'b) => 'a set => 'b::comm_monoid_mult"}\\ +@{const Groups_Big.setsum} & @{term_type_only Groups_Big.setsum "('a \ 'b) \ 'a set \ 'b::comm_monoid_add"}\\ +@{const Groups_Big.setprod} & @{term_type_only Groups_Big.setprod "('a \ 'b) \ 'a set \ 'b::comm_monoid_mult"}\\ \end{supertabular} \subsubsection*{Syntax} \begin{supertabular}{@ {} l @ {\quad$\equiv$\quad} l l @ {}} -@{term"setsum (%x. x) A"} & @{term[source]"setsum (\x. x) A"} & (\<^verbatim>\SUM\)\\ -@{term"setsum (%x. t) A"} & @{term[source]"setsum (\x. t) A"}\\ -@{term[source]"\x|P. t"} & @{term"\x|P. t"}\\ +@{term "setsum (\x. x) A"} & @{term[source]"setsum (\x. x) A"} & (\<^verbatim>\SUM\)\\ +@{term "setsum (\x. t) A"} & @{term[source]"setsum (\x. t) A"}\\ +@{term[source] "\x|P. t"} & @{term"\x|P. t"}\\ \multicolumn{2}{@ {}l@ {}}{Similarly for \\\ instead of \\\} & (\<^verbatim>\PROD\)\\ \end{supertabular} @@ -461,10 +463,10 @@ @{term[source] "\i\n. A"} & @{term[source] "\i \ {..n}. A"}\\ @{term[source] "\ii \ {..\\ instead of \\\}\\ -@{term "setsum (%x. t) {a..b}"} & @{term[source] "setsum (\x. t) {a..b}"}\\ -@{term "setsum (%x. t) {a..x. t) {a..x. t) {..b}"}\\ -@{term "setsum (%x. t) {..x. t) {..x. t) {a..b}"} & @{term[source] "setsum (\x. t) {a..b}"}\\ +@{term "setsum (\x. t) {a..x. t) {a..x. t) {..b}"} & @{term[source] "setsum (\x. t) {..b}"}\\ +@{term "setsum (\x. t) {..x. t) {..\\ instead of \\\}\\ \end{supertabular} diff -r 2359e9952641 -r 8c9dc05fc055 src/FOL/IFOL.thy --- a/src/FOL/IFOL.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/FOL/IFOL.thy Fri Sep 16 21:40:47 2016 +0200 @@ -275,10 +275,10 @@ text \ NOTE THAT the following 2 quantifications: - \<^item> EX!x such that [EX!y such that P(x,y)] (sequential) - \<^item> EX!x,y such that P(x,y) (simultaneous) + \<^item> \!x such that [\!y such that P(x,y)] (sequential) + \<^item> \!x,y such that P(x,y) (simultaneous) - do NOT mean the same thing. The parser treats EX!x y.P(x,y) as sequential. + do NOT mean the same thing. The parser treats \!x y.P(x,y) as sequential. \ lemma ex1I: "P(a) \ (\x. P(x) \ x = a) \ \!x. P(x)" diff -r 2359e9952641 -r 8c9dc05fc055 src/HOL/Algebra/UnivPoly.thy --- a/src/HOL/Algebra/UnivPoly.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/HOL/Algebra/UnivPoly.thy Fri Sep 16 21:40:47 2016 +0200 @@ -1429,7 +1429,7 @@ theorem UP_universal_property: assumes S: "s \ carrier S" - shows "EX! Phi. Phi \ ring_hom P S \ extensional (carrier P) & + shows "\!Phi. Phi \ ring_hom P S \ extensional (carrier P) & Phi (monom P \ 1) = s & (ALL r : carrier R. Phi (monom P r 0) = h r)" using S eval_monom1 diff -r 2359e9952641 -r 8c9dc05fc055 src/HOL/List.thy --- a/src/HOL/List.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/HOL/List.thy Fri Sep 16 21:40:47 2016 +0200 @@ -4913,7 +4913,7 @@ qed lemma finite_sorted_distinct_unique: -shows "finite A \ EX! xs. set xs = A & sorted xs & distinct xs" +shows "finite A \ \!xs. set xs = A \ sorted xs \ distinct xs" apply(drule finite_distinct_list) apply clarify apply(rule_tac a="sort xs" in ex1I) diff -r 2359e9952641 -r 8c9dc05fc055 src/HOL/Matrix_LP/ComputeFloat.thy --- a/src/HOL/Matrix_LP/ComputeFloat.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/HOL/Matrix_LP/ComputeFloat.thy Fri Sep 16 21:40:47 2016 +0200 @@ -46,7 +46,7 @@ apply (simp add: int_of_real_sub real_int_of_real) done -lemma real_is_int_rep: "real_is_int x \ ?! (a::int). real_of_int a = x" +lemma real_is_int_rep: "real_is_int x \ \!(a::int). real_of_int a = x" by (auto simp add: real_is_int_def) lemma int_of_real_mult: diff -r 2359e9952641 -r 8c9dc05fc055 src/HOL/Nonstandard_Analysis/NSA.thy --- a/src/HOL/Nonstandard_Analysis/NSA.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/HOL/Nonstandard_Analysis/NSA.thy Fri Sep 16 21:40:47 2016 +0200 @@ -1268,7 +1268,7 @@ done text\There is a unique real infinitely close\ -lemma st_part_Ex1: "x \ HFinite ==> EX! t::hypreal. t \ \ & x \ t" +lemma st_part_Ex1: "x \ HFinite ==> \!t::hypreal. t \ \ & x \ t" apply (drule st_part_Ex, safe) apply (drule_tac [2] approx_sym, drule_tac [2] approx_sym, drule_tac [2] approx_sym) apply (auto intro!: approx_unique_real) diff -r 2359e9952641 -r 8c9dc05fc055 src/HOL/Nonstandard_Analysis/NSCA.thy --- a/src/HOL/Nonstandard_Analysis/NSCA.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/HOL/Nonstandard_Analysis/NSCA.thy Fri Sep 16 21:40:47 2016 +0200 @@ -350,7 +350,7 @@ apply (simp add: Standard_HComplex st_SReal [unfolded Reals_eq_Standard]) done -lemma stc_part_Ex1: "x:HFinite ==> EX! t. t \ SComplex & x \ t" +lemma stc_part_Ex1: "x:HFinite ==> \!t. t \ SComplex & x \ t" apply (drule stc_part_Ex, safe) apply (drule_tac [2] approx_sym, drule_tac [2] approx_sym, drule_tac [2] approx_sym) apply (auto intro!: approx_unique_complex) diff -r 2359e9952641 -r 8c9dc05fc055 src/HOL/Number_Theory/Cong.thy --- a/src/HOL/Number_Theory/Cong.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/HOL/Number_Theory/Cong.thy Fri Sep 16 21:40:47 2016 +0200 @@ -698,7 +698,7 @@ lemma binary_chinese_remainder_unique_nat: assumes a: "coprime (m1::nat) m2" and nz: "m1 \ 0" "m2 \ 0" - shows "EX! x. x < m1 * m2 \ [x = u1] (mod m1) \ [x = u2] (mod m2)" + shows "\!x. x < m1 * m2 \ [x = u1] (mod m1) \ [x = u2] (mod m2)" proof - from binary_chinese_remainder_nat [OF a] obtain y where "[y = u1] (mod m1)" and "[y = u2] (mod m2)" @@ -834,7 +834,7 @@ assumes fin: "finite A" and nz: "\i\A. m i \ 0" and cop: "\i\A. (\j\A. i \ j \ coprime (m i) (m j))" - shows "EX! x. x < (\i\A. m i) \ (\i\A. [x = u i] (mod m i))" + shows "\!x. x < (\i\A. m i) \ (\i\A. [x = u i] (mod m i))" proof - from chinese_remainder_nat [OF fin cop] obtain y where one: "(ALL i:A. [y = u i] (mod m i))" diff -r 2359e9952641 -r 8c9dc05fc055 src/HOL/Quickcheck_Examples/Quickcheck_Examples.thy --- a/src/HOL/Quickcheck_Examples/Quickcheck_Examples.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/HOL/Quickcheck_Examples/Quickcheck_Examples.thy Fri Sep 16 21:40:47 2016 +0200 @@ -270,7 +270,7 @@ quickcheck[expect = counterexample] oops -lemma "(\x. P x) \ (EX! x. P x)" +lemma "(\x. P x) \ (\!x. P x)" quickcheck[random, expect = counterexample] quickcheck[expect = counterexample] oops diff -r 2359e9952641 -r 8c9dc05fc055 src/HOL/ZF/HOLZF.thy --- a/src/HOL/ZF/HOLZF.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/HOL/ZF/HOLZF.thy Fri Sep 16 21:40:47 2016 +0200 @@ -270,7 +270,7 @@ by (auto simp add: Fun_def Sep Domain) -lemma unique_fun_value: "\isFun f; Elem x (Domain f)\ \ ?! y. Elem (Opair x y) f" +lemma unique_fun_value: "\isFun f; Elem x (Domain f)\ \ \!y. Elem (Opair x y) f" by (auto simp add: Domain isFun_def) lemma fun_value_in_range: "\isFun f; Elem x (Domain f)\ \ Elem (f\x) (Range f)" diff -r 2359e9952641 -r 8c9dc05fc055 src/HOL/ex/Refute_Examples.thy --- a/src/HOL/ex/Refute_Examples.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/HOL/ex/Refute_Examples.thy Fri Sep 16 21:40:47 2016 +0200 @@ -128,7 +128,7 @@ refute [expect = genuine] oops -lemma "EX! x. P x" +lemma "\!x. P x" refute [expect = genuine] oops @@ -152,7 +152,7 @@ refute [expect = genuine] oops -lemma "(\x. P x) \ (EX! x. P x)" +lemma "(\x. P x) \ (\!x. P x)" refute [expect = genuine] oops @@ -220,11 +220,11 @@ refute [expect = genuine] oops -lemma "EX! P. P" +lemma "\!P. P" refute [expect = none] by auto -lemma "EX! P. P x" +lemma "\!P. P x" refute [expect = genuine] oops @@ -280,7 +280,7 @@ text \Axiom of Choice: first an incorrect version ...\ -lemma "(\x. \y. P x y) \ (EX!f. \x. P x (f x))" +lemma "(\x. \y. P x y) \ (\!f. \x. P x (f x))" refute [expect = genuine] oops @@ -290,7 +290,7 @@ refute [maxsize = 4, expect = none] by (simp add: choice) -lemma "(\x. EX!y. P x y) \ (EX!f. \x. P x (f x))" +lemma "(\x. \!y. P x y) \ (\!f. \x. P x (f x))" refute [maxsize = 2, expect = none] apply auto apply (simp add: ex1_implies_ex choice) diff -r 2359e9952641 -r 8c9dc05fc055 src/ZF/Epsilon.thy --- a/src/ZF/Epsilon.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/ZF/Epsilon.thy Fri Sep 16 21:40:47 2016 +0200 @@ -305,7 +305,7 @@ (*Not clear how to remove the P(a) condition, since the "then" part must refer to "a"*) lemma the_equality_if: - "P(a) ==> (THE x. P(x)) = (if (EX!x. P(x)) then a else 0)" + "P(a) ==> (THE x. P(x)) = (if (\!x. P(x)) then a else 0)" by (simp add: the_0 the_equality2) (*The first premise not only fixs i but ensures @{term"f\0"}. diff -r 2359e9952641 -r 8c9dc05fc055 src/ZF/Order.thy --- a/src/ZF/Order.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/ZF/Order.thy Fri Sep 16 21:40:47 2016 +0200 @@ -641,7 +641,7 @@ by (unfold first_def, blast) lemma well_ord_imp_ex1_first: - "[| well_ord(A,r); B<=A; B\0 |] ==> (EX! b. first(b,B,r))" + "[| well_ord(A,r); B<=A; B\0 |] ==> (\!b. first(b,B,r))" apply (unfold well_ord_def wf_on_def wf_def first_def) apply (elim conjE allE disjE, blast) apply (erule bexE) diff -r 2359e9952641 -r 8c9dc05fc055 src/ZF/Perm.thy --- a/src/ZF/Perm.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/ZF/Perm.thy Fri Sep 16 21:40:47 2016 +0200 @@ -137,7 +137,7 @@ apply (blast intro!: lam_injective lam_surjective) done -lemma RepFun_bijective: "(\y\x. EX! y'. f(y') = f(y)) +lemma RepFun_bijective: "(\y\x. \!y'. f(y') = f(y)) ==> (\z\{f(y). y \ x}. THE y. f(y) = z) \ bij({f(y). y \ x}, x)" apply (rule_tac d = f in lam_bijective) apply (auto simp add: the_equality2) diff -r 2359e9952641 -r 8c9dc05fc055 src/ZF/ZF.thy --- a/src/ZF/ZF.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/ZF/ZF.thy Fri Sep 16 21:40:47 2016 +0200 @@ -49,7 +49,7 @@ The resulting set (for functional P) is the same as with PrimReplace, but the rules are simpler. *) definition Replace :: "[i, [i, i] \ o] \ i" - where "Replace(A,P) == PrimReplace(A, %x y. (EX!z. P(x,z)) & P(x,y))" + where "Replace(A,P) == PrimReplace(A, %x y. (\!z. P(x,z)) & P(x,y))" syntax "_Replace" :: "[pttrn, pttrn, i, o] => i" ("(1{_ ./ _ \ _, _})") diff -r 2359e9952641 -r 8c9dc05fc055 src/ZF/func.thy --- a/src/ZF/func.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/ZF/func.thy Fri Sep 16 21:40:47 2016 +0200 @@ -25,7 +25,7 @@ (*For upward compatibility with the former definition*) lemma Pi_iff_old: - "f \ Pi(A,B) \ f<=Sigma(A,B) & (\x\A. EX! y. : f)" + "f \ Pi(A,B) \ f<=Sigma(A,B) & (\x\A. \!y. : f)" by (unfold Pi_def function_def, blast) lemma fun_is_function: "f \ Pi(A,B) ==> function(f)" @@ -175,7 +175,7 @@ by (simp only: lam_def cong add: RepFun_cong) lemma lam_theI: - "(!!x. x \ A ==> EX! y. Q(x,y)) ==> \f. \x\A. Q(x, f`x)" + "(!!x. x \ A ==> \!y. Q(x,y)) ==> \f. \x\A. Q(x, f`x)" apply (rule_tac x = "\x\A. THE y. Q (x,y)" in exI) apply simp apply (blast intro: theI) diff -r 2359e9952641 -r 8c9dc05fc055 src/ZF/upair.thy --- a/src/ZF/upair.thy Fri Sep 16 18:44:18 2016 +0200 +++ b/src/ZF/upair.thy Fri Sep 16 21:40:47 2016 +0200 @@ -156,11 +156,11 @@ apply (fast dest: subst) done -(* Only use this if you already know EX!x. P(x) *) -lemma the_equality2: "[| EX! x. P(x); P(a) |] ==> (THE x. P(x)) = a" +(* Only use this if you already know \!x. P(x) *) +lemma the_equality2: "[| \!x. P(x); P(a) |] ==> (THE x. P(x)) = a" by blast -lemma theI: "EX! x. P(x) ==> P(THE x. P(x))" +lemma theI: "\!x. P(x) ==> P(THE x. P(x))" apply (erule ex1E) apply (subst the_equality) apply (blast+) @@ -170,14 +170,14 @@ @{term "THE x.P(x)"} rewrites to @{term "THE x.Q(x)"} *) (*If it's "undefined", it's zero!*) -lemma the_0: "~ (EX! x. P(x)) ==> (THE x. P(x))=0" +lemma the_0: "~ (\!x. P(x)) ==> (THE x. P(x))=0" apply (unfold the_def) apply (blast elim!: ReplaceE) done (*Easier to apply than theI: conclusion has only one occurrence of P*) lemma theI2: - assumes p1: "~ Q(0) ==> EX! x. P(x)" + assumes p1: "~ Q(0) ==> \!x. P(x)" and p2: "!!x. P(x) ==> Q(x)" shows "Q(THE x. P(x))" apply (rule classical)