• 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
      • Riscv
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
        • R1cs
        • Interfaces
        • Sha-2
        • Keccak
        • Kdf
        • Mimc
        • Padding
        • Hmac
        • Elliptic-curves
          • Secp256k1-attachment
          • Twisted-edwards
            • Twisted-edwards-mul
            • Twisted-edwards-mul-fast
            • Twisted-edwards-add
            • Twisted-edwards-point-orderp
            • Twisted-edwards-add-associativity
            • Twisted-edwards-mul-distributivity-over-scalar-addition
            • Twisted-edwards-neg-inverse
            • Twisted-edwards-mul-fast-nonneg
            • Twisted-edwards-curve
              • Twisted-edwards-curve-fix
              • Twisted-edwards-curve-equiv
              • Twisted-edwards-curvep
                • Make-twisted-edwards-curve
                • Twisted-edwards-curve->p
                • Change-twisted-edwards-curve
                • Twisted-edwards-curve->d
                • Twisted-edwards-curve->a
              • Twisted-edwards-mul-nonneg
              • Birational-montgomery-twisted-edwards
              • Twisted-edwards-compress
              • Twisted-edwards-neg
              • Twisted-edwards-sub
              • Point-on-twisted-edwards-p
              • Twisted-edwards-curve-completep
              • Twisted-edwards-point-order-leastp
              • Twisted-edwards-only-points-with-x-0-or-y-1
              • Twisted-edwards-add-inverse-uniqueness
              • Twisted-edwards-distributivity-of-neg-over-add
              • Twisted-edwards-mul-associativity
              • Twisted-edwards-zero
              • Twisted-edwards-add-closure
              • Twisted-edwards-point-orderp-of-neg
              • Twisted-edwards-mul-of-mod-order
              • Twisted-edwards-zero-identity
              • Twisted-edwards-add-cancel-left
              • Twisted-edwards-mul-of-neg
              • Twisted-edwards-add-commutative
            • Montgomery
            • Short-weierstrass-curves
            • Birational-montgomery-twisted-edwards
            • Has-square-root?-satisfies-pfield-squarep
            • Secp256k1
            • Secp256k1-domain-parameters
            • Secp256k1-types
            • Pfield-squarep
            • Secp256k1-interface
            • Prime-field-extra-rules
            • Points
          • Attachments
          • Elliptic-curve-digital-signature-algorithm
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Community
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Twisted-edwards-curve

    Twisted-edwards-curvep

    Recognizer for twisted-edwards-curve structures.

    Signature
    (twisted-edwards-curvep x) → *

    Definitions and Theorems

    Function: twisted-edwards-curvep

    (defun twisted-edwards-curvep (x)
      (declare (xargs :guard t))
      (let ((acl2::__function__ 'twisted-edwards-curvep))
        (declare (ignorable acl2::__function__))
        (and (mbe :logic (and (alistp x)
                              (equal (strip-cars x) '(p a d)))
                  :exec (fty::alist-with-carsp x '(p a d)))
             (b* ((p (cdr (std::da-nth 0 x)))
                  (?a (cdr (std::da-nth 1 x)))
                  (?d (cdr (std::da-nth 2 x))))
               (and (natp p)
                    (dm::primep p)
                    (> p 2)
                    (fep a p)
                    (fep d p)
                    (not (equal a d))
                    (not (equal a 0))
                    (not (equal d 0)))))))

    Theorem: consp-when-twisted-edwards-curvep

    (defthm consp-when-twisted-edwards-curvep
      (implies (twisted-edwards-curvep x)
               (consp x))
      :rule-classes :compound-recognizer)