Rendered at 05:19:45 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
mjfisher 7 hours ago [-]
This looks really interesting but I'm falling down on the first piece of maths (and the linked pdf that attempts to clarify in the article).
Until this point, a derivative for me has been a derivative of an continuous function.
Is this arbitrarily defining the derivative of a particular set? (e.g. "The derivative of a set of strings S with respect to a symbol a is the set of strings gener-
ated by stripping the leading a from the strings in S that start with a")
Is that analogous to regular differential calculus, or a completely different species of derivatives and it just shares the same name?
ky3 5 hours ago [-]
You could search for "brzozowski left inverse" as those links might contain better explanations for you.
The gist of the adjunction < R, aS > = < a\R, S >, where R is a regex and S is a string, is that: R matches aS (that is, the string S but prepended with 'a') iff the left inverse of R wrt 'a', matches S.
The left inverse here is the unconcatenation of R on the left with 'a'.
(Recall that the algebra of regexes builds them up from unions, concatenations, and kleene stars on top of constants: the empty set, the null string, and the alphabets of your language. The novelty is that you can invert concatenation—on both ends!)
andai 4 hours ago [-]
Thanks, but
>Recall...
Where was I supposed to have learned all that stuff?
Edit: In undergrad, apparently:
Introduction to Automata Theory, Languages, and Computation by Hopcroft, Motwani and Ullman
hamonrxe 1 hours ago [-]
A cyberciligistic font in Lisp.
yorwba 7 hours ago [-]
It is analogous to regular calculus in some ways but not others. For example, the derivative of xyz with respect to x is yz in either case. The derivative of yz with respect to x is 0 or the empty set, respectively. But the analogy stops working when you have the symbol appear somewhere other than the beginning, because multiplication of numbers is order-independent and string concatenation is not.
dapperdrake 6 hours ago [-]
Matrix derivatives
abe27342 6 hours ago [-]
There are some other good answers pointing to concrete leads. There is the formal notion of a derivation (see https://en.wikipedia.org/wiki/Derivation_(differential_algeb... ) which generalizes the derivatives in differential calculus you are familiar with to other more exotic objects. For example, this allows defining derivatives on combinatorial species.
edit: The comments on the math stack exchange link seem to point out that while the Brzozowski derivative is not a derivation over some algebra, it is over a certain (f,g)-bimodule, so works in some even more general sense. Interesting!
The name _derivative_ is sometimes used to describe operators that resemble calculus derivatives: here, the operator is linear and there are analogues of the chain and product rule. You might also see the name _formal derivative_ when they want to emphasize that the similarity is mainly algebraic and about physical rates of change.
convolvatron 7 hours ago [-]
you missed the reference to the Brzozowski derivative, which has a wiki page
zergrush 4 hours ago [-]
not into math so I had to ask what Gemini Hydrogen thought and I'm still confused as to what the implications are
if it doesn't help me earn more money or improve my life I generally find these academic tidbits rather boring and not worth paying attention to.
I mean if you get it and you find its meaning significant thats certainly valid too
hamonrxe 1 hours ago [-]
[dead]
gatane 1 hours ago [-]
Interesting how no one has pointed this is a lot like zippers from functional programming, which themselves are derivatives of algebraic data types.
"The derivative of a (regular) type is its type of one-hole context (McBride)." Yup. Grab any data structure, make a hole; that new type is its derivative.
Yes. You can take the derivative of a """struct""" in lambda land. Have fun. Use google scholar for the pdf.
Oh, and if you want to formalize this idea, you get containers; think of the taylor expansion but for data types. What is x made of? Where does it live?
Until this point, a derivative for me has been a derivative of an continuous function.
Is this arbitrarily defining the derivative of a particular set? (e.g. "The derivative of a set of strings S with respect to a symbol a is the set of strings gener- ated by stripping the leading a from the strings in S that start with a")
Is that analogous to regular differential calculus, or a completely different species of derivatives and it just shares the same name?
The gist of the adjunction < R, aS > = < a\R, S >, where R is a regex and S is a string, is that: R matches aS (that is, the string S but prepended with 'a') iff the left inverse of R wrt 'a', matches S.
The left inverse here is the unconcatenation of R on the left with 'a'.
(Recall that the algebra of regexes builds them up from unions, concatenations, and kleene stars on top of constants: the empty set, the null string, and the alphabets of your language. The novelty is that you can invert concatenation—on both ends!)
>Recall...
Where was I supposed to have learned all that stuff?
Edit: In undergrad, apparently:
Introduction to Automata Theory, Languages, and Computation by Hopcroft, Motwani and Ullman
The Brzozowski derivative is not strictly one of these, due to its odd product rule expression for concatenation. https://math.stackexchange.com/questions/5024248/are-brzozow... has some good explanations if you have any algebra background.
edit: The comments on the math stack exchange link seem to point out that while the Brzozowski derivative is not a derivation over some algebra, it is over a certain (f,g)-bimodule, so works in some even more general sense. Interesting!Derivatives of Regular Expressions (1964)
https://dl.acm.org/doi/epdf/10.1145/321239.321249
See also his excellent
Survey of Regular Expressions and Their Applications (1962)
https://sci-hub.ru/storage/dace/2342/6f7bde55a02bda6a6c955be...
if it doesn't help me earn more money or improve my life I generally find these academic tidbits rather boring and not worth paying attention to.
I mean if you get it and you find its meaning significant thats certainly valid too
"The derivative of a (regular) type is its type of one-hole context (McBride)." Yup. Grab any data structure, make a hole; that new type is its derivative.
Yes. You can take the derivative of a """struct""" in lambda land. Have fun. Use google scholar for the pdf.
https://journals.sagepub.com/doi/abs/10.3233/FUN-2005-651-20...
Oh, and if you want to formalize this idea, you get containers; think of the taylor expansion but for data types. What is x made of? Where does it live?
:)