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

    Basic-expt-normalization

    Basic rules for normalizing and simplifying exponents.

    Definitions and Theorems

    Theorem: right-unicity-of-1-for-expt

    (defthm right-unicity-of-1-for-expt
      (equal (expt r 1) (fix r)))

    Theorem: expt-minus

    (defthm expt-minus
      (equal (expt r (- i)) (/ (expt r i))))

    Theorem: exponents-add-for-nonneg-exponents

    (defthm exponents-add-for-nonneg-exponents
      (implies (and (<= 0 i)
                    (<= 0 j)
                    (fc (integerp i))
                    (fc (integerp j)))
               (equal (expt r (+ i j))
                      (* (expt r i) (expt r j)))))

    Theorem: exponents-add

    (defthm exponents-add
      (implies (and (syntaxp (not (and (quotep i)
                                       (integerp (cadr i))
                                       (or (equal (cadr i) 1)
                                           (equal (cadr i) -1)))))
                    (syntaxp (not (and (quotep j)
                                       (integerp (cadr j))
                                       (or (equal (cadr j) 1)
                                           (equal (cadr j) -1)))))
                    (not (equal 0 r))
                    (fc (acl2-numberp r))
                    (fc (integerp i))
                    (fc (integerp j)))
               (equal (expt r (+ i j))
                      (* (expt r i) (expt r j)))))

    Theorem: exponents-add-unrestricted

    (defthm exponents-add-unrestricted
      (implies (and (not (equal 0 r))
                    (fc (acl2-numberp r))
                    (fc (integerp i))
                    (fc (integerp j)))
               (equal (expt r (+ i j))
                      (* (expt r i) (expt r j)))))

    Theorem: distributivity-of-expt-over-*

    (defthm distributivity-of-expt-over-*
      (equal (expt (* a b) i)
             (* (expt a i) (expt b i))))

    Theorem: expt-1

    (defthm expt-1 (equal (expt 1 x) 1))

    Theorem: exponents-multiply

    (defthm exponents-multiply
      (implies (and (fc (integerp i))
                    (fc (integerp j)))
               (equal (expt (expt r i) j)
                      (expt r (* i j)))))

    Theorem: functional-commutativity-of-expt-/-base

    (defthm functional-commutativity-of-expt-/-base
      (equal (expt (/ r) i) (/ (expt r i))))

    Theorem: equal-constant-+

    (defthm equal-constant-+
      (implies (syntaxp (and (quotep c1) (quotep c2)))
               (equal (equal (+ c1 x) c2)
                      (if (acl2-numberp c2)
                          (if (acl2-numberp x)
                              (equal x (- c2 c1))
                            (equal (fix c1) c2))
                        nil))))