# HG changeset patch # User wenzelm # Date 1728420987 -7200 # Node ID d23f5a898084a86f53b5686095ef97fa88271f89 # Parent 072cc2a92ba3bb3b881b195d7f8efb7da3bb2d00 more syntax bundles; diff -r 072cc2a92ba3 -r d23f5a898084 NEWS --- a/NEWS Tue Oct 08 17:26:31 2024 +0200 +++ b/NEWS Tue Oct 08 22:56:27 2024 +0200 @@ -67,6 +67,8 @@ unbundle no list_syntax unbundle no list_enumeration_syntax unbundle no list_comprehension_syntax + unbundle no relcomp_syntax + unbundle no converse_syntax unbundle no rtrancl_syntax unbundle no trancl_syntax unbundle no reflcl_syntax diff -r 072cc2a92ba3 -r d23f5a898084 src/HOL/Examples/Coherent.thy --- a/src/HOL/Examples/Coherent.thy Tue Oct 08 17:26:31 2024 +0200 +++ b/src/HOL/Examples/Coherent.thy Tue Oct 08 22:56:27 2024 +0200 @@ -11,7 +11,8 @@ subsection \Equivalence of two versions of Pappus' Axiom\ -no_notation comp (infixl \o\ 55) and relcomp (infixr \O\ 75) +no_notation comp (infixl \o\ 55) +unbundle no relcomp_syntax lemma p1p2: assumes "col a b c l \ col d e f m" diff -r 072cc2a92ba3 -r d23f5a898084 src/HOL/Relation.thy --- a/src/HOL/Relation.thy Tue Oct 08 17:26:31 2024 +0200 +++ b/src/HOL/Relation.thy Tue Oct 08 22:56:27 2024 +0200 @@ -969,11 +969,14 @@ subsubsection \Composition\ -inductive_set relcomp :: "('a \ 'b) set \ ('b \ 'c) set \ ('a \ 'c) set" (infixr \O\ 75) +inductive_set relcomp :: "('a \ 'b) set \ ('b \ 'c) set \ ('a \ 'c) set" for r :: "('a \ 'b) set" and s :: "('b \ 'c) set" - where relcompI [intro]: "(a, b) \ r \ (b, c) \ s \ (a, c) \ r O s" + where relcompI [intro]: "(a, b) \ r \ (b, c) \ s \ (a, c) \ relcomp r s" -notation relcompp (infixr \OO\ 75) +open_bundle relcomp_syntax +begin +notation relcomp (infixr \O\ 75) and relcompp (infixr \OO\ 75) +end lemmas relcomppI = relcompp.intros @@ -1074,15 +1077,19 @@ subsubsection \Converse\ -inductive_set converse :: "('a \ 'b) set \ ('b \ 'a) set" (\(\notation=\postfix -1\\_\)\ [1000] 999) +inductive_set converse :: "('a \ 'b) set \ ('b \ 'a) set" for r :: "('a \ 'b) set" - where "(a, b) \ r \ (b, a) \ r\" + where "(a, b) \ r \ (b, a) \ converse r" -notation conversep (\(\notation=\postfix -1-1\\_\\)\ [1000] 1000) - +open_bundle converse_syntax +begin +notation + converse (\(\notation=\postfix -1\\_\)\ [1000] 999) and + conversep (\(\notation=\postfix -1-1\\_\\)\ [1000] 1000) notation (ASCII) converse (\(\notation=\postfix -1\\_^-1)\ [1000] 999) and conversep (\(\notation=\postfix -1-1\\_^--1)\ [1000] 1000) +end lemma converseI [sym]: "(a, b) \ r \ (b, a) \ r\" by (fact converse.intros)