如何rewrite
在 ltac 中调用以仅重写一次出现?我认为 coq 的文档中提到了一些内容,rewrite at
但我无法在实践中实际使用它,也没有示例。
这是我正在尝试做的一个例子:
Definition f (a b: nat): nat.
Admitted.
Theorem theorem1: forall a b: nat, f a b = 4.
Admitted.
Theorem theorem2: forall (a b: nat), (f a b) + (f a b) = 8.
Proof.
intros a b.
(*
my goal here is f a b + f a b = 8
I want to only rewrite the first f a b
The following tactic call doesn't work
*)
rewrite -> theorem1 at 1.