• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
        • Symbolic-test-vectors
        • Esim-primitives
        • E-conversion
        • Esim-steps
        • Patterns
          • Pat->al
          • Pat-flatten1
          • Member-of-pat-flatten
          • Similar-patternsp
          • Pat-flatten
          • Al->pat
          • Assoc-pat->al
          • Subsetp-of-pat-flatten
            • Pat->fal
            • Data-for-patternp
          • Mod-internal-paths
          • Defmodules
          • Esim-simplify-update-fns
          • Esim-tutorial
          • Esim-vl
        • Vl2014
        • Sv
        • Vwsim
        • Fgl
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Testing-utilities
      • Math
    • Patterns

    Subsetp-of-pat-flatten

    (subsetp-of-pat-flatten x pat) is an optimized way to ask if x is a subset of (pat-flatten1 pat).

    This just avoids flattening the pattern. Don't expect it to be super fast; it's still O(n^2).

    Definitions and Theorems

    Function: subsetp-of-pat-flatten

    (defun subsetp-of-pat-flatten (x pat)
           (declare (xargs :guard t))
           (mbe :logic (subsetp-equal x (pat-flatten1 pat))
                :exec (if (atom x)
                          t
                          (and (member-of-pat-flatten (car x) pat)
                               (subsetp-of-pat-flatten (cdr x) pat)))))