4 ms·
Here's a lemma that helps to prove D(n) is well-defined: LEMMA: D(pq•r) = D(p•qr): D(pq•r) = pq D(r) + r D(pq) = pq D(r) + rp D(q) + qr D(p) = p (q D(r) + r
by scythe 12y ago
Here's a lemma that helps to prove D(n) is well-defined:
LEMMA: D(pq•r) = D(p•qr):
D(pq•r) = pq D(r) + r D(pq)
= pq D(r) + rp D(q) + qr D(p)
= p (q D(r) + r D(q)) + qr D(p)
= p D(qr) + qr D(p)
= D(p•qr)
There are a number of generalizations of the notion of "derivative"; in particular, you can take the derivative of a regular expression:
https://github.com/scythe/dreg/blob/master/re-deriv.pdf https://github.com/scythe/dreg/blob/master/re-deriv.pdf
...which I've been slowly turning into a regex matcher.
- gergoerdi 12y agoIf you're interested, regex matching via derivatives have been done before, see e.g. http://matt.might.net/papers/might2011derivatives.pdf http://matt.might.net/papers/might2011derivatives.pdf