個人的には、私はただ使用する傾向があります:
apply (metis thm)
これは、ほとんどの場合、私に非常に一生懸命考えることを強いることなく機能します (ただし、トリッキーな解決策が必要な場合は、それでも失敗することがあります)。
通常は次のような方法も使用できます。
apply (rule thm) (* If "thm" has no premises. *)
apply (erule thm) (* If "thm" has a single premise. *)
apply (erule thm, assumption+) (* If "thm" has multiple premises. *)
答えが1つじゃないのはなぜ?答えは少し複雑です。
内部的に をsolve_direct
呼び出しfind_theorems solves
、次の処理を実行します。
fun etacn thm i = Seq.take (! tac_limit) o etac thm i;
(* ... *)
if Thm.no_prems thm then rtac thm 1 goal
else (etacn thm THEN_ALL_NEW (Goal.norm_hhf_tac THEN' Method.assm_tac ctxt)) 1 goal;
rule thm
これは、ルールに前提がない場合、または次のような場合の ML コードです。
apply (erule thm, assumption+)
ルールに複数の前提がある場合。あなたの質問についてブライアンがコメントしたように、仮定に複雑なメタ論理結合がある場合、上記はまだ失敗する可能性があります(これはnorm_hhf_tac
対処しますが、私が知る限りイザベルメソッドとして直接公開されていません)。
find_theorems
必要に応じて、次のように、によって使用される戦術を直接公開する新しいメソッドを作成できます。
ML {*
fun solve_direct_tac thm ctxt goal =
if Thm.no_prems thm then rtac thm 1 goal
else (etac thm THEN_ALL_NEW (Goal.norm_hhf_tac THEN' Method.assm_tac ctxt)) 1 goal;
*}
method_setup solve =
{* Attrib.thm >> (fn thm => fn ctxt =>
SIMPLE_METHOD' (K (solve_direct_tac thm ctxt ))) *}
"directly solve a rule"
これは、次のように使用できます。
lemma "⟦ a; b ⟧ ⟹ a ∧ b"
by (solve conjI)
うまくいけばsolve_direct
、あなたに投げかけられるものは何でも解決するはずです.