Step * 1 1 1 1 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. as List
12. bs List
13. permutation(T;as;bs)
⊢ accumulate (with value and list item x):
   add f[x] c
  over list:
    as
  with starting value:
   v1)
(v1 add accumulate (with value and list item x): add f[x] cover list:  bswith starting value: zero))
∈ R
BY
(Subst' as bs ∈ bag(T) 0⋅ THENA Try (Complete (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. as List
12. bs List
13. permutation(T;as;bs)
⊢ accumulate (with value and list item x):
   add f[x] c
  over list:
    bs
  with starting value:
   v1)
(v1 add accumulate (with value and list item x): add f[x] cover list:  bswith starting value: zero))
∈ R

2
.....wf..... 
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. as List
12. bs List
13. permutation(T;as;bs)
14. bag(T)
⊢ accumulate (with value and list item x):
   add f[x] c
  over list:
    z
  with starting value:
   v1)
  (v1 add accumulate (with value and list item x): add f[x] cover list:  bswith starting value: zero))
  ∈ 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.  as  :  T  List
12.  bs  :  T  List
13.  permutation(T;as;bs)
\mvdash{}  accumulate  (with  value  c  and  list  item  x):
      add  f[x]  c
    over  list:
        as
    with  starting  value:
      v1)
=  (v1 
      add 
      accumulate  (with  value  c  and  list  item  x):
        add  f[x]  c
      over  list:
          bs
      with  starting  value:
        zero))


By


Latex:
(Subst'  as  =  bs  0\mcdot{}  THENA  Try  (Complete  (Auto)))




Home Index