SlideShare una empresa de Scribd logo
1 de 32
Descargar para leer sin conexión
Expressiveness and
Model of the
Polymorphic λ Calculus
Shin-Cheng Mu
IIS, Sinica
Friday, April 11, 14
Motivation
• V. Vene in APLAS 2004 [GUV04] gave a new
proof of shortcut deforestation because it was
only proved “informally by theorem-for free.”
• But what’s wrong with theorem for free?
• So I studied polymorphism and realised that
there is a lot I did not know...
Friday, April 11, 14
Parametricity, or the
“theorems for free.”
• Informally known by functional programmers
as the “theorems for free.”
• A polymorphic function’s type induces a
“theorem”.
• E.g. hd . map f = f . hd, for all hd:: [a]→a,
regradless of its actual definition.
• The word “theorem” may be mis-leading,
however.
[Wad89]
Friday, April 11, 14
In this talk
• Review some members of the λ calculus
family:
• Untyped λ calculus: λx . x
• Simply-typed λ calculus: λx:Int . x
• Polymorphic λ calculus: Λα.(λx:α . x),
Δα.α--->τ, f [a] x
• Consider their termination property,
expressiveness, and model.
Friday, April 11, 14
Untyped λ calculus
• Not always terminating: (λx.(x x))(λx.(x x))
• Recursion: Y f = (λx . f (x x))(λx . f (x x))
• Equivalent to Turing machine (Church &
Kleene).
• Denotational model not trivial: requires Scott
domains.
Friday, April 11, 14
Simply-typed λ calculus
• Strongly normalisable: all well-typed
expression terminates. Y combinator cannot
be typed.
• Computes total functions only!
• Has a simple model of total functions and
sets.
• Apparently cannot define some useful
functions. But exactly how expressive?
Friday, April 11, 14
The computability hierarchy
partial recursive (functions)
total recursive
primitive recursive
elementry recursive
Friday, April 11, 14
Primitive recursion
• A function that can be implemented using
only for-loops (math world). It always
terminate.
• Zero: 0, succ: (1+), projection: (x1,...,xn)= xi.
• Composition: f o g.
• Primitive recursion:
h(0,x) = f(x)
h(n+1,x) = g (h(n),n,x)
Friday, April 11, 14
Primitive recursion
• A function that can be implemented using
only for-loops (math world). It always
terminate.
• Zero: 0, succ: (1+), projection: (x1,...,xn)= xi.
• Composition: f o g.
• Primitive recursion:
h(0,x) = f(x)
h(n+1,x) = g (h(n),n,x)
h(0) = c
h(n+1) = g (h(n),n)
Familiar? It’s paramorphism! [Mee90]
Friday, April 11, 14
Partial and total recursion
• Partial recursive functions: primitive
recursion plus unbounded search:
μf z = least x such that f(x,z) = 0.
• The search may not terminate, thus
introduces the partiality.
• Partial rec. fn. is equiv. to Turing machine.
• Total recursive functions: the subset of parital
rec. fn. that is total. It’s bigger than primitive
recursive functions! (eg. Ackermann’s
function.)
Friday, April 11, 14
Elementary recursion
• Also called Kalmar elementary functions. 
Functions definable by 1, +, x, -., and
 SUM f (x,n) = Σn
i=0
f(x,i)
 PRO f (x,n) = Πn
i=0
f(x,i)
• Definable functions include: mod, div,
isPrime, etc.
Friday, April 11, 14
Representing natural num.
• Rep. of n over domain τ:
λf:τ--->τ . λx:τ . f (... (f x)) with n occur. of f.
• If we allow different instantiation of τ, we
can define addition, multiplication, exp(Ii+1-->
Ii---> Ii), predecessor(Ii+3---> Ii)... but not
subtraction.
• Therefore simply-typed calculus is weaker
than elementary functions. Moreover, its
value is bound by elementary fns.
Friday, April 11, 14
• Use the type Δα.(α--->α)--->(α--->α) to
represent natural numbers.
• addition, multiplication, subtraction,pairs,..
• primrec = Δα.λg:N--->α--->α.λc:α.
λn:N.snd(n[Nxα]
(λz:Nxα.<1+fst z,g (fst z) (snd z)>) <0,c>)
Polymorphism enhances
expressiveness
Friday, April 11, 14
• Use the type Δα.(α--->α)--->(α--->α) to
represent natural numbers.
• addition, multiplication, subtraction,pairs,..
• primrec = Δα.λg:N--->α--->α.λc:α.
λn:N.snd(n[Nxα]
(λz:Nxα.<1+fst z,g (fst z) (snd z)>) <0,c>)
Polymorphism enhances
expressiveness
primrec = Δα.λg.λc.
λn.snd
(n (λz.<1+fst z,g (fst z) (snd z)>) <0,c>)
Friday, April 11, 14
Ackermann’s function!
Define ack
without recursion?
[Rey85]
ack 0 n = n+1
ack (m+1) 0 = ack m 1
ack (m+1) (n+1) = ack m (ack (m+1) n)
• Guess: ack = λm. m aug (1+)
therefore ack (m+1) = aug (ack m)
• ack (m+1) (n+1) = aug (ack m) (n+1) =
ack m (aug (ack m) n) = ack m (ack (m+1) n)
• We want aug f 0 = f 1 and
aug f (n+1) = f (aug f n)
• Solution: aug = λf. λn. (n+1) f 1
Friday, April 11, 14
Simulating data structures
• Let list a = Δβ.(a--->β--->β) ---> β ---> β
nil = Λβ.λf.λa.a
cons x xs = Λβ.λf.λa. f x (xs f a)
• append xs ys = xs cons ys
• append = λxs:list a. λys:list a .
xs[list a] (λx:a.λzs:list a . cons x zs) ys
[Rey85]
Friday, April 11, 14
Simulating data structures
• Let list a = Δβ.(a--->β--->β) ---> β ---> β
nil = Λβ.λf.λa.a
cons x xs = Λβ.λf.λa. f x (xs f a)
• append xs ys = xs cons ys
• append = λxs:list a. λys:list a .
xs[list a] (λx:a.λzs:list a . cons x zs) ys
! nil = Λβ.λf:a--->β--->β.λa:a.a
cons x xs = Λβ.λf:a--->β--->β.λa:a. f x (xs f a)
[Rey85]
Friday, April 11, 14
Where does it stand?
partial recursive (functions)
total recursive
primitive recursive
elementry recursive
Polymorphic λ
Simply-typed λ
Friday, April 11, 14
Fundamental sequence
• Define f0(x) = x+1
• fn+1(x)= fx
n(x) = fn(fn...(fn(x))..)... x
applications.
• f1(x)=2x, f2(x)=2x
×x
• fΘ(x)=fΘ[x](x) for limit ordinal Θ.
• Limit ordinals: ω is the size of natural
numbers, ε0 is the limit of ω, ωω
, ωωω
.....
Friday, April 11, 14
Hierarchy characterised by
rate of growth
• Running time of elementary functions are
bounded by fn
2(x) for some n.
• Time of primitive recursive functions are
bounded by fn(x) for some n< ω.
• Ackermann’s function is essentially fω(x).
• fε0(x) is representable in polymorphic λ
calculus!
• It represents exactly the functions provably
recursive in 2nd-order arithmetic -- a much
larger class than fε0(x).
[FLD83]
Friday, April 11, 14
Termination
• Still, every function defined in poly-λ
terminates.
• However, the termination cannot be proved
in Peano arithmetic!
• Peano arithmetic: 0, (1+), addition,
induction... covering most techniques we
use in proofs of programs.
• Godel’s incompleteness theorem stated that
there are true theorems not provable in PA.
This was the first “interesting” example.
[FLD83]
Friday, April 11, 14
Model for poly. λ calculus?
• Untyped λ: not terminating, needs domain.
• Simple-typed λ: terminating, set-theoretic.
• λx:Int.x is the id for Int, λx:Char.x for Char.
• Poly. λ: can we avoid using domains?
• First try: a polymorphic function is a
collection of functions indexed by type.
• Λα.λx:α.x is a collection of identity fns.
• However, that would include some ad-hoc
functions.
Friday, April 11, 14
Parametricity
• Reynolds restricts polymorphic objects to
parametric values:
• Let p: Δα.τ. It is parametric if for all set
assignments s1, s2, and r s1×s2:
	 	 	 	 〈p s1, p s2〉 [id|α:r]#
τ
• Which later became “theorem for free”.
• Reynolds [Rey83] believed that there is a set-
theoretic model for poly. λ where poly.
objects represent parametric values.
• He then falsified his conjecture [Rey84].
[Wad89]
Friday, April 11, 14
No simple model!
• Bool can be represented by B=Δα.α--->α--->α
• Let Ts = (s--->B)--->B for all type s, and Tf =
λh.λg.h(g o f) (for all f: s--->t, Tf: Ts--->Tt).
• Let P=(((s--->B)--->B)--->s)--->s. We can construct a
h: TP--->P s.t. the diagram commutes for all f.
• In fact h is an initial algebra!
• But that would make TP isomorphic to P,
which is a contradiction (they have diff.
cardinalities unless |B|=1).
h
P TP
s Ts
Tgg
f
[Rey84]Polymor
phism is not
set-theoretic.
f. g.
Friday, April 11, 14
Later models
• Using topos [Pit87]Poly. is set-theoretic, constructively.
• Frame [BM84][MM85][Wad89].
• Functorial approach [BFS90].
• Operational aspects [Pit00].
• Used to prove short-cut fusion [Joh03].
Friday, April 11, 14
What’s the use of
parametricity?
• It’s still a key concept! Recall representation
of lists: llist a = Δβ.(a--->β--->β) ---> β ---> β.
• In general, the least fixed-point of functor F
(or the inital F-algebra) can be represented by
Δβ.(F β--->β) ---> β... iff parametricity holds!
• Types defined as least-fixed-points are called
inductive.
• nil = Λβ.λf.λa.a, cons x xs = Λβ.λf.λa. f x
(xs f a), x = cons 1 (cons 2 (cons 3 nil).
[Has94]
Friday, April 11, 14
Inductive and coinductive
datatypes
• The greatest fixed-point of functor F can be
represented by ∃x.(x → F x, x), iff
parametricity holds. It’s called coinductive.
• from n = (λm.Right (m,m+1), n) :: glist a
• When least and greatest fixed-points
coincide (i.e. exists a force:: glist a →llist a),
we can do hylomorphism.
[Has94]
[How96]
Friday, April 11, 14
Pointed types
• In a model where parametricity and
extensionality holds, the following are
equivalent:
• Inductive and coinductive types coincide;
• Exists a fixed-point operator for values;
• Exists a fixed-point operator for types.
[Has94] ?
Friday, April 11, 14
Conclusion
Termination Expressiveness Model
Untyped NO = Turing
machine
domain
Simply typed YES < elementry fn. set &
functio
n
Polymorphic
YES but not
provable in
PA
> Ackermann
domain or
non-trivial
sets
Friday, April 11, 14
What I learnt from this history
study...
• Adding polymorphism to a language strongly
enhances its power.
• The concept of fold, etc., finds its root in very
fundamental research.
• Category theory has played an important
role in early stage of computing science.
• Parametricity is an important assumption
leading to many useful properties.
Friday, April 11, 14
References
• [FLD83] S.Fortune, D. Leivant, M. O’Donnell, The expressiveness of
simple and second-order type structures. In Journal of the ACM, 30(1), pp
151-185.
• [Rey83] J.C. Reynolds. Types, abstractions and parametric polymorphism.
In Information Processing 83, pp 513-523.
• [BM84]K.B. Bruce, A.R. Meyer, The semantics of second-order
polymorphic lambda calculus. In Semantics of Data Types, LNCS 173.
• [Rey84] J.C. Reynolds, Polymorphism is not set theoretic. In Semantics of
data Types, LNCS 173, pp 145-156.
• [MM85] J.C. Mitchell, A.R. Meyer, Second-order logical relations. In
Logics of Programs, LNCS 193.
• [Rey85] J.C. Reynolds, Three approaches to type structure. In
Mathematical Foundations of Software Development, LNCS 185.
Friday, April 11, 14
References
• [Pit87] A.M. Pitts, Polymorphism is set theoretic, constructively. In
Category Theory and Computer Science, LNCS 283, pp 12-39.
• [Wad89] P. Wadler, Theorems for free! In Int. Sym. on Functional
Programming Languages and Computer Architecture, ‘89.
• [BFS90] E.S. Bainbridge, P.J. Freyd, A. Scedrov, P.J. Scott, Functorial
polymorphism. In Theoretical computer science v.70, pp 36-54.
• [Mee90] L. Meertens, Paramorphisms. In Formal Aspects of Computing.
• [Has94] R. Hasegawa. Categorical data types in parametric
polymorphism. Math. Structures in Computer Science, March 1994.
• [How96] B.T. Howard. Inductive, coinductive, and pointed types. ICFP 96.
• [Pit00] A.M. Pitts, Parametric polymorphism and operational equivalence.
In Math. Struct. in Comp. Science v.10, pp 1-39.
• [Joh03] P. Johann, Short cut fusion is correct. In J. Functional Programming
v.13, pp 797-814.
• [GUV04]N. Ghani, T. Uustalu, V, Vene, Build, augment and destory. In
APLAS 2004, LNCS 3002, pp 327-347.
Friday, April 11, 14

Más contenido relacionado

La actualidad más candente

Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)Matthew Leingang
 
Otter 2016-11-28-01-ss
Otter 2016-11-28-01-ssOtter 2016-11-28-01-ss
Otter 2016-11-28-01-ssRuo Ando
 
Introduction to NumPy (PyData SV 2013)
Introduction to NumPy (PyData SV 2013)Introduction to NumPy (PyData SV 2013)
Introduction to NumPy (PyData SV 2013)PyData
 
Runtime Analysis of Population-based Evolutionary Algorithms
Runtime Analysis of Population-based Evolutionary AlgorithmsRuntime Analysis of Population-based Evolutionary Algorithms
Runtime Analysis of Population-based Evolutionary AlgorithmsPK Lehre
 
Ejercicios de estilo en la programación
Ejercicios de estilo en la programaciónEjercicios de estilo en la programación
Ejercicios de estilo en la programaciónSoftware Guru
 
Formal methods 5 - Pi calculus
Formal methods   5 - Pi calculusFormal methods   5 - Pi calculus
Formal methods 5 - Pi calculusVlad Patryshev
 
[FLOLAC'14][scm] Functional Programming Using Haskell
[FLOLAC'14][scm] Functional Programming Using Haskell[FLOLAC'14][scm] Functional Programming Using Haskell
[FLOLAC'14][scm] Functional Programming Using HaskellFunctional Thursday
 
Monad presentation scala as a category
Monad presentation   scala as a categoryMonad presentation   scala as a category
Monad presentation scala as a categorysamthemonad
 
PaperNo10-KaramiHabibiSafariZarrabi-IJCMS
PaperNo10-KaramiHabibiSafariZarrabi-IJCMSPaperNo10-KaramiHabibiSafariZarrabi-IJCMS
PaperNo10-KaramiHabibiSafariZarrabi-IJCMSMezban Habibi
 
Lesson 27: Integration by Substitution (slides)
Lesson 27: Integration by Substitution (slides)Lesson 27: Integration by Substitution (slides)
Lesson 27: Integration by Substitution (slides)Matthew Leingang
 
Pre- Operator Compact Space
Pre- Operator Compact SpacePre- Operator Compact Space
Pre- Operator Compact Spaceiosrjce
 
Category Theory made easy with (ugly) pictures
Category Theory made easy with (ugly) picturesCategory Theory made easy with (ugly) pictures
Category Theory made easy with (ugly) picturesAshwin Rao
 
Introduction to Iteratees (Scala)
Introduction to Iteratees (Scala)Introduction to Iteratees (Scala)
Introduction to Iteratees (Scala)Alexander Lehmann
 

La actualidad más candente (20)

Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
 
Otter 2016-11-28-01-ss
Otter 2016-11-28-01-ssOtter 2016-11-28-01-ss
Otter 2016-11-28-01-ss
 
ma112011id535
ma112011id535ma112011id535
ma112011id535
 
Introduction to NumPy (PyData SV 2013)
Introduction to NumPy (PyData SV 2013)Introduction to NumPy (PyData SV 2013)
Introduction to NumPy (PyData SV 2013)
 
Runtime Analysis of Population-based Evolutionary Algorithms
Runtime Analysis of Population-based Evolutionary AlgorithmsRuntime Analysis of Population-based Evolutionary Algorithms
Runtime Analysis of Population-based Evolutionary Algorithms
 
01. haskell introduction
01. haskell introduction01. haskell introduction
01. haskell introduction
 
Ejercicios de estilo en la programación
Ejercicios de estilo en la programaciónEjercicios de estilo en la programación
Ejercicios de estilo en la programación
 
Formal methods 5 - Pi calculus
Formal methods   5 - Pi calculusFormal methods   5 - Pi calculus
Formal methods 5 - Pi calculus
 
[FLOLAC'14][scm] Functional Programming Using Haskell
[FLOLAC'14][scm] Functional Programming Using Haskell[FLOLAC'14][scm] Functional Programming Using Haskell
[FLOLAC'14][scm] Functional Programming Using Haskell
 
Prml
PrmlPrml
Prml
 
Koc3(dba)
Koc3(dba)Koc3(dba)
Koc3(dba)
 
Claire98
Claire98Claire98
Claire98
 
Monad presentation scala as a category
Monad presentation   scala as a categoryMonad presentation   scala as a category
Monad presentation scala as a category
 
PaperNo10-KaramiHabibiSafariZarrabi-IJCMS
PaperNo10-KaramiHabibiSafariZarrabi-IJCMSPaperNo10-KaramiHabibiSafariZarrabi-IJCMS
PaperNo10-KaramiHabibiSafariZarrabi-IJCMS
 
Lesson 27: Integration by Substitution (slides)
Lesson 27: Integration by Substitution (slides)Lesson 27: Integration by Substitution (slides)
Lesson 27: Integration by Substitution (slides)
 
NumPy
NumPyNumPy
NumPy
 
Pre- Operator Compact Space
Pre- Operator Compact SpacePre- Operator Compact Space
Pre- Operator Compact Space
 
Category Theory made easy with (ugly) pictures
Category Theory made easy with (ugly) picturesCategory Theory made easy with (ugly) pictures
Category Theory made easy with (ugly) pictures
 
Introduction to Iteratees (Scala)
Introduction to Iteratees (Scala)Introduction to Iteratees (Scala)
Introduction to Iteratees (Scala)
 
Numpy
NumpyNumpy
Numpy
 

Destacado

Break Free with Managed Functional Programming: An Introduction to F#
Break Free with Managed Functional Programming: An Introduction to F#Break Free with Managed Functional Programming: An Introduction to F#
Break Free with Managed Functional Programming: An Introduction to F#Dave Fancher
 
Unusual Toy
Unusual ToyUnusual Toy
Unusual ToyLindVera
 

Destacado (6)

Break Free with Managed Functional Programming: An Introduction to F#
Break Free with Managed Functional Programming: An Introduction to F#Break Free with Managed Functional Programming: An Introduction to F#
Break Free with Managed Functional Programming: An Introduction to F#
 
Unusual Toy
Unusual ToyUnusual Toy
Unusual Toy
 
Elements of functional programming
Elements of functional programmingElements of functional programming
Elements of functional programming
 
Faking it
Faking itFaking it
Faking it
 
59fifty ppt
59fifty ppt59fifty ppt
59fifty ppt
 
French Revolution
French Revolution French Revolution
French Revolution
 

Similar a Expressiveness and Model of the Polymorphic λ Calculus

Presentation of GetTogether on Functional Programming
Presentation of GetTogether on Functional ProgrammingPresentation of GetTogether on Functional Programming
Presentation of GetTogether on Functional ProgrammingFilip De Sutter
 
Basic Knowledge Representation in First Order Logic.ppt
Basic Knowledge Representation in First Order Logic.pptBasic Knowledge Representation in First Order Logic.ppt
Basic Knowledge Representation in First Order Logic.pptAshfaqAhmed693399
 
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.ppt
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.pptdfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.ppt
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.pptNobitaNobi489694
 
Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)Mel Anthony Pepito
 
Dirichlet processes and Applications
Dirichlet processes and ApplicationsDirichlet processes and Applications
Dirichlet processes and ApplicationsSaurav Jha
 
Functional Programming by Examples using Haskell
Functional Programming by Examples using HaskellFunctional Programming by Examples using Haskell
Functional Programming by Examples using Haskellgoncharenko
 
IVR - Chapter 1 - Introduction
IVR - Chapter 1 - IntroductionIVR - Chapter 1 - Introduction
IVR - Chapter 1 - IntroductionCharles Deledalle
 
Algorithms and Complexity: Cryptography Theory
Algorithms and Complexity: Cryptography TheoryAlgorithms and Complexity: Cryptography Theory
Algorithms and Complexity: Cryptography TheoryAlex Prut
 
10 logic+programming+with+prolog
10 logic+programming+with+prolog10 logic+programming+with+prolog
10 logic+programming+with+prologbaran19901990
 
Newton raphson method
Newton raphson methodNewton raphson method
Newton raphson methodBijay Mishra
 
Introduction to comp.physics ch 3.pdf
Introduction to comp.physics ch 3.pdfIntroduction to comp.physics ch 3.pdf
Introduction to comp.physics ch 3.pdfJifarRaya
 
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)Mel Anthony Pepito
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfMuhammadUmerIhtisham
 
Ml mle_bayes
Ml  mle_bayesMl  mle_bayes
Ml mle_bayesPhong Vo
 
Newton raphsonmethod presentation
Newton raphsonmethod presentationNewton raphsonmethod presentation
Newton raphsonmethod presentationAbdullah Moin
 
Universal Approximation Theorem
Universal Approximation TheoremUniversal Approximation Theorem
Universal Approximation TheoremJamie Seol
 

Similar a Expressiveness and Model of the Polymorphic λ Calculus (20)

Presentation of GetTogether on Functional Programming
Presentation of GetTogether on Functional ProgrammingPresentation of GetTogether on Functional Programming
Presentation of GetTogether on Functional Programming
 
Basic Knowledge Representation in First Order Logic.ppt
Basic Knowledge Representation in First Order Logic.pptBasic Knowledge Representation in First Order Logic.ppt
Basic Knowledge Representation in First Order Logic.ppt
 
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.ppt
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.pptdfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.ppt
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.ppt
 
Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)
 
Dirichlet processes and Applications
Dirichlet processes and ApplicationsDirichlet processes and Applications
Dirichlet processes and Applications
 
Functional Programming by Examples using Haskell
Functional Programming by Examples using HaskellFunctional Programming by Examples using Haskell
Functional Programming by Examples using Haskell
 
IVR - Chapter 1 - Introduction
IVR - Chapter 1 - IntroductionIVR - Chapter 1 - Introduction
IVR - Chapter 1 - Introduction
 
Algorithms and Complexity: Cryptography Theory
Algorithms and Complexity: Cryptography TheoryAlgorithms and Complexity: Cryptography Theory
Algorithms and Complexity: Cryptography Theory
 
QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...
QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...
QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...
 
10 logic+programming+with+prolog
10 logic+programming+with+prolog10 logic+programming+with+prolog
10 logic+programming+with+prolog
 
Newton raphson method
Newton raphson methodNewton raphson method
Newton raphson method
 
Function Basics Math Wiki
Function Basics   Math WikiFunction Basics   Math Wiki
Function Basics Math Wiki
 
Lesson 1: Functions
Lesson 1: FunctionsLesson 1: Functions
Lesson 1: Functions
 
Introduction to comp.physics ch 3.pdf
Introduction to comp.physics ch 3.pdfIntroduction to comp.physics ch 3.pdf
Introduction to comp.physics ch 3.pdf
 
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdf
 
Ml mle_bayes
Ml  mle_bayesMl  mle_bayes
Ml mle_bayes
 
Newton raphsonmethod presentation
Newton raphsonmethod presentationNewton raphsonmethod presentation
Newton raphsonmethod presentation
 
Universal Approximation Theorem
Universal Approximation TheoremUniversal Approximation Theorem
Universal Approximation Theorem
 
Module_5_1.pptx
Module_5_1.pptxModule_5_1.pptx
Module_5_1.pptx
 

Último

THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxNandakishor Bhaurao Deshmukh
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024AyushiRastogi48
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trssuser06f238
 
User Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationUser Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationColumbia Weather Systems
 
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...Universidade Federal de Sergipe - UFS
 
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)riyaescorts54
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxpriyankatabhane
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfSELF-EXPLANATORY
 
《Queensland毕业文凭-昆士兰大学毕业证成绩单》
《Queensland毕业文凭-昆士兰大学毕业证成绩单》《Queensland毕业文凭-昆士兰大学毕业证成绩单》
《Queensland毕业文凭-昆士兰大学毕业证成绩单》rnrncn29
 
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 GenuineCall Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuinethapagita
 
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPirithiRaju
 
User Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather StationUser Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather StationColumbia Weather Systems
 
Four Spheres of the Earth Presentation.ppt
Four Spheres of the Earth Presentation.pptFour Spheres of the Earth Presentation.ppt
Four Spheres of the Earth Presentation.pptJoemSTuliba
 
FREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by naFREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by naJASISJULIANOELYNV
 
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)Columbia Weather Systems
 
Environmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial BiosensorEnvironmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial Biosensorsonawaneprad
 
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...D. B. S. College Kanpur
 
Good agricultural practices 3rd year bpharm. herbal drug technology .pptx
Good agricultural practices 3rd year bpharm. herbal drug technology .pptxGood agricultural practices 3rd year bpharm. herbal drug technology .pptx
Good agricultural practices 3rd year bpharm. herbal drug technology .pptxSimeonChristian
 
Topic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxTopic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxJorenAcuavera1
 

Último (20)

THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 tr
 
User Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationUser Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather Station
 
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
 
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
 
《Queensland毕业文凭-昆士兰大学毕业证成绩单》
《Queensland毕业文凭-昆士兰大学毕业证成绩单》《Queensland毕业文凭-昆士兰大学毕业证成绩单》
《Queensland毕业文凭-昆士兰大学毕业证成绩单》
 
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 GenuineCall Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
 
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
 
User Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather StationUser Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather Station
 
Four Spheres of the Earth Presentation.ppt
Four Spheres of the Earth Presentation.pptFour Spheres of the Earth Presentation.ppt
Four Spheres of the Earth Presentation.ppt
 
FREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by naFREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by na
 
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
 
Environmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial BiosensorEnvironmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial Biosensor
 
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
 
Good agricultural practices 3rd year bpharm. herbal drug technology .pptx
Good agricultural practices 3rd year bpharm. herbal drug technology .pptxGood agricultural practices 3rd year bpharm. herbal drug technology .pptx
Good agricultural practices 3rd year bpharm. herbal drug technology .pptx
 
Volatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -IVolatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -I
 
Topic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxTopic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptx
 

Expressiveness and Model of the Polymorphic λ Calculus

  • 1. Expressiveness and Model of the Polymorphic λ Calculus Shin-Cheng Mu IIS, Sinica Friday, April 11, 14
  • 2. Motivation • V. Vene in APLAS 2004 [GUV04] gave a new proof of shortcut deforestation because it was only proved “informally by theorem-for free.” • But what’s wrong with theorem for free? • So I studied polymorphism and realised that there is a lot I did not know... Friday, April 11, 14
  • 3. Parametricity, or the “theorems for free.” • Informally known by functional programmers as the “theorems for free.” • A polymorphic function’s type induces a “theorem”. • E.g. hd . map f = f . hd, for all hd:: [a]→a, regradless of its actual definition. • The word “theorem” may be mis-leading, however. [Wad89] Friday, April 11, 14
  • 4. In this talk • Review some members of the λ calculus family: • Untyped λ calculus: λx . x • Simply-typed λ calculus: λx:Int . x • Polymorphic λ calculus: Λα.(λx:α . x), Δα.α--->τ, f [a] x • Consider their termination property, expressiveness, and model. Friday, April 11, 14
  • 5. Untyped λ calculus • Not always terminating: (λx.(x x))(λx.(x x)) • Recursion: Y f = (λx . f (x x))(λx . f (x x)) • Equivalent to Turing machine (Church & Kleene). • Denotational model not trivial: requires Scott domains. Friday, April 11, 14
  • 6. Simply-typed λ calculus • Strongly normalisable: all well-typed expression terminates. Y combinator cannot be typed. • Computes total functions only! • Has a simple model of total functions and sets. • Apparently cannot define some useful functions. But exactly how expressive? Friday, April 11, 14
  • 7. The computability hierarchy partial recursive (functions) total recursive primitive recursive elementry recursive Friday, April 11, 14
  • 8. Primitive recursion • A function that can be implemented using only for-loops (math world). It always terminate. • Zero: 0, succ: (1+), projection: (x1,...,xn)= xi. • Composition: f o g. • Primitive recursion: h(0,x) = f(x) h(n+1,x) = g (h(n),n,x) Friday, April 11, 14
  • 9. Primitive recursion • A function that can be implemented using only for-loops (math world). It always terminate. • Zero: 0, succ: (1+), projection: (x1,...,xn)= xi. • Composition: f o g. • Primitive recursion: h(0,x) = f(x) h(n+1,x) = g (h(n),n,x) h(0) = c h(n+1) = g (h(n),n) Familiar? It’s paramorphism! [Mee90] Friday, April 11, 14
  • 10. Partial and total recursion • Partial recursive functions: primitive recursion plus unbounded search: μf z = least x such that f(x,z) = 0. • The search may not terminate, thus introduces the partiality. • Partial rec. fn. is equiv. to Turing machine. • Total recursive functions: the subset of parital rec. fn. that is total. It’s bigger than primitive recursive functions! (eg. Ackermann’s function.) Friday, April 11, 14
  • 11. Elementary recursion • Also called Kalmar elementary functions.  Functions definable by 1, +, x, -., and  SUM f (x,n) = Σn i=0 f(x,i)  PRO f (x,n) = Πn i=0 f(x,i) • Definable functions include: mod, div, isPrime, etc. Friday, April 11, 14
  • 12. Representing natural num. • Rep. of n over domain τ: λf:τ--->τ . λx:τ . f (... (f x)) with n occur. of f. • If we allow different instantiation of τ, we can define addition, multiplication, exp(Ii+1--> Ii---> Ii), predecessor(Ii+3---> Ii)... but not subtraction. • Therefore simply-typed calculus is weaker than elementary functions. Moreover, its value is bound by elementary fns. Friday, April 11, 14
  • 13. • Use the type Δα.(α--->α)--->(α--->α) to represent natural numbers. • addition, multiplication, subtraction,pairs,.. • primrec = Δα.λg:N--->α--->α.λc:α. λn:N.snd(n[Nxα] (λz:Nxα.<1+fst z,g (fst z) (snd z)>) <0,c>) Polymorphism enhances expressiveness Friday, April 11, 14
  • 14. • Use the type Δα.(α--->α)--->(α--->α) to represent natural numbers. • addition, multiplication, subtraction,pairs,.. • primrec = Δα.λg:N--->α--->α.λc:α. λn:N.snd(n[Nxα] (λz:Nxα.<1+fst z,g (fst z) (snd z)>) <0,c>) Polymorphism enhances expressiveness primrec = Δα.λg.λc. λn.snd (n (λz.<1+fst z,g (fst z) (snd z)>) <0,c>) Friday, April 11, 14
  • 15. Ackermann’s function! Define ack without recursion? [Rey85] ack 0 n = n+1 ack (m+1) 0 = ack m 1 ack (m+1) (n+1) = ack m (ack (m+1) n) • Guess: ack = λm. m aug (1+) therefore ack (m+1) = aug (ack m) • ack (m+1) (n+1) = aug (ack m) (n+1) = ack m (aug (ack m) n) = ack m (ack (m+1) n) • We want aug f 0 = f 1 and aug f (n+1) = f (aug f n) • Solution: aug = λf. λn. (n+1) f 1 Friday, April 11, 14
  • 16. Simulating data structures • Let list a = Δβ.(a--->β--->β) ---> β ---> β nil = Λβ.λf.λa.a cons x xs = Λβ.λf.λa. f x (xs f a) • append xs ys = xs cons ys • append = λxs:list a. λys:list a . xs[list a] (λx:a.λzs:list a . cons x zs) ys [Rey85] Friday, April 11, 14
  • 17. Simulating data structures • Let list a = Δβ.(a--->β--->β) ---> β ---> β nil = Λβ.λf.λa.a cons x xs = Λβ.λf.λa. f x (xs f a) • append xs ys = xs cons ys • append = λxs:list a. λys:list a . xs[list a] (λx:a.λzs:list a . cons x zs) ys ! nil = Λβ.λf:a--->β--->β.λa:a.a cons x xs = Λβ.λf:a--->β--->β.λa:a. f x (xs f a) [Rey85] Friday, April 11, 14
  • 18. Where does it stand? partial recursive (functions) total recursive primitive recursive elementry recursive Polymorphic λ Simply-typed λ Friday, April 11, 14
  • 19. Fundamental sequence • Define f0(x) = x+1 • fn+1(x)= fx n(x) = fn(fn...(fn(x))..)... x applications. • f1(x)=2x, f2(x)=2x ×x • fΘ(x)=fΘ[x](x) for limit ordinal Θ. • Limit ordinals: ω is the size of natural numbers, ε0 is the limit of ω, ωω , ωωω ..... Friday, April 11, 14
  • 20. Hierarchy characterised by rate of growth • Running time of elementary functions are bounded by fn 2(x) for some n. • Time of primitive recursive functions are bounded by fn(x) for some n< ω. • Ackermann’s function is essentially fω(x). • fε0(x) is representable in polymorphic λ calculus! • It represents exactly the functions provably recursive in 2nd-order arithmetic -- a much larger class than fε0(x). [FLD83] Friday, April 11, 14
  • 21. Termination • Still, every function defined in poly-λ terminates. • However, the termination cannot be proved in Peano arithmetic! • Peano arithmetic: 0, (1+), addition, induction... covering most techniques we use in proofs of programs. • Godel’s incompleteness theorem stated that there are true theorems not provable in PA. This was the first “interesting” example. [FLD83] Friday, April 11, 14
  • 22. Model for poly. λ calculus? • Untyped λ: not terminating, needs domain. • Simple-typed λ: terminating, set-theoretic. • λx:Int.x is the id for Int, λx:Char.x for Char. • Poly. λ: can we avoid using domains? • First try: a polymorphic function is a collection of functions indexed by type. • Λα.λx:α.x is a collection of identity fns. • However, that would include some ad-hoc functions. Friday, April 11, 14
  • 23. Parametricity • Reynolds restricts polymorphic objects to parametric values: • Let p: Δα.τ. It is parametric if for all set assignments s1, s2, and r s1×s2: 〈p s1, p s2〉 [id|α:r]# τ • Which later became “theorem for free”. • Reynolds [Rey83] believed that there is a set- theoretic model for poly. λ where poly. objects represent parametric values. • He then falsified his conjecture [Rey84]. [Wad89] Friday, April 11, 14
  • 24. No simple model! • Bool can be represented by B=Δα.α--->α--->α • Let Ts = (s--->B)--->B for all type s, and Tf = λh.λg.h(g o f) (for all f: s--->t, Tf: Ts--->Tt). • Let P=(((s--->B)--->B)--->s)--->s. We can construct a h: TP--->P s.t. the diagram commutes for all f. • In fact h is an initial algebra! • But that would make TP isomorphic to P, which is a contradiction (they have diff. cardinalities unless |B|=1). h P TP s Ts Tgg f [Rey84]Polymor phism is not set-theoretic. f. g. Friday, April 11, 14
  • 25. Later models • Using topos [Pit87]Poly. is set-theoretic, constructively. • Frame [BM84][MM85][Wad89]. • Functorial approach [BFS90]. • Operational aspects [Pit00]. • Used to prove short-cut fusion [Joh03]. Friday, April 11, 14
  • 26. What’s the use of parametricity? • It’s still a key concept! Recall representation of lists: llist a = Δβ.(a--->β--->β) ---> β ---> β. • In general, the least fixed-point of functor F (or the inital F-algebra) can be represented by Δβ.(F β--->β) ---> β... iff parametricity holds! • Types defined as least-fixed-points are called inductive. • nil = Λβ.λf.λa.a, cons x xs = Λβ.λf.λa. f x (xs f a), x = cons 1 (cons 2 (cons 3 nil). [Has94] Friday, April 11, 14
  • 27. Inductive and coinductive datatypes • The greatest fixed-point of functor F can be represented by ∃x.(x → F x, x), iff parametricity holds. It’s called coinductive. • from n = (λm.Right (m,m+1), n) :: glist a • When least and greatest fixed-points coincide (i.e. exists a force:: glist a →llist a), we can do hylomorphism. [Has94] [How96] Friday, April 11, 14
  • 28. Pointed types • In a model where parametricity and extensionality holds, the following are equivalent: • Inductive and coinductive types coincide; • Exists a fixed-point operator for values; • Exists a fixed-point operator for types. [Has94] ? Friday, April 11, 14
  • 29. Conclusion Termination Expressiveness Model Untyped NO = Turing machine domain Simply typed YES < elementry fn. set & functio n Polymorphic YES but not provable in PA > Ackermann domain or non-trivial sets Friday, April 11, 14
  • 30. What I learnt from this history study... • Adding polymorphism to a language strongly enhances its power. • The concept of fold, etc., finds its root in very fundamental research. • Category theory has played an important role in early stage of computing science. • Parametricity is an important assumption leading to many useful properties. Friday, April 11, 14
  • 31. References • [FLD83] S.Fortune, D. Leivant, M. O’Donnell, The expressiveness of simple and second-order type structures. In Journal of the ACM, 30(1), pp 151-185. • [Rey83] J.C. Reynolds. Types, abstractions and parametric polymorphism. In Information Processing 83, pp 513-523. • [BM84]K.B. Bruce, A.R. Meyer, The semantics of second-order polymorphic lambda calculus. In Semantics of Data Types, LNCS 173. • [Rey84] J.C. Reynolds, Polymorphism is not set theoretic. In Semantics of data Types, LNCS 173, pp 145-156. • [MM85] J.C. Mitchell, A.R. Meyer, Second-order logical relations. In Logics of Programs, LNCS 193. • [Rey85] J.C. Reynolds, Three approaches to type structure. In Mathematical Foundations of Software Development, LNCS 185. Friday, April 11, 14
  • 32. References • [Pit87] A.M. Pitts, Polymorphism is set theoretic, constructively. In Category Theory and Computer Science, LNCS 283, pp 12-39. • [Wad89] P. Wadler, Theorems for free! In Int. Sym. on Functional Programming Languages and Computer Architecture, ‘89. • [BFS90] E.S. Bainbridge, P.J. Freyd, A. Scedrov, P.J. Scott, Functorial polymorphism. In Theoretical computer science v.70, pp 36-54. • [Mee90] L. Meertens, Paramorphisms. In Formal Aspects of Computing. • [Has94] R. Hasegawa. Categorical data types in parametric polymorphism. Math. Structures in Computer Science, March 1994. • [How96] B.T. Howard. Inductive, coinductive, and pointed types. ICFP 96. • [Pit00] A.M. Pitts, Parametric polymorphism and operational equivalence. In Math. Struct. in Comp. Science v.10, pp 1-39. • [Joh03] P. Johann, Short cut fusion is correct. In J. Functional Programming v.13, pp 797-814. • [GUV04]N. Ghani, T. Uustalu, V, Vene, Build, augment and destory. In APLAS 2004, LNCS 3002, pp 327-347. Friday, April 11, 14