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

Anomaly "in Univ.repr: Universe file.v.1700 undefined." #614

Open
yiyunliu opened this issue Aug 26, 2024 · 0 comments
Open

Anomaly "in Univ.repr: Universe file.v.1700 undefined." #614

yiyunliu opened this issue Aug 26, 2024 · 0 comments

Comments

@yiyunliu
Copy link

Here's my best effort attempt at minimizing the example:

From Equations Require Import Equations.

Inductive Ki : Type :=
  | Star : Ki.

Inductive Ty : Type :=
  | VarTy : Ty
  | TyFun : Ty -> Ty.

Derive NoConfusion for Ty Ki.

Inductive TyWt : Ty -> Ki -> Type :=
| TyT_One A :
  TyWt A Star ->
  TyWt (TyFun A) Star.

Definition F : Type := True.

Inductive Wt : Ty -> Type :=
| T_App A  :
  F ->
  Wt (TyFun A) ->
  Wt A.

Lemma regularity A (h : Wt A) : TyWt A Star.
  induction h.
  inversion IHh. subst.
  apply H0.
Defined.

Fail Equations regularity' {A} (h : Wt A) : TyWt A Star :=
regularity' (T_App A _ ha)
  with regularity' ha  := { | TyT_One A h0 => h0}.

The anomaly goes away if I make one of the following modifications:

  • Remove F from the T_App constructor
  • Remove the VarTy constructor from the Ty inductive type
  • Replace the h0 in the last line with an underscore. Equations solves the obligation automatically but the resulting definition can't be unfolded by simp.

I'm running coq-8.19.2 and coq-equations 1.3+8.19

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
@yiyunliu and others