• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
        • Defdefparse
        • Defgrammar
        • Tree-utilities
        • Notation
          • Syntax-abstraction
          • Semantics
            • Tree-terminatedp
            • Tree->string
            • String-has-finite-parse-trees-p
            • Parse-trees-of-string-p
            • Tree-match-element-p
            • Parse-treep
            • Symbol
            • String-unambiguousp
            • Tree-match-num-val-p
            • Nat-match-insensitive-char-p
            • Nats-match-insensitive-chars-p
            • Tree-option
            • String-parsablep
              • Lookup-rulename
              • Nats-match-sensitive-chars-p
              • Numrep-match-repeat-range-p
              • Tree-match-char-val-p
              • Tree-list-match-repetition-p
              • String-ambiguousp
              • Parse
              • Tree-match-prose-val-p
              • Nat-match-sensitive-char-p
              • Theorems-about-terminated-trees-matching-elements
              • Tree-option-result
              • Tree-list-result
              • Tree-list-list-result
              • Tree-result
              • Tree-list-list-match-concatenation-p
              • Languagep
              • Terminal-string-for-rules-p
              • Tree-list-list-match-alternation-p
              • Tree-list-match-element-p
              • Parse!
              • String
              • Tree-set
              • Trees
            • Abstract-syntax
            • Core-rules
            • Concrete-syntax
          • Grammar-parser
          • Meta-circular-validation
          • Parsing-primitives-defresult
          • Parsing-primitives-seq
          • Operations
          • Examples
          • Differences-with-paper
          • Constructor-utilities
          • Grammar-printer
          • Parsing-tools
        • Vwsim
        • Isar
        • Wp-gen
        • Dimacs-reader
        • Pfcs
        • Legacy-defrstobj
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Semantics

    String-parsablep

    Notion of parsable string.

    A string is parsable iff it has at least one parse tree.

    Definitions and Theorems

    Theorem: string-parsablep-suff

    (defthm string-parsablep-suff
      (implies (parse-treep tree string rulename rules)
               (string-parsablep string rulename rules)))

    Theorem: booleanp-of-string-parsablep

    (defthm booleanp-of-string-parsablep
      (b* ((yes/no (string-parsablep string rulename rules)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: string-parsablep-of-string-fix-string

    (defthm string-parsablep-of-string-fix-string
      (equal (string-parsablep (string-fix string)
                               rulename rules)
             (string-parsablep string rulename rules)))

    Theorem: string-parsablep-string-equiv-congruence-on-string

    (defthm string-parsablep-string-equiv-congruence-on-string
      (implies (string-equiv string string-equiv)
               (equal (string-parsablep string rulename rules)
                      (string-parsablep string-equiv rulename rules)))
      :rule-classes :congruence)

    Theorem: string-parsablep-of-rulename-fix-rulename

    (defthm string-parsablep-of-rulename-fix-rulename
      (equal (string-parsablep string (rulename-fix rulename)
                               rules)
             (string-parsablep string rulename rules)))

    Theorem: string-parsablep-rulename-equiv-congruence-on-rulename

    (defthm string-parsablep-rulename-equiv-congruence-on-rulename
      (implies (rulename-equiv rulename rulename-equiv)
               (equal (string-parsablep string rulename rules)
                      (string-parsablep string rulename-equiv rules)))
      :rule-classes :congruence)

    Theorem: string-parsablep-of-rulelist-fix-rules

    (defthm string-parsablep-of-rulelist-fix-rules
      (equal (string-parsablep string rulename (rulelist-fix rules))
             (string-parsablep string rulename rules)))

    Theorem: string-parsablep-rulelist-equiv-congruence-on-rules

    (defthm string-parsablep-rulelist-equiv-congruence-on-rules
      (implies (rulelist-equiv rules rules-equiv)
               (equal (string-parsablep string rulename rules)
                      (string-parsablep string rulename rules-equiv)))
      :rule-classes :congruence)

    Theorem: treep-of-string-parsablep-witness-when-string-parsablep

    (defthm treep-of-string-parsablep-witness-when-string-parsablep
     (implies (string-parsablep string rulename rules)
              (treep (string-parsablep-witness string rulename rules))))

    Theorem: not-parse-treep-when-not-string-parsablep

    (defthm not-parse-treep-when-not-string-parsablep
      (implies (not (string-parsablep string rulename rules))
               (not (parse-treep tree string rulename rules))))

    Theorem: parse-treep-of-string-parsablep-witness-when-string-parsablep

    (defthm
          parse-treep-of-string-parsablep-witness-when-string-parsablep
      (implies
           (string-parsablep string rulename rules)
           (parse-treep (string-parsablep-witness string rulename rules)
                        string rulename rules)))