For my thesis I've needed to use strictly positive types to avoid the problems which can occur with types of the form: νD. D → D, which were discussed briefly in my post System F is Amazing. In order to ensure types are positive they should be restricted in some way. It is therefore convenient to have formation rules for types which ensure that we can't make bad types. My starting point was a wonderful paper by Andreas Abel and Thorsten Altenkirch [1] Specifically, this paper describes interleaved inductive types, which is close to what I want. However, I also want to be able to have polymorphism using ∀. Since I'm interested in becoming more familiar with Agda (a language in which I'm still a novice) I've written the following as a prototype of my type formation rules, as an experiment. First, we have to set up the appropriate libraries. module StrictlyPositive where open import Data . Nat open import Data . Bool open import Data . List ...
This is Gavin Mendel-Gleason's technical blog.