src/ZF/pair.thy
author paulson
Thu, 08 Mar 2012 16:43:29 +0000
changeset 46841 49b91b716cbe
parent 46821 ff6b0c1087f2
child 46953 2b6e55924af3
permissions -rw-r--r--
Structured and calculation-based proofs (with new trans rules!)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
41777
1f7cbe39d425 more precise headers;
wenzelm
parents: 28952
diff changeset
     1
(*  Title:      ZF/pair.thy
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
     2
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
     3
    Copyright   1992  University of Cambridge
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
     4
*)
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
     5
13357
6f54e992777e Removal of mono.thy
paulson
parents: 13240
diff changeset
     6
header{*Ordered Pairs*}
6f54e992777e Removal of mono.thy
paulson
parents: 13240
diff changeset
     7
16417
9bc16273c2d4 migrated theory headers to new format
haftmann
parents: 14864
diff changeset
     8
theory pair imports upair
42455
6702c984bf5a modernized Quantifier1 simproc setup;
wenzelm
parents: 41777
diff changeset
     9
uses "simpdata.ML"
6702c984bf5a modernized Quantifier1 simproc setup;
wenzelm
parents: 41777
diff changeset
    10
begin
6702c984bf5a modernized Quantifier1 simproc setup;
wenzelm
parents: 41777
diff changeset
    11
42795
66fcc9882784 clarified map_simpset versus Simplifier.map_simpset_global;
wenzelm
parents: 42794
diff changeset
    12
setup {*
45625
750c5a47400b modernized some old-style infix operations, which were left over from the time of ML proof scripts;
wenzelm
parents: 45620
diff changeset
    13
  Simplifier.map_simpset_global
750c5a47400b modernized some old-style infix operations, which were left over from the time of ML proof scripts;
wenzelm
parents: 45620
diff changeset
    14
    (Simplifier.set_mksimps (K (map mk_eq o ZF_atomize o gen_all))
750c5a47400b modernized some old-style infix operations, which were left over from the time of ML proof scripts;
wenzelm
parents: 45620
diff changeset
    15
      #> Simplifier.add_cong @{thm if_weak_cong})
42794
07155da3b2f4 make ZF_cs snapshot after final setup;
wenzelm
parents: 42459
diff changeset
    16
*}
07155da3b2f4 make ZF_cs snapshot after final setup;
wenzelm
parents: 42459
diff changeset
    17
07155da3b2f4 make ZF_cs snapshot after final setup;
wenzelm
parents: 42459
diff changeset
    18
ML {* val ZF_ss = @{simpset} *}
07155da3b2f4 make ZF_cs snapshot after final setup;
wenzelm
parents: 42459
diff changeset
    19
46820
c656222c4dc1 mathematical symbols instead of ASCII
paulson
parents: 45625
diff changeset
    20
simproc_setup defined_Bex ("\<exists>x\<in>A. P(x) & Q(x)") = {*
42455
6702c984bf5a modernized Quantifier1 simproc setup;
wenzelm
parents: 41777
diff changeset
    21
  let
6702c984bf5a modernized Quantifier1 simproc setup;
wenzelm
parents: 41777
diff changeset
    22
    val unfold_bex_tac = unfold_tac @{thms Bex_def};
6702c984bf5a modernized Quantifier1 simproc setup;
wenzelm
parents: 41777
diff changeset
    23
    fun prove_bex_tac ss = unfold_bex_tac ss THEN Quantifier1.prove_one_point_ex_tac;
42459
38b9f023cc34 misc tuning and simplification;
wenzelm
parents: 42456
diff changeset
    24
  in fn _ => fn ss => Quantifier1.rearrange_bex (prove_bex_tac ss) ss end
42455
6702c984bf5a modernized Quantifier1 simproc setup;
wenzelm
parents: 41777
diff changeset
    25
*}
6702c984bf5a modernized Quantifier1 simproc setup;
wenzelm
parents: 41777
diff changeset
    26
46820
c656222c4dc1 mathematical symbols instead of ASCII
paulson
parents: 45625
diff changeset
    27
simproc_setup defined_Ball ("\<forall>x\<in>A. P(x) \<longrightarrow> Q(x)") = {*
42455
6702c984bf5a modernized Quantifier1 simproc setup;
wenzelm
parents: 41777
diff changeset
    28
  let
6702c984bf5a modernized Quantifier1 simproc setup;
wenzelm
parents: 41777
diff changeset
    29
    val unfold_ball_tac = unfold_tac @{thms Ball_def};
6702c984bf5a modernized Quantifier1 simproc setup;
wenzelm
parents: 41777
diff changeset
    30
    fun prove_ball_tac ss = unfold_ball_tac ss THEN Quantifier1.prove_one_point_all_tac;
42459
38b9f023cc34 misc tuning and simplification;
wenzelm
parents: 42456
diff changeset
    31
  in fn _ => fn ss => Quantifier1.rearrange_ball (prove_ball_tac ss) ss end
42455
6702c984bf5a modernized Quantifier1 simproc setup;
wenzelm
parents: 41777
diff changeset
    32
*}
6702c984bf5a modernized Quantifier1 simproc setup;
wenzelm
parents: 41777
diff changeset
    33
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    34
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    35
(** Lemmas for showing that <a,b> uniquely determines a and b **)
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    36
46821
ff6b0c1087f2 Using mathematical notation for <-> and cardinal arithmetic
paulson
parents: 46820
diff changeset
    37
lemma singleton_eq_iff [iff]: "{a} = {b} \<longleftrightarrow> a=b"
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    38
by (rule extension [THEN iff_trans], blast)
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    39
46821
ff6b0c1087f2 Using mathematical notation for <-> and cardinal arithmetic
paulson
parents: 46820
diff changeset
    40
lemma doubleton_eq_iff: "{a,b} = {c,d} \<longleftrightarrow> (a=c & b=d) | (a=d & b=c)"
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    41
by (rule extension [THEN iff_trans], blast)
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    42
46821
ff6b0c1087f2 Using mathematical notation for <-> and cardinal arithmetic
paulson
parents: 46820
diff changeset
    43
lemma Pair_iff [simp]: "<a,b> = <c,d> \<longleftrightarrow> a=c & b=d"
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    44
by (simp add: Pair_def doubleton_eq_iff, blast)
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    45
45602
2a858377c3d2 eliminated obsolete "standard";
wenzelm
parents: 42795
diff changeset
    46
lemmas Pair_inject = Pair_iff [THEN iffD1, THEN conjE, elim!]
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    47
45602
2a858377c3d2 eliminated obsolete "standard";
wenzelm
parents: 42795
diff changeset
    48
lemmas Pair_inject1 = Pair_iff [THEN iffD1, THEN conjunct1]
2a858377c3d2 eliminated obsolete "standard";
wenzelm
parents: 42795
diff changeset
    49
lemmas Pair_inject2 = Pair_iff [THEN iffD1, THEN conjunct2]
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    50
46820
c656222c4dc1 mathematical symbols instead of ASCII
paulson
parents: 45625
diff changeset
    51
lemma Pair_not_0: "<a,b> \<noteq> 0"
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    52
apply (unfold Pair_def)
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    53
apply (blast elim: equalityE)
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    54
done
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    55
45602
2a858377c3d2 eliminated obsolete "standard";
wenzelm
parents: 42795
diff changeset
    56
lemmas Pair_neq_0 = Pair_not_0 [THEN notE, elim!]
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    57
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    58
declare sym [THEN Pair_neq_0, elim!]
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    59
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    60
lemma Pair_neq_fst: "<a,b>=a ==> P"
46841
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
    61
proof (unfold Pair_def)
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
    62
  assume eq: "{{a, a}, {a, b}} = a"
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
    63
  have  "{a, a} \<in> {{a, a}, {a, b}}" by (rule consI1)
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
    64
  hence "{a, a} \<in> a" by (simp add: eq)
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
    65
  moreover have "a \<in> {a, a}" by (rule consI1)
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
    66
  ultimately show "P" by (rule mem_asym) 
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
    67
qed
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    68
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    69
lemma Pair_neq_snd: "<a,b>=b ==> P"
46841
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
    70
proof (unfold Pair_def)
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
    71
  assume eq: "{{a, a}, {a, b}} = b"
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
    72
  have  "{a, b} \<in> {{a, a}, {a, b}}" by blast
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
    73
  hence "{a, b} \<in> b" by (simp add: eq)
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
    74
  moreover have "b \<in> {a, b}" by blast
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
    75
  ultimately show "P" by (rule mem_asym) 
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
    76
qed
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    77
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    78
13357
6f54e992777e Removal of mono.thy
paulson
parents: 13240
diff changeset
    79
subsection{*Sigma: Disjoint Union of a Family of Sets*}
6f54e992777e Removal of mono.thy
paulson
parents: 13240
diff changeset
    80
6f54e992777e Removal of mono.thy
paulson
parents: 13240
diff changeset
    81
text{*Generalizes Cartesian product*}
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    82
46821
ff6b0c1087f2 Using mathematical notation for <-> and cardinal arithmetic
paulson
parents: 46820
diff changeset
    83
lemma Sigma_iff [simp]: "<a,b>: Sigma(A,B) \<longleftrightarrow> a:A & b:B(a)"
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    84
by (simp add: Sigma_def)
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    85
46820
c656222c4dc1 mathematical symbols instead of ASCII
paulson
parents: 45625
diff changeset
    86
lemma SigmaI [TC,intro!]: "[| a:A;  b:B(a) |] ==> <a,b> \<in> Sigma(A,B)"
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    87
by simp
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    88
45602
2a858377c3d2 eliminated obsolete "standard";
wenzelm
parents: 42795
diff changeset
    89
lemmas SigmaD1 = Sigma_iff [THEN iffD1, THEN conjunct1]
2a858377c3d2 eliminated obsolete "standard";
wenzelm
parents: 42795
diff changeset
    90
lemmas SigmaD2 = Sigma_iff [THEN iffD1, THEN conjunct2]
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    91
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    92
(*The general elimination rule*)
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    93
lemma SigmaE [elim!]:
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    94
    "[| c: Sigma(A,B);   
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    95
        !!x y.[| x:A;  y:B(x);  c=<x,y> |] ==> P  
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    96
     |] ==> P"
13357
6f54e992777e Removal of mono.thy
paulson
parents: 13240
diff changeset
    97
by (unfold Sigma_def, blast) 
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    98
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
    99
lemma SigmaE2 [elim!]:
46820
c656222c4dc1 mathematical symbols instead of ASCII
paulson
parents: 45625
diff changeset
   100
    "[| <a,b> \<in> Sigma(A,B);     
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   101
        [| a:A;  b:B(a) |] ==> P    
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   102
     |] ==> P"
13357
6f54e992777e Removal of mono.thy
paulson
parents: 13240
diff changeset
   103
by (unfold Sigma_def, blast) 
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   104
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   105
lemma Sigma_cong:
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   106
    "[| A=A';  !!x. x:A' ==> B(x)=B'(x) |] ==>  
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   107
     Sigma(A,B) = Sigma(A',B')"
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   108
by (simp add: Sigma_def)
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   109
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   110
(*Sigma_cong, Pi_cong NOT given to Addcongs: they cause
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   111
  flex-flex pairs and the "Check your prover" error.  Most
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   112
  Sigmas and Pis are abbreviated as * or -> *)
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   113
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   114
lemma Sigma_empty1 [simp]: "Sigma(0,B) = 0"
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   115
by blast
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   116
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   117
lemma Sigma_empty2 [simp]: "A*0 = 0"
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   118
by blast
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   119
46821
ff6b0c1087f2 Using mathematical notation for <-> and cardinal arithmetic
paulson
parents: 46820
diff changeset
   120
lemma Sigma_empty_iff: "A*B=0 \<longleftrightarrow> A=0 | B=0"
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   121
by blast
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   122
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   123
13357
6f54e992777e Removal of mono.thy
paulson
parents: 13240
diff changeset
   124
subsection{*Projections @{term fst} and @{term snd}*}
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   125
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   126
lemma fst_conv [simp]: "fst(<a,b>) = a"
13544
895994073bdf various new lemmas for Constructible
paulson
parents: 13357
diff changeset
   127
by (simp add: fst_def)
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   128
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   129
lemma snd_conv [simp]: "snd(<a,b>) = b"
13544
895994073bdf various new lemmas for Constructible
paulson
parents: 13357
diff changeset
   130
by (simp add: snd_def)
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   131
46820
c656222c4dc1 mathematical symbols instead of ASCII
paulson
parents: 45625
diff changeset
   132
lemma fst_type [TC]: "p:Sigma(A,B) ==> fst(p) \<in> A"
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   133
by auto
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   134
46820
c656222c4dc1 mathematical symbols instead of ASCII
paulson
parents: 45625
diff changeset
   135
lemma snd_type [TC]: "p:Sigma(A,B) ==> snd(p) \<in> B(fst(p))"
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   136
by auto
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   137
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   138
lemma Pair_fst_snd_eq: "a: Sigma(A,B) ==> <fst(a),snd(a)> = a"
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   139
by auto
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   140
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   141
13357
6f54e992777e Removal of mono.thy
paulson
parents: 13240
diff changeset
   142
subsection{*The Eliminator, @{term split}*}
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   143
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   144
(*A META-equality, so that it applies to higher types as well...*)
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   145
lemma split [simp]: "split(%x y. c(x,y), <a,b>) == c(a,b)"
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   146
by (simp add: split_def)
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   147
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   148
lemma split_type [TC]:
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   149
    "[|  p:Sigma(A,B);    
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   150
         !!x y.[| x:A; y:B(x) |] ==> c(x,y):C(<x,y>)  
46820
c656222c4dc1 mathematical symbols instead of ASCII
paulson
parents: 45625
diff changeset
   151
     |] ==> split(%x y. c(x,y), p) \<in> C(p)"
46841
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
   152
by (erule SigmaE, auto) 
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   153
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   154
lemma expand_split: 
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   155
  "u: A*B ==>    
46821
ff6b0c1087f2 Using mathematical notation for <-> and cardinal arithmetic
paulson
parents: 46820
diff changeset
   156
        R(split(c,u)) \<longleftrightarrow> (\<forall>x\<in>A. \<forall>y\<in>B. u = <x,y> \<longrightarrow> R(c(x,y)))"
46841
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
   157
by (auto simp add: split_def)
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   158
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   159
13357
6f54e992777e Removal of mono.thy
paulson
parents: 13240
diff changeset
   160
subsection{*A version of @{term split} for Formulae: Result Type @{typ o}*}
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   161
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   162
lemma splitI: "R(a,b) ==> split(R, <a,b>)"
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   163
by (simp add: split_def)
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   164
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   165
lemma splitE:
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   166
    "[| split(R,z);  z:Sigma(A,B);                       
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   167
        !!x y. [| z = <x,y>;  R(x,y) |] ==> P            
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   168
     |] ==> P"
46841
49b91b716cbe Structured and calculation-based proofs (with new trans rules!)
paulson
parents: 46821
diff changeset
   169
by (auto simp add: split_def)
13240
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   170
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   171
lemma splitD: "split(R,<a,b>) ==> R(a,b)"
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   172
by (simp add: split_def)
bb5f4faea1f3 conversion of Sum, pair to Isar script
paulson
parents: 11694
diff changeset
   173
14864
419b45cdb400 new rules for simplifying quantifiers with Sigma
paulson
parents: 13544
diff changeset
   174
text {*
419b45cdb400 new rules for simplifying quantifiers with Sigma
paulson
parents: 13544
diff changeset
   175
  \bigskip Complex rules for Sigma.
419b45cdb400 new rules for simplifying quantifiers with Sigma
paulson
parents: 13544
diff changeset
   176
*}
419b45cdb400 new rules for simplifying quantifiers with Sigma
paulson
parents: 13544
diff changeset
   177
419b45cdb400 new rules for simplifying quantifiers with Sigma
paulson
parents: 13544
diff changeset
   178
lemma split_paired_Bex_Sigma [simp]:
46821
ff6b0c1087f2 Using mathematical notation for <-> and cardinal arithmetic
paulson
parents: 46820
diff changeset
   179
     "(\<exists>z \<in> Sigma(A,B). P(z)) \<longleftrightarrow> (\<exists>x \<in> A. \<exists>y \<in> B(x). P(<x,y>))"
14864
419b45cdb400 new rules for simplifying quantifiers with Sigma
paulson
parents: 13544
diff changeset
   180
by blast
419b45cdb400 new rules for simplifying quantifiers with Sigma
paulson
parents: 13544
diff changeset
   181
419b45cdb400 new rules for simplifying quantifiers with Sigma
paulson
parents: 13544
diff changeset
   182
lemma split_paired_Ball_Sigma [simp]:
46821
ff6b0c1087f2 Using mathematical notation for <-> and cardinal arithmetic
paulson
parents: 46820
diff changeset
   183
     "(\<forall>z \<in> Sigma(A,B). P(z)) \<longleftrightarrow> (\<forall>x \<in> A. \<forall>y \<in> B(x). P(<x,y>))"
14864
419b45cdb400 new rules for simplifying quantifiers with Sigma
paulson
parents: 13544
diff changeset
   184
by blast
419b45cdb400 new rules for simplifying quantifiers with Sigma
paulson
parents: 13544
diff changeset
   185
9570
e16e168984e1 installation of cancellation simprocs for the integers
paulson
parents: 2469
diff changeset
   186
end
124
858ab9a9b047 made pseudo theories for all ML files;
clasohm
parents:
diff changeset
   187
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 124
diff changeset
   188