From 720da0f918118388d114e09664b129d2b29be2b1 Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Fri, 22 May 2020 15:43:14 +0200 Subject: some tweaks and comments, in preparation for general inductive type elimination --- spartan/lib/elimination.ML | 5 +++++ spartan/lib/focus.ML | 2 +- spartan/lib/tactics.ML | 3 +-- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'spartan/lib') diff --git a/spartan/lib/elimination.ML b/spartan/lib/elimination.ML index 85ce669..bd23c94 100644 --- a/spartan/lib/elimination.ML +++ b/spartan/lib/elimination.ML @@ -6,6 +6,7 @@ Type elimination automation. structure Elim = struct +(** Context data **) (* Elimination rule data *) structure Rules = Generic_Data ( type T = thm Termtab.table @@ -30,4 +31,8 @@ val _ = Theory.setup ( fn context => (rules (Context.proof_of context))) ) +(** General elimination-induction tactic **) + + + end diff --git a/spartan/lib/focus.ML b/spartan/lib/focus.ML index dd8d3d9..1d8de78 100644 --- a/spartan/lib/focus.ML +++ b/spartan/lib/focus.ML @@ -105,7 +105,7 @@ val schematic_subgoal_cmd = gen_schematic_subgoal Attrib.attribute_cmd val parser = opt_fact_binding - -- (Scan.option (\<^keyword>\premises\ |-- Parse.!!! opt_fact_binding)) + -- (Scan.option (\<^keyword>\prems\ |-- Parse.!!! opt_fact_binding)) -- for_params >> (fn ((a, b), c) => Toplevel.proofs (Seq.make_results o Seq.single o #2 o schematic_subgoal_cmd a b c)) diff --git a/spartan/lib/tactics.ML b/spartan/lib/tactics.ML index 0e09533..c72947a 100644 --- a/spartan/lib/tactics.ML +++ b/spartan/lib/tactics.ML @@ -104,8 +104,7 @@ fun intro_tac ctxt = SUBGOAL (fn (_, i) => SIDE_CONDS fun intros_tac ctxt = SUBGOAL (fn (_, i) => (CHANGED o REPEAT o CHANGED o intro_tac ctxt) i) -(* Basic elimination tactic *) -(*Only uses existing type judgments from the context +(*Basic elimination tactic, only uses existing type judgments from the context (performs no type synthesis)*) fun elims_tac opt_tm ctxt = case opt_tm of NONE => SUBGOAL (fn (_, i) => eresolve_tac ctxt (Elim.rules ctxt) i) -- cgit v1.2.3