• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
          • Syntax-for-tools
            • Disambiguator
            • Abstract-syntax
            • Parser
            • Validator
            • Printer
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
            • Defpred
            • Output-files
            • Abstract-syntax-operations
            • Validation-information
            • Implementation-environments
              • Ienv
              • Ushort-rangep
              • Ullong-rangep
              • Sshort-rangep
              • Sllong-rangep
              • Ulong-rangep
              • Uint-rangep
              • Slong-rangep
              • Sint-rangep
              • Ushort-max
              • Ulong-max
              • Ullong-max
              • Uint-max
              • Uchar-rangep
              • Sshort-min
              • Sllong-min
              • Schar-rangep
              • Char-min
              • Char-max
              • Sshort-max
                • Slong-min
                • Slong-max
                • Sllong-max
                • Sint-min
                • Sint-max
                • Uchar-max
                • Schar-min
                • Schar-max
                • Ienv-default
              • Concrete-syntax
              • Unambiguity
              • Ascii-identifiers
              • Preprocessing
              • Abstraction-mapping
            • Atc
            • Language
            • Representation
            • Transformation-tools
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Implementation-environments

    Sshort-max

    Maximum mathematical integer value of type signed short.

    Signature
    (sshort-max ienv) → val
    Arguments
    ienv — Guard (ienvp ienv).
    Returns
    val — Type (natp val).

    This depends on the implementation environment.

    Definitions and Theorems

    Function: sshort-max

    (defun sshort-max (ienv)
      (declare (xargs :guard (ienvp ienv)))
      (let ((__function__ 'sshort-max))
        (declare (ignorable __function__))
        (1- (expt 2
                  (1- (* 8 (ienv->short-bytes ienv)))))))

    Theorem: natp-of-sshort-max

    (defthm natp-of-sshort-max
      (b* ((val (sshort-max ienv)))
        (natp val))
      :rule-classes (:rewrite :type-prescription))

    Theorem: sshort-max-of-ienv-fix-ienv

    (defthm sshort-max-of-ienv-fix-ienv
      (equal (sshort-max (ienv-fix ienv))
             (sshort-max ienv)))

    Theorem: sshort-max-ienv-equiv-congruence-on-ienv

    (defthm sshort-max-ienv-equiv-congruence-on-ienv
      (implies (ienv-equiv ienv ienv-equiv)
               (equal (sshort-max ienv)
                      (sshort-max ienv-equiv)))
      :rule-classes :congruence)