Consistency
In classical deductive logic, a consistent theory is one that does not lead to a logical contradiction. The lack of contradiction can be defined in either semantic or syntactic terms. The semantic definition states that a theory is consistent if it has a model, i.e., there exists an interpretation under which all formulas in the theory are true. This is the sense used in traditional Aristotelian logic, although in contemporary mathematical logic the term satisfiable is used instead. The syntactic definition states a theory 
  
    
      
        T
      
    
    {\displaystyle T}
   is consistent if there is no formula 
  
    
      
        φ
      
    
    {\displaystyle \varphi }
   such that both 
  
    
      
        φ
      
    
    {\displaystyle \varphi }
   and its negation 
  
    
      
        ¬
        φ
      
    
    {\displaystyle \lnot \varphi }
   are elements of the set of consequences of 
  
    
      
        T
      
    
    {\displaystyle T}
  . Let 
  
    
      
        A
      
    
    {\displaystyle A}
   be a set of closed sentences (informally "axioms") and 
  
    
      
        ⟨
        A
        ⟩
      
    
    {\displaystyle \langle A\rangle }
   the set of closed sentences provable from 
  
    
      
        A
      
    
    {\displaystyle A}
   under some (specified, possibly implicitly) formal deductive system. The set of axioms 
  
    
      
        A
      
    
    {\displaystyle A}
   is consistent when 
  
    
      
        φ
        ,
        ¬
        φ
        ∈
        ⟨
        A
        ⟩
      
    
    {\displaystyle \varphi ,\lnot \varphi \in \langle A\rangle }
   for no formula 
  
    
      
        φ
      
    
    {\displaystyle \varphi }
  .If there exists a deductive system for which these semantic and syntactic definitions are equivalent for any theory formulated in a particular deductive logic, the logic is called complete. The completeness of the sentential calculus was proved by Paul Bernays in 1918 and Emil Post in 1921, while the completeness of predicate calculus was proved by Kurt Gödel in 1930, and consistency proofs for arithmetics restricted with respect to the induction axiom schema were proved by Ackermann (1924), von Neumann (1927) and Herbrand (1931). Stronger logics, such as second-order logic, are not complete.
A consistency proof is a mathematical proof that a particular theory is consistent. The early development of mathematical proof theory was driven by the desire to provide finitary consistency proofs for all of mathematics as part of Hilbert's program.  Hilbert's program was strongly impacted by the incompleteness theorems, which showed that sufficiently strong proof theories cannot prove their consistency (provided that they are consistent).
Although consistency can be proved using model theory, it is often done in a purely syntactical way, without any need to reference some model of the logic. The cut-elimination (or equivalently the normalization of the underlying calculus if there is one) implies the consistency of the calculus: since there is no cut-free proof of falsity, there is no contradiction in general.

Consistency and completeness in arithmetic and set theory
In theories of arithmetic, such as Peano arithmetic, there is an intricate relationship between the consistency of the theory and its completeness. A theory is complete if, for every formula φ in its language, at least one of φ or ¬φ is a logical consequence of the theory.
Presburger arithmetic is an axiom system for the natural numbers under addition. It is both consistent and complete.
Gödel's incompleteness theorems show that any sufficiently strong recursively enumerable theory of arithmetic cannot be both complete and consistent. Gödel's theorem applies to the theories of Peano arithmetic (PA) and primitive recursive arithmetic (PRA), but not to Presburger arithmetic.
Moreover, Gödel's second incompleteness theorem shows that the consistency of sufficiently strong recursively enumerable theories of arithmetic can be tested in a particular way. Such a theory is consistent if and only if it does not prove a particular sentence, called the Gödel sentence of the theory, which is a formalized statement of the claim that the theory is indeed consistent. Thus the consistency of a sufficiently strong, recursively enumerable, consistent theory of arithmetic can never be proven in that system itself. The same result is true for recursively enumerable theories that can describe a strong enough fragment of arithmetic—including set theories such as Zermelo–Fraenkel set theory (ZF).  These set theories cannot prove their own Gödel sentence—provided that they are consistent, which is generally believed.
Because consistency of ZF is not provable in ZF, the weaker notion relative consistency is interesting in set theory (and in other sufficiently expressive axiomatic systems). If T is a theory and A is an additional axiom, T + A is said to be consistent relative to T (or simply that A is consistent with T) if it can be proved that
if T is consistent then T + A is consistent. If both A and ¬A are consistent with T, then A is said to be independent of T.

First-order logic
Notation
In the following context of mathematical logic, the turnstile symbol 
  
    
      
        ⊢
      
    
    {\displaystyle \vdash }
   means "provable from". That is, 
  
    
      
        a
        ⊢
        b
      
    
    {\displaystyle a\vdash b}
   reads: b is provable from a (in some specified formal system).

Definition
A set of formulas 
  
    
      
        Φ
      
    
    {\displaystyle \Phi }
   in first-order logic is consistent (written 
  
    
      
        Con
        ⁡
        Φ
      
    
    {\displaystyle \operatorname {Con} \Phi }
  ) if there is no formula 
  
    
      
        φ
      
    
    {\displaystyle \varphi }
   such that 
  
    
      
        Φ
        ⊢
        φ
      
    
    {\displaystyle \Phi \vdash \varphi }
   and 
  
    
      
        Φ
        ⊢
        ¬
        φ
      
    
    {\displaystyle \Phi \vdash \lnot \varphi }
  .  Otherwise 
  
    
      
        Φ
      
    
    {\displaystyle \Phi }
   is inconsistent (written 
  
    
      
        Inc
        ⁡
        Φ
      
    
    {\displaystyle \operatorname {Inc} \Phi }
  ).

  
    
      
        Φ
      
    
    {\displaystyle \Phi }
   is said to be simply consistent if for no formula 
  
    
      
        φ
      
    
    {\displaystyle \varphi }
   of 
  
    
      
        Φ
      
    
    {\displaystyle \Phi }
  , both 
  
    
      
        φ
      
    
    {\displaystyle \varphi }
   and the negation of 
  
    
      
        φ
      
    
    {\displaystyle \varphi }
   are theorems of 
  
    
      
        Φ
      
    
    {\displaystyle \Phi }
  .

  
    
      
        Φ
      
    
    {\displaystyle \Phi }
   is said to be absolutely consistent or Post consistent if at least one formula in the language of 
  
    
      
        Φ
      
    
    {\displaystyle \Phi }
   is not a theorem of 
  
    
      
        Φ
      
    
    {\displaystyle \Phi }
  .

  
    
      
        Φ
      
    
    {\displaystyle \Phi }
   is said to be maximally consistent if 
  
    
      
        Φ
      
    
    {\displaystyle \Phi }
   is consistent and for every formula 
  
    
      
        φ
      
    
    {\displaystyle \varphi }
  , 
  
    
      
        Con
        ⁡
        (
        Φ
        ∪
        {
        φ
        }
        )
      
    
    {\displaystyle \operatorname {Con} (\Phi \cup \{\varphi \})}
   implies 
  
    
      
        φ
        ∈
        Φ
      
    
    {\displaystyle \varphi \in \Phi }
  .

  
    
      
        Φ
      
    
    {\displaystyle \Phi }
   is said to contain witnesses if for every formula of the form 
  
    
      
        ∃
        x
        
        φ
      
    
    {\displaystyle \exists x\,\varphi }
   there exists a term 
  
    
      
        t
      
    
    {\displaystyle t}
   such that 
  
    
      
        (
        ∃
        x
        
        φ
        →
        φ
        
          
            t
            x
          
        
        )
        ∈
        Φ
      
    
    {\displaystyle (\exists x\,\varphi \to \varphi {t \over x})\in \Phi }
  , where 
  
    
      
        φ
        
          
            t
            x
          
        
      
    
    {\displaystyle \varphi {t \over x}}
   denotes the substitution of each 
  
    
      
        x
      
    
    {\displaystyle x}
   in 
  
    
      
        φ
      
    
    {\displaystyle \varphi }
   by a 
  
    
      
        t
      
    
    {\displaystyle t}
  ; see also First-order logic.

Basic results
The following are equivalent:

  
    
      
        Inc
        ⁡
        Φ
      
    
    {\displaystyle \operatorname {Inc} \Phi }
  
For all 
  
    
      
        φ
        ,
        
        Φ
        ⊢
        φ
        .
      
    
    {\displaystyle \varphi ,\;\Phi \vdash \varphi .}
  
Every satisfiable set of formulas is consistent, where a set of formulas 
  
    
      
        Φ
      
    
    {\displaystyle \Phi }
   is satisfiable if and only if there exists a model 
  
    
      
        
          
            I
          
        
      
    
    {\displaystyle {\mathfrak {I}}}
   such that 
  
    
      
        
          
            I
          
        
        ⊨
        Φ
      
    
    {\displaystyle {\mathfrak {I}}\vDash \Phi }
  .
For all 
  
    
      
        Φ
      
    
    {\displaystyle \Phi }
   and 
  
    
      
        φ
      
    
    {\displaystyle \varphi }
  :
if not 
  
    
      
        Φ
        ⊢
        φ
      
    
    {\displaystyle \Phi \vdash \varphi }
  , then 
  
    
      
        Con
        ⁡
        
          (
          
            Φ
            ∪
            {
            ¬
            φ
            }
          
          )
        
      
    
    {\displaystyle \operatorname {Con} \left(\Phi \cup \{\lnot \varphi \}\right)}
  ;
if 
  
    
      
        Con
        ⁡
        Φ
      
    
    {\displaystyle \operatorname {Con} \Phi }
   and 
  
    
      
        Φ
        ⊢
        φ
      
    
    {\displaystyle \Phi \vdash \varphi }
  , then 
  
    
      
        Con
        ⁡
        
          (
          
            Φ
            ∪
            {
            φ
            }
          
          )
        
      
    
    {\displaystyle \operatorname {Con} \left(\Phi \cup \{\varphi \}\right)}
  ;
if 
  
    
      
        Con
        ⁡
        Φ
      
    
    {\displaystyle \operatorname {Con} \Phi }
  , then 
  
    
      
        Con
        ⁡
        
          (
          
            Φ
            ∪
            {
            φ
            }
          
          )
        
      
    
    {\displaystyle \operatorname {Con} \left(\Phi \cup \{\varphi \}\right)}
   or 
  
    
      
        Con
        ⁡
        
          (
          
            Φ
            ∪
            {
            ¬
            φ
            }
          
          )
        
      
    
    {\displaystyle \operatorname {Con} \left(\Phi \cup \{\lnot \varphi \}\right)}
  .
Let 
  
    
      
        Φ
      
    
    {\displaystyle \Phi }
   be a maximally consistent set of formulas and suppose it contains witnesses.  For all 
  
    
      
        φ
      
    
    {\displaystyle \varphi }
   and 
  
    
      
        ψ
      
    
    {\displaystyle \psi }
  :
if 
  
    
      
        Φ
        ⊢
        φ
      
    
    {\displaystyle \Phi \vdash \varphi }
  , then 
  
    
      
        φ
        ∈
        Φ
      
    
    {\displaystyle \varphi \in \Phi }
  ,
either 
  
    
      
        φ
        ∈
        Φ
      
    
    {\displaystyle \varphi \in \Phi }
   or 
  
    
      
        ¬
        φ
        ∈
        Φ
      
    
    {\displaystyle \lnot \varphi \in \Phi }
  ,

  
    
      
        (
        φ
        ∨
        ψ
        )
        ∈
        Φ
      
    
    {\displaystyle (\varphi \lor \psi )\in \Phi }
   if and only if 
  
    
      
        φ
        ∈
        Φ
      
    
    {\displaystyle \varphi \in \Phi }
   or 
  
    
      
        ψ
        ∈
        Φ
      
    
    {\displaystyle \psi \in \Phi }
  ,
if 
  
    
      
        (
        φ
        →
        ψ
        )
        ∈
        Φ
      
    
    {\displaystyle (\varphi \to \psi )\in \Phi }
   and 
  
    
      
        φ
        ∈
        Φ
      
    
    {\displaystyle \varphi \in \Phi }
  , then 
  
    
      
        ψ
        ∈
        Φ
      
    
    {\displaystyle \psi \in \Phi }
  ,

  
    
      
        ∃
        x
        
        φ
        ∈
        Φ
      
    
    {\displaystyle \exists x\,\varphi \in \Phi }
   if and only if there is a term 
  
    
      
        t
      
    
    {\displaystyle t}
   such that 
  
    
      
        φ
        
          
            t
            x
          
        
        ∈
        Φ
      
    
    {\displaystyle \varphi {t \over x}\in \Phi }
  .

Henkin's theorem
Let 
  
    
      
        S
      
    
    {\displaystyle S}
   be a set of symbols. Let 
  
    
      
        Φ
      
    
    {\displaystyle \Phi }
   be a maximally consistent set of 
  
    
      
        S
      
    
    {\displaystyle S}
  -formulas containing witnesses.
Define an equivalence relation 
  
    
      
        ∼
      
    
    {\displaystyle \sim }
   on the set of 
  
    
      
        S
      
    
    {\displaystyle S}
  -terms by 
  
    
      
        
          t
          
            0
          
        
        ∼
        
          t
          
            1
          
        
      
    
    {\displaystyle t_{0}\sim t_{1}}
   if 
  
    
      
        
        
          t
          
            0
          
        
        ≡
        
          t
          
            1
          
        
        ∈
        Φ
      
    
    {\displaystyle \;t_{0}\equiv t_{1}\in \Phi }
  , where 
  
    
      
        ≡
      
    
    {\displaystyle \equiv }
   denotes equality. Let 
  
    
      
        
          
            t
            ¯
          
        
      
    
    {\displaystyle {\overline {t}}}
   denote the equivalence class of terms containing 
  
    
      
        t
      
    
    {\displaystyle t}
  ; and let 
  
    
      
        
          T
          
            Φ
          
        
        :=
        {
        
        
          
            t
            ¯
          
        
        ∣
        t
        ∈
        
          T
          
            S
          
        
        }
      
    
    {\displaystyle T_{\Phi }:=\{\;{\overline {t}}\mid t\in T^{S}\}}
   where 
  
    
      
        
          T
          
            S
          
        
      
    
    {\displaystyle T^{S}}
   is the set of terms based on the set of symbols 
  
    
      
        S
      
    
    {\displaystyle S}
  .
Define the 
  
    
      
        S
      
    
    {\displaystyle S}
  -structure 
  
    
      
        
          
            
              T
            
          
          
            Φ
          
        
      
    
    {\displaystyle {\mathfrak {T}}_{\Phi }}
   over 
  
    
      
        
          T
          
            Φ
          
        
      
    
    {\displaystyle T_{\Phi }}
  , also called the term-structure corresponding to 
  
    
      
        Φ
      
    
    {\displaystyle \Phi }
  , by:

for each 
  
    
      
        n
      
    
    {\displaystyle n}
  -ary relation symbol 
  
    
      
        R
        ∈
        S
      
    
    {\displaystyle R\in S}
  , define 
  
    
      
        
          R
          
            
              
                
                  T
                
              
              
                Φ
              
            
          
        
        
          
            
              t
              
                0
              
            
            ¯
          
        
        …
        
          
            
              t
              
                n
                −
                1
              
            
            ¯
          
        
      
    
    {\displaystyle R^{{\mathfrak {T}}_{\Phi }}{\overline {t_{0}}}\ldots {\overline {t_{n-1}}}}
   if 
  
    
      
        
        R
        
          t
          
            0
          
        
        …
        
          t
          
            n
            −
            1
          
        
        ∈
        Φ
        ;
      
    
    {\displaystyle \;Rt_{0}\ldots t_{n-1}\in \Phi ;}
  
for each 
  
    
      
        n
      
    
    {\displaystyle n}
  -ary function symbol 
  
    
      
        f
        ∈
        S
      
    
    {\displaystyle f\in S}
  , define 
  
    
      
        
          f
          
            
              
                
                  T
                
              
              
                Φ
              
            
          
        
        (
        
          
            
              t
              
                0
              
            
            ¯
          
        
        …
        
          
            
              t
              
                n
                −
                1
              
            
            ¯
          
        
        )
        :=
        
          
            
              f
              
                t
                
                  0
                
              
              …
              
                t
                
                  n
                  −
                  1
                
              
            
            ¯
          
        
        ;
      
    
    {\displaystyle f^{{\mathfrak {T}}_{\Phi }}({\overline {t_{0}}}\ldots {\overline {t_{n-1}}}):={\overline {ft_{0}\ldots t_{n-1}}};}
  
for each constant symbol 
  
    
      
        c
        ∈
        S
      
    
    {\displaystyle c\in S}
  , define 
  
    
      
        
          c
          
            
              
                
                  T
                
              
              
                Φ
              
            
          
        
        :=
        
          
            c
            ¯
          
        
        .
      
    
    {\displaystyle c^{{\mathfrak {T}}_{\Phi }}:={\overline {c}}.}
  Define a variable assignment 
  
    
      
        
          β
          
            Φ
          
        
      
    
    {\displaystyle \beta _{\Phi }}
   by 
  
    
      
        
          β
          
            Φ
          
        
        (
        x
        )
        :=
        
          
            
              x
              ¯
            
          
        
      
    
    {\displaystyle \beta _{\Phi }(x):={\bar {x}}}
   for each variable 
  
    
      
        x
      
    
    {\displaystyle x}
  . Let 
  
    
      
        
          
            
              I
            
          
          
            Φ
          
        
        :=
        (
        
          
            
              T
            
          
          
            Φ
          
        
        ,
        
          β
          
            Φ
          
        
        )
      
    
    {\displaystyle {\mathfrak {I}}_{\Phi }:=({\mathfrak {T}}_{\Phi },\beta _{\Phi })}
   be the term interpretation associated with 
  
    
      
        Φ
      
    
    {\displaystyle \Phi }
  .
Then for each 
  
    
      
        S
      
    
    {\displaystyle S}
  -formula 
  
    
      
        φ
      
    
    {\displaystyle \varphi }
  :

Sketch of proof
There are several things to verify. First, that 
  
    
      
        ∼
      
    
    {\displaystyle \sim }
   is in fact an equivalence relation.  Then, it needs to be verified that (1), (2), and (3) are well defined.  This falls out of the fact that 
  
    
      
        ∼
      
    
    {\displaystyle \sim }
   is an equivalence relation and also requires a proof that (1) and (2) are independent of the choice of 
  
    
      
        
          t
          
            0
          
        
        ,
        …
        ,
        
          t
          
            n
            −
            1
          
        
      
    
    {\displaystyle t_{0},\ldots ,t_{n-1}}
   class representatives.  Finally, 
  
    
      
        
          
            
              I
            
          
          
            Φ
          
        
        ⊨
        φ
      
    
    {\displaystyle {\mathfrak {I}}_{\Phi }\vDash \varphi }
   can be verified by induction on formulas.

Model theory
In ZFC set theory with classical first-order logic, an inconsistent theory 
  
    
      
        T
      
    
    {\displaystyle T}
   is one such that there exists a closed sentence 
  
    
      
        φ
      
    
    {\displaystyle \varphi }
   such that 
  
    
      
        T
      
    
    {\displaystyle T}
   contains both 
  
    
      
        φ
      
    
    {\displaystyle \varphi }
   and its negation 
  
    
      
        
          φ
          ′
        
      
    
    {\displaystyle \varphi '}
  . A consistent theory is one such that the following logically equivalent conditions hold

  
    
      
        {
        φ
        ,
        
          φ
          ′
        
        }
        ⊈
        T
      
    
    {\displaystyle \{\varphi ,\varphi '\}\not \subseteq T}
  

  
    
      
        
          φ
          ′
        
        ∉
        T
        ∨
        φ
        ∉
        T
      
    
    {\displaystyle \varphi '\not \in T\lor \varphi \not \in T}

See also
Cognitive dissonance
Equiconsistency
Hilbert's problems
Hilbert's second problem
Jan Łukasiewicz
Paraconsistent logic
ω-consistency
Gentzen's consistency proof
Proof by contradiction

Footnotes
References
Gödel, Kurt (1 December 1931). "Über formal unentscheidbare Sätze der Principia Mathematica und verwandter Systeme I". Monatshefte für Mathematik und Physik. 38 (1): 173–198. doi:10.1007/BF01700692.
Kleene, Stephen (1952). Introduction to Metamathematics. New York: North-Holland. ISBN 0-7204-2103-9. 10th impression 1991.
Reichenbach, Hans (1947). Elements of Symbolic Logic. New York: Dover. ISBN 0-486-24004-5.
Tarski, Alfred (1946). Introduction to Logic and to the Methodology of Deductive Sciences (Second ed.). New York: Dover. ISBN 0-486-28462-X.
van Heijenoort, Jean (1967). From Frege to Gödel: A Source Book in Mathematical Logic. Cambridge, MA: Harvard University Press. ISBN 0-674-32449-8. (pbk.)
"Consistency". The Cambridge Dictionary of Philosophy.
Ebbinghaus, H. D.; Flum, J.; Thomas, W. Mathematical Logic.
Jevons, W. S. (1870). Elementary Lessons in Logic.

External links

Mortensen, Chris (2017). "Inconsistent Mathematics". Stanford Encyclopedia of Philosophy.