Discrete Mathematics 01: Logic, Proofs, and Set Theory

Propositional Logic

  • Declarative Statements and Propositions

    • Informally, a proposition is defined as a declarative sentence (a statement) in a language that is subject to being either true or false.

  • Truth Values and Logical Operators

    • Negation (¬\neg):

    • Let PP be a proposition. The negation of PP, denoted by ¬P\neg P, represents "not PP", "It is not the case that PP", or "PP is not true".

    • The proposition ¬P\neg P takes the exact opposite truth value of PP.

    • Conjunction (∧\land):

    • Let PP and QQ be propositions. The conjunction of PP and QQ, denoted by P∧QP \land Q, represents "PP and QQ".

    • The compound statement P∧QP \land Q evaluates to true if both PP and QQ are true, and false otherwise.

    • Disjunction (∨\lor):

    • Let PP and QQ be propositions. The disjunction of PP and QQ, denoted by P∨QP \lor Q, represents "PP or QQ" (inclusive or, meaning maybe both).

    • The compound statement P∨QP \lor Q evaluates to false if both PP and QQ are false, and true otherwise.

    • Exclusive OR (⊕\oplus):

    • Let PP and QQ be propositions. The exclusive or of PP and QQ, denoted by P⊕QP \oplus Q, represents "PP or QQ but not both".

    • The compound statement P⊕QP \oplus Q evaluates to true if exactly one of PP and QQ is true, and false otherwise.

    • Conditional Statement or Implication (→\rightarrow):

    • Let PP and QQ be propositions. The conditional statement or implication P→QP \rightarrow Q represents "if PP then QQ" or "PP implies QQ".

    • The implication P→QP \rightarrow Q evaluates to false when PP is true and QQ is false; in all other cases, it evaluates to true.

    • Related Conditional Statements:

    • Converse: For a given conditional statement P→QP \rightarrow Q, its converse is defined as the conditional Q→PQ \rightarrow P.

    • Contrapositive: For a given conditional statement P→QP \rightarrow Q, its contrapositive is defined as the conditional ¬Q→¬P\neg Q \rightarrow \neg P.

    • Inverse: For a given conditional statement P→QP \rightarrow Q, its inverse is defined as the conditional ¬P→¬Q\neg P \rightarrow \neg Q.

    • Biconditional Statement (↔\leftrightarrow):

    • Let PP and QQ be propositions. The biconditional statement P↔QP \leftrightarrow Q represents "PP if and only if QQ" or "PP is necessary and sufficient for QQ".

    • The statement P↔QP \leftrightarrow Q evaluates to true when both PP and QQ share the same truth value (both true or both false); it evaluates to false in any other case.

  • Tautologies, Contradictions, and Logical Equivalence

    • Tautology: A compound proposition that evaluates to true under all possible truth value assignments for its propositional variables.

    • Contradiction: A compound proposition that evaluates to false under all possible truth value assignments for its propositional variables.

    • Logical Equivalence (≡\equiv):

    • Let PP and QQ be propositions. PP and QQ are logically equivalent, written as P≡QP \equiv Q, if they have the same truth value in all possible cases.

    • Equivalently, PP and QQ are logically equivalent if the biconditional statement P↔QP \leftrightarrow Q is a tautology.

    • De Morgan's Laws:

    • Let PP and QQ be propositions. Then:

      • ¬(P∧Q)≡¬P∨¬Q\neg (P \land Q) \equiv \neg P \lor \neg Q

      • ¬(P∨Q)≡¬P∧¬Q\neg (P \lor Q) \equiv \neg P \land \neg Q

  • Digital Logic and Bit Operations

    • Bit Definition: A bit is the most basic unit of information in computing, having two possible states: 11 (true) or 00 (false).

    • Boolean Variables: A Boolean variable is a variable that can take two values: True\text{True} or False\text{False}. Thus, a bit represents a Boolean variable.

    • Bit Operations:

    • NOT: A unary operation that performs a logical negation on a single bit (inverting its value).

    • AND: A binary operation performing a logical conjunction (∧\land) across two bits.

    • OR: A binary operation performing a logical disjunction (∨\lor) across two bits.

    • XOR: A binary operation performing a logical exclusive OR (⊕\oplus) across two bits.

Predicate Logic

  • Basic Definitions

    • Term: An expression that represents "an object" or "a thing".

    • Predicate: A symbol that represents a property or a relation.

    • Domain of Discourse (UU): Informally, the domain of discourse (denoted by UU) is the set of all objects in a theory, or the universe of possible objects that might be considered subject to predicates.

  • Quantifiers

    • Universal Quantifier (∀\forall):

    • Given a predicate PP and a variable xx, the statement ∀x P(x)\forall x \, P(x) means that predicate PP is true for all elements xx within the domain of discourse UU ("For all xx, P(x)P(x)").

    • Existential Quantifier (∃\exists):

    • Given a predicate PP and a variable xx, the statement ∃x P(x)\exists x \, P(x) means that there exists at least one element xx in the domain of discourse UU for which the predicate PP is true ("There exists xx such that P(x)P(x)").

  • Logical Equivalence and Negation in Predicate Logic

    • Logical Equivalence: Two statements involving predicates and quantifiers are logically equivalent if they always have the same truth value, regardless of what predicates are substituted in the statements and what domain of discourse UU is being used.

    • Negation of Quantifiers:

    • Let PP be a predicate in some domain of discourse UU. Then:

      • ¬∀x P(x)≡∃x ¬P(x)\neg \forall x \, P(x) \equiv \exists x \, \neg P(x)

      • ¬∃x P(x)≡∀x ¬P(x)\neg \exists x \, P(x) \equiv \forall x \, \neg P(x)

Deductive Reasoning and Rules of Inference

  • Structure of Deduction

    • Deductive Principle: Let A1,…,AnA_1, \dots, A_n and QQ be propositions. If (A1∧⋯∧An)  ⟹  Q(A_1 \land \dots \land A_n) \implies Q is a tautology and all premises A1,…,AnA_1, \dots, A_n are true, then QQ must be true.

    • Deductive Deduction: Through this structure, QQ can be formally deduced from the premises A1,…,AnA_1, \dots, A_n

  • Rules of Inference

    • Definition: A tautology of the form (A1∧⋯∧An)  ⟹  Q(A_1 \land \dots \land A_n) \implies Q is called a rule of inference in propositional logic, allowing arguments to be conducted in a way that is always logically valid.

Proof Technique: Mathematical Induction

  • Principle of Mathematical Induction

    • Theorem: Let PP be a predicate defined for the natural numbers N\mathbb{N}. If:

    • Basis step: P(0)P(0) holds true, and

    • Inductive step: P(k)  ⟹  P(k+1)P(k) \implies P(k + 1) holds for an arbitrary kk,

    • Then P(n)P(n) is true for every n∈Nn \in \mathbb{N}.

  • Principle of Strong Induction

    • Theorem: Let PP be a predicate defined for the natural numbers N\mathbb{N}. If:

    • Basis step: P(0)P(0) holds true, and

    • Inductive step: (P(0)∧P(1)∧⋯∧P(k))  ⟹  P(k+1)(P(0) \land P(1) \land \dots \land P(k)) \implies P(k + 1) holds for an arbitrary kk,

    • Then P(n)P(n) is true for every n∈Nn \in \mathbb{N}.

Fundamental Set Theory

  • Definitions and Basic Properties

    • Set Definition: Intuitively, a set is a collection of objects.

    • Elements / Members: The objects contained in a set are said to be its elements or members. If aa is an element of a set AA, write a∈Aa \in A. If not, write a∉Aa \notin A

    • Structural Properties of Sets:

    • Unordered: A set is defined entirely by the elements belonging to it, meaning element order does not matter.

    • No Repeated Elements: A set cannot contain repeated elements. If an element belongs to a set, it already belongs; it does not make sense to "belong twice".

    • Empty Set (∅\emptyset): The empty set is defined as the unique set containing no elements, denoted by ∅\emptyset

  • Relations Between Sets

    • Equal Sets (==):

    • Two sets AA and BB are said to be equal if they have the exact same elements.

    • Formally: ∀x (x∈A  ⟺  x∈B)\forall x \, (x \in A \iff x \in B). Written as A=BA = B

    • Inclusion / Subset (⊆\subseteq):

    • A set AA is a subset of a set BB if every element of AA is an element of BB. Written as A⊆BA \subseteq B

    • Observation on Subsets:

    • For every set AA, the empty set is a subset of AA (∅⊆A\emptyset \subseteq A

    • For every set AA, the set AA is a subset of itself (A⊆AA \subseteq A

  • Set Operations

    • Union (∪\cup):

    • Let AA and BB be sets. The union of AA and BB, denoted A∪BA \cup B, is the set containing all elements that are either in AA or in BB (or in both).

    • Set-builder notation: A∪B={x∣x∈A∨x∈B}A \cup B = \{x \mid x \in A \lor x \in B\}

    • Intersection (∩\cap):

    • Let AA and BB be sets. The intersection of AA and BB, denoted A∩BA \cap B, is the set containing all elements that are in both AA and BB

    • Set-builder notation: A∩B={x∣x∈A∧x∈B}A \cap B = \{x \mid x \in A \land x \in B\}

    • Disjoint Sets: If two sets have an empty intersection (A∩B=∅A \cap B = \emptyset), they are said to be disjoint.

    • Difference / Relative Complement (−-, ∖\setminus):

    • Let AA and BB be sets. The difference of AA and BB (also called the complement of BB relative to AA), denoted A−BA - B, is the set of all elements of AA that are not elements of BB

    • Set-builder notation: A−B={x∣x∈A∧x∉B}A - B = \{x \mid x \in A \land x \notin B\}

    • Power Set (P(A)\mathcal{P}(A)):

    • Let AA be a set. The power set of AA, denoted by P(A)P(A) or P(A)\mathcal{P}(A), is the set of all subsets of AA

    • Cartesian Product (×\times):

    • Let AA and BB be sets. The Cartesian product of AA and BB, denoted A×BA \times B, is the set of all ordered pairs (a,b)(a, b) where a∈Aa \in A and b∈Bb \in B

    • Set-builder notation: A×B={(a,b)∣a∈A∧b∈B}A \times B = \{(a, b) \mid a \in A \land b \in B\}