Skip to content

Instantly share code, notes, and snippets.

@chdoc

chdoc/notation.v Secret

Created July 16, 2020 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chdoc/f50c3a15c41e92ec0ac89112f1e18fbe to your computer and use it in GitHub Desktop.
Save chdoc/f50c3a15c41e92ec0ac89112f1e18fbe to your computer and use it in GitHub Desktop.
Notation lost on import when using HB.structure
Require Import RelationClasses Morphisms Relation_Definitions.
From HB Require Import structures.
Module M1.
HB.mixin Record Setoid_of_Type A :=
{ eqv : relation A; Eqv : Equivalence eqv }.
HB.structure Definition Setoid := { A of Setoid_of_Type A }.
Declare Scope setoid_scope.
Infix "≡" := eqv (at level 79) : setoid_scope.
Open Scope setoid_scope.
Global Existing Instance Eqv.
Goal forall (X : Setoid.type) (x : X), x ≡ x. Abort. (* OK *)
HB.mixin Record ComMonoid_of_Setoid A of Setoid_of_Type A :=
{ cm_id : A; cm_op : A -> A -> A; cm_laws : True }.
HB.structure Definition ComMonoid := { A of ComMonoid_of_Setoid A & }.
Goal forall (X : Setoid.type) (x : X), x ≡ x. Abort. (* OK *)
End M1.
Import M1.
Goal forall (X : Setoid.type) (x : X), x ≡ x.
(* forall (X : setoid) (x : X), Elabel.eqv x x *)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment