Step
*
of Lemma
hdf-compose2-transformation1
∀[L1,L2,init,S:Base]. ∀[m1,m2:ℕ+].
  (fix((λmk-hdf.(inl (λa.simple-cbva-seq(L1[a];λout.<mk-hdf, out>m1)))))
   o (fix((λmk-hdf,s. (inl (λa.simple-cbva-seq(L2[a];λout.<mk-hdf S[s], out>m2))))) init) 
  ~ fix((λmk-hdf,s. (inl (λa.simple-cbva-seq(λn.if n <z m1 then L1[a] n
                                                if n <z m1 + m2 then mk_lambdas(L2[a] (n - m1);m1)
                                                else mk_lambdas(λfs.mk_lambdas(λbs.∪f∈fs.∪b∈bs.f b;m2 - 1);m1 - 1)
                                                fi λout.<mk-hdf S[s], out>(m1 + m2) + 1))))) 
    init)
BY
{ (Auto
   THEN RepUR ``hdf-compose2 mk-hdf ifthenelse hdf-halted hdf-halt hdf-run hdf-ap bor isr bfalse btrue`` 0
   THEN LiftAll 0
   THEN Reduce 0
   THEN SqequalInduction
   THEN (UnivCD THENA Auto)
   THEN UnrollLoopsOnceExcept [`simple-cbva-seq`;`mk_lambdas`;`bag-combine`;`it`]
   THEN RepeatFor 2 ((RWO "simple-cbva-seq-spread" 0 THENA Auto))
   THEN Reduce 0
   THEN (RWO "simple-cbva-seq-extend-2" 0 THENA Auto)
   THEN (RWO "simple-cbva-seq-combine" 0 THENA Auto)
   THEN Reduce 0
   THEN RepUR ``ifthenelse lt_int btrue eq_int`` 0
   THEN LiftAll 0
   THEN Reduce 0
   THEN Repeat ((SqequalInductionAuxAux false THEN Try (Complete (Auto))))
   THEN (Subst ⌈m1 + m2 + 1 ~ (m1 + m2) + 1⌉ 0⋅ THENA Auto)
   THEN (RWO "simple-cbva-seq-list-case2" 0 THENA Auto)
   THEN BLemma `simple-cbva-seq-sqequal-n`
   THEN Try (Complete (Auto'))
   THEN (Subst ⌈(n - 1 - 1) + 2 ~ n⌉ 0⋅ THENA Auto)
   THEN (Subst ⌈(n - 1 - 1 - (m1 + m2) + 1) + 2 ~ n - (m1 + m2) + 1⌉ 0⋅ THENA Auto)
   THEN (D 0 THENA Auto)
   THEN RepeatFor 2 ((SqequalNCanonicalCD THENA Auto'))
   THEN Try (Complete (Auto))
   THEN All (RepUR ``lt_int btrue bfalse``)
   THEN LiftAll 2
   THEN Reduce 2
   THEN BackThruSomeHyp
   THEN Auto') }
Latex:
\mforall{}[L1,L2,init,S:Base].  \mforall{}[m1,m2:\mBbbN{}\msupplus{}].
    (fix((\mlambda{}mk-hdf.(inl  (\mlambda{}a.simple-cbva-seq(L1[a];\mlambda{}out.<mk-hdf,  out>m1)))))
      o  (fix((\mlambda{}mk-hdf,s.  (inl  (\mlambda{}a.simple-cbva-seq(L2[a];\mlambda{}out.<mk-hdf  S[s],  out>m2)))))  init) 
    \msim{}  fix((\mlambda{}mk-hdf,s.  (inl  (\mlambda{}a.simple-cbva-seq(\mlambda{}n.if  n  <z  m1  then  L1[a]  n
                                                                                                if  n  <z  m1  +  m2  then  mk\_lambdas(L2[a]  (n  -  m1);m1)
                                                                                                else  mk\_lambdas(\mlambda{}fs.mk\_lambdas(\mlambda{}bs.\mcup{}f\mmember{}fs.\mcup{}b\mmember{}bs.f 
                                                                                                                                                                                              b;m2 
                                                                                                                                        -  1);m1  -  1)
                                                                                                fi  ;\mlambda{}out.<mk-hdf  S[s],  out>(m1  +  m2)  +  1))))) 
        init)
By
(Auto
  THEN  ...
  THEN  LiftAll  0
  THEN  Reduce  0
  THEN  SqequalInduction
  THEN  (UnivCD  THENA  Auto)
  THEN  UnrollLoopsOnceExcept  [`simple-cbva-seq`;`mk\_lambdas`;`bag-combine`;`it`]
  THEN  RepeatFor  2  ((RWO  "simple-cbva-seq-spread"  0  THENA  Auto))
  THEN  Reduce  0
  THEN  (RWO  "simple-cbva-seq-extend-2"  0  THENA  Auto)
  THEN  (RWO  "simple-cbva-seq-combine"  0  THENA  Auto)
  THEN  Reduce  0
  THEN  RepUR  ``ifthenelse  lt\_int  btrue  eq\_int``  0
  THEN  LiftAll  0
  THEN  Reduce  0
  THEN  Repeat  ((SqequalInductionAuxAux  false  THEN  Try  (Complete  (Auto))))
  THEN  (Subst  \mkleeneopen{}m1  +  m2  +  1  \msim{}  (m1  +  m2)  +  1\mkleeneclose{}  0\mcdot{}  THENA  Auto)
  THEN  (RWO  "simple-cbva-seq-list-case2"  0  THENA  Auto)
  THEN  BLemma  `simple-cbva-seq-sqequal-n`
  THEN  Try  (Complete  (Auto'))
  THEN  (Subst  \mkleeneopen{}(n  -  1  -  1)  +  2  \msim{}  n\mkleeneclose{}  0\mcdot{}  THENA  Auto)
  THEN  (Subst  \mkleeneopen{}(n  -  1  -  1  -  (m1  +  m2)  +  1)  +  2  \msim{}  n  -  (m1  +  m2)  +  1\mkleeneclose{}  0\mcdot{}  THENA  Auto)
  THEN  (D  0  THENA  Auto)
  THEN  RepeatFor  2  ((SqequalNCanonicalCD  THENA  Auto'))
  THEN  Try  (Complete  (Auto))
  THEN  All  (RepUR  ``lt\_int  btrue  bfalse``)
  THEN  LiftAll  2
  THEN  Reduce  2
  THEN  BackThruSomeHyp
  THEN  Auto')
Home
Index