• 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
            • 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
              • Pointp
              • Point-in-pxp-p
              • Points-fty
                • Point-finite
                • Point
                • Point-kind
                • Point-finite->y
                  • Point-finite->x
                  • Point-infinite
                  • Point-fix
            • 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
    • Points-fty

    Point-finite->y

    Get the y coordinate of a finite elliptic curve point.

    Signature
    (point-finite->y p) → y
    Arguments
    p — Guard (pointp p).
    Returns
    y — Type (natp y).

    Definitions and Theorems

    Function: point-finite->y

    (defun point-finite->y (p)
      (declare (xargs :guard (pointp p)))
      (declare (xargs :guard (equal (point-kind p) :finite)))
      (let ((acl2::__function__ 'point-finite->y))
        (declare (ignorable acl2::__function__))
        (b* ((p (mbe :logic (point-fix p) :exec p)))
          (if (consp p) (cdr p) 0))))

    Theorem: natp-of-point-finite->y

    (defthm natp-of-point-finite->y
      (b* ((y (point-finite->y p))) (natp y))
      :rule-classes :rewrite)

    Theorem: point-finite->y-of-point-fix-p

    (defthm point-finite->y-of-point-fix-p
      (equal (point-finite->y (point-fix p))
             (point-finite->y p)))

    Theorem: point-finite->y-point-equiv-congruence-on-p

    (defthm point-finite->y-point-equiv-congruence-on-p
      (implies (point-equiv p p-equiv)
               (equal (point-finite->y p)
                      (point-finite->y p-equiv)))
      :rule-classes :congruence)