Deriving Auslander's formula