(addr-range count addr) → *
Function:
(defun addr-range (count addr) (declare (xargs :guard (natp count))) (let ((__function__ 'addr-range)) (declare (ignorable __function__)) (if (zp count) nil (cons (ifix addr) (addr-range (1- count) (1+ (ifix addr)))))))
Theorem:
(defthm neg-addr-range=nil (implies (negp i) (equal (addr-range i n) nil)))
Theorem:
(defthm true-listp-addr-range (true-listp (addr-range count addr)) :rule-classes :type-prescription)
Theorem:
(defthm addr-range-1 (equal (addr-range 1 x) (list (ifix x))))
Theorem:
(defthm len-of-addr-range (implies (natp n) (equal (len (addr-range n val)) n)))
Theorem:
(defthm physical-address-listp-addr-range (implies (and (physical-address-p lin-addr) (physical-address-p (+ -1 n lin-addr))) (physical-address-listp (addr-range n lin-addr))))
Theorem:
(defthm member-p-addr-range (implies (and (<= prog-addr addr) (< addr (+ n prog-addr)) (integerp n) (integerp addr) (integerp prog-addr)) (equal (member-p addr (addr-range n prog-addr)) t)))
Theorem:
(defthm member-p-addr-range-from-member-p-addr-range (implies (and (member-p x (addr-range j y)) (integerp l) (< j l)) (equal (member-p x (addr-range l y)) t)))
Theorem:
(defthm not-member-p-addr-range (implies (and (or (< addr prog-addr) (<= (+ n prog-addr) addr)) (integerp prog-addr)) (equal (member-p addr (addr-range n prog-addr)) nil)))
Theorem:
(defthm not-member-p-addr-range-from-not-member-p-addr-range (implies (and (not (member-p x (addr-range j y))) (integerp j) (<= l j)) (equal (member-p x (addr-range l y)) nil)))
Theorem:
(defthm subset-p-two-addr-ranges (implies (and (integerp x) (integerp y) (<= y x) (<= (+ i x) (+ j y)) (integerp j)) (subset-p (addr-range i x) (addr-range j y))))
Theorem:
(defthm not-disjoint-p-two-addr-ranges-thm (implies (and (integerp x) (integerp y) (integerp i) (integerp j) (<= x y) (< y (+ i x)) (<= (+ i x) (+ j y))) (equal (disjoint-p (addr-range i x) (addr-range j y)) nil)))
Theorem:
(defthm disjoint-p-two-addr-ranges-thm-0 (implies (and (integerp x) (integerp y) (integerp j) (< 0 j) (<= (+ i x) y)) (disjoint-p (addr-range i x) (addr-range j y))))
Theorem:
(defthm disjoint-p-two-addr-ranges-thm-1 (implies (and (integerp x) (integerp y) (integerp j) (< 0 j) (<= (+ j y) x)) (disjoint-p (addr-range i x) (addr-range j y))))
Theorem:
(defthm disjoint-p-two-addr-ranges-thm-2 (implies (and (disjoint-p (addr-range i x) (addr-range j y)) (subset-p (addr-range ia a) (addr-range i x)) (subset-p (addr-range jb b) (addr-range j y))) (disjoint-p (addr-range ia a) (addr-range jb b))))
Theorem:
(defthm disjoint-p-two-addr-ranges-thm-3 (implies (and (disjoint-p (addr-range j y) (addr-range i x)) (subset-p (addr-range ia a) (addr-range i x)) (subset-p (addr-range jb b) (addr-range j y))) (disjoint-p (addr-range ia a) (addr-range jb b))))
Theorem:
(defthm consp-addr-range (implies (posp n) (consp (addr-range n val))) :rule-classes (:type-prescription :rewrite))
Theorem:
(defthm car-addr-range (implies (posp n) (equal (car (addr-range n val)) (ifix val))))
Theorem:
(defthm cdr-addr-range (implies (and (posp n) (integerp val)) (equal (cdr (addr-range n val)) (addr-range (1- n) (1+ val)))))
Theorem:
(defthm no-duplicates-p-and-addr-range (no-duplicates-p (addr-range n x)))
Theorem:
(defthm instance-of-pos-1-accumulator-thm (implies (and (member-p e x) (natp acc)) (equal (pos-1 e x (+ 1 acc)) (+ 1 (pos-1 e x acc)))))
Theorem:
(defthm nth-pos-of-addr-range (implies (and (<= index i) (< i (+ n index)) (integerp index) (integerp i) (posp n)) (equal (pos i (addr-range n index)) (- i index))))
Theorem:
(defthm addr-range-ifix (equal (addr-range n (ifix x)) (addr-range n x)))
Theorem:
(defthm integerp-addr-range-member (implies (member-p x (addr-range n m)) (integerp x)))
Theorem:
(defthm addr-range-not-member-out-of-range (implies (and (natp n) (integerp addr) (< el addr) (>= el (+ addr n))) (not (member-p el (addr-range n addr)))))