(match-charset set set-index char mode) → *
Function:
(defun match-charset (set set-index char mode) (declare (xargs :guard (and (stringp set) (natp set-index) (characterp char) (matchmode-p mode)))) (declare (xargs :guard (<= set-index (strlen set)))) (let ((__function__ 'match-charset)) (declare (ignorable __function__)) (b* ((set (lstrfix set)) (set-index (lnfix set-index)) ((matchmode mode)) (char (mbe :logic (acl2::char-fix char) :exec char)) ((when (mbe :logic (zp (- (strlen set) set-index)) :exec (eql set-index (strlen set)))) nil) ((when (if mode.case-insens (str::ichareqv (char set set-index) char) (eql (char set set-index) char))) t)) (match-charset set (1+ set-index) char mode))))
Theorem:
(defthm match-charset-of-str-fix-set (equal (match-charset (acl2::str-fix set) set-index char mode) (match-charset set set-index char mode)))
Theorem:
(defthm match-charset-streqv-congruence-on-set (implies (acl2::streqv set set-equiv) (equal (match-charset set set-index char mode) (match-charset set-equiv set-index char mode))) :rule-classes :congruence)
Theorem:
(defthm match-charset-of-nfix-set-index (equal (match-charset set (nfix set-index) char mode) (match-charset set set-index char mode)))
Theorem:
(defthm match-charset-nat-equiv-congruence-on-set-index (implies (acl2::nat-equiv set-index set-index-equiv) (equal (match-charset set set-index char mode) (match-charset set set-index-equiv char mode))) :rule-classes :congruence)
Theorem:
(defthm match-charset-of-char-fix-char (equal (match-charset set set-index (acl2::char-fix char) mode) (match-charset set set-index char mode)))
Theorem:
(defthm match-charset-chareqv-congruence-on-char (implies (acl2::chareqv char char-equiv) (equal (match-charset set set-index char mode) (match-charset set set-index char-equiv mode))) :rule-classes :congruence)
Theorem:
(defthm match-charset-of-matchmode-fix-mode (equal (match-charset set set-index char (matchmode-fix mode)) (match-charset set set-index char mode)))
Theorem:
(defthm match-charset-matchmode-equiv-congruence-on-mode (implies (matchmode-equiv mode mode-equiv) (equal (match-charset set set-index char mode) (match-charset set set-index char mode-equiv))) :rule-classes :congruence)