src/HOL/Univ.ML
author wenzelm
Thu Mar 11 13:20:35 1999 +0100 (1999-03-11)
changeset 6349 f7750d816c21
parent 6171 cd237a10cbf8
child 7014 11ee650edcd2
permissions -rw-r--r--
removed foo_build_completed -- now handled by session management (via usedir);
     1 (*  Title:      HOL/Univ
     2     ID:         $Id$
     3     Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
     4     Copyright   1991  University of Cambridge
     5 *)
     6 
     7 (** apfst -- can be used in similar type definitions **)
     8 
     9 Goalw [apfst_def] "apfst f (a,b) = (f(a),b)";
    10 by (rtac split 1);
    11 qed "apfst_conv";
    12 
    13 val [major,minor] = Goal
    14     "[| q = apfst f p;  !!x y. [| p = (x,y);  q = (f(x),y) |] ==> R \
    15 \    |] ==> R";
    16 by (rtac PairE 1);
    17 by (rtac minor 1);
    18 by (assume_tac 1);
    19 by (rtac (major RS trans) 1);
    20 by (etac ssubst 1);
    21 by (rtac apfst_conv 1);
    22 qed "apfst_convE";
    23 
    24 (** Push -- an injection, analogous to Cons on lists **)
    25 
    26 Goalw [Push_def] "Push i f = Push j g  ==> i=j";
    27 by (etac (fun_cong RS box_equals RS Suc_inject) 1);
    28 by (rtac nat_case_0 1);
    29 by (rtac nat_case_0 1);
    30 qed "Push_inject1";
    31 
    32 Goalw [Push_def] "Push i f = Push j g  ==> f=g";
    33 by (rtac (ext RS box_equals) 1);
    34 by (etac fun_cong 1);
    35 by (rtac (nat_case_Suc RS ext) 1);
    36 by (rtac (nat_case_Suc RS ext) 1);
    37 qed "Push_inject2";
    38 
    39 val [major,minor] = Goal
    40     "[| Push i f =Push j g;  [| i=j;  f=g |] ==> P \
    41 \    |] ==> P";
    42 by (rtac ((major RS Push_inject2) RS ((major RS Push_inject1) RS minor)) 1);
    43 qed "Push_inject";
    44 
    45 Goalw [Push_def] "Push k f =(%z.0) ==> P";
    46 by (etac (fun_cong RS box_equals RS Suc_neq_Zero) 1);
    47 by (rtac nat_case_0 1);
    48 by (rtac refl 1);
    49 qed "Push_neq_K0";
    50 
    51 (*** Isomorphisms ***)
    52 
    53 Goal "inj(Rep_Node)";
    54 by (rtac inj_inverseI 1);       (*cannot combine by RS: multiple unifiers*)
    55 by (rtac Rep_Node_inverse 1);
    56 qed "inj_Rep_Node";
    57 
    58 Goal "inj_on Abs_Node Node";
    59 by (rtac inj_on_inverseI 1);
    60 by (etac Abs_Node_inverse 1);
    61 qed "inj_on_Abs_Node";
    62 
    63 val Abs_Node_inject = inj_on_Abs_Node RS inj_onD;
    64 
    65 
    66 (*** Introduction rules for Node ***)
    67 
    68 Goalw [Node_def] "(%k. 0,a) : Node";
    69 by (Blast_tac 1);
    70 qed "Node_K0_I";
    71 
    72 Goalw [Node_def,Push_def]
    73     "p: Node ==> apfst (Push i) p : Node";
    74 by (blast_tac (claset() addSIs [apfst_conv, nat_case_Suc RS trans]) 1);
    75 qed "Node_Push_I";
    76 
    77 
    78 (*** Distinctness of constructors ***)
    79 
    80 (** Scons vs Atom **)
    81 
    82 Goalw [Atom_def,Scons_def,Push_Node_def] "Scons M N ~= Atom(a)";
    83 by (rtac notI 1);
    84 by (etac (equalityD2 RS subsetD RS UnE) 1);
    85 by (rtac singletonI 1);
    86 by (REPEAT (eresolve_tac [imageE, Abs_Node_inject RS apfst_convE, 
    87                           Pair_inject, sym RS Push_neq_K0] 1
    88      ORELSE resolve_tac [Node_K0_I, Rep_Node RS Node_Push_I] 1));
    89 qed "Scons_not_Atom";
    90 bind_thm ("Atom_not_Scons", Scons_not_Atom RS not_sym);
    91 
    92 
    93 (*** Injectiveness ***)
    94 
    95 (** Atomic nodes **)
    96 
    97 Goalw [Atom_def] "inj(Atom)";
    98 by (blast_tac (claset() addSIs [injI, Node_K0_I] addSDs [Abs_Node_inject]) 1);
    99 qed "inj_Atom";
   100 val Atom_inject = inj_Atom RS injD;
   101 
   102 Goal "(Atom(a)=Atom(b)) = (a=b)";
   103 by (blast_tac (claset() addSDs [Atom_inject]) 1);
   104 qed "Atom_Atom_eq";
   105 AddIffs [Atom_Atom_eq];
   106 
   107 Goalw [Leaf_def,o_def] "inj(Leaf)";
   108 by (rtac injI 1);
   109 by (etac (Atom_inject RS Inl_inject) 1);
   110 qed "inj_Leaf";
   111 
   112 bind_thm ("Leaf_inject", inj_Leaf RS injD);
   113 AddSDs [Leaf_inject];
   114 
   115 Goalw [Numb_def,o_def] "inj(Numb)";
   116 by (rtac injI 1);
   117 by (etac (Atom_inject RS Inr_inject) 1);
   118 qed "inj_Numb";
   119 
   120 val Numb_inject = inj_Numb RS injD;
   121 AddSDs [Numb_inject];
   122 
   123 (** Injectiveness of Push_Node **)
   124 
   125 val [major,minor] = Goalw [Push_Node_def]
   126     "[| Push_Node i m =Push_Node j n;  [| i=j;  m=n |] ==> P \
   127 \    |] ==> P";
   128 by (rtac (major RS Abs_Node_inject RS apfst_convE) 1);
   129 by (REPEAT (resolve_tac [Rep_Node RS Node_Push_I] 1));
   130 by (etac (sym RS apfst_convE) 1);
   131 by (rtac minor 1);
   132 by (etac Pair_inject 1);
   133 by (etac (Push_inject1 RS sym) 1);
   134 by (rtac (inj_Rep_Node RS injD) 1);
   135 by (etac trans 1);
   136 by (safe_tac (claset() addSEs [Push_inject,sym]));
   137 qed "Push_Node_inject";
   138 
   139 
   140 (** Injectiveness of Scons **)
   141 
   142 Goalw [Scons_def] "Scons M N <= Scons M' N' ==> M<=M'";
   143 by (blast_tac (claset() addSDs [Push_Node_inject]) 1);
   144 qed "Scons_inject_lemma1";
   145 
   146 Goalw [Scons_def] "Scons M N <= Scons M' N' ==> N<=N'";
   147 by (blast_tac (claset() addSDs [Push_Node_inject]) 1);
   148 qed "Scons_inject_lemma2";
   149 
   150 Goal "Scons M N = Scons M' N' ==> M=M'";
   151 by (etac equalityE 1);
   152 by (REPEAT (ares_tac [equalityI, Scons_inject_lemma1] 1));
   153 qed "Scons_inject1";
   154 
   155 Goal "Scons M N = Scons M' N' ==> N=N'";
   156 by (etac equalityE 1);
   157 by (REPEAT (ares_tac [equalityI, Scons_inject_lemma2] 1));
   158 qed "Scons_inject2";
   159 
   160 val [major,minor] = Goal
   161     "[| Scons M N = Scons M' N';  [| M=M';  N=N' |] ==> P \
   162 \    |] ==> P";
   163 by (rtac ((major RS Scons_inject2) RS ((major RS Scons_inject1) RS minor)) 1);
   164 qed "Scons_inject";
   165 
   166 Goal "(Scons M N = Scons M' N') = (M=M' & N=N')";
   167 by (blast_tac (claset() addSEs [Scons_inject]) 1);
   168 qed "Scons_Scons_eq";
   169 
   170 (*** Distinctness involving Leaf and Numb ***)
   171 
   172 (** Scons vs Leaf **)
   173 
   174 Goalw [Leaf_def,o_def] "Scons M N ~= Leaf(a)";
   175 by (rtac Scons_not_Atom 1);
   176 qed "Scons_not_Leaf";
   177 bind_thm ("Leaf_not_Scons", Scons_not_Leaf RS not_sym);
   178 
   179 AddIffs [Scons_not_Leaf, Leaf_not_Scons];
   180 
   181 
   182 (** Scons vs Numb **)
   183 
   184 Goalw [Numb_def,o_def] "Scons M N ~= Numb(k)";
   185 by (rtac Scons_not_Atom 1);
   186 qed "Scons_not_Numb";
   187 bind_thm ("Numb_not_Scons", Scons_not_Numb RS not_sym);
   188 
   189 AddIffs [Scons_not_Numb, Numb_not_Scons];
   190 
   191 
   192 (** Leaf vs Numb **)
   193 
   194 Goalw [Leaf_def,Numb_def] "Leaf(a) ~= Numb(k)";
   195 by (simp_tac (simpset() addsimps [Inl_not_Inr]) 1);
   196 qed "Leaf_not_Numb";
   197 bind_thm ("Numb_not_Leaf", Leaf_not_Numb RS not_sym);
   198 
   199 AddIffs [Leaf_not_Numb, Numb_not_Leaf];
   200 
   201 
   202 (*** ndepth -- the depth of a node ***)
   203 
   204 Addsimps [apfst_conv];
   205 AddIffs  [Scons_not_Atom, Atom_not_Scons, Scons_Scons_eq];
   206 
   207 
   208 Goalw [ndepth_def] "ndepth (Abs_Node((%k.0, x))) = 0";
   209 by (EVERY1[stac (Node_K0_I RS Abs_Node_inverse), stac split]);
   210 by (rtac Least_equality 1);
   211 by (rtac refl 1);
   212 by (etac less_zeroE 1);
   213 qed "ndepth_K0";
   214 
   215 Goal "k < Suc(LEAST x. f(x)=0) --> 0 < nat_case (Suc i) f k";
   216 by (nat_ind_tac "k" 1);
   217 by (ALLGOALS Simp_tac);
   218 by (rtac impI 1);
   219 by (dtac not_less_Least 1);
   220 by (Asm_full_simp_tac 1);
   221 val lemma = result();
   222 
   223 Goalw [ndepth_def,Push_Node_def]
   224     "ndepth (Push_Node i n) = Suc(ndepth(n))";
   225 by (stac (Rep_Node RS Node_Push_I RS Abs_Node_inverse) 1);
   226 by (cut_facts_tac [rewrite_rule [Node_def] Rep_Node] 1);
   227 by Safe_tac;
   228 by (etac ssubst 1);  (*instantiates type variables!*)
   229 by (Simp_tac 1);
   230 by (rtac Least_equality 1);
   231 by (rewtac Push_def);
   232 by (rtac (nat_case_Suc RS trans) 1);
   233 by (etac LeastI 1);
   234 by (asm_simp_tac (simpset() addsimps [lemma]) 1);
   235 qed "ndepth_Push_Node";
   236 
   237 
   238 (*** ntrunc applied to the various node sets ***)
   239 
   240 Goalw [ntrunc_def] "ntrunc 0 M = {}";
   241 by (Blast_tac 1);
   242 qed "ntrunc_0";
   243 
   244 Goalw [Atom_def,ntrunc_def] "ntrunc (Suc k) (Atom a) = Atom(a)";
   245 by (fast_tac (claset() addss (simpset() addsimps [ndepth_K0])) 1);
   246 qed "ntrunc_Atom";
   247 
   248 Goalw [Leaf_def,o_def] "ntrunc (Suc k) (Leaf a) = Leaf(a)";
   249 by (rtac ntrunc_Atom 1);
   250 qed "ntrunc_Leaf";
   251 
   252 Goalw [Numb_def,o_def] "ntrunc (Suc k) (Numb i) = Numb(i)";
   253 by (rtac ntrunc_Atom 1);
   254 qed "ntrunc_Numb";
   255 
   256 Goalw [Scons_def,ntrunc_def]
   257     "ntrunc (Suc k) (Scons M N) = Scons (ntrunc k M) (ntrunc k N)";
   258 by (safe_tac (claset() addSIs [imageI]));
   259 by (REPEAT (stac ndepth_Push_Node 3 THEN etac Suc_mono 3));
   260 by (REPEAT (rtac Suc_less_SucD 1 THEN 
   261             rtac (ndepth_Push_Node RS subst) 1 THEN 
   262             assume_tac 1));
   263 qed "ntrunc_Scons";
   264 
   265 Addsimps [ntrunc_0, ntrunc_Atom, ntrunc_Leaf, ntrunc_Numb, ntrunc_Scons];
   266 
   267 
   268 (** Injection nodes **)
   269 
   270 Goalw [In0_def] "ntrunc (Suc 0) (In0 M) = {}";
   271 by (Simp_tac 1);
   272 by (rewtac Scons_def);
   273 by (Blast_tac 1);
   274 qed "ntrunc_one_In0";
   275 
   276 Goalw [In0_def]
   277     "ntrunc (Suc (Suc k)) (In0 M) = In0 (ntrunc (Suc k) M)";
   278 by (Simp_tac 1);
   279 qed "ntrunc_In0";
   280 
   281 Goalw [In1_def] "ntrunc (Suc 0) (In1 M) = {}";
   282 by (Simp_tac 1);
   283 by (rewtac Scons_def);
   284 by (Blast_tac 1);
   285 qed "ntrunc_one_In1";
   286 
   287 Goalw [In1_def]
   288     "ntrunc (Suc (Suc k)) (In1 M) = In1 (ntrunc (Suc k) M)";
   289 by (Simp_tac 1);
   290 qed "ntrunc_In1";
   291 
   292 Addsimps [ntrunc_one_In0, ntrunc_In0, ntrunc_one_In1, ntrunc_In1];
   293 
   294 
   295 (*** Cartesian Product ***)
   296 
   297 Goalw [uprod_def] "[| M:A;  N:B |] ==> Scons M N : A<*>B";
   298 by (REPEAT (ares_tac [singletonI,UN_I] 1));
   299 qed "uprodI";
   300 
   301 (*The general elimination rule*)
   302 val major::prems = Goalw [uprod_def]
   303     "[| c : A<*>B;  \
   304 \       !!x y. [| x:A;  y:B;  c = Scons x y |] ==> P \
   305 \    |] ==> P";
   306 by (cut_facts_tac [major] 1);
   307 by (REPEAT (eresolve_tac [asm_rl,singletonE,UN_E] 1
   308      ORELSE resolve_tac prems 1));
   309 qed "uprodE";
   310 
   311 (*Elimination of a pair -- introduces no eigenvariables*)
   312 val prems = Goal
   313     "[| Scons M N : A<*>B;      [| M:A;  N:B |] ==> P   \
   314 \    |] ==> P";
   315 by (rtac uprodE 1);
   316 by (REPEAT (ares_tac prems 1 ORELSE eresolve_tac [Scons_inject,ssubst] 1));
   317 qed "uprodE2";
   318 
   319 
   320 (*** Disjoint Sum ***)
   321 
   322 Goalw [usum_def] "M:A ==> In0(M) : A<+>B";
   323 by (Blast_tac 1);
   324 qed "usum_In0I";
   325 
   326 Goalw [usum_def] "N:B ==> In1(N) : A<+>B";
   327 by (Blast_tac 1);
   328 qed "usum_In1I";
   329 
   330 val major::prems = Goalw [usum_def]
   331     "[| u : A<+>B;  \
   332 \       !!x. [| x:A;  u=In0(x) |] ==> P; \
   333 \       !!y. [| y:B;  u=In1(y) |] ==> P \
   334 \    |] ==> P";
   335 by (rtac (major RS UnE) 1);
   336 by (REPEAT (rtac refl 1 
   337      ORELSE eresolve_tac (prems@[imageE,ssubst]) 1));
   338 qed "usumE";
   339 
   340 
   341 (** Injection **)
   342 
   343 Goalw [In0_def,In1_def] "In0(M) ~= In1(N)";
   344 by (rtac notI 1);
   345 by (etac (Scons_inject1 RS Numb_inject RS Zero_neq_Suc) 1);
   346 qed "In0_not_In1";
   347 
   348 bind_thm ("In1_not_In0", In0_not_In1 RS not_sym);
   349 
   350 AddIffs [In0_not_In1, In1_not_In0];
   351 
   352 Goalw [In0_def] "In0(M) = In0(N) ==>  M=N";
   353 by (etac (Scons_inject2) 1);
   354 qed "In0_inject";
   355 
   356 Goalw [In1_def] "In1(M) = In1(N) ==>  M=N";
   357 by (etac (Scons_inject2) 1);
   358 qed "In1_inject";
   359 
   360 Goal "(In0 M = In0 N) = (M=N)";
   361 by (blast_tac (claset() addSDs [In0_inject]) 1);
   362 qed "In0_eq";
   363 
   364 Goal "(In1 M = In1 N) = (M=N)";
   365 by (blast_tac (claset() addSDs [In1_inject]) 1);
   366 qed "In1_eq";
   367 
   368 AddIffs [In0_eq, In1_eq];
   369 
   370 Goal "inj In0";
   371 by (blast_tac (claset() addSIs [injI]) 1);
   372 qed "inj_In0";
   373 
   374 Goal "inj In1";
   375 by (blast_tac (claset() addSIs [injI]) 1);
   376 qed "inj_In1";
   377 
   378 
   379 (*** proving equality of sets and functions using ntrunc ***)
   380 
   381 Goalw [ntrunc_def] "ntrunc k M <= M";
   382 by (Blast_tac 1);
   383 qed "ntrunc_subsetI";
   384 
   385 val [major] = Goalw [ntrunc_def] "(!!k. ntrunc k M <= N) ==> M<=N";
   386 by (blast_tac (claset() addIs [less_add_Suc1, less_add_Suc2, 
   387 			       major RS subsetD]) 1);
   388 qed "ntrunc_subsetD";
   389 
   390 (*A generalized form of the take-lemma*)
   391 val [major] = Goal "(!!k. ntrunc k M = ntrunc k N) ==> M=N";
   392 by (rtac equalityI 1);
   393 by (ALLGOALS (rtac ntrunc_subsetD));
   394 by (ALLGOALS (rtac (ntrunc_subsetI RSN (2, subset_trans))));
   395 by (rtac (major RS equalityD1) 1);
   396 by (rtac (major RS equalityD2) 1);
   397 qed "ntrunc_equality";
   398 
   399 val [major] = Goalw [o_def]
   400     "[| !!k. (ntrunc(k) o h1) = (ntrunc(k) o h2) |] ==> h1=h2";
   401 by (rtac (ntrunc_equality RS ext) 1);
   402 by (rtac (major RS fun_cong) 1);
   403 qed "ntrunc_o_equality";
   404 
   405 (*** Monotonicity ***)
   406 
   407 Goalw [uprod_def] "[| A<=A';  B<=B' |] ==> A<*>B <= A'<*>B'";
   408 by (Blast_tac 1);
   409 qed "uprod_mono";
   410 
   411 Goalw [usum_def] "[| A<=A';  B<=B' |] ==> A<+>B <= A'<+>B'";
   412 by (Blast_tac 1);
   413 qed "usum_mono";
   414 
   415 Goalw [Scons_def] "[| M<=M';  N<=N' |] ==> Scons M N <= Scons M' N'";
   416 by (Blast_tac 1);
   417 qed "Scons_mono";
   418 
   419 Goalw [In0_def] "M<=N ==> In0(M) <= In0(N)";
   420 by (REPEAT (ares_tac [subset_refl,Scons_mono] 1));
   421 qed "In0_mono";
   422 
   423 Goalw [In1_def] "M<=N ==> In1(M) <= In1(N)";
   424 by (REPEAT (ares_tac [subset_refl,Scons_mono] 1));
   425 qed "In1_mono";
   426 
   427 
   428 (*** Split and Case ***)
   429 
   430 Goalw [Split_def] "Split c (Scons M N) = c M N";
   431 by (Blast_tac  1);
   432 qed "Split";
   433 
   434 Goalw [Case_def] "Case c d (In0 M) = c(M)";
   435 by (Blast_tac 1);
   436 qed "Case_In0";
   437 
   438 Goalw [Case_def] "Case c d (In1 N) = d(N)";
   439 by (Blast_tac 1);
   440 qed "Case_In1";
   441 
   442 Addsimps [Split, Case_In0, Case_In1];
   443 
   444 
   445 (**** UN x. B(x) rules ****)
   446 
   447 Goalw [ntrunc_def] "ntrunc k (UN x. f(x)) = (UN x. ntrunc k (f x))";
   448 by (Blast_tac 1);
   449 qed "ntrunc_UN1";
   450 
   451 Goalw [Scons_def] "Scons (UN x. f x) M = (UN x. Scons (f x) M)";
   452 by (Blast_tac 1);
   453 qed "Scons_UN1_x";
   454 
   455 Goalw [Scons_def] "Scons M (UN x. f x) = (UN x. Scons M (f x))";
   456 by (Blast_tac 1);
   457 qed "Scons_UN1_y";
   458 
   459 Goalw [In0_def] "In0(UN x. f(x)) = (UN x. In0(f(x)))";
   460 by (rtac Scons_UN1_y 1);
   461 qed "In0_UN1";
   462 
   463 Goalw [In1_def] "In1(UN x. f(x)) = (UN x. In1(f(x)))";
   464 by (rtac Scons_UN1_y 1);
   465 qed "In1_UN1";
   466 
   467 
   468 (*** Equality for Cartesian Product ***)
   469 
   470 Goalw [dprod_def]
   471     "[| (M,M'):r;  (N,N'):s |] ==> (Scons M N, Scons M' N') : r<**>s";
   472 by (Blast_tac 1);
   473 qed "dprodI";
   474 
   475 (*The general elimination rule*)
   476 val major::prems = Goalw [dprod_def]
   477     "[| c : r<**>s;  \
   478 \       !!x y x' y'. [| (x,x') : r;  (y,y') : s;  c = (Scons x y, Scons x' y') |] ==> P \
   479 \    |] ==> P";
   480 by (cut_facts_tac [major] 1);
   481 by (REPEAT_FIRST (eresolve_tac [asm_rl, UN_E, mem_splitE, singletonE]));
   482 by (REPEAT (ares_tac prems 1 ORELSE hyp_subst_tac 1));
   483 qed "dprodE";
   484 
   485 
   486 (*** Equality for Disjoint Sum ***)
   487 
   488 Goalw [dsum_def]  "(M,M'):r ==> (In0(M), In0(M')) : r<++>s";
   489 by (Blast_tac 1);
   490 qed "dsum_In0I";
   491 
   492 Goalw [dsum_def]  "(N,N'):s ==> (In1(N), In1(N')) : r<++>s";
   493 by (Blast_tac 1);
   494 qed "dsum_In1I";
   495 
   496 val major::prems = Goalw [dsum_def]
   497     "[| w : r<++>s;  \
   498 \       !!x x'. [| (x,x') : r;  w = (In0(x), In0(x')) |] ==> P; \
   499 \       !!y y'. [| (y,y') : s;  w = (In1(y), In1(y')) |] ==> P \
   500 \    |] ==> P";
   501 by (cut_facts_tac [major] 1);
   502 by (REPEAT_FIRST (eresolve_tac [asm_rl, UN_E, UnE, mem_splitE, singletonE]));
   503 by (DEPTH_SOLVE (ares_tac prems 1 ORELSE hyp_subst_tac 1));
   504 qed "dsumE";
   505 
   506 AddSIs [uprodI, dprodI];
   507 AddIs  [usum_In0I, usum_In1I, dsum_In0I, dsum_In1I];
   508 AddSEs [uprodE, dprodE, usumE, dsumE];
   509 
   510 
   511 (*** Monotonicity ***)
   512 
   513 Goal "[| r<=r';  s<=s' |] ==> r<**>s <= r'<**>s'";
   514 by (Blast_tac 1);
   515 qed "dprod_mono";
   516 
   517 Goal "[| r<=r';  s<=s' |] ==> r<++>s <= r'<++>s'";
   518 by (Blast_tac 1);
   519 qed "dsum_mono";
   520 
   521 
   522 (*** Bounding theorems ***)
   523 
   524 Goal "((A Times B) <**> (C Times D)) <= (A<*>C) Times (B<*>D)";
   525 by (Blast_tac 1);
   526 qed "dprod_Sigma";
   527 
   528 val dprod_subset_Sigma = [dprod_mono, dprod_Sigma] MRS subset_trans |>standard;
   529 
   530 (*Dependent version*)
   531 Goal "(Sigma A B <**> Sigma C D) <= Sigma (A<*>C) (Split(%x y. B(x)<*>D(y)))";
   532 by Safe_tac;
   533 by (stac Split 1);
   534 by (Blast_tac 1);
   535 qed "dprod_subset_Sigma2";
   536 
   537 Goal "(A Times B <++> C Times D) <= (A<+>C) Times (B<+>D)";
   538 by (Blast_tac 1);
   539 qed "dsum_Sigma";
   540 
   541 val dsum_subset_Sigma = [dsum_mono, dsum_Sigma] MRS subset_trans |> standard;
   542 
   543 
   544 (*** Domain ***)
   545 
   546 Goal "Domain (r<**>s) = (Domain r) <*> (Domain s)";
   547 by Auto_tac;
   548 qed "Domain_dprod";
   549 
   550 Goal "Domain (r<++>s) = (Domain r) <+> (Domain s)";
   551 by Auto_tac;
   552 qed "Domain_dsum";
   553 
   554 Addsimps [Domain_dprod, Domain_dsum];