• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
          • Typo-detection
            • Typo-read-lowercase-part
              • Typo-read-part
              • Typo-read-uppercase-part
              • Typo-read-special
              • Typo-detect-aux
              • Typo-detect
              • Typo-find-plausible-typos1
              • Typo-mismatch-plausibly-typo-p
              • Typo-partitioning-alist
              • Typo-partition
              • Vl-typo-first-mismatch
              • Typo-partitions-plausibly-typo-p
              • Vl-typo-count-mismatches
              • Typo-numbers
              • *typo-special-substrings-chars*
              • *typo-numbers*
            • Vl-wireinfo-alistp
            • Vl-annotate-vardecllist-with-wireinfo
            • Vl-useset-report-entry-p
            • Vl-print-useset-report-entry
            • Vl-mark-wires-for-module
            • Vl-split-useset-report
            • Vl-annotate-vardecl-with-wireinfo
            • Vl-mark-wires-for-modinstlist
            • Vl-mark-wires-for-modinst
            • Vl-mark-wires-for-gateinstlist
            • Vl-mark-wires-for-gateinst
            • Vl-mark-wires-for-plainarg
            • Vl-wireinfo-p
            • Vl-mark-wires-for-modulelist
            • Vl-vardecllist-impexp-names
            • Vl-report-totals
            • Vl-mark-wires-for-plainarglist
            • Vl-collect-unused-or-unset-wires
            • Vl-clean-up-warning-wires
            • Vl-print-useset-report-top
            • Vl-mark-wires-for-arguments
            • Vl-useset-report-p
            • Vl-star-names-of-warning-wires
            • Vl-design-use-set-report
            • Vl-module-impexp-names
            • Vl-make-initial-wireinfo-alist
            • Vl-mark-wire-used
            • Vl-mark-wire-set
            • Vl-mark-wires-used
            • Vl-mark-wires-for-assignment
            • Vl-mark-wires-for-assignlist
            • Vl-mark-wires-set
            • Vl-print-useset-report-full-aux
            • Vl-print-typo-alist
            • Vl-print-typo-possibilities
          • Syntax
          • Getting-started
          • Utilities
          • Loader
          • Transforms
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Vwsim
        • Fgl
        • Vl
        • Svl
        • X86isa
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Typo-detection

    Typo-read-lowercase-part

    Read as many lowercase characters as possible, but stop early if a special is encountered.

    Signature
    (typo-read-lowercase-part x) → (mv prefix remainder)
    Arguments
    x — Guard (character-listp x).
    Returns
    prefix — Type (character-listp prefix), given (force (character-listp x)).
    remainder — Type (character-listp remainder), given (force (character-listp x)).

    Definitions and Theorems

    Function: typo-read-lowercase-part

    (defun typo-read-lowercase-part (x)
      (declare (xargs :guard (character-listp x)))
      (let ((__function__ 'typo-read-lowercase-part))
        (declare (ignorable __function__))
        (b* (((when (atom x)) (mv nil x))
             ((mv prefix ?remainder)
              (typo-read-special *typo-special-substrings-chars* x))
             ((when prefix) (mv nil x))
             ((unless (vl-typo-lowercase-p (car x)))
              (mv nil x))
             ((mv prefix remainder)
              (typo-read-lowercase-part (cdr x))))
          (mv (cons (car x) prefix) remainder))))

    Theorem: character-listp-of-typo-read-lowercase-part.prefix

    (defthm character-listp-of-typo-read-lowercase-part.prefix
      (implies (force (character-listp x))
               (b* (((mv ?prefix ?remainder)
                     (typo-read-lowercase-part x)))
                 (character-listp prefix)))
      :rule-classes :rewrite)

    Theorem: character-listp-of-typo-read-lowercase-part.remainder

    (defthm character-listp-of-typo-read-lowercase-part.remainder
      (implies (force (character-listp x))
               (b* (((mv ?prefix ?remainder)
                     (typo-read-lowercase-part x)))
                 (character-listp remainder)))
      :rule-classes :rewrite)

    Theorem: true-listp-of-typo-read-lowercase-part

    (defthm true-listp-of-typo-read-lowercase-part
      (true-listp (mv-nth 0 (typo-read-lowercase-part x)))
      :rule-classes :type-prescription)

    Theorem: typo-read-lowercase-car-under-iff

    (defthm typo-read-lowercase-car-under-iff
     (implies
      (not
         (mv-nth 0
                 (typo-read-special *typo-special-substrings-chars* x)))
      (iff (mv-nth 0 (typo-read-lowercase-part x))
           (vl-typo-lowercase-p (car x)))))

    Theorem: acl2-count-of-typo-read-lowercase-weak

    (defthm acl2-count-of-typo-read-lowercase-weak
      (<= (acl2-count (mv-nth 1 (typo-read-lowercase-part x)))
          (acl2-count x))
      :rule-classes ((:rewrite) (:linear)))

    Theorem: acl2-count-of-typo-read-lowercase-strong

    (defthm acl2-count-of-typo-read-lowercase-strong
      (implies (mv-nth 0 (typo-read-lowercase-part x))
               (< (acl2-count (mv-nth 1 (typo-read-lowercase-part x)))
                  (acl2-count x)))
      :rule-classes ((:rewrite) (:linear)))