• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
      • Gl
      • Witness-cp
      • Ccg
      • Install-not-normalized
      • Rewrite$
      • Fgl
        • Fgl-rewrite-rules
        • Fgl-function-mode
        • Fgl-object
        • Fgl-solving
        • Fgl-handling-if-then-elses
        • Fgl-getting-bits-from-objects
        • Fgl-primitive-and-meta-rules
        • Fgl-counterexamples
        • Fgl-interpreter-overview
        • Fgl-correctness-of-binding-free-variables
        • Fgl-debugging
        • Fgl-testbenches
        • Def-fgl-boolean-constraint
        • Fgl-stack
        • Fgl-rewrite-tracing
        • Def-fgl-param-thm
        • Def-fgl-thm
        • Fgl-fast-alist-support
        • Fgl-array-support
        • Advanced-equivalence-checking-with-fgl
        • Fgl-fty-support
        • Fgl-internals
          • Symbolic-arithmetic
            • Aabf-floor-ss-aux
            • Aabf-logapp-russ
            • Aabf-integer-length-s1
            • Aabf-mod-ss-aux
            • Aabf-ite-bss-fn-aux
            • Aabf-sign-abs-not-s
            • Aabf-ite-buu-fn-aux
            • Aabf-ash-ss
            • Aabf-<-=-ss
            • Aabf-+-ss
              • Aabf-truncate-ss
              • Aabf-rem-ss
              • Aabf-mod-ss
              • Aabf-logbitp-n2v
              • Aabf-ite-buu-fn
              • Aabf-ite-bss-fn
              • Aabf-expt-su
              • Aabf-*-ss
              • Aabf-logxor-ss
              • Aabf-logior-ss
              • Aabf-logeqv-ss
              • Aabf-logand-ss
              • Aabf-floor-ss
              • Aabf-logapp-nss-aux
              • Aabf-unary-minus-s
              • Aabf-signext-nss
              • Aabf-logapp-nss
              • Aabf-integer-length-s
              • Aabf-=-ss
              • Aabf-<-ss
              • Aabf-abs-s
              • Aabf-syntactically-zero-p
              • Aabf-scons
              • Aabf-logtail-ns
              • Aabf-loghead-ns
              • Aabf-logext-ns
              • Aabf-syntactically-false-p
              • Aabf-lognot-s
              • Int->aabflist
              • Aabf-ucons
              • Aabf-syntactically-true-p
              • Aabf-syntactically-signext-p
              • Aabf-syntactically-neg1-p
              • Aabf-sign-s
              • Aabf-integer-length-bound-s
              • Int-set-sign
              • Aabf-car
              • Aabf-first/rest/end
              • Non-int-fix
              • Maybe-integer
            • Bfr
            • Fgl-interpreter-state
        • Removable-runes
        • Efficiency
        • Rewrite-bounds
        • Bash
        • Def-dag-measure
        • Bdd
        • Remove-hyps
        • Contextual-rewriting
        • Simp
        • Rewrite$-hyps
        • Bash-term-to-dnf
        • Use-trivial-ancestors-check
        • Minimal-runes
        • Clause-processor-tools
        • Fn-is-body
        • Without-subsumption
        • Rewrite-equiv-hint
        • Def-bounds
        • Rewrite$-context
        • Try-gl-concls
        • Hint-utils
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Symbolic-arithmetic

    Aabf-+-ss

    Signature
    (aabf-+-ss c v1 v2 man) → (mv sum new-man)
    Arguments
    v1 — Guard (true-listp v1).
    v2 — Guard (true-listp v2).

    Definitions and Theorems

    Function: aabf-+-ss

    (defun aabf-+-ss (c v1 v2 man)
      (declare (xargs :guard (and (true-listp v1) (true-listp v2))))
      (declare (xargs :guard (and (aabf-p c man)
                                  (aabflist-p v1 man)
                                  (aabflist-p v2 man))))
      (let ((__function__ 'aabf-+-ss))
        (declare (ignorable __function__))
        (b* (((mv head1 tail1 end1)
              (aabf-first/rest/end v1))
             ((mv head2 tail2 end2)
              (aabf-first/rest/end v2))
             ((mv axorb man)
              (aabf-xor head1 head2 man))
             ((mv s man) (aabf-xor c axorb man))
             ((when (and end1 end2))
              (b* (((mv last man)
                    (aabf-ite axorb (aabf-not c man)
                              head1 man)))
                (mv (aabf-scons s (list last)) man)))
             ((mv c man)
              (aabf-nest (or (and c axorb) (and head1 head2))
                         man))
             ((mv rst man)
              (aabf-+-ss c tail1 tail2 man)))
          (mv (aabf-scons s rst) man))))

    Theorem: trivial-theorem-about-aabf-+-ss

    (defthm trivial-theorem-about-aabf-+-ss
      (b* nil
        (b* ((?ignore (aabf-+-ss c v1 v2 man)))
          t))
      :rule-classes nil)

    Theorem: true-listp-of-aabf-+-ss.sum

    (defthm true-listp-of-aabf-+-ss.sum
      (b* (((mv ?sum ?new-man)
            (aabf-+-ss c v1 v2 man)))
        (true-listp sum))
      :rule-classes :type-prescription)

    Theorem: aabf-extension-p-of-aabf-+-ss

    (defthm aabf-extension-p-of-aabf-+-ss
      (b* (((mv ?sum ?new-man)
            (aabf-+-ss c v1 v2 man)))
        (aabf-extension-p new-man man)))

    Theorem: aabf-p-of-aabf-+-ss

    (defthm aabf-p-of-aabf-+-ss
      (b* (((mv sum new-man)
            (aabf-+-ss c v1 v2 man)))
        (implies (and (aabf-p c man)
                      (aabflist-p v1 man)
                      (aabflist-p v2 man))
                 (and (aabflist-p sum new-man)))))

    Theorem: aabf-eval-of-aabf-+-ss

    (defthm aabf-eval-of-aabf-+-ss
     (b* (((mv sum new-man)
           (aabf-+-ss c v1 v2 man)))
       (implies
            (and (aabf-p c man)
                 (aabflist-p v1 man)
                 (aabflist-p v2 man))
            (and (equal (bools->int (aabflist-eval sum env new-man))
                        (+ (bool->bit (aabf-eval c env man))
                           (bools->int (aabflist-eval v1 env man))
                           (bools->int (aabflist-eval v2 env man))))))))

    Theorem: aabf-pred-of-aabf-+-ss

    (defthm aabf-pred-of-aabf-+-ss
      (b* (((mv sum new-man)
            (aabf-+-ss c v1 v2 man)))
        (implies (and (aabf-p c man)
                      (aabflist-p v1 man)
                      (aabflist-p v2 man)
                      (aabf-pred c man)
                      (aabflist-pred v1 man)
                      (aabflist-pred v2 man))
                 (and (aabflist-pred sum new-man)))))