The development of Indian logic dates back to the anviksiki of Medhatithi Gautama (c. 6th century BCE); the Sanskrit grammar rules of Pāṇini (c. 5th century BCE); the Vaisheshika school's analysis of atomism (c. 6th century BCE to 2nd century BCE); the analysis of inference by Gotama (c. 6th century BC to 2nd century CE), founder of the Nyaya school of Hindu philosophy; and the tetralemma of Nagarjuna (c. 2nd century CE).
Indian logic stands as one of the three original traditions of logic, alongside the Greek and the Chinese logic. The Indian tradition continued to develop through early to modern times, in the form of the Navya-Nyāya school of logic.
Who really knows?
Who will here proclaim it?
Whence was it produced? Whence is this creation?
The gods came afterwards, with the creation of this universe.
Who then knows whence it has arisen?— Nasadiya Sukta, concerns the origin of the universe, Rig Veda, 10:129-6 
The Nasadiya Sukta of the Rigveda (RV 10.129) contains ontological speculation in terms of various logical divisions that were later recast formally as the four circles of catuskoti: "A", "not A", "A and 'not A'", and "not A and not not A".
Medhatithi Gautama (c. 6th century BCE) founded the anviksiki school of logic. The Mahabharata (12.173.45), around the 4th century BCE to 4th century CE, refers to the anviksiki and tarka schools of logic. Pāṇini (c. 5th century BCE) developed a form of logic (to which Boolean logic has some similarities) for his formulation of Sanskrit grammar. Logic is described by Chanakya (c. 350-283 BCE) in his Arthashastra as an independent field of inquiry anviksiki.
Main article: Vaisheshika
Vaisheshika, also Vaisesika, (Sanskrit: वैशेषिक) is one of the six Hindu schools of Indian philosophy. It came to be closely associated with the Hindu school of logic, Nyaya. Vaisheshika espouses a form of atomism and postulates that all objects in the physical universe are reducible to a finite number of atoms. Originally proposed by Kanāda (or Kana-bhuk, literally, atom-eater) from around the 2nd century BCE.
Main article: Catuṣkoṭi
In the 2nd century, the Buddhist philosopher Nagarjuna refined the Catuskoti form of logic. The Catuskoti is also often glossed Tetralemma (Greek) which is the name for a largely comparable, but not equatable, 'four corner argument' within the tradition of Classical logic.
Main article: Nyaya
Nyāya (ni-āyá, literally "recursion", used in the sense of "syllogism, inference") is the name given to one of the six orthodox or astika schools of Hindu philosophy — specifically the school of logic.
The Nyaya school of philosophical speculation is based on texts known as the Nyaya Sutras, which were written by Gotama in around the 2nd century CE. The most important contribution made by the Nyaya school to modern Hindu thought is its methodology. This methodology is based on a system of logic that has subsequently been adopted by most of the other Indian schools (orthodox or not), much in the same way that Western philosophy can be said to be largely based on Aristotelian logic.
Followers of Nyaya believed that obtaining valid knowledge was the only way to obtain release from suffering. They therefore took great pains to identify valid sources of knowledge and to distinguish these from mere false opinions. According to the Nyaya school, there are exactly four sources of knowledge (pramanas): perception, inference, comparison and testimony. Knowledge obtained through each of these can, of course, still be either valid or invalid. As a result, Nyaya scholars again went to great pains to identify, in each case, what it took to make knowledge valid, in the process creating a number of explanatory schemes. In this sense, Nyaya is probably the closest Indian equivalent to contemporary analytic philosophy.
Further information: Anekantavada, Syadvada, and Jain philosophy
Jainism made its own unique contribution to this mainstream development of logic by also occupying itself with the basic epistemological issues, namely, with those concerning the nature of knowledge, how knowledge is derived, and in what way knowledge can be said to be reliable. Jain logic developed and flourished from 6th century BCE to 17th century CE. According to Jains, the ultimate principle should always be logical and no principle can be devoid of logic or reason. Thus one finds in the Jain texts, deliberative exhortations on any subject in all its facts, may they be constructive or obstructive, inferential or analytical, enlightening or destructive.[self-published source?] The Jains have doctrines of relativity used for logic and reasoning:
These Jain philosophical concepts made most important contributions to the ancient Indian philosophy, especially in the areas of skepticism and relativity.
Following is the list of Jain philosophers who contributed to Jain Logic:
Main article: Buddhist logic
Indian Buddhist logic (called Pramana) flourished from about 500 CE up to 1300 CE. The three main authors of Buddhist logic are Vasubandhu (400–800 CE), Dignāga (480–540 CE), and Dharmakīrti (600–660 CE). The most important theoretical achievements are the doctrine of Trairūpya (Skrt. त्रैरूप्य) and the highly formal scheme of the Hetucakra (Skrt. हेतुचक्र) ("Wheel of Reasons") given by Dignāga. There is still a vibrant living tradition of Buddhist logic in the Tibetan Buddhist traditions, where logic is an important part of the education of monks.
Main article: Navya-Nyāya
The Navya-Nyāya or Neo-Logical darśana (school) of Indian philosophy was founded in the 13th century CE by the philosopher Gangesha Upadhyaya of Mithila. It was a development of the classical Nyāya darśana. Other influences on Navya-Nyāya were the work of earlier philosophers Vācaspati Miśra (900–980 CE) and Udayana (late 10th century).
Gangeśa's book Tattvacintāmaṇi ("Thought-Jewel of Reality") was written partly in response to Śrīharśa's Khandanakhandakhādya, a defence of Advaita Vedānta, which had offered a set of thorough criticisms of Nyāya theories of thought and language. In his book, Gangeśa both addressed some of those criticisms and – more importantly – critically examined the Nyāya darśana himself. He held that, while Śrīharśa had failed successfully to challenge the Nyāya realist ontology, his and Gangeśa's own criticisms brought out a need to improve and refine the logical and linguistic tools of Nyāya thought, to make them more rigorous and precise.
Tattvacintāmani dealt with all the important aspects of Indian philosophy, logic, set theory, and especially epistemology, which Gangeśa examined rigorously, developing and improving the Nyāya scheme, and offering examples. The results, especially his analysis of cognition, were taken up and used by other darśanas.
Navya-Nyāya developed a sophisticated language and conceptual scheme that allowed it to raise, analyse, and solve problems in logic and epistemology. It systematised all the Nyāya concepts into four main categories: sense or perception (pratyakşa), inference (anumāna), comparison or similarity (upamāna), and testimony (sound or word; śabda).
This later school began around eastern India and Bengal, and developed theories resembling modern logic, such as Gottlob Frege's "distinction between sense and reference of proper names" and his "definition of number," as well as the Navya-Nyaya theory of "restrictive conditions for universals" anticipating some of the developments in modern set theory. Udayana in particular developed theories on "restrictive conditions for universals" and "infinite regress" that anticipated aspects of modern set theory. According to Kisor Kumar Chakrabarti:
In the third part we have shown how the study of the so-called 'restrictive conditions for universals' in Navya-Nyaya logic anticipated some of the developments of modern set theory. [...] In this section the discussion will center around some of the 'restrictive conditions for universals (jatibadhaka) proposed by Udayana. [...] Another restrictive condition is anavastha or vicious infinite regress. According to this restrictive condition, no universal (jati) can be admitted to exist, the admission of which would lead to a vicious infinite regress. As an example Udayana says that there can be no universal of which every universal is a member; for if we had any such universal, then, by hypothesis, we have got a given totality of all universals that exist and all of them belong to this big universal. But this universal is itself a universal and hence (since it cannot be a member of itself, because in Udayana's view no universal can be a member of itself) this universal too along with other universals must belong to a bigger universal and so on ad infinitum. What Udayana says here has interesting analogues in modern set theory in which it is held that a set of all sets (i.e., a set to which every set belongs) does not exist.
In the late 18th-century British scholars began to take an interest in Indian philosophy and discovered the sophistication of the Indian study of inference. This process culminated in Henry T. Colebrooke's The Philosophy of the Hindus: On the Nyaya and Vaisesika Systems in 1824, which provided an analysis of inference and comparison to the received Aristotelian logic, resulting in the observation that the Aristotelian syllogism could not account for the Indian syllogism. Max Mueller contributed an appendix to the 1853 edition of Thomson's Outline of the Laws of Thought, in which he placed Greek and Indian logic on the same plane: "The sciences of Logic and Grammar were, as far as history allows us to judge, invented or originally conceived by two nations only, by Hindus and Greeks."
Jonardon Ganeri has observed that this period[which?] saw George Boole (1815-1864) and Augustus De Morgan (1806-1871) make their pioneering applications of algebraic ideas to the formulation of logic (such as algebraic logic and Boolean logic), and has suggested that these figures were likely to be aware of these studies in xeno-logic, and further that their acquired awareness of the shortcomings of propositional logic are likely to have stimulated their willingness to look outside the system.
Indian logic attracted the attention of many Western scholars, and had an influence on pioneering 19th-century logicians such as Charles Babbage (1791-1871), Augustus De Morgan, and particularly George Boole, as confirmed by Boole's wife Mary Everest Boole in an "open letter to Dr Bose" titled "Indian Thought and Western Science in the Nineteenth Century" written in 1901.
De Morgan himself wrote in 1860 of the significance of Indian logic: "The two races which have founded the mathematics, those of the Sanskrit and Greek languages, have been the two which have independently formed systems of logic."
Mathematicians became aware of the influence of Indian mathematics on the European. For example, Hermann Weyl wrote: "Occidental mathematics has in past centuries broken away from the Greek view and followed a course which seems to have originated in India and which has been transmitted, with additions, to us by the Arabs; in it the concept of number appears as logically prior to the concepts of geometry. [...] But the present trend in mathematics is clearly in the direction of a return to the Greek standpoint; we now look upon each branch of mathematics as determining its own characteristic domain of quantities."
This paper consists of three parts. The first part deals with Frege's distinction between sense and reference of proper names and a similar distinction in Navya-Nyaya logic. In the second part we have compared Frege's definition of number to the Navya-Nyaya definition of number. In the third part we have shown how the study of the so-called 'restrictive conditions for universals' in Navya-Nyaya logic anticipated some of the developments of modern set theory.
The modern study of classical Indian systems of logic began with H. T. Colebrook's "discovery" of the Hindu syllogism - a schema for correct reasoning as described in the early Indian texts. The report of his discovery to the Royal Asiatic Society in 1824 led to a flurry of interest in Indian logic in the next thirty years, attracting the attention of even the best logicians of the time, people like Boole and De Morgan.