0

If I have this

$$(\lambda xy.xy)\; 1 \; 2$$

does this beta reduce to ($1 \; 2$) or is multiplication finally implied ($1 \cdot 2$), i.e., $2$ -- the former being just $1$ then $2$ beside it, not interacting?

147pm
  • 920

1 Answers1

1

There is no multiplication here, since $1, 2$ are just letters. So yes it reducts to the word $"12"$. Don't write the braces (they are just here for convenience to help us humans parse what we read but can be omited) , they vanish upon $\lambda$-reduction.

$$\begin{array}{ccccc} (\lambda xy.xy)\; 1 \; 2 & := & \big(\lambda x.(\lambda y.xy) \big)\;1 \; 2 & \longrightarrow & (\lambda y.1y) \; 2 & \longrightarrow & 12 & \end{array}$$

Olivier Roche
  • 5,319
  • 9
  • 16
  • 1
    Bottom line: $\lambda xy.xy$ is not implying multiplication with the $xy$ part, correct? But of course you don't mean the "word" 12, i.e., "twelve", just "12", i.e., the "word" for a 1 then a 2, or "1 2", space between 1 and 2. – 147pm Dec 08 '21 at 22:43
  • 1
    @147pm there is no space character inside the scope of "$\lambda xy.xy$" so no space in the end. End result is the word "12", how YOU read that word depends on you. :-) – Olivier Roche Dec 08 '21 at 22:56
  • Couldn't it be that in the OP's context, 1 and 2 are implicitly considered to be Church numerals? In that case, applying 1 to 2 would give 2. (In general, applying the Church numeral for $m$ to the Church numeral for $n$ gives the Church numeral for $n^m$.) – Daniel Schepler Dec 08 '21 at 23:23
  • @DanielSchepler No, Church numerals are written bold by convention, as in $\mathbf{0}, \mathbf{1}, \dots$. – Olivier Roche Dec 08 '21 at 23:33
  • 1
    Please don't use the word "characters", which is very misleading. What you want to say is that "1" and "2" are just terms in the language of λ-calculus, and do not have any stipulated meaning. The problem with using the word "characters" is that we often have encodings of λ-calculus (e.g. into programming languages) where each function name could have multiple characters! – user21820 Jun 04 '22 at 14:52