doc-src/IsarImplementation/Thy/logic.thy
author wenzelm
Tue, 05 Sep 2006 16:42:32 +0200
changeset 20477 e623b0e30541
parent 20472 e993073eda4c
child 20480 4e0522d38968
permissions -rw-r--r--
tuned;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
     1
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
     2
(* $Id$ *)
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
     3
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
     4
theory logic imports base begin
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
     5
20470
c839b38a1f32 more on variables;
wenzelm
parents: 20451
diff changeset
     6
chapter {* Primitive logic \label{ch:logic} *}
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
     7
20451
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
     8
section {* Types \label{sec:types} *}
20437
wenzelm
parents: 18537
diff changeset
     9
wenzelm
parents: 18537
diff changeset
    10
text {*
20451
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    11
  \glossary{Type class}{FIXME}
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    12
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    13
  \glossary{Type arity}{FIXME}
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    14
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    15
  \glossary{Sort}{FIXME}
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    16
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    17
  FIXME classes and sorts
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    18
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    19
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    20
  \glossary{Type}{FIXME}
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    21
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    22
  \glossary{Type constructor}{FIXME}
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    23
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    24
  \glossary{Type variable}{FIXME}
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    25
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    26
  FIXME simple types
20437
wenzelm
parents: 18537
diff changeset
    27
*}
wenzelm
parents: 18537
diff changeset
    28
wenzelm
parents: 18537
diff changeset
    29
20451
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    30
section {* Terms \label{sec:terms} *}
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    31
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    32
text {*
20451
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    33
  \glossary{Term}{FIXME}
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    34
20451
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    35
  FIXME de-Bruijn representation of lambda terms
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    36
*}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    37
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    38
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    39
text {*
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    40
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    41
FIXME
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    42
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    43
\glossary{Schematic polymorphism}{FIXME}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    44
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    45
\glossary{Type variable}{FIXME}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    46
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    47
*}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    48
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    49
20477
wenzelm
parents: 20472
diff changeset
    50
section {* Proof terms *}
wenzelm
parents: 20472
diff changeset
    51
wenzelm
parents: 20472
diff changeset
    52
text {*
wenzelm
parents: 20472
diff changeset
    53
  FIXME
wenzelm
parents: 20472
diff changeset
    54
*}
wenzelm
parents: 20472
diff changeset
    55
wenzelm
parents: 20472
diff changeset
    56
20451
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
    57
section {* Theorems \label{sec:thms} *}
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    58
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    59
text {*
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    60
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    61
  FIXME
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    62
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    63
\glossary{Proposition}{A \seeglossary{term} of \seeglossary{type}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    64
@{text "prop"}.  Internally, there is nothing special about
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    65
propositions apart from their type, but the concrete syntax enforces a
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    66
clear distinction.  Propositions are structured via implication @{text
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    67
"A \<Longrightarrow> B"} or universal quantification @{text "\<And>x. B x"} --- anything
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    68
else is considered atomic.  The canonical form for propositions is
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    69
that of a \seeglossary{Hereditary Harrop Formula}.}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    70
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    71
\glossary{Theorem}{A proven proposition within a certain theory and
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    72
proof context, formally @{text "\<Gamma> \<turnstile>\<^sub>\<Theta> \<phi>"}; both contexts are
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    73
rarely spelled out explicitly.  Theorems are usually normalized
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    74
according to the \seeglossary{HHF} format.}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    75
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    76
\glossary{Fact}{Sometimes used interchangably for
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    77
\seeglossary{theorem}.  Strictly speaking, a list of theorems,
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    78
essentially an extra-logical conjunction.  Facts emerge either as
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    79
local assumptions, or as results of local goal statements --- both may
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    80
be simultaneous, hence the list representation.}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    81
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    82
\glossary{Schematic variable}{FIXME}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    83
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    84
\glossary{Fixed variable}{A variable that is bound within a certain
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    85
proof context; an arbitrary-but-fixed entity within a portion of proof
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    86
text.}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    87
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    88
\glossary{Free variable}{Synonymous for \seeglossary{fixed variable}.}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    89
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    90
\glossary{Bound variable}{FIXME}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    91
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    92
\glossary{Variable}{See \seeglossary{schematic variable},
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    93
\seeglossary{fixed variable}, \seeglossary{bound variable}, or
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    94
\seeglossary{type variable}.  The distinguishing feature of different
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    95
variables is their binding scope.}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    96
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    97
*}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    98
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    99
subsection {* Primitive inferences *}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   100
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   101
text FIXME
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   102
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   103
subsection {* Higher-order resolution *}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   104
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   105
text {*
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   106
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   107
FIXME
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   108
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   109
\glossary{Hereditary Harrop Formula}{The set of propositions in HHF
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   110
format is defined inductively as @{text "H = (\<And>x\<^sup>*. H\<^sup>* \<Longrightarrow>
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   111
A)"}, for variables @{text "x"} and atomic propositions @{text "A"}.
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   112
Any proposition may be put into HHF form by normalizing with the rule
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   113
@{text "(A \<Longrightarrow> (\<And>x. B x)) \<equiv> (\<And>x. A \<Longrightarrow> B x)"}.  In Isabelle, the outermost
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   114
quantifier prefix is represented via \seeglossary{schematic
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   115
variables}, such that the top-level structure is merely that of a
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   116
\seeglossary{Horn Clause}}.
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   117
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   118
\glossary{HHF}{See \seeglossary{Hereditary Harrop Formula}.}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   119
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   120
*}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   121
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   122
subsection {* Equational reasoning *}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   123
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   124
text FIXME
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   125
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   126
20477
wenzelm
parents: 20472
diff changeset
   127
section {* Raw theories *}
20451
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
   128
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
   129
text {*
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
   130
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
   131
FIXME
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   132
20451
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
   133
\glossary{Constant}{Essentially a \seeglossary{fixed variable} of the
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
   134
theory context, but slightly more flexible since it may be used at
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
   135
different type-instances, due to \seeglossary{schematic
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
   136
polymorphism.}}
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
   137
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
   138
\glossary{Axiom}{FIXME}
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
   139
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
   140
\glossary{Primitive definition}{FIXME}
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
   141
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20450
diff changeset
   142
*}
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   143
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   144
end