3.5.7 An Afterthought on Alpha-Conversion

Why -conversion need not be treated explicitely in this approach.

One thing that apparently still needs to be done is to implement -conversion. Recall from Section 3.4.8 that -conversion can prevent accidental variable bindings in the course of -reduction by renaming variables.

In principle, things can go wrong...

Now, as we have a module for -reduction at our disposal, let's first practically see whether things can in fact go wrong because we choose inadequate variable names. Below, you will find the final -reduction step of the semantics construction for ``Every woman loves a siamese cat''. Here are the translations of the two (sub-)phrases where the variables have been named the same:

``Every woman''

lambda(X,forall(Y,woman(Y)>(X@Y)))

``loves a siamese cat''

lambda(X,exists(Y,siamesecat(Y)& love(X,Y)))

If we form an application out of these two expressions and -reduce it, we get this:

?- betaConvert(lambda(X,forall(Y,woman(Y)>(X@Y)))@lambda(X,exists(Y,siamesecat(Y)& love(X,Y))),R).
 
R = forall(Y,woman(Y)>exists(Y,siamesecat(Y)& love(Y,Y)))

We've already seen that problem in Section 3.4.8: The formula does not represent the meaning we intended. It rather says something like ``There is a self-loving siamese cat for every woman.''

So, do we run into trouble with our approach if we don't use -conversion?

...but not in our implementation!

No, we don't! The representations in the example above were hand-written. In our implementation, all representations coming from the lexicon contain new and fresh PROLOG variables. If you look at the lexical entries again, you can see that it is not possible to build any two representations using the same variable names. Check what representations our approach generates for ``Every woman'' and ``loves a siamese cat'': np(NP,[every,woman],[]),vp(VP,[loves,a,siamese,cat],[]). (We conjoin the queries in order to execute them in one go). Are there any shared variables between the two phrases?

Prolog Variables

Once again: Using Prolog variables for first-order variables during semantic construction violates our convention - strictly speaking. But now we can see what we gain breaking that rule: We always automatically get brand new variables with every lexical lookup, without ever having to generate or compare them. Thus we need never bother with -conversion - and all for free. Well, almost for free. If we want to work with our formulas afterwards, we have to convert them into our standard format. In the next Section you will see that this is easily done by one small helper predicate.

Project

In Exercise 3.5 you are asked to implement -conversion.


Aljoscha Burchardt, Stephan Walter, Alexander Koller, Michael Kohlhase, Patrick Blackburn and Johan Bos
Version 1.2.5 (20030212)