src/HOL/ex/Gauge_Integration.thy
changeset 58247 98d0f85d247f
parent 57512 cc97b347b301
child 58889 5b7a9633cfa8
equal deleted inserted replaced
58245:7e54225acef1 58247:98d0f85d247f
   434       show "fine \<delta>1 (d, b) [(d, t, b)]" using fine_single by auto
   434       show "fine \<delta>1 (d, b) [(d, t, b)]" using fine_single by auto
   435     qed
   435     qed
   436     note rsum1 = I1[OF this]
   436     note rsum1 = I1[OF this]
   437 
   437 
   438     have drop_split: "drop N D = [D ! N] @ drop (Suc N) D"
   438     have drop_split: "drop N D = [D ! N] @ drop (Suc N) D"
   439       using nth_drop'[OF `N < length D`] by simp
   439       using Cons_nth_drop_Suc[OF `N < length D`] by simp
   440 
   440 
   441     have fine2: "fine \<delta>2 (e,c) (drop (Suc N) D)"
   441     have fine2: "fine \<delta>2 (e,c) (drop (Suc N) D)"
   442     proof (cases "drop (Suc N) D = []")
   442     proof (cases "drop (Suc N) D = []")
   443       case True
   443       case True
   444       note * = fine2[simplified drop_split True D_eq append_Nil2]
   444       note * = fine2[simplified drop_split True D_eq append_Nil2]
   470                simp del: append_Cons)
   470                simp del: append_Cons)
   471     qed
   471     qed
   472     note rsum2 = I2[OF this]
   472     note rsum2 = I2[OF this]
   473 
   473 
   474     have "rsum D f = rsum (take N D) f + rsum [D ! N] f + rsum (drop (Suc N) D) f"
   474     have "rsum D f = rsum (take N D) f + rsum [D ! N] f + rsum (drop (Suc N) D) f"
   475       using rsum_append[symmetric] nth_drop'[OF `N < length D`] by auto
   475       using rsum_append[symmetric] Cons_nth_drop_Suc[OF `N < length D`] by auto
   476     also have "\<dots> = rsum D1 f + rsum D2 f"
   476     also have "\<dots> = rsum D1 f + rsum D2 f"
   477       by (cases "b = e", auto simp add: D1_def D2_def D_eq rsum_append algebra_simps)
   477       by (cases "b = e", auto simp add: D1_def D2_def D_eq rsum_append algebra_simps)
   478     finally have "\<bar>rsum D f - (x1 + x2)\<bar> < \<epsilon>"
   478     finally have "\<bar>rsum D f - (x1 + x2)\<bar> < \<epsilon>"
   479       using add_strict_mono[OF rsum1 rsum2] by simp
   479       using add_strict_mono[OF rsum1 rsum2] by simp
   480   }
   480   }