• 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

    Sllong-rangep

    Check if a mathematical integer is in the range of (i.e. representable in) type signed llong.

    Signature
    (sllong-rangep val ienv) → yes/no
    Arguments
    val — Guard (integerp val).
    ienv — Guard (ienvp ienv).
    Returns
    yes/no — Type (booleanp yes/no).

    Definitions and Theorems

    Function: sllong-rangep

    (defun sllong-rangep (val ienv)
      (declare (xargs :guard (and (integerp val) (ienvp ienv))))
      (let ((__function__ 'sllong-rangep))
        (declare (ignorable __function__))
        (and (<= (sllong-min ienv) (ifix val))
             (<= (ifix val) (sllong-max ienv)))))

    Theorem: booleanp-of-sllong-rangep

    (defthm booleanp-of-sllong-rangep
      (b* ((yes/no (sllong-rangep val ienv)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: sllong-rangep-of-ifix-val

    (defthm sllong-rangep-of-ifix-val
      (equal (sllong-rangep (ifix val) ienv)
             (sllong-rangep val ienv)))

    Theorem: sllong-rangep-int-equiv-congruence-on-val

    (defthm sllong-rangep-int-equiv-congruence-on-val
      (implies (acl2::int-equiv val val-equiv)
               (equal (sllong-rangep val ienv)
                      (sllong-rangep val-equiv ienv)))
      :rule-classes :congruence)

    Theorem: sllong-rangep-of-ienv-fix-ienv

    (defthm sllong-rangep-of-ienv-fix-ienv
      (equal (sllong-rangep val (ienv-fix ienv))
             (sllong-rangep val ienv)))

    Theorem: sllong-rangep-ienv-equiv-congruence-on-ienv

    (defthm sllong-rangep-ienv-equiv-congruence-on-ienv
      (implies (ienv-equiv ienv ienv-equiv)
               (equal (sllong-rangep val ienv)
                      (sllong-rangep val ienv-equiv)))
      :rule-classes :congruence)