# Definition:Language of Propositional Logic/Formal Grammar/Bottom-Up Specification

Jump to navigation
Jump to search

## Definition

Part of specifying the language of propositional logic is to provide its formal grammar.

The following rules of formation constitute a bottom-up grammar for the formation of well-formed formulas (WFFs) of the language of propositional logic $\LL_0$.

- Let $\PP_0$ be the vocabulary of $\LL_0$.
- Let $\mathrm {Op} = \set {\land, \lor, \implies, \iff}$.

The rules are:

$\mathbf W: \text {TF}$ | $:$ | $\top$ is a WFF, and $\bot$ is a WFF. | |

$\mathbf W: \PP_0$ | $:$ | If $p \in \PP_0$, then $p$ is a WFF. | |

$\mathbf W: \neg$ | $:$ | If $\mathbf A$ is a WFF, then $\neg \mathbf A$ is a WFF. | |

$\mathbf W: \text {Op}$ | $:$ | If $\mathbf A$ is a WFF and $\mathbf B$ is a WFF and $\circ \in \mathrm {Op}$, then $\paren {\mathbf A \circ \mathbf B}$ is a WFF. |

This page has been identified as a candidate for refactoring of basic complexity.In particular: Implement the above using the `{{Axiom}}` templateUntil this has been finished, please leave
`{{Refactor}}` in the code.
Because of the underlying complexity of the work needed, it is recommended that you do not embark on a refactoring task until you have become familiar with the structural nature of pages of $\mathsf{Pr} \infty \mathsf{fWiki}$.To discuss this page in more detail, feel free to use the talk page.When this work has been completed, you may remove this instance of `{{Refactor}}` from the code. |

Any string which can not be created by means of the above rules is not a WFF.

## Examples

### Example 1

The following is a WFF of propositional logic:

- $\paren {\paren {p \land q} \implies \paren {\lnot \paren {q \lor r} } }$

## Sources

- 1964: Donald Kalish and Richard Montague:
*Logic: Techniques of Formal Reasoning*... (previous) ... (next): $\text{I}$: 'NOT' and 'IF': $\S 1$ - 1965: E.J. Lemmon:
*Beginning Logic*... (previous) ... (next): Chapter $2$: The Propositional Calculus $2$: $1$ Formation Rules - 1988: Alan G. Hamilton:
*Logic for Mathematicians*(2nd ed.) ... (previous) ... (next): $\S 1$: Informal statement calculus: $\S 1.2$: Truth functions and truth tables: Definition $1.2$ - 1996: H. Jerome Keisler and Joel Robbin:
*Mathematical Logic and Computability*... (previous) ... (next): $\S 1.2$: Syntax of Propositional Logic: Definition $1.2.1$ - 2000: Michael R.A. Huth and Mark D. Ryan:
*Logic in Computer Science: Modelling and reasoning about systems*... (previous) ... (next): $\S 1.3$: Propositional logic as a formal language: Definition $1.27$