aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Martin-Dorel2019-02-25 13:16:45 +0100
committerErik Martin-Dorel2019-04-23 12:54:43 +0200
commit605d0e3e79fe1f654150c5ba14a1cbe3b5a0d78a (patch)
tree6670e9cf9e39f2bc06ccb329db96bcf40fdd0621
parentd9db4dec813a18b205f1cd9bccca54aa23524706 (diff)
[ssr] under(one-liner version): Do nf_betaiota in the last goal
As a result, the following: under i: eq_bigr by rewrite adnnC. (* ensure 1 Under subogal is created *) under i: eq_big by [rewrite adnnC | rewrite addnC]. (* 2 Under subgoals *) amounts to: under i: eq_bigr; [rewrite adnnC; over | cbv beta iota]. under i: eq_big; [rewrite adnnC; over | rewrite adnnC; over | cbv beta iota].
-rw-r--r--plugins/ssr/ssrfwd.ml4
-rw-r--r--test-suite/ssr/under.v3
2 files changed, 3 insertions, 4 deletions
diff --git a/plugins/ssr/ssrfwd.ml b/plugins/ssr/ssrfwd.ml
index 491d6cfb33..be2732513f 100644
--- a/plugins/ssr/ssrfwd.ml
+++ b/plugins/ssr/ssrfwd.ml
@@ -425,11 +425,13 @@ let undertac ist varnames ((dir,mult),_ as rule) hint =
if hint = nohint then
Proofview.tclUNIT ()
else
+ let betaiota = Tactics.reduct_in_concl (Reductionops.nf_betaiota, DEFAULTcast) in
Proofview.tclDISPATCH
((List.map (function None -> Proofview.V82.tactic overtac
| Some e -> ssrevaltac ist e <*>
Proofview.V82.tactic overtac)
- (if hint = nullhint then [None] else snd hint)) @ [Proofview.tclUNIT ()])
+ (if hint = nullhint then [None] else snd hint))
+ @ [betaiota])
in
(Proofview.V82.tactic (Ssrequality.ssrrewritetac ~under:true ~map_redex ist [rule]) <*>
intro_lock varnames <*> undertacs)
diff --git a/test-suite/ssr/under.v b/test-suite/ssr/under.v
index 7db2f2a982..9ce249124d 100644
--- a/test-suite/ssr/under.v
+++ b/test-suite/ssr/under.v
@@ -132,7 +132,6 @@ Lemma test_big_cosmetic (F G : nat -> nat) (m n : nat) :
\sum_(0 <= i < m) \sum_(0 <= j < n | odd j) (j + i).
Proof.
under a A: [RHS]eq_bigr by under b B: eq_bigr by []. (* renaming bound vars *)
-simpl.
myadmit.
Qed.
@@ -140,9 +139,7 @@ Lemma test_big_andb (F : nat -> nat) (m n : nat) :
\sum_(0 <= i < 5 | odd i && (i == 1)) i = 1.
Proof.
under i: eq_bigl by rewrite andb_idl; first by move/eqP->.
-simpl.
under i: eq_bigr by move/eqP=>{1}->. (* the 2nd occ should not be touched *)
-simpl.
myadmit.
Qed.