src/HOL/ex/Codegenerator_Candidates.thy
author bulwahn
Wed, 20 Jan 2010 18:08:08 +0100
changeset 34953 a053ad2a7a72
parent 33500 22e5725be1f3
child 35303 816e48d60b13
permissions -rw-r--r--
adopting Sequences
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31378
d1cbf6393964 tuned code generator test theories
haftmann
parents: 30446
diff changeset
     1
d1cbf6393964 tuned code generator test theories
haftmann
parents: 30446
diff changeset
     2
(* Author: Florian Haftmann, TU Muenchen *)
21917
haftmann
parents:
diff changeset
     3
31378
d1cbf6393964 tuned code generator test theories
haftmann
parents: 30446
diff changeset
     4
header {* A huge collection of equations to generate code from *}
21917
haftmann
parents:
diff changeset
     5
31378
d1cbf6393964 tuned code generator test theories
haftmann
parents: 30446
diff changeset
     6
theory Codegenerator_Candidates
21917
haftmann
parents:
diff changeset
     7
imports
27421
7e458bd56860 HOL += HOL-Complex
haftmann
parents: 27103
diff changeset
     8
  Complex_Main
21917
haftmann
parents:
diff changeset
     9
  AssocList
haftmann
parents:
diff changeset
    10
  Binomial
31849
431d8588bcad renamed theory Code_Set to Fset
haftmann
parents: 31807
diff changeset
    11
  Fset
27421
7e458bd56860 HOL += HOL-Complex
haftmann
parents: 27103
diff changeset
    12
  Enum
21917
haftmann
parents:
diff changeset
    13
  List_Prefix
haftmann
parents:
diff changeset
    14
  Nat_Infinity
24433
4a405457e9d6 added explicit equation for equality of nested environments
haftmann
parents: 24423
diff changeset
    15
  Nested_Environment
26515
4a2063a8c2d2 extended
haftmann
parents: 26447
diff changeset
    16
  Option_ord
21917
haftmann
parents:
diff changeset
    17
  Permutation
32479
521cc9bf2958 some reorganization of number theory
haftmann
parents: 31849
diff changeset
    18
  "~~/src/HOL/Number_Theory/Primes"
21917
haftmann
parents:
diff changeset
    19
  Product_ord
haftmann
parents:
diff changeset
    20
  SetsAndFunctions
31459
ae39b7b2a68a added trees implementing mappings
haftmann
parents: 31378
diff changeset
    21
  Tree
21917
haftmann
parents:
diff changeset
    22
  While_Combinator
haftmann
parents:
diff changeset
    23
  Word
33356
9157d0f9f00e moved Commutative_Ring into session Decision_Procs
haftmann
parents: 33042
diff changeset
    24
  "~~/src/HOL/Decision_Procs/Commutative_Ring_Complete"
27421
7e458bd56860 HOL += HOL-Complex
haftmann
parents: 27103
diff changeset
    25
  "~~/src/HOL/ex/Records"
21917
haftmann
parents:
diff changeset
    26
begin
haftmann
parents:
diff changeset
    27
33500
22e5725be1f3 added predicate example
haftmann
parents: 33356
diff changeset
    28
inductive sublist :: "'a list \<Rightarrow> 'a list \<Rightarrow> bool" where
22e5725be1f3 added predicate example
haftmann
parents: 33356
diff changeset
    29
    empty: "sublist [] xs"
22e5725be1f3 added predicate example
haftmann
parents: 33356
diff changeset
    30
  | drop: "sublist ys xs \<Longrightarrow> sublist ys (x # xs)"
22e5725be1f3 added predicate example
haftmann
parents: 33356
diff changeset
    31
  | take: "sublist ys xs \<Longrightarrow> sublist (x # ys) (x # xs)"
22e5725be1f3 added predicate example
haftmann
parents: 33356
diff changeset
    32
22e5725be1f3 added predicate example
haftmann
parents: 33356
diff changeset
    33
code_pred sublist .
22e5725be1f3 added predicate example
haftmann
parents: 33356
diff changeset
    34
33042
ddf1f03a9ad9 curried union as canonical list operation
haftmann
parents: 32479
diff changeset
    35
(*avoid popular infix*)
ddf1f03a9ad9 curried union as canonical list operation
haftmann
parents: 32479
diff changeset
    36
code_reserved SML upto
31378
d1cbf6393964 tuned code generator test theories
haftmann
parents: 30446
diff changeset
    37
21917
haftmann
parents:
diff changeset
    38
end