src/ZF/QUniv.thy
author paulson
Tue, 02 Jul 2002 22:46:23 +0200
changeset 13285 28d1823ce0f2
parent 13220 62c899c77151
child 13356 c9cfe1638bf2
permissions -rw-r--r--
conversion of QPair to Isar
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6093
87bf8c03b169 eliminated global/local names;
wenzelm
parents: 3940
diff changeset
     1
(*  Title:      ZF/QUniv.thy
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
    Copyright   1993  University of Cambridge
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
13285
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
     6
A small universe for lazy recursive types
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
13285
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
     9
(** Properties involving Transset and Sum **)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    10
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    11
theory QUniv = Univ + QPair + mono + equalities:
3923
c257b82a1200 global;
wenzelm
parents: 2469
diff changeset
    12
6112
5e4871c5136b datatype package improvements
paulson
parents: 6093
diff changeset
    13
(*Disjoint sums as a datatype*)
5e4871c5136b datatype package improvements
paulson
parents: 6093
diff changeset
    14
rep_datatype 
13285
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    15
  elimination	sumE
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    16
  induction	TrueI
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    17
  case_eqns	case_Inl case_Inr
6112
5e4871c5136b datatype package improvements
paulson
parents: 6093
diff changeset
    18
5e4871c5136b datatype package improvements
paulson
parents: 6093
diff changeset
    19
(*Variant disjoint sums as a datatype*)
5e4871c5136b datatype package improvements
paulson
parents: 6093
diff changeset
    20
rep_datatype 
13285
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    21
  elimination	qsumE
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    22
  induction	TrueI
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    23
  case_eqns	qcase_QInl qcase_QInr
6112
5e4871c5136b datatype package improvements
paulson
parents: 6093
diff changeset
    24
6093
87bf8c03b169 eliminated global/local names;
wenzelm
parents: 3940
diff changeset
    25
constdefs
13220
62c899c77151 tidying
paulson
parents: 6112
diff changeset
    26
  quniv :: "i => i"
6112
5e4871c5136b datatype package improvements
paulson
parents: 6093
diff changeset
    27
   "quniv(A) == Pow(univ(eclose(A)))"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    28
13285
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    29
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    30
lemma Transset_includes_summands:
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    31
     "[| Transset(C); A+B <= C |] ==> A <= C & B <= C"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    32
apply (simp add: sum_def Un_subset_iff) 
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    33
apply (blast dest: Transset_includes_range)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    34
done
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    35
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    36
lemma Transset_sum_Int_subset:
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    37
     "Transset(C) ==> (A+B) Int C <= (A Int C) + (B Int C)"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    38
apply (simp add: sum_def Int_Un_distrib2) 
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    39
apply (blast dest: Transset_Pair_D)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    40
done
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    41
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    42
(** Introduction and elimination rules avoid tiresome folding/unfolding **)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    43
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    44
lemma qunivI: "X <= univ(eclose(A)) ==> X : quniv(A)"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    45
by (simp add: quniv_def)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    46
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    47
lemma qunivD: "X : quniv(A) ==> X <= univ(eclose(A))"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    48
by (simp add: quniv_def)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    49
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    50
lemma quniv_mono: "A<=B ==> quniv(A) <= quniv(B)"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    51
apply (unfold quniv_def)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    52
apply (erule eclose_mono [THEN univ_mono, THEN Pow_mono])
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    53
done
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    54
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    55
(*** Closure properties ***)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    56
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    57
lemma univ_eclose_subset_quniv: "univ(eclose(A)) <= quniv(A)"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    58
apply (simp add: quniv_def Transset_iff_Pow [symmetric]) 
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    59
apply (rule Transset_eclose [THEN Transset_univ])
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    60
done
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    61
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    62
(*Key property for proving A_subset_quniv; requires eclose in def of quniv*)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    63
lemma univ_subset_quniv: "univ(A) <= quniv(A)"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    64
apply (rule arg_subset_eclose [THEN univ_mono, THEN subset_trans])
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    65
apply (rule univ_eclose_subset_quniv)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    66
done
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    67
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    68
lemmas univ_into_quniv = univ_subset_quniv [THEN subsetD, standard]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    69
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    70
lemma Pow_univ_subset_quniv: "Pow(univ(A)) <= quniv(A)"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    71
apply (unfold quniv_def)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    72
apply (rule arg_subset_eclose [THEN univ_mono, THEN Pow_mono])
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    73
done
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    74
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    75
lemmas univ_subset_into_quniv =
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    76
    PowI [THEN Pow_univ_subset_quniv [THEN subsetD], standard]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    77
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    78
lemmas zero_in_quniv = zero_in_univ [THEN univ_into_quniv, standard]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    79
lemmas one_in_quniv = one_in_univ [THEN univ_into_quniv, standard]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    80
lemmas two_in_quniv = two_in_univ [THEN univ_into_quniv, standard]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    81
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    82
lemmas A_subset_quniv =  subset_trans [OF A_subset_univ univ_subset_quniv]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    83
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    84
lemmas A_into_quniv = A_subset_quniv [THEN subsetD, standard]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    85
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    86
(*** univ(A) closure for Quine-inspired pairs and injections ***)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    87
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    88
(*Quine ordered pairs*)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    89
lemma QPair_subset_univ: 
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    90
    "[| a <= univ(A);  b <= univ(A) |] ==> <a;b> <= univ(A)"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    91
by (simp add: QPair_def sum_subset_univ)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    92
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    93
(** Quine disjoint sum **)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    94
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    95
lemma QInl_subset_univ: "a <= univ(A) ==> QInl(a) <= univ(A)"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    96
apply (unfold QInl_def)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    97
apply (erule empty_subsetI [THEN QPair_subset_univ])
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    98
done
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
    99
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   100
lemmas naturals_subset_nat = 
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   101
    Ord_nat [THEN Ord_is_Transset, unfolded Transset_def, THEN bspec, standard]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   102
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   103
lemmas naturals_subset_univ =
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   104
    subset_trans [OF naturals_subset_nat nat_subset_univ]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   105
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   106
lemma QInr_subset_univ: "a <= univ(A) ==> QInr(a) <= univ(A)"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   107
apply (unfold QInr_def)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   108
apply (erule nat_1I [THEN naturals_subset_univ, THEN QPair_subset_univ])
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   109
done
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   110
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   111
(*** Closure for Quine-inspired products and sums ***)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   112
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   113
(*Quine ordered pairs*)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   114
lemma QPair_in_quniv: 
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   115
    "[| a: quniv(A);  b: quniv(A) |] ==> <a;b> : quniv(A)"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   116
by (simp add: quniv_def QPair_def sum_subset_univ) 
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   117
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   118
lemma QSigma_quniv: "quniv(A) <*> quniv(A) <= quniv(A)" 
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   119
by (blast intro: QPair_in_quniv)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   120
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   121
lemmas QSigma_subset_quniv =  subset_trans [OF QSigma_mono QSigma_quniv]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   122
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   123
(*The opposite inclusion*)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   124
lemma quniv_QPair_D: 
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   125
    "<a;b> : quniv(A) ==> a: quniv(A) & b: quniv(A)"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   126
apply (unfold quniv_def QPair_def)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   127
apply (rule Transset_includes_summands [THEN conjE]) 
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   128
apply (rule Transset_eclose [THEN Transset_univ])
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   129
apply (erule PowD, blast) 
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   130
done
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   131
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   132
lemmas quniv_QPair_E = quniv_QPair_D [THEN conjE, standard]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   133
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   134
lemma quniv_QPair_iff: "<a;b> : quniv(A) <-> a: quniv(A) & b: quniv(A)"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   135
by (blast intro: QPair_in_quniv dest: quniv_QPair_D)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   136
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   137
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   138
(** Quine disjoint sum **)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   139
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   140
lemma QInl_in_quniv: "a: quniv(A) ==> QInl(a) : quniv(A)"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   141
by (simp add: QInl_def zero_in_quniv QPair_in_quniv)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   142
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   143
lemma QInr_in_quniv: "b: quniv(A) ==> QInr(b) : quniv(A)"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   144
by (simp add: QInr_def one_in_quniv QPair_in_quniv)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   145
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   146
lemma qsum_quniv: "quniv(C) <+> quniv(C) <= quniv(C)"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   147
by (blast intro: QInl_in_quniv QInr_in_quniv)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   148
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   149
lemmas qsum_subset_quniv = subset_trans [OF qsum_mono qsum_quniv]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   150
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   151
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   152
(*** The natural numbers ***)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   153
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   154
lemmas nat_subset_quniv =  subset_trans [OF nat_subset_univ univ_subset_quniv]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   155
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   156
(* n:nat ==> n:quniv(A) *)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   157
lemmas nat_into_quniv = nat_subset_quniv [THEN subsetD, standard]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   158
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   159
lemmas bool_subset_quniv = subset_trans [OF bool_subset_univ univ_subset_quniv]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   160
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   161
lemmas bool_into_quniv = bool_subset_quniv [THEN subsetD, standard]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   162
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   163
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   164
(*** Intersecting <a;b> with Vfrom... ***)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   165
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   166
lemma QPair_Int_Vfrom_succ_subset: 
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   167
 "Transset(X) ==>           
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   168
       <a;b> Int Vfrom(X, succ(i))  <=  <a Int Vfrom(X,i);  b Int Vfrom(X,i)>"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   169
by (simp add: QPair_def sum_def Int_Un_distrib2 Un_mono
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   170
              product_Int_Vfrom_subset [THEN subset_trans]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   171
              Sigma_mono [OF Int_lower1 subset_refl])
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   172
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   173
(**** "Take-lemma" rules for proving a=b by coinduction and c: quniv(A) ****)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   174
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   175
(*Rule for level i -- preserving the level, not decreasing it*)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   176
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   177
lemma QPair_Int_Vfrom_subset: 
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   178
 "Transset(X) ==>           
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   179
       <a;b> Int Vfrom(X,i)  <=  <a Int Vfrom(X,i);  b Int Vfrom(X,i)>"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   180
apply (unfold QPair_def)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   181
apply (erule Transset_Vfrom [THEN Transset_sum_Int_subset])
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   182
done
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   183
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   184
(*[| a Int Vset(i) <= c; b Int Vset(i) <= d |] ==> <a;b> Int Vset(i) <= <c;d>*)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   185
lemmas QPair_Int_Vset_subset_trans =
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   186
     subset_trans [OF Transset_0 [THEN QPair_Int_Vfrom_subset] QPair_mono]
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   187
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   188
lemma QPair_Int_Vset_subset_UN:
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   189
     "Ord(i) ==> <a;b> Int Vset(i) <= (UN j:i. <a Int Vset(j); b Int Vset(j)>)"
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   190
apply (erule Ord_cases)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   191
(*0 case*)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   192
apply (simp add: Vfrom_0)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   193
(*succ(j) case*)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   194
apply (erule ssubst) 
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   195
apply (rule Transset_0 [THEN QPair_Int_Vfrom_succ_subset, THEN subset_trans])
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   196
apply (rule succI1 [THEN UN_upper])
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   197
(*Limit(i) case*)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   198
apply (simp del: UN_simps 
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   199
        add: Limit_Vfrom_eq Int_UN_distrib UN_mono QPair_Int_Vset_subset_trans)
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   200
done
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   201
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   202
ML
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   203
{*
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   204
val Transset_includes_summands = thm "Transset_includes_summands";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   205
val Transset_sum_Int_subset = thm "Transset_sum_Int_subset";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   206
val qunivI = thm "qunivI";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   207
val qunivD = thm "qunivD";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   208
val quniv_mono = thm "quniv_mono";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   209
val univ_eclose_subset_quniv = thm "univ_eclose_subset_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   210
val univ_subset_quniv = thm "univ_subset_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   211
val univ_into_quniv = thm "univ_into_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   212
val Pow_univ_subset_quniv = thm "Pow_univ_subset_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   213
val univ_subset_into_quniv = thm "univ_subset_into_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   214
val zero_in_quniv = thm "zero_in_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   215
val one_in_quniv = thm "one_in_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   216
val two_in_quniv = thm "two_in_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   217
val A_subset_quniv = thm "A_subset_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   218
val A_into_quniv = thm "A_into_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   219
val QPair_subset_univ = thm "QPair_subset_univ";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   220
val QInl_subset_univ = thm "QInl_subset_univ";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   221
val naturals_subset_nat = thm "naturals_subset_nat";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   222
val naturals_subset_univ = thm "naturals_subset_univ";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   223
val QInr_subset_univ = thm "QInr_subset_univ";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   224
val QPair_in_quniv = thm "QPair_in_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   225
val QSigma_quniv = thm "QSigma_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   226
val QSigma_subset_quniv = thm "QSigma_subset_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   227
val quniv_QPair_D = thm "quniv_QPair_D";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   228
val quniv_QPair_E = thm "quniv_QPair_E";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   229
val quniv_QPair_iff = thm "quniv_QPair_iff";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   230
val QInl_in_quniv = thm "QInl_in_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   231
val QInr_in_quniv = thm "QInr_in_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   232
val qsum_quniv = thm "qsum_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   233
val qsum_subset_quniv = thm "qsum_subset_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   234
val nat_subset_quniv = thm "nat_subset_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   235
val nat_into_quniv = thm "nat_into_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   236
val bool_subset_quniv = thm "bool_subset_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   237
val bool_into_quniv = thm "bool_into_quniv";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   238
val QPair_Int_Vfrom_succ_subset = thm "QPair_Int_Vfrom_succ_subset";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   239
val QPair_Int_Vfrom_subset = thm "QPair_Int_Vfrom_subset";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   240
val QPair_Int_Vset_subset_trans = thm "QPair_Int_Vset_subset_trans";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   241
val QPair_Int_Vset_subset_UN = thm "QPair_Int_Vset_subset_UN";
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   242
*}
28d1823ce0f2 conversion of QPair to Isar
paulson
parents: 13220
diff changeset
   243
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   244
end