equal
deleted
inserted
replaced
907 fun comp_incr_tac _ [] _ = no_tac |
907 fun comp_incr_tac _ [] _ = no_tac |
908 | comp_incr_tac ctxt (th :: ths) i = |
908 | comp_incr_tac ctxt (th :: ths) i = |
909 (fn st => comp_hhf_tac ctxt (Drule.incr_indexes st th) i st) APPEND |
909 (fn st => comp_hhf_tac ctxt (Drule.incr_indexes st th) i st) APPEND |
910 comp_incr_tac ctxt ths i; |
910 comp_incr_tac ctxt ths i; |
911 |
911 |
|
912 val vacuous_facts = [Drule.termI]; |
|
913 |
912 in |
914 in |
913 |
915 |
914 fun fact_tac ctxt facts = Goal.norm_hhf_tac ctxt THEN' comp_incr_tac ctxt facts; |
916 fun fact_tac ctxt facts = Goal.norm_hhf_tac ctxt THEN' comp_incr_tac ctxt facts; |
915 |
917 |
916 fun potential_facts ctxt prop = |
918 fun potential_facts ctxt prop = |
917 Facts.could_unify (facts_of ctxt) (Term.strip_all_body prop); |
919 let |
|
920 val body = Term.strip_all_body prop; |
|
921 val vacuous = filter (fn th => Term.could_unify (body, Thm.concl_of th)) vacuous_facts; |
|
922 in Facts.could_unify (facts_of ctxt) body @ vacuous end; |
918 |
923 |
919 fun some_fact_tac ctxt = SUBGOAL (fn (goal, i) => fact_tac ctxt (potential_facts ctxt goal) i); |
924 fun some_fact_tac ctxt = SUBGOAL (fn (goal, i) => fact_tac ctxt (potential_facts ctxt goal) i); |
920 |
925 |
921 end; |
926 end; |
922 |
927 |