diff -r 56f1c0af602c -r 8e72f55295fd src/HOL/Set.thy --- a/src/HOL/Set.thy Mon Sep 23 15:01:10 2024 +0200 +++ b/src/HOL/Set.thy Mon Sep 23 21:09:23 2024 +0200 @@ -21,34 +21,34 @@ notation member (\'(\')\) and - member (\(_/ \ _)\ [51, 51] 50) + member (\(\notation=\infix \\\_/ \ _)\ [51, 51] 50) abbreviation not_member where "not_member x A \ \ (x \ A)" \ \non-membership\ notation not_member (\'(\')\) and - not_member (\(_/ \ _)\ [51, 51] 50) + not_member (\(\notation=\infix \\\_/ \ _)\ [51, 51] 50) notation (ASCII) member (\'(:')\) and - member (\(_/ : _)\ [51, 51] 50) and + member (\(\notation=\infix :\\_/ : _)\ [51, 51] 50) and not_member (\'(~:')\) and - not_member (\(_/ ~: _)\ [51, 51] 50) + not_member (\(\notation=\infix ~:\\_/ ~: _)\ [51, 51] 50) text \Set comprehensions\ syntax - "_Coll" :: "pttrn \ bool \ 'a set" (\(1{_./ _})\) + "_Coll" :: "pttrn \ bool \ 'a set" (\(\indent=1 notation=\mixfix Collect\\{_./ _})\) syntax_consts "_Coll" \ Collect translations "{x. P}" \ "CONST Collect (\x. P)" syntax (ASCII) - "_Collect" :: "pttrn \ 'a set \ bool \ 'a set" (\(1{(_/: _)./ _})\) + "_Collect" :: "pttrn \ 'a set \ bool \ 'a set" (\(\indent=1 notation=\mixfix Collect\\{(_/: _)./ _})\) syntax - "_Collect" :: "pttrn \ 'a set \ bool \ 'a set" (\(1{(_/ \ _)./ _})\) + "_Collect" :: "pttrn \ 'a set \ bool \ 'a set" (\(\indent=1 notation=\mixfix Collect\\{(_/ \ _)./ _})\) syntax_consts "_Collect" \ Collect translations @@ -165,9 +165,9 @@ notation subset (\'(\')\) and - subset (\(_/ \ _)\ [51, 51] 50) and + subset (\(\notation=\infix \\\_/ \ _)\ [51, 51] 50) and subset_eq (\'(\')\) and - subset_eq (\(_/ \ _)\ [51, 51] 50) + subset_eq (\(\notation=\infix \\\_/ \ _)\ [51, 51] 50) abbreviation (input) supset :: "'a set \ 'a set \ bool" where @@ -179,15 +179,15 @@ notation supset (\'(\')\) and - supset (\(_/ \ _)\ [51, 51] 50) and + supset (\(\notation=\infix \\\_/ \ _)\ [51, 51] 50) and supset_eq (\'(\')\) and - supset_eq (\(_/ \ _)\ [51, 51] 50) + supset_eq (\(\notation=\infix \\\_/ \ _)\ [51, 51] 50) notation (ASCII output) subset (\'(<')\) and - subset (\(_/ < _)\ [51, 51] 50) and + subset (\(\notation=\infix <\\_/ < _)\ [51, 51] 50) and subset_eq (\'(<=')\) and - subset_eq (\(_/ <= _)\ [51, 51] 50) + subset_eq (\(\notation=\infix <=\\_/ <= _)\ [51, 51] 50) definition Ball :: "'a set \ ('a \ bool) \ bool" where "Ball A P \ (\x. x \ A \ P x)" \ \bounded universal quantifiers\ @@ -196,21 +196,21 @@ where "Bex A P \ (\x. x \ A \ P x)" \ \bounded existential quantifiers\ syntax (ASCII) - "_Ball" :: "pttrn \ 'a set \ bool \ bool" (\(3ALL (_/:_)./ _)\ [0, 0, 10] 10) - "_Bex" :: "pttrn \ 'a set \ bool \ bool" (\(3EX (_/:_)./ _)\ [0, 0, 10] 10) - "_Bex1" :: "pttrn \ 'a set \ bool \ bool" (\(3EX! (_/:_)./ _)\ [0, 0, 10] 10) - "_Bleast" :: "id \ 'a set \ bool \ 'a" (\(3LEAST (_/:_)./ _)\ [0, 0, 10] 10) + "_Ball" :: "pttrn \ 'a set \ bool \ bool" (\(\indent=3 notation=\binder ALL :\\ALL (_/:_)./ _)\ [0, 0, 10] 10) + "_Bex" :: "pttrn \ 'a set \ bool \ bool" (\(\indent=3 notation=\binder EX :\\EX (_/:_)./ _)\ [0, 0, 10] 10) + "_Bex1" :: "pttrn \ 'a set \ bool \ bool" (\(\indent=3 notation=\binder EX! :\\EX! (_/:_)./ _)\ [0, 0, 10] 10) + "_Bleast" :: "id \ 'a set \ bool \ 'a" (\(\indent=3 notation=\binder LEAST :\\LEAST (_/:_)./ _)\ [0, 0, 10] 10) syntax (input) - "_Ball" :: "pttrn \ 'a set \ bool \ bool" (\(3! (_/:_)./ _)\ [0, 0, 10] 10) - "_Bex" :: "pttrn \ 'a set \ bool \ bool" (\(3? (_/:_)./ _)\ [0, 0, 10] 10) - "_Bex1" :: "pttrn \ 'a set \ bool \ bool" (\(3?! (_/:_)./ _)\ [0, 0, 10] 10) + "_Ball" :: "pttrn \ 'a set \ bool \ bool" (\(\indent=3 notation=\binder ! :\\! (_/:_)./ _)\ [0, 0, 10] 10) + "_Bex" :: "pttrn \ 'a set \ bool \ bool" (\(\indent=3 notation=\binder ? :\\? (_/:_)./ _)\ [0, 0, 10] 10) + "_Bex1" :: "pttrn \ 'a set \ bool \ bool" (\(\indent=3 notation=\binder ?! :\\?! (_/:_)./ _)\ [0, 0, 10] 10) syntax - "_Ball" :: "pttrn \ 'a set \ bool \ bool" (\(3\(_/\_)./ _)\ [0, 0, 10] 10) - "_Bex" :: "pttrn \ 'a set \ bool \ bool" (\(3\(_/\_)./ _)\ [0, 0, 10] 10) - "_Bex1" :: "pttrn \ 'a set \ bool \ bool" (\(3\!(_/\_)./ _)\ [0, 0, 10] 10) - "_Bleast" :: "id \ 'a set \ bool \ 'a" (\(3LEAST(_/\_)./ _)\ [0, 0, 10] 10) + "_Ball" :: "pttrn \ 'a set \ bool \ bool" (\(\indent=3 notation=\binder \\\\(_/\_)./ _)\ [0, 0, 10] 10) + "_Bex" :: "pttrn \ 'a set \ bool \ bool" (\(\indent=3 notation=\binder \\\\(_/\_)./ _)\ [0, 0, 10] 10) + "_Bex1" :: "pttrn \ 'a set \ bool \ bool" (\(\indent=3 notation=\binder \!\\\!(_/\_)./ _)\ [0, 0, 10] 10) + "_Bleast" :: "id \ 'a set \ bool \ 'a" (\(\indent=3 notation=\binder LEAST\\LEAST(_/\_)./ _)\ [0, 0, 10] 10) syntax_consts "_Ball" \ Ball and @@ -225,18 +225,18 @@ "LEAST x:A. P" \ "LEAST x. x \ A \ P" syntax (ASCII output) - "_setlessAll" :: "[idt, 'a, bool] \ bool" (\(3ALL _<_./ _)\ [0, 0, 10] 10) - "_setlessEx" :: "[idt, 'a, bool] \ bool" (\(3EX _<_./ _)\ [0, 0, 10] 10) - "_setleAll" :: "[idt, 'a, bool] \ bool" (\(3ALL _<=_./ _)\ [0, 0, 10] 10) - "_setleEx" :: "[idt, 'a, bool] \ bool" (\(3EX _<=_./ _)\ [0, 0, 10] 10) - "_setleEx1" :: "[idt, 'a, bool] \ bool" (\(3EX! _<=_./ _)\ [0, 0, 10] 10) + "_setlessAll" :: "[idt, 'a, bool] \ bool" (\(\indent=3 notation=\binder ALL\\ALL _<_./ _)\ [0, 0, 10] 10) + "_setlessEx" :: "[idt, 'a, bool] \ bool" (\(\indent=3 notation=\binder EX\\EX _<_./ _)\ [0, 0, 10] 10) + "_setleAll" :: "[idt, 'a, bool] \ bool" (\(\indent=3 notation=\binder ALL\\ALL _<=_./ _)\ [0, 0, 10] 10) + "_setleEx" :: "[idt, 'a, bool] \ bool" (\(\indent=3 notation=\binder EX\\EX _<=_./ _)\ [0, 0, 10] 10) + "_setleEx1" :: "[idt, 'a, bool] \ bool" (\(\indent=3 notation=\binder EX!\\EX! _<=_./ _)\ [0, 0, 10] 10) syntax - "_setlessAll" :: "[idt, 'a, bool] \ bool" (\(3\_\_./ _)\ [0, 0, 10] 10) - "_setlessEx" :: "[idt, 'a, bool] \ bool" (\(3\_\_./ _)\ [0, 0, 10] 10) - "_setleAll" :: "[idt, 'a, bool] \ bool" (\(3\_\_./ _)\ [0, 0, 10] 10) - "_setleEx" :: "[idt, 'a, bool] \ bool" (\(3\_\_./ _)\ [0, 0, 10] 10) - "_setleEx1" :: "[idt, 'a, bool] \ bool" (\(3\!_\_./ _)\ [0, 0, 10] 10) + "_setlessAll" :: "[idt, 'a, bool] \ bool" (\(\indent=3 notation=\binder \\\\_\_./ _)\ [0, 0, 10] 10) + "_setlessEx" :: "[idt, 'a, bool] \ bool" (\(\indent=3 notation=\binder \\\\_\_./ _)\ [0, 0, 10] 10) + "_setleAll" :: "[idt, 'a, bool] \ bool" (\(\indent=3 notation=\binder \\\\_\_./ _)\ [0, 0, 10] 10) + "_setleEx" :: "[idt, 'a, bool] \ bool" (\(\indent=3 notation=\binder \\\\_\_./ _)\ [0, 0, 10] 10) + "_setleEx1" :: "[idt, 'a, bool] \ bool" (\(\indent=3 notation=\binder \!\\\!_\_./ _)\ [0, 0, 10] 10) syntax_consts "_setlessAll" "_setleAll" \ All and @@ -291,7 +291,8 @@ \ syntax - "_Setcompr" :: "'a \ idts \ bool \ 'a set" (\(1{_ |/_./ _})\) + "_Setcompr" :: "'a \ idts \ bool \ 'a set" + (\(\indent=1 notation=\mixfix set comprehension\\{_ |/_./ _})\) syntax_consts "_Setcompr" \ Collect