• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
      • Sha-2
      • Yul
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Axe
      • Poseidon
      • Where-do-i-place-my-book
      • Aleo
        • Aleobft
        • Aleovm
          • Circuits
            • Circuits-pfcs
            • Circuits-r1cs
            • Field-div-flagged
            • Boolean-assert-true
            • Field-inv-flagged
            • Boolean-assert
            • Field-div-unchecked
            • Field-neq
            • Boolean-not
            • Boolean-assert-all
              • Boolean-assert-all-lifting
              • Boolean-assert-all-circuit
              • Boolean-assert-all-circuit-body
              • Boolean-assert-all-spec
              • Boolean-assert-all-correctness
              • Boolean-if
              • Field-if
              • Boolean-xor
              • Boolean-or
              • Boolean-nor
              • Boolean-and
              • Boolean-nand
              • Boolean-neq
              • Boolean-eq
              • Field-div-checked
              • Field-inv-checked
              • Boolean-assert-neq
              • Boolean-assert-eq
              • Field-eq
              • Field-assert-neq
              • Field-assert-eq
              • Field-mul
              • Field-sub
              • Field-square
              • Field-neg
              • Field-double
              • Field-add
            • Language
          • Leo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Boolean-assert-all

    Boolean-assert-all-correctness

    Correctness of the circuit.

    The equivalence between predicate and specification is proved by induction, via the equivalence theorem for single booleans and the specification predicates.

    The extension to the circuit is boilerplate, given the lifting theorem.

    Definitions and Theorems

    Theorem: boolean-assert-all-pred-to-spec

    (defthm boolean-assert-all-pred-to-spec
      (implies (and (primep prime)
                    (pfield::fe-listp xs prime))
               (equal (boolean-assert-all-pred xs prime)
                      (bit-listp xs))))

    Theorem: boolean-assert-all-circuit-to-spec

    (defthm boolean-assert-all-circuit-to-spec
     (implies
      (and
       (equal
         (pfcs::lookup-definition (pfname "boolean_assert_all" (len xs))
                                  defs)
         (boolean-assert-all-circuit (len xs)))
       (equal (pfcs::lookup-definition (pfname "boolean_assert")
                                       defs)
              (boolean-assert-circuit))
       (primep prime)
       (pfield::fe-listp xs prime))
      (equal
           (pfcs::definition-satp (pfname "boolean_assert_all" (len xs))
                                  defs xs prime)
           (bit-listp xs))))