leanprover / lean3

Lean Theorem Prover
http://leanprover.github.io/
Apache License 2.0
2.15k stars 215 forks source link

`rec` based compilation in the equation compiler #1611

Open leodemoura opened 7 years ago

leodemoura commented 7 years ago

The equation compiler currently supports the following compilation strategies

However, none of the compilation approaches can be used when proving lemmas for inductive predicates. We cannot use brec_on because, in general, we cannot define the auxiliary type below for an inductive predicate. The issue is that most inductive predicates can only eliminate into Prop. So, we need another compilation strategy which uses the rec recursor instead of the more general brec_on.

Until this feature is implemented, users must use tactics to prove lemmas about inductive predicates.

leodemoura commented 7 years ago

The compilation strategy based on the primitive recursor rec is also useful when handling reflexive types. See #1620