equal
deleted
inserted
replaced
1628 by (simp add: sum.reindex[unfolded inj_on_def] algebra_simps |
1628 by (simp add: sum.reindex[unfolded inj_on_def] algebra_simps |
1629 sum_subtractf scaleR_left.sum[symmetric] sum_diff1 that) |
1629 sum_subtractf scaleR_left.sum[symmetric] sum_diff1 that) |
1630 qed (use \<open>F \<subseteq> insert a S\<close> in auto) |
1630 qed (use \<open>F \<subseteq> insert a S\<close> in auto) |
1631 qed |
1631 qed |
1632 then show ?thesis |
1632 then show ?thesis |
1633 unfolding affine_hull_explicit span_explicit by auto |
1633 unfolding affine_hull_explicit span_explicit by blast |
1634 qed |
1634 qed |
1635 |
1635 |
1636 lemma affine_hull_insert_span: |
1636 lemma affine_hull_insert_span: |
1637 assumes "a \<notin> S" |
1637 assumes "a \<notin> S" |
1638 shows "affine hull (insert a S) = {a + v | v . v \<in> span {x - a | x. x \<in> S}}" |
1638 shows "affine hull (insert a S) = {a + v | v . v \<in> span {x - a | x. x \<in> S}}" |
2948 have *: "{x - a |x. x \<in> S - {a}} = (\<lambda>x. x - a) ` (S - {a})" |
2948 have *: "{x - a |x. x \<in> S - {a}} = (\<lambda>x. x - a) ` (S - {a})" |
2949 by auto |
2949 by auto |
2950 have **: "card {x - a |x. x \<in> S - {a}} = card (S - {a})" |
2950 have **: "card {x - a |x. x \<in> S - {a}} = card (S - {a})" |
2951 by (metis (no_types, lifting) "*" card_image diff_add_cancel inj_on_def) |
2951 by (metis (no_types, lifting) "*" card_image diff_add_cancel inj_on_def) |
2952 have "dim {x - a |x. x \<in> S - {a}} \<le> dim S" |
2952 have "dim {x - a |x. x \<in> S - {a}} \<le> dim S" |
2953 using \<open>a\<in>S\<close> by (auto simp: span_superset span_diff intro: subset_le_dim) |
2953 using \<open>a\<in>S\<close> by (auto simp: span_base span_diff intro: subset_le_dim) |
2954 also have "\<dots> < dim S + 1" by auto |
2954 also have "\<dots> < dim S + 1" by auto |
2955 also have "\<dots> \<le> card (S - {a})" |
2955 also have "\<dots> \<le> card (S - {a})" |
2956 using assms |
2956 using assms |
2957 using card_Diff_singleton[OF assms(1) \<open>a\<in>S\<close>] |
2957 using card_Diff_singleton[OF assms(1) \<open>a\<in>S\<close>] |
2958 by auto |
2958 by auto |
3351 using dim_subset_UNIV[of B] by simp |
3351 using dim_subset_UNIV[of B] by simp |
3352 from ex_card[OF this] obtain d :: "'a set" where d: "d \<subseteq> Basis" and t: "card d = dim B" |
3352 from ex_card[OF this] obtain d :: "'a set" where d: "d \<subseteq> Basis" and t: "card d = dim B" |
3353 by auto |
3353 by auto |
3354 let ?t = "{x::'a::euclidean_space. \<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x\<bullet>i = 0}" |
3354 let ?t = "{x::'a::euclidean_space. \<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x\<bullet>i = 0}" |
3355 have "\<exists>f. linear f \<and> f ` B = d \<and> f ` span B = ?t \<and> inj_on f (span B)" |
3355 have "\<exists>f. linear f \<and> f ` B = d \<and> f ` span B = ?t \<and> inj_on f (span B)" |
3356 proof (intro basis_to_basis_subspace_isomorphism subspace_span subspace_substandard span_inc) |
3356 proof (intro basis_to_basis_subspace_isomorphism subspace_span subspace_substandard span_superset) |
3357 show "d \<subseteq> {x. \<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x \<bullet> i = 0}" |
3357 show "d \<subseteq> {x. \<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x \<bullet> i = 0}" |
3358 using d inner_not_same_Basis by blast |
3358 using d inner_not_same_Basis by blast |
3359 qed (auto simp: span_substd_basis independent_substdbasis dim_substandard d t B assms) |
3359 qed (auto simp: span_substd_basis independent_substdbasis dim_substandard d t B assms) |
3360 with t \<open>card B = dim B\<close> d show ?thesis by auto |
3360 with t \<open>card B = dim B\<close> d show ?thesis by auto |
3361 qed |
3361 qed |