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

Unclear error message "input has no global reference" #366

Open
Tragicus opened this issue Jun 14, 2023 · 0 comments
Open

Unclear error message "input has no global reference" #366

Tragicus opened this issue Jun 14, 2023 · 0 comments

Comments

@Tragicus
Copy link

Tragicus commented Jun 14, 2023

As mentioned in the corresponding Zulip thread, the following code fails with the error "term->gref: input has no global reference", which is not very clear. Here, id should be replaced by idfun.

From HB Require Import structures.
From mathcomp Require Import ssrbool ssrfun.
Require Import preliminaries.

Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.

Declare Scope rel_scope.

HB.mixin Record hasRel T := { rel_op : rel T }.

#[mathcomp, short(type="relType")]
HB.structure Definition Relation := { T of hasRel T }.

Definition sub_relation (T U : relType) (f : T -> U) :=
  ((injective f) * {mono f : x y / rel_op x y})%type.

HB.mixin Record isSubRel (T U : relType) (f : T -> U) := {
  sub_relation_subproof : sub_relation f;
}.

#[infer(T,U),mathcomp(axiom="sub_relation")]
HB.structure Definition SubRel (T U : relType) :=
  {f of @isSubRel T U f}.

Fail HB.instance Definition _ (T : relType) :=
  (isSubRel.Build T T (id : T -> T) (conj (@inj_id T) (@mono_id T bool rel_op))).
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

1 participant