Check if a lexeme is a hash
That is, check if the lexeme is the punctuator
Function:
(defun plexeme-hashp (lexeme) (declare (xargs :guard (plexemep lexeme))) (and (plexeme-case lexeme :punctuator) (b* ((string (plexeme-punctuator->punctuator lexeme))) (or (equal string "#") (equal string "%:")))))
Theorem:
(defthm booleanp-of-plexeme-hashp (b* ((yes/no (plexeme-hashp lexeme))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm plexeme-hashp-of-plexeme-fix-lexeme (equal (plexeme-hashp (plexeme-fix lexeme)) (plexeme-hashp lexeme)))
Theorem:
(defthm plexeme-hashp-plexeme-equiv-congruence-on-lexeme (implies (plexeme-equiv lexeme lexeme-equiv) (equal (plexeme-hashp lexeme) (plexeme-hashp lexeme-equiv))) :rule-classes :congruence)