A Unifying Mathematical Framework For Neural-Symbolic Systems