• 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
          • Formalized-subset
          • Mapping-to-language-definition
          • Input-files
          • Compilation-database
          • Printer
          • Output-files
          • Abstract-syntax-operations
          • Implementation-environments
          • Abstract-syntax
          • Concrete-syntax
          • Disambiguation
            • Disambiguator
              • Dimb-exprs/decls/stmts
              • Dimb-make/adjust-expr-cast
              • Dimb-make/adjust-expr-binary
              • Dimb-params-to-names
              • Dimb-fundef
              • Dimb-cast/call-to-call
              • Dimb-transunit
              • Dimb-dirdeclor
              • Dimb-transunit-ensemble
              • Dimb-make/adjust-expr-unary
              • Dimb-expr
              • Dimb-amb-declor/absdeclor
              • Dimb-cast/call-to-cast
              • Dimb-cast/addsub-to-cast
              • Dimb-cast/addsub-to-addsub
              • Dimb-add-ident
              • Dimb-kind
              • Dimb-amb-expr/tyname
              • Dimb-ext-declon-list
              • Dimb-ext-declon
              • Dimb-cast/logand-to-logand
              • Dimb-cast/and-to-cast
              • Dimb-cast/mul-to-cast
              • Dimb-cast/logand-to-cast
              • Dimb-cast/mul-to-mul
              • Dimb-cast/and-to-and
              • Dimb-declor
              • Dimb-kind-option
              • Dimb-type-spec
              • Dimb-add-ident-objfun-file-scope
              • Dimb-make/adjust-expr-label-addr
              • Dimb-param-declor
              • Dimb-lookup-ident
              • Dimb-decl-spec
              • Dimb-add-idents-objfun
              • Dimb-add-ident-objfun
              • Dimb-param-declon
              • Dimb-amb-declon/stmt
              • Dimb-table
              • Dimb-pop-scope
              • Dimb-init-declor
              • Dimb-stmt
              • Dimb-push-scope
              • Dimb-comp-stmt
              • Dimb-declor-option
              • Dimb-enum-spec
              • Dimb-declon
              • Dimb-struct-declor
              • Dimb-scope
                • Dimb-scopep
                  • Dimb-scope-fix
                  • Dimb-scope-equiv
                • Dimb-init-declor-list
                • Dimb-decl-spec-list
                • Dimb-absdeclor
                • Dimb-dirabsdeclor
                • Dimb-align-spec
                • Dimb-struni-spec
                • Dimb-init-table
                • Dimb-spec/qual-list
                • Dimb-spec/qual
                • Irr-dimb-table
                • Irr-dimb-kind
                • Dimb-param-declon-list
                • Dimb-enumer-list
                • Dimb-enumer
                • Dimb-dirabsdeclor-option
                • Dimb-block-item
                • Dimb-struct-declor-list
                • Dimb-struct-declon-list
                • Dimb-struct-declon
                • Dimb-statassert
                • Dimb-label
                • Dimb-desiniter-list
                • Dimb-desiniter
                • Dimb-declon-list
                • Dimb-const-expr-option
                • Dimb-absdeclor-option
                • Dimb-member-designor
                • Dimb-initer-option
                • Dimb-genassoc-list
                • Dimb-genassoc
                • Dimb-expr-option
                • Dimb-expr-list
                • Dimb-designor-list
                • Dimb-designor
                • Dimb-const-expr
                • Dimb-block-item-list
                • Dimb-tyname
                • Dimb-initer
              • Unambiguity
            • Validation
            • Gcc-builtins
            • Preprocessing
            • Parsing
          • Atc
          • Transformation-tools
          • Language
          • 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
    • Dimb-scope

    Dimb-scopep

    Recognizer for dimb-scope.

    Signature
    (dimb-scopep x) → *

    Definitions and Theorems

    Function: dimb-scopep

    (defun dimb-scopep (x)
      (declare (xargs :guard t))
      (let ((__function__ 'dimb-scopep))
        (declare (ignorable __function__))
        (if (atom x)
            (eq x nil)
          (and (consp (car x))
               (identp (caar x))
               (dimb-kindp (cdar x))
               (dimb-scopep (cdr x))))))

    Theorem: dimb-scopep-of-revappend

    (defthm dimb-scopep-of-revappend
      (equal (dimb-scopep (revappend acl2::x acl2::y))
             (and (dimb-scopep (list-fix acl2::x))
                  (dimb-scopep acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-remove

    (defthm dimb-scopep-of-remove
      (implies (dimb-scopep acl2::x)
               (dimb-scopep (remove acl2::a acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-last

    (defthm dimb-scopep-of-last
      (implies (dimb-scopep (double-rewrite acl2::x))
               (dimb-scopep (last acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-nthcdr

    (defthm dimb-scopep-of-nthcdr
      (implies (dimb-scopep (double-rewrite acl2::x))
               (dimb-scopep (nthcdr acl2::n acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-butlast

    (defthm dimb-scopep-of-butlast
      (implies (dimb-scopep (double-rewrite acl2::x))
               (dimb-scopep (butlast acl2::x acl2::n)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-update-nth

    (defthm dimb-scopep-of-update-nth
      (implies (dimb-scopep (double-rewrite acl2::x))
               (iff (dimb-scopep (update-nth acl2::n acl2::y acl2::x))
                    (and (and (consp acl2::y)
                              (identp (car acl2::y))
                              (dimb-kindp (cdr acl2::y)))
                         (or (<= (nfix acl2::n) (len acl2::x))
                             (and (consp nil)
                                  (identp (car nil))
                                  (dimb-kindp (cdr nil)))))))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-repeat

    (defthm dimb-scopep-of-repeat
      (iff (dimb-scopep (repeat acl2::n acl2::x))
           (or (and (consp acl2::x)
                    (identp (car acl2::x))
                    (dimb-kindp (cdr acl2::x)))
               (zp acl2::n)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-take

    (defthm dimb-scopep-of-take
      (implies (dimb-scopep (double-rewrite acl2::x))
               (iff (dimb-scopep (take acl2::n acl2::x))
                    (or (and (consp nil)
                             (identp (car nil))
                             (dimb-kindp (cdr nil)))
                        (<= (nfix acl2::n) (len acl2::x)))))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-union-equal

    (defthm dimb-scopep-of-union-equal
      (equal (dimb-scopep (union-equal acl2::x acl2::y))
             (and (dimb-scopep (list-fix acl2::x))
                  (dimb-scopep (double-rewrite acl2::y))))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-intersection-equal-2

    (defthm dimb-scopep-of-intersection-equal-2
      (implies (dimb-scopep (double-rewrite acl2::y))
               (dimb-scopep (intersection-equal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-intersection-equal-1

    (defthm dimb-scopep-of-intersection-equal-1
      (implies (dimb-scopep (double-rewrite acl2::x))
               (dimb-scopep (intersection-equal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-set-difference-equal

    (defthm dimb-scopep-of-set-difference-equal
      (implies (dimb-scopep acl2::x)
               (dimb-scopep (set-difference-equal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-when-subsetp-equal

    (defthm dimb-scopep-when-subsetp-equal
      (and (implies (and (subsetp-equal acl2::x acl2::y)
                         (dimb-scopep acl2::y))
                    (equal (dimb-scopep acl2::x)
                           (true-listp acl2::x)))
           (implies (and (dimb-scopep acl2::y)
                         (subsetp-equal acl2::x acl2::y))
                    (equal (dimb-scopep acl2::x)
                           (true-listp acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-rcons

    (defthm dimb-scopep-of-rcons
      (iff (dimb-scopep (rcons acl2::a acl2::x))
           (and (and (consp acl2::a)
                     (identp (car acl2::a))
                     (dimb-kindp (cdr acl2::a)))
                (dimb-scopep (list-fix acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-append

    (defthm dimb-scopep-of-append
      (equal (dimb-scopep (append acl2::a acl2::b))
             (and (dimb-scopep (list-fix acl2::a))
                  (dimb-scopep acl2::b)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-rev

    (defthm dimb-scopep-of-rev
      (equal (dimb-scopep (rev acl2::x))
             (dimb-scopep (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-duplicated-members

    (defthm dimb-scopep-of-duplicated-members
      (implies (dimb-scopep acl2::x)
               (dimb-scopep (duplicated-members acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-difference

    (defthm dimb-scopep-of-difference
      (implies (dimb-scopep acl2::x)
               (dimb-scopep (difference acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-intersect-2

    (defthm dimb-scopep-of-intersect-2
      (implies (dimb-scopep acl2::y)
               (dimb-scopep (intersect acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-intersect-1

    (defthm dimb-scopep-of-intersect-1
      (implies (dimb-scopep acl2::x)
               (dimb-scopep (intersect acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-union

    (defthm dimb-scopep-of-union
      (iff (dimb-scopep (union acl2::x acl2::y))
           (and (dimb-scopep (sfix acl2::x))
                (dimb-scopep (sfix acl2::y))))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-mergesort

    (defthm dimb-scopep-of-mergesort
      (iff (dimb-scopep (mergesort acl2::x))
           (dimb-scopep (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-delete

    (defthm dimb-scopep-of-delete
      (implies (dimb-scopep acl2::x)
               (dimb-scopep (delete acl2::k acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-insert

    (defthm dimb-scopep-of-insert
      (iff (dimb-scopep (insert acl2::a acl2::x))
           (and (dimb-scopep (sfix acl2::x))
                (and (consp acl2::a)
                     (identp (car acl2::a))
                     (dimb-kindp (cdr acl2::a)))))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-sfix

    (defthm dimb-scopep-of-sfix
      (iff (dimb-scopep (sfix acl2::x))
           (or (dimb-scopep acl2::x)
               (not (setp acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-list-fix

    (defthm dimb-scopep-of-list-fix
      (implies (dimb-scopep acl2::x)
               (dimb-scopep (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: true-listp-when-dimb-scopep-compound-recognizer

    (defthm true-listp-when-dimb-scopep-compound-recognizer
      (implies (dimb-scopep acl2::x)
               (true-listp acl2::x))
      :rule-classes :compound-recognizer)

    Theorem: dimb-scopep-when-not-consp

    (defthm dimb-scopep-when-not-consp
      (implies (not (consp acl2::x))
               (equal (dimb-scopep acl2::x)
                      (not acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-cdr-when-dimb-scopep

    (defthm dimb-scopep-of-cdr-when-dimb-scopep
      (implies (dimb-scopep (double-rewrite acl2::x))
               (dimb-scopep (cdr acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-cons

    (defthm dimb-scopep-of-cons
      (equal (dimb-scopep (cons acl2::a acl2::x))
             (and (and (consp acl2::a)
                       (identp (car acl2::a))
                       (dimb-kindp (cdr acl2::a)))
                  (dimb-scopep acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-remove-assoc

    (defthm dimb-scopep-of-remove-assoc
      (implies (dimb-scopep acl2::x)
               (dimb-scopep (remove-assoc-equal acl2::name acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-put-assoc

    (defthm dimb-scopep-of-put-assoc
     (implies
       (and (dimb-scopep acl2::x))
       (iff (dimb-scopep (put-assoc-equal acl2::name acl2::val acl2::x))
            (and (identp acl2::name)
                 (dimb-kindp acl2::val))))
     :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-fast-alist-clean

    (defthm dimb-scopep-of-fast-alist-clean
      (implies (dimb-scopep acl2::x)
               (dimb-scopep (fast-alist-clean acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-hons-shrink-alist

    (defthm dimb-scopep-of-hons-shrink-alist
      (implies (and (dimb-scopep acl2::x)
                    (dimb-scopep acl2::y))
               (dimb-scopep (hons-shrink-alist acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-hons-acons

    (defthm dimb-scopep-of-hons-acons
      (equal (dimb-scopep (hons-acons acl2::a acl2::n acl2::x))
             (and (identp acl2::a)
                  (dimb-kindp acl2::n)
                  (dimb-scopep acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-kindp-of-cdr-of-hons-assoc-equal-when-dimb-scopep

    (defthm dimb-kindp-of-cdr-of-hons-assoc-equal-when-dimb-scopep
     (implies (dimb-scopep acl2::x)
              (iff (dimb-kindp (cdr (hons-assoc-equal acl2::k acl2::x)))
                   (hons-assoc-equal acl2::k acl2::x)))
     :rule-classes ((:rewrite)))

    Theorem: alistp-when-dimb-scopep-rewrite

    (defthm alistp-when-dimb-scopep-rewrite
      (implies (dimb-scopep acl2::x)
               (alistp acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: alistp-when-dimb-scopep

    (defthm alistp-when-dimb-scopep
      (implies (dimb-scopep acl2::x)
               (alistp acl2::x))
      :rule-classes :tau-system)

    Theorem: dimb-kindp-of-cdar-when-dimb-scopep

    (defthm dimb-kindp-of-cdar-when-dimb-scopep
      (implies (dimb-scopep acl2::x)
               (iff (dimb-kindp (cdar acl2::x))
                    (consp acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: identp-of-caar-when-dimb-scopep

    (defthm identp-of-caar-when-dimb-scopep
      (implies (dimb-scopep acl2::x)
               (iff (identp (caar acl2::x))
                    (consp acl2::x)))
      :rule-classes ((:rewrite)))