equal
deleted
inserted
replaced
1594 qed |
1594 qed |
1595 |
1595 |
1596 context linordered_semidom |
1596 context linordered_semidom |
1597 begin |
1597 begin |
1598 |
1598 |
1599 lemma prod_nonneg: "(\<forall>a\<in>A. 0 \<le> f a) \<Longrightarrow> 0 \<le> prod f A" |
1599 lemma prod_nonneg: "(\<And>a. a\<in>A \<Longrightarrow> 0 \<le> f a) \<Longrightarrow> 0 \<le> prod f A" |
1600 by (induct A rule: infinite_finite_induct) simp_all |
1600 by (induct A rule: infinite_finite_induct) simp_all |
1601 |
1601 |
1602 lemma prod_pos: "(\<forall>a\<in>A. 0 < f a) \<Longrightarrow> 0 < prod f A" |
1602 lemma prod_pos: "(\<And>a. a\<in>A \<Longrightarrow> 0 < f a) \<Longrightarrow> 0 < prod f A" |
1603 by (induct A rule: infinite_finite_induct) simp_all |
1603 by (induct A rule: infinite_finite_induct) simp_all |
1604 |
1604 |
1605 lemma prod_mono: |
1605 lemma prod_mono: |
1606 "(\<And>i. i \<in> A \<Longrightarrow> 0 \<le> f i \<and> f i \<le> g i) \<Longrightarrow> prod f A \<le> prod g A" |
1606 "(\<And>i. i \<in> A \<Longrightarrow> 0 \<le> f i \<and> f i \<le> g i) \<Longrightarrow> prod f A \<le> prod g A" |
1607 by (induct A rule: infinite_finite_induct) (force intro!: prod_nonneg mult_mono)+ |
1607 by (induct A rule: infinite_finite_induct) (force intro!: prod_nonneg mult_mono)+ |
1736 using assms |
1736 using assms |
1737 proof induction |
1737 proof induction |
1738 case empty |
1738 case empty |
1739 then show ?case by auto |
1739 then show ?case by auto |
1740 next |
1740 next |
1741 case (insert x F) |
1741 case (insert i I) |
1742 from insertI1 have "0 \<le> g (f x)" by (rule insert) |
1742 hence *: "sum g (f ` I) \<le> g (f i) + sum g (f ` I)" |
1743 hence 1: "sum g (f ` F) \<le> g (f x) + sum g (f ` F)" using add_increasing by blast |
1743 "sum g (f ` I) \<le> sum (g \<circ> f) I" using add_increasing by blast+ |
1744 have 2: "sum g (f ` F) \<le> sum (g \<circ> f) F" using insert by blast |
1744 have "sum g (f ` insert i I) = sum g (insert (f i) (f ` I))" by simp |
1745 have "sum g (f ` insert x F) = sum g (insert (f x) (f ` F))" by simp |
1745 also have "\<dots> \<le> g (f i) + sum g (f ` I)" by (simp add: * insert sum.insert_if) |
1746 also have "\<dots> \<le> g (f x) + sum g (f ` F)" by (simp add: 1 insert sum.insert_if) |
1746 also from * have "\<dots> \<le> g (f i) + sum (g \<circ> f) I" by (intro add_left_mono) |
1747 also from 2 have "\<dots> \<le> g (f x) + sum (g \<circ> f) F" by (rule add_left_mono) |
1747 also from insert have "\<dots> = sum (g \<circ> f) (insert i I)" by (simp add: sum.insert_if) |
1748 also from insert(1, 2) have "\<dots> = sum (g \<circ> f) (insert x F)" by (simp add: sum.insert_if) |
|
1749 finally show ?case . |
1748 finally show ?case . |
1750 qed |
1749 qed |
1751 |
1750 |
1752 end |
1751 end |