Propositional calculus

In logic and mathematics, a propositional calculus (or a sentential calculus) is a formal system that represents the materials and the principles of propositional logic (or sentential logic). Propositional logic is a domain of formal subject matter that is, up to isomorphism, constituted by the structural relationships of mathematical objects called propositions.

In general terms, a calculus is a formal system that consists of a set of syntactic expressions (well-formed formulas or wffs), a distinguished subset of these expressions, plus a set of transformation rules that define a binary relation on the space of expressions.

When the expressions are interpreted for mathematical purposes, the transformation rules are typically intended to preserve some type of semantic equivalence relation among the expressions. In particular, when the expressions are intepreted as a logical system, the semantic equivalence is typically intended to be logical equivalence. In this setting, the transformation rules can be used to derive logically equivalent expressions from any given expression. These derivations include as special cases (1) the problem of simplifying expressions and (2) the problem of deciding whether a given expression is equivalent to an expression in the distinguished subset, typically interpreted as the subset of logical axioms.

The set of axioms may be empty, a nonempty finite set, a countably infinite set, or given by axiom schemata. A formal grammar recursively defines the expressions and well-formed formulas (wffs) of the language. In addition a semantics is given which defines truth and valuations (or interpretations). It allows us to determine which wffs are valid, that is, are theorems.

The language of a propositional calculus consists of (1) a set of primitive symbols, variously referred to as atomic formulas, placeholders, proposition letters, or variables, and (2) a set of operator symbols, variously interpreted as logical operators or logical connectives. A well-formed formula (wff) is any atomic formula or any formula that can be built up from atomic formulas by means of operator symbols.

The following outlines a standard propositional calculus. Many different formulations exist which are all more or less equivalent but differ in (1) their language, that is, the particular collection of primitive symbols and operator symbols, (2) the set of axioms, or distingushed formulas, and (3) the set of transformation rules that are available.

Abstraction and application
Although it is possible to construct an abstract formal calculus that has no immediate practical use and next to nothing in the way of obvious applications, the very name calculus indicates that this species of formal system owes its origin to the utility of its prototypical members in practical calculation. Generally speaking, any mathematical calculus is designed with the intention of representing a given domain of formal objects, and typically with the aim of facilitating the computations and inferences that need to be carried out in this representation. Thus some idea of the intended denotation, the formal objects that the formulas of the calculus are intended to denote, is given in advance of developing the calculus itself.

Viewed over the course of its historical development, a formal calculus for any given subject matter normally arises through a process of gradual abstraction, stepwise refinement, and trial-and-error synthesis from the array of informal notational systems that inform prior use, each of which covers the object domain only in part or from a particular angle.

Generic description of a propositional calculus
A propositional calculus is a formal system $$\mathcal{L} = \mathcal{L}\ (\Alpha,\ \Omega,\ \Zeta,\ \Iota)$$, whose formulas are constructed in the following manner:


 * The alpha set $$\Alpha\!$$ is a finite set of elements called proposition symbols or propositional variables. Syntactically speaking, these are the most basic elements of the formal language $$\mathcal{L}$$, otherwise referred to as atomic formulas or terminal elements.  In the examples to follow, the elements of $$\Alpha\!$$ are typically the letters p, q, r, and so on.


 * The omega set $$\Omega\!$$ is a finite set of elements called operator symbols or logical connectives. The set $$\Omega\!$$ is partitioned into disjoint subsets as follows:


 * $$\Omega = \Omega_0 \cup \Omega_1 \cup \ldots \cup \Omega_j \cup \ldots \cup \Omega_m \,.$$


 * In this partition, $$\Omega_j\!$$ is the set of operator symbols of arity $$j\!$$.


 * In the more familiar propositional calculi, $$\Omega\!$$ is typically partitioned as follows:


 * $$\Omega_1 = \{ \lnot \} \,,$$


 * $$\Omega_2 \subseteq \{ \land, \lor, \rightarrow, \leftrightarrow \} \,.$$


 * A frequently adopted option treats the constant logical values as operators of arity zero, thus:


 * $$\Omega_0 = \{0,\ 1 \} \,.$$


 * Some writers use the tilde (~) instead of (¬) and some use the ampersand (&) instead of (&#8743;). Notation varies even more for the set of logical values, with symbols like  {false, true}, {F, T}, {0, 1}, and {$$\bot$$, $$\top$$} all being seen in various contexts.


 * Depending on the precise formal grammar or the grammar formalism that is being used, syntactic auxiliaries like the left parenthesis, "(", and the right parentheses, ")", may be necessary to complete the construction of formulas.

The language of $$\mathcal{L}$$, also known as its set of formulas, well-formed formulas or wffs, is inductively or recursively defined by the following rules:


 * 1) Base.  Any element of the alpha set $$\Alpha\!$$ is a formula of $$\mathcal{L}$$.
 * 2) Step (a).  If p is a formula, then ¬p is a formula.
 * 3) Step (b).  If p and q are formulas, then (p &#8743; q), (p &#8744; q), (p &#8594; q), and (p &#8596; q) are formulas.
 * 4) Close.  Nothing else is a formula of $$\mathcal{L}$$.

Repeated applications of these rules permits the construction of complex formulas. For example:


 * 1) By rule 1, p is a formula.
 * 2) By rule 2, ¬p is a formula.
 * 3) By rule 1, q is a formula.
 * 4) By rule 3, (¬p &#8744; q) is a formula.


 * The zeta set $$\Zeta\!$$ is a finite set of transformation rules that are called inference rules when they acquire logical applications.


 * The iota set $$\Iota\!$$ is a finite set of initial points that are called axioms when they receive logical interpretations.

Example 1. Simple axiom system
Let $$\mathcal{L}_1 = \mathcal{L}\ (\Alpha,\ \Omega,\ \Zeta,\ \Iota)$$, where $$\Alpha,\ \Omega,\ \Zeta,\ \Iota$$ are defined as follows:


 * The alpha set $$\Alpha \!$$ is a finite set of symbols that is large enough to supply the needs of a given discussion, for example:


 * $$\Alpha = \{p, q, r, s, t, u \} \,.$$

Of the three connectives for conjunction, disjunction, and implication (&#8743;, &#8744;, and &#8594;), one can be taken as primitive and the other two can be defined in terms of it and negation (¬). Indeed, all of the logical connectives can be defined in terms of a sole sufficient operator. The biconditional (&#8596;) can of course be defined in terms of conjunction and implication, with a &#8596; b defined as (a &#8594; b) &#8743; (b &#8594; a).

Adopting negation and implication as the two primitive operations of a propositional calculus is tantamount to having the omega set $$\Omega = \Omega_1 \cup \Omega_2$$ partition as follows:


 * $$\Omega_1 = \{ \lnot \} \,,$$


 * $$\Omega_2 = \{ \rightarrow \} \,.$$

An axiom system discovered by Jan Lukasiewicz formulates a propositional calculus in this language as follows:


 * $$p \to (q \to p)$$


 * $$(p \to (q \to r)) \to ((p \to q) \to (p \to r))$$


 * $$(\neg p \to \neg q) \to (q \to p)$$

The inference rule is modus ponens, from p, (p &#8594; q), infer q. Then a &#8744; b is defined as ¬a &#8594; b, and a &#8743; b is defined as ¬(a &#8594; ¬b).

Example 2. Natural deduction system
Let $$\mathcal{L}_2 = \mathcal{L}\ (\Alpha,\ \Omega,\ \Zeta,\ \Iota)$$, where $$\Alpha,\ \Omega,\ \Zeta,\ \Iota$$ are defined as follows:


 * The alpha set $$\Alpha \!$$ is a finite set of symbols that is large enough to supply the needs of a given discussion, for example:


 * $$\Alpha = \{p, q, r, s, t, u \} \,.$$


 * The omega set $$\Omega = \Omega_1 \cup \Omega_2$$ partitions as follows:


 * $$\Omega_1 = \{ \lnot \} \,,$$


 * $$\Omega_2 = \{ \land, \lor, \rightarrow, \leftrightarrow \} \,.$$

In the following example of a propositional calculus, the transformation rules are intended to be interpreted as the inference rules of a so-called natural deduction system. The particular system presented here has no initial points, which means that its interpretation for logical applications derives its theorems from an empty axiom set.


 * The set of initial points is empty, that is, $$\Iota = \varnothing \,.$$


 * The set of transformation rules, $$\Zeta ,\!$$, is described as follows:

Our propositional calculus has ten inference rules. These rules allow us to derive other true formulae given a set of formulae that are assumed to be true. The first nine simply state that we can infer certain wffs from other wffs. The last rule however uses hypothetical reasoning in the sense that in the premise of the rule we temporarily assume an (unproven) hypothesis to be part of the set of inferred formulae to see if we can infer a certain other formula. Since the first nine rules don't do this they are usually described as non-hypothetical rules, and the last one as a hypothetical rule.


 * Reductio ad absurdum (negation introduction) : From (p&#8594;q), (p&#8594; ¬q), infer ¬p.
 * Double negative elimination : From ¬¬p, infer p.
 * Conjunction introduction : From p and q, infer (p &#8743; q).
 * Conjunction elimination : From (p &#8743; q), infer p
 * From (p &#8743; q), infer q.


 * Disjunction introduction : From p, infer (p &#8744; q)
 * From p, infer (q &#8744; p).


 * Disjunction elimination : From (p &#8744; q), (p &#8594; r), (q &#8594; r), infer r.
 * Biconditional introduction : From (p &#8594; q), (q &#8594; p), infer (p &#8596; q).
 * Biconditional elimination : From (p &#8596; q), infer (p &#8594; q);
 * From (p &#8596; q), infer (q &#8594; p).


 * Modus ponens (conditional elimination) : From p, (p &#8594; q), infer q.
 * Conditional proof (conditional introduction) : If accepting p allows a proof of q, infer (p &#8594; q).



Proofs in propositional calculus
One of the main uses of a propositional calculus, when interpreted for logical applications, is to determine relations of logical equivalence between propositional formulas. These relationships are determined by means of the available transformation rules, sequences of which are called derivations or proofs.

In the discussion to follow, a proof is presented as a sequences of numbered lines, with each line consisting of a single formula followed by a reason or justification for introducing that formula. Each premiss of the argument, that is, an assumption introduced as a hypothesis of the argument, is listed at the beginning of the sequence and is marked as a "premiss" in lieu of other justification. The conclusion is listed on the last line. A proof is complete if every line follows from previous ones by the correct application of a transformation rule. (For a contrasting approach, see proof-trees).

Example of a proof

 * To be shown that A &#8594; A.


 * One possible proof of this may be arranged as follows:

Interpret A &#9500; A as "Assuming A, infer A". Read &#9500; A &#8594; A as "Assuming nothing, infer that A implies A," or "It is a tautology that A implies A," or "It is always true that A implies A."

Soundness and completeness of the rules
The crucial properties of this set of rules are that they are sound and complete. Informally this means that the rules are correct and that no other rules are required. These claims can be made more formal as follows.

We define a truth assignment as a function that maps propositional variables to true or false. Informally such a truth assignment can be understood as the description of a possible state of affairs (or possible world) where certain statements are true and others are not. The semantics of formulae can then be formalized by defining for which "state of affairs" they are considered to be true, which is what is done by the following definition.

We define when such a truth assignment A satisfies a certain wff with the following rules:
 * A satisfies the propositional variable P iff A(P) = true
 * A satisfies ¬&#966; iff A does not satisfy &#966;
 * A satisfies (&#966; &#8743; &#968;) iff A satisfies both &#966; and &#968;
 * A satisfies (&#966; &#8744; &#968;) iff A satisfies at least one of either &#966; or &#968;
 * A satisfies (&#966; &#8594; &#968;) iff it is not the case that A satisfies &#966; but not &#968;
 * A satisfies (&#966; &#8596; &#968;) iff A satisfies both &#966; and &#968; or satisfies neither one of them

With this definition we can now formalize what it means for a formula &#966; to be implied by a certain set S of formulae. Informally this is true if in all worlds that are possible given the set of formulae S the formula &#966; also holds. This leads to the following formal definition: We say that a set S of wffs semantically entails (or implies) a certain wff &#966; if all truth assignments that satisfy all the formulae in S also satisfy &#966;.

Finally we define syntactical entailment such that &#966; is syntactically entailed by S iff we can derive it with the inference rules that were presented above in a finite number of steps. This allows us to formulate exactly what it means for the set of inference rules to be sound and complete: For the above set of rules this is indeed the case.
 * Soundness : If the set of wffs S syntactically entails wff &#966; then S semantically entails &#966;
 * Completeness : If the set of wffs S semantically entails wff &#966; then S syntactically entails &#966;

Sketch of a soundness proof
(For most logical systems, this is the comparatively "simple" direction of proof)

Notational conventions: Let "G" be a variable ranging over sets of sentences. Let "A", "B", and "C" range over sentences. For "G syntactically entails A" we write "G proves A". For "G semantically entails A" we write "G implies A".

We want to show: (A)(G)(If G proves A then G implies A)

We note that "G proves A" has an inductive definition, and that gives us the immediate resources for demonstrating claims of the form "If G proves A then ..." So our proof proceeds by induction.


 * I. Basis. Show: If A is a member of G then G implies A
 * [II. Basis. Show: If A is an axiom, then G implies A]
 * III. Inductive step:
 * (a) Assume for arbitrary G and A that if G proves A then G implies A. (If necessary, assume this for arbitrary B, C, etc. as well)
 * (b) For each possible application of a rule of inference to A, leading to a new sentence B, show that G implies B.

NB. Basis Step II can be omitted for the above calculus, which is a natural deduction system and so has no axioms. Basically, it involves showing that each of the axioms is a (semantic) logical truth.

The Basis step(s) demonstrate(s) that the simplest provable sentences from G are also implied by G, for any G. (The is simple, since the semantic fact that a set implies any of its members, is also trivial.) The Inductive step will systematically cover all the further sentences that might be provable--by considering each case where we might reach a logical conclusion using an inference rule--and shows that if a new sentence is provable, it is also logically implied. (For example, we might have a rule telling us that from "A" we can derive "A or B". In III.(a) We assume that if A is provable it is implied.  We also know that if A is provable then "A or B" is provable.  We have to show that then "A or B" too is implied.  We do so by appeal to the semantic definition and the assumption we just made. A is provable from G, we assume.  So it is also implied by G. So any semantic valuation making all of G true makes A true.  But any valuation making A true makes "A or B" true, by the defined semantics for "or".  So any valuation which makes all of G true makes "A or B" true.  So "A or B" is implied.)  Generally, the Inductive step will consist of a lengthy but simple case-by-case analysis of all the rules of inference, showing that each "preserves" semantic implication.

By the definition of provability, there are no sentences provable other than by being a member of G, an axiom, or following by a rule; so if all of those are semantically implied, the deduction calculus is sound.

Sketch of completeness proof
(This is usually the much harder direction of proof.)

We adopt the same notational conventions as above.

We want to show: If G implies A, then G proves A. We proceed by contraposition: We show instead that If G does not prove A then G does not imply A.


 * I. G does not prove A. (Assumption)
 * II. If G does not prove A, then we can construct an (infinite) "Maximal Set", G*, which is a superset of G and which also does not prove A.
 * (a)Place an "ordering" on all the sentences in the language. (e.g., alphabetical ordering), and number them E1, E2, ...
 * (b)Define a series Gn of sets (G0, G1 ... ) inductively, as follows. (i)G0 = G.  (ii) If {Gk, E(k+1)} proves A, then G(k+1) = Gk.  (iii) If {Gk, E(k+1)} does not prove A, then G(k+1) = {Gk, E(k+1)}
 * (c)Define G* as the union of all the Gn. (That is, G* is the set of all the sentences that are in any Gn).
 * (d) It can be easily shown that (i) G* contains (is a superset of) G (by (b.i)); (ii) G* does not prove A (because if it proves A then some sentence was added to some Gn which caused it to prove A; but this was ruled out by definition); and (iii) G* is a "Maximal Set" (with respect to A): If any more sentences whatever were added to G*, it would prove A. (Because if it were possible to add any more sentences, they should have been added when they were encountered during the construction of the Gn, again by definition)
 * III. If G* is a Maximal Set (wrt A), then it is "truth-like".  This means that it contains the sentence "C" only if it does not contain the sentence not-C; If it contains "C" and contains "If C then B" then it also contains "B"; and so forth.
 * IV. If G* is truth-like there is a "G*-Canonical" valuation of the language: one that makes every sentence in G* true and everything outside G* false while still obeying the laws of semantic composition in the language.
 * V. A G*-canonical valuation will make our original set G all true, and make A false.
 * VI. If there is a valuation on which G are true and A is false, then G does not (semantically) imply A.

QED

Another outline for a completeness proof
If a formula is a tautology, then there is a truth table for it which shows that each valuation yields the value true for the formula. Consider such a valuation. By mathematical induction on the length of the subformulas, show that the truth or falsity of the subformula follows from the truth or falsity (as appropriate for the valuation) of each propositional variable in the subformula. Then combine the lines of the truth table together two at a time by using "(P is true implies S) implies ((P is false implies S) implies S)". Keep repeating this until all dependencies on propositional variables have been eliminated. The result is that we have proved the given tautology. Since every tautology is provable, the logic is complete.

Alternative calculus
It is possible to define another version of propositional calculus, which defines most of the syntax of the logical operators by means of axioms, and which uses only one inference rule.

Axioms
Let &#966;, &#967; and &#968; stand for well-formed formulas. (The wff's themselves would not contain any Greek letters, but only capital Roman letters, connective operators, and parentheses.) Then the axioms are as follows:

Axiom THEN-2 may be considered to be a "distributive property of implication with respect to implication." Axioms AND-1 and AND-2 correspond to "conjunction elimination". The relation between AND-1 and AND-2 reflects the commutativity of the conjunction operator.

Axiom AND-3 corresponds to "conjunction introduction."

Axioms OR-1 and OR-2 correspond to "disjunction introduction." The relation between OR-1 and OR-2 reflects the commutativity of the disjunction operator.

Axiom NOT-1 corresponds to "reductio ad absurdum."

Axiom NOT-2 says that "anything can be deduced from a contradiction."

Axiom NOT-3 is called "tertium non datur" (Latin: "a third is not given") and reflects the semantic valuation of propositional formulae: a formula can have a truth-value of either true or false. There is no third truth-value, at least not in classical logic. Intuitionistic logicians do not accept the axiom NOT-3.

Inference rule
The inference rule is modus ponens:
 * $$ \phi, \ \phi \rightarrow \chi \vdash \chi $$.

Meta-inference rule
Let a demonstration be represented by a sequence, with hypotheses to the left of the turnstile and the conclusion to the right of the turnstile. Then the deduction theorem can be stated as follows:
 * If the sequence
 * $$ \phi_1, \ \phi_2, \ ..., \ \phi_n, \ \chi \vdash \psi $$
 * has been demonstrated, then it is also possible to demonstrate the sequence
 * $$ \phi_1, \ \phi_2, \ ..., \ \phi_n \vdash \chi \rightarrow \psi $$.

This deduction theorem (DT) is not itself formulated with propositional calculus: it is not a theorem of propositional calculus, but a theorem about propositional calculus. In this sense, it is a meta-theorem, comparable to theorems about the soundness or completeness of propositional calculus.

On the other hand, DT is so useful for simplifying the syntactical proof process that it can be considered and used as another inference rule, accompanying modus ponens. In this sense, DT corresponds to the natural conditional proof inference rule which is part of the first version of propositional calculus introduced in this article.

The converse of DT is also valid:
 * If the sequence
 * $$ \phi_1, \ \phi_2, \ ..., \ \phi_n \vdash \chi \rightarrow \psi $$
 * has been demonstrated, then it is also possible to demonstrate the sequence
 * $$ \phi_1, \ \phi_2, \ ..., \ \phi_n, \ \chi \vdash \psi $$

in fact, the validity of the converse of DT is almost trivial compared to that of DT:
 * If
 * $$ \phi_1, \ ..., \ \phi_n \vdash \chi \rightarrow \psi $$
 * then
 * 1: $$ \phi_1, \ ..., \ \phi_n, \ \chi \vdash \chi \rightarrow \psi $$
 * 2: $$ \phi_1, \ ..., \ \phi_n, \ \chi \vdash \chi $$
 * and from (1) and (2) can be deduced
 * 3: $$ \phi_1, \ ..., \ \phi_n, \ \chi \vdash \psi $$
 * by means of modus ponens, Q.E.D.

The converse of DT has powerful implications: it can be used to convert an axiom into an inference rule. For example, the axiom AND-1,
 * $$ \vdash \phi \wedge \chi \rightarrow \phi $$

can be transformed by means of the converse of the deduction theorem into the inference rule
 * $$ \phi \wedge \chi \vdash \phi $$

which is conjunction elimination, one of the ten inference rules used in the first version (in this article) of the propositional calculus.

Example of a proof
The following is an example of a (syntactical) demonstration, involving only axioms THEN-1 and THEN-2: Prove: A &#8594; A (Reflexivity of implication). Proof:
 * 1. (A &#8594; ((B &#8594; A) &#8594; A)) &#8594; ((A &#8594; (B &#8594; A)) &#8594; (A &#8594; A))
 * Axiom THEN-2 with &#966; = A, &#967; = B &#8594; A, &#968; = A
 * 2. A &#8594; ((B &#8594; A) &#8594; A)
 * Axiom THEN-1 with &#966; = A, &#967; = B &#8594; A
 * 3. (A &#8594; (B &#8594; A)) &#8594; (A &#8594; A)
 * From (1) and (2) by modus ponens.
 * 4. A &#8594; (B &#8594; A)
 * Axiom THEN-1 with &#966; = A, &#967; = B
 * 5. A &#8594; A
 * From (3) and (4) by modus ponens.

Graphical calculi
It is possible to generalize the definition of a formal language from a set of finite sequences over a finite basis to include many other sets of mathematical structures, so long as they are built up by finitary means from finite materials. What's more, many of these families of formal structures are especially well-suited for use in logic.

For example, there are many families of graphs that are close enough analogues of formal languages that the concept of a calculus is quite easily and naturally extended to them. Indeed, many species of graphs arise as parse graphs in the syntactic analysis of the corresponding families of text stuctures. The exigencies of practical computation on formal languages frequently demand that text strings be converted into pointer structure renditions of parse graphs, simply as a matter of checking whether strings are wffs or not. Once this is done, there are many advantages to be gained from developing the graphical analogue of the calculus on strings. The mapping from strings to parse graphs is called parsing and the inverse mapping from parse graphs to strings is achieved by an operation that is called traversing the graph.

Other logical calculi
Propositional calculus is about the simplest kind of logical calculus in any current use. (Aristotelian "syllogistic" calculus, which is largely supplanted in modern logic, is in some ways simpler — but in other ways more complex — than propositional calculus.) It can be extended in several ways.

The most immediate way to develop a more complex logical calculus is to introduce rules that are sensitive to more fine-grained details of the sentences being used. When the "atomic sentences" of propositional logic are broken up into terms, variables, predicates, and quantifiers, they yield first-order logic, or first-order predicate logic, which keeps all the rules of propositional logic and adds some new ones. (For example, from "All dogs are mammals" we may infer "If Rover is a dog then Rover is a mammal.)

With the tools of first-order logic it is possible to formulate a number of theories, either with explicit axioms or by rules of inference, that can themselves be treated as logical calculi. Arithmetic is the best known of these; others include set theory and mereology.

Modal logic also offers a variety of inferences that cannot be captured in propositional calculus. For example, from "Necessarily p" we may infer that p. From p we may infer "It is possible that p".

Many-valued logics are those allowing sentences to have values other than true and false. (For example, neither and both are standard "extra values"; "continuum logic" allows each sentence to have any of an infinite number of "degrees of truth" between true and false.) These logics often require calculational devices quite distinct from propositional calculus.

Logical levels

 * Zeroth order logic
 * First order logic
 * Second order logic
 * Higher order logic

Related works

 * Hofstadter, D.R., Gödel, Escher, Bach

Document history
Portions of the above article were adapted from the following sources under the GNU Free Documentation License, under other applicable licenses, or by permission of the copyright holders.


 * Propositional calculus, Centiare.


 * Propositional calculus, GetWiki.


 * Propositional calculus, Wikinfo.


 * Propositional calculus, Wikipedia.