• 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
            • Boolean-assert
            • Field-div-unchecked
            • Field-neq
              • Field-neq-correctness
              • Field-neq-spec
              • Field-neq-circuit
              • Field-neq-lifting
            • 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-neq

Formalization and verification of a circuit for field non-equality.

Given two field elements x and y, their non-equality is calculated via constraints of the form

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

If x = y, the first constraint forces z = 0, and the second constraint disappears; if x \neq y, the second constraint forces z = 1, and the fiest constraint becomes w = z / (x - y). In other words, z is 1 or 0 depending on whether x and y are non-equal or equal.

Subtopics

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