在 Agda 中研究 Peano Axioms 并遇到了一些症结

发布于 2024-08-27 11:46:30 字数 282 浏览 21 评论 0原文

PA6 : ∀{m n} -> m ≡ n -> n ≡ m

是我试图解决和支持的公理,我尝试使用 cong (来自核心库),但是 cong 构造函数遇到麻烦,

PA6 = cong

我无处可去,我知道对于 cong,我需要提供相等的 refl 和一种类型,但我不确定我应该提供什么类型。有想法吗?

这是大学的一项小作业,所以我宁愿有人证明我错过了什么,而不是写出实际的答案,但我会感谢任何程度的支持。

PA6 : ∀{m n} -> m ≡ n -> n ≡ m

is the axiom I am trying to solve and support, I've tried using a cong (from the core library) but am having troubles with the cong constructor

PA6 = cong

gets me nowhere, I know for cong I am required to supply a refl for equality and a type, but I'm, not sure what type I'm supposed to supply. Ideas?

This is for a small assignment at University, so I'd rather someone demonstrate what I've missed rather than write the acutual answer, but I'd appreciate any degree of support.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

小猫一只 2024-09-03 11:46:30

您的 PA6 表示 ≡ 是对称的。

这可以在 Relation.Binary.PropositionalEquality 模块的标准库中找到。

sym : ∀ {a} {A : Set a} {x y : A} → x ≡ y → y ≡ x
sym refl = refl

(这个问题已经很老了,但我发布这个问题是为了将来偶然发现它的读者的利益。)

Your PA6 says that ≡ is symmetric.

This can be found in the standard library from the Relation.Binary.PropositionalEquality module.

sym : ∀ {a} {A : Set a} {x y : A} → x ≡ y → y ≡ x
sym refl = refl

(This question is pretty old, but I'm posting for the benefit of future readers that stumble upon it.)

羁绊已千年 2024-09-03 11:46:30

根据我创建的系统的性质,我必须意识到我有两个等价,因此需要使用等价方法 refl

从而满足我接受的类型签名 agda:PA6 refl = refl

希望帮助

By the nature of the system that I had created, I had to realise I had two equivalences and thus needed to use the equivalence method refl

Thus to satisfy my type signature agda accepted: PA6 refl = refl

hope that helps

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文