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