# HG changeset patch # User wenzelm # Date 1728509909 -7200 # Node ID 6ad2c917dd2e7ea6751b69ac9be6f2a5c8d07c63 # Parent 3e3e7a68cd80ee59d15e00308a774fd94d345c0c more inner-syntax markup; diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Algebra/AbelCoset.thy --- a/src/HOL/Algebra/AbelCoset.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Algebra/AbelCoset.thy Wed Oct 09 23:38:29 2024 +0200 @@ -24,7 +24,8 @@ where "a_l_coset G = l_coset (add_monoid G)" definition - A_RCOSETS :: "[_, 'a set] \ ('a set)set" (\a'_rcosets\ _\ [81] 80) + A_RCOSETS :: "[_, 'a set] \ ('a set)set" + (\(\open_block notation=\prefix a_rcosets\\a'_rcosets\ _)\ [81] 80) where "A_RCOSETS G H = RCOSETS (add_monoid G) H" definition @@ -32,7 +33,8 @@ where "set_add G = set_mult (add_monoid G)" definition - A_SET_INV :: "[_,'a set] \ 'a set" (\a'_set'_inv\ _\ [81] 80) + A_SET_INV :: "[_,'a set] \ 'a set" + (\(\open_block notation=\prefix a_set_inv\\a'_set'_inv\ _)\ [81] 80) where "A_SET_INV G H = SET_INV (add_monoid G) H" definition diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Algebra/Algebraic_Closure_Type.thy --- a/src/HOL/Algebra/Algebraic_Closure_Type.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Algebra/Algebraic_Closure_Type.thy Wed Oct 09 23:38:29 2024 +0200 @@ -468,8 +468,8 @@ bundle alg_closure_syntax begin -notation to_ac (\_\\ [1000] 999) -notation of_ac (\_\\ [1000] 999) +notation to_ac (\(\open_block notation=\postfix \\\_\)\ [1000] 999) +notation of_ac (\(\open_block notation=\postfix \\\_\)\ [1000] 999) end diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Algebra/Coset.thy --- a/src/HOL/Algebra/Coset.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Algebra/Coset.thy Wed Oct 09 23:38:29 2024 +0200 @@ -19,7 +19,8 @@ where "a <#\<^bsub>G\<^esub> H = (\h\H. {a \\<^bsub>G\<^esub> h})" definition - RCOSETS :: "[_, 'a set] \ ('a set)set" (\rcosets\ _\ [81] 80) + RCOSETS :: "[_, 'a set] \ ('a set)set" + (\(\open_block notation=\prefix rcosets\\rcosets\ _)\ [81] 80) where "rcosets\<^bsub>G\<^esub> H = (\a\carrier G. {H #>\<^bsub>G\<^esub> a})" definition @@ -27,7 +28,8 @@ where "H <#>\<^bsub>G\<^esub> K = (\h\H. \k\K. {h \\<^bsub>G\<^esub> k})" definition - SET_INV :: "[_,'a set] \ 'a set" (\set'_inv\ _\ [81] 80) + SET_INV :: "[_,'a set] \ 'a set" + (\(\open_block notation=\prefix set_inv\\set'_inv\ _)\ [81] 80) where "set_inv\<^bsub>G\<^esub> H = (\h\H. {inv\<^bsub>G\<^esub> h})" @@ -659,7 +661,8 @@ subsubsection\An Equivalence Relation\ definition - r_congruent :: "[('a,'b)monoid_scheme, 'a set] \ ('a*'a)set" (\rcong\ _\) + r_congruent :: "[('a,'b)monoid_scheme, 'a set] \ ('a*'a)set" + (\(\open_block notation=\prefix rcong\\rcong\ _)\) where "rcong\<^bsub>G\<^esub> H = {(x,y). x \ carrier G \ y \ carrier G \ inv\<^bsub>G\<^esub> x \\<^bsub>G\<^esub> y \ H}" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Algebra/Divisibility.thy --- a/src/HOL/Algebra/Divisibility.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Algebra/Divisibility.thy Wed Oct 09 23:38:29 2024 +0200 @@ -1993,11 +1993,13 @@ subsubsection \Definitions\ -definition isgcd :: "[('a,_) monoid_scheme, 'a, 'a, 'a] \ bool" (\(_ gcdof\ _ _)\ [81,81,81] 80) +definition isgcd :: "[('a,_) monoid_scheme, 'a, 'a, 'a] \ bool" + (\(\notation=\mixfix gcdof\\_ gcdof\ _ _)\ [81,81,81] 80) where "x gcdof\<^bsub>G\<^esub> a b \ x divides\<^bsub>G\<^esub> a \ x divides\<^bsub>G\<^esub> b \ (\y\carrier G. (y divides\<^bsub>G\<^esub> a \ y divides\<^bsub>G\<^esub> b \ y divides\<^bsub>G\<^esub> x))" -definition islcm :: "[_, 'a, 'a, 'a] \ bool" (\(_ lcmof\ _ _)\ [81,81,81] 80) +definition islcm :: "[_, 'a, 'a, 'a] \ bool" + (\(\notation=\mixfix lcmof\\_ lcmof\ _ _)\ [81,81,81] 80) where "x lcmof\<^bsub>G\<^esub> a b \ a divides\<^bsub>G\<^esub> x \ b divides\<^bsub>G\<^esub> x \ (\y\carrier G. (a divides\<^bsub>G\<^esub> y \ b divides\<^bsub>G\<^esub> y \ x divides\<^bsub>G\<^esub> y))" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Algebra/Exact_Sequence.thy --- a/src/HOL/Algebra/Exact_Sequence.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Algebra/Exact_Sequence.thy Wed Oct 09 23:38:29 2024 +0200 @@ -22,7 +22,7 @@ abbreviation exact_seq_arrow :: "('a \ 'a) \ 'a monoid list \ ('a \ 'a) list \ 'a monoid \ 'a monoid list \ ('a \ 'a) list" - (\(3_ / \\ _)\ [1000, 60]) + (\(\indent=3 notation=\mixfix exact_seq\\_ / \\ _)\ [1000, 60]) where "exact_seq_arrow f t G \ (G # (fst t), f # (snd t))" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Algebra/FiniteProduct.thy --- a/src/HOL/Algebra/FiniteProduct.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Algebra/FiniteProduct.thy Wed Oct 09 23:38:29 2024 +0200 @@ -307,7 +307,7 @@ syntax "_finprod" :: "index \ idt \ 'a set \ 'b \ 'b" - (\(3\__\_. _)\ [1000, 0, 51, 10] 10) + (\(\indent=3 notation=\binder \\\\__\_. _)\ [1000, 0, 51, 10] 10) syntax_consts "_finprod" \ finprod translations diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Algebra/Group.thy --- a/src/HOL/Algebra/Group.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Algebra/Group.thy Wed Oct 09 23:38:29 2024 +0200 @@ -22,7 +22,8 @@ one :: 'a (\\\\) definition - m_inv :: "('a, 'b) monoid_scheme => 'a => 'a" (\inv\ _\ [81] 80) + m_inv :: "('a, 'b) monoid_scheme => 'a => 'a" + (\(\open_block notation=\prefix inv\\inv\ _)\ [81] 80) where "inv\<^bsub>G\<^esub> x = (THE y. y \ carrier G \ x \\<^bsub>G\<^esub> y = \\<^bsub>G\<^esub> \ y \\<^bsub>G\<^esub> x = \\<^bsub>G\<^esub>)" definition diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Algebra/Ideal.thy --- a/src/HOL/Algebra/Ideal.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Algebra/Ideal.thy Wed Oct 09 23:38:29 2024 +0200 @@ -45,8 +45,9 @@ subsubsection (in ring) \Ideals Generated by a Subset of \<^term>\carrier R\\ -definition genideal :: "_ \ 'a set \ 'a set" (\Idl\ _\ [80] 79) - where "genideal R S = \{I. ideal I R \ S \ I}" +definition genideal :: "_ \ 'a set \ 'a set" + (\(\open_block notation=\prefix Idl\\Idl\ _)\ [80] 79) + where "Idl\<^bsub>R\<^esub> S = \{I. ideal I R \ S \ I}" subsubsection \Principal Ideals\ @@ -411,8 +412,9 @@ text \Generation of Principal Ideals in Commutative Rings\ -definition cgenideal :: "_ \ 'a \ 'a set" (\PIdl\ _\ [80] 79) - where "cgenideal R a = {x \\<^bsub>R\<^esub> a | x. x \ carrier R}" +definition cgenideal :: "_ \ 'a \ 'a set" + (\(\open_block notation=\prefix PIdl\\PIdl\ _)\ [80] 79) + where "PIdl\<^bsub>R\<^esub> a = {x \\<^bsub>R\<^esub> a | x. x \ carrier R}" text \genhideal (?) really generates an ideal\ lemma (in cring) cgenideal_ideal: diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Algebra/Indexed_Polynomials.thy --- a/src/HOL/Algebra/Indexed_Polynomials.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Algebra/Indexed_Polynomials.thy Wed Oct 09 23:38:29 2024 +0200 @@ -38,7 +38,8 @@ definition (in ring) carrier_coeff :: "('c multiset \ 'a) \ bool" where "carrier_coeff P \ (\m. P m \ carrier R)" -inductive_set (in ring) indexed_pset :: "'c set \ 'a set \ ('c multiset \ 'a) set" (\_ [\\]\ 80) +inductive_set (in ring) indexed_pset :: "'c set \ 'a set \ ('c multiset \ 'a) set" + (\(\open_block notation=\postfix \\\_ [\\])\ 80) for I and K where indexed_const: "k \ K \ indexed_const k \ (K[\\<^bsub>I\<^esub>])" | indexed_padd: "\ P \ (K[\\<^bsub>I\<^esub>]); Q \ (K[\\<^bsub>I\<^esub>]) \ \ P \ Q \ (K[\\<^bsub>I\<^esub>])" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Algebra/Lattice.thy --- a/src/HOL/Algebra/Lattice.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Algebra/Lattice.thy Wed Oct 09 23:38:29 2024 +0200 @@ -15,11 +15,11 @@ subsection \Supremum and infimum\ definition - sup :: "[_, 'a set] => 'a" (\\\_\ [90] 90) + sup :: "[_, 'a set] => 'a" (\(\open_block notation=\prefix \\\\\_)\ [90] 90) where "\\<^bsub>L\<^esub>A = (SOME x. least L x (Upper L A))" definition - inf :: "[_, 'a set] => 'a" (\\\_\ [90] 90) + inf :: "[_, 'a set] => 'a" (\(\open_block notation=\prefix \\\\\_)\ [90] 90) where "\\<^bsub>L\<^esub>A = (SOME x. greatest L x (Lower L A))" definition supr :: @@ -31,15 +31,17 @@ where "infi L A f = \\<^bsub>L\<^esub>(f ` A)" syntax - "_inf1" :: "('a, 'b) gorder_scheme \ pttrns \ 'a \ 'a" (\(3IINF\ _./ _)\ [0, 10] 10) - "_inf" :: "('a, 'b) gorder_scheme \ pttrn \ 'c set \ 'a \ 'a" (\(3IINF\ _:_./ _)\ [0, 0, 10] 10) - "_sup1" :: "('a, 'b) gorder_scheme \ pttrns \ 'a \ 'a" (\(3SSUP\ _./ _)\ [0, 10] 10) - "_sup" :: "('a, 'b) gorder_scheme \ pttrn \ 'c set \ 'a \ 'a" (\(3SSUP\ _:_./ _)\ [0, 0, 10] 10) - + "_inf1" :: "('a, 'b) gorder_scheme \ pttrns \ 'a \ 'a" + (\(\indent=3 notation=\binder IINF\\IINF\ _./ _)\ [0, 10] 10) + "_inf" :: "('a, 'b) gorder_scheme \ pttrn \ 'c set \ 'a \ 'a" + (\(\indent=3 notation=\binder IINF\\IINF\ _:_./ _)\ [0, 0, 10] 10) + "_sup1" :: "('a, 'b) gorder_scheme \ pttrns \ 'a \ 'a" + (\(\indent=3 notation=\binder SSUP\\SSUP\ _./ _)\ [0, 10] 10) + "_sup" :: "('a, 'b) gorder_scheme \ pttrn \ 'c set \ 'a \ 'a" + (\(\indent=3 notation=\binder SSUP\\SSUP\ _:_./ _)\ [0, 0, 10] 10) syntax_consts "_inf1" "_inf" == infi and "_sup1" "_sup" == supr - translations "IINF\<^bsub>L\<^esub> x. B" == "CONST infi L CONST UNIV (%x. B)" "IINF\<^bsub>L\<^esub> x:A. B" == "CONST infi L A (%x. B)" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Algebra/Left_Coset.thy --- a/src/HOL/Algebra/Left_Coset.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Algebra/Left_Coset.thy Wed Oct 09 23:38:29 2024 +0200 @@ -7,7 +7,8 @@ begin definition - LCOSETS :: "[_, 'a set] \ ('a set)set" (\lcosets\ _\ [81] 80) + LCOSETS :: "[_, 'a set] \ ('a set)set" + (\(\open_block notation=\prefix lcosets\\lcosets\ _)\ [81] 80) where "lcosets\<^bsub>G\<^esub> H = (\a\carrier G. {a <#\<^bsub>G\<^esub> H})" definition diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Algebra/Order.thy --- a/src/HOL/Algebra/Order.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Algebra/Order.thy Wed Oct 09 23:38:29 2024 +0200 @@ -411,7 +411,8 @@ subsubsection \Intervals\ definition - at_least_at_most :: "('a, 'c) gorder_scheme \ 'a => 'a => 'a set" (\(1\_.._\\)\) + at_least_at_most :: "('a, 'c) gorder_scheme \ 'a => 'a => 'a set" + (\(\indent=1 notation=\mixfix interval\\\_.._\\)\) where "\l..u\\<^bsub>A\<^esub> = {x \ carrier A. l \\<^bsub>A\<^esub> x \ x \\<^bsub>A\<^esub> u}" context weak_partial_order @@ -452,8 +453,9 @@ shows "isotone L1 L2 f" using assms by (auto simp add:isotone_def) -abbreviation Monotone :: "('a, 'b) gorder_scheme \ ('a \ 'a) \ bool" (\Mono\\) - where "Monotone L f \ isotone L L f" +abbreviation Monotone :: "('a, 'b) gorder_scheme \ ('a \ 'a) \ bool" + (\(\open_block notation=\prefix Mono\\Mono\)\) + where "Mono\<^bsub>L\<^esub> f \ isotone L L f" lemma use_iso1: "\isotone A A f; x \ carrier A; y \ carrier A; x \\<^bsub>A\<^esub> y\ \ @@ -478,8 +480,9 @@ subsubsection \Idempotent functions\ definition idempotent :: - "('a, 'b) gorder_scheme \ ('a \ 'a) \ bool" (\Idem\\) where - "idempotent L f \ \x\carrier L. f (f x) .=\<^bsub>L\<^esub> f x" + "('a, 'b) gorder_scheme \ ('a \ 'a) \ bool" + (\(\open_block notation=\prefix Idem\\Idem\)\) + where "Idem\<^bsub>L\<^esub> f \ \x\carrier L. f (f x) .=\<^bsub>L\<^esub> f x" lemma (in weak_partial_order) idempotent: "\Idem f; x \ carrier L\ \ f (f x) .= f x" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Algebra/Polynomials.thy --- a/src/HOL/Algebra/Polynomials.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Algebra/Polynomials.thy Wed Oct 09 23:38:29 2024 +0200 @@ -1359,7 +1359,8 @@ subsection \Algebraic Structure of Polynomials\ -definition univ_poly :: "('a, 'b) ring_scheme \'a set \ ('a list) ring" (\_ [X]\\ 80) +definition univ_poly :: "('a, 'b) ring_scheme \'a set \ ('a list) ring" + (\(\open_block notation=\postfix X\\_ [X]\)\ 80) where "univ_poly R K = \ carrier = { p. polynomial\<^bsub>R\<^esub> K p }, mult = ring.poly_mult R, diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Algebra/QuotRing.thy --- a/src/HOL/Algebra/QuotRing.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Algebra/QuotRing.thy Wed Oct 09 23:38:29 2024 +0200 @@ -12,7 +12,7 @@ subsection \Multiplication on Cosets\ definition rcoset_mult :: "[('a, _) ring_scheme, 'a set, 'a set, 'a set] \ 'a set" - (\[mod _:] _ \\ _\ [81,81,81] 80) + (\(\open_block notation=\mixfix rcoset_mult\\[mod _:] _ \\ _)\ [81,81,81] 80) where "rcoset_mult R I A B = (\a\A. \b\B. I +>\<^bsub>R\<^esub> (a \\<^bsub>R\<^esub> b))" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Algebra/Ring.thy --- a/src/HOL/Algebra/Ring.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Algebra/Ring.thy Wed Oct 09 23:38:29 2024 +0200 @@ -23,16 +23,17 @@ text \Derived operations.\ definition - a_inv :: "[('a, 'm) ring_scheme, 'a ] \ 'a" (\\\ _\ [81] 80) + a_inv :: "[('a, 'm) ring_scheme, 'a ] \ 'a" (\(\open_block notation=\prefix \\\\\ _)\ [81] 80) where "a_inv R = m_inv (add_monoid R)" definition - a_minus :: "[('a, 'm) ring_scheme, 'a, 'a] => 'a" (\(_ \\ _)\ [65,66] 65) + a_minus :: "[('a, 'm) ring_scheme, 'a, 'a] => 'a" (\(\notation=\infix \\\_ \\ _)\ [65,66] 65) where "x \\<^bsub>R\<^esub> y = x \\<^bsub>R\<^esub> (\\<^bsub>R\<^esub> y)" definition - add_pow :: "[_, ('b :: semiring_1), 'a] \ 'a" (\[_] \\ _\ [81, 81] 80) - where "add_pow R k a = pow (add_monoid R) a k" + add_pow :: "[_, ('b :: semiring_1), 'a] \ 'a" + (\(\open_block notation=\mixfix \\\[_] \\ _)\ [81, 81] 80) + where "[k] \\<^bsub>R\<^esub> a = pow (add_monoid R) a k" locale abelian_monoid = fixes G (structure) @@ -45,7 +46,7 @@ syntax "_finsum" :: "index \ idt \ 'a set \ 'b \ 'b" - (\(3\__\_. _)\ [1000, 0, 51, 10] 10) + (\(\indent=3 notation=\binder \\\\__\_. _)\ [1000, 0, 51, 10] 10) syntax_consts "_finsum" \ finsum translations diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Analysis/Euclidean_Space.thy --- a/src/HOL/Analysis/Euclidean_Space.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Analysis/Euclidean_Space.thy Wed Oct 09 23:38:29 2024 +0200 @@ -33,7 +33,7 @@ assumes euclidean_all_zero_iff: "(\u\Basis. inner x u = 0) \ (x = 0)" -syntax "_type_dimension" :: "type \ nat" (\(1DIM/(1'(_')))\) +syntax "_type_dimension" :: "type \ nat" (\(\indent=1 notation=\mixfix type dimension\\DIM/(1'(_')))\) syntax_consts "_type_dimension" \ card translations "DIM('a)" \ "CONST card (CONST Basis :: 'a set)" typed_print_translation \ diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Analysis/Lipschitz.thy --- a/src/HOL/Analysis/Lipschitz.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Analysis/Lipschitz.thy Wed Oct 09 23:38:29 2024 +0200 @@ -14,7 +14,8 @@ open_bundle lipschitz_syntax begin -notation\<^marker>\tag important\ lipschitz_on (\_-lipschitz'_on\ [1000]) +notation\<^marker>\tag important\ + lipschitz_on (\(\open_block notation=\postfix lipschitz_on\\_-lipschitz'_on)\ [1000]) end lemma lipschitz_onI: "L-lipschitz_on X f" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Analysis/Measure_Space.thy --- a/src/HOL/Analysis/Measure_Space.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Analysis/Measure_Space.thy Wed Oct 09 23:38:29 2024 +0200 @@ -1004,11 +1004,10 @@ "almost_everywhere M P \ eventually P (ae_filter M)" syntax - "_almost_everywhere" :: "pttrn \ 'a \ bool \ bool" (\AE _ in _. _\ [0,0,10] 10) - + "_almost_everywhere" :: "pttrn \ 'a \ bool \ bool" + (\(\open_block notation=\binder AE\\AE _ in _. _)\ [0,0,10] 10) syntax_consts "_almost_everywhere" \ almost_everywhere - translations "AE x in M. P" \ "CONST almost_everywhere M (\x. P)" @@ -1017,11 +1016,9 @@ syntax "_set_almost_everywhere" :: "pttrn \ 'a set \ 'a \ bool \ bool" - (\AE _\_ in _./ _\ [0,0,0,10] 10) - + (\(\open_block notation=\binder AE\\AE _\_ in _./ _)\ [0,0,0,10] 10) syntax_consts "_set_almost_everywhere" \ set_almost_everywhere - translations "AE x\A in M. P" \ "CONST set_almost_everywhere A M (\x. P)" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Analysis/Nonnegative_Lebesgue_Integration.thy --- a/src/HOL/Analysis/Nonnegative_Lebesgue_Integration.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Analysis/Nonnegative_Lebesgue_Integration.thy Wed Oct 09 23:38:29 2024 +0200 @@ -584,11 +584,10 @@ "integral\<^sup>S M f = (\x \ f ` space M. x * emeasure M (f -` {x} \ space M))" syntax - "_simple_integral" :: "pttrn \ ennreal \ 'a measure \ ennreal" (\\\<^sup>S _. _ \_\ [60,61] 110) - + "_simple_integral" :: "pttrn \ ennreal \ 'a measure \ ennreal" + (\(\open_block notation=\binder integral\\\\<^sup>S _. _ \_)\ [60,61] 110) syntax_consts "_simple_integral" == simple_integral - translations "\\<^sup>S x. f \M" == "CONST simple_integral M (%x. f)" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Analysis/Set_Integral.thy --- a/src/HOL/Analysis/Set_Integral.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Analysis/Set_Integral.thy Wed Oct 09 23:38:29 2024 +0200 @@ -577,21 +577,17 @@ syntax "_complex_lebesgue_integral" :: "pttrn \ complex \ 'a measure \ complex" - (\\\<^sup>C _. _ \_\ [0,0] 110) - + (\(\open_block notation=\binder integral\\\\<^sup>C _. _ \_)\ [0,0] 110) syntax_consts "_complex_lebesgue_integral" == complex_lebesgue_integral - translations "\\<^sup>Cx. f \M" == "CONST complex_lebesgue_integral M (\x. f)" syntax "_ascii_complex_lebesgue_integral" :: "pttrn \ 'a measure \ real \ real" (\(\indent=3 notation=\binder CLINT\\CLINT _|_. _)\ [0,0,10] 10) - syntax_consts "_ascii_complex_lebesgue_integral" == complex_lebesgue_integral - translations "CLINT x|M. f" == "CONST complex_lebesgue_integral M (\x. f)" @@ -646,19 +642,16 @@ abbreviation "set_nn_integral M A f \ nn_integral M (\x. f x * indicator A x)" syntax -"_set_nn_integral" :: "pttrn => 'a set => 'a measure => ereal => ereal" -(\(\notation=\binder integral\\\\<^sup>+((_)\(_)./ _)/\_)\ [0,0,0,110] 10) - -"_set_lebesgue_integral" :: "pttrn => 'a set => 'a measure => ereal => ereal" -(\(\notation=\binder integral\\\((_)\(_)./ _)/\_)\ [0,0,0,110] 10) - + "_set_nn_integral" :: "pttrn => 'a set => 'a measure => ereal => ereal" + (\(\notation=\binder integral\\\\<^sup>+((_)\(_)./ _)/\_)\ [0,0,0,110] 10) + "_set_lebesgue_integral" :: "pttrn => 'a set => 'a measure => ereal => ereal" + (\(\notation=\binder integral\\\((_)\(_)./ _)/\_)\ [0,0,0,110] 10) syntax_consts -"_set_nn_integral" == set_nn_integral and -"_set_lebesgue_integral" == set_lebesgue_integral - + "_set_nn_integral" == set_nn_integral and + "_set_lebesgue_integral" == set_lebesgue_integral translations -"\\<^sup>+x \ A. f \M" == "CONST set_nn_integral M A (\x. f)" -"\x \ A. f \M" == "CONST set_lebesgue_integral M A (\x. f)" + "\\<^sup>+x \ A. f \M" == "CONST set_nn_integral M A (\x. f)" + "\x \ A. f \M" == "CONST set_lebesgue_integral M A (\x. f)" lemma set_nn_integral_cong: assumes "M = M'" "A = B" "\x. x \ space M \ A \ f x = g x" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Analysis/Starlike.thy --- a/src/HOL/Analysis/Starlike.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Analysis/Starlike.thy Wed Oct 09 23:38:29 2024 +0200 @@ -6414,7 +6414,7 @@ subsection\Orthogonal complement\ -definition\<^marker>\tag important\ orthogonal_comp (\_\<^sup>\\ [80] 80) +definition\<^marker>\tag important\ orthogonal_comp (\(\open_block notation=\postfix \\\_\<^sup>\)\ [80] 80) where "orthogonal_comp W \ {x. \y \ W. orthogonal y x}" proposition subspace_orthogonal_comp: "subspace (W\<^sup>\)" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/Cardinality.thy --- a/src/HOL/Library/Cardinality.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/Cardinality.thy Wed Oct 09 23:38:29 2024 +0200 @@ -30,7 +30,7 @@ subsection \Cardinalities of types\ -syntax "_type_card" :: "type => nat" (\(1CARD/(1'(_')))\) +syntax "_type_card" :: "type => nat" (\(\indent=1 notation=\mixfix CARD\\CARD/(1'(_')))\) syntax_consts "_type_card" == card diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/FuncSet.thy --- a/src/HOL/Library/FuncSet.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/FuncSet.thy Wed Oct 09 23:38:29 2024 +0200 @@ -28,8 +28,10 @@ end syntax - "_Pi" :: "pttrn \ 'a set \ 'b set \ ('a \ 'b) set" (\(3\ _\_./ _)\ 10) - "_lam" :: "pttrn \ 'a set \ ('a \ 'b) \ ('a \ 'b)" (\(3\_\_./ _)\ [0,0,3] 3) + "_Pi" :: "pttrn \ 'a set \ 'b set \ ('a \ 'b) set" + (\(\indent=3 notation=\binder \\\\\ _\_./ _)\ 10) + "_lam" :: "pttrn \ 'a set \ ('a \ 'b) \ ('a \ 'b)" + (\(\indent=3 notation=\binder \\\\\_\_./ _)\ [0, 0, 3] 3) syntax_consts "_Pi" \ Pi and "_lam" \ restrict @@ -350,7 +352,8 @@ abbreviation "Pi\<^sub>E A B \ PiE A B" syntax - "_PiE" :: "pttrn \ 'a set \ 'b set \ ('a \ 'b) set" (\(3\\<^sub>E _\_./ _)\ 10) + "_PiE" :: "pttrn \ 'a set \ 'b set \ ('a \ 'b) set" + (\(\indent=3 notation=\binder \\<^sub>E\\\\\<^sub>E _\_./ _)\ 10) syntax_consts "_PiE" \ Pi\<^sub>E translations diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/Going_To_Filter.thy --- a/src/HOL/Library/Going_To_Filter.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/Going_To_Filter.thy Wed Oct 09 23:38:29 2024 +0200 @@ -12,8 +12,8 @@ begin definition going_to_within :: "('a \ 'b) \ 'b filter \ 'a set \ 'a filter" - (\(_)/ going'_to (_)/ within (_)\ [1000,60,60] 60) where - "f going_to F within A = inf (filtercomap f F) (principal A)" + (\(\open_block notation=\mixfix going_to_within\\(_)/ going'_to (_)/ within (_))\ [1000,60,60] 60) + where "f going_to F within A = inf (filtercomap f F) (principal A)" abbreviation going_to :: "('a \ 'b) \ 'b filter \ 'a filter" (infix \going'_to\ 60) diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/Groups_Big_Fun.thy --- a/src/HOL/Library/Groups_Big_Fun.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/Groups_Big_Fun.thy Wed Oct 09 23:38:29 2024 +0200 @@ -199,9 +199,9 @@ end syntax (ASCII) - "_Sum_any" :: "pttrn \ 'a \ 'a::comm_monoid_add" (\(3SUM _. _)\ [0, 10] 10) + "_Sum_any" :: "pttrn \ 'a \ 'a::comm_monoid_add" (\(\indent=3 notation=\binder SUM\\SUM _. _)\ [0, 10] 10) syntax - "_Sum_any" :: "pttrn \ 'a \ 'a::comm_monoid_add" (\(3\_. _)\ [0, 10] 10) + "_Sum_any" :: "pttrn \ 'a \ 'a::comm_monoid_add" (\(\indent=2 notation=\binder \\\\_. _)\ [0, 10] 10) syntax_consts "_Sum_any" \ Sum_any translations @@ -254,9 +254,9 @@ end syntax (ASCII) - "_Prod_any" :: "pttrn \ 'a \ 'a::comm_monoid_mult" (\(3PROD _. _)\ [0, 10] 10) + "_Prod_any" :: "pttrn \ 'a \ 'a::comm_monoid_mult" (\(\indent=4 notation=\binder PROD\\PROD _. _)\ [0, 10] 10) syntax - "_Prod_any" :: "pttrn \ 'a \ 'a::comm_monoid_mult" (\(3\_. _)\ [0, 10] 10) + "_Prod_any" :: "pttrn \ 'a \ 'a::comm_monoid_mult" (\(\indent=2 notation=\binder \\\\_. _)\ [0, 10] 10) syntax_consts "_Prod_any" == Prod_any translations diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/Interval.thy --- a/src/HOL/Library/Interval.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/Interval.thy Wed Oct 09 23:38:29 2024 +0200 @@ -204,7 +204,7 @@ subsection \Membership\ -abbreviation (in preorder) in_interval (\(_/ \\<^sub>i _)\ [51, 51] 50) +abbreviation (in preorder) in_interval (\(\notation=\infix \\<^sub>i\\_/ \\<^sub>i _)\ [51, 51] 50) where "in_interval x X \ x \ set_of X" lemma in_interval_to_interval[intro!]: "a \\<^sub>i interval_of a" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/Interval_Float.thy --- a/src/HOL/Library/Interval_Float.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/Interval_Float.thy Wed Oct 09 23:38:29 2024 +0200 @@ -92,8 +92,8 @@ "x \\<^sub>i X" if "lower X \ x" "x \ upper X" using that by (auto simp: set_of_eq) -abbreviation in_real_interval (\(_/ \\<^sub>r _)\ [51, 51] 50) where - "x \\<^sub>r X \ x \\<^sub>i real_interval X" +abbreviation in_real_interval (\(\notation=\infix \\<^sub>r\\_/ \\<^sub>r _)\ [51, 51] 50) + where "x \\<^sub>r X \ x \\<^sub>i real_interval X" lemma in_real_intervalI: "x \\<^sub>r X" if "lower X \ x" "x \ upper X" for x::real and X::"float interval" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/Landau_Symbols.thy --- a/src/HOL/Library/Landau_Symbols.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/Landau_Symbols.thy Wed Oct 09 23:38:29 2024 +0200 @@ -26,39 +26,39 @@ \ definition bigo :: "'a filter \ ('a \ ('b :: real_normed_field)) \ ('a \ 'b) set" - (\(1O[_]'(_'))\) + (\(\indent=1 notation=\mixfix bigo\\O[_]'(_'))\) where "bigo F g = {f. (\c>0. eventually (\x. norm (f x) \ c * norm (g x)) F)}" definition smallo :: "'a filter \ ('a \ ('b :: real_normed_field)) \ ('a \ 'b) set" - (\(1o[_]'(_'))\) + (\(\indent=1 notation=\mixfix smallo\\o[_]'(_'))\) where "smallo F g = {f. (\c>0. eventually (\x. norm (f x) \ c * norm (g x)) F)}" definition bigomega :: "'a filter \ ('a \ ('b :: real_normed_field)) \ ('a \ 'b) set" - (\(1\[_]'(_'))\) + (\(\indent=1 notation=\mixfix bigomega\\\[_]'(_'))\) where "bigomega F g = {f. (\c>0. eventually (\x. norm (f x) \ c * norm (g x)) F)}" definition smallomega :: "'a filter \ ('a \ ('b :: real_normed_field)) \ ('a \ 'b) set" - (\(1\[_]'(_'))\) + (\(\indent=1 notation=\mixfix smallomega\\\[_]'(_'))\) where "smallomega F g = {f. (\c>0. eventually (\x. norm (f x) \ c * norm (g x)) F)}" definition bigtheta :: "'a filter \ ('a \ ('b :: real_normed_field)) \ ('a \ 'b) set" - (\(1\[_]'(_'))\) + (\(\indent=1 notation=\mixfix bigtheta\\\[_]'(_'))\) where "bigtheta F g = bigo F g \ bigomega F g" -abbreviation bigo_at_top (\(2O'(_'))\) where - "O(g) \ bigo at_top g" +abbreviation bigo_at_top (\(\indent=2 notation=\mixfix bigo\\O'(_'))\) + where "O(g) \ bigo at_top g" -abbreviation smallo_at_top (\(2o'(_'))\) where - "o(g) \ smallo at_top g" +abbreviation smallo_at_top (\(\indent=2 notation=\mixfix smallo\\o'(_'))\) + where "o(g) \ smallo at_top g" -abbreviation bigomega_at_top (\(2\'(_'))\) where - "\(g) \ bigomega at_top g" +abbreviation bigomega_at_top (\(\indent=2 notation=\mixfix bigomega\\\'(_'))\) + where "\(g) \ bigomega at_top g" -abbreviation smallomega_at_top (\(2\'(_'))\) where - "\(g) \ smallomega at_top g" +abbreviation smallomega_at_top (\(\indent=2 notation=\mixfix smallomega\\\'(_'))\) + where "\(g) \ smallomega at_top g" -abbreviation bigtheta_at_top (\(2\'(_'))\) where - "\(g) \ bigtheta at_top g" +abbreviation bigtheta_at_top (\(\indent=2 notation=\mixfix bigtheta\\\'(_'))\) + where "\(g) \ bigtheta at_top g" text \The following is a set of properties that all Landau symbols satisfy.\ @@ -1735,7 +1735,7 @@ named_theorems asymp_equiv_simps definition asymp_equiv :: "('a \ ('b :: real_normed_field)) \ 'a filter \ ('a \ 'b) \ bool" - (\_ \[_] _\ [51, 10, 51] 50) + (\(\open_block notation=\mixfix asymp_equiv\\_ \[_] _)\ [51, 10, 51] 50) where "f \[F] g \ ((\x. if f x = 0 \ g x = 0 then 1 else f x / g x) \ 1) F" abbreviation (input) asymp_equiv_at_top where diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/ListVector.thy --- a/src/HOL/Library/ListVector.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/ListVector.thy Wed Oct 09 23:38:29 2024 +0200 @@ -99,8 +99,8 @@ subsection "Inner product" -definition iprod :: "'a::ring list \ 'a list \ 'a" (\\_,_\\) where -"\xs,ys\ = (\(x,y) \ zip xs ys. x*y)" +definition iprod :: "'a::ring list \ 'a list \ 'a" (\(\open_block notation=\mixfix iprod\\\_,_\)\) + where "\xs,ys\ = (\(x,y) \ zip xs ys. x*y)" lemma iprod_Nil[simp]: "\[],ys\ = 0" by(simp add: iprod_def) diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/Multiset.thy --- a/src/HOL/Library/Multiset.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/Multiset.thy Wed Oct 09 23:38:29 2024 +0200 @@ -133,22 +133,22 @@ notation member_mset (\'(\#')\) and - member_mset (\(_/ \# _)\ [50, 51] 50) + member_mset (\(\notation=\infix \#\\_/ \# _)\ [50, 51] 50) notation (ASCII) member_mset (\'(:#')\) and - member_mset (\(_/ :# _)\ [50, 51] 50) + member_mset (\(\notation=\infix :#\\_/ :# _)\ [50, 51] 50) abbreviation not_member_mset :: \'a \ 'a multiset \ bool\ where \not_member_mset a M \ a \ set_mset M\ notation not_member_mset (\'(\#')\) and - not_member_mset (\(_/ \# _)\ [50, 51] 50) + not_member_mset (\(\notation=\infix \#\\_/ \# _)\ [50, 51] 50) notation (ASCII) not_member_mset (\'(~:#')\) and - not_member_mset (\(_/ ~:# _)\ [50, 51] 50) + not_member_mset (\(\notation=\infix ~:#\\_/ ~:# _)\ [50, 51] 50) context begin @@ -162,17 +162,18 @@ end syntax - "_MBall" :: "pttrn \ 'a set \ bool \ bool" (\(3\_\#_./ _)\ [0, 0, 10] 10) - "_MBex" :: "pttrn \ 'a set \ bool \ bool" (\(3\_\#_./ _)\ [0, 0, 10] 10) - + "_MBall" :: "pttrn \ 'a set \ bool \ bool" + (\(\indent=3 notation=\binder \\\\_\#_./ _)\ [0, 0, 10] 10) + "_MBex" :: "pttrn \ 'a set \ bool \ bool" + (\(\indent=3 notation=\binder \\\\_\#_./ _)\ [0, 0, 10] 10) syntax (ASCII) - "_MBall" :: "pttrn \ 'a set \ bool \ bool" (\(3\_:#_./ _)\ [0, 0, 10] 10) - "_MBex" :: "pttrn \ 'a set \ bool \ bool" (\(3\_:#_./ _)\ [0, 0, 10] 10) - + "_MBall" :: "pttrn \ 'a set \ bool \ bool" + (\(\indent=3 notation=\binder \\\\_:#_./ _)\ [0, 0, 10] 10) + "_MBex" :: "pttrn \ 'a set \ bool \ bool" + (\(\indent=3 notation=\binder \\\\_:#_./ _)\ [0, 0, 10] 10) syntax_consts "_MBall" \ Multiset.Ball and "_MBex" \ Multiset.Bex - translations "\x\#A. P" \ "CONST Multiset.Ball A (\x. P)" "\x\#A. P" \ "CONST Multiset.Bex A (\x. P)" @@ -1249,9 +1250,11 @@ by (rule filter_preserves_multiset) syntax (ASCII) - "_MCollect" :: "pttrn \ 'a multiset \ bool \ 'a multiset" (\(1{#_ :# _./ _#})\) + "_MCollect" :: "pttrn \ 'a multiset \ bool \ 'a multiset" + (\(\indent=1 notation=\mixfix multiset comprehension\\{#_ :# _./ _#})\) syntax - "_MCollect" :: "pttrn \ 'a multiset \ bool \ 'a multiset" (\(1{#_ \# _./ _#})\) + "_MCollect" :: "pttrn \ 'a multiset \ bool \ 'a multiset" + (\(\indent=1 notation=\mixfix multiset comprehension\\{#_ \# _./ _#})\) syntax_consts "_MCollect" == filter_mset translations @@ -1824,18 +1827,22 @@ image_mset_subseteq_mono subset_mset.less_le_not_le) syntax (ASCII) - "_comprehension_mset" :: "'a \ 'b \ 'b multiset \ 'a multiset" (\({#_/. _ :# _#})\) + "_comprehension_mset" :: "'a \ 'b \ 'b multiset \ 'a multiset" + (\(\notation=\mixfix multiset comprehension\\{#_/. _ :# _#})\) syntax - "_comprehension_mset" :: "'a \ 'b \ 'b multiset \ 'a multiset" (\({#_/. _ \# _#})\) + "_comprehension_mset" :: "'a \ 'b \ 'b multiset \ 'a multiset" + (\(\notation=\mixfix multiset comprehension\\{#_/. _ \# _#})\) syntax_consts "_comprehension_mset" \ image_mset translations "{#e. x \# M#}" \ "CONST image_mset (\x. e) M" syntax (ASCII) - "_comprehension_mset'" :: "'a \ 'b \ 'b multiset \ bool \ 'a multiset" (\({#_/ | _ :# _./ _#})\) + "_comprehension_mset'" :: "'a \ 'b \ 'b multiset \ bool \ 'a multiset" + (\(\notation=\mixfix multiset comprehension\\{#_/ | _ :# _./ _#})\) syntax - "_comprehension_mset'" :: "'a \ 'b \ 'b multiset \ bool \ 'a multiset" (\({#_/ | _ \# _./ _#})\) + "_comprehension_mset'" :: "'a \ 'b \ 'b multiset \ bool \ 'a multiset" + (\(\notation=\mixfix multiset comprehension\\{#_/ | _ \# _./ _#})\) syntax_consts "_comprehension_mset'" \ image_mset translations @@ -2682,9 +2689,11 @@ notation sum_mset (\\\<^sub>#\) syntax (ASCII) - "_sum_mset_image" :: "pttrn \ 'b set \ 'a \ 'a::comm_monoid_add" (\(3SUM _:#_. _)\ [0, 51, 10] 10) + "_sum_mset_image" :: "pttrn \ 'b set \ 'a \ 'a::comm_monoid_add" + (\(\indent=3 notation=\binder SUM\\SUM _:#_. _)\ [0, 51, 10] 10) syntax - "_sum_mset_image" :: "pttrn \ 'b set \ 'a \ 'a::comm_monoid_add" (\(3\_\#_. _)\ [0, 51, 10] 10) + "_sum_mset_image" :: "pttrn \ 'b set \ 'a \ 'a::comm_monoid_add" + (\(\indent=3 notation=\binder \\\\_\#_. _)\ [0, 51, 10] 10) syntax_consts "_sum_mset_image" \ sum_mset translations @@ -2863,9 +2872,11 @@ notation prod_mset (\\\<^sub>#\) syntax (ASCII) - "_prod_mset_image" :: "pttrn \ 'b set \ 'a \ 'a::comm_monoid_mult" (\(3PROD _:#_. _)\ [0, 51, 10] 10) + "_prod_mset_image" :: "pttrn \ 'b set \ 'a \ 'a::comm_monoid_mult" + (\(\indent=3 notation=\binder PROD\\PROD _:#_. _)\ [0, 51, 10] 10) syntax - "_prod_mset_image" :: "pttrn \ 'b set \ 'a \ 'a::comm_monoid_mult" (\(3\_\#_. _)\ [0, 51, 10] 10) + "_prod_mset_image" :: "pttrn \ 'b set \ 'a \ 'a::comm_monoid_mult" + (\(\indent=3 notation=\binder \\\\_\#_. _)\ [0, 51, 10] 10) syntax_consts "_prod_mset_image" \ prod_mset translations diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/Omega_Words_Fun.thy --- a/src/HOL/Library/Omega_Words_Fun.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/Omega_Words_Fun.thy Wed Oct 09 23:38:29 2024 +0200 @@ -48,7 +48,7 @@ where "w \ x == \n. if n < length w then w!n else x (n - length w)" definition - iter :: "'a list \ 'a word" (\(_\<^sup>\)\ [1000]) + iter :: "'a list \ 'a word" (\(\notation=\postfix \\\_\<^sup>\)\ [1000]) where "iter w == if w = [] then undefined else (\n. w!(n mod (length w)))" lemma conc_empty[simp]: "[] \ w = w" @@ -116,7 +116,8 @@ definition suffix :: "[nat, 'a word] \ 'a word" where "suffix k x \ \n. x (k+n)" -definition subsequence :: "'a word \ nat \ nat \ 'a list" (\_ [_ \ _]\ 900) +definition subsequence :: "'a word \ nat \ nat \ 'a list" + (\(\open_block notation=\mixfix subsequence\\_ [_ \ _])\ 900) where "subsequence w i j \ map w [i.. 'a word \ 'a list" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/Phantom_Type.thy --- a/src/HOL/Library/Phantom_Type.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/Phantom_Type.thy Wed Oct 09 23:38:29 2024 +0200 @@ -17,7 +17,7 @@ and of_phantom_comp_phantom [simp]: "of_phantom \ phantom = id" by(simp_all add: o_def id_def) -syntax "_Phantom" :: "type \ logic" (\(1Phantom/(1'(_')))\) +syntax "_Phantom" :: "type \ logic" (\(\indent=1 notation=\mixfix Phantom\\Phantom/(1'(_')))\) syntax_consts "_Phantom" == phantom translations "Phantom('t)" => "CONST phantom :: _ \ ('t, _) phantom" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/Preorder.thy --- a/src/HOL/Library/Preorder.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/Preorder.thy Wed Oct 09 23:38:29 2024 +0200 @@ -14,7 +14,7 @@ notation equiv (\'(\')\) and - equiv (\(_/ \ _)\ [51, 51] 50) + equiv (\(\notation=\infix \\\_/ \ _)\ [51, 51] 50) lemma equivD1: "x \ y" if "x \ y" using that by (simp add: equiv_def) diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/Quotient_Type.thy --- a/src/HOL/Library/Quotient_Type.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/Quotient_Type.thy Wed Oct 09 23:38:29 2024 +0200 @@ -76,7 +76,7 @@ text \Abstracted equivalence classes are the canonical representation of elements of a quotient type.\ -definition "class" :: "'a::equiv \ 'a quot" (\\_\\) +definition "class" :: "'a::equiv \ 'a quot" (\(\open_block notation=\mixfix class\\\_\)\) where "\a\ = Abs_quot {x. a \ x}" theorem quot_exhaust: "\a. A = \a\" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/Ramsey.thy --- a/src/HOL/Library/Ramsey.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/Ramsey.thy Wed Oct 09 23:38:29 2024 +0200 @@ -15,7 +15,7 @@ subsubsection \The $n$-element subsets of a set $A$\ -definition nsets :: "['a set, nat] \ 'a set set" (\([_]\<^bsup>_\<^esup>)\ [0,999] 999) +definition nsets :: "['a set, nat] \ 'a set set" (\(\notation=\mixfix nsets\\[_]\<^bsup>_\<^esup>)\ [0,999] 999) where "nsets A n \ {N. N \ A \ finite N \ card N = n}" lemma finite_imp_finite_nsets: "finite A \ finite ([A]\<^bsup>k\<^esup>)" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/Real_Mod.thy --- a/src/HOL/Library/Real_Mod.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/Real_Mod.thy Wed Oct 09 23:38:29 2024 +0200 @@ -106,8 +106,9 @@ -definition rcong :: "real \ real \ real \ bool" (\(1[_ = _] '(' rmod _'))\) where - "[x = y] (rmod m) \ x rmod m = y rmod m" +definition rcong :: "real \ real \ real \ bool" + (\(\indent=1 notation=\mixfix rcong\\[_ = _] '(' rmod _'))\) + where "[x = y] (rmod m) \ x rmod m = y rmod m" named_theorems rcong_intros diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/Tree.thy --- a/src/HOL/Library/Tree.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/Tree.thy Wed Oct 09 23:38:29 2024 +0200 @@ -9,7 +9,7 @@ datatype 'a tree = Leaf (\\\\) | - Node "'a tree" ("value": 'a) "'a tree" (\(1\_,/ _,/ _\)\) + Node "'a tree" ("value": 'a) "'a tree" (\(\indent=1 notation=\mixfix Node\\\_,/ _,/ _\)\) datatype_compat tree primrec left :: "'a tree \ 'a tree" where diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/Word.thy --- a/src/HOL/Library/Word.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/Word.thy Wed Oct 09 23:38:29 2024 +0200 @@ -1685,12 +1685,12 @@ notation word_sle (\'(\s')\) and - word_sle (\(_/ \s _)\ [51, 51] 50) and + word_sle (\(\notation=\infix \s\\_/ \s _)\ [51, 51] 50) and word_sless (\'() and - word_sless (\(_/ [51, 51] 50) + word_sless (\(\notation=\infix \_/ [51, 51] 50) notation (input) - word_sle (\(_/ <=s _)\ [51, 51] 50) + word_sle (\(\notation=\infix <=s\\_/ <=s _)\ [51, 51] 50) lemma word_sle_eq [code]: \a <=s b \ sint a \ sint b\ diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Nonstandard_Analysis/HDeriv.thy --- a/src/HOL/Nonstandard_Analysis/HDeriv.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Nonstandard_Analysis/HDeriv.thy Wed Oct 09 23:38:29 2024 +0200 @@ -13,7 +13,7 @@ text \Nonstandard Definitions.\ definition nsderiv :: "['a::real_normed_field \ 'a, 'a, 'a] \ bool" - (\(NSDERIV (_)/ (_)/ :> (_))\ [1000, 1000, 60] 60) + (\(\notation=\mixfix NSDERIV\\NSDERIV (_)/ (_)/ :> (_))\ [1000, 1000, 60] 60) where "NSDERIV f x :> D \ (\h \ Infinitesimal - {0}. (( *f* f)(star_of x + h) - star_of (f x)) / h \ star_of D)" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Nonstandard_Analysis/HLim.thy --- a/src/HOL/Nonstandard_Analysis/HLim.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Nonstandard_Analysis/HLim.thy Wed Oct 09 23:38:29 2024 +0200 @@ -13,7 +13,7 @@ text \Nonstandard Definitions.\ definition NSLIM :: "('a::real_normed_vector \ 'b::real_normed_vector) \ 'a \ 'b \ bool" - (\((_)/ \(_)/\\<^sub>N\<^sub>S (_))\ [60, 0, 60] 60) + (\(\notation=\mixfix NSLIM\\(_)/ \(_)/\\<^sub>N\<^sub>S (_))\ [60, 0, 60] 60) where "f \a\\<^sub>N\<^sub>S L \ (\x. x \ star_of a \ x \ star_of a \ ( *f* f) x \ star_of L)" definition isNSCont :: "('a::real_normed_vector \ 'b::real_normed_vector) \ 'a \ bool" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Nonstandard_Analysis/HSEQ.thy --- a/src/HOL/Nonstandard_Analysis/HSEQ.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Nonstandard_Analysis/HSEQ.thy Wed Oct 09 23:38:29 2024 +0200 @@ -16,7 +16,7 @@ begin definition NSLIMSEQ :: "(nat \ 'a::real_normed_vector) \ 'a \ bool" - (\((_)/ \\<^sub>N\<^sub>S (_))\ [60, 60] 60) where + (\(\notation=\mixfix NSLIMSEQ\\(_)/ \\<^sub>N\<^sub>S (_))\ [60, 60] 60) where \ \Nonstandard definition of convergence of sequence\ "X \\<^sub>N\<^sub>S L \ (\N \ HNatInfinite. ( *f* X) N \ star_of L)" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Nonstandard_Analysis/Star.thy --- a/src/HOL/Nonstandard_Analysis/Star.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Nonstandard_Analysis/Star.thy Wed Oct 09 23:38:29 2024 +0200 @@ -11,7 +11,8 @@ begin definition \ \internal sets\ - starset_n :: "(nat \ 'a set) \ 'a star set" (\*sn* _\ [80] 80) + starset_n :: "(nat \ 'a set) \ 'a star set" + (\(\open_block notation=\prefix starset_n\\*sn* _)\ [80] 80) where "*sn* As = Iset (star_n As)" definition InternalSets :: "'a star set set" @@ -23,7 +24,8 @@ (\x y. \X \ Rep_star x. \Y \ Rep_star y. y = F x \ eventually (\n. Y n = f(X n)) \)" definition \ \internal functions\ - starfun_n :: "(nat \ 'a \ 'b) \ 'a star \ 'b star" (\*fn* _\ [80] 80) + starfun_n :: "(nat \ 'a \ 'b) \ 'a star \ 'b star" + (\(\open_block notation=\prefix starfun_n\\*fn* _)\ [80] 80) where "*fn* F = Ifun (star_n F)" definition InternalFuns :: "('a star => 'b star) set" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Nonstandard_Analysis/StarDef.thy --- a/src/HOL/Nonstandard_Analysis/StarDef.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Nonstandard_Analysis/StarDef.thy Wed Oct 09 23:38:29 2024 +0200 @@ -72,7 +72,8 @@ by (simp add: FreeUltrafilterNat.proper) text \Standard principles that play a central role in the transfer tactic.\ -definition Ifun :: "('a \ 'b) star \ 'a star \ 'b star" (\(_ \/ _)\ [300, 301] 300) +definition Ifun :: "('a \ 'b) star \ 'a star \ 'b star" + (\(\notation=\infix \\\_ \/ _)\ [300, 301] 300) where "Ifun f \ \x. Abs_star (\F\Rep_star f. \X\Rep_star x. starrel``{\n. F n (X n)})" @@ -183,10 +184,12 @@ text \Nonstandard extensions of functions.\ -definition starfun :: "('a \ 'b) \ 'a star \ 'b star" (\*f* _\ [80] 80) +definition starfun :: "('a \ 'b) \ 'a star \ 'b star" + (\(\open_block notation=\prefix starfun\\*f* _)\ [80] 80) where "starfun f \ \x. star_of f \ x" -definition starfun2 :: "('a \ 'b \ 'c) \ 'a star \ 'b star \ 'c star" (\*f2* _\ [80] 80) +definition starfun2 :: "('a \ 'b \ 'c) \ 'a star \ 'b star \ 'c star" + (\(\open_block notation=\prefix starfun2\\*f2* _)\ [80] 80) where "starfun2 f \ \x y. star_of f \ x \ y" declare starfun_def [transfer_unfold] @@ -270,10 +273,12 @@ lemma transfer_unstar [transfer_intro]: "p \ star_n P \ unstar p \ eventually P \" by (simp only: unstar_star_n) -definition starP :: "('a \ bool) \ 'a star \ bool" (\*p* _\ [80] 80) +definition starP :: "('a \ bool) \ 'a star \ bool" + (\(\open_block notation=\prefix starP\\*p* _)\ [80] 80) where "*p* P = (\x. unstar (star_of P \ x))" -definition starP2 :: "('a \ 'b \ bool) \ 'a star \ 'b star \ bool" (\*p2* _\ [80] 80) +definition starP2 :: "('a \ 'b \ bool) \ 'a star \ 'b star \ bool" + (\(\open_block notation=\prefix starP2\\*p2* _)\ [80] 80) where "*p2* P = (\x y. unstar (star_of P \ x \ y))" declare starP_def [transfer_unfold] @@ -332,7 +337,8 @@ text \Nonstandard extensions of sets.\ -definition starset :: "'a set \ 'a star set" (\*s* _\ [80] 80) +definition starset :: "'a set \ 'a star set" + (\(\open_block notation=\prefix starset\\*s* _)\ [80] 80) where "starset A = Iset (star_of A)" declare starset_def [transfer_unfold] diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Number_Theory/Cong.thy --- a/src/HOL/Number_Theory/Cong.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Number_Theory/Cong.thy Wed Oct 09 23:38:29 2024 +0200 @@ -37,11 +37,13 @@ context unique_euclidean_semiring begin -definition cong :: "'a \ 'a \ 'a \ bool" (\(1[_ = _] '(' mod _'))\) - where "cong b c a \ b mod a = c mod a" +definition cong :: "'a \ 'a \ 'a \ bool" + (\(\indent=1 notation=\mixfix cong\\[_ = _] '(' mod _'))\) + where "[b = c] (mod a) \ b mod a = c mod a" -abbreviation notcong :: "'a \ 'a \ 'a \ bool" (\(1[_ \ _] '(' mod _'))\) - where "notcong b c a \ \ cong b c a" +abbreviation notcong :: "'a \ 'a \ 'a \ bool" + (\(\indent=1 notation=\mixfix notcong\\[_ \ _] '(' mod _'))\) + where "[b \ c] (mod a) \ \ cong b c a" lemma cong_refl [simp]: "[b = b] (mod a)" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Probability/Fin_Map.thy --- a/src/HOL/Probability/Fin_Map.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Probability/Fin_Map.thy Wed Oct 09 23:38:29 2024 +0200 @@ -13,7 +13,7 @@ stay close to the developments of (finite) products \<^const>\Pi\<^sub>E\ and their sigma-algebra \<^const>\Pi\<^sub>M\.\ -type_notation fmap (\(_ \\<^sub>F /_)\ [22, 21] 21) +type_notation fmap (\(\notation=\infix fmap\\_ \\<^sub>F /_)\ [22, 21] 21) unbundle fmap.lifting @@ -25,7 +25,8 @@ lemma finite_domain[simp, intro]: "finite (domain P)" by transfer simp -lift_definition proj :: "('i \\<^sub>F 'a) \ 'i \ 'a" (\'((_)')\<^sub>F\ [0] 1000) is +lift_definition proj :: "('i \\<^sub>F 'a) \ 'i \ 'a" + (\(\indent=1 notation=\mixfix proj\\'(_')\<^sub>F)\ [0] 1000) is "\f x. if x \ dom f then the (f x) else undefined" . declare [[coercion proj]] @@ -89,7 +90,8 @@ "Pi' I A = { P. domain P = I \ (\i. i \ I \ (P)\<^sub>F i \ A i) } " syntax - "_Pi'" :: "[pttrn, 'a set, 'b set] => ('a => 'b) set" (\(3\'' _\_./ _)\ 10) + "_Pi'" :: "[pttrn, 'a set, 'b set] => ('a => 'b) set" + (\(\indent=3 notation=\binder \'\\\'' _\_./ _)\ 10) syntax_consts "_Pi'" == Pi' translations @@ -636,7 +638,8 @@ "Pi\<^sub>F I M \ PiF I M" syntax - "_PiF" :: "pttrn \ 'i set \ 'a measure \ ('i => 'a) measure" (\(3\\<^sub>F _\_./ _)\ 10) + "_PiF" :: "pttrn \ 'i set \ 'a measure \ ('i => 'a) measure" + (\(\indent=3 notation=\binder \\<^sub>F\\\\<^sub>F _\_./ _)\ 10) syntax_consts "_PiF" == PiF translations diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Probability/SPMF.thy --- a/src/HOL/Probability/SPMF.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Probability/SPMF.thy Wed Oct 09 23:38:29 2024 +0200 @@ -2621,8 +2621,9 @@ subsection \Try\ -definition try_spmf :: "'a spmf \ 'a spmf \ 'a spmf" (\TRY _ ELSE _\ [0,60] 59) -where "try_spmf p q = bind_pmf p (\x. case x of None \ q | Some y \ return_spmf y)" +definition try_spmf :: "'a spmf \ 'a spmf \ 'a spmf" + (\(\open_block notation=\mixfix try_spmf\\TRY _ ELSE _)\ [0,60] 59) +where "TRY p ELSE q = bind_pmf p (\x. case x of None \ q | Some y \ return_spmf y)" lemma try_spmf_lossless [simp]: assumes "lossless_spmf p" diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Unix/Unix.thy --- a/src/HOL/Unix/Unix.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Unix/Unix.thy Wed Oct 09 23:38:29 2024 +0200 @@ -336,7 +336,7 @@ \ inductive transition :: "file \ operation \ file \ bool" - (\_ \_\ _\ [90, 1000, 90] 100) + (\(\open_block notation=\mixfix transition\\_ \_\ _)\ [90, 1000, 90] 100) where read: "root \(Read uid text path)\ root" @@ -475,7 +475,8 @@ running processes over a finite amount of time. \ -inductive transitions :: "file \ operation list \ file \ bool" (\_ \_\ _\ [90, 1000, 90] 100) +inductive transitions :: "file \ operation list \ file \ bool" + (\(\open_block notation=\mixfix transitions\\_ \_\ _)\ [90, 1000, 90] 100) where nil: "root \[]\ root" | cons: "root \(x # xs)\ root''" if "root \x\ root'" and "root' \xs\ root''"