Keeping information when using induction?

前端 未结 3 1587
[愿得一人]
[愿得一人] 2020-12-29 07:44

I am using the Coq Proof Assistant to implement a model of a (small) programming language (extending an implementation of Featherweight Java by Bruno De Fraine, Erik Ernst,

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-29 08:25

    I was sure CPDT had some commentary on this issue, but it's not entirely obvious where it is. Here are some links:

    1. http://adam.chlipala.net/cpdt/html/Cpdt.Predicates.html Section "Predicates with Implicit Equality" shows perhaps the very simplest case where Coq "loses information" (on a destruct, rather than an induction.) It also explains WHY this information is lost: when you destruct a type applied to an argument which is not a free variable, those types are replaced with free variables first (which is why Coq loses the information.)

    2. http://adam.chlipala.net/cpdt/html/Cpdt.Universes.html Section "Methods for Avoiding Axioms" shows some tricks for avoiding axiom K, including the "equality trick" described by Gilles. Search for "using a common equality-based trick for supporting induction on non-variable arguments to type families"

    I think that this phenomenon is closely related to dependent pattern matching.

提交回复
热议问题