# HG changeset patch # User desharna # Date 1711615311 -3600 # Node ID 67e77f1e6d7bd7b4c5546673c46e9a03c935cdd9 # Parent 804a41d08b8420baa9ee90a8e5b5b189120143a6 added special syntax for FSet.Ball and FSet.Bex diff -r 804a41d08b84 -r 67e77f1e6d7b src/HOL/Library/FSet.thy --- a/src/HOL/Library/FSet.thy Thu Mar 28 09:40:58 2024 +0100 +++ b/src/HOL/Library/FSet.thy Thu Mar 28 09:41:51 2024 +0100 @@ -192,6 +192,23 @@ end +syntax (input) + "_fBall" :: "pttrn \ 'a fset \ bool \ bool" ("(3! (_/|:|_)./ _)" [0, 0, 10] 10) + "_fBex" :: "pttrn \ 'a fset \ bool \ bool" ("(3? (_/|:|_)./ _)" [0, 0, 10] 10) + +syntax + "_fBall" :: "pttrn \ 'a fset \ bool \ bool" ("(3\(_/|\|_)./ _)" [0, 0, 10] 10) + "_fBex" :: "pttrn \ 'a fset \ bool \ bool" ("(3\(_/|\|_)./ _)" [0, 0, 10] 10) + +translations + "\x|\|A. P" \ "CONST FSet.Ball A (\x. P)" + "\x|\|A. P" \ "CONST FSet.Bex A (\x. P)" + +print_translation \ + [Syntax_Trans.preserve_binder_abs2_tr' \<^const_syntax>\fBall\ \<^syntax_const>\_fBall\, + Syntax_Trans.preserve_binder_abs2_tr' \<^const_syntax>\fBex\ \<^syntax_const>\_fBex\] +\ \ \to avoid eta-contraction of body\ + context includes lifting_syntax begin