propositional logic and first order logic

24
Propositional Logic And First Order Logic. An Introduction

Upload: liona

Post on 16-Feb-2016

156 views

Category:

Documents


0 download

DESCRIPTION

Propositional Logic And First Order Logic. An Introduction. Logic. Logic is the science of reasoning. Logic is a process by which we arrive at a conclusion from known statements with the use of laws of logic. Mathematical logic is called Boolean Logic. . Sentence and Proposition. - PowerPoint PPT Presentation

TRANSCRIPT

Slide 1

Propositional Logic And First Order Logic.An IntroductionLogicLogic is the science of reasoning.

Logic is a process by which we arrive at a conclusion from known statements with the use of laws of logic.

Mathematical logic is called Boolean Logic.

Sentence and PropositionSentence: It is sensible combination of words. Statement or Proposition: A statement is a sentence in the grammatical sense conveying a situation which is neither imperative, interrogative nor exclamatory. It is a declarative sentence which is either true or false but not both.The truth or falseness of a statement is called its truth value. Sentence and PropositionThe difference between an ordinary sentence and logical statement is that whereas it is not possible to say about truth or otherwise of an ordinary sentence.It is an essential requirement for a logical statement. In logical statement or Proposition the result is in true or false.In ordinary sentence the result is other then true or false. Check for Proposition3+3=8 Is this a statement or sentence?This is a statement.But is a false statement. Its false value will be denoted by the letter F or 0.Why are you going to Bangalore ? Is this a statement or sentence? This is a sentence. Because it is a interrogative sentence. Try ThisMay God bless you with happiness !(x-1) 2 =x2 - 2x + 1x+5=10The truth of the sentence is open till we are told what x stands for. Such a sentence is called an open sentence. An open sentence is, thus, not a statement. Definition of Statement or PropositionA statement is any meaningful, unambiguous sentence which is either true or false but not both. A statement cannot be true and false at the same time. This fact is known as the law of the excluded middleBasic Sentential ConnectivesA compound statement is a combination or two or more simple statements. In order to make a statement compound we have to use some connectives. Sentential Connectives: The phrases or words which connect two simple statements are called sentential Connectives, logical operators or simply connectives. Basic Sentential ConnectivesSome of the basic connectives are and, or, not, if then, if and only if. When simple statements are combined to make compound statements, then simple statements are called Components. Simple statements are generally denoted by small letters p, q, r, s, t,..

Logical EquivalenceTwo propositions (i.e. compound statements) are said to be logically equivalent (or equal) if they have identical truth values. The symbol = or = is used for logical equivalence.

ConjunctionAny two statements can be combined by the connective and to form compound statement called the conjunction of the original statements.E.g. He is practical. He is sensitive. The conjunction is He is practical and sensitiveThe conjunction is denoted by p^q and read as p and qp^q is true when both p and q are true. DisjunctionAny two statements can be combined by the connective or to form compound statement called the disjunction of the original statements.E.g. There is something wrong with the teacherThere is something wrong with the student The disjunction is there is something wrong with the teacher or with the studentThe disjunction is denoted by pVq and read as p or qpVq is false when both p and q are false. Negation or DenialNegation refers to contradiction and not to a contrary statement.We should be very careful while writing the negation of the given statement. The best way is to put in the word not at the proper place. OrTo put the phrase. it is not the case that in the beginning. Negation or DenialE.g. If p stands for He is a good student. Negation of p, denoted by ~p or p is either He is not a good student orIt is not the case that he is a good studentNote that: We cannot say He is a bad student is the negation of p. Conditional StatementAny statement of the form if p then q, where p and q are statements, is called a conditional statement. Here p is sufficient for q but not essential.There can be q even without p. Let p: you work hard.q: you will pass.Now it is possible that a student may pass who has not worked had. Although p is not necessary for q, q is necessary for p. q is necessary for p. It will not happen that one who works hard will not pass. Conditional StatementThe conditional statement if p then q is denoted by p q (to be read as p conditional q) or (p implies q).The conditional statement p q is also read as if p then q, p implies q, p only if q, p is sufficient for q, q is necessary for p, q if p. Rule: p q is true in all cases except when p is true and q is false.

Truth Table for conditional statement pqp q TTTTFFFTTFFT

Bi-conditional statementThe statement p if and only if q is called a bi-conditional statement and is denoted by p q .The bi-conditional is also read as.q if and only if p.q implies q and q implies p.p is necessary and sufficient for q.q is necessary and sufficient for p.p iff q.q iff p.

Rule for Bi-Conditional statementRule: p qTruth if both p and q have the same truth value i.e. either both are true or both are false. False if p and q have opposite truth values.

Truth Table for bi-conditional statement pqp q TTTTFFFTFFFT

Tautologies and Contradictions (or Fallacies)Tautologies: A tautology is a proposition which is true for all the truth value of its components. In a truth table of tautology there will be only Ts in last column. Consider the proposition p V ~p. Its truth table is:

The proposition is always true whatever be the truth values of its components. It is a tautology.p~pp V ~q TFTFTTTautologies and Contradictions (or Fallacies)Contradictions: A contradiction (or fallacies) is proposition which is false for all truth values of its components. In a truth table of contradictions there will be only Fs in the last column. Consider the proposition p^~pIts truth table is:

It is a contradiction.

p~pp^~pTFFFTFConverse, Inverse and Contrapositive If p q is a direct statement, then. q p is called its converse. ~p ~q is called its inverse. ~q ~p is called its Contrapositive.

Since p q = ~q ~pAnd q p = ~ p ~q contrapositive = direct statementAnd converse = inverse

Exercise For YouGive the truth table for the statement (p q) (~p V q)(p ^ q) (p V q)(~p V q) ^ (~p ^ ~q)