• 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
          • Implementation
          • Setp
          • Right
            • Left
            • Head
            • Double-containment
            • Subset
            • Intersect
            • Insert
            • In
            • Delete
            • Union
            • Diff
            • From-list
            • To-list
            • Set-equiv
            • Sfix
            • Pick-a-point
            • Cardinality
            • Set-induct
            • Set-bi-induct
            • Emptyp
          • Soft
          • C
          • 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
    • Set

    Right

    Get the "right" subset of the nonempty set.

    Signature
    (right set) → right
    Arguments
    set — Guard (setp set).
    Returns
    right — Type (setp right).

    For empty sets, returns nil.

    From a user perspective, this should likely be viewed as an arbitrary proper subset excluding the head and disjoint from the left subset. Concretely, it is the subset for which the head is bst< all elements. In terms of the underlying tree representation, this is the right subtree.

    Definitions and Theorems

    Function: right$inline

    (defun right$inline (set)
      (declare (xargs :guard (setp set)))
      (tree-right (sfix set)))

    Theorem: setp-of-right

    (defthm setp-of-right
      (b* ((right (right$inline set)))
        (setp right))
      :rule-classes :rewrite)