src/HOL/Decision_Procs/MIR.thy
changeset 30240 5b25fee0362c
parent 29823 0ab754d13ccd
child 30242 aea5d7fa7ef5
equal deleted inserted replaced
30239:179ff9cb160b 30240:5b25fee0362c
    81   assume lb: "real n \<le> x"
    81   assume lb: "real n \<le> x"
    82     and ub: "x < real n + 1"
    82     and ub: "x < real n + 1"
    83   have "real (floor x) \<le> x" by simp 
    83   have "real (floor x) \<le> x" by simp 
    84   hence "real (floor x) < real (n + 1) " using ub by arith
    84   hence "real (floor x) < real (n + 1) " using ub by arith
    85   hence "floor x < n+1" by simp
    85   hence "floor x < n+1" by simp
    86   moreover from lb have "n \<le> floor x" using floor_mono2[where x="real n" and y="x"] 
    86   moreover from lb have "n \<le> floor x" using floor_mono[where x="real n" and y="x"] 
    87     by simp ultimately show "floor x = n" by simp
    87     by simp ultimately show "floor x = n" by simp
    88 qed
    88 qed
    89 
    89 
    90 (* Periodicity of dvd *)
    90 (* Periodicity of dvd *)
    91 lemma dvd_period:
    91 lemma dvd_period:
   130   "(abs (real d) rdvd t) = (real (d ::int) rdvd t)"
   130   "(abs (real d) rdvd t) = (real (d ::int) rdvd t)"
   131 proof
   131 proof
   132   assume d: "real d rdvd t"
   132   assume d: "real d rdvd t"
   133   from d int_rdvd_real have d2: "d dvd (floor t)" and ti: "real (floor t) = t" by auto
   133   from d int_rdvd_real have d2: "d dvd (floor t)" and ti: "real (floor t) = t" by auto
   134 
   134 
   135   from iffD2[OF zdvd_abs1] d2 have "(abs d) dvd (floor t)" by blast
   135   from iffD2[OF abs_dvd_iff] d2 have "(abs d) dvd (floor t)" by blast
   136   with ti int_rdvd_real[symmetric] have "real (abs d) rdvd t" by blast 
   136   with ti int_rdvd_real[symmetric] have "real (abs d) rdvd t" by blast 
   137   thus "abs (real d) rdvd t" by simp
   137   thus "abs (real d) rdvd t" by simp
   138 next
   138 next
   139   assume "abs (real d) rdvd t" hence "real (abs d) rdvd t" by simp
   139   assume "abs (real d) rdvd t" hence "real (abs d) rdvd t" by simp
   140   with int_rdvd_real[where i="abs d" and x="t"] have d2: "abs d dvd floor t" and ti: "real (floor t) =t" by auto
   140   with int_rdvd_real[where i="abs d" and x="t"] have d2: "abs d dvd floor t" and ti: "real (floor t) =t" by auto
   141   from iffD1[OF zdvd_abs1] d2 have "d dvd floor t" by blast
   141   from iffD1[OF abs_dvd_iff] d2 have "d dvd floor t" by blast
   142   with ti int_rdvd_real[symmetric] show "real d rdvd t" by blast
   142   with ti int_rdvd_real[symmetric] show "real d rdvd t" by blast
   143 qed
   143 qed
   144 
   144 
   145 lemma rdvd_minus: "(real (d::int) rdvd t) = (real d rdvd -t)"
   145 lemma rdvd_minus: "(real (d::int) rdvd t) = (real d rdvd -t)"
   146   apply (auto simp add: rdvd_def)
   146   apply (auto simp add: rdvd_def)
   673 
   673 
   674 lemma dvdnumcoeff_trans: 
   674 lemma dvdnumcoeff_trans: 
   675   assumes gdg: "g dvd g'" and dgt':"dvdnumcoeff t g'"
   675   assumes gdg: "g dvd g'" and dgt':"dvdnumcoeff t g'"
   676   shows "dvdnumcoeff t g"
   676   shows "dvdnumcoeff t g"
   677   using dgt' gdg 
   677   using dgt' gdg 
   678   by (induct t rule: dvdnumcoeff.induct, simp_all add: gdg zdvd_trans[OF gdg])
   678   by (induct t rule: dvdnumcoeff.induct, simp_all add: gdg dvd_trans[OF gdg])
   679 
   679 
   680 declare zdvd_trans [trans add]
   680 declare dvd_trans [trans add]
   681 
   681 
   682 lemma natabs0: "(nat (abs x) = 0) = (x = 0)"
   682 lemma natabs0: "(nat (abs x) = 0) = (x = 0)"
   683 by arith
   683 by arith
   684 
   684 
   685 lemma numgcd0:
   685 lemma numgcd0:
  1773 
  1773 
  1774 lemma split_int_le_real: 
  1774 lemma split_int_le_real: 
  1775   "(real (a::int) \<le> b) = (a \<le> floor b \<or> (a = floor b \<and> real (floor b) < b))"
  1775   "(real (a::int) \<le> b) = (a \<le> floor b \<or> (a = floor b \<and> real (floor b) < b))"
  1776 proof( auto)
  1776 proof( auto)
  1777   assume alb: "real a \<le> b" and agb: "\<not> a \<le> floor b"
  1777   assume alb: "real a \<le> b" and agb: "\<not> a \<le> floor b"
  1778   from alb have "floor (real a) \<le> floor b " by (simp only: floor_mono2) 
  1778   from alb have "floor (real a) \<le> floor b " by (simp only: floor_mono) 
  1779   hence "a \<le> floor b" by simp with agb show "False" by simp
  1779   hence "a \<le> floor b" by simp with agb show "False" by simp
  1780 next
  1780 next
  1781   assume alb: "a \<le> floor b"
  1781   assume alb: "a \<le> floor b"
  1782   hence "real a \<le> real (floor b)" by (simp only: floor_mono2)
  1782   hence "real a \<le> real (floor b)" by (simp only: floor_mono)
  1783   also have "\<dots>\<le> b" by simp  finally show  "real a \<le> b" . 
  1783   also have "\<dots>\<le> b" by simp  finally show  "real a \<le> b" . 
  1784 qed
  1784 qed
  1785 
  1785 
  1786 lemma split_int_le_real': 
  1786 lemma split_int_le_real': 
  1787   "(real (a::int) + b \<le> 0) = (real a - real (floor(-b)) \<le> 0 \<or> (real a - real (floor (-b)) = 0 \<and> real (floor (-b)) + b < 0))"
  1787   "(real (a::int) + b \<le> 0) = (real a - real (floor(-b)) \<le> 0 \<or> (real a - real (floor (-b)) = 0 \<and> real (floor (-b)) + b < 0))"
  2112   and ad: "d\<delta> p d"
  2112   and ad: "d\<delta> p d"
  2113   shows "d\<delta> p d'"
  2113   shows "d\<delta> p d'"
  2114   using lin ad d
  2114   using lin ad d
  2115 proof(induct p rule: iszlfm.induct)
  2115 proof(induct p rule: iszlfm.induct)
  2116   case (9 i c e)  thus ?case using d
  2116   case (9 i c e)  thus ?case using d
  2117     by (simp add: zdvd_trans[where m="i" and n="d" and k="d'"])
  2117     by (simp add: dvd_trans[of "i" "d" "d'"])
  2118 next
  2118 next
  2119   case (10 i c e) thus ?case using d
  2119   case (10 i c e) thus ?case using d
  2120     by (simp add: zdvd_trans[where m="i" and n="d" and k="d'"])
  2120     by (simp add: dvd_trans[of "i" "d" "d'"])
  2121 qed simp_all
  2121 qed simp_all
  2122 
  2122 
  2123 lemma \<delta> : assumes lin:"iszlfm p bs"
  2123 lemma \<delta> : assumes lin:"iszlfm p bs"
  2124   shows "d\<delta> p (\<delta> p) \<and> \<delta> p >0"
  2124   shows "d\<delta> p (\<delta> p) \<and> \<delta> p >0"
  2125 using lin
  2125 using lin
  2494 lemma d\<beta>_mono: 
  2494 lemma d\<beta>_mono: 
  2495   assumes linp: "iszlfm p (a #bs)"
  2495   assumes linp: "iszlfm p (a #bs)"
  2496   and dr: "d\<beta> p l"
  2496   and dr: "d\<beta> p l"
  2497   and d: "l dvd l'"
  2497   and d: "l dvd l'"
  2498   shows "d\<beta> p l'"
  2498   shows "d\<beta> p l'"
  2499 using dr linp zdvd_trans[where n="l" and k="l'", simplified d]
  2499 using dr linp dvd_trans[of _ "l" "l'", simplified d]
  2500 by (induct p rule: iszlfm.induct) simp_all
  2500 by (induct p rule: iszlfm.induct) simp_all
  2501 
  2501 
  2502 lemma \<alpha>_l: assumes lp: "iszlfm p (a#bs)"
  2502 lemma \<alpha>_l: assumes lp: "iszlfm p (a#bs)"
  2503   shows "\<forall> b\<in> set (\<alpha> p). numbound0 b \<and> isint b (a#bs)"
  2503   shows "\<forall> b\<in> set (\<alpha> p). numbound0 b \<and> isint b (a#bs)"
  2504 using lp
  2504 using lp
  2533     from cp have cnz: "c \<noteq> 0" by simp
  2533     from cp have cnz: "c \<noteq> 0" by simp
  2534     have "c div c\<le> l div c"
  2534     have "c div c\<le> l div c"
  2535       by (simp add: zdiv_mono1[OF clel cp])
  2535       by (simp add: zdiv_mono1[OF clel cp])
  2536     then have ldcp:"0 < l div c" 
  2536     then have ldcp:"0 < l div c" 
  2537       by (simp add: zdiv_self[OF cnz])
  2537       by (simp add: zdiv_self[OF cnz])
  2538     have "c * (l div c) = c* (l div c) + l mod c" using d' zdvd_iff_zmod_eq_0[where m="c" and n="l"] by simp
  2538     have "c * (l div c) = c* (l div c) + l mod c" using d' dvd_eq_mod_eq_0[of "c" "l"] by simp
  2539     hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
  2539     hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
  2540       by simp
  2540       by simp
  2541     hence "(real l * real x + real (l div c) * Inum (real x # bs) e < (0\<Colon>real)) =
  2541     hence "(real l * real x + real (l div c) * Inum (real x # bs) e < (0\<Colon>real)) =
  2542           (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e < 0)"
  2542           (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e < 0)"
  2543       by simp
  2543       by simp
  2551     from cp have cnz: "c \<noteq> 0" by simp
  2551     from cp have cnz: "c \<noteq> 0" by simp
  2552     have "c div c\<le> l div c"
  2552     have "c div c\<le> l div c"
  2553       by (simp add: zdiv_mono1[OF clel cp])
  2553       by (simp add: zdiv_mono1[OF clel cp])
  2554     then have ldcp:"0 < l div c" 
  2554     then have ldcp:"0 < l div c" 
  2555       by (simp add: zdiv_self[OF cnz])
  2555       by (simp add: zdiv_self[OF cnz])
  2556     have "c * (l div c) = c* (l div c) + l mod c" using d' zdvd_iff_zmod_eq_0[where m="c" and n="l"] by simp
  2556     have "c * (l div c) = c* (l div c) + l mod c" using d' dvd_eq_mod_eq_0[of "c" "l"] by simp
  2557     hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
  2557     hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
  2558       by simp
  2558       by simp
  2559     hence "(real l * real x + real (l div c) * Inum (real x # bs) e \<le> (0\<Colon>real)) =
  2559     hence "(real l * real x + real (l div c) * Inum (real x # bs) e \<le> (0\<Colon>real)) =
  2560           (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e \<le> 0)"
  2560           (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e \<le> 0)"
  2561       by simp
  2561       by simp
  2569     from cp have cnz: "c \<noteq> 0" by simp
  2569     from cp have cnz: "c \<noteq> 0" by simp
  2570     have "c div c\<le> l div c"
  2570     have "c div c\<le> l div c"
  2571       by (simp add: zdiv_mono1[OF clel cp])
  2571       by (simp add: zdiv_mono1[OF clel cp])
  2572     then have ldcp:"0 < l div c" 
  2572     then have ldcp:"0 < l div c" 
  2573       by (simp add: zdiv_self[OF cnz])
  2573       by (simp add: zdiv_self[OF cnz])
  2574     have "c * (l div c) = c* (l div c) + l mod c" using d' zdvd_iff_zmod_eq_0[where m="c" and n="l"] by simp
  2574     have "c * (l div c) = c* (l div c) + l mod c" using d' dvd_eq_mod_eq_0[of "c" "l"] by simp
  2575     hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
  2575     hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
  2576       by simp
  2576       by simp
  2577     hence "(real l * real x + real (l div c) * Inum (real x # bs) e > (0\<Colon>real)) =
  2577     hence "(real l * real x + real (l div c) * Inum (real x # bs) e > (0\<Colon>real)) =
  2578           (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e > 0)"
  2578           (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e > 0)"
  2579       by simp
  2579       by simp
  2587     from cp have cnz: "c \<noteq> 0" by simp
  2587     from cp have cnz: "c \<noteq> 0" by simp
  2588     have "c div c\<le> l div c"
  2588     have "c div c\<le> l div c"
  2589       by (simp add: zdiv_mono1[OF clel cp])
  2589       by (simp add: zdiv_mono1[OF clel cp])
  2590     then have ldcp:"0 < l div c" 
  2590     then have ldcp:"0 < l div c" 
  2591       by (simp add: zdiv_self[OF cnz])
  2591       by (simp add: zdiv_self[OF cnz])
  2592     have "c * (l div c) = c* (l div c) + l mod c" using d' zdvd_iff_zmod_eq_0[where m="c" and n="l"] by simp
  2592     have "c * (l div c) = c* (l div c) + l mod c" using d' dvd_eq_mod_eq_0[of "c" "l"] by simp
  2593     hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
  2593     hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
  2594       by simp
  2594       by simp
  2595     hence "(real l * real x + real (l div c) * Inum (real x # bs) e \<ge> (0\<Colon>real)) =
  2595     hence "(real l * real x + real (l div c) * Inum (real x # bs) e \<ge> (0\<Colon>real)) =
  2596           (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e \<ge> 0)"
  2596           (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e \<ge> 0)"
  2597       by simp
  2597       by simp
  2605     from cp have cnz: "c \<noteq> 0" by simp
  2605     from cp have cnz: "c \<noteq> 0" by simp
  2606     have "c div c\<le> l div c"
  2606     have "c div c\<le> l div c"
  2607       by (simp add: zdiv_mono1[OF clel cp])
  2607       by (simp add: zdiv_mono1[OF clel cp])
  2608     then have ldcp:"0 < l div c" 
  2608     then have ldcp:"0 < l div c" 
  2609       by (simp add: zdiv_self[OF cnz])
  2609       by (simp add: zdiv_self[OF cnz])
  2610     have "c * (l div c) = c* (l div c) + l mod c" using d' zdvd_iff_zmod_eq_0[where m="c" and n="l"] by simp
  2610     have "c * (l div c) = c* (l div c) + l mod c" using d' dvd_eq_mod_eq_0[of "c" "l"] by simp
  2611     hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
  2611     hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
  2612       by simp
  2612       by simp
  2613     hence "(real l * real x + real (l div c) * Inum (real x # bs) e = (0\<Colon>real)) =
  2613     hence "(real l * real x + real (l div c) * Inum (real x # bs) e = (0\<Colon>real)) =
  2614           (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e = 0)"
  2614           (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e = 0)"
  2615       by simp
  2615       by simp
  2623     from cp have cnz: "c \<noteq> 0" by simp
  2623     from cp have cnz: "c \<noteq> 0" by simp
  2624     have "c div c\<le> l div c"
  2624     have "c div c\<le> l div c"
  2625       by (simp add: zdiv_mono1[OF clel cp])
  2625       by (simp add: zdiv_mono1[OF clel cp])
  2626     then have ldcp:"0 < l div c" 
  2626     then have ldcp:"0 < l div c" 
  2627       by (simp add: zdiv_self[OF cnz])
  2627       by (simp add: zdiv_self[OF cnz])
  2628     have "c * (l div c) = c* (l div c) + l mod c" using d' zdvd_iff_zmod_eq_0[where m="c" and n="l"] by simp
  2628     have "c * (l div c) = c* (l div c) + l mod c" using d' dvd_eq_mod_eq_0[of "c" "l"] by simp
  2629     hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
  2629     hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
  2630       by simp
  2630       by simp
  2631     hence "(real l * real x + real (l div c) * Inum (real x # bs) e \<noteq> (0\<Colon>real)) =
  2631     hence "(real l * real x + real (l div c) * Inum (real x # bs) e \<noteq> (0\<Colon>real)) =
  2632           (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e \<noteq> 0)"
  2632           (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e \<noteq> 0)"
  2633       by simp
  2633       by simp
  2641     from cp have cnz: "c \<noteq> 0" by simp
  2641     from cp have cnz: "c \<noteq> 0" by simp
  2642     have "c div c\<le> l div c"
  2642     have "c div c\<le> l div c"
  2643       by (simp add: zdiv_mono1[OF clel cp])
  2643       by (simp add: zdiv_mono1[OF clel cp])
  2644     then have ldcp:"0 < l div c" 
  2644     then have ldcp:"0 < l div c" 
  2645       by (simp add: zdiv_self[OF cnz])
  2645       by (simp add: zdiv_self[OF cnz])
  2646     have "c * (l div c) = c* (l div c) + l mod c" using d' zdvd_iff_zmod_eq_0[where m="c" and n="l"] by simp
  2646     have "c * (l div c) = c* (l div c) + l mod c" using d' dvd_eq_mod_eq_0[of "c" "l"] by simp
  2647     hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
  2647     hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
  2648       by simp
  2648       by simp
  2649     hence "(\<exists> (k::int). real l * real x + real (l div c) * Inum (real x # bs) e = (real (l div c) * real j) * real k) = (\<exists> (k::int). real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e = (real (l div c) * real j) * real k)"  by simp
  2649     hence "(\<exists> (k::int). real l * real x + real (l div c) * Inum (real x # bs) e = (real (l div c) * real j) * real k) = (\<exists> (k::int). real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e = (real (l div c) * real j) * real k)"  by simp
  2650     also have "\<dots> = (\<exists> (k::int). real (l div c) * (real c * real x + Inum (real x # bs) e - real j * real k) = real (l div c)*0)" by (simp add: algebra_simps)
  2650     also have "\<dots> = (\<exists> (k::int). real (l div c) * (real c * real x + Inum (real x # bs) e - real j * real k) = real (l div c)*0)" by (simp add: algebra_simps)
  2651     also fix k have "\<dots> = (\<exists> (k::int). real c * real x + Inum (real x # bs) e - real j * real k = 0)"
  2651     also fix k have "\<dots> = (\<exists> (k::int). real c * real x + Inum (real x # bs) e - real j * real k = 0)"
  2658     from cp have cnz: "c \<noteq> 0" by simp
  2658     from cp have cnz: "c \<noteq> 0" by simp
  2659     have "c div c\<le> l div c"
  2659     have "c div c\<le> l div c"
  2660       by (simp add: zdiv_mono1[OF clel cp])
  2660       by (simp add: zdiv_mono1[OF clel cp])
  2661     then have ldcp:"0 < l div c" 
  2661     then have ldcp:"0 < l div c" 
  2662       by (simp add: zdiv_self[OF cnz])
  2662       by (simp add: zdiv_self[OF cnz])
  2663     have "c * (l div c) = c* (l div c) + l mod c" using d' zdvd_iff_zmod_eq_0[where m="c" and n="l"] by simp
  2663     have "c * (l div c) = c* (l div c) + l mod c" using d' dvd_eq_mod_eq_0[of "c" "l"] by simp
  2664     hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
  2664     hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
  2665       by simp
  2665       by simp
  2666     hence "(\<exists> (k::int). real l * real x + real (l div c) * Inum (real x # bs) e = (real (l div c) * real j) * real k) = (\<exists> (k::int). real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e = (real (l div c) * real j) * real k)"  by simp
  2666     hence "(\<exists> (k::int). real l * real x + real (l div c) * Inum (real x # bs) e = (real (l div c) * real j) * real k) = (\<exists> (k::int). real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e = (real (l div c) * real j) * real k)"  by simp
  2667     also have "\<dots> = (\<exists> (k::int). real (l div c) * (real c * real x + Inum (real x # bs) e - real j * real k) = real (l div c)*0)" by (simp add: algebra_simps)
  2667     also have "\<dots> = (\<exists> (k::int). real (l div c) * (real c * real x + Inum (real x # bs) e - real j * real k) = real (l div c)*0)" by (simp add: algebra_simps)
  2668     also fix k have "\<dots> = (\<exists> (k::int). real c * real x + Inum (real x # bs) e - real j * real k = 0)"
  2668     also fix k have "\<dots> = (\<exists> (k::int). real c * real x + Inum (real x # bs) e - real j * real k = 0)"
  3695 
  3695 
  3696 lemma real_in_int_intervals: 
  3696 lemma real_in_int_intervals: 
  3697   assumes xb: "real m \<le> x \<and> x < real ((n::int) + 1)"
  3697   assumes xb: "real m \<le> x \<and> x < real ((n::int) + 1)"
  3698   shows "\<exists> j\<in> {m.. n}. real j \<le> x \<and> x < real (j+1)" (is "\<exists> j\<in> ?N. ?P j")
  3698   shows "\<exists> j\<in> {m.. n}. real j \<le> x \<and> x < real (j+1)" (is "\<exists> j\<in> ?N. ?P j")
  3699 by (rule bexI[where P="?P" and x="floor x" and A="?N"]) 
  3699 by (rule bexI[where P="?P" and x="floor x" and A="?N"]) 
  3700 (auto simp add: floor_less_eq[where x="x" and a="n+1", simplified] xb[simplified] floor_mono2[where x="real m" and y="x", OF conjunct1[OF xb], simplified floor_real_of_int[where n="m"]])
  3700 (auto simp add: floor_less_eq[where x="x" and a="n+1", simplified] xb[simplified] floor_mono[where x="real m" and y="x", OF conjunct1[OF xb], simplified floor_real_of_int[where n="m"]])
  3701 
  3701 
  3702 lemma rsplit0_complete:
  3702 lemma rsplit0_complete:
  3703   assumes xp:"0 \<le> x" and x1:"x < 1"
  3703   assumes xp:"0 \<le> x" and x1:"x < 1"
  3704   shows "\<exists> (p,n,s) \<in> set (rsplit0 t). Ifm (x#bs) p" (is "\<exists> (p,n,s) \<in> ?SS t. ?I p")
  3704   shows "\<exists> (p,n,s) \<in> set (rsplit0 t). Ifm (x#bs) p" (is "\<exists> (p,n,s) \<in> ?SS t. ?I p")
  3705 proof(induct t rule: rsplit0.induct)
  3705 proof(induct t rule: rsplit0.induct)
  5924 
  5924 
  5925 lemma "ALL (x::real). \<exists>y \<le> x. (\<lfloor>x\<rfloor> = \<lceil>y\<rceil>)"
  5925 lemma "ALL (x::real). \<exists>y \<le> x. (\<lfloor>x\<rfloor> = \<lceil>y\<rceil>)"
  5926 apply mir
  5926 apply mir
  5927 done
  5927 done
  5928 
  5928 
  5929 lemma "ALL x y. \<lfloor>x\<rfloor> = \<lfloor>y\<rfloor> \<longrightarrow> 0 \<le> abs (y - x) \<and> abs (y - x) \<le> 1"
  5929 lemma "ALL (x::real) (y::real). \<lfloor>x\<rfloor> = \<lfloor>y\<rfloor> \<longrightarrow> 0 \<le> abs (y - x) \<and> abs (y - x) \<le> 1"
  5930 apply mir
  5930 apply mir
  5931 done
  5931 done
  5932 
  5932 
  5933 end
  5933 end