src/HOL/Library/FuncSet.thy
changeset 56777 9c3f0ae99532
parent 54417 dbb8ecfe1337
child 58606 9c66f7c541fb
equal deleted inserted replaced
56776:309e1a61ee7c 56777:9c3f0ae99532
    21   "restrict f A = (%x. if x \<in> A then f x else undefined)"
    21   "restrict f A = (%x. if x \<in> A then f x else undefined)"
    22 
    22 
    23 abbreviation
    23 abbreviation
    24   funcset :: "['a set, 'b set] => ('a => 'b) set"
    24   funcset :: "['a set, 'b set] => ('a => 'b) set"
    25     (infixr "->" 60) where
    25     (infixr "->" 60) where
    26   "A -> B == Pi A (%_. B)"
    26   "A -> B \<equiv> Pi A (%_. B)"
    27 
    27 
    28 notation (xsymbols)
    28 notation (xsymbols)
    29   funcset  (infixr "\<rightarrow>" 60)
    29   funcset  (infixr "\<rightarrow>" 60)
    30 
    30 
    31 syntax
    31 syntax
    39 syntax (HTML output)
    39 syntax (HTML output)
    40   "_Pi" :: "[pttrn, 'a set, 'b set] => ('a => 'b) set"  ("(3\<Pi> _\<in>_./ _)"   10)
    40   "_Pi" :: "[pttrn, 'a set, 'b set] => ('a => 'b) set"  ("(3\<Pi> _\<in>_./ _)"   10)
    41   "_lam" :: "[pttrn, 'a set, 'a => 'b] => ('a=>'b)"  ("(3\<lambda>_\<in>_./ _)" [0,0,3] 3)
    41   "_lam" :: "[pttrn, 'a set, 'a => 'b] => ('a=>'b)"  ("(3\<lambda>_\<in>_./ _)" [0,0,3] 3)
    42 
    42 
    43 translations
    43 translations
    44   "PI x:A. B" == "CONST Pi A (%x. B)"
    44   "PI x:A. B" \<rightleftharpoons> "CONST Pi A (%x. B)"
    45   "%x:A. f" == "CONST restrict (%x. f) A"
    45   "%x:A. f" \<rightleftharpoons> "CONST restrict (%x. f) A"
    46 
    46 
    47 definition
    47 definition
    48   "compose" :: "['a set, 'b => 'c, 'a => 'b] => ('a => 'c)" where
    48   "compose" :: "['a set, 'b => 'c, 'a => 'b] => ('a => 'c)" where
    49   "compose A g f = (\<lambda>x\<in>A. g (f x))"
    49   "compose A g f = (\<lambda>x\<in>A. g (f x))"
    50 
    50 
   350 
   350 
   351 syntax (xsymbols) "_PiE" :: "[pttrn, 'a set, 'b set] => ('a => 'b) set"  ("(3\<Pi>\<^sub>E _\<in>_./ _)" 10)
   351 syntax (xsymbols) "_PiE" :: "[pttrn, 'a set, 'b set] => ('a => 'b) set"  ("(3\<Pi>\<^sub>E _\<in>_./ _)" 10)
   352 
   352 
   353 syntax (HTML output) "_PiE" :: "[pttrn, 'a set, 'b set] => ('a => 'b) set"  ("(3\<Pi>\<^sub>E _\<in>_./ _)" 10)
   353 syntax (HTML output) "_PiE" :: "[pttrn, 'a set, 'b set] => ('a => 'b) set"  ("(3\<Pi>\<^sub>E _\<in>_./ _)" 10)
   354 
   354 
   355 translations "PIE x:A. B" == "CONST Pi\<^sub>E A (%x. B)"
   355 translations "PIE x:A. B" \<rightleftharpoons> "CONST Pi\<^sub>E A (%x. B)"
   356 
   356 
   357 abbreviation extensional_funcset :: "'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<Rightarrow> 'b) set" (infixr "->\<^sub>E" 60) where
   357 abbreviation extensional_funcset :: "'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<Rightarrow> 'b) set" (infixr "->\<^sub>E" 60) where
   358   "A ->\<^sub>E B \<equiv> (\<Pi>\<^sub>E i\<in>A. B)"
   358   "A ->\<^sub>E B \<equiv> (\<Pi>\<^sub>E i\<in>A. B)"
   359 
   359 
   360 notation (xsymbols)
   360 notation (xsymbols)