• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
        • C
          • Syntax-for-tools
          • Atc
          • Transformation-tools
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
              • Exec-expr
              • Exec
              • Exec-expr-pure
              • Exec-arrsub
              • Variable-resolution-preservation
              • Init-value-to-value
              • Apconvert-expr-value
              • Execution-limit-monotonicity
              • Exec-memberp
              • Exec-stmt
              • Exec-address
              • Init-scope
              • Exec-unary
              • Exec-member
              • Exec-fun
              • Exec-stmt-while
              • Eval-iconst
              • Exec-binary-strict-pure
              • Variable-visibility-preservation
                • Var-visible-preservep-of-exec
                • Var-visible-preservep
                  • Var-visible-of-exec
                  • Var-visible-preservep-of-exit-scope-when-enter-scope
                  • Var-visible-preservep-of-pop-frame-when-push-frame
                  • Var-visible-preservep-of-exit-scope-and-exit-scope
                  • Var-visible-preservep-of-pop-frame-and-pop-frame
                  • Var-visible-preservep-of-trans-exit-scope-when-enter-scope
                  • Var-visible-preservep-of-create-var
                  • Var-visible-preservep-of-write-object
                • Exec-expr-pure-list
                • Object-type-preservation
                • Eval-binary-strict-pure
                • Exec-block-item-list
                • Exec-indir
                • Exec-ident
                • Exec-block-item
                • Eval-cast
                • Frame-and-scope-peeling
                • Exec-obj-declon
                • Exec-cast
                • Exec-const
                • Eval-unary
                • Exec-stmt-dowhile
                • Pure-expression-execution
                • Exec-initer
                • Eval-const
                • Execution-without-function-calls
              • Static-semantics
              • Grammar
              • Types
              • Integer-formats-definitions
              • Computation-states
              • Portable-ascii-identifiers
              • Values
              • Integer-operations
              • Object-designators
              • Operations
              • Errors
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Variable-visibility-preservation

    Var-visible-preservep

    Check if all variable names visible in a computation state are also visible in another computation state, for any number of peeled frames and scopes.

    This expresses the property that we want to prove by induction.

    Definitions and Theorems

    Theorem: var-visible-preservep-necc

    (defthm var-visible-preservep-necc
     (implies
      (var-visible-preservep compst compst1)
      (implies
         (and (identp var)
              (natp n)
              (natp m)
              (objdesign-of-var var
                                (peel-scopes m (peel-frames n compst))))
         (objdesign-of-var var
                           (peel-scopes m (peel-frames n compst1))))))

    Theorem: booleanp-of-var-visible-preservep

    (defthm booleanp-of-var-visible-preservep
      (b* ((yes/no (var-visible-preservep compst compst1)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: var-visible-preservep-of-compustate-fix-compst

    (defthm var-visible-preservep-of-compustate-fix-compst
      (equal (var-visible-preservep (compustate-fix compst)
                                    compst1)
             (var-visible-preservep compst compst1)))

    Theorem: var-visible-preservep-compustate-equiv-congruence-on-compst

    (defthm var-visible-preservep-compustate-equiv-congruence-on-compst
      (implies (compustate-equiv compst compst-equiv)
               (equal (var-visible-preservep compst compst1)
                      (var-visible-preservep compst-equiv compst1)))
      :rule-classes :congruence)

    Theorem: var-visible-preservep-of-compustate-fix-compst1

    (defthm var-visible-preservep-of-compustate-fix-compst1
      (equal (var-visible-preservep compst (compustate-fix compst1))
             (var-visible-preservep compst compst1)))

    Theorem: var-visible-preservep-compustate-equiv-congruence-on-compst1

    (defthm var-visible-preservep-compustate-equiv-congruence-on-compst1
      (implies (compustate-equiv compst1 compst1-equiv)
               (equal (var-visible-preservep compst compst1)
                      (var-visible-preservep compst compst1-equiv)))
      :rule-classes :congruence)

    Theorem: var-visible-preservep-reflexive

    (defthm var-visible-preservep-reflexive
      (var-visible-preservep compst compst))

    Theorem: var-visible-preservep-transitive

    (defthm var-visible-preservep-transitive
      (implies (and (var-visible-preservep compst compst1)
                    (var-visible-preservep compst1 compst2))
               (var-visible-preservep compst compst2)))