973 lemma matrix_adjoint: assumes lf: "linear (f :: real^'n \<Rightarrow> real ^'m)" |
973 lemma matrix_adjoint: assumes lf: "linear (f :: real^'n \<Rightarrow> real ^'m)" |
974 shows "matrix(adjoint f) = transpose(matrix f)" |
974 shows "matrix(adjoint f) = transpose(matrix f)" |
975 apply (subst matrix_vector_mul[OF lf]) |
975 apply (subst matrix_vector_mul[OF lf]) |
976 unfolding adjoint_matrix matrix_of_matrix_vector_mul .. |
976 unfolding adjoint_matrix matrix_of_matrix_vector_mul .. |
977 |
977 |
978 section {* lambda_skolem on cartesian products *} |
978 section {* lambda skolemization on cartesian products *} |
979 |
979 |
980 (* FIXME: rename do choice_cart *) |
980 (* FIXME: rename do choice_cart *) |
981 |
981 |
982 lemma lambda_skolem: "(\<forall>i. \<exists>x. P i x) \<longleftrightarrow> |
982 lemma lambda_skolem: "(\<forall>i. \<exists>x. P i x) \<longleftrightarrow> |
983 (\<exists>x::'a ^ 'n. \<forall>i. P i (x$i))" (is "?lhs \<longleftrightarrow> ?rhs") |
983 (\<exists>x::'a ^ 'n. \<forall>i. P i (x $ i))" (is "?lhs \<longleftrightarrow> ?rhs") |
984 proof- |
984 proof- |
985 let ?S = "(UNIV :: 'n set)" |
985 let ?S = "(UNIV :: 'n set)" |
986 {assume H: "?rhs" |
986 {assume H: "?rhs" |
987 then have ?lhs by auto} |
987 then have ?lhs by auto} |
988 moreover |
988 moreover |
989 {assume H: "?lhs" |
989 {assume H: "?lhs" |
990 then obtain f where f:"\<forall>i. P i (f i)" unfolding choice_iff by metis |
990 then obtain f where f:"\<forall>i. P i (f i)" unfolding choice_iff by metis |
991 let ?x = "(\<chi> i. (f i)) :: 'a ^ 'n" |
991 let ?x = "(\<chi> i. (f i)) :: 'a ^ 'n" |
992 {fix i |
992 {fix i |
993 from f have "P i (f i)" by metis |
993 from f have "P i (f i)" by metis |
994 then have "P i (?x$i)" by auto |
994 then have "P i (?x $ i)" by auto |
995 } |
995 } |
996 hence "\<forall>i. P i (?x$i)" by metis |
996 hence "\<forall>i. P i (?x$i)" by metis |
997 hence ?rhs by metis } |
997 hence ?rhs by metis } |
998 ultimately show ?thesis by metis |
998 ultimately show ?thesis by metis |
999 qed |
999 qed |
1828 show False apply(rule ***[OF **, where dx="d * D $ k $ j" and d="\<bar>D $ k $ j\<bar> / 2 * \<bar>d\<bar>"]) |
1828 show False apply(rule ***[OF **, where dx="d * D $ k $ j" and d="\<bar>D $ k $ j\<bar> / 2 * \<bar>d\<bar>"]) |
1829 using *[of "-d"] and *[of d] and d[THEN conjunct1] and j unfolding mult_minus_left |
1829 using *[of "-d"] and *[of d] and d[THEN conjunct1] and j unfolding mult_minus_left |
1830 unfolding abs_mult diff_minus_eq_add scaleR.minus_left unfolding algebra_simps by (auto intro: mult_pos_pos) |
1830 unfolding abs_mult diff_minus_eq_add scaleR.minus_left unfolding algebra_simps by (auto intro: mult_pos_pos) |
1831 qed |
1831 qed |
1832 |
1832 |
1833 subsection {* Lemmas for working on real^1 *} |
1833 subsection {* Lemmas for working on @{typ "real^1"} *} |
1834 |
1834 |
1835 lemma forall_1[simp]: "(\<forall>i::1. P i) \<longleftrightarrow> P 1" |
1835 lemma forall_1[simp]: "(\<forall>i::1. P i) \<longleftrightarrow> P 1" |
1836 by (metis num1_eq_iff) |
1836 by (metis num1_eq_iff) |
1837 |
1837 |
1838 lemma ex_1[simp]: "(\<exists>x::1. P x) \<longleftrightarrow> P 1" |
1838 lemma ex_1[simp]: "(\<exists>x::1. P x) \<longleftrightarrow> P 1" |