author wenzelm Thu Jan 23 14:19:16 1997 +0100 (1997-01-23) changeset 2545 d10abc8c11fb parent 1985 84cf16192e03 child 2860 6dde30a9e905 permissions -rw-r--r--
```     1 (*  Title:      HOL/cladata.ML
```
```     2     ID:         \$Id\$
```
```     3     Author:     Tobias Nipkow
```
```     4     Copyright   1996  University of Cambridge
```
```     5
```
```     6 Setting up the classical reasoner
```
```     7 *)
```
```     8
```
```     9
```
```    10 (** Applying HypsubstFun to generate hyp_subst_tac **)
```
```    11 section "Classical Reasoner";
```
```    12
```
```    13 structure Hypsubst_Data =
```
```    14   struct
```
```    15   structure Simplifier = Simplifier
```
```    16   (*Take apart an equality judgement; otherwise raise Match!*)
```
```    17   fun dest_eq (Const("Trueprop",_) \$ (Const("op =",_)  \$ t \$ u)) = (t,u);
```
```    18   val eq_reflection = eq_reflection
```
```    19   val imp_intr = impI
```
```    20   val rev_mp = rev_mp
```
```    21   val subst = subst
```
```    22   val sym = sym
```
```    23   end;
```
```    24
```
```    25 structure Hypsubst = HypsubstFun(Hypsubst_Data);
```
```    26 open Hypsubst;
```
```    27
```
```    28 (*** Applying ClassicalFun to create a classical prover ***)
```
```    29 structure Classical_Data =
```
```    30   struct
```
```    31   val sizef     = size_of_thm
```
```    32   val mp        = mp
```
```    33   val not_elim  = notE
```
```    34   val classical = classical
```
```    35   val hyp_subst_tacs=[hyp_subst_tac]
```
```    36   end;
```
```    37
```
```    38 structure Classical = ClassicalFun(Classical_Data);
```
```    39 open Classical;
```
```    40
```
```    41 (*Propositional rules*)
```
```    42 val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI]
```
```    43                        addSEs [conjE,disjE,impCE,FalseE,iffE];
```
```    44
```
```    45 (*Quantifier rules*)
```
```    46 val HOL_cs = prop_cs addSIs [allI] addIs [exI,ex1I]
```
```    47                      addSEs [exE,ex1E] addEs [allE];
```
```    48
```
```    49 exception CS_DATA of claset;
```
```    50
```
```    51 let fun merge [] = CS_DATA empty_cs
```
```    52       | merge cs = let val cs = map (fn CS_DATA x => x) cs;
```
```    53                    in CS_DATA (foldl merge_cs (hd cs, tl cs)) end;
```
```    54
```
```    55     fun put (CS_DATA cs) = claset := cs;
```
```    56
```
```    57     fun get () = CS_DATA (!claset);
```
```    58 in add_thydata "HOL"
```
```    59      ("claset", ThyMethods {merge = merge, put = put, get = get})
```
```    60 end;
```
```    61
```
```    62 claset := HOL_cs;
```
```    63
```