I wonder what would happen if you did (undo (discrete-log y g))
or tried to undo some other trap-door function. In cryptography, a trap door function has linear complexity in one direction, but in the other direction it is either exponential or NP, unless you know some additional information in which case it drops back down to linear.