ProgTutorial/Recipes/CallML.thy
author Christian Urban <urbanc@in.tum.de>
Sun, 22 Aug 2010 22:56:52 +0800
changeset 448 957f69b9b7df
parent 441 520127b708e6
child 459 4532577b61e0
permissions -rw-r--r--
added something about Goal.prove_multi
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
427
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
(*<*)
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
theory CallML
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
imports "~~/src/HOL/Number_Theory/Primes" Efficient_Nat
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
begin
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
(*>*)
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
section {* Calling ML Functions from within HOL \label{rec:callml} *}
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
text{* 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
  {\bf Problem:} 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
  How to call ML functions from within HOL?\smallskip
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
  {\bf Solution:} This can be achieved with \isacommand{code\_const}
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
  and \isacommand{code\_reflect}.\smallskip
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
  To make it clear we mean here calling unverified ML functions from within
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
  HOL! The motivation is the paradigm of \emph{result checking}: rather than
441
Christian Urban <urbanc@in.tum.de>
parents: 428
diff changeset
    19
  verifying some complicated algorithm, have the algorithm produce an easily
Christian Urban <urbanc@in.tum.de>
parents: 428
diff changeset
    20
  checkable certificate. For example, instead of verifying an algorithm for 
Christian Urban <urbanc@in.tum.de>
parents: 428
diff changeset
    21
  testing non-primality, have an algorithm that produces a factor as a witness to
Christian Urban <urbanc@in.tum.de>
parents: 428
diff changeset
    22
  non-primality. 
427
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
441
Christian Urban <urbanc@in.tum.de>
parents: 428
diff changeset
    24
  The algorithm is an ML function finding a factor of a number. We first 
Christian Urban <urbanc@in.tum.de>
parents: 428
diff changeset
    25
  declare its type:
427
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
*}
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
consts factor :: "nat \<Rightarrow> nat"
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
text{* 
441
Christian Urban <urbanc@in.tum.de>
parents: 428
diff changeset
    31
  Its definition will be given below in ML. But the whole point is that
427
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
  we can prove non-primality via @{const factor}, no matter what its
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
  actual definition is: 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
*}
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
lemma factor_non_prime:
428
Christian Urban <urbanc@in.tum.de>
parents: 427
diff changeset
    37
  "let k = factor n in k \<noteq> 1 \<and> k \<noteq> n \<and> k dvd n \<Longrightarrow> \<not> prime n"
Christian Urban <urbanc@in.tum.de>
parents: 427
diff changeset
    38
  by (auto simp: prime_nat_def Let_def)
427
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
text{* 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
  Note that the premise is executable once we have defined 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
  @{const factor}. Here is a trivial definition in ML: 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
*}
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
ML{*fun factor n = if n = 4 then 2 else 1*}
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
text{* 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
  Of course this trivial definition of @{const factor} could have been given
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
  directly in HOL rather than ML. But by going to the ML level, all of ML is
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
  at our disposal, including arrays and references, features that are less
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    51
  easily emulated in HOL. In fact, we could even call some external software
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    52
  from ML, e.g.\ a computer algebra system.
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    54
  It should be noted, however, that in this example you need to import the
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    55
  theory @{theory Efficient_Nat} in order to force the HOL-type @{typ nat} to
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
  be implemented by the ML-type @{text "int"}. Thus the ML implementation of
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    57
  @{const factor} must be and is of type @{text "int -> int"}. Now it is time
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
  to connect the two levels:
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    59
*}
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
code_const factor (SML "factor")
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    62
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    63
text{* 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
  The result of this declaration is that the HOL-function @{const factor} 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    65
  is executable and command 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    66
*}
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    68
value "factor 4"
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
text{* 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    71
  yields the expected result @{text 2}. Similarly we can prove that
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
  @{text 4} is not prime: 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    73
*}
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    74
448
957f69b9b7df added something about Goal.prove_multi
Christian Urban <urbanc@in.tum.de>
parents: 441
diff changeset
    75
lemma "\<not> prime (4::nat)"
427
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
  apply(rule factor_non_prime)
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    77
  apply eval
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    78
  done
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    80
text{* 
428
Christian Urban <urbanc@in.tum.de>
parents: 427
diff changeset
    81
  Note, however, the command \isacommand{code\_const} cannot check that the ML function
427
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    82
  has the required type. Therefore in the worst case a type mismatch will be detected by
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    83
  the ML-compiler when we try to evaluate an expression involving @{const
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
  factor}. It could also happen that @{const factor} is (accidentally)
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    85
  redefined on the ML level later on. But remember that we do not assume
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    86
  anything about @{const factor} on the HOL-level. Hence no definition of
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
  @{const factor} can ever lead to an incorrect proof. Of course ``wrong''
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    88
  definitions can lead to compile time or run time exceptions, or to failed
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    89
  proofs.
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
428
Christian Urban <urbanc@in.tum.de>
parents: 427
diff changeset
    91
  The above example was easy because we forced Isabelle (via the inclusion of the
Christian Urban <urbanc@in.tum.de>
parents: 427
diff changeset
    92
  theory @{theory
427
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
  Efficient_Nat}) to implement @{typ nat} by @{text int}, a predefined 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
  ML-type.  By default, Isabelle implements, for example, the HOL-type 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
  @{text list} by the corresponding ML-type. Thus the following variation 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
  on @{const factor} also works: 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
*}
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
consts factor2 :: "nat \<Rightarrow> nat list" (*<*)(*>*)
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
ML{*fun factor2 n = if n = 4 then [2] else []*}(*<*)(*>*)
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
code_const factor2 (SML "factor2")
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   102
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   103
value "factor2 4"
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   104
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   105
text{* 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   106
  The first line declares the type of @{const factor2}; the second
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   107
  gives its implementation in ML; the third makes it executable 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   108
  in HOL, and the last is just a test.  In this way, you can easily 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   109
  interface with ML-functions whose types involve 
428
Christian Urban <urbanc@in.tum.de>
parents: 427
diff changeset
   110
  @{text bool}, @{text int}, @{text list}, @{text option} and pairs, 
427
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   111
  only. If you have arbitrary tuples, for example, then you have to code 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   112
  them as nested pairs.
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   114
  Let us now look at how to refer to user-defined HOL-datatypes from the
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   115
  ML-level. We modify our @{const factor} example a little by introducing a new
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   116
  datatype for the result: 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   117
*}
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   118
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   119
datatype result = Factor nat | Prime
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
consts factor' :: "nat \<Rightarrow> result"
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   122
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   123
text{* 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   124
  In order to write ML-code that uses this datatype, we need to define
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   125
  this datatype at the ML-level first. The following command does just that. 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   126
*}
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   127
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   128
code_reflect Result
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   129
  datatypes result = Factor | Prime
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   130
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   131
text{* 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   132
  This creates an ML-structure called @{text Result} (the name can be
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   133
  arbitrarily chosen) that contains the datatype @{typ result}. The list 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   134
  of constructors (but not their types) needs to be given. Now we can 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   135
  write ML-code that uses this datatype: 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   136
*}
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   137
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   138
ML{*fun factor' n = if n = 4 then Result.Factor 2 else Result.Prime*}
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   139
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   140
text{* 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   141
  Finally we can link the HOL and ML version of @{const factor'} as
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   142
  before: 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   143
*}
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   144
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   145
code_const factor' (SML "factor'")
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   146
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   147
text{* 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   148
  Now any evaluation of the HOL function @{const factor'} will use the
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   149
  corresponding ML-function, like in the examples for @{const factor} above.
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   150
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   151
  In general, \isacommand{code\_reflect} can export multiple datatypes 
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   152
  (separated by \isacommand{and}) and also HOL-functions: simply add a line
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   153
  \isacommand{functions} $f_1$ $f_2$ and so on.
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   154
*}
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   155
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   156
(*<*)
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   157
value "factor' 4"
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   158
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   159
end
94538ddcac9b added example from Tobias and changed the title
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   160
(*>*)