• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
      • Satlink
      • Truth
        • Index-permute-shrink
        • Permute-stretch
        • Env-mismatch-aux
        • Permute-shrink
        • Permute-polarity
        • Env-permute-polarity
        • Env-permute-shrink
        • Permute-var-down
        • Swap-vars-aux
        • Env-permute-stretch
        • Swap-vars
        • Permute-var-up
        • Negative-cofactor
        • Truth-perm-rev
        • Index-permute-stretch
        • Env-mismatch
        • Truth-perm
        • Swap-polarity
        • Positive-cofactor
        • Index-perm-rev
        • Env-perm-rev
        • Nth-set-bit-pos
        • Index-swap
        • Env-move-var-down
        • Is-xor-with-var
        • Index-perm
        • Env-swap-vars
        • Var
        • Truth-eval
        • Index-move-down
        • Env-update
        • Env-perm
        • Depends-on-witness
        • Env-swap-polarity
        • Var-repetitions
        • Env-move-var-up
        • Index-move-up
        • Depends-on
        • Truth-norm
          • Index-listp
          • Env-diff-index
          • Env-lookup
          • True
          • False
        • Ubdds
        • Bdd
        • Faig
        • Bed
        • 4v
      • Projects
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Truth

    Truth-norm

    Signature
    (truth-norm truth numvars) → norm-truth
    Arguments
    truth — Guard (integerp truth).
    numvars — Guard (natp numvars).

    Definitions and Theorems

    Function: truth-norm

    (defun
         truth-norm (truth numvars)
         (declare (xargs :guard (and (integerp truth) (natp numvars))))
         (let ((__function__ 'truth-norm))
              (declare (ignorable __function__))
              (loghead (ash 1 (lnfix numvars))
                       truth)))

    Theorem: truth-eval-of-truth-norm

    (defthm truth-eval-of-truth-norm
            (b* nil
                (equal (truth-eval (truth-norm truth numvars)
                                   env numvars)
                       (truth-eval truth env numvars))))

    Theorem: truth-norm-of-truth-norm

    (defthm truth-norm-of-truth-norm
            (b* nil
                (equal (truth-norm (truth-norm truth numvars)
                                   numvars)
                       (truth-norm truth numvars))))

    Theorem: size-of-truth-norm

    (defthm size-of-truth-norm
            (b* ((?norm-truth (truth-norm truth numvars)))
                (implies (and (natp size)
                              (<= (ash 1 (nfix numvars)) size))
                         (unsigned-byte-p size norm-truth))))

    Theorem: truth-eval-of-truth-norm-minus1

    (defthm
       truth-eval-of-truth-norm-minus1
       (b* nil
           (implies (and (syntaxp (and (quotep truth) (quotep numvars)))
                         (equal truth (truth-norm -1 numvars)))
                    (truth-eval truth env numvars))))

    Theorem: truth-norm-of-ifix-truth

    (defthm truth-norm-of-ifix-truth
            (equal (truth-norm (ifix truth) numvars)
                   (truth-norm truth numvars)))

    Theorem: truth-norm-int-equiv-congruence-on-truth

    (defthm truth-norm-int-equiv-congruence-on-truth
            (implies (int-equiv truth truth-equiv)
                     (equal (truth-norm truth numvars)
                            (truth-norm truth-equiv numvars)))
            :rule-classes :congruence)

    Theorem: truth-norm-of-nfix-numvars

    (defthm truth-norm-of-nfix-numvars
            (equal (truth-norm truth (nfix numvars))
                   (truth-norm truth numvars)))

    Theorem: truth-norm-nat-equiv-congruence-on-numvars

    (defthm truth-norm-nat-equiv-congruence-on-numvars
            (implies (nat-equiv numvars numvars-equiv)
                     (equal (truth-norm truth numvars)
                            (truth-norm truth numvars-equiv)))
            :rule-classes :congruence)