• 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
        • Syntax-for-tools
        • Atc
        • Language
          • Abstract-syntax
            • Tyspecseq
            • Expr
            • Binop
            • Fileset
            • Obj-declor
            • Ident
            • Iconst
            • Obj-adeclor
            • Const
            • Fundef
            • Unop
            • File
            • Tag-declon
            • Fun-declor
            • Obj-declon
            • Iconst-length
            • Abstract-syntax-operations
            • Label
            • Struct-declon
            • Initer
            • Ext-declon
            • Fun-adeclor
              • Fun-adeclor-fix
                • Fun-adeclor-case
                • Fun-adeclor-equiv
                • Fun-adeclor-count
                • Fun-adeclorp
                • Fun-adeclor-pointer
                • Fun-adeclor-base
                • Fun-adeclor-kind
              • Expr-option
              • Iconst-base
              • Initer-option
              • Iconst-option
              • Tyspecseq-option
              • Stmt-option
              • Scspecseq
              • Param-declon
              • Obj-declon-option
              • File-option
              • Tyname
              • Transunit
              • Fun-declon
              • Transunit-result
              • Param-declon-list
              • Struct-declon-list
              • Expr-list
              • Tyspecseq-list
              • Ident-set
              • Ident-list
              • Ext-declon-list
              • Unop-list
              • Tyname-list
              • Fundef-list
              • Fun-declon-list
              • Binop-list
              • Stmt-fixtypes
              • Expr-fixtypes
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Integer-formats
            • Types
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Computation-states
            • Object-designators
            • Operations
            • Errors
            • Tag-environments
            • Function-environments
            • Character-sets
            • Flexible-array-member-removal
            • Arithmetic-operations
            • Pointer-operations
            • Bytes
            • Keywords
            • Real-operations
            • Array-operations
            • Scalar-operations
            • Structure-operations
          • Representation
          • Transformation-tools
          • Insertion-sort
          • Pack
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • 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
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Fun-adeclor

    Fun-adeclor-fix

    Fixing function for fun-adeclor structures.

    Signature
    (fun-adeclor-fix x) → new-x
    Arguments
    x — Guard (fun-adeclorp x).
    Returns
    new-x — Type (fun-adeclorp new-x).

    Definitions and Theorems

    Function: fun-adeclor-fix$inline

    (defun fun-adeclor-fix$inline (x)
     (declare (xargs :guard (fun-adeclorp x)))
     (let ((__function__ 'fun-adeclor-fix))
      (declare (ignorable __function__))
      (mbe
       :logic
       (case (fun-adeclor-kind x)
        (:base
          (b* ((params (param-declon-list-fix (std::da-nth 0 (cdr x)))))
            (cons :base (list params))))
        (:pointer (b* ((decl (fun-adeclor-fix (std::da-nth 0 (cdr x)))))
                    (cons :pointer (list decl)))))
       :exec x)))

    Theorem: fun-adeclorp-of-fun-adeclor-fix

    (defthm fun-adeclorp-of-fun-adeclor-fix
      (b* ((new-x (fun-adeclor-fix$inline x)))
        (fun-adeclorp new-x))
      :rule-classes :rewrite)

    Theorem: fun-adeclor-fix-when-fun-adeclorp

    (defthm fun-adeclor-fix-when-fun-adeclorp
      (implies (fun-adeclorp x)
               (equal (fun-adeclor-fix x) x)))

    Function: fun-adeclor-equiv$inline

    (defun fun-adeclor-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (fun-adeclorp acl2::x)
                                  (fun-adeclorp acl2::y))))
      (equal (fun-adeclor-fix acl2::x)
             (fun-adeclor-fix acl2::y)))

    Theorem: fun-adeclor-equiv-is-an-equivalence

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

    Theorem: fun-adeclor-equiv-implies-equal-fun-adeclor-fix-1

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

    Theorem: fun-adeclor-fix-under-fun-adeclor-equiv

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

    Theorem: equal-of-fun-adeclor-fix-1-forward-to-fun-adeclor-equiv

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

    Theorem: equal-of-fun-adeclor-fix-2-forward-to-fun-adeclor-equiv

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

    Theorem: fun-adeclor-equiv-of-fun-adeclor-fix-1-forward

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

    Theorem: fun-adeclor-equiv-of-fun-adeclor-fix-2-forward

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

    Theorem: fun-adeclor-kind$inline-of-fun-adeclor-fix-x

    (defthm fun-adeclor-kind$inline-of-fun-adeclor-fix-x
      (equal (fun-adeclor-kind$inline (fun-adeclor-fix x))
             (fun-adeclor-kind$inline x)))

    Theorem: fun-adeclor-kind$inline-fun-adeclor-equiv-congruence-on-x

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

    Theorem: consp-of-fun-adeclor-fix

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