• 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
              • Compilation
              • Static-semantics
                • Type-checking
                • Static-environments
                  • Var/const-sinfo
                  • Ident-sinfo
                  • Function-sinfo
                  • Var/const-sinfo-option
                  • Struct-sinfo-option
                  • Struct-sinfo
                  • Ident-sinfo-option
                  • Function-sinfo-option
                  • Senv-option
                  • Add-var/const-sinfo
                  • Add-ident-sinfo
                  • Senv
                  • Add-struct-sinfo
                    • Add-function-sinfo
                    • Get-var/const-sinfo
                    • Get-struct-sinfo
                    • Get-function-sinfo
                    • Ident-senv
                    • Get-ident-sinfo
                    • Senv-result
                    • Var/const-sinfo-list
                    • Init-senv
                  • Curve-parameterization
                  • Function-recursion
                  • Struct-recursion
                  • Input-checking
                  • Program-checking
                  • Type-maps-for-struct-components
                  • Program-and-input-checking
                  • Output-checking
                • 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
    • Static-environments

    Add-struct-sinfo

    Add information about a struct type to a static environment.

    Signature
    (add-struct-sinfo circ info env) → new-env
    Arguments
    circ — Guard (identifierp circ).
    info — Guard (struct-sinfop info).
    env — Guard (senvp env).
    Returns
    new-env — Type (senv-optionp new-env).

    Definitions and Theorems

    Function: add-struct-sinfo

    (defun add-struct-sinfo (circ info env)
      (declare (xargs :guard (and (identifierp circ)
                                  (struct-sinfop info)
                                  (senvp env))))
      (let ((__function__ 'add-struct-sinfo))
        (declare (ignorable __function__))
        (add-ident-sinfo circ (ident-sinfo-struct info)
                         env)))

    Theorem: senv-optionp-of-add-struct-sinfo

    (defthm senv-optionp-of-add-struct-sinfo
      (b* ((new-env (add-struct-sinfo circ info env)))
        (senv-optionp new-env))
      :rule-classes :rewrite)

    Theorem: add-struct-sinfo-of-identifier-fix-circ

    (defthm add-struct-sinfo-of-identifier-fix-circ
      (equal (add-struct-sinfo (identifier-fix circ)
                               info env)
             (add-struct-sinfo circ info env)))

    Theorem: add-struct-sinfo-identifier-equiv-congruence-on-circ

    (defthm add-struct-sinfo-identifier-equiv-congruence-on-circ
      (implies (identifier-equiv circ circ-equiv)
               (equal (add-struct-sinfo circ info env)
                      (add-struct-sinfo circ-equiv info env)))
      :rule-classes :congruence)

    Theorem: add-struct-sinfo-of-struct-sinfo-fix-info

    (defthm add-struct-sinfo-of-struct-sinfo-fix-info
      (equal (add-struct-sinfo circ (struct-sinfo-fix info)
                               env)
             (add-struct-sinfo circ info env)))

    Theorem: add-struct-sinfo-struct-sinfo-equiv-congruence-on-info

    (defthm add-struct-sinfo-struct-sinfo-equiv-congruence-on-info
      (implies (struct-sinfo-equiv info info-equiv)
               (equal (add-struct-sinfo circ info env)
                      (add-struct-sinfo circ info-equiv env)))
      :rule-classes :congruence)

    Theorem: add-struct-sinfo-of-senv-fix-env

    (defthm add-struct-sinfo-of-senv-fix-env
      (equal (add-struct-sinfo circ info (senv-fix env))
             (add-struct-sinfo circ info env)))

    Theorem: add-struct-sinfo-senv-equiv-congruence-on-env

    (defthm add-struct-sinfo-senv-equiv-congruence-on-env
      (implies (senv-equiv env env-equiv)
               (equal (add-struct-sinfo circ info env)
                      (add-struct-sinfo circ info env-equiv)))
      :rule-classes :congruence)