• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
        • C
          • Syntax-for-tools
          • Atc
          • Transformation-tools
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Types
            • Integer-formats-definitions
            • Computation-states
            • Portable-ascii-identifiers
            • Values
              • Pointer
              • Member-types-of-member-values
              • Expr-value
              • Member-value-list->value-list
              • Member-value-list->name-list
              • Type-list-of-value-list
              • Type-of-value
              • Stmt-value
              • Value-option
              • Expr-value-option
              • Init-value
              • Value-result
              • Type-of-value-option
              • Value-list-result
              • Stmt-value-result
              • Member-value-list-result
              • Init-value-result
              • Expr-value-result
              • Expr-value-option-result
              • Value-option-result
              • Signed/unsigned-byte-p-of-integer-values
              • Bounds-of-integer-values
                • Value-promoted-arithmeticp
                • Type-option-of-stmt-value
                • Member-type-of-member-value
                • Init-type-of-init-value
                • Value-unsigned-integerp
                • Value-signed-integerp
                • Value-integerp
                • Value-arithmeticp
                • Value-scalarp
                • Value-realp
                • Values/membervalues
              • Integer-operations
              • Object-designators
              • Operations
              • Errors
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Values

    Bounds-of-integer-values

    Linear rules about the bounds of the integer values.

    Definitions and Theorems

    Theorem: value-schar->get-bound

    (defthm value-schar->get-bound
      (and (<= (schar-min) (value-schar->get x))
           (<= (value-schar->get x) (schar-max)))
      :rule-classes :linear)

    Theorem: value-uchar->get-bound

    (defthm value-uchar->get-bound
      (and (<= 0 (value-uchar->get x))
           (<= (value-uchar->get x) (uchar-max)))
      :rule-classes :linear)

    Theorem: value-sshort->get-bound

    (defthm value-sshort->get-bound
      (and (<= (sshort-min) (value-sshort->get x))
           (<= (value-sshort->get x) (sshort-max)))
      :rule-classes :linear)

    Theorem: value-ushort->get-bound

    (defthm value-ushort->get-bound
      (and (<= 0 (value-ushort->get x))
           (<= (value-ushort->get x) (ushort-max)))
      :rule-classes :linear)

    Theorem: value-sint->get-bound

    (defthm value-sint->get-bound
      (and (<= (sint-min) (value-sint->get x))
           (<= (value-sint->get x) (sint-max)))
      :rule-classes :linear)

    Theorem: value-uint->get-bound

    (defthm value-uint->get-bound
      (and (<= 0 (value-uint->get x))
           (<= (value-uint->get x) (uint-max)))
      :rule-classes :linear)

    Theorem: value-slong->get-bound

    (defthm value-slong->get-bound
      (and (<= (slong-min) (value-slong->get x))
           (<= (value-slong->get x) (slong-max)))
      :rule-classes :linear)

    Theorem: value-ulong->get-bound

    (defthm value-ulong->get-bound
      (and (<= 0 (value-ulong->get x))
           (<= (value-ulong->get x) (ulong-max)))
      :rule-classes :linear)

    Theorem: value-sllong->get-bound

    (defthm value-sllong->get-bound
      (and (<= (sllong-min) (value-sllong->get x))
           (<= (value-sllong->get x) (sllong-max)))
      :rule-classes :linear)

    Theorem: value-ullong->get-bound

    (defthm value-ullong->get-bound
      (and (<= 0 (value-ullong->get x))
           (<= (value-ullong->get x) (ullong-max)))
      :rule-classes :linear)