# HG changeset patch # User wenzelm # Date 1724447679 -7200 # Node ID 701912f5645a025519be6735fb1970437ed364c5 # Parent 66893c47500db4d4158f213b88726424f4984beb more markup for syntax consts; diff -r 66893c47500d -r 701912f5645a src/CCL/Set.thy --- a/src/CCL/Set.thy Fri Aug 23 22:47:51 2024 +0200 +++ b/src/CCL/Set.thy Fri Aug 23 23:14:39 2024 +0200 @@ -21,6 +21,8 @@ "_Coll" :: "[idt, o] \ 'a set" ("(1{_./ _})") translations "{x. P}" == "CONST Collect(\x. P)" +syntax_consts + "_Coll" == Collect lemma CollectI: "P(a) \ a : {x. P(x)}" apply (rule mem_Collect_iff [THEN iffD2]) @@ -53,6 +55,9 @@ translations "ALL x:A. P" == "CONST Ball(A, \x. P)" "EX x:A. P" == "CONST Bex(A, \x. P)" +syntax_consts + "_Ball" == Ball and + "_Bex" == Bex lemma ballI: "(\x. x:A \ P(x)) \ ALL x:A. P(x)" by (simp add: Ball_def) @@ -127,6 +132,9 @@ translations "INT x:A. B" == "CONST INTER(A, \x. B)" "UN x:A. B" == "CONST UNION(A, \x. B)" +syntax_consts + "_INTER" == INTER and + "_UNION" == UNION definition Inter :: "(('a set)set) \ 'a set" where "Inter(S) == (INT x:S. x)" diff -r 66893c47500d -r 701912f5645a src/CCL/Term.thy --- a/src/CCL/Term.thy Fri Aug 23 22:47:51 2024 +0200 +++ b/src/CCL/Term.thy Fri Aug 23 23:14:39 2024 +0200 @@ -50,6 +50,7 @@ syntax "_let1" :: "[idt,i,i]\i" ("(3let _ be _/ in _)" [0,0,60] 60) translations "let x be a in e" == "CONST let1(a, \x. e)" +syntax_consts "_let1" == let1 definition letrec :: "[[i,i\i]\i,(i\i)\i]\i" where "letrec(h, b) == b(\x. fix(\f. lam x. h(x,\y. f`y))`x)" @@ -122,6 +123,10 @@ (\<^const_syntax>\letrec3\, K letrec3_tr')] end \ +syntax_consts + "_letrec" == letrec and + "_letrec2" == letrec2 and + "_letrec3" == letrec3 definition nrec :: "[i,i,[i,i]\i]\i" where "nrec(n,b,c) == letrec g x be ncase(x, b, \y. c(y,g(y))) in g(n)" diff -r 66893c47500d -r 701912f5645a src/CCL/Type.thy --- a/src/CCL/Type.thy Fri Aug 23 22:47:51 2024 +0200 +++ b/src/CCL/Type.thy Fri Aug 23 23:14:39 2024 +0200 @@ -16,6 +16,8 @@ "_Subtype" :: "[idt, 'a set, o] \ 'a set" ("(1{_: _ ./ _})") translations "{x: A. B}" == "CONST Subtype(A, \x. B)" +syntax_consts + "_Subtype" == Subtype definition Unit :: "i set" where "Unit == {x. x=one}" @@ -48,6 +50,9 @@ (\<^const_syntax>\Sigma\, fn _ => Syntax_Trans.dependent_tr' (\<^syntax_const>\_Sigma\, \<^syntax_const>\_star\))] \ +syntax_consts + "_Pi" "_arrow" \ Pi and + "_Sigma" "_star" \ Sigma definition Nat :: "i set" where "Nat == lfp(\X. Unit + X)" diff -r 66893c47500d -r 701912f5645a src/CTT/CTT.thy --- a/src/CTT/CTT.thy Fri Aug 23 22:47:51 2024 +0200 +++ b/src/CTT/CTT.thy Fri Aug 23 23:14:39 2024 +0200 @@ -61,6 +61,9 @@ translations "\x:A. B" \ "CONST Prod(A, \x. B)" "\x:A. B" \ "CONST Sum(A, \x. B)" +syntax_consts + "_PROD" \ Prod and + "_SUM" \ Sum abbreviation Arrow :: "[t,t]\t" (infixr "\" 30) where "A \ B \ \_:A. B" diff -r 66893c47500d -r 701912f5645a src/Cube/Cube.thy --- a/src/Cube/Cube.thy Fri Aug 23 22:47:51 2024 +0200 +++ b/src/Cube/Cube.thy Fri Aug 23 23:14:39 2024 +0200 @@ -52,6 +52,13 @@ [(\<^const_syntax>\Prod\, fn _ => Syntax_Trans.dependent_tr' (\<^syntax_const>\_Pi\, \<^syntax_const>\_arrow\))] \ +syntax_consts + "_Trueprop" \ Trueprop and + "_MT_context" \ MT_context and + "_Context" \ Context and + "_Has_type" \ Has_type and + "_Lam" \ Abs and + "_Pi" "_arrow" \ Prod axiomatization where s_b: "*: \" and diff -r 66893c47500d -r 701912f5645a src/FOL/IFOL.thy --- a/src/FOL/IFOL.thy Fri Aug 23 22:47:51 2024 +0200 +++ b/src/FOL/IFOL.thy Fri Aug 23 23:14:39 2024 +0200 @@ -103,6 +103,7 @@ syntax "_Uniq" :: "pttrn \ o \ o" ("(2\\<^sub>\\<^sub>1 _./ _)" [0, 10] 10) translations "\\<^sub>\\<^sub>1x. P" \ "CONST Uniq (\x. P)" +syntax_consts "_Uniq" \ Uniq print_translation \ [Syntax_Trans.preserve_binder_abs_tr' \<^const_syntax>\Uniq\ \<^syntax_const>\_Uniq\] @@ -746,10 +747,10 @@ "" :: \letbind => letbinds\ (\_\) "_binds" :: \[letbind, letbinds] => letbinds\ (\_;/ _\) "_Let" :: \[letbinds, 'a] => 'a\ (\(let (_)/ in (_))\ 10) - translations "_Let(_binds(b, bs), e)" == "_Let(b, _Let(bs, e))" "let x = a in e" == "CONST Let(a, \x. e)" +syntax_consts "_Let" \ Let lemma LetI: assumes \\x. x = t \ P(u(x))\ diff -r 66893c47500d -r 701912f5645a src/ZF/Bin.thy --- a/src/ZF/Bin.thy Fri Aug 23 22:47:51 2024 +0200 +++ b/src/ZF/Bin.thy Fri Aug 23 23:14:39 2024 +0200 @@ -119,6 +119,8 @@ ML_file \Tools/numeral_syntax.ML\ +syntax_consts + "_Int0" "_Int1" "_Int2" "_Int" "_Neg_Int1" "_Neg_Int2" "_Neg_Int" \ integ_of declare bin.intros [simp,TC] diff -r 66893c47500d -r 701912f5645a src/ZF/Induct/Multiset.thy --- a/src/ZF/Induct/Multiset.thy Fri Aug 23 22:47:51 2024 +0200 +++ b/src/ZF/Induct/Multiset.thy Fri Aug 23 23:14:39 2024 +0200 @@ -77,6 +77,7 @@ "_MColl" :: "[pttrn, i, o] \ i" (\(1{# _ \ _./ _#})\) translations "{#x \ M. P#}" == "CONST MCollect(M, \x. P)" +syntax_consts "_MColl" \ MCollect (* multiset orderings *) diff -r 66893c47500d -r 701912f5645a src/ZF/List.thy --- a/src/ZF/List.thy Fri Aug 23 22:47:51 2024 +0200 +++ b/src/ZF/List.thy Fri Aug 23 23:14:39 2024 +0200 @@ -17,12 +17,11 @@ syntax "_Nil" :: i (\[]\) "_List" :: "is \ i" (\[(_)]\) - translations "[x, xs]" == "CONST Cons(x, [xs])" "[x]" == "CONST Cons(x, [])" "[]" == "CONST Nil" - +syntax_consts "_List" \ Cons consts length :: "i\i" diff -r 66893c47500d -r 701912f5645a src/ZF/OrdQuant.thy --- a/src/ZF/OrdQuant.thy Fri Aug 23 22:47:51 2024 +0200 +++ b/src/ZF/OrdQuant.thy Fri Aug 23 23:14:39 2024 +0200 @@ -30,6 +30,10 @@ "\x "CONST oall(a, \x. P)" "\x "CONST oex(a, \x. P)" "\x "CONST OUnion(a, \x. B)" +syntax_consts + "_oall" \ oall and + "_oex" \ oex and + "_OUNION" \ OUnion subsubsection \simplification of the new quantifiers\ @@ -197,6 +201,9 @@ translations "\x[M]. P" \ "CONST rall(M, \x. P)" "\x[M]. P" \ "CONST rex(M, \x. P)" +syntax_consts + "_rall" \ rall and + "_rex" \ rex subsubsection\Relativized universal quantifier\ diff -r 66893c47500d -r 701912f5645a src/ZF/QPair.thy --- a/src/ZF/QPair.thy Fri Aug 23 22:47:51 2024 +0200 +++ b/src/ZF/QPair.thy Fri Aug 23 23:14:39 2024 +0200 @@ -48,6 +48,8 @@ "_QSUM" :: "[idt, i, i] \ i" (\(3QSUM _ \ _./ _)\ 10) translations "QSUM x \ A. B" => "CONST QSigma(A, \x. B)" +syntax_consts + "_QSUM" \ QSigma abbreviation qprod (infixr \<*>\ 80) where diff -r 66893c47500d -r 701912f5645a src/ZF/UNITY/Union.thy --- a/src/ZF/UNITY/Union.thy Fri Aug 23 22:47:51 2024 +0200 +++ b/src/ZF/UNITY/Union.thy Fri Aug 23 23:14:39 2024 +0200 @@ -43,11 +43,12 @@ syntax "_JOIN1" :: "[pttrns, i] \ i" (\(3\_./ _)\ 10) "_JOIN" :: "[pttrn, i, i] \ i" (\(3\_ \ _./ _)\ 10) - translations "\x \ A. B" == "CONST JOIN(A, (\x. B))" "\x y. B" == "\x. \y. B" "\x. B" == "CONST JOIN(CONST state, (\x. B))" +syntax_consts + "_JOIN1" "_JOIN" == JOIN subsection\SKIP\ diff -r 66893c47500d -r 701912f5645a src/ZF/ZF_Base.thy --- a/src/ZF/ZF_Base.thy Fri Aug 23 22:47:51 2024 +0200 +++ b/src/ZF/ZF_Base.thy Fri Aug 23 23:14:39 2024 +0200 @@ -41,6 +41,9 @@ translations "\x\A. P" \ "CONST Ball(A, \x. P)" "\x\A. P" \ "CONST Bex(A, \x. P)" +syntax_consts + "_Ball" \ Ball and + "_Bex" \ Bex subsection \Variations on Replacement\ @@ -52,9 +55,11 @@ where "Replace(A,P) \ PrimReplace(A, \x y. (\!z. P(x,z)) \ P(x,y))" syntax - "_Replace" :: "[pttrn, pttrn, i, o] \ i" (\(1{_ ./ _ \ _, _})\) + "_Replace" :: "[pttrn, pttrn, i, o] \ i" (\(1{_ ./ _ \ _, _})\) translations "{y. x\A, Q}" \ "CONST Replace(A, \x y. Q)" +syntax_consts + "_Replace" \ Replace (* Functional form of replacement -- analgous to ML's map functional *) @@ -66,7 +71,8 @@ "_RepFun" :: "[i, pttrn, i] \ i" (\(1{_ ./ _ \ _})\ [51,0,51]) translations "{b. x\A}" \ "CONST RepFun(A, \x. b)" - +syntax_consts + "_RepFun" \ RepFun (* Separation and Pairing can be derived from the Replacement and Powerset Axioms using the following definitions. *) @@ -77,6 +83,8 @@ "_Collect" :: "[pttrn, i, o] \ i" (\(1{_ \ _ ./ _})\) translations "{x\A. P}" \ "CONST Collect(A, \x. P)" +syntax_consts + "_Collect" \ Collect subsection \General union and intersection\ @@ -90,6 +98,9 @@ translations "\x\A. B" == "CONST Union({B. x\A})" "\x\A. B" == "CONST Inter({B. x\A})" +syntax_consts + "_UNION" == Union and + "_INTER" == Inter subsection \Finite sets and binary operations\ @@ -126,6 +137,8 @@ translations "{x, xs}" == "CONST cons(x, {xs})" "{x}" == "CONST cons(x, 0)" +syntax_consts + "_Finset" == cons subsection \Axioms\ @@ -191,6 +204,9 @@ "\x, y\" == "CONST Pair(x, y)" "\\x,y,zs\.b" == "CONST split(\x \y,zs\.b)" "\\x,y\.b" == "CONST split(\x y. b)" +syntax_consts + "_pattern" "_patterns" == split and + "_Tuple" == Pair definition Sigma :: "[i, i \ i] \ i" where "Sigma(A,B) \ \x\A. \y\B(x). {\x,y\}" @@ -256,6 +272,10 @@ "\x\A. B" == "CONST Pi(A, \x. B)" "\x\A. B" == "CONST Sigma(A, \x. B)" "\x\A. f" == "CONST Lambda(A, \x. f)" +syntax_consts + "_PROD" == Pi and + "_SUM" == Sigma and + "_lam" == Lambda subsection \ASCII syntax\ diff -r 66893c47500d -r 701912f5645a src/ZF/func.thy --- a/src/ZF/func.thy Fri Aug 23 22:47:51 2024 +0200 +++ b/src/ZF/func.thy Fri Aug 23 23:14:39 2024 +0200 @@ -448,18 +448,14 @@ nonterminal updbinds and updbind syntax - - (* Let expressions *) - "_updbind" :: "[i, i] \ updbind" (\(2_ :=/ _)\) "" :: "updbind \ updbinds" (\_\) "_updbinds" :: "[updbind, updbinds] \ updbinds" (\_,/ _\) "_Update" :: "[i, updbinds] \ i" (\_/'((_)')\ [900,0] 900) - translations "_Update (f, _updbinds(b,bs))" == "_Update (_Update(f,b), bs)" "f(x:=y)" == "CONST update(f,x,y)" - +syntax_consts "_Update" "_updbind" \ update lemma update_apply [simp]: "f(x:=y) ` z = (if z=x then y else f`z)" apply (simp add: update_def)