• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Pfcs
        • Proof-support
        • Semantics
        • Lifting
        • R1cs-subset
        • Indexed-names
        • Well-formedness
        • Abstract-syntax
          • Syntax-abstraction
          • Abstract-syntax-trees
            • Expression
              • Expression-fix
              • Expression-case
              • Expressionp
              • Expression-count
              • Expression-equiv
              • Expression-mul
              • Expression-add
                • Make-expression-add
                • Expression-add->arg2
                • Expression-add->arg1
                  • Change-expression-add
                • Expression-var
                • Expression-const
                • Expression-kind
              • Definition
              • Constraint
              • Definition-option
              • System
              • System-result
              • Expression-result
              • Expression-list-result
              • Definition-result
              • Definition-list-result
              • Constraint-result
              • Constraint-list-result
              • Expression-list
              • Definition-list
              • Constraint-list
            • Abstract-syntax-operations
            • Convenience-constructors
          • Concrete-syntax
          • R1cs-bridge
          • Parser-interface
        • Wp-gen
        • Dimacs-reader
        • Legacy-defrstobj
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Riscv
        • 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
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Expression-add

    Expression-add->arg1

    Get the arg1 field from a expression-add.

    Signature
    (expression-add->arg1 x) → arg1
    Arguments
    x — Guard (expressionp x).
    Returns
    arg1 — Type (expressionp arg1).

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

    Definitions and Theorems

    Function: expression-add->arg1$inline

    (defun expression-add->arg1$inline (x)
      (declare (xargs :guard (expressionp x)))
      (declare (xargs :guard (equal (expression-kind x) :add)))
      (let ((__function__ 'expression-add->arg1))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((x (and (equal (expression-kind x) :add)
                          x)))
               (expression-fix (std::da-nth 0 (cdr x))))
             :exec (std::da-nth 0 (cdr x)))))

    Theorem: expressionp-of-expression-add->arg1

    (defthm expressionp-of-expression-add->arg1
      (b* ((arg1 (expression-add->arg1$inline x)))
        (expressionp arg1))
      :rule-classes :rewrite)

    Theorem: expression-add->arg1$inline-of-expression-fix-x

    (defthm expression-add->arg1$inline-of-expression-fix-x
      (equal (expression-add->arg1$inline (expression-fix x))
             (expression-add->arg1$inline x)))

    Theorem: expression-add->arg1$inline-expression-equiv-congruence-on-x

    (defthm expression-add->arg1$inline-expression-equiv-congruence-on-x
      (implies (expression-equiv x x-equiv)
               (equal (expression-add->arg1$inline x)
                      (expression-add->arg1$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: expression-add->arg1-when-wrong-kind

    (defthm expression-add->arg1-when-wrong-kind
      (implies (not (equal (expression-kind x) :add))
               (equal (expression-add->arg1 x)
                      (expression-fix nil))))