• 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-div-checked
            • Field-inv-checked
            • Field-assert-neq
            • Field-assert-eq
            • Field-mul
            • Field-sub
            • Field-square
            • Field-neg
            • Field-double
              • Field-double-circuit
              • Field-double-spec
              • Field-double-correctness
              • Field-double-lifting
              • 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-double

    Field-double-lifting

    Lifting of the circuit to a predicate.

    Definitions and Theorems

    Function: field-double-pred

    (defun field-double-pred (x y prime)
      (and (equal (pfield::mul (pfield::add x x prime)
                               (mod 1 prime)
                               prime)
                  y)))

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

    (defthm definition-satp-to-field-double-pred
     (implies
      (and
       (equal
            (pfcs::lookup-definition "field_double" pfcs::defs)
            '(:definition
                  (pfcs::name . "field_double")
                  (pfcs::para "x" "y")
                  (pfcs::body (:equal (:mul (:add (:var "x") (:var "x"))
                                            (:const 1))
                                      (:var "y")))))
       (pfield::fep x prime)
       (pfield::fep y prime)
       (primep prime))
      (equal (pfcs::definition-satp "field_double" pfcs::defs (list x y)
                                    prime)
             (field-double-pred x y prime))))