• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
      • Std/osets
      • Std/io
      • Std/basic
        • Maybe-stringp
        • Maybe-natp
        • Two-nats-measure
        • Impossible
        • Bytep
        • Nat-list-measure
        • Maybe-posp
        • Nibblep
        • Organize-symbols-by-pkg
        • Organize-symbols-by-name
        • Lnfix
        • Good-valuep
        • Streqv
        • Chareqv
        • Symbol-package-name-non-cl
          • Arith-equivs
          • Induction-schemes
          • Maybe-integerp
          • Char-fix
          • Pos-fix
          • Symbol-package-name-lst
          • Mbt$
          • Maybe-bitp
          • Good-pseudo-termp
          • Str-fix
          • Maybe-string-fix
          • Nonkeyword-listp
          • Lifix
          • Bfix
          • Std/basic/if*
          • Impliez
          • Tuplep
          • Std/basic/intern-in-package-of-symbol
          • Lbfix
          • Std/basic/symbol-name-lst
          • True
          • Std/basic/rfix
          • Std/basic/realfix
          • Std/basic/member-symbol-name
          • Std/basic/fix
          • False
          • Std/basic/nfix
          • Std/basic/ifix
        • Std/system
        • Std/typed-lists
        • Std/bitsets
        • Std/testing
        • Std/typed-alists
        • Std/stobjs
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Std/basic

    Symbol-package-name-non-cl

    The symbol-package-name of a symbol, but not "COMMON-LISP".

    Signature
    (symbol-package-name-non-cl sym) → pkg
    Arguments
    sym — Guard (symbolp sym).
    Returns
    pkg — Type (stringp pkg).

    This function is just symbol-package-name, except that it never returns "COMMON-LISP": if the symbol-package-name is "COMMON-LISP", we return "ACL2" instead.

    Example:

    ACL2 !>(symbol-package-name-non-cl 'car)
    "ACL2"
    ACL2 !>(symbol-package-name 'car)
    "COMMON-LISP"
    ACL2 !>

    This utility may be useful to obtain, from an existing symbol, a package name into whose package we want to intern a symbol for a new function name, which cannot be interned into the "COMMON-LISP" package.

    Definitions and Theorems

    Function: symbol-package-name-non-cl

    (defun symbol-package-name-non-cl (sym)
      (declare (xargs :guard (symbolp sym)))
      (let ((__function__ 'symbol-package-name-non-cl))
        (declare (ignorable __function__))
        (fix-pkg (symbol-package-name sym))))

    Theorem: stringp-of-symbol-package-name-non-cl

    (defthm stringp-of-symbol-package-name-non-cl
      (b* ((pkg (symbol-package-name-non-cl sym)))
        (stringp pkg))
      :rule-classes :rewrite)