• 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
        • Atj
          • Atj-implementation
            • Atj-types
            • Atj-java-primitive-array-model
            • Atj-java-abstract-syntax
            • Atj-input-processing
            • Atj-java-pretty-printer
            • Atj-code-generation
            • Atj-java-primitives
            • Atj-java-primitive-arrays
            • Atj-type-macros
            • Atj-java-syntax-operations
            • Atj-fn
            • Atj-library-extensions
            • Atj-java-input-types
            • Atj-test-structures
              • Atj-test-value
              • Atj-test
                • Atj-test-fix
                  • Make-atj-test
                  • Atj-test-equiv
                  • Change-atj-test
                  • Atj-test->outputs
                  • Atj-test->inputs
                  • Atj-test->function
                  • Atj-test->name
                  • Atj-testp
                • Atj-test-value-of-type
                • Atj-test-values-of-types
                • Atj-test-value-to-type
                • Atj-test-values-to-types
                • Atj-test-value-ACL2-list
                • Atj-test-value-list
                • Atj-test-list
              • Aij-notions
              • Atj-macro-definition
            • Atj-tutorial
          • Aij
          • Language
        • 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
    • Atj-test

    Atj-test-fix

    Fixing function for atj-test structures.

    Signature
    (atj-test-fix x) → new-x
    Arguments
    x — Guard (atj-testp x).
    Returns
    new-x — Type (atj-testp new-x).

    Definitions and Theorems

    Function: atj-test-fix$inline

    (defun atj-test-fix$inline (x)
     (declare (xargs :guard (atj-testp x)))
     (let ((__function__ 'atj-test-fix))
      (declare (ignorable __function__))
      (mbe
       :logic
       (b* ((name (str-fix (cdr (std::da-nth 0 x))))
            (function (acl2::symbol-fix (cdr (std::da-nth 1 x))))
            (inputs (atj-test-value-list-fix (cdr (std::da-nth 2 x))))
            (outputs (atj-test-value-list-fix (cdr (std::da-nth 3 x)))))
         (list (cons 'name name)
               (cons 'function function)
               (cons 'inputs inputs)
               (cons 'outputs outputs)))
       :exec x)))

    Theorem: atj-testp-of-atj-test-fix

    (defthm atj-testp-of-atj-test-fix
      (b* ((new-x (atj-test-fix$inline x)))
        (atj-testp new-x))
      :rule-classes :rewrite)

    Theorem: atj-test-fix-when-atj-testp

    (defthm atj-test-fix-when-atj-testp
      (implies (atj-testp x)
               (equal (atj-test-fix x) x)))

    Function: atj-test-equiv$inline

    (defun atj-test-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (atj-testp acl2::x)
                                  (atj-testp acl2::y))))
      (equal (atj-test-fix acl2::x)
             (atj-test-fix acl2::y)))

    Theorem: atj-test-equiv-is-an-equivalence

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

    Theorem: atj-test-equiv-implies-equal-atj-test-fix-1

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

    Theorem: atj-test-fix-under-atj-test-equiv

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

    Theorem: equal-of-atj-test-fix-1-forward-to-atj-test-equiv

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

    Theorem: equal-of-atj-test-fix-2-forward-to-atj-test-equiv

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

    Theorem: atj-test-equiv-of-atj-test-fix-1-forward

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

    Theorem: atj-test-equiv-of-atj-test-fix-2-forward

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