• 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
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
        • Primitive-functions
        • Translated-terms
        • Values
        • Evaluation
        • Program-equivalence
        • Functions
          • Function
          • Function-lookup
          • Function-option
          • Lift-function
          • Lift-function-list
          • Function-set
            • Function-set-fix
              • Function-setp
              • Function-set-equiv
          • Packages
          • Programs
          • Interpreter
          • Evaluation-states
        • 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
    • Function-set

    Function-set-fix

    (function-set-fix x) is a usual ACL2::fty set fixing function.

    Signature
    (function-set-fix x) → *
    Arguments
    x — Guard (function-setp x).

    In the logic, we apply function-fix to each member of the x. In the execution, none of that is actually necessary and this is just an inlined identity function.

    Definitions and Theorems

    Function: function-set-fix

    (defun function-set-fix (x)
      (declare (xargs :guard (function-setp x)))
      (mbe :logic (if (function-setp x) x nil)
           :exec x))

    Theorem: function-setp-of-function-set-fix

    (defthm function-setp-of-function-set-fix
      (function-setp (function-set-fix x)))

    Theorem: function-set-fix-when-function-setp

    (defthm function-set-fix-when-function-setp
      (implies (function-setp x)
               (equal (function-set-fix x) x)))

    Theorem: emptyp-function-set-fix

    (defthm emptyp-function-set-fix
      (implies (or (emptyp x) (not (function-setp x)))
               (emptyp (function-set-fix x))))

    Theorem: emptyp-of-function-set-fix

    (defthm emptyp-of-function-set-fix
      (equal (emptyp (function-set-fix x))
             (or (not (function-setp x))
                 (emptyp x))))

    Function: function-set-equiv$inline

    (defun function-set-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (function-setp acl2::x)
                                  (function-setp acl2::y))))
      (equal (function-set-fix acl2::x)
             (function-set-fix acl2::y)))

    Theorem: function-set-equiv-is-an-equivalence

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

    Theorem: function-set-equiv-implies-equal-function-set-fix-1

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

    Theorem: function-set-fix-under-function-set-equiv

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

    Theorem: equal-of-function-set-fix-1-forward-to-function-set-equiv

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

    Theorem: equal-of-function-set-fix-2-forward-to-function-set-equiv

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

    Theorem: function-set-equiv-of-function-set-fix-1-forward

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

    Theorem: function-set-equiv-of-function-set-fix-2-forward

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