• 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
          • 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
        • 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
    • Points-fty

    Point-finite

    Build a finite elliptic curve point.

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

    Definitions and Theorems

    Function: point-finite

    (defun point-finite (x y)
      (declare (xargs :guard (and (natp x) (natp y))))
      (let ((acl2::__function__ 'point-finite))
        (declare (ignorable acl2::__function__))
        (b* ((x (mbe :logic (nfix x) :exec x))
             (y (mbe :logic (nfix y) :exec y)))
          (cons x y))))

    Theorem: pointp-of-point-finite

    (defthm pointp-of-point-finite
      (b* ((p (point-finite x y))) (pointp p))
      :rule-classes :rewrite)

    Theorem: point-kind-of-point-finite

    (defthm point-kind-of-point-finite
      (equal (point-kind (point-finite x y))
             :finite))

    Theorem: point-finite->x-of-point-finite

    (defthm point-finite->x-of-point-finite
      (equal (point-finite->x (point-finite x y))
             (nfix x)))

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

    (defthm point-finite->y-of-point-finite
      (equal (point-finite->y (point-finite x y))
             (nfix y)))

    Theorem: point-finite-of-point-finite->x/y

    (defthm point-finite-of-point-finite->x/y
      (implies (equal (point-kind p) :finite)
               (equal (point-finite (point-finite->x p)
                                    (point-finite->y p))
                      (point-fix p))))

    Theorem: point-fix-when-finite

    (defthm point-fix-when-finite
      (implies (equal (point-kind p) :finite)
               (equal (point-fix p)
                      (point-finite (point-finite->x p)
                                    (point-finite->y p)))))

    Theorem: equal-of-point-finite

    (defthm equal-of-point-finite
      (equal (equal (point-finite x y) p)
             (and (pointp p)
                  (equal (point-kind p) :finite)
                  (equal (point-finite->x p) (nfix x))
                  (equal (point-finite->y p) (nfix y)))))

    Theorem: point-finite-of-nfix-x

    (defthm point-finite-of-nfix-x
      (equal (point-finite (nfix x) y)
             (point-finite x y)))

    Theorem: point-finite-nat-equiv-congruence-on-x

    (defthm point-finite-nat-equiv-congruence-on-x
      (implies (nat-equiv x x-equiv)
               (equal (point-finite x y)
                      (point-finite x-equiv y)))
      :rule-classes :congruence)

    Theorem: point-finite-of-nfix-y

    (defthm point-finite-of-nfix-y
      (equal (point-finite x (nfix y))
             (point-finite x y)))

    Theorem: point-finite-nat-equiv-congruence-on-y

    (defthm point-finite-nat-equiv-congruence-on-y
      (implies (nat-equiv y y-equiv)
               (equal (point-finite x y)
                      (point-finite x y-equiv)))
      :rule-classes :congruence)