• 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
              • Abstract-syntax
              • Dynamic-semantics
                • Execution
                • Values
                • Dynamic-environments
                • Arithmetic-operations
                • 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
                  • Op-tuple-write
                  • Op-tuple-read
                  • Op-tuple-make
                  • 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
    • Tuple-operations

    Op-tuple-make

    Leo tuple construction operation.

    Signature
    (op-tuple-make vals) → result
    Arguments
    vals — Guard (value-listp vals).
    Returns
    result — Type (valuep result).

    A tuple in Leo is constructed from two or more values. However, here we also allow tuples of zero or one value. Tuples of zero values are constructed from the unit expression. There is no syntax in Leo to construct tuples of 1 value. The values may have any types. This operation never fails.

    Definitions and Theorems

    Function: op-tuple-make

    (defun op-tuple-make (vals)
      (declare (xargs :guard (value-listp vals)))
      (let ((__function__ 'op-tuple-make))
        (declare (ignorable __function__))
        (value-tuple vals)))

    Theorem: valuep-of-op-tuple-make

    (defthm valuep-of-op-tuple-make
      (b* ((result (op-tuple-make vals)))
        (valuep result))
      :rule-classes :rewrite)

    Theorem: op-tuple-make-of-value-list-fix-vals

    (defthm op-tuple-make-of-value-list-fix-vals
      (equal (op-tuple-make (value-list-fix vals))
             (op-tuple-make vals)))

    Theorem: op-tuple-make-value-list-equiv-congruence-on-vals

    (defthm op-tuple-make-value-list-equiv-congruence-on-vals
      (implies (value-list-equiv vals vals-equiv)
               (equal (op-tuple-make vals)
                      (op-tuple-make vals-equiv)))
      :rule-classes :congruence)