diff -r 56f1c0af602c -r 8e72f55295fd src/HOL/Set_Interval.thy --- a/src/HOL/Set_Interval.thy Mon Sep 23 15:01:10 2024 +0200 +++ b/src/HOL/Set_Interval.thy Mon Sep 23 21:09:23 2024 +0200 @@ -29,35 +29,35 @@ begin definition - lessThan :: "'a => 'a set" (\(1{..<_})\) where + lessThan :: "'a => 'a set" (\(\indent=1 notation=\mixfix set interval\\{..<_})\) where "{.. 'a set" (\(1{.._})\) where + atMost :: "'a => 'a set" (\(\indent=1 notation=\mixfix set interval\\{.._})\) where "{..u} == {x. x \ u}" definition - greaterThan :: "'a => 'a set" (\(1{_<..})\) where + greaterThan :: "'a => 'a set" (\(\indent=1 notation=\mixfix set interval\\{_<..})\) where "{l<..} == {x. l 'a set" (\(1{_..})\) where + atLeast :: "'a => 'a set" (\(\indent=1 notation=\mixfix set interval\\{_..})\) where "{l..} == {x. l\x}" definition - greaterThanLessThan :: "'a => 'a => 'a set" (\(1{_<..<_})\) where + greaterThanLessThan :: "'a => 'a => 'a set" (\(\indent=1 notation=\mixfix set interval\\{_<..<_})\) where "{l<.. 'a => 'a set" (\(1{_..<_})\) where + atLeastLessThan :: "'a => 'a => 'a set" (\(\indent=1 notation=\mixfix set interval\\{_..<_})\) where "{l.. 'a => 'a set" (\(1{_<.._})\) where + greaterThanAtMost :: "'a => 'a => 'a set" (\(\indent=1 notation=\mixfix set interval\\{_<.._})\) where "{l<..u} == {l<..} Int {..u}" definition - atLeastAtMost :: "'a => 'a => 'a set" (\(1{_.._})\) where + atLeastAtMost :: "'a => 'a => 'a set" (\(\indent=1 notation=\mixfix set interval\\{_.._})\) where "{l..u} == {l..} Int {..u}" end @@ -67,10 +67,10 @@ \<^term>\{m.. may not exist in \<^term>\{..-form as well.\ syntax (ASCII) - "_UNION_le" :: "'a => 'a => 'b set => 'b set" (\(3UN _<=_./ _)\ [0, 0, 10] 10) - "_UNION_less" :: "'a => 'a => 'b set => 'b set" (\(3UN _<_./ _)\ [0, 0, 10] 10) - "_INTER_le" :: "'a => 'a => 'b set => 'b set" (\(3INT _<=_./ _)\ [0, 0, 10] 10) - "_INTER_less" :: "'a => 'a => 'b set => 'b set" (\(3INT _<_./ _)\ [0, 0, 10] 10) + "_UNION_le" :: "'a => 'a => 'b set => 'b set" (\(\indent=3 notation=\binder UN\\UN _<=_./ _)\ [0, 0, 10] 10) + "_UNION_less" :: "'a => 'a => 'b set => 'b set" (\(\indent=3 notation=\binder UN\\UN _<_./ _)\ [0, 0, 10] 10) + "_INTER_le" :: "'a => 'a => 'b set => 'b set" (\(\indent=3 notation=\binder INT\\INT _<=_./ _)\ [0, 0, 10] 10) + "_INTER_less" :: "'a => 'a => 'b set => 'b set" (\(\indent=3 notation=\binder INT\\INT _<_./ _)\ [0, 0, 10] 10) syntax (latex output) "_UNION_le" :: "'a \ 'a => 'b set => 'b set" (\(3\(\unbreakable\_ \ _)/ _)\ [0, 0, 10] 10) @@ -79,10 +79,10 @@ "_INTER_less" :: "'a \ 'a => 'b set => 'b set" (\(3\(\unbreakable\_ < _)/ _)\ [0, 0, 10] 10) syntax - "_UNION_le" :: "'a => 'a => 'b set => 'b set" (\(3\_\_./ _)\ [0, 0, 10] 10) - "_UNION_less" :: "'a => 'a => 'b set => 'b set" (\(3\_<_./ _)\ [0, 0, 10] 10) - "_INTER_le" :: "'a => 'a => 'b set => 'b set" (\(3\_\_./ _)\ [0, 0, 10] 10) - "_INTER_less" :: "'a => 'a => 'b set => 'b set" (\(3\_<_./ _)\ [0, 0, 10] 10) + "_UNION_le" :: "'a => 'a => 'b set => 'b set" (\(\indent=3 notation=\binder \\\\_\_./ _)\ [0, 0, 10] 10) + "_UNION_less" :: "'a => 'a => 'b set => 'b set" (\(\indent=3 notation=\binder \\\\_<_./ _)\ [0, 0, 10] 10) + "_INTER_le" :: "'a => 'a => 'b set => 'b set" (\(\indent=3 notation=\binder \\\\_\_./ _)\ [0, 0, 10] 10) + "_INTER_less" :: "'a => 'a => 'b set => 'b set" (\(\indent=3 notation=\binder \\\\_<_./ _)\ [0, 0, 10] 10) syntax_consts "_UNION_le" "_UNION_less" \ Union and @@ -1988,10 +1988,10 @@ subsection \Summation indexed over intervals\ syntax (ASCII) - "_from_to_sum" :: "idt \ 'a \ 'a \ 'b \ 'b" (\(SUM _ = _.._./ _)\ [0,0,0,10] 10) - "_from_upto_sum" :: "idt \ 'a \ 'a \ 'b \ 'b" (\(SUM _ = _..<_./ _)\ [0,0,0,10] 10) - "_upt_sum" :: "idt \ 'a \ 'b \ 'b" (\(SUM _<_./ _)\ [0,0,10] 10) - "_upto_sum" :: "idt \ 'a \ 'b \ 'b" (\(SUM _<=_./ _)\ [0,0,10] 10) + "_from_to_sum" :: "idt \ 'a \ 'a \ 'b \ 'b" (\(\notation=\binder SUM\\SUM _ = _.._./ _)\ [0,0,0,10] 10) + "_from_upto_sum" :: "idt \ 'a \ 'a \ 'b \ 'b" (\(\notation=\binder SUM\\SUM _ = _..<_./ _)\ [0,0,0,10] 10) + "_upt_sum" :: "idt \ 'a \ 'b \ 'b" (\(\notation=\binder SUM\\SUM _<_./ _)\ [0,0,10] 10) + "_upto_sum" :: "idt \ 'a \ 'b \ 'b" (\(\notation=\binder SUM\\SUM _<=_./ _)\ [0,0,10] 10) syntax (latex_sum output) "_from_to_sum" :: "idt \ 'a \ 'a \ 'b \ 'b" @@ -2004,10 +2004,10 @@ (\(3\<^latex>\$\sum_{\_ \ _\<^latex>\}$\ _)\ [0,0,10] 10) syntax - "_from_to_sum" :: "idt \ 'a \ 'a \ 'b \ 'b" (\(3\_ = _.._./ _)\ [0,0,0,10] 10) - "_from_upto_sum" :: "idt \ 'a \ 'a \ 'b \ 'b" (\(3\_ = _..<_./ _)\ [0,0,0,10] 10) - "_upt_sum" :: "idt \ 'a \ 'b \ 'b" (\(3\_<_./ _)\ [0,0,10] 10) - "_upto_sum" :: "idt \ 'a \ 'b \ 'b" (\(3\_\_./ _)\ [0,0,10] 10) + "_from_to_sum" :: "idt \ 'a \ 'a \ 'b \ 'b" (\(\indent=3 notation=\binder \\\\_ = _.._./ _)\ [0,0,0,10] 10) + "_from_upto_sum" :: "idt \ 'a \ 'a \ 'b \ 'b" (\(\indent=3 notation=\binder \\\\_ = _..<_./ _)\ [0,0,0,10] 10) + "_upt_sum" :: "idt \ 'a \ 'b \ 'b" (\(\indent=3 notation=\binder \\\\_<_./ _)\ [0,0,10] 10) + "_upto_sum" :: "idt \ 'a \ 'b \ 'b" (\(\indent=3 notation=\binder \\\\_\_./ _)\ [0,0,10] 10) syntax_consts "_from_to_sum" "_from_upto_sum" "_upt_sum" "_upto_sum" == sum @@ -2681,10 +2681,10 @@ subsection \Products indexed over intervals\ syntax (ASCII) - "_from_to_prod" :: "idt \ 'a \ 'a \ 'b \ 'b" (\(PROD _ = _.._./ _)\ [0,0,0,10] 10) - "_from_upto_prod" :: "idt \ 'a \ 'a \ 'b \ 'b" (\(PROD _ = _..<_./ _)\ [0,0,0,10] 10) - "_upt_prod" :: "idt \ 'a \ 'b \ 'b" (\(PROD _<_./ _)\ [0,0,10] 10) - "_upto_prod" :: "idt \ 'a \ 'b \ 'b" (\(PROD _<=_./ _)\ [0,0,10] 10) + "_from_to_prod" :: "idt \ 'a \ 'a \ 'b \ 'b" (\(\notation=\binder PROD\\PROD _ = _.._./ _)\ [0,0,0,10] 10) + "_from_upto_prod" :: "idt \ 'a \ 'a \ 'b \ 'b" (\(\notation=\binder PROD\\PROD _ = _..<_./ _)\ [0,0,0,10] 10) + "_upt_prod" :: "idt \ 'a \ 'b \ 'b" (\(\notation=\binder PROD\\PROD _<_./ _)\ [0,0,10] 10) + "_upto_prod" :: "idt \ 'a \ 'b \ 'b" (\(\notation=\binder PROD\\PROD _<=_./ _)\ [0,0,10] 10) syntax (latex_prod output) "_from_to_prod" :: "idt \ 'a \ 'a \ 'b \ 'b" @@ -2697,10 +2697,10 @@ (\(3\<^latex>\$\prod_{\_ \ _\<^latex>\}$\ _)\ [0,0,10] 10) syntax - "_from_to_prod" :: "idt \ 'a \ 'a \ 'b \ 'b" (\(3\_ = _.._./ _)\ [0,0,0,10] 10) - "_from_upto_prod" :: "idt \ 'a \ 'a \ 'b \ 'b" (\(3\_ = _..<_./ _)\ [0,0,0,10] 10) - "_upt_prod" :: "idt \ 'a \ 'b \ 'b" (\(3\_<_./ _)\ [0,0,10] 10) - "_upto_prod" :: "idt \ 'a \ 'b \ 'b" (\(3\_\_./ _)\ [0,0,10] 10) + "_from_to_prod" :: "idt \ 'a \ 'a \ 'b \ 'b" (\(\indent=3 notation=\binder \\\\_ = _.._./ _)\ [0,0,0,10] 10) + "_from_upto_prod" :: "idt \ 'a \ 'a \ 'b \ 'b" (\(\indent=3 notation=\binder \\\\_ = _..<_./ _)\ [0,0,0,10] 10) + "_upt_prod" :: "idt \ 'a \ 'b \ 'b" (\(\indent=3 notation=\binder \\\\_<_./ _)\ [0,0,10] 10) + "_upto_prod" :: "idt \ 'a \ 'b \ 'b" (\(\indent=3 notation=\binder \\\\_\_./ _)\ [0,0,10] 10) syntax_consts "_from_to_prod" "_from_upto_prod" "_upt_prod" "_upto_prod" \ prod