Skip to content

Commit

Permalink
Adapt to coq/coq#18590
Browse files Browse the repository at this point in the history
  • Loading branch information
proux01 authored and liyishuai committed Feb 1, 2024
1 parent 5b8f234 commit 2b9b50d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
6 changes: 4 additions & 2 deletions theories/Programming/Eqv.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ Class Eqv T := eqv : T -> T -> Prop.
Definition neg_eqv {T} {E:Eqv T} (x:T) (y:T) : Prop := not (eqv x y).

Class EqvWF T :=
{ eqvWFEqv :> Eqv T
; eqvWFEquivalence :> Equivalence eqv
{ eqvWFEqv : Eqv T
; eqvWFEquivalence : Equivalence eqv
}.
#[global] Existing Instance eqvWFEqv.
#[global] Existing Instance eqvWFEquivalence.
#[global]
Instance EqvWF_Build {T} {E:Eqv T} {EV:Equivalence eqv} : EqvWF T :=
{ eqvWFEqv := E ; eqvWFEquivalence := EV }.
Expand Down
6 changes: 4 additions & 2 deletions theories/Programming/Le.v
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ Proof. constructor.
Qed.

Class LteWF T :=
{ lteWFLte :> Lte T
; lteWFPreOrder :> PreOrder lte
{ lteWFLte : Lte T
; lteWFPreOrder : PreOrder lte
}.
#[global] Existing Instance lteWFLte.
#[global] Existing Instance lteWFPreOrder.

#[global]
Instance LteWF_Build {T} {L:Lte T} {PO:PreOrder lte} : LteWF T :=
Expand Down
9 changes: 6 additions & 3 deletions theories/Structures/Monoid.v
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ Section Monoid.
}.

Class MonoidLaws@{} (M : Monoid) : Type :=
{ monoid_assoc :> Associative M.(monoid_plus) eq
; monoid_lunit :> LeftUnit M.(monoid_plus) M.(monoid_unit) eq
; monoid_runit :> RightUnit M.(monoid_plus) M.(monoid_unit) eq
{ monoid_assoc : Associative M.(monoid_plus) eq
; monoid_lunit : LeftUnit M.(monoid_plus) M.(monoid_unit) eq
; monoid_runit : RightUnit M.(monoid_plus) M.(monoid_unit) eq
}.
#[global] Existing Instance monoid_assoc.
#[global] Existing Instance monoid_lunit.
#[global] Existing Instance monoid_runit.

End Monoid.

0 comments on commit 2b9b50d

Please sign in to comment.