简体   繁体   English

一阶逻辑公式

[英]First-order logic formula

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? 如果我想用一阶逻辑表示“半径最小的集合中的元素的值为0”,以下内容是否正确?

∀ e 1 ∈ S. ∀ e 2 ∈ S. Radius e 1 ≤ Radius e 2 ⇒ Value e 1 = 0? ∀ë1∈S.∀e 2个的∈S.半径e 1≤半径e 2⇒值e 1 = 0?

Are the variables correctly quantified? 变量是否正确量化?

Thanks 谢谢

I think you want an exists 我想你想要一个存在

\n

\\exists e_1 . \\存在e_1。 (\\forall e_2 radius(e_1) <= radius(e_2)) and (radius(e_1) = 0) (\\ forall e_2 radius(e_1)<= radius(e_2))和(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) ) 我不确定公式中的优先级,但是现在我想我理解了这个问题,也许您想要(其中M是极小值条件radius(e_1) < radius(e_2)

\\forall e_1 . \\ forall e_1。 ((\\forall e_2 . M ) -> value e_1 = 0) ((\\的forall E_2 M) - >值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. 假设您的元素的半径为{0,1,2},其值等于半径。 Then, you will have a case where 1 <= 2, but the value is not zero. 然后,您将遇到1 <= 2,但该值不为零的情况。 If I'm interpreting your original formula correctly, 如果我正确解释了您的原始公式,

\\forall e_1 . \\ forall e_1。 \\forall e_2 . \\ forall e_2。 P(e_1, 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). 然后,此反示例提供了一个情况,其中P为假,因此整个公式都失败了(但该示例应该为真)。

Just to clarify with parentheses, what you wrote is usually taken to mean: 为了清楚起见,您写的通常是指:

\forall e1 \in S. (\forall e2 \in S. (Radius e1 <= Radius e2 --> Value e1 = 0))

This statement asserts that the value of every element is 0. Here's how: Pick an arbitrary e1 , now pick e2 = e1 , and we have: Radius e1 <= Radius e1 --> Value e1 = 0 . 该语句断言每个元素的值为0。方法如下:选择一个任意e1 ,现在选择e2 = e1 ,我们得到: Radius e1 <= Radius e1 --> Value e1 = 0 Since the antecedent (thing before the --> ) is true, we have Value e1 = 0 . 由于前提条件( -->之前的条件为真),因此我们的Value e1 = 0 And since we made no assumptions about e1 , we have forall e \\in S. Value e = 0 . 并且由于我们没有对e1进行任何假设,因此forall e \\in S. Value e = 0具有全部forall e \\in S. Value e = 0

The problem is that your parentheses are off. 问题是您的括号不正确。

\forall e1 \in S. (\forall e2 \in S. Radius e1 <= Radius e2) --> Value e1 = 0

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. 为了使先行词现在是真实的, e1的半径必须小于或等于每一个 (而不是任何)其他半径,这似乎是你的原意。

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: 如果不是,则需要为此添加一个子句:

(\forall e1 \in S. \forall e2 \in S. Radius e1 <= Radius e2 --> Value e1 = 0) \and (\exists e1 \in S. \forall e2 \in S. Radius e1 <= Radius e2)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM