All human inventions can be reduced down to the art of observation, among the earliest may have been the observation and annotation of the sky at night. Repeating cycles and/or events require an explanation, as do all natural events that occur on earth. Observing all of these whether in cycles or not creates the scientific process of elimination. Hence we may assume that mathematics is partly the bastard son of astronomy (i.e. observation). Symbolic representation in the form of animals, mountains, trees and rivers etc. observed here on earth create a natural link of how things are made.
The life-line of early religion relies on more than belief, it relies on observing cycles, in Egypt many natural cycles occur, perhaps the most important was the Nile inundation. Relating survival to this cycle and exponentially to the cycles of the sun and stars above proved to them the gods were listening and reacting. If I had to guess, Egyptian religion was originally based on the cyclical observation of the natural world around them and the fruits those observations provided for survival on earth as well in the afterlife.
Regards,
B.A. Hokom