diff options
author | Jacques-Henri Jourdan <jacques-henri.jourdan@normalesup.org> | 2021-10-03 18:42:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-03 18:42:50 +0200 |
commit | 990c96e18ca31781484f558d46c94537b5ec59cf (patch) | |
tree | d4b610952733c6d2dfcf674cb289e74c1624f038 /MenhirLib/Validator_classes.v | |
parent | a2a2529d78b86ece65cfc03fa8670538b85bc991 (diff) | |
download | compcert-kvx-990c96e18ca31781484f558d46c94537b5ec59cf.tar.gz compcert-kvx-990c96e18ca31781484f558d46c94537b5ec59cf.zip |
Synchronize vendored MenhirLib with upstream (#416)
It remains compatible with earlier Menhir versions.
Diffstat (limited to 'MenhirLib/Validator_classes.v')
-rw-r--r-- | MenhirLib/Validator_classes.v | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/MenhirLib/Validator_classes.v b/MenhirLib/Validator_classes.v index 781a6aa6..cced28ac 100644 --- a/MenhirLib/Validator_classes.v +++ b/MenhirLib/Validator_classes.v @@ -19,26 +19,26 @@ Class IsValidator (P : Prop) (b : bool) := is_validator : b = true -> P. Global Hint Mode IsValidator + - : typeclass_instances. -Instance is_validator_true : IsValidator True true. +Global Instance is_validator_true : IsValidator True true. Proof. done. Qed. -Instance is_validator_false : IsValidator False false. +Global Instance is_validator_false : IsValidator False false. Proof. done. Qed. -Instance is_validator_eq_true b : +Global Instance is_validator_eq_true b : IsValidator (b = true) b. Proof. done. Qed. -Instance is_validator_and P1 b1 P2 b2 `{IsValidator P1 b1} `{IsValidator P2 b2}: +Global Instance is_validator_and P1 b1 P2 b2 `{IsValidator P1 b1} `{IsValidator P2 b2}: IsValidator (P1 /\ P2) (if b1 then b2 else false). Proof. by split; destruct b1, b2; apply is_validator. Qed. -Instance is_validator_comparable_leibniz_eq A (C:Comparable A) (x y : A) : +Global Instance is_validator_comparable_leibniz_eq A (C:Comparable A) (x y : A) : ComparableLeibnizEq C -> IsValidator (x = y) (compare_eqb x y). Proof. intros ??. by apply compare_eqb_iff. Qed. -Instance is_validator_comparable_eq_impl A `(Comparable A) (x y : A) P b : +Global Instance is_validator_comparable_eq_impl A `(Comparable A) (x y : A) P b : IsValidator P b -> IsValidator (x = y -> P) (if compare_eqb x y then b else true). Proof. |