Step * 1 of Lemma list_ind_reverse_wf_dependent


1. [A] Type
2. [B] Type
3. nilcase B
4. B ⟶ (A List) ⟶ A ⟶ B
5. (A List) ⟶ B ⟶ ℙ
6. [] nilcase
7. ∀L:A List. ∀x:A. ∀b:B.  ((b list_ind_reverse(L;nilcase;F) ∈ B)  (P b)  (P (L [x]) (F x)))
8. List
9. : ℕ
⊢ ∀LL:A List. ((||LL|| n ∈ ℕ (P LL list_ind_reverse(LL;nilcase;F)))
BY
(NatInd (-1)
   THEN Unfold `list_ind_reverse` 0
   THEN Auto
   THEN RW (AddrC [2] UnrollRecursionC) 0⋅
   THEN Reduce 0
   THEN AutoSplit) }

1
1. [A] Type
2. [B] Type
3. nilcase B
4. B ⟶ (A List) ⟶ A ⟶ B
5. (A List) ⟶ B ⟶ ℙ
6. [] nilcase
7. ∀L:A List. ∀x:A. ∀b:B.  ((b list_ind_reverse(L;nilcase;F) ∈ B)  (P b)  (P (L [x]) (F x)))
8. List
9. LL List
10. ||LL|| 0 ∈ ℕ
11. ||LL|| 0 ∈ ℤ
⊢ LL nilcase

2
1. [A] Type
2. [B] Type
3. nilcase B
4. B ⟶ (A List) ⟶ A ⟶ B
5. (A List) ⟶ B ⟶ ℙ
6. [] nilcase
7. ∀L:A List. ∀x:A. ∀b:B.  ((b list_ind_reverse(L;nilcase;F) ∈ B)  (P b)  (P (L [x]) (F x)))
8. List
9. : ℤ
10. [%3] 0 < n
11. ∀LL:A List. ((||LL|| (n 1) ∈ ℕ (P LL list_ind_reverse(LL;nilcase;F)))
12. LL List
13. ||LL|| ≠ 0
14. ||LL|| n ∈ ℕ
⊢ LL 
  (F 
   (fix((λF@0,l. if (||l|| =z 0) then nilcase else (F@0 firstn(||l|| 1;l)) firstn(||l|| 1;l) last(l) fi )) 
    firstn(||LL|| 1;LL)) 
   firstn(||LL|| 1;LL) 
   last(LL))


Latex:


Latex:

1.  [A]  :  Type
2.  [B]  :  Type
3.  nilcase  :  B
4.  F  :  B  {}\mrightarrow{}  (A  List)  {}\mrightarrow{}  A  {}\mrightarrow{}  B
5.  P  :  (A  List)  {}\mrightarrow{}  B  {}\mrightarrow{}  \mBbbP{}
6.  P  []  nilcase
7.  \mforall{}L:A  List.  \mforall{}x:A.  \mforall{}b:B.
          ((b  =  list\_ind\_reverse(L;nilcase;F))  {}\mRightarrow{}  (P  L  b)  {}\mRightarrow{}  (P  (L  @  [x])  (F  b  L  x)))
8.  L  :  A  List
9.  n  :  \mBbbN{}
\mvdash{}  \mforall{}LL:A  List.  ((||LL||  =  n)  {}\mRightarrow{}  (P  LL  list\_ind\_reverse(LL;nilcase;F)))


By


Latex:
(NatInd  (-1)
  THEN  Unfold  `list\_ind\_reverse`  0
  THEN  Auto
  THEN  RW  (AddrC  [2]  UnrollRecursionC)  0\mcdot{}
  THEN  Reduce  0
  THEN  AutoSplit)




Home Index