• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • 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
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • 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)