Step
*
1
2
1
2
2
2
2
of Lemma
satisfies-gcd-reduce-eq-constraints
1. n : ℕ+
2. v : ℤ List
3. ||[1 / v]|| = n ∈ ℤ
4. u : ℤ
5. v2 : ℤ List
6. ||[u / v2]|| = n ∈ ℤ
7. v1 : {L:ℤ List| ||L|| = n ∈ ℤ}  List
8. ∀sat:{L:ℤ List| ||L|| = n ∈ ℤ}  List
     ((∀as∈sat.[1 / v] ⋅ as =0)
     
⇒ (∀as∈v1.[1 / v] ⋅ as =0)
     
⇒ ((↑isl(gcd-reduce-eq-constraints(sat;v1))) ∧ (∀as∈outl(gcd-reduce-eq-constraints(sat;v1)).[1 / v] ⋅ as =0)))
9. sat : {L:ℤ List| ||L|| = n ∈ ℤ}  List
10. (∀as∈sat.[1 / v] ⋅ as =0)
11. (∀as∈[[u / v2] / v1].[1 / v] ⋅ as =0)
12. ¬↑null(v2)
13. gg : ℤ
14. |gcd-list(v2)| = gg ∈ ℤ
15. ¬1 < gg
⊢ (↑isl(let s' ⟵ inl [[u / v2] / sat]
        in accumulate_abort(L,Ls.let h,t = L 
                                 in if t = Ax then if h=0 then inl [L / Ls] else (inr ⋅ )
                                    otherwise eval g = |gcd-list(t)| in
                                              if (1) < (g)
                                                 then if h rem g=0
                                                      then eval L' = eager-map(λx.(x ÷ g);L) in
                                                           inl [L' / Ls]
                                                      else (inr ⋅ )
                                                 else (inl [L / Ls]);s';v1)))
∧ (∀as∈outl(let s' ⟵ inl [[u / v2] / sat]
            in accumulate_abort(L,Ls.let h,t = L 
                                     in if t = Ax then if h=0 then inl [L / Ls] else (inr ⋅ )
                                        otherwise eval g = |gcd-list(t)| in
                                                  if (1) < (g)
                                                     then if h rem g=0
                                                          then eval L' = eager-map(λx.(x ÷ g);L) in
                                                               inl [L' / Ls]
                                                          else (inr ⋅ )
                                                     else (inl [L / Ls]);s';v1)).[1 / v] ⋅ as =0)
BY
{ ((CallByValueReduce 0 THENA Auto)
   THEN Fold `gcd-reduce-eq-constraints` 0
   THEN (RWO "l_all_cons" (-5) THENA Auto)
   THEN InstHyp [⌜[[u / v2] / sat]⌝] 8⋅
   THEN Auto) }
Latex:
Latex:
1.  n  :  \mBbbN{}\msupplus{}
2.  v  :  \mBbbZ{}  List
3.  ||[1  /  v]||  =  n
4.  u  :  \mBbbZ{}
5.  v2  :  \mBbbZ{}  List
6.  ||[u  /  v2]||  =  n
7.  v1  :  \{L:\mBbbZ{}  List|  ||L||  =  n\}    List
8.  \mforall{}sat:\{L:\mBbbZ{}  List|  ||L||  =  n\}    List
          ((\mforall{}as\mmember{}sat.[1  /  v]  \mcdot{}  as  =0)
          {}\mRightarrow{}  (\mforall{}as\mmember{}v1.[1  /  v]  \mcdot{}  as  =0)
          {}\mRightarrow{}  ((\muparrow{}isl(gcd-reduce-eq-constraints(sat;v1)))
                \mwedge{}  (\mforall{}as\mmember{}outl(gcd-reduce-eq-constraints(sat;v1)).[1  /  v]  \mcdot{}  as  =0)))
9.  sat  :  \{L:\mBbbZ{}  List|  ||L||  =  n\}    List
10.  (\mforall{}as\mmember{}sat.[1  /  v]  \mcdot{}  as  =0)
11.  (\mforall{}as\mmember{}[[u  /  v2]  /  v1].[1  /  v]  \mcdot{}  as  =0)
12.  \mneg{}\muparrow{}null(v2)
13.  gg  :  \mBbbZ{}
14.  |gcd-list(v2)|  =  gg
15.  \mneg{}1  <  gg
\mvdash{}  (\muparrow{}isl(let  s'  \mleftarrow{}{}  inl  [[u  /  v2]  /  sat]
                in  accumulate\_abort(L,Ls.let  h,t  =  L 
                                                                  in  if  t  =  Ax  then  if  h=0  then  inl  [L  /  Ls]  else  (inr  \mcdot{}  )
                                                                        otherwise  eval  g  =  |gcd-list(t)|  in
                                                                                            if  (1)  <  (g)
                                                                                                  then  if  h  rem  g=0
                                                                                                            then  eval  L'  =  eager-map(\mlambda{}x.(x  \mdiv{}  g);L)  in
                                                                                                                      inl  [L'  /  Ls]
                                                                                                            else  (inr  \mcdot{}  )
                                                                                                  else  (inl  [L  /  Ls]);s';v1)))
\mwedge{}  (\mforall{}as\mmember{}outl(let  s'  \mleftarrow{}{}  inl  [[u  /  v2]  /  sat]
                        in  accumulate\_abort(L,Ls.let  h,t  =  L 
                                                                          in  if  t  =  Ax  then  if  h=0  then  inl  [L  /  Ls]  else  (inr  \mcdot{}  )
                                                                                otherwise  eval  g  =  |gcd-list(t)|  in
                                                                                                    if  (1)  <  (g)
                                                                                                          then  if  h  rem  g=0
                                                                                                                    then  eval  L'  =  eager-map(\mlambda{}x.(x  \mdiv{}  g);L)  in
                                                                                                                              inl  [L'  /  Ls]
                                                                                                                    else  (inr  \mcdot{}  )
                                                                                                          else  (inl  [L  /  Ls]);s';v1)).[1  /  v]  \mcdot{}  as  =0)
By
Latex:
((CallByValueReduce  0  THENA  Auto)
  THEN  Fold  `gcd-reduce-eq-constraints`  0
  THEN  (RWO  "l\_all\_cons"  (-5)  THENA  Auto)
  THEN  InstHyp  [\mkleeneopen{}[[u  /  v2]  /  sat]\mkleeneclose{}]  8\mcdot{}
  THEN  Auto)
Home
Index