• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
        • Defdefparse
        • Defgrammar
        • Tree-utilities
        • Notation
          • Syntax-abstraction
          • Semantics
          • Abstract-syntax
            • Convenience-constructors
            • Num-val
            • Char-val
            • Repeat-range
            • Rulename
            • Rule
            • Rulename-option
            • Num-base
            • Rule-option
            • Prose-val
            • Rulelist
            • Char-val-set
            • Rulename-set
            • Rulename-list
              • Rulename-list-fix
                • Rulename-list-equiv
                • Rulename-listp
              • Grammar
              • Alt/conc/rep/elem
            • Core-rules
            • Concrete-syntax
          • Grammar-parser
          • Meta-circular-validation
          • Parsing-primitives-defresult
          • Parsing-primitives-seq
          • Operations
          • Examples
          • Differences-with-paper
          • Constructor-utilities
          • Grammar-printer
          • Parsing-tools
        • 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
        • 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
    • Rulename-list

    Rulename-list-fix

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

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

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

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

    Theorem: rulename-listp-of-rulename-list-fix

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

    Theorem: rulename-list-fix-when-rulename-listp

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

    Function: rulename-list-equiv$inline

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

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

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

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

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

    Theorem: rulename-list-fix-under-rulename-list-equiv

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Theorem: consp-of-rulename-list-fix

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

    Theorem: rulename-list-fix-under-iff

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

    Theorem: rulename-list-fix-of-cons

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

    Theorem: len-of-rulename-list-fix

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

    Theorem: rulename-list-fix-of-append

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

    Theorem: rulename-list-fix-of-repeat

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

    Theorem: list-equiv-refines-rulename-list-equiv

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

    Theorem: nth-of-rulename-list-fix

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

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

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

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

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

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

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

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

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