399 |
399 |
400 Goal "Sigma {} B = {}"; |
400 Goal "Sigma {} B = {}"; |
401 by (Blast_tac 1) ; |
401 by (Blast_tac 1) ; |
402 qed "Sigma_empty1"; |
402 qed "Sigma_empty1"; |
403 |
403 |
404 Goal "A Times {} = {}"; |
404 Goal "A <*> {} = {}"; |
405 by (Blast_tac 1) ; |
405 by (Blast_tac 1) ; |
406 qed "Sigma_empty2"; |
406 qed "Sigma_empty2"; |
407 |
407 |
408 Addsimps [Sigma_empty1,Sigma_empty2]; |
408 Addsimps [Sigma_empty1,Sigma_empty2]; |
|
409 |
|
410 Goal "UNIV <*> UNIV = UNIV"; |
|
411 by Auto_tac; |
|
412 qed "UNIV_Times_UNIV"; |
|
413 Addsimps [UNIV_Times_UNIV]; |
|
414 |
|
415 Goal "- (UNIV <*> A) = UNIV <*> (-A)"; |
|
416 by Auto_tac; |
|
417 qed "Compl_Times_UNIV1"; |
|
418 |
|
419 Goal "- (A <*> UNIV) = (-A) <*> UNIV"; |
|
420 by Auto_tac; |
|
421 qed "Compl_Times_UNIV2"; |
|
422 |
|
423 Addsimps [Compl_Times_UNIV1, Compl_Times_UNIV2]; |
409 |
424 |
410 Goal "((a,b): Sigma A B) = (a:A & b:B(a))"; |
425 Goal "((a,b): Sigma A B) = (a:A & b:B(a))"; |
411 by (Blast_tac 1); |
426 by (Blast_tac 1); |
412 qed "mem_Sigma_iff"; |
427 qed "mem_Sigma_iff"; |
413 AddIffs [mem_Sigma_iff]; |
428 AddIffs [mem_Sigma_iff]; |
414 |
429 |
415 Goal "x:C ==> (A Times C <= B Times C) = (A <= B)"; |
430 Goal "x:C ==> (A <*> C <= B <*> C) = (A <= B)"; |
416 by (Blast_tac 1); |
431 by (Blast_tac 1); |
417 qed "Times_subset_cancel2"; |
432 qed "Times_subset_cancel2"; |
418 |
433 |
419 Goal "x:C ==> (A Times C = B Times C) = (A = B)"; |
434 Goal "x:C ==> (A <*> C = B <*> C) = (A = B)"; |
420 by (blast_tac (claset() addEs [equalityE]) 1); |
435 by (blast_tac (claset() addEs [equalityE]) 1); |
421 qed "Times_eq_cancel2"; |
436 qed "Times_eq_cancel2"; |
422 |
437 |
423 Goal "{(x,y) |x y. P x & Q x y} = (SIGMA x:Collect P. Collect (Q x))"; |
438 Goal "{(x,y) |x y. P x & Q x y} = (SIGMA x:Collect P. Collect (Q x))"; |
424 by (Fast_tac 1); |
439 by (Fast_tac 1); |
425 qed "SetCompr_Sigma_eq"; |
440 qed "SetCompr_Sigma_eq"; |
426 |
441 |
427 (*** Complex rules for Sigma ***) |
442 (*** Complex rules for Sigma ***) |
428 |
443 |
429 Goal "{(a,b). P a & Q b} = Collect P Times Collect Q"; |
444 Goal "{(a,b). P a & Q b} = Collect P <*> Collect Q"; |
430 by (Blast_tac 1); |
445 by (Blast_tac 1); |
431 qed "Collect_split"; |
446 qed "Collect_split"; |
432 |
447 |
433 Addsimps [Collect_split]; |
448 Addsimps [Collect_split]; |
434 |
449 |
435 (*Suggested by Pierre Chartier*) |
450 (*Suggested by Pierre Chartier*) |
436 Goal "(UN (a,b):(A Times B). E a Times F b) = (UNION A E) Times (UNION B F)"; |
451 Goal "(UN (a,b):(A <*> B). E a <*> F b) = (UNION A E) <*> (UNION B F)"; |
437 by (Blast_tac 1); |
452 by (Blast_tac 1); |
438 qed "UN_Times_distrib"; |
453 qed "UN_Times_distrib"; |
439 |
454 |
440 Goal "(ALL z: Sigma A B. P z) = (ALL x:A. ALL y: B x. P(x,y))"; |
455 Goal "(ALL z: Sigma A B. P z) = (ALL x:A. ALL y: B x. P(x,y))"; |
441 by (Fast_tac 1); |
456 by (Fast_tac 1); |
475 by (Blast_tac 1); |
490 by (Blast_tac 1); |
476 qed "Sigma_Union"; |
491 qed "Sigma_Union"; |
477 |
492 |
478 (*Non-dependent versions are needed to avoid the need for higher-order |
493 (*Non-dependent versions are needed to avoid the need for higher-order |
479 matching, especially when the rules are re-oriented*) |
494 matching, especially when the rules are re-oriented*) |
480 Goal "(A Un B) Times C = (A Times C) Un (B Times C)"; |
495 Goal "(A Un B) <*> C = (A <*> C) Un (B <*> C)"; |
481 by (Blast_tac 1); |
496 by (Blast_tac 1); |
482 qed "Times_Un_distrib1"; |
497 qed "Times_Un_distrib1"; |
483 |
498 |
484 Goal "(A Int B) Times C = (A Times C) Int (B Times C)"; |
499 Goal "(A Int B) <*> C = (A <*> C) Int (B <*> C)"; |
485 by (Blast_tac 1); |
500 by (Blast_tac 1); |
486 qed "Times_Int_distrib1"; |
501 qed "Times_Int_distrib1"; |
487 |
502 |
488 Goal "(A - B) Times C = (A Times C) - (B Times C)"; |
503 Goal "(A - B) <*> C = (A <*> C) - (B <*> C)"; |
489 by (Blast_tac 1); |
504 by (Blast_tac 1); |
490 qed "Times_Diff_distrib1"; |
505 qed "Times_Diff_distrib1"; |
491 |
506 |
492 (** Exhaustion rule for unit -- a degenerate form of induction **) |
507 (** Exhaustion rule for unit -- a degenerate form of induction **) |
493 |
508 |