PL 2020-2 QE Proof


original question



Claim : \{ Q' | \exists \alpha\in Act . Q \xrightarrow{\alpha} Q' \} \to sort (Q') \subseteq sort(Q)

Proof by induct on Q:

  • Q \equiv 0 :

    the goal become \{ Q' | \exists \alpha\in Act . 0 \xrightarrow{\alpha} Q' \} \to sort(Q') \subseteq sort(0) ,In this case by inversion precedence in goal with respect to rule Prefix we can know, Q' can only be 0 and at this time claim holds

  • Q \equiv \alpha.P:

    by rewriting the second definition of sort, then the goal become:

    \{ Q' | \exists \alpha' \in Act . ~ \alpha.P \xrightarrow{\alpha'} Q' \} \to sort(Q') \subseteq (\{\alpha\} -\{*\}) \cup sort(P) .

    by rule Prefix we can know, Q' can only be P and we can always find exists \alpha' = \alpha. And sort(P)union something is always larger than itself so claim holds

  • Q \equiv P_1 + P_2

    Similar operation to before, the goal become:

    \{ Q' | \exists \alpha \in Act . ~ P_1 + P_2 \xrightarrow{\alpha} Q' \} \to sort(Q') \subseteq sort(P_2) \cup sort(P_1) .

    by rule Choice1 and Choice2 we can see, we can always find a \alpha = * to let precedence hold, and Q' can become either P_1 or P_2 . union of set is monotonic, of course larger. Clearly claim holds.

  • Q \equiv P_1 ~ || ~ P_2

    The goal become:

    \{ Q' | \exists \alpha \in Act . ~ P_1 ~ || ~ P_2 \xrightarrow{\alpha} Q' \} \to sort(Q') \subseteq sort(P_1) \cup sort(P_2)

    similar inversion, this time we have 3 interesting case

    • by rule Par1 : we can have Q' = P_1' ~ || ~ P_2 , which means by 4th rule of sort we can have sort(Q') = sort(P_1') \cup sort (P_2) . By inductive hypothesis we can know if P_1' is the derivation of P_1 then we will have sort(P1') \subseteq sort(P_1) so clearly final goal is true
    • Par2 and Par3 are similar. the only difference in Par3 is both P_1' and P_2' cause a shrink the size of set.
  • Q \equiv P/X

    The goal become:

    \{ Q' | \exists \alpha \in Act . ~ P/X \xrightarrow{\alpha} Q' \} \to sort(Q') \subseteq sort(P) - X

    By rule Restrict we can know Q' can become P'/X, according to the last rule of sort we can rewrite sort(Q') in the goal as sort(P') - X . And according to inductive hypothesis, we can know sort(P') \subseteq sort(P). So clearly claim hold.

All inductive cases is proved.

Q.E.D

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容