Step
*
1
2
2
1
1
of Lemma
State-comb-fun-eq
1. Info : Type
2. B : Type
3. A : Type
4. f : A ⟶ B ⟶ B
5. init : Id ⟶ bag(B)
6. X : EClass(A)
7. es : EO+(Info)
8. e : E
9. ¬((X es e) = {} ∈ bag(A))
10. ∀l:Id. (1 ≤ #(init l))
11. ∀l:Id. single-valued-bag(init l;B)
12. single-valued-classrel(es;X;A)
13. ↑e ∈b X
14. ↑first(e)
15. y : ¬(∃e':{E| ((e' <loc e)
                  ∧ (↑0 <z #(rec-comb(λn.[X][n];λi,w,s. if bag-null(w 0) then s else lifting-2(f) (w 0) s fi init) es 
                             e')))})@i
16. (last(λe'.0 <z #(rec-comb(λn.[X][n];λi,w,s. if bag-null(w 0) then s else lifting-2(f) (w 0) s fi init) es e')) e)
= (inr y )
∈ ((∃e':{E| ((e' <loc e)
            ∧ (↑0 <z #(rec-comb(λn.[X][n];λi,w,s. if bag-null(w 0) then s else lifting-2(f) (w 0) s fi init) es e'))
            ∧ (∀e'':E
                 ((e' <loc e'')
                 
⇒ (e'' <loc e)
                 
⇒ (¬↑0 <z #(rec-comb(λn.[X][n];λi,w,s. if bag-null(w 0) then s else lifting-2(f) (w 0) s fi init) es 
                              e'')))))})
  ∨ (¬(∃e':{E| ((e' <loc e)
               ∧ (↑0 <z #(rec-comb(λn.[X][n];λi,w,s. if bag-null(w 0) then s else lifting-2(f) (w 0) s fi init) es 
                          e')))})))@i
⊢ sv-bag-only(⋃x∈X es e.⋃x@0∈init loc(e).{f x x@0}) = (f sv-bag-only(X es e) sv-bag-only(init loc(e))) ∈ B
BY
{ ((InstHyp [⌜loc(e)⌝] (-7)⋅ THENA Auto)
   THEN (InstLemma `sv-bag-only-combine` [⌜A⌝;⌜B⌝;⌜X es e⌝;⌜λ2x.⋃x@0∈init loc(e).{f x x@0}⌝]⋅
         THENA (Auto
                THEN Try ((BLemma `single-valued-classrel-implies-bag` THEN Auto))
                THEN Try ((BLemma `member-eclass-iff-size` THEN Auto)))
         )
   THEN Try ((BLemma `single-valued-bag-combine` THEN Auto THEN BLemma `single-valued-bag-single` THEN Auto))) }
1
1. Info : Type
2. B : Type
3. A : Type
4. f : A ⟶ B ⟶ B
5. init : Id ⟶ bag(B)
6. X : EClass(A)
7. es : EO+(Info)
8. e : E
9. ¬((X es e) = {} ∈ bag(A))
10. ∀l:Id. (1 ≤ #(init l))
11. ∀l:Id. single-valued-bag(init l;B)
12. single-valued-classrel(es;X;A)
13. ↑e ∈b X
14. ↑first(e)
15. y : ¬(∃e':{E| ((e' <loc e)
                  ∧ (↑0 <z #(rec-comb(λn.[X][n];λi,w,s. if bag-null(w 0) then s else lifting-2(f) (w 0) s fi init) es 
                             e')))})@i
16. (last(λe'.0 <z #(rec-comb(λn.[X][n];λi,w,s. if bag-null(w 0) then s else lifting-2(f) (w 0) s fi init) es e')) e)
= (inr y )
∈ ((∃e':{E| ((e' <loc e)
            ∧ (↑0 <z #(rec-comb(λn.[X][n];λi,w,s. if bag-null(w 0) then s else lifting-2(f) (w 0) s fi init) es e'))
            ∧ (∀e'':E
                 ((e' <loc e'')
                 
⇒ (e'' <loc e)
                 
⇒ (¬↑0 <z #(rec-comb(λn.[X][n];λi,w,s. if bag-null(w 0) then s else lifting-2(f) (w 0) s fi init) es 
                              e'')))))})
  ∨ (¬(∃e':{E| ((e' <loc e)
               ∧ (↑0 <z #(rec-comb(λn.[X][n];λi,w,s. if bag-null(w 0) then s else lifting-2(f) (w 0) s fi init) es 
                          e')))})))@i
17. 1 ≤ #(init loc(e))
18. a : A@i
⊢ 0 < #(⋃x@0∈init loc(e).{f a x@0})
2
1. Info : Type
2. B : Type
3. A : Type
4. f : A ⟶ B ⟶ B
5. init : Id ⟶ bag(B)
6. X : EClass(A)
7. es : EO+(Info)
8. e : E
9. ¬((X es e) = {} ∈ bag(A))
10. ∀l:Id. (1 ≤ #(init l))
11. ∀l:Id. single-valued-bag(init l;B)
12. single-valued-classrel(es;X;A)
13. ↑e ∈b X
14. ↑first(e)
15. y : ¬(∃e':{E| ((e' <loc e)
                  ∧ (↑0 <z #(rec-comb(λn.[X][n];λi,w,s. if bag-null(w 0) then s else lifting-2(f) (w 0) s fi init) es 
                             e')))})@i
16. (last(λe'.0 <z #(rec-comb(λn.[X][n];λi,w,s. if bag-null(w 0) then s else lifting-2(f) (w 0) s fi init) es e')) e)
= (inr y )
∈ ((∃e':{E| ((e' <loc e)
            ∧ (↑0 <z #(rec-comb(λn.[X][n];λi,w,s. if bag-null(w 0) then s else lifting-2(f) (w 0) s fi init) es e'))
            ∧ (∀e'':E
                 ((e' <loc e'')
                 
⇒ (e'' <loc e)
                 
⇒ (¬↑0 <z #(rec-comb(λn.[X][n];λi,w,s. if bag-null(w 0) then s else lifting-2(f) (w 0) s fi init) es 
                              e'')))))})
  ∨ (¬(∃e':{E| ((e' <loc e)
               ∧ (↑0 <z #(rec-comb(λn.[X][n];λi,w,s. if bag-null(w 0) then s else lifting-2(f) (w 0) s fi init) es 
                          e')))})))@i
17. 1 ≤ #(init loc(e))
18. sv-bag-only(⋃x∈X es e.⋃x@0∈init loc(e).{f x x@0}) = sv-bag-only(⋃x@0∈init loc(e).{f sv-bag-only(X es e) x@0}) ∈ B
⊢ sv-bag-only(⋃x∈X es e.⋃x@0∈init loc(e).{f x x@0}) = (f sv-bag-only(X es e) sv-bag-only(init loc(e))) ∈ B
Latex:
Latex:
1.  Info  :  Type
2.  B  :  Type
3.  A  :  Type
4.  f  :  A  {}\mrightarrow{}  B  {}\mrightarrow{}  B
5.  init  :  Id  {}\mrightarrow{}  bag(B)
6.  X  :  EClass(A)
7.  es  :  EO+(Info)
8.  e  :  E
9.  \mneg{}((X  es  e)  =  \{\})
10.  \mforall{}l:Id.  (1  \mleq{}  \#(init  l))
11.  \mforall{}l:Id.  single-valued-bag(init  l;B)
12.  single-valued-classrel(es;X;A)
13.  \muparrow{}e  \mmember{}\msubb{}  X
14.  \muparrow{}first(e)
15.  y  :  \mneg{}(\mexists{}e':\{E|  ((e'  <loc  e)
                                    \mwedge{}  (\muparrow{}0  <z  \#(rec-comb(\mlambda{}n.[X][n];\mlambda{}i,w,s.  if  bag-null(w  0)
                                                                                                              then  s
                                                                                                              else  lifting-2(f)  (w  0)  s
                                                                                                              fi  ;init) 
                                                          es 
                                                          e')))\})@i
16.  (last(\mlambda{}e'.0  <z  \#(rec-comb(\mlambda{}n.[X][n];\mlambda{}i,w,s.  if  bag-null(w  0)
                                                                                              then  s
                                                                                              else  lifting-2(f)  (w  0)  s
                                                                                              fi  ;init) 
                                          es 
                                          e')) 
          e)
=  (inr  y  )@i
\mvdash{}  sv-bag-only(\mcup{}x\mmember{}X  es  e.\mcup{}x@0\mmember{}init  loc(e).\{f  x  x@0\})
=  (f  sv-bag-only(X  es  e)  sv-bag-only(init  loc(e)))
By
Latex:
((InstHyp  [\mkleeneopen{}loc(e)\mkleeneclose{}]  (-7)\mcdot{}  THENA  Auto)
  THEN  (InstLemma  `sv-bag-only-combine`  [\mkleeneopen{}A\mkleeneclose{};\mkleeneopen{}B\mkleeneclose{};\mkleeneopen{}X  es  e\mkleeneclose{};\mkleeneopen{}\mlambda{}\msubtwo{}x.\mcup{}x@0\mmember{}init  loc(e).\{f  x  x@0\}\mkleeneclose{}]\mcdot{}
              THENA  (Auto
                            THEN  Try  ((BLemma  `single-valued-classrel-implies-bag`  THEN  Auto))
                            THEN  Try  ((BLemma  `member-eclass-iff-size`  THEN  Auto)))
              )
  THEN  Try  ((BLemma  `single-valued-bag-combine`
                        THEN  Auto
                        THEN  BLemma  `single-valued-bag-single`
                        THEN  Auto)))
Home
Index