src/CCL/CCL.thy
author wenzelm
Sat, 22 Oct 2016 21:10:02 +0200
changeset 64350 3af8566788e7
parent 63120 629a4c5e953e
child 69593 3dda49e08b9d
permissions -rw-r--r--
remote_builds has PAR-SEQ semantics of old isatest-makedist; tuned signature;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
     1
(*  Title:      CCL/CCL.thy
1474
3f7d67927fe2 expanded tabs
clasohm
parents: 1149
diff changeset
     2
    Author:     Martin Coen
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     3
    Copyright   1993  University of Cambridge
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
     6
section \<open>Classical Computational Logic for Untyped Lambda Calculus
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
     7
  with reduction to weak head-normal form\<close>
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
     9
theory CCL
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
    10
imports Gfp
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
    11
begin
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    12
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
    13
text \<open>
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
    14
  Based on FOL extended with set collection, a primitive higher-order
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
    15
  logic.  HOL is too strong - descriptions prevent a type of programs
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
    16
  being defined which contains only executable terms.
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
    17
\<close>
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    18
55380
4de48353034e prefer vacuous definitional type classes over axiomatic ones;
wenzelm
parents: 54742
diff changeset
    19
class prog = "term"
36452
d37c6eed8117 renamed command 'defaultsort' to 'default_sort';
wenzelm
parents: 35409
diff changeset
    20
default_sort prog
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
    21
55380
4de48353034e prefer vacuous definitional type classes over axiomatic ones;
wenzelm
parents: 54742
diff changeset
    22
instance "fun" :: (prog, prog) prog ..
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
    23
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
    24
typedecl i
55380
4de48353034e prefer vacuous definitional type classes over axiomatic ones;
wenzelm
parents: 54742
diff changeset
    25
instance i :: prog ..
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
    26
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    27
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    28
consts
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    29
  (*** Evaluation Judgement ***)
61966
e90c42077767 more symbols;
wenzelm
parents: 60770
diff changeset
    30
  Eval      ::       "[i,i]\<Rightarrow>prop"          (infixl "\<longlongrightarrow>" 20)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    31
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    32
  (*** Bisimulations for pre-order and equality ***)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    33
  po          ::       "['a,'a]\<Rightarrow>o"           (infixl "[=" 50)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    34
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    35
  (*** Term Formers ***)
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
    36
  true        ::       "i"
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
    37
  false       ::       "i"
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    38
  pair        ::       "[i,i]\<Rightarrow>i"             ("(1<_,/_>)")
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    39
  lambda      ::       "(i\<Rightarrow>i)\<Rightarrow>i"            (binder "lam " 55)
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    40
  "case"      ::       "[i,i,i,[i,i]\<Rightarrow>i,(i\<Rightarrow>i)\<Rightarrow>i]\<Rightarrow>i"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    41
  "apply"     ::       "[i,i]\<Rightarrow>i"             (infixl "`" 56)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    42
  bot         ::       "i"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    43
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    44
  (******* EVALUATION SEMANTICS *******)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    45
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    46
  (**  This is the evaluation semantics from which the axioms below were derived.  **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    47
  (**  It is included here just as an evaluator for FUN and has no influence on    **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    48
  (**  inference in the theory CCL.                                                **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    49
51307
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
    50
axiomatization where
61966
e90c42077767 more symbols;
wenzelm
parents: 60770
diff changeset
    51
  trueV:       "true \<longlongrightarrow> true" and
e90c42077767 more symbols;
wenzelm
parents: 60770
diff changeset
    52
  falseV:      "false \<longlongrightarrow> false" and
e90c42077767 more symbols;
wenzelm
parents: 60770
diff changeset
    53
  pairV:       "<a,b> \<longlongrightarrow> <a,b>" and
e90c42077767 more symbols;
wenzelm
parents: 60770
diff changeset
    54
  lamV:        "\<And>b. lam x. b(x) \<longlongrightarrow> lam x. b(x)" and
51307
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
    55
61966
e90c42077767 more symbols;
wenzelm
parents: 60770
diff changeset
    56
  caseVtrue:   "\<lbrakk>t \<longlongrightarrow> true; d \<longlongrightarrow> c\<rbrakk> \<Longrightarrow> case(t,d,e,f,g) \<longlongrightarrow> c" and
e90c42077767 more symbols;
wenzelm
parents: 60770
diff changeset
    57
  caseVfalse:  "\<lbrakk>t \<longlongrightarrow> false; e \<longlongrightarrow> c\<rbrakk> \<Longrightarrow> case(t,d,e,f,g) \<longlongrightarrow> c" and
e90c42077767 more symbols;
wenzelm
parents: 60770
diff changeset
    58
  caseVpair:   "\<lbrakk>t \<longlongrightarrow> <a,b>; f(a,b) \<longlongrightarrow> c\<rbrakk> \<Longrightarrow> case(t,d,e,f,g) \<longlongrightarrow> c" and
e90c42077767 more symbols;
wenzelm
parents: 60770
diff changeset
    59
  caseVlam:    "\<And>b. \<lbrakk>t \<longlongrightarrow> lam x. b(x); g(b) \<longlongrightarrow> c\<rbrakk> \<Longrightarrow> case(t,d,e,f,g) \<longlongrightarrow> c"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    60
61966
e90c42077767 more symbols;
wenzelm
parents: 60770
diff changeset
    61
  (*** Properties of evaluation: note that "t \<longlongrightarrow> c" impies that c is canonical ***)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    62
51307
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
    63
axiomatization where
61966
e90c42077767 more symbols;
wenzelm
parents: 60770
diff changeset
    64
  canonical:  "\<lbrakk>t \<longlongrightarrow> c; c==true \<Longrightarrow> u\<longlongrightarrow>v;
e90c42077767 more symbols;
wenzelm
parents: 60770
diff changeset
    65
                          c==false \<Longrightarrow> u\<longlongrightarrow>v;
e90c42077767 more symbols;
wenzelm
parents: 60770
diff changeset
    66
                    \<And>a b. c==<a,b> \<Longrightarrow> u\<longlongrightarrow>v;
e90c42077767 more symbols;
wenzelm
parents: 60770
diff changeset
    67
                      \<And>f. c==lam x. f(x) \<Longrightarrow> u\<longlongrightarrow>v\<rbrakk> \<Longrightarrow>
e90c42077767 more symbols;
wenzelm
parents: 60770
diff changeset
    68
             u\<longlongrightarrow>v"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    69
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    70
  (* Should be derivable - but probably a bitch! *)
51307
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
    71
axiomatization where
61966
e90c42077767 more symbols;
wenzelm
parents: 60770
diff changeset
    72
  substitute: "\<lbrakk>a==a'; t(a)\<longlongrightarrow>c(a)\<rbrakk> \<Longrightarrow> t(a')\<longlongrightarrow>c(a')"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    73
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    74
  (************** LOGIC ***************)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    75
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    76
  (*** Definitions used in the following rules ***)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    77
51307
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
    78
axiomatization where
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
    79
  bot_def:         "bot == (lam x. x`x)`(lam x. x`x)" and
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    80
  apply_def:     "f ` t == case(f, bot, bot, \<lambda>x y. bot, \<lambda>u. u(t))"
42156
df219e736a5d modernized specifications -- less axioms;
wenzelm
parents: 40844
diff changeset
    81
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    82
definition "fix" :: "(i\<Rightarrow>i)\<Rightarrow>i"
57521
b14c0794f97f modernized definitions;
wenzelm
parents: 56199
diff changeset
    83
  where "fix(f) == (lam x. f(x`x))`(lam x. f(x`x))"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    84
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    85
  (*  The pre-order ([=) is defined as a simulation, and behavioural equivalence (=) *)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    86
  (*  as a bisimulation.  They can both be expressed as (bi)simulations up to        *)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    87
  (*  behavioural equivalence (ie the relations PO and EQ defined below).            *)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    88
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    89
definition SIM :: "[i,i,i set]\<Rightarrow>o"
57521
b14c0794f97f modernized definitions;
wenzelm
parents: 56199
diff changeset
    90
  where
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    91
  "SIM(t,t',R) ==  (t=true \<and> t'=true) | (t=false \<and> t'=false) |
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    92
                  (\<exists>a a' b b'. t=<a,b> \<and> t'=<a',b'> \<and> <a,a'> : R \<and> <b,b'> : R) |
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    93
                  (\<exists>f f'. t=lam x. f(x) \<and> t'=lam x. f'(x) \<and> (ALL x.<f(x),f'(x)> : R))"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    94
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    95
definition POgen :: "i set \<Rightarrow> i set"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    96
  where "POgen(R) == {p. \<exists>t t'. p=<t,t'> \<and> (t = bot | SIM(t,t',R))}"
57521
b14c0794f97f modernized definitions;
wenzelm
parents: 56199
diff changeset
    97
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    98
definition EQgen :: "i set \<Rightarrow> i set"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    99
  where "EQgen(R) == {p. \<exists>t t'. p=<t,t'> \<and> (t = bot \<and> t' = bot | SIM(t,t',R))}"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   100
57521
b14c0794f97f modernized definitions;
wenzelm
parents: 56199
diff changeset
   101
definition PO :: "i set"
b14c0794f97f modernized definitions;
wenzelm
parents: 56199
diff changeset
   102
  where "PO == gfp(POgen)"
b14c0794f97f modernized definitions;
wenzelm
parents: 56199
diff changeset
   103
b14c0794f97f modernized definitions;
wenzelm
parents: 56199
diff changeset
   104
definition EQ :: "i set"
b14c0794f97f modernized definitions;
wenzelm
parents: 56199
diff changeset
   105
  where "EQ == gfp(EQgen)"
b14c0794f97f modernized definitions;
wenzelm
parents: 56199
diff changeset
   106
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   107
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   108
  (*** Rules ***)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   109
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   110
  (** Partial Order **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   111
51307
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
   112
axiomatization where
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
   113
  po_refl:        "a [= a" and
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   114
  po_trans:       "\<lbrakk>a [= b;  b [= c\<rbrakk> \<Longrightarrow> a [= c" and
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   115
  po_cong:        "a [= b \<Longrightarrow> f(a) [= f(b)" and
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   116
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   117
  (* Extend definition of [= to program fragments of higher type *)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   118
  po_abstractn:   "(\<And>x. f(x) [= g(x)) \<Longrightarrow> (\<lambda>x. f(x)) [= (\<lambda>x. g(x))"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   119
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   120
  (** Equality - equivalence axioms inherited from FOL.thy   **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   121
  (**          - congruence of "=" is axiomatised implicitly **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   122
51307
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
   123
axiomatization where
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   124
  eq_iff:         "t = t' \<longleftrightarrow> t [= t' \<and> t' [= t"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   125
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   126
  (** Properties of canonical values given by greatest fixed point definitions **)
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
   127
51307
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
   128
axiomatization where
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   129
  PO_iff:         "t [= t' \<longleftrightarrow> <t,t'> : PO" and
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   130
  EQ_iff:         "t =  t' \<longleftrightarrow> <t,t'> : EQ"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   131
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   132
  (** Behaviour of non-canonical terms (ie case) given by the following beta-rules **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   133
51307
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
   134
axiomatization where
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
   135
  caseBtrue:            "case(true,d,e,f,g) = d" and
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
   136
  caseBfalse:          "case(false,d,e,f,g) = e" and
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
   137
  caseBpair:           "case(<a,b>,d,e,f,g) = f(a,b)" and
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
   138
  caseBlam:       "\<And>b. case(lam x. b(x),d,e,f,g) = g(b)" and
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
   139
  caseBbot:              "case(bot,d,e,f,g) = bot"           (* strictness *)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   140
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   141
  (** The theory is non-trivial **)
51307
943ad9c0d99d eliminated legacy 'axioms';
wenzelm
parents: 47966
diff changeset
   142
axiomatization where
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   143
  distinctness:   "\<not> lam x. b(x) = bot"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   144
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   145
  (*** Definitions of Termination and Divergence ***)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   146
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   147
definition Dvg :: "i \<Rightarrow> o"
57521
b14c0794f97f modernized definitions;
wenzelm
parents: 56199
diff changeset
   148
  where "Dvg(t) == t = bot"
b14c0794f97f modernized definitions;
wenzelm
parents: 56199
diff changeset
   149
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   150
definition Trm :: "i \<Rightarrow> o"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   151
  where "Trm(t) == \<not> Dvg(t)"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   152
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   153
text \<open>
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   154
Would be interesting to build a similar theory for a typed programming language:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   155
    ie.     true :: bool,      fix :: ('a\<Rightarrow>'a)\<Rightarrow>'a  etc......
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   156
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   157
This is starting to look like LCF.
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
   158
What are the advantages of this approach?
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
   159
        - less axiomatic
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   160
        - wfd induction / coinduction and fixed point induction available
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   161
\<close>
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
   162
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   163
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   164
lemmas ccl_data_defs = apply_def fix_def
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32149
diff changeset
   165
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32149
diff changeset
   166
declare po_refl [simp]
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   167
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   168
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   169
subsection \<open>Congruence Rules\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   170
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   171
(*similar to AP_THM in Gordon's HOL*)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   172
lemma fun_cong: "(f::'a\<Rightarrow>'b) = g \<Longrightarrow> f(x)=g(x)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   173
  by simp
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   174
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   175
(*similar to AP_TERM in Gordon's HOL and FOL's subst_context*)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   176
lemma arg_cong: "x=y \<Longrightarrow> f(x)=f(y)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   177
  by simp
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   178
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   179
lemma abstractn: "(\<And>x. f(x) = g(x)) \<Longrightarrow> f = g"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   180
  apply (simp add: eq_iff)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   181
  apply (blast intro: po_abstractn)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   182
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   183
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   184
lemmas caseBs = caseBtrue caseBfalse caseBpair caseBlam caseBbot
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   185
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   186
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   187
subsection \<open>Termination and Divergence\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   188
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   189
lemma Trm_iff: "Trm(t) \<longleftrightarrow> \<not> t = bot"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   190
  by (simp add: Trm_def Dvg_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   191
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   192
lemma Dvg_iff: "Dvg(t) \<longleftrightarrow> t = bot"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   193
  by (simp add: Trm_def Dvg_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   194
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   195
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   196
subsection \<open>Constructors are injective\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   197
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   198
lemma eq_lemma: "\<lbrakk>x=a; y=b; x=y\<rbrakk> \<Longrightarrow> a=b"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   199
  by simp
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   200
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   201
ML \<open>
32154
9721e8e4d48c eliminated adhoc ML code;
wenzelm
parents: 32153
diff changeset
   202
  fun inj_rl_tac ctxt rews i =
24825
c4f13ab78f9d avoid unnamed infixes;
wenzelm
parents: 20140
diff changeset
   203
    let
c4f13ab78f9d avoid unnamed infixes;
wenzelm
parents: 20140
diff changeset
   204
      fun mk_inj_lemmas r = [@{thm arg_cong}] RL [r RS (r RS @{thm eq_lemma})]
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32149
diff changeset
   205
      val inj_lemmas = maps mk_inj_lemmas rews
32154
9721e8e4d48c eliminated adhoc ML code;
wenzelm
parents: 32153
diff changeset
   206
    in
59499
14095f771781 misc tuning;
wenzelm
parents: 59498
diff changeset
   207
      CHANGED (REPEAT (assume_tac ctxt i ORELSE
14095f771781 misc tuning;
wenzelm
parents: 59498
diff changeset
   208
        resolve_tac ctxt @{thms iffI allI conjI} i ORELSE
59498
50b60f501b05 proper context for resolve_tac, eresolve_tac, dresolve_tac, forward_tac etc.;
wenzelm
parents: 58977
diff changeset
   209
        eresolve_tac ctxt inj_lemmas i ORELSE
51717
9e7d1c139569 simplifier uses proper Proof.context instead of historic type simpset;
wenzelm
parents: 51670
diff changeset
   210
        asm_simp_tac (ctxt addsimps rews) i))
32154
9721e8e4d48c eliminated adhoc ML code;
wenzelm
parents: 32153
diff changeset
   211
    end;
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   212
\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   213
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   214
method_setup inj_rl = \<open>
32154
9721e8e4d48c eliminated adhoc ML code;
wenzelm
parents: 32153
diff changeset
   215
  Attrib.thms >> (fn rews => fn ctxt => SIMPLE_METHOD' (inj_rl_tac ctxt rews))
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   216
\<close>
32154
9721e8e4d48c eliminated adhoc ML code;
wenzelm
parents: 32153
diff changeset
   217
9721e8e4d48c eliminated adhoc ML code;
wenzelm
parents: 32153
diff changeset
   218
lemma ccl_injs:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   219
  "<a,b> = <a',b'> \<longleftrightarrow> (a=a' \<and> b=b')"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   220
  "\<And>b b'. (lam x. b(x) = lam x. b'(x)) \<longleftrightarrow> ((ALL z. b(z)=b'(z)))"
32154
9721e8e4d48c eliminated adhoc ML code;
wenzelm
parents: 32153
diff changeset
   221
  by (inj_rl caseBs)
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   222
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   223
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   224
lemma pair_inject: "<a,b> = <a',b'> \<Longrightarrow> (a = a' \<Longrightarrow> b = b' \<Longrightarrow> R) \<Longrightarrow> R"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   225
  by (simp add: ccl_injs)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   226
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   227
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   228
subsection \<open>Constructors are distinct\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   229
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   230
lemma lem: "t=t' \<Longrightarrow> case(t,b,c,d,e) = case(t',b,c,d,e)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   231
  by simp
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   232
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   233
ML \<open>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   234
local
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   235
  fun pairs_of f x [] = []
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   236
    | pairs_of f x (y::ys) = (f x y) :: (f y x) :: (pairs_of f x ys)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   237
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   238
  fun mk_combs ff [] = []
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   239
    | mk_combs ff (x::xs) = (pairs_of ff x xs) @ mk_combs ff xs
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   240
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   241
  (* Doesn't handle binder types correctly *)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   242
  fun saturate thy sy name =
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   243
       let fun arg_str 0 a s = s
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   244
         | arg_str 1 a s = "(" ^ a ^ "a" ^ s ^ ")"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   245
         | arg_str n a s = arg_str (n-1) a ("," ^ a ^ (chr((ord "a")+n-1)) ^ s)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   246
           val T = Sign.the_const_type thy (Sign.intern_const thy sy);
40844
5895c525739d more direct use of binder_types/body_type;
wenzelm
parents: 39159
diff changeset
   247
           val arity = length (binder_types T)
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   248
       in sy ^ (arg_str arity name "") end
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   249
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   250
  fun mk_thm_str thy a b = "\<not> " ^ (saturate thy a "a") ^ " = " ^ (saturate thy b "b")
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   251
39159
0dec18004e75 more antiquotations;
wenzelm
parents: 36452
diff changeset
   252
  val lemma = @{thm lem};
0dec18004e75 more antiquotations;
wenzelm
parents: 36452
diff changeset
   253
  val eq_lemma = @{thm eq_lemma};
0dec18004e75 more antiquotations;
wenzelm
parents: 36452
diff changeset
   254
  val distinctness = @{thm distinctness};
42480
f4f011d1bf0b proper antiquotations;
wenzelm
parents: 42156
diff changeset
   255
  fun mk_lemma (ra,rb) =
f4f011d1bf0b proper antiquotations;
wenzelm
parents: 42156
diff changeset
   256
    [lemma] RL [ra RS (rb RS eq_lemma)] RL
f4f011d1bf0b proper antiquotations;
wenzelm
parents: 42156
diff changeset
   257
    [distinctness RS @{thm notE}, @{thm sym} RS (distinctness RS @{thm notE})]
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   258
in
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32149
diff changeset
   259
  fun mk_lemmas rls = maps mk_lemma (mk_combs pair rls)
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   260
  fun mk_dstnct_rls thy xs = mk_combs (mk_thm_str thy) xs
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   261
end
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   262
\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   263
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   264
ML \<open>
32010
cb1a1c94b4cd more antiquotations;
wenzelm
parents: 27239
diff changeset
   265
val caseB_lemmas = mk_lemmas @{thms caseBs}
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   266
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   267
val ccl_dstncts =
32175
a89979440d2c eliminated OldGoals.prove_goal;
wenzelm
parents: 32174
diff changeset
   268
  let
a89979440d2c eliminated OldGoals.prove_goal;
wenzelm
parents: 32174
diff changeset
   269
    fun mk_raw_dstnct_thm rls s =
a89979440d2c eliminated OldGoals.prove_goal;
wenzelm
parents: 32174
diff changeset
   270
      Goal.prove_global @{theory} [] [] (Syntax.read_prop_global @{theory} s)
60754
02924903a6fd prefer tactics with explicit context;
wenzelm
parents: 59780
diff changeset
   271
        (fn {context = ctxt, ...} => resolve_tac ctxt @{thms notI} 1 THEN eresolve_tac ctxt rls 1)
32175
a89979440d2c eliminated OldGoals.prove_goal;
wenzelm
parents: 32174
diff changeset
   272
  in map (mk_raw_dstnct_thm caseB_lemmas)
a89979440d2c eliminated OldGoals.prove_goal;
wenzelm
parents: 32174
diff changeset
   273
    (mk_dstnct_rls @{theory} ["bot","true","false","pair","lambda"]) end
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   274
51670
d721d21e6374 prefer local context;
wenzelm
parents: 51307
diff changeset
   275
fun mk_dstnct_thms ctxt defs inj_rls xs =
32175
a89979440d2c eliminated OldGoals.prove_goal;
wenzelm
parents: 32174
diff changeset
   276
  let
51670
d721d21e6374 prefer local context;
wenzelm
parents: 51307
diff changeset
   277
    val thy = Proof_Context.theory_of ctxt;
32175
a89979440d2c eliminated OldGoals.prove_goal;
wenzelm
parents: 32174
diff changeset
   278
    fun mk_dstnct_thm rls s =
51670
d721d21e6374 prefer local context;
wenzelm
parents: 51307
diff changeset
   279
      Goal.prove_global thy [] [] (Syntax.read_prop ctxt s)
32175
a89979440d2c eliminated OldGoals.prove_goal;
wenzelm
parents: 32174
diff changeset
   280
        (fn _ =>
54742
7a86358a3c0b proper context for basic Simplifier operations: rewrite_rule, rewrite_goals_rule, rewrite_goals_tac etc.;
wenzelm
parents: 51717
diff changeset
   281
          rewrite_goals_tac ctxt defs THEN
51717
9e7d1c139569 simplifier uses proper Proof.context instead of historic type simpset;
wenzelm
parents: 51670
diff changeset
   282
          simp_tac (ctxt addsimps (rls @ inj_rls)) 1)
32149
ef59550a55d3 renamed simpset_of to global_simpset_of, and local_simpset_of to simpset_of -- same for claset and clasimpset;
wenzelm
parents: 32010
diff changeset
   283
  in map (mk_dstnct_thm ccl_dstncts) (mk_dstnct_rls thy xs) end
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   284
51670
d721d21e6374 prefer local context;
wenzelm
parents: 51307
diff changeset
   285
fun mkall_dstnct_thms ctxt defs i_rls xss = maps (mk_dstnct_thms ctxt defs i_rls) xss
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   286
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   287
(*** Rewriting and Proving ***)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   288
42480
f4f011d1bf0b proper antiquotations;
wenzelm
parents: 42156
diff changeset
   289
fun XH_to_I rl = rl RS @{thm iffD2}
f4f011d1bf0b proper antiquotations;
wenzelm
parents: 42156
diff changeset
   290
fun XH_to_D rl = rl RS @{thm iffD1}
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   291
val XH_to_E = make_elim o XH_to_D
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   292
val XH_to_Is = map XH_to_I
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   293
val XH_to_Ds = map XH_to_D
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   294
val XH_to_Es = map XH_to_E;
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   295
56199
8e8d28ed7529 tuned signature -- rearranged modules;
wenzelm
parents: 55380
diff changeset
   296
ML_Thms.bind_thms ("ccl_rews", @{thms caseBs} @ @{thms ccl_injs} @ ccl_dstncts);
8e8d28ed7529 tuned signature -- rearranged modules;
wenzelm
parents: 55380
diff changeset
   297
ML_Thms.bind_thms ("ccl_dstnctsEs", ccl_dstncts RL [@{thm notE}]);
8e8d28ed7529 tuned signature -- rearranged modules;
wenzelm
parents: 55380
diff changeset
   298
ML_Thms.bind_thms ("ccl_injDs", XH_to_Ds @{thms ccl_injs});
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   299
\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   300
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   301
lemmas [simp] = ccl_rews
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   302
  and [elim!] = pair_inject ccl_dstnctsEs
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   303
  and [dest!] = ccl_injDs
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   304
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   305
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61966
diff changeset
   306
subsection \<open>Facts from gfp Definition of \<open>[=\<close> and \<open>=\<close>\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   307
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   308
lemma XHlemma1: "\<lbrakk>A=B; a:B \<longleftrightarrow> P\<rbrakk> \<Longrightarrow> a:A \<longleftrightarrow> P"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   309
  by simp
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   310
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   311
lemma XHlemma2: "(P(t,t') \<longleftrightarrow> Q) \<Longrightarrow> (<t,t'> : {p. \<exists>t t'. p=<t,t'> \<and>  P(t,t')} \<longleftrightarrow> Q)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   312
  by blast
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   313
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   314
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   315
subsection \<open>Pre-Order\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   316
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   317
lemma POgen_mono: "mono(\<lambda>X. POgen(X))"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   318
  apply (unfold POgen_def SIM_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   319
  apply (rule monoI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   320
  apply blast
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   321
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   322
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   323
lemma POgenXH:
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   324
  "<t,t'> : POgen(R) \<longleftrightarrow> t= bot | (t=true \<and> t'=true)  | (t=false \<and> t'=false) |
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   325
           (EX a a' b b'. t=<a,b> \<and> t'=<a',b'>  \<and> <a,a'> : R \<and> <b,b'> : R) |
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   326
           (EX f f'. t=lam x. f(x) \<and> t'=lam x. f'(x) \<and> (ALL x. <f(x),f'(x)> : R))"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   327
  apply (unfold POgen_def SIM_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   328
  apply (rule iff_refl [THEN XHlemma2])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   329
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   330
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   331
lemma poXH:
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   332
  "t [= t' \<longleftrightarrow> t=bot | (t=true \<and> t'=true) | (t=false \<and> t'=false) |
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   333
                 (EX a a' b b'. t=<a,b> \<and> t'=<a',b'>  \<and> a [= a' \<and> b [= b') |
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   334
                 (EX f f'. t=lam x. f(x) \<and> t'=lam x. f'(x) \<and> (ALL x. f(x) [= f'(x)))"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   335
  apply (simp add: PO_iff del: ex_simps)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   336
  apply (rule POgen_mono
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   337
    [THEN PO_def [THEN def_gfp_Tarski], THEN XHlemma1, unfolded POgen_def SIM_def])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   338
  apply (rule iff_refl [THEN XHlemma2])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   339
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   340
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   341
lemma po_bot: "bot [= b"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   342
  apply (rule poXH [THEN iffD2])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   343
  apply simp
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   344
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   345
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   346
lemma bot_poleast: "a [= bot \<Longrightarrow> a=bot"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   347
  apply (drule poXH [THEN iffD1])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   348
  apply simp
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   349
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   350
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   351
lemma po_pair: "<a,b> [= <a',b'> \<longleftrightarrow>  a [= a' \<and> b [= b'"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   352
  apply (rule poXH [THEN iff_trans])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   353
  apply simp
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   354
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   355
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   356
lemma po_lam: "lam x. f(x) [= lam x. f'(x) \<longleftrightarrow> (ALL x. f(x) [= f'(x))"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   357
  apply (rule poXH [THEN iff_trans])
47966
b8a94ed1646e eliminated obsolete fastsimp;
wenzelm
parents: 42814
diff changeset
   358
  apply fastforce
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   359
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   360
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   361
lemmas ccl_porews = po_bot po_pair po_lam
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   362
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   363
lemma case_pocong:
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   364
  assumes 1: "t [= t'"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   365
    and 2: "a [= a'"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   366
    and 3: "b [= b'"
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   367
    and 4: "\<And>x y. c(x,y) [= c'(x,y)"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   368
    and 5: "\<And>u. d(u) [= d'(u)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   369
  shows "case(t,a,b,c,d) [= case(t',a',b',c',d')"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   370
  apply (rule 1 [THEN po_cong, THEN po_trans])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   371
  apply (rule 2 [THEN po_cong, THEN po_trans])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   372
  apply (rule 3 [THEN po_cong, THEN po_trans])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   373
  apply (rule 4 [THEN po_abstractn, THEN po_abstractn, THEN po_cong, THEN po_trans])
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   374
  apply (rule_tac f1 = "\<lambda>d. case (t',a',b',c',d)" in
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   375
    5 [THEN po_abstractn, THEN po_cong, THEN po_trans])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   376
  apply (rule po_refl)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   377
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   378
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   379
lemma apply_pocong: "\<lbrakk>f [= f'; a [= a'\<rbrakk> \<Longrightarrow> f ` a [= f' ` a'"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   380
  unfolding ccl_data_defs
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   381
  apply (rule case_pocong, (rule po_refl | assumption)+)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   382
  apply (erule po_cong)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   383
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   384
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   385
lemma npo_lam_bot: "\<not> lam x. b(x) [= bot"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   386
  apply (rule notI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   387
  apply (drule bot_poleast)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   388
  apply (erule distinctness [THEN notE])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   389
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   390
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   391
lemma po_lemma: "\<lbrakk>x=a; y=b; x[=y\<rbrakk> \<Longrightarrow> a[=b"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   392
  by simp
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   393
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   394
lemma npo_pair_lam: "\<not> <a,b> [= lam x. f(x)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   395
  apply (rule notI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   396
  apply (rule npo_lam_bot [THEN notE])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   397
  apply (erule case_pocong [THEN caseBlam [THEN caseBpair [THEN po_lemma]]])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   398
  apply (rule po_refl npo_lam_bot)+
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   399
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   400
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   401
lemma npo_lam_pair: "\<not> lam x. f(x) [= <a,b>"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   402
  apply (rule notI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   403
  apply (rule npo_lam_bot [THEN notE])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   404
  apply (erule case_pocong [THEN caseBpair [THEN caseBlam [THEN po_lemma]]])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   405
  apply (rule po_refl npo_lam_bot)+
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   406
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   407
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32149
diff changeset
   408
lemma npo_rls1:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   409
  "\<not> true [= false"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   410
  "\<not> false [= true"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   411
  "\<not> true [= <a,b>"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   412
  "\<not> <a,b> [= true"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   413
  "\<not> true [= lam x. f(x)"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   414
  "\<not> lam x. f(x) [= true"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   415
  "\<not> false [= <a,b>"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   416
  "\<not> <a,b> [= false"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   417
  "\<not> false [= lam x. f(x)"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   418
  "\<not> lam x. f(x) [= false"
58971
8c9a319821b3 more Isar proof methods;
wenzelm
parents: 58889
diff changeset
   419
  by (rule notI, drule case_pocong, erule_tac [5] rev_mp, simp_all,
8c9a319821b3 more Isar proof methods;
wenzelm
parents: 58889
diff changeset
   420
    (rule po_refl npo_lam_bot)+)+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   421
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32149
diff changeset
   422
lemmas npo_rls = npo_pair_lam npo_lam_pair npo_rls1
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   423
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   424
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61966
diff changeset
   425
subsection \<open>Coinduction for \<open>[=\<close>\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   426
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   427
lemma po_coinduct: "\<lbrakk><t,u> : R; R <= POgen(R)\<rbrakk> \<Longrightarrow> t [= u"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   428
  apply (rule PO_def [THEN def_coinduct, THEN PO_iff [THEN iffD2]])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   429
   apply assumption+
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   430
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   431
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   432
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   433
subsection \<open>Equality\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   434
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   435
lemma EQgen_mono: "mono(\<lambda>X. EQgen(X))"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   436
  apply (unfold EQgen_def SIM_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   437
  apply (rule monoI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   438
  apply blast
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   439
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   440
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   441
lemma EQgenXH:
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   442
  "<t,t'> : EQgen(R) \<longleftrightarrow> (t=bot \<and> t'=bot)  | (t=true \<and> t'=true)  |
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   443
                                             (t=false \<and> t'=false) |
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   444
                 (EX a a' b b'. t=<a,b> \<and> t'=<a',b'>  \<and> <a,a'> : R \<and> <b,b'> : R) |
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   445
                 (EX f f'. t=lam x. f(x) \<and> t'=lam x. f'(x) \<and> (ALL x.<f(x),f'(x)> : R))"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   446
  apply (unfold EQgen_def SIM_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   447
  apply (rule iff_refl [THEN XHlemma2])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   448
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   449
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   450
lemma eqXH:
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   451
  "t=t' \<longleftrightarrow> (t=bot \<and> t'=bot)  | (t=true \<and> t'=true)  | (t=false \<and> t'=false) |
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   452
                     (EX a a' b b'. t=<a,b> \<and> t'=<a',b'>  \<and> a=a' \<and> b=b') |
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   453
                     (EX f f'. t=lam x. f(x) \<and> t'=lam x. f'(x) \<and> (ALL x. f(x)=f'(x)))"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   454
  apply (subgoal_tac "<t,t'> : EQ \<longleftrightarrow>
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   455
    (t=bot \<and> t'=bot) | (t=true \<and> t'=true) | (t=false \<and> t'=false) |
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   456
    (EX a a' b b'. t=<a,b> \<and> t'=<a',b'> \<and> <a,a'> : EQ \<and> <b,b'> : EQ) |
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   457
    (EX f f'. t=lam x. f (x) \<and> t'=lam x. f' (x) \<and> (ALL x. <f (x) ,f' (x) > : EQ))")
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   458
  apply (erule rev_mp)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   459
  apply (simp add: EQ_iff [THEN iff_sym])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   460
  apply (rule EQgen_mono [THEN EQ_def [THEN def_gfp_Tarski], THEN XHlemma1,
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   461
    unfolded EQgen_def SIM_def])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   462
  apply (rule iff_refl [THEN XHlemma2])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   463
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   464
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   465
lemma eq_coinduct: "\<lbrakk><t,u> : R; R <= EQgen(R)\<rbrakk> \<Longrightarrow> t = u"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   466
  apply (rule EQ_def [THEN def_coinduct, THEN EQ_iff [THEN iffD2]])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   467
   apply assumption+
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   468
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   469
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   470
lemma eq_coinduct3:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   471
  "\<lbrakk><t,u> : R;  R <= EQgen(lfp(\<lambda>x. EQgen(x) Un R Un EQ))\<rbrakk> \<Longrightarrow> t = u"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   472
  apply (rule EQ_def [THEN def_coinduct3, THEN EQ_iff [THEN iffD2]])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   473
  apply (rule EQgen_mono | assumption)+
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   474
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   475
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   476
method_setup eq_coinduct3 = \<open>
63120
629a4c5e953e embedded content may be delimited via cartouches;
wenzelm
parents: 62143
diff changeset
   477
  Scan.lift Args.embedded_inner_syntax >> (fn s => fn ctxt =>
59763
56d2c357e6b5 tuned signature;
wenzelm
parents: 59755
diff changeset
   478
    SIMPLE_METHOD'
59780
23b67731f4f0 support 'for' fixes in rule_tac etc.;
wenzelm
parents: 59763
diff changeset
   479
      (Rule_Insts.res_inst_tac ctxt [((("R", 0), Position.none), s)] [] @{thm eq_coinduct3}))
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   480
\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   481
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   482
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60754
diff changeset
   483
subsection \<open>Untyped Case Analysis and Other Facts\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   484
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   485
lemma cond_eta: "(EX f. t=lam x. f(x)) \<Longrightarrow> t = lam x.(t ` x)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   486
  by (auto simp: apply_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   487
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   488
lemma exhaustion: "(t=bot) | (t=true) | (t=false) | (EX a b. t=<a,b>) | (EX f. t=lam x. f(x))"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   489
  apply (cut_tac refl [THEN eqXH [THEN iffD1]])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   490
  apply blast
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   491
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   492
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   493
lemma term_case:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   494
  "\<lbrakk>P(bot); P(true); P(false); \<And>x y. P(<x,y>); \<And>b. P(lam x. b(x))\<rbrakk> \<Longrightarrow> P(t)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   495
  using exhaustion [of t] by blast
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
   496
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3837
diff changeset
   497
end