• 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
      • Riscv
      • Taspi
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
                • Expression
                • Syntax-abstraction
                • Statement
                • Files
                • Input-files
                • Identifiers
                • Types
                • Struct-init
                • Branch
                • Statements
                  • Asgop
                    • Asgop-case
                    • Asgop-fix
                      • Asgopp
                      • Asgop-equiv
                      • Asgop-kind
                      • Asgop-asg-sub
                      • Asgop-asg-shr
                      • Asgop-asg-shl
                      • Asgop-asg-rem
                      • Asgop-asg-pow
                      • Asgop-asg-or
                      • Asgop-asg-mul
                      • Asgop-asg-div
                      • Asgop-asg-bitxor
                      • Asgop-asg-bitior
                      • Asgop-asg-bitand
                      • Asgop-asg-and
                      • Asgop-asg-add
                      • Asgop-asg
                    • Constdecl
                    • Console
                    • Vardecl
                    • Vardecl-result
                    • Statement-result
                    • Statement-list-result
                    • Constdecl-result
                    • Console-result
                    • Branch-result
                    • Branch-list-result
                    • Asgop-result
                    • Asgop-to-binop
                    • Statement-fixtypes
                  • Format-strings
                  • Input-syntax-abstraction
                  • Expressions
                  • Output-files
                  • Addresses
                  • Literals
                  • Characters
                  • Expression-list
                  • Statement-list
                  • Output-syntax-abstraction
                  • Struct-init-list
                  • Branch-list
                  • Annotations
                  • Abstract-syntax-trees
                  • Symbols
                  • Keywords
                  • Programs
                  • Packages
                  • Bit-sizes
                • Dynamic-semantics
                • 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
    • Asgop

    Asgop-fix

    Fixing function for asgop structures.

    Signature
    (asgop-fix x) → new-x
    Arguments
    x — Guard (asgopp x).
    Returns
    new-x — Type (asgopp new-x).

    Definitions and Theorems

    Function: asgop-fix$inline

    (defun asgop-fix$inline (x)
      (declare (xargs :guard (asgopp x)))
      (let ((__function__ 'asgop-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (case (asgop-kind x)
               (:asg (cons :asg (list)))
               (:asg-add (cons :asg-add (list)))
               (:asg-sub (cons :asg-sub (list)))
               (:asg-mul (cons :asg-mul (list)))
               (:asg-div (cons :asg-div (list)))
               (:asg-rem (cons :asg-rem (list)))
               (:asg-pow (cons :asg-pow (list)))
               (:asg-shl (cons :asg-shl (list)))
               (:asg-shr (cons :asg-shr (list)))
               (:asg-bitand (cons :asg-bitand (list)))
               (:asg-bitior (cons :asg-bitior (list)))
               (:asg-bitxor (cons :asg-bitxor (list)))
               (:asg-and (cons :asg-and (list)))
               (:asg-or (cons :asg-or (list))))
             :exec x)))

    Theorem: asgopp-of-asgop-fix

    (defthm asgopp-of-asgop-fix
      (b* ((new-x (asgop-fix$inline x)))
        (asgopp new-x))
      :rule-classes :rewrite)

    Theorem: asgop-fix-when-asgopp

    (defthm asgop-fix-when-asgopp
      (implies (asgopp x)
               (equal (asgop-fix x) x)))

    Function: asgop-equiv$inline

    (defun asgop-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (asgopp acl2::x)
                                  (asgopp acl2::y))))
      (equal (asgop-fix acl2::x)
             (asgop-fix acl2::y)))

    Theorem: asgop-equiv-is-an-equivalence

    (defthm asgop-equiv-is-an-equivalence
      (and (booleanp (asgop-equiv x y))
           (asgop-equiv x x)
           (implies (asgop-equiv x y)
                    (asgop-equiv y x))
           (implies (and (asgop-equiv x y)
                         (asgop-equiv y z))
                    (asgop-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: asgop-equiv-implies-equal-asgop-fix-1

    (defthm asgop-equiv-implies-equal-asgop-fix-1
      (implies (asgop-equiv acl2::x x-equiv)
               (equal (asgop-fix acl2::x)
                      (asgop-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: asgop-fix-under-asgop-equiv

    (defthm asgop-fix-under-asgop-equiv
      (asgop-equiv (asgop-fix acl2::x)
                   acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-asgop-fix-1-forward-to-asgop-equiv

    (defthm equal-of-asgop-fix-1-forward-to-asgop-equiv
      (implies (equal (asgop-fix acl2::x) acl2::y)
               (asgop-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: equal-of-asgop-fix-2-forward-to-asgop-equiv

    (defthm equal-of-asgop-fix-2-forward-to-asgop-equiv
      (implies (equal acl2::x (asgop-fix acl2::y))
               (asgop-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: asgop-equiv-of-asgop-fix-1-forward

    (defthm asgop-equiv-of-asgop-fix-1-forward
      (implies (asgop-equiv (asgop-fix acl2::x)
                            acl2::y)
               (asgop-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: asgop-equiv-of-asgop-fix-2-forward

    (defthm asgop-equiv-of-asgop-fix-2-forward
      (implies (asgop-equiv acl2::x (asgop-fix acl2::y))
               (asgop-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: asgop-kind$inline-of-asgop-fix-x

    (defthm asgop-kind$inline-of-asgop-fix-x
      (equal (asgop-kind$inline (asgop-fix x))
             (asgop-kind$inline x)))

    Theorem: asgop-kind$inline-asgop-equiv-congruence-on-x

    (defthm asgop-kind$inline-asgop-equiv-congruence-on-x
      (implies (asgop-equiv x x-equiv)
               (equal (asgop-kind$inline x)
                      (asgop-kind$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: consp-of-asgop-fix

    (defthm consp-of-asgop-fix
      (consp (asgop-fix x))
      :rule-classes :type-prescription)