1390 apply (auto) |
1390 apply (auto) |
1391 apply (subst foldseq_zerotail[of _ _ _ "max (nrows C) (max (ncols A) (ncols B))"], simp_all add: nrows ncols max1 max2)+ |
1391 apply (subst foldseq_zerotail[of _ _ _ "max (nrows C) (max (ncols A) (ncols B))"], simp_all add: nrows ncols max1 max2)+ |
1392 apply (rule le_foldseq) |
1392 apply (rule le_foldseq) |
1393 by (auto) |
1393 by (auto) |
1394 |
1394 |
|
1395 lemma spec2: "! j i. P j i \<Longrightarrow> P j i" by blast |
|
1396 lemma neg_imp: "(\<not> Q \<longrightarrow> \<not> P) \<Longrightarrow> P \<longrightarrow> Q" by blast |
|
1397 |
1395 lemma singleton_matrix_le[simp]: "(singleton_matrix j i a <= singleton_matrix j i b) = (a <= (b::_::order))" |
1398 lemma singleton_matrix_le[simp]: "(singleton_matrix j i a <= singleton_matrix j i b) = (a <= (b::_::order))" |
1396 by (auto simp add: le_matrix_def) |
1399 by (auto simp add: le_matrix_def) |
1397 |
1400 |
|
1401 lemma singleton_le_zero[simp]: "(singleton_matrix j i x <= 0) = (x <= (0::'a::{order,zero}))" |
|
1402 apply (auto) |
|
1403 apply (simp add: le_matrix_def) |
|
1404 apply (drule_tac j=j and i=i in spec2) |
|
1405 apply (simp) |
|
1406 apply (simp add: le_matrix_def) |
|
1407 done |
|
1408 |
|
1409 lemma singleton_ge_zero[simp]: "(0 <= singleton_matrix j i x) = ((0::'a::{order,zero}) <= x)" |
|
1410 apply (auto) |
|
1411 apply (simp add: le_matrix_def) |
|
1412 apply (drule_tac j=j and i=i in spec2) |
|
1413 apply (simp) |
|
1414 apply (simp add: le_matrix_def) |
|
1415 done |
|
1416 |
|
1417 lemma move_matrix_le_zero[simp]: "0 <= j \<Longrightarrow> 0 <= i \<Longrightarrow> (move_matrix A j i <= 0) = (A <= (0::('a::{order,zero}) matrix))" |
|
1418 apply (auto simp add: le_matrix_def neg_def) |
|
1419 apply (drule_tac j="ja+(nat j)" and i="ia+(nat i)" in spec2) |
|
1420 apply (auto) |
|
1421 done |
|
1422 |
|
1423 lemma move_matrix_zero_le[simp]: "0 <= j \<Longrightarrow> 0 <= i \<Longrightarrow> (0 <= move_matrix A j i) = ((0::('a::{order,zero}) matrix) <= A)" |
|
1424 apply (auto simp add: le_matrix_def neg_def) |
|
1425 apply (drule_tac j="ja+(nat j)" and i="ia+(nat i)" in spec2) |
|
1426 apply (auto) |
|
1427 done |
|
1428 |
|
1429 lemma move_matrix_le_move_matrix_iff[simp]: "0 <= j \<Longrightarrow> 0 <= i \<Longrightarrow> (move_matrix A j i <= move_matrix B j i) = (A <= (B::('a::{order,zero}) matrix))" |
|
1430 apply (auto simp add: le_matrix_def neg_def) |
|
1431 apply (drule_tac j="ja+(nat j)" and i="ia+(nat i)" in spec2) |
|
1432 apply (auto) |
|
1433 done |
|
1434 |
1398 end |
1435 end |