• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
      • Satlink
      • Truth
        • Index-permute-shrink
        • Permute-stretch
        • Permute-shrink
        • Env-mismatch-aux
        • Env-permute-shrink
        • Permute-polarity
        • Env-permute-polarity
        • Permute-var-down
        • Env-permute-stretch
        • Swap-vars-aux
        • Swap-vars
        • Permute-var-up
        • Truth-perm-rev
        • Negative-cofactor
        • Index-permute-stretch
        • Env-mismatch
        • Swap-polarity
        • Positive-cofactor
        • Truth-perm
        • Index-perm-rev
        • Nth-set-bit-pos
        • Env-perm-rev
        • Is-xor-with-var
        • Index-swap
        • Index-perm
        • Env-move-var-down
        • Truth-eval
        • Env-swap-vars
        • Env-perm
        • Depends-on-witness
        • Var
        • Index-move-down
        • Env-update
        • Env-swap-polarity
        • Var-repetitions
        • Env-move-var-up
        • Depends-on
        • Index-move-up
        • 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
      • Math
      • Testing-utilities
    • 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)