作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
从我阅读的内容来看,eq_rect
和相等性似乎紧密地联系在一起。奇怪的是,我无法在手册上找到它的定义。
它来自哪里,它的状态是什么?
最佳答案
如果使用Locate eq_rect
,您会发现eq_rect
位于Coq.Init.Logic
中,但是如果您查看该文件,则其中没有eq_rect
。发生什么了?
在定义归纳类型时,Coq在许多情况下会自动为您生成3个归纳原理,将_rect
,_rec
和_ind
附加到类型名称之后。
要了解eq_rect
意味着您需要它的类型,
Check eq_rect.
eq_rect
: forall (A : Type) (x : A) (P : A -> Type),
P x -> forall y : A, x = y -> P y
Leibniz characterized the notion of equality as follows: Given any
x
andy
,x = y
if and only if, given any predicateP
,P(x)
if and only ifP(y)
.In this law, "
P(x)
if and only ifP(y)
" can be weakened to "P(x)
ifP(y)
"; the modified law is equivalent to the original, since a statement that applies to "anyx
andy
" applies just as well to "anyy
andx
".
x
和
y
相等,则每个谓词的“行为”是相同的。
eq_rect
,我们可以将
eq_rect
的参数顺序重新排列为以下等效公式:
eq_rect_reorder
: forall (A : Type) (P : A -> Type) (x y : A),
x = y -> P x -> P y
关于equality - 什么是eq_rect?在Coq中的定义是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48352966/
我是一名优秀的程序员,十分优秀!