markdown
論理と真理値表の基本md 9c08456
lecture/information/discrete-math/logic-and-truth-tables-basics.lecture.n.md
Download PDF

論理ろんりと真理値表しんりちひょうの基本きほん

date2026-07-14document_iddoc_2bb9ffe502ca066c76b46a32ec010508description命題論理の結合子、真理値表、論理同値、含意と必要十分条件を日英両言語で体系的に説明する。prerequisites離散数学への導入 / 条件文の読み方 / 表の読み取りtype講義statusactiverelateddata/lecture/information/discrete-math/introduction-to-discrete-mathematics.lecture.n.md / data/lecture/information/discrete-math/sets-and-maps-basics.lecture.n.md / data/lecture/information/programming/introduction-to-programming.lecture.n.md
informationdiscrete-mathundergraduatelecture

1導入どうにゅう

この講義こうぎでは、命題めいだいから複合命題ふくごうめいだいを構成こうせいする論理結合子ろんりけつごうしを定義ていぎし、真理値表しんりちひょうによって論理式ろんりしきの性質せいしつを判定はんていする方法ほうほうを説明せつめいする。特とくに、含意がんいの方向ほうこうと必要条件ひつようじょうけん・十分条件じゅうぶんじょうけんの対応たいおうを明確めいかくにする。

2命題めいだいと真理値しんりち

命題めいだいProposition とは、真しんまたは偽ぎのいずれかに確定かくていする平叙文へいじょぶんである。命題めいだいが真しんであることを T、偽ぎであることを F と表記ひょうきし、この T または F を真理値しんりちtruth valueという。疑問文ぎもんぶんや、変数へんすうの値あたいを指定していしなければ真偽しんぎが確定かくていしない文ぶんは、そのままでは命題めいだいではない。

3論理結合子ろんりけつごうし

P,Q を命題めいだいとする。

  • 否定ひていnegation [PARSE ERROR: Undefined("Command(\"neg\")")]P は、P と反対はんたいの真理値しんりちをもつ。
  • 論理積ろんりせきconjunction P∧Q は、P,Q がともに真しんであるとき、かつそのときに限かぎり真しんである。
  • 論理和ろんりわdisjunction P∨Q は、P,Q の少すくなくとも一方いっぽうが真しんであるとき、かつそのときに限かぎり真しんである。したがって、ここでの「または」は両方りょうほうが真しんである場合ばあいも含ふくむ。
  • 含意がんいimplication P→Q は、P が真しんで Q が偽ぎである場合ばあいに限かぎり偽ぎである。P を前件ぜんけん、Q を後件こうけんという。
  • 同値どうちbiconditional P↔Q は、P,Q の真理値しんりちが一致いっちするとき、かつそのときに限かぎり真しんである。

4真理値表しんりちひょう

真理値表しんりちひょうTruth table とは、構成要素こうせいようそとなる命題めいだいの真理値しんりちのすべての組合くみあわせについて、論理式ろんりしきの真理値しんりちを列挙れっきょした表ひょうである。二ふたつの命題めいだいからなる基本的きほんてきな論理式ろんりしきは、次つぎの表ひょうで定義ていぎされる。

\begin{array}{c|c|c|c|c|c} P&Q&P\land Q&P\lor Q&P\to Q&P\leftrightarrow Q\\ \hline \mathrm{T}&\mathrm{T}&\mathrm{T}&\mathrm{T}&\mathrm{T}&\mathrm{T}\\ \mathrm{T}&\mathrm{F}&\mathrm{F}&\mathrm{T}&\mathrm{F}&\mathrm{F}\\ \mathrm{F}&\mathrm{T}&\mathrm{F}&\mathrm{T}&\mathrm{T}&\mathrm{F}\\ \mathrm{F}&\mathrm{F}&\mathrm{F}&\mathrm{F}&\mathrm{T}&\mathrm{T} \end{array}

P→Q について、前件ぜんけん P が偽ぎである二ふたつの行ぎょうでは含意がんいは真しんである。これは、P→Q が因果関係いんがかんけいを主張しゅちょうする表現ひょうげんではなく、「P が真しんなのに Q が偽ぎとなる反例はんれいは存在そんざいしない」という条件じょうけんだからである。

5恒真式こうしんしき・矛盾式むじゅんしき・論理同値ろんりどうち

恒真式こうしんしきTautology とは、構成要素こうせいようその真理値しんりちにかかわらず常つねに真しんとなる論理式ろんりしきである。矛盾式むじゅんしきContradiction とは、常つねに偽ぎとなる論理式ろんりしきである。たとえば、P∨[PARSE ERROR: Undefined("Command(\"neg\")")]P は恒真式こうしんしきであり、P∧[PARSE ERROR: Undefined("Command(\"neg\")")]P は矛盾式むじゅんしきである。

二ふたつの論理式ろんりしき A,B が、すべての真理値しんりちの割当わりあてにおいて同一どういつの真理値しんりちをもつとき、A と B は論理同値ろんりどうちlogically equivalentであるといい、A≡B と表記ひょうきする。これは、A↔B が恒真式こうしんしきであることと同値どうちである。例れいとして、含意がんいは

P→Q≡[PARSE ERROR: Undefined("Command(\"neg\")")]P∨Q

と変形へんけいできる。

6含意がんいの方向ほうこうと必要十分条件ひつようじゅうぶんじょうけん

P→Q において、P は Q の十分条件じゅうぶんじょうけんsufficient conditionであり、Q は P の必要条件ひつようじょうけんnecessary conditionである。すなわち、P の成立せいりつは Q の成立せいりつを保証ほしょうし、P が成立せいりつするためには Q が必要ひつようである。

Q→P は P→Q の逆ぎゃくconverseであり、一般いっぱんには元もとの含意がんいから導出どうしゅつできない。これに対たいし、[PARSE ERROR: Undefined("Command(\"neg\")")]Q→[PARSE ERROR: Undefined("Command(\"neg\")")]P は対偶たいぐうcontrapositiveであり、

P→Q≡[PARSE ERROR: Undefined("Command(\"neg\")")]Q→[PARSE ERROR: Undefined("Command(\"neg\")")]P

が成立せいりつする。変数へんすうを含ふくむ条件じょうけん P(x),Q(x) について、考察対象こうさつたいしょうのすべての x で P(x)→Q(x) と Q(x)→P(x) が成立せいりつするとき、P(x)↔Q(x) が恒真こうしんとなり、P(x) は Q(x) の必要十分条件ひつようじゅうぶんじょうけんnecessary and sufficient conditionである。単一たんいつの真理値割当しんりちわりあてで二ふたつの含意がんいがともに真しんであることだけでは、この関係かんけいは導出どうしゅつできない。

7例れい

整数せいすう n に対たいし、P(n) を「n は 4 の倍数ばいすうである」、Q(n) を「n は偶数ぐうすうである」とする。P(n),Q(n) は n を指定していするまで命題めいだいではなく、整数せいすうを真理値しんりちへ対応たいおうさせる述語じゅつごpredicateである。すべての整数せいすう n について P(n)→Q(n) が成立せいりつするため、「4 の倍数ばいすうであること」は「偶数ぐうすうであること」の十分条件じゅうぶんじょうけんである。一方いっぽう、Q(2) は真しんで P(2) は偽ぎであるため、n=2 は Q(n)→P(n) の反例はんれいである。

8要点ようてん

  • 論理結合子ろんりけつごうしの意味いみは、自然言語しぜんげんごの印象いんしょうではなく真理値表しんりちひょうによって確定かくていする。
  • 恒真式こうしんしきと矛盾式むじゅんしきは、それぞれすべての行ぎょうが真しんまたは偽ぎとなる論理式ろんりしきである。
  • 論理同値ろんりどうちは、すべての真理値しんりちの割当わりあてにおける一致いっちを意味いみする。
  • P→Q では P が十分条件じゅうぶんじょうけん、Q が必要条件ひつようじょうけんであり、逆ぎゃくと対偶たいぐうを混同こんどうしてはならない。

9関連かんれんリンク

data/lecture/information/discrete-math/introduction-to-discrete-mathematics.lecture.n.md data/lecture/information/discrete-math/sets-and-maps-basics.lecture.n.md

Logic and Truth Tables: Fundamentals

1Introduction

This lecture defines the logical connectives used to construct compound propositions and explains how truth tables determine properties of logical formulas. In particular, it clarifies the direction of implication and the roles of necessary and sufficient conditions.

2Propositions and Truth Values

A {proposition} is a declarative sentence that has exactly one of the two truth values: true or false. We write T when a proposition is true and F when it is false. A question, or a sentence whose truth cannot be determined until a variable is specified, is not itself a proposition.

3Logical Connectives

Let P and Q be propositions.

  • The {negation} [PARSE ERROR: Undefined("Command(\"neg\")")]P has the truth value opposite to that of P.
  • The {conjunction} P∧Q is true if and only if both P and Q are true.
  • The {disjunction} P∨Q is true if and only if at least one of P and Q is true. Thus, this inclusive “or” includes the case in which both propositions are true.
  • The {implication} P→Q is false if and only if P is true and Q is false. We call P the antecedent and Q the consequent.
  • The {biconditional} P↔Q is true if and only if P and Q have the same truth value.

4Truth Tables

A {truth table} lists the truth value of a logical formula for every assignment of truth values to its component propositions. The basic formulas involving two propositions are defined by the following table.

\begin{array}{c|c|c|c|c|c} P&Q&P\land Q&P\lor Q&P\to Q&P\leftrightarrow Q\\ \hline \mathrm{T}&\mathrm{T}&\mathrm{T}&\mathrm{T}&\mathrm{T}&\mathrm{T}\\ \mathrm{T}&\mathrm{F}&\mathrm{F}&\mathrm{T}&\mathrm{F}&\mathrm{F}\\ \mathrm{F}&\mathrm{T}&\mathrm{F}&\mathrm{T}&\mathrm{T}&\mathrm{F}\\ \mathrm{F}&\mathrm{F}&\mathrm{F}&\mathrm{F}&\mathrm{T}&\mathrm{T} \end{array}

For P→Q, the implication is true in both rows in which the antecedent P is false. This convention reflects that P→Q is not an assertion of causation; instead, it states that there is no counterexample in which P is true while Q is false.

5Tautologies, Contradictions, and Logical Equivalence

A {tautology} is a formula that is true under every assignment of truth values. A {contradiction} is a formula that is false under every assignment. For example, P∨[PARSE ERROR: Undefined("Command(\"neg\")")]P is a tautology, whereas P∧[PARSE ERROR: Undefined("Command(\"neg\")")]P is a contradiction.

Two formulas A and B are {logically equivalent}, written A≡B, if they have the same truth value under every assignment. Equivalently, A↔B is a tautology. For example, implication satisfies

P→Q≡[PARSE ERROR: Undefined("Command(\"neg\")")]P∨Q.

6Direction of Implication and Necessary and Sufficient Conditions

In P→Q, P is a {sufficient condition} for Q, and Q is a {necessary condition} for P. That is, the truth of P guarantees the truth of Q, and Q must be true whenever P is true.

The statement Q→P is the {converse} of P→Q and, in general, does not follow from the original implication. In contrast, [PARSE ERROR: Undefined("Command(\"neg\")")]Q→[PARSE ERROR: Undefined("Command(\"neg\")")]P is its {contrapositive}, and

P→Q≡[PARSE ERROR: Undefined("Command(\"neg\")")]Q→[PARSE ERROR: Undefined("Command(\"neg\")")]P.

For conditions P(x) and Q(x) containing a variable, if both P(x)→Q(x) and Q(x)→P(x) hold for every object x under consideration, then P(x)↔Q(x) is a tautology, and P(x) is a {necessary and sufficient condition} for Q(x). The fact that both implications are true under one particular truth-value assignment does not establish this relationship.

7Example

For an integer n, let P(n) mean “n is divisible by 4,” and let Q(n) mean “n is even.” Until n is specified, P(n) and Q(n) are not propositions; they are {predicates} that assign truth values to integers. The implication P(n)→Q(n) holds for every integer n, so divisibility by 4 is sufficient for being even. In contrast, Q(2) is true and P(2) is false, so n=2 is a counterexample to Q(n)→P(n).

8Key Points

  • The meanings of logical connectives are determined by truth tables, not by informal impressions of natural-language expressions.
  • A tautology is true in every row of its truth table, whereas a contradiction is false in every row.
  • Logical equivalence means agreement under every assignment of truth values.
  • In P→Q, P is sufficient and Q is necessary; the converse must not be confused with the contrapositive.

9Related Links

data/lecture/information/discrete-math/introduction-to-discrete-mathematics.lecture.n.md data/lecture/information/discrete-math/sets-and-maps-basics.lecture.n.md
raw .n.md をコピー
loc をコピー (filepath:line ~ line)
copy share link
copy encoded share link
path をコピー
copy share link
copy encoded share link
copy share link
copy encoded share link
タブを全て閉じる