coq - 如何在不取消 coq 中的积极性检查的情况下使用这些归纳法?
问题描述
要使用 以简单的方式编写Inductive
,我有如下代码。
Inductive T :=
| t0
| t1 (a b : T)
| ..
| tk (P : T->Prop) (t : T)
| tn (P : T->T->Prop) (t : T)
| ..
end
.
但是,我必须Unset Positivity Checking
使用T
,也不能Fixpoint
使用T
. 我可以使用替代方案,例如bool
代替Prop
. 这就是我的代码现在的样子。
Inductive
有没有办法使用而不是取消设置积极性检查来解决问题?
解决方案
你不能。您的类型T
太大以至于破坏了逻辑的一致性。
Unset Positivity Checking.
Inductive T := tk (P : T -> bool).
Definition shaves x :=
match x with tk f => f x end.
Definition barber :=
tk (fun x => negb (shaves x)).
Goal False.
Proof.
assert (negb (shaves barber) = shaves barber).
{ change (negb (negb (shaves barber)) = shaves barber).
now destruct shaves. }
now destruct shaves.
Qed.
推荐阅读
- biztalk - 如何提取姓氏?
- reactjs - React 事件不会在移动设备上触发,但在桌面上可以正常工作。我试过onClick,onTouchStart,onTouchEnd,onMouseUp,OnMouseDown
- java - 使用 jfugue,如何从数组中生成随机音乐字符串(使用 player.play)?
- arrays - Python:随机播放并放回numpy数组的初始顺序元素
- go - 如何保证结构字段的存在,如接口对方法所做的?
- javascript - 在不同的刀片中显示查询结果
- excel - 如何确定特定数组的长度
- reactjs - 使用点符号测试 React 标签
- go - GC 开始时的堆大小、GC 结束时的堆大小和 gctrace=1 中的活动堆数代表什么?
- eclipse - 右键单击时将 popupMenus 条目添加为新类别中的子条目