Step
*
1
of Lemma
bag-val-append
1. T : Type
2. + : T ⟶ T ⟶ T
3. zero : T
4. Comm(T;+)
5. Assoc(T;+)
6. Ident(T;+;zero)
7. bs : bag(T)
8. as : T List
⊢ accumulate (with value v and list item x):
   v + x
  over list:
    bs
  with starting value:
   accumulate (with value v and list item x):
    v + x
   over list:
     as
   with starting value:
    zero))
= (accumulate (with value v and list item x):
    v + x
   over list:
     as
   with starting value:
    zero) 
   + 
   accumulate (with value v and list item x):
    v + x
   over list:
     bs
   with starting value:
    zero))
∈ T
BY
{ ((GenConcl ⌜accumulate (with value v and list item x): v + xover list:  aswith starting value: zero) = x ∈ T⌝⋅
    THENA Auto
    )
   THEN Thin (-1)
   ) }
1
1. T : Type
2. + : T ⟶ T ⟶ T
3. zero : T
4. Comm(T;+)
5. Assoc(T;+)
6. Ident(T;+;zero)
7. bs : bag(T)
8. as : T List
9. x : T
⊢ accumulate (with value v and list item x):
   v + x
  over list:
    bs
  with starting value:
   x)
= (x + accumulate (with value v and list item x): v + xover list:  bswith starting value: zero))
∈ T
Latex:
Latex:
1.  T  :  Type
2.  +  :  T  {}\mrightarrow{}  T  {}\mrightarrow{}  T
3.  zero  :  T
4.  Comm(T;+)
5.  Assoc(T;+)
6.  Ident(T;+;zero)
7.  bs  :  bag(T)
8.  as  :  T  List
\mvdash{}  accumulate  (with  value  v  and  list  item  x):
      v  +  x
    over  list:
        bs
    with  starting  value:
      accumulate  (with  value  v  and  list  item  x):
        v  +  x
      over  list:
          as
      with  starting  value:
        zero))
=  (accumulate  (with  value  v  and  list  item  x):
        v  +  x
      over  list:
          as
      with  starting  value:
        zero) 
      + 
      accumulate  (with  value  v  and  list  item  x):
        v  +  x
      over  list:
          bs
      with  starting  value:
        zero))
By
Latex:
((GenConcl  \mkleeneopen{}accumulate  (with  value  v  and  list  item  x):
                          v  +  x
                        over  list:
                            as
                        with  starting  value:
                          zero)
                        =  x\mkleeneclose{}\mcdot{}
    THENA  Auto
    )
  THEN  Thin  (-1)
  )
Home
Index