reserve x,y,z for object;
reserve n,m,k for Element of NAT;
reserve r for Real;

theorem Th4:
  for n ex m st n = 5*m or n = 5*m+1 or n = 5*m+2 or n = 5*m+3 or n = 5*m+4
proof
  let n;
  take n div 5;
  set l = n mod 5;
A1: l = 0 or l = 1 or l = 2 or l = 3 or l = 4
  proof
    l < 4 + 1 by NAT_D:1;
    then
A2: l <= 3 + 1 by NAT_1:13;
    now
      per cases by A2,NAT_1:8;
      suppose
A3:     l <= 3;
        now
          per cases by A3,NAT_1:8;
          suppose
A4:         l <= 2;
            now
              per cases by A4,NAT_1:8;
              suppose
A5:             l <= 1;
                now
                  per cases by A5,NAT_1:8;
                  suppose
                    l <= 0;
                    hence thesis by NAT_1:2;
                  end;
                  suppose
                    l = 0 + 1;
                    hence thesis;
                  end;
                end;
                hence thesis;
              end;
              suppose
                l = 1 + 1;
                hence thesis;
              end;
            end;
            hence thesis;
          end;
          suppose
            l = 2 + 1;
            hence thesis;
          end;
        end;
        hence thesis;
      end;
      suppose
        l = 3 + 1;
        hence thesis;
      end;
    end;
    hence thesis;
  end;
  n = 5*(n div 5) + (n mod 5) by NAT_D:2;
  hence thesis by A1;
end;
