• 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
            • Simpadd0
            • Proof-generation
              • Xeq-fundef
              • Xeq-expr-cond
              • Xeq-expr-binary
              • Xeq-block-item-list-cons
              • Xeq-stmt-ifelse
              • Xeq-expr-const
              • Gen-param-thms
              • Gen-from-params
              • Xeq-decl-decl
              • Gout
              • Gen-block-item-list-thm
              • Xeq-stmt-while
              • Xeq-stmt-dowhile
              • Gin
              • Xeq-expr-ident
              • Gen-block-item-thm
              • Xeq-stmt-if
              • Xeq-expr-cast
              • Gen-initer-single-thm
              • Gen-init-scope-thm
              • Gen-expr-thm
              • Xeq-expr-unary
              • Gen-decl-thm
              • Gen-stmt-thm
              • Xeq-stmt-return
              • Xeq-stmt-expr
              • Xeq-block-item-decl
              • Xeq-block-item-stmt
              • Xeq-stmt-compound
              • Xeq-initer-single
              • Gen-thm-name
              • Gin-update
                • Gen-var-assertions
                • Tyspecseq-to-type
                • Xeq-block-item-list-empty
                • Gout-no-thm
                • Irr-gout
              • Split-gso
              • Wrap-fn
              • Constant-propagation
              • Specialize
              • Split-fn
              • Split-fn-when
              • Split-all-gso
              • Copy-fn
              • Variables-in-computation-states
              • Rename
              • Utilities
              • Proof-generation-theorems
              • Input-processing
            • Language
            • 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
    • Proof-generation

    Gin-update

    Update a gin with a gout.

    Signature
    (gin-update gin gout) → new-gin
    Arguments
    gin — Guard (ginp gin).
    gout — Guard (goutp gout).
    Returns
    new-gin — Type (ginp new-gin).

    The list of theorems generated so far and the index for unique theorem names are threaded through the transformation functions; both are common components of gin and gout. This function updates an input (to the next call of a transformation function) with an output (from the previous call of a transformation function), by updating those common components.

    Although both gin and gout have a vartys component, that one is not threaded through; it is handled differently (see the transformation functions). Thus, this function does not involve that component.

    Definitions and Theorems

    Function: gin-update

    (defun gin-update (gin gout)
      (declare (xargs :guard (and (ginp gin) (goutp gout))))
      (let ((__function__ 'gin-update))
        (declare (ignorable __function__))
        (b* (((gout gout) gout))
          (change-gin gin
                      :events gout.events
                      :thm-index gout.thm-index))))

    Theorem: ginp-of-gin-update

    (defthm ginp-of-gin-update
      (b* ((new-gin (gin-update gin gout)))
        (ginp new-gin))
      :rule-classes :rewrite)

    Theorem: gin-update-of-gin-fix-gin

    (defthm gin-update-of-gin-fix-gin
      (equal (gin-update (gin-fix gin) gout)
             (gin-update gin gout)))

    Theorem: gin-update-gin-equiv-congruence-on-gin

    (defthm gin-update-gin-equiv-congruence-on-gin
      (implies (gin-equiv gin gin-equiv)
               (equal (gin-update gin gout)
                      (gin-update gin-equiv gout)))
      :rule-classes :congruence)

    Theorem: gin-update-of-gout-fix-gout

    (defthm gin-update-of-gout-fix-gout
      (equal (gin-update gin (gout-fix gout))
             (gin-update gin gout)))

    Theorem: gin-update-gout-equiv-congruence-on-gout

    (defthm gin-update-gout-equiv-congruence-on-gout
      (implies (gout-equiv gout gout-equiv)
               (equal (gin-update gin gout)
                      (gin-update gin gout-equiv)))
      :rule-classes :congruence)