• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
          • Transformations
          • Language
            • Abstract-syntax
            • Dynamic-semantics
              • Exec
              • Find-fun
              • Init-local
              • Write-vars-values
              • Add-vars-values
              • Add-funs
              • Eoutcome
              • Soutcome
              • Ensure-funscope-disjoint
              • Write-var-value
              • Restrict-vars
              • Add-var-value
              • Funinfo
              • Exec-top-block
              • Values
              • Cstate
              • Funinfo+funenv
              • Read-vars-values
              • Read-var-value
              • Funenv
              • Funscope-for-fundefs
              • Exec-path
              • Path-to-var
              • Funinfo+funenv-result
              • Exec-literal
              • Soutcome-result
              • Mode-set-result
              • Literal-evaluation
              • Funscope-result
              • Funinfo-result
              • Funenv-result
              • Eoutcome-result
              • Cstate-result
              • Paths-to-vars
                • Funinfo-for-fundef
                • Lstate
                • Funscope
                • Mode-set
                • Modes
              • Concrete-syntax
              • Static-soundness
              • Static-semantics
              • Errors
            • Yul-json
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Dynamic-semantics

    Paths-to-vars

    Extract variables from paths.

    Signature
    (paths-to-vars paths) → vars
    Arguments
    paths — Guard (path-listp paths).
    Returns
    vars — Type (identifier-list-resultp vars).

    This lifts path-to-var to lists.

    Definitions and Theorems

    Function: paths-to-vars

    (defun paths-to-vars (paths)
      (declare (xargs :guard (path-listp paths)))
      (let ((__function__ 'paths-to-vars))
        (declare (ignorable __function__))
        (b* (((when (endp paths)) nil)
             ((okf var) (path-to-var (car paths)))
             ((okf vars)
              (paths-to-vars (cdr paths))))
          (cons var vars))))

    Theorem: identifier-list-resultp-of-paths-to-vars

    (defthm identifier-list-resultp-of-paths-to-vars
      (b* ((vars (paths-to-vars paths)))
        (identifier-list-resultp vars))
      :rule-classes :rewrite)

    Theorem: len-of-paths-to-vars

    (defthm len-of-paths-to-vars
      (b* ((?vars (paths-to-vars paths)))
        (implies (not (reserrp vars))
                 (equal (len vars) (len paths)))))

    Theorem: error-info-wfp-of-paths-to-vars

    (defthm error-info-wfp-of-paths-to-vars
      (b* ((?vars (paths-to-vars paths)))
        (implies (reserrp vars)
                 (error-info-wfp vars))))

    Theorem: paths-to-vars-of-path-list-fix-paths

    (defthm paths-to-vars-of-path-list-fix-paths
      (equal (paths-to-vars (path-list-fix paths))
             (paths-to-vars paths)))

    Theorem: paths-to-vars-path-list-equiv-congruence-on-paths

    (defthm paths-to-vars-path-list-equiv-congruence-on-paths
      (implies (path-list-equiv paths paths-equiv)
               (equal (paths-to-vars paths)
                      (paths-to-vars paths-equiv)))
      :rule-classes :congruence)