doc-src/TutorialI/CTL/document/CTLind.tex
author wenzelm
Thu, 04 Oct 2001 15:20:40 +0200
changeset 11670 59f79df42d1f
parent 11494 23a118849801
child 11706 885e053ae664
permissions -rw-r--r--
proof by cases and induction on types and sets (used to be specific for HOL);
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
     1
%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
     2
\begin{isabellebody}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
     3
\def\isabellecontext{CTLind}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
     4
%
10878
b254d5ad6dd4 auto update
paulson
parents: 10855
diff changeset
     5
\isamarkupsubsection{CTL Revisited%
10395
7ef380745743 updated;
wenzelm
parents: 10283
diff changeset
     6
}
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
     7
%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
     8
\begin{isamarkuptext}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
     9
\label{sec:CTL-revisited}
11494
23a118849801 revisions and indexing
paulson
parents: 11277
diff changeset
    10
\index{CTL|(}%
23a118849801 revisions and indexing
paulson
parents: 11277
diff changeset
    11
The purpose of this section is twofold: to demonstrate
23a118849801 revisions and indexing
paulson
parents: 11277
diff changeset
    12
some of the induction principles and heuristics discussed above and to
10283
ff003e2b790c *** empty log message ***
nipkow
parents: 10267
diff changeset
    13
show how inductive definitions can simplify proofs.
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    14
In \S\ref{sec:CTL} we gave a fairly involved proof of the correctness of a
10795
9e888d60d3e5 minor edits to Chapters 1-3
paulson
parents: 10696
diff changeset
    15
model checker for CTL\@. In particular the proof of the
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    16
\isa{infinity{\isacharunderscore}lemma} on the way to \isa{AF{\isacharunderscore}lemma{\isadigit{2}}} is not as
11494
23a118849801 revisions and indexing
paulson
parents: 11277
diff changeset
    17
simple as one might expect, due to the \isa{SOME} operator
10283
ff003e2b790c *** empty log message ***
nipkow
parents: 10267
diff changeset
    18
involved. Below we give a simpler proof of \isa{AF{\isacharunderscore}lemma{\isadigit{2}}}
ff003e2b790c *** empty log message ***
nipkow
parents: 10267
diff changeset
    19
based on an auxiliary inductive definition.
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    20
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    21
Let us call a (finite or infinite) path \emph{\isa{A}-avoiding} if it does
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    22
not touch any node in the set \isa{A}. Then \isa{AF{\isacharunderscore}lemma{\isadigit{2}}} says
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    23
that if no infinite path from some state \isa{s} is \isa{A}-avoiding,
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    24
then \isa{s\ {\isasymin}\ lfp\ {\isacharparenleft}af\ A{\isacharparenright}}. We prove this by inductively defining the set
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    25
\isa{Avoid\ s\ A} of states reachable from \isa{s} by a finite \isa{A}-avoiding path:
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    26
% Second proof of opposite direction, directly by well-founded induction
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    27
% on the initial segment of M that avoids A.%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    28
\end{isamarkuptext}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    29
\isacommand{consts}\ Avoid\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}state\ {\isasymRightarrow}\ state\ set\ {\isasymRightarrow}\ state\ set{\isachardoublequote}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    30
\isacommand{inductive}\ {\isachardoublequote}Avoid\ s\ A{\isachardoublequote}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    31
\isakeyword{intros}\ {\isachardoublequote}s\ {\isasymin}\ Avoid\ s\ A{\isachardoublequote}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    32
\ \ \ \ \ \ \ {\isachardoublequote}{\isasymlbrakk}\ t\ {\isasymin}\ Avoid\ s\ A{\isacharsemicolon}\ t\ {\isasymnotin}\ A{\isacharsemicolon}\ {\isacharparenleft}t{\isacharcomma}u{\isacharparenright}\ {\isasymin}\ M\ {\isasymrbrakk}\ {\isasymLongrightarrow}\ u\ {\isasymin}\ Avoid\ s\ A{\isachardoublequote}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    33
\begin{isamarkuptext}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    34
It is easy to see that for any infinite \isa{A}-avoiding path \isa{f}
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    35
with \isa{f\ {\isadigit{0}}\ {\isasymin}\ Avoid\ s\ A} there is an infinite \isa{A}-avoiding path
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    36
starting with \isa{s} because (by definition of \isa{Avoid}) there is a
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    37
finite \isa{A}-avoiding path from \isa{s} to \isa{f\ {\isadigit{0}}}.
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    38
The proof is by induction on \isa{f\ {\isadigit{0}}\ {\isasymin}\ Avoid\ s\ A}. However,
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    39
this requires the following
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    40
reformulation, as explained in \S\ref{sec:ind-var-in-prems} above;
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    41
the \isa{rule{\isacharunderscore}format} directive undoes the reformulation after the proof.%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    42
\end{isamarkuptext}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    43
\isacommand{lemma}\ ex{\isacharunderscore}infinite{\isacharunderscore}path{\isacharbrackleft}rule{\isacharunderscore}format{\isacharbrackright}{\isacharcolon}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    44
\ \ {\isachardoublequote}t\ {\isasymin}\ Avoid\ s\ A\ \ {\isasymLongrightarrow}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    45
\ \ \ {\isasymforall}f{\isasymin}Paths\ t{\isachardot}\ {\isacharparenleft}{\isasymforall}i{\isachardot}\ f\ i\ {\isasymnotin}\ A{\isacharparenright}\ {\isasymlongrightarrow}\ {\isacharparenleft}{\isasymexists}p{\isasymin}Paths\ s{\isachardot}\ {\isasymforall}i{\isachardot}\ p\ i\ {\isasymnotin}\ A{\isacharparenright}{\isachardoublequote}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    46
\isacommand{apply}{\isacharparenleft}erule\ Avoid{\isachardot}induct{\isacharparenright}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    47
\ \isacommand{apply}{\isacharparenleft}blast{\isacharparenright}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    48
\isacommand{apply}{\isacharparenleft}clarify{\isacharparenright}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    49
\isacommand{apply}{\isacharparenleft}drule{\isacharunderscore}tac\ x\ {\isacharequal}\ {\isachardoublequote}{\isasymlambda}i{\isachardot}\ case\ i\ of\ {\isadigit{0}}\ {\isasymRightarrow}\ t\ {\isacharbar}\ Suc\ i\ {\isasymRightarrow}\ f\ i{\isachardoublequote}\ \isakeyword{in}\ bspec{\isacharparenright}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    50
\isacommand{apply}{\isacharparenleft}simp{\isacharunderscore}all\ add{\isacharcolon}Paths{\isacharunderscore}def\ split{\isacharcolon}nat{\isachardot}split{\isacharparenright}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    51
\isacommand{done}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    52
\begin{isamarkuptext}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    53
\noindent
11494
23a118849801 revisions and indexing
paulson
parents: 11277
diff changeset
    54
The base case (\isa{t\ {\isacharequal}\ s}) is trivial and proved by \isa{blast}.
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    55
In the induction step, we have an infinite \isa{A}-avoiding path \isa{f}
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    56
starting from \isa{u}, a successor of \isa{t}. Now we simply instantiate
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    57
the \isa{{\isasymforall}f{\isasymin}Paths\ t} in the induction hypothesis by the path starting with
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    58
\isa{t} and continuing with \isa{f}. That is what the above $\lambda$-term
10878
b254d5ad6dd4 auto update
paulson
parents: 10855
diff changeset
    59
expresses.  Simplification shows that this is a path starting with \isa{t} 
b254d5ad6dd4 auto update
paulson
parents: 10855
diff changeset
    60
and that the instantiated induction hypothesis implies the conclusion.
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    61
11196
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
    62
Now we come to the key lemma. Assuming that no infinite \isa{A}-avoiding
11277
a2bff98d6e5d *** empty log message ***
nipkow
parents: 11196
diff changeset
    63
path starts from \isa{s}, we want to show \isa{s\ {\isasymin}\ lfp\ {\isacharparenleft}af\ A{\isacharparenright}}. For the
a2bff98d6e5d *** empty log message ***
nipkow
parents: 11196
diff changeset
    64
inductive proof this must be generalized to the statement that every point \isa{t}
11494
23a118849801 revisions and indexing
paulson
parents: 11277
diff changeset
    65
``between'' \isa{s} and \isa{A}, in other words all of \isa{Avoid\ s\ A},
11196
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
    66
is contained in \isa{lfp\ {\isacharparenleft}af\ A{\isacharparenright}}:%
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    67
\end{isamarkuptext}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    68
\isacommand{lemma}\ Avoid{\isacharunderscore}in{\isacharunderscore}lfp{\isacharbrackleft}rule{\isacharunderscore}format{\isacharparenleft}no{\isacharunderscore}asm{\isacharparenright}{\isacharbrackright}{\isacharcolon}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    69
\ \ {\isachardoublequote}{\isasymforall}p{\isasymin}Paths\ s{\isachardot}\ {\isasymexists}i{\isachardot}\ p\ i\ {\isasymin}\ A\ {\isasymLongrightarrow}\ t\ {\isasymin}\ Avoid\ s\ A\ {\isasymlongrightarrow}\ t\ {\isasymin}\ lfp{\isacharparenleft}af\ A{\isacharparenright}{\isachardoublequote}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    70
\begin{isamarkuptxt}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    71
\noindent
11196
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
    72
The proof is by induction on the ``distance'' between \isa{t} and \isa{A}. Remember that \isa{lfp\ {\isacharparenleft}af\ A{\isacharparenright}\ {\isacharequal}\ A\ {\isasymunion}\ M{\isasyminverse}\ {\isacharbackquote}{\isacharbackquote}\ lfp\ {\isacharparenleft}af\ A{\isacharparenright}}.
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
    73
If \isa{t} is already in \isa{A}, then \isa{t\ {\isasymin}\ lfp\ {\isacharparenleft}af\ A{\isacharparenright}} is
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
    74
trivial. If \isa{t} is not in \isa{A} but all successors are in
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
    75
\isa{lfp\ {\isacharparenleft}af\ A{\isacharparenright}} (induction hypothesis), then \isa{t\ {\isasymin}\ lfp\ {\isacharparenleft}af\ A{\isacharparenright}} is
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
    76
again trivial.
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
    77
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
    78
The formal counterpart of this proof sketch is a well-founded induction
11494
23a118849801 revisions and indexing
paulson
parents: 11277
diff changeset
    79
on~\isa{M} restricted to \isa{Avoid\ s\ A\ {\isacharminus}\ A}, roughly speaking:
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    80
\begin{isabelle}%
11196
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
    81
\ \ \ \ \ {\isacharbraceleft}{\isacharparenleft}y{\isacharcomma}\ x{\isacharparenright}{\isachardot}\ {\isacharparenleft}x{\isacharcomma}\ y{\isacharparenright}\ {\isasymin}\ M\ {\isasymand}\ x\ {\isasymin}\ Avoid\ s\ A\ {\isasymand}\ x\ {\isasymnotin}\ A{\isacharbraceright}%
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    82
\end{isabelle}
11277
a2bff98d6e5d *** empty log message ***
nipkow
parents: 11196
diff changeset
    83
As we shall see presently, the absence of infinite \isa{A}-avoiding paths
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    84
starting from \isa{s} implies well-foundedness of this relation. For the
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    85
moment we assume this and proceed with the induction:%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    86
\end{isamarkuptxt}%
11196
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
    87
\isacommand{apply}{\isacharparenleft}subgoal{\isacharunderscore}tac\ {\isachardoublequote}wf{\isacharbraceleft}{\isacharparenleft}y{\isacharcomma}x{\isacharparenright}{\isachardot}\ {\isacharparenleft}x{\isacharcomma}y{\isacharparenright}\ {\isasymin}\ M\ {\isasymand}\ x\ {\isasymin}\ Avoid\ s\ A\ {\isasymand}\ x\ {\isasymnotin}\ A{\isacharbraceright}{\isachardoublequote}{\isacharparenright}\isanewline
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    88
\ \isacommand{apply}{\isacharparenleft}erule{\isacharunderscore}tac\ a\ {\isacharequal}\ t\ \isakeyword{in}\ wf{\isacharunderscore}induct{\isacharparenright}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    89
\ \isacommand{apply}{\isacharparenleft}clarsimp{\isacharparenright}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    90
\begin{isamarkuptxt}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
    91
\noindent
10878
b254d5ad6dd4 auto update
paulson
parents: 10855
diff changeset
    92
\begin{isabelle}%
11196
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
    93
\ {\isadigit{1}}{\isachardot}\ {\isasymAnd}t{\isachardot}\ {\isasymlbrakk}{\isasymforall}p{\isasymin}Paths\ s{\isachardot}\ {\isasymexists}i{\isachardot}\ p\ i\ {\isasymin}\ A{\isacharsemicolon}\ t\ {\isasymin}\ Avoid\ s\ A{\isacharsemicolon}\isanewline
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
    94
\isaindent{\ {\isadigit{1}}{\isachardot}\ {\isasymAnd}t{\isachardot}\ \ \ \ }{\isasymforall}y{\isachardot}\ {\isacharparenleft}t{\isacharcomma}\ y{\isacharparenright}\ {\isasymin}\ M\ {\isasymand}\ t\ {\isasymnotin}\ A\ {\isasymlongrightarrow}\isanewline
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
    95
\isaindent{\ {\isadigit{1}}{\isachardot}\ {\isasymAnd}t{\isachardot}\ \ \ \ {\isasymforall}y{\isachardot}\ }y\ {\isasymin}\ Avoid\ s\ A\ {\isasymlongrightarrow}\ y\ {\isasymin}\ lfp\ {\isacharparenleft}af\ A{\isacharparenright}{\isasymrbrakk}\isanewline
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
    96
\isaindent{\ {\isadigit{1}}{\isachardot}\ {\isasymAnd}t{\isachardot}\ }{\isasymLongrightarrow}\ t\ {\isasymin}\ lfp\ {\isacharparenleft}af\ A{\isacharparenright}\isanewline
10878
b254d5ad6dd4 auto update
paulson
parents: 10855
diff changeset
    97
\ {\isadigit{2}}{\isachardot}\ {\isasymforall}p{\isasymin}Paths\ s{\isachardot}\ {\isasymexists}i{\isachardot}\ p\ i\ {\isasymin}\ A\ {\isasymLongrightarrow}\isanewline
11196
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
    98
\isaindent{\ {\isadigit{2}}{\isachardot}\ }wf\ {\isacharbraceleft}{\isacharparenleft}y{\isacharcomma}\ x{\isacharparenright}{\isachardot}\ {\isacharparenleft}x{\isacharcomma}\ y{\isacharparenright}\ {\isasymin}\ M\ {\isasymand}\ x\ {\isasymin}\ Avoid\ s\ A\ {\isasymand}\ x\ {\isasymnotin}\ A{\isacharbraceright}%
10878
b254d5ad6dd4 auto update
paulson
parents: 10855
diff changeset
    99
\end{isabelle}
b254d5ad6dd4 auto update
paulson
parents: 10855
diff changeset
   100
Now the induction hypothesis states that if \isa{t\ {\isasymnotin}\ A}
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   101
then all successors of \isa{t} that are in \isa{Avoid\ s\ A} are in
11196
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
   102
\isa{lfp\ {\isacharparenleft}af\ A{\isacharparenright}}. Unfolding \isa{lfp} in the conclusion of the first
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
   103
subgoal once, we have to prove that \isa{t} is in \isa{A} or all successors
11494
23a118849801 revisions and indexing
paulson
parents: 11277
diff changeset
   104
of \isa{t} are in \isa{lfp\ {\isacharparenleft}af\ A{\isacharparenright}}.  But if \isa{t} is not in \isa{A},
11196
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
   105
the second 
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   106
\isa{Avoid}-rule implies that all successors of \isa{t} are in
11494
23a118849801 revisions and indexing
paulson
parents: 11277
diff changeset
   107
\isa{Avoid\ s\ A}, because we also assume \isa{t\ {\isasymin}\ Avoid\ s\ A}.
23a118849801 revisions and indexing
paulson
parents: 11277
diff changeset
   108
Hence, by the induction hypothesis, all successors of \isa{t} are indeed in
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   109
\isa{lfp\ {\isacharparenleft}af\ A{\isacharparenright}}. Mechanically:%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   110
\end{isamarkuptxt}%
11196
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
   111
\ \isacommand{apply}{\isacharparenleft}subst\ lfp{\isacharunderscore}unfold{\isacharbrackleft}OF\ mono{\isacharunderscore}af{\isacharbrackright}{\isacharparenright}\isanewline
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
   112
\ \isacommand{apply}{\isacharparenleft}simp\ {\isacharparenleft}no{\isacharunderscore}asm{\isacharparenright}\ add{\isacharcolon}\ af{\isacharunderscore}def{\isacharparenright}\isanewline
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   113
\ \isacommand{apply}{\isacharparenleft}blast\ intro{\isacharcolon}Avoid{\isachardot}intros{\isacharparenright}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   114
\begin{isamarkuptxt}%
11494
23a118849801 revisions and indexing
paulson
parents: 11277
diff changeset
   115
Having proved the main goal, we return to the proof obligation that the 
23a118849801 revisions and indexing
paulson
parents: 11277
diff changeset
   116
relation used above is indeed well-founded. This is proved by contradiction: if
10878
b254d5ad6dd4 auto update
paulson
parents: 10855
diff changeset
   117
the relation is not well-founded then there exists an infinite \isa{A}-avoiding path all in \isa{Avoid\ s\ A}, by theorem
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   118
\isa{wf{\isacharunderscore}iff{\isacharunderscore}no{\isacharunderscore}infinite{\isacharunderscore}down{\isacharunderscore}chain}:
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   119
\begin{isabelle}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   120
\ \ \ \ \ wf\ r\ {\isacharequal}\ {\isacharparenleft}{\isasymnot}\ {\isacharparenleft}{\isasymexists}f{\isachardot}\ {\isasymforall}i{\isachardot}\ {\isacharparenleft}f\ {\isacharparenleft}Suc\ i{\isacharparenright}{\isacharcomma}\ f\ i{\isacharparenright}\ {\isasymin}\ r{\isacharparenright}{\isacharparenright}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   121
\end{isabelle}
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   122
From lemma \isa{ex{\isacharunderscore}infinite{\isacharunderscore}path} the existence of an infinite
10878
b254d5ad6dd4 auto update
paulson
parents: 10855
diff changeset
   123
\isa{A}-avoiding path starting in \isa{s} follows, contradiction.%
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   124
\end{isamarkuptxt}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   125
\isacommand{apply}{\isacharparenleft}erule\ contrapos{\isacharunderscore}pp{\isacharparenright}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   126
\isacommand{apply}{\isacharparenleft}simp\ add{\isacharcolon}wf{\isacharunderscore}iff{\isacharunderscore}no{\isacharunderscore}infinite{\isacharunderscore}down{\isacharunderscore}chain{\isacharparenright}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   127
\isacommand{apply}{\isacharparenleft}erule\ exE{\isacharparenright}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   128
\isacommand{apply}{\isacharparenleft}rule\ ex{\isacharunderscore}infinite{\isacharunderscore}path{\isacharparenright}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   129
\isacommand{apply}{\isacharparenleft}auto\ simp\ add{\isacharcolon}Paths{\isacharunderscore}def{\isacharparenright}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   130
\isacommand{done}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   131
\begin{isamarkuptext}%
11196
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
   132
The \isa{{\isacharparenleft}no{\isacharunderscore}asm{\isacharparenright}} modifier of the \isa{rule{\isacharunderscore}format} directive in the
bb4ede27fcb7 *** empty log message ***
nipkow
parents: 10971
diff changeset
   133
statement of the lemma means
11494
23a118849801 revisions and indexing
paulson
parents: 11277
diff changeset
   134
that the assumption is left unchanged; otherwise the \isa{{\isasymforall}p} 
23a118849801 revisions and indexing
paulson
parents: 11277
diff changeset
   135
would be turned
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   136
into a \isa{{\isasymAnd}p}, which would complicate matters below. As it is,
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   137
\isa{Avoid{\isacharunderscore}in{\isacharunderscore}lfp} is now
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   138
\begin{isabelle}%
10696
76d7f6c9a14c *** empty log message ***
nipkow
parents: 10668
diff changeset
   139
\ \ \ \ \ {\isasymlbrakk}{\isasymforall}p{\isasymin}Paths\ s{\isachardot}\ {\isasymexists}i{\isachardot}\ p\ i\ {\isasymin}\ A{\isacharsemicolon}\ t\ {\isasymin}\ Avoid\ s\ A{\isasymrbrakk}\ {\isasymLongrightarrow}\ t\ {\isasymin}\ lfp\ {\isacharparenleft}af\ A{\isacharparenright}%
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   140
\end{isabelle}
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   141
The main theorem is simply the corollary where \isa{t\ {\isacharequal}\ s},
11494
23a118849801 revisions and indexing
paulson
parents: 11277
diff changeset
   142
when the assumption \isa{t\ {\isasymin}\ Avoid\ s\ A} is trivially true
10845
3696bc935bbd *** empty log message ***
nipkow
parents: 10795
diff changeset
   143
by the first \isa{Avoid}-rule. Isabelle confirms this:%
11494
23a118849801 revisions and indexing
paulson
parents: 11277
diff changeset
   144
\index{CTL|)}%
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   145
\end{isamarkuptext}%
10855
140a1ed65665 *** empty log message ***
nipkow
parents: 10845
diff changeset
   146
\isacommand{theorem}\ AF{\isacharunderscore}lemma{\isadigit{2}}{\isacharcolon}\ \ {\isachardoublequote}{\isacharbraceleft}s{\isachardot}\ {\isasymforall}p\ {\isasymin}\ Paths\ s{\isachardot}\ {\isasymexists}\ i{\isachardot}\ p\ i\ {\isasymin}\ A{\isacharbraceright}\ {\isasymsubseteq}\ lfp{\isacharparenleft}af\ A{\isacharparenright}{\isachardoublequote}\isanewline
10267
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   147
\isacommand{by}{\isacharparenleft}auto\ elim{\isacharcolon}Avoid{\isacharunderscore}in{\isacharunderscore}lfp\ intro{\isacharcolon}Avoid{\isachardot}intros{\isacharparenright}\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   148
\isanewline
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   149
\end{isabellebody}%
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   150
%%% Local Variables:
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   151
%%% mode: latex
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   152
%%% TeX-master: "root"
325ead6d9457 updated;
wenzelm
parents:
diff changeset
   153
%%% End: