• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
        • Proof-support
        • Semantics
        • Lifting
        • R1cs-subset
        • Well-formedness
        • Abstract-syntax
          • Syntax-abstraction
          • Abstract-syntax-trees
            • Expression
            • Name
              • Name-case
              • Name-fix
              • Namep
              • Name-equiv
              • Name-indexed
              • Name-simple
                • Name-simple->string
                  • Make-name-simple
                  • Change-name-simple
                • Name-kind
              • Definition
              • Constraint
              • Definition-option
              • System
              • System-result
              • Name-list-result
              • Expression-result
              • Expression-list-result
              • Definition-result
              • Definition-list-result
              • Constraint-result
              • Constraint-list-result
              • Name-result
              • Expression-list
              • Definition-list
              • Constraint-list
              • Name-set
              • Name-list
            • Abstract-syntax-operations
            • Convenience-constructors
          • Concrete-syntax
          • R1cs-bridge
          • Parser-interface
        • Legacy-defrstobj
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Riscv
        • Bitcoin
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Name-simple

    Name-simple->string

    Get the string field from a name-simple.

    Signature
    (name-simple->string x) → string
    Arguments
    x — Guard (namep x).
    Returns
    string — Type (stringp string).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: name-simple->string$inline

    (defun name-simple->string$inline (x)
      (declare (xargs :guard (namep x)))
      (declare (xargs :guard (equal (name-kind x) :simple)))
      (let ((__function__ 'name-simple->string))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((x (and (equal (name-kind x) :simple) x)))
               (str-fix (std::da-nth 0 (cdr x))))
             :exec (std::da-nth 0 (cdr x)))))

    Theorem: stringp-of-name-simple->string

    (defthm stringp-of-name-simple->string
      (b* ((string (name-simple->string$inline x)))
        (stringp string))
      :rule-classes :rewrite)

    Theorem: name-simple->string$inline-of-name-fix-x

    (defthm name-simple->string$inline-of-name-fix-x
      (equal (name-simple->string$inline (name-fix x))
             (name-simple->string$inline x)))

    Theorem: name-simple->string$inline-name-equiv-congruence-on-x

    (defthm name-simple->string$inline-name-equiv-congruence-on-x
      (implies (name-equiv x x-equiv)
               (equal (name-simple->string$inline x)
                      (name-simple->string$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: name-simple->string-when-wrong-kind

    (defthm name-simple->string-when-wrong-kind
      (implies (not (equal (name-kind x) :simple))
               (equal (name-simple->string x)
                      (str-fix nil))))