• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • C
        • Soft
        • Bv
        • Imp-language
        • Ethereum
        • Event-macros
        • Java
        • Riscv
        • Bitcoin
        • Zcash
        • Yul
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
          • Process-syntheto-toplevel-fn
          • Translation
          • Language
            • Static-semantics
            • Abstract-syntax
              • Expression
              • Expression-sum-field-list
              • Type
              • Binary-op
              • Expression-product-field-list
              • Abstract-syntax-operations
              • Function-definition-list->header-list
              • Type-definition-list->name-list
              • Initializer-list->value-list
              • Function-header-list->name-list
              • Typed-variable-list->type-list
              • Typed-variable-list->name-list
              • Branch-list->condition-list
              • Alternative-list->name-list
              • Function-specifier
              • Expression-variable-list
              • Type-subset
              • Field-list->type-list
              • Field-list->name-list
              • Function-specification
              • Identifier
              • Toplevel
              • Function-definer
              • Function-header
              • Type-definer
              • Literal
              • Type-product
              • Function-definition
              • Type-sum
              • Maybe-expression
              • Transform-argument-value
              • Transform
              • Theorem
              • Quantifier
              • Maybe-function-specification
              • Maybe-typed-variable
              • Maybe-type-definition
              • Maybe-function-header
              • Maybe-function-definition
              • Maybe-type-sum
              • Maybe-type-subset
              • Maybe-type-product
              • Maybe-type-definer
              • Maybe-theorem
              • Maybe-type
              • Initializer
              • Type-definition
              • Alternative
              • Unary-op
              • Typed-variable
              • Branch
              • Field
              • Transform-argument
              • Type-recursion
              • Program
              • Function-recursion
              • Typed-variable-list
              • Toplevel-name
              • Toplevel-list
                • Toplevel-list-fix
                • Toplevel-listp
                  • Toplevel-listp-basics
                  • Toplevel-list-equiv
                • Initializer-list
                • Expression-fixtypes
                • Toplevel-fn-names
                • Lookup-transform-argument
                • Function-definition-names
                • Type-definition-list
                • Transform-argument-list
                • Function-header-list
                • Function-definition-list
                • Alternative-list
                • Type-list
                • Identifier-set
                • Identifier-list
                • Field-list
                • Expression-list
                • Branch-list
                • Extract-default-param-alist
                • Create-arg-defaults-table
              • Outcome
              • Abstract-syntax-operations
              • Outcome-list
              • Outcomes
            • Process-syntheto-toplevel
            • Shallow-embedding
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Toplevel-listp

    Toplevel-listp-basics

    Basic theorems about toplevel-listp, generated by std::deflist.

    Definitions and Theorems

    Theorem: toplevel-listp-of-cons

    (defthm toplevel-listp-of-cons
      (equal (toplevel-listp (cons acl2::a acl2::x))
             (and (toplevelp acl2::a)
                  (toplevel-listp acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: toplevel-listp-of-cdr-when-toplevel-listp

    (defthm toplevel-listp-of-cdr-when-toplevel-listp
      (implies (toplevel-listp (double-rewrite acl2::x))
               (toplevel-listp (cdr acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: toplevel-listp-when-not-consp

    (defthm toplevel-listp-when-not-consp
      (implies (not (consp acl2::x))
               (equal (toplevel-listp acl2::x)
                      (not acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: toplevelp-of-car-when-toplevel-listp

    (defthm toplevelp-of-car-when-toplevel-listp
      (implies (toplevel-listp acl2::x)
               (iff (toplevelp (car acl2::x))
                    (consp acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: true-listp-when-toplevel-listp-compound-recognizer

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

    Theorem: toplevel-listp-of-list-fix

    (defthm toplevel-listp-of-list-fix
      (implies (toplevel-listp acl2::x)
               (toplevel-listp (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: toplevel-listp-of-rev

    (defthm toplevel-listp-of-rev
      (equal (toplevel-listp (rev acl2::x))
             (toplevel-listp (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: toplevel-listp-of-append

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

    Theorem: toplevelp-of-nth-when-toplevel-listp

    (defthm toplevelp-of-nth-when-toplevel-listp
      (implies (toplevel-listp acl2::x)
               (iff (toplevelp (nth acl2::n acl2::x))
                    (< (nfix acl2::n) (len acl2::x))))
      :rule-classes ((:rewrite)))