如何在Coq中完成此证明

如何在Coq中完成此证明,coq,Coq,现在,验证窗口如下所示: 1 subgoals Case := "WHILE" : String.string b : bexp c : com IHc : forall st' st : state, optimize_0plus_com c / st || st' -> c / st || st' st : state st' : state st'' : state H0 : optimize_0plus_com c / st || st' IHceval1 : opti

现在,验证窗口如下所示:

1 subgoals
Case := "WHILE" : String.string
b : bexp
c : com
IHc : forall st' st : state,
      optimize_0plus_com c / st || st' -> c / st || st'
st : state
st' : state
st'' : state
H0 : optimize_0plus_com c / st || st'
IHceval1 : optimize_0plus_com c = optimize_0plus_com (WHILE b DO c END) ->
           (WHILE b DO c END) / st || st'
H : beval st (optimize_0plus_bexp b) = true
Heqloopdef : (WHILE optimize_0plus_bexp b DO optimize_0plus_com c END) =
             optimize_0plus_com (WHILE b DO c END)
H1 : (WHILE optimize_0plus_bexp b DO optimize_0plus_com c END) / st' || st''
IHceval2 : (WHILE optimize_0plus_bexp b DO optimize_0plus_com c END) =
           optimize_0plus_com (WHILE b DO c END) ->
           (WHILE b DO c END) / st' || st''
______________________________________(1/1)
(WHILE b DO c END) / st || st''

我觉得这应该很容易证明,但我就是不知道怎么做。上下文中的IHceval假设接近于我所需要的,但它们并不完全匹配。有人能帮我吗?

以下是我解决问题的方法:

apply E_WhileLoop with st'.
rewrite <- optimize_0plus_bexp_sound in H.
assumption.
apply IHc.
assumption.
apply IHceval2.
(*Look at the definition below*) reflexivity.

美好的但请注意,《软件基础》的作者希望,他们练习的解决方案不要发布在公共论坛上,因为这些解决方案可以作为大学课程的作业分配。当你从解决它的兴奋中恢复过来时,请删除?这个问题与软件基础有关,但它不是书中的练习之一。不过,为了安全起见,我改变了问题的措辞,使其与哪一部分相关的内容不那么清楚。
* match c with
  | SKIP => SKIP
  | i ::= a => i ::= optimize_0plus_aexp a
  | c1;; c2 => optimize_0plus_com c1;; optimize_0plus_com c2
  | IFB b THEN c1 ELSE c2 FI =>
      IFB optimize_0plus_bexp b THEN optimize_0plus_com c1
      ELSE optimize_0plus_com c2 FI
  | ********WHILE b DO c0 END =>
      WHILE optimize_0plus_bexp b DO optimize_0plus_com c0 END