1

Suppose that the language $\mathcal{L}$ consists of two constant symbols, $\Diamond$ and $\heartsuit$, a unary relation symbol $\yen$, a binary function symbol $\flat$, and a $3$-ary function $\#$. Write down at least three distinct terms of the language $\mathcal{L}$. Write down a couple of nonterms that look like they might be terms and explain why they are not terms. Write a couple of formulas and a couple of nonformulas that look like they ought to be formulas.
(From $1.3.1$ Exercises $1.$ in A Friendly Introduction to Mathematical Logic)


My attempts:

  • Some terms of the language $\mathcal{L}$
  1. $\Diamond$
  2. $\heartsuit$
  3. $\yen\Diamond$
  • Looks like might be term but not term, and explaination
  1. $\flat\Diamond\heartsuit$

Explaination: Since $\flat$ is a binary function symbol, with two inputs of constant symbols looks just perfectly fine. However, one could argue that this is a string of function $\flat$ taking only one input of $\Diamond$ and follows with a constant symbol $\heartsuit$, which is not a term in $\mathcal{L}$. As this string don't have unique readability.

Similar argument could also apply to $\yen\Diamond$, so I'm not sure about this.

  • Some formulas of the language $\mathcal{L}$
  1. $=\Diamond\heartsuit$
  2. $\lnot(=\Diamond\heartsuit)$
  3. $=\Diamond\heartsuit\lor\lnot(=\Diamond\heartsuit)$
  • Looks like might be formula but not formula, and explaination
  1. $=\Diamond\yen\Diamond$

Explaination: If we read this as $=\Diamond(\yen\Diamond)$, it's a formula. However, $=(\Diamond\yen)\Diamond$ is not.


Other doubts

  1. What's the domain and codomain of $\yen,\flat,\#$, for $\yen$ is it the union of constant symbols and variables i.e. in this case $\{\Diamond,\heartsuit\}$; and $\flat:\{\Diamond,\heartsuit\}^2\to\{\Diamond,\heartsuit\}^2,\#:\{\Diamond,\heartsuit\}^3\to\{\Diamond,\heartsuit\}^3$?

  2. If $x$ is a term/formula, then $(x)$ is also a term/formula ?

  • Why in the world would you use this notation? Presumably unintentionally, you're making it as hard as possible for someone with something useful to say to type his/her reply. – David C. Ullrich Sep 13 '20 at 22:40
  • 5
    @DavidC.Ullrich It seems the book uses that notation - if so, it's definitely not the OP's fault! – Noah Schweber Sep 13 '20 at 22:43
  • @NoahSchweber Why is it a good thing to reproduce the book's notation here? – David C. Ullrich Sep 13 '20 at 22:44
  • 5
    @DavidC.Ullrich I don't think it's good, but I think it is value-neutral. Especially because if the book uses that notation, how should the OP be expected to intuit that it's generally hard to read? If that's the text they're learning from, it's quite reasonable for them to assume that's how it's always supposed to be written. – Noah Schweber Sep 13 '20 at 22:46
  • @NoahSchweber Perhaps. But in fact hard to read is not my complaint; my problem is that it's hard to TeX. The OP didn't have to inuit that, the OP noticed that they had to look up the TeX codes... – David C. Ullrich Sep 13 '20 at 22:48
  • @NoahSchweber Otoh I do agree that "assume that's how it's done" is a reasonable objection to my objection. – David C. Ullrich Sep 13 '20 at 22:50

1 Answers1

2

First, note that "$\yen$" is a relation symbol, not a function. So e.g. "$\yen\Diamond$" is not a term, but rather a formula. Similarly, "$=\Diamond\yen\Diamond$" is not a formula, but something like "$=\Diamond\flat\Diamond\Diamond$" would be (the point being that "$\flat\Diamond\Diamond$" is actually a term, unlike "$\yen\Diamond$").


More seriously, you seem to be misconstruing unique readability. An expression like "$\flat\Diamond\heartsuit$" is uniquely readable: when we say a string is uniquely readable we just mean that there is exactly one way to parse it as a grammatically correct expression. The fact that there are other ways to parse it which don't follow the rules isn't relevant: yes, sticking parentheses in "$\flat\Diamond\Diamond$" to form "$(\flat\Diamond)\Diamond$" is one way of inserting parentheses which is different from "$\flat(\Diamond\Diamond)$," but since it doesn't follow the basic rules we don't care. To see an example of a non-uniquely-readable string we need to turn to infix notation: does "$a+ b- c$" mean "$(a+ b)- c$" or "$a+ (b- c)$?" We either need an additional parsing rule (e.g. PEMDAS in this case) or some explicit parentheses in order to give the expression "$a+b-c$" a unique meaningful interpretation.

(This is one advantage of using Polish notation throughout: if everything is in Polish notation, we don't need parentheses or conventions to get unique readability. However, in practice Polish notation is generally harder to read than infix notation, so we usually just use infix notation with parentheses to keep everything nice and clear.)

To summarize:

  • Contra your claims, "$\yen\Diamond$" is not a term and "$\flat\Diamond\heartsuit$" is a term. Meanwhile you are correct that "$=\Diamond\yen\Diamond$" is not a formula, but your justification is incorrect.

As to your other doubts:

  • It doesn't really make sense to talk about the domain/codomain of a function/relation symbol $\sigma$; only actual functions/relations have domains/codomains. The symbol $\sigma$ is just a tool for transforming (tuples of) terms into terms or transforming (tuples of) terms into formulas, depending on whether $\sigma$ is a function or relation symbol.$^1$

  • Your book should have precise rules about what is and what is not a term. Remember that the definition of "term" (and "formula," and many other things in this context) is inductive: it gives a few rules we can use to form terms and then says that nothing that isn't explicitly required to be a term by those rules is a term. (See here for more on this.)

    • That said, I've never seen a system according to which "$(x)$" is a term, so I'll bet all the money in my pockets that the answer is no.

$^1$OK, fine: if we want we can say that there is a genuine function $A_\sigma$ corresponding to any function or relation symbol $\sigma$, namely the function which takes in appropriate tuples of terms and spits out the corresponding term or formula build from those inputs by $\sigma$. For example:

  • $A_\yen$ is the function sending a term $t$ to the formula "$\yen t$."

  • $A_\Diamond$ is the nullary function symbol outputting the term "$\Diamond$." (I'm taking the approach here that a constant symbol is really just a nullary function symbol; this often makes things a bit cleaner by having only two types of symbol to consider. It's a good exercise to convince yourself that $(i)$ nullary relation symbols make perfect sense, even if we don't allow them in a given presentation of first-order logic, but $(ii)$ they're pretty stupid.)

  • $A_\flat$ is the binary function taking in a pair of terms $(t_1,t_2)$ and outputting the term "$\flat t_1t_2$."

As such, the domain of $A_\sigma$ for $\sigma$ an $n$-ary function or relation symbol is $\mathsf{Term}^n$, where $\mathsf{Term}$ is the set of all terms in our language, and the codomain is $\mathsf{Term}$ or $\mathsf{Form}$ (the latter being the set of all formulas in our language) depending on whether $\sigma$ is a function or relation symbol. For introductory logic this line of thought is rather silly, but it becomes serious down the road (e.g. in algebraic logic).

It should be noted that the notation I've used in this footnote is not standard, it's just me making things up. As far as I know there is no standard notation for this, and indeed - as mathematicians are wont to do - an abuse of notation is often employed here in conflating $\sigma$ and $A_\sigma$ once the basics have been established.

Noah Schweber
  • 245,398