• Keine Ergebnisse gefunden

Using λ-terms for Pre-Theories

Im Dokument On the metatheory of linguistics (Seite 142-145)

4.12 Strings as Typed λ-Terms

4.12.3 Using λ-terms for Pre-Theories

Take a finite alphabetT, and fix a languageL1⊆T. As we have seen in the last section, there is a injective mapi:T→WTT(ΘstringT ) from strings inTinto the set ofλ-terms of the signature ΘstringT . Note thatiis properly injective and not up to =αβ equivalence; we map strings only onto their standard encoding, using a standard variable. We thus obtaini[L1] ⊆WTT, wherei[−] is the pointwise extension ofi to sets. We closei[L1] under =αβ, and obtainL:={m: there is n∈i[L] :n=αβm}. This is the language we are working with, the type theoretic counterpart ofL1. In the sequel, for anyM ⊆T, we will denote the closure of i[M] under =αβ byMλ; so we haveL= (L1)λ. Given an analogical mapP for T, now want to deviseλP for Iλ, referring to subterms instead of factors of the language.

There is however a fundamental problem with that. Take a finite, non-empty language I. It is the easy to see that Iλ is infinite; so we do not have a finite language to depart from. This in itself is no need to worry:

for a set M of terms, let us denote by [M]αβ the partition of M into =αβ -equivalent subsets. For our language-theoretic purposes, we need to consider terms only up to =αβ, and [Iλ]αβ is (by assumption) finite. But we have to consider not only the terms, but also their subterms! Define sub(Iλ) :=

{sub(m) : m ∈ Iλ}. Now unfortunately, the quotient [sub(Iλ)]αβ is in gen-eralinfinite; so we have infinitely many distinct subterms even modulo =αβ! We can show this by a simple example: put I = {a}. Then we have Iλ = {λx.ax,(λyx.yx)a,((λzyx.(zy)x)(λz.z))a,(((λz1zyx.((z1z)y)x)(λz1.z1))(λz.z))a, ...}

It is easy to see that the leftmost closed terms (λyx.yx), (λzyx.(zy)x), (λz1zyx.((z1z)y)x) are all not αβ-equivalent, and we can iterate the above expansion as often as we want. So we have a major problem, because the factors we have to consider are infinitely many even moduloαβ-equivalence. So what are we supposed to do? There does not seem to be very good solution at this point, so the only solution I can present is the following: rather than using =αβ, we define a relation =kαβ, which we define inductively for everyk∈N. Let =α

be the smallest congruence containing α.

1. ifm=αn, thenm=0αβn; (closure underα-conversion) 2. ifm=kαβn, thenm=k+1αβ n (monotonicity overk)

3. ifm=kαβn, thenn=kαβm; (symmetry)

4. ifm βn, thenm=1αβn (definition fork= 1) 5. ifm=kαβn, theno[m] =kαβo[n]; (closure under subterms) 6. ifm=kαβn,n=kαβ0 o, thenm=k+kαβ 0 o. (transitivity for addition ofk, k0) So =kαβ is the rewriting relation which involvesk β-reduction or expansion steps, and an arbitrary amount ofα-conversions. Of course, we have (S

k∈N=kαβ

4.12. STRINGS AS TYPEDλ-TERMS 143 ) = ( =ωαβ) = (=αβ). To make this restriction sufficient, we will now and for the rest of this chapter reduce our focus toλI-terms.

What we intend to do is: for a finite languageI, closei[I] under =kαβfor some k, rather than close it under =αβ. We denote this closureand the intersection with the set ofλI terms byIλk;Iλk does thus only containλI-terms. It is clear that for a finite set of termsI, Iλk :={m: there isn∈I : n=kαβ m} modulo

=αis a finite set; we can easily show this by induction: [Iλ1]αis finite; and if [Iλk]α, then also [Iλk+1]αis finite. By the same argument, we can conclude that for each set Iλk, I finite, there is a constantk ∈N such that for allm∈Iλk, we have|m| ≤k, where| − |denotes the length of the term. From this it easily follows thatsub(Iλk) is a finite set, as actually, as the terms ofIλkare constantly bounded in length, so are the terms insub(Iλk). It follows that [sub(Iλk)]αis finite, anda fortiori, [sub(Iλk)]αβis finite. Note that all the arguments – except for the very last – are wrong when we do not restrict ourselves toλI.

So there is a solution to the infinity problem forλP1: we just have to consider families of the form λkP1, λkP r. The problem is of course: there is always something arbitrary to a pre-theory of this form, as there is no real criterion for choosingk.

Our goal is by now clear: we want to use the language of terms just as a

“normal language”, putting our old concepts to work. There are however some things we have to take care of: typed terms are not just strings: we do not have associativity of concatenation in the first place. So we need to respect the bracketings. But there is more: we have to take care that all objects we talk about are indeed typable terms; if not, we would take about things which are non-sense from the point of view of type theory.

Our major asset now is the following: concatenation on the level of strings interpreted as terms is now quite independent of the juxtaposition of terms, andmn corresponds to applying a function mto an argument n. For us, this means we can restrict our focus to analogies of the form (n,mn). But instead of writing w~~x~v to indicate substrings, we will use the subterm notation: by m[n] we denote a termmwhich contains a termnas a subterm; importantly, we always require thatn,m∈WTT; we thus only refer to closed, well-typed terms as terms and subterms. Another important thing is that we denote a single occurrence of nwithinm; but there are possibly many of them. And if we use m[n] subsequently, we always refer to the same occurrence ofn. We could make this explicit by adding subscripts to [,], so that they refer to positions in the term; explicitly, this is written asm[in]j. Importantly, we count the left index from the left, and the right index from the right. We omit this for simplicity and because it is common usage. Then, by m[o/n] we denote the term which results in a substitution of this subtermninm[n] byo(so this usage is somewhat different fromm[n/x], by which we intend the substitution of all free variables).

To indicate multiple occurrences of subterms, we simply writem[n1, ...,ni], where we make no statement on position and order of then1, ..niNow we can define the following analogical map:

Definition 128 Given a finite language I, we have n≈λP1kI mn, if and only if o[mn]∈Iλk⇒o[n/mn]∈Iλk.

Some notes are in order. There does not seem to be a reasonable type-theoretic variant ofP r. From the basic results of type theory it follows that

144 CHAPTER 4. THE CLASSICAL METATHEORY OF LANGUAGE Iλ⊆WTT. By notation, we already required thatm,n∈WTT. So all our objects are in the universe of well-typed terms over the string signature of a given alphabet. This also takes the worries from us that our objects are actually meaningless; to all terms inWTTwe can – at least in a very broad sense – assign some meaning. In what consists this meaning? We know that all entities will be functions, so they will be in the end some higher order functions from (functions from functions...to) strings to (functions to functions ..to) strings. Another problem for which now there is a unique and natural solution is the question of weak and strong language: the weak language - the first input and final output - consists of strings over an alphabet. The strong language, which is used for

inferences, consists of terms inWTT(ΘΣstring), for Σ an alphabet.

Recall that we have the bijection i: Σ→WTT(ΘΣstring), and the map [−]λk, which isicomposed with closure under =kαβ. I propose the following inference rule, here denoted bygλ:

o≈λPIλ no m[o]∈gλλP(Iλk)

m[no]∈gλλP(Iλk) (4.58) Note how surprisingly simple the schema has become again. But the map getting us back to the weak language is a bit more complicated: we have to take the map j : ℘(WTT(ΘΣstring)) →℘(Σ), where j(M) = i−1[M ∩i[Σ]]. In words, we first intersect the set of terms with the set of termsi[Σ], the terms representing strings in canonical form, and then take the inverse image underi.

This leads us back to a language, and frees us from a deep worry. This worry, on which we will speak more explicitly later on, is the following: assume we derive a termm. The premise we use is of course in (Σ)λ; but how about the conclusion? We might derive terms which are notαβ-equivalent to any string encoding. This is surely not a virtue, but by our mapj, this also will do no harm: these entities are simply sorted out.

So there is no problem if we derive terms that do not reduce to strings. a negative answer. However, a positive answer would allow us to derive a couple of positive results; the first one being: we could say thatλP1 isclosed, in the sense that it either generates an infinite language or the identity. The second result we could derive would be that there are some non-trivial boundaries for languages we can generate, by means of growth ratio. But so far there is little hope.

We have said that given a finite language I, it is clear that Iλ is infinite.

This is problematic for analogical maps; for inferences, it rather seems desirable to close inferences under =αβ, because we want to be able to reduce as much as possible in the end. Here, it turns out that we can simply includeα-conversion andβ-reduction/expansion into the rules of our calculus. This means, in addition to the above rule, we have the following ingλ:

m∈gλλP(Iλk) m=αβn

n∈gλλP(Iλk) (4.59)

For those who object to this scheme that the relation =αβ is not finitary, we answer that we might read this scheme as a shorthand for complex derivations where each single step consists ofα-conversion,β-reduction or β-expansion. So we can reduce the infinite set to a finite set by introducing additional inferences

4.13. CONCEPTS AND TYPES 145

Im Dokument On the metatheory of linguistics (Seite 142-145)