• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • 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
      • Debugging
      • Projects
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Sexpr-rewriting-internals

    Sexpr-rewrite-fncall

    Apply sexpr-rewriting to a function applied to some args, which are assumed to already be simplified.

    In sexpr-rewriting (see sexpr-rewrite), when rewriting a function application, the arguments are first recursively rewritten, and then sexpr-rewrite-fncall is applied to simplify the function applied to those args. This works by matching the args to the rewrite rules associated with that function symbol (using sexpr-rewrite-try-rules) and then recursively rewriting the resulting RHS and substitution using sexpr-rewrite-sigma. If no rewrite rules are found, ground evaluation is done using sexpr-rewrite-ground.