0
+ − 1
theory QuotScript
530
+ − 2
imports Plain ATP_Linkup
0
+ − 3
begin
+ − 4
+ − 5
definition
528
+ − 6
"equivp E \<equiv> \<forall>x y. E x y = (E x = E y)"
0
+ − 7
+ − 8
definition
528
+ − 9
"reflp E \<equiv> \<forall>x. E x x"
0
+ − 10
+ − 11
definition
528
+ − 12
"symp E \<equiv> \<forall>x y. E x y \<longrightarrow> E y x"
0
+ − 13
+ − 14
definition
528
+ − 15
"transp E \<equiv> \<forall>x y z. E x y \<and> E y z \<longrightarrow> E x z"
0
+ − 16
528
+ − 17
lemma equivp_reflp_symp_transp:
+ − 18
shows "equivp E = (reflp E \<and> symp E \<and> transp E)"
+ − 19
unfolding equivp_def reflp_def symp_def transp_def expand_fun_eq
0
+ − 20
by (blast)
+ − 21
528
+ − 22
lemma equivp_refl:
+ − 23
shows "equivp R \<Longrightarrow> (\<And>x. R x x)"
+ − 24
by (simp add: equivp_reflp_symp_transp reflp_def)
+ − 25
+ − 26
lemma equivp_reflp:
+ − 27
shows "equivp E \<Longrightarrow> (\<And>x. E x x)"
+ − 28
by (simp add: equivp_reflp_symp_transp reflp_def)
217
+ − 29
0
+ − 30
definition
528
+ − 31
"PART_equivp E \<equiv> (\<exists>x. E x x) \<and> (\<forall>x y. E x y = (E x x \<and> E y y \<and> (E x = E y)))"
0
+ − 32
528
+ − 33
lemma equivp_IMP_PART_equivp:
+ − 34
assumes a: "equivp E"
+ − 35
shows "PART_equivp E"
+ − 36
using a unfolding equivp_def PART_equivp_def
0
+ − 37
by auto
+ − 38
+ − 39
definition
528
+ − 40
"Quotient E Abs Rep \<equiv> (\<forall>a. Abs (Rep a) = a) \<and>
0
+ − 41
(\<forall>a. E (Rep a) (Rep a)) \<and>
+ − 42
(\<forall>r s. E r s = (E r r \<and> E s s \<and> (Abs r = Abs s)))"
+ − 43
540
c0b13fb70d6d
More code cleaning and renaming: moved rsp and prs lemmas from Int to QuotList
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 44
lemma Quotient_abs_rep:
528
+ − 45
assumes a: "Quotient E Abs Rep"
0
+ − 46
shows "Abs (Rep a) = a"
528
+ − 47
using a unfolding Quotient_def
0
+ − 48
by simp
+ − 49
528
+ − 50
lemma Quotient_REP_reflp:
+ − 51
assumes a: "Quotient E Abs Rep"
0
+ − 52
shows "E (Rep a) (Rep a)"
528
+ − 53
using a unfolding Quotient_def
0
+ − 54
by blast
+ − 55
539
+ − 56
lemma Quotient_rel:
528
+ − 57
assumes a: "Quotient E Abs Rep"
0
+ − 58
shows " E r s = (E r r \<and> E s s \<and> (Abs r = Abs s))"
528
+ − 59
using a unfolding Quotient_def
0
+ − 60
by blast
+ − 61
528
+ − 62
lemma Quotient_REL_ABS:
+ − 63
assumes a: "Quotient E Abs Rep"
0
+ − 64
shows "E r s \<Longrightarrow> Abs r = Abs s"
528
+ − 65
using a unfolding Quotient_def
0
+ − 66
by blast
+ − 67
528
+ − 68
lemma Quotient_REL_ABS_EQ:
+ − 69
assumes a: "Quotient E Abs Rep"
0
+ − 70
shows "E r r \<Longrightarrow> E s s \<Longrightarrow> E r s = (Abs r = Abs s)"
528
+ − 71
using a unfolding Quotient_def
0
+ − 72
by blast
+ − 73
528
+ − 74
lemma Quotient_REL_REP:
+ − 75
assumes a: "Quotient R Abs Rep"
459
+ − 76
shows "R (Rep a) (Rep b) = (a = b)"
528
+ − 77
using a unfolding Quotient_def
0
+ − 78
by metis
+ − 79
540
c0b13fb70d6d
More code cleaning and renaming: moved rsp and prs lemmas from Int to QuotList
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 80
lemma Quotient_rep_abs:
528
+ − 81
assumes a: "Quotient R Abs Rep"
459
+ − 82
shows "R r r \<Longrightarrow> R (Rep (Abs r)) r"
528
+ − 83
using a unfolding Quotient_def
0
+ − 84
by blast
+ − 85
528
+ − 86
lemma IDENTITY_equivp:
+ − 87
shows "equivp (op =)"
+ − 88
unfolding equivp_def
0
+ − 89
by auto
+ − 90
528
+ − 91
lemma IDENTITY_Quotient:
+ − 92
shows "Quotient (op =) id id"
+ − 93
unfolding Quotient_def id_def
0
+ − 94
by blast
+ − 95
528
+ − 96
lemma Quotient_symp:
+ − 97
assumes a: "Quotient E Abs Rep"
+ − 98
shows "symp E"
+ − 99
using a unfolding Quotient_def symp_def
0
+ − 100
by metis
+ − 101
528
+ − 102
lemma Quotient_transp:
+ − 103
assumes a: "Quotient E Abs Rep"
+ − 104
shows "transp E"
+ − 105
using a unfolding Quotient_def transp_def
0
+ − 106
by metis
+ − 107
+ − 108
fun
93
+ − 109
prod_rel
+ − 110
where
+ − 111
"prod_rel r1 r2 = (\<lambda>(a,b) (c,d). r1 a c \<and> r2 b d)"
+ − 112
+ − 113
fun
112
+ − 114
fun_map
0
+ − 115
where
+ − 116
"fun_map f g h x = g (h (f x))"
+ − 117
112
+ − 118
0
+ − 119
abbreviation
112
+ − 120
fun_map_syn (infixr "--->" 55)
0
+ − 121
where
112
+ − 122
"f ---> g \<equiv> fun_map f g"
0
+ − 123
537
+ − 124
lemma fun_map_id:
126
+ − 125
shows "(id ---> id) = id"
+ − 126
by (simp add: expand_fun_eq id_def)
0
+ − 127
537
+ − 128
(* Not used *)
+ − 129
lemma in_fun:
0
+ − 130
shows "x \<in> ((f ---> g) s) = g (f x \<in> s)"
+ − 131
by (simp add: mem_def)
+ − 132
+ − 133
fun
536
+ − 134
fun_rel
0
+ − 135
where
536
+ − 136
"fun_rel E1 E2 f g = (\<forall>x y. E1 x y \<longrightarrow> E2 (f x) (g y))"
0
+ − 137
+ − 138
abbreviation
536
+ − 139
fun_rel_syn (infixr "===>" 55)
0
+ − 140
where
536
+ − 141
"E1 ===> E2 \<equiv> fun_rel E1 E2"
0
+ − 142
536
+ − 143
lemma fun_rel_eq:
511
+ − 144
"(op =) ===> (op =) \<equiv> (op =)"
515
+ − 145
by (rule eq_reflection) (simp add: expand_fun_eq)
0
+ − 146
537
+ − 147
lemma fun_quotient:
528
+ − 148
assumes q1: "Quotient R1 abs1 rep1"
+ − 149
and q2: "Quotient R2 abs2 rep2"
+ − 150
shows "Quotient (R1 ===> R2) (rep1 ---> abs2) (abs1 ---> rep2)"
0
+ − 151
proof -
+ − 152
have "\<forall>a. (rep1 ---> abs2) ((abs1 ---> rep2) a) = a"
+ − 153
apply(simp add: expand_fun_eq)
+ − 154
using q1 q2
528
+ − 155
apply(simp add: Quotient_def)
0
+ − 156
done
+ − 157
moreover
+ − 158
have "\<forall>a. (R1 ===> R2) ((abs1 ---> rep2) a) ((abs1 ---> rep2) a)"
+ − 159
apply(auto)
528
+ − 160
using q1 q2 unfolding Quotient_def
0
+ − 161
apply(metis)
+ − 162
done
+ − 163
moreover
+ − 164
have "\<forall>r s. (R1 ===> R2) r s = ((R1 ===> R2) r r \<and> (R1 ===> R2) s s \<and>
+ − 165
(rep1 ---> abs2) r = (rep1 ---> abs2) s)"
+ − 166
apply(auto simp add: expand_fun_eq)
528
+ − 167
using q1 q2 unfolding Quotient_def
0
+ − 168
apply(metis)
528
+ − 169
using q1 q2 unfolding Quotient_def
0
+ − 170
apply(metis)
528
+ − 171
using q1 q2 unfolding Quotient_def
0
+ − 172
apply(metis)
528
+ − 173
using q1 q2 unfolding Quotient_def
0
+ − 174
apply(metis)
+ − 175
done
+ − 176
ultimately
528
+ − 177
show "Quotient (R1 ===> R2) (rep1 ---> abs2) (abs1 ---> rep2)"
+ − 178
unfolding Quotient_def by blast
0
+ − 179
qed
+ − 180
+ − 181
definition
+ − 182
Respects
+ − 183
where
+ − 184
"Respects R x \<equiv> (R x x)"
+ − 185
+ − 186
lemma IN_RESPECTS:
+ − 187
shows "(x \<in> Respects R) = R x x"
+ − 188
unfolding mem_def Respects_def by simp
+ − 189
+ − 190
lemma RESPECTS_THM:
+ − 191
shows "Respects (R1 ===> R2) f = (\<forall>x y. R1 x y \<longrightarrow> R2 (f x) (f y))"
+ − 192
unfolding Respects_def
+ − 193
by (simp add: expand_fun_eq)
+ − 194
+ − 195
lemma RESPECTS_MP:
+ − 196
assumes a: "Respects (R1 ===> R2) f"
+ − 197
and b: "R1 x y"
+ − 198
shows "R2 (f x) (f y)"
+ − 199
using a b unfolding Respects_def
+ − 200
by simp
+ − 201
+ − 202
lemma RESPECTS_REP_ABS:
528
+ − 203
assumes a: "Quotient R1 Abs1 Rep1"
0
+ − 204
and b: "Respects (R1 ===> R2) f"
+ − 205
and c: "R1 x x"
+ − 206
shows "R2 (f (Rep1 (Abs1 x))) (f x)"
528
+ − 207
using a b[simplified RESPECTS_THM] c unfolding Quotient_def
0
+ − 208
by blast
+ − 209
+ − 210
lemma RESPECTS_o:
+ − 211
assumes a: "Respects (R2 ===> R3) f"
+ − 212
and b: "Respects (R1 ===> R2) g"
+ − 213
shows "Respects (R1 ===> R3) (f o g)"
+ − 214
using a b unfolding Respects_def
+ − 215
by simp
+ − 216
+ − 217
(*
+ − 218
definition
+ − 219
"RES_EXISTS_EQUIV R P \<equiv> (\<exists>x \<in> Respects R. P x) \<and>
+ − 220
(\<forall>x\<in> Respects R. \<forall>y\<in> Respects R. P x \<and> P y \<longrightarrow> R x y)"
+ − 221
*)
+ − 222
536
+ − 223
lemma fun_rel_EQ_REL:
528
+ − 224
assumes q1: "Quotient R1 Abs1 Rep1"
+ − 225
and q2: "Quotient R2 Abs2 Rep2"
0
+ − 226
shows "(R1 ===> R2) f g = ((Respects (R1 ===> R2) f) \<and> (Respects (R1 ===> R2) g)
+ − 227
\<and> ((Rep1 ---> Abs2) f = (Rep1 ---> Abs2) g))"
537
+ − 228
using fun_quotient[OF q1 q2] unfolding Respects_def Quotient_def expand_fun_eq
0
+ − 229
by blast
+ − 230
458
+ − 231
(* TODO: it is the same as APPLY_RSP *)
0
+ − 232
(* q1 and q2 not used; see next lemma *)
536
+ − 233
lemma fun_rel_MP:
528
+ − 234
assumes q1: "Quotient R1 Abs1 Rep1"
+ − 235
and q2: "Quotient R2 Abs2 Rep2"
0
+ − 236
shows "(R1 ===> R2) f g \<Longrightarrow> R1 x y \<Longrightarrow> R2 (f x) (g y)"
+ − 237
by simp
+ − 238
536
+ − 239
lemma fun_rel_IMP:
0
+ − 240
shows "(R1 ===> R2) f g \<Longrightarrow> R1 x y \<Longrightarrow> R2 (f x) (g y)"
+ − 241
by simp
+ − 242
536
+ − 243
lemma fun_rel_EQUALS:
528
+ − 244
assumes q1: "Quotient R1 Abs1 Rep1"
+ − 245
and q2: "Quotient R2 Abs2 Rep2"
0
+ − 246
and r1: "Respects (R1 ===> R2) f"
+ − 247
and r2: "Respects (R1 ===> R2) g"
+ − 248
shows "((Rep1 ---> Abs2) f = (Rep1 ---> Abs2) g) = (\<forall>x y. R1 x y \<longrightarrow> R2 (f x) (g y))"
+ − 249
apply(rule_tac iffI)
537
+ − 250
using fun_quotient[OF q1 q2] r1 r2 unfolding Quotient_def Respects_def
536
+ − 251
apply(metis fun_rel_IMP)
0
+ − 252
using r1 unfolding Respects_def expand_fun_eq
+ − 253
apply(simp (no_asm_use))
539
+ − 254
apply(metis Quotient_rel[OF q2] Quotient_REL_REP[OF q1])
0
+ − 255
done
+ − 256
536
+ − 257
(* ask Peter: fun_rel_IMP used twice *)
+ − 258
lemma fun_rel_IMP2:
528
+ − 259
assumes q1: "Quotient R1 Abs1 Rep1"
+ − 260
and q2: "Quotient R2 Abs2 Rep2"
0
+ − 261
and r1: "Respects (R1 ===> R2) f"
+ − 262
and r2: "Respects (R1 ===> R2) g"
+ − 263
and a: "(Rep1 ---> Abs2) f = (Rep1 ---> Abs2) g"
+ − 264
shows "R1 x y \<Longrightarrow> R2 (f x) (g y)"
+ − 265
using q1 q2 r1 r2 a
536
+ − 266
by (simp add: fun_rel_EQUALS)
0
+ − 267
528
+ − 268
(* We don't use it, it is exactly the same as Quotient_REL_REP but wrong way *)
0
+ − 269
lemma EQUALS_PRS:
528
+ − 270
assumes q: "Quotient R Abs Rep"
0
+ − 271
shows "(x = y) = R (Rep x) (Rep y)"
528
+ − 272
by (rule Quotient_REL_REP[OF q, symmetric])
0
+ − 273
527
+ − 274
lemma equals_rsp:
528
+ − 275
assumes q: "Quotient R Abs Rep"
519
ebfd747b47ab
Change equiv_trans2 to EQUALS_RSP, since we can prove it for any quotient type, not only for eqv relations.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 276
and a: "R xa xb" "R ya yb"
ebfd747b47ab
Change equiv_trans2 to EQUALS_RSP, since we can prove it for any quotient type, not only for eqv relations.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 277
shows "R xa ya = R xb yb"
528
+ − 278
using Quotient_symp[OF q] Quotient_transp[OF q] unfolding symp_def transp_def
0
+ − 279
using a by blast
+ − 280
527
+ − 281
lemma lambda_prs:
528
+ − 282
assumes q1: "Quotient R1 Abs1 Rep1"
+ − 283
and q2: "Quotient R2 Abs2 Rep2"
253
e169a99c6ada
Automatic computation of application preservation and manually finished "alpha.induct". Slow...
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 284
shows "(Rep1 ---> Abs2) (\<lambda>x. Rep2 (f (Abs1 x))) = (\<lambda>x. f x)"
0
+ − 285
unfolding expand_fun_eq
540
c0b13fb70d6d
More code cleaning and renaming: moved rsp and prs lemmas from Int to QuotList
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 286
using Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2]
0
+ − 287
by simp
+ − 288
527
+ − 289
lemma lambda_prs1:
528
+ − 290
assumes q1: "Quotient R1 Abs1 Rep1"
+ − 291
and q2: "Quotient R2 Abs2 Rep2"
527
+ − 292
shows "(Rep1 ---> Abs2) (\<lambda>x. (Abs1 ---> Rep2) f x) = (\<lambda>x. f x)"
0
+ − 293
unfolding expand_fun_eq
540
c0b13fb70d6d
More code cleaning and renaming: moved rsp and prs lemmas from Int to QuotList
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 294
using Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2]
459
+ − 295
by simp
253
e169a99c6ada
Automatic computation of application preservation and manually finished "alpha.induct". Slow...
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 296
459
+ − 297
(* Not used since applic_prs proves a version for an arbitrary number of arguments *)
253
e169a99c6ada
Automatic computation of application preservation and manually finished "alpha.induct". Slow...
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 298
lemma APP_PRS:
528
+ − 299
assumes q1: "Quotient R1 abs1 rep1"
+ − 300
and q2: "Quotient R2 abs2 rep2"
253
e169a99c6ada
Automatic computation of application preservation and manually finished "alpha.induct". Slow...
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 301
shows "abs2 ((abs1 ---> rep2) f (rep1 x)) = f x"
e169a99c6ada
Automatic computation of application preservation and manually finished "alpha.induct". Slow...
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 302
unfolding expand_fun_eq
540
c0b13fb70d6d
More code cleaning and renaming: moved rsp and prs lemmas from Int to QuotList
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 303
using Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2]
253
e169a99c6ada
Automatic computation of application preservation and manually finished "alpha.induct". Slow...
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 304
by simp
0
+ − 305
+ − 306
(* Ask Peter: assumption q1 and q2 not used and lemma is the 'identity' *)
+ − 307
lemma LAMBDA_RSP:
528
+ − 308
assumes q1: "Quotient R1 Abs1 Rep1"
+ − 309
and q2: "Quotient R2 Abs2 Rep2"
0
+ − 310
and a: "(R1 ===> R2) f1 f2"
+ − 311
shows "(R1 ===> R2) (\<lambda>x. f1 x) (\<lambda>y. f2 y)"
+ − 312
by (rule a)
+ − 313
+ − 314
(* ASK Peter about next four lemmas in quotientScript
+ − 315
lemma ABSTRACT_PRS:
528
+ − 316
assumes q1: "Quotient R1 Abs1 Rep1"
+ − 317
and q2: "Quotient R2 Abs2 Rep2"
0
+ − 318
shows "f = (Rep1 ---> Abs2) ???"
+ − 319
*)
+ − 320
+ − 321
lemma LAMBDA_REP_ABS_RSP:
+ − 322
assumes r1: "\<And>r r'. R1 r r' \<Longrightarrow>R1 r (Rep1 (Abs1 r'))"
+ − 323
and r2: "\<And>r r'. R2 r r' \<Longrightarrow>R2 r (Rep2 (Abs2 r'))"
+ − 324
shows "(R1 ===> R2) f1 f2 \<Longrightarrow> (R1 ===> R2) f1 ((Abs1 ---> Rep2) ((Rep1 ---> Abs2) f2))"
+ − 325
using r1 r2 by auto
+ − 326
+ − 327
lemma REP_ABS_RSP:
528
+ − 328
assumes q: "Quotient R Abs Rep"
0
+ − 329
and a: "R x1 x2"
+ − 330
shows "R x1 (Rep (Abs x2))"
540
c0b13fb70d6d
More code cleaning and renaming: moved rsp and prs lemmas from Int to QuotList
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 331
using q a by (metis Quotient_rel[OF q] Quotient_abs_rep[OF q] Quotient_REP_reflp[OF q])
459
+ − 332
+ − 333
(* Not used *)
+ − 334
lemma REP_ABS_RSP_LEFT:
528
+ − 335
assumes q: "Quotient R Abs Rep"
459
+ − 336
and a: "R x1 x2"
+ − 337
shows "R x1 (Rep (Abs x2))"
540
c0b13fb70d6d
More code cleaning and renaming: moved rsp and prs lemmas from Int to QuotList
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 338
using q a by (metis Quotient_rel[OF q] Quotient_abs_rep[OF q] Quotient_REP_reflp[OF q])
0
+ − 339
+ − 340
(* ----------------------------------------------------- *)
+ − 341
(* Quantifiers: FORALL, EXISTS, EXISTS_UNIQUE, *)
527
+ − 342
(* Ball, Bex, RES_EXISTS_EQUIV *)
0
+ − 343
(* ----------------------------------------------------- *)
+ − 344
+ − 345
(* bool theory: COND, LET *)
+ − 346
+ − 347
lemma IF_PRS:
528
+ − 348
assumes q: "Quotient R Abs Rep"
0
+ − 349
shows "If a b c = Abs (If a (Rep b) (Rep c))"
540
c0b13fb70d6d
More code cleaning and renaming: moved rsp and prs lemmas from Int to QuotList
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 350
using Quotient_abs_rep[OF q] by auto
0
+ − 351
+ − 352
(* ask peter: no use of q *)
+ − 353
lemma IF_RSP:
528
+ − 354
assumes q: "Quotient R Abs Rep"
0
+ − 355
and a: "a1 = a2" "R b1 b2" "R c1 c2"
+ − 356
shows "R (If a1 b1 c1) (If a2 b2 c2)"
+ − 357
using a by auto
+ − 358
+ − 359
lemma LET_PRS:
528
+ − 360
assumes q1: "Quotient R1 Abs1 Rep1"
+ − 361
and q2: "Quotient R2 Abs2 Rep2"
0
+ − 362
shows "Let x f = Abs2 (Let (Rep1 x) ((Abs1 ---> Rep2) f))"
540
c0b13fb70d6d
More code cleaning and renaming: moved rsp and prs lemmas from Int to QuotList
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 363
using Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2] by auto
0
+ − 364
+ − 365
lemma LET_RSP:
528
+ − 366
assumes q1: "Quotient R1 Abs1 Rep1"
+ − 367
and q2: "Quotient R2 Abs2 Rep2"
0
+ − 368
and a1: "(R1 ===> R2) f g"
+ − 369
and a2: "R1 x y"
+ − 370
shows "R2 (Let x f) (Let y g)"
536
+ − 371
using fun_rel_MP[OF q1 q2 a1] a2
0
+ − 372
by auto
+ − 373
+ − 374
+ − 375
(* ask peter what are literal_case *)
+ − 376
(* literal_case_PRS *)
+ − 377
(* literal_case_RSP *)
+ − 378
+ − 379
+ − 380
(* FUNCTION APPLICATION *)
+ − 381
527
+ − 382
(* Not used *)
0
+ − 383
lemma APPLY_PRS:
528
+ − 384
assumes q1: "Quotient R1 Abs1 Rep1"
+ − 385
and q2: "Quotient R2 Abs2 Rep2"
0
+ − 386
shows "f x = Abs2 (((Abs1 ---> Rep2) f) (Rep1 x))"
540
c0b13fb70d6d
More code cleaning and renaming: moved rsp and prs lemmas from Int to QuotList
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 387
using Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2] by auto
0
+ − 388
527
+ − 389
(* In the following theorem R1 can be instantiated with anything,
516
+ − 390
but we know some of the types of the Rep and Abs functions;
528
+ − 391
so by solving Quotient assumptions we can get a unique R2 that
527
+ − 392
will be provable; which is why we need to use APPLY_RSP *)
+ − 393
lemma apply_rsp:
528
+ − 394
assumes q: "Quotient R1 Abs1 Rep1"
516
+ − 395
and a: "(R1 ===> R2) f g" "R1 x y"
+ − 396
shows "R2 ((f::'a\<Rightarrow>'c) x) ((g::'a\<Rightarrow>'c) y)"
536
+ − 397
using a by (rule fun_rel_IMP)
516
+ − 398
527
+ − 399
lemma apply_rsp':
317
+ − 400
assumes a: "(R1 ===> R2) f g" "R1 x y"
+ − 401
shows "R2 (f x) (g y)"
536
+ − 402
using a by (rule fun_rel_IMP)
317
+ − 403
0
+ − 404
+ − 405
(* combinators: I, K, o, C, W *)
+ − 406
459
+ − 407
(* We use id_simps which includes id_apply; so these 2 theorems can be removed *)
0
+ − 408
lemma I_PRS:
528
+ − 409
assumes q: "Quotient R Abs Rep"
126
+ − 410
shows "id e = Abs (id (Rep e))"
540
c0b13fb70d6d
More code cleaning and renaming: moved rsp and prs lemmas from Int to QuotList
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 411
using Quotient_abs_rep[OF q] by auto
0
+ − 412
+ − 413
lemma I_RSP:
528
+ − 414
assumes q: "Quotient R Abs Rep"
0
+ − 415
and a: "R e1 e2"
126
+ − 416
shows "R (id e1) (id e2)"
0
+ − 417
using a by auto
+ − 418
+ − 419
lemma o_PRS:
528
+ − 420
assumes q1: "Quotient R1 Abs1 Rep1"
+ − 421
and q2: "Quotient R2 Abs2 Rep2"
+ − 422
and q3: "Quotient R3 Abs3 Rep3"
0
+ − 423
shows "f o g = (Rep1 ---> Abs3) (((Abs2 ---> Rep3) f) o ((Abs1 ---> Rep2) g))"
540
c0b13fb70d6d
More code cleaning and renaming: moved rsp and prs lemmas from Int to QuotList
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 424
using Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2] Quotient_abs_rep[OF q3]
0
+ − 425
unfolding o_def expand_fun_eq
+ − 426
by simp
+ − 427
+ − 428
lemma o_RSP:
528
+ − 429
assumes q1: "Quotient R1 Abs1 Rep1"
+ − 430
and q2: "Quotient R2 Abs2 Rep2"
+ − 431
and q3: "Quotient R3 Abs3 Rep3"
0
+ − 432
and a1: "(R2 ===> R3) f1 f2"
+ − 433
and a2: "(R1 ===> R2) g1 g2"
+ − 434
shows "(R1 ===> R3) (f1 o g1) (f2 o g2)"
+ − 435
using a1 a2 unfolding o_def expand_fun_eq
+ − 436
by (auto)
+ − 437
96
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 438
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 439
458
+ − 440
+ − 441
+ − 442
lemma COND_PRS:
528
+ − 443
assumes a: "Quotient R absf repf"
458
+ − 444
shows "(if a then b else c) = absf (if a then repf b else repf c)"
528
+ − 445
using a unfolding Quotient_def by auto
458
+ − 446
+ − 447
+ − 448
+ − 449
+ − 450
427
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 451
(* Set of lemmas for regularisation of ball and bex *)
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 452
lemma ball_reg_eqv:
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 453
fixes P :: "'a \<Rightarrow> bool"
528
+ − 454
assumes a: "equivp R"
427
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 455
shows "Ball (Respects R) P = (All P)"
528
+ − 456
by (metis equivp_def IN_RESPECTS a)
427
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 457
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 458
lemma bex_reg_eqv:
93
+ − 459
fixes P :: "'a \<Rightarrow> bool"
528
+ − 460
assumes a: "equivp R"
427
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 461
shows "Bex (Respects R) P = (Ex P)"
528
+ − 462
by (metis equivp_def IN_RESPECTS a)
427
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 463
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 464
lemma ball_reg_right:
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 465
assumes a: "\<And>x. R x \<Longrightarrow> P x \<longrightarrow> Q x"
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 466
shows "All P \<longrightarrow> Ball R Q"
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 467
by (metis COMBC_def Collect_def Collect_mem_eq a)
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 468
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 469
lemma bex_reg_left:
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 470
assumes a: "\<And>x. R x \<Longrightarrow> Q x \<longrightarrow> P x"
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 471
shows "Bex R Q \<longrightarrow> Ex P"
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 472
by (metis COMBC_def Collect_def Collect_mem_eq a)
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 473
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 474
lemma ball_reg_left:
528
+ − 475
assumes a: "equivp R"
427
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 476
shows "(\<And>x. (Q x \<longrightarrow> P x)) \<Longrightarrow> Ball (Respects R) Q \<longrightarrow> All P"
528
+ − 477
by (metis equivp_reflp IN_RESPECTS a)
93
+ − 478
427
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 479
lemma bex_reg_right:
528
+ − 480
assumes a: "equivp R"
427
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 481
shows "(\<And>x. (Q x \<longrightarrow> P x)) \<Longrightarrow> Ex Q \<longrightarrow> Bex (Respects R) P"
528
+ − 482
by (metis equivp_reflp IN_RESPECTS a)
93
+ − 483
427
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 484
lemma ball_reg_eqv_range:
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 485
fixes P::"'a \<Rightarrow> bool"
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 486
and x::"'a"
528
+ − 487
assumes a: "equivp R2"
427
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 488
shows "(Ball (Respects (R1 ===> R2)) (\<lambda>f. P (f x)) = All (\<lambda>f. P (f x)))"
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 489
apply(rule iffI)
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 490
apply(rule allI)
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 491
apply(drule_tac x="\<lambda>y. f x" in bspec)
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 492
apply(simp add: Respects_def IN_RESPECTS)
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 493
apply(rule impI)
528
+ − 494
using a equivp_reflp_symp_transp[of "R2"]
+ − 495
apply(simp add: reflp_def)
427
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 496
apply(simp)
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 497
apply(simp)
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 498
done
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 499
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 500
lemma bex_reg_eqv_range:
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 501
fixes P::"'a \<Rightarrow> bool"
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 502
and x::"'a"
528
+ − 503
assumes a: "equivp R2"
427
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 504
shows "(Bex (Respects (R1 ===> R2)) (\<lambda>f. P (f x)) = Ex (\<lambda>f. P (f x)))"
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 505
apply(auto)
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 506
apply(rule_tac x="\<lambda>y. f x" in bexI)
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 507
apply(simp)
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 508
apply(simp add: Respects_def IN_RESPECTS)
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 509
apply(rule impI)
528
+ − 510
using a equivp_reflp_symp_transp[of "R2"]
+ − 511
apply(simp add: reflp_def)
427
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 512
done
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 513
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 514
lemma all_reg:
96
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 515
assumes a: "!x :: 'a. (P x --> Q x)"
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 516
and b: "All P"
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 517
shows "All Q"
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 518
using a b by (metis)
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 519
427
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 520
lemma ex_reg:
96
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 521
assumes a: "!x :: 'a. (P x --> Q x)"
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 522
and b: "Ex P"
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 523
shows "Ex Q"
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 524
using a b by (metis)
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 525
427
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 526
lemma ball_reg:
96
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 527
assumes a: "!x :: 'a. (R x --> P x --> Q x)"
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 528
and b: "Ball R P"
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 529
shows "Ball R Q"
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 530
using a b by (metis COMBC_def Collect_def Collect_mem_eq)
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 531
427
5a3965aa4d80
Cleaned all lemmas about regularisation of Ball and Bex and moved in one place. Second Ball simprox.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 532
lemma bex_reg:
96
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 533
assumes a: "!x :: 'a. (R x --> P x --> Q x)"
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 534
and b: "Bex R P"
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 535
shows "Bex R Q"
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 536
using a b by (metis COMBC_def Collect_def Collect_mem_eq)
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 537
432
+ − 538
lemma ball_all_comm:
+ − 539
"(\<And>y. (\<forall>x\<in>P. A x y) \<longrightarrow> (\<forall>x. B x y)) \<Longrightarrow> ((\<forall>x\<in>P. \<forall>y. A x y) \<longrightarrow> (\<forall>x. \<forall>y. B x y))"
+ − 540
by auto
+ − 541
+ − 542
lemma bex_ex_comm:
+ − 543
"((\<exists>y. \<exists>x. A x y) \<longrightarrow> (\<exists>y. \<exists>x\<in>P. B x y)) \<Longrightarrow> ((\<exists>x. \<exists>y. A x y) \<longrightarrow> (\<exists>x\<in>P. \<exists>y. B x y))"
+ − 544
by auto
96
4da714704611
A number of lemmas for REGULARIZE_TAC and regularizing card1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 545
458
+ − 546
(* 2 lemmas needed for proving repabs_inj *)
+ − 547
lemma ball_rsp:
+ − 548
assumes a: "(R ===> (op =)) f g"
+ − 549
shows "Ball (Respects R) f = Ball (Respects R) g"
+ − 550
using a by (simp add: Ball_def IN_RESPECTS)
153
+ − 551
458
+ − 552
lemma bex_rsp:
+ − 553
assumes a: "(R ===> (op =)) f g"
+ − 554
shows "(Bex (Respects R) f = Bex (Respects R) g)"
+ − 555
using a by (simp add: Bex_def IN_RESPECTS)
171
13aab4c59096
More infrastructure for automatic lifting of theorems lifted before
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 556
458
+ − 557
(* 2 lemmas needed for cleaning of quantifiers *)
+ − 558
lemma all_prs:
528
+ − 559
assumes a: "Quotient R absf repf"
458
+ − 560
shows "Ball (Respects R) ((absf ---> id) f) = All f"
528
+ − 561
using a unfolding Quotient_def
183
6acf9e001038
proved the two lemmas in QuotScript (reformulated them without leading forall)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 562
by (metis IN_RESPECTS fun_map.simps id_apply)
162
+ − 563
458
+ − 564
lemma ex_prs:
528
+ − 565
assumes a: "Quotient R absf repf"
458
+ − 566
shows "Bex (Respects R) ((absf ---> id) f) = Ex f"
528
+ − 567
using a unfolding Quotient_def
458
+ − 568
by (metis COMBC_def Collect_def Collect_mem_eq IN_RESPECTS fun_map.simps id_apply)
171
13aab4c59096
More infrastructure for automatic lifting of theorems lifted before
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 569
93
+ − 570
end
95
+ − 571