Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
32 views10 pages

Lec 2

The lecture discusses propositional logic, emphasizing its importance in modeling and verifying complex systems without exhaustive testing. It defines propositions as statements that can be evaluated for truth or falsehood and outlines the syntax rules for constructing propositions using logical operators. The content serves as an introduction to the foundational concepts of logic in computer science.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views10 pages

Lec 2

The lecture discusses propositional logic, emphasizing its importance in modeling and verifying complex systems without exhaustive testing. It defines propositions as statements that can be evaluated for truth or falsehood and outlines the syntax rules for constructing propositions using logical operators. The content serves as an introduction to the foundational concepts of logic in computer science.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Lecture 2 - Propositional Logic

Vaishnavi Sundararajan

COL703 - Logic for Computer Science

Vaishnavi COL703 - Lecture 2 August 1, 2024 1/7


Quiz

Vaishnavi COL703 - Lecture 2 August 1, 2024 2/7


1 Logic and modelling

2 Propositional logic

3 PL syntax

Vaishnavi COL703 - Lecture 2 August 1, 2024 2/7


Recall: Why logic?
• Logic allows us to make sense of our world
• “What constitutes a valid proof?”
• “Is my set of statements internally consistent?”
• Valid inference and internal consistency becomes paramount when we
model complex systems
• Logic allows us to verify that systems work correctly...
• ...without testing each possible execution!
• Important to know when inference is sound!

Vaishnavi COL703 - Lecture 2 August 1, 2024 3/7


Trust Model, then verify
• A model abstracts away extraneous details
• Choice of model heavily tied to the verification context
• Same framework for model and properties we would like to verify
• Sometimes a very simple framework suffices, sometimes not!
• Navigate thin line between expressiveness and tractability of syntax
• We start with one of the simplest such: propositional logic

Vaishnavi COL703 - Lecture 2 August 1, 2024 4/7


1 Logic and modelling

2 Propositional logic

3 PL syntax

Vaishnavi COL703 - Lecture 2 August 1, 2024 4/7


Propositional Logic
• Every statement of interest modelled as a proposition
• What is a proposition? A statement that can be evaluated for truth or
falsehood. Examples:
• COL703 is a core course for CS5 students
• New Delhi is the capital of India
• Blood is gold in colour
• What is not a proposition? Questions, exclamations, doubts...
• Statements whose truth value changes based on context

Vaishnavi COL703 - Lecture 2 August 1, 2024 5/7


Compare
• Is there a number such that doubling it and adding two gives ten?
• 2x + 5 = 17
• See you tomorrow!
• 2 ∗ 4 + 5 = 17
• 8/0 = 42
• Hopefully quantum computers will become commonplace soon
• This is not a proposition

Vaishnavi COL703 - Lecture 2 August 1, 2024 6/7


1 Logic and modelling

2 Propositional logic

3 PL syntax

Vaishnavi COL703 - Lecture 2 August 1, 2024 6/7


Propositional logic: Syntax
• When using a logic, one is bound by the rules of syntax
• Only “grammatically-correct” statements are “allowed”
• Start with a (countable) set AP of propositional atoms
• “Smallest” statements of interest
• Can build up bigger statements with these
• Combine atoms from AP using operators to form bigger propositions:
AND (∧), OR (∨), NOT (¬), IMPLIES ( ⟹ )
• Grammar for propositional logic (PL) is as follows

φ, ψ ∶= p ∣ ¬φ ∣ φ ∧ ψ ∣ φ ∨ ψ ∣ φ ⟹ ψ where p ∊ AP

Vaishnavi COL703 - Lecture 2 August 1, 2024 7/7

You might also like