4

In the untyped lambda calculus, one of the first encountered expressions is:

$F = Const(I) = \lambda x.\lambda y.y$

It is easily seen that a property of this expression is that the set of possible evaluation "results" - the normal / non-reducible forms belonging to the equivalence classes under beta reduction of $Fz$ for arbitrary $z$ - is finite and consists of a single element $I = \lambda y.y$. In this simple case every equivalence class (just one!) has a normal form, ie. evaluation of every $Fz$ terminates, every $Fz => I$.

Is there an expression $G$ for which the set of possible results of evaluation of the $Gz$, with unrestricted $z$, is finite, non-empty, and contains at least two elements? Can it be proven that this expression does not exist?

BadZen
  • 201
  • Have you ever heard of confluence or the Church-Rosser theorem, which implies the uniqueness of normal forms? – Taroccoesbrocco Dec 17 '23 at 05:25
  • Just thinking, can we build a lambda term that gives true whenever it gets some x, but false otherwise? Then we can feed it x to get 1 term, and all others will give something else – Soham Saha Dec 17 '23 at 05:26
  • 1
    @Taroccoesbrocco, Church Rosser only holds if the starting term is same ,but here z is unrestricted right? – Soham Saha Dec 17 '23 at 05:27
  • Church-Rosser: each of my "equivalence classes" contains at most one normal form. I'm asking for the set of all such normal forms over all classes, ie. "evaluating the function completely where it possible to do so for every argument z in the universe and gathering up all the answers." – BadZen Dec 17 '23 at 06:03
  • 1
    @SohamSaha - The problem is that the only way we have to "look inside" of an arbitrary lambda expression is to apply it to some argument. So, to compare values for equivalence, some restrictions / type assertion is necessary! So it is known that there is no way to "build a lambda term that gives true whenever it gets some x, but false otherwise", for an arbitrary argument. (consequence of Scott-Curry theorem). It almost seems like this line of inquiry and the general undecidability result should be enough to answer the question negatively, but I cannot make a proof - so far... – BadZen Dec 17 '23 at 06:08
  • Can you prove this part: ‘ So it is known that there is no way to "build a lambda term that gives true whenever it gets some x, but false otherwise", for an arbitrary argument.’? – Soham Saha Dec 17 '23 at 06:13
  • Am I right in thinking that your G acts as a segregator, separating two or more types of statements into multiple groups? And the type is based on some overarching similarity in between same-classed terms? – Soham Saha Dec 17 '23 at 06:17

1 Answers1

0

EDIT: As discussed in the comments following this answer, there is a problem in the proof.

I have been literally reading about lambda calculus for two-three months, so please help me correct any mistakes.

I am targeting at the case where the ultimate result set has 2 terms.

Now let $z_1$ and $z_2$ be two terms such that $Gz_1$ is not equivalent to $Gz_2$. Now take $A$ and $B$ as the beta-closed sets that contain $z_1$ and $z_2$ respectively.

Now using the Scott Curry theorem, $A$ and $B$ should be recursively inseparable. But we can use the $G$ function to separate them, which is a contradiction.

We can extend this to higher sized result sets too, I think.

Is my logic reasonable?

Soham Saha
  • 1,204
  • How would you use $G$ (an expression of the lambda calculus) to separate $A$ and $B$ (ie. realize or define a recursive function that determines if a given $Gz$ with $z \in A \cup B$ is in $A$ or $B$)? Usually applying Scott-Curry involves invoking a recursion theorem or internal model of the calculus... But I'm not asking for a procedure for placing a given $z$ in one of those sets - or implying one exists - I'm only asking for a $G$ such that $A \cup B$ (or other finite disjoint collection) covers the universe. – BadZen Dec 17 '23 at 07:46
  • To put a point on it, if I drop the requirement that the collection of sets be finite, I can just take $G$ to be the identity $\lambda x. x$, right? No undecidability theorems have been offended in doing so! – BadZen Dec 17 '23 at 07:50
  • I don’t think I am knowledgeable about the topic enough to reply. Should I delete my answer? as I believe that as per your comment my proof is incorrect – Soham Saha Dec 17 '23 at 07:54
  • I appreciate your thinking about the question! No need to delete. (This stuff is new to me too...) – BadZen Dec 17 '23 at 07:57