ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Discrete Structures
    CSI-303
    Progress0 / 21 topics
    Topics
    1. Introduction to Logic and Proofs2. Direct Proofs3. Proof by Contradiction4. Sets5. Combinatorics6. Sequences7. Formal Logic8. Propositional and Predicate Calculus9. Methods of Proof10. Mathematical Induction and Recursion11. Loop Invariants12. Relations and Functions13. Pigeonhole Principle14. Trees and Graphs15. Elementary Number Theory16. Optimization and Matching17. Fundamental Structures18. Functions19. Relations (Recursions)20. Cardinality and Countability21. Probabilistic Methods
    CSI-303›Propositional and Predicate Calculus
    Discrete StructuresTopic 8 of 21

    Propositional and Predicate Calculus

    9 minread
    1,518words
    Intermediatelevel

    Propositional and Predicate Calculus

    Propositional Calculus and Predicate Calculus are two branches of formal logic that provide frameworks for expressing logical statements and reasoning systematically. Both are fundamental in fields such as mathematics, philosophy, and computer science, especially in areas like formal proofs, artificial intelligence, and algorithm design.

    1. Propositional Calculus (Sentential Logic)

    Propositional calculus is the branch of logic that deals with propositions (statements that are either true or false) and logical connectives that combine these propositions. It is concerned with the truth values of propositions and the logical relationships between them.

    Key Components of Propositional Logic:

    • Propositions: A proposition is a declarative sentence that is either true or false. For example:

      • ppp: "It is raining."
      • qqq: "The sun is shining."
    • Logical Connectives (Operators): These are symbols used to combine or modify propositions.

      • Negation (¬\neg¬): Denoted by ¬p\neg p¬p, it represents "not ppp."
      • Conjunction (∧\land∧): Denoted by p∧qp \land qp∧q, it represents "both ppp and qqq." The conjunction is true only when both ppp and qqq are true.
      • Disjunction (∨\lor∨): Denoted by p∨qp \lor qp∨q, it represents "either ppp or qqq (or both)." The disjunction is true when at least one of ppp or qqq is true.
      • Implication (→\rightarrow→): Denoted by p→qp \rightarrow qp→q, it represents "if ppp, then qqq." The implication is false only when ppp is true and qqq is false.
      • Biconditional (↔\leftrightarrow↔): Denoted by p↔qp \leftrightarrow qp↔q, it represents "ppp if and only if qqq." This is true if both ppp and qqq have the same truth value.

    Truth Tables

    Truth tables show the possible truth values of a compound proposition based on the truth values of its components. For example:

    • Conjunction p∧qp \land qp∧q:
    ppp qqq p∧qp \land qp∧q
    T T T
    T F F
    F T F
    F F F
    • Implication p→qp \rightarrow qp→q:
    ppp qqq p→qp \rightarrow qp→q
    T T T
    T F F
    F T T
    F F T

    Logical Equivalences in Propositional Calculus

    Propositional calculus also involves several important logical equivalences, such as:

    • Double Negation: ¬(¬p)≡p\neg(\neg p) \equiv p¬(¬p)≡p
    • De Morgan’s Laws:
      • ¬(p∧q)≡¬p∨¬q\neg(p \land q) \equiv \neg p \lor \neg q¬(p∧q)≡¬p∨¬q
      • ¬(p∨q)≡¬p∧¬q\neg(p \lor q) \equiv \neg p \land \neg q¬(p∨q)≡¬p∧¬q
    • Implication: p→q≡¬p∨qp \rightarrow q \equiv \neg p \lor qp→q≡¬p∨q
    • Commutative Laws:
      • p∧q≡q∧pp \land q \equiv q \land pp∧q≡q∧p
      • p∨q≡q∨pp \lor q \equiv q \lor pp∨q≡q∨p

    Propositional Logic Applications

    • Circuit Design: Propositional calculus is used to analyze and design digital circuits.
    • Mathematical Proofs: Propositional logic forms the basis for many mathematical proof techniques, such as proof by contradiction and proof by cases.
    • Computer Science: It's used in areas like artificial intelligence (for decision-making and reasoning) and software verification.

    2. Predicate Calculus (First-Order Logic)

    Predicate calculus, also known as first-order logic (FOL), is an extension of propositional calculus that deals with predicates and quantifiers. While propositional logic is concerned with the truth of entire propositions, predicate logic is used to express statements that involve variables and quantifiers.

    Key Components of Predicate Logic:

    • Predicates: A predicate is a function that takes an argument (or arguments) and returns a truth value. For example, "is a prime number" can be expressed as the predicate Prime(x)\text{Prime}(x)Prime(x), where xxx is a variable representing a number.

      • Example: Prime(5)\text{Prime}(5)Prime(5) is true, while Prime(6)\text{Prime}(6)Prime(6) is false.
    • Variables: Variables represent unknown or general elements. In predicate logic, they are often used in predicates to make general statements about sets of objects.

    • Quantifiers:

      • Universal Quantifier (∀\forall∀): ∀x P(x)\forall x \, P(x)∀xP(x) means "for all xxx, P(x)P(x)P(x) is true." It asserts that a statement holds for every element in the domain of discourse.
      • Existential Quantifier (∃\exists∃): ∃x P(x)\exists x \, P(x)∃xP(x) means "there exists an xxx such that P(x)P(x)P(x) is true." It asserts that at least one element in the domain satisfies the predicate.

    Examples of Predicate Logic Statements:

    • Universal Statement:

      • ∀x (Prime(x)→x>1)\forall x \, (\text{Prime}(x) \rightarrow x > 1)∀x(Prime(x)→x>1): "For all xxx, if xxx is prime, then xxx is greater than 1."
    • Existential Statement:

      • ∃x Prime(x)\exists x \, \text{Prime}(x)∃xPrime(x): "There exists an xxx such that xxx is prime."

    Truth in Predicate Logic:

    In predicate logic, truth is determined based on:

    • The domain of discourse (the set of all possible values for the variables),
    • The interpretation of predicates (what each predicate represents in the context).

    For example, the statement ∀x Prime(x)\forall x \, \text{Prime}(x)∀xPrime(x) would be true if every element in the domain (say, the set of natural numbers) is a prime number. Similarly, ∃x Prime(x)\exists x \, \text{Prime}(x)∃xPrime(x) would be true if at least one element in the domain is a prime number.

    Quantifier Manipulation:

    Predicate logic allows more complex statements using quantifiers. The quantifiers are governed by the following rules:

    • Negating a universal quantifier: ¬∀x P(x)≡∃x ¬P(x)\neg \forall x \, P(x) \equiv \exists x \, \neg P(x)¬∀xP(x)≡∃x¬P(x)
    • Negating an existential quantifier: ¬∃x P(x)≡∀x ¬P(x)\neg \exists x \, P(x) \equiv \forall x \, \neg P(x)¬∃xP(x)≡∀x¬P(x)

    Predicates in Computation:

    Predicate calculus is widely used in:

    • Formal verification: It is used to verify properties of programs (such as correctness) in software engineering.
    • Artificial Intelligence: Predicate logic provides a formal framework for representing knowledge and reasoning about it (e.g., in logic programming languages like Prolog).
    • Mathematics: Predicate logic is used to express mathematical theorems and proofs in a precise manner.

    3. Comparison: Propositional vs Predicate Logic

    Feature Propositional Logic Predicate Logic (First-Order Logic)
    Objects Deals with entire propositions (statements). Deals with predicates, variables, and quantifiers.
    Complexity Simpler, only focuses on propositions. More expressive, handles predicates and variables.
    Examples of Statements "It is raining," "5 > 3." "For all xxx, xxx is greater than 1."
    Quantifiers No quantifiers. Uses ∀\forall∀ (for all) and ∃\exists∃ (there exists).
    Expressiveness Less expressive, limited to simple propositions. More expressive, allows detailed logical expressions.
    Applications Used in areas like logic circuits, basic proofs. Used in mathematics, artificial intelligence, databases.

    Conclusion

    Propositional logic (or sentential logic) is a simpler system that deals with truth values of entire propositions and is used for logical reasoning involving statements like "if-then" and "and/or". Predicate logic extends propositional logic by allowing the use of variables, predicates, and quantifiers to make more detailed and powerful logical expressions. Predicate logic is particularly useful for expressing mathematical and logical relationships, and is a fundamental tool in areas such as formal proofs, computer science, and artificial intelligence.

    Previous topic 7
    Formal Logic
    Next topic 9
    Methods of Proof

    Past Papers

    Open this section to load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time9 min
      Word count1,518
      Code examples0
      DifficultyIntermediate