414 by blast |
414 by blast |
415 |
415 |
416 lemma ball_one_point2 [simp]: "(ALL x:A. a = x --> P x) = (a:A --> P a)" |
416 lemma ball_one_point2 [simp]: "(ALL x:A. a = x --> P x) = (a:A --> P a)" |
417 by blast |
417 by blast |
418 |
418 |
|
419 lemma ball_conj_distrib: |
|
420 "(\<forall>x\<in>A. P x \<and> Q x) \<longleftrightarrow> ((\<forall>x\<in>A. P x) \<and> (\<forall>x\<in>A. Q x))" |
|
421 by blast |
|
422 |
|
423 lemma bex_disj_distrib: |
|
424 "(\<exists>x\<in>A. P x \<or> Q x) \<longleftrightarrow> ((\<exists>x\<in>A. P x) \<or> (\<exists>x\<in>A. Q x))" |
|
425 by blast |
|
426 |
419 |
427 |
420 text {* Congruence rules *} |
428 text {* Congruence rules *} |
421 |
429 |
422 lemma ball_cong: |
430 lemma ball_cong: |
423 "A = B ==> (!!x. x:B ==> P x = Q x) ==> |
431 "A = B ==> (!!x. x:B ==> P x = Q x) ==> |
533 |
541 |
534 subsubsection {* The empty set *} |
542 subsubsection {* The empty set *} |
535 |
543 |
536 lemma empty_def: |
544 lemma empty_def: |
537 "{} = {x. False}" |
545 "{} = {x. False}" |
538 by (simp add: bot_fun_def bot_bool_def Collect_def) |
546 by (simp add: bot_fun_def Collect_def) |
539 |
547 |
540 lemma empty_iff [simp]: "(c : {}) = False" |
548 lemma empty_iff [simp]: "(c : {}) = False" |
541 by (simp add: empty_def) |
549 by (simp add: empty_def) |
542 |
550 |
543 lemma emptyE [elim!]: "a : {} ==> P" |
551 lemma emptyE [elim!]: "a : {} ==> P" |
566 abbreviation UNIV :: "'a set" where |
574 abbreviation UNIV :: "'a set" where |
567 "UNIV \<equiv> top" |
575 "UNIV \<equiv> top" |
568 |
576 |
569 lemma UNIV_def: |
577 lemma UNIV_def: |
570 "UNIV = {x. True}" |
578 "UNIV = {x. True}" |
571 by (simp add: top_fun_def top_bool_def Collect_def) |
579 by (simp add: top_fun_def Collect_def) |
572 |
580 |
573 lemma UNIV_I [simp]: "x : UNIV" |
581 lemma UNIV_I [simp]: "x : UNIV" |
574 by (simp add: UNIV_def) |
582 by (simp add: UNIV_def) |
575 |
583 |
576 declare UNIV_I [intro] -- {* unsafe makes it less likely to cause problems *} |
584 declare UNIV_I [intro] -- {* unsafe makes it less likely to cause problems *} |
625 |
633 |
626 |
634 |
627 subsubsection {* Set complement *} |
635 subsubsection {* Set complement *} |
628 |
636 |
629 lemma Compl_iff [simp]: "(c \<in> -A) = (c \<notin> A)" |
637 lemma Compl_iff [simp]: "(c \<in> -A) = (c \<notin> A)" |
630 by (simp add: mem_def fun_Compl_def bool_Compl_def) |
638 by (simp add: mem_def fun_Compl_def) |
631 |
639 |
632 lemma ComplI [intro!]: "(c \<in> A ==> False) ==> c \<in> -A" |
640 lemma ComplI [intro!]: "(c \<in> A ==> False) ==> c \<in> -A" |
633 by (unfold mem_def fun_Compl_def bool_Compl_def) blast |
641 by (unfold mem_def fun_Compl_def bool_Compl_def) blast |
634 |
642 |
635 text {* |
643 text {* |
636 \medskip This form, with negated conclusion, works well with the |
644 \medskip This form, with negated conclusion, works well with the |
637 Classical prover. Negated assumptions behave like formulae on the |
645 Classical prover. Negated assumptions behave like formulae on the |
638 right side of the notional turnstile ... *} |
646 right side of the notional turnstile ... *} |
639 |
647 |
640 lemma ComplD [dest!]: "c : -A ==> c~:A" |
648 lemma ComplD [dest!]: "c : -A ==> c~:A" |
641 by (simp add: mem_def fun_Compl_def bool_Compl_def) |
649 by (simp add: mem_def fun_Compl_def) |
642 |
650 |
643 lemmas ComplE = ComplD [elim_format] |
651 lemmas ComplE = ComplD [elim_format] |
644 |
652 |
645 lemma Compl_eq: "- A = {x. ~ x : A}" by blast |
653 lemma Compl_eq: "- A = {x. ~ x : A}" by blast |
646 |
654 |
656 notation (HTML output) |
664 notation (HTML output) |
657 inter (infixl "\<inter>" 70) |
665 inter (infixl "\<inter>" 70) |
658 |
666 |
659 lemma Int_def: |
667 lemma Int_def: |
660 "A \<inter> B = {x. x \<in> A \<and> x \<in> B}" |
668 "A \<inter> B = {x. x \<in> A \<and> x \<in> B}" |
661 by (simp add: inf_fun_def inf_bool_def Collect_def mem_def) |
669 by (simp add: inf_fun_def Collect_def mem_def) |
662 |
670 |
663 lemma Int_iff [simp]: "(c : A Int B) = (c:A & c:B)" |
671 lemma Int_iff [simp]: "(c : A Int B) = (c:A & c:B)" |
664 by (unfold Int_def) blast |
672 by (unfold Int_def) blast |
665 |
673 |
666 lemma IntI [intro!]: "c:A ==> c:B ==> c : A Int B" |
674 lemma IntI [intro!]: "c:A ==> c:B ==> c : A Int B" |
690 notation (HTML output) |
698 notation (HTML output) |
691 union (infixl "\<union>" 65) |
699 union (infixl "\<union>" 65) |
692 |
700 |
693 lemma Un_def: |
701 lemma Un_def: |
694 "A \<union> B = {x. x \<in> A \<or> x \<in> B}" |
702 "A \<union> B = {x. x \<in> A \<or> x \<in> B}" |
695 by (simp add: sup_fun_def sup_bool_def Collect_def mem_def) |
703 by (simp add: sup_fun_def Collect_def mem_def) |
696 |
704 |
697 lemma Un_iff [simp]: "(c : A Un B) = (c:A | c:B)" |
705 lemma Un_iff [simp]: "(c : A Un B) = (c:A | c:B)" |
698 by (unfold Un_def) blast |
706 by (unfold Un_def) blast |
699 |
707 |
700 lemma UnI1 [elim?]: "c:A ==> c : A Un B" |
708 lemma UnI1 [elim?]: "c:A ==> c : A Un B" |
722 |
730 |
723 |
731 |
724 subsubsection {* Set difference *} |
732 subsubsection {* Set difference *} |
725 |
733 |
726 lemma Diff_iff [simp]: "(c : A - B) = (c:A & c~:B)" |
734 lemma Diff_iff [simp]: "(c : A - B) = (c:A & c~:B)" |
727 by (simp add: mem_def fun_diff_def bool_diff_def) |
735 by (simp add: mem_def fun_diff_def) |
728 |
736 |
729 lemma DiffI [intro!]: "c : A ==> c ~: B ==> c : A - B" |
737 lemma DiffI [intro!]: "c : A ==> c ~: B ==> c : A - B" |
730 by simp |
738 by simp |
731 |
739 |
732 lemma DiffD1: "c : A - B ==> c : A" |
740 lemma DiffD1: "c : A - B ==> c : A" |