一阶逻辑公式
如果我想用一阶逻辑表达“集合中半径最小的元素的值为0”,下面的语句正确吗?
∀ e1 ∈ S。 ∀ e2 ∈ S。半径 e1 ≤ 半径 e2 ⇒ 值 e1 = 0?
变量的量化是否正确?
谢谢
If I want to express in first-order logic that 'the element(s) in the set with the smallest radius has the value 0', would the following be right?
∀ e1 ∈ S. ∀ e2 ∈ S. Radius e1 ≤ Radius e2 ⇒ Value e1 = 0?
Are the variables correctly quantified?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只是为了用括号澄清一下,您所写的内容通常意味着:
此语句断言每个元素的值为 0。具体方法如下:选择任意
e1
,现在选择e2 = e1
,我们有:Radius e1 <= Radius e1 -->值 e1 = 0。由于先行词(
-->
之前的内容)为 true,因此我们有Value e1 = 0
。由于我们没有对e1
做任何假设,所以我们有forall e \in S.Value e = 0
。问题是你的括号没了。
为了使先行词现在成立,
e1
的半径必须小于或等于每个(而不是任何)其他半径,这看起来像你有意的。Just to clarify with parentheses, what you wrote is usually taken to mean:
This statement asserts that the value of every element is 0. Here's how: Pick an arbitrary
e1
, now picke2 = e1
, and we have:Radius e1 <= Radius e1 --> Value e1 = 0
. Since the antecedent (thing before the-->
) is true, we haveValue e1 = 0
. And since we made no assumptions aboute1
, we haveforall e \in S. Value e = 0
.The problem is that your parentheses are off.
In order for the antecedent to be true now,
e1
's radius has to be less than or equal to every (as opposed to any) other radius, which seems like what you intended.我认为你想要一个存在\exists e_1 。 (\forall e_2 radius(e_1) <= radius(e_2)) and (radius(e_1) = 0)我不确定公式中的优先级,但现在我想我理解了这个问题,也许您想要(其中 M 是极小条件
radius(e_1) < radius(e_2)
)\forall e_1 。 ((\forall e_2 . M) -> value e_1 = 0)
我认为您之前的公式可能是错误的,原因如下。假设您有半径为 { 0, 1, 2 } 的元素,并且值等于半径。然后,您将遇到 1 <= 2 但该值不为零的情况。如果我正确解释了您的原始公式,则
\forall e_1 。 \forall e_2 。 P(e_1, e_2)
那么这个反例提供了 P 为假的情况,因此整个公式失败(但示例应该为真)。
I think you want an exists\exists e_1 . (\forall e_2 radius(e_1) <= radius(e_2)) and (radius(e_1) = 0)I'm not sure about the precedence in the formula, but now that I think I understand the question, maybe you want (where M is the minimality condition
radius(e_1) < radius(e_2)
)\forall e_1 . ((\forall e_2 . M) -> value e_1 = 0)
I think your previous formula may be wrong for the following reason. Suppose you have elements with radii { 0, 1, 2 }, and values equal to radii. Then, you will have a case where 1 <= 2, but the value is not zero. If I'm interpreting your original formula correctly,
\forall e_1 . \forall e_2 . P(e_1, e_2)
Then this counterexample provides a case where P is false, therefore the entire formula fails (but the example should be true).
如果没有最小半径的元素,您所写的也成立。如果这是你所希望的,那么你是对的;如果没有,您需要添加一个子句来实现这一效果:
What you wrote is also true if there are no elements with the smallest radius. If this is desired, you are correct; if not, you need to add a clause to that effect: