Function:
(defun satlink-skip-ws (x n xl) (declare (xargs :guard (and (stringp x) (natp n) (equal xl (length x))))) (declare (xargs :guard (<= n xl))) (let ((__function__ 'satlink-skip-ws)) (declare (ignorable __function__)) (b* (((when (mbe :logic (zp (- (nfix xl) (nfix n))) :exec (int= xl n))) (lnfix n)) (char (char x n)) ((when (or (eql char #\Space) (eql char #\Tab))) (satlink-skip-ws x (+ 1 (lnfix n)) xl))) (lnfix n))))
Theorem:
(defthm natp-of-satlink-skip-ws (b* ((new-n (satlink-skip-ws x n xl))) (natp new-n)) :rule-classes :rewrite)
Theorem:
(defthm lower-bound-satlink-skip-ws (implies (natp n) (<= n (satlink-skip-ws x n xl))) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm lower-bound-satlink-skip-ws-nfix (<= (nfix n) (satlink-skip-ws x n xl)) :rule-classes (:rewrite :linear))
Theorem:
(defthm upper-bound-satlink-skip-ws (implies (and (natp n) (natp xl) (<= n xl)) (<= (satlink-skip-ws x n xl) xl)) :rule-classes ((:rewrite) (:linear)))