• 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
              • Dynamic-semantics
                • Execution
                • Values
                • Dynamic-environments
                  • Call-dinfo
                  • Denv
                  • Update-var/const-dinfo-in-scope-list
                  • Update-var/const-dinfo-in-scope
                  • Var/const-dinfo
                  • Update-var/const-dinfo
                  • Add-var/const-dinfo-to-scope
                  • Add-var/const-dinfo
                  • Var/const-dinfo-option
                  • Get-var/const-dinfo-from-scope-list
                  • Denv-option
                  • Get-var/const-dinfo-from-scope
                  • Vcscope-dinfo-option
                  • Vcscope-dinfo-list-option
                  • Vcscope-dinfo
                  • Screens
                    • Screen-message
                      • Screen-message-fix
                        • Screen-message-case
                        • Screen-message-equiv
                        • Screen-messagep
                        • Screen-message-log
                        • Screen-message-error
                        • Screen-message-kind
                      • Screen
                      • Print-message-to-screen
                      • Screen-message-list
                      • Init-screen
                    • Get-var/const-dinfo
                    • Vcscope-dinfo-option-result
                    • Vcscope-dinfo-list-result
                    • Vcscope-dinfo-result
                    • Dynamic-struct-environments
                    • Dynamic-function-environments
                    • Denv-result
                    • Init-denv
                    • Vcscope-dinfo-list
                    • Call-dinfo-list
                  • Arithmetic-operations
                  • Curve-parameterization
                  • Shift-operations
                  • Errors
                  • Value-expressions
                  • Locations
                  • Input-execution
                  • Edwards-bls12-generator
                  • Equality-operations
                  • Logical-operations
                  • Program-execution
                  • Ordering-operations
                  • Bitwise-operations
                  • Literal-evaluation
                  • Type-maps-for-struct-components
                  • Output-execution
                  • Tuple-operations
                  • Struct-operations
                • 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
    • Screen-message

    Screen-message-fix

    Fixing function for screen-message structures.

    Signature
    (screen-message-fix x) → new-x
    Arguments
    x — Guard (screen-messagep x).
    Returns
    new-x — Type (screen-messagep new-x).

    Definitions and Theorems

    Function: screen-message-fix$inline

    (defun screen-message-fix$inline (x)
     (declare (xargs :guard (screen-messagep x)))
     (let ((__function__ 'screen-message-fix))
      (declare (ignorable __function__))
      (mbe
       :logic
       (case (screen-message-kind x)
         (:error (b* ((string (char-list-fix (std::da-nth 0 (cdr x))))
                      (values (value-list-fix (std::da-nth 1 (cdr x)))))
                   (cons :error (list string values))))
         (:log (b* ((string (char-list-fix (std::da-nth 0 (cdr x))))
                    (values (value-list-fix (std::da-nth 1 (cdr x)))))
                 (cons :log (list string values)))))
       :exec x)))

    Theorem: screen-messagep-of-screen-message-fix

    (defthm screen-messagep-of-screen-message-fix
      (b* ((new-x (screen-message-fix$inline x)))
        (screen-messagep new-x))
      :rule-classes :rewrite)

    Theorem: screen-message-fix-when-screen-messagep

    (defthm screen-message-fix-when-screen-messagep
      (implies (screen-messagep x)
               (equal (screen-message-fix x) x)))

    Function: screen-message-equiv$inline

    (defun screen-message-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (screen-messagep acl2::x)
                                  (screen-messagep acl2::y))))
      (equal (screen-message-fix acl2::x)
             (screen-message-fix acl2::y)))

    Theorem: screen-message-equiv-is-an-equivalence

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

    Theorem: screen-message-equiv-implies-equal-screen-message-fix-1

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

    Theorem: screen-message-fix-under-screen-message-equiv

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

    Theorem: equal-of-screen-message-fix-1-forward-to-screen-message-equiv

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

    Theorem: equal-of-screen-message-fix-2-forward-to-screen-message-equiv

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

    Theorem: screen-message-equiv-of-screen-message-fix-1-forward

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

    Theorem: screen-message-equiv-of-screen-message-fix-2-forward

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

    Theorem: screen-message-kind$inline-of-screen-message-fix-x

    (defthm screen-message-kind$inline-of-screen-message-fix-x
      (equal (screen-message-kind$inline (screen-message-fix x))
             (screen-message-kind$inline x)))

    Theorem: screen-message-kind$inline-screen-message-equiv-congruence-on-x

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

    Theorem: consp-of-screen-message-fix

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