Step * 1 1 1 of Lemma new_23_sig_progress-step9

.....assertion..... 
1. Cmd {T:Type| valueall-type(T)} 
2. eq EqDecider(Cmd)
3. reps bag(Id)
4. clients bag(Id)
5. coeff {2...}
6. flrs : ℕ
7. propose Atom List
8. notify Atom List
9. slots set-sig{i:l}(ℤ)
10. new_23_sig_headers_type{i:l}(Cmd;notify;propose)
11. (f propose) (ℤ × Cmd) ∈ Type
12. (f notify) (ℤ × Cmd) ∈ Type
13. (f ``new_23_sig decided``) (ℤ × Cmd) ∈ Type
14. (f ``new_23_sig retry``) (ℤ × ℤ × Cmd) ∈ Type
15. (f ``new_23_sig vote``) (ℤ × ℤ × Cmd × Id) ∈ Type
16. f ∈ Name ─→ Type
17. es EO+(Message(f))
18. E
19. : ℤ
20. Cmd
21. faulty bag(Id)
22. msgs-interface-delivered-with-omissions(f;es;new_23_sig_main();faulty;flrs;reps)@i
23. bag-no-repeats(Id;reps)@i
24. #(reps) ((coeff flrs) flrs 1) ∈ ℤ@i
25. loc(e) ↓∈ reps@i
26. ¬loc(e) ↓∈ faulty@i
27. <n, c> ∈ new_23_sig_Proposal(Cmd;notify;propose;f)(e)@i
28. ¬↑(set-sig-member(slots) new_23_sig_ReplicaStateFun(Cmd;notify;propose;slots;f;es;e))@i
29. bs (Id × E × Cmd) List
30. ((coeff flrs) 1) ≤ ||bs||
31. (∀x∈bs.(loc(fst(snd(x))) loc(e) ∈ Id)
       ∧ e ≤loc fst(snd(x)) 
       ∧ <<<n, 0>snd(snd(x))>fst(x)> ∈ new_23_sig_vote'base(Cmd;notify;propose;f)(fst(snd(x))))
32. l-ordered(Id × E × Cmd;x,y.(fst(snd(x)) <loc fst(snd(y)));bs)
33. (∀e'∈[e, fst(snd(last(bs)))].(↑new_23_sig_vote_with_ballot(Cmd;notify;propose;f;es;e';n;0))
         (e' ∈ map(λx.(fst(snd(x)));bs)))
34. b_all(Id;[x∈reps|¬bbag-deq-member(IdDeq;x;faulty)];i.(i ∈ map(λi.(fst(i));bs)))
35. 0 ≤ (coeff flrs)
⊢ ((coeff flrs) 1) ≤ ||remove-repeats-fun(IdDeq;λx.(fst(x));bs)||
BY
((RWO "remove-repeats-fun-length-as-remove-repeats-map" THENA Auto)
   THEN (FLemma `sub-bag-list-if-bag-no-repeats-sq` [-2] THENA (Auto THEN BLemma `bag-filter-no-repeats` THEN Auto))
   THEN (-1)
   THEN (Unhide THENA Auto)
   THEN Fold `bag-size` 0⋅
   THEN (-1)
   THEN (RWO "bag-remove-repeats-eq-remove-repeats<THENA Auto)
   THEN (HypSubst (-1) THENA Auto)
   THEN (RWO "bag-remove-repeats-append" THENA Auto)
   THEN (RWO "bag-size-append" THENA Auto)
   THEN GenConclAtAddr [2;2]
   THEN (InstLemma `bag-remove-repeats-filter` [⌈Id⌉;⌈reps⌉;⌈IdDeq⌉;⌈λ2x.¬bbag-deq-member(IdDeq;x;faulty)⌉]⋅ THENA Auto)
   THEN (HypSubst (-1) THENA Auto)
   THEN (RWO "bag-remove-repeats-if-no-repeats" THENA Auto)
   THEN (Assert ⌈((coeff flrs) 1) ≤ #([x∈reps|¬bbag-deq-member(IdDeq;x;faulty)])⌉⋅ THEN Auto)
   THEN (InstLemma `bag-filter-split` [⌈Id⌉;⌈λ2x.bag-deq-member(IdDeq;x;faulty)⌉;⌈reps⌉]⋅ THENA Auto)
   THEN (Assert ⌈#(reps)
                 (#([x∈reps|bag-deq-member(IdDeq;x;faulty)]) #([x∈reps|¬bbag-deq-member(IdDeq;x;faulty)]))
                 ∈ ℤ⌉⋅
         THENA ((RWO "bag-size-append<THENA Auto) THEN HypSubst (-1) THEN Auto)
         )
   THEN (Assert ⌈#([x∈reps|bag-deq-member(IdDeq;x;faulty)]) ≤ flrs⌉⋅ THEN Auto)
   THEN 22
   THEN InstLemma `bag-size-filter-member-bound` [⌈Id⌉;⌈IdDeq⌉;⌈reps⌉;⌈faulty⌉]⋅
   THEN Auto)⋅ }


Latex:



Latex:
.....assertion..... 
1.  Cmd  :  \{T:Type|  valueall-type(T)\} 
2.  eq  :  EqDecider(Cmd)
3.  reps  :  bag(Id)
4.  clients  :  bag(Id)
5.  coeff  :  \{2...\}
6.  flrs  :  \mBbbN{}
7.  propose  :  Atom  List
8.  notify  :  Atom  List
9.  slots  :  set-sig\{i:l\}(\mBbbZ{})
10.  f  :  new\_23\_sig\_headers\_type\{i:l\}(Cmd;notify;propose)
11.  (f  propose)  =  (\mBbbZ{}  \mtimes{}  Cmd)
12.  (f  notify)  =  (\mBbbZ{}  \mtimes{}  Cmd)
13.  (f  ``new\_23\_sig  decided``)  =  (\mBbbZ{}  \mtimes{}  Cmd)
14.  (f  ``new\_23\_sig  retry``)  =  (\mBbbZ{}  \mtimes{}  \mBbbZ{}  \mtimes{}  Cmd)
15.  (f  ``new\_23\_sig  vote``)  =  (\mBbbZ{}  \mtimes{}  \mBbbZ{}  \mtimes{}  Cmd  \mtimes{}  Id)
16.  f  \mmember{}  Name  {}\mrightarrow{}  Type
17.  es  :  EO+(Message(f))
18.  e  :  E
19.  n  :  \mBbbZ{}
20.  c  :  Cmd
21.  faulty  :  bag(Id)
22.  msgs-interface-delivered-with-omissions(f;es;new\_23\_sig\_main();faulty;flrs;reps)@i
23.  bag-no-repeats(Id;reps)@i
24.  \#(reps)  =  ((coeff  *  flrs)  +  flrs  +  1)@i
25.  loc(e)  \mdownarrow{}\mmember{}  reps@i
26.  \mneg{}loc(e)  \mdownarrow{}\mmember{}  faulty@i
27.  <n,  c>  \mmember{}  new\_23\_sig\_Proposal(Cmd;notify;propose;f)(e)@i
28.  \mneg{}\muparrow{}(set-sig-member(slots)  n  new\_23\_sig\_ReplicaStateFun(Cmd;notify;propose;slots;f;es;e))@i
29.  bs  :  (Id  \mtimes{}  E  \mtimes{}  Cmd)  List
30.  ((coeff  *  flrs)  +  1)  \mleq{}  ||bs||
31.  (\mforall{}x\mmember{}bs.(loc(fst(snd(x)))  =  loc(e))
              \mwedge{}  e  \mleq{}loc  fst(snd(x)) 
              \mwedge{}  <<<n,  0>,  snd(snd(x))>,  fst(x)>  \mmember{}  new\_23\_sig\_vote'base(Cmd;notify;propose;f)(fst(snd(x))))
32.  l-ordered(Id  \mtimes{}  E  \mtimes{}  Cmd;x,y.(fst(snd(x))  <loc  fst(snd(y)));bs)
33.  (\mforall{}e'\mmember{}[e,  fst(snd(last(bs)))].(\muparrow{}new\_23\_sig\_vote\_with\_ballot(Cmd;notify;propose;f;es;e';n;0))
                {}\mRightarrow{}  (e'  \mmember{}  map(\mlambda{}x.(fst(snd(x)));bs)))
34.  b\_all(Id;[x\mmember{}reps|\mneg{}\msubb{}bag-deq-member(IdDeq;x;faulty)];i.(i  \mmember{}  map(\mlambda{}i.(fst(i));bs)))
35.  0  \mleq{}  (coeff  *  flrs)
\mvdash{}  ((coeff  *  flrs)  +  1)  \mleq{}  ||remove-repeats-fun(IdDeq;\mlambda{}x.(fst(x));bs)||


By


Latex:
((RWO  "remove-repeats-fun-length-as-remove-repeats-map"  0  THENA  Auto)
  THEN  (FLemma  `sub-bag-list-if-bag-no-repeats-sq`  [-2]
              THENA  (Auto  THEN  BLemma  `bag-filter-no-repeats`  THEN  Auto)
              )
  THEN  D  (-1)
  THEN  (Unhide  THENA  Auto)
  THEN  Fold  `bag-size`  0\mcdot{}
  THEN  D  (-1)
  THEN  (RWO  "bag-remove-repeats-eq-remove-repeats<"  0  THENA  Auto)
  THEN  (HypSubst  (-1)  0  THENA  Auto)
  THEN  (RWO  "bag-remove-repeats-append"  0  THENA  Auto)
  THEN  (RWO  "bag-size-append"  0  THENA  Auto)
  THEN  GenConclAtAddr  [2;2]
  THEN  (InstLemma  `bag-remove-repeats-filter`  [\mkleeneopen{}Id\mkleeneclose{};\mkleeneopen{}reps\mkleeneclose{};\mkleeneopen{}IdDeq\mkleeneclose{};
              \mkleeneopen{}\mlambda{}\msubtwo{}x.\mneg{}\msubb{}bag-deq-member(IdDeq;x;faulty)\mkleeneclose{}]\mcdot{}
              THENA  Auto
              )
  THEN  (HypSubst  (-1)  0  THENA  Auto)
  THEN  (RWO  "bag-remove-repeats-if-no-repeats"  0  THENA  Auto)
  THEN  (Assert  \mkleeneopen{}((coeff  *  flrs)  +  1)  \mleq{}  \#([x\mmember{}reps|\mneg{}\msubb{}bag-deq-member(IdDeq;x;faulty)])\mkleeneclose{}\mcdot{}  THEN  Auto)
  THEN  (InstLemma  `bag-filter-split`  [\mkleeneopen{}Id\mkleeneclose{};\mkleeneopen{}\mlambda{}\msubtwo{}x.bag-deq-member(IdDeq;x;faulty)\mkleeneclose{};\mkleeneopen{}reps\mkleeneclose{}]\mcdot{}  THENA  Auto)
  THEN  (Assert  \mkleeneopen{}\#(reps)
                              =  (\#([x\mmember{}reps|bag-deq-member(IdDeq;x;faulty)])
                                  +  \#([x\mmember{}reps|\mneg{}\msubb{}bag-deq-member(IdDeq;x;faulty)]))\mkleeneclose{}\mcdot{}
              THENA  ((RWO  "bag-size-append<"  0  THENA  Auto)  THEN  HypSubst  (-1)  0  THEN  Auto)
              )
  THEN  (Assert  \mkleeneopen{}\#([x\mmember{}reps|bag-deq-member(IdDeq;x;faulty)])  \mleq{}  flrs\mkleeneclose{}\mcdot{}  THEN  Auto)
  THEN  D  22
  THEN  InstLemma  `bag-size-filter-member-bound`  [\mkleeneopen{}Id\mkleeneclose{};\mkleeneopen{}IdDeq\mkleeneclose{};\mkleeneopen{}reps\mkleeneclose{};\mkleeneopen{}faulty\mkleeneclose{}]\mcdot{}
  THEN  Auto)\mcdot{}




Home Index