• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
        • Base-api
        • Aignet-construction
        • Representation
        • Aignet-copy-init
        • Aignet-simplify-with-tracking
        • Aignet-simplify-marked-with-tracking
        • Aignet-cnf
        • Aignet-simplify-marked
        • Aignet-complete-copy
        • Aignet-transforms
          • Aignet-output-ranges
          • Aignet-comb-transforms
            • Fraig
              • Fraig-config
              • Fraig-sweep-node
              • Fraig-sweep-aux
              • Fraig-finish-copy-nonstrict
              • Fraig-core-aux
              • Fraig-output-type
              • Ipasir-check-aignet-equivalence
              • Fraig-store-ctrex-aux
              • Fraig-finish-copy-outs
              • Fraig-core
              • Fraig-ctrexes-maybe-resim
              • Fraig-sweep
              • Fraig-store-ctrex
              • S32v-row-repeat-bitcols
              • Fraig-ctrexes-resim-aux
              • Fraig-config-normalized-output-map
              • S32v-copy-cares
              • Ipasir-maybe-recycle
              • Fraig-ctrexes-ok
                • Fraig-add-equiv-class-outputs-aux-2
                • Fraig-add-equiv-class-outputs-aux-1
                • Fraig-ctrexes-resim
                • Fraig-create-aignet-node-mask
                • Fraig-classes-maybe-delete-class
                • Aignet-copy-outs-range
                • Fraig-record-sat-ctrex-rec
                • Fraig-ctrex-has-relevant-disagreement
                • S32v-bitcol-nth-set
                • Fraig-output-map-mark-non-simplified
                • Fraig-output-map-mark-simplified
                • Fraig-output-map-initial-equiv-start/count
                • Fraig-minimize-sat-ctrex-rec
                • Fraig-create-output-map
                • Bitarr-copy-cares-to-s32v-col
                • S32v-install-bit
                • S32v-bitcol-count-set
                • Fraig-ctrexes-init
                • Bitarr-or-cares-with-s32v-col
                • Fraig-ctrex-find-agreeable
                • S32v-repeat-bitcols
                • S32v-add-salt
                • Bitarr-remove-marked
                • Print-fraig-stats-noninitial
                • Fraig-ctrex-regvals->vecsim
                • Fraig-ctrex-invals->vecsim
                • Bitarr-to-s32v-col
                • Fraig-output-map-entry
                • Aignet-unmark-higher-levels
                • Aignet-mark-output-node-range
                • Fraig-initial-sim
                • Fraig-ctrexes-reinit
                • Fraig-add-equiv-class-outputs
                • Aignet-maybe-update-refs
                • S32v-randomize-rows
                • S32v-get-bit
                • Fraig-level-limit-ok
                • Aignet-vals->regvals-after-invals
                • Aignet-mark-fanout-cones-of-marked
                • Fraig-debug-output-ranges
                • S32v-zero-rows
                • Fraig-output-map-total-count
                • Fraig-output-map-has-multiple-initial-equivs
                • Fraig-output-map-has-initial-equivs
                • Fraig-output-type-map
                • Aignet-vals->in/regvals
                • Fraig-output-map
                • Fraig-total-checks
                • Fraig-stats-count-sat-call
                • Fraig-ctrex-ncols
                • Fraig-ctrex-data-rows
                • Fraig-stats-update-last-chance
                • Print-fraig-stats-initial
                • Print-classes-counts-with-mark
                • Fraig-stats-increment-forced-proved
                • Fraig-stats-increment-coincident-nodes
                • Print-classes-counts
                • Fraig-ctrex-in/reg-rows
              • Parametrize
              • Observability-fix
              • Constprop
              • Apply-m-assumption-n-output-output-transform-default
              • Balance
              • Apply-n-output-comb-transform-default
              • Apply-comb-transform-default
              • Obs-constprop
              • Rewrite
              • Comb-transform
              • Abc-comb-simplify
              • Prune
              • Rewrite!
              • M-assumption-n-output-comb-transform->name
              • N-output-comb-transform->name
              • Comb-transform->name
              • N-output-comb-transformlist
              • M-assumption-n-output-comb-transformlist
              • Comb-transformlist
              • Apply-comb-transform
            • Aignet-m-assumption-n-output-transforms
            • Aignet-n-output-comb-transforms
          • Aignet-eval
          • Semantics
          • Aignet-read-aiger
          • Aignet-write-aiger
          • Aignet-abc-interface
          • Utilities
        • Aig
        • Satlink
        • Truth
        • Ubdds
        • Bdd
        • Faig
        • Bed
        • 4v
      • Projects
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Fraig

    Fraig-ctrexes-ok

    Signature
    (fraig-ctrexes-ok fraig-ctrexes) → ok

    Definitions and Theorems

    Function: fraig-ctrexes-ok

    (defun fraig-ctrexes-ok (fraig-ctrexes)
      (declare (xargs :stobjs (fraig-ctrexes)))
      (declare (xargs :guard t))
      (let ((__function__ 'fraig-ctrexes-ok))
        (declare (ignorable __function__))
        (b* ((nctrexes (lnfix (fraig-ctrex-nbits fraig-ctrexes)))
             ((acl2::stobj-get ncols data-and-resims-ok)
              ((s32v (fraig-ctrex-data fraig-ctrexes))
               (bitarr (fraig-ctrex-resim-classes fraig-ctrexes)))
              (mv (s32v-ncols s32v)
                  (equal (s32v-nrows s32v)
                         (bits-length bitarr))))
             ((acl2::stobj-get vals/relevants-ok)
              ((packed-vals (fraig-ctrex-in/reg-vals fraig-ctrexes))
               (packed-relevants
                    (fraig-ctrex-in/reg-relevants fraig-ctrexes)))
              (and (equal (s32v-ncols packed-vals) ncols)
                   (equal (s32v-ncols packed-relevants)
                          ncols)
                   (equal (s32v-nrows packed-vals)
                          (s32v-nrows packed-relevants)))))
          (and (posp ncols)
               (<= nctrexes (* 32 ncols))
               data-and-resims-ok vals/relevants-ok))))

    Theorem: fraig-ctrexes-ok-implies-data-rows

    (defthm fraig-ctrexes-ok-implies-data-rows
     (b* ((?ok (fraig-ctrexes-ok fraig-ctrexes)))
      (implies
       ok
       (equal
        (len
           (stobjs::2darr->rows (nth *fraig-ctrex-data* fraig-ctrexes)))
        (fraig-ctrex-data-rows fraig-ctrexes)))))

    Theorem: fraig-ctrexes-ok-implies-data-columns

    (defthm fraig-ctrexes-ok-implies-data-columns
     (b* ((?ok (fraig-ctrexes-ok fraig-ctrexes)))
      (implies
       ok
       (equal
           (stobjs::2darr->ncols (nth *fraig-ctrex-data* fraig-ctrexes))
           (fraig-ctrex-ncols fraig-ctrexes)))))

    Theorem: fraig-ctrexes-ok-implies-classes-len

    (defthm fraig-ctrexes-ok-implies-classes-len
      (b* ((?ok (fraig-ctrexes-ok fraig-ctrexes)))
        (implies ok
                 (equal (len (nth *fraig-ctrex-resim-classes*
                                  fraig-ctrexes))
                        (fraig-ctrex-data-rows fraig-ctrexes)))))

    Theorem: fraig-ctrexes-ok-implies-vals-rows

    (defthm fraig-ctrexes-ok-implies-vals-rows
     (b* ((?ok (fraig-ctrexes-ok fraig-ctrexes)))
      (implies
         ok
         (equal (len (stobjs::2darr->rows (nth *fraig-ctrex-in/reg-vals*
                                               fraig-ctrexes)))
                (fraig-ctrex-in/reg-rows fraig-ctrexes)))))

    Theorem: fraig-ctrexes-ok-implies-relevants-rows

    (defthm fraig-ctrexes-ok-implies-relevants-rows
     (b* ((?ok (fraig-ctrexes-ok fraig-ctrexes)))
      (implies
       ok
       (equal
           (len (stobjs::2darr->rows (nth *fraig-ctrex-in/reg-relevants*
                                          fraig-ctrexes)))
           (fraig-ctrex-in/reg-rows fraig-ctrexes)))))

    Theorem: fraig-ctrexes-ok-implies-vals-columns

    (defthm fraig-ctrexes-ok-implies-vals-columns
      (b* ((?ok (fraig-ctrexes-ok fraig-ctrexes)))
        (implies
             ok
             (equal (stobjs::2darr->ncols (nth *fraig-ctrex-in/reg-vals*
                                               fraig-ctrexes))
                    (fraig-ctrex-ncols fraig-ctrexes)))))

    Theorem: fraig-ctrexes-ok-implies-relevants-columns

    (defthm fraig-ctrexes-ok-implies-relevants-columns
     (b* ((?ok (fraig-ctrexes-ok fraig-ctrexes)))
      (implies
        ok
        (equal (stobjs::2darr->ncols (nth *fraig-ctrex-in/reg-relevants*
                                          fraig-ctrexes))
               (fraig-ctrex-ncols fraig-ctrexes)))))

    Theorem: fraig-ctrexes-ok-implies-ncols-posp

    (defthm fraig-ctrexes-ok-implies-ncols-posp
      (b* ((?ok (fraig-ctrexes-ok fraig-ctrexes)))
        (implies ok
                 (posp (fraig-ctrex-ncols fraig-ctrexes))))
      :rule-classes :forward-chaining)

    Theorem: fraig-ctrexes-ok-implies-nctrexes-bound

    (defthm fraig-ctrexes-ok-implies-nctrexes-bound
      (b* ((?ok (fraig-ctrexes-ok fraig-ctrexes)))
        (implies ok
                 (<= (nfix (nth *fraig-ctrex-nbits* fraig-ctrexes))
                     (* 32 (fraig-ctrex-ncols fraig-ctrexes)))))
      :rule-classes :linear)

    Theorem: fraig-ctrexes-ok-implies-nctrexes-bound-natp

    (defthm fraig-ctrexes-ok-implies-nctrexes-bound-natp
      (b* ((?ok (fraig-ctrexes-ok fraig-ctrexes)))
        (implies (and ok
                      (natp (nth *fraig-ctrex-nbits* fraig-ctrexes)))
                 (<= (nth *fraig-ctrex-nbits* fraig-ctrexes)
                     (* 32 (fraig-ctrex-ncols fraig-ctrexes)))))
      :rule-classes :linear)