Assume I have a goal A ⟹ B ⟹ C ⟹ G
The goal is unwieldy (generated from some proof obligation), and it appears (in similar shape) several times in my development.
So I create a lemma foo
to simplify the goal, of the shape A ⟹ C ⟹ (P ⟹ Q) ⟹ G
.
I’d like to be able to write
case goal42
thus ?case
proof (rule foo)
assume P
show Q sorry
qed
but this fails, because foo
does not use B
. What works is
case goal42
thus ?case
apply -
apply (erule (1) eqvt_lam_case)
proof-
assume P
show Q sorry
qed
but this style of opening a proof
in the middle of an apply script is considered bad practice.
Is there a method similar to rule
that is a bit smarter in matching the incoming facts against the hypothesis of the rule? Ideally it reads a consumes 2
parameter on foo
to figure out how many hypothesis should match.