Step * 1 1 1 1 1 1 2 1 of Lemma bag-summation-append


1. Type
2. add R ⟶ R ⟶ R
3. zero R
4. Assoc(R;add)
5. Ident(R;add;zero)
6. Comm(R;add)
7. Type
8. T ⟶ R
9. ∀[x,y,z:R].  ((x add (y add z)) ((x add y) add z) ∈ R)
10. v1 R
11. bs List
12. ¬↑null(bs)
13. ||bs|| ≥ 
14. accumulate (with value and list item x):
     add f[x] c
    over list:
      firstn(||bs|| 1;bs)
    with starting value:
     v1)
(v1 
   add 
   accumulate (with value and list item x):
    add f[x] c
   over list:
     firstn(||bs|| 1;bs)
   with starting value:
    zero))
∈ R
⊢ (add f[last(bs)] 
   (v1 
    add 
    accumulate (with value and list item x):
     add f[x] c
    over list:
      firstn(||bs|| 1;bs)
    with starting value:
     zero)))
(v1 
   add 
   (add f[last(bs)] 
    accumulate (with value and list item x):
     add f[x] c
    over list:
      firstn(||bs|| 1;bs)
    with starting value:
     zero)))
∈ R
BY
(GenConclAtAddrType ⌜R⌝ [2;2;3]⋅ THEN Auto) }

1
1. Type
2. add R ⟶ R ⟶ R
3. zero R
4. Assoc(R;add)
5. Ident(R;add;zero)
6. Comm(R;add)
7. Type
8. T ⟶ R
9. ∀[x,y,z:R].  ((x add (y add z)) ((x add y) add z) ∈ R)
10. v1 R
11. bs List
12. ¬↑null(bs)
13. ||bs|| ≥ 
14. accumulate (with value and list item x):
     add f[x] c
    over list:
      firstn(||bs|| 1;bs)
    with starting value:
     v1)
(v1 
   add 
   accumulate (with value and list item x):
    add f[x] c
   over list:
     firstn(||bs|| 1;bs)
   with starting value:
    zero))
∈ R
15. R
16. accumulate (with value and list item x):
     add f[x] c
    over list:
      firstn(||bs|| 1;bs)
    with starting value:
     zero)
v
∈ R
⊢ (add f[last(bs)] (v1 add v)) (v1 add (add f[last(bs)] v)) ∈ R


Latex:


Latex:

1.  R  :  Type
2.  add  :  R  {}\mrightarrow{}  R  {}\mrightarrow{}  R
3.  zero  :  R
4.  Assoc(R;add)
5.  Ident(R;add;zero)
6.  Comm(R;add)
7.  T  :  Type
8.  f  :  T  {}\mrightarrow{}  R
9.  \mforall{}[x,y,z:R].    ((x  add  (y  add  z))  =  ((x  add  y)  add  z))
10.  v1  :  R
11.  bs  :  T  List
12.  \mneg{}\muparrow{}null(bs)
13.  ||bs||  \mgeq{}  1 
14.  accumulate  (with  value  c  and  list  item  x):
          add  f[x]  c
        over  list:
            firstn(||bs||  -  1;bs)
        with  starting  value:
          v1)
=  (v1 
      add 
      accumulate  (with  value  c  and  list  item  x):
        add  f[x]  c
      over  list:
          firstn(||bs||  -  1;bs)
      with  starting  value:
        zero))
\mvdash{}  (add  f[last(bs)] 
      (v1 
        add 
        accumulate  (with  value  c  and  list  item  x):
          add  f[x]  c
        over  list:
            firstn(||bs||  -  1;bs)
        with  starting  value:
          zero)))
=  (v1 
      add 
      (add  f[last(bs)] 
        accumulate  (with  value  c  and  list  item  x):
          add  f[x]  c
        over  list:
            firstn(||bs||  -  1;bs)
        with  starting  value:
          zero)))


By


Latex:
(GenConclAtAddrType  \mkleeneopen{}R\mkleeneclose{}  [2;2;3]\mcdot{}  THEN  Auto)




Home Index