这个引理能在Coq中被证明吗?(f : nat -> nat), forall n:nat, P n (f n).简单的destruct不能编译,因为我们不能消除sort Prop中的对象exists p:nat, P n p,从而在sort Set中生成函数f。如果Coq不能证明这个引理,那么forall n:nat, exists p:nat, P n p的</e
我尝试使用coq作为一种依赖类型的编程语言。我创建了以下小程序: | GoodNonEmpty : forall h t, Good (h :: t).Definition get_first(l : list nat)(good : Good l) : nat := | h :: t => h
| nil我为非空列表定义了一个类型,并创建了一个<em
我是Coq的新手。我有一个函数findshare,它可以在两个列表中查找相同的元素。引理sameElements证明了函数findshare在两个列表的连接上的结果等于应用于每个列表的函数的结果的连接。我在证明引理sameElements时有点卡住了。Fixpoint findshare(s1 s2: list