aboutsummaryrefslogtreecommitdiff
path: root/spartan/core/elimination.ML
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--spartan/core/elimination.ML (renamed from spartan/core/lib/elimination.ML)6
1 files changed, 4 insertions, 2 deletions
diff --git a/spartan/core/lib/elimination.ML b/spartan/core/elimination.ML
index 617f83e..11b3af9 100644
--- a/spartan/core/lib/elimination.ML
+++ b/spartan/core/elimination.ML
@@ -6,6 +6,7 @@ Type elimination setup.
structure Elim: sig
+val Rules: Proof.context -> (thm * indexname list) Termtab.table
val rules: Proof.context -> (thm * indexname list) list
val lookup_rule: Proof.context -> Termtab.key -> (thm * indexname list) option
val register_rule: term list -> thm -> Context.generic -> Context.generic
@@ -25,8 +26,9 @@ structure Rules = Generic_Data (
val merge = Termtab.merge (eq_fst Thm.eq_thm_prop)
)
-fun rules ctxt = map (op #2) (Termtab.dest (Rules.get (Context.Proof ctxt)))
-fun lookup_rule ctxt = Termtab.lookup (Rules.get (Context.Proof ctxt))
+val Rules = Rules.get o Context.Proof
+fun rules ctxt = map (op #2) (Termtab.dest (Rules ctxt))
+fun lookup_rule ctxt = Termtab.lookup (Rules ctxt)
fun register_rule tms rl =
let val hd = Term.head_of (Lib.type_of_typing (Thm.major_prem_of rl))
in Rules.map (Termtab.update (hd, (rl, map (#1 o dest_Var) tms))) end