equal
deleted
inserted
replaced
270 lemma DIM_complex[simp]: "DIM(complex) = 2" |
270 lemma DIM_complex[simp]: "DIM(complex) = 2" |
271 by (rule dimension_complex_def) |
271 by (rule dimension_complex_def) |
272 |
272 |
273 subsubsection {* Type @{typ "'a \<times> 'b"} *} |
273 subsubsection {* Type @{typ "'a \<times> 'b"} *} |
274 |
274 |
275 lemma disjoint_iff: "A \<inter> B = {} \<longleftrightarrow> (\<forall>x\<in>A. \<forall>y\<in>B. x \<noteq> y)" |
|
276 by auto (* TODO: move elsewhere *) |
|
277 |
|
278 instantiation prod :: (euclidean_space, euclidean_space) euclidean_space |
275 instantiation prod :: (euclidean_space, euclidean_space) euclidean_space |
279 begin |
276 begin |
280 |
277 |
281 definition |
278 definition |
282 "Basis = (\<lambda>u. (u, 0)) ` Basis \<union> (\<lambda>v. (0, v)) ` Basis" |
279 "Basis = (\<lambda>u. (u, 0)) ` Basis \<union> (\<lambda>v. (0, v)) ` Basis" |
305 unfolding Basis_prod_def ball_Un ball_simps |
302 unfolding Basis_prod_def ball_Un ball_simps |
306 by (simp add: inner_prod_def prod_eq_iff euclidean_all_zero_iff) |
303 by (simp add: inner_prod_def prod_eq_iff euclidean_all_zero_iff) |
307 next |
304 next |
308 show "DIM('a \<times> 'b) = card (Basis :: ('a \<times> 'b) set)" |
305 show "DIM('a \<times> 'b) = card (Basis :: ('a \<times> 'b) set)" |
309 unfolding dimension_prod_def Basis_prod_def |
306 unfolding dimension_prod_def Basis_prod_def |
310 by (simp add: card_Un_disjoint disjoint_iff |
307 by (simp add: card_Un_disjoint disjoint_iff_not_equal |
311 card_image inj_on_def dimension_def) |
308 card_image inj_on_def dimension_def) |
312 next |
309 next |
313 show "basis ` {..<DIM('a \<times> 'b)} = (Basis :: ('a \<times> 'b) set)" |
310 show "basis ` {..<DIM('a \<times> 'b)} = (Basis :: ('a \<times> 'b) set)" |
314 by (auto simp add: Basis_prod_def dimension_prod_def basis_prod_def |
311 by (auto simp add: Basis_prod_def dimension_prod_def basis_prod_def |
315 image_def elim!: Basis_elim) |
312 image_def elim!: Basis_elim) |