|
|
Introduction to Logic
|
Tools for Thought
|
|
Pseudo English is a formal language that is intended to approximate the syntax of the English language. One way to define the syntax of Pseudo English is to write grammatical rules in Backus Naur Form (BNF). The rules shown below illustrate this approach for a small subset of Pseudo English. A sentence is a noun phrase followed by a verb phrase. A noun phrase is either a noun or two nouns separated by the word and. A verb phrase is a verb followed by a noun phrase. A noun is either the word Mary or the word Pat or the word Quincy. A verb is either like or likes.
<sentence> ::= <np> <vp> |
<np> ::= <noun> |
<np> ::= <noun> "and" <noun> |
<vp> ::= <verb> <np> |
<noun> ::= "mary" | "pat" | "quincy" |
<verb> ::= "like" | "likes" |
|
Alternatively, we can use Herbrand Logic to formalize the syntax of Pseudo English. The sentences shown below express the grammar described in the BNF rules above. (We have dropped the universal quantifiers here to make the rules a little more readable.) Here, we are using the append relation defined in the section of lists.
np(x) ∧ vp(y) ∧ append(x,y,z) ⇒ sentence(z) |
noun(x) ⇒ np(x) |
noun(x) ∧ noun(y) ∧ append(x,and,z) ∧ append(z,y,w) ⇒ np(w) |
verb(x) ∧ np(y) ∧ append(x,y,z) ⇒ vp(z) |
noun(mary) |
noun(pat) |
noun(quincy) |
verb(like) |
verb(likes) |
|
Using these sentences, we can test whether a given sequence of words is a syntactically legal sentence in Pseudo English and we can use our logical entailment procedures to enumerate syntactically legal sentences, like those shown below.
mary likes pat |
pat and quincy like mary |
mary likes pat and quincy |
|
One weakness of our BNF and the corresponding axiomatization is that there is no concern for agreement in number between subjects and verbs. Hence, with these rules, we can get the following expressions, which in Natural English are ungrammatical.
× mary like pat |
× pat and quincy likes mary |
|
Fortunately, we can fix this problem by elaborating our rules just a bit. In particular, we add an argument to some of our relations to indicate whether the expression is singular or plural. Here, 0 means singular, and 1 means plural. We then use this to block sequences of words where the numbers do not agree.
np(x,w) ∧ vp(y,w) ∧ append(x,y,z) ⇒ sentence(z) |
noun(x) ⇒ np(x,0) |
noun(x) ∧ noun(y) ∧ append(x,and,z) ∧ append(z,y,w) ⇒ np(w,1) |
verb(x,w) ∧ np(y,v) ∧ append(x,y,z) ⇒ vp(z,w) |
noun(mary) |
noun(pat) |
noun(quincy) |
verb(like,1) |
verb(likes,0) |
|
With these rules, the syntactically correct sentences shown above are still guaranteed to be sentences, but the ungrammatical sequences are blocked. Other grammatical features can be formalized in similar fashion, e.g. gender agreement in pronouns (he versus she), possessive adjectives (his versus her), reflexives (like himself and herself), and so forth.
|
Use the arrow keys to navigate.
Press the escape key to toggle all / one.
|
|