forked from coq/coq
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport PR coq#15577: Pass more complete cstr in Rewrite.transitivit…
…y strategy
- Loading branch information
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- **Fixed:** | ||
:tacn:`rewrite_strat` regression in 8.15.0 related to `Transitive` instances | ||
(`#15577 <https://github.com/coq/coq/pull/15577>`_, | ||
fixes `#15568 <https://github.com/coq/coq/issues/15568>`_, | ||
by Gaëtan Gilbert). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Require Import Coq.ZArith.BinInt. | ||
Require Import Coq.Classes.RelationClasses. | ||
|
||
Axiom mod_mod : forall a b : Z, Z.modulo (Z.modulo b a) a = Z.modulo b a. | ||
|
||
#[global] Hint Rewrite Z.add_0_r mod_mod : bu. | ||
|
||
Definition modEq (d:Z) := fun (a b :Z)=> Z.modulo a d = Z.modulo b d. | ||
|
||
#[global] Instance modEqR (d:Z): Reflexive (modEq d). Admitted. | ||
#[global] Instance modEqT (d:Z): Transitive (modEq d). Admitted. | ||
|
||
Lemma foo d a e : (a mod d)%Z = e -> Z.modulo (Z.modulo a d + 0) d = e. | ||
Proof. | ||
intro H. | ||
rewrite_strat try (bottomup (hints bu)). (* Should not fail. *) | ||
exact H. | ||
Qed. |