coq - 在 Require Import coq 库之后混淆 bool 和 Datatypes.bool
问题描述
2
我正在研究软件基础并遇到错误。(https://softwarefoundations.cis.upenn.edu/lf-current/Maps.html)
From Coq Require Import Arith.Arith.
From Coq Require Import Bool.Bool.
Require Export Coq.Strings.String.
From Coq Require Import Logic.FunctionalExtensionality.
From Coq Require Import Lists.List.
Import ListNotations.
证明示例:
Lemma eqb_stringP : forall x y : string,
reflect (x = y) (eqb_string x y).
错误:在环境 x : string y : string 术语“eqb_string x y”的类型为“bool”,而预期的类型为“Datatypes.bool”。
关于如何进行的任何提示?
解决方案
SF 在这里对 bool 有自己的定义:
https://softwarefoundations.cis.upenn.edu/lf-current/Basics.html
尤其是在介绍性章节中,您需要小心不要将其与 Coq 的定义混淆。从 SF 导入文件或从标准库导入文件,但不能同时导入。
在后面的章节(公平)中,SF 切换到标准库定义。
推荐阅读
- forms - vue.js:如何动态更改输入字段的值与其他内容的内容并仍在使用值?
- python - 在 python 上创建样板模块的工具(类似于 Ruby 中的 `bundle gem ...`)
- logging - 从登录到 Azure Monitor 的所有服务中获取所有日志的 kusto 查询是什么
- python - 其他函数中的python函数调用
- javascript - 将 Angular 表导出到谷歌表
- python - 什么是替代灰度值的替代方法?
- python - 在 discord.py 中自动删除频道
- c++ - 如何使用 WIN32 调试信息 API 获取多态 C++ 对象的类名?
- python - 如何根据python中的另一列填充NA值
- python - 为什么opengl没有显示glfw和glbuffersubdata