Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save adamsmasher/ff49a50d8d12248abe77 to your computer and use it in GitHub Desktop.
Save adamsmasher/ff49a50d8d12248abe77 to your computer and use it in GitHub Desktop.
(* based on Pottier and Conchon, Information
Flow Inference for Free *)
Require Import Autosubst.
(* as in the original paper, for now we leave
the set of labels entirely abstract *)
Inductive term {label : Set} : Type :=
| Const (k : nat)
| Var (x : var)
| Abs (s : {bind term})
| App (s t : term)
| Let (s : term) (t : {bind term})
| Label (s : term) (l : label).
Instance Ids_term (label : Set) : Ids (term (label := label)). derive. Defined.
Instance Rename_term (label : Set) : Rename (term (label := label)). derive. Defined.
Instance Subst_type (label : Set) : Subst (term (label := label)). derive. Defined.
(* does not derive: produces "Error: Tactic failure" *)
Instance SubstLemmas_term (label : Set) : SubstLemmas (term (label := label)). derive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment