Lemmas about resize-list available in the std/lists library.
Theorem:
(defthm resize-list-when-zp (implies (zp n) (equal (resize-list lst n default-value) nil)))
Theorem:
(defthm resize-list-of-nfix (equal (resize-list lst (nfix n) default-value) (resize-list lst n default-value)))
Theorem:
(defthm resize-list-when-atom (implies (atom lst) (equal (resize-list lst n default-value) (repeat n default-value))))
Theorem:
(defthm nth-of-resize-list (equal (nth n (resize-list lst m default-value)) (let ((n (nfix n)) (m (nfix m))) (and (< n m) (if (< n (len lst)) (nth n lst) default-value)))))
Theorem:
(defthm len-of-resize-list (equal (len (resize-list lst n default)) (nfix n)))
Theorem:
(defthm resize-list-of-len-free (implies (equal (nfix n) (len lst)) (equal (resize-list lst n default-value) (list-fix lst))))
Theorem:
(defthm equal-of-resize-list-and-self (equal (equal (resize-list lst n default-value) lst) (and (true-listp lst) (equal (len lst) (nfix n)))))