• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • Svex-decomposition-methodology
        • Sv-versus-esim
        • Svex-decomp
          • Decomp.lisp
            • Svex-env-compat-union
            • Svdecomp-symenv-compat-union
            • Svexlists-rewrite-until-same
            • Svdecomp-normalize-svexlist-eval
            • Svex-decomp-process-env-term
            • Map-alist-term-keys-to-val-terms
            • Envmap-extract-union-env
            • Alist-collect-compositions
            • Envmap-entry-extract-env
            • Svdecomp-env-extract
            • Svex-alist-evaluation-to-symenv
            • Envmap-entry-to-term-alist
              • Svar-lookup
              • Svar-alist-keys
              • Map-alist-const-keys-to-val-terms
              • Svdecomp-svex?-eval-compare-term
              • Svdecomp-equal-svex-evals-metafun
              • Svdecomp-equal-svex-alist-evals-metafun
              • Envmap->svex-alist
              • Envmap-to-term-alist
              • Svdecomp-equal-svexlist-evals-metafun
              • Pseudo-term-fix
              • Svdecomp-symenv->term
              • Svdecomp-svex-alist-eval-metafun
              • Svdecomp-ev-symenv
              • Svdecomp-svexlist-eval-metafun
              • Svdecomp-svex-eval-metafun
              • Svdecomp-ev-envmap
              • Envmap
              • Svex-alist-alist
              • Svdecomp-symenv
              • Svdecomp-get-rewrite-limit
            • Svdecomp-hints
          • Svex-compose-dfs
          • Svex-compilation
          • Moddb
          • Svmods
          • Svstmt
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Decomp.lisp

    Envmap-entry-to-term-alist

    Signature
    (envmap-entry-to-term-alist x env) → xal
    Arguments
    x — Guard (svex-alist-p x).
    env — Guard (pseudo-termp env).
    Returns
    xal — Type (and (implies (pseudo-termp env) (svdecomp-symenv-p xal)) (svar-alist-p xal)) .

    Definitions and Theorems

    Function: envmap-entry-to-term-alist

    (defun envmap-entry-to-term-alist (x env)
      (declare (xargs :guard (and (svex-alist-p x)
                                  (pseudo-termp env))))
      (let ((__function__ 'envmap-entry-to-term-alist))
        (declare (ignorable __function__))
        (b* (((when (atom x)) nil)
             ((unless (mbt (and (consp (car x))
                                (svar-p (caar x)))))
              (envmap-entry-to-term-alist (cdr x)
                                          env)))
          (cons (cons (caar x)
                      (cons 'svex-eval
                            (cons (cons 'quote
                                        (cons (svex-fix (cdar x)) 'nil))
                                  (cons env 'nil))))
                (envmap-entry-to-term-alist (cdr x)
                                            env)))))

    Theorem: return-type-of-envmap-entry-to-term-alist

    (defthm return-type-of-envmap-entry-to-term-alist
      (b* ((xal (envmap-entry-to-term-alist x env)))
        (and (implies (pseudo-termp env)
                      (svdecomp-symenv-p xal))
             (svar-alist-p xal)))
      :rule-classes :rewrite)

    Theorem: eval-of-envmap-entry-to-term-alist

    (defthm eval-of-envmap-entry-to-term-alist
      (equal (svdecomp-ev-symenv (envmap-entry-to-term-alist x env)
                                 a)
             (svex-alist-eval x (svdecomp-ev env a))))

    Theorem: lookup-in-envmap-entry-to-term-alist

    (defthm lookup-in-envmap-entry-to-term-alist
      (iff (svar-lookup k (envmap-entry-to-term-alist x env))
           (svar-lookup k x)))

    Theorem: no-lookup-when-not-in-svex-alist-fix

    (defthm no-lookup-when-not-in-svex-alist-fix
     (implies (not (svar-lookup k x))
              (not (svar-lookup k (envmap-entry-to-term-alist x env)))))

    Theorem: envmap-entry-to-term-alist-of-svex-alist-fix-x

    (defthm envmap-entry-to-term-alist-of-svex-alist-fix-x
      (equal (envmap-entry-to-term-alist (svex-alist-fix x)
                                         env)
             (envmap-entry-to-term-alist x env)))

    Theorem: envmap-entry-to-term-alist-svex-alist-equiv-congruence-on-x

    (defthm envmap-entry-to-term-alist-svex-alist-equiv-congruence-on-x
      (implies (svex-alist-equiv x x-equiv)
               (equal (envmap-entry-to-term-alist x env)
                      (envmap-entry-to-term-alist x-equiv env)))
      :rule-classes :congruence)