src/HOL/Main.thy
author wenzelm
Tue, 06 Aug 2002 11:22:05 +0200
changeset 13462 56610e2ba220
parent 13403 bc2b32ee62fd
child 13755 a9bb54a3cfb7
permissions -rw-r--r--
sane interface for simprocs;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10519
ade64af4c57c hide many names from Datatype_Universe.
nipkow
parents: 10386
diff changeset
     1
(*  Title:      HOL/Main.thy
ade64af4c57c hide many names from Datatype_Universe.
nipkow
parents: 10386
diff changeset
     2
    ID:         $Id$
12024
b3661262541e moved String into Main;
wenzelm
parents: 11533
diff changeset
     3
    Author:     Stefan Berghofer, Tobias Nipkow and Markus Wenzel, TU Muenchen
b3661262541e moved String into Main;
wenzelm
parents: 11533
diff changeset
     4
    License:    GPL (GNU GENERAL PUBLIC LICENSE)
10519
ade64af4c57c hide many names from Datatype_Universe.
nipkow
parents: 10386
diff changeset
     5
*)
9619
6125cc9efc18 fixed deps;
wenzelm
parents: 9447
diff changeset
     6
12024
b3661262541e moved String into Main;
wenzelm
parents: 11533
diff changeset
     7
header {* Main HOL *}
b3661262541e moved String into Main;
wenzelm
parents: 11533
diff changeset
     8
13403
bc2b32ee62fd Added theory for setting up program extraction.
berghofe
parents: 13367
diff changeset
     9
theory Main = Map + Hilbert_Choice + Extraction:
9650
6f0b89f2a1f9 Main now new-style theory; added Main.ML for compatibility;
wenzelm
parents: 9619
diff changeset
    10
12024
b3661262541e moved String into Main;
wenzelm
parents: 11533
diff changeset
    11
text {*
b3661262541e moved String into Main;
wenzelm
parents: 11533
diff changeset
    12
  Theory @{text Main} includes everything.  Note that theory @{text
b3661262541e moved String into Main;
wenzelm
parents: 11533
diff changeset
    13
  PreList} already includes most HOL theories.
b3661262541e moved String into Main;
wenzelm
parents: 11533
diff changeset
    14
*}
b3661262541e moved String into Main;
wenzelm
parents: 11533
diff changeset
    15
b3661262541e moved String into Main;
wenzelm
parents: 11533
diff changeset
    16
subsection {* Configuration of the code generator *}
11533
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    17
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    18
types_code
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    19
  "bool"  ("bool")
12439
e90a4f5a27f0 Tuned code generator setup.
berghofe
parents: 12024
diff changeset
    20
  "*"     ("(_ */ _)")
e90a4f5a27f0 Tuned code generator setup.
berghofe
parents: 12024
diff changeset
    21
  "list"  ("_ list")
11533
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    22
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    23
consts_code
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    24
  "op ="    ("(_ =/ _)")
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    25
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    26
  "True"    ("true")
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    27
  "False"   ("false")
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    28
  "Not"     ("not")
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    29
  "op |"    ("(_ orelse/ _)")
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    30
  "op &"    ("(_ andalso/ _)")
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    31
  "If"      ("(if _/ then _/ else _)")
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    32
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    33
  "Pair"    ("(_,/ _)")
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    34
  "fst"     ("fst")
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    35
  "snd"     ("snd")
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    36
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    37
  "Nil"     ("[]")
0c0d2332e8f0 Added code generator setup.
berghofe
parents: 11483
diff changeset
    38
  "Cons"    ("(_ ::/ _)")
12439
e90a4f5a27f0 Tuned code generator setup.
berghofe
parents: 12024
diff changeset
    39
13093
ab0335307905 code generator: wfrec combinator is now implemented by ML function wf_rec.
berghofe
parents: 12554
diff changeset
    40
  "wfrec"   ("wf'_rec?")
ab0335307905 code generator: wfrec combinator is now implemented by ML function wf_rec.
berghofe
parents: 12554
diff changeset
    41
ab0335307905 code generator: wfrec combinator is now implemented by ML function wf_rec.
berghofe
parents: 12554
diff changeset
    42
ML {* fun wf_rec f x = f (wf_rec f) x; *}
ab0335307905 code generator: wfrec combinator is now implemented by ML function wf_rec.
berghofe
parents: 12554
diff changeset
    43
12554
671b4d632c34 Declared characteristic equations for < on nat for code generation.
berghofe
parents: 12439
diff changeset
    44
lemma [code]: "((n::nat) < 0) = False" by simp
671b4d632c34 Declared characteristic equations for < on nat for code generation.
berghofe
parents: 12439
diff changeset
    45
declare less_Suc_eq [code]
671b4d632c34 Declared characteristic equations for < on nat for code generation.
berghofe
parents: 12439
diff changeset
    46
9650
6f0b89f2a1f9 Main now new-style theory; added Main.ML for compatibility;
wenzelm
parents: 9619
diff changeset
    47
end