Step * 2 1 1 1 of Lemma list-max-aux-property


1. [T] Type
2. T ⟶ ℤ
3. : ℕ
4. List
5. ∀L1:T List
     (||L1|| < ||L||
      (↑isl(list-max-aux(x.f[x];L1)))
        ∧ let n,x outl(list-max-aux(x.f[x];L1)) 
          in (x ∈ L1) ∧ (f[x] n ∈ ℤ) ∧ (∀y∈L1.f[y] ≤ n) 
        supposing 0 < ||L1||)
6. 0 < ||L||
7. firstn(||L|| 1;L) [last(L)]
8. ¬↑null(L)
9. 1 < ||L||
10. : ℤ
11. x1 {x:T| f[x] i ∈ ℤ
12. list-max-aux(x.f[x];firstn(||L|| 1;L)) (inl <i, x1>) ∈ (i:ℤ × {x:T| f[x] i ∈ ℤ}  Top)
13. i < f[last(L)]
14. True
15. (x1 ∈ firstn(||L|| 1;L))
16. f[x1] i ∈ ℤ
17. (∀y∈firstn(||L|| 1;L).f[y] ≤ i)
18. (last(L) ∈ firstn(||L|| 1;L) [last(L)])
19. f[last(L)] f[last(L)] ∈ ℤ
⊢ (∀y∈firstn(||L|| 1;L) [last(L)].f[y] ≤ f[last(L)])
BY
(RWW "l_all_append member_append" 0⋅
   THEN Auto
   THEN Try ((RepeatFor (ParallelLast) THEN Complete (Auto)))
   THEN (D THENA Auto)) }

1
1. [T] Type
2. T ⟶ ℤ
3. : ℕ
4. List
5. ∀L1:T List
     (||L1|| < ||L||
      (↑isl(list-max-aux(x.f[x];L1)))
        ∧ let n,x outl(list-max-aux(x.f[x];L1)) 
          in (x ∈ L1) ∧ (f[x] n ∈ ℤ) ∧ (∀y∈L1.f[y] ≤ n) 
        supposing 0 < ||L1||)
6. 0 < ||L||
7. firstn(||L|| 1;L) [last(L)]
8. ¬↑null(L)
9. 1 < ||L||
10. : ℤ
11. x1 {x:T| f[x] i ∈ ℤ
12. list-max-aux(x.f[x];firstn(||L|| 1;L)) (inl <i, x1>) ∈ (i:ℤ × {x:T| f[x] i ∈ ℤ}  Top)
13. i < f[last(L)]
14. True
15. (x1 ∈ firstn(||L|| 1;L))
16. f[x1] i ∈ ℤ
17. (∀y∈firstn(||L|| 1;L).f[y] ≤ i)
18. (last(L) ∈ firstn(||L|| 1;L) [last(L)])
19. f[last(L)] f[last(L)] ∈ ℤ
20. i1 : ℕ||firstn(||L|| 1;L)||
⊢ f[firstn(||L|| 1;L)[i1]] ≤ f[last(L)]


Latex:


Latex:

1.  [T]  :  Type
2.  f  :  T  {}\mrightarrow{}  \mBbbZ{}
3.  n  :  \mBbbN{}
4.  L  :  T  List
5.  \mforall{}L1:T  List
          (||L1||  <  ||L||
          {}\mRightarrow{}  (\muparrow{}isl(list-max-aux(x.f[x];L1)))
                \mwedge{}  let  n,x  =  outl(list-max-aux(x.f[x];L1)) 
                    in  (x  \mmember{}  L1)  \mwedge{}  (f[x]  =  n)  \mwedge{}  (\mforall{}y\mmember{}L1.f[y]  \mleq{}  n) 
                supposing  0  <  ||L1||)
6.  0  <  ||L||
7.  L  \msim{}  firstn(||L||  -  1;L)  @  [last(L)]
8.  \mneg{}\muparrow{}null(L)
9.  1  <  ||L||
10.  i  :  \mBbbZ{}
11.  x1  :  \{x:T|  f[x]  =  i\} 
12.  list-max-aux(x.f[x];firstn(||L||  -  1;L))  =  (inl  <i,  x1>)
13.  i  <  f[last(L)]
14.  True
15.  (x1  \mmember{}  firstn(||L||  -  1;L))
16.  f[x1]  =  i
17.  (\mforall{}y\mmember{}firstn(||L||  -  1;L).f[y]  \mleq{}  i)
18.  (last(L)  \mmember{}  firstn(||L||  -  1;L)  @  [last(L)])
19.  f[last(L)]  =  f[last(L)]
\mvdash{}  (\mforall{}y\mmember{}firstn(||L||  -  1;L)  @  [last(L)].f[y]  \mleq{}  f[last(L)])


By


Latex:
(RWW  "l\_all\_append  member\_append"  0\mcdot{}
  THEN  Auto
  THEN  Try  ((RepeatFor  3  (ParallelLast)  THEN  Complete  (Auto)))
  THEN  (D  0  THENA  Auto))




Home Index