• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • 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
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • 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)