annotate paper/src/HoareSoundness.agda.replaced @ 3:959f4b34d6f4

add final thesis
author soto
date Tue, 09 Feb 2021 18:44:53 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
1 {-@$\#$@ OPTIONS --universe-polymorphism @$\#$@-}
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
3 open import Level
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
4 open import Data.Nat.Base
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
5 open import Data.Product
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
6 open import Data.Bool.Base
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
7 open import Data.Empty
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
8 open import Data.Sum
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
9 open import Relation.Binary
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
10 open import Relation.Nullary
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
11 open import Relation.Binary.Core
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
12 open import Relation.Binary.PropositionalEquality
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
13 open import RelOp
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
14 open import utilities
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
15
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
16 module HoareSoundness
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
17 (Cond : Set)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
18 (PrimComm : Set)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
19 (neg : Cond @$\rightarrow$@ Cond)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
20 (_@$\wedge$@_ : Cond @$\rightarrow$@ Cond @$\rightarrow$@ Cond)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
21 (Tautology : Cond @$\rightarrow$@ Cond @$\rightarrow$@ Set)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
22 (State : Set)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
23 (SemCond : Cond @$\rightarrow$@ State @$\rightarrow$@ Set)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
24 (tautValid : (b1 b2 : Cond) @$\rightarrow$@ Tautology b1 b2 @$\rightarrow$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
25 (s : State) @$\rightarrow$@ SemCond b1 s @$\rightarrow$@ SemCond b2 s)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
26 (respNeg : (b : Cond) @$\rightarrow$@ (s : State) @$\rightarrow$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
27 Iff (SemCond (neg b) s) (@$\neg$@ SemCond b s))
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
28 (respAnd : (b1 b2 : Cond) @$\rightarrow$@ (s : State) @$\rightarrow$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
29 Iff (SemCond (b1 @$\wedge$@ b2) s)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
30 ((SemCond b1 s) @$\times$@ (SemCond b2 s)))
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
31 (PrimSemComm : @$\forall$@ {l} @$\rightarrow$@ PrimComm @$\rightarrow$@ Rel State l)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
32 (Axiom : Cond @$\rightarrow$@ PrimComm @$\rightarrow$@ Cond @$\rightarrow$@ Set)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
33 (axiomValid : @$\forall$@ {l} @$\rightarrow$@ (bPre : Cond) @$\rightarrow$@ (pcm : PrimComm) @$\rightarrow$@ (bPost : Cond) @$\rightarrow$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
34 (ax : Axiom bPre pcm bPost) @$\rightarrow$@ (s1 s2 : State) @$\rightarrow$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
35 SemCond bPre s1 @$\rightarrow$@ PrimSemComm {l} pcm s1 s2 @$\rightarrow$@ SemCond bPost s2) where
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
36
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
37 open import Hoare PrimComm Cond Axiom Tautology _@$\wedge$@_ neg
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
38
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
39 open import RelOp
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
40 module RelOpState = RelOp State
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
41
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
42 NotP : {S : Set} @$\rightarrow$@ Pred S @$\rightarrow$@ Pred S
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
43 NotP X s = @$\neg$@ X s
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
44
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
45 _\/_ : Cond @$\rightarrow$@ Cond @$\rightarrow$@ Cond
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
46 b1 \/ b2 = neg (neg b1 @$\wedge$@ neg b2)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
47
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
48 when : {X Y Z : Set} @$\rightarrow$@ (X @$\rightarrow$@ Z) @$\rightarrow$@ (Y @$\rightarrow$@ Z) @$\rightarrow$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
49 X ⊎ Y @$\rightarrow$@ Z
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
50 when f g (inj@$\_{1}$@ x) = f x
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
51 when f g (inj@$\_{2}$@ y) = g y
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
52
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
53 -- semantics of commands
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
54 SemComm : Comm @$\rightarrow$@ Rel State (Level.zero)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
55 SemComm Skip = RelOpState.deltaGlob
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
56 SemComm Abort = RelOpState.emptyRel
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
57 SemComm (PComm pc) = PrimSemComm pc
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
58 SemComm (Seq c1 c2) = RelOpState.comp (SemComm c1) (SemComm c2)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
59 SemComm (If b c1 c2)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
60 = RelOpState.union
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
61 (RelOpState.comp (RelOpState.delta (SemCond b))
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
62 (SemComm c1))
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
63 (RelOpState.comp (RelOpState.delta (NotP (SemCond b)))
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
64 (SemComm c2))
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
65 SemComm (While b c)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
66 = RelOpState.unionInf
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
67 (@$\lambda$@ (n : @$\mathbb{N}$@) @$\rightarrow$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
68 RelOpState.comp (RelOpState.repeat
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
69 n
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
70 (RelOpState.comp
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
71 (RelOpState.delta (SemCond b))
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
72 (SemComm c)))
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
73 (RelOpState.delta (NotP (SemCond b))))
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
74
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
75 Satisfies : Cond @$\rightarrow$@ Comm @$\rightarrow$@ Cond @$\rightarrow$@ Set
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
76 Satisfies bPre cm bPost
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
77 = (s1 : State) @$\rightarrow$@ (s2 : State) @$\rightarrow$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
78 SemCond bPre s1 @$\rightarrow$@ SemComm cm s1 s2 @$\rightarrow$@ SemCond bPost s2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
79
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
80 Soundness : {bPre : Cond} @$\rightarrow$@ {cm : Comm} @$\rightarrow$@ {bPost : Cond} @$\rightarrow$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
81 HTProof bPre cm bPost @$\rightarrow$@ Satisfies bPre cm bPost
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
82 Soundness (PrimRule {bPre} {cm} {bPost} pr) s1 s2 q1 q2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
83 = axiomValid bPre cm bPost pr s1 s2 q1 q2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
84 Soundness {.bPost} {.Skip} {bPost} (SkipRule .bPost) s1 s2 q1 q2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
85 = substId1 State {Level.zero} {State} {s1} {s2} (proj@$\_{2}$@ q2) (SemCond bPost) q1
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
86 Soundness {bPre} {.Abort} {bPost} (AbortRule .bPre .bPost) s1 s2 q1 ()
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
87 Soundness (WeakeningRule {bPre} {bPre'} {cm} {bPost'} {bPost} tautPre pr tautPost)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
88 s1 s2 q1 q2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
89 = let hyp : Satisfies bPre' cm bPost'
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
90 hyp = Soundness pr
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
91 r1 : SemCond bPre' s1
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
92 r1 = tautValid bPre bPre' tautPre s1 q1
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
93 r2 : SemCond bPost' s2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
94 r2 = hyp s1 s2 r1 q2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
95 in tautValid bPost' bPost tautPost s2 r2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
96 Soundness (SeqRule {bPre} {cm1} {bMid} {cm2} {bPost} pr1 pr2)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
97 s1 s2 q1 q2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
98 = let hyp1 : Satisfies bPre cm1 bMid
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
99 hyp1 = Soundness pr1
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
100 hyp2 : Satisfies bMid cm2 bPost
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
101 hyp2 = Soundness pr2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
102 sMid : State
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
103 sMid = proj@$\_{1}$@ q2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
104 r1 : SemComm cm1 s1 sMid @$\times$@ SemComm cm2 sMid s2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
105 r1 = proj@$\_{2}$@ q2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
106 r2 : SemComm cm1 s1 sMid
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
107 r2 = proj@$\_{1}$@ r1
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
108 r3 : SemComm cm2 sMid s2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
109 r3 = proj@$\_{2}$@ r1
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
110 r4 : SemCond bMid sMid
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
111 r4 = hyp1 s1 sMid q1 r2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
112 in hyp2 sMid s2 r4 r3
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
113 Soundness (IfRule {cmThen} {cmElse} {bPre} {bPost} {b} pThen pElse)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
114 s1 s2 q1 q2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
115 = let hypThen : Satisfies (bPre @$\wedge$@ b) cmThen bPost
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
116 hypThen = Soundness pThen
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
117 hypElse : Satisfies (bPre @$\wedge$@ neg b) cmElse bPost
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
118 hypElse = Soundness pElse
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
119 rThen : RelOpState.comp
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
120 (RelOpState.delta (SemCond b))
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
121 (SemComm cmThen) s1 s2 @$\rightarrow$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
122 SemCond bPost s2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
123 rThen = @$\lambda$@ h @$\rightarrow$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
124 let t1 : SemCond b s1 @$\times$@ SemComm cmThen s1 s2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
125 t1 = (proj@$\_{2}$@ (RelOpState.deltaRestPre
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
126 (SemCond b)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
127 (SemComm cmThen) s1 s2)) h
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
128 t2 : SemCond (bPre @$\wedge$@ b) s1
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
129 t2 = (proj@$\_{2}$@ (respAnd bPre b s1))
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
130 (q1 , proj@$\_{1}$@ t1)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
131 in hypThen s1 s2 t2 (proj@$\_{2}$@ t1)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
132 rElse : RelOpState.comp
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
133 (RelOpState.delta (NotP (SemCond b)))
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
134 (SemComm cmElse) s1 s2 @$\rightarrow$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
135 SemCond bPost s2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
136 rElse = @$\lambda$@ h @$\rightarrow$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
137 let t10 : (NotP (SemCond b) s1) @$\times$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
138 (SemComm cmElse s1 s2)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
139 t10 = proj@$\_{2}$@ (RelOpState.deltaRestPre
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
140 (NotP (SemCond b)) (SemComm cmElse) s1 s2)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
141 h
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
142 t6 : SemCond (neg b) s1
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
143 t6 = proj@$\_{2}$@ (respNeg b s1) (proj@$\_{1}$@ t10)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
144 t7 : SemComm cmElse s1 s2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
145 t7 = proj@$\_{2}$@ t10
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
146 t8 : SemCond (bPre @$\wedge$@ neg b) s1
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
147 t8 = proj@$\_{2}$@ (respAnd bPre (neg b) s1)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
148 (q1 , t6)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
149 in hypElse s1 s2 t8 t7
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
150 in when rThen rElse q2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
151 Soundness (WhileRule {cm'} {bInv} {b} pr) s1 s2 q1 q2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
152 = proj@$\_{2}$@ (respAnd bInv (neg b) s2) t20
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
153 where
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
154 hyp : Satisfies (bInv @$\wedge$@ b) cm' bInv
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
155 hyp = Soundness pr
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
156 n : @$\mathbb{N}$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
157 n = proj@$\_{1}$@ q2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
158 Rel1 : @$\mathbb{N}$@ @$\rightarrow$@ Rel State (Level.zero)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
159 Rel1 = @$\lambda$@ m @$\rightarrow$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
160 RelOpState.repeat
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
161 m
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
162 (RelOpState.comp (RelOpState.delta (SemCond b))
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
163 (SemComm cm'))
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
164 t1 : RelOpState.comp
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
165 (Rel1 n)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
166 (RelOpState.delta (NotP (SemCond b))) s1 s2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
167 t1 = proj@$\_{2}$@ q2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
168 t15 : (Rel1 n s1 s2) @$\times$@ (NotP (SemCond b) s2)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
169 t15 = proj@$\_{2}$@ (RelOpState.deltaRestPost
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
170 (NotP (SemCond b)) (Rel1 n) s1 s2)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
171 t1
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
172 t16 : Rel1 n s1 s2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
173 t16 = proj@$\_{1}$@ t15
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
174 t17 : NotP (SemCond b) s2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
175 t17 = proj@$\_{2}$@ t15
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
176 lem1 : (m : @$\mathbb{N}$@) @$\rightarrow$@ (ss2 : State) @$\rightarrow$@ Rel1 m s1 ss2 @$\rightarrow$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
177 SemCond bInv ss2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
178 lem1 @$\mathbb{N}$@.zero ss2 h
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
179 = substId1 State (proj@$\_{2}$@ h) (SemCond bInv) q1
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
180 lem1 (@$\mathbb{N}$@.suc n) ss2 h
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
181 = let hyp2 : (z : State) @$\rightarrow$@ Rel1 n s1 z @$\rightarrow$@
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
182 SemCond bInv z
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
183 hyp2 = lem1 n
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
184 s20 : State
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
185 s20 = proj@$\_{1}$@ h
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
186 t21 : Rel1 n s1 s20
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
187 t21 = proj@$\_{1}$@ (proj@$\_{2}$@ h)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
188 t22 : (SemCond b s20) @$\times$@ (SemComm cm' s20 ss2)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
189 t22 = proj@$\_{2}$@ (RelOpState.deltaRestPre
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
190 (SemCond b) (SemComm cm') s20 ss2)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
191 (proj@$\_{2}$@ (proj@$\_{2}$@ h))
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
192 t23 : SemCond (bInv @$\wedge$@ b) s20
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
193 t23 = proj@$\_{2}$@ (respAnd bInv b s20)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
194 (hyp2 s20 t21 , proj@$\_{1}$@ t22)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
195 in hyp s20 ss2 t23 (proj@$\_{2}$@ t22)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
196 t20 : SemCond bInv s2 @$\times$@ SemCond (neg b) s2
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
197 t20 = lem1 n s2 t16 , proj@$\_{2}$@ (respNeg b s2) t17