src/HOL/SetInterval.thy
 author nipkow Wed May 06 19:15:40 2009 +0200 (2009-05-06) changeset 31044 6896c2498ac0 parent 31017 2c227493ea56 child 31438 a1c4c1500abe permissions -rw-r--r--
new lemmas
 nipkow@8924  1 (* Title: HOL/SetInterval.thy  ballarin@13735  2  Author: Tobias Nipkow and Clemens Ballarin  paulson@14485  3  Additions by Jeremy Avigad in March 2004  paulson@8957  4  Copyright 2000 TU Muenchen  nipkow@8924  5 ballarin@13735  6 lessThan, greaterThan, atLeast, atMost and two-sided intervals  nipkow@8924  7 *)  nipkow@8924  8 wenzelm@14577  9 header {* Set intervals *}  wenzelm@14577  10 nipkow@15131  11 theory SetInterval  haftmann@25919  12 imports Int  nipkow@15131  13 begin  nipkow@8924  14 nipkow@24691  15 context ord  nipkow@24691  16 begin  nipkow@24691  17 definition  haftmann@25062  18  lessThan :: "'a => 'a set" ("(1{..<_})") where  haftmann@25062  19  "{.. 'a set" ("(1{.._})") where  haftmann@25062  23  "{..u} == {x. x \ u}"  nipkow@24691  24 nipkow@24691  25 definition  haftmann@25062  26  greaterThan :: "'a => 'a set" ("(1{_<..})") where  haftmann@25062  27  "{l<..} == {x. l 'a set" ("(1{_..})") where  haftmann@25062  31  "{l..} == {x. l\x}"  nipkow@24691  32 nipkow@24691  33 definition  haftmann@25062  34  greaterThanLessThan :: "'a => 'a => 'a set" ("(1{_<..<_})") where  haftmann@25062  35  "{l<.. 'a => 'a set" ("(1{_..<_})") where  haftmann@25062  39  "{l.. 'a => 'a set" ("(1{_<.._})") where  haftmann@25062  43  "{l<..u} == {l<..} Int {..u}"  nipkow@24691  44 nipkow@24691  45 definition  haftmann@25062  46  atLeastAtMost :: "'a => 'a => 'a set" ("(1{_.._})") where  haftmann@25062  47  "{l..u} == {l..} Int {..u}"  nipkow@24691  48 nipkow@24691  49 end  nipkow@8924  50 ballarin@13735  51 nipkow@15048  52 text{* A note of warning when using @{term"{.. 'a => 'b set => 'b set" ("(3UN _<=_./ _)" 10)  nipkow@30384  58  "@UNION_less" :: "'a => 'a => 'b set => 'b set" ("(3UN _<_./ _)" 10)  nipkow@30384  59  "@INTER_le" :: "'a => 'a => 'b set => 'b set" ("(3INT _<=_./ _)" 10)  nipkow@30384  60  "@INTER_less" :: "'a => 'a => 'b set => 'b set" ("(3INT _<_./ _)" 10)  kleing@14418  61 nipkow@30372  62 syntax (xsymbols)  nipkow@30384  63  "@UNION_le" :: "'a => 'a => 'b set => 'b set" ("(3\ _\_./ _)" 10)  nipkow@30384  64  "@UNION_less" :: "'a => 'a => 'b set => 'b set" ("(3\ _<_./ _)" 10)  nipkow@30384  65  "@INTER_le" :: "'a => 'a => 'b set => 'b set" ("(3\ _\_./ _)" 10)  nipkow@30384  66  "@INTER_less" :: "'a => 'a => 'b set => 'b set" ("(3\ _<_./ _)" 10)  kleing@14418  67 nipkow@30372  68 syntax (latex output)  nipkow@30384  69  "@UNION_le" :: "'a \ 'a => 'b set => 'b set" ("(3\(00_ \ _)/ _)" 10)  nipkow@30384  70  "@UNION_less" :: "'a \ 'a => 'b set => 'b set" ("(3\(00_ < _)/ _)" 10)  nipkow@30384  71  "@INTER_le" :: "'a \ 'a => 'b set => 'b set" ("(3\(00_ \ _)/ _)" 10)  nipkow@30384  72  "@INTER_less" :: "'a \ 'a => 'b set => 'b set" ("(3\(00_ < _)/ _)" 10)  kleing@14418  73 kleing@14418  74 translations  kleing@14418  75  "UN i<=n. A" == "UN i:{..n}. A"  nipkow@15045  76  "UN i atLeast y) = (y \ (x::'a::order))"  paulson@15418  124 by (blast intro: order_trans)  paulson@13850  125 paulson@13850  126 lemma atLeast_eq_iff [iff]:  paulson@15418  127  "(atLeast x = atLeast y) = (x = (y::'a::linorder))"  paulson@13850  128 by (blast intro: order_antisym order_trans)  paulson@13850  129 paulson@13850  130 lemma greaterThan_subset_iff [iff]:  paulson@15418  131  "(greaterThan x \ greaterThan y) = (y \ (x::'a::linorder))"  paulson@15418  132 apply (auto simp add: greaterThan_def)  paulson@15418  133  apply (subst linorder_not_less [symmetric], blast)  paulson@13850  134 done  paulson@13850  135 paulson@13850  136 lemma greaterThan_eq_iff [iff]:  paulson@15418  137  "(greaterThan x = greaterThan y) = (x = (y::'a::linorder))"  paulson@15418  138 apply (rule iffI)  paulson@15418  139  apply (erule equalityE)  haftmann@29709  140  apply simp_all  paulson@13850  141 done  paulson@13850  142 paulson@15418  143 lemma atMost_subset_iff [iff]: "(atMost x \ atMost y) = (x \ (y::'a::order))"  paulson@13850  144 by (blast intro: order_trans)  paulson@13850  145 paulson@15418  146 lemma atMost_eq_iff [iff]: "(atMost x = atMost y) = (x = (y::'a::linorder))"  paulson@13850  147 by (blast intro: order_antisym order_trans)  paulson@13850  148 paulson@13850  149 lemma lessThan_subset_iff [iff]:  paulson@15418  150  "(lessThan x \ lessThan y) = (x \ (y::'a::linorder))"  paulson@15418  151 apply (auto simp add: lessThan_def)  paulson@15418  152  apply (subst linorder_not_less [symmetric], blast)  paulson@13850  153 done  paulson@13850  154 paulson@13850  155 lemma lessThan_eq_iff [iff]:  paulson@15418  156  "(lessThan x = lessThan y) = (x = (y::'a::linorder))"  paulson@15418  157 apply (rule iffI)  paulson@15418  158  apply (erule equalityE)  haftmann@29709  159  apply simp_all  ballarin@13735  160 done  ballarin@13735  161 ballarin@13735  162 paulson@13850  163 subsection {*Two-sided intervals*}  ballarin@13735  164 nipkow@24691  165 context ord  nipkow@24691  166 begin  nipkow@24691  167 paulson@24286  168 lemma greaterThanLessThan_iff [simp,noatp]:  haftmann@25062  169  "(i : {l<.. {m..n} = {}";  nipkow@24691  195 by (auto simp add: atLeastAtMost_def atMost_def atLeast_def)  nipkow@24691  196 haftmann@25062  197 lemma atLeastLessThan_empty[simp]: "n \ m ==> {m.. k ==> {k<..l} = {}"  nipkow@17719  201 by(auto simp:greaterThanAtMost_def greaterThan_def atMost_def)  nipkow@17719  202 haftmann@29709  203 lemma greaterThanLessThan_empty[simp]:"l \ k ==> {k<.. n then insert n {m.. Suc n \ {m..Suc n} = insert (Suc n) {m..n}"  nipkow@15554  321 by (auto simp add: atLeastAtMost_def)  nipkow@15554  322 nipkow@16733  323 subsubsection {* Image *}  nipkow@16733  324 nipkow@16733  325 lemma image_add_atLeastAtMost:  nipkow@16733  326  "(%n::nat. n+k)  {i..j} = {i+k..j+k}" (is "?A = ?B")  nipkow@16733  327 proof  nipkow@16733  328  show "?A \ ?B" by auto  nipkow@16733  329 next  nipkow@16733  330  show "?B \ ?A"  nipkow@16733  331  proof  nipkow@16733  332  fix n assume a: "n : ?B"  webertj@20217  333  hence "n - k : {i..j}" by auto  nipkow@16733  334  moreover have "n = (n - k) + k" using a by auto  nipkow@16733  335  ultimately show "n : ?A" by blast  nipkow@16733  336  qed  nipkow@16733  337 qed  nipkow@16733  338 nipkow@16733  339 lemma image_add_atLeastLessThan:  nipkow@16733  340  "(%n::nat. n+k)  {i.. ?B" by auto  nipkow@16733  343 next  nipkow@16733  344  show "?B \ ?A"  nipkow@16733  345  proof  nipkow@16733  346  fix n assume a: "n : ?B"  webertj@20217  347  hence "n - k : {i.. finite N"  nipkow@28068  396 apply (rule finite_subset)  nipkow@28068  397  apply (rule_tac [2] finite_lessThan, auto)  nipkow@28068  398 done  nipkow@28068  399 nipkow@31044  400 text {* A set of natural numbers is finite iff it is bounded. *}  nipkow@31044  401 lemma finite_nat_set_iff_bounded:  nipkow@31044  402  "finite(N::nat set) = (EX m. ALL n:N. nnat. (!!n. n \ f n) ==> finite {n. f n \ u}"  nipkow@28068  418 by (rule_tac B="{..u}" in finite_subset, auto intro: order_trans)  paulson@14485  419 nipkow@24853  420 text{* Any subset of an interval of natural numbers the size of the  nipkow@24853  421 subset is exactly that interval. *}  nipkow@24853  422 nipkow@24853  423 lemma subset_card_intvl_is_intvl:  nipkow@24853  424  "A <= {k.. A = {k.. \h. bij_betw h {0.. \h. bij_betw h M {0.. u ==>  nipkow@15045  498  {(0::int).. u")  paulson@14485  507  apply (subst image_atLeastZeroLessThan_int, assumption)  paulson@14485  508  apply (rule finite_imageI)  paulson@14485  509  apply auto  paulson@14485  510  done  paulson@14485  511 nipkow@15045  512 lemma finite_atLeastLessThan_int [iff]: "finite {l.. u")  paulson@14485  534  apply (subst image_atLeastZeroLessThan_int, assumption)  paulson@14485  535  apply (subst card_image)  paulson@14485  536  apply (auto simp add: inj_on_def)  paulson@14485  537  done  paulson@14485  538 nipkow@15045  539 lemma card_atLeastLessThan_int [simp]: "card {l.. k < (i::nat)}"  bulwahn@27656  561 proof -  bulwahn@27656  562  have "{k. P k \ k < i} \ {.. M"  bulwahn@27656  568 shows "card {k \ M. k < Suc i} \ 0"  bulwahn@27656  569 proof -  bulwahn@27656  570  from zero_in_M have "{k \ M. k < Suc i} \ {}" by auto  bulwahn@27656  571  with finite_M_bounded_by_nat show ?thesis by (auto simp add: card_eq_0_iff)  bulwahn@27656  572 qed  bulwahn@27656  573 bulwahn@27656  574 lemma card_less_Suc2: "0 \ M \ card {k. Suc k \ M \ k < i} = card {k \ M. k < Suc i}"  huffman@30079  575 apply (rule card_bij_eq [of "Suc" _ _ "\x. x - Suc 0"])  bulwahn@27656  576 apply simp  bulwahn@27656  577 apply fastsimp  bulwahn@27656  578 apply auto  bulwahn@27656  579 apply (rule inj_on_diff_nat)  bulwahn@27656  580 apply auto  bulwahn@27656  581 apply (case_tac x)  bulwahn@27656  582 apply auto  bulwahn@27656  583 apply (case_tac xa)  bulwahn@27656  584 apply auto  bulwahn@27656  585 apply (case_tac xa)  bulwahn@27656  586 apply auto  bulwahn@27656  587 done  bulwahn@27656  588 bulwahn@27656  589 lemma card_less_Suc:  bulwahn@27656  590  assumes zero_in_M: "0 \ M"  bulwahn@27656  591  shows "Suc (card {k. Suc k \ M \ k < i}) = card {k \ M. k < Suc i}"  bulwahn@27656  592 proof -  bulwahn@27656  593  from assms have a: "0 \ {k \ M. k < Suc i}" by simp  bulwahn@27656  594  hence c: "{k \ M. k < Suc i} = insert 0 ({k \ M. k < Suc i} - {0})"  bulwahn@27656  595  by (auto simp only: insert_Diff)  bulwahn@27656  596  have b: "{k \ M. k < Suc i} - {0} = {k \ M - {0}. k < Suc i}" by auto  bulwahn@27656  597  from finite_M_bounded_by_nat[of "\x. x \ M" "Suc i"] have "Suc (card {k. Suc k \ M \ k < i}) = card (insert 0 ({k \ M. k < Suc i} - {0}))"  bulwahn@27656  598  apply (subst card_insert)  bulwahn@27656  599  apply simp_all  bulwahn@27656  600  apply (subst b)  bulwahn@27656  601  apply (subst card_less_Suc2[symmetric])  bulwahn@27656  602  apply simp_all  bulwahn@27656  603  done  bulwahn@27656  604  with c show ?thesis by simp  bulwahn@27656  605 qed  bulwahn@27656  606 paulson@14485  607 paulson@13850  608 subsection {*Lemmas useful with the summation operator setsum*}  paulson@13850  609 ballarin@16102  610 text {* For examples, see Algebra/poly/UnivPoly2.thy *}  ballarin@13735  611 wenzelm@14577  612 subsubsection {* Disjoint Unions *}  ballarin@13735  613 wenzelm@14577  614 text {* Singletons and open intervals *}  ballarin@13735  615 ballarin@13735  616 lemma ivl_disj_un_singleton:  nipkow@15045  617  "{l::'a::linorder} Un {l<..} = {l..}"  nipkow@15045  618  "{.. {l} Un {l<.. {l<.. {l} Un {l<..u} = {l..u}"  nipkow@15045  622  "(l::'a::linorder) <= u ==> {l.. {..l} Un {l<.. {.. {..l} Un {l<..u} = {..u}"  nipkow@15045  631  "(l::'a::linorder) <= u ==> {.. {l<..u} Un {u<..} = {l<..}"  nipkow@15045  633  "(l::'a::linorder) < u ==> {l<.. {l..u} Un {u<..} = {l..}"  nipkow@15045  635  "(l::'a::linorder) <= u ==> {l.. {l<.. {l<..m} Un {m<.. {l.. {l..m} Un {m<.. {l<.. {l<..m} Un {m<..u} = {l<..u}"  nipkow@15045  647  "[| (l::'a::linorder) <= m; m <= u |] ==> {l.. {l..m} Un {m<..u} = {l..u}"  ballarin@14398  649 by auto  ballarin@13735  650 ballarin@13735  651 lemmas ivl_disj_un = ivl_disj_un_singleton ivl_disj_un_one ivl_disj_un_two  ballarin@13735  652 wenzelm@14577  653 subsubsection {* Disjoint Intersections *}  ballarin@13735  654 wenzelm@14577  655 text {* Singletons and open intervals *}  ballarin@13735  656 ballarin@13735  657 lemma ivl_disj_int_singleton:  nipkow@15045  658  "{l::'a::order} Int {l<..} = {}"  nipkow@15045  659  "{.. n \ {i.. {m.. i | m \ i & j \ (n::'a::linorder))"  nipkow@15542  705 apply(auto simp:linorder_not_le)  nipkow@15542  706 apply(rule ccontr)  nipkow@15542  707 apply(insert linorder_le_less_linear[of i n])  nipkow@15542  708 apply(clarsimp simp:linorder_not_le)  nipkow@15542  709 apply(fastsimp)  nipkow@15542  710 done  nipkow@15542  711 nipkow@15041  712 nipkow@15042  713 subsection {* Summation indexed over intervals *}  nipkow@15042  714 nipkow@15042  715 syntax  nipkow@15042  716  "_from_to_setsum" :: "idt \ 'a \ 'a \ 'b \ 'b" ("(SUM _ = _.._./ _)" [0,0,0,10] 10)  nipkow@15048  717  "_from_upto_setsum" :: "idt \ 'a \ 'a \ 'b \ 'b" ("(SUM _ = _..<_./ _)" [0,0,0,10] 10)  nipkow@16052  718  "_upt_setsum" :: "idt \ 'a \ 'b \ 'b" ("(SUM _<_./ _)" [0,0,10] 10)  nipkow@16052  719  "_upto_setsum" :: "idt \ 'a \ 'b \ 'b" ("(SUM _<=_./ _)" [0,0,10] 10)  nipkow@15042  720 syntax (xsymbols)  nipkow@15042  721  "_from_to_setsum" :: "idt \ 'a \ 'a \ 'b \ 'b" ("(3\_ = _.._./ _)" [0,0,0,10] 10)  nipkow@15048  722  "_from_upto_setsum" :: "idt \ 'a \ 'a \ 'b \ 'b" ("(3\_ = _..<_./ _)" [0,0,0,10] 10)  nipkow@16052  723  "_upt_setsum" :: "idt \ 'a \ 'b \ 'b" ("(3\_<_./ _)" [0,0,10] 10)  nipkow@16052  724  "_upto_setsum" :: "idt \ 'a \ 'b \ 'b" ("(3\_\_./ _)" [0,0,10] 10)  nipkow@15042  725 syntax (HTML output)  nipkow@15042  726  "_from_to_setsum" :: "idt \ 'a \ 'a \ 'b \ 'b" ("(3\_ = _.._./ _)" [0,0,0,10] 10)  nipkow@15048  727  "_from_upto_setsum" :: "idt \ 'a \ 'a \ 'b \ 'b" ("(3\_ = _..<_./ _)" [0,0,0,10] 10)  nipkow@16052  728  "_upt_setsum" :: "idt \ 'a \ 'b \ 'b" ("(3\_<_./ _)" [0,0,10] 10)  nipkow@16052  729  "_upto_setsum" :: "idt \ 'a \ 'b \ 'b" ("(3\_\_./ _)" [0,0,10] 10)  nipkow@15056  730 syntax (latex_sum output)  nipkow@15052  731  "_from_to_setsum" :: "idt \ 'a \ 'a \ 'b \ 'b"  nipkow@15052  732  ("(3\<^raw:$\sum_{>_ = _\<^raw:}^{>_\<^raw:}$> _)" [0,0,0,10] 10)  nipkow@15052  733  "_from_upto_setsum" :: "idt \ 'a \ 'a \ 'b \ 'b"  nipkow@15052  734  ("(3\<^raw:$\sum_{>_ = _\<^raw:}^{<>_\<^raw:}$> _)" [0,0,0,10] 10)  nipkow@16052  735  "_upt_setsum" :: "idt \ 'a \ 'b \ 'b"  nipkow@16052  736  ("(3\<^raw:$\sum_{>_ < _\<^raw:}$> _)" [0,0,10] 10)  nipkow@15052  737  "_upto_setsum" :: "idt \ 'a \ 'b \ 'b"  nipkow@16052  738  ("(3\<^raw:$\sum_{>_ \ _\<^raw:}$> _)" [0,0,10] 10)  nipkow@15041  739 nipkow@15048  740 translations  nipkow@28853  741  "\x=a..b. t" == "CONST setsum (%x. t) {a..b}"  nipkow@28853  742  "\x=a..i\n. t" == "CONST setsum (\i. t) {..n}"  nipkow@28853  744  "\ii. t) {..x\{a..b}. e"} & @{term"\x=a..b. e"} & @{term[mode=latex_sum]"\x=a..b. e"}\\  nipkow@15056  752 @{term[source]"\x\{a..x=a..x=a..x\{..b}. e"} & @{term"\x\b. e"} & @{term[mode=latex_sum]"\x\b. e"}\\  nipkow@15056  754 @{term[source]"\x\{..xxx::nat=0..xa = c; b = d; !!x. \ c \ x; x < d \ \ f x = g x \ \  nipkow@15542  777  setsum f {a..i \ Suc n. f i) = (\i \ n. f i) + f(Suc n)"  nipkow@16052  784 by (simp add:atMost_Suc add_ac)  nipkow@16052  785 nipkow@16041  786 lemma setsum_lessThan_Suc[simp]: "(\i < Suc n. f i) = (\i < n. f i) + f n"  nipkow@16041  787 by (simp add:lessThan_Suc add_ac)  nipkow@15041  788 nipkow@15911  789 lemma setsum_cl_ivl_Suc[simp]:  nipkow@15561  790  "setsum f {m..Suc n} = (if Suc n < m then 0 else setsum f {m..n} + f(Suc n))"  nipkow@15561  791 by (auto simp:add_ac atLeastAtMostSuc_conv)  nipkow@15561  792 nipkow@15911  793 lemma setsum_op_ivl_Suc[simp]:  nipkow@15561  794  "setsum f {m..  nipkow@15561  798  (\i=n..m+1. f i) = (\i=n..m. f i) + f(m + 1)"  nipkow@15561  799 by (auto simp:add_ac atLeastAtMostSuc_conv)  nipkow@16041  800 *)  nipkow@28068  801 nipkow@28068  802 lemma setsum_head:  nipkow@28068  803  fixes n :: nat  nipkow@28068  804  assumes mn: "m <= n"  nipkow@28068  805  shows "(\x\{m..n}. P x) = P m + (\x\{m<..n}. P x)" (is "?lhs = ?rhs")  nipkow@28068  806 proof -  nipkow@28068  807  from mn  nipkow@28068  808  have "{m..n} = {m} \ {m<..n}"  nipkow@28068  809  by (auto intro: ivl_disj_un_singleton)  nipkow@28068  810  hence "?lhs = (\x\{m} \ {m<..n}. P x)"  nipkow@28068  811  by (simp add: atLeast0LessThan)  nipkow@28068  812  also have "\ = ?rhs" by simp  nipkow@28068  813  finally show ?thesis .  nipkow@28068  814 qed  nipkow@28068  815 nipkow@28068  816 lemma setsum_head_Suc:  nipkow@28068  817  "m \ n \ setsum f {m..n} = f m + setsum f {Suc m..n}"  nipkow@28068  818 by (simp add: setsum_head atLeastSucAtMost_greaterThanAtMost)  nipkow@28068  819 nipkow@28068  820 lemma setsum_head_upt_Suc:  nipkow@28068  821  "m < n \ setsum f {m.. m \ n; n \ p \ \  nipkow@15539  828  setsum f {m.. 'a::ab_group_add"  nipkow@15539  833 shows "\ m \ n; n \ p \ \  nipkow@15539  834  setsum f {m.. setsum f {Suc 0..k} = setsum f {0..k}"  nipkow@28068  862 by(simp add:setsum_head_Suc)  kleing@19106  863 nipkow@28068  864 lemma setsum_shift_lb_Suc0_0_upt:  nipkow@28068  865  "f(0::nat) = 0 \ setsum f {Suc 0.. (\i=0..i\{1..n}. of_nat i) =  kleing@19469  881  of_nat n*((of_nat n)+1)"  kleing@19469  882 proof (induct n)  kleing@19469  883  case 0  kleing@19469  884  show ?case by simp  kleing@19469  885 next  kleing@19469  886  case (Suc n)  nipkow@29667  887  then show ?case by (simp add: algebra_simps)  kleing@19469  888 qed  kleing@19469  889 kleing@19469  890 theorem arith_series_general:  huffman@23277  891  "((1::'a::comm_semiring_1) + 1) * (\i\{.. 1"  kleing@19469  895  let ?I = "\i. of_nat i" and ?n = "of_nat n"  kleing@19469  896  have  kleing@19469  897  "(\i\{..i\{..i\{.. = ?n*a + (\i\{.. = (?n*a + d*(\i\{1.. = (1+1)*?n*a + d*(1+1)*(\i\{1..i\{1..n - 1}. ?I i) = ((1+1)*?n*a + d*?I (n - 1)*?I n)"  huffman@30079  910  by (simp only: mult_ac gauss_sum [of "n - 1"], unfold One_nat_def)  huffman@23431  911  (simp add: mult_ac trans [OF add_commute of_nat_Suc [symmetric]])  nipkow@29667  912  finally show ?thesis by (simp add: algebra_simps)  kleing@19469  913 next  kleing@19469  914  assume "\(n > 1)"  kleing@19469  915  hence "n = 1 \ n = 0" by auto  nipkow@29667  916  thus ?thesis by (auto simp: algebra_simps)  kleing@19469  917 qed  kleing@19469  918 kleing@19469  919 lemma arith_series_nat:  kleing@19469  920  "Suc (Suc 0) * (\i\{..i\{..i\{..i\{..nat"  kleing@19022  943  shows  kleing@19022  944  "\x. Q x \ P x \  kleing@19022  945  (\xxxxx 'a \ 'a \ 'b \ 'b" ("(PROD _ = _.._./ _)" [0,0,0,10] 10)  paulson@29960  971  "_from_upto_setprod" :: "idt \ 'a \ 'a \ 'b \ 'b" ("(PROD _ = _..<_./ _)" [0,0,0,10] 10)  paulson@29960  972  "_upt_setprod" :: "idt \ 'a \ 'b \ 'b" ("(PROD _<_./ _)" [0,0,10] 10)  paulson@29960  973  "_upto_setprod" :: "idt \ 'a \ 'b \ 'b" ("(PROD _<=_./ _)" [0,0,10] 10)  paulson@29960  974 syntax (xsymbols)  paulson@29960  975  "_from_to_setprod" :: "idt \ 'a \ 'a \ 'b \ 'b" ("(3\_ = _.._./ _)" [0,0,0,10] 10)  paulson@29960  976  "_from_upto_setprod" :: "idt \ 'a \ 'a \ 'b \ 'b" ("(3\_ = _..<_./ _)" [0,0,0,10] 10)  paulson@29960  977  "_upt_setprod" :: "idt \ 'a \ 'b \ 'b" ("(3\_<_./ _)" [0,0,10] 10)  paulson@29960  978  "_upto_setprod" :: "idt \ 'a \ 'b \ 'b" ("(3\_\_./ _)" [0,0,10] 10)  paulson@29960  979 syntax (HTML output)  paulson@29960  980  "_from_to_setprod" :: "idt \ 'a \ 'a \ 'b \ 'b" ("(3\_ = _.._./ _)" [0,0,0,10] 10)  paulson@29960  981  "_from_upto_setprod" :: "idt \ 'a \ 'a \ 'b \ 'b" ("(3\_ = _..<_./ _)" [0,0,0,10] 10)  paulson@29960  982  "_upt_setprod" :: "idt \ 'a \ 'b \ 'b" ("(3\_<_./ _)" [0,0,10] 10)  paulson@29960  983  "_upto_setprod" :: "idt \ 'a \ 'b \ 'b" ("(3\_\_./ _)" [0,0,10] 10)  paulson@29960  984 syntax (latex_prod output)  paulson@29960  985  "_from_to_setprod" :: "idt \ 'a \ 'a \ 'b \ 'b"  paulson@29960  986  ("(3\<^raw:$\prod_{>_ = _\<^raw:}^{>_\<^raw:}$> _)" [0,0,0,10] 10)  paulson@29960  987  "_from_upto_setprod" :: "idt \ 'a \ 'a \ 'b \ 'b"  paulson@29960  988  ("(3\<^raw:$\prod_{>_ = _\<^raw:}^{<>_\<^raw:}$> _)" [0,0,0,10] 10)  paulson@29960  989  "_upt_setprod" :: "idt \ 'a \ 'b \ 'b"  paulson@29960  990  ("(3\<^raw:$\prod_{>_ < _\<^raw:}$> _)" [0,0,10] 10)  paulson@29960  991  "_upto_setprod" :: "idt \ 'a \ 'b \ 'b"  paulson@29960  992  ("(3\<^raw:$\prod_{>_ \ _\<^raw:}$> _)" [0,0,10] 10)  paulson@29960  993 paulson@29960  994 translations  paulson@29960  995  "\x=a..b. t" == "CONST setprod (%x. t) {a..b}"  paulson@29960  996  "\x=a..i\n. t" == "CONST setprod (\i. t) {..n}"  paulson@29960  998 ` "\ii. t) {..