coq - Coq 中的对和预测
问题描述
我从https://coq.inria.fr/library/Coq.Init.Datatypes.html获取以下代码:
Inductive prod (A B:Type) : Type :=
pair : A -> B -> A * B
where "x * y" := (prod x y) : type_scope.
Add Printing Let prod.
Notation "( x , y , .. , z )" := (pair .. (pair x y) .. z) : core_scope.
Section projections.
Context {A : Type} {B : Type}.
Definition fst (p:A * B) := match p with (x, y) => x end.
Definition snd (p:A * B) := match p with (x, y) => y end.
End projections.
当我将它加载到 CoqIDE 中时,Definition fst...
它会出现消息The constructor pair (in type prod) expects 4 arguments.
。我该如何解决这个问题?
解决方案
添加
Set Implicit Arguments.
到文件的顶部。
推荐阅读
- javascript - 使用javascript在数组中添加元素的值而不使用const
- python - 将文本添加到轴间箭头
- c# - 如何复制与其他表(相关)中链接的数据的行并将它们作为新记录插入 - Linq C#
- python - 我们可以在垂直边缘检测图像中找到两个垂直边缘之间的关系/函数吗?
- c# - 如何在使用“SpecifiedPickupDirectory”作为传递方法发送电子邮件时在 AWS 上创建电子邮件文件
- php - 如何为这样的一对一关系建立雄辩的关系
- microcontroller - PIC uc 编程没有 MCLR 引脚
- node.js - Mongoose:使用其他模型的模式
- laravel - 我无法将存储转移到服务器。拉拉维尔
- swift - 默认协议实现优先于子类的实现