LogiQL and Predicate Logic - Halpin, Terry; Rugaber, Spencer (Taylor & Francis Group, 2015)
LogiQL is a programming language capable of computing correct answers for properly formulated problems. It has evolved from efforts to apply formal logical reasoning to databases, and this appendix describes the relationship between logic and LogiQL. In particular, the appendix describes how LogiQL is related to propositional logic and first-order predicate logic. Propositions are asserted by declarative sentences and are always true or false but not both. In propositional logic, atomic propositions are denoted by propositional constants (e.g., R = “It is raining”; S = “It is snowing”). Compound propositions are formed by applying propositional operators to other propositions, using parentheses if needed. For example, using ∼ for the negation operator and ∧ for the conjunction operator, we could use the formula ∼(R∧S) to denote the proposition that “It is not both raining and snowing.” Results about propositional patterns are indicated by using propositional variables (e.g., p, q) to stand for any propositions in general. For example, ∼∼p is equivalent to p regardless of which proposition is substituted for p. First-order logic (FOL), also called first-order predicate logic, predicate calculus, or quantification theory, extends propositional logic with predicates, quantifiers, and individual constants. In logic, an individual is any individual object (entity or value). For a given universe of discourse, specific individuals are denoted by individual constants (e.g., terry), and specific predicates are denoted by predicate constants with their arguments in parentheses, for example, isTallerThan(terry,norma). General results may be stated using individual variables (to range over any individual) and quantifiers. The universal quantifier ∀ means “for each” or “for all.”