Step
*
1
1
1
1
of Lemma
strict-majority-property
1. T : Type
2. eq : EqDecider(T)
3. L : T List
4. x : T
5. ||L|| < 2 * ||filter(λy.(eq y x);L)||
6. ∀x,y:T.  Dec(x = y ∈ T)
7. (x ∈ L)
8. y1 : T
9. y2 : ℕ+
10. (<y1, y2> ∈ count-repeats(L,eq))
11. x = y1 ∈ T
12. y2 = ||filter(λy.(eq y y1);L)|| ∈ ℤ
⊢ if null(filter(λp.||L|| <z 2 * (snd(p));count-repeats(L,eq)))
then inr ⋅ 
else inl (fst(hd(filter(λp.||L|| <z 2 * (snd(p));count-repeats(L,eq)))))
fi 
= (inl x)
∈ (T?)
BY
{ (Subst' filter(λp.||L|| <z 2 * (snd(p));count-repeats(L,eq)) = [<y1, y2>] ∈ ((T × ℕ+) List) 0
   THEN Reduce 0
   THEN Auto) }
1
.....equality..... 
1. T : Type
2. eq : EqDecider(T)
3. L : T List
4. x : T
5. ||L|| < 2 * ||filter(λy.(eq y x);L)||
6. ∀x,y:T.  Dec(x = y ∈ T)
7. (x ∈ L)
8. y1 : T
9. y2 : ℕ+
10. (<y1, y2> ∈ count-repeats(L,eq))
11. x = y1 ∈ T
12. y2 = ||filter(λy.(eq y y1);L)|| ∈ ℤ
⊢ filter(λp.||L|| <z 2 * (snd(p));count-repeats(L,eq)) = [<y1, y2>] ∈ ((T × ℕ+) List)
Latex:
Latex:
1.  T  :  Type
2.  eq  :  EqDecider(T)
3.  L  :  T  List
4.  x  :  T
5.  ||L||  <  2  *  ||filter(\mlambda{}y.(eq  y  x);L)||
6.  \mforall{}x,y:T.    Dec(x  =  y)
7.  (x  \mmember{}  L)
8.  y1  :  T
9.  y2  :  \mBbbN{}\msupplus{}
10.  (<y1,  y2>  \mmember{}  count-repeats(L,eq))
11.  x  =  y1
12.  y2  =  ||filter(\mlambda{}y.(eq  y  y1);L)||
\mvdash{}  if  null(filter(\mlambda{}p.||L||  <z  2  *  (snd(p));count-repeats(L,eq)))
then  inr  \mcdot{} 
else  inl  (fst(hd(filter(\mlambda{}p.||L||  <z  2  *  (snd(p));count-repeats(L,eq)))))
fi 
=  (inl  x)
By
Latex:
(Subst'  filter(\mlambda{}p.||L||  <z  2  *  (snd(p));count-repeats(L,eq))  =  [<y1,  y2>]  0  THEN  Reduce  0  THEN  Auto)
Home
Index