src/HOL/BNF_Def.thy
author blanchet
Thu, 06 Mar 2014 15:40:33 +0100
changeset 55945 e96383acecf9
parent 55811 aa1acc25126b
child 56635 b07c8ad23010
permissions -rw-r--r--
renamed 'fun_rel' to 'rel_fun'
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
55059
ef2e0fb783c6 tuned comments
blanchet
parents: 55058
diff changeset
     1
(*  Title:      HOL/BNF_Def.thy
48975
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
     2
    Author:     Dmitriy Traytel, TU Muenchen
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
     3
    Copyright   2012
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
     4
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
     5
Definition of bounded natural functors.
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
     6
*)
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
     7
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
     8
header {* Definition of Bounded Natural Functors *}
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
     9
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
    10
theory BNF_Def
55085
0e8e4dc55866 moved 'fundef_cong' attribute (and other basic 'fun' stuff) up the dependency chain
blanchet
parents: 55066
diff changeset
    11
imports BNF_Util Fun_Def_Base
48975
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
    12
keywords
49286
dde4967c9233 added "defaults" option
blanchet
parents: 49284
diff changeset
    13
  "print_bnfs" :: diag and
51836
4d6dcd51dd52 renamed "bnf_def" keyword to "bnf" (since it's not a definition, but rather a registration)
blanchet
parents: 49537
diff changeset
    14
  "bnf" :: thy_goal
48975
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
    15
begin
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
    16
55066
blanchet
parents: 55062
diff changeset
    17
lemma collect_comp: "collect F o g = collect ((\<lambda>f. f o g) ` F)"
blanchet
parents: 55062
diff changeset
    18
  by (rule ext) (auto simp only: comp_apply collect_def)
51893
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    19
49495
675b9df572df rel_Gr does not depend on map_wpull
traytel
parents: 49325
diff changeset
    20
definition convol ("<_ , _>") where
675b9df572df rel_Gr does not depend on map_wpull
traytel
parents: 49325
diff changeset
    21
"<f , g> \<equiv> %a. (f a, g a)"
675b9df572df rel_Gr does not depend on map_wpull
traytel
parents: 49325
diff changeset
    22
675b9df572df rel_Gr does not depend on map_wpull
traytel
parents: 49325
diff changeset
    23
lemma fst_convol:
675b9df572df rel_Gr does not depend on map_wpull
traytel
parents: 49325
diff changeset
    24
"fst o <f , g> = f"
675b9df572df rel_Gr does not depend on map_wpull
traytel
parents: 49325
diff changeset
    25
apply(rule ext)
675b9df572df rel_Gr does not depend on map_wpull
traytel
parents: 49325
diff changeset
    26
unfolding convol_def by simp
675b9df572df rel_Gr does not depend on map_wpull
traytel
parents: 49325
diff changeset
    27
675b9df572df rel_Gr does not depend on map_wpull
traytel
parents: 49325
diff changeset
    28
lemma snd_convol:
675b9df572df rel_Gr does not depend on map_wpull
traytel
parents: 49325
diff changeset
    29
"snd o <f , g> = g"
675b9df572df rel_Gr does not depend on map_wpull
traytel
parents: 49325
diff changeset
    30
apply(rule ext)
675b9df572df rel_Gr does not depend on map_wpull
traytel
parents: 49325
diff changeset
    31
unfolding convol_def by simp
675b9df572df rel_Gr does not depend on map_wpull
traytel
parents: 49325
diff changeset
    32
51893
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    33
lemma convol_mem_GrpI:
52986
7f7bbeb16538 eliminated bogus assumption from theorem (that was instantiated with refl and resulted in flexflex pairs)
traytel
parents: 52749
diff changeset
    34
"x \<in> A \<Longrightarrow> <id , g> x \<in> (Collect (split (Grp A g)))"
51893
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    35
unfolding convol_def Grp_def by auto
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    36
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    37
definition csquare where
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    38
"csquare A f1 f2 p1 p2 \<longleftrightarrow> (\<forall> a \<in> A. f1 (p1 a) = f2 (p2 a))"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    39
51893
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    40
lemma eq_alt: "op = = Grp UNIV id"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    41
unfolding Grp_def by auto
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    42
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    43
lemma leq_conversepI: "R = op = \<Longrightarrow> R \<le> R^--1"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    44
  by auto
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    45
54841
af71b753c459 express weak pullback property of bnfs only in terms of the relator
traytel
parents: 54581
diff changeset
    46
lemma leq_OOI: "R = op = \<Longrightarrow> R \<le> R OO R"
51893
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    47
  by auto
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    48
53561
92bcac4f9ac9 simplified derivation of in_rel
traytel
parents: 53560
diff changeset
    49
lemma OO_Grp_alt: "(Grp A f)^--1 OO Grp A g = (\<lambda>x y. \<exists>z. z \<in> A \<and> f z = x \<and> g z = y)"
92bcac4f9ac9 simplified derivation of in_rel
traytel
parents: 53560
diff changeset
    50
  unfolding Grp_def by auto
92bcac4f9ac9 simplified derivation of in_rel
traytel
parents: 53560
diff changeset
    51
51893
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    52
lemma Grp_UNIV_id: "f = id \<Longrightarrow> (Grp UNIV f)^--1 OO Grp UNIV f = Grp UNIV f"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    53
unfolding Grp_def by auto
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    54
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    55
lemma Grp_UNIV_idI: "x = y \<Longrightarrow> Grp UNIV id x y"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    56
unfolding Grp_def by auto
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    57
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    58
lemma Grp_mono: "A \<le> B \<Longrightarrow> Grp A f \<le> Grp B f"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    59
unfolding Grp_def by auto
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    60
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    61
lemma GrpI: "\<lbrakk>f x = y; x \<in> A\<rbrakk> \<Longrightarrow> Grp A f x y"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    62
unfolding Grp_def by auto
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    63
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    64
lemma GrpE: "Grp A f x y \<Longrightarrow> (\<lbrakk>f x = y; x \<in> A\<rbrakk> \<Longrightarrow> R) \<Longrightarrow> R"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    65
unfolding Grp_def by auto
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    66
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    67
lemma Collect_split_Grp_eqD: "z \<in> Collect (split (Grp A f)) \<Longrightarrow> (f \<circ> fst) z = snd z"
55066
blanchet
parents: 55062
diff changeset
    68
unfolding Grp_def comp_def by auto
51893
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    69
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    70
lemma Collect_split_Grp_inD: "z \<in> Collect (split (Grp A f)) \<Longrightarrow> fst z \<in> A"
55066
blanchet
parents: 55062
diff changeset
    71
unfolding Grp_def comp_def by auto
51893
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    72
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    73
definition "pick_middlep P Q a c = (SOME b. P a b \<and> Q b c)"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    74
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    75
lemma pick_middlep:
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    76
"(P OO Q) a c \<Longrightarrow> P a (pick_middlep P Q a c) \<and> Q (pick_middlep P Q a c) c"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    77
unfolding pick_middlep_def apply(rule someI_ex) by auto
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    78
51893
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    79
definition fstOp where "fstOp P Q ac = (fst ac, pick_middlep P Q (fst ac) (snd ac))"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    80
definition sndOp where "sndOp P Q ac = (pick_middlep P Q (fst ac) (snd ac), (snd ac))"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    81
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    82
lemma fstOp_in: "ac \<in> Collect (split (P OO Q)) \<Longrightarrow> fstOp P Q ac \<in> Collect (split P)"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    83
unfolding fstOp_def mem_Collect_eq
55642
63beb38e9258 adapted to renaming of datatype 'cases' and 'recs' to 'case' and 'rec'
blanchet
parents: 55414
diff changeset
    84
by (subst (asm) surjective_pairing, unfold prod.case) (erule pick_middlep[THEN conjunct1])
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    85
51893
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    86
lemma fst_fstOp: "fst bc = (fst \<circ> fstOp P Q) bc"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    87
unfolding comp_def fstOp_def by simp
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    88
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    89
lemma snd_sndOp: "snd bc = (snd \<circ> sndOp P Q) bc"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    90
unfolding comp_def sndOp_def by simp
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    91
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    92
lemma sndOp_in: "ac \<in> Collect (split (P OO Q)) \<Longrightarrow> sndOp P Q ac \<in> Collect (split Q)"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    93
unfolding sndOp_def mem_Collect_eq
55642
63beb38e9258 adapted to renaming of datatype 'cases' and 'recs' to 'case' and 'rec'
blanchet
parents: 55414
diff changeset
    94
by (subst (asm) surjective_pairing, unfold prod.case) (erule pick_middlep[THEN conjunct2])
51893
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    95
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    96
lemma csquare_fstOp_sndOp:
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    97
"csquare (Collect (split (P OO Q))) snd fst (fstOp P Q) (sndOp P Q)"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    98
unfolding csquare_def fstOp_def sndOp_def using pick_middlep by simp
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
    99
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
   100
lemma snd_fst_flip: "snd xy = (fst o (%(x, y). (y, x))) xy"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
   101
by (simp split: prod.split)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
   102
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
   103
lemma fst_snd_flip: "fst xy = (snd o (%(x, y). (y, x))) xy"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
   104
by (simp split: prod.split)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
   105
51893
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
   106
lemma flip_pred: "A \<subseteq> Collect (split (R ^--1)) \<Longrightarrow> (%(x, y). (y, x)) ` A \<subseteq> Collect (split R)"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
   107
by auto
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
   108
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
   109
lemma Collect_split_mono: "A \<le> B \<Longrightarrow> Collect (split A) \<subseteq> Collect (split B)"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
   110
  by auto
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 51836
diff changeset
   111
51916
eac9e9a45bf5 stronger monotonicity property for relators
traytel
parents: 51909
diff changeset
   112
lemma Collect_split_mono_strong: 
55163
a740f312d9e4 made tactic more robust
traytel
parents: 55085
diff changeset
   113
  "\<lbrakk>X = fst ` A; Y = snd ` A; \<forall>a\<in>X. \<forall>b \<in> Y. P a b \<longrightarrow> Q a b; A \<subseteq> Collect (split P)\<rbrakk> \<Longrightarrow>
51916
eac9e9a45bf5 stronger monotonicity property for relators
traytel
parents: 51909
diff changeset
   114
  A \<subseteq> Collect (split Q)"
eac9e9a45bf5 stronger monotonicity property for relators
traytel
parents: 51909
diff changeset
   115
  by fastforce
eac9e9a45bf5 stronger monotonicity property for relators
traytel
parents: 51909
diff changeset
   116
55163
a740f312d9e4 made tactic more robust
traytel
parents: 55085
diff changeset
   117
51917
f964a9887713 store proper theorems even for fixed points that have no passive live variables
traytel
parents: 51916
diff changeset
   118
lemma predicate2_eqD: "A = B \<Longrightarrow> A a b \<longleftrightarrow> B a b"
55811
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   119
by simp
49537
fe1deee434b6 generate "rel_as_srel" and "rel_flip" properties
blanchet
parents: 49510
diff changeset
   120
55414
eab03e9cee8a renamed '{prod,sum,bool,unit}_case' to 'case_...'
blanchet
parents: 55163
diff changeset
   121
lemma case_sum_o_inj:
eab03e9cee8a renamed '{prod,sum,bool,unit}_case' to 'case_...'
blanchet
parents: 55163
diff changeset
   122
"case_sum f g \<circ> Inl = f"
eab03e9cee8a renamed '{prod,sum,bool,unit}_case' to 'case_...'
blanchet
parents: 55163
diff changeset
   123
"case_sum f g \<circ> Inr = g"
52635
4f84b730c489 got rid of in_bd BNF property (derivable from set_bd+map_cong+map_comp+map_id)
traytel
parents: 51917
diff changeset
   124
by auto
4f84b730c489 got rid of in_bd BNF property (derivable from set_bd+map_cong+map_comp+map_id)
traytel
parents: 51917
diff changeset
   125
4f84b730c489 got rid of in_bd BNF property (derivable from set_bd+map_cong+map_comp+map_id)
traytel
parents: 51917
diff changeset
   126
lemma card_order_csum_cone_cexp_def:
4f84b730c489 got rid of in_bd BNF property (derivable from set_bd+map_cong+map_comp+map_id)
traytel
parents: 51917
diff changeset
   127
  "card_order r \<Longrightarrow> ( |A1| +c cone) ^c r = |Func UNIV (Inl ` A1 \<union> {Inr ()})|"
4f84b730c489 got rid of in_bd BNF property (derivable from set_bd+map_cong+map_comp+map_id)
traytel
parents: 51917
diff changeset
   128
  unfolding cexp_def cone_def Field_csum Field_card_of by (auto dest: Field_card_order)
4f84b730c489 got rid of in_bd BNF property (derivable from set_bd+map_cong+map_comp+map_id)
traytel
parents: 51917
diff changeset
   129
4f84b730c489 got rid of in_bd BNF property (derivable from set_bd+map_cong+map_comp+map_id)
traytel
parents: 51917
diff changeset
   130
lemma If_the_inv_into_in_Func:
4f84b730c489 got rid of in_bd BNF property (derivable from set_bd+map_cong+map_comp+map_id)
traytel
parents: 51917
diff changeset
   131
  "\<lbrakk>inj_on g C; C \<subseteq> B \<union> {x}\<rbrakk> \<Longrightarrow>
4f84b730c489 got rid of in_bd BNF property (derivable from set_bd+map_cong+map_comp+map_id)
traytel
parents: 51917
diff changeset
   132
  (\<lambda>i. if i \<in> g ` C then the_inv_into C g i else x) \<in> Func UNIV (B \<union> {x})"
4f84b730c489 got rid of in_bd BNF property (derivable from set_bd+map_cong+map_comp+map_id)
traytel
parents: 51917
diff changeset
   133
unfolding Func_def by (auto dest: the_inv_into_into)
4f84b730c489 got rid of in_bd BNF property (derivable from set_bd+map_cong+map_comp+map_id)
traytel
parents: 51917
diff changeset
   134
4f84b730c489 got rid of in_bd BNF property (derivable from set_bd+map_cong+map_comp+map_id)
traytel
parents: 51917
diff changeset
   135
lemma If_the_inv_into_f_f:
4f84b730c489 got rid of in_bd BNF property (derivable from set_bd+map_cong+map_comp+map_id)
traytel
parents: 51917
diff changeset
   136
  "\<lbrakk>i \<in> C; inj_on g C\<rbrakk> \<Longrightarrow>
4f84b730c489 got rid of in_bd BNF property (derivable from set_bd+map_cong+map_comp+map_id)
traytel
parents: 51917
diff changeset
   137
  ((\<lambda>i. if i \<in> g ` C then the_inv_into C g i else x) o g) i = id i"
4f84b730c489 got rid of in_bd BNF property (derivable from set_bd+map_cong+map_comp+map_id)
traytel
parents: 51917
diff changeset
   138
unfolding Func_def by (auto elim: the_inv_into_f_f)
4f84b730c489 got rid of in_bd BNF property (derivable from set_bd+map_cong+map_comp+map_id)
traytel
parents: 51917
diff changeset
   139
52731
dacd47a0633f transfer rule for {c,d}tor_{,un}fold
traytel
parents: 52730
diff changeset
   140
lemma vimage2pI: "R (f x) (g y) \<Longrightarrow> vimage2p f g R x y"
dacd47a0633f transfer rule for {c,d}tor_{,un}fold
traytel
parents: 52730
diff changeset
   141
  unfolding vimage2p_def by -
52719
480a3479fa47 transfer rule for map (not yet registered as a transfer rule)
traytel
parents: 52660
diff changeset
   142
55945
e96383acecf9 renamed 'fun_rel' to 'rel_fun'
blanchet
parents: 55811
diff changeset
   143
lemma rel_fun_iff_leq_vimage2p: "(rel_fun R S) f g = (R \<le> vimage2p f g S)"
e96383acecf9 renamed 'fun_rel' to 'rel_fun'
blanchet
parents: 55811
diff changeset
   144
  unfolding rel_fun_def vimage2p_def by auto
52719
480a3479fa47 transfer rule for map (not yet registered as a transfer rule)
traytel
parents: 52660
diff changeset
   145
52731
dacd47a0633f transfer rule for {c,d}tor_{,un}fold
traytel
parents: 52730
diff changeset
   146
lemma convol_image_vimage2p: "<f o fst, g o snd> ` Collect (split (vimage2p f g R)) \<subseteq> Collect (split R)"
dacd47a0633f transfer rule for {c,d}tor_{,un}fold
traytel
parents: 52730
diff changeset
   147
  unfolding vimage2p_def convol_def by auto
52719
480a3479fa47 transfer rule for map (not yet registered as a transfer rule)
traytel
parents: 52660
diff changeset
   148
54961
e60428f432bc new codatatype example: stream processors
traytel
parents: 54841
diff changeset
   149
lemma vimage2p_Grp: "vimage2p f g P = Grp UNIV f OO P OO (Grp UNIV g)\<inverse>\<inverse>"
e60428f432bc new codatatype example: stream processors
traytel
parents: 54841
diff changeset
   150
  unfolding vimage2p_def Grp_def by auto
e60428f432bc new codatatype example: stream processors
traytel
parents: 54841
diff changeset
   151
55062
6d3fad6f01c9 made BNF compile after move to HOL
blanchet
parents: 55059
diff changeset
   152
ML_file "Tools/BNF/bnf_def_tactics.ML"
6d3fad6f01c9 made BNF compile after move to HOL
blanchet
parents: 55059
diff changeset
   153
ML_file "Tools/BNF/bnf_def.ML"
49309
f20b24214ac2 split basic BNFs into really basic ones and others, and added Andreas Lochbihler's "option" BNF
blanchet
parents: 49286
diff changeset
   154
48975
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
   155
end