doc-src/IsarRef/Thy/HOLCF_Specific.thy
author wenzelm
Thu, 13 Nov 2008 21:45:40 +0100
changeset 28761 9ec4482c9201
parent 26852 a31203f58b20
child 30168 9a20be5be90b
permissions -rw-r--r--
updated/refined types of Isar language elements, removed special LaTeX macros;
wenzelm@26840
     1
(* $Id$ *)
wenzelm@26840
     2
wenzelm@26840
     3
theory HOLCF_Specific
wenzelm@26840
     4
imports HOLCF
wenzelm@26840
     5
begin
wenzelm@26840
     6
wenzelm@26852
     7
chapter {* Isabelle/HOLCF \label{ch:holcf} *}
wenzelm@26841
     8
wenzelm@26841
     9
section {* Mixfix syntax for continuous operations *}
wenzelm@26841
    10
wenzelm@26841
    11
text {*
wenzelm@26841
    12
  \begin{matharray}{rcl}
wenzelm@28761
    13
    @{command_def (HOLCF) "consts"} & : & @{text "theory \<rightarrow> theory"} \\
wenzelm@26841
    14
  \end{matharray}
wenzelm@26841
    15
wenzelm@26841
    16
  HOLCF provides a separate type for continuous functions @{text "\<alpha> \<rightarrow>
wenzelm@26841
    17
  \<beta>"}, with an explicit application operator @{term "f \<cdot> x"}.
wenzelm@26841
    18
  Isabelle mixfix syntax normally refers directly to the pure
wenzelm@26841
    19
  meta-level function type @{text "\<alpha> \<Rightarrow> \<beta>"}, with application @{text "f
wenzelm@26841
    20
  x"}.
wenzelm@26841
    21
wenzelm@26841
    22
  The HOLCF variant of @{command (HOLCF) "consts"} modifies that of
wenzelm@26841
    23
  Pure Isabelle (cf.\ \secref{sec:consts}) such that declarations
wenzelm@26841
    24
  involving continuous function types are treated specifically.  Any
wenzelm@26841
    25
  given syntax template is transformed internally, generating
wenzelm@26841
    26
  translation rules for the abstract and concrete representation of
wenzelm@26841
    27
  continuous application.  Note that mixing of HOLCF and Pure
wenzelm@26841
    28
  application is \emph{not} supported!
wenzelm@26841
    29
*}
wenzelm@26841
    30
wenzelm@26841
    31
wenzelm@26841
    32
section {* Recursive domains *}
wenzelm@26841
    33
wenzelm@26841
    34
text {*
wenzelm@26841
    35
  \begin{matharray}{rcl}
wenzelm@28761
    36
    @{command_def (HOLCF) "domain"} & : & @{text "theory \<rightarrow> theory"} \\
wenzelm@26841
    37
  \end{matharray}
wenzelm@26841
    38
wenzelm@26841
    39
  \begin{rail}
wenzelm@26841
    40
    'domain' parname? (dmspec + 'and')
wenzelm@26841
    41
    ;
wenzelm@26841
    42
wenzelm@26841
    43
    dmspec: typespec '=' (cons + '|')
wenzelm@26841
    44
    ;
wenzelm@26841
    45
    cons: name (type *) mixfix?
wenzelm@26841
    46
    ;
wenzelm@26841
    47
    dtrules: 'distinct' thmrefs 'inject' thmrefs 'induction' thmrefs
wenzelm@26841
    48
  \end{rail}
wenzelm@26841
    49
wenzelm@26841
    50
  Recursive domains in HOLCF are analogous to datatypes in classical
wenzelm@26841
    51
  HOL (cf.\ \secref{sec:hol-datatype}).  Mutual recursion is
wenzelm@26841
    52
  supported, but no nesting nor arbitrary branching.  Domain
wenzelm@26841
    53
  constructors may be strict (default) or lazy, the latter admits to
wenzelm@26841
    54
  introduce infinitary objects in the typical LCF manner (e.g.\ lazy
wenzelm@26841
    55
  lists).  See also \cite{MuellerNvOS99} for a general discussion of
wenzelm@26841
    56
  HOLCF domains.
wenzelm@26841
    57
*}
wenzelm@26841
    58
wenzelm@26840
    59
end