Step
*
1
1
of Lemma
combine-list-as-reduce
1. A : Type
2. f : A ⟶ A ⟶ A
3. Assoc(A;λx,y. f[x;y])
4. Comm(A;λx,y. f[x;y])
5. L : A List
6. 0 < ||L||
7. L' : A List
8. L = (L' @ [last(L)]) ∈ (A List)
9. ∀L:A List. (0 < ||L|| 
⇒ (isl(reduce(λx,y. case y of inl(z) => inl f[x;z] | inr(z) => inl x;inr ⋅ L)) ~ tt))
⊢ combine-list(x,y.f[x;y];L' @ [last(L)])
= outl(reduce(λx,y. case y of inl(z) => inl f[x;z] | inr(z) => inl x;inr ⋅ L' @ [last(L)]))
∈ A
BY
{ ((GenConcl ⌜last(L) = n ∈ A⌝⋅ THENA (Auto THEN DVar `L' THEN All Reduce THEN Auto))
   THEN ThinVar `L'
   THEN RenameVar `L' (-3))⋅ }
1
1. A : Type
2. f : A ⟶ A ⟶ A
3. Assoc(A;λx,y. f[x;y])
4. Comm(A;λx,y. f[x;y])
5. L : A List
6. ∀L:A List. (0 < ||L|| 
⇒ (isl(reduce(λx,y. case y of inl(z) => inl f[x;z] | inr(z) => inl x;inr ⋅ L)) ~ tt))
7. n : A@i
⊢ combine-list(x,y.f[x;y];L @ [n]) = outl(reduce(λx,y. case y of inl(z) => inl f[x;z] | inr(z) => inl x;inr ⋅ L @ [n]))\000C ∈ A
Latex:
Latex:
1.  A  :  Type
2.  f  :  A  {}\mrightarrow{}  A  {}\mrightarrow{}  A
3.  Assoc(A;\mlambda{}x,y.  f[x;y])
4.  Comm(A;\mlambda{}x,y.  f[x;y])
5.  L  :  A  List
6.  0  <  ||L||
7.  L'  :  A  List
8.  L  =  (L'  @  [last(L)])
9.  \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{}  t\000Ct))
\mvdash{}  combine-list(x,y.f[x;y];L'  @  [last(L)])
=  outl(reduce(\mlambda{}x,y.  case  y  of  inl(z)  =>  inl  f[x;z]  |  inr(z)  =>  inl  x;inr  \mcdot{}  ;L'  @  [last(L)]))
By
Latex:
((GenConcl  \mkleeneopen{}last(L)  =  n\mkleeneclose{}\mcdot{}  THENA  (Auto  THEN  DVar  `L'  THEN  All  Reduce  THEN  Auto))
  THEN  ThinVar  `L'
  THEN  RenameVar  `L'  (-3))\mcdot{}
Home
Index