Mathematical induction has part(s) base case
Mathematical induction proves that we can climb as high as we like on a ladder, by proving that we can climb onto the bottom rung (the basis) and that from each rung we can climb up to the next one (the step).
A proof by induction consists of two cases. The first, the base case, proves the statement for 
  
    
      
        n
        =
        0
      
    
    {\displaystyle n=0}
   without assuming any knowledge of other cases. The second case, the induction step, proves that if the statement holds for any given case 
  
    
      
        n
        =
        k
      
    
    {\displaystyle n=k}
  , then it must also hold for the next case 
  
    
      
        n
        =
        k
        +
        1
      
    
    {\displaystyle n=k+1}
  . These two steps establish that the statement holds for every natural number 
  
    
      
        n
      
    
    {\displaystyle n}
  . The base case does not necessarily begin with 
  
    
      
        n
        =
        0
      
    
    {\displaystyle n=0}
  , but often with 
  
    
      
        n
        =
        1
      
    
    {\displaystyle n=1}
  , and possibly with any fixed natural number 
  
    
      
        n
        =
        N
      
    
    {\displaystyle n=N}
  , establishing the truth of the statement for all natural numbers 
  
    
      
        n
        ≥
        N
      
    
    {\displaystyle n\geq N}
  .
The method can be extended to prove statements about more general well-founded structures, such as trees; this generalization, known as structural induction, is used in mathematical logic and computer science. Mathematical induction in this extended sense is closely related to recursion. Mathematical induction is an inference rule used in formal proofs, and is the foundation of most correctness proofs for computer programs.Although its name may suggest otherwise, mathematical induction should not be confused with inductive reasoning as used in philosophy (see Problem of induction). The mathematical method examines infinitely many cases to prove a general statement, but does so by a finite chain of deductive reasoning involving the variable 
  
    
      
        n
      
    
    {\displaystyle n}
  , which can take infinitely many values.k
                      (
                      k
                      +
                      1
                      )
                    
                    2
                  
                
                +
                (
                k
                +
                1
                )
              
              
                
                =
                
                  
                    
                      k
                      (
                      k
                      +
                      1
                      )
                      +
                      2
                      (
                      k
                      +
                      1
                      )
                    
                    2
                  
                
              
            
            
              
              
                
                =
                
                  
                    
                      (
                      k
                      +
                      1
                      )
                      (
                      k
                      +
                      2
                      )
                    
                    2
                  
                
              
            
            
              
              
                
                =
                
                  
                    
                      (
                      k
                      +
                      1
                      )
                      (
                      (
                      k
                      +
                      1
                      )
                      +
                      1
                      )
                    
                    2
                  
                
                .
              
            
          
        
      
    
    {\displaystyle {\begin{aligned}{\frac {k(k+1)}{2}}+(k+1)&={\frac {k(k+1)+2(k+1)}{2}}\\&={\frac {(k+1)(k+2)}{2}}\\&={\frac {(k+1)((k+1)+1)}{2}}.\end{aligned}}}
  
Equating the extreme left hand and right hand sides, we deduce that:
  
    
      
        0
        +
        1
        +
        2
        +
        ⋯
        +
        k
        +
        (
        k
        +
        1
        )
        =
        
          
            
              (
              k
              +
              1
              )
              (
              (
              k
              +
              1
              )
              +
              1
              )
            
            2
          
        
        .
      
    
    {\displaystyle 0+1+2+\cdots +k+(k+1)={\frac {(k+1)((k+1)+1)}{2}}.}
  That is, the statement P(k + 1) also holds true, establishing the induction step.
Conclusion: Since both the base case and the induction step have been proved as true, by mathematical induction the statement P(n) holds for every natural number n. ∎Example of error in the induction step
The induction step must be proved for all values of n. To illustrate this, Joel E. Cohen proposed the following argument, which purports to prove by mathematical induction that all horses are of the same color:Base case: in a set of only one horse, there is only one color.
Induction step: assume as induction hypothesis that within any set of 
  
    
      
        n
      
    
    {\displaystyle n}
   horses, there is only one color. Now look at any set of 
  
    
      
        n
        +
        1
      
    
    {\displaystyle n+1}
   horses. Number them: 
  
    
      
        1
        ,
        2
        ,
        3
        ,
        …
        ,
        n
        ,
        n
        +
        1
      
    
    {\displaystyle 1,2,3,\dotsc ,n,n+1}
  . Consider the sets 
  
    
      
        
          {
          
            1
            ,
            2
            ,
            3
            ,
            …
            ,
            n
          
          }
        
      
    
    {\textstyle \left\{1,2,3,\dotsc ,n\right\}}
   and 
  
    
      
        
          {
          
            2
            ,
            3
            ,
            4
            ,
            …
            ,
            n
            +
            1
          
          }
        
      
    
    {\textstyle \left\{2,3,4,\dotsc ,n+1\right\}}
  . Each is a set of only 
  
    
      
        n
      
    
    {\displaystyle n}
   horses, therefore within each there is only one color. But the two sets overlap, so there must be only one color among all 
  
    
      
        n
        +
        1
      
    
    {\displaystyle n+1}
   horses.
The base case 
  
    
      
        n
        =
        1
      
    
    {\displaystyle n=1}
   is trivial, and the induction step is correct in all cases 
  
    
      
        n
        >
        1
      
    
    {\displaystyle n>1}
  . However, the argument used in the induction step is incorrect for 
  
    
      
        n
        +
        1
        =
        2
      
    
    {\displaystyle n+1=2}
  , because the statement that "the two sets overlap" is false for 
  
    
      
        
          {
          1
          }
        
      
    
    {\textstyle \left\{1\right\}}
   and 
  
    
      
        
          {
          2
          }
        
      
    
    {\textstyle \left\{2\right\}}
  .
contains comprises includes consists of has components