Step
*
2
1
1
1
of Lemma
last_index_property
1. T : Type
2. P : T ⟶ 𝔹
3. u : T
4. v : T List
5. ¬(∃x∈v. ↑P[x]) supposing last_index(v;x.P[x]) = 0 ∈ ℤ
6. last_index([u / v];x.P[x]) = if 0 <z last_index(v;x.P[x]) then 1 + last_index(v;x.P[x]) if P[u] then 1 else 0 fi  ∈ ℤ
7. 0 < last_index(v;x.P[x])
8. 0 < 1 + last_index(v;x.P[x])
9. ↑P[v[last_index(v;x.P[x]) - 1]]
10. ¬(∃x∈nth_tl(last_index(v;x.P[x]);v). ↑P[x])
11. ↑P[[u / v][(1 + last_index(v;x.P[x])) - 1]]
⊢ ¬(∃x∈nth_tl(1 + last_index(v;x.P[x]);[u / v]). ↑P[x])
BY
{ TACTIC:((RecUnfold `nth_tl` 0 THEN AutoSplit) THEN Reduce 0) }
Latex:
Latex:
1.  T  :  Type
2.  P  :  T  {}\mrightarrow{}  \mBbbB{}
3.  u  :  T
4.  v  :  T  List
5.  \mneg{}(\mexists{}x\mmember{}v.  \muparrow{}P[x])  supposing  last\_index(v;x.P[x])  =  0
6.  last\_index([u  /  v];x.P[x])
=  if  0  <z  last\_index(v;x.P[x])  then  1  +  last\_index(v;x.P[x])
    if  P[u]  then  1
    else  0
    fi 
7.  0  <  last\_index(v;x.P[x])
8.  0  <  1  +  last\_index(v;x.P[x])
9.  \muparrow{}P[v[last\_index(v;x.P[x])  -  1]]
10.  \mneg{}(\mexists{}x\mmember{}nth\_tl(last\_index(v;x.P[x]);v).  \muparrow{}P[x])
11.  \muparrow{}P[[u  /  v][(1  +  last\_index(v;x.P[x]))  -  1]]
\mvdash{}  \mneg{}(\mexists{}x\mmember{}nth\_tl(1  +  last\_index(v;x.P[x]);[u  /  v]).  \muparrow{}P[x])
By
Latex:
TACTIC:((RecUnfold  `nth\_tl`  0  THEN  AutoSplit)  THEN  Reduce  0)
Home
Index