FPCA '89 Proceedings of the fourth international conference on Functional programming languages and computer architecture
Relational parametricity and units of measure
Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Structure and interpretation of classical mechanics
Structure and interpretation of classical mechanics
Types and programming languages
Types and programming languages
ESOP '94 Proceedings of the 5th European Symposium on Programming: Programming Languages and Systems
Polymorphism is Set Theoretic, Constructively
Category Theory and Computer Science
High-Level Methods for Quantum Computation and Information
LICS '04 Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science
Proofs for free: Parametricity for dependent types
Journal of Functional Programming
Abstraction and invariance for algebraically indexed types
POPL '13 Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A relationally parametric model of dependent type theory
Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
Hi-index | 0.00 |
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.