30.07.2013 Views

Lambda-Calculus and Combinators, an Introduction

Lambda-Calculus and Combinators, an Introduction

Lambda-Calculus and Combinators, an Introduction

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

11B The system TA → C<br />

Example 11.6 The term SKK, which behaves like I (since SKKX ⊲<br />

X), also has all the types that I has. That is, for all σ,<br />

⊢TA → C<br />

SKK : σ → σ.<br />

Proof Let σ be <strong>an</strong>y type. In axiom-scheme (→ S), take ρ, σ, τ to be σ,<br />

σ →σ, σ respectively; this gives us <strong>an</strong> axiom<br />

S :(σ → (σ →σ) → σ) → (σ → σ →σ) → σ → σ.<br />

Also, from axiom-scheme (→K) we c<strong>an</strong> get the following two axioms:<br />

K : σ → (σ →σ) → σ,<br />

K : σ → σ → σ.<br />

Using these three axioms <strong><strong>an</strong>d</strong> rule (→e), we make the TA → C -proof below:<br />

(→S)<br />

S :(σ→(σ→σ) →σ) →(σ →σ →σ) →σ →σ<br />

SK :(σ→σ→σ) →σ →σ<br />

(→K)<br />

K : σ→(σ →σ) →σ<br />

SKK : σ →σ.<br />

(→K)<br />

K : σ→σ →σ<br />

Example 11.7 Recall that B ≡ S(KS)K. Then, for all ρ, σ, τ:<br />

⊢TA → C<br />

B :(σ → τ) → (ρ → σ) → ρ → τ.<br />

Proof The required proof is shown below. To make it fit into the width<br />

of the page, it uses the following abbreviations:<br />

θ ≡ (ρ → σ → τ) → (ρ → σ) → ρ → τ,<br />

µ ≡ σ → τ,<br />

ν ≡ ρ → σ → τ,<br />

π ≡ (ρ → σ) → ρ → τ.<br />

(We have ν ≡ ρ → µ, so the formula K : µ → ν is <strong>an</strong> axiom under<br />

axiom-scheme (→K). Also ν →π ≡ θ, so µ→ν →π ≡ µ→θ.)<br />

(→S)<br />

S :(µ→ν →π)→(µ→ν)→µ→π<br />

S(KS) :(µ→ν)→µ→π<br />

(→K)<br />

K : θ →µ→θ<br />

KS : µ→θ<br />

S(KS)K : µ→π.<br />

(→S)<br />

S : θ<br />

(→K)<br />

K : µ→ν<br />

123

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!