Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack overflow with UIP #498

Open
laMudri opened this issue Jul 12, 2022 · 2 comments
Open

Stack overflow with UIP #498

laMudri opened this issue Jul 12, 2022 · 2 comments

Comments

@laMudri
Copy link

laMudri commented Jul 12, 2022

I was minifying some code to debug an error Equations was giving me, and instead found a bug. Incidentally, I believe this should be possible without a global UIP, because everything in sight is a set, but I couldn't get it to work.

From Equations Require Import Equations.
Set Equations With UIP.

Variant ty : Type :=
| val (A : nat).
Derive NoConfusion EqDec for ty.

Variant Node : ty -> ty -> Type :=
| bar {A} : Node A A.
Derive NoConfusion for Node.

Variant Is_bar : forall {Ga De}, Node Ga De -> Type :=
| bar_is_bar {A} : Is_bar (@bar A).

Equations Is_bar_prop {Ga De n} (x y : @Is_bar Ga De n) : x = y :=
| bar_is_bar, bar_is_bar => eq_refl.

Result of checking the last definition:

Error: Stack overflow.

ocaml version 4.13.1; coq version 8.15.1; coq-equations version 1.3+8.15

@laMudri
Copy link
Author

laMudri commented Jul 12, 2022

If, instead of Derive NoConfusion for Node., I do Derive Signature NoConfusionHom for Node., I get a different error at the last definition:

Anomaly
"Uncaught exception Failure("Could not generate a permutation: irreducible inaccessible")."
Please report at http://coq.inria.fr/bugs/.

@mattam82
Copy link
Owner

Interesting errors :) I'll have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants