doc-src/TutorialI/Inductive/document/Advanced.tex
author paulson
Fri, 18 Mar 2005 14:31:50 +0100
changeset 15614 b098158a3f39
parent 15481 fc075ae929e4
child 16069 3f2a9f400168
permissions -rw-r--r--
auto update
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10365
a17cf465d29a auto generated
paulson
parents:
diff changeset
     1
%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
     2
\begin{isabellebody}%
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
     3
\def\isabellecontext{Advanced}%
10365
a17cf465d29a auto generated
paulson
parents:
diff changeset
     4
\isanewline
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
     5
\isacommand{theory}\ Advanced\ {\isacharequal}\ Even{\isacharcolon}\isanewline
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
     6
\isanewline
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
     7
\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
     8
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
     9
\isacommand{datatype}\ {\isacharprime}f\ gterm\ {\isacharequal}\ Apply\ {\isacharprime}f\ {\isachardoublequote}{\isacharprime}f\ gterm\ list{\isachardoublequote}\isanewline
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
    10
\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    11
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    12
\isacommand{datatype}\ integer{\isacharunderscore}op\ {\isacharequal}\ Number\ int\ {\isacharbar}\ UnaryMinus\ {\isacharbar}\ Plus\isanewline
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
    13
\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    14
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    15
\isacommand{consts}\ gterms\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharprime}f\ set\ {\isasymRightarrow}\ {\isacharprime}f\ gterm\ set{\isachardoublequote}\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    16
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    17
\isacommand{inductive}\ {\isachardoublequote}gterms\ F{\isachardoublequote}\isanewline
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
    18
\isakeyword{intros}\isanewline
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    19
step{\isacharbrackleft}intro{\isacharbang}{\isacharbrackright}{\isacharcolon}\ {\isachardoublequote}{\isasymlbrakk}{\isasymforall}t\ {\isasymin}\ set\ args{\isachardot}\ t\ {\isasymin}\ gterms\ F{\isacharsemicolon}\ \ f\ {\isasymin}\ F{\isasymrbrakk}\isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    20
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\isasymLongrightarrow}\ {\isacharparenleft}Apply\ f\ args{\isacharparenright}\ {\isasymin}\ gterms\ F{\isachardoublequote}\isanewline
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
    21
\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    22
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    23
\isacommand{lemma}\ gterms{\isacharunderscore}mono{\isacharcolon}\ {\isachardoublequote}F{\isasymsubseteq}G\ {\isasymLongrightarrow}\ gterms\ F\ {\isasymsubseteq}\ gterms\ G{\isachardoublequote}\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    24
\isamarkupfalse%
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14470
diff changeset
    25
\isamarkupfalse%
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    26
\isamarkupfalse%
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    27
\isamarkuptrue%
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    28
\isamarkupfalse%
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14470
diff changeset
    29
\isamarkupfalse%
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    30
%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    31
\begin{isamarkuptext}%
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    32
\begin{isabelle}%
14470
1ffe42cfaefe auto update
paulson
parents: 14379
diff changeset
    33
\ \ \ \ \ {\isasymlbrakk}a\ {\isasymin}\ Even{\isachardot}even{\isacharsemicolon}\ a\ {\isacharequal}\ {\isadigit{0}}\ {\isasymLongrightarrow}\ P{\isacharsemicolon}\ {\isasymAnd}n{\isachardot}\ {\isasymlbrakk}a\ {\isacharequal}\ Suc\ {\isacharparenleft}Suc\ n{\isacharparenright}{\isacharsemicolon}\ n\ {\isasymin}\ Even{\isachardot}even{\isasymrbrakk}\ {\isasymLongrightarrow}\ P{\isasymrbrakk}\isanewline
1ffe42cfaefe auto update
paulson
parents: 14379
diff changeset
    34
\isaindent{\ \ \ \ \ }{\isasymLongrightarrow}\ P%
11173
094b76968484 revisions in response to comments by Tobias
paulson
parents: 10950
diff changeset
    35
\end{isabelle}
094b76968484 revisions in response to comments by Tobias
paulson
parents: 10950
diff changeset
    36
\rulename{even.cases}
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
    37
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
    38
Just as a demo I include
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
    39
the two forms that Markus has made available. First the one for binding the
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
    40
result to a name%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    41
\end{isamarkuptext}%
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    42
\isamarkuptrue%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    43
\isacommand{inductive{\isacharunderscore}cases}\ Suc{\isacharunderscore}Suc{\isacharunderscore}cases\ {\isacharbrackleft}elim{\isacharbang}{\isacharbrackright}{\isacharcolon}\isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    44
\ \ {\isachardoublequote}Suc{\isacharparenleft}Suc\ n{\isacharparenright}\ {\isasymin}\ even{\isachardoublequote}\isanewline
10365
a17cf465d29a auto generated
paulson
parents:
diff changeset
    45
\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    46
\isamarkupfalse%
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    47
\isacommand{thm}\ Suc{\isacharunderscore}Suc{\isacharunderscore}cases\isamarkupfalse%
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    48
%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    49
\begin{isamarkuptext}%
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    50
\begin{isabelle}%
14470
1ffe42cfaefe auto update
paulson
parents: 14379
diff changeset
    51
\ \ \ \ \ {\isasymlbrakk}Suc\ {\isacharparenleft}Suc\ n{\isacharparenright}\ {\isasymin}\ Even{\isachardot}even{\isacharsemicolon}\ n\ {\isasymin}\ Even{\isachardot}even\ {\isasymLongrightarrow}\ P{\isasymrbrakk}\ {\isasymLongrightarrow}\ P%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    52
\end{isabelle}
11173
094b76968484 revisions in response to comments by Tobias
paulson
parents: 10950
diff changeset
    53
\rulename{Suc_Suc_cases}
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
    54
10457
dd669bda2b0c updated;
wenzelm
parents: 10365
diff changeset
    55
and now the one for local usage:%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    56
\end{isamarkuptext}%
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    57
\isamarkuptrue%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    58
\isacommand{lemma}\ {\isachardoublequote}Suc{\isacharparenleft}Suc\ n{\isacharparenright}\ {\isasymin}\ even\ {\isasymLongrightarrow}\ P\ n{\isachardoublequote}\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    59
\isamarkupfalse%
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    60
\isamarkupfalse%
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14470
diff changeset
    61
\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    62
\isamarkupfalse%
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    63
\isacommand{inductive{\isacharunderscore}cases}\ gterm{\isacharunderscore}Apply{\isacharunderscore}elim\ {\isacharbrackleft}elim{\isacharbang}{\isacharbrackright}{\isacharcolon}\ {\isachardoublequote}Apply\ f\ args\ {\isasymin}\ gterms\ F{\isachardoublequote}\isamarkupfalse%
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    64
%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    65
\begin{isamarkuptext}%
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
    66
this is what we get:
10457
dd669bda2b0c updated;
wenzelm
parents: 10365
diff changeset
    67
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    68
\begin{isabelle}%
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    69
\ \ \ \ \ {\isasymlbrakk}Apply\ f\ args\ {\isasymin}\ gterms\ F{\isacharsemicolon}\ {\isasymlbrakk}{\isasymforall}t{\isasymin}set\ args{\isachardot}\ t\ {\isasymin}\ gterms\ F{\isacharsemicolon}\ f\ {\isasymin}\ F{\isasymrbrakk}\ {\isasymLongrightarrow}\ P{\isasymrbrakk}\ {\isasymLongrightarrow}\ P%
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
    70
\end{isabelle}
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    71
\rulename{gterm_Apply_elim}%
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    72
\end{isamarkuptext}%
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    73
\isamarkuptrue%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    74
\isacommand{lemma}\ gterms{\isacharunderscore}IntI\ {\isacharbrackleft}rule{\isacharunderscore}format{\isacharcomma}\ intro{\isacharbang}{\isacharbrackright}{\isacharcolon}\isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    75
\ \ \ \ \ {\isachardoublequote}t\ {\isasymin}\ gterms\ F\ {\isasymLongrightarrow}\ t\ {\isasymin}\ gterms\ G\ {\isasymlongrightarrow}\ t\ {\isasymin}\ gterms\ {\isacharparenleft}F{\isasyminter}G{\isacharparenright}{\isachardoublequote}\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    76
\isamarkupfalse%
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14470
diff changeset
    77
\isamarkupfalse%
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    78
\isamarkuptrue%
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    79
\isamarkupfalse%
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14470
diff changeset
    80
\isamarkupfalse%
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    81
%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    82
\begin{isamarkuptext}%
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    83
\begin{isabelle}%
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    84
\ \ \ \ \ mono\ f\ {\isasymLongrightarrow}\ f\ {\isacharparenleft}A\ {\isasyminter}\ B{\isacharparenright}\ {\isasymsubseteq}\ f\ A\ {\isasyminter}\ f\ B%
11173
094b76968484 revisions in response to comments by Tobias
paulson
parents: 10950
diff changeset
    85
\end{isabelle}
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    86
\rulename{mono_Int}%
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    87
\end{isamarkuptext}%
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    88
\isamarkuptrue%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    89
\isacommand{lemma}\ gterms{\isacharunderscore}Int{\isacharunderscore}eq\ {\isacharbrackleft}simp{\isacharbrackright}{\isacharcolon}\isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    90
\ \ \ \ \ {\isachardoublequote}gterms\ {\isacharparenleft}F{\isasyminter}G{\isacharparenright}\ {\isacharequal}\ gterms\ F\ {\isasyminter}\ gterms\ G{\isachardoublequote}\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    91
\isamarkupfalse%
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14470
diff changeset
    92
\isamarkupfalse%
12156
d2758965362e new-style numerals without leading #, along with generic 0 and 1
paulson
parents: 11866
diff changeset
    93
%
d2758965362e new-style numerals without leading #, along with generic 0 and 1
paulson
parents: 11866
diff changeset
    94
\begin{isamarkuptext}%
d2758965362e new-style numerals without leading #, along with generic 0 and 1
paulson
parents: 11866
diff changeset
    95
the following declaration isn't actually used%
d2758965362e new-style numerals without leading #, along with generic 0 and 1
paulson
parents: 11866
diff changeset
    96
\end{isamarkuptext}%
d2758965362e new-style numerals without leading #, along with generic 0 and 1
paulson
parents: 11866
diff changeset
    97
\isamarkuptrue%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
    98
\isacommand{consts}\ integer{\isacharunderscore}arity\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}integer{\isacharunderscore}op\ {\isasymRightarrow}\ nat{\isachardoublequote}\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
    99
\isamarkupfalse%
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
   100
\isacommand{primrec}\isanewline
11708
d27253c4594f *** empty log message ***
wenzelm
parents: 11187
diff changeset
   101
{\isachardoublequote}integer{\isacharunderscore}arity\ {\isacharparenleft}Number\ n{\isacharparenright}\ \ \ \ \ \ \ \ {\isacharequal}\ {\isadigit{0}}{\isachardoublequote}\isanewline
d27253c4594f *** empty log message ***
wenzelm
parents: 11187
diff changeset
   102
{\isachardoublequote}integer{\isacharunderscore}arity\ UnaryMinus\ \ \ \ \ \ \ \ {\isacharequal}\ {\isadigit{1}}{\isachardoublequote}\isanewline
d27253c4594f *** empty log message ***
wenzelm
parents: 11187
diff changeset
   103
{\isachardoublequote}integer{\isacharunderscore}arity\ Plus\ \ \ \ \ \ \ \ \ \ \ \ \ \ {\isacharequal}\ {\isadigit{2}}{\isachardoublequote}\isanewline
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
   104
\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   105
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   106
\isacommand{consts}\ well{\isacharunderscore}formed{\isacharunderscore}gterm\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharparenleft}{\isacharprime}f\ {\isasymRightarrow}\ nat{\isacharparenright}\ {\isasymRightarrow}\ {\isacharprime}f\ gterm\ set{\isachardoublequote}\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   107
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   108
\isacommand{inductive}\ {\isachardoublequote}well{\isacharunderscore}formed{\isacharunderscore}gterm\ arity{\isachardoublequote}\isanewline
10365
a17cf465d29a auto generated
paulson
parents:
diff changeset
   109
\isakeyword{intros}\isanewline
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   110
step{\isacharbrackleft}intro{\isacharbang}{\isacharbrackright}{\isacharcolon}\ {\isachardoublequote}{\isasymlbrakk}{\isasymforall}t\ {\isasymin}\ set\ args{\isachardot}\ t\ {\isasymin}\ well{\isacharunderscore}formed{\isacharunderscore}gterm\ arity{\isacharsemicolon}\ \ \isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   111
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ length\ args\ {\isacharequal}\ arity\ f{\isasymrbrakk}\isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   112
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\isasymLongrightarrow}\ {\isacharparenleft}Apply\ f\ args{\isacharparenright}\ {\isasymin}\ well{\isacharunderscore}formed{\isacharunderscore}gterm\ arity{\isachardoublequote}\isanewline
10365
a17cf465d29a auto generated
paulson
parents:
diff changeset
   113
\isanewline
a17cf465d29a auto generated
paulson
parents:
diff changeset
   114
\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   115
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   116
\isacommand{consts}\ well{\isacharunderscore}formed{\isacharunderscore}gterm{\isacharprime}\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharparenleft}{\isacharprime}f\ {\isasymRightarrow}\ nat{\isacharparenright}\ {\isasymRightarrow}\ {\isacharprime}f\ gterm\ set{\isachardoublequote}\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   117
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   118
\isacommand{inductive}\ {\isachardoublequote}well{\isacharunderscore}formed{\isacharunderscore}gterm{\isacharprime}\ arity{\isachardoublequote}\isanewline
10365
a17cf465d29a auto generated
paulson
parents:
diff changeset
   119
\isakeyword{intros}\isanewline
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   120
step{\isacharbrackleft}intro{\isacharbang}{\isacharbrackright}{\isacharcolon}\ {\isachardoublequote}{\isasymlbrakk}args\ {\isasymin}\ lists\ {\isacharparenleft}well{\isacharunderscore}formed{\isacharunderscore}gterm{\isacharprime}\ arity{\isacharparenright}{\isacharsemicolon}\ \ \isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   121
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ length\ args\ {\isacharequal}\ arity\ f{\isasymrbrakk}\isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   122
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\isasymLongrightarrow}\ {\isacharparenleft}Apply\ f\ args{\isacharparenright}\ {\isasymin}\ well{\isacharunderscore}formed{\isacharunderscore}gterm{\isacharprime}\ arity{\isachardoublequote}\isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   123
\isakeyword{monos}\ lists{\isacharunderscore}mono\isanewline
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
   124
\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   125
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   126
\isacommand{lemma}\ {\isachardoublequote}well{\isacharunderscore}formed{\isacharunderscore}gterm\ arity\ {\isasymsubseteq}\ well{\isacharunderscore}formed{\isacharunderscore}gterm{\isacharprime}\ arity{\isachardoublequote}\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   127
\isamarkupfalse%
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14470
diff changeset
   128
\isamarkupfalse%
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   129
\isamarkuptrue%
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14470
diff changeset
   130
\isamarkupfalse%
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   131
\isamarkuptrue%
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   132
\isamarkupfalse%
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14470
diff changeset
   133
\isanewline
10878
b254d5ad6dd4 auto update
paulson
parents: 10696
diff changeset
   134
\isanewline
b254d5ad6dd4 auto update
paulson
parents: 10696
diff changeset
   135
\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   136
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   137
\isacommand{lemma}\ {\isachardoublequote}well{\isacharunderscore}formed{\isacharunderscore}gterm{\isacharprime}\ arity\ {\isasymsubseteq}\ well{\isacharunderscore}formed{\isacharunderscore}gterm\ arity{\isachardoublequote}\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   138
\isamarkupfalse%
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14470
diff changeset
   139
\isamarkupfalse%
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   140
\isamarkuptrue%
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14470
diff changeset
   141
\isamarkupfalse%
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   142
\isamarkuptrue%
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   143
\isamarkupfalse%
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14470
diff changeset
   144
\isamarkupfalse%
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   145
%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   146
\begin{isamarkuptext}%
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   147
\begin{isabelle}%
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   148
\ \ \ \ \ lists\ {\isacharparenleft}A\ {\isasyminter}\ B{\isacharparenright}\ {\isacharequal}\ lists\ A\ {\isasyminter}\ lists\ B%
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   149
\end{isabelle}%
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   150
\end{isamarkuptext}%
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   151
\isamarkuptrue%
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
   152
%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   153
\begin{isamarkuptext}%
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
   154
the rest isn't used: too complicated.  OK for an exercise though.%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   155
\end{isamarkuptext}%
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   156
\isamarkuptrue%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   157
\isacommand{consts}\ integer{\isacharunderscore}signature\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharparenleft}integer{\isacharunderscore}op\ {\isacharasterisk}\ {\isacharparenleft}unit\ list\ {\isacharasterisk}\ unit{\isacharparenright}{\isacharparenright}\ set{\isachardoublequote}\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   158
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   159
\isacommand{inductive}\ {\isachardoublequote}integer{\isacharunderscore}signature{\isachardoublequote}\isanewline
10365
a17cf465d29a auto generated
paulson
parents:
diff changeset
   160
\isakeyword{intros}\isanewline
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   161
Number{\isacharcolon}\ \ \ \ \ {\isachardoublequote}{\isacharparenleft}Number\ n{\isacharcomma}\ \ \ {\isacharparenleft}{\isacharbrackleft}{\isacharbrackright}{\isacharcomma}\ {\isacharparenleft}{\isacharparenright}{\isacharparenright}{\isacharparenright}\ {\isasymin}\ integer{\isacharunderscore}signature{\isachardoublequote}\isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   162
UnaryMinus{\isacharcolon}\ {\isachardoublequote}{\isacharparenleft}UnaryMinus{\isacharcomma}\ {\isacharparenleft}{\isacharbrackleft}{\isacharparenleft}{\isacharparenright}{\isacharbrackright}{\isacharcomma}\ {\isacharparenleft}{\isacharparenright}{\isacharparenright}{\isacharparenright}\ {\isasymin}\ integer{\isacharunderscore}signature{\isachardoublequote}\isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   163
Plus{\isacharcolon}\ \ \ \ \ \ \ {\isachardoublequote}{\isacharparenleft}Plus{\isacharcomma}\ \ \ \ \ \ \ {\isacharparenleft}{\isacharbrackleft}{\isacharparenleft}{\isacharparenright}{\isacharcomma}{\isacharparenleft}{\isacharparenright}{\isacharbrackright}{\isacharcomma}\ {\isacharparenleft}{\isacharparenright}{\isacharparenright}{\isacharparenright}\ {\isasymin}\ integer{\isacharunderscore}signature{\isachardoublequote}\isanewline
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
   164
\isanewline
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
   165
\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   166
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   167
\isacommand{consts}\ well{\isacharunderscore}typed{\isacharunderscore}gterm\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharparenleft}{\isacharprime}f\ {\isasymRightarrow}\ {\isacharprime}t\ list\ {\isacharasterisk}\ {\isacharprime}t{\isacharparenright}\ {\isasymRightarrow}\ {\isacharparenleft}{\isacharprime}f\ gterm\ {\isacharasterisk}\ {\isacharprime}t{\isacharparenright}set{\isachardoublequote}\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   168
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   169
\isacommand{inductive}\ {\isachardoublequote}well{\isacharunderscore}typed{\isacharunderscore}gterm\ sig{\isachardoublequote}\isanewline
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
   170
\isakeyword{intros}\isanewline
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   171
step{\isacharbrackleft}intro{\isacharbang}{\isacharbrackright}{\isacharcolon}\ \isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   172
\ \ \ \ {\isachardoublequote}{\isasymlbrakk}{\isasymforall}pair\ {\isasymin}\ set\ args{\isachardot}\ pair\ {\isasymin}\ well{\isacharunderscore}typed{\isacharunderscore}gterm\ sig{\isacharsemicolon}\ \isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   173
\ \ \ \ \ \ sig\ f\ {\isacharequal}\ {\isacharparenleft}map\ snd\ args{\isacharcomma}\ rtype{\isacharparenright}{\isasymrbrakk}\isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   174
\ \ \ \ \ {\isasymLongrightarrow}\ {\isacharparenleft}Apply\ f\ {\isacharparenleft}map\ fst\ args{\isacharparenright}{\isacharcomma}\ rtype{\isacharparenright}\ \isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   175
\ \ \ \ \ \ \ \ \ {\isasymin}\ well{\isacharunderscore}typed{\isacharunderscore}gterm\ sig{\isachardoublequote}\isanewline
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
   176
\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   177
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   178
\isacommand{consts}\ well{\isacharunderscore}typed{\isacharunderscore}gterm{\isacharprime}\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharparenleft}{\isacharprime}f\ {\isasymRightarrow}\ {\isacharprime}t\ list\ {\isacharasterisk}\ {\isacharprime}t{\isacharparenright}\ {\isasymRightarrow}\ {\isacharparenleft}{\isacharprime}f\ gterm\ {\isacharasterisk}\ {\isacharprime}t{\isacharparenright}set{\isachardoublequote}\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   179
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   180
\isacommand{inductive}\ {\isachardoublequote}well{\isacharunderscore}typed{\isacharunderscore}gterm{\isacharprime}\ sig{\isachardoublequote}\isanewline
10469
7813f5ccfb18 auto update
paulson
parents: 10457
diff changeset
   181
\isakeyword{intros}\isanewline
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   182
step{\isacharbrackleft}intro{\isacharbang}{\isacharbrackright}{\isacharcolon}\ \isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   183
\ \ \ \ {\isachardoublequote}{\isasymlbrakk}args\ {\isasymin}\ lists{\isacharparenleft}well{\isacharunderscore}typed{\isacharunderscore}gterm{\isacharprime}\ sig{\isacharparenright}{\isacharsemicolon}\ \isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   184
\ \ \ \ \ \ sig\ f\ {\isacharequal}\ {\isacharparenleft}map\ snd\ args{\isacharcomma}\ rtype{\isacharparenright}{\isasymrbrakk}\isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   185
\ \ \ \ \ {\isasymLongrightarrow}\ {\isacharparenleft}Apply\ f\ {\isacharparenleft}map\ fst\ args{\isacharparenright}{\isacharcomma}\ rtype{\isacharparenright}\ \isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   186
\ \ \ \ \ \ \ \ \ {\isasymin}\ well{\isacharunderscore}typed{\isacharunderscore}gterm{\isacharprime}\ sig{\isachardoublequote}\isanewline
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   187
\isakeyword{monos}\ lists{\isacharunderscore}mono\isanewline
10365
a17cf465d29a auto generated
paulson
parents:
diff changeset
   188
\isanewline
a17cf465d29a auto generated
paulson
parents:
diff changeset
   189
\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   190
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   191
\isacommand{lemma}\ {\isachardoublequote}well{\isacharunderscore}typed{\isacharunderscore}gterm\ sig\ {\isasymsubseteq}\ well{\isacharunderscore}typed{\isacharunderscore}gterm{\isacharprime}\ sig{\isachardoublequote}\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   192
\isamarkupfalse%
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   193
\isamarkupfalse%
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   194
\isamarkupfalse%
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   195
\isamarkupfalse%
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14470
diff changeset
   196
\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   197
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   198
\isacommand{lemma}\ {\isachardoublequote}well{\isacharunderscore}typed{\isacharunderscore}gterm{\isacharprime}\ sig\ {\isasymsubseteq}\ well{\isacharunderscore}typed{\isacharunderscore}gterm\ sig{\isachardoublequote}\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   199
\isamarkupfalse%
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   200
\isamarkupfalse%
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   201
\isamarkupfalse%
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   202
\isamarkupfalse%
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14470
diff changeset
   203
\isanewline
10365
a17cf465d29a auto generated
paulson
parents:
diff changeset
   204
\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   205
\isamarkupfalse%
10365
a17cf465d29a auto generated
paulson
parents:
diff changeset
   206
\isacommand{end}\isanewline
a17cf465d29a auto generated
paulson
parents:
diff changeset
   207
\isanewline
11866
fbd097aec213 updated;
wenzelm
parents: 11708
diff changeset
   208
\isamarkupfalse%
11187
c6e49929e544 auto-update
paulson
parents: 11173
diff changeset
   209
\end{isabellebody}%
10365
a17cf465d29a auto generated
paulson
parents:
diff changeset
   210
%%% Local Variables:
a17cf465d29a auto generated
paulson
parents:
diff changeset
   211
%%% mode: latex
a17cf465d29a auto generated
paulson
parents:
diff changeset
   212
%%% TeX-master: "root"
a17cf465d29a auto generated
paulson
parents:
diff changeset
   213
%%% End: