• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
      • Gl
        • Term-level-reasoning
        • Glmc
        • Other-resources
        • Optimization
        • Reference
          • Def-gl-thm
          • Shape-specs
          • Symbolic-objects
          • Gl-aside
          • Def-gl-param-thm
          • Symbolic-arithmetic
            • Bfr-floor-ss-aux
              • Bfr-integer-length-s1
              • Bfr-mod-ss-aux
              • Bfr-logapp-russ
              • Bfr-sign-abs-not-s
              • Bfr-ash-ss
              • Bfr-+-ss
              • Bfr-truncate-ss
              • Bfr-logapp-nus-aux
              • Bfr-ite-bss-fn-aux
              • Bfr-rem-ss
              • Bfr-mod-ss
              • Bfr-logbitp-n2v
              • Bfr-logapp-nus
              • Bfr-logapp-nss
              • Bfr-ite-bvv-fn-aux
              • Bfr-<-=-ss
              • Bfr-*-ss
              • Bfr-logxor-ss
              • Bfr-logior-ss
              • Bfr-logeqv-ss
              • Bfr-logand-ss
              • Bfr-ite-bvv-fn
              • Bfr-ite-bss-fn
              • Bfr-floor-ss
              • Bfr-expt-su
              • Bfr-logtail-ns
              • Bfr-loghead-nu
              • Bfr-loghead-ns
              • Bfr-logext-ns
              • Bfr-integer-length-s
              • Syntactically-true-p
              • Int-set-sign
              • Bfr-unary-minus-s
              • Bfr-lognot-s
              • Bfr-=-ss
              • Bfr-<-ss
              • Bfr-abs-s
              • Syntactically-zero-p
              • Bfr-=-uu
              • S-take
              • Integer-length-bound-s
              • Bfr-sign-s
              • Non-int-fix
              • Maybe-integer
              • All-nil
            • Bfr
            • Def-gl-boolean-constraint
            • Gl-mbe
            • Bvec
            • Flex-bindings
            • Auto-bindings
            • Gl-interp
            • Gl-set-uninterpreted
            • Def-gl-clause-processor
            • Def-glcp-ctrex-rewrite
            • ACL2::always-equal
            • Gl-hint
            • Def-gl-rewrite
            • Def-gl-branch-merge
            • Gl-force-check
            • Gl-concretize
            • Gl-assert
            • Gl-param-thm
            • Gl-simplify-satlink-mode
            • Gl-satlink-mode
            • Gl-bdd-mode
            • Gl-aig-bddify-mode
            • Gl-fraig-satlink-mode
          • Debugging
          • Basic-tutorial
        • Witness-cp
        • Ccg
        • Install-not-normalized
        • Rewrite$
        • Fgl
        • 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
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Symbolic-arithmetic

    Bfr-floor-ss-aux

    Signature
    (bfr-floor-ss-aux a b not-b) → (mv f m)
    Arguments
    a — Guard (true-listp a).
    b — Guard (true-listp b).
    not-b — Guard (true-listp not-b).
    Returns
    f — Type (true-listp f).
    m — Type (true-listp m).

    Definitions and Theorems

    Function: bfr-floor-ss-aux

    (defun bfr-floor-ss-aux (a b not-b)
     (declare (xargs :guard (and (true-listp a)
                                 (true-listp b)
                                 (true-listp not-b))))
     (declare (xargs :guard (equal not-b (bfr-lognot-s b))))
     (let ((__function__ 'bfr-floor-ss-aux))
      (declare (ignorable __function__))
      (b* (((mv first rest endp)
            (first/rest/end a))
           (not-b (mbe :logic (bfr-lognot-s b)
                       :exec not-b)))
       (if endp (mv (bfr-sterm first)
                    (bfr-ite-bss first (bfr-+-ss nil '(t) b)
                                 '(nil)))
        (b* (((mv rf rm)
              (bfr-floor-ss-aux rest b not-b))
             (rm (bfr-scons first rm))
             (less (bfr-<-ss rm b)))
          (mv (bfr-scons (bfr-not less) rf)
              (bfr-ite-bss less rm
                           (bfr-loghead-ns (integer-length-bound-s b)
                                           (bfr-+-ss t not-b rm)))))))))

    Theorem: true-listp-of-bfr-floor-ss-aux.f

    (defthm true-listp-of-bfr-floor-ss-aux.f
      (b* (((mv acl2::?f acl2::?m)
            (bfr-floor-ss-aux a b not-b)))
        (true-listp f))
      :rule-classes :type-prescription)

    Theorem: true-listp-of-bfr-floor-ss-aux.m

    (defthm true-listp-of-bfr-floor-ss-aux.m
      (b* (((mv acl2::?f acl2::?m)
            (bfr-floor-ss-aux a b not-b)))
        (true-listp m))
      :rule-classes :type-prescription)

    Theorem: bfr-floor-ss-aux-correct

    (defthm bfr-floor-ss-aux-correct
      (b* (((mv f m) (bfr-floor-ss-aux a b not-b)))
        (implies (< 0 (bfr-list->s b env))
                 (and (equal (bfr-list->s f env)
                             (floor (bfr-list->s a env)
                                    (bfr-list->s b env)))
                      (equal (bfr-list->s m env)
                             (mod (bfr-list->s a env)
                                  (bfr-list->s b env)))))))

    Theorem: bfr-floor-ss-aux-deps

    (defthm bfr-floor-ss-aux-deps
      (b* (((mv f m) (bfr-floor-ss-aux a b not-b)))
        (implies (and (not (pbfr-list-depends-on varname param a))
                      (not (pbfr-list-depends-on varname param b))
                      (not (pbfr-list-depends-on varname param not-b)))
                 (and (not (pbfr-list-depends-on varname param f))
                      (not (pbfr-list-depends-on varname param m))))))