unit 1 of DMS

download unit 1 of DMS

of 39

Transcript of unit 1 of DMS

  • 7/30/2019 unit 1 of DMS

    1/39

    Discrete Mathematical Structures Language of Logic

    Prepared by: Aisha Rafi Page 1

    JECRC UDML COLLEGE OF ENGINEERING(DEPARTMENT OF MATHEMATICS)

    Notes

    Discrete Mathematical Structures(Subject Code: 4CS3)

    Prepared By: Aisha Rafi

    Class: B. Tech. II Year, IV Semester

    Syllabus

    UNIT 1: Proposition ,compound proposition, conjunction, disjunction,Implication ,converse ,inverse & contra positive ,bioconditional

    Statement ,tautology, contradiction & contingency, logicalEquivalences, quantifiers ,arguments

  • 7/30/2019 unit 1 of DMS

    2/39

    Discrete Mathematical Structures Language of Logic

    Prepared by: Aisha Rafi Page 2

    Beyond the Syllabus

    Applications of Logical connectives

    Learning Objectives

    Students will learn about the language of logic

    Logical connectiveThis article is about connectives in logical systems. For connectors in natural

    languages, see discourse connective. For other logical symbols, see table oflogic symbols.

    In logic, a logical connective (also called a logical operator or a truthfunction) is a symbol or word used to connect two or more sentences (ofeither a formal or a natural language) in a grammatically valid way, such

    that the sense of the compound sentence produced depends only on the

    original sentences.

    The most common logical connectives are binary connectives (also called

    dyadic connectives) which join two sentences which can be thought of asthe function's operands. Also commonly, negation is considered to be a

    unary connective.

    Logical connectives along with quantifiers are the two main types of logicalconstants used in formal systems such as propositional logic and predicatelogic.

    Natural language

  • 7/30/2019 unit 1 of DMS

    3/39

    Discrete Mathematical Structures Language of Logic

    Prepared by: Aisha Rafi Page 3

    In the grammar of natural languages two sentences may be joined by agrammatical conjunction to form a grammatically compound sentence.

    Some but not all such grammatical conjunctions are truth functions. For

    example, consider the following sentences:

    A: Jack went up the hill.

    B: Jill went up the hill.

    C: Jack went up the hill andJill went up the hill.

    D: Jack went up the hill so Jill went up the hill.

    The words andand so are grammaticalconjunctions joining the sentences(A) and (B) to form the compound sentences (C) and (D). The andin (C) isa logicalconnective, since the truth of (C) is completely determined by (A)

    and (B): it would make no sense to affirm (A) and (B) but deny (C).Howeverso in (D) is not a logical connective, since it would be quite

    reasonable to affirm (A) and (B) but deny (D): perhaps, after all, Jill went upthe hill to fetch a pail of water, not because Jack had gone up the hill at all.

    Various English words and word pairs express logical connectives, and

    some of them are synonymous. Examples (with the name of the relationshipin parentheses) are:

    "and" (conjunction)

    "or" (disjunction) "either...or" (exclusive disjunction) "implies" (implication) "if...then" (implication) "if and only if" (equivalence) "only if" (implication) "just in case" (equivalence) "but" (conjunction) "however" (conjunction) "not both" (NAND) "neither...nor" (NOR)

    The word "not" (negation) and the phrases "it is false that" (negation) and "itis not the case that" (negation) also express a logical connective even

    though they are applied to a single statement, and do not connect two

    statements.

    Formal languages

    In formal languages, truth functions are represented by unambiguous

    symbols. These symbols are called "logical connectives", "logical

    operators", "propositional operators", or, in classical logic, "truth-functionalconnectives". See well-formed formula for the rules which allow new well-

  • 7/30/2019 unit 1 of DMS

    4/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    formed formulas to be constructedusing truth-functional connectives

    Logical connectives can be used tcan speak about "n-ary logical con

    Common logical connectives

    Name / SymbolTr

    P=

    Truth/Tautology

    Proposition P

    False/Contradiction

    Negation

    Binary connectives P=

    Q

    Conjunction

    Alternative denial

    Disjunction

    Joint denial

    Material conditional

    Exclusive or

    Biconditional

    Converse implication

    Proposition P

    Proposition Q

    M o r e i n f o r

    es Language of Logic

    Page 4

    by joining other well-formed formulas.

    link more than two statements, so onenective".

    th table Venndiagram0 1

    1 1

    0 1

    0 0

    1 0

    0 0 1 1

    0 1 0 1

    0 0 0 1

    1 1 1 0

    0 1 1 1

    1 0 0 0

    1 1 0 1

    0 1 1 0

    1 0 0 1

    1 0 1 1

    0 0 1 1

    0 1 0 1

    a t i o n

  • 7/30/2019 unit 1 of DMS

    5/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    List of common logical con

    Commonly used logical connectiv

    Negation (not): , Np, ~

    Conjunction (and): , Kp Disjunction (or): , Apq Material implication (if...t Biconditional (if and only

    Alternative names for bicondition

    For example, the meaning of the s

    transformed when the two are co

    It is raining and I am indo Ifit is raining, then I am i IfI am indoors, then it is r I am indoors if and only if It is not raining (P)

    For statement P= It is rainingan

    It is also common to consider the

    formula to be connective:

    True formula (, 1, Vpq, o

    False formula (, 0, Opq,

    Negation.

    In logic and mathematics, negatio unary logical connective. It is an o

    semantic values more generally. Itrue when that proposition is false,is normally identified with the trut

    vice versa. In intuitionistic logic, aKolmogorov interpretation, the ne

    whose proofs are the refutations osemantic values of formulae are s

    theoretic complementation.

    Definition

    Classical negation is an operation

    of a proposition, that produces a vvalue offalse when its operand is

    es Language of Logic

    Page 5

    ectives

    es include:

    , &,

    en): , Cpq, ,

    f): , Epq, ,

    l are "iff", "xnor" and "bi-implication".

    atements it is rainingand I am indoors is

    bined with logical connectives:

    rs (P Q)doors (P Q)

    aining (Q P)it is raining (P Q)

    Q = I am indoors.

    lways true formula and the always false

    r T)

    r F)

    , also called logical complement, is aperation on propositions, truth values, or

    tuitively, the negation of a proposition isand vice versa. In classical logic negation

    h function that takes truth to falsity and

    ccording to the BrouwerHeytingation of a proposition p is the proposition

    p. In Kripke semantics where thets of possible worlds, negation is set-

    on one logical value, typically the value

    lue oftrue when its operand is false and arue. So, if statement A is true, then A

  • 7/30/2019 unit 1 of DMS

    6/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    (pronounced "not A") would therethen A would be false.

    The truth table ofp is as follows

    Truth table of p

    p pTrue False

    False True

    Classical negation can be definedexample, p can be defined as p and Fis absolute falsehood. Conv

    proposition p, where "&" is logica

    contradiction is false. While these

    intuitionistic logic, they do not woare not necessarily false. But in cl

    q can be defined as p q, where

    Algebraically, classical negation c

    Boolean algebra, and intuitionistic

    Heyting algebra. These algebras p

    intuitionistic logic respectively.

    Notation

    The negation of a proposition p is

    contexts of discussion and fields o

    the following:

    Notation Vocalizationp not p

    p not p

    ~p not p

    Np en pprime,

    complement

    bar,

    barp

    bang p

    not p

    In Set Theory \ is also used to indimembers of U that are not membe

    es Language of Logic

    Page 6

    fore be false; and conversely, ifA is true,

    :

    n terms of other logical operations. For F, where "" is logical consequence

    rsely, one can define Fas p & p for any

    conjunction. The idea here is that any

    ideas work in both classical and

    rk in Brazilian logic, where contradictionsssical logic, we get a further identity: p

    "" is logical disjunction: "not p, orq".

    orresponds to complementation in a

    negation to pseudocomplementation in a

    ovide a semantics for classical and

    notated in different ways in various

    f application. Among these variants are

    cate 'not member of': U \ A is the set of alls of A.

  • 7/30/2019 unit 1 of DMS

    7/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    No matter how it is notated or syas "it is not the case that p", "not t

    grammatically) as "not p"

    Distributivity

    De Morgan's laws provide a way

    and disjunction:

    Linearity

    In Boolean algebra, a linear functi

    If there exists a0, a1, ..., an {0,1} (an bn), for all b1, ..., bn {0,1

    Another way to express this is thain the truth-value of the operationa linear logical operator.

    Self dual

    In Boolean algebra a self dual fun

    f(a1, ..., an) = ~f(~a1, ..., ~an) for allogical operator.

    Rules of inference

    There are a number of equivalentusual way to formulate classical ntake as primitive rules of inferenc ofp to both q and q, infer p; thiabsurdum), negation elimination (called ex falso quodlibet), and dou

    p). One obtains the rules for intuitiexcluding double negation elimina

    Negation introduction states that ifrom p then p must not be the case(intuitionistically) or etc.). Negatifrom an absurdity. Sometimes neg

    primitive absurdity sign . In thisfollows an absurdity. Together wit

    es Language of Logic

    Page 7

    bolized, the negation p / p can be readat p", or usually more simply (though not

    f distributing negation over conjunction

    , and

    .

    on is one such that:

    such that f(b1, ..., bn) = a0 (a1 b1) ...}.

    each variable always makes a differenceor it never makes a difference. Negation is

    tion is one such that:

    a1, ..., an {0,1}. Negation is a self dual

    ays to formulate rules for negation. Onegation in a natural deduction setting is to

    negation introduction (from a derivations rule also being called reductio ad

    from p and p infer q; this rule also beingble negation elimination (from p inferonistic negation the same way but bytion.

    an absurdity can be drawn as conclusion(i.e. p is false (classically) or refutablen elimination states that anything followsation elimination is formulated using a

    case the rule says that from p and ph double negation elimination one may

  • 7/30/2019 unit 1 of DMS

    8/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    infer our originally formulated rulabsurdity.

    Typically the intuitionistic negationegation introduction and eliminat

    introduction (conditional proof) acase one must also add as a primit

    Logical conjunction" " redirects here. For the logic gsee Exterior algebra.

    Venn diagram of

    Venn diagram of

    In logic and mathematics, a two-plogical conjunction[1], results in t otherwise the value offalse.

    The analogue of conjunction for auniversal quantification, which is

    Notation

    es Language of Logic

    Page 8

    , namely that anything follows from an

    n p ofp is defined as p . Thenion are just special cases of implication

    d elimination (modus ponens). In thisve rule ex falso quodlibet.

    te, see AND gate. For exterior product,

    ace logical operatorand, also known as ue if both of its operands are true,

    (possibly infinite) family of statements isart of predicate logic.

  • 7/30/2019 unit 1 of DMS

    9/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    And is usually expressed with themathematics and logic, the infix o in programming languages, & orrelated control structure, the short-

    Definition

    Logical conjunction is an operativalues of two propositions, that prof its operands are true.

    The conjunctive identity is 1, whiwith 1 will never change the valueconcept of vacuous truth, when cofunction of arbitrary arity, the emset of operands) is often defined a

    The truth table of :

    INPUT OUTPUT

    A B A B

    T T T

    T F F

    F T F

    F F F

    Propertiescommutativity: yes

    associativity: yes

    es Language of Logic

    Page 9

    prefix operatorK, or an infix operator. Inerator is usually ; in electronics ; and

    nd. Some programming languages have acircuit and, written &&, and then, etc.

    n on two logical values, typically theoduces a value oftrue if and only if both

    h is to say that AND-ing an expressionof the expression. In keeping with the

    njunction is defined as an operator orty conjunction (AND-ing over an emptyhaving the result 1.

  • 7/30/2019 unit 1 of DMS

    10/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    distributivity: with various opera

    [s

    idempotency: yes

    monotonicity: yes

    truth-preserving: yesWhen all inputs are true, the outp

    (to be tested)

    falsehood-preserving: yesWhen all inputs are false, the outp

    (to be tested)

    Walsh spectrum: (1,-1,-1,1)

    Nonlinearity: 1 (the function is b

    es Language of Logic

    Page 10

    ions, especially with or

    ow]others

    t is true.

    t is false.

    nt)

  • 7/30/2019 unit 1 of DMS

    11/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    If using binary values for true (1)works exactly like normal arithme

    Logical disjunction

    "Disjunction" redirects here. For tof chromosomes, see Meiosis. Fordistribution.

    Venn diagram of

    Venn diagram of

    In logic and mathematics, or is a t(inclusive) disjunction and alter represents this operator is also kn

    . The "or" operator produces a roperands are true. For example, inor ifB is true, or if both A and B aconjunction.

    The "or" operator differs from thewhen both of its inputs are true, wlanguage, outside of contexts such

    es Language of Logic

    Page 11

    nd false (0), then logical conjunctiontic multiplication.

    e logic gate, see OR gate. For separationdisjunctions in distribution, see Disjunct

    uth-functional operator also known asation. The logical connective thatwn as "or", and typically written as orsult of true wheneverone or more of itsthis context, "A orB" is true ifA is true,e true. In grammar, or is a coordinating

    exclusive or in that the latter returns Falseile "or" returns True. In ordinaryas formal logic, mathematics and

  • 7/30/2019 unit 1 of DMS

    12/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    programming, "or" sometimes hasexample, "Please ring me or sendother, but not both". On the othereither very bright or studies hard"both bright and works hard. In oth

    mean inclusive or exclusive or. Usthe context.

    Notation

    Or is usually expressed with the pIn mathematics and logic, the infi and in programming languages, | a related control structure, the sho

    Definition

    Logical disjunction is an operativalues of two propositions, that prof its operands are false. More gethat can have one or more literalsoften considered to be a degenerat

    The disjunctive identity is 0, whic0 will never change the value of tof vacuous truth, when disjunctio

    arbitrary arity, the empty disjunctioperands) is often defined as havi

    Truth table

    Disjunctions of the arguments on tThe false bits form a Sierpinski tri

    The truth table of :

    INPUT OUTPUT

    A B A OR B

    0 0 0

    0 1 1

    1 0 1

    1 1 1

    es Language of Logic

    Page 12

    the meaning of "exclusive or". Forn email" likely means "do one or theand, "Her grades are so good that she's

    allows for the possibility that the person iser words, in ordinary language "or" can

    ually the intended meaning is clear from

    refix operatorA, or with an infix operator.operator is usually ; in electronics, +;

    ror. Some programming languages havet-circuit or, written ||, or else, etc.

    n on two logical values, typically theoduces a value offalse if and only if botherally a disjunction is a logical formulaeparated only by ORs. A single literal is

    e disjunction.

    is to say that OR-ing an expression withe expression. In keeping with the conceptis defined as an operator or function of

    on (OR-ing over an empty set ofg the result 0.

    he leftangle

  • 7/30/2019 unit 1 of DMS

    13/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    Properties

    commutativity: yes

    associativity: yes

    distributivity: with various opera

    [s

    idempotency: yes

    monotonicity: yes

    truth-preserving: yesWhen all inputs are true, the outp

    es Language of Logic

    Page 13

    ions, especially with and

    ow]others

    t is true.

  • 7/30/2019 unit 1 of DMS

    14/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    (to be tested)

    falsehood-preserving: yesWhen all inputs are false, the outp

    (to be tested)

    Walsh spectrum: (3,-1,-1,-1)

    Nonlinearity: 1 (the function is b

    If using binary values for true (1)

    works almost like binary addition.while .

    Symbol

    The mathematical symbol for logiaddition to the word "or", and thefrom the Latin word velfor "or", iexample: "A B " is read as "A orand B are false. In all other cases i

    All of the following are disjunctio

    The corresponding operation in se

    Material conditional

    es Language of Logic

    Page 14

    t is false.

    nt)

    nd false (0), then logical disjunction

    The only difference is that ,

    al disjunction varies in the literature. Inormula "Apq", the symbol " ", derivingcommonly used for disjunction. For

    B ". Such a disjunction is false if both Ais true.

    s:

    theory is the set-theoretic union.

  • 7/30/2019 unit 1 of DMS

    15/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    A material conditional (also knoconsequence", or simply "implicasymbolized by a forward arrow "connection of two, for instance "p typically interpreted as "Ifp, then

    between two sentences p, q is typi

    1. ;2. ;3. (Although this sy

    (i.e. logical implication) ra

    As placed within the material conantecedent, and q as the conseque compounds as components, for ex

    pq (short for "p and q") is the anteconsequent, of the larger conditiocomponents.

    Implication is a form of logical cosuch as "Fred is Mike's brother's sstatement "Fred is Mike's nephew.Mike's brother's son," not a formalargument depends on the the mea"brother," "son," and "nephew," n

    In classical logic, the compound p compound: not (both p and not q).that ifp then q" is not often takenq is false" but, when used within clogically equivalent. (Other senseslogical forms.)

    Definitions of the material condi

    Logicians have many different vie

    and approaches to explain its sensAs a truth function

    In classical logic, the compound p compound: not both p and not q.only if both p is true and q is false.only if eitherp is false orq is trueof truth values of the componentswhose truth value is entirely a funcomponents. Hence, the compoun

    compound pq is logically equivboth)), and to q p (if not q thp q, which is equivalent to q

    es Language of Logic

    Page 15

    n as "material implication", "materialion") is a logical connective often". A single statement formed from the

    q" (called a conditional statement) is q" or "q ifp". The material implication

    ally symbolized as

    bol is often used for logical consequenceher than for material implication.)

    itionals above, p is known as the t, of the conditional. One can also use

    mple pq (rs). There, the compoundedent, and the compound rs is theal of which those compounds are

    sequence. For instance, in an argumentn. Therefore Fred is Mike's nephew" the

    " is a material consequence of "Fred isconsequence. The validity of theings of the words "Fred," "Mike,"t the logical form of the argument. [1]

    q is equivalent to the negativeIn everyday English, saying "It is false

    as flatly equivalent to saying "p is true andlassical logic, those phrasings are taken asof English "if...then..." require other

    tional

    ws on the nature of material implication

    .

    [2]

    q is logically equivalent to the negativehus the compound pq is false if andBy the same stroke, pq is true if and

    (or both). Thus is a function from pairs, q to truth values of the compound pq,tion of the truth values of the

    pq is called truth-functional. The

    lent also to p q (either not p, orq (oren not p). But it is not equivalent top.

  • 7/30/2019 unit 1 of DMS

    16/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    Truth table

    The truth table associated with the(symbolized as p q) and the loas p q, orCpq) is as follows:

    p q p q

    T T T

    T F F

    F T T

    F F T

    As a formal connective

    The material conditional can be ctaken as a set of sentences, satisfyi, in particular the following cha

    1. Modus ponens;2. Conditional proof;

    3. Classical contraposition;4. Classical reductio.

    Unlike truth-functional one, this aexamination of structurally identicsystems, where somewhat differenexample, in intuitionistic logic whvalid rules of inference, (pq) the material conditional is used to

    Other properties of implication (foany logical values of variables):

    distributivity:

    transitivity:

    reflexivity:

    truth preserving: The inter

    assigned a truth value of 'tresult of material implicati

    es Language of Logic

    Page 16

    material conditional not p or qical implication p implies q (symbolized

    nsidered as a symbol of a formal theory,ng all the classical inferences involvingacteristic rules:

    proach to logical connectives permits theal propositional forms in various logicalt properties may be demonstrated. Forch rejects proofs by contraposition as

    p q is not a propositional theorem, butdefine negation.

    llowing expressions are always true, for

    retation under which all variables are

    ue' produces a truth value of 'true' as an.

  • 7/30/2019 unit 1 of DMS

    17/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    commutativity of antecede

    Note that is logicaproperty is sometimes called currconvenient to adopt a right-associ

    denotes .

    Note also that comparison of truth, and it is sometimes conv

    proofs. Such a replacement can be

    Logical biconditional

    In logic and mathematics, the logithe material biconditional) is theasserting "p if and only ifq", whera conclusion (orconsequent).[1] Toperator is denoted using a doubleequality sign (=), an equivalence sto (p q) (q p), or the XNequivalent to "(not p or q) and (no"(p and q) or (not p and not q)", m

    The only difference from materialhypothesis is false but the conclusthe result is true, yet in the bicondi

    In the conceptual interpretation, a a 's"; in other words, the sets a annot mean that the concepts have th"trilateral", "equiangular triangle"is the subjectand the consequent iproposition.

    In the propositional interpretation,implies a; in other words, that theeither true or false at the same timsame meaning. Example: "The tritriangle ABC has two equal anglecause and the consequent is the co translated by a hypothetical(orco called the hypothesis (or the condi thesis.

    A common way of demonstratingthe conjunction of two converse cseparately.

    es Language of Logic

    Page 17

    ts:

    lly equivalent to ; thising. Because of these properties, it istive notation for where

    table shows that is equivalent toenient to replace one by the other inviewed as a rule of inference.

    al biconditional (sometimes known as logical connective of two statements

    e q is a hypothesis (orantecedent) and p isis is often abbreviated p iff q. Theheaded arrow (), a prefixed E (Epq), anign (), orEQV. It is logically equivalentR (exclusive nor) boolean operator. It isq or p)". It is also logically equivalent to

    eaning "both or neither".

    conditional is the case when theon is true. In that case, in the conditional,tional the result is false.

    = b means "All a 's are b 's and all b 's are b coincide: they are identical. This does

    e same meaning. Examples: "triangle" andand "equilateral triangle". The antecedents the predicate of a universal affirmative

    a b means that a implies b and bpropositions are equivalent, that is to say,. This does not mean that they have thengle ABC has two equal sides", and "The". The antecedent is the premise or the

    nsequence. When an implication is ditional) judgment the antecedent is

    ion) and the consequent is called the

    a biconditional is to use its equivalence tonditionals, demonstrating these

  • 7/30/2019 unit 1 of DMS

    18/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    When both members of the biconseparated into two conditionals, oother its reciprocal. Thus whenevhave a biconditional. A simple theantecedent is the hypothesis and w

    theorem.

    It is often said that the hypothesisthe thesis the necessary condition sufficient that the hypothesis be trnecessary that the thesis be true fotheorem and its reciprocal are trueand sufficient condition of the theboth cause and consequence.

    Definition

    Logical equality (also known as bivalues, typically the values of twoif and only if both operands are fal

    Truth table

    The truth table for (alsofollows:

    INPUT OUTPUT

    A B A B

    0 0 1

    0 1 0

    1 0 0

    1 1 1

    More than two statements combin

    es Language of Logic

    Page 18

    itional are propositions, it can bewhich one is called a theorem and ther a theorem and its reciprocal are true we

    orem gives rise to an implication whosehose consequent is the thesis of the

    s the sufficient condition of the thesis, andof the hypothesis; that is to say, it ise for the thesis to be true; while it is

    r the hypothesis to be true also. When awe say that its hypothesis is the necessaryis; that is to say, that it is at the same time

    conditional) is an operation on two logicalpropositions, that produces a value oftruese or both operands are true.

    ritten as A B, A = B, orA EQ B) is as

    d by are ambiguous:

    ay be meant as

    ,

  • 7/30/2019 unit 1 of DMS

    19/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    or may be used to say that all a

    Only for zero or two arguments th

    The following truth tables show thargument and in the lines with tw

    meant as equivalent to

    The central Venn diagram below,and line (ABC ) in this matrixrepresent the same operation.

    meant as shorthand for

    Properties

    commutativity: yes

    associativity: yes

    distributivity: Biconditional doeseven itself),but logical disjunction (see there)

    es Language of Logic

    Page 19

    e together true or together false:

    s is the same.

    e same bit pattern only in the line with noarguments:

    n't distribute over any binary function (not

    istributes over biconditional.

  • 7/30/2019 unit 1 of DMS

    20/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    idempotency: no

    monotonicity: no

    truth-preserving: yesWhen all inputs are true, the outp

    falsehood-preserving: noWhen all inputs are false, the outp

    Rules of Inference

    Like all connectives in first-orderinference that govern its use in for

    Biconditional Introduction

    Biconditional introduction allowsA follows from B, then A if and o

    For example, from the statementsI'm alive, then I'm breathing", it ca

    es Language of Logic

    Page 20

    t is true.

    t is not false.

    ogic, the biconditional has rules ofmal proofs.

    ou to infer that, if B follows from A, andly if B.

    "if I'm breathing, then I'm alive" and "ifn be inferred that "I'm breathing if and

  • 7/30/2019 unit 1 of DMS

    21/39

    Discrete Mathematical Structures Language of Logic

    Prepared by: Aisha Rafi Page 21

    only if I'm alive" or, equally inferrable, "I'm alive if and only if I'mbreathing."

    B AA B

    A B

    B AA B B A

    Tautology

    The word tautology was used by the ancient Greeks to describe a statement

    that was true merely by virtue of saying the same thing twice, a pejorativemeaning that is still used for rhetorical tautologies. Between 1800 and 1940,the word gained new meaning in logic, and is currently used in mathematicallogic to denote a certain type of propositional formula, without thepejorative connotations it originally possessed.

    In 1800, Immanuel Kant wrote in his bookLogic:

    "The identity of concepts in analytical judgments can be eitherexplicit(explicita) ornon-explicit(implicita). In the former case

    analytic propositions are tautological."

    Here analytic proposition refers to an analytic truth, a statement in naturallanguage that is true solely because of the terms involved.

    In 1884, Gottlob Frege proposed in his Grundlagen that a truth is analyticexactly if it can be derived using logic. But he maintained a distinctionbetween analytic truths (those true based only on the meanings of theirterms) and tautologies (statements devoid of content).

    In 1921, in his Tractatus Logico-Philosophicus, Ludwig Wittgensteinproposed that statements that can be deduced by logical deduction aretautological (empty of meaning) as well as being analytic truths. HenriPoincar had made similar remarks in Science and Hypothesis in 1905.Although Bertrand Russell at first argued against these remarks byWittgenstein and Poincar, claiming that mathematical truths were not onlynon-tautologous but were synthetic, he later spoke in favor of them in 1918:

    "Everything that is a proposition of logic has got to be in some sense

    or the other like a tautology. It has got to be something that has somepeculiar quality, which I do not know how to define, that belongs tological propositions but not to others."

  • 7/30/2019 unit 1 of DMS

    22/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    Here logical proposition refers tolaws of logic.

    During the 1930s, the formalizatioin terms of truth assignments was

    applied to those propositional forfalsity of their propositional variaSymbolic Logicby C. I. Lewis anproposition (in any formal logic) tpresentations after

    this (such as Stephen Kleene 1967tautology to refer to a logically vaa distinction between tautology an order logic (see below).

    Definition and examples

    A formula of propositional logic itrue regardless of which valuation

    There are infinitely many tautolog

    ("A or not A"), the law of

    only one propositional variable, A.definition, assign A one of the trutother truth value.

    ("and vice versa), which exp

    negation not-B, then not-A which is the principle kno

    ("if

    B", and vice versa), whichthen A implies C"), which

    true, and each implies C, tprinciple known as proof b

    A minimal tautology is a tautologtautology.

    is a tautolan instantiation of .

    Verifying tautologies

    es Language of Logic

    Page 22

    proposition that is provable using the

    n of the semantics of propositional logic developed. The term tautologybegan to be

    ulas that are true regardless of the truth orles. Some early books on logic (such as Langford, 1932) used the term for any

    at is universally valid. It is common in

    and Herbert Enderton 2002) to useid propositional formula, but to maintaind logically validin the context of first-

    a tautology if the formula itself is alwaysis used for the propositional variables.

    ies. Examples include:

    the excluded middle. This formula has

    Any valuation for this formula must, byvalues true orfalse, and assign A the

    ifA implies B then not-B implies not-A",esses the law of contraposition.

    ("if not-A implies both B and itsmust be false, then A must be true"),n as reductio ad absurdum.

    not both A and B, then either not-A or not-

    is known as de Morgan's law.("ifA implies B and B implies C,s the principle known as syllogism.

    (if at least one ofA orB isen Cmust be true as well), which is they cases.

    that is not the instance of a shorter

    ogy, but not a minimal one, because it is

  • 7/30/2019 unit 1 of DMS

    23/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    The problem of determining whetin propositional logic. If there arethere are 2n distinct valuations fordetermining whether or not the forone: one need only evaluate the tr

    possible valuations. One algorithvaluation causes this sentence to bevery possible valuation.

    For example, consider the formula

    There are 8 possible valuations fo

    represented by the first three colucolumns show the truth of subfora column showing the truth valuevaluation.

    A B C

    T T T T T T

    T T F T F F

    T F T F T T

    T F F F T T

    F T T F T T

    F T F F T F

    F F T F T T

    F F F F T T

    Because each row of the final coluverified to be a tautology.

    ContradictionsThere are other propositional form

    no matterwhat propositions you substitute falways get a

    es Language of Logic

    Page 23

    er a formula is a tautology is fundamentalvariables occurring in a formula then

    the formula. Therefore the task ofmula is a tautology is a finite, mechanicalth value of the formula under each of its

    ic method for verifying that everye true is to make a truth table that includes

    the propositional variables A, B, C,

    ns of the following table. The remainingulas of the formula above, culminating inf the original formula under each

    T T

    F T

    T T

    T T

    T T

    T T

    T T

    T T

    mn shows T, the sentence in question is

    s with only false substitution instances

    r the propositional variables, you will

  • 7/30/2019 unit 1 of DMS

    24/39

    Discrete Mathematical Structures Language of Logic

    Prepared by: Aisha Rafi Page 24

    false proposition as a result. These propositional forms are calledcontradictions.Again recall the example of such a proposition:

    p p

    Again, it does not matter whether you substitute a true proposition or a false

    proposition forp, the resulting proposition will be false

    DefinitionContradictions are propositional forms all of whose substitution instancesare false.

    ContingenciesFinally, there are propositional forms that do not determine the truth-value

    of theirsubstitution instances they are called contingencies. When a propositionthat has thepropositional form of a contingency is true, the proposition is said to becontingentlytrue, when such a proposition is false, it is said to be contingently false.Consider thefollowing propositional form:~pDepending on whether you substitute a false or a true proposition forp, theresulting proposition will be true or false, respectively

    DefinitionContingencies are those propositional forms some of whose substitutioninstances aretrue and some of whose substitution instances are false

    4. Truth-Table Definitions of a Tautology, a Contradiction, aContingency

    Logicians have invented the truth-table method for checking whether a

    propositionalform is tautologous, contradictory or contingent. Truth tables forpropositional formsallow to determine all the possible truth-values that the substitution instancesof thoseforms can have.

    A propositional form that is true in all rows of its truth table is a tautology.

    A propositional form that is false in all rows of its truth table is acontradiction.

    A propositional form that is true in at least one row of its truth table andfalse in at

  • 7/30/2019 unit 1 of DMS

    25/39

    Discrete Mathematical Structures Language of Logic

    Prepared by: Aisha Rafi Page 25

    least one row of its truth table is a contingency.

    Lets consider an example of a contingency: p (p q). Now note,however,that there are two propositional variables in that propositional form, viz. p

    and q. Wethus need to consider more possibilities in fact, four of truth-valueassignmentsfor variables p and q:

    The propositional form p (p q) is a contingency because there are atleast one row(in fact there are two such rows rows 1 and 2) where it is true, and there isat leastone row in fact there are two such rows rows 3 and 4) where it is false

    Logically equivalent

    Two sentences are Logically Equivalent if and only if they are true inprecisely the same situations. Another way to think of a pair of logicallyequivalent sentences is as two sentences that say the exact same thing. Ifone of them is true, the other is true; if one of them is false, the other is false.

  • 7/30/2019 unit 1 of DMS

    26/39

    Discrete Mathematical Structures Language of Logic

    Prepared by: Aisha Rafi Page 26

    The notion of logical equivalence can be broadened to apply to collectionsof sentences of any size (not just pairs).

    [edit] Truth Table Test for Logical EquivalenceThe easiest way to test whether two sentences are logically equivalent is to

    make a truth-table for the sentences in question. Once you fill out the truth-table for the sentences, you look at thecolumn under the main connective of each sentence. The two sentences arelogically equivalent exactly when the column under the main connective ofthe first sentence is identical to the column under the main connective of thesecond sentence. Notice that this captures in a formal way the informal ideathat two sentences are logically equivalent just in case they are either bothtrue or both false in any given situation.

    [edit] ExamplesThe sentences (A B) and (A B) are logically equivalent, as thefollowing truth-table shows:

    A B (A B) (A B)

    T T F F

    T F F F

    F T F F

    F F T T

    The sentences (A B) and (A B) are also logically equivalent, as thefollowing truth-table shows:

    A B (A B) (A B)

    T T F F

    T F T T

    F T T T

    F F T T

  • 7/30/2019 unit 1 of DMS

    27/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    The sentences (PQ) and (QP)following truth-table demonstrate

    P Q (PQ) (QP)

    T T T T

    T F F T

    F T T F

    F F T T

    Quantifiers

    The words in italics are quantifierreformulating any one of these exsentences, each a simple predicatewas chipped. These examples alsoexpressions in natural language caFortunately, for mathematical assesyntactically more straightforward

    There are two quantifiers, the univquantifier. The traditional symbolinverted letter "A", which stands fsymbol for the existential quantififor "there exists" or "exists".

    An example of quantifying an Enthe statement, "All of Peters frien

    beach", we can identify key aspecquantifiers. So, let x be any one paPeter's friends, P(x) be the predicaand lastly Q(x) the predicate "x li

    . Which is reor Q of x."

    Some other quantified expressions

    for a formula P. Variant notations

    es Language of Logic

    Page 27

    are not logically equivalent, as the:

    . There exists no simple way ofressions as a conjunction or disjunction ofof an individual such as That wine glass

    suggest that the construction of quantifiedn be syntactically very complicated.rtions, the quantification process is

    ersal quantifier and the existentialfor the universal quantifier is " ", anr "for all" or "all". The correspondingr is " ", a rotated letter "E", which stands

    lish statement would be as follows. Givens either like to dance or like to go to the

    s and rewrite using symbols includingrticular friend of Peter, X the set of allte (mathematical logic) "x likes to dance",es to go to the beach". Then we have, :d, "for all x that's a member of X, P of x

    are constructed as follows,

    include, for set

  • 7/30/2019 unit 1 of DMS

    28/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    Xand set members x

    All of these variations also apply tvariations for the universal quanti

    Equivalent Expressions

    IfXis a domain ofx and P(x) is auniversal proposition is expressed

    which equivalently reads "ifx is iP(x) is indeterminate. Note that thxbe in X, so it can be any x in X, ithe expression, or the truth of

    additionally requires that xbe sucreason behind calling x a "boundread as "for some x in X, P(x) is fa

    P(x) is false." So, we now have thexistential proposition:

    Thus, together with negation, onlyquantifier is needed to perform bo

    which shows that to disprove a "fthan to find an x for which the pre

    to disprove a "there exists an x" prpredicate is false for all x.

    Various Normal Forms

    Disjunctive Normal FormsConjunctive Normal Forms

    es Language of Logic

    Page 28

    o universal quantification. Otherier are

    redicate dependent on x, then thein Boolean algebra terms as

    X, then P(x) is true." Ifx is not in X, thentruth of the expression requires only thatdependent ofP(x), whereas the falsity of

    that P(x) evaluates to false; this is theariable." This last expression can thus belse," or "there exists an x in Xsuch that

    equivalent Boolean expression for the

    one of either the universal or existentialh tasks:

    r all x" proposition, one needs no moreicate is false. Similarly,

    oposition, one needs to show that the

  • 7/30/2019 unit 1 of DMS

    29/39

    Discrete Mathematical Structures Language of Logic

    Prepared by: Aisha Rafi Page 29

    Principal Disjunctive Normal FormsPrincipal Conjunctive Normal Forms

    VARIOUS NORMAL FORMS

    In this section you will know about four kinds of normal forms i.e.Disjunctive, Conjunctive, principal Disjunctive & Principal Conjunctivenormal forms.

    Disjunctive Normal Forms

    We shall use the words 'product' and 'sum' in place of the logical connectives'conjunction' and 'disjuncdon' respectively. Before defining what is called'disjunctive normal forms' we first introduce some other concepts needed inthe sequel. In a formula, a product of the variables and their negations is

    called an elementary product. Similarly a sum of the variables and theirnegations is called an elementary sum.

    Let P and Q be any two variables. Then P., P Q, Q P P, P P,Q P are some examples of elementary products; and P, P Q, Q P P, P P , Q P are examples of elementary sums of twovariables. A part of the elementary sum or product which is itself anelementary sum Or product is called a factor of the Original sum Or ProductThe elementary sums or products satisfy the following properties. We onlystate them without proof.

    1. An elementary product is identically false if and only if it contains atleast one pair of factors in which one is the negation of the other.

    2. An elementary sum is identically true if and only if it contains atleastone pair of factors in which one is the negation of the other.

    We now discuss some examples.

  • 7/30/2019 unit 1 of DMS

    30/39

    Discrete Mathematical Structures Language of Logic

    Prepared by: Aisha Rafi Page 30

    It should be noted that the disjunctive normal form of a given formula is notunique. For example, consider P ( Q R ). This is already in disjunctivenormal form.

    We can write

    P ( Q R ) ( P Q ) ( P R )

    ( P P ) ( P Q ) ( P R ) ( Q P )

    zaand this is another equivalent normal form. In subsequent sections weintroduce the concepts of Principal normal forms which give unique normalform of a given formula.

    Conjunctive Normal Forms

    A formula which consists of a product of elementary sums and is equivalentto a given formula is called a conjunctive normal form of the given formula.

    Principal Disjunctive Normal Forms

    For two Statement variables P and Q, construct all possible formulas whichconsist of Conjunctions of P or its negation and conjunctions of Q or itsnegation such that none of the formulas contain both a variable and itsnegation. Note that any formula which is obtained by commuting theformulas in the conduction should not be included in the list because anysuch formula will be equivalent to one included in the list. For example, anyone of P Q or Q P is included in the list, but not the both. For two

    variables P and Q, there are 2

    2

    = 4 formulas included in the list these aregiven by

    P Q, P Q, P Q, P Q.

  • 7/30/2019 unit 1 of DMS

    31/39

    Discrete Mathematical Structures Language of Logic

    Prepared by: Aisha Rafi Page 31

    These formulas are called minterms. One can construct truth table andobserve that no two minterms are equivalent. The truth table is given below :

    PQ P Q P Q P Q P QT T T F F FT F F T F FF T F F T FF F F F F T

    Given one formula, an equivalent formula, consisting of disjunctions ofminterrns only is known as its Principal Disjunctive normal, form or sum-of-products canonical form.

    Principal Conjunctive Normal Forms

    Given a number of variables, maxterm of these variables is a formulawhich consists of disjunctions in which each variable or its negation but notboth appear only once. Observe that the maxterms are the duals of minterms.Note that each of the minterms has the truth value T for exactly onecombination of the truth values of the variables and this fact can be seenfrom truth table. Therefore each of the maxterms has the truth value F forexactly one combination of the truth values of the variables. This fact can bederived from the duality principle (using the properties of minterms) or canbe directly obtained from truth table.

    For a given formula, an equivalent formula consisting of conductions of themaxterms only is known as its principal conjunctive normal form or theproduct-of-sums canonical form.

  • 7/30/2019 unit 1 of DMS

    32/39

    Discrete Mathematical Structures Language of Logic

    Prepared by: Aisha Rafi Page 32

    VALID INFERENCE USING TRUTH TABLES AND DIRECTMETHOD OF PROOF

    Let A and B two statement formulas. It is said that 'B follows from A' or 'Bis a conclusion of the premise A' or 'B is a consequence of the premise A' iffA B is a tautology.

    Let { A1, A2, ...... An } be a set of formulas. It is said that a conclusion Bfollows from the set of premises { A1, A2, ...... An } iff

    A1 A2 .... An B is a tautology.

    Given a set of premises and a conclusion, it is possible, by using truth table,to know whether the conclusion follows from the given premises. But thismethods becomes tedious and time consuming when the number of variablespresent in all the formulas representing premises and conclusion are large.Also there are situations where truth table technique is no longer available.Because of these facts other methods have been developed and we discussthem in following sections.

    RULES OF INFERENCE ( RULES P AND T)

    We shall describe the method by which one derives that a formula is aconsequence of a set of given Premises ( also called hypotheses ). We firstquote two rules of inference called the rules P and T.

  • 7/30/2019 unit 1 of DMS

    33/39

    Discrete Mathematical Structures Language of Logic

    Prepared by: Aisha Rafi Page 33

    Rule P: A premise may be introduced at any point of the derivation.

    Rule T : A formula S may be introduced in a derivation if S istautologically implied by any, one or more of the proceedingformulas in the derivation.

    We now, list some important implications and equivalences which will beused in the derivations. All the implications and equivalences which will belisted now, are not independent of each other; some of them can be derived

    from some others. So one could start with minimum number of them. but wewill not follow such an axiomatic scheme in this introductory text. Some ofthese were also listed earlier while discussing implications.

    Implications

    3.4.2 Equivalences

  • 7/30/2019 unit 1 of DMS

    34/39

    Discrete Mathematical Structures Language of Logic

    Prepared by: Aisha Rafi Page 34

  • 7/30/2019 unit 1 of DMS

    35/39

    Discrete Mathematical Structures Language of Logic

    Prepared by: Aisha Rafi Page 35

    CONSISTENCY OF PREMISES AND INDIRECT METHOD OFPROOF

    If R is any formula, note that R R is a contradiction. A set of formulasA1, A2, ...., Am. is said to be consistent if their conjunction has the truthvalue T for some assignment of the truth values to the atomic variablesappearing in the formulas A1, A2, ...., Am. Otherwise the formulas are calledinconsistent. In otherwords, A1, A2, ...., Am are said to be inconsistent if for

    every assignment of the truth values to the atomic variables, atleast one ofthe formulas A1, A2, ...., Am is false, i.e. their conjuction is identically false.

  • 7/30/2019 unit 1 of DMS

    36/39

    Discrete Mathematical Structures Language of Logic

    Prepared by: Aisha Rafi Page 36

    To be precise, a set of formulas A1, A2, ...., Am is consistent if theirconjuction is a contradiction, i.e. if

    A1 A2 .... Am R R

    where R is any formula.

    The notion of inconsistency is used in a procedure called 'proof bycontradiction orreductio ad absurdum or indirect method of proof'. In orderto prove that a conclusion C follows from a set of premises A1, A2, ...., Amby using the method 'proof by contradiction' the procedure is as follows :

    Assume that C is false and consider C as an additional premise. If the newset of premises C, A1, A2, ...., Am is inconsistent, they imply acontradiction, then the assumption that C is true does not holdsimultaneously with A

    1 A

    2 ..... A

    mbeing true. Therefore C is true

    whenever A1 A2 ..... Am is true. Thus the conclusion C follows fromthe premises A1, A2, ...., Am.

    Proof by contradiction is sometimes very much convenient. But if required,it can be eliminated and replaced by another method, called a conditionalproof (CP) ). To demonstrate this observe that

    ' P ( Q Q ) ' P ..... (1)

    In the proof by contradiction we show

    A1, A2, ...., Am C

    by showing

    A1, A2, ...., Am, C R P

    Now this can be converted to the following by using rule CP

    A1, A2, ...., Am C ( R R ) ..... (2)

    From (1) and (2) by using the rule of double negation one can prove that

    A1, A2, ...., Am C

    and this is the required derivation.

    AUTOMATIC PROVING OF THEOREMS

    In this section we reformulate the rules of inference theory for statementcalculus and describe a procedure of derivation which can be conductedmechanically.

  • 7/30/2019 unit 1 of DMS

    37/39

    Discrete Mathematical Structures Language of Logic

    Prepared by: Aisha Rafi Page 37

    Before describing this procedure, we first discuss some of the shortcomingsof the procedure used in the earlier section. We shall then describe a set of10 rules an axiom schema and rules for sequents.

    First of all observe that rule P permits the introduction of a premise at any

    point in the derivation, but it does not suggest either the Premises or the stepat which it should introduced. Similarly Rule T allows us to introduce anyformula which follows from the previous steps, but it does not suggest anydefinite choice of such a formula nor there is any guidance for the use of anyparticular equivalence. Similarly Rule CP does not tell anything about thestages at which an antecedent is to be introduced as an additional premise,nor does it indicate the stage at which it is again incorporated into theconditional. At every step, such decisions are taken from a large number ofalternatives, with the ultimate aim of reaching the conclusion.

    We now describe our system which is given as follows :

    Variables

    The capital letters Of English alphabet A, B, C, ..... P, Q, R, ..... will be usedto denote the statement variables. They are also used to represent thestatement formulas, but these notations will be clear from the context

    Connectives

    The connectives , , , , appear in the formulas with the order of

    precedence as given above.

    String Of Formulas

    A string of formulas is defined as follows :

    i) any formula is a string of formulas,

    ii) if a and b are string of formulas, then ( a , b and b , a are strings offormulas,

    iii) only those strings which are obtained from steps (i) and (ii) arestrings of formulas; with the exception of the empty string which isalso a string of formulas.

    The order in which the formulas appear in a string is not important; thestrings A, B, C; B, C, A; A, C, B etc. are the Same.

    Sequents

    If a and b are strings of formulas then a b is called a sequent in which a isthe antecedent and b the consequent of the sequent. A sequent is trueif either atleast one of the formulas of the antecedent is false or atleast one of

  • 7/30/2019 unit 1 of DMS

    38/39

    Discrete Mathematical Structu

    Prepared by: Aisha Rafi

    the formulas of the consequent is tproof and the latter is called the T

    Occasionally we have sequents wanticedent or as consequent. The e

    logical constant 'true' or T and thelogical constant 'false' or F.

    Axiom Scheme

    If a , and b strings of formulas sucvariable only, then the sequent avariable common. For example, Avariables is an axiom.

    TheoremThe following sequents are theore

    i) every axiom, is a theorem.

    ii) if a sequent a is a theoremthe use of one of the 10 rules of tha theorem,

    iii) sequents obtained from (i)

    Beyond the Syllabus

    Applications in computer scienc

    Operators corresponding to logicalanguages.

    Bitwise operation

    Disjunction is often used for bitwi

    0 or 0 = 0 0 or 1 = 1 1 or 0 = 1 1 or 1 = 1

    es Language of Logic

    Page 38

    rue. The former case is called the vacuousivial proof.

    ich have empty strings of formulasmpty antecedent, is interpreted as the

    empty consequent is interpreted as the

    that every formula in both a and b isb is an axiom if a and b have atleast one

    , B, C P, B, R where A, B, C, P, R are

    s of our system.

    and a sequent b results from cc throughe system which are given below, then b is

    and (ii) are the only theorems.

    disjunction exist in most programming

    se operations. Examples:

  • 7/30/2019 unit 1 of DMS

    39/39

    Discrete Mathematical Structures Language of Logic

    1010 or 1100 = 1110

    The or operator can be used to set bits in a bit field to 1, by or-ing the fieldwith a constant field with the relevant bits set to 1. For example, x = x |0b00000001 will force the final bit to 1 while leaving other bits unchanged.

    Logical operation

    Many languages distinguish between bitwise and logical disjunction byproviding two distinct operators; in languages following C, bitwisedisjunction is performed with the single pipe (|) and logical disjunction withthe double pipe (||) operators.

    Logical disjunction is usually short-circuited; that is, if the first (left)operand evaluates to true then the second (right) operand is not evaluated.The logical disjunction operator thus usually constitutes a sequence point.

    Although in most languages the type of a logical disjunction expression isboolean and thus can only have the value true or false, in some (such asPython and JavaScript) the logical disjunction operator returns one of itsoperands: the first operand if it evaluates to a true value, and the secondoperand otherwise.