equal
deleted
inserted
replaced
1818 by (safe intro!: exI[of _ "e/2"] exI[of _ "{c}"]) auto |
1818 by (safe intro!: exI[of _ "e/2"] exI[of _ "{c}"]) auto |
1819 qed |
1819 qed |
1820 qed simp |
1820 qed simp |
1821 |
1821 |
1822 |
1822 |
|
1823 lemma continuous_image_closed_interval: |
|
1824 fixes a b and f :: "real \<Rightarrow> real" |
|
1825 defines "S \<equiv> {a..b}" |
|
1826 assumes "a \<le> b" and f: "continuous_on S f" |
|
1827 shows "\<exists>c d. f`S = {c..d} \<and> c \<le> d" |
|
1828 proof - |
|
1829 have S: "compact S" "S \<noteq> {}" |
|
1830 using `a \<le> b` by (auto simp: S_def) |
|
1831 obtain c where "c \<in> S" "\<forall>d\<in>S. f d \<le> f c" |
|
1832 using continuous_attains_sup[OF S f] by auto |
|
1833 moreover obtain d where "d \<in> S" "\<forall>c\<in>S. f d \<le> f c" |
|
1834 using continuous_attains_inf[OF S f] by auto |
|
1835 moreover have "connected (f`S)" |
|
1836 using connected_continuous_image[OF f] connected_Icc by (auto simp: S_def) |
|
1837 ultimately have "f ` S = {f d .. f c} \<and> f d \<le> f c" |
|
1838 by (auto simp: connected_iff_interval) |
|
1839 then show ?thesis |
|
1840 by auto |
|
1841 qed |
|
1842 |
1823 subsection {* Boundedness of continuous functions *} |
1843 subsection {* Boundedness of continuous functions *} |
1824 |
1844 |
1825 text{*By bisection, function continuous on closed interval is bounded above*} |
1845 text{*By bisection, function continuous on closed interval is bounded above*} |
1826 |
1846 |
1827 lemma isCont_eq_Ub: |
1847 lemma isCont_eq_Ub: |