Get the codepoint field from a char.
This is an ordinary field accessor created by fty::defprod.
Function:
(defun char->codepoint$inline (x) (declare (xargs :guard (charp x))) (declare (xargs :guard t)) (let ((__function__ 'char->codepoint)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and t x)) (codepoint (nfix (cdr (std::da-nth 0 (cdr x)))))) (if (<= codepoint 1114111) codepoint 0)) :exec (cdr (std::da-nth 0 (cdr x))))))
Theorem:
(defthm natp-of-char->codepoint (b* ((codepoint (char->codepoint$inline x))) (natp codepoint)) :rule-classes :rewrite)
Theorem:
(defthm char->codepoint$inline-of-char-fix-x (equal (char->codepoint$inline (char-fix x)) (char->codepoint$inline x)))
Theorem:
(defthm char->codepoint$inline-char-equiv-congruence-on-x (implies (char-equiv x x-equiv) (equal (char->codepoint$inline x) (char->codepoint$inline x-equiv))) :rule-classes :congruence)