• 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
        • Atj
        • Aij
        • Language
          • Syntax
            • Grammar
            • Unicode-escapes
            • Unicode-input-char
            • Escape-sequence
            • Identifiers
              • Ascii-identifier-part-p
              • Identifier
              • Tidentifier
              • Umidentifier
              • Ascii-identifier-ignore-p
              • Ascii-identifier-start-p
              • Nonascii-identifier-part-p
              • Nonascii-identifier-ignore-p
              • Nonascii-identifier-start-p
              • Identifier-part-listp
              • Identifier-start-p
              • Identifier-part-p
              • Identifier-ignore-p
              • Tidentifierp
              • No-identifier-ignore-p
              • Umidentifier-fix
              • Tidentifier-fix
              • Identifierp
              • Identifier-fix
              • Umidentifierp
              • Identifier-list
                • Identifier-list-fix
                  • Identifier-list-equiv
                  • Identifier-listp
              • Primitive-types
              • Reference-types
              • Unicode-characters
              • Keywords
              • Integer-literals
              • String-literals
              • Octal-digits
              • Hexadecimal-digits
              • Decimal-digits
              • Binary-digits
              • Character-literals
              • Null-literal
              • Floating-point-literals
              • Boolean-literals
              • Package-names
              • Literals
            • Semantics
        • 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
    • Identifier-list

    Identifier-list-fix

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

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

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

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

    Theorem: identifier-listp-of-identifier-list-fix

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

    Theorem: identifier-list-fix-when-identifier-listp

    (defthm identifier-list-fix-when-identifier-listp
      (implies (identifier-listp x)
               (equal (identifier-list-fix x) x)))

    Function: identifier-list-equiv$inline

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

    Theorem: identifier-list-equiv-is-an-equivalence

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

    Theorem: identifier-list-equiv-implies-equal-identifier-list-fix-1

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

    Theorem: identifier-list-fix-under-identifier-list-equiv

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

    Theorem: equal-of-identifier-list-fix-1-forward-to-identifier-list-equiv

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

    Theorem: equal-of-identifier-list-fix-2-forward-to-identifier-list-equiv

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

    Theorem: identifier-list-equiv-of-identifier-list-fix-1-forward

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

    Theorem: identifier-list-equiv-of-identifier-list-fix-2-forward

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

    Theorem: car-of-identifier-list-fix-x-under-identifier-equiv

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

    Theorem: car-identifier-list-equiv-congruence-on-x-under-identifier-equiv

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

    Theorem: cdr-of-identifier-list-fix-x-under-identifier-list-equiv

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

    Theorem: cdr-identifier-list-equiv-congruence-on-x-under-identifier-list-equiv

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

    Theorem: cons-of-identifier-fix-x-under-identifier-list-equiv

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

    Theorem: cons-identifier-equiv-congruence-on-x-under-identifier-list-equiv

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

    Theorem: cons-of-identifier-list-fix-y-under-identifier-list-equiv

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

    Theorem: cons-identifier-list-equiv-congruence-on-y-under-identifier-list-equiv

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

    Theorem: consp-of-identifier-list-fix

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

    Theorem: identifier-list-fix-under-iff

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

    Theorem: identifier-list-fix-of-cons

    (defthm identifier-list-fix-of-cons
      (equal (identifier-list-fix (cons a x))
             (cons (identifier-fix a)
                   (identifier-list-fix x))))

    Theorem: len-of-identifier-list-fix

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

    Theorem: identifier-list-fix-of-append

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

    Theorem: identifier-list-fix-of-repeat

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

    Theorem: list-equiv-refines-identifier-list-equiv

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

    Theorem: nth-of-identifier-list-fix

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

    Theorem: identifier-list-equiv-implies-identifier-list-equiv-append-1

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

    Theorem: identifier-list-equiv-implies-identifier-list-equiv-append-2

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

    Theorem: identifier-list-equiv-implies-identifier-list-equiv-nthcdr-2

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

    Theorem: identifier-list-equiv-implies-identifier-list-equiv-take-2

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