Step
*
1
2
of Lemma
bag-summation-linear-right
1. T : Type
2. R : Type
3. add : R ⟶ R ⟶ R
4. mul : R ⟶ R ⟶ R
5. zero : R
6. f : T ⟶ R
7. g : T ⟶ R
8. minus : R ⟶ R
9. IsGroup(R;add;zero;minus)
10. Comm(R;add)
11. BiLinear(R;add;mul)
12. a : R
13. L : T List
14. ∀x,y,z:R.
      ((z = mul[add[x;y];a] ∈ R)
      
⇒ (accumulate (with value c and list item x):
           add mul[add[f[x];g[x]];a] c
          over list:
            L
          with starting value:
           z)
         = mul[add[accumulate (with value c and list item x):
                    add f[x] c
                   over list:
                     L
                   with starting value:
                    x);accumulate (with value c and list item x):
                        add g[x] c
                       over list:
                         L
                       with starting value:
                        y)];a]
         ∈ R))
⊢ accumulate (with value c and list item x):
   add ((f[x] add g[x]) mul a) c
  over list:
    L
  with starting value:
   zero)
= ((accumulate (with value c and list item x):
     add f[x] c
    over list:
      L
    with starting value:
     zero) 
    add 
    accumulate (with value c and list item x):
     add g[x] c
    over list:
      L
    with starting value:
     zero)) 
   mul 
   a)
∈ R
BY
{ (BHyp (-1) THEN Auto) }
1
1. T : Type
2. R : Type
3. add : R ⟶ R ⟶ R
4. mul : R ⟶ R ⟶ R
5. zero : R
6. f : T ⟶ R
7. g : T ⟶ R
8. minus : R ⟶ R
9. IsGroup(R;add;zero;minus)
10. Comm(R;add)
11. BiLinear(R;add;mul)
12. a : R
13. L : T List
14. ∀x,y,z:R.
      ((z = mul[add[x;y];a] ∈ R)
      
⇒ (accumulate (with value c and list item x):
           add mul[add[f[x];g[x]];a] c
          over list:
            L
          with starting value:
           z)
         = mul[add[accumulate (with value c and list item x):
                    add f[x] c
                   over list:
                     L
                   with starting value:
                    x);accumulate (with value c and list item x):
                        add g[x] c
                       over list:
                         L
                       with starting value:
                        y)];a]
         ∈ R))
⊢ zero = mul[add[zero;zero];a] ∈ R
Latex:
Latex:
1.  T  :  Type
2.  R  :  Type
3.  add  :  R  {}\mrightarrow{}  R  {}\mrightarrow{}  R
4.  mul  :  R  {}\mrightarrow{}  R  {}\mrightarrow{}  R
5.  zero  :  R
6.  f  :  T  {}\mrightarrow{}  R
7.  g  :  T  {}\mrightarrow{}  R
8.  minus  :  R  {}\mrightarrow{}  R
9.  IsGroup(R;add;zero;minus)
10.  Comm(R;add)
11.  BiLinear(R;add;mul)
12.  a  :  R
13.  L  :  T  List
14.  \mforall{}x,y,z:R.
            ((z  =  mul[add[x;y];a])
            {}\mRightarrow{}  (accumulate  (with  value  c  and  list  item  x):
                      add  mul[add[f[x];g[x]];a]  c
                    over  list:
                        L
                    with  starting  value:
                      z)
                  =  mul[add[accumulate  (with  value  c  and  list  item  x):
                                        add  f[x]  c
                                      over  list:
                                          L
                                      with  starting  value:
                                        x);accumulate  (with  value  c  and  list  item  x):
                                                add  g[x]  c
                                              over  list:
                                                  L
                                              with  starting  value:
                                                y)];a]))
\mvdash{}  accumulate  (with  value  c  and  list  item  x):
      add  ((f[x]  add  g[x])  mul  a)  c
    over  list:
        L
    with  starting  value:
      zero)
=  ((accumulate  (with  value  c  and  list  item  x):
          add  f[x]  c
        over  list:
            L
        with  starting  value:
          zero) 
        add 
        accumulate  (with  value  c  and  list  item  x):
          add  g[x]  c
        over  list:
            L
        with  starting  value:
          zero)) 
      mul 
      a)
By
Latex:
(BHyp  (-1)  THEN  Auto)
Home
Index