changeset 67116 | 7397a6df81d8 |
parent 66912 | a99a7cbf0fb5 |
child 67118 | ccab07d1196c |
67115:2977773a481c | 67116:7397a6df81d8 |
---|---|
200 assume ?lhs |
200 assume ?lhs |
201 with zless_imp_add1_zle [of "\<bar>z\<bar>" 1] have "\<bar>z\<bar> + 1 \<le> 1" by simp |
201 with zless_imp_add1_zle [of "\<bar>z\<bar>" 1] have "\<bar>z\<bar> + 1 \<le> 1" by simp |
202 then have "\<bar>z\<bar> \<le> 0" by simp |
202 then have "\<bar>z\<bar> \<le> 0" by simp |
203 then show ?rhs by simp |
203 then show ?rhs by simp |
204 qed |
204 qed |
205 |
|
206 lemmas int_distrib = |
|
207 distrib_right [of z1 z2 w] |
|
208 distrib_left [of w z1 z2] |
|
209 left_diff_distrib [of z1 z2 w] |
|
210 right_diff_distrib [of w z1 z2] |
|
211 for z1 z2 w :: int |
|
212 |
205 |
213 |
206 |
214 subsection \<open>Embedding of the Integers into any \<open>ring_1\<close>: \<open>of_int\<close>\<close> |
207 subsection \<open>Embedding of the Integers into any \<open>ring_1\<close>: \<open>of_int\<close>\<close> |
215 |
208 |
216 context ring_1 |
209 context ring_1 |
776 |
769 |
777 lemma int_of_nat_induct [case_names nonneg neg, induct type: int]: |
770 lemma int_of_nat_induct [case_names nonneg neg, induct type: int]: |
778 "(\<And>n. P (int n)) \<Longrightarrow> (\<And>n. P (- (int (Suc n)))) \<Longrightarrow> P z" |
771 "(\<And>n. P (int n)) \<Longrightarrow> (\<And>n. P (- (int (Suc n)))) \<Longrightarrow> P z" |
779 by (cases z) auto |
772 by (cases z) auto |
780 |
773 |
781 lemma Let_numeral [simp]: "Let (numeral v) f = f (numeral v)" |
|
782 \<comment> \<open>Unfold all \<open>let\<close>s involving constants\<close> |
|
783 by (fact Let_numeral) \<comment> \<open>FIXME drop\<close> |
|
784 |
|
785 lemma Let_neg_numeral [simp]: "Let (- numeral v) f = f (- numeral v)" |
|
786 \<comment> \<open>Unfold all \<open>let\<close>s involving constants\<close> |
|
787 by (fact Let_neg_numeral) \<comment> \<open>FIXME drop\<close> |
|
788 |
|
789 lemma sgn_mult_dvd_iff [simp]: |
774 lemma sgn_mult_dvd_iff [simp]: |
790 "sgn r * l dvd k \<longleftrightarrow> l dvd k \<and> (r = 0 \<longrightarrow> k = 0)" for k l r :: int |
775 "sgn r * l dvd k \<longleftrightarrow> l dvd k \<and> (r = 0 \<longrightarrow> k = 0)" for k l r :: int |
791 by (cases r rule: int_cases3) auto |
776 by (cases r rule: int_cases3) auto |
792 |
777 |
793 lemma mult_sgn_dvd_iff [simp]: |
778 lemma mult_sgn_dvd_iff [simp]: |
808 proof - |
793 proof - |
809 have "k = sgn k * int (nat \<bar>k\<bar>)" |
794 have "k = sgn k * int (nat \<bar>k\<bar>)" |
810 by (simp add: sgn_mult_abs) |
795 by (simp add: sgn_mult_abs) |
811 then show ?thesis .. |
796 then show ?thesis .. |
812 qed |
797 qed |
813 |
|
814 text \<open>Unfold \<open>min\<close> and \<open>max\<close> on numerals.\<close> |
|
815 |
|
816 lemmas max_number_of [simp] = |
|
817 max_def [of "numeral u" "numeral v"] |
|
818 max_def [of "numeral u" "- numeral v"] |
|
819 max_def [of "- numeral u" "numeral v"] |
|
820 max_def [of "- numeral u" "- numeral v"] for u v |
|
821 |
|
822 lemmas min_number_of [simp] = |
|
823 min_def [of "numeral u" "numeral v"] |
|
824 min_def [of "numeral u" "- numeral v"] |
|
825 min_def [of "- numeral u" "numeral v"] |
|
826 min_def [of "- numeral u" "- numeral v"] for u v |
|
827 |
798 |
828 |
799 |
829 subsubsection \<open>Binary comparisons\<close> |
800 subsubsection \<open>Binary comparisons\<close> |
830 |
801 |
831 text \<open>Preliminaries\<close> |
802 text \<open>Preliminaries\<close> |
855 qed |
826 qed |
856 |
827 |
857 |
828 |
858 subsubsection \<open>Comparisons, for Ordered Rings\<close> |
829 subsubsection \<open>Comparisons, for Ordered Rings\<close> |
859 |
830 |
860 lemmas double_eq_0_iff = double_zero |
|
861 |
|
862 lemma odd_nonzero: "1 + z + z \<noteq> 0" |
831 lemma odd_nonzero: "1 + z + z \<noteq> 0" |
863 for z :: int |
832 for z :: int |
864 proof (cases z) |
833 proof (cases z) |
865 case (nonneg n) |
834 case (nonneg n) |
866 have le: "0 \<le> z + z" |
835 have le: "0 \<le> z + z" |
867 by (simp add: nonneg add_increasing) |
836 by (simp add: nonneg add_increasing) |
868 then show ?thesis |
837 then show ?thesis |
869 using le_imp_0_less [OF le] by (auto simp: add.assoc) |
838 using le_imp_0_less [OF le] by (auto simp: ac_simps) |
870 next |
839 next |
871 case (neg n) |
840 case (neg n) |
872 show ?thesis |
841 show ?thesis |
873 proof |
842 proof |
874 assume eq: "1 + z + z = 0" |
843 assume eq: "1 + z + z = 0" |
1015 then show ?lhs by simp |
984 then show ?lhs by simp |
1016 next |
985 next |
1017 assume ?lhs |
986 assume ?lhs |
1018 with a have "of_int (z + z) = (of_int 0 :: 'a)" by simp |
987 with a have "of_int (z + z) = (of_int 0 :: 'a)" by simp |
1019 then have "z + z = 0" by (simp only: of_int_eq_iff) |
988 then have "z + z = 0" by (simp only: of_int_eq_iff) |
1020 then have "z = 0" by (simp only: double_eq_0_iff) |
989 then have "z = 0" by (simp only: double_zero) |
1021 with a show ?rhs by simp |
990 with a show ?rhs by simp |
1022 qed |
991 qed |
1023 qed |
992 qed |
1024 |
993 |
1025 lemma Ints_odd_nonzero: |
994 lemma Ints_odd_nonzero: |
1071 lemma of_nat_prod [simp]: "of_nat (prod f A) = (\<Prod>x\<in>A. of_nat(f x))" |
1040 lemma of_nat_prod [simp]: "of_nat (prod f A) = (\<Prod>x\<in>A. of_nat(f x))" |
1072 by (induct A rule: infinite_finite_induct) auto |
1041 by (induct A rule: infinite_finite_induct) auto |
1073 |
1042 |
1074 lemma of_int_prod [simp]: "of_int (prod f A) = (\<Prod>x\<in>A. of_int(f x))" |
1043 lemma of_int_prod [simp]: "of_int (prod f A) = (\<Prod>x\<in>A. of_int(f x))" |
1075 by (induct A rule: infinite_finite_induct) auto |
1044 by (induct A rule: infinite_finite_induct) auto |
1076 |
|
1077 |
|
1078 text \<open>Legacy theorems\<close> |
|
1079 |
|
1080 lemmas int_sum = of_nat_sum [where 'a=int] |
|
1081 lemmas int_prod = of_nat_prod [where 'a=int] |
|
1082 lemmas zle_int = of_nat_le_iff [where 'a=int] |
|
1083 lemmas int_int_eq = of_nat_eq_iff [where 'a=int] |
|
1084 lemmas nonneg_eq_int = nonneg_int_cases |
|
1085 |
1045 |
1086 |
1046 |
1087 subsection \<open>Setting up simplification procedures\<close> |
1047 subsection \<open>Setting up simplification procedures\<close> |
1088 |
1048 |
1089 lemmas of_int_simps = |
1049 lemmas of_int_simps = |
1145 text \<open>Simplify the term @{term "w + - z"}.\<close> |
1105 text \<open>Simplify the term @{term "w + - z"}.\<close> |
1146 |
1106 |
1147 lemma one_less_nat_eq [simp]: "Suc 0 < nat z \<longleftrightarrow> 1 < z" |
1107 lemma one_less_nat_eq [simp]: "Suc 0 < nat z \<longleftrightarrow> 1 < z" |
1148 using zless_nat_conj [of 1 z] by auto |
1108 using zless_nat_conj [of 1 z] by auto |
1149 |
1109 |
1150 text \<open> |
1110 lemma int_eq_iff_numeral [simp]: |
1151 This simplifies expressions of the form @{term "int n = z"} where |
1111 "int m = numeral v \<longleftrightarrow> m = numeral v" |
1152 \<open>z\<close> is an integer literal. |
1112 by (simp add: int_eq_iff) |
1153 \<close> |
1113 |
1154 lemmas int_eq_iff_numeral [simp] = int_eq_iff [of _ "numeral v"] for v |
1114 lemma nat_abs_int_diff: |
1155 |
1115 "nat \<bar>int a - int b\<bar> = (if a \<le> b then b - a else a - b)" |
1156 lemma nat_abs_int_diff: "nat \<bar>int a - int b\<bar> = (if a \<le> b then b - a else a - b)" |
|
1157 by auto |
1116 by auto |
1158 |
1117 |
1159 lemma nat_int_add: "nat (int a + int b) = a + b" |
1118 lemma nat_int_add: "nat (int a + int b) = a + b" |
1160 by auto |
1119 by auto |
1161 |
1120 |
1375 qed |
1334 qed |
1376 |
1335 |
1377 |
1336 |
1378 subsection \<open>Intermediate value theorems\<close> |
1337 subsection \<open>Intermediate value theorems\<close> |
1379 |
1338 |
1380 lemma int_val_lemma: "(\<forall>i<n. \<bar>f (i + 1) - f i\<bar> \<le> 1) \<longrightarrow> f 0 \<le> k \<longrightarrow> k \<le> f n \<longrightarrow> (\<exists>i \<le> n. f i = k)" |
1339 lemma nat_intermed_int_val: |
1340 "\<exists>i. m \<le> i \<and> i \<le> n \<and> f i = k" |
|
1341 if "\<forall>i. m \<le> i \<and> i < n \<longrightarrow> \<bar>f (Suc i) - f i\<bar> \<le> 1" |
|
1342 "m \<le> n" "f m \<le> k" "k \<le> f n" |
|
1343 for m n :: nat and k :: int |
|
1344 proof - |
|
1345 have "(\<forall>i<n. \<bar>f (Suc i) - f i\<bar> \<le> 1) \<Longrightarrow> f 0 \<le> k \<Longrightarrow> k \<le> f n |
|
1346 \<Longrightarrow> (\<exists>i \<le> n. f i = k)" |
|
1347 for n :: nat and f |
|
1348 apply (induct n) |
|
1349 apply auto |
|
1350 apply (erule_tac x = n in allE) |
|
1351 apply (case_tac "k = f (Suc n)") |
|
1352 apply (auto simp add: abs_if split: if_split_asm intro: le_SucI) |
|
1353 done |
|
1354 from this [of "n - m" "f \<circ> plus m"] that show ?thesis |
|
1355 apply auto |
|
1356 apply (rule_tac x = "m + i" in exI) |
|
1357 apply auto |
|
1358 done |
|
1359 qed |
|
1360 |
|
1361 lemma nat0_intermed_int_val: |
|
1362 "\<exists>i\<le>n. f i = k" |
|
1363 if "\<forall>i<n. \<bar>f (i + 1) - f i\<bar> \<le> 1" "f 0 \<le> k" "k \<le> f n" |
|
1381 for n :: nat and k :: int |
1364 for n :: nat and k :: int |
1382 unfolding One_nat_def |
1365 using nat_intermed_int_val [of 0 n f k] that by auto |
1383 apply (induct n) |
|
1384 apply simp |
|
1385 apply (intro strip) |
|
1386 apply (erule impE) |
|
1387 apply simp |
|
1388 apply (erule_tac x = n in allE) |
|
1389 apply simp |
|
1390 apply (case_tac "k = f (Suc n)") |
|
1391 apply force |
|
1392 apply (erule impE) |
|
1393 apply (simp add: abs_if split: if_split_asm) |
|
1394 apply (blast intro: le_SucI) |
|
1395 done |
|
1396 |
|
1397 lemmas nat0_intermed_int_val = int_val_lemma [rule_format (no_asm)] |
|
1398 |
|
1399 lemma nat_intermed_int_val: |
|
1400 "\<forall>i. m \<le> i \<and> i < n \<longrightarrow> \<bar>f (i + 1) - f i\<bar> \<le> 1 \<Longrightarrow> m < n \<Longrightarrow> |
|
1401 f m \<le> k \<Longrightarrow> k \<le> f n \<Longrightarrow> \<exists>i. m \<le> i \<and> i \<le> n \<and> f i = k" |
|
1402 for f :: "nat \<Rightarrow> int" and k :: int |
|
1403 apply (cut_tac n = "n-m" and f = "\<lambda>i. f (i + m)" and k = k in int_val_lemma) |
|
1404 unfolding One_nat_def |
|
1405 apply simp |
|
1406 apply (erule exE) |
|
1407 apply (rule_tac x = "i+m" in exI) |
|
1408 apply arith |
|
1409 done |
|
1410 |
1366 |
1411 |
1367 |
1412 subsection \<open>Products and 1, by T. M. Rasmussen\<close> |
1368 subsection \<open>Products and 1, by T. M. Rasmussen\<close> |
1413 |
1369 |
1414 lemma abs_zmult_eq_1: |
1370 lemma abs_zmult_eq_1: |
1461 ultimately have "surj (\<lambda>i::int. 2 * i)" |
1417 ultimately have "surj (\<lambda>i::int. 2 * i)" |
1462 by (rule finite_UNIV_inj_surj) |
1418 by (rule finite_UNIV_inj_surj) |
1463 then obtain i :: int where "1 = 2 * i" by (rule surjE) |
1419 then obtain i :: int where "1 = 2 * i" by (rule surjE) |
1464 then show False by (simp add: pos_zmult_eq_1_iff) |
1420 then show False by (simp add: pos_zmult_eq_1_iff) |
1465 qed |
1421 qed |
1466 |
|
1467 |
|
1468 subsection \<open>Further theorems on numerals\<close> |
|
1469 |
|
1470 subsubsection \<open>Special Simplification for Constants\<close> |
|
1471 |
|
1472 text \<open>These distributive laws move literals inside sums and differences.\<close> |
|
1473 |
|
1474 lemmas distrib_right_numeral [simp] = distrib_right [of _ _ "numeral v"] for v |
|
1475 lemmas distrib_left_numeral [simp] = distrib_left [of "numeral v"] for v |
|
1476 lemmas left_diff_distrib_numeral [simp] = left_diff_distrib [of _ _ "numeral v"] for v |
|
1477 lemmas right_diff_distrib_numeral [simp] = right_diff_distrib [of "numeral v"] for v |
|
1478 |
|
1479 text \<open>These are actually for fields, like real: but where else to put them?\<close> |
|
1480 |
|
1481 lemmas zero_less_divide_iff_numeral [simp, no_atp] = zero_less_divide_iff [of "numeral w"] for w |
|
1482 lemmas divide_less_0_iff_numeral [simp, no_atp] = divide_less_0_iff [of "numeral w"] for w |
|
1483 lemmas zero_le_divide_iff_numeral [simp, no_atp] = zero_le_divide_iff [of "numeral w"] for w |
|
1484 lemmas divide_le_0_iff_numeral [simp, no_atp] = divide_le_0_iff [of "numeral w"] for w |
|
1485 |
|
1486 |
|
1487 text \<open>Replaces \<open>inverse #nn\<close> by \<open>1/#nn\<close>. It looks |
|
1488 strange, but then other simprocs simplify the quotient.\<close> |
|
1489 |
|
1490 lemmas inverse_eq_divide_numeral [simp] = |
|
1491 inverse_eq_divide [of "numeral w"] for w |
|
1492 |
|
1493 lemmas inverse_eq_divide_neg_numeral [simp] = |
|
1494 inverse_eq_divide [of "- numeral w"] for w |
|
1495 |
|
1496 text \<open>These laws simplify inequalities, moving unary minus from a term |
|
1497 into the literal.\<close> |
|
1498 |
|
1499 lemmas equation_minus_iff_numeral [no_atp] = |
|
1500 equation_minus_iff [of "numeral v"] for v |
|
1501 |
|
1502 lemmas minus_equation_iff_numeral [no_atp] = |
|
1503 minus_equation_iff [of _ "numeral v"] for v |
|
1504 |
|
1505 lemmas le_minus_iff_numeral [no_atp] = |
|
1506 le_minus_iff [of "numeral v"] for v |
|
1507 |
|
1508 lemmas minus_le_iff_numeral [no_atp] = |
|
1509 minus_le_iff [of _ "numeral v"] for v |
|
1510 |
|
1511 lemmas less_minus_iff_numeral [no_atp] = |
|
1512 less_minus_iff [of "numeral v"] for v |
|
1513 |
|
1514 lemmas minus_less_iff_numeral [no_atp] = |
|
1515 minus_less_iff [of _ "numeral v"] for v |
|
1516 |
|
1517 (* FIXME maybe simproc *) |
|
1518 |
|
1519 |
|
1520 text \<open>Cancellation of constant factors in comparisons (\<open><\<close> and \<open>\<le>\<close>)\<close> |
|
1521 |
|
1522 lemmas mult_less_cancel_left_numeral [simp, no_atp] = mult_less_cancel_left [of "numeral v"] for v |
|
1523 lemmas mult_less_cancel_right_numeral [simp, no_atp] = mult_less_cancel_right [of _ "numeral v"] for v |
|
1524 lemmas mult_le_cancel_left_numeral [simp, no_atp] = mult_le_cancel_left [of "numeral v"] for v |
|
1525 lemmas mult_le_cancel_right_numeral [simp, no_atp] = mult_le_cancel_right [of _ "numeral v"] for v |
|
1526 |
|
1527 |
|
1528 text \<open>Multiplying out constant divisors in comparisons (\<open><\<close>, \<open>\<le>\<close> and \<open>=\<close>)\<close> |
|
1529 |
|
1530 named_theorems divide_const_simps "simplification rules to simplify comparisons involving constant divisors" |
|
1531 |
|
1532 lemmas le_divide_eq_numeral1 [simp,divide_const_simps] = |
|
1533 pos_le_divide_eq [of "numeral w", OF zero_less_numeral] |
|
1534 neg_le_divide_eq [of "- numeral w", OF neg_numeral_less_zero] for w |
|
1535 |
|
1536 lemmas divide_le_eq_numeral1 [simp,divide_const_simps] = |
|
1537 pos_divide_le_eq [of "numeral w", OF zero_less_numeral] |
|
1538 neg_divide_le_eq [of "- numeral w", OF neg_numeral_less_zero] for w |
|
1539 |
|
1540 lemmas less_divide_eq_numeral1 [simp,divide_const_simps] = |
|
1541 pos_less_divide_eq [of "numeral w", OF zero_less_numeral] |
|
1542 neg_less_divide_eq [of "- numeral w", OF neg_numeral_less_zero] for w |
|
1543 |
|
1544 lemmas divide_less_eq_numeral1 [simp,divide_const_simps] = |
|
1545 pos_divide_less_eq [of "numeral w", OF zero_less_numeral] |
|
1546 neg_divide_less_eq [of "- numeral w", OF neg_numeral_less_zero] for w |
|
1547 |
|
1548 lemmas eq_divide_eq_numeral1 [simp,divide_const_simps] = |
|
1549 eq_divide_eq [of _ _ "numeral w"] |
|
1550 eq_divide_eq [of _ _ "- numeral w"] for w |
|
1551 |
|
1552 lemmas divide_eq_eq_numeral1 [simp,divide_const_simps] = |
|
1553 divide_eq_eq [of _ "numeral w"] |
|
1554 divide_eq_eq [of _ "- numeral w"] for w |
|
1555 |
|
1556 |
|
1557 subsubsection \<open>Optional Simplification Rules Involving Constants\<close> |
|
1558 |
|
1559 text \<open>Simplify quotients that are compared with a literal constant.\<close> |
|
1560 |
|
1561 lemmas le_divide_eq_numeral [divide_const_simps] = |
|
1562 le_divide_eq [of "numeral w"] |
|
1563 le_divide_eq [of "- numeral w"] for w |
|
1564 |
|
1565 lemmas divide_le_eq_numeral [divide_const_simps] = |
|
1566 divide_le_eq [of _ _ "numeral w"] |
|
1567 divide_le_eq [of _ _ "- numeral w"] for w |
|
1568 |
|
1569 lemmas less_divide_eq_numeral [divide_const_simps] = |
|
1570 less_divide_eq [of "numeral w"] |
|
1571 less_divide_eq [of "- numeral w"] for w |
|
1572 |
|
1573 lemmas divide_less_eq_numeral [divide_const_simps] = |
|
1574 divide_less_eq [of _ _ "numeral w"] |
|
1575 divide_less_eq [of _ _ "- numeral w"] for w |
|
1576 |
|
1577 lemmas eq_divide_eq_numeral [divide_const_simps] = |
|
1578 eq_divide_eq [of "numeral w"] |
|
1579 eq_divide_eq [of "- numeral w"] for w |
|
1580 |
|
1581 lemmas divide_eq_eq_numeral [divide_const_simps] = |
|
1582 divide_eq_eq [of _ _ "numeral w"] |
|
1583 divide_eq_eq [of _ _ "- numeral w"] for w |
|
1584 |
|
1585 |
|
1586 text \<open>Not good as automatic simprules because they cause case splits.\<close> |
|
1587 lemmas [divide_const_simps] = |
|
1588 le_divide_eq_1 divide_le_eq_1 less_divide_eq_1 divide_less_eq_1 |
|
1589 |
1422 |
1590 |
1423 |
1591 subsection \<open>The divides relation\<close> |
1424 subsection \<open>The divides relation\<close> |
1592 |
1425 |
1593 lemma zdvd_antisym_nonneg: "0 \<le> m \<Longrightarrow> 0 \<le> n \<Longrightarrow> m dvd n \<Longrightarrow> n dvd m \<Longrightarrow> m = n" |
1426 lemma zdvd_antisym_nonneg: "0 \<le> m \<Longrightarrow> 0 \<le> n \<Longrightarrow> m dvd n \<Longrightarrow> n dvd m \<Longrightarrow> m = n" |
1732 |
1565 |
1733 lemma nat_dvd_iff: "nat z dvd m \<longleftrightarrow> (if 0 \<le> z then z dvd int m else m = 0)" |
1566 lemma nat_dvd_iff: "nat z dvd m \<longleftrightarrow> (if 0 \<le> z then z dvd int m else m = 0)" |
1734 by (auto simp add: dvd_int_iff) |
1567 by (auto simp add: dvd_int_iff) |
1735 |
1568 |
1736 lemma eq_nat_nat_iff: "0 \<le> z \<Longrightarrow> 0 \<le> z' \<Longrightarrow> nat z = nat z' \<longleftrightarrow> z = z'" |
1569 lemma eq_nat_nat_iff: "0 \<le> z \<Longrightarrow> 0 \<le> z' \<Longrightarrow> nat z = nat z' \<longleftrightarrow> z = z'" |
1737 by (auto elim!: nonneg_eq_int) |
1570 by (auto elim: nonneg_int_cases) |
1738 |
1571 |
1739 lemma nat_power_eq: "0 \<le> z \<Longrightarrow> nat (z ^ n) = nat z ^ n" |
1572 lemma nat_power_eq: "0 \<le> z \<Longrightarrow> nat (z ^ n) = nat z ^ n" |
1740 by (induct n) (simp_all add: nat_mult_distrib) |
1573 by (induct n) (simp_all add: nat_mult_distrib) |
1741 |
1574 |
1742 lemma numeral_power_eq_nat_cancel_iff [simp]: |
1575 lemma numeral_power_eq_nat_cancel_iff [simp]: |
1975 text \<open>De-register \<open>int\<close> as a quotient type:\<close> |
1808 text \<open>De-register \<open>int\<close> as a quotient type:\<close> |
1976 |
1809 |
1977 lifting_update int.lifting |
1810 lifting_update int.lifting |
1978 lifting_forget int.lifting |
1811 lifting_forget int.lifting |
1979 |
1812 |
1813 |
|
1814 subsection \<open>Duplicates\<close> |
|
1815 |
|
1816 lemmas int_sum = of_nat_sum [where 'a=int] |
|
1817 lemmas int_prod = of_nat_prod [where 'a=int] |
|
1818 lemmas zle_int = of_nat_le_iff [where 'a=int] |
|
1819 lemmas int_int_eq = of_nat_eq_iff [where 'a=int] |
|
1820 lemmas nonneg_eq_int = nonneg_int_cases |
|
1821 lemmas double_eq_0_iff = double_zero |
|
1822 |
|
1823 lemmas int_distrib = |
|
1824 distrib_right [of z1 z2 w] |
|
1825 distrib_left [of w z1 z2] |
|
1826 left_diff_distrib [of z1 z2 w] |
|
1827 right_diff_distrib [of w z1 z2] |
|
1828 for z1 z2 w :: int |
|
1829 |
|
1980 end |
1830 end |
1831 |