-1
Assumptions:
l: a < d

Goal: (s a /\ a < d) <-> s a

Here, I have an /\ with an assumed statement. The goal just needs l to be applied, but I cant seem to figure out the tactic. Apply, rewrite, and replace don't work.

John Targaryen
  • 1,109
  • 1
  • 13
  • 29

3 Answers3

0

rewrite would only work if a < d was a notation for an equality or an equivalence relation, but here I assume that is not the case.

tauto automatically solves your goal, as does easy, but I think you were asking for something less automatic.

It's a bit disappointing, but the best non-automatic proof I can come up with is to split your goal:

Goal forall a d s, a < d -> (s a /\ a < d) <-> s a.
Proof.
  intros a d s l.
  split.
  - intros [sa _].
    exact sa.
  - intros sa.
    split.
    + exact sa.
    + exact l.
Qed.

If you're interested in using rewrite for this kind of thing, the MathComp library defines things in ways that make rewrite the most useful tactic, and in particular it would work in a translated version of your goal. But probably the best short-term solution here is to make use of some automation tactics.

Ana Borges
  • 1,273
  • 7
  • 11
0

Using SSReflect/mathcomp, as mentioned by @ana-borges, one can indeed rewrite the Assumption l (which is what -> does); this can then be followed by a split, with a true in the conjunction.

From mathcomp Require Import all_ssreflect.

Goal forall a d s, a < d -> (s a /\ a < d) <-> s a.
Proof. move=> a d s ->; split=> [[sa _] //|sa]; exact: conj. Qed.

Maybe there is another shorter version, though.

Ana Borges
  • 1,273
  • 7
  • 11
Pierre Jouvelot
  • 901
  • 3
  • 13
0

I figured it out -- you just have to run propositional, which will evaluate such tautological logic automatically.

John Targaryen
  • 1,109
  • 1
  • 13
  • 29