Check an identifier.
(check-ident id) → wf?
We check whether the underlying ACL2 string forms a portable ASCII identifier.
Function:
(defun check-ident (id) (declare (xargs :guard (identp id))) (let ((__function__ 'check-ident)) (declare (ignorable __function__)) (if (paident-stringp (ident->name id)) :wellformed (reserrf (list :illegal/unsupported-ident (ident-fix id))))))
Theorem:
(defthm wellformed-resultp-of-check-ident (b* ((wf? (check-ident id))) (wellformed-resultp wf?)) :rule-classes :rewrite)
Theorem:
(defthm check-ident-of-ident-fix-id (equal (check-ident (ident-fix id)) (check-ident id)))
Theorem:
(defthm check-ident-ident-equiv-congruence-on-id (implies (ident-equiv id id-equiv) (equal (check-ident id) (check-ident id-equiv))) :rule-classes :congruence)