Class Action (Actor: Type) (Acted: Type) :=
{
act : Actor -> Acted -> Acted;
someProof: forall (a: Actor), a = a;
}.
Instance natListAction: Action nat (list nat) :=
{
act (n: nat) (l: list nat) := cons n l;
}.
Proof.
auto.
Qed.
Lemma natListAction_is_cons: forall (n: nat) (l: list nat),
act n l = cons n l.
Proof.
intros.
unfold act.
(** I cannot unfold it, since I have someProof.
If I remove this, this unfold works **)
unfold natListAction.
Abort.
我真正想要的是:因为我知道
act
解析为
natListAction
,我知道
act = cons
.因此,引理应该经过。
如果我没有
someProof
在我的
Action
上课,然后我可以
unfold natListAction
一切都会好起来的。但现在,我不能这样做。
但是,我如何说服COQ
ACT=施工
在这种情况下?