1

In the classic book, Introduction to Metamathematics by Steven Kleene, Lemma 2 of Section 7 (chapter 2), seems to me to be false. I am wondering if I am missing something. Here is the context:

The following definitions are used:

Proper pairing - one-to-one pairing between n left parentheses "(" and n right parentheses ")" such that for each pair left parenthesis is on the left from the right parenthesis and if no two pairs separate each other.

Pairs of parentheses that separate each other - two pairs separate each other if they occur in the order $(_i(_j)_i)_j$ (ignoring everything else).

Then Kleene gives Lemma 1, stated below, which I agree with and find easy to prove using strong induction. Note that the lemma states "an" innermost pair, not "precisely one" innermost pair.

Lemma 1: A proper pairing of $2n$ parentheses ($n>0$ and $n$ is a natural number) contains an innermost pair, i.e. a pair which includes no other of the parentheses between them.

Then Kleene gives Lemma 2 as follows, which I disagree with.

Lemma 2: A set of $2n$ parentheses admits at most one proper pairing.

Kleene gives the following explanation: "Prove by a (simple) induction on $n$. (HINT: Under the induction step by Lemma 1 the given parentheses contain an innermost pair. Withdrawing this, the hypothesis of the induction applies to the set of the parentheses remaining."

I have a problem with this. Why? Consider $(^1_1(^2_2)^3_2)^4_1$ and $(^1_1)^2_1(^3_2)^4_2$. Each of these examples contains $2n$ parentheses, is a proper pairing, but are not the same pairing. The last sentence of Kleene's explanation does not hold because, just because the an innermost pair is removed, you can include a set of parentheses around the outside or concatenated with the current pair.

Am I missing something?

Axel
  • 31

1 Answers1

3

Your example does not support your objection, since $(())$ and $()()$ are not the same string of parentheses. They are different sets, and each of them does in fact admit a single proper pairing, illustrated by the colors here: $\color{red}(\color{blue}(\color{blue})\color{red})$, and $\color{red}(\color{red})\color{blue}(\color{blue})$. Moreover, for each of them it is true that if we remove an innermost pair, what is left is a single pair that has a unique proper pairing: there is only one innermost pair in $(())$, and there are two innermost pairs in $()()$, but removing any of these innermost pairs leaves the properly paired string $()$.

Brian M. Scott
  • 631,399
  • 1
    Thank you @Brian! I didn't understand the definition of "set of parentheses" in this case. I now see that given n pairs (aka left / right pairs) of parentheses, the order in which they occur matters in order to constitute "the same set." So (()) can have 2 different meanings, although it won't if it's a proper pairing, as you noted and the lemma proves. So proper pairs, (()) and ()(), are "different sets" as you said, so do not apply to the hypothesis of the lemma. – Axel Jul 23 '20 at 01:52
  • 2
    @Axel: You’re welcome! Yes, I thought that that was where the confusion had probably arisen. – Brian M. Scott Jul 23 '20 at 02:00
  • @BrianM.Scott I am having the same confusion as the OP.

    Could you explain again, please, perhaps in more detail? I am interpreting “set of parentheses” as a placement of parentheses in a formula. Is the Lemma merely trying to convey that left and right parentheses cannot be exchanged (with the pairing remaining proper)?

    – Cyrus May 31 '22 at 08:12
  • 1
    @Cyrus: By ‘a set of $2n$ parentheses’ Kleene actually means a string of $2n$ parentheses; (()) and ()() are different strings, so in his terms they count as different sets, and each of them admits exactly one proper pairing, the one that I illustrated with colors in my answer. The lemma says that if you write down any string consisting of an even number of parentheses, either there will be exactly one way to match up the left and right parentheses in a proper pairing, or there wil be no way to do so. Obviously there will be no way if you have different numbers of left and right ... – Brian M. Scott May 31 '22 at 18:25
  • ... parentheses, but it can happen even if you have the same number of left and right parentheses: )()( has no proper pairing. – Brian M. Scott May 31 '22 at 18:26
  • @BrianM.Scott Thank you very much for the clarification. In that case, this Lemma more or less serves to show that our definition of proper pair always corresponds to one distinguished permutation of a set of 2n parenthesis, for every n, if I’m not mistaken? – Cyrus Jun 01 '22 at 00:45
  • @Cyrus: It says that each possible sequence of an even number of parentheses has either exactly one perfect pairing or none at all. For each $n>1$ there is more than one sequence of $2n$ parentheses having a proper pairing: for $n=2$ there are $2$, for $n=3$ there are five — ((())), (())(), ()(()), (()()), and ()()() — for $n=4$ there are $14$, and in general there are $C_n$ sequences that admit a proper pairing, where $C_n$ is the $n$-th Catalan number. – Brian M. Scott Jun 01 '22 at 01:55
  • Bearing in mind that this is a beginner's text, I think that the proof sketch of lemma 2 is poorly written. I think it should say (something like) "If the set has no proper pairing, then clearly the condition is satisfied. Assume then that the set of parentheses has at least one proper pairing." If you don't make such an assumption, you can't invoke lemma 1, and I think that, at this level of pedagogy, the assumption needs to be explicitly stated by the author. So I think difficulties with this matter are partly the fault of the author. – Paul Epstein May 25 '24 at 07:41
  • @PaulEpstein: The OP’s difficulty, however, had a completely different source, namely, Kleene’s (mis)use of the word set. Never having seen the book or any of its other hints, I have no opinion on whether this hint is written at an appropriate level; I certainly would not dismiss the possibility, however. – Brian M. Scott May 25 '24 at 08:04
  • @BrianM.Scott Agreed that the OP's point is very separate from mine. However, even unrelated difficulties can lead to cognitive overload. It isn't a particularly well-written book compared to its successors. It's a historic text, I think, but successors improved. For the pairing lemma, it isn't a good idea to consult Kleene in the first place. BTW, which possibility would you not dismiss? – Paul Epstein May 25 '24 at 12:06
  • @PaulEpstein: The possibility that the hint is at about the right level for the book: if I use a book as a textbook, I can always strengthen a hint, but I can’t weaken it. (Not that I’ have to worry about that these days, since I retired 13 years ago.) And in truth the issue wouldn’t come up for me anyway save in a setting like MSE, since in set theory and logic I simply would not use a book that old in the first place or recommend it for self-study (unless nothing else were available). – Brian M. Scott May 26 '24 at 07:42