Step
*
of Lemma
length-filter-lsum
No Annotations
∀[T:Type]. ∀[L:T List]. ∀[P:{x:T| (x ∈ L)}  ⟶ 𝔹].  (||filter(P;L)|| = Σ(if P x then 1 else 0 fi  | x ∈ L) ∈ ℤ)
BY
{ (InductionOnList THEN Reduce 0 THEN (ParallelLast ORELSE Auto) THEN AutoSplit) }
Latex:
Latex:
No  Annotations
\mforall{}[T:Type].  \mforall{}[L:T  List].  \mforall{}[P:\{x:T|  (x  \mmember{}  L)\}    {}\mrightarrow{}  \mBbbB{}].
    (||filter(P;L)||  =  \mSigma{}(if  P  x  then  1  else  0  fi    |  x  \mmember{}  L))
By
Latex:
(InductionOnList  THEN  Reduce  0  THEN  (ParallelLast  ORELSE  Auto)  THEN  AutoSplit)
Home
Index