• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Error-checking
        • Apt
        • Abnf
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Prime-field-constraint-systems
        • Soft
        • Bv
        • Imp-language
        • Event-macros
        • Bitcoin
        • Ethereum
        • Yul
          • Transformations
          • Language
            • Abstract-syntax
            • Dynamic-semantics
            • Concrete-syntax
            • Static-soundness
              • Static-soundess-of-execution
              • Theorems-about-cstate-to-vars-and-execution
              • Static-soundness-theorems-about-add-funs
              • Static-soundness-theorems-about-modes
              • Static-soundness-theorems-about-init-local
              • Check-var-list
              • Funinfo-safep
              • Static-soundness-theorems-about-find-fun
              • Funenv-to-funtable
              • Theorems-about-checking-expression-lists-in-reverse
              • Static-soundness-of-variable-writing
              • Funscope-to-funtable
              • Funenv-safep
              • Funscope-safep
              • Cstate-to-vars
              • Funinfo-to-funtype
              • Static-soundness-of-variable-addition
                • Static-soundness-of-variable-reading
                • Static-soundness-of-literal-execution
                • Exec-top-block-static-soundness
                • Static-soundness-of-path-execution
              • Static-semantics
              • Errors
            • Yul-json
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Java
          • C
          • Syntheto
          • Number-theory
          • Cryptography
          • Lists-light
          • File-io-light
          • Json
          • Built-ins
          • Solidity
          • Axe
          • Std-extensions
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Execloader
        • Axe
      • Testing-utilities
      • Math
    • Static-soundness

    Static-soundness-of-variable-addition

    Theorems about the static soundness of variable addition.

    If add-var and add-vars succeed, also add-var-value and add-vars-values do. Furthermore, the variable table for the resulting computation states is the same returned by the safety checks.

    Definitions and Theorems

    Theorem: add-var-value-when-add-var

    (defthm add-var-value-when-add-var
            (b* ((varset1 (add-var var (cstate-to-vars cstate)))
                 (cstate1 (add-var-value var val cstate)))
                (implies (not (reserrp varset1))
                         (and (not (reserrp cstate1))
                              (equal (cstate-to-vars cstate1)
                                     varset1)))))

    Theorem: add-vars-values-when-add-vars

    (defthm add-vars-values-when-add-vars
            (b* ((varset1 (add-vars vars (cstate-to-vars cstate)))
                 (cstate1 (add-vars-values vars vals cstate)))
                (implies (and (not (reserrp varset1))
                              (equal (len vals) (len vars)))
                         (and (not (reserrp cstate1))
                              (equal (cstate-to-vars cstate1)
                                     varset1)))))