• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
        • Syntax-for-tools
        • Atc
        • Transformation-tools
        • Language
          • Abstract-syntax
          • Integer-ranges
            • Def-integer-range
            • Integer-type-rangep
            • Ushort-integer
            • Ullong-integer
            • Sshort-integer
            • Sllong-integer
            • Ulong-integer
            • Uint-integer
            • Uchar-integer
            • Slong-integer
            • Sint-integer
            • Schar-integer
            • Ushort-max
            • Slong-max
            • Sllong-max
            • Integer-type-min
            • Integer-type-max
            • Uint-max
            • Sint-max
            • Ulong-max
            • Uchar-max
            • Def-integer-range-loop
            • Sshort-min
            • Sshort-max
            • Slong-min
            • Sint-min
            • Ullong-max
            • Sllong-min
            • Schar-min
            • Schar-max
            • Ushort-integer-list
            • Ulong-integer-list
            • Ullong-integer-list
            • Uint-integer-list
            • Uchar-integer-list
            • Sshort-integer-list
            • Slong-integer-list
            • Sllong-integer-list
              • Sllong-integer-list-fix
                • Sllong-integer-list-equiv
                • Sllong-integer-listp
              • Sint-integer-list
              • Schar-integer-list
              • Uchar-integerp-alt-def
              • Ushort-integerp-alt-def
              • Ulong-integerp-alt-def
              • Ullong-integerp-alt-def
              • Uint-integerp-alt-def
              • Sshort-integerp-alt-def
              • Slong-integerp-alt-def
              • Sllong-integerp-alt-def
              • Sint-integerp-alt-def
              • Schar-integerp-alt-def
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Types
            • Integer-formats-definitions
            • Computation-states
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Object-designators
            • Operations
            • Errors
            • Tag-environments
            • Function-environments
            • Character-sets
            • Flexible-array-member-removal
            • Arithmetic-operations
            • Pointer-operations
            • Real-operations
            • Array-operations
            • Scalar-operations
            • Structure-operations
          • Representation
          • Insertion-sort
          • Pack
        • 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
        • 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
    • Sllong-integer-list

    Sllong-integer-list-fix

    (sllong-integer-list-fix x) is a usual ACL2::fty list fixing function.

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

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

    (defun sllong-integer-list-fix$inline (x)
      (declare (xargs :guard (sllong-integer-listp x)))
      (mbe :logic
           (if (atom x)
               nil
             (cons (sllong-integer-fix (car x))
                   (sllong-integer-list-fix (cdr x))))
           :exec x))

    Theorem: sllong-integer-listp-of-sllong-integer-list-fix

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

    Theorem: sllong-integer-list-fix-when-sllong-integer-listp

    (defthm sllong-integer-list-fix-when-sllong-integer-listp
      (implies (sllong-integer-listp x)
               (equal (sllong-integer-list-fix x) x)))

    Function: sllong-integer-list-equiv$inline

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

    Theorem: sllong-integer-list-equiv-is-an-equivalence

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

    Theorem: sllong-integer-list-equiv-implies-equal-sllong-integer-list-fix-1

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

    Theorem: sllong-integer-list-fix-under-sllong-integer-list-equiv

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

    Theorem: equal-of-sllong-integer-list-fix-1-forward-to-sllong-integer-list-equiv

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

    Theorem: equal-of-sllong-integer-list-fix-2-forward-to-sllong-integer-list-equiv

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

    Theorem: sllong-integer-list-equiv-of-sllong-integer-list-fix-1-forward

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

    Theorem: sllong-integer-list-equiv-of-sllong-integer-list-fix-2-forward

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

    Theorem: car-of-sllong-integer-list-fix-x-under-sllong-integer-equiv

    (defthm car-of-sllong-integer-list-fix-x-under-sllong-integer-equiv
      (sllong-integer-equiv (car (sllong-integer-list-fix acl2::x))
                            (car acl2::x)))

    Theorem: car-sllong-integer-list-equiv-congruence-on-x-under-sllong-integer-equiv

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

    Theorem: cdr-of-sllong-integer-list-fix-x-under-sllong-integer-list-equiv

    (defthm
       cdr-of-sllong-integer-list-fix-x-under-sllong-integer-list-equiv
      (sllong-integer-list-equiv (cdr (sllong-integer-list-fix acl2::x))
                                 (cdr acl2::x)))

    Theorem: cdr-sllong-integer-list-equiv-congruence-on-x-under-sllong-integer-list-equiv

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

    Theorem: cons-of-sllong-integer-fix-x-under-sllong-integer-list-equiv

    (defthm cons-of-sllong-integer-fix-x-under-sllong-integer-list-equiv
      (sllong-integer-list-equiv (cons (sllong-integer-fix acl2::x)
                                       acl2::y)
                                 (cons acl2::x acl2::y)))

    Theorem: cons-sllong-integer-equiv-congruence-on-x-under-sllong-integer-list-equiv

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

    Theorem: cons-of-sllong-integer-list-fix-y-under-sllong-integer-list-equiv

    (defthm
      cons-of-sllong-integer-list-fix-y-under-sllong-integer-list-equiv
     (sllong-integer-list-equiv (cons acl2::x
                                      (sllong-integer-list-fix acl2::y))
                                (cons acl2::x acl2::y)))

    Theorem: cons-sllong-integer-list-equiv-congruence-on-y-under-sllong-integer-list-equiv

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

    Theorem: consp-of-sllong-integer-list-fix

    (defthm consp-of-sllong-integer-list-fix
      (equal (consp (sllong-integer-list-fix acl2::x))
             (consp acl2::x)))

    Theorem: sllong-integer-list-fix-under-iff

    (defthm sllong-integer-list-fix-under-iff
      (iff (sllong-integer-list-fix acl2::x)
           (consp acl2::x)))

    Theorem: sllong-integer-list-fix-of-cons

    (defthm sllong-integer-list-fix-of-cons
      (equal (sllong-integer-list-fix (cons a x))
             (cons (sllong-integer-fix a)
                   (sllong-integer-list-fix x))))

    Theorem: len-of-sllong-integer-list-fix

    (defthm len-of-sllong-integer-list-fix
      (equal (len (sllong-integer-list-fix acl2::x))
             (len acl2::x)))

    Theorem: sllong-integer-list-fix-of-append

    (defthm sllong-integer-list-fix-of-append
      (equal (sllong-integer-list-fix (append std::a std::b))
             (append (sllong-integer-list-fix std::a)
                     (sllong-integer-list-fix std::b))))

    Theorem: sllong-integer-list-fix-of-repeat

    (defthm sllong-integer-list-fix-of-repeat
      (equal (sllong-integer-list-fix (repeat acl2::n acl2::x))
             (repeat acl2::n (sllong-integer-fix acl2::x))))

    Theorem: list-equiv-refines-sllong-integer-list-equiv

    (defthm list-equiv-refines-sllong-integer-list-equiv
      (implies (list-equiv acl2::x acl2::y)
               (sllong-integer-list-equiv acl2::x acl2::y))
      :rule-classes :refinement)

    Theorem: nth-of-sllong-integer-list-fix

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

    Theorem: sllong-integer-list-equiv-implies-sllong-integer-list-equiv-append-1

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

    Theorem: sllong-integer-list-equiv-implies-sllong-integer-list-equiv-append-2

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

    Theorem: sllong-integer-list-equiv-implies-sllong-integer-list-equiv-nthcdr-2

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

    Theorem: sllong-integer-list-equiv-implies-sllong-integer-list-equiv-take-2

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

    Theorem: sllong-integer-list-fix$inline-of-sllong-integer-list-fix-x

    (defthm sllong-integer-list-fix$inline-of-sllong-integer-list-fix-x
     (equal (sllong-integer-list-fix$inline (sllong-integer-list-fix x))
            (sllong-integer-list-fix$inline x)))

    Theorem: sllong-integer-list-fix$inline-sllong-integer-list-equiv-congruence-on-x

    (defthm
     sllong-integer-list-fix$inline-sllong-integer-list-equiv-congruence-on-x
     (implies (sllong-integer-list-equiv x x-equiv)
              (equal (sllong-integer-list-fix$inline x)
                     (sllong-integer-list-fix$inline x-equiv)))
     :rule-classes :congruence)