thys2/Journal/Paper.tex
author Chengsong
Tue, 02 Nov 2021 19:42:52 +0000
changeset 372 78cc255e286f
parent 371 f65444d29e74
child 376 664322da08fe
permissions -rw-r--r--
some more writing
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
369
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     1
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     2
\begin{isabellebody}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     3
\setisabellecontext{Paper}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     4
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     5
\isadelimtheory
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     6
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     7
\endisadelimtheory
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     8
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     9
\isatagtheory
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    10
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    11
\endisatagtheory
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    12
{\isafoldtheory}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    13
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    14
\isadelimtheory
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    15
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    16
\endisadelimtheory
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    17
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    18
\isadelimproof
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    19
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    20
\endisadelimproof
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    21
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    22
\isatagproof
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    23
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    24
\endisatagproof
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    25
{\isafoldproof}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    26
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    27
\isadelimproof
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    28
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    29
\endisadelimproof
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    30
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    31
\isadelimproof
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    32
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    33
\endisadelimproof
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    34
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    35
\isatagproof
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    36
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    37
\endisatagproof
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    38
{\isafoldproof}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    39
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    40
\isadelimproof
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    41
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    42
\endisadelimproof
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    43
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    44
\isadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    45
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    46
\endisadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    47
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    48
\isatagdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    49
%
371
Chengsong
parents: 369
diff changeset
    50
\isamarkupsection{Core of the proof%
369
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    51
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    52
\isamarkuptrue%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    53
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    54
\endisatagdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    55
{\isafolddocument}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    56
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    57
\isadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    58
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    59
\endisadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    60
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    61
\begin{isamarkuptext}%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
    62
This paper builds on previous work by Ausaf and Urban using 
369
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    63
regular expression'd bit-coded derivatives to do lexing that 
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
    64
is both fast and satisfies the POSIX specification.
369
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    65
In their work, a bit-coded algorithm introduced by Sulzmann and Lu
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    66
was formally verified in Isabelle, by a very clever use of
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    67
flex function and retrieve to carefully mimic the way a value is 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    68
built up by the injection funciton.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    69
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    70
In the previous work, Ausaf and Urban established the below equality:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    71
\begin{lemma}
371
Chengsong
parents: 369
diff changeset
    72
\isa{{\normalsize{}If\,}\ v\ {\isacharcolon}{\kern0pt}\ r{\isacharbackslash}{\kern0pt}s\ {\normalsize \,then\,}\ Some\ {\isacharparenleft}{\kern0pt}flex\ r\ id\ s\ v{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ decode\ {\isacharparenleft}{\kern0pt}retrieve\ {\isacharparenleft}{\kern0pt}r\mbox{$^\uparrow$}\mbox{$\bbslash$}s{\isacharparenright}{\kern0pt}\ v{\isacharparenright}{\kern0pt}\ r{\isachardot}{\kern0pt}}
Chengsong
parents: 369
diff changeset
    73
\end{lemma}
Chengsong
parents: 369
diff changeset
    74
Chengsong
parents: 369
diff changeset
    75
This lemma establishes a link with the lexer without bit-codes.
Chengsong
parents: 369
diff changeset
    76
Chengsong
parents: 369
diff changeset
    77
With it we get the correctness of bit-coded algorithm.
Chengsong
parents: 369
diff changeset
    78
\begin{lemma}
Chengsong
parents: 369
diff changeset
    79
\isa{lexer\mbox{$_b$}\ r\ s\ {\isacharequal}{\kern0pt}\ lexer\ r\ s}
369
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    80
\end{lemma}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    81
371
Chengsong
parents: 369
diff changeset
    82
However what is not certain is whether we can add simplification
Chengsong
parents: 369
diff changeset
    83
to the bit-coded algorithm, without breaking the correct lexing output.
Chengsong
parents: 369
diff changeset
    84
Chengsong
parents: 369
diff changeset
    85
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
    86
The reason that we do need to add a simplification phase
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
    87
after each derivative step of  $\textit{blexer}$ is
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
    88
because it produces intermediate
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
    89
regular expressions that can grow exponentially.
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
    90
For example, the regular expression $(a+aa)^*$ after taking
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
    91
derivative against just 10 $a$s will have size 8192.
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
    92
%TODO: add figure for this?
371
Chengsong
parents: 369
diff changeset
    93
\begin{center}
Chengsong
parents: 369
diff changeset
    94
  \begin{tabular}{lcl}
Chengsong
parents: 369
diff changeset
    95
  \isa{bsimp\ {\isacharparenleft}{\kern0pt}ASEQ\ bs\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{bsimp{\isacharunderscore}{\kern0pt}ASEQ\ bs\ {\isacharparenleft}{\kern0pt}bsimp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}bsimp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
Chengsong
parents: 369
diff changeset
    96
  \isa{bsimp\ {\isacharparenleft}{\kern0pt}AALTs\ bs{\isadigit{1}}{\isachardot}{\kern0pt}{\isadigit{0}}\ rs{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{bsimp{\isacharunderscore}{\kern0pt}AALTs\ bs{\isadigit{1}}{\isachardot}{\kern0pt}{\isadigit{0}}\ {\isacharparenleft}{\kern0pt}distinctBy\ {\isacharparenleft}{\kern0pt}flts\ {\isacharparenleft}{\kern0pt}map\ bsimp\ rs{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ erase\ {\isasymemptyset}{\isacharparenright}{\kern0pt}}\\
Chengsong
parents: 369
diff changeset
    97
  \isa{bsimp\ AZERO} & $\dn$ & \isa{AZERO}\\
Chengsong
parents: 369
diff changeset
    98
  \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\mbox{$^\uparrow$}} & $\dn$ & \isa{AALT\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}fuse\ {\isacharbrackleft}{\kern0pt}Z{\isacharbrackright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\mbox{$^\uparrow$}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}fuse\ {\isacharbrackleft}{\kern0pt}S{\isacharbrackright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}\mbox{$^\uparrow$}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}}\\
Chengsong
parents: 369
diff changeset
    99
\end{tabular}
Chengsong
parents: 369
diff changeset
   100
\end{center}
Chengsong
parents: 369
diff changeset
   101
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   102
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   103
This might sound trivial in the case of producing a YES/NO answer,
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   104
but once we require a lexing output to be produced (which is required
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   105
in applications like compiler front-end, malicious attack domain extraction, 
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   106
etc.), it is not straightforward if we still extract what is needed according
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   107
to the POSIX standard.
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   108
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   109
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   110
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   111
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   112
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   113
By simplification, we mean specifically the following rules:
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   114
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   115
\begin{center}
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   116
  \begin{tabular}{lcl}
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   117
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{ASEQ\ bs\ AZERO\ r\isactrlsub {\isadigit{2}}\ {\isasymleadsto}\ AZERO}}}\\
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   118
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{ASEQ\ bs\ r\isactrlsub {\isadigit{1}}\ AZERO\ {\isasymleadsto}\ AZERO}}}\\
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   119
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{ASEQ\ bs\ {\isacharparenleft}{\kern0pt}AONE\ bs\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymleadsto}\ fuse\ {\isacharparenleft}{\kern0pt}bs\ {\isacharat}{\kern0pt}\ bs\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ r\isactrlsub {\isadigit{1}}}}}\\
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   120
  \isa{\mbox{}\inferrule{\mbox{r\isactrlsub {\isadigit{1}}\ {\isasymleadsto}\ r\isactrlsub {\isadigit{2}}}}{\mbox{ASEQ\ bs\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{3}}\ {\isasymleadsto}\ ASEQ\ bs\ r\isactrlsub {\isadigit{2}}\ r\isactrlsub {\isadigit{3}}}}}\\
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   121
  \isa{\mbox{}\inferrule{\mbox{r\isactrlsub {\isadigit{3}}\ {\isasymleadsto}\ r\isactrlsub {\isadigit{4}}}}{\mbox{ASEQ\ bs\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{3}}\ {\isasymleadsto}\ ASEQ\ bs\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{4}}}}}\\
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   122
  \isa{\mbox{}\inferrule{\mbox{r\ {\isasymleadsto}\ r{\isacharprime}{\kern0pt}}}{\mbox{AALTs\ bs\ {\isacharparenleft}{\kern0pt}rs\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}r{\isacharbrackright}{\kern0pt}\ {\isacharat}{\kern0pt}\ rs\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymleadsto}\ AALTs\ bs\ {\isacharparenleft}{\kern0pt}rs\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}r{\isacharprime}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isacharat}{\kern0pt}\ rs\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}}}\\
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   123
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{AALTs\ bs\ {\isacharparenleft}{\kern0pt}rs\isactrlsub a\ {\isacharat}{\kern0pt}\ AZERO\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}rs\isactrlsub b{\isacharparenright}{\kern0pt}\ {\isasymleadsto}\ AALTs\ bs\ {\isacharparenleft}{\kern0pt}rs\isactrlsub a\ {\isacharat}{\kern0pt}\ rs\isactrlsub b{\isacharparenright}{\kern0pt}}}}\\
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   124
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{AALTs\ bs\ {\isacharparenleft}{\kern0pt}rs\isactrlsub a\ {\isacharat}{\kern0pt}\ AALTs\ bs\isactrlsub {\isadigit{1}}\ rs\isactrlsub {\isadigit{1}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}rs\isactrlsub b{\isacharparenright}{\kern0pt}\ {\isasymleadsto}\ AALTs\ bs\ {\isacharparenleft}{\kern0pt}rs\isactrlsub a\ {\isacharat}{\kern0pt}\ map\ {\isacharparenleft}{\kern0pt}fuse\ bs\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ rs\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ rs\isactrlsub b{\isacharparenright}{\kern0pt}}}}\\
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   125
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{AALTs\ bs\ {\isacharparenleft}{\kern0pt}map\ {\isacharparenleft}{\kern0pt}fuse\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ rs{\isacharparenright}{\kern0pt}\ {\isasymleadsto}\ AALTs\ {\isacharparenleft}{\kern0pt}bs\ {\isacharat}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ rs}}}\\
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   126
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{AALTs\ {\isacharparenleft}{\kern0pt}bs\ {\isacharat}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ rs\ {\isasymleadsto}\ AALTs\ bs\ {\isacharparenleft}{\kern0pt}map\ {\isacharparenleft}{\kern0pt}fuse\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ rs{\isacharparenright}{\kern0pt}}}}\\
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   127
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{AALTs\ bs\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymleadsto}\ AZERO}}}\\
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   128
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{AALTs\ bs\ {\isacharbrackleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbrackright}{\kern0pt}\ {\isasymleadsto}\ fuse\ bs\ r\isactrlsub {\isadigit{1}}}}}\\
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   129
  \isa{\mbox{}\inferrule{\mbox{a\isactrlsub {\isadigit{1}}\mbox{$^\downarrow$}\ {\isacharequal}{\kern0pt}\ a\isactrlsub {\isadigit{2}}\mbox{$^\downarrow$}}}{\mbox{AALTs\ bs\ {\isacharparenleft}{\kern0pt}rs\isactrlsub a\ {\isacharat}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}a\isactrlsub {\isadigit{1}}{\isacharbrackright}{\kern0pt}\ {\isacharat}{\kern0pt}\ rs\isactrlsub b\ {\isacharat}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}a\isactrlsub {\isadigit{2}}{\isacharbrackright}{\kern0pt}\ {\isacharat}{\kern0pt}\ rs\isactrlsub c{\isacharparenright}{\kern0pt}\ {\isasymleadsto}\ AALTs\ bs\ {\isacharparenleft}{\kern0pt}rs\isactrlsub a\ {\isacharat}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}a\isactrlsub {\isadigit{1}}{\isacharbrackright}{\kern0pt}\ {\isacharat}{\kern0pt}\ rs\isactrlsub b\ {\isacharat}{\kern0pt}\ rs\isactrlsub c{\isacharparenright}{\kern0pt}}}}\\
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   130
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   131
  \end{tabular}
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   132
\end{center}
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   133
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   134
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   135
And these can be made compact by the following simplification function:
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   136
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   137
where the function $\mathit{bsimp_AALTs}$
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   138
371
Chengsong
parents: 369
diff changeset
   139
The core idea of the proof is that two regular expressions,
Chengsong
parents: 369
diff changeset
   140
if "isomorphic" up to a finite number of rewrite steps, will
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   141
remain "isomorphic" when we take the same sequence of
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   142
derivatives on both of them.
371
Chengsong
parents: 369
diff changeset
   143
This can be expressed by the following rewrite relation lemma:
Chengsong
parents: 369
diff changeset
   144
\begin{lemma}
Chengsong
parents: 369
diff changeset
   145
\isa{{\isacharparenleft}{\kern0pt}r\mbox{$\bbslash$}s{\isacharparenright}{\kern0pt}\ {\isasymleadsto}{\isacharasterisk}{\kern0pt}\ bders{\isacharunderscore}{\kern0pt}simp\ r\ s}
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   146
\end{lemma}
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   147
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   148
This isomorphic relation implies a property that leads to the 
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   149
correctness result: 
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   150
if two (nullable) regular expressions are "rewritable" in many steps
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   151
from one another, 
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   152
then a call to function $\textit{bmkeps}$ gives the same
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   153
bit-sequence :
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   154
\begin{lemma}
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   155
\isa{{\normalsize{}If\,}\ \mbox{r{\isadigit{1}}{\isachardot}{\kern0pt}{\isadigit{0}}\ {\isasymleadsto}{\isacharasterisk}{\kern0pt}\ r{\isadigit{2}}{\isachardot}{\kern0pt}{\isadigit{0}}}\ {\normalsize \,and\,}\ \mbox{nullable\mbox{$_b$}\ r{\isadigit{1}}{\isachardot}{\kern0pt}{\isadigit{0}}}\ {\normalsize \,then\,}\ mkeps\mbox{$_b$}\ r{\isadigit{1}}{\isachardot}{\kern0pt}{\isadigit{0}}\ {\isacharequal}{\kern0pt}\ mkeps\mbox{$_b$}\ r{\isadigit{2}}{\isachardot}{\kern0pt}{\isadigit{0}}{\isachardot}{\kern0pt}}
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   156
\end{lemma}
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   157
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   158
Given the same bit-sequence, the decode function
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   159
will give out the same value, which is the output
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   160
of both lexers:
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   161
\begin{lemma}
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   162
\isa{lexer\mbox{$_b$}\ r\ s\ {\isasymequiv}\ \textrm{if}\ nullable\mbox{$_b$}\ {\isacharparenleft}{\kern0pt}r\mbox{$^\uparrow$}\mbox{$\bbslash$}s{\isacharparenright}{\kern0pt}\ \textrm{then}\ decode\ {\isacharparenleft}{\kern0pt}mkeps\mbox{$_b$}\ {\isacharparenleft}{\kern0pt}r\mbox{$^\uparrow$}\mbox{$\bbslash$}s{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ r\ \textrm{else}\ None}
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   163
\end{lemma}
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   164
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   165
\begin{lemma}
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   166
\isa{blexer{\isacharunderscore}{\kern0pt}simp\ r\ s\ {\isasymequiv}\ \textrm{if}\ nullable\mbox{$_b$}\ {\isacharparenleft}{\kern0pt}bders{\isacharunderscore}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}r\mbox{$^\uparrow$}{\isacharparenright}{\kern0pt}\ s{\isacharparenright}{\kern0pt}\ \textrm{then}\ decode\ {\isacharparenleft}{\kern0pt}mkeps\mbox{$_b$}\ {\isacharparenleft}{\kern0pt}bders{\isacharunderscore}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}r\mbox{$^\uparrow$}{\isacharparenright}{\kern0pt}\ s{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ r\ \textrm{else}\ None}
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   167
\end{lemma}
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   168
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   169
And that yields the correctness result:
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   170
\begin{lemma}
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
   171
\isa{blexer{\isacharunderscore}{\kern0pt}simp\ r\ s\ {\isacharequal}{\kern0pt}\ lexer\ r\ s}
371
Chengsong
parents: 369
diff changeset
   172
\end{lemma}%
Chengsong
parents: 369
diff changeset
   173
\end{isamarkuptext}\isamarkuptrue%
Chengsong
parents: 369
diff changeset
   174
%
Chengsong
parents: 369
diff changeset
   175
\isadelimdocument
Chengsong
parents: 369
diff changeset
   176
%
Chengsong
parents: 369
diff changeset
   177
\endisadelimdocument
Chengsong
parents: 369
diff changeset
   178
%
Chengsong
parents: 369
diff changeset
   179
\isatagdocument
Chengsong
parents: 369
diff changeset
   180
%
Chengsong
parents: 369
diff changeset
   181
\isamarkupsection{Introduction%
Chengsong
parents: 369
diff changeset
   182
}
Chengsong
parents: 369
diff changeset
   183
\isamarkuptrue%
Chengsong
parents: 369
diff changeset
   184
%
Chengsong
parents: 369
diff changeset
   185
\endisatagdocument
Chengsong
parents: 369
diff changeset
   186
{\isafolddocument}%
Chengsong
parents: 369
diff changeset
   187
%
Chengsong
parents: 369
diff changeset
   188
\isadelimdocument
Chengsong
parents: 369
diff changeset
   189
%
Chengsong
parents: 369
diff changeset
   190
\endisadelimdocument
Chengsong
parents: 369
diff changeset
   191
%
Chengsong
parents: 369
diff changeset
   192
\begin{isamarkuptext}%
369
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   193
Brzozowski \cite{Brzozowski1964} introduced the notion of the {\em
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   194
derivative} \isa{r{\isacharbackslash}{\kern0pt}c} of a regular expression \isa{r} w.r.t.\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   195
a character~\isa{c}, and showed that it gave a simple solution to the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   196
problem of matching a string \isa{s} with a regular expression \isa{r}: if the derivative of \isa{r} w.r.t.\ (in succession) all the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   197
characters of the string matches the empty string, then \isa{r}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   198
matches \isa{s} (and {\em vice versa}). The derivative has the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   199
property (which may almost be regarded as its specification) that, for
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   200
every string \isa{s} and regular expression \isa{r} and character
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   201
\isa{c}, one has \isa{cs\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}} if and only if \mbox{\isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}}}. 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   202
The beauty of Brzozowski's derivatives is that
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   203
they are neatly expressible in any functional language, and easily
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   204
definable and reasoned about in theorem provers---the definitions just
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   205
consist of inductive datatypes and simple recursive functions. A
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   206
mechanised correctness proof of Brzozowski's matcher in for example HOL4
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   207
has been mentioned by Owens and Slind~\cite{Owens2008}. Another one in
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   208
Isabelle/HOL is part of the work by Krauss and Nipkow \cite{Krauss2011}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   209
And another one in Coq is given by Coquand and Siles \cite{Coquand2012}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   210
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   211
If a regular expression matches a string, then in general there is more
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   212
than one way of how the string is matched. There are two commonly used
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   213
disambiguation strategies to generate a unique answer: one is called
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   214
GREEDY matching \cite{Frisch2004} and the other is POSIX
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   215
matching~\cite{POSIX,Kuklewicz,OkuiSuzuki2010,Sulzmann2014,Vansummeren2006}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   216
For example consider the string \isa{xy} and the regular expression
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   217
\mbox{\isa{{\isacharparenleft}{\kern0pt}x\ {\isacharplus}{\kern0pt}\ y\ {\isacharplus}{\kern0pt}\ xy{\isacharparenright}{\kern0pt}\isactrlsup {\isasymstar}}}. Either the string can be
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   218
matched in two `iterations' by the single letter-regular expressions
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   219
\isa{x} and \isa{y}, or directly in one iteration by \isa{xy}. The
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   220
first case corresponds to GREEDY matching, which first matches with the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   221
left-most symbol and only matches the next symbol in case of a mismatch
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   222
(this is greedy in the sense of preferring instant gratification to
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   223
delayed repletion). The second case is POSIX matching, which prefers the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   224
longest match.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   225
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   226
In the context of lexing, where an input string needs to be split up
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   227
into a sequence of tokens, POSIX is the more natural disambiguation
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   228
strategy for what programmers consider basic syntactic building blocks
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   229
in their programs.  These building blocks are often specified by some
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   230
regular expressions, say \isa{r\isactrlbsub key\isactrlesub } and \isa{r\isactrlbsub id\isactrlesub } for recognising keywords and identifiers,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   231
respectively. There are a few underlying (informal) rules behind
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   232
tokenising a string in a POSIX \cite{POSIX} fashion:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   233
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   234
\begin{itemize} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   235
\item[$\bullet$] \emph{The Longest Match Rule} (or \emph{``{M}aximal {M}unch {R}ule''}):
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   236
The longest initial substring matched by any regular expression is taken as
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   237
next token.\smallskip
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   238
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   239
\item[$\bullet$] \emph{Priority Rule:}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   240
For a particular longest initial substring, the first (leftmost) regular expression
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   241
that can match determines the token.\smallskip
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   242
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   243
\item[$\bullet$] \emph{Star Rule:} A subexpression repeated by ${}^\star$ shall 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   244
not match an empty string unless this is the only match for the repetition.\smallskip
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   245
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   246
\item[$\bullet$] \emph{Empty String Rule:} An empty string shall be considered to 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   247
be longer than no match at all.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   248
\end{itemize}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   249
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   250
\noindent Consider for example a regular expression \isa{r\isactrlbsub key\isactrlesub } for recognising keywords such as \isa{if},
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   251
\isa{then} and so on; and \isa{r\isactrlbsub id\isactrlesub }
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   252
recognising identifiers (say, a single character followed by
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   253
characters or numbers).  Then we can form the regular expression
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   254
\isa{{\isacharparenleft}{\kern0pt}r\isactrlbsub key\isactrlesub \ {\isacharplus}{\kern0pt}\ r\isactrlbsub id\isactrlesub {\isacharparenright}{\kern0pt}\isactrlsup {\isasymstar}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   255
and use POSIX matching to tokenise strings, say \isa{iffoo} and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   256
\isa{if}.  For \isa{iffoo} we obtain by the Longest Match Rule
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   257
a single identifier token, not a keyword followed by an
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   258
identifier. For \isa{if} we obtain by the Priority Rule a keyword
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   259
token, not an identifier token---even if \isa{r\isactrlbsub id\isactrlesub }
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   260
matches also. By the Star Rule we know \isa{{\isacharparenleft}{\kern0pt}r\isactrlbsub key\isactrlesub \ {\isacharplus}{\kern0pt}\ r\isactrlbsub id\isactrlesub {\isacharparenright}{\kern0pt}\isactrlsup {\isasymstar}} matches \isa{iffoo},
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   261
respectively \isa{if}, in exactly one `iteration' of the star. The
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   262
Empty String Rule is for cases where, for example, the regular expression 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   263
\isa{{\isacharparenleft}{\kern0pt}a\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}\isactrlsup {\isasymstar}} matches against the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   264
string \isa{bc}. Then the longest initial matched substring is the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   265
empty string, which is matched by both the whole regular expression
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   266
and the parenthesised subexpression.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   267
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   268
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   269
One limitation of Brzozowski's matcher is that it only generates a
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   270
YES/NO answer for whether a string is being matched by a regular
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   271
expression.  Sulzmann and Lu~\cite{Sulzmann2014} extended this matcher
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   272
to allow generation not just of a YES/NO answer but of an actual
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   273
matching, called a [lexical] {\em value}. Assuming a regular
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   274
expression matches a string, values encode the information of
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   275
\emph{how} the string is matched by the regular expression---that is,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   276
which part of the string is matched by which part of the regular
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   277
expression. For this consider again the string \isa{xy} and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   278
the regular expression \mbox{\isa{{\isacharparenleft}{\kern0pt}x\ {\isacharplus}{\kern0pt}\ {\isacharparenleft}{\kern0pt}y\ {\isacharplus}{\kern0pt}\ xy{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\isactrlsup {\isasymstar}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   279
(this time fully parenthesised). We can view this regular expression
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   280
as tree and if the string \isa{xy} is matched by two Star
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   281
`iterations', then the \isa{x} is matched by the left-most
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   282
alternative in this tree and the \isa{y} by the right-left alternative. This
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   283
suggests to record this matching as
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   284
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   285
\begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   286
\isa{Stars\ {\isacharbrackleft}{\kern0pt}Left\ {\isacharparenleft}{\kern0pt}Char\ x{\isacharparenright}{\kern0pt}{\isacharcomma}{\kern0pt}\ Right\ {\isacharparenleft}{\kern0pt}Left\ {\isacharparenleft}{\kern0pt}Char\ y{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isacharbrackright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   287
\end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   288
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   289
\noindent where \isa{Stars}, \isa{Left}, \isa{Right} and \isa{Char} are constructors for values. \isa{Stars} records how many
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   290
iterations were used; \isa{Left}, respectively \isa{Right}, which
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   291
alternative is used. This `tree view' leads naturally to the idea that
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   292
regular expressions act as types and values as inhabiting those types
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   293
(see, for example, \cite{HosoyaVouillonPierce2005}).  The value for
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   294
matching \isa{xy} in a single `iteration', i.e.~the POSIX value,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   295
would look as follows
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   296
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   297
\begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   298
\isa{Stars\ {\isacharbrackleft}{\kern0pt}Seq\ {\isacharparenleft}{\kern0pt}Char\ x{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}Char\ y{\isacharparenright}{\kern0pt}{\isacharbrackright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   299
\end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   300
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   301
\noindent where \isa{Stars} has only a single-element list for the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   302
single iteration and \isa{Seq} indicates that \isa{xy} is matched 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   303
by a sequence regular expression.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   304
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   305
%, which we will in what follows 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   306
%write more formally as \isa{x\ {\isasymcdot}\ y}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   307
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   308
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   309
Sulzmann and Lu give a simple algorithm to calculate a value that
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   310
appears to be the value associated with POSIX matching.  The challenge
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   311
then is to specify that value, in an algorithm-independent fashion,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   312
and to show that Sulzmann and Lu's derivative-based algorithm does
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   313
indeed calculate a value that is correct according to the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   314
specification.  The answer given by Sulzmann and Lu
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   315
\cite{Sulzmann2014} is to define a relation (called an ``order
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   316
relation'') on the set of values of \isa{r}, and to show that (once
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   317
a string to be matched is chosen) there is a maximum element and that
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   318
it is computed by their derivative-based algorithm. This proof idea is
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   319
inspired by work of Frisch and Cardelli \cite{Frisch2004} on a GREEDY
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   320
regular expression matching algorithm. However, we were not able to
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   321
establish transitivity and totality for the ``order relation'' by
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   322
Sulzmann and Lu.  There are some inherent problems with their approach
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   323
(of which some of the proofs are not published in
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   324
\cite{Sulzmann2014}); perhaps more importantly, we give in this paper
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   325
a simple inductive (and algorithm-independent) definition of what we
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   326
call being a {\em POSIX value} for a regular expression \isa{r} and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   327
a string \isa{s}; we show that the algorithm by Sulzmann and Lu
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   328
computes such a value and that such a value is unique. Our proofs are
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   329
both done by hand and checked in Isabelle/HOL.  The experience of
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   330
doing our proofs has been that this mechanical checking was absolutely
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   331
essential: this subject area has hidden snares. This was also noted by
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   332
Kuklewicz \cite{Kuklewicz} who found that nearly all POSIX matching
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   333
implementations are ``buggy'' \cite[Page 203]{Sulzmann2014} and by
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   334
Grathwohl et al \cite[Page 36]{CrashCourse2014} who wrote:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   335
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   336
\begin{quote}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   337
\it{}``The POSIX strategy is more complicated than the greedy because of 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   338
the dependence on information about the length of matched strings in the 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   339
various subexpressions.''
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   340
\end{quote}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   341
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   342
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   343
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   344
\noindent {\bf Contributions:} We have implemented in Isabelle/HOL the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   345
derivative-based regular expression matching algorithm of
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   346
Sulzmann and Lu \cite{Sulzmann2014}. We have proved the correctness of this
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   347
algorithm according to our specification of what a POSIX value is (inspired
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   348
by work of Vansummeren \cite{Vansummeren2006}). Sulzmann
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   349
and Lu sketch in \cite{Sulzmann2014} an informal correctness proof: but to
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   350
us it contains unfillable gaps.\footnote{An extended version of
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   351
\cite{Sulzmann2014} is available at the website of its first author; this
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   352
extended version already includes remarks in the appendix that their
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   353
informal proof contains gaps, and possible fixes are not fully worked out.}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   354
Our specification of a POSIX value consists of a simple inductive definition
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   355
that given a string and a regular expression uniquely determines this value.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   356
We also show that our definition is equivalent to an ordering 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   357
of values based on positions by Okui and Suzuki \cite{OkuiSuzuki2010}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   358
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   359
%Derivatives as calculated by Brzozowski's method are usually more complex
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   360
%regular expressions than the initial one; various optimisations are
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   361
%possible. We prove the correctness when simplifications of \isa{\isactrlbold {\isadigit{0}}\ {\isacharplus}{\kern0pt}\ r}, 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   362
%\isa{r\ {\isacharplus}{\kern0pt}\ \isactrlbold {\isadigit{0}}}, \isa{\isactrlbold {\isadigit{1}}\ {\isasymcdot}\ r} and \isa{r\ {\isasymcdot}\ \isactrlbold {\isadigit{1}}} to
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   363
%\isa{r} are applied. 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   364
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   365
We extend our results to ??? Bitcoded version??%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   366
\end{isamarkuptext}\isamarkuptrue%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   367
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   368
\isadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   369
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   370
\endisadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   371
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   372
\isatagdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   373
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   374
\isamarkupsection{Preliminaries%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   375
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   376
\isamarkuptrue%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   377
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   378
\endisatagdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   379
{\isafolddocument}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   380
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   381
\isadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   382
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   383
\endisadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   384
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   385
\begin{isamarkuptext}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   386
\noindent Strings in Isabelle/HOL are lists of characters with
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   387
the empty string being represented by the empty list, written \isa{{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}, and list-cons being written as \isa{\underline{\hspace{2mm}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}\underline{\hspace{2mm}}}. Often
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   388
we use the usual bracket notation for lists also for strings; for
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   389
example a string consisting of just a single character \isa{c} is
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   390
written \isa{{\isacharbrackleft}{\kern0pt}c{\isacharbrackright}{\kern0pt}}. We use the usual definitions for 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   391
\emph{prefixes} and \emph{strict prefixes} of strings.  By using the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   392
type \isa{char} for characters we have a supply of finitely many
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   393
characters roughly corresponding to the ASCII character set. Regular
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   394
expressions are defined as usual as the elements of the following
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   395
inductive datatype:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   396
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   397
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   398
  \isa{r\ {\isacharcolon}{\kern0pt}{\isacharequal}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   399
  \isa{\isactrlbold {\isadigit{0}}} $\mid$
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   400
  \isa{\isactrlbold {\isadigit{1}}} $\mid$
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   401
  \isa{c} $\mid$
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   402
  \isa{r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}} $\mid$
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   403
  \isa{r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}} $\mid$
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   404
  \isa{r\isactrlsup {\isasymstar}} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   405
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   406
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   407
  \noindent where \isa{\isactrlbold {\isadigit{0}}} stands for the regular expression that does
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   408
  not match any string, \isa{\isactrlbold {\isadigit{1}}} for the regular expression that matches
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   409
  only the empty string and \isa{c} for matching a character literal. The
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   410
  language of a regular expression is also defined as usual by the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   411
  recursive function \isa{L} with the six clauses:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   412
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   413
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   414
  \begin{tabular}{l@ {\hspace{4mm}}rcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   415
  \textit{(1)} & \isa{L{\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{0}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isasymemptyset}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   416
  \textit{(2)} & \isa{L{\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{1}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   417
  \textit{(3)} & \isa{L{\isacharparenleft}{\kern0pt}c{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}c{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   418
  \textit{(4)} & \isa{L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   419
        \isa{L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharat}{\kern0pt}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   420
  \textit{(5)} & \isa{L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   421
        \isa{L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymunion}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   422
  \textit{(6)} & \isa{L{\isacharparenleft}{\kern0pt}r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isasymstar}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   423
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   424
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   425
  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   426
  \noindent In clause \textit{(4)} we use the operation \isa{\underline{\hspace{2mm}}\ {\isacharat}{\kern0pt}\ \underline{\hspace{2mm}}} for the concatenation of two languages (it is also list-append for
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   427
  strings). We use the star-notation for regular expressions and for
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   428
  languages (in the last clause above). The star for languages is defined
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   429
  inductively by two clauses: \isa{{\isacharparenleft}{\kern0pt}i{\isacharparenright}{\kern0pt}} the empty string being in
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   430
  the star of a language and \isa{{\isacharparenleft}{\kern0pt}ii{\isacharparenright}{\kern0pt}} if \isa{s\isactrlsub {\isadigit{1}}} is in a
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   431
  language and \isa{s\isactrlsub {\isadigit{2}}} in the star of this language, then also \isa{s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}} is in the star of this language. It will also be convenient
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   432
  to use the following notion of a \emph{semantic derivative} (or \emph{left
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   433
  quotient}) of a language defined as
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   434
  %
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   435
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   436
  \isa{Der\ c\ A\ {\isasymequiv}\ {\isacharbraceleft}{\kern0pt}s\ \mbox{\boldmath$\mid$}\ c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s\ {\isasymin}\ A{\isacharbraceright}{\kern0pt}}\;.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   437
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   438
 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   439
  \noindent
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   440
  For semantic derivatives we have the following equations (for example
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   441
  mechanically proved in \cite{Krauss2011}):
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   442
  %
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   443
  \begin{equation}\label{SemDer}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   444
  \begin{array}{lcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   445
  \isa{Der\ c\ {\isasymemptyset}}  & \dn & \isa{{\isasymemptyset}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   446
  \isa{Der\ c\ {\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}}  & \dn & \isa{{\isasymemptyset}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   447
  \isa{Der\ c\ {\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}d{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}}  & \dn & \isa{\textrm{if}\ c\ {\isacharequal}{\kern0pt}\ d\ \textrm{then}\ {\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ \textrm{else}\ {\isasymemptyset}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   448
  \isa{Der\ c\ {\isacharparenleft}{\kern0pt}A\ {\isasymunion}\ B{\isacharparenright}{\kern0pt}}  & \dn & \isa{Der\ c\ A\ {\isasymunion}\ Der\ c\ B}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   449
  \isa{Der\ c\ {\isacharparenleft}{\kern0pt}A\ {\isacharat}{\kern0pt}\ B{\isacharparenright}{\kern0pt}}  & \dn & \isa{{\isacharparenleft}{\kern0pt}Der\ c\ A\ {\isacharat}{\kern0pt}\ B{\isacharparenright}{\kern0pt}\ {\isasymunion}\ {\isacharparenleft}{\kern0pt}\textrm{if}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymin}\ A\ \textrm{then}\ Der\ c\ B\ \textrm{else}\ {\isasymemptyset}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   450
  \isa{Der\ c\ {\isacharparenleft}{\kern0pt}A{\isasymstar}{\isacharparenright}{\kern0pt}}  & \dn & \isa{Der\ c\ A\ {\isacharat}{\kern0pt}\ A{\isasymstar}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   451
  \end{array}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   452
  \end{equation}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   453
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   454
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   455
  \noindent \emph{\Brz's derivatives} of regular expressions
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   456
  \cite{Brzozowski1964} can be easily defined by two recursive functions:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   457
  the first is from regular expressions to booleans (implementing a test
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   458
  when a regular expression can match the empty string), and the second
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   459
  takes a regular expression and a character to a (derivative) regular
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   460
  expression:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   461
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   462
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   463
  \begin{tabular}{lcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   464
  \isa{nullable\ {\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{0}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{False}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   465
  \isa{nullable\ {\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{1}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{True}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   466
  \isa{nullable\ {\isacharparenleft}{\kern0pt}c{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{False}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   467
  \isa{nullable\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{nullable\ r\isactrlsub {\isadigit{1}}\ {\isasymor}\ nullable\ r\isactrlsub {\isadigit{2}}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   468
  \isa{nullable\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{nullable\ r\isactrlsub {\isadigit{1}}\ {\isasymand}\ nullable\ r\isactrlsub {\isadigit{2}}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   469
  \isa{nullable\ {\isacharparenleft}{\kern0pt}r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{True}\medskip\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   470
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   471
%  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   472
%  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   473
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   474
%  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   475
%  \begin{tabular}{lcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   476
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   477
  \isa{\isactrlbold {\isadigit{0}}{\isacharbackslash}{\kern0pt}c} & $\dn$ & \isa{\isactrlbold {\isadigit{0}}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   478
  \isa{\isactrlbold {\isadigit{1}}{\isacharbackslash}{\kern0pt}c} & $\dn$ & \isa{\isactrlbold {\isadigit{0}}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   479
  \isa{d{\isacharbackslash}{\kern0pt}c} & $\dn$ & \isa{\textrm{if}\ c\ {\isacharequal}{\kern0pt}\ d\ \textrm{then}\ \isactrlbold {\isadigit{1}}\ \textrm{else}\ \isactrlbold {\isadigit{0}}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   480
  \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isacharplus}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   481
  \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c} & $\dn$ & \isa{\textrm{if}\ nullable\ r\isactrlsub {\isadigit{1}}\ \textrm{then}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}\ {\isacharplus}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ \textrm{else}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   482
  \isa{{\isacharparenleft}{\kern0pt}r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsup {\isasymstar}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   483
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   484
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   485
 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   486
  \noindent
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   487
  We may extend this definition to give derivatives w.r.t.~strings:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   488
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   489
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   490
  \begin{tabular}{lcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   491
  \isa{r{\isacharbackslash}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} & $\dn$ & \isa{r}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   492
  \isa{r{\isacharbackslash}{\kern0pt}{\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}s}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   493
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   494
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   495
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   496
  \noindent Given the equations in \eqref{SemDer}, it is a relatively easy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   497
  exercise in mechanical reasoning to establish that
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   498
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   499
  \begin{proposition}\label{derprop}\mbox{}\\ 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   500
  \begin{tabular}{ll}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   501
  \textit{(1)} & \isa{nullable\ r} if and only if
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   502
  \isa{{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}}, and \\ 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   503
  \textit{(2)} & \isa{L{\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ Der\ c\ {\isacharparenleft}{\kern0pt}L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   504
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   505
  \end{proposition}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   506
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   507
  \noindent With this in place it is also very routine to prove that the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   508
  regular expression matcher defined as
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   509
  %
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   510
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   511
  \isa{match\ r\ s\ {\isasymequiv}\ nullable\ {\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}s{\isacharparenright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   512
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   513
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   514
  \noindent gives a positive answer if and only if \isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   515
  Consequently, this regular expression matching algorithm satisfies the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   516
  usual specification for regular expression matching. While the matcher
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   517
  above calculates a provably correct YES/NO answer for whether a regular
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   518
  expression matches a string or not, the novel idea of Sulzmann and Lu
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   519
  \cite{Sulzmann2014} is to append another phase to this algorithm in order
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   520
  to calculate a [lexical] value. We will explain the details next.%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   521
\end{isamarkuptext}\isamarkuptrue%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   522
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   523
\isadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   524
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   525
\endisadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   526
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   527
\isatagdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   528
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   529
\isamarkupsection{POSIX Regular Expression Matching\label{posixsec}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   530
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   531
\isamarkuptrue%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   532
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   533
\endisatagdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   534
{\isafolddocument}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   535
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   536
\isadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   537
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   538
\endisadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   539
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   540
\begin{isamarkuptext}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   541
There have been many previous works that use values for encoding 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   542
  \emph{how} a regular expression matches a string.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   543
  The clever idea by Sulzmann and Lu \cite{Sulzmann2014} is to 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   544
  define a function on values that mirrors (but inverts) the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   545
  construction of the derivative on regular expressions. \emph{Values}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   546
  are defined as the inductive datatype
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   547
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   548
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   549
  \isa{v\ {\isacharcolon}{\kern0pt}{\isacharequal}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   550
  \isa{Empty} $\mid$
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   551
  \isa{Char\ c} $\mid$
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   552
  \isa{Left\ v} $\mid$
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   553
  \isa{Right\ v} $\mid$
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   554
  \isa{Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}} $\mid$ 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   555
  \isa{Stars\ vs} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   556
  \end{center}  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   557
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   558
  \noindent where we use \isa{vs} to stand for a list of
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   559
  values. (This is similar to the approach taken by Frisch and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   560
  Cardelli for GREEDY matching \cite{Frisch2004}, and Sulzmann and Lu
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   561
  for POSIX matching \cite{Sulzmann2014}). The string underlying a
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   562
  value can be calculated by the \isa{flat} function, written
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   563
  \isa{{\isacharbar}{\kern0pt}\underline{\hspace{2mm}}{\isacharbar}{\kern0pt}} and defined as:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   564
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   565
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   566
  \begin{tabular}[t]{lcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   567
  \isa{{\isacharbar}{\kern0pt}Empty{\isacharbar}{\kern0pt}} & $\dn$ & \isa{{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   568
  \isa{{\isacharbar}{\kern0pt}Char\ c{\isacharbar}{\kern0pt}} & $\dn$ & \isa{{\isacharbrackleft}{\kern0pt}c{\isacharbrackright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   569
  \isa{{\isacharbar}{\kern0pt}Left\ v{\isacharbar}{\kern0pt}} & $\dn$ & \isa{{\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   570
  \isa{{\isacharbar}{\kern0pt}Right\ v{\isacharbar}{\kern0pt}} & $\dn$ & \isa{{\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   571
  \end{tabular}\hspace{14mm}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   572
  \begin{tabular}[t]{lcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   573
  \isa{{\isacharbar}{\kern0pt}Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}} & $\dn$ & \isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharat}{\kern0pt}\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   574
  \isa{{\isacharbar}{\kern0pt}Stars\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbar}{\kern0pt}} & $\dn$ & \isa{{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   575
  \isa{{\isacharbar}{\kern0pt}Stars\ {\isacharparenleft}{\kern0pt}v\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vs{\isacharparenright}{\kern0pt}{\isacharbar}{\kern0pt}} & $\dn$ & \isa{{\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}\ {\isacharat}{\kern0pt}\ {\isacharbar}{\kern0pt}Stars\ vs{\isacharbar}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   576
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   577
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   578
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   579
  \noindent We will sometimes refer to the underlying string of a
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   580
  value as \emph{flattened value}.  We will also overload our notation and 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   581
  use \isa{{\isacharbar}{\kern0pt}vs{\isacharbar}{\kern0pt}} for flattening a list of values and concatenating
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   582
  the resulting strings.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   583
  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   584
  Sulzmann and Lu define
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   585
  inductively an \emph{inhabitation relation} that associates values to
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   586
  regular expressions. We define this relation as
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   587
  follows:\footnote{Note that the rule for \isa{Stars} differs from
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   588
  our earlier paper \cite{AusafDyckhoffUrban2016}. There we used the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   589
  original definition by Sulzmann and Lu which does not require that
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   590
  the values \isa{v\ {\isasymin}\ vs} flatten to a non-empty
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   591
  string. The reason for introducing the more restricted version of
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   592
  lexical values is convenience later on when reasoning about an
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   593
  ordering relation for values.}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   594
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   595
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   596
  \begin{tabular}{c@ {\hspace{12mm}}c}\label{prfintros}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   597
  \\[-8mm]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   598
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{Empty\ {\isacharcolon}{\kern0pt}\ \isactrlbold {\isadigit{1}}}}} & 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   599
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{Char\ c\ {\isacharcolon}{\kern0pt}\ c}}}\\[4mm]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   600
  \isa{\mbox{}\inferrule{\mbox{v\isactrlsub {\isadigit{1}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{1}}}}{\mbox{Left\ v\isactrlsub {\isadigit{1}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}}}} &
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   601
  \isa{\mbox{}\inferrule{\mbox{v\isactrlsub {\isadigit{2}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{1}}}}{\mbox{Right\ v\isactrlsub {\isadigit{2}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{2}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{1}}}}}\\[4mm]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   602
  \isa{\mbox{}\inferrule{\mbox{v\isactrlsub {\isadigit{1}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{1}}}\\\ \mbox{v\isactrlsub {\isadigit{2}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{2}}}}{\mbox{Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}}}}  &
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   603
  \isa{\mbox{}\inferrule{\mbox{{\isasymforall}v{\isasymin}vs{\isachardot}{\kern0pt}\ v\ {\isacharcolon}{\kern0pt}\ r\ {\isasymand}\ {\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}}{\mbox{Stars\ vs\ {\isacharcolon}{\kern0pt}\ r\isactrlsup {\isasymstar}}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   604
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   605
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   606
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   607
  \noindent where in the clause for \isa{Stars} we use the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   608
  notation \isa{v\ {\isasymin}\ vs} for indicating that \isa{v} is a
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   609
  member in the list \isa{vs}.  We require in this rule that every
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   610
  value in \isa{vs} flattens to a non-empty string. The idea is that
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   611
  \isa{Stars}-values satisfy the informal Star Rule (see Introduction)
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   612
  where the $^\star$ does not match the empty string unless this is
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   613
  the only match for the repetition.  Note also that no values are
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   614
  associated with the regular expression \isa{\isactrlbold {\isadigit{0}}}, and that the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   615
  only value associated with the regular expression \isa{\isactrlbold {\isadigit{1}}} is
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   616
  \isa{Empty}.  It is routine to establish how values ``inhabiting''
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   617
  a regular expression correspond to the language of a regular
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   618
  expression, namely
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   619
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   620
  \begin{proposition}\label{inhabs}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   621
  \isa{L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbraceleft}{\kern0pt}{\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}\ \mbox{\boldmath$\mid$}\ v\ {\isacharcolon}{\kern0pt}\ r{\isacharbraceright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   622
  \end{proposition}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   623
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   624
  \noindent
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   625
  Given a regular expression \isa{r} and a string \isa{s}, we define the 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   626
  set of all \emph{Lexical Values} inhabited by \isa{r} with the underlying string 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   627
  being \isa{s}:\footnote{Okui and Suzuki refer to our lexical values 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   628
  as \emph{canonical values} in \cite{OkuiSuzuki2010}. The notion of \emph{non-problematic
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   629
  values} by Cardelli and Frisch \cite{Frisch2004} is related, but not identical
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   630
  to our lexical values.}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   631
  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   632
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   633
  \isa{LV\ r\ s\ {\isasymequiv}\ {\isacharbraceleft}{\kern0pt}v\ \mbox{\boldmath$\mid$}\ v\ {\isacharcolon}{\kern0pt}\ r\ {\isasymand}\ {\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ s{\isacharbraceright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   634
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   635
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   636
  \noindent The main property of \isa{LV\ r\ s} is that it is alway finite.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   637
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   638
  \begin{proposition}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   639
  \isa{finite\ {\isacharparenleft}{\kern0pt}LV\ r\ s{\isacharparenright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   640
  \end{proposition}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   641
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   642
  \noindent This finiteness property does not hold in general if we
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   643
  remove the side-condition about \isa{{\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} in the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   644
  \isa{Stars}-rule above. For example using Sulzmann and Lu's
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   645
  less restrictive definition, \isa{LV\ {\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{1}}\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} would contain
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   646
  infinitely many values, but according to our more restricted
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   647
  definition only a single value, namely \isa{LV\ {\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{1}}\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbraceleft}{\kern0pt}Stars\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   648
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   649
  If a regular expression \isa{r} matches a string \isa{s}, then
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   650
  generally the set \isa{LV\ r\ s} is not just a singleton set.  In
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   651
  case of POSIX matching the problem is to calculate the unique lexical value
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   652
  that satisfies the (informal) POSIX rules from the Introduction.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   653
  Graphically the POSIX value calculation algorithm by Sulzmann and Lu
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   654
  can be illustrated by the picture in Figure~\ref{Sulz} where the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   655
  path from the left to the right involving \isa{derivatives}/\isa{nullable} is the first phase of the algorithm
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   656
  (calculating successive \Brz's derivatives) and \isa{mkeps}/\isa{inj}, the path from right to left, the second
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   657
  phase. This picture shows the steps required when a regular
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   658
  expression, say \isa{r\isactrlsub {\isadigit{1}}}, matches the string \isa{{\isacharbrackleft}{\kern0pt}a{\isacharcomma}{\kern0pt}\ b{\isacharcomma}{\kern0pt}\ c{\isacharbrackright}{\kern0pt}}. We first build the three derivatives (according to
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   659
  \isa{a}, \isa{b} and \isa{c}). We then use \isa{nullable}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   660
  to find out whether the resulting derivative regular expression
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   661
  \isa{r\isactrlsub {\isadigit{4}}} can match the empty string. If yes, we call the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   662
  function \isa{mkeps} that produces a value \isa{v\isactrlsub {\isadigit{4}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   663
  for how \isa{r\isactrlsub {\isadigit{4}}} can match the empty string (taking into
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   664
  account the POSIX constraints in case there are several ways). This
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   665
  function is defined by the clauses:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   666
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   667
\begin{figure}[t]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   668
\begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   669
\begin{tikzpicture}[scale=2,node distance=1.3cm,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   670
                    every node/.style={minimum size=6mm}]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   671
\node (r1)  {\isa{r\isactrlsub {\isadigit{1}}}};
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   672
\node (r2) [right=of r1]{\isa{r\isactrlsub {\isadigit{2}}}};
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   673
\draw[->,line width=1mm](r1)--(r2) node[above,midway] {\isa{\underline{\hspace{2mm}}{\isacharbackslash}{\kern0pt}a}};
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   674
\node (r3) [right=of r2]{\isa{r\isactrlsub {\isadigit{3}}}};
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   675
\draw[->,line width=1mm](r2)--(r3) node[above,midway] {\isa{\underline{\hspace{2mm}}{\isacharbackslash}{\kern0pt}b}};
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   676
\node (r4) [right=of r3]{\isa{r\isactrlsub {\isadigit{4}}}};
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   677
\draw[->,line width=1mm](r3)--(r4) node[above,midway] {\isa{\underline{\hspace{2mm}}{\isacharbackslash}{\kern0pt}c}};
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   678
\draw (r4) node[anchor=west] {\;\raisebox{3mm}{\isa{nullable}}};
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   679
\node (v4) [below=of r4]{\isa{v\isactrlsub {\isadigit{4}}}};
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   680
\draw[->,line width=1mm](r4) -- (v4);
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   681
\node (v3) [left=of v4] {\isa{v\isactrlsub {\isadigit{3}}}};
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   682
\draw[->,line width=1mm](v4)--(v3) node[below,midway] {\isa{inj\ r\isactrlsub {\isadigit{3}}\ c}};
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   683
\node (v2) [left=of v3]{\isa{v\isactrlsub {\isadigit{2}}}};
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   684
\draw[->,line width=1mm](v3)--(v2) node[below,midway] {\isa{inj\ r\isactrlsub {\isadigit{2}}\ b}};
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   685
\node (v1) [left=of v2] {\isa{v\isactrlsub {\isadigit{1}}}};
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   686
\draw[->,line width=1mm](v2)--(v1) node[below,midway] {\isa{inj\ r\isactrlsub {\isadigit{1}}\ a}};
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   687
\draw (r4) node[anchor=north west] {\;\raisebox{-8mm}{\isa{mkeps}}};
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   688
\end{tikzpicture}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   689
\end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   690
\mbox{}\\[-13mm]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   691
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   692
\caption{The two phases of the algorithm by Sulzmann \& Lu \cite{Sulzmann2014},
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   693
matching the string \isa{{\isacharbrackleft}{\kern0pt}a{\isacharcomma}{\kern0pt}\ b{\isacharcomma}{\kern0pt}\ c{\isacharbrackright}{\kern0pt}}. The first phase (the arrows from 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   694
left to right) is \Brz's matcher building successive derivatives. If the 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   695
last regular expression is \isa{nullable}, then the functions of the 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   696
second phase are called (the top-down and right-to-left arrows): first 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   697
\isa{mkeps} calculates a value \isa{v\isactrlsub {\isadigit{4}}} witnessing
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   698
how the empty string has been recognised by \isa{r\isactrlsub {\isadigit{4}}}. After
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   699
that the function \isa{inj} ``injects back'' the characters of the string into
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   700
the values.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   701
\label{Sulz}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   702
\end{figure} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   703
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   704
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   705
  \begin{tabular}{lcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   706
  \isa{mkeps\ \isactrlbold {\isadigit{1}}} & $\dn$ & \isa{Empty}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   707
  \isa{mkeps\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{Seq\ {\isacharparenleft}{\kern0pt}mkeps\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}mkeps\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   708
  \isa{mkeps\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{\textrm{if}\ nullable\ r\isactrlsub {\isadigit{1}}\ \textrm{then}\ Left\ {\isacharparenleft}{\kern0pt}mkeps\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ \textrm{else}\ Right\ {\isacharparenleft}{\kern0pt}mkeps\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   709
  \isa{mkeps\ {\isacharparenleft}{\kern0pt}r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{Stars\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   710
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   711
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   712
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   713
  \noindent Note that this function needs only to be partially defined,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   714
  namely only for regular expressions that are nullable. In case \isa{nullable} fails, the string \isa{{\isacharbrackleft}{\kern0pt}a{\isacharcomma}{\kern0pt}\ b{\isacharcomma}{\kern0pt}\ c{\isacharbrackright}{\kern0pt}} cannot be matched by \isa{r\isactrlsub {\isadigit{1}}} and the null value \isa{None} is returned. Note also how this function
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   715
  makes some subtle choices leading to a POSIX value: for example if an
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   716
  alternative regular expression, say \isa{r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}}, can
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   717
  match the empty string and furthermore \isa{r\isactrlsub {\isadigit{1}}} can match the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   718
  empty string, then we return a \isa{Left}-value. The \isa{Right}-value will only be returned if \isa{r\isactrlsub {\isadigit{1}}} cannot match the empty
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   719
  string.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   720
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   721
  The most interesting idea from Sulzmann and Lu \cite{Sulzmann2014} is
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   722
  the construction of a value for how \isa{r\isactrlsub {\isadigit{1}}} can match the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   723
  string \isa{{\isacharbrackleft}{\kern0pt}a{\isacharcomma}{\kern0pt}\ b{\isacharcomma}{\kern0pt}\ c{\isacharbrackright}{\kern0pt}} from the value how the last derivative, \isa{r\isactrlsub {\isadigit{4}}} in Fig.~\ref{Sulz}, can match the empty string. Sulzmann and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   724
  Lu achieve this by stepwise ``injecting back'' the characters into the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   725
  values thus inverting the operation of building derivatives, but on the level
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   726
  of values. The corresponding function, called \isa{inj}, takes three
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   727
  arguments, a regular expression, a character and a value. For example in
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   728
  the first (or right-most) \isa{inj}-step in Fig.~\ref{Sulz} the regular
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   729
  expression \isa{r\isactrlsub {\isadigit{3}}}, the character \isa{c} from the last
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   730
  derivative step and \isa{v\isactrlsub {\isadigit{4}}}, which is the value corresponding
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   731
  to the derivative regular expression \isa{r\isactrlsub {\isadigit{4}}}. The result is
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   732
  the new value \isa{v\isactrlsub {\isadigit{3}}}. The final result of the algorithm is
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   733
  the value \isa{v\isactrlsub {\isadigit{1}}}. The \isa{inj} function is defined by recursion on regular
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   734
  expressions and by analysing the shape of values (corresponding to 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   735
  the derivative regular expressions).
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   736
  %
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   737
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   738
  \begin{tabular}{l@ {\hspace{5mm}}lcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   739
  \textit{(1)} & \isa{inj\ d\ c\ {\isacharparenleft}{\kern0pt}Empty{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{Char\ d}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   740
  \textit{(2)} & \isa{inj\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ c\ {\isacharparenleft}{\kern0pt}Left\ v\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}} & $\dn$ & 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   741
      \isa{Left\ {\isacharparenleft}{\kern0pt}inj\ r\isactrlsub {\isadigit{1}}\ c\ v\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   742
  \textit{(3)} & \isa{inj\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ c\ {\isacharparenleft}{\kern0pt}Right\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   743
      \isa{Right\ {\isacharparenleft}{\kern0pt}inj\ r\isactrlsub {\isadigit{2}}\ c\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   744
  \textit{(4)} & \isa{inj\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ c\ {\isacharparenleft}{\kern0pt}Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   745
      & \isa{Seq\ {\isacharparenleft}{\kern0pt}inj\ r\isactrlsub {\isadigit{1}}\ c\ v\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ v\isactrlsub {\isadigit{2}}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   746
  \textit{(5)} & \isa{inj\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ c\ {\isacharparenleft}{\kern0pt}Left\ {\isacharparenleft}{\kern0pt}Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}} & $\dn$ 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   747
      & \isa{Seq\ {\isacharparenleft}{\kern0pt}inj\ r\isactrlsub {\isadigit{1}}\ c\ v\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ v\isactrlsub {\isadigit{2}}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   748
  \textit{(6)} & \isa{inj\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ c\ {\isacharparenleft}{\kern0pt}Right\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   749
      & \isa{Seq\ {\isacharparenleft}{\kern0pt}mkeps\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}inj\ r\isactrlsub {\isadigit{2}}\ c\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   750
  \textit{(7)} & \isa{inj\ {\isacharparenleft}{\kern0pt}r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}\ c\ {\isacharparenleft}{\kern0pt}Seq\ v\ {\isacharparenleft}{\kern0pt}Stars\ vs{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}} & $\dn$ 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   751
      & \isa{Stars\ {\isacharparenleft}{\kern0pt}inj\ r\ c\ v\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vs{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   752
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   753
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   754
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   755
  \noindent To better understand what is going on in this definition it
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   756
  might be instructive to look first at the three sequence cases (clauses
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   757
  \textit{(4)} -- \textit{(6)}). In each case we need to construct an ``injected value'' for
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   758
  \isa{r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}}. This must be a value of the form \isa{Seq\ \underline{\hspace{2mm}}\ \underline{\hspace{2mm}}}\,. Recall the clause of the \isa{derivative}-function
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   759
  for sequence regular expressions:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   760
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   761
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   762
  \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c} $\dn$ \isa{\textrm{if}\ nullable\ r\isactrlsub {\isadigit{1}}\ \textrm{then}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}\ {\isacharplus}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ \textrm{else}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   763
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   764
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   765
  \noindent Consider first the \isa{else}-branch where the derivative is \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}}. The corresponding value must therefore
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   766
  be of the form \isa{Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}}, which matches the left-hand
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   767
  side in clause~\textit{(4)} of \isa{inj}. In the \isa{if}-branch the derivative is an
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   768
  alternative, namely \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}\ {\isacharplus}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}}. This means we either have to consider a \isa{Left}- or
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   769
  \isa{Right}-value. In case of the \isa{Left}-value we know further it
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   770
  must be a value for a sequence regular expression. Therefore the pattern
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   771
  we match in the clause \textit{(5)} is \isa{Left\ {\isacharparenleft}{\kern0pt}Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}},
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   772
  while in \textit{(6)} it is just \isa{Right\ v\isactrlsub {\isadigit{2}}}. One more interesting
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   773
  point is in the right-hand side of clause \textit{(6)}: since in this case the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   774
  regular expression \isa{r\isactrlsub {\isadigit{1}}} does not ``contribute'' to
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   775
  matching the string, that means it only matches the empty string, we need to
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   776
  call \isa{mkeps} in order to construct a value for how \isa{r\isactrlsub {\isadigit{1}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   777
  can match this empty string. A similar argument applies for why we can
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   778
  expect in the left-hand side of clause \textit{(7)} that the value is of the form
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   779
  \isa{Seq\ v\ {\isacharparenleft}{\kern0pt}Stars\ vs{\isacharparenright}{\kern0pt}}---the derivative of a star is \isa{{\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsup {\isasymstar}}. Finally, the reason for why we can ignore the second argument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   780
  in clause \textit{(1)} of \isa{inj} is that it will only ever be called in cases
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   781
  where \isa{c\ {\isacharequal}{\kern0pt}\ d}, but the usual linearity restrictions in patterns do
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   782
  not allow us to build this constraint explicitly into our function
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   783
  definition.\footnote{Sulzmann and Lu state this clause as \isa{inj\ c\ c\ {\isacharparenleft}{\kern0pt}Empty{\isacharparenright}{\kern0pt}} $\dn$ \isa{Char\ c},
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   784
  but our deviation is harmless.}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   785
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   786
  The idea of the \isa{inj}-function to ``inject'' a character, say
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   787
  \isa{c}, into a value can be made precise by the first part of the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   788
  following lemma, which shows that the underlying string of an injected
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   789
  value has a prepended character \isa{c}; the second part shows that
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   790
  the underlying string of an \isa{mkeps}-value is always the empty
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   791
  string (given the regular expression is nullable since otherwise
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   792
  \isa{mkeps} might not be defined).
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   793
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   794
  \begin{lemma}\mbox{}\smallskip\\\label{Prf_injval_flat}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   795
  \begin{tabular}{ll}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   796
  (1) & \isa{{\normalsize{}If\,}\ v\ {\isacharcolon}{\kern0pt}\ r{\isacharbackslash}{\kern0pt}c\ {\normalsize \,then\,}\ {\isacharbar}{\kern0pt}inj\ r\ c\ v{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}{\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}{\isachardot}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   797
  (2) & \isa{{\normalsize{}If\,}\ nullable\ r\ {\normalsize \,then\,}\ {\isacharbar}{\kern0pt}mkeps\ r{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isachardot}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   798
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   799
  \end{lemma}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   800
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   801
  \begin{proof}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   802
  Both properties are by routine inductions: the first one can, for example,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   803
  be proved by induction over the definition of \isa{derivatives}; the second by
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   804
  an induction on \isa{r}. There are no interesting cases.\qed
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   805
  \end{proof}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   806
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   807
  Having defined the \isa{mkeps} and \isa{inj} function we can extend
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   808
  \Brz's matcher so that a value is constructed (assuming the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   809
  regular expression matches the string). The clauses of the Sulzmann and Lu lexer are
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   810
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   811
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   812
  \begin{tabular}{lcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   813
  \isa{lexer\ r\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} & $\dn$ & \isa{\textrm{if}\ nullable\ r\ \textrm{then}\ Some\ {\isacharparenleft}{\kern0pt}mkeps\ r{\isacharparenright}{\kern0pt}\ \textrm{else}\ None}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   814
  \isa{lexer\ r\ {\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{case} \isa{lexer\ {\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ s} \isa{of}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   815
                     & & \phantom{$|$} \isa{None}  \isa{{\isasymRightarrow}} \isa{None}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   816
                     & & $|$ \isa{Some\ v} \isa{{\isasymRightarrow}} \isa{Some\ {\isacharparenleft}{\kern0pt}inj\ r\ c\ v{\isacharparenright}{\kern0pt}}                          
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   817
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   818
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   819
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   820
  \noindent If the regular expression does not match the string, \isa{None} is
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   821
  returned. If the regular expression \emph{does}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   822
  match the string, then \isa{Some} value is returned. One important
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   823
  virtue of this algorithm is that it can be implemented with ease in any
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   824
  functional programming language and also in Isabelle/HOL. In the remaining
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   825
  part of this section we prove that this algorithm is correct.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   826
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   827
  The well-known idea of POSIX matching is informally defined by some
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   828
  rules such as the Longest Match and Priority Rules (see
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   829
  Introduction); as correctly argued in \cite{Sulzmann2014}, this
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   830
  needs formal specification. Sulzmann and Lu define an ``ordering
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   831
  relation'' between values and argue that there is a maximum value,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   832
  as given by the derivative-based algorithm.  In contrast, we shall
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   833
  introduce a simple inductive definition that specifies directly what
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   834
  a \emph{POSIX value} is, incorporating the POSIX-specific choices
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   835
  into the side-conditions of our rules. Our definition is inspired by
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   836
  the matching relation given by Vansummeren~\cite{Vansummeren2006}. 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   837
  The relation we define is ternary and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   838
  written as \mbox{\isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}}, relating
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   839
  strings, regular expressions and values; the inductive rules are given in 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   840
  Figure~\ref{POSIXrules}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   841
  We can prove that given a string \isa{s} and regular expression \isa{r}, the POSIX value \isa{v} is uniquely determined by \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   842
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   843
  %
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   844
  \begin{figure}[t]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   845
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   846
  \begin{tabular}{c}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   847
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{{\isacharparenleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharcomma}{\kern0pt}\ \isactrlbold {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Empty}}}\isa{P}\isa{\isactrlbold {\isadigit{1}}} \qquad
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   848
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{{\isacharparenleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}c{\isacharbrackright}{\kern0pt}{\isacharcomma}{\kern0pt}\ c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Char\ c}}}\isa{P}\isa{c}\medskip\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   849
  \isa{\mbox{}\inferrule{\mbox{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}}{\mbox{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Left\ v}}}\isa{P{\isacharplus}{\kern0pt}L}\qquad
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   850
  \isa{\mbox{}\inferrule{\mbox{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}\\\ \mbox{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}}}{\mbox{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Right\ v}}}\isa{P{\isacharplus}{\kern0pt}R}\medskip\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   851
  $\mprset{flushleft}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   852
   \inferrule
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   853
   {\isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub {\isadigit{1}}} \qquad
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   854
    \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub {\isadigit{2}}} \\\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   855
    \isa{{\isasymnexists}s\isactrlsub {\isadigit{3}}\ s\isactrlsub {\isadigit{4}}{\isachardot}{\kern0pt}a{\isachardot}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{3}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{4}}\ {\isacharequal}{\kern0pt}\ s\isactrlsub {\isadigit{2}}\ {\isasymand}\ s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{4}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   856
   {\isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}}}$\isa{PS}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   857
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{{\isacharparenleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharcomma}{\kern0pt}\ r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Stars\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}}}\isa{P{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}\medskip\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   858
  $\mprset{flushleft}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   859
   \inferrule
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   860
   {\isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v} \qquad
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   861
    \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Stars\ vs} \qquad
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   862
    \isa{{\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} \\\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   863
    \isa{{\isasymnexists}s\isactrlsub {\isadigit{3}}\ s\isactrlsub {\isadigit{4}}{\isachardot}{\kern0pt}a{\isachardot}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{3}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{4}}\ {\isacharequal}{\kern0pt}\ s\isactrlsub {\isadigit{2}}\ {\isasymand}\ s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{4}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   864
   {\isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Stars\ {\isacharparenleft}{\kern0pt}v\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vs{\isacharparenright}{\kern0pt}}}$\isa{P{\isasymstar}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   865
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   866
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   867
  \caption{Our inductive definition of POSIX values.}\label{POSIXrules}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   868
  \end{figure}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   869
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   870
   
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   871
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   872
  \begin{theorem}\mbox{}\smallskip\\\label{posixdeterm}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   873
  \begin{tabular}{ll}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   874
  (1) & If \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v} then \isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}} and \isa{{\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ s}.\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   875
  (2) & \isa{{\normalsize{}If\,}\ \mbox{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}\ {\normalsize \,and\,}\ \mbox{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v{\isacharprime}{\kern0pt}}\ {\normalsize \,then\,}\ v\ {\isacharequal}{\kern0pt}\ v{\isacharprime}{\kern0pt}{\isachardot}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   876
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   877
  \end{theorem}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   878
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   879
  \begin{proof} Both by induction on the definition of \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}. 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   880
  The second parts follows by a case analysis of \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v{\isacharprime}{\kern0pt}} and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   881
  the first part.\qed
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   882
  \end{proof}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   883
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   884
  \noindent
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   885
  We claim that our \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v} relation captures the idea behind the four
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   886
  informal POSIX rules shown in the Introduction: Consider for example the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   887
  rules \isa{P{\isacharplus}{\kern0pt}L} and \isa{P{\isacharplus}{\kern0pt}R} where the POSIX value for a string
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   888
  and an alternative regular expression, that is \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}},
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   889
  is specified---it is always a \isa{Left}-value, \emph{except} when the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   890
  string to be matched is not in the language of \isa{r\isactrlsub {\isadigit{1}}}; only then it
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   891
  is a \isa{Right}-value (see the side-condition in \isa{P{\isacharplus}{\kern0pt}R}).
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   892
  Interesting is also the rule for sequence regular expressions (\isa{PS}). The first two premises state that \isa{v\isactrlsub {\isadigit{1}}} and \isa{v\isactrlsub {\isadigit{2}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   893
  are the POSIX values for \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}} and \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   894
  respectively. Consider now the third premise and note that the POSIX value
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   895
  of this rule should match the string \mbox{\isa{s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}}}. According to the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   896
  Longest Match Rule, we want that the \isa{s\isactrlsub {\isadigit{1}}} is the longest initial
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   897
  split of \mbox{\isa{s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}}} such that \isa{s\isactrlsub {\isadigit{2}}} is still recognised
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   898
  by \isa{r\isactrlsub {\isadigit{2}}}. Let us assume, contrary to the third premise, that there
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   899
  \emph{exist} an \isa{s\isactrlsub {\isadigit{3}}} and \isa{s\isactrlsub {\isadigit{4}}} such that \isa{s\isactrlsub {\isadigit{2}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   900
  can be split up into a non-empty string \isa{s\isactrlsub {\isadigit{3}}} and a possibly empty
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   901
  string \isa{s\isactrlsub {\isadigit{4}}}. Moreover the longer string \isa{s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{3}}} can be
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   902
  matched by \isa{r\isactrlsub {\isadigit{1}}} and the shorter \isa{s\isactrlsub {\isadigit{4}}} can still be
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   903
  matched by \isa{r\isactrlsub {\isadigit{2}}}. In this case \isa{s\isactrlsub {\isadigit{1}}} would \emph{not} be the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   904
  longest initial split of \mbox{\isa{s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}}} and therefore \isa{Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}} cannot be a POSIX value for \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}. 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   905
  The main point is that our side-condition ensures the Longest 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   906
  Match Rule is satisfied.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   907
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   908
  A similar condition is imposed on the POSIX value in the \isa{P{\isasymstar}}-rule. Also there we want that \isa{s\isactrlsub {\isadigit{1}}} is the longest initial
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   909
  split of \isa{s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}} and furthermore the corresponding value
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   910
  \isa{v} cannot be flattened to the empty string. In effect, we require
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   911
  that in each ``iteration'' of the star, some non-empty substring needs to
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   912
  be ``chipped'' away; only in case of the empty string we accept \isa{Stars\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} as the POSIX value. Indeed we can show that our POSIX values
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   913
  are lexical values which exclude those \isa{Stars} that contain subvalues 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   914
  that flatten to the empty string.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   915
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   916
  \begin{lemma}\label{LVposix}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   917
  \isa{{\normalsize{}If\,}\ {\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\ {\normalsize \,then\,}\ v\ {\isasymin}\ LV\ r\ s{\isachardot}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   918
  \end{lemma}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   919
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   920
  \begin{proof}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   921
  By routine induction on \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}.\qed 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   922
  \end{proof}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   923
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   924
  \noindent
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   925
  Next is the lemma that shows the function \isa{mkeps} calculates
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   926
  the POSIX value for the empty string and a nullable regular expression.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   927
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   928
  \begin{lemma}\label{lemmkeps}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   929
  \isa{{\normalsize{}If\,}\ nullable\ r\ {\normalsize \,then\,}\ {\isacharparenleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ mkeps\ r{\isachardot}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   930
  \end{lemma}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   931
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   932
  \begin{proof}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   933
  By routine induction on \isa{r}.\qed 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   934
  \end{proof}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   935
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   936
  \noindent
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   937
  The central lemma for our POSIX relation is that the \isa{inj}-function
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   938
  preserves POSIX values.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   939
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   940
  \begin{lemma}\label{Posix2}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   941
  \isa{{\normalsize{}If\,}\ {\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\ {\normalsize \,then\,}\ {\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ inj\ r\ c\ v{\isachardot}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   942
  \end{lemma}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   943
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   944
  \begin{proof}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   945
  By induction on \isa{r}. We explain two cases.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   946
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   947
  \begin{itemize}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   948
  \item[$\bullet$] Case \isa{r\ {\isacharequal}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}}. There are
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   949
  two subcases, namely \isa{{\isacharparenleft}{\kern0pt}a{\isacharparenright}{\kern0pt}} \mbox{\isa{v\ {\isacharequal}{\kern0pt}\ Left\ v{\isacharprime}{\kern0pt}}} and \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v{\isacharprime}{\kern0pt}}; and \isa{{\isacharparenleft}{\kern0pt}b{\isacharparenright}{\kern0pt}} \isa{v\ {\isacharequal}{\kern0pt}\ Right\ v{\isacharprime}{\kern0pt}}, \isa{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}} and \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v{\isacharprime}{\kern0pt}}. In \isa{{\isacharparenleft}{\kern0pt}a{\isacharparenright}{\kern0pt}} we
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   950
  know \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v{\isacharprime}{\kern0pt}}, from which we can infer \isa{{\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ inj\ r\isactrlsub {\isadigit{1}}\ c\ v{\isacharprime}{\kern0pt}} by induction hypothesis and hence \isa{{\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ inj\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ c\ {\isacharparenleft}{\kern0pt}Left\ v{\isacharprime}{\kern0pt}{\isacharparenright}{\kern0pt}} as needed. Similarly
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   951
  in subcase \isa{{\isacharparenleft}{\kern0pt}b{\isacharparenright}{\kern0pt}} where, however, in addition we have to use
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   952
  Proposition~\ref{derprop}(2) in order to infer \isa{c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}} from \isa{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}}.\smallskip
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   953
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   954
  \item[$\bullet$] Case \isa{r\ {\isacharequal}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}}. There are three subcases:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   955
  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   956
  \begin{quote}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   957
  \begin{description}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   958
  \item[\isa{{\isacharparenleft}{\kern0pt}a{\isacharparenright}{\kern0pt}}] \isa{v\ {\isacharequal}{\kern0pt}\ Left\ {\isacharparenleft}{\kern0pt}Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} and \isa{nullable\ r\isactrlsub {\isadigit{1}}} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   959
  \item[\isa{{\isacharparenleft}{\kern0pt}b{\isacharparenright}{\kern0pt}}] \isa{v\ {\isacharequal}{\kern0pt}\ Right\ v\isactrlsub {\isadigit{1}}} and \isa{nullable\ r\isactrlsub {\isadigit{1}}} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   960
  \item[\isa{{\isacharparenleft}{\kern0pt}c{\isacharparenright}{\kern0pt}}] \isa{v\ {\isacharequal}{\kern0pt}\ Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}} and \isa{{\isasymnot}\ nullable\ r\isactrlsub {\isadigit{1}}} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   961
  \end{description}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   962
  \end{quote}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   963
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   964
  \noindent For \isa{{\isacharparenleft}{\kern0pt}a{\isacharparenright}{\kern0pt}} we know \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub {\isadigit{1}}} and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   965
  \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub {\isadigit{2}}} as well as
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   966
  %
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   967
  \[\isa{{\isasymnexists}s\isactrlsub {\isadigit{3}}\ s\isactrlsub {\isadigit{4}}{\isachardot}{\kern0pt}a{\isachardot}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{3}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{4}}\ {\isacharequal}{\kern0pt}\ s\isactrlsub {\isadigit{2}}\ {\isasymand}\ s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{4}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   968
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   969
  \noindent From the latter we can infer by Proposition~\ref{derprop}(2):
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   970
  %
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   971
  \[\isa{{\isasymnexists}s\isactrlsub {\isadigit{3}}\ s\isactrlsub {\isadigit{4}}{\isachardot}{\kern0pt}a{\isachardot}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{3}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{4}}\ {\isacharequal}{\kern0pt}\ s\isactrlsub {\isadigit{2}}\ {\isasymand}\ c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{4}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   972
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   973
  \noindent We can use the induction hypothesis for \isa{r\isactrlsub {\isadigit{1}}} to obtain
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   974
  \isa{{\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ inj\ r\isactrlsub {\isadigit{1}}\ c\ v\isactrlsub {\isadigit{1}}}. Putting this all together allows us to infer
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   975
  \isa{{\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Seq\ {\isacharparenleft}{\kern0pt}inj\ r\isactrlsub {\isadigit{1}}\ c\ v\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ v\isactrlsub {\isadigit{2}}}. The case \isa{{\isacharparenleft}{\kern0pt}c{\isacharparenright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   976
  is similar.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   977
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   978
  For \isa{{\isacharparenleft}{\kern0pt}b{\isacharparenright}{\kern0pt}} we know \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub {\isadigit{1}}} and 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   979
  \isa{s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}. From the former
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   980
  we have \isa{{\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ inj\ r\isactrlsub {\isadigit{2}}\ c\ v\isactrlsub {\isadigit{1}}} by induction hypothesis
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   981
  for \isa{r\isactrlsub {\isadigit{2}}}. From the latter we can infer
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   982
  %
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   983
  \[\isa{{\isasymnexists}s\isactrlsub {\isadigit{3}}\ s\isactrlsub {\isadigit{4}}{\isachardot}{\kern0pt}a{\isachardot}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{3}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{4}}\ {\isacharequal}{\kern0pt}\ c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s\ {\isasymand}\ s\isactrlsub {\isadigit{3}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{4}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   984
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   985
  \noindent By Lemma~\ref{lemmkeps} we know \isa{{\isacharparenleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ mkeps\ r\isactrlsub {\isadigit{1}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   986
  holds. Putting this all together, we can conclude with \isa{{\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Seq\ {\isacharparenleft}{\kern0pt}mkeps\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}inj\ r\isactrlsub {\isadigit{2}}\ c\ v\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}}, as required.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   987
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   988
  Finally suppose \isa{r\ {\isacharequal}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\isactrlsup {\isasymstar}}. This case is very similar to the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   989
  sequence case, except that we need to also ensure that \isa{{\isacharbar}{\kern0pt}inj\ r\isactrlsub {\isadigit{1}}\ c\ v\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}. This follows from \isa{{\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ inj\ r\isactrlsub {\isadigit{1}}\ c\ v\isactrlsub {\isadigit{1}}}  (which in turn follows from \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub {\isadigit{1}}} and the induction hypothesis).\qed
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   990
  \end{itemize}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   991
  \end{proof}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   992
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   993
  \noindent
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   994
  With Lemma~\ref{Posix2} in place, it is completely routine to establish
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   995
  that the Sulzmann and Lu lexer satisfies our specification (returning
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   996
  the null value \isa{None} iff the string is not in the language of the regular expression,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   997
  and returning a unique POSIX value iff the string \emph{is} in the language):
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   998
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   999
  \begin{theorem}\mbox{}\smallskip\\\label{lexercorrect}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1000
  \begin{tabular}{ll}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1001
  (1) & \isa{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}} if and only if \isa{lexer\ r\ s\ {\isacharequal}{\kern0pt}\ None}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1002
  (2) & \isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}} if and only if \isa{{\isasymexists}v{\isachardot}{\kern0pt}\ lexer\ r\ s\ {\isacharequal}{\kern0pt}\ Some\ v\ {\isasymand}\ {\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1003
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1004
  \end{theorem}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1005
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1006
  \begin{proof}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1007
  By induction on \isa{s} using Lemma~\ref{lemmkeps} and \ref{Posix2}.\qed  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1008
  \end{proof}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1009
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1010
  \noindent In \textit{(2)} we further know by Theorem~\ref{posixdeterm} that the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1011
  value returned by the lexer must be unique.   A simple corollary 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1012
  of our two theorems is:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1013
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1014
  \begin{corollary}\mbox{}\smallskip\\\label{lexercorrectcor}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1015
  \begin{tabular}{ll}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1016
  (1) & \isa{lexer\ r\ s\ {\isacharequal}{\kern0pt}\ None} if and only if \isa{{\isasymnexists}v{\isachardot}{\kern0pt}a{\isachardot}{\kern0pt}\ {\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}\\ 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1017
  (2) & \isa{lexer\ r\ s\ {\isacharequal}{\kern0pt}\ Some\ v} if and only if \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1018
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1019
  \end{corollary}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1020
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1021
  \noindent This concludes our correctness proof. Note that we have
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1022
  not changed the algorithm of Sulzmann and Lu,\footnote{All
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1023
  deviations we introduced are harmless.} but introduced our own
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1024
  specification for what a correct result---a POSIX value---should be.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1025
  In the next section we show that our specification coincides with
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1026
  another one given by Okui and Suzuki using a different technique.%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1027
\end{isamarkuptext}\isamarkuptrue%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1028
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1029
\isadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1030
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1031
\endisadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1032
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1033
\isatagdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1034
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1035
\isamarkupsection{Ordering of Values according to Okui and Suzuki%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1036
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1037
\isamarkuptrue%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1038
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1039
\endisatagdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1040
{\isafolddocument}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1041
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1042
\isadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1043
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1044
\endisadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1045
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1046
\begin{isamarkuptext}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1047
While in the previous section we have defined POSIX values directly
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1048
  in terms of a ternary relation (see inference rules in Figure~\ref{POSIXrules}),
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1049
  Sulzmann and Lu took a different approach in \cite{Sulzmann2014}:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1050
  they introduced an ordering for values and identified POSIX values
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1051
  as the maximal elements.  An extended version of \cite{Sulzmann2014}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1052
  is available at the website of its first author; this includes more
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1053
  details of their proofs, but which are evidently not in final form
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1054
  yet. Unfortunately, we were not able to verify claims that their
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1055
  ordering has properties such as being transitive or having maximal
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1056
  elements. 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1057
 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1058
  Okui and Suzuki \cite{OkuiSuzuki2010,OkuiSuzukiTech} described
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1059
  another ordering of values, which they use to establish the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1060
  correctness of their automata-based algorithm for POSIX matching.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1061
  Their ordering resembles some aspects of the one given by Sulzmann
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1062
  and Lu, but overall is quite different. To begin with, Okui and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1063
  Suzuki identify POSIX values as minimal, rather than maximal,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1064
  elements in their ordering. A more substantial difference is that
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1065
  the ordering by Okui and Suzuki uses \emph{positions} in order to
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1066
  identify and compare subvalues. Positions are lists of natural
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1067
  numbers. This allows them to quite naturally formalise the Longest
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1068
  Match and Priority rules of the informal POSIX standard.  Consider
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1069
  for example the value \isa{v}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1070
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1071
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1072
  \isa{v\ {\isasymequiv}\ Stars\ {\isacharbrackleft}{\kern0pt}Seq\ {\isacharparenleft}{\kern0pt}Char\ x{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}Char\ y{\isacharparenright}{\kern0pt}{\isacharcomma}{\kern0pt}\ Char\ z{\isacharbrackright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1073
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1074
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1075
  \noindent
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1076
  At position \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{0}}{\isacharcomma}{\kern0pt}{\isadigit{1}}{\isacharbrackright}{\kern0pt}} of this value is the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1077
  subvalue \isa{Char\ y} and at position \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{1}}{\isacharbrackright}{\kern0pt}} the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1078
  subvalue \isa{Char\ z}.  At the `root' position, or empty list
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1079
  \isa{{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}, is the whole value \isa{v}. Positions such as \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{0}}{\isacharcomma}{\kern0pt}{\isadigit{1}}{\isacharcomma}{\kern0pt}{\isadigit{0}}{\isacharbrackright}{\kern0pt}} or \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{2}}{\isacharbrackright}{\kern0pt}} are outside of \isa{v}. If it exists, the subvalue of \isa{v} at a position \isa{p}, written \isa{v\mbox{$\downharpoonleft$}\isactrlbsub p\isactrlesub }, can be recursively defined by
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1080
  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1081
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1082
  \begin{tabular}{r@ {\hspace{0mm}}lcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1083
  \isa{v} &  \isa{{\isasymdownharpoonleft}\isactrlbsub {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\isactrlesub } & \isa{{\isasymequiv}}& \isa{v}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1084
  \isa{Left\ v} & \isa{{\isasymdownharpoonleft}\isactrlbsub {\isadigit{0}}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}ps\isactrlesub } & \isa{{\isasymequiv}}& \isa{v\mbox{$\downharpoonleft$}\isactrlbsub ps\isactrlesub }\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1085
  \isa{Right\ v} & \isa{{\isasymdownharpoonleft}\isactrlbsub {\isadigit{1}}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}ps\isactrlesub } & \isa{{\isasymequiv}} & 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1086
  \isa{v\mbox{$\downharpoonleft$}\isactrlbsub ps\isactrlesub }\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1087
  \isa{Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}} & \isa{{\isasymdownharpoonleft}\isactrlbsub {\isadigit{0}}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}ps\isactrlesub } & \isa{{\isasymequiv}} & 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1088
  \isa{v\isactrlsub {\isadigit{1}}\mbox{$\downharpoonleft$}\isactrlbsub ps\isactrlesub } \\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1089
  \isa{Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}} & \isa{{\isasymdownharpoonleft}\isactrlbsub {\isadigit{1}}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}ps\isactrlesub }
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1090
  & \isa{{\isasymequiv}} & 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1091
  \isa{v\isactrlsub {\isadigit{2}}\mbox{$\downharpoonleft$}\isactrlbsub ps\isactrlesub } \\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1092
  \isa{Stars\ vs} & \isa{{\isasymdownharpoonleft}\isactrlbsub n{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}ps\isactrlesub } & \isa{{\isasymequiv}}& \isa{vs\ensuremath{_{[\mathit{n}]}}\mbox{$\downharpoonleft$}\isactrlbsub ps\isactrlesub }\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1093
  \end{tabular} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1094
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1095
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1096
  \noindent In the last clause we use Isabelle's notation \isa{vs\ensuremath{_{[\mathit{n}]}}} for the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1097
  \isa{n}th element in a list.  The set of positions inside a value \isa{v},
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1098
  written \isa{Pos\ v}, is given by 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1099
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1100
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1101
  \begin{tabular}{lcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1102
  \isa{Pos\ {\isacharparenleft}{\kern0pt}Empty{\isacharparenright}{\kern0pt}} & \isa{{\isasymequiv}} & \isa{{\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1103
  \isa{Pos\ {\isacharparenleft}{\kern0pt}Char\ c{\isacharparenright}{\kern0pt}} & \isa{{\isasymequiv}} & \isa{{\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1104
  \isa{Pos\ {\isacharparenleft}{\kern0pt}Left\ v{\isacharparenright}{\kern0pt}} & \isa{{\isasymequiv}} & \isa{{\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isasymunion}\ {\isacharbraceleft}{\kern0pt}{\isadigit{0}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\ \mbox{\boldmath$\mid$}\ ps\ {\isasymin}\ Pos\ v{\isacharbraceright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1105
  \isa{Pos\ {\isacharparenleft}{\kern0pt}Right\ v{\isacharparenright}{\kern0pt}} & \isa{{\isasymequiv}} & \isa{{\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isasymunion}\ {\isacharbraceleft}{\kern0pt}{\isadigit{1}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\ \mbox{\boldmath$\mid$}\ ps\ {\isasymin}\ Pos\ v{\isacharbraceright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1106
  \isa{Pos\ {\isacharparenleft}{\kern0pt}Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1107
  & \isa{{\isasymequiv}} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1108
  & \isa{{\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isasymunion}\ {\isacharbraceleft}{\kern0pt}{\isadigit{0}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\ \mbox{\boldmath$\mid$}\ ps\ {\isasymin}\ Pos\ v\isactrlsub {\isadigit{1}}{\isacharbraceright}{\kern0pt}\ {\isasymunion}\ {\isacharbraceleft}{\kern0pt}{\isadigit{1}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\ \mbox{\boldmath$\mid$}\ ps\ {\isasymin}\ Pos\ v\isactrlsub {\isadigit{2}}{\isacharbraceright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1109
  \isa{Pos\ {\isacharparenleft}{\kern0pt}Stars\ vs{\isacharparenright}{\kern0pt}} & \isa{{\isasymequiv}} & \isa{{\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isasymunion}\ {\isacharparenleft}{\kern0pt}{\isasymUnion}n\ {\isacharless}{\kern0pt}\ len\ vs\ {\isacharbraceleft}{\kern0pt}n\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\ \mbox{\boldmath$\mid$}\ ps\ {\isasymin}\ Pos\ vs\ensuremath{_{[\mathit{n}]}}{\isacharbraceright}{\kern0pt}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1110
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1111
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1112
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1113
  \noindent 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1114
  whereby \isa{len} in the last clause stands for the length of a list. Clearly
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1115
  for every position inside a value there exists a subvalue at that position.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1116
 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1117
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1118
  To help understanding the ordering of Okui and Suzuki, consider again 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1119
  the earlier value
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1120
  \isa{v} and compare it with the following \isa{w}:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1121
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1122
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1123
  \begin{tabular}{l}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1124
  \isa{v\ {\isasymequiv}\ Stars\ {\isacharbrackleft}{\kern0pt}Seq\ {\isacharparenleft}{\kern0pt}Char\ x{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}Char\ y{\isacharparenright}{\kern0pt}{\isacharcomma}{\kern0pt}\ Char\ z{\isacharbrackright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1125
  \isa{w\ {\isasymequiv}\ Stars\ {\isacharbrackleft}{\kern0pt}Char\ x{\isacharcomma}{\kern0pt}\ Char\ y{\isacharcomma}{\kern0pt}\ Char\ z{\isacharbrackright}{\kern0pt}}  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1126
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1127
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1128
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1129
  \noindent Both values match the string \isa{xyz}, that means if
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1130
  we flatten these values at their respective root position, we obtain
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1131
  \isa{xyz}. However, at position \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{0}}{\isacharbrackright}{\kern0pt}}, \isa{v} matches
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1132
  \isa{xy} whereas \isa{w} matches only the shorter \isa{x}. So
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1133
  according to the Longest Match Rule, we should prefer \isa{v},
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1134
  rather than \isa{w} as POSIX value for string \isa{xyz} (and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1135
  corresponding regular expression). In order to
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1136
  formalise this idea, Okui and Suzuki introduce a measure for
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1137
  subvalues at position \isa{p}, called the \emph{norm} of \isa{v}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1138
  at position \isa{p}. We can define this measure in Isabelle as an
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1139
  integer as follows
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1140
  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1141
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1142
  \isa{{\isasymparallel}v{\isasymparallel}\isactrlbsub p\isactrlesub \ {\isasymequiv}\ \textrm{if}\ p\ {\isasymin}\ Pos\ v\ \textrm{then}\ len\ {\isacharbar}{\kern0pt}v\mbox{$\downharpoonleft$}\isactrlbsub p\isactrlesub {\isacharbar}{\kern0pt}\ \textrm{else}\ {\isacharminus}{\kern0pt}\ {\isadigit{1}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1143
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1144
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1145
  \noindent where we take the length of the flattened value at
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1146
  position \isa{p}, provided the position is inside \isa{v}; if
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1147
  not, then the norm is \isa{{\isacharminus}{\kern0pt}{\isadigit{1}}}. The default for outside
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1148
  positions is crucial for the POSIX requirement of preferring a
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1149
  \isa{Left}-value over a \isa{Right}-value (if they can match the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1150
  same string---see the Priority Rule from the Introduction). For this
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1151
  consider
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1152
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1153
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1154
  \isa{v\ {\isasymequiv}\ Left\ {\isacharparenleft}{\kern0pt}Char\ x{\isacharparenright}{\kern0pt}} \qquad and \qquad \isa{w\ {\isasymequiv}\ Right\ {\isacharparenleft}{\kern0pt}Char\ x{\isacharparenright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1155
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1156
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1157
  \noindent Both values match \isa{x}. At position \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{0}}{\isacharbrackright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1158
  the norm of \isa{v} is \isa{{\isadigit{1}}} (the subvalue matches \isa{x}),
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1159
  but the norm of \isa{w} is \isa{{\isacharminus}{\kern0pt}{\isadigit{1}}} (the position is outside
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1160
  \isa{w} according to how we defined the `inside' positions of
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1161
  \isa{Left}- and \isa{Right}-values).  Of course at position
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1162
  \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{1}}{\isacharbrackright}{\kern0pt}}, the norms \isa{{\isasymparallel}v{\isasymparallel}\isactrlbsub {\isacharbrackleft}{\kern0pt}{\isadigit{1}}{\isacharbrackright}{\kern0pt}\isactrlesub } and \isa{{\isasymparallel}w{\isasymparallel}\isactrlbsub {\isacharbrackleft}{\kern0pt}{\isadigit{1}}{\isacharbrackright}{\kern0pt}\isactrlesub } are reversed, but the point is that subvalues
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1163
  will be analysed according to lexicographically ordered
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1164
  positions. According to this ordering, the position \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{0}}{\isacharbrackright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1165
  takes precedence over \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{1}}{\isacharbrackright}{\kern0pt}} and thus also \isa{v} will be 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1166
  preferred over \isa{w}.  The lexicographic ordering of positions, written
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1167
  \isa{\underline{\hspace{2mm}}\ {\isasymprec}\isactrlbsub lex\isactrlesub \ \underline{\hspace{2mm}}}, can be conveniently formalised
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1168
  by three inference rules
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1169
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1170
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1171
  \begin{tabular}{ccc}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1172
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymprec}\isactrlbsub lex\isactrlesub \ p\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps}}}\hspace{1cm} &
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1173
  \isa{\mbox{}\inferrule{\mbox{p\isactrlsub {\isadigit{1}}\ {\isacharless}{\kern0pt}\ p\isactrlsub {\isadigit{2}}}}{\mbox{p\isactrlsub {\isadigit{1}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\isactrlsub {\isadigit{1}}\ {\isasymprec}\isactrlbsub lex\isactrlesub \ p\isactrlsub {\isadigit{2}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\isactrlsub {\isadigit{2}}}}}\hspace{1cm} &
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1174
  \isa{\mbox{}\inferrule{\mbox{ps\isactrlsub {\isadigit{1}}\ {\isasymprec}\isactrlbsub lex\isactrlesub \ ps\isactrlsub {\isadigit{2}}}}{\mbox{p\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\isactrlsub {\isadigit{1}}\ {\isasymprec}\isactrlbsub lex\isactrlesub \ p\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\isactrlsub {\isadigit{2}}}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1175
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1176
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1177
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1178
  With the norm and lexicographic order in place,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1179
  we can state the key definition of Okui and Suzuki
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1180
  \cite{OkuiSuzuki2010}: a value \isa{v\isactrlsub {\isadigit{1}}} is \emph{smaller at position \isa{p}} than
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1181
  \isa{v\isactrlsub {\isadigit{2}}}, written \isa{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\isactrlbsub p\isactrlesub \ v\isactrlsub {\isadigit{2}}}, 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1182
  if and only if  $(i)$ the norm at position \isa{p} is
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1183
  greater in \isa{v\isactrlsub {\isadigit{1}}} (that is the string \isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}\mbox{$\downharpoonleft$}\isactrlbsub p\isactrlesub {\isacharbar}{\kern0pt}} is longer 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1184
  than \isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}\mbox{$\downharpoonleft$}\isactrlbsub p\isactrlesub {\isacharbar}{\kern0pt}}) and $(ii)$ all subvalues at 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1185
  positions that are inside \isa{v\isactrlsub {\isadigit{1}}} or \isa{v\isactrlsub {\isadigit{2}}} and that are
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1186
  lexicographically smaller than \isa{p}, we have the same norm, namely
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1187
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1188
 \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1189
 \begin{tabular}{c}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1190
 \isa{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\isactrlbsub p\isactrlesub \ v\isactrlsub {\isadigit{2}}} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1191
 \isa{{\isasymequiv}} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1192
 $\begin{cases}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1193
 (i) & \isa{{\isasymparallel}v\isactrlsub {\isadigit{2}}{\isasymparallel}\isactrlbsub p\isactrlesub \ {\isacharless}{\kern0pt}\ {\isasymparallel}v\isactrlsub {\isadigit{1}}{\isasymparallel}\isactrlbsub p\isactrlesub }   \quad\text{and}\smallskip \\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1194
 (ii) & \isa{{\isasymforall}q{\isasymin}Pos\ v\isactrlsub {\isadigit{1}}\ {\isasymunion}\ Pos\ v\isactrlsub {\isadigit{2}}{\isachardot}{\kern0pt}\ q\ {\isasymprec}\isactrlbsub lex\isactrlesub \ p\ {\isasymlongrightarrow}\ {\isasymparallel}v\isactrlsub {\isadigit{1}}{\isasymparallel}\isactrlbsub q\isactrlesub \ {\isacharequal}{\kern0pt}\ {\isasymparallel}v\isactrlsub {\isadigit{2}}{\isasymparallel}\isactrlbsub q\isactrlesub }
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1195
 \end{cases}$
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1196
 \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1197
 \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1198
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1199
 \noindent The position \isa{p} in this definition acts as the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1200
  \emph{first distinct position} of \isa{v\isactrlsub {\isadigit{1}}} and \isa{v\isactrlsub {\isadigit{2}}}, where both values match strings of different length
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1201
  \cite{OkuiSuzuki2010}.  Since at \isa{p} the values \isa{v\isactrlsub {\isadigit{1}}} and \isa{v\isactrlsub {\isadigit{2}}} match different strings, the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1202
  ordering is irreflexive. Derived from the definition above
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1203
  are the following two orderings:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1204
  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1205
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1206
  \begin{tabular}{l}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1207
  \isa{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{2}}\ {\isasymequiv}\ {\isasymexists}p{\isachardot}{\kern0pt}\ v\isactrlsub {\isadigit{1}}\ {\isasymprec}\isactrlbsub p\isactrlesub \ v\isactrlsub {\isadigit{2}}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1208
  \isa{v\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ v\isactrlsub {\isadigit{2}}\ {\isasymequiv}\ v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{2}}\ {\isasymor}\ v\isactrlsub {\isadigit{1}}\ {\isacharequal}{\kern0pt}\ v\isactrlsub {\isadigit{2}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1209
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1210
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1211
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1212
 While we encountered a number of obstacles for establishing properties like
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1213
 transitivity for the ordering of Sulzmann and Lu (and which we failed
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1214
 to overcome), it is relatively straightforward to establish this
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1215
 property for the orderings
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1216
 \isa{\underline{\hspace{2mm}}\ {\isasymprec}\ \underline{\hspace{2mm}}} and \isa{\underline{\hspace{2mm}}\ \mbox{$\preccurlyeq$}\ \underline{\hspace{2mm}}}  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1217
 by Okui and Suzuki.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1218
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1219
 \begin{lemma}[Transitivity]\label{transitivity}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1220
 \isa{{\normalsize{}If\,}\ \mbox{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{2}}}\ {\normalsize \,and\,}\ \mbox{v\isactrlsub {\isadigit{2}}\ {\isasymprec}\ v\isactrlsub {\isadigit{3}}}\ {\normalsize \,then\,}\ v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{3}}{\isachardot}{\kern0pt}} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1221
 \end{lemma}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1222
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1223
 \begin{proof} From the assumption we obtain two positions \isa{p}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1224
 and \isa{q}, where the values \isa{v\isactrlsub {\isadigit{1}}} and \isa{v\isactrlsub {\isadigit{2}}} (respectively \isa{v\isactrlsub {\isadigit{2}}} and \isa{v\isactrlsub {\isadigit{3}}}) are `distinct'.  Since \isa{{\isasymprec}\isactrlbsub lex\isactrlesub } is trichotomous, we need to consider
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1225
 three cases, namely \isa{p\ {\isacharequal}{\kern0pt}\ q}, \isa{p\ {\isasymprec}\isactrlbsub lex\isactrlesub \ q} and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1226
 \isa{q\ {\isasymprec}\isactrlbsub lex\isactrlesub \ p}. Let us look at the first case.  Clearly
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1227
 \isa{{\isasymparallel}v\isactrlsub {\isadigit{2}}{\isasymparallel}\isactrlbsub p\isactrlesub \ {\isacharless}{\kern0pt}\ {\isasymparallel}v\isactrlsub {\isadigit{1}}{\isasymparallel}\isactrlbsub p\isactrlesub } and \isa{{\isasymparallel}v\isactrlsub {\isadigit{3}}{\isasymparallel}\isactrlbsub p\isactrlesub \ {\isacharless}{\kern0pt}\ {\isasymparallel}v\isactrlsub {\isadigit{2}}{\isasymparallel}\isactrlbsub p\isactrlesub } imply \isa{{\isasymparallel}v\isactrlsub {\isadigit{3}}{\isasymparallel}\isactrlbsub p\isactrlesub \ {\isacharless}{\kern0pt}\ {\isasymparallel}v\isactrlsub {\isadigit{1}}{\isasymparallel}\isactrlbsub p\isactrlesub }.  It remains to show
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1228
 that for a \isa{p{\isacharprime}{\kern0pt}\ {\isasymin}\ Pos\ v\isactrlsub {\isadigit{1}}\ {\isasymunion}\ Pos\ v\isactrlsub {\isadigit{3}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1229
 with \isa{p{\isacharprime}{\kern0pt}\ {\isasymprec}\isactrlbsub lex\isactrlesub \ p} that \isa{{\isasymparallel}v\isactrlsub {\isadigit{1}}{\isasymparallel}\isactrlbsub p{\isacharprime}{\kern0pt}\isactrlesub \ {\isacharequal}{\kern0pt}\ {\isasymparallel}v\isactrlsub {\isadigit{3}}{\isasymparallel}\isactrlbsub p{\isacharprime}{\kern0pt}\isactrlesub } holds.  Suppose \isa{p{\isacharprime}{\kern0pt}\ {\isasymin}\ Pos\ v\isactrlsub {\isadigit{1}}}, then we can infer from the first assumption that \isa{{\isasymparallel}v\isactrlsub {\isadigit{1}}{\isasymparallel}\isactrlbsub p{\isacharprime}{\kern0pt}\isactrlesub \ {\isacharequal}{\kern0pt}\ {\isasymparallel}v\isactrlsub {\isadigit{2}}{\isasymparallel}\isactrlbsub p{\isacharprime}{\kern0pt}\isactrlesub }.  But this means
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1230
 that \isa{p{\isacharprime}{\kern0pt}} must be in \isa{Pos\ v\isactrlsub {\isadigit{2}}} too (the norm
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1231
 cannot be \isa{{\isacharminus}{\kern0pt}{\isadigit{1}}} given \isa{p{\isacharprime}{\kern0pt}\ {\isasymin}\ Pos\ v\isactrlsub {\isadigit{1}}}).  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1232
 Hence we can use the second assumption and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1233
 infer \isa{{\isasymparallel}v\isactrlsub {\isadigit{2}}{\isasymparallel}\isactrlbsub p{\isacharprime}{\kern0pt}\isactrlesub \ {\isacharequal}{\kern0pt}\ {\isasymparallel}v\isactrlsub {\isadigit{3}}{\isasymparallel}\isactrlbsub p{\isacharprime}{\kern0pt}\isactrlesub },
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1234
 which concludes this case with \isa{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{3}}}.  The reasoning in the other cases is similar.\qed
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1235
 \end{proof}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1236
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1237
 \noindent 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1238
 The proof for $\preccurlyeq$ is similar and omitted.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1239
 It is also straightforward to show that \isa{{\isasymprec}} and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1240
 $\preccurlyeq$ are partial orders.  Okui and Suzuki furthermore show that they
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1241
 are linear orderings for lexical values \cite{OkuiSuzuki2010} of a given
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1242
 regular expression and given string, but we have not formalised this in Isabelle. It is
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1243
 not essential for our results. What we are going to show below is
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1244
 that for a given \isa{r} and \isa{s}, the orderings have a unique
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1245
 minimal element on the set \isa{LV\ r\ s}, which is the POSIX value
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1246
 we defined in the previous section. We start with two properties that
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1247
 show how the length of a flattened value relates to the \isa{{\isasymprec}}-ordering.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1248
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1249
 \begin{proposition}\mbox{}\smallskip\\\label{ordlen}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1250
 \begin{tabular}{@ {}ll}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1251
 (1) &
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1252
 \isa{{\normalsize{}If\,}\ v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{2}}\ {\normalsize \,then\,}\ len\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}\ {\isasymle}\ len\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}{\isachardot}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1253
 (2) &
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1254
 \isa{{\normalsize{}If\,}\ len\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}\ {\isacharless}{\kern0pt}\ len\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\normalsize \,then\,}\ v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{2}}{\isachardot}{\kern0pt}} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1255
 \end{tabular} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1256
 \end{proposition}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1257
 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1258
 \noindent Both properties follow from the definition of the ordering. Note that
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1259
 \textit{(2)} entails that a value, say \isa{v\isactrlsub {\isadigit{2}}}, whose underlying 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1260
 string is a strict prefix of another flattened value, say \isa{v\isactrlsub {\isadigit{1}}}, then
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1261
 \isa{v\isactrlsub {\isadigit{1}}} must be smaller than \isa{v\isactrlsub {\isadigit{2}}}. For our proofs it
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1262
 will be useful to have the following properties---in each case the underlying strings 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1263
 of the compared values are the same: 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1264
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1265
  \begin{proposition}\mbox{}\smallskip\\\label{ordintros}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1266
  \begin{tabular}{ll}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1267
  \textit{(1)} & 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1268
  \isa{{\normalsize{}If\,}\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}\ {\normalsize \,then\,}\ Left\ v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ Right\ v\isactrlsub {\isadigit{2}}{\isachardot}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1269
  \textit{(2)} & If
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1270
  \isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}} \;then\;
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1271
  \isa{Left\ v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ Left\ v\isactrlsub {\isadigit{2}}} \;iff\;
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1272
  \isa{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{2}}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1273
  \textit{(3)} & If
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1274
  \isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}} \;then\;
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1275
  \isa{Right\ v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ Right\ v\isactrlsub {\isadigit{2}}} \;iff\;
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1276
  \isa{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{2}}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1277
  \textit{(4)} & If
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1278
  \isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}w\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}} \;then\;
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1279
  \isa{Seq\ v\ v\isactrlsub {\isadigit{2}}\ {\isasymprec}\ Seq\ v\ w\isactrlsub {\isadigit{2}}} \;iff\;
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1280
  \isa{v\isactrlsub {\isadigit{2}}\ {\isasymprec}\ w\isactrlsub {\isadigit{2}}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1281
  \textit{(5)} & If
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1282
  \isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharat}{\kern0pt}\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}w\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharat}{\kern0pt}\ {\isacharbar}{\kern0pt}w\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}} \;and\;
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1283
  \isa{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ w\isactrlsub {\isadigit{1}}} \;then\;
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1284
  \isa{Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}\ {\isasymprec}\ Seq\ w\isactrlsub {\isadigit{1}}\ w\isactrlsub {\isadigit{2}}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1285
  \textit{(6)} & If
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1286
  \isa{{\isacharbar}{\kern0pt}vs\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}vs\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}} \;then\;
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1287
  \isa{Stars\ {\isacharparenleft}{\kern0pt}vs\ {\isacharat}{\kern0pt}\ vs\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymprec}\ Stars\ {\isacharparenleft}{\kern0pt}vs\ {\isacharat}{\kern0pt}\ vs\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} \;iff\;
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1288
  \isa{Stars\ vs\isactrlsub {\isadigit{1}}\ {\isasymprec}\ Stars\ vs\isactrlsub {\isadigit{2}}}\\  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1289
  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1290
  \textit{(7)} & If
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1291
  \isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vs\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vs\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}} \;and\;
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1292
  \isa{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{2}}} \;then\;
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1293
   \isa{Stars\ {\isacharparenleft}{\kern0pt}v\isactrlsub {\isadigit{1}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vs\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymprec}\ Stars\ {\isacharparenleft}{\kern0pt}v\isactrlsub {\isadigit{2}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vs\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1294
  \end{tabular} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1295
  \end{proposition}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1296
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1297
  \noindent One might prefer that statements \textit{(4)} and \textit{(5)} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1298
  (respectively \textit{(6)} and \textit{(7)})
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1299
  are combined into a single \textit{iff}-statement (like the ones for \isa{Left} and \isa{Right}). Unfortunately this cannot be done easily: such
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1300
  a single statement would require an additional assumption about the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1301
  two values \isa{Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}} and \isa{Seq\ w\isactrlsub {\isadigit{1}}\ w\isactrlsub {\isadigit{2}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1302
  being inhabited by the same regular expression. The
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1303
  complexity of the proofs involved seems to not justify such a
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1304
  `cleaner' single statement. The statements given are just the properties that
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1305
  allow us to establish our theorems without any difficulty. The proofs 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1306
  for Proposition~\ref{ordintros} are routine.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1307
 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1308
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1309
  Next we establish how Okui and Suzuki's orderings relate to our
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1310
  definition of POSIX values.  Given a \isa{POSIX} value \isa{v\isactrlsub {\isadigit{1}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1311
  for \isa{r} and \isa{s}, then any other lexical value \isa{v\isactrlsub {\isadigit{2}}} in \isa{LV\ r\ s} is greater or equal than \isa{v\isactrlsub {\isadigit{1}}}, namely:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1312
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1313
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1314
  \begin{theorem}\label{orderone}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1315
  \isa{{\normalsize{}If\,}\ \mbox{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub {\isadigit{1}}}\ {\normalsize \,and\,}\ \mbox{v\isactrlsub {\isadigit{2}}\ {\isasymin}\ LV\ r\ s}\ {\normalsize \,then\,}\ v\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ v\isactrlsub {\isadigit{2}}{\isachardot}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1316
  \end{theorem}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1317
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1318
  \begin{proof} By induction on our POSIX rules. By
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1319
  Theorem~\ref{posixdeterm} and the definition of \isa{LV}, it is clear
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1320
  that \isa{v\isactrlsub {\isadigit{1}}} and \isa{v\isactrlsub {\isadigit{2}}} have the same
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1321
  underlying string \isa{s}.  The three base cases are
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1322
  straightforward: for example for \isa{v\isactrlsub {\isadigit{1}}\ {\isacharequal}{\kern0pt}\ Empty}, we have
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1323
  that \isa{v\isactrlsub {\isadigit{2}}\ {\isasymin}\ LV\ \isactrlbold {\isadigit{1}}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} must also be of the form
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1324
  \mbox{\isa{v\isactrlsub {\isadigit{2}}\ {\isacharequal}{\kern0pt}\ Empty}}. Therefore we have \isa{v\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ v\isactrlsub {\isadigit{2}}}.  The inductive cases for
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1325
  \isa{r} being of the form \isa{r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}} and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1326
  \isa{r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}} are as follows:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1327
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1328
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1329
  \begin{itemize} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1330
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1331
  \item[$\bullet$] Case \isa{P{\isacharplus}{\kern0pt}L} with \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Left\ w\isactrlsub {\isadigit{1}}}: In this case the value 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1332
  \isa{v\isactrlsub {\isadigit{2}}} is either of the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1333
  form \isa{Left\ w\isactrlsub {\isadigit{2}}} or \isa{Right\ w\isactrlsub {\isadigit{2}}}. In the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1334
  latter case we can immediately conclude with \mbox{\isa{v\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ v\isactrlsub {\isadigit{2}}}} since a \isa{Left}-value with the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1335
  same underlying string \isa{s} is always smaller than a
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1336
  \isa{Right}-value by Proposition~\ref{ordintros}\textit{(1)}.  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1337
  In the former case we have \isa{w\isactrlsub {\isadigit{2}}\ {\isasymin}\ LV\ r\isactrlsub {\isadigit{1}}\ s} and can use the induction hypothesis to infer
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1338
  \isa{w\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ w\isactrlsub {\isadigit{2}}}. Because \isa{w\isactrlsub {\isadigit{1}}} and \isa{w\isactrlsub {\isadigit{2}}} have the same underlying string
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1339
  \isa{s}, we can conclude with \isa{Left\ w\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ Left\ w\isactrlsub {\isadigit{2}}} using
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1340
  Proposition~\ref{ordintros}\textit{(2)}.\smallskip
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1341
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1342
  \item[$\bullet$] Case \isa{P{\isacharplus}{\kern0pt}R} with \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Right\ w\isactrlsub {\isadigit{1}}}: This case similar to the previous
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1343
  case, except that we additionally know \isa{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}}. This is needed when \isa{v\isactrlsub {\isadigit{2}}} is of the form
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1344
  \mbox{\isa{Left\ w\isactrlsub {\isadigit{2}}}}. Since \mbox{\isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}w\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}} \isa{{\isacharequal}{\kern0pt}\ s}} and \isa{w\isactrlsub {\isadigit{2}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{1}}}, we can derive a contradiction for \mbox{\isa{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}}} using
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1345
  Proposition~\ref{inhabs}. So also in this case \mbox{\isa{v\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ v\isactrlsub {\isadigit{2}}}}.\smallskip
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1346
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1347
  \item[$\bullet$] Case \isa{PS} with \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Seq\ w\isactrlsub {\isadigit{1}}\ w\isactrlsub {\isadigit{2}}}: We can assume \isa{v\isactrlsub {\isadigit{2}}\ {\isacharequal}{\kern0pt}\ Seq\ u\isactrlsub {\isadigit{1}}\ u\isactrlsub {\isadigit{2}}} with \isa{u\isactrlsub {\isadigit{1}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{1}}} and \mbox{\isa{u\isactrlsub {\isadigit{2}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{2}}}}. We have \isa{s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}u\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharat}{\kern0pt}\ {\isacharbar}{\kern0pt}u\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}}.  By the side-condition of the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1348
  \isa{PS}-rule we know that either \isa{s\isactrlsub {\isadigit{1}}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}u\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}} or that \isa{{\isacharbar}{\kern0pt}u\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}} is a strict prefix of
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1349
  \isa{s\isactrlsub {\isadigit{1}}}. In the latter case we can infer \isa{w\isactrlsub {\isadigit{1}}\ {\isasymprec}\ u\isactrlsub {\isadigit{1}}} by
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1350
  Proposition~\ref{ordlen}\textit{(2)} and from this \isa{v\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ v\isactrlsub {\isadigit{2}}} by Proposition~\ref{ordintros}\textit{(5)}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1351
  (as noted above \isa{v\isactrlsub {\isadigit{1}}} and \isa{v\isactrlsub {\isadigit{2}}} must have the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1352
  same underlying string).
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1353
  In the former case we know
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1354
  \isa{u\isactrlsub {\isadigit{1}}\ {\isasymin}\ LV\ r\isactrlsub {\isadigit{1}}\ s\isactrlsub {\isadigit{1}}} and \isa{u\isactrlsub {\isadigit{2}}\ {\isasymin}\ LV\ r\isactrlsub {\isadigit{2}}\ s\isactrlsub {\isadigit{2}}}. With this we can use the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1355
  induction hypotheses to infer \isa{w\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ u\isactrlsub {\isadigit{1}}} and \isa{w\isactrlsub {\isadigit{2}}\ \mbox{$\preccurlyeq$}\ u\isactrlsub {\isadigit{2}}}. By
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1356
  Proposition~\ref{ordintros}\textit{(4,5)} we can again infer 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1357
  \isa{v\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ v\isactrlsub {\isadigit{2}}}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1358
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1359
  \end{itemize}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1360
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1361
  \noindent The case for \isa{P{\isasymstar}} is similar to the \isa{PS}-case and omitted.\qed
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1362
  \end{proof}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1363
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1364
  \noindent This theorem shows that our \isa{POSIX} value for a
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1365
  regular expression \isa{r} and string \isa{s} is in fact a
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1366
  minimal element of the values in \isa{LV\ r\ s}. By
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1367
  Proposition~\ref{ordlen}\textit{(2)} we also know that any value in
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1368
  \isa{LV\ r\ s{\isacharprime}{\kern0pt}}, with \isa{s{\isacharprime}{\kern0pt}} being a strict prefix, cannot be
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1369
  smaller than \isa{v\isactrlsub {\isadigit{1}}}. The next theorem shows the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1370
  opposite---namely any minimal element in \isa{LV\ r\ s} must be a
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1371
  \isa{POSIX} value. This can be established by induction on \isa{r}, but the proof can be drastically simplified by using the fact
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1372
  from the previous section about the existence of a \isa{POSIX} value
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1373
  whenever a string \isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1374
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1375
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1376
  \begin{theorem}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1377
  \isa{{\normalsize{}If\,}\ \mbox{v\isactrlsub {\isadigit{1}}\ {\isasymin}\ LV\ r\ s}\ {\normalsize \,and\,}\ \mbox{{\isasymforall}v\isactrlsub {\isadigit{2}}{\isasymin}LV\ r\ s{\isachardot}{\kern0pt}\ v\isactrlsub {\isadigit{2}}\ \mbox{$\not\prec$}\ v\isactrlsub {\isadigit{1}}}\ {\normalsize \,then\,}\ {\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub {\isadigit{1}}{\isachardot}{\kern0pt}} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1378
  \end{theorem}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1379
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1380
  \begin{proof} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1381
  If \isa{v\isactrlsub {\isadigit{1}}\ {\isasymin}\ LV\ r\ s} then 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1382
  \isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}} by Proposition~\ref{inhabs}. Hence by Theorem~\ref{lexercorrect}(2) 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1383
  there exists a
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1384
  \isa{POSIX} value \isa{v\isactrlsub P} with \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub P}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1385
  and by Lemma~\ref{LVposix} we also have \mbox{\isa{v\isactrlsub P\ {\isasymin}\ LV\ r\ s}}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1386
  By Theorem~\ref{orderone} we therefore have 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1387
  \isa{v\isactrlsub P\ \mbox{$\preccurlyeq$}\ v\isactrlsub {\isadigit{1}}}. If \isa{v\isactrlsub P\ {\isacharequal}{\kern0pt}\ v\isactrlsub {\isadigit{1}}} then
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1388
  we are done. Otherwise we have \isa{v\isactrlsub P\ {\isasymprec}\ v\isactrlsub {\isadigit{1}}}, which 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1389
  however contradicts the second assumption about \isa{v\isactrlsub {\isadigit{1}}} being the smallest
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1390
  element in \isa{LV\ r\ s}. So we are done in this case too.\qed
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1391
  \end{proof}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1392
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1393
  \noindent
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1394
  From this we can also show 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1395
  that if \isa{LV\ r\ s} is non-empty (or equivalently \isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}}) then 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1396
  it has a unique minimal element:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1397
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1398
  \begin{corollary}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1399
  \isa{{\normalsize{}If\,}\ LV\ r\ s\ {\isasymnoteq}\ {\isasymemptyset}\ {\normalsize \,then\,}\ {\isasymexists}{\isacharbang}{\kern0pt}vmin{\isachardot}{\kern0pt}\ vmin\ {\isasymin}\ LV\ r\ s\ {\isasymand}\ {\isacharparenleft}{\kern0pt}{\isasymforall}v{\isasymin}LV\ r\ s{\isachardot}{\kern0pt}\ vmin\ \mbox{$\preccurlyeq$}\ v{\isacharparenright}{\kern0pt}{\isachardot}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1400
  \end{corollary}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1401
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1402
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1403
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1404
  \noindent To sum up, we have shown that the (unique) minimal elements 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1405
  of the ordering by Okui and Suzuki are exactly the \isa{POSIX}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1406
  values we defined inductively in Section~\ref{posixsec}. This provides
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1407
  an independent confirmation that our ternary relation formalises the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1408
  informal POSIX rules.%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1409
\end{isamarkuptext}\isamarkuptrue%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1410
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1411
\isadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1412
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1413
\endisadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1414
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1415
\isatagdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1416
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1417
\isamarkupsection{Bitcoded Lexing%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1418
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1419
\isamarkuptrue%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1420
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1421
\endisatagdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1422
{\isafolddocument}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1423
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1424
\isadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1425
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1426
\endisadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1427
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1428
\begin{isamarkuptext}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1429
Incremental calculation of the value. To simplify the proof we first define the function
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1430
\isa{flex} which calculates the ``iterated'' injection function. With this we can 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1431
rewrite the lexer as
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1432
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1433
\begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1434
\isa{lexer\ r\ s\ {\isacharequal}{\kern0pt}\ {\isacharparenleft}{\kern0pt}\textrm{if}\ nullable\ {\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}s{\isacharparenright}{\kern0pt}\ \textrm{then}\ Some\ {\isacharparenleft}{\kern0pt}flex\ r\ id\ s\ {\isacharparenleft}{\kern0pt}mkeps\ {\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}s{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ \textrm{else}\ None{\isacharparenright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1435
\end{center}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1436
\end{isamarkuptext}\isamarkuptrue%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1437
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1438
\isadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1439
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1440
\endisadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1441
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1442
\isatagdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1443
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1444
\isamarkupsection{Optimisations%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1445
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1446
\isamarkuptrue%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1447
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1448
\endisatagdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1449
{\isafolddocument}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1450
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1451
\isadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1452
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1453
\endisadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1454
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1455
\begin{isamarkuptext}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1456
Derivatives as calculated by \Brz's method are usually more complex
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1457
  regular expressions than the initial one; the result is that the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1458
  derivative-based matching and lexing algorithms are often abysmally slow.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1459
  However, various optimisations are possible, such as the simplifications
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1460
  of \isa{\isactrlbold {\isadigit{0}}\ {\isacharplus}{\kern0pt}\ r}, \isa{r\ {\isacharplus}{\kern0pt}\ \isactrlbold {\isadigit{0}}}, \isa{\isactrlbold {\isadigit{1}}\ {\isasymcdot}\ r} and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1461
  \isa{r\ {\isasymcdot}\ \isactrlbold {\isadigit{1}}} to \isa{r}. These simplifications can speed up the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1462
  algorithms considerably, as noted in \cite{Sulzmann2014}. One of the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1463
  advantages of having a simple specification and correctness proof is that
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1464
  the latter can be refined to prove the correctness of such simplification
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1465
  steps. While the simplification of regular expressions according to 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1466
  rules like
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1467
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1468
  \begin{equation}\label{Simpl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1469
  \begin{array}{lcllcllcllcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1470
  \isa{\isactrlbold {\isadigit{0}}\ {\isacharplus}{\kern0pt}\ r} & \isa{{\isasymRightarrow}} & \isa{r} \hspace{8mm}%\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1471
  \isa{r\ {\isacharplus}{\kern0pt}\ \isactrlbold {\isadigit{0}}} & \isa{{\isasymRightarrow}} & \isa{r} \hspace{8mm}%\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1472
  \isa{\isactrlbold {\isadigit{1}}\ {\isasymcdot}\ r}  & \isa{{\isasymRightarrow}} & \isa{r} \hspace{8mm}%\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1473
  \isa{r\ {\isasymcdot}\ \isactrlbold {\isadigit{1}}}  & \isa{{\isasymRightarrow}} & \isa{r}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1474
  \end{array}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1475
  \end{equation}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1476
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1477
  \noindent is well understood, there is an obstacle with the POSIX value
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1478
  calculation algorithm by Sulzmann and Lu: if we build a derivative regular
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1479
  expression and then simplify it, we will calculate a POSIX value for this
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1480
  simplified derivative regular expression, \emph{not} for the original (unsimplified)
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1481
  derivative regular expression. Sulzmann and Lu \cite{Sulzmann2014} overcome this obstacle by
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1482
  not just calculating a simplified regular expression, but also calculating
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1483
  a \emph{rectification function} that ``repairs'' the incorrect value.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1484
  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1485
  The rectification functions can be (slightly clumsily) implemented  in
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1486
  Isabelle/HOL as follows using some auxiliary functions:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1487
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1488
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1489
  \begin{tabular}{lcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1490
  \isa{F\isactrlbsub Right\isactrlesub \ f\ v} & $\dn$ & \isa{Right\ {\isacharparenleft}{\kern0pt}f\ v{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1491
  \isa{F\isactrlbsub Left\isactrlesub \ f\ v} & $\dn$ & \isa{Left\ {\isacharparenleft}{\kern0pt}f\ v{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1492
  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1493
  \isa{F\isactrlbsub Alt\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}\ {\isacharparenleft}{\kern0pt}Right\ v{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{Right\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{2}}\ v{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1494
  \isa{F\isactrlbsub Alt\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}\ {\isacharparenleft}{\kern0pt}Left\ v{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{Left\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{1}}\ v{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1495
  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1496
  \isa{F\isactrlbsub Seq{\isadigit{1}}\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}\ v} & $\dn$ & \isa{Seq\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{1}}\ {\isacharparenleft}{\kern0pt}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{2}}\ v{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1497
  \isa{F\isactrlbsub Seq{\isadigit{2}}\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}\ v} & $\dn$ & \isa{Seq\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{1}}\ v{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{2}}\ {\isacharparenleft}{\kern0pt}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1498
  \isa{F\isactrlbsub Seq\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}\ {\isacharparenleft}{\kern0pt}Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{Seq\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{2}}\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\medskip\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1499
  %\end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1500
  %
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1501
  %\begin{tabular}{lcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1502
  \isa{simp\isactrlbsub Alt\isactrlesub \ {\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{0}}{\isacharcomma}{\kern0pt}\ \underline{\hspace{2mm}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ F\isactrlbsub Right\isactrlesub \ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1503
  \isa{simp\isactrlbsub Alt\isactrlesub \ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{0}}{\isacharcomma}{\kern0pt}\ \underline{\hspace{2mm}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ F\isactrlbsub Left\isactrlesub \ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1504
  \isa{simp\isactrlbsub Alt\isactrlesub \ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ F\isactrlbsub Alt\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1505
  \isa{simp\isactrlbsub Seq\isactrlesub \ {\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ F\isactrlbsub Seq{\isadigit{1}}\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1506
  \isa{simp\isactrlbsub Seq\isactrlesub \ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ F\isactrlbsub Seq{\isadigit{2}}\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1507
  \isa{simp\isactrlbsub Seq\isactrlesub \ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ F\isactrlbsub Seq\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1508
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1509
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1510
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1511
  \noindent
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1512
  The functions \isa{simp\isactrlbsub Alt\isactrlesub } and \isa{simp\isactrlbsub Seq\isactrlesub } encode the simplification rules
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1513
  in \eqref{Simpl} and compose the rectification functions (simplifications can occur
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1514
  deep inside the regular expression). The main simplification function is then 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1515
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1516
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1517
  \begin{tabular}{lcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1518
  \isa{simp\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{simp\isactrlbsub Alt\isactrlesub \ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1519
  \isa{simp\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{simp\isactrlbsub Seq\isactrlesub \ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1520
  \isa{simp\ r} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r{\isacharcomma}{\kern0pt}\ id{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1521
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1522
  \end{center} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1523
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1524
  \noindent where \isa{id} stands for the identity function. The
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1525
  function \isa{simp} returns a simplified regular expression and a corresponding
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1526
  rectification function. Note that we do not simplify under stars: this
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1527
  seems to slow down the algorithm, rather than speed it up. The optimised
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1528
  lexer is then given by the clauses:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1529
  
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1530
  \begin{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1531
  \begin{tabular}{lcl}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1532
  \isa{lexer\isactrlsup {\isacharplus}{\kern0pt}\ r\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} & $\dn$ & \isa{\textrm{if}\ nullable\ r\ \textrm{then}\ Some\ {\isacharparenleft}{\kern0pt}mkeps\ r{\isacharparenright}{\kern0pt}\ \textrm{else}\ None}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1533
  \isa{lexer\isactrlsup {\isacharplus}{\kern0pt}\ r\ {\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s{\isacharparenright}{\kern0pt}} & $\dn$ & 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1534
                         \isa{let\ {\isacharparenleft}{\kern0pt}r\isactrlsub s{\isacharcomma}{\kern0pt}\ f\isactrlsub r{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ simp\ {\isacharparenleft}{\kern0pt}r}$\backslash$\isa{c{\isacharparenright}{\kern0pt}\ in}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1535
                     & & \isa{case} \isa{lexer\isactrlsup {\isacharplus}{\kern0pt}\ r\isactrlsub s\ s} \isa{of}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1536
                     & & \phantom{$|$} \isa{None}  \isa{{\isasymRightarrow}} \isa{None}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1537
                     & & $|$ \isa{Some\ v} \isa{{\isasymRightarrow}} \isa{Some\ {\isacharparenleft}{\kern0pt}inj\ r\ c\ {\isacharparenleft}{\kern0pt}f\isactrlsub r\ v{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}}                          
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1538
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1539
  \end{center}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1540
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1541
  \noindent
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1542
  In the second clause we first calculate the derivative \isa{r{\isacharbackslash}{\kern0pt}c}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1543
  and then simpli
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1544
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1545
text \isa{\ \ Incremental\ calculation\ of\ the\ value{\isachardot}{\kern0pt}\ To\ simplify\ the\ proof\ we\ first\ define\ the\ function\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}const\ flex{\isacharbraceright}{\kern0pt}\ which\ calculates\ the\ {\isacharbackquote}{\kern0pt}{\isacharbackquote}{\kern0pt}iterated{\isacharprime}{\kern0pt}{\isacharprime}{\kern0pt}\ injection\ function{\isachardot}{\kern0pt}\ With\ this\ we\ can\ rewrite\ the\ lexer\ as\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ lexer{\isacharunderscore}{\kern0pt}flex{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ {\isachardoublequote}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ {\isachardoublequote}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{7}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{7}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ areg{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}{\isacharequal}{\kern0pt}{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}AZERO{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}mid{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}AONE\ bs{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}mid{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}ACHAR\ bs\ c{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}mid{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}AALT\ bs\ r{\isadigit{1}}\ r{\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}mid{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}ASEQ\ bs\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}mid{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}ASTAR\ bs\ r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ Some\ simple\ facts\ about\ erase\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}lemma{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}mbox{\isacharbraceleft}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ erase{\isacharunderscore}{\kern0pt}bder{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ erase{\isacharunderscore}{\kern0pt}intern{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}lemma{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}medskip{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ \ {\isacharpercent}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharpercent}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ {\isacharpercent}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharpercent}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ \ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bmkeps{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bmkeps{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bmkeps{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bmkeps{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bmkeps{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bmkeps{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bmkeps{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bmkeps{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}medskip{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ \ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharbrackleft}{\kern0pt}mode{\isacharequal}{\kern0pt}IfThen{\isacharbrackright}{\kern0pt}\ bder{\isacharunderscore}{\kern0pt}retrieve{\isacharbraceright}{\kern0pt}\ \ By\ induction\ on\ {\isasymopen}r{\isasymclose}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}theorem{\isacharbraceright}{\kern0pt}{\isacharbrackleft}{\kern0pt}Main\ Lemma{\isacharbrackright}{\kern0pt}{\isacharbackslash}{\kern0pt}mbox{\isacharbraceleft}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharbrackleft}{\kern0pt}mode{\isacharequal}{\kern0pt}IfThen{\isacharbrackright}{\kern0pt}\ MAIN{\isacharunderscore}{\kern0pt}decode{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}theorem{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}noindent\ Definition\ of\ the\ bitcoded\ lexer\ \ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ blexer{\isacharunderscore}{\kern0pt}def{\isacharbraceright}{\kern0pt}\ \ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}theorem{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ blexer{\isacharunderscore}{\kern0pt}correctness{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}theorem{\isacharbraceright}{\kern0pt}\ \ }
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1546
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1547
section \isa{Optimisations}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1548
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1549
text \isa{\ \ Derivatives\ as\ calculated\ by\ {\isacharbackslash}{\kern0pt}Brz{\isacharprime}{\kern0pt}s\ method\ are\ usually\ more\ complex\ regular\ expressions\ than\ the\ initial\ one{\isacharsemicolon}{\kern0pt}\ the\ result\ is\ that\ the\ derivative{\isacharminus}{\kern0pt}based\ matching\ and\ lexing\ algorithms\ are\ often\ abysmally\ slow{\isachardot}{\kern0pt}\ However{\isacharcomma}{\kern0pt}\ various\ optimisations\ are\ possible{\isacharcomma}{\kern0pt}\ such\ as\ the\ simplifications\ of\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}ALT\ ZERO\ r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharcomma}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}ALT\ r\ ZERO{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharcomma}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}SEQ\ ONE\ r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ and\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}SEQ\ r\ ONE{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ to\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ r{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ These\ simplifications\ can\ speed\ up\ the\ algorithms\ considerably{\isacharcomma}{\kern0pt}\ as\ noted\ in\ {\isacharbackslash}{\kern0pt}cite{\isacharbraceleft}{\kern0pt}Sulzmann{\isadigit{2}}{\isadigit{0}}{\isadigit{1}}{\isadigit{4}}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ One\ of\ the\ advantages\ of\ having\ a\ simple\ specification\ and\ correctness\ proof\ is\ that\ the\ latter\ can\ be\ refined\ to\ prove\ the\ correctness\ of\ such\ simplification\ steps{\isachardot}{\kern0pt}\ While\ the\ simplification\ of\ regular\ expressions\ according\ to\ rules\ like\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}equation{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}label{\isacharbraceleft}{\kern0pt}Simpl{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}array{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcllcllcllcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}ALT\ ZERO\ r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}{\isasymRightarrow}{\isasymclose}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ r{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}hspace{\isacharbraceleft}{\kern0pt}{\isadigit{8}}mm{\isacharbraceright}{\kern0pt}{\isacharpercent}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}ALT\ r\ ZERO{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}{\isasymRightarrow}{\isasymclose}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ r{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}hspace{\isacharbraceleft}{\kern0pt}{\isadigit{8}}mm{\isacharbraceright}{\kern0pt}{\isacharpercent}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}SEQ\ ONE\ r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ \ {\isacharampersand}{\kern0pt}\ {\isasymopen}{\isasymRightarrow}{\isasymclose}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ r{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}hspace{\isacharbraceleft}{\kern0pt}{\isadigit{8}}mm{\isacharbraceright}{\kern0pt}{\isacharpercent}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}SEQ\ r\ ONE{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ \ {\isacharampersand}{\kern0pt}\ {\isasymopen}{\isasymRightarrow}{\isasymclose}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ r{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}array{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}equation{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}noindent\ is\ well\ understood{\isacharcomma}{\kern0pt}\ there\ is\ an\ obstacle\ with\ the\ POSIX\ value\ calculation\ algorithm\ by\ Sulzmann\ and\ Lu{\isacharcolon}{\kern0pt}\ if\ we\ build\ a\ derivative\ regular\ expression\ and\ then\ simplify\ it{\isacharcomma}{\kern0pt}\ we\ will\ calculate\ a\ POSIX\ value\ for\ this\ simplified\ derivative\ regular\ expression{\isacharcomma}{\kern0pt}\ {\isacharbackslash}{\kern0pt}emph{\isacharbraceleft}{\kern0pt}not{\isacharbraceright}{\kern0pt}\ for\ the\ original\ {\isacharparenleft}{\kern0pt}unsimplified{\isacharparenright}{\kern0pt}\ derivative\ regular\ expression{\isachardot}{\kern0pt}\ Sulzmann\ and\ Lu\ {\isacharbackslash}{\kern0pt}cite{\isacharbraceleft}{\kern0pt}Sulzmann{\isadigit{2}}{\isadigit{0}}{\isadigit{1}}{\isadigit{4}}{\isacharbraceright}{\kern0pt}\ overcome\ this\ obstacle\ by\ not\ just\ calculating\ a\ simplified\ regular\ expression{\isacharcomma}{\kern0pt}\ but\ also\ calculating\ a\ {\isacharbackslash}{\kern0pt}emph{\isacharbraceleft}{\kern0pt}rectification\ function{\isacharbraceright}{\kern0pt}\ that\ {\isacharbackquote}{\kern0pt}{\isacharbackquote}{\kern0pt}repairs{\isacharprime}{\kern0pt}{\isacharprime}{\kern0pt}\ the\ incorrect\ value{\isachardot}{\kern0pt}\ \ The\ rectification\ functions\ can\ be\ {\isacharparenleft}{\kern0pt}slightly\ clumsily{\isacharparenright}{\kern0pt}\ implemented\ \ in\ Isabelle{\isacharslash}{\kern0pt}HOL\ as\ follows\ using\ some\ auxiliary\ functions{\isacharcolon}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}RIGHT{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}Right\ {\isacharparenleft}{\kern0pt}f\ v{\isacharparenright}{\kern0pt}{\isasymclose}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}LEFT{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}Left\ {\isacharparenleft}{\kern0pt}f\ v{\isacharparenright}{\kern0pt}{\isasymclose}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ \ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}ALT{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}Right\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{2}}\ v{\isacharparenright}{\kern0pt}{\isasymclose}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}ALT{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}Left\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{1}}\ v{\isacharparenright}{\kern0pt}{\isasymclose}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ \ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}SEQ{\isadigit{1}}{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}Seq\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{1}}\ {\isacharparenleft}{\kern0pt}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{2}}\ v{\isacharparenright}{\kern0pt}{\isasymclose}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}SEQ{\isadigit{2}}{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}Seq\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{1}}\ v{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{2}}\ {\isacharparenleft}{\kern0pt}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isasymclose}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}SEQ{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}Seq\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{2}}\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isasymclose}{\isacharbackslash}{\kern0pt}medskip{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharpercent}{\kern0pt}{\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharpercent}{\kern0pt}\ {\isacharpercent}{\kern0pt}{\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp{\isacharunderscore}{\kern0pt}ALT\ {\isacharparenleft}{\kern0pt}ZERO{\isacharcomma}{\kern0pt}\ DUMMY{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}RIGHT\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp{\isacharunderscore}{\kern0pt}ALT\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}ZERO{\isacharcomma}{\kern0pt}\ DUMMY{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}LEFT\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp{\isacharunderscore}{\kern0pt}ALT\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}{\isacharparenleft}{\kern0pt}ALT\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}ALT\ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp{\isacharunderscore}{\kern0pt}SEQ\ {\isacharparenleft}{\kern0pt}ONE{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}SEQ{\isadigit{1}}\ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp{\isacharunderscore}{\kern0pt}SEQ\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}ONE{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}SEQ{\isadigit{2}}\ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp{\isacharunderscore}{\kern0pt}SEQ\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}{\isacharparenleft}{\kern0pt}SEQ\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}SEQ\ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}noindent\ The\ functions\ {\isasymopen}simp\isactrlbsub Alt\isactrlesub {\isasymclose}\ and\ {\isasymopen}simp\isactrlbsub Seq\isactrlesub {\isasymclose}\ encode\ the\ simplification\ rules\ in\ {\isacharbackslash}{\kern0pt}eqref{\isacharbraceleft}{\kern0pt}Simpl{\isacharbraceright}{\kern0pt}\ and\ compose\ the\ rectification\ functions\ {\isacharparenleft}{\kern0pt}simplifications\ can\ occur\ deep\ inside\ the\ regular\ expression{\isacharparenright}{\kern0pt}{\isachardot}{\kern0pt}\ The\ main\ simplification\ function\ is\ then\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}ALT\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp{\isacharunderscore}{\kern0pt}ALT\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}SEQ\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp{\isacharunderscore}{\kern0pt}SEQ\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp\ r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}{\isacharparenleft}{\kern0pt}r{\isacharcomma}{\kern0pt}\ id{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}noindent\ where\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}id{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ stands\ for\ the\ identity\ function{\isachardot}{\kern0pt}\ The\ function\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}const\ simp{\isacharbraceright}{\kern0pt}\ returns\ a\ simplified\ regular\ expression\ and\ a\ corresponding\ rectification\ function{\isachardot}{\kern0pt}\ Note\ that\ we\ do\ not\ simplify\ under\ stars{\isacharcolon}{\kern0pt}\ this\ seems\ to\ slow\ down\ the\ algorithm{\isacharcomma}{\kern0pt}\ rather\ than\ speed\ it\ up{\isachardot}{\kern0pt}\ The\ optimised\ lexer\ is\ then\ given\ by\ the\ clauses{\isacharcolon}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ slexer{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ slexer{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ slexer{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}let\ {\isacharparenleft}{\kern0pt}r\isactrlsub s{\isacharcomma}{\kern0pt}\ f\isactrlsub r{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ simp\ {\isacharparenleft}{\kern0pt}r\ {\isasymclose}{\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}backslash{\isachardollar}{\kern0pt}{\isasymopen}\ c{\isacharparenright}{\kern0pt}\ in{\isasymclose}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}case{\isasymclose}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}slexer\ r\isactrlsub s\ s{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isasymopen}of{\isasymclose}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharbackslash}{\kern0pt}phantom{\isacharbraceleft}{\kern0pt}{\isachardollar}{\kern0pt}{\isacharbar}{\kern0pt}{\isachardollar}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}None{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ \ {\isasymopen}{\isasymRightarrow}{\isasymclose}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ None{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbar}{\kern0pt}{\isachardollar}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}Some\ v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isasymopen}{\isasymRightarrow}{\isasymclose}\ {\isasymopen}Some\ {\isacharparenleft}{\kern0pt}inj\ r\ c\ {\isacharparenleft}{\kern0pt}f\isactrlsub r\ v{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isasymclose}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}noindent\ In\ the\ second\ clause\ we\ first\ calculate\ the\ derivative\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}der\ c\ r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ and\ then\ simplify\ the\ result{\isachardot}{\kern0pt}\ This\ gives\ us\ a\ simplified\ derivative\ {\isasymopen}r\isactrlsub s{\isasymclose}\ and\ a\ rectification\ function\ {\isasymopen}f\isactrlsub r{\isasymclose}{\isachardot}{\kern0pt}\ The\ lexer\ is\ then\ recursively\ called\ with\ the\ simplified\ derivative{\isacharcomma}{\kern0pt}\ but\ before\ we\ inject\ the\ character\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ c{\isacharbraceright}{\kern0pt}\ into\ the\ value\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ v{\isacharbraceright}{\kern0pt}{\isacharcomma}{\kern0pt}\ we\ need\ to\ rectify\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ v{\isacharbraceright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}that\ is\ construct\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}f\isactrlsub r\ v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isachardot}{\kern0pt}\ Before\ we\ can\ establish\ the\ correctness\ of\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}slexer{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharcomma}{\kern0pt}\ we\ need\ to\ show\ that\ simplification\ preserves\ the\ language\ and\ simplification\ preserves\ our\ POSIX\ relation\ once\ the\ value\ is\ rectified\ {\isacharparenleft}{\kern0pt}recall\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}const\ {\isachardoublequote}{\kern0pt}simp{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ generates\ a\ {\isacharparenleft}{\kern0pt}regular\ expression{\isacharcomma}{\kern0pt}\ rectification\ function{\isacharparenright}{\kern0pt}\ pair{\isacharparenright}{\kern0pt}{\isacharcolon}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}lemma{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}mbox{\isacharbraceleft}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}smallskip{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}label{\isacharbraceleft}{\kern0pt}slexeraux{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}ll{\isacharbraceright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ L{\isacharunderscore}{\kern0pt}fst{\isacharunderscore}{\kern0pt}simp{\isacharbrackleft}{\kern0pt}symmetric{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm{\isacharbrackleft}{\kern0pt}mode{\isacharequal}{\kern0pt}IfThen{\isacharbrackright}{\kern0pt}\ Posix{\isacharunderscore}{\kern0pt}simp{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}lemma{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}proof{\isacharbraceright}{\kern0pt}\ Both\ are\ by\ induction\ on\ {\isasymopen}r{\isasymclose}{\isachardot}{\kern0pt}\ There\ is\ no\ interesting\ case\ for\ the\ first\ statement{\isachardot}{\kern0pt}\ For\ the\ second\ statement{\isacharcomma}{\kern0pt}\ of\ interest\ are\ the\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}r\ {\isacharequal}{\kern0pt}\ ALT\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ and\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}r\ {\isacharequal}{\kern0pt}\ SEQ\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ cases{\isachardot}{\kern0pt}\ In\ each\ case\ we\ have\ to\ analyse\ four\ subcases\ whether\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ and\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ equals\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}const\ ZERO{\isacharbraceright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}respectively\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}const\ ONE{\isacharbraceright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isachardot}{\kern0pt}\ For\ example\ for\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}r\ {\isacharequal}{\kern0pt}\ ALT\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharcomma}{\kern0pt}\ consider\ the\ subcase\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ ZERO{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ and\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymnoteq}\ ZERO{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ By\ assumption\ we\ know\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ fst\ {\isacharparenleft}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}ALT\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ From\ this\ we\ can\ infer\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ and\ by\ IH\ also\ {\isacharparenleft}{\kern0pt}{\isacharasterisk}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ r\isactrlsub {\isadigit{2}}\ {\isasymrightarrow}\ {\isacharparenleft}{\kern0pt}snd\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ v{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ Given\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ ZERO{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ we\ know\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}L\ {\isacharparenleft}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbraceleft}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ By\ the\ first\ statement\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}L\ r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ is\ the\ empty\ set{\isacharcomma}{\kern0pt}\ meaning\ {\isacharparenleft}{\kern0pt}{\isacharasterisk}{\kern0pt}{\isacharasterisk}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymnotin}\ L\ r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ Taking\ {\isacharparenleft}{\kern0pt}{\isacharasterisk}{\kern0pt}{\isacharparenright}{\kern0pt}\ and\ {\isacharparenleft}{\kern0pt}{\isacharasterisk}{\kern0pt}{\isacharasterisk}{\kern0pt}{\isacharparenright}{\kern0pt}\ together\ gives\ by\ the\ {\isacharbackslash}{\kern0pt}mbox{\isacharbraceleft}{\kern0pt}{\isasymopen}P{\isacharplus}{\kern0pt}R{\isasymclose}{\isacharbraceright}{\kern0pt}{\isacharminus}{\kern0pt}rule\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ ALT\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}\ {\isasymrightarrow}\ Right\ {\isacharparenleft}{\kern0pt}snd\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ v{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ In\ turn\ this\ gives\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ ALT\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}\ {\isasymrightarrow}\ snd\ {\isacharparenleft}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}ALT\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ as\ we\ need\ to\ show{\isachardot}{\kern0pt}\ The\ other\ cases\ are\ similar{\isachardot}{\kern0pt}{\isacharbackslash}{\kern0pt}qed\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}proof{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}noindent\ We\ can\ now\ prove\ relatively\ straightforwardly\ that\ the\ optimised\ lexer\ produces\ the\ expected\ result{\isacharcolon}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}theorem{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ slexer{\isacharunderscore}{\kern0pt}correctness{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}theorem{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}proof{\isacharbraceright}{\kern0pt}\ By\ induction\ on\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ s{\isacharbraceright}{\kern0pt}\ generalising\ over\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ r{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ The\ case\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ is\ trivial{\isachardot}{\kern0pt}\ For\ the\ cons{\isacharminus}{\kern0pt}case\ suppose\ the\ string\ is\ of\ the\ form\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}c\ {\isacharhash}{\kern0pt}\ s{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ By\ induction\ hypothesis\ we\ know\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}slexer\ r\ s\ {\isacharequal}{\kern0pt}\ lexer\ r\ s{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ holds\ for\ all\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ r{\isacharbraceright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}in\ particular\ for\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ being\ the\ derivative\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}der\ c\ r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isachardot}{\kern0pt}\ Let\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}r\isactrlsub s{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ be\ the\ simplified\ derivative\ regular\ expression{\isacharcomma}{\kern0pt}\ that\ is\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}der\ c\ r{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharcomma}{\kern0pt}\ and\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}f\isactrlsub r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ be\ the\ rectification\ function{\isacharcomma}{\kern0pt}\ that\ is\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}snd\ {\isacharparenleft}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}der\ c\ r{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ \ We\ distinguish\ the\ cases\ whether\ {\isacharparenleft}{\kern0pt}{\isacharasterisk}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ L\ {\isacharparenleft}{\kern0pt}der\ c\ r{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ or\ not{\isachardot}{\kern0pt}\ In\ the\ first\ case\ we\ have\ by\ Theorem{\isachartilde}{\kern0pt}{\isacharbackslash}{\kern0pt}ref{\isacharbraceleft}{\kern0pt}lexercorrect{\isacharbraceright}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}\ a\ value\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ so\ that\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}lexer\ {\isacharparenleft}{\kern0pt}der\ c\ r{\isacharparenright}{\kern0pt}\ s\ {\isacharequal}{\kern0pt}\ Some\ v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ and\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ der\ c\ r\ {\isasymrightarrow}\ v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ hold{\isachardot}{\kern0pt}\ By\ Lemma{\isachartilde}{\kern0pt}{\isacharbackslash}{\kern0pt}ref{\isacharbraceleft}{\kern0pt}slexeraux{\isacharbraceright}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}\ we\ can\ also\ infer\ from{\isachartilde}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isacharasterisk}{\kern0pt}{\isacharparenright}{\kern0pt}\ that\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ L\ r\isactrlsub s{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ holds{\isachardot}{\kern0pt}\ \ Hence\ we\ know\ by\ Theorem{\isachartilde}{\kern0pt}{\isacharbackslash}{\kern0pt}ref{\isacharbraceleft}{\kern0pt}lexercorrect{\isacharbraceright}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}\ that\ there\ exists\ a\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}v{\isacharprime}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ with\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}lexer\ r\isactrlsub s\ s\ {\isacharequal}{\kern0pt}\ Some\ v{\isacharprime}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ and\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ r\isactrlsub s\ {\isasymrightarrow}\ v{\isacharprime}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ From\ the\ latter\ we\ know\ by\ Lemma{\isachartilde}{\kern0pt}{\isacharbackslash}{\kern0pt}ref{\isacharbraceleft}{\kern0pt}slexeraux{\isacharbraceright}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}\ that\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ der\ c\ r\ {\isasymrightarrow}\ {\isacharparenleft}{\kern0pt}f\isactrlsub r\ v{\isacharprime}{\kern0pt}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ holds{\isachardot}{\kern0pt}\ By\ the\ uniqueness\ of\ the\ POSIX\ relation\ {\isacharparenleft}{\kern0pt}Theorem{\isachartilde}{\kern0pt}{\isacharbackslash}{\kern0pt}ref{\isacharbraceleft}{\kern0pt}posixdeterm{\isacharbraceright}{\kern0pt}{\isacharparenright}{\kern0pt}\ we\ can\ infer\ that\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ v{\isacharbraceright}{\kern0pt}\ is\ equal\ to\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}f\isactrlsub r\ v{\isacharprime}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharminus}{\kern0pt}{\isacharminus}{\kern0pt}{\isacharminus}{\kern0pt}that\ is\ the\ rectification\ function\ applied\ to\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}v{\isacharprime}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ produces\ the\ original\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ \ Now\ the\ case\ follows\ by\ the\ definitions\ of\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}const\ lexer{\isacharbraceright}{\kern0pt}\ and\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}const\ slexer{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ \ In\ the\ second\ case\ where\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymnotin}\ L\ {\isacharparenleft}{\kern0pt}der\ c\ r{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ we\ have\ that\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}lexer\ {\isacharparenleft}{\kern0pt}der\ c\ r{\isacharparenright}{\kern0pt}\ s\ {\isacharequal}{\kern0pt}\ None{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ by\ Theorem{\isachartilde}{\kern0pt}{\isacharbackslash}{\kern0pt}ref{\isacharbraceleft}{\kern0pt}lexercorrect{\isacharbraceright}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isachardot}{\kern0pt}\ \ We\ also\ know\ by\ Lemma{\isachartilde}{\kern0pt}{\isacharbackslash}{\kern0pt}ref{\isacharbraceleft}{\kern0pt}slexeraux{\isacharbraceright}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}\ that\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymnotin}\ L\ r\isactrlsub s{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ Hence\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}lexer\ r\isactrlsub s\ s\ {\isacharequal}{\kern0pt}\ None{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ by\ Theorem{\isachartilde}{\kern0pt}{\isacharbackslash}{\kern0pt}ref{\isacharbraceleft}{\kern0pt}lexercorrect{\isacharbraceright}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}\ and\ by\ IH\ then\ also\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}slexer\ r\isactrlsub s\ s\ {\isacharequal}{\kern0pt}\ None{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ With\ this\ we\ can\ conclude\ in\ this\ case\ too{\isachardot}{\kern0pt}{\isacharbackslash}{\kern0pt}qed\ \ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}proof{\isacharbraceright}{\kern0pt}\ \ }
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1550
fy the result. This gives us a simplified derivative
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1551
  \isa{r\isactrlsub s} and a rectification function \isa{f\isactrlsub r}. The lexer
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1552
  is then recursively called with the simplified derivative, but before
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1553
  we inject the character \isa{c} into the value \isa{v}, we need to rectify
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1554
  \isa{v} (that is construct \isa{f\isactrlsub r\ v}). Before we can establish the correctness
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1555
  of \isa{lexer\isactrlsup {\isacharplus}{\kern0pt}}, we need to show that simplification preserves the language
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1556
  and simplification preserves our POSIX relation once the value is rectified
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1557
  (recall \isa{simp} generates a (regular expression, rectification function) pair):
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1558
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1559
  \begin{lemma}\mbox{}\smallskip\\\label{slexeraux}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1560
  \begin{tabular}{ll}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1561
  (1) & \isa{L{\isacharparenleft}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ r{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1562
  (2) & \isa{{\normalsize{}If\,}\ {\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ fst\ {\isacharparenleft}{\kern0pt}simp\ r{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\ {\normalsize \,then\,}\ {\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ snd\ {\isacharparenleft}{\kern0pt}simp\ r{\isacharparenright}{\kern0pt}\ v{\isachardot}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1563
  \end{tabular}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1564
  \end{lemma}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1565
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1566
  \begin{proof} Both are by induction on \isa{r}. There is no
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1567
  interesting case for the first statement. For the second statement,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1568
  of interest are the \isa{r\ {\isacharequal}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}} and \isa{r\ {\isacharequal}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}} cases. In each case we have to analyse four subcases whether
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1569
  \isa{fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}} and \isa{fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} equals \isa{\isactrlbold {\isadigit{0}}} (respectively \isa{\isactrlbold {\isadigit{1}}}). For example for \isa{r\ {\isacharequal}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}}, consider the subcase \isa{fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ \isactrlbold {\isadigit{0}}} and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1570
  \isa{fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymnoteq}\ \isactrlbold {\isadigit{0}}}. By assumption we know \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ fst\ {\isacharparenleft}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}. From this we can infer \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1571
  and by IH also (*) \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ snd\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ v}. Given \isa{fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ \isactrlbold {\isadigit{0}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1572
  we know \isa{L{\isacharparenleft}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isasymemptyset}}. By the first statement
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1573
  \isa{L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}} is the empty set, meaning (**) \isa{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1574
  Taking (*) and (**) together gives by the \mbox{\isa{P{\isacharplus}{\kern0pt}R}}-rule 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1575
  \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Right\ {\isacharparenleft}{\kern0pt}snd\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ v{\isacharparenright}{\kern0pt}}. In turn this
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1576
  gives \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ snd\ {\isacharparenleft}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ v} as we need to show.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1577
  The other cases are similar.\qed
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1578
  \end{proof}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1579
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1580
  \noindent We can now prove relatively straightforwardly that the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1581
  optimised lexer produces the expected result:
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1582
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1583
  \begin{theorem}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1584
  \isa{lexer\isactrlsup {\isacharplus}{\kern0pt}\ r\ s\ {\isacharequal}{\kern0pt}\ lexer\ r\ s}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1585
  \end{theorem}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1586
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1587
  \begin{proof} By induction on \isa{s} generalising over \isa{r}. The case \isa{{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} is trivial. For the cons-case suppose the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1588
  string is of the form \isa{c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s}. By induction hypothesis we
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1589
  know \isa{lexer\isactrlsup {\isacharplus}{\kern0pt}\ r\ s\ {\isacharequal}{\kern0pt}\ lexer\ r\ s} holds for all \isa{r} (in
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1590
  particular for \isa{r} being the derivative \isa{r{\isacharbackslash}{\kern0pt}c}). Let \isa{r\isactrlsub s} be the simplified derivative regular expression, that is \isa{fst\ {\isacharparenleft}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}}, and \isa{f\isactrlsub r} be the rectification
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1591
  function, that is \isa{snd\ {\isacharparenleft}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}}.  We distinguish the cases
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1592
  whether (*) \isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}} or not. In the first case we
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1593
  have by Theorem~\ref{lexercorrect}(2) a value \isa{v} so that \isa{lexer\ {\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ s\ {\isacharequal}{\kern0pt}\ Some\ v} and \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v} hold.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1594
  By Lemma~\ref{slexeraux}(1) we can also infer from~(*) that \isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub s{\isacharparenright}{\kern0pt}} holds.  Hence we know by Theorem~\ref{lexercorrect}(2) that
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1595
  there exists a \isa{v{\isacharprime}{\kern0pt}} with \isa{lexer\ r\isactrlsub s\ s\ {\isacharequal}{\kern0pt}\ Some\ v{\isacharprime}{\kern0pt}} and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1596
  \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub s{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v{\isacharprime}{\kern0pt}}. From the latter we know by
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1597
  Lemma~\ref{slexeraux}(2) that \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ f\isactrlsub r\ v{\isacharprime}{\kern0pt}} holds.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1598
  By the uniqueness of the POSIX relation (Theorem~\ref{posixdeterm}) we
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1599
  can infer that \isa{v} is equal to \isa{f\isactrlsub r\ v{\isacharprime}{\kern0pt}}---that is the 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1600
  rectification function applied to \isa{v{\isacharprime}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1601
  produces the original \isa{v}.  Now the case follows by the
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1602
  definitions of \isa{lexer} and \isa{lexer\isactrlsup {\isacharplus}{\kern0pt}}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1603
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1604
  In the second case where \isa{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}} we have that
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1605
  \isa{lexer\ {\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ s\ {\isacharequal}{\kern0pt}\ None} by Theorem~\ref{lexercorrect}(1).  We
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1606
  also know by Lemma~\ref{slexeraux}(1) that \isa{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub s{\isacharparenright}{\kern0pt}}. Hence
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1607
  \isa{lexer\ r\isactrlsub s\ s\ {\isacharequal}{\kern0pt}\ None} by Theorem~\ref{lexercorrect}(1) and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1608
  by IH then also \isa{lexer\isactrlsup {\isacharplus}{\kern0pt}\ r\isactrlsub s\ s\ {\isacharequal}{\kern0pt}\ None}. With this we can
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1609
  conclude in this case too.\qed   
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1610
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1611
  \end{proof}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1612
\end{isamarkuptext}\isamarkuptrue%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1613
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1614
\isadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1615
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1616
\endisadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1617
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1618
\isatagdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1619
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1620
\isamarkupsection{HERE%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1621
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1622
\isamarkuptrue%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1623
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1624
\endisatagdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1625
{\isafolddocument}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1626
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1627
\isadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1628
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1629
\endisadelimdocument
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1630
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1631
\begin{isamarkuptext}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1632
\begin{lemma}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1633
  \isa{{\normalsize{}If\,}\ v\ {\isacharcolon}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c\ {\normalsize \,then\,}\ retrieve\ {\isacharparenleft}{\kern0pt}r\mbox{$\bbslash$}c{\isacharparenright}{\kern0pt}\ v\ {\isacharequal}{\kern0pt}\ retrieve\ r\ {\isacharparenleft}{\kern0pt}inj\ {\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}\ c\ v{\isacharparenright}{\kern0pt}{\isachardot}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1634
  \end{lemma}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1635
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1636
  \begin{proof}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1637
  By induction on the definition of \isa{r\mbox{$^\downarrow$}}. The cases for rule 1) and 2) are
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1638
  straightforward as \isa{\isactrlbold {\isadigit{0}}{\isacharbackslash}{\kern0pt}c} and \isa{\isactrlbold {\isadigit{1}}{\isacharbackslash}{\kern0pt}c} are both equal to 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1639
  \isa{\isactrlbold {\isadigit{0}}}. This means \isa{v\ {\isacharcolon}{\kern0pt}\ \isactrlbold {\isadigit{0}}} cannot hold. Similarly in case of rule 3)
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1640
  where \isa{r} is of the form \isa{ACHAR\ d} with \isa{c\ {\isacharequal}{\kern0pt}\ d}. Then by assumption
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1641
  we know \isa{v\ {\isacharcolon}{\kern0pt}\ \isactrlbold {\isadigit{1}}}, which implies \isa{v\ {\isacharequal}{\kern0pt}\ Empty}. The equation follows by 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1642
  simplification of left- and right-hand side. In  case \isa{c\ {\isasymnoteq}\ d} we have again
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1643
  \isa{v\ {\isacharcolon}{\kern0pt}\ \isactrlbold {\isadigit{0}}}, which cannot  hold. 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1644
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1645
  For rule 4a) we have again \isa{v\ {\isacharcolon}{\kern0pt}\ \isactrlbold {\isadigit{0}}}. The property holds by IH for rule 4b).
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1646
  The  induction hypothesis is 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1647
  \[
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1648
  \isa{retrieve\ {\isacharparenleft}{\kern0pt}r\mbox{$\bbslash$}c{\isacharparenright}{\kern0pt}\ v\ {\isacharequal}{\kern0pt}\ retrieve\ r\ {\isacharparenleft}{\kern0pt}inj\ {\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}\ c\ v{\isacharparenright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1649
  \]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1650
  which is what left- and right-hand side simplify to.  The slightly more interesting case
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1651
  is for 4c). By assumption  we have 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1652
  \isa{v\ {\isacharcolon}{\kern0pt}\ {\isacharparenleft}{\kern0pt}{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isacharplus}{\kern0pt}\ {\isacharparenleft}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isacharparenleft}{\kern0pt}AALTs\ bs\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}rs{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}}. This means we 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1653
  have either (*) \isa{v{\isadigit{1}}\ {\isacharcolon}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c} with \isa{v\ {\isacharequal}{\kern0pt}\ Left\ v{\isadigit{1}}} or
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1654
  (**) \isa{v{\isadigit{2}}\ {\isacharcolon}{\kern0pt}\ {\isacharparenleft}{\kern0pt}{\isacharparenleft}{\kern0pt}AALTs\ bs\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}rs{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c} with \isa{v\ {\isacharequal}{\kern0pt}\ Right\ v{\isadigit{2}}}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1655
  The former  case is straightforward by simplification. The second case is \ldots TBD.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1656
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1657
  Rule 5) TBD.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1658
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1659
  Finally for rule 6) the reasoning is as follows:   By assumption we  have
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1660
  \isa{v\ {\isacharcolon}{\kern0pt}\ {\isacharparenleft}{\kern0pt}{\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ {\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}\isactrlsup {\isasymstar}}. This means we also have
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1661
  \isa{v\ {\isacharequal}{\kern0pt}\ Seq\ v{\isadigit{1}}\ v{\isadigit{2}}}, \isa{v{\isadigit{1}}\ {\isacharcolon}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c}  and \isa{v{\isadigit{2}}\ {\isacharequal}{\kern0pt}\ Stars\ vs}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1662
  We want to prove
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1663
  \begin{align}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1664
  & \isa{retrieve\ {\isacharparenleft}{\kern0pt}ASEQ\ bs\ {\isacharparenleft}{\kern0pt}fuse\ {\isacharbrackleft}{\kern0pt}Z{\isacharbrackright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\mbox{$\bbslash$}c{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}ASTAR\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ r{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ v}\\
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1665
  &= \isa{retrieve\ {\isacharparenleft}{\kern0pt}ASTAR\ bs\ r{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}inj\ {\isacharparenleft}{\kern0pt}{\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}\ c\ v{\isacharparenright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1666
  \end{align}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1667
  The right-hand side \isa{inj}-expression is equal to 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1668
  \isa{Stars\ {\isacharparenleft}{\kern0pt}inj\ {\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}\ c\ v{\isadigit{1}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vs{\isacharparenright}{\kern0pt}}, which means the \isa{retrieve}-expression
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1669
  simplifies to 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1670
  \[
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1671
  \isa{bs\ {\isacharat}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}Z{\isacharbrackright}{\kern0pt}\ {\isacharat}{\kern0pt}\ retrieve\ r\ {\isacharparenleft}{\kern0pt}inj\ {\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}\ c\ v{\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharat}{\kern0pt}\ retrieve\ {\isacharparenleft}{\kern0pt}ASTAR\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}Stars\ vs{\isacharparenright}{\kern0pt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1672
  \]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1673
  The left-hand side (3) above simplifies to 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1674
  \[
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1675
  \isa{bs\ {\isacharat}{\kern0pt}\ retrieve\ {\isacharparenleft}{\kern0pt}fuse\ {\isacharbrackleft}{\kern0pt}Z{\isacharbrackright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\mbox{$\bbslash$}c{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ v{\isadigit{1}}\ {\isacharat}{\kern0pt}\ retrieve\ {\isacharparenleft}{\kern0pt}ASTAR\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}Stars\ vs{\isacharparenright}{\kern0pt}} 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1676
  \]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1677
  We can move out the \isa{fuse\ {\isacharbrackleft}{\kern0pt}Z{\isacharbrackright}{\kern0pt}} and then use the IH to show that left-hand side
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1678
  and right-hand side are equal. This completes the proof. 
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1679
  \end{proof}   
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1680
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1681
   
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1682
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1683
  \bibliographystyle{plain}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1684
  \bibliography{root}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1685
\end{isamarkuptext}\isamarkuptrue%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1686
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1687
\isadelimtheory
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1688
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1689
\endisadelimtheory
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1690
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1691
\isatagtheory
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1692
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1693
\endisatagtheory
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1694
{\isafoldtheory}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1695
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1696
\isadelimtheory
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1697
\isanewline
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1698
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1699
\endisadelimtheory
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1700
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1701
\end{isabellebody}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1702
\endinput
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1703
%:%file=~/Dropbox/Workspace/journalpaper/lexing/thys2/Journal/Paper.thy%:%
371
Chengsong
parents: 369
diff changeset
  1704
%:%50=134%:%
Chengsong
parents: 369
diff changeset
  1705
%:%62=136%:%
Chengsong
parents: 369
diff changeset
  1706
%:%63=137%:%
Chengsong
parents: 369
diff changeset
  1707
%:%64=138%:%
Chengsong
parents: 369
diff changeset
  1708
%:%65=139%:%
Chengsong
parents: 369
diff changeset
  1709
%:%66=140%:%
Chengsong
parents: 369
diff changeset
  1710
%:%67=141%:%
Chengsong
parents: 369
diff changeset
  1711
%:%68=142%:%
Chengsong
parents: 369
diff changeset
  1712
%:%69=143%:%
Chengsong
parents: 369
diff changeset
  1713
%:%70=144%:%
Chengsong
parents: 369
diff changeset
  1714
%:%71=145%:%
Chengsong
parents: 369
diff changeset
  1715
%:%72=146%:%
Chengsong
parents: 369
diff changeset
  1716
%:%73=147%:%
Chengsong
parents: 369
diff changeset
  1717
%:%74=148%:%
Chengsong
parents: 369
diff changeset
  1718
%:%75=149%:%
Chengsong
parents: 369
diff changeset
  1719
%:%76=150%:%
Chengsong
parents: 369
diff changeset
  1720
%:%77=151%:%
Chengsong
parents: 369
diff changeset
  1721
%:%78=152%:%
Chengsong
parents: 369
diff changeset
  1722
%:%79=153%:%
Chengsong
parents: 369
diff changeset
  1723
%:%80=154%:%
Chengsong
parents: 369
diff changeset
  1724
%:%81=155%:%
Chengsong
parents: 369
diff changeset
  1725
%:%82=156%:%
Chengsong
parents: 369
diff changeset
  1726
%:%83=157%:%
Chengsong
parents: 369
diff changeset
  1727
%:%84=158%:%
Chengsong
parents: 369
diff changeset
  1728
%:%85=159%:%
Chengsong
parents: 369
diff changeset
  1729
%:%86=160%:%
Chengsong
parents: 369
diff changeset
  1730
%:%87=161%:%
Chengsong
parents: 369
diff changeset
  1731
%:%88=162%:%
Chengsong
parents: 369
diff changeset
  1732
%:%89=163%:%
Chengsong
parents: 369
diff changeset
  1733
%:%90=164%:%
Chengsong
parents: 369
diff changeset
  1734
%:%91=165%:%
Chengsong
parents: 369
diff changeset
  1735
%:%92=166%:%
Chengsong
parents: 369
diff changeset
  1736
%:%93=167%:%
Chengsong
parents: 369
diff changeset
  1737
%:%94=168%:%
Chengsong
parents: 369
diff changeset
  1738
%:%95=169%:%
Chengsong
parents: 369
diff changeset
  1739
%:%96=170%:%
Chengsong
parents: 369
diff changeset
  1740
%:%97=171%:%
Chengsong
parents: 369
diff changeset
  1741
%:%98=172%:%
Chengsong
parents: 369
diff changeset
  1742
%:%99=173%:%
Chengsong
parents: 369
diff changeset
  1743
%:%100=174%:%
Chengsong
parents: 369
diff changeset
  1744
%:%101=175%:%
Chengsong
parents: 369
diff changeset
  1745
%:%102=176%:%
Chengsong
parents: 369
diff changeset
  1746
%:%103=177%:%
Chengsong
parents: 369
diff changeset
  1747
%:%104=178%:%
Chengsong
parents: 369
diff changeset
  1748
%:%105=179%:%
Chengsong
parents: 369
diff changeset
  1749
%:%106=180%:%
Chengsong
parents: 369
diff changeset
  1750
%:%107=181%:%
Chengsong
parents: 369
diff changeset
  1751
%:%108=182%:%
Chengsong
parents: 369
diff changeset
  1752
%:%109=183%:%
Chengsong
parents: 369
diff changeset
  1753
%:%110=184%:%
Chengsong
parents: 369
diff changeset
  1754
%:%111=185%:%
Chengsong
parents: 369
diff changeset
  1755
%:%112=186%:%
Chengsong
parents: 369
diff changeset
  1756
%:%113=187%:%
Chengsong
parents: 369
diff changeset
  1757
%:%114=188%:%
Chengsong
parents: 369
diff changeset
  1758
%:%115=189%:%
Chengsong
parents: 369
diff changeset
  1759
%:%116=190%:%
Chengsong
parents: 369
diff changeset
  1760
%:%117=191%:%
Chengsong
parents: 369
diff changeset
  1761
%:%118=192%:%
Chengsong
parents: 369
diff changeset
  1762
%:%119=193%:%
Chengsong
parents: 369
diff changeset
  1763
%:%120=194%:%
Chengsong
parents: 369
diff changeset
  1764
%:%121=195%:%
Chengsong
parents: 369
diff changeset
  1765
%:%122=196%:%
Chengsong
parents: 369
diff changeset
  1766
%:%123=197%:%
Chengsong
parents: 369
diff changeset
  1767
%:%124=198%:%
Chengsong
parents: 369
diff changeset
  1768
%:%125=199%:%
Chengsong
parents: 369
diff changeset
  1769
%:%126=200%:%
Chengsong
parents: 369
diff changeset
  1770
%:%127=201%:%
Chengsong
parents: 369
diff changeset
  1771
%:%128=202%:%
Chengsong
parents: 369
diff changeset
  1772
%:%129=203%:%
Chengsong
parents: 369
diff changeset
  1773
%:%130=204%:%
Chengsong
parents: 369
diff changeset
  1774
%:%131=205%:%
Chengsong
parents: 369
diff changeset
  1775
%:%132=206%:%
Chengsong
parents: 369
diff changeset
  1776
%:%133=207%:%
Chengsong
parents: 369
diff changeset
  1777
%:%134=208%:%
Chengsong
parents: 369
diff changeset
  1778
%:%135=209%:%
Chengsong
parents: 369
diff changeset
  1779
%:%136=210%:%
Chengsong
parents: 369
diff changeset
  1780
%:%137=211%:%
Chengsong
parents: 369
diff changeset
  1781
%:%138=212%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1782
%:%139=213%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1783
%:%140=214%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1784
%:%141=215%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1785
%:%142=216%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1786
%:%143=217%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1787
%:%144=218%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1788
%:%145=219%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1789
%:%146=220%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1790
%:%147=221%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1791
%:%148=222%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1792
%:%149=223%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1793
%:%150=224%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1794
%:%151=225%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1795
%:%152=226%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1796
%:%153=227%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1797
%:%154=228%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1798
%:%155=229%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1799
%:%156=230%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1800
%:%157=231%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1801
%:%158=232%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1802
%:%159=233%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1803
%:%160=234%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1804
%:%161=235%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1805
%:%162=236%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1806
%:%163=237%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1807
%:%164=238%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1808
%:%165=239%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1809
%:%166=240%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1810
%:%167=241%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1811
%:%168=242%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1812
%:%169=243%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1813
%:%170=244%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1814
%:%171=245%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1815
%:%172=246%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1816
%:%181=251%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1817
%:%193=257%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1818
%:%194=258%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1819
%:%195=259%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1820
%:%196=260%:%
371
Chengsong
parents: 369
diff changeset
  1821
%:%196=261%:%
Chengsong
parents: 369
diff changeset
  1822
%:%197=262%:%
Chengsong
parents: 369
diff changeset
  1823
%:%198=263%:%
Chengsong
parents: 369
diff changeset
  1824
%:%199=264%:%
Chengsong
parents: 369
diff changeset
  1825
%:%200=265%:%
Chengsong
parents: 369
diff changeset
  1826
%:%201=266%:%
Chengsong
parents: 369
diff changeset
  1827
%:%202=267%:%
Chengsong
parents: 369
diff changeset
  1828
%:%203=268%:%
Chengsong
parents: 369
diff changeset
  1829
%:%204=269%:%
Chengsong
parents: 369
diff changeset
  1830
%:%205=270%:%
Chengsong
parents: 369
diff changeset
  1831
%:%206=271%:%
Chengsong
parents: 369
diff changeset
  1832
%:%207=272%:%
Chengsong
parents: 369
diff changeset
  1833
%:%208=273%:%
Chengsong
parents: 369
diff changeset
  1834
%:%209=274%:%
Chengsong
parents: 369
diff changeset
  1835
%:%210=275%:%
Chengsong
parents: 369
diff changeset
  1836
%:%211=276%:%
Chengsong
parents: 369
diff changeset
  1837
%:%212=277%:%
Chengsong
parents: 369
diff changeset
  1838
%:%213=278%:%
Chengsong
parents: 369
diff changeset
  1839
%:%214=279%:%
Chengsong
parents: 369
diff changeset
  1840
%:%215=280%:%
Chengsong
parents: 369
diff changeset
  1841
%:%216=281%:%
Chengsong
parents: 369
diff changeset
  1842
%:%217=282%:%
Chengsong
parents: 369
diff changeset
  1843
%:%218=283%:%
Chengsong
parents: 369
diff changeset
  1844
%:%219=284%:%
Chengsong
parents: 369
diff changeset
  1845
%:%220=285%:%
Chengsong
parents: 369
diff changeset
  1846
%:%221=286%:%
Chengsong
parents: 369
diff changeset
  1847
%:%222=287%:%
Chengsong
parents: 369
diff changeset
  1848
%:%223=288%:%
Chengsong
parents: 369
diff changeset
  1849
%:%224=289%:%
Chengsong
parents: 369
diff changeset
  1850
%:%225=290%:%
Chengsong
parents: 369
diff changeset
  1851
%:%226=291%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1852
%:%227=292%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1853
%:%228=293%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1854
%:%229=294%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1855
%:%230=295%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1856
%:%231=296%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1857
%:%232=297%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1858
%:%233=298%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1859
%:%234=299%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1860
%:%235=300%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1861
%:%236=301%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1862
%:%237=302%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1863
%:%238=303%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1864
%:%239=304%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1865
%:%240=305%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1866
%:%241=306%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1867
%:%242=307%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1868
%:%243=308%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1869
%:%244=309%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1870
%:%245=310%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1871
%:%246=311%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1872
%:%247=312%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1873
%:%248=313%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1874
%:%249=314%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1875
%:%250=315%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1876
%:%251=316%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1877
%:%252=317%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1878
%:%253=318%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1879
%:%254=319%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1880
%:%255=320%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1881
%:%256=321%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1882
%:%257=322%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1883
%:%258=323%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1884
%:%259=324%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1885
%:%260=325%:%
371
Chengsong
parents: 369
diff changeset
  1886
%:%260=326%:%
Chengsong
parents: 369
diff changeset
  1887
%:%261=327%:%
Chengsong
parents: 369
diff changeset
  1888
%:%262=328%:%
Chengsong
parents: 369
diff changeset
  1889
%:%263=329%:%
Chengsong
parents: 369
diff changeset
  1890
%:%264=330%:%
Chengsong
parents: 369
diff changeset
  1891
%:%265=331%:%
Chengsong
parents: 369
diff changeset
  1892
%:%266=332%:%
Chengsong
parents: 369
diff changeset
  1893
%:%267=333%:%
Chengsong
parents: 369
diff changeset
  1894
%:%268=334%:%
Chengsong
parents: 369
diff changeset
  1895
%:%269=335%:%
Chengsong
parents: 369
diff changeset
  1896
%:%270=336%:%
369
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1897
%:%271=337%:%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1898
%:%272=338%:%
371
Chengsong
parents: 369
diff changeset
  1899
%:%273=339%:%
Chengsong
parents: 369
diff changeset
  1900
%:%274=340%:%
Chengsong
parents: 369
diff changeset
  1901
%:%275=341%:%
Chengsong
parents: 369
diff changeset
  1902
%:%276=342%:%
Chengsong
parents: 369
diff changeset
  1903
%:%277=343%:%
Chengsong
parents: 369
diff changeset
  1904
%:%278=344%:%
Chengsong
parents: 369
diff changeset
  1905
%:%279=345%:%
Chengsong
parents: 369
diff changeset
  1906
%:%280=346%:%
Chengsong
parents: 369
diff changeset
  1907
%:%281=347%:%
Chengsong
parents: 369
diff changeset
  1908
%:%282=348%:%
Chengsong
parents: 369
diff changeset
  1909
%:%283=349%:%
Chengsong
parents: 369
diff changeset
  1910
%:%284=350%:%
Chengsong
parents: 369
diff changeset
  1911
%:%285=351%:%
Chengsong
parents: 369
diff changeset
  1912
%:%286=352%:%
Chengsong
parents: 369
diff changeset
  1913
%:%287=353%:%
Chengsong
parents: 369
diff changeset
  1914
%:%288=354%:%
Chengsong
parents: 369
diff changeset
  1915
%:%289=355%:%
Chengsong
parents: 369
diff changeset
  1916
%:%290=356%:%
Chengsong
parents: 369
diff changeset
  1917
%:%291=357%:%
Chengsong
parents: 369
diff changeset
  1918
%:%292=358%:%
Chengsong
parents: 369
diff changeset
  1919
%:%293=359%:%
Chengsong
parents: 369
diff changeset
  1920
%:%294=360%:%
Chengsong
parents: 369
diff changeset
  1921
%:%295=361%:%
Chengsong
parents: 369
diff changeset
  1922
%:%296=362%:%
Chengsong
parents: 369
diff changeset
  1923
%:%297=363%:%
Chengsong
parents: 369
diff changeset
  1924
%:%298=364%:%
Chengsong
parents: 369
diff changeset
  1925
%:%299=365%:%
Chengsong
parents: 369
diff changeset
  1926
%:%300=366%:%
Chengsong
parents: 369
diff changeset
  1927
%:%301=367%:%
Chengsong
parents: 369
diff changeset
  1928
%:%302=368%:%
Chengsong
parents: 369
diff changeset
  1929
%:%303=369%:%
Chengsong
parents: 369
diff changeset
  1930
%:%304=370%:%
Chengsong
parents: 369
diff changeset
  1931
%:%305=371%:%
Chengsong
parents: 369
diff changeset
  1932
%:%306=372%:%
Chengsong
parents: 369
diff changeset
  1933
%:%307=373%:%
Chengsong
parents: 369
diff changeset
  1934
%:%308=374%:%
Chengsong
parents: 369
diff changeset
  1935
%:%309=375%:%
Chengsong
parents: 369
diff changeset
  1936
%:%310=376%:%
Chengsong
parents: 369
diff changeset
  1937
%:%311=377%:%
Chengsong
parents: 369
diff changeset
  1938
%:%312=378%:%
Chengsong
parents: 369
diff changeset
  1939
%:%313=379%:%
Chengsong
parents: 369
diff changeset
  1940
%:%314=380%:%
Chengsong
parents: 369
diff changeset
  1941
%:%315=381%:%
Chengsong
parents: 369
diff changeset
  1942
%:%316=382%:%
Chengsong
parents: 369
diff changeset
  1943
%:%317=383%:%
Chengsong
parents: 369
diff changeset
  1944
%:%318=384%:%
Chengsong
parents: 369
diff changeset
  1945
%:%319=385%:%
Chengsong
parents: 369
diff changeset
  1946
%:%320=386%:%
Chengsong
parents: 369
diff changeset
  1947
%:%321=387%:%
Chengsong
parents: 369
diff changeset
  1948
%:%322=388%:%
Chengsong
parents: 369
diff changeset
  1949
%:%323=389%:%
Chengsong
parents: 369
diff changeset
  1950
%:%324=390%:%
Chengsong
parents: 369
diff changeset
  1951
%:%325=391%:%
Chengsong
parents: 369
diff changeset
  1952
%:%326=392%:%
Chengsong
parents: 369
diff changeset
  1953
%:%327=393%:%
Chengsong
parents: 369
diff changeset
  1954
%:%328=394%:%
Chengsong
parents: 369
diff changeset
  1955
%:%329=395%:%
Chengsong
parents: 369
diff changeset
  1956
%:%330=396%:%
Chengsong
parents: 369
diff changeset
  1957
%:%331=397%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1958
%:%332=398%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1959
%:%333=399%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1960
%:%334=400%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1961
%:%335=401%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1962
%:%336=402%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1963
%:%337=403%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1964
%:%338=404%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1965
%:%339=405%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1966
%:%340=406%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1967
%:%341=407%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1968
%:%342=408%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1969
%:%343=409%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1970
%:%344=410%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1971
%:%345=411%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1972
%:%346=412%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1973
%:%347=413%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1974
%:%348=414%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1975
%:%349=415%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1976
%:%350=416%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1977
%:%351=417%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1978
%:%352=418%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1979
%:%353=419%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1980
%:%354=420%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1981
%:%355=421%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1982
%:%356=422%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1983
%:%357=423%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1984
%:%358=424%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1985
%:%359=425%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1986
%:%360=426%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1987
%:%361=427%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1988
%:%362=428%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1989
%:%363=429%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1990
%:%364=430%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1991
%:%365=431%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1992
%:%374=438%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1993
%:%386=440%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  1994
%:%387=441%:%
371
Chengsong
parents: 369
diff changeset
  1995
%:%387=442%:%
Chengsong
parents: 369
diff changeset
  1996
%:%388=443%:%
Chengsong
parents: 369
diff changeset
  1997
%:%389=444%:%
Chengsong
parents: 369
diff changeset
  1998
%:%390=445%:%
Chengsong
parents: 369
diff changeset
  1999
%:%391=446%:%
Chengsong
parents: 369
diff changeset
  2000
%:%392=447%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2001
%:%393=448%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2002
%:%394=449%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2003
%:%395=450%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2004
%:%396=451%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2005
%:%397=452%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2006
%:%398=453%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2007
%:%399=454%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2008
%:%400=455%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2009
%:%401=456%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2010
%:%402=457%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2011
%:%403=458%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2012
%:%404=459%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2013
%:%405=460%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2014
%:%406=461%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2015
%:%407=462%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2016
%:%408=463%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2017
%:%409=464%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2018
%:%410=465%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2019
%:%411=466%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2020
%:%412=467%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2021
%:%413=468%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2022
%:%414=469%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2023
%:%415=470%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2024
%:%416=471%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2025
%:%417=472%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2026
%:%418=473%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2027
%:%419=474%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2028
%:%420=475%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2029
%:%421=476%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2030
%:%422=477%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2031
%:%423=478%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2032
%:%424=479%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2033
%:%425=480%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2034
%:%426=481%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2035
%:%426=482%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2036
%:%427=483%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2037
%:%428=484%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2038
%:%429=485%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2039
%:%430=486%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2040
%:%431=487%:%
371
Chengsong
parents: 369
diff changeset
  2041
%:%431=488%:%
Chengsong
parents: 369
diff changeset
  2042
%:%432=489%:%
Chengsong
parents: 369
diff changeset
  2043
%:%433=490%:%
Chengsong
parents: 369
diff changeset
  2044
%:%434=491%:%
Chengsong
parents: 369
diff changeset
  2045
%:%435=492%:%
Chengsong
parents: 369
diff changeset
  2046
%:%436=493%:%
Chengsong
parents: 369
diff changeset
  2047
%:%437=494%:%
Chengsong
parents: 369
diff changeset
  2048
%:%438=495%:%
Chengsong
parents: 369
diff changeset
  2049
%:%439=496%:%
Chengsong
parents: 369
diff changeset
  2050
%:%440=497%:%
Chengsong
parents: 369
diff changeset
  2051
%:%441=498%:%
Chengsong
parents: 369
diff changeset
  2052
%:%442=499%:%
Chengsong
parents: 369
diff changeset
  2053
%:%443=500%:%
Chengsong
parents: 369
diff changeset
  2054
%:%444=501%:%
Chengsong
parents: 369
diff changeset
  2055
%:%445=502%:%
Chengsong
parents: 369
diff changeset
  2056
%:%446=503%:%
Chengsong
parents: 369
diff changeset
  2057
%:%447=504%:%
Chengsong
parents: 369
diff changeset
  2058
%:%448=505%:%
Chengsong
parents: 369
diff changeset
  2059
%:%449=506%:%
Chengsong
parents: 369
diff changeset
  2060
%:%450=507%:%
Chengsong
parents: 369
diff changeset
  2061
%:%451=508%:%
Chengsong
parents: 369
diff changeset
  2062
%:%452=509%:%
Chengsong
parents: 369
diff changeset
  2063
%:%453=510%:%
Chengsong
parents: 369
diff changeset
  2064
%:%454=511%:%
Chengsong
parents: 369
diff changeset
  2065
%:%455=512%:%
Chengsong
parents: 369
diff changeset
  2066
%:%456=513%:%
Chengsong
parents: 369
diff changeset
  2067
%:%457=514%:%
Chengsong
parents: 369
diff changeset
  2068
%:%458=515%:%
Chengsong
parents: 369
diff changeset
  2069
%:%459=516%:%
Chengsong
parents: 369
diff changeset
  2070
%:%460=517%:%
Chengsong
parents: 369
diff changeset
  2071
%:%461=518%:%
Chengsong
parents: 369
diff changeset
  2072
%:%462=519%:%
Chengsong
parents: 369
diff changeset
  2073
%:%463=520%:%
Chengsong
parents: 369
diff changeset
  2074
%:%464=521%:%
Chengsong
parents: 369
diff changeset
  2075
%:%465=522%:%
Chengsong
parents: 369
diff changeset
  2076
%:%466=523%:%
Chengsong
parents: 369
diff changeset
  2077
%:%467=524%:%
Chengsong
parents: 369
diff changeset
  2078
%:%468=525%:%
Chengsong
parents: 369
diff changeset
  2079
%:%469=526%:%
Chengsong
parents: 369
diff changeset
  2080
%:%470=527%:%
Chengsong
parents: 369
diff changeset
  2081
%:%471=528%:%
Chengsong
parents: 369
diff changeset
  2082
%:%472=529%:%
Chengsong
parents: 369
diff changeset
  2083
%:%473=530%:%
Chengsong
parents: 369
diff changeset
  2084
%:%474=531%:%
Chengsong
parents: 369
diff changeset
  2085
%:%475=532%:%
Chengsong
parents: 369
diff changeset
  2086
%:%476=533%:%
Chengsong
parents: 369
diff changeset
  2087
%:%477=534%:%
Chengsong
parents: 369
diff changeset
  2088
%:%478=535%:%
Chengsong
parents: 369
diff changeset
  2089
%:%479=536%:%
Chengsong
parents: 369
diff changeset
  2090
%:%480=537%:%
Chengsong
parents: 369
diff changeset
  2091
%:%481=538%:%
Chengsong
parents: 369
diff changeset
  2092
%:%482=539%:%
Chengsong
parents: 369
diff changeset
  2093
%:%483=540%:%
Chengsong
parents: 369
diff changeset
  2094
%:%484=541%:%
Chengsong
parents: 369
diff changeset
  2095
%:%485=542%:%
Chengsong
parents: 369
diff changeset
  2096
%:%486=543%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2097
%:%487=544%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2098
%:%488=545%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2099
%:%489=546%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2100
%:%490=547%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2101
%:%491=548%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2102
%:%492=549%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2103
%:%493=550%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2104
%:%494=551%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2105
%:%495=552%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2106
%:%496=553%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2107
%:%497=554%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2108
%:%498=555%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2109
%:%499=556%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2110
%:%500=557%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2111
%:%501=558%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2112
%:%502=559%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2113
%:%503=560%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2114
%:%504=561%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2115
%:%505=562%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2116
%:%506=563%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2117
%:%507=564%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2118
%:%508=565%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2119
%:%509=566%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2120
%:%510=567%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2121
%:%511=568%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2122
%:%512=569%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2123
%:%513=570%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2124
%:%514=571%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2125
%:%515=572%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2126
%:%516=573%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2127
%:%517=574%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2128
%:%518=575%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2129
%:%519=576%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2130
%:%520=577%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2131
%:%529=581%:%
371
Chengsong
parents: 369
diff changeset
  2132
%:%541=585%:%
Chengsong
parents: 369
diff changeset
  2133
%:%542=586%:%
Chengsong
parents: 369
diff changeset
  2134
%:%543=587%:%
Chengsong
parents: 369
diff changeset
  2135
%:%544=588%:%
Chengsong
parents: 369
diff changeset
  2136
%:%545=589%:%
Chengsong
parents: 369
diff changeset
  2137
%:%546=590%:%
Chengsong
parents: 369
diff changeset
  2138
%:%547=591%:%
Chengsong
parents: 369
diff changeset
  2139
%:%548=592%:%
Chengsong
parents: 369
diff changeset
  2140
%:%549=593%:%
Chengsong
parents: 369
diff changeset
  2141
%:%550=594%:%
Chengsong
parents: 369
diff changeset
  2142
%:%551=595%:%
Chengsong
parents: 369
diff changeset
  2143
%:%552=596%:%
Chengsong
parents: 369
diff changeset
  2144
%:%553=597%:%
Chengsong
parents: 369
diff changeset
  2145
%:%554=598%:%
Chengsong
parents: 369
diff changeset
  2146
%:%555=599%:%
Chengsong
parents: 369
diff changeset
  2147
%:%556=600%:%
Chengsong
parents: 369
diff changeset
  2148
%:%557=601%:%
Chengsong
parents: 369
diff changeset
  2149
%:%558=602%:%
Chengsong
parents: 369
diff changeset
  2150
%:%559=603%:%
Chengsong
parents: 369
diff changeset
  2151
%:%560=604%:%
Chengsong
parents: 369
diff changeset
  2152
%:%561=605%:%
Chengsong
parents: 369
diff changeset
  2153
%:%562=606%:%
Chengsong
parents: 369
diff changeset
  2154
%:%563=607%:%
Chengsong
parents: 369
diff changeset
  2155
%:%564=608%:%
Chengsong
parents: 369
diff changeset
  2156
%:%565=609%:%
Chengsong
parents: 369
diff changeset
  2157
%:%566=610%:%
Chengsong
parents: 369
diff changeset
  2158
%:%567=611%:%
Chengsong
parents: 369
diff changeset
  2159
%:%568=612%:%
Chengsong
parents: 369
diff changeset
  2160
%:%569=613%:%
Chengsong
parents: 369
diff changeset
  2161
%:%570=614%:%
Chengsong
parents: 369
diff changeset
  2162
%:%571=615%:%
Chengsong
parents: 369
diff changeset
  2163
%:%572=616%:%
Chengsong
parents: 369
diff changeset
  2164
%:%573=617%:%
Chengsong
parents: 369
diff changeset
  2165
%:%574=618%:%
Chengsong
parents: 369
diff changeset
  2166
%:%575=619%:%
Chengsong
parents: 369
diff changeset
  2167
%:%576=620%:%
Chengsong
parents: 369
diff changeset
  2168
%:%577=621%:%
Chengsong
parents: 369
diff changeset
  2169
%:%578=622%:%
Chengsong
parents: 369
diff changeset
  2170
%:%579=623%:%
Chengsong
parents: 369
diff changeset
  2171
%:%580=624%:%
Chengsong
parents: 369
diff changeset
  2172
%:%581=625%:%
Chengsong
parents: 369
diff changeset
  2173
%:%582=626%:%
Chengsong
parents: 369
diff changeset
  2174
%:%583=627%:%
Chengsong
parents: 369
diff changeset
  2175
%:%584=628%:%
Chengsong
parents: 369
diff changeset
  2176
%:%585=629%:%
Chengsong
parents: 369
diff changeset
  2177
%:%586=630%:%
Chengsong
parents: 369
diff changeset
  2178
%:%587=631%:%
Chengsong
parents: 369
diff changeset
  2179
%:%588=632%:%
Chengsong
parents: 369
diff changeset
  2180
%:%589=633%:%
Chengsong
parents: 369
diff changeset
  2181
%:%590=634%:%
Chengsong
parents: 369
diff changeset
  2182
%:%591=635%:%
Chengsong
parents: 369
diff changeset
  2183
%:%592=636%:%
Chengsong
parents: 369
diff changeset
  2184
%:%593=637%:%
Chengsong
parents: 369
diff changeset
  2185
%:%594=638%:%
Chengsong
parents: 369
diff changeset
  2186
%:%595=639%:%
Chengsong
parents: 369
diff changeset
  2187
%:%596=640%:%
Chengsong
parents: 369
diff changeset
  2188
%:%597=641%:%
Chengsong
parents: 369
diff changeset
  2189
%:%598=642%:%
Chengsong
parents: 369
diff changeset
  2190
%:%599=643%:%
Chengsong
parents: 369
diff changeset
  2191
%:%600=644%:%
Chengsong
parents: 369
diff changeset
  2192
%:%601=645%:%
Chengsong
parents: 369
diff changeset
  2193
%:%602=646%:%
Chengsong
parents: 369
diff changeset
  2194
%:%603=647%:%
Chengsong
parents: 369
diff changeset
  2195
%:%604=648%:%
Chengsong
parents: 369
diff changeset
  2196
%:%605=649%:%
Chengsong
parents: 369
diff changeset
  2197
%:%606=650%:%
Chengsong
parents: 369
diff changeset
  2198
%:%607=651%:%
Chengsong
parents: 369
diff changeset
  2199
%:%608=652%:%
Chengsong
parents: 369
diff changeset
  2200
%:%609=653%:%
Chengsong
parents: 369
diff changeset
  2201
%:%610=654%:%
Chengsong
parents: 369
diff changeset
  2202
%:%611=655%:%
Chengsong
parents: 369
diff changeset
  2203
%:%612=656%:%
Chengsong
parents: 369
diff changeset
  2204
%:%613=657%:%
Chengsong
parents: 369
diff changeset
  2205
%:%614=658%:%
Chengsong
parents: 369
diff changeset
  2206
%:%615=659%:%
Chengsong
parents: 369
diff changeset
  2207
%:%616=660%:%
Chengsong
parents: 369
diff changeset
  2208
%:%617=661%:%
Chengsong
parents: 369
diff changeset
  2209
%:%618=662%:%
Chengsong
parents: 369
diff changeset
  2210
%:%619=663%:%
Chengsong
parents: 369
diff changeset
  2211
%:%620=664%:%
Chengsong
parents: 369
diff changeset
  2212
%:%621=665%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2213
%:%622=666%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2214
%:%623=667%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2215
%:%624=668%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2216
%:%625=669%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2217
%:%626=670%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2218
%:%627=671%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2219
%:%628=672%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2220
%:%629=673%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2221
%:%630=674%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2222
%:%631=675%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2223
%:%632=676%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2224
%:%633=677%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2225
%:%634=678%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2226
%:%635=679%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2227
%:%636=680%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2228
%:%637=681%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2229
%:%638=682%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2230
%:%639=683%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2231
%:%640=684%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2232
%:%641=685%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2233
%:%642=686%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2234
%:%643=687%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2235
%:%644=688%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2236
%:%645=689%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2237
%:%646=690%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2238
%:%647=691%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2239
%:%648=692%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2240
%:%649=693%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2241
%:%650=694%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2242
%:%651=695%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2243
%:%652=696%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2244
%:%653=697%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2245
%:%654=698%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2246
%:%655=699%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2247
%:%655=700%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2248
%:%656=701%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2249
%:%656=702%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2250
%:%657=703%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2251
%:%658=704%:%
371
Chengsong
parents: 369
diff changeset
  2252
%:%658=705%:%
Chengsong
parents: 369
diff changeset
  2253
%:%659=706%:%
Chengsong
parents: 369
diff changeset
  2254
%:%660=707%:%
Chengsong
parents: 369
diff changeset
  2255
%:%661=708%:%
Chengsong
parents: 369
diff changeset
  2256
%:%662=709%:%
Chengsong
parents: 369
diff changeset
  2257
%:%663=710%:%
Chengsong
parents: 369
diff changeset
  2258
%:%664=711%:%
Chengsong
parents: 369
diff changeset
  2259
%:%665=712%:%
Chengsong
parents: 369
diff changeset
  2260
%:%666=713%:%
Chengsong
parents: 369
diff changeset
  2261
%:%667=714%:%
Chengsong
parents: 369
diff changeset
  2262
%:%668=715%:%
Chengsong
parents: 369
diff changeset
  2263
%:%669=716%:%
Chengsong
parents: 369
diff changeset
  2264
%:%670=717%:%
Chengsong
parents: 369
diff changeset
  2265
%:%671=718%:%
Chengsong
parents: 369
diff changeset
  2266
%:%672=719%:%
Chengsong
parents: 369
diff changeset
  2267
%:%673=720%:%
Chengsong
parents: 369
diff changeset
  2268
%:%674=721%:%
Chengsong
parents: 369
diff changeset
  2269
%:%675=722%:%
Chengsong
parents: 369
diff changeset
  2270
%:%676=723%:%
Chengsong
parents: 369
diff changeset
  2271
%:%677=724%:%
Chengsong
parents: 369
diff changeset
  2272
%:%678=725%:%
Chengsong
parents: 369
diff changeset
  2273
%:%679=726%:%
Chengsong
parents: 369
diff changeset
  2274
%:%680=727%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2275
%:%681=728%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2276
%:%682=729%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2277
%:%683=730%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2278
%:%684=731%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2279
%:%685=732%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2280
%:%686=733%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2281
%:%687=734%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2282
%:%688=735%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2283
%:%689=736%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2284
%:%690=737%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2285
%:%691=738%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2286
%:%692=739%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2287
%:%693=740%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2288
%:%694=741%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2289
%:%695=742%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2290
%:%696=743%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2291
%:%697=744%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2292
%:%698=745%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2293
%:%699=746%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2294
%:%700=747%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2295
%:%701=748%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2296
%:%702=749%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2297
%:%703=750%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2298
%:%704=751%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2299
%:%705=752%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2300
%:%706=753%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2301
%:%707=754%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2302
%:%708=755%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2303
%:%709=756%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2304
%:%710=757%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2305
%:%711=758%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2306
%:%712=759%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2307
%:%713=760%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2308
%:%714=761%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2309
%:%714=762%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2310
%:%714=763%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2311
%:%715=764%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2312
%:%716=765%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2313
%:%717=766%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2314
%:%718=767%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2315
%:%719=768%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2316
%:%720=769%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2317
%:%721=770%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2318
%:%722=771%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2319
%:%723=772%:%
371
Chengsong
parents: 369
diff changeset
  2320
%:%723=773%:%
Chengsong
parents: 369
diff changeset
  2321
%:%724=774%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2322
%:%725=775%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2323
%:%726=776%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2324
%:%727=777%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2325
%:%728=778%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2326
%:%729=779%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2327
%:%730=780%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2328
%:%731=781%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2329
%:%732=782%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2330
%:%733=783%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2331
%:%734=784%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2332
%:%735=785%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2333
%:%736=786%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2334
%:%737=787%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2335
%:%738=788%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2336
%:%739=789%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2337
%:%740=790%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2338
%:%741=791%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2339
%:%742=792%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2340
%:%743=793%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2341
%:%744=794%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2342
%:%745=795%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2343
%:%746=796%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2344
%:%747=797%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2345
%:%748=798%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2346
%:%749=799%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2347
%:%750=800%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2348
%:%751=801%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2349
%:%752=802%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2350
%:%753=803%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2351
%:%754=804%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2352
%:%755=805%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2353
%:%756=806%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2354
%:%757=807%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2355
%:%758=808%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2356
%:%758=809%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2357
%:%759=810%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2358
%:%760=811%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2359
%:%761=812%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2360
%:%762=813%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2361
%:%763=814%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2362
%:%764=815%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2363
%:%765=816%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2364
%:%765=817%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2365
%:%766=818%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2366
%:%767=819%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2367
%:%768=820%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2368
%:%768=821%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2369
%:%769=822%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2370
%:%770=823%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2371
%:%771=824%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2372
%:%772=825%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2373
%:%773=826%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2374
%:%774=827%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2375
%:%775=828%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2376
%:%776=829%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2377
%:%777=830%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2378
%:%778=831%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2379
%:%779=832%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2380
%:%779=833%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2381
%:%780=834%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2382
%:%781=835%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2383
%:%782=836%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2384
%:%783=837%:%
371
Chengsong
parents: 369
diff changeset
  2385
%:%783=838%:%
Chengsong
parents: 369
diff changeset
  2386
%:%784=839%:%
Chengsong
parents: 369
diff changeset
  2387
%:%785=840%:%
Chengsong
parents: 369
diff changeset
  2388
%:%786=841%:%
Chengsong
parents: 369
diff changeset
  2389
%:%787=842%:%
Chengsong
parents: 369
diff changeset
  2390
%:%788=843%:%
Chengsong
parents: 369
diff changeset
  2391
%:%789=844%:%
Chengsong
parents: 369
diff changeset
  2392
%:%790=845%:%
Chengsong
parents: 369
diff changeset
  2393
%:%791=846%:%
Chengsong
parents: 369
diff changeset
  2394
%:%792=847%:%
Chengsong
parents: 369
diff changeset
  2395
%:%793=848%:%
Chengsong
parents: 369
diff changeset
  2396
%:%794=849%:%
Chengsong
parents: 369
diff changeset
  2397
%:%795=850%:%
Chengsong
parents: 369
diff changeset
  2398
%:%796=851%:%
Chengsong
parents: 369
diff changeset
  2399
%:%797=852%:%
Chengsong
parents: 369
diff changeset
  2400
%:%798=853%:%
Chengsong
parents: 369
diff changeset
  2401
%:%799=854%:%
Chengsong
parents: 369
diff changeset
  2402
%:%800=855%:%
Chengsong
parents: 369
diff changeset
  2403
%:%801=856%:%
Chengsong
parents: 369
diff changeset
  2404
%:%802=857%:%
Chengsong
parents: 369
diff changeset
  2405
%:%803=858%:%
Chengsong
parents: 369
diff changeset
  2406
%:%804=859%:%
Chengsong
parents: 369
diff changeset
  2407
%:%805=860%:%
Chengsong
parents: 369
diff changeset
  2408
%:%806=861%:%
Chengsong
parents: 369
diff changeset
  2409
%:%807=862%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2410
%:%808=863%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2411
%:%809=864%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2412
%:%810=865%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2413
%:%811=866%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2414
%:%812=867%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2415
%:%813=868%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2416
%:%814=869%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2417
%:%815=870%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2418
%:%816=871%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2419
%:%817=872%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2420
%:%818=873%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2421
%:%819=874%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2422
%:%820=875%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2423
%:%821=876%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2424
%:%822=877%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2425
%:%823=878%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2426
%:%824=879%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2427
%:%825=880%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2428
%:%826=881%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2429
%:%827=882%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2430
%:%828=883%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2431
%:%829=884%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2432
%:%830=885%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2433
%:%831=886%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2434
%:%832=887%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2435
%:%833=888%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2436
%:%834=889%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2437
%:%835=890%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2438
%:%836=891%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2439
%:%837=892%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2440
%:%838=893%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2441
%:%839=894%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2442
%:%840=895%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2443
%:%841=896%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2444
%:%841=897%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2445
%:%842=898%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2446
%:%843=899%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2447
%:%844=900%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2448
%:%845=901%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2449
%:%846=902%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2450
%:%847=903%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2451
%:%848=904%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2452
%:%849=905%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2453
%:%850=906%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2454
%:%851=907%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2455
%:%852=908%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2456
%:%853=909%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2457
%:%854=910%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2458
%:%855=911%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2459
%:%856=912%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2460
%:%857=913%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2461
%:%858=914%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2462
%:%859=915%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2463
%:%860=916%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2464
%:%861=917%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2465
%:%862=918%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2466
%:%863=919%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2467
%:%864=920%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2468
%:%865=921%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2469
%:%866=922%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2470
%:%867=923%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2471
%:%868=924%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2472
%:%869=925%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2473
%:%870=926%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2474
%:%871=927%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2475
%:%872=928%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2476
%:%873=929%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2477
%:%874=930%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2478
%:%874=931%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2479
%:%875=932%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2480
%:%876=933%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2481
%:%877=934%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2482
%:%878=935%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2483
%:%879=936%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2484
%:%880=937%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2485
%:%881=938%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2486
%:%882=939%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2487
%:%883=940%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2488
%:%884=941%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2489
%:%885=942%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2490
%:%886=943%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2491
%:%887=944%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2492
%:%888=945%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2493
%:%889=946%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2494
%:%890=947%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2495
%:%891=948%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2496
%:%892=949%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2497
%:%893=950%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2498
%:%894=951%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2499
%:%895=952%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2500
%:%896=953%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2501
%:%897=954%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2502
%:%898=955%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2503
%:%899=956%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2504
%:%900=957%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2505
%:%901=958%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2506
%:%902=959%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2507
%:%903=960%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2508
%:%904=961%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2509
%:%904=962%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2510
%:%905=963%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2511
%:%906=964%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2512
%:%907=965%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2513
%:%908=966%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2514
%:%909=967%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2515
%:%910=968%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2516
%:%911=969%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2517
%:%912=970%:%
371
Chengsong
parents: 369
diff changeset
  2518
%:%912=971%:%
Chengsong
parents: 369
diff changeset
  2519
%:%913=972%:%
Chengsong
parents: 369
diff changeset
  2520
%:%914=973%:%
Chengsong
parents: 369
diff changeset
  2521
%:%915=974%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2522
%:%916=975%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2523
%:%917=976%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2524
%:%918=977%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2525
%:%919=978%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2526
%:%920=979%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2527
%:%921=980%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2528
%:%922=981%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2529
%:%923=982%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2530
%:%924=983%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2531
%:%925=984%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2532
%:%926=985%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2533
%:%927=986%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2534
%:%928=987%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2535
%:%929=988%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2536
%:%930=989%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2537
%:%931=990%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2538
%:%932=991%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2539
%:%933=992%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2540
%:%934=993%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2541
%:%935=994%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2542
%:%936=995%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2543
%:%937=996%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2544
%:%938=997%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2545
%:%939=998%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2546
%:%940=999%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2547
%:%941=1000%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2548
%:%942=1001%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2549
%:%943=1002%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2550
%:%944=1003%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2551
%:%945=1004%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2552
%:%946=1005%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2553
%:%947=1006%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2554
%:%948=1007%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2555
%:%949=1008%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2556
%:%949=1009%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2557
%:%949=1010%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2558
%:%950=1011%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2559
%:%950=1012%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2560
%:%950=1013%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2561
%:%951=1014%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2562
%:%952=1015%:%
371
Chengsong
parents: 369
diff changeset
  2563
%:%952=1016%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2564
%:%953=1017%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2565
%:%954=1018%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2566
%:%955=1019%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2567
%:%956=1020%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2568
%:%957=1021%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2569
%:%958=1022%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2570
%:%959=1023%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2571
%:%960=1024%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2572
%:%961=1025%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2573
%:%962=1026%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2574
%:%963=1027%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2575
%:%964=1028%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2576
%:%965=1029%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2577
%:%966=1030%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2578
%:%967=1031%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2579
%:%968=1032%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2580
%:%969=1033%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2581
%:%970=1034%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2582
%:%971=1035%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2583
%:%972=1036%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2584
%:%973=1037%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2585
%:%974=1038%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2586
%:%975=1039%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2587
%:%976=1040%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2588
%:%977=1041%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2589
%:%978=1042%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2590
%:%979=1043%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2591
%:%980=1044%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2592
%:%981=1045%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2593
%:%982=1046%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2594
%:%983=1047%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2595
%:%984=1048%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2596
%:%985=1049%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2597
%:%986=1050%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2598
%:%986=1051%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2599
%:%987=1052%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2600
%:%988=1053%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2601
%:%989=1054%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2602
%:%989=1055%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2603
%:%989=1056%:%
371
Chengsong
parents: 369
diff changeset
  2604
%:%989=1057%:%
Chengsong
parents: 369
diff changeset
  2605
%:%990=1058%:%
Chengsong
parents: 369
diff changeset
  2606
%:%991=1059%:%
Chengsong
parents: 369
diff changeset
  2607
%:%992=1060%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2608
%:%993=1061%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2609
%:%994=1062%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2610
%:%995=1063%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2611
%:%996=1064%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2612
%:%997=1065%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2613
%:%998=1066%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2614
%:%999=1067%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2615
%:%1000=1068%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2616
%:%1001=1069%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2617
%:%1002=1070%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2618
%:%1003=1071%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2619
%:%1004=1072%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2620
%:%1005=1073%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2621
%:%1006=1074%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2622
%:%1007=1075%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2623
%:%1008=1076%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2624
%:%1009=1077%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2625
%:%1010=1078%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2626
%:%1011=1079%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2627
%:%1012=1080%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2628
%:%1013=1081%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2629
%:%1014=1082%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2630
%:%1015=1083%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2631
%:%1016=1084%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2632
%:%1017=1085%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2633
%:%1018=1086%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2634
%:%1019=1087%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2635
%:%1020=1088%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2636
%:%1021=1089%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2637
%:%1022=1090%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2638
%:%1023=1091%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2639
%:%1024=1092%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2640
%:%1025=1093%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2641
%:%1026=1094%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2642
%:%1035=1098%:%
371
Chengsong
parents: 369
diff changeset
  2643
%:%1047=1102%:%
Chengsong
parents: 369
diff changeset
  2644
%:%1048=1103%:%
Chengsong
parents: 369
diff changeset
  2645
%:%1049=1104%:%
Chengsong
parents: 369
diff changeset
  2646
%:%1050=1105%:%
Chengsong
parents: 369
diff changeset
  2647
%:%1051=1106%:%
Chengsong
parents: 369
diff changeset
  2648
%:%1052=1107%:%
Chengsong
parents: 369
diff changeset
  2649
%:%1053=1108%:%
Chengsong
parents: 369
diff changeset
  2650
%:%1054=1109%:%
Chengsong
parents: 369
diff changeset
  2651
%:%1055=1110%:%
Chengsong
parents: 369
diff changeset
  2652
%:%1056=1111%:%
Chengsong
parents: 369
diff changeset
  2653
%:%1057=1112%:%
Chengsong
parents: 369
diff changeset
  2654
%:%1058=1113%:%
Chengsong
parents: 369
diff changeset
  2655
%:%1059=1114%:%
Chengsong
parents: 369
diff changeset
  2656
%:%1060=1115%:%
Chengsong
parents: 369
diff changeset
  2657
%:%1061=1116%:%
Chengsong
parents: 369
diff changeset
  2658
%:%1062=1117%:%
Chengsong
parents: 369
diff changeset
  2659
%:%1063=1118%:%
Chengsong
parents: 369
diff changeset
  2660
%:%1064=1119%:%
Chengsong
parents: 369
diff changeset
  2661
%:%1065=1120%:%
Chengsong
parents: 369
diff changeset
  2662
%:%1066=1121%:%
Chengsong
parents: 369
diff changeset
  2663
%:%1067=1122%:%
Chengsong
parents: 369
diff changeset
  2664
%:%1068=1123%:%
Chengsong
parents: 369
diff changeset
  2665
%:%1069=1124%:%
Chengsong
parents: 369
diff changeset
  2666
%:%1070=1125%:%
Chengsong
parents: 369
diff changeset
  2667
%:%1071=1126%:%
Chengsong
parents: 369
diff changeset
  2668
%:%1072=1127%:%
Chengsong
parents: 369
diff changeset
  2669
%:%1073=1128%:%
Chengsong
parents: 369
diff changeset
  2670
%:%1074=1129%:%
Chengsong
parents: 369
diff changeset
  2671
%:%1075=1130%:%
Chengsong
parents: 369
diff changeset
  2672
%:%1076=1131%:%
Chengsong
parents: 369
diff changeset
  2673
%:%1077=1132%:%
Chengsong
parents: 369
diff changeset
  2674
%:%1078=1133%:%
Chengsong
parents: 369
diff changeset
  2675
%:%1079=1134%:%
Chengsong
parents: 369
diff changeset
  2676
%:%1080=1135%:%
Chengsong
parents: 369
diff changeset
  2677
%:%1081=1136%:%
Chengsong
parents: 369
diff changeset
  2678
%:%1082=1137%:%
Chengsong
parents: 369
diff changeset
  2679
%:%1083=1138%:%
Chengsong
parents: 369
diff changeset
  2680
%:%1084=1139%:%
Chengsong
parents: 369
diff changeset
  2681
%:%1085=1140%:%
Chengsong
parents: 369
diff changeset
  2682
%:%1086=1141%:%
Chengsong
parents: 369
diff changeset
  2683
%:%1087=1142%:%
Chengsong
parents: 369
diff changeset
  2684
%:%1088=1143%:%
Chengsong
parents: 369
diff changeset
  2685
%:%1089=1144%:%
Chengsong
parents: 369
diff changeset
  2686
%:%1090=1145%:%
Chengsong
parents: 369
diff changeset
  2687
%:%1091=1146%:%
Chengsong
parents: 369
diff changeset
  2688
%:%1092=1147%:%
Chengsong
parents: 369
diff changeset
  2689
%:%1093=1148%:%
Chengsong
parents: 369
diff changeset
  2690
%:%1094=1149%:%
Chengsong
parents: 369
diff changeset
  2691
%:%1095=1150%:%
Chengsong
parents: 369
diff changeset
  2692
%:%1096=1151%:%
Chengsong
parents: 369
diff changeset
  2693
%:%1097=1152%:%
Chengsong
parents: 369
diff changeset
  2694
%:%1098=1153%:%
Chengsong
parents: 369
diff changeset
  2695
%:%1099=1154%:%
Chengsong
parents: 369
diff changeset
  2696
%:%1100=1155%:%
Chengsong
parents: 369
diff changeset
  2697
%:%1101=1156%:%
Chengsong
parents: 369
diff changeset
  2698
%:%1102=1157%:%
Chengsong
parents: 369
diff changeset
  2699
%:%1103=1158%:%
Chengsong
parents: 369
diff changeset
  2700
%:%1104=1159%:%
Chengsong
parents: 369
diff changeset
  2701
%:%1105=1160%:%
Chengsong
parents: 369
diff changeset
  2702
%:%1106=1161%:%
Chengsong
parents: 369
diff changeset
  2703
%:%1107=1162%:%
Chengsong
parents: 369
diff changeset
  2704
%:%1108=1163%:%
Chengsong
parents: 369
diff changeset
  2705
%:%1109=1164%:%
Chengsong
parents: 369
diff changeset
  2706
%:%1110=1165%:%
Chengsong
parents: 369
diff changeset
  2707
%:%1111=1166%:%
Chengsong
parents: 369
diff changeset
  2708
%:%1112=1167%:%
Chengsong
parents: 369
diff changeset
  2709
%:%1113=1168%:%
Chengsong
parents: 369
diff changeset
  2710
%:%1114=1169%:%
Chengsong
parents: 369
diff changeset
  2711
%:%1115=1170%:%
Chengsong
parents: 369
diff changeset
  2712
%:%1116=1171%:%
Chengsong
parents: 369
diff changeset
  2713
%:%1117=1172%:%
Chengsong
parents: 369
diff changeset
  2714
%:%1118=1173%:%
Chengsong
parents: 369
diff changeset
  2715
%:%1119=1174%:%
Chengsong
parents: 369
diff changeset
  2716
%:%1120=1175%:%
Chengsong
parents: 369
diff changeset
  2717
%:%1121=1176%:%
Chengsong
parents: 369
diff changeset
  2718
%:%1122=1177%:%
Chengsong
parents: 369
diff changeset
  2719
%:%1123=1178%:%
Chengsong
parents: 369
diff changeset
  2720
%:%1124=1179%:%
Chengsong
parents: 369
diff changeset
  2721
%:%1125=1180%:%
Chengsong
parents: 369
diff changeset
  2722
%:%1126=1181%:%
Chengsong
parents: 369
diff changeset
  2723
%:%1127=1182%:%
Chengsong
parents: 369
diff changeset
  2724
%:%1128=1183%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2725
%:%1129=1184%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2726
%:%1130=1185%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2727
%:%1131=1186%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2728
%:%1132=1187%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2729
%:%1133=1188%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2730
%:%1134=1189%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2731
%:%1135=1190%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2732
%:%1136=1191%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2733
%:%1137=1192%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2734
%:%1138=1193%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2735
%:%1139=1194%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2736
%:%1140=1195%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2737
%:%1141=1196%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2738
%:%1142=1197%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2739
%:%1143=1198%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2740
%:%1144=1199%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2741
%:%1145=1200%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2742
%:%1146=1201%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2743
%:%1147=1202%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2744
%:%1148=1203%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2745
%:%1149=1204%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2746
%:%1150=1205%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2747
%:%1151=1206%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2748
%:%1152=1207%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2749
%:%1153=1208%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2750
%:%1154=1209%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2751
%:%1155=1210%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2752
%:%1156=1211%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2753
%:%1157=1212%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2754
%:%1158=1213%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2755
%:%1159=1214%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2756
%:%1160=1215%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2757
%:%1161=1216%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2758
%:%1162=1217%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2759
%:%1162=1218%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2760
%:%1163=1219%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2761
%:%1164=1220%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2762
%:%1165=1221%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2763
%:%1166=1222%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2764
%:%1167=1223%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2765
%:%1168=1224%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2766
%:%1169=1225%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2767
%:%1170=1226%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2768
%:%1171=1227%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2769
%:%1172=1228%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2770
%:%1173=1229%:%
371
Chengsong
parents: 369
diff changeset
  2771
%:%1173=1230%:%
Chengsong
parents: 369
diff changeset
  2772
%:%1174=1231%:%
Chengsong
parents: 369
diff changeset
  2773
%:%1175=1232%:%
Chengsong
parents: 369
diff changeset
  2774
%:%1176=1233%:%
Chengsong
parents: 369
diff changeset
  2775
%:%1177=1234%:%
Chengsong
parents: 369
diff changeset
  2776
%:%1178=1235%:%
Chengsong
parents: 369
diff changeset
  2777
%:%1179=1236%:%
Chengsong
parents: 369
diff changeset
  2778
%:%1180=1237%:%
Chengsong
parents: 369
diff changeset
  2779
%:%1181=1238%:%
Chengsong
parents: 369
diff changeset
  2780
%:%1182=1239%:%
Chengsong
parents: 369
diff changeset
  2781
%:%1183=1240%:%
Chengsong
parents: 369
diff changeset
  2782
%:%1184=1241%:%
Chengsong
parents: 369
diff changeset
  2783
%:%1185=1242%:%
Chengsong
parents: 369
diff changeset
  2784
%:%1186=1243%:%
Chengsong
parents: 369
diff changeset
  2785
%:%1187=1244%:%
Chengsong
parents: 369
diff changeset
  2786
%:%1188=1245%:%
Chengsong
parents: 369
diff changeset
  2787
%:%1189=1246%:%
Chengsong
parents: 369
diff changeset
  2788
%:%1190=1247%:%
Chengsong
parents: 369
diff changeset
  2789
%:%1191=1248%:%
Chengsong
parents: 369
diff changeset
  2790
%:%1192=1249%:%
Chengsong
parents: 369
diff changeset
  2791
%:%1193=1250%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2792
%:%1194=1251%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2793
%:%1195=1252%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2794
%:%1196=1253%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2795
%:%1197=1254%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2796
%:%1198=1255%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2797
%:%1199=1256%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2798
%:%1200=1257%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2799
%:%1201=1258%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2800
%:%1202=1259%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2801
%:%1203=1260%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2802
%:%1204=1261%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2803
%:%1205=1262%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2804
%:%1206=1263%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2805
%:%1207=1264%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2806
%:%1208=1265%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2807
%:%1209=1266%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2808
%:%1210=1267%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2809
%:%1211=1268%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2810
%:%1212=1269%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2811
%:%1213=1270%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2812
%:%1214=1271%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2813
%:%1215=1272%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2814
%:%1216=1273%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2815
%:%1217=1274%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2816
%:%1218=1275%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2817
%:%1219=1276%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2818
%:%1220=1277%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2819
%:%1221=1278%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2820
%:%1222=1279%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2821
%:%1223=1280%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2822
%:%1224=1281%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2823
%:%1225=1282%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2824
%:%1226=1283%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2825
%:%1227=1284%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2826
%:%1227=1285%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2827
%:%1227=1286%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2828
%:%1228=1287%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2829
%:%1229=1288%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2830
%:%1229=1289%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2831
%:%1229=1290%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2832
%:%1229=1291%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2833
%:%1230=1292%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2834
%:%1231=1293%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2835
%:%1232=1294%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2836
%:%1233=1295%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2837
%:%1234=1296%:%
371
Chengsong
parents: 369
diff changeset
  2838
%:%1234=1297%:%
Chengsong
parents: 369
diff changeset
  2839
%:%1235=1298%:%
Chengsong
parents: 369
diff changeset
  2840
%:%1236=1299%:%
Chengsong
parents: 369
diff changeset
  2841
%:%1237=1300%:%
Chengsong
parents: 369
diff changeset
  2842
%:%1238=1301%:%
Chengsong
parents: 369
diff changeset
  2843
%:%1239=1302%:%
Chengsong
parents: 369
diff changeset
  2844
%:%1240=1303%:%
Chengsong
parents: 369
diff changeset
  2845
%:%1241=1304%:%
Chengsong
parents: 369
diff changeset
  2846
%:%1242=1305%:%
Chengsong
parents: 369
diff changeset
  2847
%:%1243=1306%:%
Chengsong
parents: 369
diff changeset
  2848
%:%1244=1307%:%
Chengsong
parents: 369
diff changeset
  2849
%:%1245=1308%:%
Chengsong
parents: 369
diff changeset
  2850
%:%1246=1309%:%
Chengsong
parents: 369
diff changeset
  2851
%:%1247=1310%:%
Chengsong
parents: 369
diff changeset
  2852
%:%1248=1311%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2853
%:%1249=1312%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2854
%:%1250=1313%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2855
%:%1251=1314%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2856
%:%1252=1315%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2857
%:%1253=1316%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2858
%:%1254=1317%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2859
%:%1255=1318%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2860
%:%1256=1319%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2861
%:%1257=1320%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2862
%:%1258=1321%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2863
%:%1259=1322%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2864
%:%1260=1323%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2865
%:%1261=1324%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2866
%:%1262=1325%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2867
%:%1263=1326%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2868
%:%1264=1327%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2869
%:%1265=1328%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2870
%:%1266=1329%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2871
%:%1267=1330%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2872
%:%1268=1331%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2873
%:%1269=1332%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2874
%:%1270=1333%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2875
%:%1271=1334%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2876
%:%1272=1335%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2877
%:%1273=1336%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2878
%:%1274=1337%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2879
%:%1275=1338%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2880
%:%1276=1339%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2881
%:%1277=1340%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2882
%:%1278=1341%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2883
%:%1279=1342%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2884
%:%1280=1343%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2885
%:%1281=1344%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2886
%:%1282=1345%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2887
%:%1282=1346%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2888
%:%1283=1347%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2889
%:%1283=1348%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2890
%:%1284=1349%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2891
%:%1284=1350%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2892
%:%1285=1351%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2893
%:%1286=1352%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2894
%:%1287=1353%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2895
%:%1288=1354%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2896
%:%1289=1355%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2897
%:%1290=1356%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2898
%:%1291=1357%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2899
%:%1291=1358%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2900
%:%1292=1359%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2901
%:%1292=1360%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2902
%:%1293=1361%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2903
%:%1293=1362%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2904
%:%1294=1363%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2905
%:%1295=1364%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2906
%:%1296=1365%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2907
%:%1297=1366%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2908
%:%1298=1367%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2909
%:%1299=1368%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2910
%:%1300=1369%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2911
%:%1301=1370%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2912
%:%1302=1371%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2913
%:%1303=1372%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2914
%:%1304=1373%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2915
%:%1305=1374%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2916
%:%1306=1375%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2917
%:%1307=1376%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2918
%:%1308=1377%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2919
%:%1309=1378%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2920
%:%1310=1379%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2921
%:%1311=1380%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2922
%:%1312=1381%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2923
%:%1313=1382%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2924
%:%1314=1383%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2925
%:%1315=1384%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2926
%:%1316=1385%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2927
%:%1317=1386%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2928
%:%1318=1387%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2929
%:%1319=1388%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2930
%:%1320=1389%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2931
%:%1321=1390%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2932
%:%1322=1391%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2933
%:%1323=1392%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2934
%:%1324=1393%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2935
%:%1324=1394%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2936
%:%1325=1395%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2937
%:%1326=1396%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2938
%:%1327=1397%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2939
%:%1328=1398%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2940
%:%1329=1399%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2941
%:%1330=1400%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2942
%:%1331=1401%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2943
%:%1331=1402%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2944
%:%1332=1403%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2945
%:%1333=1404%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2946
%:%1334=1405%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2947
%:%1334=1406%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2948
%:%1335=1407%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2949
%:%1336=1408%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2950
%:%1337=1409%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2951
%:%1337=1410%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2952
%:%1338=1411%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2953
%:%1338=1412%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2954
%:%1339=1413%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2955
%:%1339=1414%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2956
%:%1340=1415%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2957
%:%1341=1416%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2958
%:%1342=1417%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2959
%:%1342=1418%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2960
%:%1343=1419%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2961
%:%1343=1420%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2962
%:%1344=1421%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2963
%:%1344=1422%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2964
%:%1344=1423%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2965
%:%1344=1424%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2966
%:%1345=1425%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2967
%:%1345=1426%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2968
%:%1346=1427%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2969
%:%1347=1428%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2970
%:%1347=1430%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2971
%:%1347=1431%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2972
%:%1347=1432%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2973
%:%1347=1433%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2974
%:%1347=1434%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2975
%:%1348=1435%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2976
%:%1348=1436%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2977
%:%1349=1437%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2978
%:%1349=1438%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2979
%:%1350=1439%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2980
%:%1350=1440%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2981
%:%1351=1441%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2982
%:%1352=1442%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2983
%:%1353=1443%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2984
%:%1354=1444%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2985
%:%1354=1445%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2986
%:%1355=1446%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2987
%:%1355=1447%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2988
%:%1356=1448%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  2989
%:%1357=1449%:%
371
Chengsong
parents: 369
diff changeset
  2990
%:%1357=1450%:%
Chengsong
parents: 369
diff changeset
  2991
%:%1358=1451%:%
Chengsong
parents: 369
diff changeset
  2992
%:%1359=1452%:%
Chengsong
parents: 369
diff changeset
  2993
%:%1360=1453%:%
Chengsong
parents: 369
diff changeset
  2994
%:%1361=1454%:%
Chengsong
parents: 369
diff changeset
  2995
%:%1362=1455%:%
Chengsong
parents: 369
diff changeset
  2996
%:%1363=1456%:%
Chengsong
parents: 369
diff changeset
  2997
%:%1364=1457%:%
Chengsong
parents: 369
diff changeset
  2998
%:%1365=1458%:%
Chengsong
parents: 369
diff changeset
  2999
%:%1366=1459%:%
Chengsong
parents: 369
diff changeset
  3000
%:%1367=1460%:%
Chengsong
parents: 369
diff changeset
  3001
%:%1368=1461%:%
Chengsong
parents: 369
diff changeset
  3002
%:%1369=1462%:%
Chengsong
parents: 369
diff changeset
  3003
%:%1370=1463%:%
Chengsong
parents: 369
diff changeset
  3004
%:%1371=1464%:%
Chengsong
parents: 369
diff changeset
  3005
%:%1372=1465%:%
Chengsong
parents: 369
diff changeset
  3006
%:%1373=1466%:%
Chengsong
parents: 369
diff changeset
  3007
%:%1374=1467%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3008
%:%1375=1468%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3009
%:%1376=1469%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3010
%:%1377=1470%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3011
%:%1378=1471%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3012
%:%1379=1472%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3013
%:%1380=1473%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3014
%:%1381=1474%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3015
%:%1382=1475%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3016
%:%1383=1476%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3017
%:%1384=1477%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3018
%:%1385=1478%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3019
%:%1386=1479%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3020
%:%1387=1480%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3021
%:%1388=1481%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3022
%:%1389=1482%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3023
%:%1390=1483%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3024
%:%1391=1484%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3025
%:%1392=1485%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3026
%:%1393=1486%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3027
%:%1394=1487%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3028
%:%1395=1488%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3029
%:%1396=1489%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3030
%:%1397=1490%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3031
%:%1398=1491%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3032
%:%1399=1492%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3033
%:%1400=1493%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3034
%:%1401=1494%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3035
%:%1402=1495%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3036
%:%1403=1496%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3037
%:%1404=1497%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3038
%:%1405=1498%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3039
%:%1406=1499%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3040
%:%1407=1500%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3041
%:%1408=1501%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3042
%:%1417=1505%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3043
%:%1429=1512%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3044
%:%1430=1513%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3045
%:%1431=1514%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3046
%:%1432=1515%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3047
%:%1433=1516%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3048
%:%1434=1517%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3049
%:%1435=1518%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3050
%:%1444=1523%:%
371
Chengsong
parents: 369
diff changeset
  3051
%:%1456=1527%:%
Chengsong
parents: 369
diff changeset
  3052
%:%1457=1528%:%
Chengsong
parents: 369
diff changeset
  3053
%:%1458=1529%:%
Chengsong
parents: 369
diff changeset
  3054
%:%1459=1530%:%
Chengsong
parents: 369
diff changeset
  3055
%:%1460=1531%:%
Chengsong
parents: 369
diff changeset
  3056
%:%1461=1532%:%
Chengsong
parents: 369
diff changeset
  3057
%:%1462=1533%:%
Chengsong
parents: 369
diff changeset
  3058
%:%1463=1534%:%
Chengsong
parents: 369
diff changeset
  3059
%:%1464=1535%:%
Chengsong
parents: 369
diff changeset
  3060
%:%1465=1536%:%
Chengsong
parents: 369
diff changeset
  3061
%:%1466=1537%:%
Chengsong
parents: 369
diff changeset
  3062
%:%1467=1538%:%
Chengsong
parents: 369
diff changeset
  3063
%:%1468=1539%:%
Chengsong
parents: 369
diff changeset
  3064
%:%1469=1540%:%
Chengsong
parents: 369
diff changeset
  3065
%:%1470=1541%:%
Chengsong
parents: 369
diff changeset
  3066
%:%1471=1542%:%
Chengsong
parents: 369
diff changeset
  3067
%:%1472=1543%:%
Chengsong
parents: 369
diff changeset
  3068
%:%1473=1544%:%
Chengsong
parents: 369
diff changeset
  3069
%:%1474=1545%:%
Chengsong
parents: 369
diff changeset
  3070
%:%1475=1546%:%
Chengsong
parents: 369
diff changeset
  3071
%:%1476=1547%:%
Chengsong
parents: 369
diff changeset
  3072
%:%1477=1548%:%
Chengsong
parents: 369
diff changeset
  3073
%:%1478=1549%:%
Chengsong
parents: 369
diff changeset
  3074
%:%1479=1550%:%
Chengsong
parents: 369
diff changeset
  3075
%:%1480=1551%:%
Chengsong
parents: 369
diff changeset
  3076
%:%1481=1552%:%
Chengsong
parents: 369
diff changeset
  3077
%:%1482=1553%:%
Chengsong
parents: 369
diff changeset
  3078
%:%1483=1554%:%
Chengsong
parents: 369
diff changeset
  3079
%:%1484=1555%:%
Chengsong
parents: 369
diff changeset
  3080
%:%1485=1556%:%
Chengsong
parents: 369
diff changeset
  3081
%:%1486=1557%:%
Chengsong
parents: 369
diff changeset
  3082
%:%1487=1558%:%
Chengsong
parents: 369
diff changeset
  3083
%:%1488=1559%:%
Chengsong
parents: 369
diff changeset
  3084
%:%1489=1560%:%
Chengsong
parents: 369
diff changeset
  3085
%:%1490=1561%:%
Chengsong
parents: 369
diff changeset
  3086
%:%1491=1562%:%
Chengsong
parents: 369
diff changeset
  3087
%:%1492=1563%:%
Chengsong
parents: 369
diff changeset
  3088
%:%1493=1564%:%
Chengsong
parents: 369
diff changeset
  3089
%:%1494=1565%:%
Chengsong
parents: 369
diff changeset
  3090
%:%1495=1566%:%
Chengsong
parents: 369
diff changeset
  3091
%:%1496=1567%:%
Chengsong
parents: 369
diff changeset
  3092
%:%1497=1568%:%
Chengsong
parents: 369
diff changeset
  3093
%:%1498=1569%:%
Chengsong
parents: 369
diff changeset
  3094
%:%1499=1570%:%
Chengsong
parents: 369
diff changeset
  3095
%:%1500=1571%:%
Chengsong
parents: 369
diff changeset
  3096
%:%1501=1572%:%
Chengsong
parents: 369
diff changeset
  3097
%:%1502=1573%:%
Chengsong
parents: 369
diff changeset
  3098
%:%1503=1574%:%
Chengsong
parents: 369
diff changeset
  3099
%:%1504=1575%:%
Chengsong
parents: 369
diff changeset
  3100
%:%1505=1576%:%
Chengsong
parents: 369
diff changeset
  3101
%:%1506=1577%:%
Chengsong
parents: 369
diff changeset
  3102
%:%1507=1578%:%
Chengsong
parents: 369
diff changeset
  3103
%:%1508=1579%:%
Chengsong
parents: 369
diff changeset
  3104
%:%1509=1580%:%
Chengsong
parents: 369
diff changeset
  3105
%:%1510=1581%:%
Chengsong
parents: 369
diff changeset
  3106
%:%1511=1582%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3107
%:%1512=1583%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3108
%:%1513=1584%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3109
%:%1514=1585%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3110
%:%1515=1586%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3111
%:%1516=1587%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3112
%:%1517=1588%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3113
%:%1518=1589%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3114
%:%1519=1590%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3115
%:%1520=1591%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3116
%:%1521=1592%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3117
%:%1522=1593%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3118
%:%1523=1594%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3119
%:%1524=1595%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3120
%:%1525=1596%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3121
%:%1526=1597%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3122
%:%1527=1598%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3123
%:%1528=1599%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3124
%:%1529=1600%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3125
%:%1530=1601%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3126
%:%1531=1602%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3127
%:%1532=1603%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3128
%:%1533=1604%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3129
%:%1534=1605%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3130
%:%1535=1606%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3131
%:%1536=1607%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3132
%:%1537=1608%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3133
%:%1538=1609%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3134
%:%1539=1610%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3135
%:%1540=1611%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3136
%:%1541=1612%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3137
%:%1542=1613%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3138
%:%1543=1614%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3139
%:%1544=1615%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3140
%:%1545=1616%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3141
%:%1545=1732%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3142
%:%1546=1733%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3143
%:%1547=1734%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3144
%:%1548=1735%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3145
%:%1549=1736%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3146
%:%1549=1897%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3147
%:%1550=1898%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3148
%:%1551=1899%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3149
%:%1552=1900%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3150
%:%1553=1901%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3151
%:%1554=1902%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3152
%:%1555=1903%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3153
%:%1556=1904%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3154
%:%1557=1905%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3155
%:%1558=1906%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3156
%:%1559=1907%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3157
%:%1560=1908%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3158
%:%1561=1909%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3159
%:%1562=1910%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3160
%:%1563=1911%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3161
%:%1564=1912%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3162
%:%1565=1913%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3163
%:%1566=1914%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3164
%:%1567=1915%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3165
%:%1568=1916%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3166
%:%1568=1917%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3167
%:%1569=1918%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3168
%:%1569=1919%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3169
%:%1569=1920%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3170
%:%1570=1921%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3171
%:%1570=1922%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3172
%:%1571=1923%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3173
%:%1572=1924%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3174
%:%1573=1925%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3175
%:%1574=1926%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3176
%:%1575=1927%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3177
%:%1576=1928%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3178
%:%1577=1929%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3179
%:%1578=1930%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3180
%:%1579=1931%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3181
%:%1580=1932%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3182
%:%1581=1933%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3183
%:%1582=1934%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3184
%:%1583=1935%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3185
%:%1584=1936%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3186
%:%1585=1937%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3187
%:%1586=1938%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3188
%:%1587=1939%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3189
%:%1587=1940%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3190
%:%1588=1941%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3191
%:%1589=1942%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3192
%:%1590=1943%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3193
%:%1590=1944%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3194
%:%1590=1945%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3195
%:%1591=1946%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3196
%:%1592=1947%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3197
%:%1593=1948%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3198
%:%1593=1949%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3199
%:%1594=1950%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3200
%:%1594=1951%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3201
%:%1595=1952%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3202
%:%1596=1953%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3203
%:%1597=1954%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3204
%:%1598=1955%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3205
%:%1599=1956%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3206
%:%1600=1957%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3207
%:%1601=1958%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3208
%:%1602=1959%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3209
%:%1603=1960%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3210
%:%1604=1961%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3211
%:%1605=1962%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3212
%:%1606=1963%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3213
%:%1607=1964%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3214
%:%1608=1965%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3215
%:%1609=1966%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3216
%:%1610=1967%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3217
%:%1611=1968%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3218
%:%1620=1973%:%
371
Chengsong
parents: 369
diff changeset
  3219
%:%1632=1977%:%
Chengsong
parents: 369
diff changeset
  3220
%:%1633=1978%:%
Chengsong
parents: 369
diff changeset
  3221
%:%1634=1979%:%
Chengsong
parents: 369
diff changeset
  3222
%:%1635=1980%:%
Chengsong
parents: 369
diff changeset
  3223
%:%1636=1981%:%
Chengsong
parents: 369
diff changeset
  3224
%:%1637=1982%:%
Chengsong
parents: 369
diff changeset
  3225
%:%1638=1983%:%
Chengsong
parents: 369
diff changeset
  3226
%:%1639=1984%:%
Chengsong
parents: 369
diff changeset
  3227
%:%1640=1985%:%
Chengsong
parents: 369
diff changeset
  3228
%:%1641=1986%:%
Chengsong
parents: 369
diff changeset
  3229
%:%1642=1987%:%
Chengsong
parents: 369
diff changeset
  3230
%:%1643=1988%:%
Chengsong
parents: 369
diff changeset
  3231
%:%1644=1989%:%
Chengsong
parents: 369
diff changeset
  3232
%:%1645=1990%:%
Chengsong
parents: 369
diff changeset
  3233
%:%1646=1991%:%
Chengsong
parents: 369
diff changeset
  3234
%:%1647=1992%:%
Chengsong
parents: 369
diff changeset
  3235
%:%1648=1993%:%
Chengsong
parents: 369
diff changeset
  3236
%:%1649=1994%:%
Chengsong
parents: 369
diff changeset
  3237
%:%1650=1995%:%
372
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3238
%:%1651=1996%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3239
%:%1652=1997%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3240
%:%1653=1998%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3241
%:%1654=1999%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3242
%:%1655=2000%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3243
%:%1656=2001%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3244
%:%1657=2002%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3245
%:%1658=2003%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3246
%:%1659=2004%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3247
%:%1660=2005%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3248
%:%1661=2006%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3249
%:%1662=2007%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3250
%:%1663=2008%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3251
%:%1664=2009%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3252
%:%1665=2010%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3253
%:%1666=2011%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3254
%:%1667=2012%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3255
%:%1668=2013%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3256
%:%1669=2014%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3257
%:%1670=2015%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3258
%:%1671=2016%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3259
%:%1672=2017%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3260
%:%1673=2018%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3261
%:%1674=2019%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3262
%:%1675=2020%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3263
%:%1676=2021%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3264
%:%1677=2022%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3265
%:%1678=2023%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3266
%:%1679=2024%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3267
%:%1680=2025%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3268
%:%1681=2026%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3269
%:%1682=2027%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3270
%:%1683=2028%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3271
%:%1684=2029%:%
78cc255e286f some more writing
Chengsong
parents: 371
diff changeset
  3272
%:%1697=2035%:%