src/HOLCF/IOA/meta_theory/Sequence.thy
changeset 10835 f4745d77e620
parent 7229 6773ba0c36d5
child 12028 52aa183c15bb
equal deleted inserted replaced
10834:a7897aebbffc 10835:f4745d77e620
    40  "@Consq"     ::"'a => 'a Seq => 'a Seq"       ("(_\\<leadsto>_)"  [66,65] 65)
    40  "@Consq"     ::"'a => 'a Seq => 'a Seq"       ("(_\\<leadsto>_)"  [66,65] 65)
    41  
    41  
    42 
    42 
    43 translations
    43 translations
    44 
    44 
    45   "a>>s"         == "Consq a`s"
    45   "a>>s"         == "Consq a$s"
    46   "[x, xs!]"     == "x>>[xs!]"
    46   "[x, xs!]"     == "x>>[xs!]"
    47   "[x!]"         == "x>>nil"
    47   "[x!]"         == "x>>nil"
    48   "[x, xs?]"     == "x>>[xs?]"
    48   "[x, xs?]"     == "x>>[xs?]"
    49   "[x?]"         == "x>>UU" 
    49   "[x?]"         == "x>>UU" 
    50 
    50 
    51 defs
    51 defs
    52 
    52 
    53 
    53 
    54 Consq_def     "Consq a == LAM s. Def a ## s"
    54 Consq_def     "Consq a == LAM s. Def a ## s"
    55 
    55 
    56 Filter_def    "Filter P == sfilter`(flift2 P)"
    56 Filter_def    "Filter P == sfilter$(flift2 P)"
    57 
    57 
    58 Map_def       "Map f  == smap`(flift2 f)"
    58 Map_def       "Map f  == smap$(flift2 f)"
    59 
    59 
    60 Forall_def    "Forall P == sforall (flift2 P)"
    60 Forall_def    "Forall P == sforall (flift2 P)"
    61 
    61 
    62 Last_def      "Last == slast"
    62 Last_def      "Last == slast"
    63 
    63 
    64 Dropwhile_def "Dropwhile P == sdropwhile`(flift2 P)"
    64 Dropwhile_def "Dropwhile P == sdropwhile$(flift2 P)"
    65 
    65 
    66 Takewhile_def "Takewhile P == stakewhile`(flift2 P)"
    66 Takewhile_def "Takewhile P == stakewhile$(flift2 P)"
    67 
    67 
    68 Flat_def      "Flat == sflat"
    68 Flat_def      "Flat == sflat"
    69 
    69 
    70 Zip_def
    70 Zip_def
    71   "Zip == (fix`(LAM h t1 t2. case t1 of 
    71   "Zip == (fix$(LAM h t1 t2. case t1 of 
    72                nil   => nil
    72                nil   => nil
    73              | x##xs => (case t2 of 
    73              | x##xs => (case t2 of 
    74                           nil => UU 
    74                           nil => UU 
    75                         | y##ys => (case x of 
    75                         | y##ys => (case x of 
    76                                       Undef  => UU
    76                                       Undef  => UU
    77                                     | Def a => (case y of 
    77                                     | Def a => (case y of 
    78                                                   Undef => UU
    78                                                   Undef => UU
    79                                                 | Def b => Def (a,b)##(h`xs`ys))))))"
    79                                                 | Def b => Def (a,b)##(h$xs$ys))))))"
    80 
    80 
    81 Filter2_def    "Filter2 P == (fix`(LAM h t. case t of 
    81 Filter2_def    "Filter2 P == (fix$(LAM h t. case t of 
    82             nil => nil
    82             nil => nil
    83 	  | x##xs => (case x of Undef => UU | Def y => (if P y                                 
    83 	  | x##xs => (case x of Undef => UU | Def y => (if P y                                 
    84                      then x##(h`xs)
    84                      then x##(h$xs)
    85                      else     h`xs))))" 
    85                      else     h$xs))))" 
    86 
    86 
    87 rules
    87 rules
    88 
    88 
    89 
    89 
    90 (* for test purposes should be deleted FIX !! *)
    90 (* for test purposes should be deleted FIX !! *)