[英]How to obtain an “indirect implicant” in propositional logic
我正在尝试解决命题逻辑中一个我从未见过描述的问题。 我将其发布在这里,以查看是否有人对此有一个标准的解决方案。
问题:给定命题可满足的逻辑公式F
和在命题F
出现的命题p
,确定是否存在不包含 p
的可满足命题公式phi
使得
phi => (F => p)
如果是这样,请提供这样的phi。
为了直观,我将phi
称为“ p wrt F的间接蕴涵”,因为它需要隐含p
而不提及p。 相反,它提到了通过F
影响p的其他命题。
这是一个例子,其中“ france”,“ lyon”,“ paris”和“ berlin”都是命题:
F is "paris => france and lyon => france and berlin => not france"
p is "france"
那么解phi是paris or lyon
,因为这意味着(F => france)
(更新:实际上精确的解决方案是(paris or lyon) and not berlin
因为我们没有在任何地方声明这些主张互斥,所以paris
和berlin
(或lyon
和berlin
)可能同时是真的,并暗示在具有适当背景知识的paris or lyon
下,解决方案将简化为“ paris or lyon
。
它类似于为公式(F => p)
找到一个蕴含量的问题,但是由于一个简单蕴含量可以包含p
(实际上主要蕴含量只是p
),所以并不相同。
再次,我将其发布在这里,希望有更多经验的人看着它并说:“啊,但这只是问题之类的一个变种。” 那将是理想的,因为它将使我能够利用现有的算法(特别是可满足性)和概念。
另外,仅是为了获得更多信息,我实际上是在尝试解决相等逻辑(即命题是相等的命题逻辑)的问题。 这当然更复杂,但是命题案例可能是一个很好的垫脚石。
谢谢你的时间。
给出你的例子
F is "paris => france and lyon => france and berlin => not france"
p is "france"
其中F
有4个语句:
F1 = paris
F2 = france and lyon
F3 = france and berlin
F4 = not france
通过简化含义=>
可以分解F
:
F1-2: "paris => france and lyon" = "(not paris) or (france and lyon)"
F2-3: "france and lyon => france and berlin" = "(not france or not lyon) or (france and berlin)"
F3-4: "france and berlin => not france" = "(not france or not berlin) and (not france)"
如果我们通过F
含义进行前向链接,我们将进行推理:
Reason(F): not (not (not F1 or F2) or F3) or F4
not (not (not paris or (france and lyon)) or (france and berlin)) or (not france)
因此,我们有以下解决方案:
S1: not france
S2: not (not (not F1 or F2) or F3):
not (not (not paris or (france and lyon)) or (france and berlin))
接下来,我们可以评估p
:
p: france => france = TRUE
S1 = not france = not TRUE = FALSE ~ not applicable
S2 = not (not (not paris or (france and lyon)) or (france and berlin))
= not (not (not paris or (TRUE and lyon)) or (TRUE and berlin))
= not (not (not paris or lyon) or berlin)
= not ((paris AND not lyon) or berlin)
= not (paris AND not lyon) AND not berlin
= not (paris AND not lyon) AND not berlin
= (not paris OR lyon) AND not berlin
所以, p
是TRUE在F
你需要这些条件是TRUE
:
pF1 AND pF2:
pF1 = (not paris OR lyon) = (paris,lyon) in { (F,F), (F,T), (T,T) }
pF2 = not berlin => berlin = FALSE
这是我自己的解决方案。 我已经发布了这个问题,希望了解一种标准解决方案,但也许没有。
将F
转换为等效的DNF公式(析取范式),即,连接词F1 or ... or Fn
析取式,其中每个Fi
是一个连词。 连词从句是字面量的结合,其中字面量是命题或其否定词。 将公式转换为DNF是标准过程。
对于每个析取Fi
。 它采用以下三种形式之一:
L1 and ... and Lmi and p
L1 and ... and Lmi and not p
L1 and ... and Lmi
(其中不出现p
)。 令inputs(Fi)
为L1 and ... and Lmi
,而output(Fi)
为true
, false
和neutral
。
直觉是,如果Fi
是F
的DNF中唯一的析取项,则如果inputs(Fi)
成立,我们需要p
拥有真值output(Fi)
( neutral
意味着它可以以任何一种方式出现),以使F
成立。
当然,要抓住的是, Fi
通常不会是唯一的分离。 对于没有输出为true
的给定析取函数Fi
,可能会有一个ìnputs(Fj) and inputs(Fi)
取ìnputs(Fj) and inputs(Fi)
Fj
具有不同的输出,从而使ìnputs(Fj) and inputs(Fi)
都可以满足,也就是说,对Fi
的输入也有一个满足Fj
的赋值,因此在仍然满足F
承认p
为假。 因此,我们将输出为true
G1, ..., Gk
取G1, ..., Gk
命名为输出false
或neutral
H1, ..., Hl
G1, ..., Gk
取H1, ..., Hl
,并将phi
定义为
\n (输入(G1)或...或输入(Gk))而不是(输入(H1)或...或输入(Hl))\n
然后phi
是解决方案,因为它不包含p
并暗示F => p
。 它不包含p
因为它是由inputs
定义的,不定义为不包含p
。 这意味着F => p
因为它满足至少一个inputs(G_)
且不满足任何一个inputs(H_)
。 这意味着,在F
的DNF中的所有析取项中,只有Gi
才有机会保持为真(已知除p
以外的所有文字均已满足)。 因为它们都包含p
,所以如果F
为真,那么p
也必须成立。
让我们看看如何管理给出的示例。
DNF
paris => france and lyon => france and berlin => not france
是
(not berlin and france) or
(not lyon and not paris and not france)
因此,我们有
G1
等于not berlin and france
H1
等于not lyon and not paris and not france
所以
inputs(G1) = not berlin
inputs(H1) = not lyon and not paris
因此phi
是
not berlin and not (not lyon and not paris)
相当于
(lyon or paris) and not berlin
解决方案not berlin
的存在并不直观。 因为F
承认berlin
, paris
和lyon
中的一个以上是同时存在的。 因此,在要求paris
或lyon
为真的同时,也不需要not berlin
,否则将暗示france
和not france
。 在有背景知识说明最多一个变量同时为真的情况下,解决方案将仅是lyon or paris
因为这将自动暗示not berlin
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.