• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
          • Expression-sizing
          • Occform
          • Oprewrite
          • Expand-functions
          • Delayredux
          • Unparameterization
          • Caseelim
            • Vl-casezx-stmt-elim
            • Vl-casezx-matchexpr
            • Vl-modulelist-caseelim
            • Vl-casezx-match-any-expr
            • Vl-casestmt-elim
            • Vl-casestmt-size-warnings
            • Vl-casezx-elim-aux
            • Vl-stmt-caseelim
            • Case-statement-problems
            • Vl-casestmt-compare-expr
            • Vl-initiallist-caseelim
            • Vl-alwayslist-caseelim
            • Vl-casestmt-elim-aux
            • Vl-initial-caseelim
            • Vl-always-caseelim
            • Vl-casestmt-sizes-agreep
              • Vl-casestmt-matchexpr-sizes-agreep
              • Vl-module-caseelim
              • Vl-design-caseelim
            • Split
            • Selresolve
            • Weirdint-elim
            • Vl-delta
            • Replicate-insts
            • Rangeresolve
            • Propagate
            • Clean-selects
            • Clean-params
            • Blankargs
            • Inline-mods
            • Expr-simp
            • Trunc
            • Always-top
            • Gatesplit
            • Gate-elim
            • Expression-optimization
            • Elim-supplies
            • Wildelim
            • Drop-blankports
            • Clean-warnings
            • Addinstnames
            • Custom-transform-hooks
            • Annotate
            • Latchcode
            • Elim-unused-vars
            • Problem-modules
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-casestmt-sizes-agreep

    Vl-casestmt-matchexpr-sizes-agreep

    Signature
    (vl-casestmt-matchexpr-sizes-agreep test match-exprs) → *
    Arguments
    test — Guard (vl-expr-p test).
    match-exprs — Guard (vl-exprlist-p match-exprs).

    Definitions and Theorems

    Function: vl-casestmt-matchexpr-sizes-agreep

    (defun vl-casestmt-matchexpr-sizes-agreep (test match-exprs)
     (declare (xargs :guard (and (vl-expr-p test)
                                 (vl-exprlist-p match-exprs))))
     (let ((__function__ 'vl-casestmt-matchexpr-sizes-agreep))
      (declare (ignorable __function__))
      (b* (((when (atom match-exprs)) t)
           (expr1 (car match-exprs)))
       (and
         (vl-expr->finaltype expr1)
         (eql (vl-expr->finalwidth test)
              (vl-expr->finalwidth expr1))
         (vl-casestmt-matchexpr-sizes-agreep test (cdr match-exprs))))))

    Theorem: vl-casestmt-matchexpr-sizes-agreep-when-atom

    (defthm vl-casestmt-matchexpr-sizes-agreep-when-atom
      (implies (atom match-exprs)
               (vl-casestmt-matchexpr-sizes-agreep test match-exprs)))

    Theorem: vl-casestmt-matchexpr-sizes-agreep-of-cons

    (defthm vl-casestmt-matchexpr-sizes-agreep-of-cons
     (equal
      (vl-casestmt-matchexpr-sizes-agreep test (cons expr1 match-exprs))
      (and (vl-expr->finaltype expr1)
           (equal (vl-expr->finalwidth test)
                  (vl-expr->finalwidth expr1))
           (vl-casestmt-matchexpr-sizes-agreep test match-exprs))))

    Theorem: vl-casestmt-matchexpr-sizes-agreep-of-vl-expr-fix-test

    (defthm vl-casestmt-matchexpr-sizes-agreep-of-vl-expr-fix-test
      (equal (vl-casestmt-matchexpr-sizes-agreep (vl-expr-fix test)
                                                 match-exprs)
             (vl-casestmt-matchexpr-sizes-agreep test match-exprs)))

    Theorem: vl-casestmt-matchexpr-sizes-agreep-vl-expr-equiv-congruence-on-test

    (defthm
     vl-casestmt-matchexpr-sizes-agreep-vl-expr-equiv-congruence-on-test
     (implies
      (vl-expr-equiv test test-equiv)
      (equal
           (vl-casestmt-matchexpr-sizes-agreep test match-exprs)
           (vl-casestmt-matchexpr-sizes-agreep test-equiv match-exprs)))
     :rule-classes :congruence)

    Theorem: vl-casestmt-matchexpr-sizes-agreep-of-vl-exprlist-fix-match-exprs

    (defthm
      vl-casestmt-matchexpr-sizes-agreep-of-vl-exprlist-fix-match-exprs
      (equal (vl-casestmt-matchexpr-sizes-agreep
                  test (vl-exprlist-fix match-exprs))
             (vl-casestmt-matchexpr-sizes-agreep test match-exprs)))

    Theorem: vl-casestmt-matchexpr-sizes-agreep-vl-exprlist-equiv-congruence-on-match-exprs

    (defthm
     vl-casestmt-matchexpr-sizes-agreep-vl-exprlist-equiv-congruence-on-match-exprs
     (implies
      (vl-exprlist-equiv match-exprs match-exprs-equiv)
      (equal
           (vl-casestmt-matchexpr-sizes-agreep test match-exprs)
           (vl-casestmt-matchexpr-sizes-agreep test match-exprs-equiv)))
     :rule-classes :congruence)