美文网首页
PL 2020-2 QE Proof

PL 2020-2 QE Proof

作者: 卷毛宿敌大小姐 | 来源:发表于2021-05-10 06:15 被阅读0次

    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

    相关文章

      网友评论

          本文标题:PL 2020-2 QE Proof

          本文链接:https://www.haomeiwen.com/subject/lgsbdltx.html