I know how to prove 3 + 2 = 5 using Imp, defined in Software Foundations, Volume 1.
Definition plus2_3_is_5: Prop := forall (st: state),
(X !-> 3) =[ <{ X := X + 2 }> ]=> st -> st X = 5.
Fact plus2_3_is_5_fact : plus2_3_is_5.
Proof.
intros st H.
inversion H. subst. simpl.
apply t_update_eq. (* or use [reflexivity] *)
Qed.
But when I define plus2_3_is_5 to be (X !-> 3) =[ <{ X := X + 2 }> ]=> (X !-> 5), I couldn't find the proof. Can anyone help on this?
When I use the proposition
forall (st: state),
(X !-> 3) =[ <{ X := X + 2 }> ]=> st -> st X = 5.
to express 3 + 2 = 5, I could get the proof correctly. But when I use the apparently simpler proposition
(X !-> 3) =[ <{ X := X + 2 }> ]=> (X !-> 5)
instead, every tactic I tried, such as apply E_Asgn, apply t_update_eq, failed.
I got the solution with the help of ayylien.