Rule of inference

Rules of inference are ways of deriving conclusions from premises. They are integral parts of formal logic, serving as the logical structure of valid arguments. If an argument with true premises follows a rule of inference then the conclusion cannot be false. Modus ponens, an influential rule of inference, connects two premises of the form "if then " and "" to the conclusion "", as in the argument "If it rains, then the ground is wet. It rains. Therefore, the ground is wet." There are many other rules of inference for different patterns of valid arguments, such as modus tollens, disjunctive syllogism, constructive dilemma, and existential generalization.

Rules of inference include rules of implication, which operate only in one direction from premises to conclusions, and rules of replacement, which state that two expressions are equivalent and can be freely swapped. They contrast with formal fallacies—invalid argument forms involving logical errors.

Logicians construct formal systems to precisely capture and codify valid patterns of reasoning, with distinct systems using different rules of inference. For example, propositional logic examines how statements formed through logical operators like "not" and "if...then..." support conclusions. First-order logic extends propositional logic by analyzing how the internal structure of propositions, like names and predicates, influences reasoning. Other logical systems explore inferential patterns associated with what is possible and necessary, with what people believe, and with what happened at different times. Various formalisms are used to express logical systems. Natural deduction systems employ many intuitive rules of inference to reflect how people naturally reason, while Hilbert systems provide minimalistic frameworks to represent foundational principles without redundancy.

Rules of inference are relevant to many areas, such as proofs in mathematics and automated reasoning in computer science. Their conceptual and psychological underpinnings are studied by philosophers of logic and cognitive psychologists.