• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
      • Satlink
      • Truth
      • Ubdds
      • Bdd
      • Faig
      • Bed
      • 4v
        • 4v-sexprs
          • 4v-sexpr-vars
          • 4v-sexpr-eval
          • 4v-sexpr-to-faig
          • 4v-sexpr-restrict-with-rw
          • 4vs-constructors
          • 4v-sexpr-compose-with-rw
          • 4v-sexpr-restrict
          • 4v-sexpr-alist-extract
          • 4v-sexpr-compose
          • 4v-nsexpr-p
          • 4v-sexpr-purebool-p
          • 4v-sexpr-<=
          • Sfaig
          • Sexpr-equivs
          • 3v-syntax-sexprp
          • Sexpr-rewriting
            • 4v-shannon-expansion
            • Onehot-rewriting
            • 4v-sexpr-restrict-with-rw
            • 4v-sexpr-compose-with-rw
            • Sexpr-rewrite
            • Sexpr-rewrite-default
            • Sexpr-rewriting-internals
              • Sexpr-unify
              • Sexpr-rewrite
              • Sexpr-rewrite-try-rules
              • Sexpr-rewrite-ground
              • 4v-sexpr-compose-nofal
                • Sexpr-rewrite-sigma
                • Sexpr-rewrite-fncall
              • *sexpr-rewrites*
            • 4v-sexpr-ind
            • 4v-alist-extract
          • 4v-monotonicity
          • 4v-operations
          • Why-4v-logic
          • 4v-<=
          • 4vp
          • 4vcases
          • 4v-fix
          • 4v-lookup
      • Projects
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Sexpr-rewriting-internals

    4v-sexpr-compose-nofal

    Identical to 4v-sexpr-compose, but not memoized and does not use fast alist lookups.

    Used for rewriting because the terms and alists involved are small. This is called on the RHS of a rewrite rule, which is a small term in common usage; with an alist that may have large terms in its range, but only has a few variables bound. Therefore, it is appropriate to forego memoization and fast alist lookups, since the overhead will outweigh the benefit.

    Definitions and Theorems

    Function: 4v-sexpr-compose-nofal

    (defun 4v-sexpr-compose-nofal (x al)
      (declare (xargs :guard t))
      (if (atom x)
          (and x
               (let ((look (hons-assoc-equal x al)))
                 (and look (cdr look))))
        (hons (car x)
              (4v-sexpr-compose-nofal-list (cdr x)
                                           al))))

    Function: 4v-sexpr-compose-nofal-list

    (defun 4v-sexpr-compose-nofal-list (x al)
      (declare (xargs :guard t))
      (if (atom x)
          x
        (hons (4v-sexpr-compose-nofal (car x) al)
              (4v-sexpr-compose-nofal-list (cdr x)
                                           al))))

    Theorem: 4v-sexpr-compose-nofal-is-4v-sexpr-compose

    (defthm 4v-sexpr-compose-nofal-is-4v-sexpr-compose
      (equal (4v-sexpr-compose-nofal x al)
             (4v-sexpr-compose x al)))

    Theorem: 4v-sexpr-compose-nofal-list-is-4v-sexpr-compose-list

    (defthm 4v-sexpr-compose-nofal-list-is-4v-sexpr-compose-list
      (equal (4v-sexpr-compose-nofal-list x al)
             (4v-sexpr-compose-list x al)))