An axiomatic theory of cognition and writing