src/ZF/func.thy
author paulson
Tue, 18 Jun 2002 17:58:21 +0200
changeset 13219 7e44aa8a276e
parent 13179 3f6f00c6c56f
child 13221 e29378f347e4
permissions -rw-r--r--
new lemma
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
     1
(*  Title:      ZF/func.thy
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
     2
    ID:         $Id$
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
     4
    Copyright   1991  University of Cambridge
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
     5
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
     6
Functions in Zermelo-Fraenkel Set Theory
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
     7
*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
     8
13168
afcbca3498b0 converted domrange to Isar and merged with equalities
paulson
parents: 13163
diff changeset
     9
theory func = equalities:
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    10
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    11
(*** The Pi operator -- dependent function space ***)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    12
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    13
lemma Pi_iff:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    14
    "f: Pi(A,B) <-> function(f) & f<=Sigma(A,B) & A<=domain(f)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    15
by (unfold Pi_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    16
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    17
(*For upward compatibility with the former definition*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    18
lemma Pi_iff_old:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    19
    "f: Pi(A,B) <-> f<=Sigma(A,B) & (ALL x:A. EX! y. <x,y>: f)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    20
by (unfold Pi_def function_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    21
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    22
lemma fun_is_function: "f: Pi(A,B) ==> function(f)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    23
by (simp only: Pi_iff)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    24
13219
7e44aa8a276e new lemma
paulson
parents: 13179
diff changeset
    25
lemma function_imp_Pi:
7e44aa8a276e new lemma
paulson
parents: 13179
diff changeset
    26
     "[|function(f); relation(f)|] ==> f \<in> domain(f) -> range(f)"
7e44aa8a276e new lemma
paulson
parents: 13179
diff changeset
    27
by (simp add: Pi_iff relation_def, blast) 
7e44aa8a276e new lemma
paulson
parents: 13179
diff changeset
    28
13172
03a5afa7b888 tidying up
paulson
parents: 13168
diff changeset
    29
lemma functionI: 
03a5afa7b888 tidying up
paulson
parents: 13168
diff changeset
    30
     "[| !!x y y'. [| <x,y>:r; <x,y'>:r |] ==> y=y' |] ==> function(r)"
03a5afa7b888 tidying up
paulson
parents: 13168
diff changeset
    31
by (simp add: function_def, blast) 
03a5afa7b888 tidying up
paulson
parents: 13168
diff changeset
    32
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    33
(*Functions are relations*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    34
lemma fun_is_rel: "f: Pi(A,B) ==> f <= Sigma(A,B)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    35
by (unfold Pi_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    36
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    37
lemma Pi_cong:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    38
    "[| A=A';  !!x. x:A' ==> B(x)=B'(x) |] ==> Pi(A,B) = Pi(A',B')"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    39
by (simp add: Pi_def cong add: Sigma_cong)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    40
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    41
(*Sigma_cong, Pi_cong NOT given to Addcongs: they cause
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    42
  flex-flex pairs and the "Check your prover" error.  Most
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    43
  Sigmas and Pis are abbreviated as * or -> *)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    44
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    45
(*Weakening one function type to another; see also Pi_type*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    46
lemma fun_weaken_type: "[| f: A->B;  B<=D |] ==> f: A->D"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    47
by (unfold Pi_def, best)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    48
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    49
(*** Function Application ***)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    50
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    51
lemma apply_equality2: "[| <a,b>: f;  <a,c>: f;  f: Pi(A,B) |] ==> b=c"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    52
by (unfold Pi_def function_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    53
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    54
lemma function_apply_equality: "[| <a,b>: f;  function(f) |] ==> f`a = b"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    55
by (unfold apply_def function_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    56
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    57
lemma apply_equality: "[| <a,b>: f;  f: Pi(A,B) |] ==> f`a = b"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    58
apply (unfold Pi_def)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    59
apply (blast intro: function_apply_equality)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    60
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    61
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    62
(*Applying a function outside its domain yields 0*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    63
lemma apply_0: "a ~: domain(f) ==> f`a = 0"
13176
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
    64
by (unfold apply_def, blast)
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    65
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    66
lemma Pi_memberD: "[| f: Pi(A,B);  c: f |] ==> EX x:A.  c = <x,f`x>"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    67
apply (frule fun_is_rel)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    68
apply (blast dest: apply_equality)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    69
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    70
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    71
lemma function_apply_Pair: "[| function(f);  a : domain(f)|] ==> <a,f`a>: f"
13176
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
    72
apply (simp add: function_def, clarify) 
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
    73
apply (subgoal_tac "f`a = y", blast) 
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
    74
apply (simp add: apply_def, blast) 
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    75
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    76
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    77
lemma apply_Pair: "[| f: Pi(A,B);  a:A |] ==> <a,f`a>: f"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    78
apply (simp add: Pi_iff)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    79
apply (blast intro: function_apply_Pair)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    80
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    81
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    82
(*Conclusion is flexible -- use res_inst_tac or else apply_funtype below!*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    83
lemma apply_type [TC]: "[| f: Pi(A,B);  a:A |] ==> f`a : B(a)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    84
by (blast intro: apply_Pair dest: fun_is_rel)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    85
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    86
(*This version is acceptable to the simplifier*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    87
lemma apply_funtype: "[| f: A->B;  a:A |] ==> f`a : B"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    88
by (blast dest: apply_type)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    89
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    90
lemma apply_iff: "f: Pi(A,B) ==> <a,b>: f <-> a:A & f`a = b"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    91
apply (frule fun_is_rel)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    92
apply (blast intro!: apply_Pair apply_equality)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    93
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    94
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    95
(*Refining one Pi type to another*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    96
lemma Pi_type: "[| f: Pi(A,C);  !!x. x:A ==> f`x : B(x) |] ==> f : Pi(A,B)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    97
apply (simp only: Pi_iff)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    98
apply (blast dest: function_apply_equality)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
    99
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   100
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   101
(*Such functions arise in non-standard datatypes, ZF/ex/Ntree for instance*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   102
lemma Pi_Collect_iff:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   103
     "(f : Pi(A, %x. {y:B(x). P(x,y)}))
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   104
      <->  f : Pi(A,B) & (ALL x: A. P(x, f`x))"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   105
by (blast intro: Pi_type dest: apply_type)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   106
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   107
lemma Pi_weaken_type:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   108
        "[| f : Pi(A,B);  !!x. x:A ==> B(x)<=C(x) |] ==> f : Pi(A,C)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   109
by (blast intro: Pi_type dest: apply_type)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   110
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   111
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   112
(** Elimination of membership in a function **)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   113
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   114
lemma domain_type: "[| <a,b> : f;  f: Pi(A,B) |] ==> a : A"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   115
by (blast dest: fun_is_rel)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   116
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   117
lemma range_type: "[| <a,b> : f;  f: Pi(A,B) |] ==> b : B(a)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   118
by (blast dest: fun_is_rel)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   119
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   120
lemma Pair_mem_PiD: "[| <a,b>: f;  f: Pi(A,B) |] ==> a:A & b:B(a) & f`a = b"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   121
by (blast intro: domain_type range_type apply_equality)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   122
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   123
(*** Lambda Abstraction ***)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   124
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   125
lemma lamI: "a:A ==> <a,b(a)> : (lam x:A. b(x))"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   126
apply (unfold lam_def)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   127
apply (erule RepFunI)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   128
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   129
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   130
lemma lamE:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   131
    "[| p: (lam x:A. b(x));  !!x.[| x:A; p=<x,b(x)> |] ==> P
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   132
     |] ==>  P"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   133
by (simp add: lam_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   134
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   135
lemma lamD: "[| <a,c>: (lam x:A. b(x)) |] ==> c = b(a)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   136
by (simp add: lam_def)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   137
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   138
lemma lam_type [TC]:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   139
    "[| !!x. x:A ==> b(x): B(x) |] ==> (lam x:A. b(x)) : Pi(A,B)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   140
by (simp add: lam_def Pi_def function_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   141
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   142
lemma lam_funtype: "(lam x:A. b(x)) : A -> {b(x). x:A}"
13176
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
   143
by (blast intro: lam_type)
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   144
13172
03a5afa7b888 tidying up
paulson
parents: 13168
diff changeset
   145
lemma function_lam: "function (lam x:A. b(x))"
03a5afa7b888 tidying up
paulson
parents: 13168
diff changeset
   146
by (simp add: function_def lam_def) 
03a5afa7b888 tidying up
paulson
parents: 13168
diff changeset
   147
03a5afa7b888 tidying up
paulson
parents: 13168
diff changeset
   148
lemma relation_lam: "relation (lam x:A. b(x))"  
03a5afa7b888 tidying up
paulson
parents: 13168
diff changeset
   149
by (simp add: relation_def lam_def) 
03a5afa7b888 tidying up
paulson
parents: 13168
diff changeset
   150
13175
81082cfa5618 new definition of "apply" and new simprule "beta_if"
paulson
parents: 13174
diff changeset
   151
lemma beta_if [simp]: "(lam x:A. b(x)) ` a = (if a : A then b(a) else 0)"
13176
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
   152
by (simp add: apply_def lam_def, blast)
13175
81082cfa5618 new definition of "apply" and new simprule "beta_if"
paulson
parents: 13174
diff changeset
   153
81082cfa5618 new definition of "apply" and new simprule "beta_if"
paulson
parents: 13174
diff changeset
   154
lemma beta: "a : A ==> (lam x:A. b(x)) ` a = b(a)"
13176
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
   155
by (simp add: apply_def lam_def, blast)
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   156
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   157
lemma lam_empty [simp]: "(lam x:0. b(x)) = 0"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   158
by (simp add: lam_def)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   159
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   160
lemma domain_lam [simp]: "domain(Lambda(A,b)) = A"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   161
by (simp add: lam_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   162
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   163
(*congruence rule for lambda abstraction*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   164
lemma lam_cong [cong]:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   165
    "[| A=A';  !!x. x:A' ==> b(x)=b'(x) |] ==> Lambda(A,b) = Lambda(A',b')"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   166
by (simp only: lam_def cong add: RepFun_cong)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   167
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   168
lemma lam_theI:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   169
    "(!!x. x:A ==> EX! y. Q(x,y)) ==> EX f. ALL x:A. Q(x, f`x)"
13175
81082cfa5618 new definition of "apply" and new simprule "beta_if"
paulson
parents: 13174
diff changeset
   170
apply (rule_tac x = "lam x: A. THE y. Q (x,y)" in exI)
13176
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
   171
apply simp 
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   172
apply (blast intro: theI)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   173
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   174
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   175
lemma lam_eqE: "[| (lam x:A. f(x)) = (lam x:A. g(x));  a:A |] ==> f(a)=g(a)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   176
by (fast intro!: lamI elim: equalityE lamE)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   177
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   178
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   179
(*Empty function spaces*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   180
lemma Pi_empty1 [simp]: "Pi(0,A) = {0}"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   181
by (unfold Pi_def function_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   182
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   183
(*The singleton function*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   184
lemma singleton_fun [simp]: "{<a,b>} : {a} -> {b}"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   185
by (unfold Pi_def function_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   186
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   187
lemma Pi_empty2 [simp]: "(A->0) = (if A=0 then {0} else 0)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   188
by (unfold Pi_def function_def, force)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   189
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   190
lemma  fun_space_empty_iff [iff]: "(A->X)=0 \<longleftrightarrow> X=0 & (A \<noteq> 0)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   191
apply auto
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   192
apply (fast intro!: equals0I intro: lam_type)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   193
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   194
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   195
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   196
(** Extensionality **)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   197
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   198
(*Semi-extensionality!*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   199
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   200
lemma fun_subset:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   201
    "[| f : Pi(A,B);  g: Pi(C,D);  A<=C;
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   202
        !!x. x:A ==> f`x = g`x       |] ==> f<=g"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   203
by (force dest: Pi_memberD intro: apply_Pair)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   204
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   205
lemma fun_extension:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   206
    "[| f : Pi(A,B);  g: Pi(A,D);
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   207
        !!x. x:A ==> f`x = g`x       |] ==> f=g"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   208
by (blast del: subsetI intro: subset_refl sym fun_subset)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   209
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   210
lemma eta [simp]: "f : Pi(A,B) ==> (lam x:A. f`x) = f"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   211
apply (rule fun_extension)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   212
apply (auto simp add: lam_type apply_type beta)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   213
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   214
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   215
lemma fun_extension_iff:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   216
     "[| f:Pi(A,B); g:Pi(A,C) |] ==> (ALL a:A. f`a = g`a) <-> f=g"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   217
by (blast intro: fun_extension)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   218
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   219
(*thm by Mark Staples, proof by lcp*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   220
lemma fun_subset_eq: "[| f:Pi(A,B); g:Pi(A,C) |] ==> f <= g <-> (f = g)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   221
by (blast dest: apply_Pair
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   222
	  intro: fun_extension apply_equality [symmetric])
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   223
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   224
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   225
(*Every element of Pi(A,B) may be expressed as a lambda abstraction!*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   226
lemma Pi_lamE:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   227
  assumes major: "f: Pi(A,B)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   228
      and minor: "!!b. [| ALL x:A. b(x):B(x);  f = (lam x:A. b(x)) |] ==> P"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   229
  shows "P"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   230
apply (rule minor)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   231
apply (rule_tac [2] eta [symmetric])
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   232
apply (blast intro: major apply_type)+
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   233
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   234
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   235
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   236
(** Images of functions **)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   237
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   238
lemma image_lam: "C <= A ==> (lam x:A. b(x)) `` C = {b(x). x:C}"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   239
by (unfold lam_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   240
13179
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   241
lemma Repfun_function_if:
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   242
     "function(f) 
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   243
      ==> {f`x. x:C} = (if C <= domain(f) then f``C else cons(0,f``C))";
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   244
apply simp
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   245
apply (intro conjI impI)  
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   246
 apply (blast dest: function_apply_equality intro: function_apply_Pair) 
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   247
apply (rule equalityI)
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   248
 apply (blast intro!: function_apply_Pair apply_0) 
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   249
apply (blast dest: function_apply_equality intro: apply_0 [symmetric]) 
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   250
done
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   251
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   252
(*For this lemma and the next, the right-hand side could equivalently 
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   253
  be written UN x:C. {f`x} *)
13174
85d3c0981a16 more tidying
paulson
parents: 13172
diff changeset
   254
lemma image_function:
85d3c0981a16 more tidying
paulson
parents: 13172
diff changeset
   255
     "[| function(f);  C <= domain(f) |] ==> f``C = {f`x. x:C}";
13179
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   256
by (simp add: Repfun_function_if) 
13174
85d3c0981a16 more tidying
paulson
parents: 13172
diff changeset
   257
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   258
lemma image_fun: "[| f : Pi(A,B);  C <= A |] ==> f``C = {f`x. x:C}"
13174
85d3c0981a16 more tidying
paulson
parents: 13172
diff changeset
   259
apply (simp add: Pi_iff) 
85d3c0981a16 more tidying
paulson
parents: 13172
diff changeset
   260
apply (blast intro: image_function) 
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   261
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   262
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   263
lemma Pi_image_cons:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   264
     "[| f: Pi(A,B);  x: A |] ==> f `` cons(x,y) = cons(f`x, f``y)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   265
by (blast dest: apply_equality apply_Pair)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   266
124
858ab9a9b047 made pseudo theories for all ML files;
clasohm
parents:
diff changeset
   267
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   268
(*** properties of "restrict" ***)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   269
13179
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   270
lemma restrict_subset: "restrict(f,A) <= f"
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   271
by (unfold restrict_def, blast)
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   272
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   273
lemma function_restrictI:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   274
    "function(f) ==> function(restrict(f,A))"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   275
by (unfold restrict_def function_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   276
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   277
lemma restrict_type2: "[| f: Pi(C,B);  A<=C |] ==> restrict(f,A) : Pi(A,B)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   278
by (simp add: Pi_iff function_def restrict_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   279
13179
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   280
lemma restrict: "restrict(f,A) ` a = (if a : A then f`a else 0)"
13176
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
   281
by (simp add: apply_def restrict_def, blast)
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   282
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   283
lemma restrict_empty [simp]: "restrict(f,0) = 0"
13179
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   284
by (unfold restrict_def, simp)
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   285
13172
03a5afa7b888 tidying up
paulson
parents: 13168
diff changeset
   286
lemma restrict_iff: "z \<in> restrict(r,A) \<longleftrightarrow> z \<in> r & (\<exists>x\<in>A. \<exists>y. z = \<langle>x, y\<rangle>)"
03a5afa7b888 tidying up
paulson
parents: 13168
diff changeset
   287
by (simp add: restrict_def) 
03a5afa7b888 tidying up
paulson
parents: 13168
diff changeset
   288
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   289
lemma domain_restrict_lam [simp]: "domain(restrict(Lambda(A,f),C)) = A Int C"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   290
apply (unfold restrict_def lam_def)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   291
apply (rule equalityI)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   292
apply (auto simp add: domain_iff)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   293
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   294
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   295
lemma restrict_restrict [simp]:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   296
     "restrict(restrict(r,A),B) = restrict(r, A Int B)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   297
by (unfold restrict_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   298
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   299
lemma domain_restrict [simp]: "domain(restrict(f,C)) = domain(f) Int C"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   300
apply (unfold restrict_def)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   301
apply (auto simp add: domain_def)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   302
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   303
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   304
lemma restrict_idem [simp]: "f <= Sigma(A,B) ==> restrict(f,A) = f"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   305
by (simp add: restrict_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   306
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   307
lemma restrict_if [simp]: "restrict(f,A) ` a = (if a : A then f`a else 0)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   308
by (simp add: restrict apply_0)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   309
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   310
lemma restrict_lam_eq:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   311
    "A<=C ==> restrict(lam x:C. b(x), A) = (lam x:A. b(x))"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   312
by (unfold restrict_def lam_def, auto)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   313
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   314
lemma fun_cons_restrict_eq:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   315
     "f : cons(a, b) -> B ==> f = cons(<a, f ` a>, restrict(f, b))"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   316
apply (rule equalityI)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   317
prefer 2 apply (blast intro: apply_Pair restrict_subset [THEN subsetD])
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   318
apply (auto dest!: Pi_memberD simp add: restrict_def lam_def)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   319
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   320
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   321
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   322
(*** Unions of functions ***)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   323
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   324
(** The Union of a set of COMPATIBLE functions is a function **)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   325
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   326
lemma function_Union:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   327
    "[| ALL x:S. function(x);
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   328
        ALL x:S. ALL y:S. x<=y | y<=x  |]
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   329
     ==> function(Union(S))"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   330
by (unfold function_def, blast) 
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   331
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   332
lemma fun_Union:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   333
    "[| ALL f:S. EX C D. f:C->D;
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   334
             ALL f:S. ALL y:S. f<=y | y<=f  |] ==>
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   335
          Union(S) : domain(Union(S)) -> range(Union(S))"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   336
apply (unfold Pi_def)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   337
apply (blast intro!: rel_Union function_Union)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   338
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   339
13174
85d3c0981a16 more tidying
paulson
parents: 13172
diff changeset
   340
lemma gen_relation_Union [rule_format]:
85d3c0981a16 more tidying
paulson
parents: 13172
diff changeset
   341
     "\<forall>f\<in>F. relation(f) \<Longrightarrow> relation(Union(F))"
85d3c0981a16 more tidying
paulson
parents: 13172
diff changeset
   342
by (simp add: relation_def) 
85d3c0981a16 more tidying
paulson
parents: 13172
diff changeset
   343
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   344
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   345
(** The Union of 2 disjoint functions is a function **)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   346
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   347
lemmas Un_rls = Un_subset_iff SUM_Un_distrib1 prod_Un_distrib2
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   348
                subset_trans [OF _ Un_upper1]
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   349
                subset_trans [OF _ Un_upper2]
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   350
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   351
lemma fun_disjoint_Un:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   352
     "[| f: A->B;  g: C->D;  A Int C = 0  |]
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   353
      ==> (f Un g) : (A Un C) -> (B Un D)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   354
(*Prove the product and domain subgoals using distributive laws*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   355
apply (simp add: Pi_iff extension Un_rls)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   356
apply (unfold function_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   357
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   358
13179
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   359
lemma fun_disjoint_apply1: "a \<notin> domain(g) ==> (f Un g)`a = f`a"
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   360
by (simp add: apply_def, blast) 
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   361
13179
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   362
lemma fun_disjoint_apply2: "c \<notin> domain(f) ==> (f Un g)`c = g`c"
3f6f00c6c56f strong lemmas about functions
paulson
parents: 13176
diff changeset
   363
by (simp add: apply_def, blast) 
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   364
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   365
(** Domain and range of a function/relation **)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   366
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   367
lemma domain_of_fun: "f : Pi(A,B) ==> domain(f)=A"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   368
by (unfold Pi_def, blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   369
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   370
lemma apply_rangeI: "[| f : Pi(A,B);  a: A |] ==> f`a : range(f)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   371
by (erule apply_Pair [THEN rangeI], assumption)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   372
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   373
lemma range_of_fun: "f : Pi(A,B) ==> f : A->range(f)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   374
by (blast intro: Pi_type apply_rangeI)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   375
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   376
(*** Extensions of functions ***)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   377
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   378
lemma fun_extend:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   379
     "[| f: A->B;  c~:A |] ==> cons(<c,b>,f) : cons(c,A) -> cons(b,B)"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   380
apply (frule singleton_fun [THEN fun_disjoint_Un], blast)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   381
apply (simp add: cons_eq) 
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   382
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   383
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   384
lemma fun_extend3:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   385
     "[| f: A->B;  c~:A;  b: B |] ==> cons(<c,b>,f) : cons(c,A) -> B"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   386
by (blast intro: fun_extend [THEN fun_weaken_type])
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   387
13176
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
   388
lemma extend_apply:
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
   389
     "c ~: domain(f) ==> cons(<c,b>,f)`a = (if a=c then b else f`a)"
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
   390
by (auto simp add: apply_def) 
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   391
13176
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
   392
lemma fun_extend_apply [simp]:
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
   393
     "[| f: A->B;  c~:A |] ==> cons(<c,b>,f)`a = (if a=c then b else f`a)" 
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
   394
apply (rule extend_apply) 
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
   395
apply (simp add: Pi_def, blast) 
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   396
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   397
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   398
lemmas singleton_apply = apply_equality [OF singletonI singleton_fun, simp]
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   399
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   400
(*For Finite.ML.  Inclusion of right into left is easy*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   401
lemma cons_fun_eq:
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   402
     "c ~: A ==> cons(c,A) -> B = (UN f: A->B. UN b:B. {cons(<c,b>, f)})"
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   403
apply (rule equalityI)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   404
apply (safe elim!: fun_extend3)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   405
(*Inclusion of left into right*)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   406
apply (subgoal_tac "restrict (x, A) : A -> B")
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   407
 prefer 2 apply (blast intro: restrict_type2)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   408
apply (rule UN_I, assumption)
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   409
apply (rule apply_funtype [THEN UN_I]) 
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   410
  apply assumption
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   411
 apply (rule consI1) 
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   412
apply (simp (no_asm))
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   413
apply (rule fun_extension) 
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   414
  apply assumption
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   415
 apply (blast intro: fun_extend) 
13176
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
   416
apply (erule consE, simp_all)
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   417
done
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   418
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   419
ML
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   420
{*
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   421
val Pi_iff = thm "Pi_iff";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   422
val Pi_iff_old = thm "Pi_iff_old";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   423
val fun_is_function = thm "fun_is_function";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   424
val fun_is_rel = thm "fun_is_rel";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   425
val Pi_cong = thm "Pi_cong";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   426
val fun_weaken_type = thm "fun_weaken_type";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   427
val apply_equality2 = thm "apply_equality2";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   428
val function_apply_equality = thm "function_apply_equality";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   429
val apply_equality = thm "apply_equality";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   430
val apply_0 = thm "apply_0";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   431
val Pi_memberD = thm "Pi_memberD";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   432
val function_apply_Pair = thm "function_apply_Pair";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   433
val apply_Pair = thm "apply_Pair";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   434
val apply_type = thm "apply_type";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   435
val apply_funtype = thm "apply_funtype";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   436
val apply_iff = thm "apply_iff";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   437
val Pi_type = thm "Pi_type";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   438
val Pi_Collect_iff = thm "Pi_Collect_iff";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   439
val Pi_weaken_type = thm "Pi_weaken_type";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   440
val domain_type = thm "domain_type";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   441
val range_type = thm "range_type";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   442
val Pair_mem_PiD = thm "Pair_mem_PiD";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   443
val lamI = thm "lamI";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   444
val lamE = thm "lamE";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   445
val lamD = thm "lamD";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   446
val lam_type = thm "lam_type";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   447
val lam_funtype = thm "lam_funtype";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   448
val beta = thm "beta";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   449
val lam_empty = thm "lam_empty";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   450
val domain_lam = thm "domain_lam";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   451
val lam_cong = thm "lam_cong";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   452
val lam_theI = thm "lam_theI";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   453
val lam_eqE = thm "lam_eqE";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   454
val Pi_empty1 = thm "Pi_empty1";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   455
val singleton_fun = thm "singleton_fun";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   456
val Pi_empty2 = thm "Pi_empty2";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   457
val fun_space_empty_iff = thm "fun_space_empty_iff";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   458
val fun_subset = thm "fun_subset";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   459
val fun_extension = thm "fun_extension";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   460
val eta = thm "eta";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   461
val fun_extension_iff = thm "fun_extension_iff";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   462
val fun_subset_eq = thm "fun_subset_eq";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   463
val Pi_lamE = thm "Pi_lamE";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   464
val image_lam = thm "image_lam";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   465
val image_fun = thm "image_fun";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   466
val Pi_image_cons = thm "Pi_image_cons";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   467
val restrict_subset = thm "restrict_subset";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   468
val function_restrictI = thm "function_restrictI";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   469
val restrict_type2 = thm "restrict_type2";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   470
val restrict = thm "restrict";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   471
val restrict_empty = thm "restrict_empty";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   472
val domain_restrict_lam = thm "domain_restrict_lam";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   473
val restrict_restrict = thm "restrict_restrict";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   474
val domain_restrict = thm "domain_restrict";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   475
val restrict_idem = thm "restrict_idem";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   476
val restrict_if = thm "restrict_if";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   477
val restrict_lam_eq = thm "restrict_lam_eq";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   478
val fun_cons_restrict_eq = thm "fun_cons_restrict_eq";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   479
val function_Union = thm "function_Union";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   480
val fun_Union = thm "fun_Union";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   481
val fun_disjoint_Un = thm "fun_disjoint_Un";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   482
val fun_disjoint_apply1 = thm "fun_disjoint_apply1";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   483
val fun_disjoint_apply2 = thm "fun_disjoint_apply2";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   484
val domain_of_fun = thm "domain_of_fun";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   485
val apply_rangeI = thm "apply_rangeI";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   486
val range_of_fun = thm "range_of_fun";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   487
val fun_extend = thm "fun_extend";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   488
val fun_extend3 = thm "fun_extend3";
13176
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 13175
diff changeset
   489
val fun_extend_apply = thm "fun_extend_apply";
13163
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   490
val singleton_apply = thm "singleton_apply";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   491
val cons_fun_eq = thm "cons_fun_eq";
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   492
*}
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   493
e320a52ff711 converted Arith, Univ, func to Isar format!
paulson
parents: 2469
diff changeset
   494
end