Step
*
of Lemma
b_all-squash-exists-list
∀[A,B:Type]. ∀[as:bag(A)]. ∀[P:A ⟶ B ⟶ ℙ].
  ↓∃bs:(A × B) List. ((bag-map(λx.(fst(x));bs) = as ∈ bag(A)) ∧ (∀x∈bs.↓P[fst(x);snd(x)])) 
  supposing b_all(A;as;x.↓∃y:B. P[x;y])
BY
{ (Auto
   THEN (BagToList (-3) THENA Auto)
   THEN ListInd (-3)
   THEN (D 0 THENA Auto)
   THEN Try (Complete ((D 0 THEN InstConcl [⌜[]⌝]⋅ THEN Auto)))
   THEN Fold `cons-bag` (-1)
   THEN (RWO "b_all-cons" (-1) THENA Auto)
   THEN RepD
   THEN (D (-3) THENA Auto)
   THEN SquashExRepD
   THEN D 0
   THEN InstConcl [⌜[<u, y> / bs]⌝]⋅
   THEN Auto
   THEN Try (Complete ((RW ListC 0 THEN Reduce 0 THEN Auto)))
   THEN Fold `cons-bag` 0
   THEN (RWO "bag-map-cons" 0 THENA Auto)
   THEN Reduce 0
   THEN Auto) }
Latex:
Latex:
\mforall{}[A,B:Type].  \mforall{}[as:bag(A)].  \mforall{}[P:A  {}\mrightarrow{}  B  {}\mrightarrow{}  \mBbbP{}].
    \mdownarrow{}\mexists{}bs:(A  \mtimes{}  B)  List.  ((bag-map(\mlambda{}x.(fst(x));bs)  =  as)  \mwedge{}  (\mforall{}x\mmember{}bs.\mdownarrow{}P[fst(x);snd(x)])) 
    supposing  b\_all(A;as;x.\mdownarrow{}\mexists{}y:B.  P[x;y])
By
Latex:
(Auto
  THEN  (BagToList  (-3)  THENA  Auto)
  THEN  ListInd  (-3)
  THEN  (D  0  THENA  Auto)
  THEN  Try  (Complete  ((D  0  THEN  InstConcl  [\mkleeneopen{}[]\mkleeneclose{}]\mcdot{}  THEN  Auto)))
  THEN  Fold  `cons-bag`  (-1)
  THEN  (RWO  "b\_all-cons"  (-1)  THENA  Auto)
  THEN  RepD
  THEN  (D  (-3)  THENA  Auto)
  THEN  SquashExRepD
  THEN  D  0
  THEN  InstConcl  [\mkleeneopen{}[<u,  y>  /  bs]\mkleeneclose{}]\mcdot{}
  THEN  Auto
  THEN  Try  (Complete  ((RW  ListC  0  THEN  Reduce  0  THEN  Auto)))
  THEN  Fold  `cons-bag`  0
  THEN  (RWO  "bag-map-cons"  0  THENA  Auto)
  THEN  Reduce  0
  THEN  Auto)
Home
Index