Abstract
Invariance is of paramount importance in programming languages and in physics. In programming languages, John Reynolds' theory of relational parametricity demonstrates that parametric polymorphic programs are invariant under change of data representation, a property that yields "free" theorems about programs just from their types. In physics, Emmy Noether showed that if the action of a physical system is invariant under change of coordinates, then the physical system has a conserved quantity: a quantity that remains constant for all time. Knowledge of conserved quantities can reveal deep properties of physical systems. For example, the conservation of energy is by Noether's theorem a consequence of a system's invariance under time-shifting.
In this paper, we link Reynolds' relational parametricity with Noether's theorem for deriving conserved quantities. We propose an extension of System F$\omega$ with new kinds, types and term constants for writing programs that describe classical mechanical systems in terms of their Lagrangians. We show, by constructing a relationally parametric model of our extension of F$\omega$, that relational parametricity is enough to satisfy the hypotheses of Noether's theorem, and so to derive conserved quantities for free, directly from the polymorphic types of Lagrangians expressed in our system.
Supplemental Material
- S. Abramsky. High-Level Methods for Quantum Computation and Information. Proceedings, LICS, 2004. Google Scholar
Digital Library
- V. I. Arnol'd. Mathematical Methods of Classical Mechanics. Springer, 1989.Google Scholar
Cross Ref
- R. Atkey. Relational Parametricity for Higher Kinds. Proceedings, CSL, 2012.Google Scholar
- R. Atkey, N. Ghani, and P. Johann. A Relationally Parametric Model of Dependent Type Theory. Proceedings, POPL, 2014. Google Scholar
Digital Library
- R. Atkey, P. Johann, and A. J. Kennedy. Abstraction and Invariance for Algebraically Indexed Types.Proceedings, POPL, 2013. Google Scholar
Digital Library
- J.-P. Bernardy, P. Jansson, R. Paterson.Proofs for Free: Parametricity for Dependent Types. Journal of Functional Programming 22(2), pp. 107--152, 2012. Google Scholar
Digital Library
- I. M. Gelfand and S. V. Fomin, R. A. Silverman (ed.). Calculus of Variations. Dover Publications, 2000.Google Scholar
- A. Gundry. Type Inference for Units of Measure. Technical Report, University of Strathclyde, 2011.Google Scholar
- R. Hasegawa. Relational Limits in General Polymorphism. Publications of the Research Institute for Mathematical Sciences 30, pp. 535--576, 1994.Google Scholar
- A. J. Kennedy. Dimension Types.Proceedings, ESOP, 1994. Google Scholar
Digital Library
- A. J. Kennedy. Relational Parametricity and Units of Measure.Proceedings, POPL, pp. 442--455, 1997. Google Scholar
Digital Library
- L. D. Landau and E. M. Lifschitz. Mechanics. Pergamon Press. 1967.Google Scholar
- D. E. Neuenschwander. Emmy Noether's Wonderful Theorem.The John Hopkins University Press, 2011.Google Scholar
- E. Noether, M. Tavel (translator). Invariant Variation Problems. Transport Theory and Statistical Physics 1(3), pp. 186--207, 1971. Original in Gott. Nachr., 1918:235--257, 1918.Google Scholar
Cross Ref
- S. Mac Lane. Categories for the Working Mathematician, 2nd edition. Springer, 1998.Google Scholar
- B. Pierce. Types and Programming Languages. MIT Press, 2002. Google Scholar
Digital Library
- A. M. Pitts. Polymorphism is Set Theoretic, Constructively. Proc., Category Theory and Computer Science, pp. 12--39, 1987. Google Scholar
Digital Library
- J. C. Reynolds. Types, Abstraction and Parametric Polymorphism. Information Processing 83, pp. 513--523, 1983.Google Scholar
- E. Robinson and G. Rosolini. ReflexiveGraphs and Parametric Polymorphism. Proc., Logic in Computer Science, pp. 364--371, 1994.Google Scholar
- G. J. Sussman and J. Wisdom. Structure and Interpretation of Classical Mechanics. MIT Press, 2001 Google Scholar
Digital Library
- The Univalent Foundations Program. Homotopy Type Theory. Institute for Advanced Study, 2013.Google Scholar
- P. Wadler. Theorems for Free!. Proceedings, FPCA, pp. 347--359, 1989. Google Scholar
Digital Library
Index Terms
From parametricity to conservation laws, via Noether's theorem
Recommendations
From parametricity to conservation laws, via Noether's theorem
POPL '14: Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming LanguagesInvariance is of paramount importance in programming languages and in physics. In programming languages, John Reynolds' theory of relational parametricity demonstrates that parametric polymorphic programs are invariant under change of data ...
Relational parametricity for references and recursive types
TLDI '09: Proceedings of the 4th international workshop on Types in language design and implementationWe present a possible world semantics for a call-by-value higher-order programming language with impredicative polymorphism, general references, and recursive types. The model is one of the first relationally parametric models of a programming language ...
A relationally parametric model of dependent type theory
POPL '14Reynolds' theory of relational parametricity captures the invariance of polymorphically typed programs under change of data representation. Reynolds' original work exploited the typing discipline of the polymorphically typed lambda-calculus System F, ...







Comments