Skip main navigation

A grammar or syntax for our formal language

In this article, we define a grammar for our formal language: a set of rules which says which sequences of expressions are grammatical
A soccer referee making a ruling
© University of York

We can rule out structural ambiguity in our formal language by giving it a grammar (or syntax) which fixes which sequences of expressions are sentences, and ensuring that each sentence permitted by that grammar has one clear set of truth-conditions. Let’s see how this works.

Note that we’re using ‘grammar’ in a special sense here. What we’re talking about is a grammar: a set of rules.

Here’s a grammar for our formal language as it is so far. The grammar has two parts: a specification of the symbols or expressions of the language; and a set of rules which says which sequences of those expressions are sentences of the language.

Symbols:

  • (S1) Statement or Sentence Letters: ‘A’, ‘B’, ‘C’, etc.
  • (S2) Connectives: ‘&’ and ‘~’
  • (S3) Punctuation marks: ‘(’ and ‘)’

Rules:

  • (R1) Statement (or sentence) letters are well-formed formulae (wffs)
  • (R2) If ‘α’ is a wff, then ‘~α’ is a wff
  • (R3) If ‘α’ and ‘β’ are wffs, then ‘(α & β)’ is a wff

  • (R6) Anything that is not ruled a wff by the other rules is not a wff
  • (R7) All and only wffs which are not sentential clauses in a longer wff are sentences

(You’ll notice there’s a gap in our numbering. This is so we can add some more rules for further sentence connectives later.)

Let’s look at some examples of how we can build up sentences using this grammar. (As we work, you’ll see how the punctuation marks ‘(’ and ‘)’ work to show exactly and unambiguously how sentences are built up from sentential clauses.)

First example: Start with a single sentence-letter, ‘A’. R1 says this is a wff. So, using R2, we can add tilde and get another wff ‘~A’. R7 says this is a sentence.

Second example: Start with two sentence letters, ‘A’ and ‘B’. R1 says these are wffs. So, using R3, we can put these either side of an ampersand and enclose the result in brackets and we get another wff ‘(A & B)’. R7 says this is a sentence.

But now notice something about the rules R2 and R3. They effectively say you can take any wffs and build them into a sentence in the way described. It’s not just sentence letters that these rules apply to.

So, suppose we take another sentence letter, ‘C’. R1 says this is a wff. But now, notice that we’ve already established that ‘~A’ is a wff (first example). So we could take ‘C’ and ‘~A’ and apply R3, and we’ll see that ‘(C & ~A)’ is a wff. And R7 says this is a sentence.

Similarly, we could take ‘(A & B)’ (established as a wff in our second example) and ‘C’ and make ‘((A & B) & C)’.

This means that these rules are what is called ‘recursive’: we can keep feeding back the products of the rules into the rules to create progressively more complex sentences.

© University of York
This article is from the free online

Logic: The Language of Truth

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now