• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Riscv
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • 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-if
            • Field-if
            • Boolean-xor
            • Boolean-or
            • Boolean-nor
            • Boolean-and
            • Boolean-nand
            • Boolean-neq
            • Boolean-eq
              • Boolean-eq-correctness
              • Boolean-eq-lifting
                • Boolean-eq-circuit
                • Boolean-eq-spec
              • Field-inv-checked
              • Boolean-assert-neq
              • Boolean-assert-eq
              • Field-eq
              • Field-div-checked
              • 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
      • Std
      • Community
      • Proof-automation
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Boolean-eq

    Boolean-eq-lifting

    Lifting of the circuit to a predicate.

    Definitions and Theorems

    Theorem: boolean-eq-pred-suff

    (defthm boolean-eq-pred-suff
      (implies (and (pfield::fep w prime)
                    (and (boolean-neq-pred x y w prime)
                         (boolean-not-pred w z prime)))
               (boolean-eq-pred x y z prime)))

    Theorem: definition-satp-to-boolean-eq-pred

    (defthm definition-satp-to-boolean-eq-pred
     (implies
      (and
       (equal
         (pfcs::lookup-definition '(:simple "boolean_eq")
                                  pfcs::defs)
         '(:definition (name :simple "boolean_eq")
                       (pfcs::para (:simple "x")
                                   (:simple "y")
                                   (:simple "z"))
                       (pfcs::body (:relation (:simple "boolean_neq")
                                              ((:var (:simple "x"))
                                               (:var (:simple "y"))
                                               (:var (:simple "w"))))
                                   (:relation (:simple "boolean_not")
                                              ((:var (:simple "w"))
                                               (:var (:simple "z")))))))
       (equal
         (pfcs::lookup-definition '(:simple "boolean_neq")
                                  pfcs::defs)
         '(:definition (name :simple "boolean_neq")
                       (pfcs::para (:simple "x")
                                   (:simple "y")
                                   (:simple "z"))
                       (pfcs::body (:relation (:simple "boolean_xor")
                                              ((:var (:simple "x"))
                                               (:var (:simple "y"))
                                               (:var (:simple "z")))))))
       (equal
         (pfcs::lookup-definition '(:simple "boolean_xor")
                                  pfcs::defs)
         '(:definition
               (name :simple "boolean_xor")
               (pfcs::para (:simple "x")
                           (:simple "y")
                           (:simple "z"))
               (pfcs::body
                    (:equal (:mul (:mul (:const 2) (:var (:simple "x")))
                                  (:var (:simple "y")))
                            (:sub (:add (:var (:simple "x"))
                                        (:var (:simple "y")))
                                  (:var (:simple "z")))))))
       (equal
         (pfcs::lookup-definition '(:simple "boolean_not")
                                  pfcs::defs)
         '(:definition
               (name :simple "boolean_not")
               (pfcs::para (:simple "x") (:simple "y"))
               (pfcs::body
                    (:equal (:mul (:sub (:const 1) (:var (:simple "x")))
                                  (:const 1))
                            (:var (:simple "y"))))))
       (pfield::fep x prime)
       (pfield::fep y prime)
       (pfield::fep z prime)
       (primep prime))
      (equal (pfcs::definition-satp '(:simple "boolean_eq")
                                    pfcs::defs (list x y z)
                                    prime)
             (boolean-eq-pred x y z prime))))