• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Pfcs
      • Wp-gen
      • Dimacs-reader
      • 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-assert-neq
            • Boolean-assert-eq
            • Field-eq
              • Field-eq-correctness
              • Field-eq-circuit
              • Field-eq-spec
              • Field-eq-lifting
              • Field-div-checked
              • Field-inv-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
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Field-eq

    Field-eq-lifting

    Lifting of the circuit to a predicate.

    Definitions and Theorems

    Theorem: field-eq-pred-suff

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

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

    (defthm definition-satp-to-field-eq-pred
     (implies
      (and
       (equal
        (pfcs::lookup-definition "field_eq" pfcs::defs)
        '(:definition
              (pfcs::name . "field_eq")
              (pfcs::para "x" "y" "z")
              (pfcs::body (:relation "field_neq"
                                     ((:var "x") (:var "y") (:var "w")))
                          (:relation "boolean_not"
                                     ((:var "w") (:var "z"))))))
       (equal
        (pfcs::lookup-definition "boolean_not" pfcs::defs)
        '(:definition
          (pfcs::name . "boolean_not")
          (pfcs::para "x" "y")
          (pfcs::body (:equal (:mul (:add (:const 1)
                                          (:mul (:const -1) (:var "x")))
                                    (:const 1))
                              (:var "y")))))
       (equal
          (pfcs::lookup-definition "field_neq" pfcs::defs)
          '(:definition
                (pfcs::name . "field_neq")
                (pfcs::para "x" "y" "z")
                (pfcs::body
                     (:equal (:mul (:add (:var "x")
                                         (:mul (:const -1) (:var "y")))
                                   (:var "w"))
                             (:var "z"))
                     (:equal (:mul (:add (:var "x")
                                         (:mul (:const -1) (:var "y")))
                                   (:add (:const 1)
                                         (:mul (:const -1) (:var "z"))))
                             (:const 0)))))
       (pfield::fep x prime)
       (pfield::fep y prime)
       (pfield::fep z prime)
       (primep prime))
      (equal (pfcs::definition-satp "field_eq" pfcs::defs (list x y z)
                                    prime)
             (field-eq-pred x y z prime))))