I think that the question is related to Einstein’s observation that the greatest mystery of the universe is that it is comprehensible. What Einstein understood as comprehension was a mathematically expressed set of rules for what happens.

Yet this brings us no closer to an answer; it merely compounds the problem. Plato’s ideal objects arose in Plato’s head from the same sort of advance that led to mathematics. Aristotle’s observations on logic were an early formalization of how to capture, in words, some of the patterns that we saw. Later formal logic abstracts away the real content of the propositions leaving a marvelously complex structure of deductions about absolutely nothing. If we believe Hilbert’s dictum that mathematical existence is the mere absence of contradiction, then it would seem that math is merely an extension of logic, albeit carried on in a different style.

Note that formal logic itself is a pattern we discovered in our head as we took the propositions we had guessed, melded them together and produced new useful propositions that we seemed forced to believe by this mysterious thing called logic. Like the integers, logic seems to be so neat and clean that it seems degrading to ascribe it to merely a poorly perceived pattern in our head.

Dijkstra firmly advocated proving programs correct, with logic rather than testing. Several pointed out that testing was the pragmatic method.