Share on Facebook Share on Twitter Email
Answers.com

System F

 
Artist: Ferry Corsten

Similar Artists:

Followers:

Alexander Xendzov

Formal Connection With:

System F, Albion
See Ferry Corsten Lyrics
  • Born: December 04, 1973, Rotterdam, The Netherlands
  • Active: '90s, 2000s
  • Genres: Electronica
  • Instrument: Remixing, DJ, Producer
  • Representative Albums: "The Very Best of Ferry Corsten," "Trance Nation, Vol. 2," "Trance Nation, Vol. 2"

Biography

Otherwise known as System F, in addition to using nearly 30 other (less prolific) pseudonyms, Rotterdam, Netherlands-born DJ and producer Ferry Corsten rose to prominence in the late '90s as one of Europe's top trance jocks, highlighted by an anthem-filled appearance on Ministry of Sound's first Trance Nation album. Throughout the first decade of the 2000s, Corsten issued mix albums at a roughly two-discs-per-year clip, including releases for Moonshine, Thrive, Ultra, and Gatecrasher. In 2005, he initiated his Flashover label, often an outlet for his own material, and issued his first production album, L.E.F., for EMI. He has remixed tracks by Moby ("Why Does My Heart Feel So Bad," "In My Mind") and U2 ("New Year's Day"). ~ Jason Birchmeier, All Music Guide
Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
Wikipedia: System F
Top

System F, also known as the (Girard-Reynolds) polymorphic lambda calculus or the second-order lambda calculus, is a typed lambda calculus that differs from simply typed lambda calculus by the introduction of a mechanism of universal quantification over types. System F thus formalizes the notion of parametric polymorphism in programming languages, and forms a theoretical basis for languages such as Haskell, ML, and F#. System F was discovered independently by the logician Jean-Yves Girard and the computer scientist John C. Reynolds.

Whereas simply typed lambda calculus has variables ranging over functions, and binders for them, System F additionally has variables ranging over types, and binders for them. As an example, the fact that the identity function can have any type of the form A→ A would be formalized in System F as the judgment

\vdash \Lambda\alpha. \lambda x^\alpha.x: \forall\alpha.\alpha \to \alpha

where α is a type variable. The upper-case Λ is traditionally used to denote type-level functions, as opposed to the lower-case λ which is used for value-level functions.

As a term rewriting system, System F is strongly normalizing. Type inference in System F is undecidable however. Under the Curry-Howard isomorphism, System F corresponds to the fragment of second-order intuitionistic logic that uses only universal quantification. System F can be seen as part of the lambda cube, together with even more expressive typed lambda calculi, including those with dependent types.

Contents

Logic and predicates

The Boolean type is defined as: \scriptstyle\forall\alpha.\alpha \to \alpha \to \alpha, where \scriptstyle\alpha is a type variable. This produces the following two definitions for the boolean values \scriptstyle\mathbf{T} and \scriptstyle\mathbf{F}:

\mathbf{T} = \Lambda\alpha{.}\lambda x^{\alpha} \lambda y^\alpha{.}x
\mathbf{F} = \Lambda\alpha{.}\lambda x^{\alpha} \lambda y^{\alpha}{.}y

Then, with these two \scriptstyle\lambda-terms, we can define some logic operators:

\mathrm{AND} = \lambda x^{\mathsf{Boolean}} \lambda y^{\mathsf{Boolean}}{.}((x (\mathsf{Boolean})) y) \mathbf{F}
\mathrm{OR}  = \lambda x^{\mathsf{Boolean}} \lambda y^{\mathsf{Boolean}}{.}((x (\mathsf{Boolean})) \mathbf{T}) y
\mathrm{NOT} = \lambda x^{\mathsf{Boolean}}{.}((x (\mathsf{Boolean})) \mathbf{F}) \mathbf{T}

There really is no need for an IFTHENELSE function as one can just use raw \scriptstyle\mathsf{Boolean}-typed terms as decision functions. However, if one is requested:

\mathrm{IFTHENELSE} = \Lambda \alpha.\lambda x^{\mathsf{Boolean}}\lambda y^{\alpha}\lambda z^{\alpha}.((x (\alpha)) y) z

will do. A predicate is a function which returns a \scriptstyle\mathsf{Boolean}-typed value. The most fundamental predicate is ISZERO which returns \scriptstyle\mathbf{T} if and only if its argument is the Church numeral 0:

\mathrm{ISZERO} = \lambda n{.}n(\lambda x{.}\mathbf{F})\mathbf{T}

System F Structures

System F allows recursive constructions to be embedded in a natural manner, related to that in Martin-Löf's type theory. Abstract structures (S) are created using constructors. These are functions typed as:

K_1\rightarrow K_2\rightarrow\dots\rightarrow S.

Recursivity is manifested when S itself appears within one of the types Ki. If you have m of these constructors, you can define the type of S as:

\forall \alpha.(K_1^1[\alpha/S]\rightarrow\dots\rightarrow \alpha)\dots\rightarrow(K_1^m[\alpha/S]\rightarrow\dots\rightarrow \alpha)\rightarrow \alpha

For instance, the natural numbers can be defined as an inductive datatype N with constructors

zero:N
\mathit{succ} : \mathrm{N} \rightarrow \mathrm{N}

The System F type corresponding to this structure is \forall \alpha. \alpha \to (\alpha \to \alpha) \to \alpha. The terms of this type comprise a typed version of the Church numerals, the first few of which are:

0 := \Lambda \alpha . \lambda x^\alpha . \lambda f^{\alpha\to\alpha} . x
1 := \Lambda \alpha . \lambda x^\alpha . \lambda f^{\alpha\to\alpha} . f x
2 := \Lambda \alpha . \lambda x^\alpha . \lambda f^{\alpha\to\alpha} . f (f x)
3 := \Lambda \alpha . \lambda x^\alpha . \lambda f^{\alpha\to\alpha} . f (f (f x))

If we reverse the order of the curried arguments (i.e., \forall \alpha. (\alpha \rightarrow \alpha) \rightarrow \alpha \rightarrow \alpha), then the Church numeral for n is a function that takes a function f as argument and returns the nth power of f. That is to say, a Church numeral is a higher-order function -- it takes a single-argument function f, and returns another single-argument function.

Use in programming languages

The version of System F used in this article is as an explicitly typed, or Church-style, calculus. The typing information contained in λ-terms makes type-checking straightforward. Joe Wells (1994) settled an "embarrassing open problem" by proving that type checking is undecidable for a Curry-style variant of System F, that is, one that lacks explicit typing annotations. [1] [2]

Wells' result implies that type inference for System F is impossible. A restriction of System F known as "Hindley-Milner", or simply "HM", does have an easy type inference algorithm and is used for many strongly typed functional programming languages such as Haskell 98 and ML. Over time, as the restrictions of HM-style type systems have become apparent, languages have steadily moved to more expressive logics for their type systems. As of 2008, GHC, a Haskell compiler, goes beyond HM, and now uses System F extended with non-syntactic type equality, for example.

System Fω

Although System F corresponds to the first axis of the Barendregt's lambda cube, system Fω combines the first axis (polymorphism) with type operators (the second axis); it is a different, more complex system.

System Fω can be defined inductively on a family of systems, where induction is based on the kinds permitted in each system:

  • Fn permits kinds:
    • \star (the kind of types) and
    • J\Rightarrow K where J\in F_{n-1} and K\in F_n (the kind of functions from types to types, where the argument type is of a lower order)

In the limit, we can define system Fω to be

  • F_\omega = \underset{1 \leq i}{\bigcup} F_i

That is, Fω is the system which allows functions from types to types where the argument (and result) may be of any order.

Note that although Fω places no restrictions on the order of the arguments in these mappings, it does restrict the universe of the arguments for these mappings: they must be types rather than values. System Fω does not permit mappings from values to types (Dependent types), though it does permit mappings from values to values (λ abstraction), mappings from types to values (Λ abstraction, sometimes written \forall) and mappings from types to types (λ abstraction at the level of types)

References

  • Girard, Lafont and Taylor, Proofs and Types. Cambridge University Press, 1989, ISBN 0 521 37181 3.
  • J. B. Wells. "Typability and type checking in the second-order lambda-calculus are equivalent and undecidable." In Proceedings of the 9th Annual IEEE Symposium on Logic in Computer Science (LICS), pages 176-185, 1994. [3]

See also

Further reading

  • Pierce, Benjamin (2002). Types and Programming Languages. MIT Press. ISBN 0-262-16209-1. , Chapter 23: Universal Types, and Chapter 25: An ML Implementation of System F

External links


 
 

 

Copyrights:

Artist. Copyright © 2009 All Media Guide, LLC. Content provided by All Music Guide ®, a trademark of All Media Guide, LLC. All rights reserved.  Read more
Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "System F" Read more

 

Mentioned in