• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
      • Sha-2
      • Yul
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Axe
      • Poseidon
      • Where-do-i-place-my-book
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
              • Dynamic-semantics
                • Execution
                • Values
                • Dynamic-environments
                • Arithmetic-operations
                • Curve-parameterization
                • Shift-operations
                • Errors
                • Value-expressions
                • Locations
                  • Location
                    • Location-case
                    • Location-fix
                    • Location-count
                    • Location-equiv
                    • Locationp
                    • Location-tuple-comp
                    • Location-struct-comp
                      • Make-location-struct-comp
                      • Location-struct-comp->struct
                        • Location-struct-comp->name
                        • Change-location-struct-comp
                      • Location-var
                      • Location-kind
                  • Input-execution
                  • Edwards-bls12-generator
                  • Equality-operations
                  • Logical-operations
                  • Program-execution
                  • Ordering-operations
                  • Bitwise-operations
                  • Literal-evaluation
                  • Type-maps-for-struct-components
                  • Output-execution
                  • Tuple-operations
                  • Struct-operations
                • Compilation
                • Static-semantics
                • Concrete-syntax
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Location-struct-comp

    Location-struct-comp->struct

    Get the struct field from a location-struct-comp.

    Signature
    (location-struct-comp->struct x) → struct
    Arguments
    x — Guard (locationp x).
    Returns
    struct — Type (locationp struct).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: location-struct-comp->struct$inline

    (defun location-struct-comp->struct$inline (x)
      (declare (xargs :guard (locationp x)))
      (declare (xargs :guard (equal (location-kind x) :struct-comp)))
      (let ((__function__ 'location-struct-comp->struct))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((x (and (equal (location-kind x) :struct-comp)
                          x)))
               (location-fix (std::da-nth 0 (cdr x))))
             :exec (std::da-nth 0 (cdr x)))))

    Theorem: locationp-of-location-struct-comp->struct

    (defthm locationp-of-location-struct-comp->struct
      (b* ((struct (location-struct-comp->struct$inline x)))
        (locationp struct))
      :rule-classes :rewrite)

    Theorem: location-struct-comp->struct$inline-of-location-fix-x

    (defthm location-struct-comp->struct$inline-of-location-fix-x
      (equal (location-struct-comp->struct$inline (location-fix x))
             (location-struct-comp->struct$inline x)))

    Theorem: location-struct-comp->struct$inline-location-equiv-congruence-on-x

    (defthm
     location-struct-comp->struct$inline-location-equiv-congruence-on-x
     (implies (location-equiv x x-equiv)
              (equal (location-struct-comp->struct$inline x)
                     (location-struct-comp->struct$inline x-equiv)))
     :rule-classes :congruence)

    Theorem: location-struct-comp->struct-when-wrong-kind

    (defthm location-struct-comp->struct-when-wrong-kind
      (implies (not (equal (location-kind x) :struct-comp))
               (equal (location-struct-comp->struct x)
                      (location-fix nil))))