• 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-double

    Leo double operation.

    Signature
    (op-double arg curve) → result
    Arguments
    arg — Guard (valuep arg).
    curve — Guard (curvep curve).
    Returns
    result — Type (value-resultp result).

    Definitions and Theorems

    Function: op-double

    (defun op-double (arg curve)
      (declare (xargs :guard (and (valuep arg) (curvep curve))))
      (let ((__function__ 'op-double))
        (declare (ignorable __function__))
        (cond ((value-case arg :field)
               (op-field-double arg curve))
              ((value-case arg :group)
               (op-group-double arg curve))
              (t (reserrf (list :op-double (value-fix arg)))))))

    Theorem: value-resultp-of-op-double

    (defthm value-resultp-of-op-double
      (b* ((result (op-double arg curve)))
        (value-resultp result))
      :rule-classes :rewrite)