通常,条件语句是if-then语句,其中p称为假设(或前提或前提),q称为结论(或结果)。 p,q表示的条件语句。当p为true且q为false时,条件语句p-> q为false,否则为true。
什么是命题?
命题是一个陈述式陈述,该陈述是对还是错,但不能同时包含两者。
例子:
- Delhi is the capital of India
- 1 + 1 = 2
- 2 + 2 = 4
令p和q是命题。
- 条件语句p-> q是命题“如果p,则q”。
- 当p为true时,条件语句p-> q为false,在其他所有情况下,q为false和true。
通过下表,我们可以确定含义的值:
p |
q |
p -> q |
---|---|---|
T |
T |
T |
T |
F |
F |
F |
T |
T |
F |
F |
T |
各种术语用于表示p-> q
- ”如果p则q
- “如果p,q”
- “ q如果p”
- “ q when p”
- “ q除非p”
- “ p代表q”
- “仅当q时为p”
- “ q每当p时”
- “ q从p开始”
Conditional statements are also called implications. The statement is an implication p -> q is called its hypothesis, and q the conclusion.
示例:令p为语句“ Maria学习Java编程”,而q为语句“ Maria将找到一份好工作”。用英语将语句p-> q表示为语句?
解决方案:
“If Maria learns java programming, then she will find a good job”.
or
“Maria will find a good job when she learns java programming.”
相反,相反和相反
我们可以从条件语句p-> q开始形成一些新的条件语句。
- p-> q的反义词是命题q-> p 。
- p的对换句- > q是命题〜流量- >〜第
- p-> q的倒数是命题〜p- >〜q 。
通过下表,我们可以确定Converse,Contrapositive和Inverse的值:
p |
q |
~p |
~q |
p -> q |
~q -> ~p |
---|---|---|---|---|---|
T |
T |
F |
F |
T |
T |
T |
F |
F |
T |
F |
F |
F |
T |
T |
F |
T |
T |
F |
F |
T |
T |
T |
T |
Note: The contrapositive always has the same truth value as p -> q. When two compound propositions always have the same truth value we call them equivalent, so conditional statement and its contrapositive are equivalent. The converse and the inverse of a conditional statement are also equivalent.
示例1:证明p-> q及其对立的〜q->〜p在逻辑上是等效的。
解决方案:
p |
q |
~p |
~q |
p -> q |
~q -> ~p |
---|---|---|---|---|---|
T |
T |
F |
F |
T |
T |
T |
F |
F |
T |
F |
F |
F |
T |
T |
F |
T |
T |
F |
F |
T |
T |
T |
T |
由于p-> q等于〜q->〜p,因此两个命题都是等价的。
示例2:证明命题q-> p和〜p->〜q不等价于p-> q。
解决方案:
p |
q |
~p |
~q |
p -> q |
q -> p |
~p -> ~q |
---|---|---|---|---|---|---|
T |
T |
F |
F |
T |
T |
T |
T |
F |
F |
T |
F |
T |
T |
F |
T |
T |
F |
T |
F |
F |
F |
F |
T |
T |
T |
T |
T |
在这种情况下,p-> q不等于q-> p和〜p->〜q,因此它们不等于p-> q但它们本身是相等的。
示例3:条件语句“下雨时主队获胜”是对立的,相反的和相反的?
解决方案:
Because “q whenever p” is one way to express conditional statements p -> q.
Original sentence:
“If it is raining, then the home team wins”.
- Contrapositive: “If the home team does not win, then it is not raining.”
- Converse: “If the home team wins, then it is raining.”
- Inverse: “If it is not raining, then the home team does not win.”
示例4:条件语句“如果图片是三角形,则它具有三个边。”是对立的,相反的和相反的?
解决方案:
- Contrapositive: “If the picture doesn’t have three sides, then it is not a triangle.”
- Converse: “If the picture has three sides, then it is a triangle.”
- Inverse: “If the picture is not a triangle, then it doesn’t have three sides.”
双条件或等价
- 现在,我们介绍另一种组合命题的方法,这些命题表示两个命题具有相同的真值。
- 令p和q为命题。
- 双条件语句p <-> q是命题“ p当且仅当q”
- 当p和q具有相同的真值时,双条件语句p <-> q为true,否则为false。
- 双条件语句也称为双蕴涵。
- 有一些表达p <-> q的常用方法
- “ p是q的必要条件和充分条件”
- “如果p则为q,反之为”
- “ p如果q”。
通过下表,我们可以确定Biconditional的值:
p |
q |
p <-> q |
---|---|---|
T |
T |
T |
T |
F |
F |
F |
T |
F |
F |
F |
T |
示例:以下句子的双条件是什么?令p为“您可以乘飞机”的语句,令q为“您购买机票”的语句。
解决方案:
p <-> q is “You can take the flight if and only if you buy a ticket”