# HG changeset patch # User paulson # Date 842517241 -7200 # Node ID a22ff848be9bbf89de32779c0e28850973d24000 # Parent 91c74763c5a373a557039bb3b0b235de13144ff3 Split off classical reasoning code to cladata.ML diff -r 91c74763c5a3 -r a22ff848be9b src/HOL/HOL.ML --- a/src/HOL/HOL.ML Thu Sep 12 10:32:43 1996 +0200 +++ b/src/HOL/HOL.ML Thu Sep 12 10:34:01 1996 +0200 @@ -347,101 +347,8 @@ end; - -(*** Setting up the classical reasoner and simplifier ***) - - -(** Applying HypsubstFun to generate hyp_subst_tac **) -section "Classical Reasoner"; - -structure Hypsubst_Data = - struct - structure Simplifier = Simplifier - (*Take apart an equality judgement; otherwise raise Match!*) - fun dest_eq (Const("Trueprop",_) $ (Const("op =",_) $ t $ u)) = (t,u); - val eq_reflection = eq_reflection - val imp_intr = impI - val rev_mp = rev_mp - val subst = subst - val sym = sym - end; - -structure Hypsubst = HypsubstFun(Hypsubst_Data); -open Hypsubst; - -(*** Applying ClassicalFun to create a classical prover ***) -structure Classical_Data = - struct - val sizef = size_of_thm - val mp = mp - val not_elim = notE - val classical = classical - val hyp_subst_tacs=[hyp_subst_tac] - end; - -structure Classical = ClassicalFun(Classical_Data); -open Classical; - -(*Propositional rules*) -val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI] - addSEs [conjE,disjE,impCE,FalseE,iffE]; - -(*Quantifier rules*) -val HOL_cs = prop_cs addSIs [allI] addIs [exI,ex1I] - addSEs [exE,ex1E] addEs [allE]; - -exception CS_DATA of claset; - -let fun merge [] = CS_DATA empty_cs - | merge cs = let val cs = map (fn CS_DATA x => x) cs; - in CS_DATA (foldl merge_cs (hd cs, tl cs)) end; - - fun put (CS_DATA cs) = claset := cs; - - fun get () = CS_DATA (!claset); -in add_thydata "HOL" - ("claset", ThyMethods {merge = merge, put = put, get = get}) -end; - -claset := HOL_cs; - -section "Simplifier"; - -use "simpdata.ML"; -simpset := HOL_ss; - - -(** Install simpsets and datatypes in theory structure **) -exception SS_DATA of simpset; - -let fun merge [] = SS_DATA empty_ss - | merge ss = let val ss = map (fn SS_DATA x => x) ss; - in SS_DATA (foldl merge_ss (hd ss, tl ss)) end; - - fun put (SS_DATA ss) = simpset := ss; - - fun get () = SS_DATA (!simpset); -in add_thydata "HOL" - ("simpset", ThyMethods {merge = merge, put = put, get = get}) -end; - -type dtype_info = {case_const:term, case_rewrites:thm list, - constructors:term list, nchotomy:thm, case_cong:thm}; - -exception DT_DATA of (string * dtype_info) list; -val datatypes = ref [] : (string * dtype_info) list ref; - -let fun merge [] = DT_DATA [] - | merge ds = - let val ds = map (fn DT_DATA x => x) ds; - in DT_DATA (foldl (gen_union eq_fst) (hd ds, tl ds)) end; - - fun put (DT_DATA ds) = datatypes := ds; - - fun get () = DT_DATA (!datatypes); -in add_thydata "HOL" - ("datatypes", ThyMethods {merge = merge, put = put, get = get}) -end; - - -add_thy_reader_file "thy_data.ML"; +(*Thus, assignments to the references claset and simpset are recorded + with theory "HOL". These files cannot be loaded directly in ROOT.ML.*) +use "hologic.ML"; +use "cladata.ML"; +use "simpdata.ML";