# HG changeset patch # User haftmann # Date 1523781151 0 # Node ID 9044e1f1d32477a478df0cf7bed7219dacacb25f # Parent b65c4a6a015e902288085ec24c71a73e238ae2c9 more and generalized lemmas diff -r b65c4a6a015e -r 9044e1f1d324 src/HOL/Set_Interval.thy --- a/src/HOL/Set_Interval.thy Sun Apr 15 21:41:40 2018 +0100 +++ b/src/HOL/Set_Interval.thy Sun Apr 15 08:32:31 2018 +0000 @@ -1731,6 +1731,22 @@ "F g {0..Suc n} = g 0 \<^bold>* F (g \ Suc) {0..n}" by (simp add: atLeast0_atMost_Suc_eq_insert_0 atLeast_Suc_atMost_Suc_shift) +lemma atLeast_Suc_lessThan: + "F g {m..* F g {Suc m..* F g {Suc m..n}" if "m \ n" +proof - + from that have "{m..n} = insert m {Suc m..n}" + by auto + then show ?thesis by simp +qed + lemma ivl_cong: "a = c \ b = d \ (\x. c \ x \ x < d \ g x = h x) \ F g {a.. n \ sum f {m..n} = f m + sum f {Suc m..n}" -by (simp add: sum_head atLeastSucAtMost_greaterThanAtMost) + by (fact sum.atLeast_Suc_atMost) lemma sum_head_upt_Suc: "m < n \ sum f {m.. n + 1" shows "sum f {m..n + p} = sum f {m..n} + sum f {n + 1..n + p}" @@ -1929,24 +1943,30 @@ lemma sum_diff_distrib: "\x. Q x \ P x \ (\xxxk = 0..k = 0..k = 0..k = Suc 0..k = Suc 0..k = 0..k = 0..k = Suc 0..k = Suc 0..k = 0..Shifting bounds\