• 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
      • Riscv
      • Taspi
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
              • Dynamic-semantics
              • Compilation
              • Static-semantics
                • Type-checking
                • Static-environments
                • Curve-parameterization
                  • Curve-subgroupp
                  • Curve-subgroup-add
                  • Curve-subgroup-mul
                  • Curve
                    • Curvep
                    • Curve-fix
                    • Curve-subgroup-neg
                    • Curve-generator
                    • Curve-zero
                    • Curve-base-prime
                    • Curve-scalar-prime
                  • Function-recursion
                  • Struct-recursion
                  • Input-checking
                  • Program-checking
                  • Type-maps-for-struct-components
                  • Program-and-input-checking
                  • Output-checking
                • Concrete-syntax
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Curve

    Curve-fix

    Fixer for curve.

    Signature
    (curve-fix x) → fixed-x
    Arguments
    x — Guard (curvep x).
    Returns
    fixed-x — Type (curvep fixed-x).

    Definitions and Theorems

    Function: curve-fix

    (defun curve-fix (x)
      (declare (xargs :guard (curvep x)))
      (mbe :logic (if (curvep x) x :edwards-bls12)
           :exec x))

    Theorem: curvep-of-curve-fix

    (defthm curvep-of-curve-fix
      (b* ((fixed-x (curve-fix x)))
        (curvep fixed-x))
      :rule-classes :rewrite)

    Theorem: curve-fix-when-curvep

    (defthm curve-fix-when-curvep
      (implies (curvep x)
               (equal (curve-fix x) x)))