src/HOL/List.thy
changeset 37424 ed431cc99f17
parent 37408 f51ff37811bf
child 37451 3058c918e7a3
child 37454 9132a5955127
equal deleted inserted replaced
37423:6167695009ad 37424:ed431cc99f17
  4927 
  4927 
  4928 lemma list_ex_iff_not_all_from_to_not_int[code_unfold]:
  4928 lemma list_ex_iff_not_all_from_to_not_int[code_unfold]:
  4929   "list_ex P [i..j] = (~ all_from_to_int (%x. ~P x) i j)"
  4929   "list_ex P [i..j] = (~ all_from_to_int (%x. ~P x) i j)"
  4930 by(simp add: all_from_to_int_iff_ball list_ex_iff)
  4930 by(simp add: all_from_to_int_iff_ball list_ex_iff)
  4931 
  4931 
       
  4932 
       
  4933 subsubsection {* Use convenient predefined operations *}
       
  4934 
       
  4935 code_const "op @"
       
  4936   (SML infixr 7 "@")
       
  4937   (OCaml infixr 6 "@")
       
  4938   (Haskell infixr 5 "++")
       
  4939   (Scala infixl 7 "++")
       
  4940 
       
  4941 code_const map
       
  4942   (Haskell "map")
       
  4943 
       
  4944 code_const filter
       
  4945   (Haskell "filter")
       
  4946 
       
  4947 code_const concat
       
  4948   (Haskell "concat")
       
  4949 
       
  4950 code_const rev
       
  4951   (Haskell "rev")
       
  4952 
       
  4953 code_const zip
       
  4954   (Haskell "zip")
       
  4955 
       
  4956 code_const takeWhile
       
  4957   (Haskell "takeWhile")
       
  4958 
       
  4959 code_const dropWhile
       
  4960   (Haskell "dropWhile")
       
  4961 
       
  4962 code_const hd
       
  4963   (Haskell "head")
       
  4964 
       
  4965 code_const last
       
  4966   (Haskell "last")
       
  4967 
  4932 end
  4968 end