equal
deleted
inserted
replaced
1616 case True |
1616 case True |
1617 then show ?thesis |
1617 then show ?thesis |
1618 by (induct n n' rule: less_Suc_induct [consumes 1]) (auto intro: mono) |
1618 by (induct n n' rule: less_Suc_induct [consumes 1]) (auto intro: mono) |
1619 qed (insert `n \<le> n'`, auto) -- {* trivial for @{prop "n = n'"} *} |
1619 qed (insert `n \<le> n'`, auto) -- {* trivial for @{prop "n = n'"} *} |
1620 |
1620 |
|
1621 lemma lift_Suc_antimono_le: |
|
1622 assumes mono: "\<And>n. f n \<ge> f (Suc n)" and "n \<le> n'" |
|
1623 shows "f n \<ge> f n'" |
|
1624 proof (cases "n < n'") |
|
1625 case True |
|
1626 then show ?thesis |
|
1627 by (induct n n' rule: less_Suc_induct [consumes 1]) (auto intro: mono) |
|
1628 qed (insert `n \<le> n'`, auto) -- {* trivial for @{prop "n = n'"} *} |
|
1629 |
1621 lemma lift_Suc_mono_less: |
1630 lemma lift_Suc_mono_less: |
1622 assumes mono: "\<And>n. f n < f (Suc n)" and "n < n'" |
1631 assumes mono: "\<And>n. f n < f (Suc n)" and "n < n'" |
1623 shows "f n < f n'" |
1632 shows "f n < f n'" |
1624 using `n < n'` |
1633 using `n < n'` |
1625 by (induct n n' rule: less_Suc_induct [consumes 1]) (auto intro: mono) |
1634 by (induct n n' rule: less_Suc_induct [consumes 1]) (auto intro: mono) |
1632 end |
1641 end |
1633 |
1642 |
1634 lemma mono_iff_le_Suc: |
1643 lemma mono_iff_le_Suc: |
1635 "mono f \<longleftrightarrow> (\<forall>n. f n \<le> f (Suc n))" |
1644 "mono f \<longleftrightarrow> (\<forall>n. f n \<le> f (Suc n))" |
1636 unfolding mono_def by (auto intro: lift_Suc_mono_le [of f]) |
1645 unfolding mono_def by (auto intro: lift_Suc_mono_le [of f]) |
|
1646 |
|
1647 lemma antimono_iff_le_Suc: |
|
1648 "antimono f \<longleftrightarrow> (\<forall>n. f (Suc n) \<le> f n)" |
|
1649 unfolding antimono_def by (auto intro: lift_Suc_antimono_le [of f]) |
1637 |
1650 |
1638 lemma mono_nat_linear_lb: |
1651 lemma mono_nat_linear_lb: |
1639 fixes f :: "nat \<Rightarrow> nat" |
1652 fixes f :: "nat \<Rightarrow> nat" |
1640 assumes "\<And>m n. m < n \<Longrightarrow> f m < f n" |
1653 assumes "\<And>m n. m < n \<Longrightarrow> f m < f n" |
1641 shows "f m + k \<le> f (m + k)" |
1654 shows "f m + k \<le> f (m + k)" |