• 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
              • Compilation
              • Static-semantics
                • Type-checking
                • Static-environments
                • Curve-parameterization
                • Function-recursion
                • Struct-recursion
                • Input-checking
                  • Check-input-item
                  • Check-input-items
                    • Check-input-section-list
                    • Check-input-section
                    • Check-input-file
                    • Check-input-expression
                    • Check-input-type
                  • Program-checking
                  • Type-maps-for-struct-components
                  • Program-and-input-checking
                  • Output-checking
                • 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
    • Input-checking

    Check-input-items

    Check a list of input items.

    Signature
    (check-input-items initems intitle params env) → new-params
    Arguments
    initems — Guard (input-item-listp initems).
    intitle — Guard (input-titlep intitle).
    params — Guard (funparam-listp params).
    env — Guard (senvp env).
    Returns
    new-params — Type (funparam-list-resultp new-params).

    We check each one of them, one after the other. These are all under the same input title.

    Definitions and Theorems

    Function: check-input-items

    (defun check-input-items (initems intitle params env)
      (declare (xargs :guard (and (input-item-listp initems)
                                  (input-titlep intitle)
                                  (funparam-listp params)
                                  (senvp env))))
      (let ((__function__ 'check-input-items))
        (declare (ignorable __function__))
        (b* (((when (endp initems))
              (funparam-list-fix params))
             ((okf params)
              (check-input-item (car initems)
                                intitle params env)))
          (check-input-items (cdr initems)
                             intitle params env))))

    Theorem: funparam-list-resultp-of-check-input-items

    (defthm funparam-list-resultp-of-check-input-items
      (b* ((new-params (check-input-items initems intitle params env)))
        (funparam-list-resultp new-params))
      :rule-classes :rewrite)

    Theorem: check-input-items-of-input-item-list-fix-initems

    (defthm check-input-items-of-input-item-list-fix-initems
      (equal (check-input-items (input-item-list-fix initems)
                                intitle params env)
             (check-input-items initems intitle params env)))

    Theorem: check-input-items-input-item-list-equiv-congruence-on-initems

    (defthm
          check-input-items-input-item-list-equiv-congruence-on-initems
      (implies
           (input-item-list-equiv initems initems-equiv)
           (equal (check-input-items initems intitle params env)
                  (check-input-items initems-equiv intitle params env)))
      :rule-classes :congruence)

    Theorem: check-input-items-of-input-title-fix-intitle

    (defthm check-input-items-of-input-title-fix-intitle
      (equal (check-input-items initems (input-title-fix intitle)
                                params env)
             (check-input-items initems intitle params env)))

    Theorem: check-input-items-input-title-equiv-congruence-on-intitle

    (defthm check-input-items-input-title-equiv-congruence-on-intitle
      (implies
           (input-title-equiv intitle intitle-equiv)
           (equal (check-input-items initems intitle params env)
                  (check-input-items initems intitle-equiv params env)))
      :rule-classes :congruence)

    Theorem: check-input-items-of-funparam-list-fix-params

    (defthm check-input-items-of-funparam-list-fix-params
      (equal (check-input-items initems
                                intitle (funparam-list-fix params)
                                env)
             (check-input-items initems intitle params env)))

    Theorem: check-input-items-funparam-list-equiv-congruence-on-params

    (defthm check-input-items-funparam-list-equiv-congruence-on-params
      (implies
           (funparam-list-equiv params params-equiv)
           (equal (check-input-items initems intitle params env)
                  (check-input-items initems intitle params-equiv env)))
      :rule-classes :congruence)

    Theorem: check-input-items-of-senv-fix-env

    (defthm check-input-items-of-senv-fix-env
      (equal (check-input-items initems intitle params (senv-fix env))
             (check-input-items initems intitle params env)))

    Theorem: check-input-items-senv-equiv-congruence-on-env

    (defthm check-input-items-senv-equiv-congruence-on-env
      (implies
           (senv-equiv env env-equiv)
           (equal (check-input-items initems intitle params env)
                  (check-input-items initems intitle params env-equiv)))
      :rule-classes :congruence)