Coq-Equations icon indicating copy to clipboard operation
Coq-Equations copied to clipboard

Failure to derive NoConfusionHom

Open co-dan opened this issue 4 years ago • 1 comments

Sorry for a non-informative title. I stumbled upon this trying to add another constructor to the type o intristically-typed expressions in examples/definterp.v. I added the following constructor:

| Y {Γ} {t} : Expr Γ (t ⇒ t)

It made Derive NoConfusionHom for Expr fail (not completely fail, but leaving some goals unsolved).

Here is a minimized example showcasing the problem:

From Equations Require Import Equations.
Set Transparent Obligations.

Inductive ty :=
| tunit
| tarr (t1 t2 : ty)
.

Derive NoConfusion EqDec for ty.

Inductive tm : ty -> Type :=
| N : tm tunit
| T {t} : tm (tarr t t)
.

Derive Signature NoConfusion NoConfusionHom for tm.
(* Expectation : the previos vernacular solves all the goals *)

co-dan avatar Jul 11 '21 11:07 co-dan

I think you need UIP to derive this as you have a non-linear pattern (tarr t t) in your index.

mattam82 avatar Nov 26 '21 10:11 mattam82