4

For example in Coq there is rewrite and we can also put arrows `<-:

Inductive bool: Set :=
  | true
  | false.

Lemma equality_of_functions_commutes:
  forall (f: bool->bool) x y,
    (f x) = (f y) -> (f y) = (f x).
Proof.
  intros.
  rewrite H.
  reflexivity.
Qed.

source: https://pjreddie.com/coq-tactics/#rewrite

Charlie Parker
  • 5,884
  • 57
  • 198
  • 323

1 Answers1

3

I don't believe that it is as strong as the Coq version, but

rewrite theorems. However, you cannot easily rewrite assumptions in apply-style.

Mathias Fleury
  • 2,221
  • 5
  • 12
  • what about reflexivity? – Charlie Parker Mar 18 '20 at 20:15
  • The closest thing to reflexivity is probably `apply (simp (no_asm))`, but it is very unnatural to do use that instead of `apply simp`. – Mathias Fleury Mar 19 '20 at 05:16
  • This is merely a side remark: it seems that for Pinocchio's particular application it may be best to use `apply(rule refl)` or simply `..` instead of `simp (no_ams)` or `simp`, given that the two terms obtained as a result of the application of rewriting will be entirely identical. Of course, overall, it seems that `simp (no_asm)` is, indeed, as close as one can get to Coq's `reflexivity`. – user9716869 - supports Ukraine Mar 20 '20 at 14:10