• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
      • Sha-2
      • Yul
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Axe
      • Poseidon
      • Where-do-i-place-my-book
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
                • Flatten-statements/branches
                • Simplify-flattened-if
                • Flatten-expression
                • Fenv-option
                • Flatten-fundecl
                • Fenv-const-add
                • Fenv
                  • Fenv-fix
                  • Fenvp
                  • Fenv-equiv
                  • Make-fenv
                  • Fenv->constants
                  • Change-fenv
                  • Fenv->curve
                  • Fenv-const-lookup
                  • Init-fenv
                  • Const-fenv
                • Abstract-syntax
                • Dynamic-semantics
                • 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
    • Fenv

    Fenv->curve

    Get the curve field from a fenv.

    Signature
    (fenv->curve x) → curve
    Arguments
    x — Guard (fenvp x).
    Returns
    curve — Type (curvep curve).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: fenv->curve$inline

    (defun fenv->curve$inline (x)
      (declare (xargs :guard (fenvp x)))
      (declare (xargs :guard t))
      (let ((__function__ 'fenv->curve))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((x (and t x)))
               (curve-fix (cdr (std::da-nth 1 (cdr x)))))
             :exec (cdr (std::da-nth 1 (cdr x))))))

    Theorem: curvep-of-fenv->curve

    (defthm curvep-of-fenv->curve
      (b* ((curve (fenv->curve$inline x)))
        (curvep curve))
      :rule-classes :rewrite)

    Theorem: fenv->curve$inline-of-fenv-fix-x

    (defthm fenv->curve$inline-of-fenv-fix-x
      (equal (fenv->curve$inline (fenv-fix x))
             (fenv->curve$inline x)))

    Theorem: fenv->curve$inline-fenv-equiv-congruence-on-x

    (defthm fenv->curve$inline-fenv-equiv-congruence-on-x
      (implies (fenv-equiv x x-equiv)
               (equal (fenv->curve$inline x)
                      (fenv->curve$inline x-equiv)))
      :rule-classes :congruence)