10123
|
1 |
%
|
|
2 |
\begin{isabellebody}%
|
|
3 |
\def\isabellecontext{PDL}%
|
17056
|
4 |
%
|
|
5 |
\isadelimtheory
|
|
6 |
%
|
|
7 |
\endisadelimtheory
|
|
8 |
%
|
|
9 |
\isatagtheory
|
|
10 |
%
|
|
11 |
\endisatagtheory
|
|
12 |
{\isafoldtheory}%
|
|
13 |
%
|
|
14 |
\isadelimtheory
|
|
15 |
%
|
|
16 |
\endisadelimtheory
|
10123
|
17 |
%
|
10971
|
18 |
\isamarkupsubsection{Propositional Dynamic Logic --- PDL%
|
10395
|
19 |
}
|
11866
|
20 |
\isamarkuptrue%
|
10133
|
21 |
%
|
|
22 |
\begin{isamarkuptext}%
|
10178
|
23 |
\index{PDL|(}
|
11458
|
24 |
The formulae of PDL are built up from atomic propositions via
|
|
25 |
negation and conjunction and the two temporal
|
|
26 |
connectives \isa{AX} and \isa{EF}\@. Since formulae are essentially
|
|
27 |
syntax trees, they are naturally modelled as a datatype:%
|
|
28 |
\footnote{The customary definition of PDL
|
11207
|
29 |
\cite{HarelKT-DL} looks quite different from ours, but the two are easily
|
11458
|
30 |
shown to be equivalent.}%
|
10133
|
31 |
\end{isamarkuptext}%
|
17175
|
32 |
\isamarkuptrue%
|
|
33 |
\isacommand{datatype}\isamarkupfalse%
|
18724
|
34 |
\ formula\ {\isacharequal}\ Atom\ {\isachardoublequoteopen}atom{\isachardoublequoteclose}\isanewline
|
10149
|
35 |
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\isacharbar}\ Neg\ formula\isanewline
|
|
36 |
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\isacharbar}\ And\ formula\ formula\isanewline
|
|
37 |
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\isacharbar}\ AX\ formula\isanewline
|
17175
|
38 |
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\isacharbar}\ EF\ formula%
|
10133
|
39 |
\begin{isamarkuptext}%
|
|
40 |
\noindent
|
11458
|
41 |
This resembles the boolean expression case study in
|
10867
|
42 |
\S\ref{sec:boolex}.
|
27015
|
43 |
A validity relation between states and formulae specifies the semantics.
|
10867
|
44 |
The syntax annotation allows us to write \isa{s\ {\isasymTurnstile}\ f} instead of
|
27015
|
45 |
\hbox{\isa{valid\ s\ f}}. The definition is by recursion over the syntax:%
|
10149
|
46 |
\end{isamarkuptext}%
|
17175
|
47 |
\isamarkuptrue%
|
|
48 |
\isacommand{primrec}\isamarkupfalse%
|
27015
|
49 |
\ valid\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequoteopen}state\ {\isasymRightarrow}\ formula\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\ \ \ {\isacharparenleft}{\isachardoublequoteopen}{\isacharparenleft}{\isacharunderscore}\ {\isasymTurnstile}\ {\isacharunderscore}{\isacharparenright}{\isachardoublequoteclose}\ {\isacharbrackleft}{\isadigit{8}}{\isadigit{0}}{\isacharcomma}{\isadigit{8}}{\isadigit{0}}{\isacharbrackright}\ {\isadigit{8}}{\isadigit{0}}{\isacharparenright}\isanewline
|
|
50 |
\isakeyword{where}\isanewline
|
|
51 |
{\isachardoublequoteopen}s\ {\isasymTurnstile}\ Atom\ a\ \ {\isacharequal}\ {\isacharparenleft}a\ {\isasymin}\ L\ s{\isacharparenright}{\isachardoublequoteclose}\ {\isacharbar}\isanewline
|
|
52 |
{\isachardoublequoteopen}s\ {\isasymTurnstile}\ Neg\ f\ \ \ {\isacharequal}\ {\isacharparenleft}{\isasymnot}{\isacharparenleft}s\ {\isasymTurnstile}\ f{\isacharparenright}{\isacharparenright}{\isachardoublequoteclose}\ {\isacharbar}\isanewline
|
|
53 |
{\isachardoublequoteopen}s\ {\isasymTurnstile}\ And\ f\ g\ {\isacharequal}\ {\isacharparenleft}s\ {\isasymTurnstile}\ f\ {\isasymand}\ s\ {\isasymTurnstile}\ g{\isacharparenright}{\isachardoublequoteclose}\ {\isacharbar}\isanewline
|
|
54 |
{\isachardoublequoteopen}s\ {\isasymTurnstile}\ AX\ f\ \ \ \ {\isacharequal}\ {\isacharparenleft}{\isasymforall}t{\isachardot}\ {\isacharparenleft}s{\isacharcomma}t{\isacharparenright}\ {\isasymin}\ M\ {\isasymlongrightarrow}\ t\ {\isasymTurnstile}\ f{\isacharparenright}{\isachardoublequoteclose}\ {\isacharbar}\isanewline
|
17175
|
55 |
{\isachardoublequoteopen}s\ {\isasymTurnstile}\ EF\ f\ \ \ \ {\isacharequal}\ {\isacharparenleft}{\isasymexists}t{\isachardot}\ {\isacharparenleft}s{\isacharcomma}t{\isacharparenright}\ {\isasymin}\ M\isactrlsup {\isacharasterisk}\ {\isasymand}\ t\ {\isasymTurnstile}\ f{\isacharparenright}{\isachardoublequoteclose}%
|
10133
|
56 |
\begin{isamarkuptext}%
|
10149
|
57 |
\noindent
|
|
58 |
The first three equations should be self-explanatory. The temporal formula
|
10983
|
59 |
\isa{AX\ f} means that \isa{f} is true in \emph{A}ll ne\emph{X}t states whereas
|
|
60 |
\isa{EF\ f} means that there \emph{E}xists some \emph{F}uture state in which \isa{f} is
|
10867
|
61 |
true. The future is expressed via \isa{\isactrlsup {\isacharasterisk}}, the reflexive transitive
|
10149
|
62 |
closure. Because of reflexivity, the future includes the present.
|
|
63 |
|
27015
|
64 |
Now we come to the model checker itself. It maps a formula into the
|
|
65 |
set of states where the formula is true. It too is defined by
|
|
66 |
recursion over the syntax:%
|
10133
|
67 |
\end{isamarkuptext}%
|
17175
|
68 |
\isamarkuptrue%
|
|
69 |
\isacommand{primrec}\isamarkupfalse%
|
27015
|
70 |
\ mc\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequoteopen}formula\ {\isasymRightarrow}\ state\ set{\isachardoublequoteclose}\ \isakeyword{where}\isanewline
|
|
71 |
{\isachardoublequoteopen}mc{\isacharparenleft}Atom\ a{\isacharparenright}\ \ {\isacharequal}\ {\isacharbraceleft}s{\isachardot}\ a\ {\isasymin}\ L\ s{\isacharbraceright}{\isachardoublequoteclose}\ {\isacharbar}\isanewline
|
|
72 |
{\isachardoublequoteopen}mc{\isacharparenleft}Neg\ f{\isacharparenright}\ \ \ {\isacharequal}\ {\isacharminus}mc\ f{\isachardoublequoteclose}\ {\isacharbar}\isanewline
|
|
73 |
{\isachardoublequoteopen}mc{\isacharparenleft}And\ f\ g{\isacharparenright}\ {\isacharequal}\ mc\ f\ {\isasyminter}\ mc\ g{\isachardoublequoteclose}\ {\isacharbar}\isanewline
|
|
74 |
{\isachardoublequoteopen}mc{\isacharparenleft}AX\ f{\isacharparenright}\ \ \ \ {\isacharequal}\ {\isacharbraceleft}s{\isachardot}\ {\isasymforall}t{\isachardot}\ {\isacharparenleft}s{\isacharcomma}t{\isacharparenright}\ {\isasymin}\ M\ \ {\isasymlongrightarrow}\ t\ {\isasymin}\ mc\ f{\isacharbraceright}{\isachardoublequoteclose}\ {\isacharbar}\isanewline
|
17175
|
75 |
{\isachardoublequoteopen}mc{\isacharparenleft}EF\ f{\isacharparenright}\ \ \ \ {\isacharequal}\ lfp{\isacharparenleft}{\isasymlambda}T{\isachardot}\ mc\ f\ {\isasymunion}\ {\isacharparenleft}M{\isasyminverse}\ {\isacharbackquote}{\isacharbackquote}\ T{\isacharparenright}{\isacharparenright}{\isachardoublequoteclose}%
|
10133
|
76 |
\begin{isamarkuptext}%
|
10149
|
77 |
\noindent
|
|
78 |
Only the equation for \isa{EF} deserves some comments. Remember that the
|
10839
|
79 |
postfix \isa{{\isasyminverse}} and the infix \isa{{\isacharbackquote}{\isacharbackquote}} are predefined and denote the
|
10867
|
80 |
converse of a relation and the image of a set under a relation. Thus
|
10839
|
81 |
\isa{M{\isasyminverse}\ {\isacharbackquote}{\isacharbackquote}\ T} is the set of all predecessors of \isa{T} and the least
|
|
82 |
fixed point (\isa{lfp}) of \isa{{\isasymlambda}T{\isachardot}\ mc\ f\ {\isasymunion}\ M{\isasyminverse}\ {\isacharbackquote}{\isacharbackquote}\ T} is the least set
|
10149
|
83 |
\isa{T} containing \isa{mc\ f} and all predecessors of \isa{T}. If you
|
|
84 |
find it hard to see that \isa{mc\ {\isacharparenleft}EF\ f{\isacharparenright}} contains exactly those states from
|
10983
|
85 |
which there is a path to a state where \isa{f} is true, do not worry --- this
|
10149
|
86 |
will be proved in a moment.
|
|
87 |
|
10867
|
88 |
First we prove monotonicity of the function inside \isa{lfp}
|
|
89 |
in order to make sure it really has a least fixed point.%
|
10133
|
90 |
\end{isamarkuptext}%
|
17175
|
91 |
\isamarkuptrue%
|
|
92 |
\isacommand{lemma}\isamarkupfalse%
|
|
93 |
\ mono{\isacharunderscore}ef{\isacharcolon}\ {\isachardoublequoteopen}mono{\isacharparenleft}{\isasymlambda}T{\isachardot}\ A\ {\isasymunion}\ {\isacharparenleft}M{\isasyminverse}\ {\isacharbackquote}{\isacharbackquote}\ T{\isacharparenright}{\isacharparenright}{\isachardoublequoteclose}\isanewline
|
17056
|
94 |
%
|
|
95 |
\isadelimproof
|
|
96 |
%
|
|
97 |
\endisadelimproof
|
|
98 |
%
|
|
99 |
\isatagproof
|
17175
|
100 |
\isacommand{apply}\isamarkupfalse%
|
|
101 |
{\isacharparenleft}rule\ monoI{\isacharparenright}\isanewline
|
|
102 |
\isacommand{apply}\isamarkupfalse%
|
|
103 |
\ blast\isanewline
|
|
104 |
\isacommand{done}\isamarkupfalse%
|
|
105 |
%
|
17056
|
106 |
\endisatagproof
|
|
107 |
{\isafoldproof}%
|
|
108 |
%
|
|
109 |
\isadelimproof
|
|
110 |
%
|
|
111 |
\endisadelimproof
|
11866
|
112 |
%
|
10149
|
113 |
\begin{isamarkuptext}%
|
|
114 |
\noindent
|
|
115 |
Now we can relate model checking and semantics. For the \isa{EF} case we need
|
|
116 |
a separate lemma:%
|
|
117 |
\end{isamarkuptext}%
|
17175
|
118 |
\isamarkuptrue%
|
|
119 |
\isacommand{lemma}\isamarkupfalse%
|
|
120 |
\ EF{\isacharunderscore}lemma{\isacharcolon}\isanewline
|
|
121 |
\ \ {\isachardoublequoteopen}lfp{\isacharparenleft}{\isasymlambda}T{\isachardot}\ A\ {\isasymunion}\ {\isacharparenleft}M{\isasyminverse}\ {\isacharbackquote}{\isacharbackquote}\ T{\isacharparenright}{\isacharparenright}\ {\isacharequal}\ {\isacharbraceleft}s{\isachardot}\ {\isasymexists}t{\isachardot}\ {\isacharparenleft}s{\isacharcomma}t{\isacharparenright}\ {\isasymin}\ M\isactrlsup {\isacharasterisk}\ {\isasymand}\ t\ {\isasymin}\ A{\isacharbraceright}{\isachardoublequoteclose}%
|
17056
|
122 |
\isadelimproof
|
|
123 |
%
|
|
124 |
\endisadelimproof
|
|
125 |
%
|
|
126 |
\isatagproof
|
16069
|
127 |
%
|
|
128 |
\begin{isamarkuptxt}%
|
|
129 |
\noindent
|
|
130 |
The equality is proved in the canonical fashion by proving that each set
|
|
131 |
includes the other; the inclusion is shown pointwise:%
|
|
132 |
\end{isamarkuptxt}%
|
17175
|
133 |
\isamarkuptrue%
|
|
134 |
\isacommand{apply}\isamarkupfalse%
|
|
135 |
{\isacharparenleft}rule\ equalityI{\isacharparenright}\isanewline
|
|
136 |
\ \isacommand{apply}\isamarkupfalse%
|
|
137 |
{\isacharparenleft}rule\ subsetI{\isacharparenright}\isanewline
|
|
138 |
\ \isacommand{apply}\isamarkupfalse%
|
17181
|
139 |
{\isacharparenleft}simp{\isacharparenright}%
|
16069
|
140 |
\begin{isamarkuptxt}%
|
|
141 |
\noindent
|
|
142 |
Simplification leaves us with the following first subgoal
|
|
143 |
\begin{isabelle}%
|
|
144 |
\ {\isadigit{1}}{\isachardot}\ {\isasymAnd}s{\isachardot}\ s\ {\isasymin}\ lfp\ {\isacharparenleft}{\isasymlambda}T{\isachardot}\ A\ {\isasymunion}\ M{\isasyminverse}\ {\isacharbackquote}{\isacharbackquote}\ T{\isacharparenright}\ {\isasymLongrightarrow}\ {\isasymexists}t{\isachardot}\ {\isacharparenleft}s{\isacharcomma}\ t{\isacharparenright}\ {\isasymin}\ M\isactrlsup {\isacharasterisk}\ {\isasymand}\ t\ {\isasymin}\ A%
|
|
145 |
\end{isabelle}
|
|
146 |
which is proved by \isa{lfp}-induction:%
|
|
147 |
\end{isamarkuptxt}%
|
17175
|
148 |
\isamarkuptrue%
|
|
149 |
\ \isacommand{apply}\isamarkupfalse%
|
21261
|
150 |
{\isacharparenleft}erule\ lfp{\isacharunderscore}induct{\isacharunderscore}set{\isacharparenright}\isanewline
|
17175
|
151 |
\ \ \isacommand{apply}\isamarkupfalse%
|
|
152 |
{\isacharparenleft}rule\ mono{\isacharunderscore}ef{\isacharparenright}\isanewline
|
|
153 |
\ \isacommand{apply}\isamarkupfalse%
|
|
154 |
{\isacharparenleft}simp{\isacharparenright}%
|
16069
|
155 |
\begin{isamarkuptxt}%
|
|
156 |
\noindent
|
|
157 |
Having disposed of the monotonicity subgoal,
|
|
158 |
simplification leaves us with the following goal:
|
|
159 |
\begin{isabelle}
|
|
160 |
\ {\isadigit{1}}{\isachardot}\ {\isasymAnd}x{\isachardot}\ x\ {\isasymin}\ A\ {\isasymor}\isanewline
|
|
161 |
\ \ \ \ \ \ \ \ \ x\ {\isasymin}\ M{\isasyminverse}\ {\isacharbackquote}{\isacharbackquote}\ {\isacharparenleft}lfp\ {\isacharparenleft}\dots{\isacharparenright}\ {\isasyminter}\ {\isacharbraceleft}x{\isachardot}\ {\isasymexists}t{\isachardot}\ {\isacharparenleft}x{\isacharcomma}\ t{\isacharparenright}\ {\isasymin}\ M\isactrlsup {\isacharasterisk}\ {\isasymand}\ t\ {\isasymin}\ A{\isacharbraceright}{\isacharparenright}\isanewline
|
|
162 |
\ \ \ \ \ \ \ \ {\isasymLongrightarrow}\ {\isasymexists}t{\isachardot}\ {\isacharparenleft}x{\isacharcomma}\ t{\isacharparenright}\ {\isasymin}\ M\isactrlsup {\isacharasterisk}\ {\isasymand}\ t\ {\isasymin}\ A
|
|
163 |
\end{isabelle}
|
|
164 |
It is proved by \isa{blast}, using the transitivity of
|
|
165 |
\isa{M\isactrlsup {\isacharasterisk}}.%
|
|
166 |
\end{isamarkuptxt}%
|
17175
|
167 |
\isamarkuptrue%
|
|
168 |
\ \isacommand{apply}\isamarkupfalse%
|
|
169 |
{\isacharparenleft}blast\ intro{\isacharcolon}\ rtrancl{\isacharunderscore}trans{\isacharparenright}%
|
16069
|
170 |
\begin{isamarkuptxt}%
|
|
171 |
We now return to the second set inclusion subgoal, which is again proved
|
|
172 |
pointwise:%
|
|
173 |
\end{isamarkuptxt}%
|
17175
|
174 |
\isamarkuptrue%
|
|
175 |
\isacommand{apply}\isamarkupfalse%
|
|
176 |
{\isacharparenleft}rule\ subsetI{\isacharparenright}\isanewline
|
|
177 |
\isacommand{apply}\isamarkupfalse%
|
|
178 |
{\isacharparenleft}simp{\isacharcomma}\ clarify{\isacharparenright}%
|
16069
|
179 |
\begin{isamarkuptxt}%
|
|
180 |
\noindent
|
|
181 |
After simplification and clarification we are left with
|
|
182 |
\begin{isabelle}%
|
|
183 |
\ {\isadigit{1}}{\isachardot}\ {\isasymAnd}x\ t{\isachardot}\ {\isasymlbrakk}{\isacharparenleft}x{\isacharcomma}\ t{\isacharparenright}\ {\isasymin}\ M\isactrlsup {\isacharasterisk}{\isacharsemicolon}\ t\ {\isasymin}\ A{\isasymrbrakk}\ {\isasymLongrightarrow}\ x\ {\isasymin}\ lfp\ {\isacharparenleft}{\isasymlambda}T{\isachardot}\ A\ {\isasymunion}\ M{\isasyminverse}\ {\isacharbackquote}{\isacharbackquote}\ T{\isacharparenright}%
|
|
184 |
\end{isabelle}
|
|
185 |
This goal is proved by induction on \isa{{\isacharparenleft}s{\isacharcomma}\ t{\isacharparenright}\ {\isasymin}\ M\isactrlsup {\isacharasterisk}}. But since the model
|
|
186 |
checker works backwards (from \isa{t} to \isa{s}), we cannot use the
|
|
187 |
induction theorem \isa{rtrancl{\isacharunderscore}induct}: it works in the
|
|
188 |
forward direction. Fortunately the converse induction theorem
|
|
189 |
\isa{converse{\isacharunderscore}rtrancl{\isacharunderscore}induct} already exists:
|
|
190 |
\begin{isabelle}%
|
|
191 |
\ \ \ \ \ {\isasymlbrakk}{\isacharparenleft}a{\isacharcomma}\ b{\isacharparenright}\ {\isasymin}\ r\isactrlsup {\isacharasterisk}{\isacharsemicolon}\ P\ b{\isacharsemicolon}\isanewline
|
|
192 |
\isaindent{\ \ \ \ \ \ }{\isasymAnd}y\ z{\isachardot}\ {\isasymlbrakk}{\isacharparenleft}y{\isacharcomma}\ z{\isacharparenright}\ {\isasymin}\ r{\isacharsemicolon}\ {\isacharparenleft}z{\isacharcomma}\ b{\isacharparenright}\ {\isasymin}\ r\isactrlsup {\isacharasterisk}{\isacharsemicolon}\ P\ z{\isasymrbrakk}\ {\isasymLongrightarrow}\ P\ y{\isasymrbrakk}\isanewline
|
|
193 |
\isaindent{\ \ \ \ \ }{\isasymLongrightarrow}\ P\ a%
|
|
194 |
\end{isabelle}
|
|
195 |
It says that if \isa{{\isacharparenleft}a{\isacharcomma}\ b{\isacharparenright}\ {\isasymin}\ r\isactrlsup {\isacharasterisk}} and we know \isa{P\ b} then we can infer
|
|
196 |
\isa{P\ a} provided each step backwards from a predecessor \isa{z} of
|
|
197 |
\isa{b} preserves \isa{P}.%
|
|
198 |
\end{isamarkuptxt}%
|
17175
|
199 |
\isamarkuptrue%
|
|
200 |
\isacommand{apply}\isamarkupfalse%
|
|
201 |
{\isacharparenleft}erule\ converse{\isacharunderscore}rtrancl{\isacharunderscore}induct{\isacharparenright}%
|
16069
|
202 |
\begin{isamarkuptxt}%
|
|
203 |
\noindent
|
|
204 |
The base case
|
|
205 |
\begin{isabelle}%
|
|
206 |
\ {\isadigit{1}}{\isachardot}\ {\isasymAnd}x\ t{\isachardot}\ t\ {\isasymin}\ A\ {\isasymLongrightarrow}\ t\ {\isasymin}\ lfp\ {\isacharparenleft}{\isasymlambda}T{\isachardot}\ A\ {\isasymunion}\ M{\isasyminverse}\ {\isacharbackquote}{\isacharbackquote}\ T{\isacharparenright}%
|
|
207 |
\end{isabelle}
|
|
208 |
is solved by unrolling \isa{lfp} once%
|
|
209 |
\end{isamarkuptxt}%
|
17175
|
210 |
\isamarkuptrue%
|
|
211 |
\ \isacommand{apply}\isamarkupfalse%
|
|
212 |
{\isacharparenleft}subst\ lfp{\isacharunderscore}unfold{\isacharbrackleft}OF\ mono{\isacharunderscore}ef{\isacharbrackright}{\isacharparenright}%
|
16069
|
213 |
\begin{isamarkuptxt}%
|
|
214 |
\begin{isabelle}%
|
|
215 |
\ {\isadigit{1}}{\isachardot}\ {\isasymAnd}x\ t{\isachardot}\ t\ {\isasymin}\ A\ {\isasymLongrightarrow}\ t\ {\isasymin}\ A\ {\isasymunion}\ M{\isasyminverse}\ {\isacharbackquote}{\isacharbackquote}\ lfp\ {\isacharparenleft}{\isasymlambda}T{\isachardot}\ A\ {\isasymunion}\ M{\isasyminverse}\ {\isacharbackquote}{\isacharbackquote}\ T{\isacharparenright}%
|
|
216 |
\end{isabelle}
|
|
217 |
and disposing of the resulting trivial subgoal automatically:%
|
|
218 |
\end{isamarkuptxt}%
|
17175
|
219 |
\isamarkuptrue%
|
|
220 |
\ \isacommand{apply}\isamarkupfalse%
|
|
221 |
{\isacharparenleft}blast{\isacharparenright}%
|
16069
|
222 |
\begin{isamarkuptxt}%
|
|
223 |
\noindent
|
|
224 |
The proof of the induction step is identical to the one for the base case:%
|
|
225 |
\end{isamarkuptxt}%
|
17175
|
226 |
\isamarkuptrue%
|
|
227 |
\isacommand{apply}\isamarkupfalse%
|
|
228 |
{\isacharparenleft}subst\ lfp{\isacharunderscore}unfold{\isacharbrackleft}OF\ mono{\isacharunderscore}ef{\isacharbrackright}{\isacharparenright}\isanewline
|
|
229 |
\isacommand{apply}\isamarkupfalse%
|
|
230 |
{\isacharparenleft}blast{\isacharparenright}\isanewline
|
|
231 |
\isacommand{done}\isamarkupfalse%
|
|
232 |
%
|
17056
|
233 |
\endisatagproof
|
|
234 |
{\isafoldproof}%
|
|
235 |
%
|
|
236 |
\isadelimproof
|
|
237 |
%
|
|
238 |
\endisadelimproof
|
11866
|
239 |
%
|
10149
|
240 |
\begin{isamarkuptext}%
|
|
241 |
The main theorem is proved in the familiar manner: induction followed by
|
|
242 |
\isa{auto} augmented with the lemma as a simplification rule.%
|
|
243 |
\end{isamarkuptext}%
|
17175
|
244 |
\isamarkuptrue%
|
|
245 |
\isacommand{theorem}\isamarkupfalse%
|
|
246 |
\ {\isachardoublequoteopen}mc\ f\ {\isacharequal}\ {\isacharbraceleft}s{\isachardot}\ s\ {\isasymTurnstile}\ f{\isacharbraceright}{\isachardoublequoteclose}\isanewline
|
17056
|
247 |
%
|
|
248 |
\isadelimproof
|
|
249 |
%
|
|
250 |
\endisadelimproof
|
|
251 |
%
|
|
252 |
\isatagproof
|
17175
|
253 |
\isacommand{apply}\isamarkupfalse%
|
|
254 |
{\isacharparenleft}induct{\isacharunderscore}tac\ f{\isacharparenright}\isanewline
|
|
255 |
\isacommand{apply}\isamarkupfalse%
|
|
256 |
{\isacharparenleft}auto\ simp\ add{\isacharcolon}\ EF{\isacharunderscore}lemma{\isacharparenright}\isanewline
|
|
257 |
\isacommand{done}\isamarkupfalse%
|
|
258 |
%
|
17056
|
259 |
\endisatagproof
|
|
260 |
{\isafoldproof}%
|
|
261 |
%
|
|
262 |
\isadelimproof
|
|
263 |
%
|
|
264 |
\endisadelimproof
|
11866
|
265 |
%
|
10171
|
266 |
\begin{isamarkuptext}%
|
|
267 |
\begin{exercise}
|
11458
|
268 |
\isa{AX} has a dual operator \isa{EN}
|
|
269 |
(``there exists a next state such that'')%
|
|
270 |
\footnote{We cannot use the customary \isa{EX}: it is reserved
|
|
271 |
as the \textsc{ascii}-equivalent of \isa{{\isasymexists}}.}
|
|
272 |
with the intended semantics
|
10171
|
273 |
\begin{isabelle}%
|
|
274 |
\ \ \ \ \ s\ {\isasymTurnstile}\ EN\ f\ {\isacharequal}\ {\isacharparenleft}{\isasymexists}t{\isachardot}\ {\isacharparenleft}s{\isacharcomma}\ t{\isacharparenright}\ {\isasymin}\ M\ {\isasymand}\ t\ {\isasymTurnstile}\ f{\isacharparenright}%
|
|
275 |
\end{isabelle}
|
|
276 |
Fortunately, \isa{EN\ f} can already be expressed as a PDL formula. How?
|
|
277 |
|
|
278 |
Show that the semantics for \isa{EF} satisfies the following recursion equation:
|
|
279 |
\begin{isabelle}%
|
|
280 |
\ \ \ \ \ s\ {\isasymTurnstile}\ EF\ f\ {\isacharequal}\ {\isacharparenleft}s\ {\isasymTurnstile}\ f\ {\isasymor}\ s\ {\isasymTurnstile}\ EN\ {\isacharparenleft}EF\ f{\isacharparenright}{\isacharparenright}%
|
|
281 |
\end{isabelle}
|
10178
|
282 |
\end{exercise}
|
|
283 |
\index{PDL|)}%
|
10171
|
284 |
\end{isamarkuptext}%
|
17175
|
285 |
\isamarkuptrue%
|
17056
|
286 |
%
|
|
287 |
\isadelimproof
|
|
288 |
%
|
|
289 |
\endisadelimproof
|
|
290 |
%
|
|
291 |
\isatagproof
|
|
292 |
%
|
|
293 |
\endisatagproof
|
|
294 |
{\isafoldproof}%
|
|
295 |
%
|
|
296 |
\isadelimproof
|
|
297 |
%
|
|
298 |
\endisadelimproof
|
|
299 |
%
|
|
300 |
\isadelimproof
|
|
301 |
%
|
|
302 |
\endisadelimproof
|
|
303 |
%
|
|
304 |
\isatagproof
|
|
305 |
%
|
|
306 |
\endisatagproof
|
|
307 |
{\isafoldproof}%
|
|
308 |
%
|
|
309 |
\isadelimproof
|
|
310 |
%
|
|
311 |
\endisadelimproof
|
|
312 |
%
|
|
313 |
\isadelimproof
|
|
314 |
%
|
|
315 |
\endisadelimproof
|
|
316 |
%
|
|
317 |
\isatagproof
|
|
318 |
%
|
|
319 |
\endisatagproof
|
|
320 |
{\isafoldproof}%
|
|
321 |
%
|
|
322 |
\isadelimproof
|
|
323 |
%
|
|
324 |
\endisadelimproof
|
|
325 |
%
|
|
326 |
\isadelimtheory
|
|
327 |
%
|
|
328 |
\endisadelimtheory
|
|
329 |
%
|
|
330 |
\isatagtheory
|
|
331 |
%
|
|
332 |
\endisatagtheory
|
|
333 |
{\isafoldtheory}%
|
|
334 |
%
|
|
335 |
\isadelimtheory
|
|
336 |
%
|
|
337 |
\endisadelimtheory
|
10171
|
338 |
\end{isabellebody}%
|
10123
|
339 |
%%% Local Variables:
|
|
340 |
%%% mode: latex
|
|
341 |
%%% TeX-master: "root"
|
|
342 |
%%% End:
|