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