3149 apply (auto intro: binomial_symmetric) |
3149 apply (auto intro: binomial_symmetric) |
3150 done |
3150 done |
3151 |
3151 |
3152 lemma Vandermonde_pochhammer_lemma: |
3152 lemma Vandermonde_pochhammer_lemma: |
3153 fixes a :: "'a::field_char_0" |
3153 fixes a :: "'a::field_char_0" |
3154 assumes b: "\<forall> j\<in>{0 ..<n}. b \<noteq> of_nat j" |
3154 assumes b: "\<forall>j\<in>{0 ..<n}. b \<noteq> of_nat j" |
3155 shows "setsum (\<lambda>k. (pochhammer (- a) k * pochhammer (- (of_nat n)) k) / |
3155 shows "setsum (\<lambda>k. (pochhammer (- a) k * pochhammer (- (of_nat n)) k) / |
3156 (of_nat (fact k) * pochhammer (b - of_nat n + 1) k)) {0..n} = |
3156 (of_nat (fact k) * pochhammer (b - of_nat n + 1) k)) {0..n} = |
3157 pochhammer (- (a + b)) n / pochhammer (- b) n" |
3157 pochhammer (- (a + b)) n / pochhammer (- b) n" |
3158 (is "?l = ?r") |
3158 (is "?l = ?r") |
3159 proof - |
3159 proof - |
3179 with b show False using j by auto |
3179 with b show False using j by auto |
3180 qed |
3180 qed |
3181 |
3181 |
3182 from nz kn [simplified] have nz': "pochhammer (1 + b - of_nat n) k \<noteq> 0" |
3182 from nz kn [simplified] have nz': "pochhammer (1 + b - of_nat n) k \<noteq> 0" |
3183 by (rule pochhammer_neq_0_mono) |
3183 by (rule pochhammer_neq_0_mono) |
3184 { |
3184 |
3185 assume k0: "k = 0 \<or> n =0" |
3185 consider "k = 0 \<or> n = 0" | "n \<noteq> 0" "k \<noteq> 0" by blast |
3186 then have "b gchoose (n - k) = |
3186 then have "b gchoose (n - k) = |
3187 (?m1 n * ?p b n * ?m1 k * ?p (of_nat n) k) / (?f n * pochhammer (b - of_nat n + 1) k)" |
3187 (?m1 n * ?p b n * ?m1 k * ?p (of_nat n) k) / (?f n * pochhammer (b - of_nat n + 1) k)" |
3188 using kn |
3188 proof cases |
3189 by (cases "k = 0") (simp_all add: gbinomial_pochhammer) |
3189 case 1 |
3190 } |
3190 then show ?thesis |
3191 moreover |
3191 using kn by (cases "k = 0") (simp_all add: gbinomial_pochhammer) |
3192 { |
3192 next |
3193 assume n0: "n \<noteq> 0" and k0: "k \<noteq> 0" |
3193 case 2 |
3194 then obtain m where m: "n = Suc m" |
3194 then obtain m where m: "n = Suc m" |
3195 by (cases n) auto |
3195 by (cases n) auto |
3196 from k0 obtain h where h: "k = Suc h" |
3196 from \<open>k \<noteq> 0\<close> obtain h where h: "k = Suc h" |
3197 by (cases k) auto |
3197 by (cases k) auto |
3198 have "b gchoose (n - k) = |
3198 show ?thesis |
3199 (?m1 n * ?p b n * ?m1 k * ?p (of_nat n) k) / (?f n * pochhammer (b - of_nat n + 1) k)" |
|
3200 proof (cases "k = n") |
3199 proof (cases "k = n") |
3201 case True |
3200 case True |
3202 then show ?thesis |
3201 then show ?thesis |
3203 using pochhammer_minus'[where k=k and b=b] |
3202 using pochhammer_minus'[where k=k and b=b] |
3204 apply (simp add: pochhammer_same) |
3203 apply (simp add: pochhammer_same) |
3272 also have "\<dots> = b gchoose (n - k)" |
3271 also have "\<dots> = b gchoose (n - k)" |
3273 unfolding th1 th2 |
3272 unfolding th1 th2 |
3274 using kn' by (simp add: gbinomial_def) |
3273 using kn' by (simp add: gbinomial_def) |
3275 finally show ?thesis by simp |
3274 finally show ?thesis by simp |
3276 qed |
3275 qed |
3277 } |
3276 qed |
3278 ultimately have "b gchoose (n - k) = |
3277 then have "b gchoose (n - k) = |
3279 (?m1 n * ?p b n * ?m1 k * ?p (of_nat n) k) / (?f n * pochhammer (b - of_nat n + 1) k)" |
3278 (?m1 n * ?p b n * ?m1 k * ?p (of_nat n) k) / (?f n * pochhammer (b - of_nat n + 1) k)" |
3280 "pochhammer (1 + b - of_nat n) k \<noteq> 0 " |
3279 "pochhammer (1 + b - of_nat n) k \<noteq> 0 " |
3281 apply (cases "n = 0") |
3280 apply (cases "n = 0") |
3282 using nz' |
3281 using nz' |
3283 apply auto |
3282 apply auto |
3284 apply (cases k) |
|
3285 apply auto |
|
3286 done |
3283 done |
3287 } |
3284 } |
3288 note th00 = this |
3285 note th00 = this |
3289 have "?r = ((a + b) gchoose n) * (of_nat (fact n)/ (?m1 n * pochhammer (- b) n))" |
3286 have "?r = ((a + b) gchoose n) * (of_nat (fact n) / (?m1 n * pochhammer (- b) n))" |
3290 unfolding gbinomial_pochhammer |
3287 unfolding gbinomial_pochhammer |
3291 using bn0 by (auto simp add: field_simps) |
3288 using bn0 by (auto simp add: field_simps) |
3292 also have "\<dots> = ?l" |
3289 also have "\<dots> = ?l" |
3293 unfolding gbinomial_Vandermonde[symmetric] |
3290 unfolding gbinomial_Vandermonde[symmetric] |
3294 apply (simp add: th00) |
3291 apply (simp add: th00) |