我在Coq中有以下功能。现在我想定义一个实例,如下所示。在我的例子中,类型[nat]的等价[==]被定义但不在[StringMap.t String.t]上。请解决Instace SC_Proper。谢谢。
Definition SC (u: nat) (zm: StringMap.t String.t):
StringMap.t String.t :=
match u with
| S p => match p with
| 2 => zm
| _ =>
match StringMap.find "S" zm with
| Some k => StringMap.empty
| _ => zm
end
end
| O => zm
end.
Instance SC_Proper
: Proper (equiv ==> equiv ==> equiv) SC.
Proof with o.
repeat red. intros u u' Hu zm1 zm2 Hzm.
Admitted.