equal
deleted
inserted
replaced
304 (Haskell infix 4 "==") |
304 (Haskell infix 4 "==") |
305 |
305 |
306 |
306 |
307 subsubsection {* Fundamental operations and properties *} |
307 subsubsection {* Fundamental operations and properties *} |
308 |
308 |
|
309 lemma Pair_inject: |
|
310 assumes "(a, b) = (a', b')" |
|
311 and "a = a' ==> b = b' ==> R" |
|
312 shows R |
|
313 using assms by simp |
|
314 |
309 lemma surj_pair [simp]: "EX x y. p = (x, y)" |
315 lemma surj_pair [simp]: "EX x y. p = (x, y)" |
310 by (cases p) simp |
316 by (cases p) simp |
311 |
317 |
312 definition fst :: "'a \<times> 'b \<Rightarrow> 'a" where |
318 definition fst :: "'a \<times> 'b \<Rightarrow> 'a" where |
313 "fst p = (case p of (a, b) \<Rightarrow> a)" |
319 "fst p = (case p of (a, b) \<Rightarrow> a)" |
1138 |
1144 |
1139 lemma PairE: |
1145 lemma PairE: |
1140 obtains x y where "p = (x, y)" |
1146 obtains x y where "p = (x, y)" |
1141 by (fact prod.exhaust) |
1147 by (fact prod.exhaust) |
1142 |
1148 |
1143 lemma Pair_inject: |
|
1144 assumes "(a, b) = (a', b')" |
|
1145 and "a = a' ==> b = b' ==> R" |
|
1146 shows R |
|
1147 using assms by simp |
|
1148 |
|
1149 lemmas Pair_eq = prod.inject |
1149 lemmas Pair_eq = prod.inject |
1150 |
1150 |
1151 lemmas split = split_conv -- {* for backwards compatibility *} |
1151 lemmas split = split_conv -- {* for backwards compatibility *} |
1152 |
1152 |
1153 lemmas Pair_fst_snd_eq = prod_eq_iff |
1153 lemmas Pair_fst_snd_eq = prod_eq_iff |