equal
deleted
inserted
replaced
591 next |
591 next |
592 case (insert x F) |
592 case (insert x F) |
593 from insert.prems have Fx: "f x \<ge> 0" and Fp: "\<forall> a \<in> F. f a \<ge> 0" by simp_all |
593 from insert.prems have Fx: "f x \<ge> 0" and Fp: "\<forall> a \<in> F. f a \<ge> 0" by simp_all |
594 from insert.hyps Fp setsum_nonneg[OF Fp] |
594 from insert.hyps Fp setsum_nonneg[OF Fp] |
595 have h: "setsum f F = 0 \<longleftrightarrow> (\<forall>a \<in>F. f a = 0)" by metis |
595 have h: "setsum f F = 0 \<longleftrightarrow> (\<forall>a \<in>F. f a = 0)" by metis |
596 from sum_nonneg_eq_zero_iff[OF Fx setsum_nonneg[OF Fp]] insert.hyps(1,2) |
596 from add_nonneg_eq_0_iff[OF Fx setsum_nonneg[OF Fp]] insert.hyps(1,2) |
597 show ?case by (simp add: h) |
597 show ?case by (simp add: h) |
598 qed |
598 qed |
599 |
599 |
600 lemma dot_eq_0: "x \<bullet> x = 0 \<longleftrightarrow> (x::'a::{ordered_ring_strict,ring_no_zero_divisors} ^ 'n::finite) = 0" |
600 lemma dot_eq_0: "x \<bullet> x = 0 \<longleftrightarrow> (x::'a::{ordered_ring_strict,ring_no_zero_divisors} ^ 'n::finite) = 0" |
601 by (simp add: dot_def setsum_squares_eq_0_iff Cart_eq) |
601 by (simp add: dot_def setsum_squares_eq_0_iff Cart_eq) |