Step * 2 2 1 1 1 1 1 of Lemma do-apply-p-first


1. Type
2. Type
3. A ⟶ (B Top)
4. (A ⟶ (B Top)) List
5. ∀[x:A]. do-apply(p-first(v);x) do-apply(hd(filter(λf.can-apply(f;x);v));x) ∈ supposing ↑can-apply(p-first(v);x)
6. A
7. (↑can-apply(p-first([u]);x)) ∨ (↑can-apply(p-first(v);x))
8. ↑can-apply(p-first([u]);x)
9. x1 B
10. (u x) (inl x1) ∈ (B Top)
11. True
⊢ outl(accumulate (with value and list item f):
        case of inl(z) => inr(z) => x
       over list:
         v
       with starting value:
        inl x1))
x1
∈ B
BY
((Lemmaize [] THEN InductionOnList) THEN Reduce THEN Try (Trivial) THEN Auto) }


Latex:


Latex:

1.  A  :  Type
2.  B  :  Type
3.  u  :  A  {}\mrightarrow{}  (B  +  Top)
4.  v  :  (A  {}\mrightarrow{}  (B  +  Top))  List
5.  \mforall{}[x:A]
          do-apply(p-first(v);x)  =  do-apply(hd(filter(\mlambda{}f.can-apply(f;x);v));x) 
          supposing  \muparrow{}can-apply(p-first(v);x)
6.  x  :  A
7.  (\muparrow{}can-apply(p-first([u]);x))  \mvee{}  (\muparrow{}can-apply(p-first(v);x))
8.  \muparrow{}can-apply(p-first([u]);x)
9.  x1  :  B
10.  (u  x)  =  (inl  x1)
11.  True
\mvdash{}  outl(accumulate  (with  value  v  and  list  item  f):
                case  v  of  inl(z)  =>  v  |  inr(z)  =>  f  x
              over  list:
                  v
              with  starting  value:
                inl  x1))
=  x1


By


Latex:
((Lemmaize  []  THEN  InductionOnList)  THEN  Reduce  0  THEN  Try  (Trivial)  THEN  Auto)




Home Index