• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Lexer
            • Lex-strings
            • Lex-identifiers
            • Vl-typo-uppercase-p
            • Vl-typo-number-p
            • Vl-typo-lowercase-p
            • Lex-numbers
              • Vl-z-digit-p
              • Vl-x-digit-p
              • Vl-underscore-or-octal-digit-p
              • Vl-underscore-or-hex-digit-p
              • Vl-underscore-or-decimal-digit-p
              • Vl-underscore-or-binary-digit-p
              • Vl-octal-digit-p
              • Vl-non-zero-decimal-digit-p
              • Vl-hex-digit-p
              • Vl-decimal-digit-p
              • Vl-binary-digit-p
              • Vl-lex-integer
              • Vl-correct-bitlist
              • Vl-lex-time-or-real-number
              • Vl-read-decimal-value
              • Vl-lex-unbased-unsized-literal
              • Vl-lex-number
              • Vl-read-non-zero-unsigned-number
              • Vl-read-any-base
              • Vl-read-unsigned-number
              • Vl-read-time-unit
              • Vl-read-binary-value
              • Vl-read-real-tail
              • Vl-read-octal-value
              • Vl-read-hex-value
              • Vl-read-decimal-base
              • Vl-read-octal-base
              • Vl-read-hex-base
                • Vl-read-hex-base-prefix/remainder-thms
              • Vl-read-binary-base
              • Vl-hex-digits-to-bitlist
              • Vl-octal-digits-to-bitlist
              • Vl-decimal-digits-to-bitlist
              • Vl-binary-digits-to-bitlist
              • Vl-underscore-or-octal-digit-list-p
              • Vl-underscore-or-hex-digit-list-p
              • Vl-underscore-or-decimal-digit-list-p
              • Vl-underscore-or-binary-digit-list-p
              • Vl-non-zero-decimal-digit-list-p
              • Vl-decimal-digit-list-p
              • Vl-binary-digit-list-p
              • Vl-z-digit-list-p
              • Vl-x-digit-list-p
              • Vl-octal-digit-list-p
              • Vl-hex-digit-list-p
              • Vl-timeunit-lookup
            • Chartypes
            • Vl-lex
            • Defchar
            • Tokens
            • Lex-keywords
            • Lexstate
            • Make-test-tokens
            • Lexer-utils
            • Lex-comments
            • Vl-typo-uppercase-list-p
            • Vl-typo-lowercase-list-p
            • Vl-typo-number-list-p
          • Vl-loadstate
          • Parser
          • Vl-load-merge-descriptions
          • Scope-of-defines
          • Vl-load-file
          • Vl-flush-out-descriptions
          • Vl-description
          • Vl-loadresult
          • Vl-read-file
          • Vl-find-basename/extension
          • Vl-find-file
          • Vl-read-files
          • Extended-characters
          • Vl-load
          • Vl-load-main
          • Vl-load-description
          • Vl-descriptions-left-to-load
          • Inject-warnings
          • Vl-load-descriptions
          • Vl-load-files
          • Vl-load-summary
          • Vl-collect-modules-from-descriptions
          • Vl-descriptionlist
        • Transforms
        • Lint
        • Mlib
        • Server
        • Kit
        • Printer
        • Esim-vl
        • Well-formedness
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Lex-numbers

Vl-read-hex-base

hex_base ::= '[s|S]h | '[s|S]H.

Signature
(vl-read-hex-base echars) → (mv prefix remainder)
Arguments
echars — Guard (vl-echarlist-p echars).

Embedded spaces are not allowed.

Definitions and Theorems

Function: vl-read-hex-base$inline

(defun vl-read-hex-base$inline (echars)
  (declare (xargs :guard (vl-echarlist-p echars)))
  (let ((__function__ 'vl-read-hex-base))
    (declare (ignorable __function__))
    (vl-read-some-literal '("'h" "'H" "'sh" "'sH" "'Sh" "'SH")
                          echars)))

Theorem: prefix-of-vl-read-hex-base

(defthm prefix-of-vl-read-hex-base
 (and
    (true-listp (mv-nth 0 (vl-read-hex-base echars)))
    (implies (force (vl-echarlist-p echars))
             (vl-echarlist-p (mv-nth 0 (vl-read-hex-base echars)))))
 :rule-classes
 ((:rewrite)
  (:type-prescription
     :corollary (true-listp (mv-nth 0 (vl-read-hex-base echars))))))

Theorem: remainder-of-vl-read-hex-base

(defthm remainder-of-vl-read-hex-base
 (and
    (equal (true-listp (mv-nth 1 (vl-read-hex-base echars)))
           (true-listp echars))
    (implies (force (vl-echarlist-p echars))
             (vl-echarlist-p (mv-nth 1 (vl-read-hex-base echars)))))
 :rule-classes
 ((:rewrite)
  (:type-prescription
      :corollary
      (implies (true-listp echars)
               (true-listp (mv-nth 1 (vl-read-hex-base echars)))))))

Theorem: append-of-vl-read-hex-base

(defthm append-of-vl-read-hex-base
  (equal (append (mv-nth 0 (vl-read-hex-base echars))
                 (mv-nth 1 (vl-read-hex-base echars)))
         echars))

Theorem: no-change-loser-of-vl-read-hex-base

(defthm no-change-loser-of-vl-read-hex-base
  (implies (not (mv-nth 0 (vl-read-hex-base echars)))
           (equal (mv-nth 1 (vl-read-hex-base echars))
                  echars)))

Theorem: acl2-count-of-vl-read-hex-base-weak

(defthm acl2-count-of-vl-read-hex-base-weak
  (<= (acl2-count (mv-nth 1 (vl-read-hex-base echars)))
      (acl2-count echars))
  :rule-classes ((:rewrite) (:linear)))

Theorem: acl2-count-of-vl-read-hex-base-strong

(defthm acl2-count-of-vl-read-hex-base-strong
  (implies (mv-nth 0 (vl-read-hex-base echars))
           (< (acl2-count (mv-nth 1 (vl-read-hex-base echars)))
              (acl2-count echars)))
  :rule-classes ((:rewrite) (:linear)))

Subtopics

Vl-read-hex-base-prefix/remainder-thms
Prefix and remainder theorems for vl-read-hex-base, automatically generated by def-prefix/remainder-thms.