Multi-level Contextual Type Theory
Mathieu Boespflug Brigitte Pientka
McGill University
26 August 2011
1 / 25
Multi-level Contextual Type Theory Mathieu Boespflug Brigitte - - PowerPoint PPT Presentation
Multi-level Contextual Type Theory Mathieu Boespflug Brigitte Pientka McGill University 26 August 2011 1 / 25 Motivating example Theory Conclusion 2 / 25 x . ( A [ x ]) B 3 / 25 x . ( A [ x ]) B x . ( A [ x ] B )
McGill University
1 / 25
2 / 25
3 / 25
3 / 25
3 / 25
3 / 25
4 / 25
5 / 25
6 / 25
7 / 25
8 / 25
9 / 25
10 / 25
11 / 25
12 / 25
13 / 25
13 / 25
14 / 25
15 / 25
◮ an open term where x can appear free... ◮ ... of type Πy:ι.o.
15 / 25
◮ Well-typed meta-terms do not go wrong on instantiation. ◮ Invariant 1: Meta-variables always associated with “stuck”
16 / 25
◮ Well-typed meta-terms do not go wrong on instantiation. ◮ Invariant 1: Meta-variables always associated with “stuck”
16 / 25
◮ Well-typed meta-terms do not go wrong on instantiation. ◮ Invariant 1: Meta-variables always associated with “stuck”
16 / 25
17 / 25
17 / 25
18 / 25
◮ From a schema of contexts lists to a context schema. ◮ From a schema of rules to a single rule.
19 / 25
◮ Single syntactic category of level-indexed variables. ◮ Can abstract at any level at any time.
20 / 25
◮ Invariant 2: context assumptions always in decreasing order
21 / 25
◮ Invariant 2: context assumptions always in decreasing order
◮ Chopping context at level n stays easy. ◮ Argument that metan-variables don’t depend on
21 / 25
22 / 25
22 / 25
◮ Usual structural properties. ◮ Substitution property.
◮ Termination of heredetary substitutions. ◮ Decidability of type checking.
23 / 25
◮ “A logical basis for explicit substitutions” (Pfenning, 2007)
◮ Multi-level logics of contexts (Giunchiglia, Serafini,
◮ Multi-level meta-variables (Sato et al, 2003)
◮ Lambda Context Calculus (Gabbay and Lengrand, 2007)
◮ “Open proofs and open types” (Geuvers and Gogjov, 2002)
◮ Staged computation, code generation (Davies and Pfenning,
24 / 25
◮ Uniform language for representing normal metan-terms.
25 / 25
◮ Uniform language for representing normal metan-terms.
◮ Implement it. ◮ Reasoning about programs conveniently and efficiently. ◮ Reasoning about Beluga in Beluga.
25 / 25