Map an identiifer to an identifier in the language definition.
Since the language definition requires ACL2 strings, we throw an error if the identifier is not an ACL2 string.
Function:
(defun ldm-ident (ident) (declare (xargs :guard (identp ident))) (let ((__function__ 'ldm-ident)) (declare (ignorable __function__)) (b* (((reterr) (c::ident "irrelevant")) (string (ident->unwrap ident)) ((unless (stringp string)) (reterr (msg "Unsupported identifier with non-string ~x0." string)))) (retok (c::ident string)))))
Theorem:
(defthm identp-of-ldm-ident.ident1 (b* (((mv acl2::?erp ?ident1) (ldm-ident ident))) (c::identp ident1)) :rule-classes :rewrite)
Theorem:
(defthm ldm-ident-of-ident-fix-ident (equal (ldm-ident (ident-fix ident)) (ldm-ident ident)))
Theorem:
(defthm ldm-ident-ident-equiv-congruence-on-ident (implies (ident-equiv ident ident-equiv) (equal (ldm-ident ident) (ldm-ident ident-equiv))) :rule-classes :congruence)