This instance will be upgraded to Heptapod 0.31.0 (final) on 2022-05-24 at 14:00 UTC+2 (a few minutes of down time)

Commit 3d6e3774 by nipkow

### adapted to devel

parent a47dee63e525
 ... ... @@ -53,24 +53,24 @@ shows "row (all1_matrix nr nc) i = all1_vec nc" by (simp add: all1_matrix_def all1_vec_def) lemma all1_vec_scalar_prod: shows "all1_vec (length xs) \ (vec_of_list xs) = listsum xs" shows "all1_vec (length xs) \ (vec_of_list xs) = sum_list xs" proof - have "all1_vec (length xs) \ (vec_of_list xs) = (\i = 0..v (vec_of_list xs). vec_of_list xs \$ i)" unfolding scalar_prod_def by (metis (no_types, lifting) all1_vec_def mult_cancel_right1 setsum_ivl_cong unfolding scalar_prod_def by (metis (no_types, lifting) all1_vec_def mult_cancel_right1 sum_ivl_cong vec.abs_eq vec_dim_vec vec_index_vec vec_of_list.abs_eq) also have "... = (\i = 0..v v)) \\<^sub>m\<^sub>v v) \$ i = listsum (list_of_vec v)" (is "?a \$ i = listsum (list_of_vec v)") shows "((all1_matrix nr (dim\<^sub>v v)) \\<^sub>m\<^sub>v v) \$ i = sum_list (list_of_vec v)" (is "?a \$ i = sum_list (list_of_vec v)") proof - have "?a \$ i = row (all1_matrix nr (dim\<^sub>v v)) i \ v" using index_mat_mult_vec assms all1_matrix_dim by auto also have "... = listsum (list_of_vec v)" unfolding row_all1_matrix[OF assms] using all1_vec_scalar_prod[of "list_of_vec v"] also have "... = sum_list (list_of_vec v)" unfolding row_all1_matrix[OF assms] using all1_vec_scalar_prod[of "list_of_vec v"] by (metis vec.abs_eq vec_dim_vec vec_list vec_of_list.abs_eq) finally show ?thesis by auto qed ... ...