Step * of Lemma longest-prefix-list_accum

[T,B:Type]. ∀[as:T List]. ∀[P:B ⟶ 𝔹]. ∀[b0:B]. ∀[acc:B ⟶ T ⟶ B]. ∀[a:T].
  (longest-prefix(λL.P[accumulate (with value and list item a):
                        acc[t;a]
                       over list:
                         L
                       with starting value:
                        b0)];[a as]) if null(longest-prefix(λL.P[accumulate (with value and list item a):
                                                                      acc[t;a]
                                                                     over list:
                                                                       L
                                                                     with starting value:
                                                                      acc[b0;a])];as))
  then if bnull(as)) ∧b P[acc[b0;a]] then [a] else [] fi 
  else [a 
        longest-prefix(λL.P[accumulate (with value and list item a):
                             acc[t;a]
                            over list:
                              L
                            with starting value:
                             acc[b0;a])];as)]
  fi )
BY
xxx((UnivCD THENA Auto)
      THEN RW (AddrC [1] RecUnfoldTopAbC) 0
      THEN Reduce 0
      THEN GenConclAtAddr [1;1]
      THEN RepUR ``let`` 0⋅
      THEN RepeatFor (AutoSplit))xxx }


Latex:


Latex:
\mforall{}[T,B:Type].  \mforall{}[as:T  List].  \mforall{}[P:B  {}\mrightarrow{}  \mBbbB{}].  \mforall{}[b0:B].  \mforall{}[acc:B  {}\mrightarrow{}  T  {}\mrightarrow{}  B].  \mforall{}[a:T].
    (longest-prefix(\mlambda{}L.P[accumulate  (with  value  t  and  list  item  a):
                                                acc[t;a]
                                              over  list:
                                                  L
                                              with  starting  value:
                                                b0)];[a  /  as]) 
    \msim{}  if  null(longest-prefix(\mlambda{}L.P[accumulate  (with  value  t  and  list  item  a):
                                                                  acc[t;a]
                                                                over  list:
                                                                    L
                                                                with  starting  value:
                                                                  acc[b0;a])];as))
    then  if  (\mneg{}\msubb{}null(as))  \mwedge{}\msubb{}  P[acc[b0;a]]  then  [a]  else  []  fi 
    else  [a  / 
                longest-prefix(\mlambda{}L.P[accumulate  (with  value  t  and  list  item  a):
                                                          acc[t;a]
                                                        over  list:
                                                            L
                                                        with  starting  value:
                                                          acc[b0;a])];as)]
    fi  )


By


Latex:
xxx((UnivCD  THENA  Auto)
        THEN  RW  (AddrC  [1]  RecUnfoldTopAbC)  0
        THEN  Reduce  0
        THEN  GenConclAtAddr  [1;1]
        THEN  RepUR  ``let``  0\mcdot{}
        THEN  RepeatFor  2  (AutoSplit))xxx




Home Index