URL encode a list of characters onto an accumulator in reverse order.
(url-encode-chars-aux chars acc) → encoded
Function:
(defun url-encode-chars-aux (chars acc) (declare (xargs :guard (character-listp chars))) (let ((acl2::__function__ 'url-encode-chars-aux)) (declare (ignorable acl2::__function__)) (if (atom chars) acc (url-encode-chars-aux (cdr chars) (revappend (fast-url-encode-char (car chars)) acc)))))
Theorem:
(defthm character-listp-of-url-encode-chars-aux (implies (character-listp acc) (b* ((encoded (url-encode-chars-aux chars acc))) (character-listp encoded))) :rule-classes :rewrite)
Theorem:
(defthm true-listp-of-url-encode-chars-aux (equal (true-listp (url-encode-chars-aux x acc)) (true-listp acc)))
Theorem:
(defthm url-encode-chars-aux-of-make-character-list-chars (equal (url-encode-chars-aux (make-character-list chars) acc) (url-encode-chars-aux chars acc)))
Theorem:
(defthm url-encode-chars-aux-charlisteqv-congruence-on-chars (implies (charlisteqv chars chars-equiv) (equal (url-encode-chars-aux chars acc) (url-encode-chars-aux chars-equiv acc))) :rule-classes :congruence)