coq - 在 Coq 中提供示例,其中 (AB: Prop), P: Prop -> Type,这样 A <-> B,但不能用 PB 替换 PA
问题描述
正如标题所要求的,我希望举一个例子:
Section Question:
Definition A: Prop := <whatever you like>.
Definition B:Prop := <whatever you like>.
Definition/Inductive/Fixpoint P: Prop -> Type := <whatever you like>.
Theorem AEquivB: A <-> B.
Proof. <supply proof here>. Qed.
(* Question 1. can we pick a P, A, B to prove this? *)
Theorem PA_not_equals_Pb: P A <> P B.
Proof. <supply proof here>. Qed.
(* Question 1.5. can we pick a P, A, B to prove this? *)
Theorem PA_not_equiv_PB: ~(P A <-> P B)
Proof. <supply proof here>. Qed.
一般来说,我有兴趣了解“证明等价”是否“足够好”以在某种意义上用作“平等”,或者是否存在我们可以有P A
, 和A <-> B
, 但没有 P B
的情况。
解决方案
这与 Coq 一致forall A B : Prop, (A <-> B) -> A = B
。(也就是说,您可以将其添加为公理,并且理论不会崩溃。)此公理称为命题外延。正如A = B
快速给出的那样forall P : Prop -> Prop, P A <-> P B
,没有术语P
, A
,B
这样的(A <-> B) /\ ~(P A <-> P B)
,因为这会与公理相矛盾,但我们知道它是一致的。同样,我们也很快得到P A = P B
,这意味着我们不能也得到P A <> P B
。请注意,即使这样P
, A
,B
不存在违反命题外延性的,我们仍然不能证明命题外延性。Coq 根本没有能力像那样谈论它自己(这很好,因为这意味着你可以自定义它),这就是为什么如果你想要它需要添加命题外延性作为公理。
推荐阅读
- laravel-6 - 重定向到 Laravel 6 中的上一个 URL
- intellij-idea - 找不到用于 intellij 的小黄瓜插件
- javascript - 幻灯片 - 根据位置禁用左键或右键
- scikit-learn - 无法在我的 jupyter 笔记本中安装 auto-sklearn
- excel - Dax Measure 具有多个过滤器和所有
- javascript - 单例实例 - 性能 - 为什么糟糕的代码这么快?
- llvm - 在“组合”LLVM IR 指令中检测自由功能?
- python - 熊猫将多索引与另一列相乘
- reactjs - 反应键盘景观
- raspberry-pi4 - 在树莓派 4 上安装 Iroha