• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Hons-and-memoization
      • Events
      • History
      • Parallelism
      • Programming
        • Defun
        • Declare
        • System-utilities
        • Stobj
        • State
        • Memoize
        • Mbe
        • Io
        • Apply$
        • Defpkg
        • Mutual-recursion
        • Loop$
        • Programming-with-state
        • Arrays
        • Characters
        • Time$
        • Loop$-primer
        • Fast-alists
        • Defmacro
        • Defconst
        • Evaluation
        • Guard
        • Equality-variants
        • Compilation
        • Hons
        • ACL2-built-ins
        • Developers-guide
        • System-attachments
        • Advanced-features
        • Set-check-invariant-risk
        • Numbers
          • Natp
          • Unsigned-byte-p
          • Posp
          • +
          • Bitp
          • Zero-test-idioms
          • Nat-listp
          • Integerp
          • <
          • *
          • Zp
          • -
          • Signed-byte-p
          • Logbitp
          • Expt
          • Ash
          • Rationalp
          • Sharp-f-reader
          • Logand
          • =
          • <=
          • Floor
          • Random$
          • Nfix
          • Truncate
          • Complex
          • Numbers-introduction
          • Code-char
          • Integer-length
          • Zip
          • Logior
          • Sharp-u-reader
          • Char-code
          • Unary--
          • Integer-listp
          • Boole$
          • /
          • Mod
          • Logxor
          • Lognot
          • Integer-range-p
          • Ifix
          • ACL2-numberp
          • Ceiling
          • Mod-expt
          • Round
          • Logeqv
          • Explode-nonnegative-integer
          • Max
          • Evenp
          • Nonnegative-integer-quotient
          • Zerop
          • Abs
          • Fix
          • Allocate-fixnum-range
          • Rem
          • 1+
          • Pos-listp
          • Signum
          • Real/rationalp
          • Rational-listp
            • Std/typed-lists/rational-listp
            • Rational-listp-basics
              • Arithmetic/rational-listp
            • Rfix
            • >=
            • >
            • Logcount
            • ACL2-number-listp
            • /=
            • Unary-/
            • Complex/complex-rationalp
            • Logtest
            • Logandc1
            • Logorc1
            • Logandc2
            • 1-
            • Numerator
            • Logorc2
            • Denominator
            • The-number
            • Realfix
            • Complex-rationalp
            • Min
            • Lognor
            • Zpf
            • Oddp
            • Minusp
            • Lognand
            • Imagpart
            • Conjugate
            • Int=
            • Realpart
            • Plusp
          • Irrelevant-formals
          • Efficiency
          • Introduction-to-programming-in-ACL2-for-those-who-know-lisp
          • Redefining-programs
          • Lists
          • Invariant-risk
          • Errors
          • Defabbrev
          • Conses
          • Alists
          • Set-register-invariant-risk
          • Strings
          • Program-wrapper
          • Get-internal-time
          • Basics
          • Packages
          • Defmacro-untouchable
          • Primitive
          • <<
          • Revert-world
          • Set-duplicate-keys-action
          • Unmemoize
          • Symbols
          • Def-list-constructor
          • Easy-simplify-term
          • Defiteration
          • Defopen
          • Sleep
        • Start-here
        • Real
        • Debugging
        • Miscellaneous
        • Output-controls
        • Macros
        • Interfacing-tools
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Rational-listp

    Rational-listp-basics

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

    Definitions and Theorems

    Theorem: rational-listp-of-cons

    (defthm rational-listp-of-cons
            (equal (rational-listp (cons a x))
                   (and (rationalp a) (rational-listp x)))
            :rule-classes ((:rewrite)))

    Theorem: rational-listp-of-cdr-when-rational-listp

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

    Theorem: rational-listp-when-not-consp

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

    Theorem: rationalp-of-car-when-rational-listp

    (defthm rationalp-of-car-when-rational-listp
            (implies (rational-listp x)
                     (iff (rationalp (car x)) (consp x)))
            :rule-classes ((:rewrite)))

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

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

    Theorem: rational-listp-of-list-fix

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

    Theorem: rational-listp-of-rev

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