Formal Methods (Spring 2015) Lecture 2 Abid Rauf 1.

Slides:



Advertisements
Similar presentations
Brief Introduction to Logic. Outline Historical View Propositional Logic : Syntax Propositional Logic : Semantics Satisfiability Natural Deduction : Proofs.
Advertisements

TRUTH TABLES The general truth tables for each of the connectives tell you the value of any possible statement for each of the connectives. Negation.
Elementary Logic PHIL Intersession 2013 MTWHF 10:00 – 12:00 ASA0118C Steven A. Miller Day 3.
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
Goals Determine the true value of statements with AND, OR, IF..THEN. Negate statements with the connectives above Construct truth tables Understand when.
Computability and Complexity 8-1 Computability and Complexity Andrei Bulatov Logic Reminder.
Brief Introduction to Logic. Outline Historical View Propositional Logic : Syntax Propositional Logic : Semantics Satisfiability Natural Deduction : Proofs.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
EE1J2 – Discrete Maths Lecture 5 Analysis of arguments (continued) More example proofs Formalisation of arguments in natural language Proof by contradiction.
Copyright © Cengage Learning. All rights reserved.
Adapted from Discrete Math
Inference is a process of building a proof of a sentence, or put it differently inference is an implementation of the entailment relation between sentences.
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
1 Propositional Logic Proposition 2 Propositions can be divided into simple propositions and compound propositions. A simple (or basic) proposition is.
Math 240: Transition to Advanced Math Deductive reasoning: logic is used to draw conclusions based on statements accepted as true. Thus conclusions are.
CMPF144 FUNDAMENTALS OF COMPUTING THEORY Module 5: Classical Logic.
Logic Disjunction A disjunction is a compound statement formed by combining two simple sentences using the word “OR”. A disjunction is true when at.
Copyright © Curt Hill Mathematical Logic An Introduction.
Fallacies The proposition [(p  q)  q]  p is not a tautology, because it is false when p is false and q is true. This type of incorrect reasoning is.
Natural Deduction CS 270 Math Foundations of CS Jeremy Johnson.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
CS6133 Software Specification and Verification
CS2351 Artificial Intelligence Bhaskar.V Class Notes on Knowledge Representation - Logical Agents.
Method of proofs.  Consider the statements: “Humans have two eyes”  It implies the “universal quantification”  If a is a Human then a has two eyes.
Discrete Mathematics Lecture # 1. Course Objectives  Express statements with the precision of formal logic.  Analyze arguments to test their validity.
Outline Logic Propositional Logic Well formed formula Truth table
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Propositional Logic. Assignment Write any five rules each from two games which you like by using propositional logic notations.
Chapter 1 Logic and proofs
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Proof And Strategies Chapter 2. Lecturer: Amani Mahajoub Omer Department of Computer Science and Software Engineering Discrete Structures Definition Discrete.
Simple Logic.
CENG 424-Logic for CS Introduction Based on the Lecture Notes of Konstantin Korovin, Valentin Goranko, Russel and Norvig, and Michael Genesereth.
Chapter 1 Logic and Proof.
Chapter 1 Propositional Logic
Presented by: Tutorial Services The Math Center
Indirect Argument: Contradiction and Contraposition
Propositional Logic (a.k.a. Sentential Logic)
Logic.
CSNB 143 Discrete Mathematical Structures
Lecture 1 – Formal Logic.
Knowledge Representation and Reasoning
Discrete Mathematics Logic.
Chapter 3: Introduction to Logic
COMP 1380 Discrete Structures I Thompson Rivers University
CPCS222 Discrete Structures I
CSS 342 Data Structures, Algorithms, and Discrete Mathematics I
Logic – Bell Ringer.
CS201: Data Structures and Discrete Mathematics I
Chapter 1 The Foundations: Logic and Proof, Sets, and Functions
CS201: Data Structures and Discrete Mathematics I
CS 270 Math Foundations of CS
Applied Discrete Mathematics Week 1: Logic
(1.4) An Introduction to Logic
Computer Security: Art and Science, 2nd Edition
Discrete Mathematics Lecture 2: Propositional Logic
Discrete Mathematics Logic.
MAT 3100 Introduction to Proof
Chapter 7. Propositional and Predicate Logic
TRUTH TABLES.
CS201: Data Structures and Discrete Mathematics I
ece 720 intelligent web: ontology and beyond
Logic of Informatics Introduction.
CS201: Data Structures and Discrete Mathematics I
If there is any case in which true premises lead to a false conclusion, the argument is invalid. Therefore this argument is INVALID.
If there is any case in which true premises lead to a false conclusion, the argument is invalid. Therefore this argument is INVALID.
Truth tables.
Presentation transcript:

Formal Methods (Spring 2015) Lecture 2 Abid Rauf 1

Recap Formal Methods 2

Outline Propositional Logic Declarative Sentence Natural Deduction 3 3

Theorem Proving - A widely used Formal Verification Method InputsProgram Model Formula ( M ) Desired Behavior (Post Conditions) Logic Properties Formula ( ψ ) Theorem Prover (A software) Output The Program exhibits the desired behavior ( M |= ψ ) 4

Logic Logic is primarily a language to - model the system (program) - reason about the correctness or incorrectness of the system ’ s properties 5

Philosophical Logic 500 B.C - 19th Century Logic dealt with reasoning of arguments in the natural language used by humans. Example: Valid Argument - All IIUI students are good at studies. - Faizan is a IIUI student - Therefore, Faizan is good at studies. 6

Philosophical Logic 1. If the train arrives late and there are no taxis at the station, then John is late for his meeting. 2. John is not late for his meeting. 3. The train did arrive late. 4. Therefore, there were taxis at the station. Valid or Invalid? - Valid (Combine 1, 2 and 3 and then use 4) 7

Philosophical Logic Natural languages are very ambiguous. Example: Tom hates Jim and he likes Mary. Tom likes Mary, or Jim likes Mary Thus, we need a more mathematical language for logical reasoning 8

Propositional Logic A proposition - a sentence that can be either true or false. - x is greater than y - Mr. Abid is teaching Formal Methods in this term 9

Activity: Identify Propositions May fortune come your way. Jane reacted violently to Jack ’ s accusations. Every even natural number > 2 is the sum of two prime numbers. Ready, steady, go. All Martians like pepperoni on their pizza. Could you please pass me the salt. Questions, Commands and wishes 10

Symbols in Propositional Logic Each proposition is assigned a symbol ‘ x is greater than y. ’ : p ‘ Mr. Abid is teaching Formal Methods this term ’ : q ‘ I won a gold medal in last years Sports gala. ’ : r 11

Connectives in Propositional Logic - ∧ and (conjunction): a ∧ b : Both a and b are true. - ∨ or (disjunction) a ∨ b : at least one of a or b are true - ¬ not (negation) ¬ a : a is not true – → implication a → b : if a then b (a: assumption, b: conclusion) - ↔ equivalent to a ↔ b : a is equivalent to b, i.e., a → b ∧ b → a - therefore – ⊥, T False, True 12

Activity: Modeling with Propositional Logic 1. If the train arrives late and there are no taxis at the station, then John is late for his meeting. 2. John is not late for his meeting. 3. The train did arrive late. 4. Therefore, there were taxis at the station. 13

Activity: Modeling with Propositional Logic 1. If the train arrives late (p) and there are no taxis at the station (q), then John is late for his meeting (r). - (p ∧ ( ¬ q )) → r 2. John is not late for his meeting. - ¬r¬r 3. The train did arrive late. - p 4. Therefore, there were taxis at the station. - q ((p ∧ ( ¬ q)) → r), ( ¬ r), p q 14

Activity: Modeling with Propositional Logic If a request occurs, then either it will eventually be acknowledged, or the requesting process won ’ t ever be able to make progress. 15