encyclopegia.org

Parametricity

In programming language theory, parametricity is an abstract uniformity property enjoyed by parametrically polymorphic functions, which captures the intuition that all instances of a polymorphic function act the same way.

In programming language theory, parametricity is an abstract uniformity property enjoyed by parametrically polymorphic functions, which captures the intuition that all instances of a polymorphic function act the same way. Consider this example, based on a set X and the type T(X) = [X → X] of functions from X to itself. The higher-order function twice X : T(X) → T(X) given by twice X (f) = f ∘ f, is intuitively independent of the set X. The family of all such functions twice X , parametrized by sets X, is called a "parametrically polymorphic function". We simply write twice for the entire family of these functions and write its type as \forall X. T(X) → T(X). The individual functions twice X are called the components or instances of the polymorphic function. Notice that all the component functions twice X act "the same way" because they are given by the same rule. Other families of functions obtained by picking one arbitrary function from each T(X) → T(X) would not have such uniformity. They are called "ad hoc polymorphic functions". Parametricity is the abstract property enjoyed by the uniformly acting families such as twice, which distinguishes them from ad hoc families. With an adequate formalization of parametricity, it is possible to prove that the parametrically polymorphic functions of type \forall X. T(X) → T(X) are one-to-one with natural numbers. The function corresponding to the natural number n is given by the rule f \mapsto f n , i.e., the polymorphic Church numeral for n. In contrast, the collection of all ad hoc families would be too large to be a set.

References

  1. Reynolds, J.C. Types, abstraction, and parametric polymorphism . 1983. · retrieved 2025-08-09 · rev 1305144130
    Cite this reference

    MLA "Reynolds, J.C. Types, abstraction, and parametric polymorphism . 1983." Reynolds, J. 2025-08-09. https://en.wikipedia.org/w/index.php?oldid=1305144130. Accessed 24 November 2026.

    Chicago "Reynolds, J.C. Types, abstraction, and parametric polymorphism . 1983." Reynolds, J. 2025-08-09. https://en.wikipedia.org/w/index.php?oldid=1305144130.

    APA Reynolds, J. (2025). Reynolds, J.C. Types, abstraction, and parametric polymorphism . 1983. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1305144130

  2. Wadler, Philip. Theorems for free! . September 1989. · retrieved 2025-08-09 · rev 1305144130
    Cite this reference

    MLA "Wadler, Philip. Theorems for free! . September 1989." Wadler, Philip. 2025-08-09. https://en.wikipedia.org/w/index.php?oldid=1305144130. Accessed 24 November 2026.

    Chicago "Wadler, Philip. Theorems for free! . September 1989." Wadler, Philip. 2025-08-09. https://en.wikipedia.org/w/index.php?oldid=1305144130.

    APA Wadler, Philip. (2025). Wadler, Philip. Theorems for free! . September 1989. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1305144130

  3. Johann, Patricia. Free theorems in the presence of seq . January 2004. · retrieved 2025-08-09 · rev 1305144130
    Cite this reference

    MLA "Johann, Patricia. Free theorems in the presence of seq . January 2004." Johann, Patricia. 2025-08-09. https://en.wikipedia.org/w/index.php?oldid=1305144130. Accessed 24 November 2026.

    Chicago "Johann, Patricia. Free theorems in the presence of seq . January 2004." Johann, Patricia. 2025-08-09. https://en.wikipedia.org/w/index.php?oldid=1305144130.

    APA Johann, Patricia. (2025). Johann, Patricia. Free theorems in the presence of seq . January 2004. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1305144130

Cite this article

MLA

"Parametricity." encyclopegia.org, 2025, https://encyclopegia.org/wiki/parametricity. Accessed 24 November 2026.

Chicago

"Parametricity." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/parametricity.

APA

encyclopegia.org. (2025). Parametricity. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/parametricity

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1305144130 · 0.5 · snapshot enwiki-001305144130

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.