• 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
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • 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
          • Montgomery
          • Short-weierstrass-curves
            • Short-weierstrass
            • Short-weierstrass-primep
            • 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
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Short-weierstrass-curves

    Short-weierstrass-primep

    Check that the prime of a short Weierstrass curve is prime.

    Signature
    (short-weierstrass-primep curve) → yes/no
    Arguments
    curve — Guard (short-weierstrass-p curve).
    Returns
    yes/no — Type (booleanp yes/no).

    This is in a separate predicate for the reason explained in short-weierstrass.

    Definitions and Theorems

    Function: short-weierstrass-primep

    (defun short-weierstrass-primep (curve)
      (declare (xargs :guard (short-weierstrass-p curve)))
      (let ((acl2::__function__ 'short-weierstrass-primep))
        (declare (ignorable acl2::__function__))
        (dm::primep (short-weierstrass->p curve))))

    Theorem: booleanp-of-short-weierstrass-primep

    (defthm booleanp-of-short-weierstrass-primep
      (b* ((yes/no (short-weierstrass-primep curve)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: short-weierstrass-primep-of-short-weierstrass-fix-curve

    (defthm short-weierstrass-primep-of-short-weierstrass-fix-curve
      (equal (short-weierstrass-primep (short-weierstrass-fix curve))
             (short-weierstrass-primep curve)))

    Theorem: short-weierstrass-primep-short-weierstrass-equiv-congruence-on-curve

    (defthm
     short-weierstrass-primep-short-weierstrass-equiv-congruence-on-curve
     (implies (short-weierstrass-equiv curve curve-equiv)
              (equal (short-weierstrass-primep curve)
                     (short-weierstrass-primep curve-equiv)))
     :rule-classes :congruence)