equal
deleted
inserted
replaced
1183 begin |
1183 begin |
1184 |
1184 |
1185 lemma raw_has_prod_Suc_iff: "raw_has_prod f M (a * f M) \<longleftrightarrow> raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> 0" |
1185 lemma raw_has_prod_Suc_iff: "raw_has_prod f M (a * f M) \<longleftrightarrow> raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> 0" |
1186 proof - |
1186 proof - |
1187 have "raw_has_prod f M (a * f M) \<longleftrightarrow> (\<lambda>i. \<Prod>j\<le>Suc i. f (j+M)) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> 0" |
1187 have "raw_has_prod f M (a * f M) \<longleftrightarrow> (\<lambda>i. \<Prod>j\<le>Suc i. f (j+M)) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> 0" |
1188 by (subst LIMSEQ_Suc_iff) (simp add: raw_has_prod_def) |
1188 by (subst filterlim_sequentially_Suc) (simp add: raw_has_prod_def) |
1189 also have "\<dots> \<longleftrightarrow> (\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> 0" |
1189 also have "\<dots> \<longleftrightarrow> (\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> 0" |
1190 by (simp add: ac_simps atMost_Suc_eq_insert_0 image_Suc_atMost prod.atLeast1_atMost_eq lessThan_Suc_atMost |
1190 by (simp add: ac_simps atMost_Suc_eq_insert_0 image_Suc_atMost prod.atLeast1_atMost_eq lessThan_Suc_atMost |
1191 del: prod.cl_ivl_Suc) |
1191 del: prod.cl_ivl_Suc) |
1192 also have "\<dots> \<longleftrightarrow> raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> 0" |
1192 also have "\<dots> \<longleftrightarrow> raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> 0" |
1193 proof safe |
1193 proof safe |
1236 unfolding convergent_prod_altdef by auto |
1236 unfolding convergent_prod_altdef by auto |
1237 have "(\<lambda>n. \<Prod>i\<le>n. f (Suc (i + M))) \<longlonglongrightarrow> L / f M" |
1237 have "(\<lambda>n. \<Prod>i\<le>n. f (Suc (i + M))) \<longlonglongrightarrow> L / f M" |
1238 proof - |
1238 proof - |
1239 have "(\<lambda>n. \<Prod>i\<in>{0..Suc n}. f (i + M)) \<longlonglongrightarrow> L" |
1239 have "(\<lambda>n. \<Prod>i\<in>{0..Suc n}. f (i + M)) \<longlonglongrightarrow> L" |
1240 using M_L |
1240 using M_L |
1241 apply (subst (asm) LIMSEQ_Suc_iff[symmetric]) |
1241 apply (subst (asm) filterlim_sequentially_Suc[symmetric]) |
1242 using atLeast0AtMost by auto |
1242 using atLeast0AtMost by auto |
1243 then have "(\<lambda>n. f M * (\<Prod>i\<in>{0..n}. f (Suc (i + M)))) \<longlonglongrightarrow> L" |
1243 then have "(\<lambda>n. f M * (\<Prod>i\<in>{0..n}. f (Suc (i + M)))) \<longlonglongrightarrow> L" |
1244 apply (subst (asm) prod.atLeast0_atMost_Suc_shift) |
1244 apply (subst (asm) prod.atLeast0_atMost_Suc_shift) |
1245 by simp |
1245 by simp |
1246 then have "(\<lambda>n. (\<Prod>i\<in>{0..n}. f (Suc (i + M)))) \<longlonglongrightarrow> L/f M" |
1246 then have "(\<lambda>n. (\<Prod>i\<in>{0..n}. f (Suc (i + M)))) \<longlonglongrightarrow> L/f M" |