This is an example of a logical fallacy known as post hoc ergo propter hoc, which infers causation based solely on sequence of events. In reality, the rooster crowing and the sun rising are simply correlated events that occur independently of each other.