equal
deleted
inserted
replaced
871 lemma nrows_singleton[simp]: "nrows(singleton_matrix j i e) = (if e = 0 then 0 else Suc j)" |
871 lemma nrows_singleton[simp]: "nrows(singleton_matrix j i e) = (if e = 0 then 0 else Suc j)" |
872 proof- |
872 proof- |
873 have th: "\<not> (\<forall>m. m \<le> j)" "\<exists>n. \<not> n \<le> i" by arith+ |
873 have th: "\<not> (\<forall>m. m \<le> j)" "\<exists>n. \<not> n \<le> i" by arith+ |
874 from th show ?thesis |
874 from th show ?thesis |
875 apply (auto) |
875 apply (auto) |
876 apply (rule le_anti_sym) |
876 apply (rule le_antisym) |
877 apply (subst nrows_le) |
877 apply (subst nrows_le) |
878 apply (simp add: singleton_matrix_def, auto) |
878 apply (simp add: singleton_matrix_def, auto) |
879 apply (subst RepAbs_matrix) |
879 apply (subst RepAbs_matrix) |
880 apply auto |
880 apply auto |
881 apply (simp add: Suc_le_eq) |
881 apply (simp add: Suc_le_eq) |
887 lemma ncols_singleton[simp]: "ncols(singleton_matrix j i e) = (if e = 0 then 0 else Suc i)" |
887 lemma ncols_singleton[simp]: "ncols(singleton_matrix j i e) = (if e = 0 then 0 else Suc i)" |
888 proof- |
888 proof- |
889 have th: "\<not> (\<forall>m. m \<le> j)" "\<exists>n. \<not> n \<le> i" by arith+ |
889 have th: "\<not> (\<forall>m. m \<le> j)" "\<exists>n. \<not> n \<le> i" by arith+ |
890 from th show ?thesis |
890 from th show ?thesis |
891 apply (auto) |
891 apply (auto) |
892 apply (rule le_anti_sym) |
892 apply (rule le_antisym) |
893 apply (subst ncols_le) |
893 apply (subst ncols_le) |
894 apply (simp add: singleton_matrix_def, auto) |
894 apply (simp add: singleton_matrix_def, auto) |
895 apply (subst RepAbs_matrix) |
895 apply (subst RepAbs_matrix) |
896 apply auto |
896 apply auto |
897 apply (simp add: Suc_le_eq) |
897 apply (simp add: Suc_le_eq) |
1002 apply (simp add: mult_matrix_n_def apply_matrix_def apply_infmatrix_def) |
1002 apply (simp add: mult_matrix_n_def apply_matrix_def apply_infmatrix_def) |
1003 apply (rule comb[of "Abs_matrix" "Abs_matrix"], auto, (rule ext)+) |
1003 apply (rule comb[of "Abs_matrix" "Abs_matrix"], auto, (rule ext)+) |
1004 apply (subst foldseq_almostzero[of _ j]) |
1004 apply (subst foldseq_almostzero[of _ j]) |
1005 apply (simp add: prems)+ |
1005 apply (simp add: prems)+ |
1006 apply (auto) |
1006 apply (auto) |
1007 apply (metis comm_monoid_add.mult_1 le_anti_sym le_diff_eq not_neg_nat zero_le_imp_of_nat zle_int) |
1007 apply (metis comm_monoid_add.mult_1 le_antisym le_diff_eq not_neg_nat zero_le_imp_of_nat zle_int) |
1008 done |
1008 done |
1009 |
1009 |
1010 lemma mult_matrix_ext: |
1010 lemma mult_matrix_ext: |
1011 assumes |
1011 assumes |
1012 eprem: |
1012 eprem: |