Skip to content

Commit

Permalink
Work around bug #5453
Browse files Browse the repository at this point in the history
This is https://coq.inria.fr/bugs/show_bug.cgi?id=5453, Bogus error
message "Error: foo depends on the variable x which is not declared in
the context." (issue with subst and proof using)
  • Loading branch information
JasonGross committed Apr 4, 2017
1 parent 331fe3f commit 0529211
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ModularArithmetic/BarrettReduction/Z.v
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Section barrett.
Proof using a_nonneg a_small k_good m_good n_pos n_reasonable q.
Hint Rewrite (Z.mul_div_eq' a n) using lia : zstrip_div.
assert (a mod n < n) by auto with zarith lia.
subst r; rewrite (proj2_sig q_nice); generalize (proj1_sig q_nice); intro; subst q m.
unfold r; rewrite (proj2_sig q_nice); generalize (proj1_sig q_nice); intro; subst q m.
autorewrite with push_Zmul zsimplify zstrip_div.
break_match; auto with lia.
Qed.
Expand Down
2 changes: 1 addition & 1 deletion src/ModularArithmetic/BarrettReduction/ZGeneralized.v
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Section barrett.
Proof using a_nonneg a_small base_good k_big_enough m_good n_large n_pos n_reasonable offset_nonneg q.
Hint Rewrite (Z.mul_div_eq' a n) using lia : zstrip_div.
assert (a mod n < n) by auto with zarith lia.
subst r; rewrite (proj2_sig q_nice); generalize (proj1_sig q_nice); intro; subst q m.
unfold r; rewrite (proj2_sig q_nice); generalize (proj1_sig q_nice); intro; subst q m.
autorewrite with push_Zmul zsimplify zstrip_div.
break_match; auto with lia.
Qed.
Expand Down

0 comments on commit 0529211

Please sign in to comment.