在Coq中导入Hott库

发布于 2025-01-21 22:48:53 字数 1471 浏览 3 评论 0原文

我正在尝试在COQ中使用COQ-HOTT库,但是导入无法正常工作。我正在coqorg/coq的容器中工作:最新 docker image。启动容器后,我完成了以下操作:

  1. OPAM在容器终端中安装COQ-HOTT
  2. vscode连接到容器中,并在此处安装了VSCOQ扩展名。
  3. 将路径设置为_COQPROJECTcoqtop
  4. 使用以下行创建_COQPROJECT文件:
    -arg -noinit
    -arg -indices-matter
  1. 检查hott库位置:/home/coq/.opam/4.05.0/lib/coq/coq/user-contrib/hott/hott

创建*。V文件以测试库后,我遇到了以下问题:

  1. 需要导入hott。给出
Cannot find a physical path bound to logical path HoTT.
  1. hott hott off inf infimend Import Import Basics。工作。工作,但是做检查(2+2)。之后,
The term "2" has type "trunc_index" while it is expected to have type "Type".
  1. 从HOTT提供需要导入代数。有效,但from hiott of hott ofimportion ofimportion分析。给予
Cannot find a physical path bound to logical path Analysis with prefix HoTT.

i根本不了解这种行为。它类似于这个问题,但仍然不同。我做错了吗?

根据OPAM COQcoq-hott8.15.1 [4.07.1+flambda 4.05.0]分别分别为8.15 [4.05.0]

I'm trying to use coq-hott library in Coq, but the import won't work. I'm working in the container of the coqorg/coq:latest docker image. After starting the container I've done the following:

  1. opam install coq-hott in the container's terminal.
  2. Hooked up vscode to the container and installed the VsCoq extension there.
  3. Set the paths to _CoqProject and coqtop.
  4. Created the _CoqProject file with the following lines:
    -arg -noinit
    -arg -indices-matter
  1. Checked the HoTT library location: /home/coq/.opam/4.05.0/lib/coq/user-contrib/HoTT

After creating the *.v file to test the library I got the following problems:

  1. Require Import HoTT. gives
Cannot find a physical path bound to logical path HoTT.
  1. From HoTT Require Import Basics. works, but doing Check (2+2). after that gives
The term "2" has type "trunc_index" while it is expected to have type "Type".
  1. From HoTT Require Import Algebra. works but From HoTT Require Import Analysis. gives
Cannot find a physical path bound to logical path Analysis with prefix HoTT.

I don't understand this behavior at all. It is similar to this question, but still different. Am I doing something wrong ?

According to opam the packages versions for coq and coq-hott are 8.15.1 [4.07.1+flambda 4.05.0] and 8.15 [4.05.0] respectively.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文