• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
      • Sha-2
      • Yul
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Axe
      • Poseidon
      • Where-do-i-place-my-book
      • 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
                    • Print-message-to-screen
                    • Screen-message-list
                      • Screen-message-list-fix
                        • Screen-message-list-equiv
                        • Screen-message-listp
                      • 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-list

    Screen-message-list-fix

    (screen-message-list-fix x) is a usual ACL2::fty list fixing function.

    Signature
    (screen-message-list-fix x) → fty::newx
    Arguments
    x — Guard (screen-message-listp x).
    Returns
    fty::newx — Type (screen-message-listp fty::newx).

    In the logic, we apply screen-message-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: screen-message-list-fix$inline

    (defun screen-message-list-fix$inline (x)
      (declare (xargs :guard (screen-message-listp x)))
      (let ((__function__ 'screen-message-list-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (if (atom x)
                 nil
               (cons (screen-message-fix (car x))
                     (screen-message-list-fix (cdr x))))
             :exec x)))

    Theorem: screen-message-listp-of-screen-message-list-fix

    (defthm screen-message-listp-of-screen-message-list-fix
      (b* ((fty::newx (screen-message-list-fix$inline x)))
        (screen-message-listp fty::newx))
      :rule-classes :rewrite)

    Theorem: screen-message-list-fix-when-screen-message-listp

    (defthm screen-message-list-fix-when-screen-message-listp
      (implies (screen-message-listp x)
               (equal (screen-message-list-fix x) x)))

    Function: screen-message-list-equiv$inline

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Theorem: car-of-screen-message-list-fix-x-under-screen-message-equiv

    (defthm car-of-screen-message-list-fix-x-under-screen-message-equiv
      (screen-message-equiv (car (screen-message-list-fix acl2::x))
                            (car acl2::x)))

    Theorem: car-screen-message-list-equiv-congruence-on-x-under-screen-message-equiv

    (defthm
     car-screen-message-list-equiv-congruence-on-x-under-screen-message-equiv
     (implies (screen-message-list-equiv acl2::x x-equiv)
              (screen-message-equiv (car acl2::x)
                                    (car x-equiv)))
     :rule-classes :congruence)

    Theorem: cdr-of-screen-message-list-fix-x-under-screen-message-list-equiv

    (defthm
       cdr-of-screen-message-list-fix-x-under-screen-message-list-equiv
      (screen-message-list-equiv (cdr (screen-message-list-fix acl2::x))
                                 (cdr acl2::x)))

    Theorem: cdr-screen-message-list-equiv-congruence-on-x-under-screen-message-list-equiv

    (defthm
     cdr-screen-message-list-equiv-congruence-on-x-under-screen-message-list-equiv
     (implies (screen-message-list-equiv acl2::x x-equiv)
              (screen-message-list-equiv (cdr acl2::x)
                                         (cdr x-equiv)))
     :rule-classes :congruence)

    Theorem: cons-of-screen-message-fix-x-under-screen-message-list-equiv

    (defthm cons-of-screen-message-fix-x-under-screen-message-list-equiv
      (screen-message-list-equiv (cons (screen-message-fix acl2::x)
                                       acl2::y)
                                 (cons acl2::x acl2::y)))

    Theorem: cons-screen-message-equiv-congruence-on-x-under-screen-message-list-equiv

    (defthm
     cons-screen-message-equiv-congruence-on-x-under-screen-message-list-equiv
     (implies (screen-message-equiv acl2::x x-equiv)
              (screen-message-list-equiv (cons acl2::x acl2::y)
                                         (cons x-equiv acl2::y)))
     :rule-classes :congruence)

    Theorem: cons-of-screen-message-list-fix-y-under-screen-message-list-equiv

    (defthm
      cons-of-screen-message-list-fix-y-under-screen-message-list-equiv
     (screen-message-list-equiv (cons acl2::x
                                      (screen-message-list-fix acl2::y))
                                (cons acl2::x acl2::y)))

    Theorem: cons-screen-message-list-equiv-congruence-on-y-under-screen-message-list-equiv

    (defthm
     cons-screen-message-list-equiv-congruence-on-y-under-screen-message-list-equiv
     (implies (screen-message-list-equiv acl2::y y-equiv)
              (screen-message-list-equiv (cons acl2::x acl2::y)
                                         (cons acl2::x y-equiv)))
     :rule-classes :congruence)

    Theorem: consp-of-screen-message-list-fix

    (defthm consp-of-screen-message-list-fix
      (equal (consp (screen-message-list-fix acl2::x))
             (consp acl2::x)))

    Theorem: screen-message-list-fix-under-iff

    (defthm screen-message-list-fix-under-iff
      (iff (screen-message-list-fix acl2::x)
           (consp acl2::x)))

    Theorem: screen-message-list-fix-of-cons

    (defthm screen-message-list-fix-of-cons
      (equal (screen-message-list-fix (cons a x))
             (cons (screen-message-fix a)
                   (screen-message-list-fix x))))

    Theorem: len-of-screen-message-list-fix

    (defthm len-of-screen-message-list-fix
      (equal (len (screen-message-list-fix acl2::x))
             (len acl2::x)))

    Theorem: screen-message-list-fix-of-append

    (defthm screen-message-list-fix-of-append
      (equal (screen-message-list-fix (append std::a std::b))
             (append (screen-message-list-fix std::a)
                     (screen-message-list-fix std::b))))

    Theorem: screen-message-list-fix-of-repeat

    (defthm screen-message-list-fix-of-repeat
      (equal (screen-message-list-fix (repeat acl2::n acl2::x))
             (repeat acl2::n (screen-message-fix acl2::x))))

    Theorem: list-equiv-refines-screen-message-list-equiv

    (defthm list-equiv-refines-screen-message-list-equiv
      (implies (list-equiv acl2::x acl2::y)
               (screen-message-list-equiv acl2::x acl2::y))
      :rule-classes :refinement)

    Theorem: nth-of-screen-message-list-fix

    (defthm nth-of-screen-message-list-fix
      (equal (nth acl2::n
                  (screen-message-list-fix acl2::x))
             (if (< (nfix acl2::n) (len acl2::x))
                 (screen-message-fix (nth acl2::n acl2::x))
               nil)))

    Theorem: screen-message-list-equiv-implies-screen-message-list-equiv-append-1

    (defthm
     screen-message-list-equiv-implies-screen-message-list-equiv-append-1
     (implies (screen-message-list-equiv acl2::x fty::x-equiv)
              (screen-message-list-equiv (append acl2::x acl2::y)
                                         (append fty::x-equiv acl2::y)))
     :rule-classes (:congruence))

    Theorem: screen-message-list-equiv-implies-screen-message-list-equiv-append-2

    (defthm
     screen-message-list-equiv-implies-screen-message-list-equiv-append-2
     (implies (screen-message-list-equiv acl2::y fty::y-equiv)
              (screen-message-list-equiv (append acl2::x acl2::y)
                                         (append acl2::x fty::y-equiv)))
     :rule-classes (:congruence))

    Theorem: screen-message-list-equiv-implies-screen-message-list-equiv-nthcdr-2

    (defthm
     screen-message-list-equiv-implies-screen-message-list-equiv-nthcdr-2
     (implies (screen-message-list-equiv acl2::l l-equiv)
              (screen-message-list-equiv (nthcdr acl2::n acl2::l)
                                         (nthcdr acl2::n l-equiv)))
     :rule-classes (:congruence))

    Theorem: screen-message-list-equiv-implies-screen-message-list-equiv-take-2

    (defthm
     screen-message-list-equiv-implies-screen-message-list-equiv-take-2
     (implies (screen-message-list-equiv acl2::l l-equiv)
              (screen-message-list-equiv (take acl2::n acl2::l)
                                         (take acl2::n l-equiv)))
     :rule-classes (:congruence))