Formal logic in China has a special place in the history of logic due to its repression and abandonment - in contrast to the strong ancient adoption and continued development of the study of logic in Europe, India, and the Islamic world.
In China, a contemporary of Confucius, Mozi, "Master Mo", is credited with founding the Mohist school, whose canons dealt with issues relating to valid inference and the conditions of correct conclusions. However, they were nonproductive and not integrated into Chinese science or mathematics.
The Mohist school of Chinese philosophy contained an approach to logic and argumentation that stresses rhetorical analogies over mathematical reasoning, and is based on the three fa, or methods of drawing distinctions between kinds of things.
One of the schools that grew out of Mohism, the Logicians, are credited by some scholars for their early investigation of formal logic.
During the subsequent Qin Dynasty, the rule of Legalism repressed this Mohist line of investigation, which has been said to have disappeared in China until the introduction of Indian philosophy and Indian logic by Buddhists. A prominent scholar suggests that the version assembled for the Imperial Library of the Han Dynasty would probably have been as disorganised as the current extant text, and thus would have only been 'intermittently intelligible,' as it is for current readers who do not consult a critical edition. Disagreeing with Hajime Nakamura, Graham argues the school of Neo-Taoism maintained some interest in the Canons, although they may already have some of the terminology difficult to understand. Before the end of the Sui Dynasty, a shortened version of Mozi appeared, which appears to have replaced the Han edition. Although the original Mozi had been preserved in the Taoist, and became known once more in the 1552 Lu edition and 1553 Tang edition, the damage was done: the dialectical chapters (as well as the military chapters) were considered incomprehensible. Nevertheless, with the rise of Chinese critical textual scholarship, the book benefited from explanatory and critical commentaries: first, by Bi Yuan, and his assistant, Sun Xingyan; another commentary by Wang Chong, which has not survived; 'the first special study,' by Zhang Huiyan; a republication of Part B by Wu Rulun. However, the summit of this late Imperial scholarship, according to Graham, was the 'magnificent' commentary of Sun Yirang, which 'threw open the sanctum of the Canons to all comers. Graham summarises the arduous textual history of the Canons by arguing that the Canons were neglected throughout most of China's history; but he attributes this fact to 'bibliographical' accidents, rather than political repression, like Nakamura.