• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • 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-curve->d

    Get the d field from a twisted-edwards-curve.

    Signature
    (twisted-edwards-curve->d x) → fty::x.name
    Arguments
    x — Guard (twisted-edwards-curvep x).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: twisted-edwards-curve->d$inline

    (defun twisted-edwards-curve->d$inline (x)
      (declare (xargs :guard (twisted-edwards-curvep x)))
      (declare (xargs :guard t))
      (let ((acl2::__function__ 'twisted-edwards-curve->d))
        (declare (ignorable acl2::__function__))
        (mbe :logic
             (b* ((x (and t x))
                  (p (nfix (cdr (std::da-nth 0 x))))
                  (a (cdr (std::da-nth 1 x)))
                  (d (cdr (std::da-nth 2 x))))
               (if (and (dm::primep p)
                        (> p 2)
                        (fep a p)
                        (fep d p)
                        (not (equal a d))
                        (not (equal a 0))
                        (not (equal d 0)))
                   d
                 2))
             :exec (cdr (std::da-nth 2 x)))))

    Theorem: twisted-edwards-curve->d$inline-of-twisted-edwards-curve-fix-x

    (defthm
         twisted-edwards-curve->d$inline-of-twisted-edwards-curve-fix-x
     (equal
         (twisted-edwards-curve->d$inline (twisted-edwards-curve-fix x))
         (twisted-edwards-curve->d$inline x)))

    Theorem: twisted-edwards-curve->d$inline-twisted-edwards-curve-equiv-congruence-on-x

    (defthm
     twisted-edwards-curve->d$inline-twisted-edwards-curve-equiv-congruence-on-x
     (implies (twisted-edwards-curve-equiv x x-equiv)
              (equal (twisted-edwards-curve->d$inline x)
                     (twisted-edwards-curve->d$inline x-equiv)))
     :rule-classes :congruence)