• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
      • Std/osets
        • Omaps
          • Defomap
          • Update
          • Mapp
          • Assoc
          • Update*
          • Size
          • Keys
          • From-lists
          • Update-induction-on-maps
          • Compatiblep
          • Tail
          • Head
          • Restrict
          • Submap
          • Map
          • Rlookup
          • Emptyp
          • Rlookup*
          • Lookup*
          • Delete*
          • Values
            • In*
            • Lookup
            • Delete
            • Mfix
            • Head-val
            • Head-key
            • Omap-induction2
            • Omap-order-rules
          • All-by-membership
          • Defset
          • In
          • Primitives
          • Subset
          • Mergesort
          • Intersect
          • Union
          • Pick-a-point-subset-strategy
          • Delete
          • Double-containment
          • Difference
          • Cardinality
          • Set
          • Intersectp
        • Std/io
        • Std/basic
        • Std/system
        • Std/typed-lists
        • Std/bitsets
        • Std/testing
        • Std/typed-alists
        • Std/stobjs
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Omaps

    Values

    Oset of the values of an omap.

    Signature
    (values map) → vals
    Arguments
    map — Guard (mapp map).
    Returns
    vals — Type (setp vals).

    Definitions and Theorems

    Function: values

    (defun values (map)
      (declare (xargs :guard (mapp map)))
      (let ((__function__ 'values))
        (declare (ignorable __function__))
        (cond ((emptyp map) nil)
              (t (mv-let (key val)
                         (head map)
                   (declare (ignore key))
                   (insert val (values (tail map))))))))

    Theorem: setp-of-values

    (defthm setp-of-values
      (b* ((vals (values map))) (setp vals))
      :rule-classes :rewrite)

    Theorem: values-when-emptyp

    (defthm values-when-emptyp
      (implies (emptyp map)
               (equal (values map) nil))
      :rule-classes (:rewrite :type-prescription))

    Theorem: in-values-when-assoc

    (defthm in-values-when-assoc
      (implies (equal (assoc a m) (cons a b))
               (set::in b (values m))))

    Theorem: value-of-update-when-not-assoc

    (defthm value-of-update-when-not-assoc
      (implies (not (consp (assoc key map)))
               (equal (values (update key val map))
                      (insert val (values map)))))