Systems and System Descriptions

Ivan Marsic • Rutgers University 122 p q p ⇒ q T T T T F F F T T F F T Truth table for p ⇒ q. A conditional statement or, simply a conditional, is obtained by combining two propositions p and q to a compound proposition “if p, then q.” It is also written as p ⇒ q and can be read as “p implies q.” In the conditional statement p ⇒ q, p is called the premise or antecedent or hypothesis and q is called the conclusion or consequence. The conditional statement p ⇒ q is false when the premise p is true and the conclusion q is false, and true otherwise. It is important to note that conditional statements should not be interpreted in terms of cause and effect. Thus, when we say “if p, then q,” we do not mean that the premise p causes the conclusion q, but only that when p is true, q must be true as well 12 . The statement p ⇔ q is a biconditional, or bi-implication, which means that p ⇒ q and q ⇒ p. The biconditional statement p ⇔ q is true when p and q have the same truth value, and is false otherwise. So far we have considered propositional logic; now let us briefly introduce predicate logic. We saw above that the sentence “x is smaller than 5” is not a proposition because it is neither true nor false. This sentence has two parts: the variable x, which is the subject, and the predicate , “is smaller than 5,” which refers to a property that the subject of the sentence can have. We can denote this statement by Px, where P denotes the predicate “is smaller than 5” and x is the variable. The sentence Px is also said to be the value of the propositional function P at x. Once a specific value has been assigned to the variable x, the statement Px becomes a proposition and has a truth value. In our example, by setting x = 3, Px is true; conversely, by setting x = 7, Px is false 13 . There is another way of creating a proposition from a propositional function, called quantification. Quantification expresses the extent to which a predicate is true over a range of elements, using the words such as all, some, many, none, and few. Most common types of quantification are universal quantification and existential quantification, shown at the bottom of Table 3-1. The universal quantification of Px is the proposition “Px is true for all values of x in the domain,” denoted as ∀x Px. The value of x for which Px is false is called a counterexample of 12 This is different from the if-then construction used in many programming languages. Most programming languages contain statements such as if p then S, where p is a proposition and S is a program segment of one or more statements to be executed. When such an if-then statement is encountered during the execution of a program, S is executed is p is true, but S is not executed if p is false. 13 The reader might have noticed that we already encountered predicates in Section 3.1.2 where the state relations for objects actually are predicates. Table 3-1: Operators of the propositional and predicate logics. Propositional Logic ∧ conjunction p and q ⇒ implication if p then q ∨ disjunction p or q ⇔ biconditional p if and only if q ¬ negation not p ≡ equivalence p is equivalent to q Predicate Logic extends propositional logic with the two quantifiers ∀ universal quantification for all x, Px ∃ existential quantification there exists x, Px