Require Import coq 库后 bool 和 Datatypes.bool 的混淆
Mix-up of bool and Datatypes.bool after Require Import coq libraries
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).
Error: In environment x : string y : string The term "eqb_string x
y" has type "bool" while it is expected to have type "Datatypes.bool".
关于如何进行的任何提示?
SF 在这里有自己的 bool 定义:
https://softwarefoundations.cis.upenn.edu/lf-current/Basics.html
特别是在介绍性章节中,您需要注意不要将其与 Coq 的定义混淆。从 SF 导入文件或从标准库导入文件,但不能同时导入。
在后面的章节中 (afair) SF 切换到标准库定义。
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).
Error: In environment x : string y : string The term "eqb_string x y" has type "bool" while it is expected to have type "Datatypes.bool".
关于如何进行的任何提示?
SF 在这里有自己的 bool 定义:
https://softwarefoundations.cis.upenn.edu/lf-current/Basics.html
特别是在介绍性章节中,您需要注意不要将其与 Coq 的定义混淆。从 SF 导入文件或从标准库导入文件,但不能同时导入。
在后面的章节中 (afair) SF 切换到标准库定义。