• 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
            • Field-div-flagged
            • Boolean-assert-true
            • Field-inv-flagged
              • Field-inv-flagged-correctness
              • Field-inv-flagged-spec
              • Field-inv-flagged-circuit
              • Field-inv-flagged-lifting
            • 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-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
  • Circuits

Field-inv-flagged

Formalization and verification of a circuit for flagged field inversion.

This is not yet implemented in snarkVM.

Given a field element x, the constraints

\begin{array}{l} (x) (w) = (1 - e) \\ (x) (e) = (0) \\ (w) (1 - e) = (y) \end{array}

work as follows: if x \neq 0, the second constraint becomes e = 0, the first constraint becomes w = 1 / x, and the third constraint becomes y = w = 1 / x. if x = 0, the second constraint disappears, the first constraint becomes e = 1, and the third constraint becomes y = 0. In other words, e is an error flag, signaling whether the inverse of x is defined (0) or not (1): if the error flag is 0, y is the inverse of x; if the error flag is 1, y is totalized to be 0, and w can be anything.

Subtopics

Field-inv-flagged-correctness
Correctness of the circuit.
Field-inv-flagged-spec
Specification of the circuit.
Field-inv-flagged-circuit
Construction of the circuit.
Field-inv-flagged-lifting
Lifting of the circuit to a predicate.