Mathematical Logic
M. Gayathri, M.Sc., M.Phil.
Assistant Professor
Department of Mathematics
Sri Sarada Niketan college of Science for Women , Karur-5
Statement and Notation
 In discrete mathematics, statements (also called propositions) and the notation used to
express them are fundamental for reasoning and constructing logical arguments.
 Statements (Propositions)
A statement (or proposition) is a declarative sentence that is either true or false, but not
both. Statements are the building blocks for logical reasoning in discrete mathematics.
Examples of statements include:
 "The sky is blue." (This can be true or false depending on the situation, but it is a
statement.)
 "5 is a prime number." (True.)
 "The sum of 2 and 3 is 6." (False.)
Statements that do not fit the criteria of being true or false, such as questions or commands,
are not considered logical statements. For example, "What time is it?" is not a statement,
because it does not have a truth value.
Logical Connectives (Operations)
Once we have statements, we can combine or modify them using logical
connectives (also called operations). The basic logical connectives are:
Negation (¬ or ~): This negates the truth value of a statement.
•If p is a statement, then ¬p (not p) is true if p is false, and false if p is true.
•Example: If p is "It is raining", then ¬p is "It is not raining.“
Conjunction (∧): This is the "and" operation. The conjunction of two statements is
true if both statements are true.
•If p and q are two statements, then p q is true only if both p and q are true.
∧
•Example: “It is raining and it is cold.”
Logical Connectives (Operations) (cont..)
Disjunction (∨): This is the "or" operation. The disjunction of two statements is true if at
least one of the statements is true.
•If p and q are two statements, then p q is true if either p, q, or both are true.
∨
•Example: "It is raining or it is cold.“
Implication (Conditional) (→): This is the "if...then" operation. An implication p→q is false
only when p is true and q is false. In all other cases, it is true.
•If p and q are statements, then p→q means "If p is true, then q must be true."
•Example: "If it is raining, then the ground is wet.“
Biconditional (↔): This is the "if and only if" operation. A biconditional p↔q is true when both
p and q have the same truth value (both true or both false).
•Example: "The light is on if and only if the switch is up."
Truth Tables
A truth table is a table used to show the truth values of logical expressions based on all
possible combinations of truth values for the statements involved. Here's an example for
basic logical connectives:
Conjunction (AND):
Disjunction (OR):
p q p q
∧
T T T
T F F
F T F
F F F
p q p q
∨
T T T
T F T
F T T
F F F
Truth Tables
Implication (Conditional) (If-Then):
Negation:
p q p q
→
T T T
T F F
F T T
F F T
P ¬p
T F
F T
Well-Formed Formula in Propositional Logic
 In propositional logic, a well-formed formula is a formula constructed from
propositional variables, logical connectives, and parentheses, adhering to
the syntax rules of propositional logic.
 Rules for Forming a WFF in Propositional Logic:
 A propositional variable (e.g., p, q, r) is a valid formula.
 If φ is a formula, then ¬φ (not φ) is a valid formula.
 If φ and ψ are formulas, then φ ψ, φ ψ, φ ψ,
∧ ∨ → and φ ψ
↔ are valid formulas.
 Parentheses must be used to group formulas and indicate precedence of
operators. For example, (φ ψ) θ
∧ → is valid, but φ ψ θ
∧ → could be ambiguous.
Logical Equivalences
 Two logical expressions are equivalent if they have the same truth table (i.e.,
they yield the same truth value for every possible combination of truth values
for their components). Some important logical equivalences include:
 Double Negation: ¬(¬p) p
≡
 De Morgan's Laws:
 ¬(p q) ¬p ¬q
∧ ≡ ∨
 ¬(p q) ¬p ¬q
∨ ≡ ∧
 Implication: p q ¬p q
→ ≡ ∨
 Biconditional: p q (p q) (q p)
↔ ≡ → ∧ →
 These equivalences allow you to simplify or rewrite logical expressions in
different ways, which is crucial in proofs and problem solving.
Quantifiers
 Quantifiers are used in logical statements to express the extent to which a
statement is true for elements in a set. There are two main types:
Universal Quantifier (∀):
Indicates that a statement is true for all elements in a set.
Existential Quantifier (∃): Indicates that there exists at least one element in the
set for which the statement is true.
WFF in Predicate Logic
 Rules for Forming a WFF in Predicate Logic:
 A predicate (e.g., P(x)) is a valid formula.
 If φ is a formula, then ¬φ is a valid formula.
 If φ and ψ are formulas, then φ ψ, φ ψ, φ ψ,
∧ ∨ → and φ ψ
↔ are valid formulas.
 A quantified formula is a valid formula if it is of the x
∀ φ(x) or x
∃ φ(x), where
x is a variable and φ(x) is a formula.
 Quantifiers apply to variables and can be nested within formulas. For
example, x y P(x,y) is a valid formula.
∀ ∃
Properties of Well-Formed Formulas
 Unambiguity: WFFs must be unambiguous, meaning there should be no
confusion about their interpretation. Parentheses help eliminate ambiguity by
clarifying the order of operations.
 Syntactic Correctness: A WFF must follow the syntactic rules of the logical
system, such as valid use of logical connectives and quantifiers.
 Well-Defined Variables: In predicate logic, variables must be defined within
the scope of quantifiers. For example, in x P(x), x is a bound variable.
∀
 Meaningfulness: A WFF should express a meaningful logical statement,
although this also depends on the interpretation of the predicates and
functions used.
Free and bound variable
Bound Variable
 A bound variable is a variable that is quantified within the scope of a
quantifier (like or in predicate logic). It is "bound" because its value is
∀ ∃
determined by the quantifier. In other words, the variable is part of a
statement that specifies its range of values.
For example:
 In the expression x(P(x)), the variable x is bound by the universal quantifier
∀
, meaning that x is restricted to all possible values in the domain, and the
∀
truth of P(x) depends on the specific value of x.
 In the formula y(Q(y)), the variable y is bound by the existential quantifier
∃
, meaning it refers to some particular value in the domain that satisfies
∃
Q(y).
 In both cases, the variables x and y are bound by the respective quantifiers.
Free Variable
 A free variable is a variable that is not bound by a quantifier in a given
expression. It is a variable that is free to take any value from the domain, and
the truth of the expression depends on what value is assigned to the free
variable. In other words, it’s not “controlled” by any quantifier.
For example:
 In the expression P(x), the variable x is free because there is no quantifier
(like or ) acting on it. The truth of P(x) depends on the specific value of x.
∀ ∃
 In the expression Q(x) y(P(y)), the variable x is free because it is not bound
∧∀
by any quantifier, while y is bound by the quantifier y.
∀
Significance in Logic and Mathematics
 In predicate logic, the distinction between free and bound variables is crucial
because it affects the meaning of a formula. A formula with free variables can
represent different propositions depending on the values assigned to those
variables, while a formula with only bound variables represents a specific
proposition whose truth or falsity does not depend on the choice of variables.
 In quantified statements, the variables bound by quantifiers determine the
scope and interpretation of the logical statement, while free variables often
need to be interpreted or assigned specific values to become meaningful.
Summary:
 A bound variable is a variable that is quantified and has its value determined
by a quantifier.
 A free variable is a variable that is not quantified, and its value is not
determined by the expression itself.

Mathematical Logic - Discrete mathematics.pptx

  • 1.
    Mathematical Logic M. Gayathri,M.Sc., M.Phil. Assistant Professor Department of Mathematics Sri Sarada Niketan college of Science for Women , Karur-5
  • 2.
    Statement and Notation In discrete mathematics, statements (also called propositions) and the notation used to express them are fundamental for reasoning and constructing logical arguments.  Statements (Propositions) A statement (or proposition) is a declarative sentence that is either true or false, but not both. Statements are the building blocks for logical reasoning in discrete mathematics. Examples of statements include:  "The sky is blue." (This can be true or false depending on the situation, but it is a statement.)  "5 is a prime number." (True.)  "The sum of 2 and 3 is 6." (False.) Statements that do not fit the criteria of being true or false, such as questions or commands, are not considered logical statements. For example, "What time is it?" is not a statement, because it does not have a truth value.
  • 3.
    Logical Connectives (Operations) Oncewe have statements, we can combine or modify them using logical connectives (also called operations). The basic logical connectives are: Negation (¬ or ~): This negates the truth value of a statement. •If p is a statement, then ¬p (not p) is true if p is false, and false if p is true. •Example: If p is "It is raining", then ¬p is "It is not raining.“ Conjunction (∧): This is the "and" operation. The conjunction of two statements is true if both statements are true. •If p and q are two statements, then p q is true only if both p and q are true. ∧ •Example: “It is raining and it is cold.”
  • 4.
    Logical Connectives (Operations)(cont..) Disjunction (∨): This is the "or" operation. The disjunction of two statements is true if at least one of the statements is true. •If p and q are two statements, then p q is true if either p, q, or both are true. ∨ •Example: "It is raining or it is cold.“ Implication (Conditional) (→): This is the "if...then" operation. An implication p→q is false only when p is true and q is false. In all other cases, it is true. •If p and q are statements, then p→q means "If p is true, then q must be true." •Example: "If it is raining, then the ground is wet.“ Biconditional (↔): This is the "if and only if" operation. A biconditional p↔q is true when both p and q have the same truth value (both true or both false). •Example: "The light is on if and only if the switch is up."
  • 5.
    Truth Tables A truthtable is a table used to show the truth values of logical expressions based on all possible combinations of truth values for the statements involved. Here's an example for basic logical connectives: Conjunction (AND): Disjunction (OR): p q p q ∧ T T T T F F F T F F F F p q p q ∨ T T T T F T F T T F F F
  • 6.
    Truth Tables Implication (Conditional)(If-Then): Negation: p q p q → T T T T F F F T T F F T P ¬p T F F T
  • 7.
    Well-Formed Formula inPropositional Logic  In propositional logic, a well-formed formula is a formula constructed from propositional variables, logical connectives, and parentheses, adhering to the syntax rules of propositional logic.  Rules for Forming a WFF in Propositional Logic:  A propositional variable (e.g., p, q, r) is a valid formula.  If φ is a formula, then ¬φ (not φ) is a valid formula.  If φ and ψ are formulas, then φ ψ, φ ψ, φ ψ, ∧ ∨ → and φ ψ ↔ are valid formulas.  Parentheses must be used to group formulas and indicate precedence of operators. For example, (φ ψ) θ ∧ → is valid, but φ ψ θ ∧ → could be ambiguous.
  • 8.
    Logical Equivalences  Twological expressions are equivalent if they have the same truth table (i.e., they yield the same truth value for every possible combination of truth values for their components). Some important logical equivalences include:  Double Negation: ¬(¬p) p ≡  De Morgan's Laws:  ¬(p q) ¬p ¬q ∧ ≡ ∨  ¬(p q) ¬p ¬q ∨ ≡ ∧  Implication: p q ¬p q → ≡ ∨  Biconditional: p q (p q) (q p) ↔ ≡ → ∧ →  These equivalences allow you to simplify or rewrite logical expressions in different ways, which is crucial in proofs and problem solving.
  • 9.
    Quantifiers  Quantifiers areused in logical statements to express the extent to which a statement is true for elements in a set. There are two main types: Universal Quantifier (∀): Indicates that a statement is true for all elements in a set. Existential Quantifier (∃): Indicates that there exists at least one element in the set for which the statement is true.
  • 10.
    WFF in PredicateLogic  Rules for Forming a WFF in Predicate Logic:  A predicate (e.g., P(x)) is a valid formula.  If φ is a formula, then ¬φ is a valid formula.  If φ and ψ are formulas, then φ ψ, φ ψ, φ ψ, ∧ ∨ → and φ ψ ↔ are valid formulas.  A quantified formula is a valid formula if it is of the x ∀ φ(x) or x ∃ φ(x), where x is a variable and φ(x) is a formula.  Quantifiers apply to variables and can be nested within formulas. For example, x y P(x,y) is a valid formula. ∀ ∃
  • 11.
    Properties of Well-FormedFormulas  Unambiguity: WFFs must be unambiguous, meaning there should be no confusion about their interpretation. Parentheses help eliminate ambiguity by clarifying the order of operations.  Syntactic Correctness: A WFF must follow the syntactic rules of the logical system, such as valid use of logical connectives and quantifiers.  Well-Defined Variables: In predicate logic, variables must be defined within the scope of quantifiers. For example, in x P(x), x is a bound variable. ∀  Meaningfulness: A WFF should express a meaningful logical statement, although this also depends on the interpretation of the predicates and functions used.
  • 12.
    Free and boundvariable Bound Variable  A bound variable is a variable that is quantified within the scope of a quantifier (like or in predicate logic). It is "bound" because its value is ∀ ∃ determined by the quantifier. In other words, the variable is part of a statement that specifies its range of values. For example:  In the expression x(P(x)), the variable x is bound by the universal quantifier ∀ , meaning that x is restricted to all possible values in the domain, and the ∀ truth of P(x) depends on the specific value of x.  In the formula y(Q(y)), the variable y is bound by the existential quantifier ∃ , meaning it refers to some particular value in the domain that satisfies ∃ Q(y).  In both cases, the variables x and y are bound by the respective quantifiers.
  • 13.
    Free Variable  Afree variable is a variable that is not bound by a quantifier in a given expression. It is a variable that is free to take any value from the domain, and the truth of the expression depends on what value is assigned to the free variable. In other words, it’s not “controlled” by any quantifier. For example:  In the expression P(x), the variable x is free because there is no quantifier (like or ) acting on it. The truth of P(x) depends on the specific value of x. ∀ ∃  In the expression Q(x) y(P(y)), the variable x is free because it is not bound ∧∀ by any quantifier, while y is bound by the quantifier y. ∀
  • 14.
    Significance in Logicand Mathematics  In predicate logic, the distinction between free and bound variables is crucial because it affects the meaning of a formula. A formula with free variables can represent different propositions depending on the values assigned to those variables, while a formula with only bound variables represents a specific proposition whose truth or falsity does not depend on the choice of variables.  In quantified statements, the variables bound by quantifiers determine the scope and interpretation of the logical statement, while free variables often need to be interpreted or assigned specific values to become meaningful. Summary:  A bound variable is a variable that is quantified and has its value determined by a quantifier.  A free variable is a variable that is not quantified, and its value is not determined by the expression itself.