• 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
                • Execution
                • Values
                • Dynamic-environments
                • Arithmetic-operations
                  • Integer-arithmetic-operations
                  • Field-arithmetic-operations
                  • Scalar-field-arithmetic-operations
                  • Group-arithmetic-operations
                  • Op-mul
                  • Op-add
                  • Op-sub-wrapped
                  • Op-sub
                  • Op-rem-wrapped
                  • Op-pow-wrapped
                  • Op-pow
                    • Op-mul-wrapped
                    • Op-div-wrapped
                    • Op-div
                    • Op-add-wrapped
                    • Op-rem
                    • Op-square-root
                    • Op-square
                    • Op-neg
                    • Op-inv
                    • Op-double
                    • Op-abs-wrapped
                    • Op-abs
                  • Curve-parameterization
                  • Shift-operations
                  • Errors
                  • Value-expressions
                  • Locations
                  • Input-execution
                  • Edwards-bls12-generator
                  • Equality-operations
                  • Logical-operations
                  • Program-execution
                  • Ordering-operations
                  • Bitwise-operations
                  • Literal-evaluation
                  • Type-maps-for-struct-components
                  • Output-execution
                  • Tuple-operations
                  • Struct-operations
                • Compilation
                • Static-semantics
                • 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
    • Arithmetic-operations

    Op-pow

    Leo exponentiation operation.

    Signature
    (op-pow left right curve) → result
    Arguments
    left — Guard (valuep left).
    right — Guard (valuep right).
    curve — Guard (curvep curve).
    Returns
    result — Type (value-resultp result).

    Definitions and Theorems

    Function: op-pow

    (defun op-pow (left right curve)
      (declare (xargs :guard (and (valuep left)
                                  (valuep right)
                                  (curvep curve))))
      (let ((__function__ 'op-pow))
        (declare (ignorable __function__))
        (cond ((and (int-valuep left)
                    (int-valuep right))
               (op-int-pow left right))
              ((and (value-case left :field)
                    (value-case right :field))
               (op-field-pow left right curve))
              (t (reserrf (list :op-pow (value-fix left)
                                (value-fix right)))))))

    Theorem: value-resultp-of-op-pow

    (defthm value-resultp-of-op-pow
      (b* ((result (op-pow left right curve)))
        (value-resultp result))
      :rule-classes :rewrite)