Step * of Lemma combine-list-as-reduce

[A:Type]. ∀[f:A ⟶ A ⟶ A].
  (∀[L:A List]
     combine-list(x,y.f[x;y];L) outl(reduce(λx,y. case of inl(z) => inl f[x;z] inr(z) => inl x;inr ⋅ ;L)) ∈ 
     supposing 0 < ||L||) supposing 
     (Comm(A;λx,y. f[x;y]) and 
     Assoc(A;λx,y. f[x;y]))
BY
(Auto
   THEN (InstLemma `last_lemma` [⌜A⌝;⌜L⌝]⋅ THENA (Auto THEN DVar `L' THEN All Reduce THEN Auto))
   THEN ExRepD
   THEN (Assert ∀L:A List
                  (0 < ||L||  (isl(reduce(λx,y. case of inl(z) => inl f[x;z] inr(z) => inl x;inr ⋅ ;L)) tt)) BY
               (InductionOnList
                THEN Reduce 0
                THEN Auto'
                THEN (GenConclAtAddrType ⌜A?⌝ [2;1;1]⋅ THENA Auto)
                THEN -2
                THEN Reduce 0
                THEN Auto))) }

1
1. Type
2. A ⟶ A ⟶ A
3. Assoc(A;λx,y. f[x;y])
4. Comm(A;λx,y. f[x;y])
5. List
6. 0 < ||L||
7. L' List
8. (L' [last(L)]) ∈ (A List)
9. ∀L:A List. (0 < ||L||  (isl(reduce(λx,y. case of inl(z) => inl f[x;z] inr(z) => inl x;inr ⋅ ;L)) tt))
⊢ combine-list(x,y.f[x;y];L) outl(reduce(λx,y. case of inl(z) => inl f[x;z] inr(z) => inl x;inr ⋅ ;L)) ∈ A


Latex:


Latex:
\mforall{}[A:Type].  \mforall{}[f:A  {}\mrightarrow{}  A  {}\mrightarrow{}  A].
    (\mforall{}[L:A  List]
          combine-list(x,y.f[x;y];L)
          =  outl(reduce(\mlambda{}x,y.  case  y  of  inl(z)  =>  inl  f[x;z]  |  inr(z)  =>  inl  x;inr  \mcdot{}  ;L)) 
          supposing  0  <  ||L||)  supposing 
          (Comm(A;\mlambda{}x,y.  f[x;y])  and 
          Assoc(A;\mlambda{}x,y.  f[x;y]))


By


Latex:
(Auto
  THEN  (InstLemma  `last\_lemma`  [\mkleeneopen{}A\mkleeneclose{};\mkleeneopen{}L\mkleeneclose{}]\mcdot{}  THENA  (Auto  THEN  DVar  `L'  THEN  All  Reduce  THEN  Auto))
  THEN  ExRepD
  THEN  (Assert  \mforall{}L:A  List
                                (0  <  ||L||
                                {}\mRightarrow{}  (isl(reduce(\mlambda{}x,y.  case  y  of  inl(z)  =>  inl  f[x;z]  |  inr(z)  =>  inl  x;inr  \mcdot{}  ;L)) 
                                      \msim{}  tt))  BY
                          (InductionOnList
                            THEN  Reduce  0
                            THEN  Auto'
                            THEN  (GenConclAtAddrType  \mkleeneopen{}A?\mkleeneclose{}  [2;1;1]\mcdot{}  THENA  Auto)
                            THEN  D  -2
                            THEN  Reduce  0
                            THEN  Auto)))




Home Index