diff options
author | Matthieu Sozeau <mattam@mattam.org> | 2016-03-14 11:16:19 +0100 |
---|---|---|
committer | Matthieu Sozeau <mattam@mattam.org> | 2016-06-16 18:21:08 +0200 |
commit | d4a421e57d74d305a797897f43ce216fb4c39719 (patch) | |
tree | e1f8d60abddc2b4d93844b7fca8400380e268f95 /theories/Numbers | |
parent | 0767b8eace843ee45f2f3fc2b80a13ce6ed336c7 (diff) |
Typeclasses: stdlib fixes for new search algorithm
Diffstat (limited to 'theories/Numbers')
-rw-r--r-- | theories/Numbers/NatInt/NZGcd.v | 4 | ||||
-rw-r--r-- | theories/Numbers/Rational/SpecViaQ/QSig.v | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/theories/Numbers/NatInt/NZGcd.v b/theories/Numbers/NatInt/NZGcd.v index 1d3672943..7564c2061 100644 --- a/theories/Numbers/NatInt/NZGcd.v +++ b/theories/Numbers/NatInt/NZGcd.v @@ -60,7 +60,9 @@ Proof. intros n. exists 0. now nzsimpl. Qed. -Hint Rewrite divide_1_l divide_0_r : nz. +(* MS: These rewrites apply to any subterm of type Z, do not try + them automatically *) +(* Hint Rewrite divide_1_l divide_0_r : nz. *) Lemma divide_0_l : forall n, (0 | n) -> n==0. Proof. diff --git a/theories/Numbers/Rational/SpecViaQ/QSig.v b/theories/Numbers/Rational/SpecViaQ/QSig.v index a40d94059..8e20fd060 100644 --- a/theories/Numbers/Rational/SpecViaQ/QSig.v +++ b/theories/Numbers/Rational/SpecViaQ/QSig.v @@ -115,7 +115,10 @@ Ltac solve_wd2 := intros x x' Hx y y' Hy; qify; now rewrite Hx, Hy. Local Obligation Tactic := solve_wd2 || solve_wd1. Instance : Measure to_Q. -Instance eq_equiv : Equivalence eq := {}. +Instance eq_equiv : Equivalence eq. +Proof. + change eq with (RelCompFun Qeq to_Q); apply _. +Defined. Program Instance lt_wd : Proper (eq==>eq==>iff) lt. Program Instance le_wd : Proper (eq==>eq==>iff) le. @@ -141,7 +144,10 @@ Proof. intros. qify. destruct (Qcompare_spec [x] [y]); auto. Qed. (** Let's implement [TotalOrder] *) Definition lt_compat := lt_wd. -Instance lt_strorder : StrictOrder lt := {}. +Instance lt_strorder : StrictOrder lt. +Proof. + change lt with (RelCompFun Qlt to_Q); apply _. +Qed. Lemma le_lteq : forall x y, x<=y <-> x<y \/ x==y. Proof. intros. qify. apply Qle_lteq. Qed. |