Simple way to URL encode a list of characters.
(url-encode-chars x) → encoded
Function:
(defun url-encode-chars$inline (x) (declare (xargs :guard (character-listp x))) (let ((acl2::__function__ 'url-encode-chars)) (declare (ignorable acl2::__function__)) (reverse (url-encode-chars-aux x nil))))
Theorem:
(defthm character-listp-of-url-encode-chars (b* ((encoded (url-encode-chars$inline x))) (character-listp encoded)) :rule-classes :rewrite)
Theorem:
(defthm true-listp-of-url-encode-chars (true-listp (url-encode-chars x)) :rule-classes :type-prescription)
Theorem:
(defthm url-encode-chars$inline-of-make-character-list-x (equal (url-encode-chars$inline (make-character-list x)) (url-encode-chars$inline x)))
Theorem:
(defthm url-encode-chars$inline-charlisteqv-congruence-on-x (implies (charlisteqv x x-equiv) (equal (url-encode-chars$inline x) (url-encode-chars$inline x-equiv))) :rule-classes :congruence)