thumb|upright=.8|alt=Diagram of an inference| is one of the main rules 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. , an influential rule of inference, connects two premises of the form "if <math>P</math> then <math>Q</math>" and "<math>P</math>" to the conclusion "<math>Q</math>", 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 , 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 fallaciesinvalid 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.
Definition
A rule of inference is a way of drawing a conclusion from a set of premises. Also called inference rule and transformation rule, it is a norm of correct inferences that can be used to guide reasoning, justify conclusions, and criticize arguments. As part of deductive logic, rules of inference are argument forms that preserve the truth of the premises, meaning that the conclusion is always true if the premises are true. An inference is deductively valid if it follows a correct rule of inference. Whether this is the case depends only on the form or syntactic structure of the premises and the conclusion, that is, the actual content or concrete meaning of the statements does not affect validity. For instance, is a rule of inference that connects two premises of the form "if <math>P</math> then <math>Q</math>" and "<math>P</math>" to the conclusion "<math>Q</math>". The letters <math>P</math> and <math>Q</math> in this example and in later formulas are so-called metavariables: they stand for any simple or compound proposition. Any argument following is valid, independent of the specific meanings of <math>P</math> and <math>Q</math>, such as the argument "If it is day, then it is light. It is day. Therefore, it is light." In addition to ', there are many other rules of inference, such as , disjunctive syllogism, and constructive dilemma.
<math display="block">\begin{array}{l}
P \to Q \\
P \\ \hline
Q
\end{array}</math>
Some logicians employ the therefore sign (<math>\therefore</math>) either together with or instead of the horizontal line to indicate where the conclusion begins. The sequent notation, a different approach, uses a single line in which the premises are separated by commas and connected to the conclusion with the turnstile symbol (<math>\vdash</math>), as in <math>P \to Q, P \vdash Q</math>.
Rules of inference are part of logical systems and different systems employ distinct sets of rules. For example, universal instantiation
