Case-insensitive character-list equivalence test.
(icharlisteqv x y) → bool
(icharlisteqv x y) determines if
See also charlisteqv for a case-sensitive alternative.
Function:
(defun icharlisteqv (x y) (declare (xargs :guard (and (character-listp x) (character-listp y)))) (let ((acl2::__function__ 'icharlisteqv)) (declare (ignorable acl2::__function__)) (if (consp x) (and (consp y) (ichareqv (car x) (car y)) (icharlisteqv (cdr x) (cdr y))) (atom y))))
Theorem:
(defthm icharlisteqv-is-an-equivalence (and (booleanp (icharlisteqv x y)) (icharlisteqv x x) (implies (icharlisteqv x y) (icharlisteqv y x)) (implies (and (icharlisteqv x y) (icharlisteqv y z)) (icharlisteqv x z))) :rule-classes (:equivalence))
Theorem:
(defthm charlisteqv-refines-icharlisteqv (implies (charlisteqv x y) (icharlisteqv x y)) :rule-classes (:refinement))
Theorem:
(defthm icharlisteqv-implies-ichareqv-car-1 (implies (icharlisteqv x x-equiv) (ichareqv (car x) (car x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm icharlisteqv-implies-icharlisteqv-cdr-1 (implies (icharlisteqv x x-equiv) (icharlisteqv (cdr x) (cdr x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm ichareqv-implies-icharlisteqv-cons-1 (implies (ichareqv a a-equiv) (icharlisteqv (cons a x) (cons a-equiv x))) :rule-classes (:congruence))
Theorem:
(defthm icharlisteqv-implies-icharlisteqv-cons-2 (implies (icharlisteqv x x-equiv) (icharlisteqv (cons a x) (cons a x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm icharlisteqv-implies-equal-len-1 (implies (icharlisteqv x x-equiv) (equal (len x) (len x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm icharlisteqv-implies-icharlisteqv-list-fix-1 (implies (icharlisteqv x x-equiv) (icharlisteqv (list-fix x) (list-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm icharlisteqv-implies-ichareqv-nth-2 (implies (icharlisteqv x x-equiv) (ichareqv (nth n x) (nth n x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm icharlisteqv-implies-icharlisteqv-nthcdr-2 (implies (icharlisteqv x x-equiv) (icharlisteqv (nthcdr n x) (nthcdr n x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm icharlisteqv-implies-icharlisteqv-take-2 (implies (icharlisteqv x x-equiv) (icharlisteqv (take n x) (take n x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm icharlisteqv-implies-icharlisteqv-append-1 (implies (icharlisteqv x x-equiv) (icharlisteqv (append x y) (append x-equiv y))) :rule-classes (:congruence))
Theorem:
(defthm icharlisteqv-implies-icharlisteqv-append-2 (implies (icharlisteqv y y-equiv) (icharlisteqv (append x y) (append x y-equiv))) :rule-classes (:congruence))
Theorem:
(defthm icharlisteqv-implies-icharlisteqv-rev-1 (implies (icharlisteqv x x-equiv) (icharlisteqv (rev x) (rev x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm icharlisteqv-implies-icharlisteqv-revappend-2 (implies (icharlisteqv y y-equiv) (icharlisteqv (revappend x y) (revappend x y-equiv))) :rule-classes (:congruence))
Theorem:
(defthm icharlisteqv-implies-icharlisteqv-revappend-1 (implies (icharlisteqv x x-equiv) (icharlisteqv (revappend x y) (revappend x-equiv y))) :rule-classes (:congruence))
Theorem:
(defthm icharlisteqv-implies-icharlisteqv-make-character-list-1 (implies (icharlisteqv x x-equiv) (icharlisteqv (make-character-list x) (make-character-list x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm icharlisteqv-when-not-consp-left (implies (not (consp x)) (equal (icharlisteqv x y) (atom y))))
Theorem:
(defthm icharlisteqv-when-not-consp-right (implies (not (consp y)) (equal (icharlisteqv x y) (atom x))))
Theorem:
(defthm icharlisteqv-of-cons-right (equal (icharlisteqv x (cons a y)) (and (consp x) (ichareqv (car x) (double-rewrite a)) (icharlisteqv (cdr x) (double-rewrite y)))))
Theorem:
(defthm icharlisteqv-of-cons-left (equal (icharlisteqv (cons a x) y) (and (consp y) (ichareqv (double-rewrite a) (car y)) (icharlisteqv (double-rewrite x) (cdr y)))))
Theorem:
(defthm icharlisteqv-when-not-same-lens (implies (not (equal (len x) (len y))) (not (icharlisteqv x y))))