X and Y are single pieces that are mismatched. Do they satisfy our criteria for being considered "possibly a typo"?
(typo-mismatch-plausibly-typo-p x y) → *
Function:
(defun typo-mismatch-plausibly-typo-p (x y) (declare (xargs :guard (and (character-listp x) (character-listp y)))) (let ((__function__ 'typo-mismatch-plausibly-typo-p)) (declare (ignorable __function__)) (and (consp x) (consp y) (str::ichareqv (car x) (car y)) (<= 2 (cardinality (difference (intersect (mergesort x) (mergesort y)) (typo-numbers)))) (not (or (equal (append x (list #\b)) y) (equal (append x (list #\B)) y) (equal x (append y (list #\b))) (equal x (append y (list #\B))))) (not (or (equal (append x (list #\q)) y) (equal (append x (list #\Q)) y) (equal x (append y (list #\q))) (equal x (append y (list #\Q))))) (let ((xlast (car (last x))) (ylast (car (last y)))) (and (not (and (same-lengthp x y) (equal (butlast x 1) (butlast y 1)) (and (vl-typo-number-p xlast) (vl-typo-number-p ylast)))) (not (and (equal (butlast x 1) y) (vl-typo-number-p xlast))) (not (and (equal (butlast y 1) x) (vl-typo-number-p ylast))))))))