在The Science of programming书里第1章的习题:
Translate the following sentences into propositional form.
f) None of the following are true: x < y, y < z and v=w
其中 x < y 可以写成 xlessy, y < z 是 ylessz, v=w 是 vequalw
所以,我给出的答案是:
](xlessy v ylessz v vequalw)
] 代表 not, v 代表 or,^ 代表 and。
请问,这样写对吗?对None of the following are true:不大明白。
你写的是对的。对于三个关系
a,b,c
,None of are true
意思是没有一个是对的
,也就是每一个都是错的
,因此可以翻译为:not a and not b and not c
提取出
not
,也就是(注意里面的and
需要变成or
):not (a or b or c)