Skip to content

Commit 975c458

Browse files
committed
Fix for a new rapply tactic
This backwards compatible change makes math-classes work with rocq-prover/rocq#10760 by replacing all instances of `rapply` which were relying on typeclass resolution happening *before* `refine` (instead of simultaneously with it) to instead invoke `Tactics.rapply` (which is the same tactic in Coq <= 8.10, and which will be the tactic rather than the `uconstr`-taking tactic notation in Coq >= 8.11). See also rocq-prover/rocq#10760 (comment)
1 parent d84372f commit 975c458

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

implementations/nonneg_semiring_elements.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Proof. split. trivial. apply _. Qed.
6262

6363
(* Misc *)
6464
Global Instance NonNeg_trivial_apart `{!TrivialApart R} : TrivialApart (R⁺).
65-
Proof. intros x y. now rapply trivial_apart. Qed.
65+
Proof. intros x y. now Tactics.rapply trivial_apart. Qed.
6666

6767
Global Instance NonNeg_equiv_dec `{∀ x y : R, Decision (x = y)} : ∀ x y: R⁺, Decision (x = y)
6868
:= λ x y, decide_rel (=) ('x : R) ('y : R).

implementations/semiring_pairs.v

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Global Instance SRpair_equiv : Equiv (SRpair SR) | 4 := λ x y, pos x + neg y =
1717
Global Instance SRpair_apart `{Apart SR} : Apart (SRpair SR) := λ x y, pos x + neg y ≶ pos y + neg x.
1818

1919
Global Instance SRpair_trivial_apart `{!TrivialApart SR} : TrivialApart (SRpair SR).
20-
Proof. intros x y. now rapply trivial_apart. Qed.
20+
Proof. intros x y. now Tactics.rapply trivial_apart. Qed.
2121

2222
Instance: Setoid (SRpair SR).
2323
Proof.
@@ -256,7 +256,7 @@ Section with_full_pseudo_semiring_order.
256256
setoid_replace (zp + yn + xn) with (zp + xn + yn) by ring.
257257
setoid_replace (yp + zn + xn) with (zn + (yp + xn)) by ring.
258258
eassumption.
259-
intros [??] [??]. now rapply tight_apart.
259+
intros [??] [??]. now Tactics.rapply tight_apart.
260260
Qed.
261261

262262
Instance: FullPseudoOrder SRpair_le SRpair_lt.
@@ -273,8 +273,8 @@ Section with_full_pseudo_semiring_order.
273273
setoid_replace (zp + yn + xn) with (zp + xn + yn) by ring.
274274
setoid_replace (yp + zn + xn) with (zn + (yp + xn)) by ring.
275275
eassumption.
276-
intros [??] [??]. now rapply apart_iff_total_lt.
277-
intros [??] [??]. now rapply le_iff_not_lt_flip.
276+
intros [??] [??]. now Tactics.rapply apart_iff_total_lt.
277+
intros [??] [??]. now Tactics.rapply le_iff_not_lt_flip.
278278
Qed.
279279

280280
Instance: ∀ z : SRpair SR, StrongSetoid_Morphism (z *.).

theory/ring_congruence.v

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ Section quotient_ring.
4848
Qed.
4949

5050
Instance: Proper ((=) ==> (=) ==> (=)) quotient_plus.
51-
Proof. intros [?] [?] E1 [?] [?] E2. now rapply ring_congr_plus. Qed.
51+
Proof. intros [?] [?] E1 [?] [?] E2. now Tactics.rapply ring_congr_plus. Qed.
5252

5353
Instance: Proper ((=) ==> (=) ==> (=)) quotient_mult.
54-
Proof. intros [?] [?] E1 [?] [?] E2. now rapply ring_congr_mult. Qed.
54+
Proof. intros [?] [?] E1 [?] [?] E2. now Tactics.rapply ring_congr_mult. Qed.
5555

5656
Instance: Proper ((=) ==> (=)) quotient_negate.
57-
Proof. intros [?] [?] E. now rapply ring_congr_negate. Qed.
57+
Proof. intros [?] [?] E. now Tactics.rapply ring_congr_negate. Qed.
5858

5959
Global Instance: Setoid_Morphism quotient_inject.
60-
Proof. split; try apply _. intros ?? E. now rapply ring_congr_subrelation. Qed.
60+
Proof. split; try apply _. intros ?? E. now Tactics.rapply ring_congr_subrelation. Qed.
6161

6262
Global Instance: Ring (Quotient A R).
6363
Proof.

0 commit comments

Comments
 (0)