A regular expression matches a string provided .

Two regular expressions are equivalent provided that:

Examples of Equivalences

Corner Cases

Simplification Rules

Semantic Derivative

The Semantic Derivative of a language w.r.t. a character is:

We may extend this definition to strings:

Example

Given then

Brzozowski’s Algorithm

Whether a regular expression can match the empty string.

Derivative of Regular Expression

Negation of Regular Expressions

is everything that cannot recognise

Proofs

A regular expression matches a string provided .

if and only if

Main properties:

  • if and only if

Inductive definition of regular expression

Regular expressions are inductively defined as:

Link to original

If we want to prove something, say a property , for all regular expressions then:

  • holds for , , and .
  • holds for under the assumption that already holds for and .
  • holds for under the assumption that already holds for and .
  • holds for under the assumption that already holds for .

Example: assume is the property that if and only if

Base Case : prove iff . The result of nullable is defined as false, and the result of is also false, therefore this holds.

: prove iff . The result of nullable is defined as true, and the result of is also true, therefore this holds.

[.. etc]

Inductive Case : prove iff .

The result of is the result of , and the result of is the same as or otherwise .

[.. incomplete]

0 items under this folder.