• 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
                • Flatten-statements/branches
                • Simplify-flattened-if
                • Flatten-expression
                • Fenv-option
                • Flatten-fundecl
                • Fenv-const-add
                • Fenv
                • 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
    • Flattening

    Init-fenv

    Initial flattening environment.

    Signature
    (init-fenv curve) → env
    Arguments
    curve — Guard (curvep curve).
    Returns
    env — Type (fenvp env).

    This only contains the prime and the curve and the curve order (scalar-prime), and no constants.

    Definitions and Theorems

    Function: init-fenv

    (defun init-fenv (curve)
      (declare (xargs :guard (curvep curve)))
      (let ((__function__ 'init-fenv))
        (declare (ignorable __function__))
        (make-fenv :constants nil
                   :curve curve)))

    Theorem: fenvp-of-init-fenv

    (defthm fenvp-of-init-fenv
      (b* ((env (init-fenv curve)))
        (fenvp env))
      :rule-classes :rewrite)

    Theorem: init-fenv-of-curve-fix-curve

    (defthm init-fenv-of-curve-fix-curve
      (equal (init-fenv (curve-fix curve))
             (init-fenv curve)))

    Theorem: init-fenv-curve-equiv-congruence-on-curve

    (defthm init-fenv-curve-equiv-congruence-on-curve
      (implies (curve-equiv curve curve-equiv)
               (equal (init-fenv curve)
                      (init-fenv curve-equiv)))
      :rule-classes :congruence)