src/HOL/Library/ContNotDenum.thy
changeset 63040 eb4ddd18d635
parent 62083 7582b39f51ed
child 63060 293ede07b775
equal deleted inserted replaced
63039:1a20fd9cf281 63040:eb4ddd18d635
    44     "\<And>a b c::real. a < b \<Longrightarrow> i a b c < j a b c"
    44     "\<And>a b c::real. a < b \<Longrightarrow> i a b c < j a b c"
    45     "\<And>a b c. a < b \<Longrightarrow> {i a b c .. j a b c} \<subseteq> {a .. b}"
    45     "\<And>a b c. a < b \<Longrightarrow> {i a b c .. j a b c} \<subseteq> {a .. b}"
    46     "\<And>a b c. a < b \<Longrightarrow> c \<notin> {i a b c .. j a b c}"
    46     "\<And>a b c. a < b \<Longrightarrow> c \<notin> {i a b c .. j a b c}"
    47     by metis
    47     by metis
    48 
    48 
    49   def ivl \<equiv> "rec_nat (f 0 + 1, f 0 + 2) (\<lambda>n x. (i (fst x) (snd x) (f n), j (fst x) (snd x) (f n)))"
    49   define ivl where "ivl =
    50   def I \<equiv> "\<lambda>n. {fst (ivl n) .. snd (ivl n)}"
    50     rec_nat (f 0 + 1, f 0 + 2) (\<lambda>n x. (i (fst x) (snd x) (f n), j (fst x) (snd x) (f n)))"
       
    51   define I where "I n = {fst (ivl n) .. snd (ivl n)}" for n
    51 
    52 
    52   have ivl[simp]:
    53   have ivl[simp]:
    53     "ivl 0 = (f 0 + 1, f 0 + 2)"
    54     "ivl 0 = (f 0 + 1, f 0 + 2)"
    54     "\<And>n. ivl (Suc n) = (i (fst (ivl n)) (snd (ivl n)) (f n), j (fst (ivl n)) (snd (ivl n)) (f n))"
    55     "\<And>n. ivl (Suc n) = (i (fst (ivl n)) (snd (ivl n)) (f n), j (fst (ivl n)) (snd (ivl n)) (f n))"
    55     unfolding ivl_def by simp_all
    56     unfolding ivl_def by simp_all
    93 lemma bij_betw_open_intervals:
    94 lemma bij_betw_open_intervals:
    94   fixes a b c d :: real
    95   fixes a b c d :: real
    95   assumes "a < b" "c < d"
    96   assumes "a < b" "c < d"
    96   shows "\<exists>f. bij_betw f {a<..<b} {c<..<d}"
    97   shows "\<exists>f. bij_betw f {a<..<b} {c<..<d}"
    97 proof -
    98 proof -
    98   def f \<equiv> "\<lambda>a b c d x::real. (d - c)/(b - a) * (x - a) + c"
    99   define f where "f a b c d x = (d - c)/(b - a) * (x - a) + c" for a b c d x :: real
    99   { fix a b c d x :: real assume *: "a < b" "c < d" "a < x" "x < b"
   100   { fix a b c d x :: real assume *: "a < b" "c < d" "a < x" "x < b"
   100     moreover from * have "(d - c) * (x - a) < (d - c) * (b - a)"
   101     moreover from * have "(d - c) * (x - a) < (d - c) * (b - a)"
   101       by (intro mult_strict_left_mono) simp_all
   102       by (intro mult_strict_left_mono) simp_all
   102     moreover from * have "0 < (d - c) * (x - a) / (b - a)"
   103     moreover from * have "0 < (d - c) * (x - a) / (b - a)"
   103       by simp
   104       by simp