reserve p,q for Rational;
reserve g,m,m1,m2,n,n1,n2 for Nat;
reserve i,i1,i2,j,j1,j2 for Integer;
reserve R for Ring, F for Field;

theorem Th85:
for R being domRing holds Char R = 0 or Char R is prime
proof
let R be domRing;
set n = Char R;
now assume A1: Char R <> 0; then
  A2: n '*' 1.R = 0.R & n <> 0 & for m being positive Nat
      st m < n holds m '*' 1.R <> 0.R by Def5;
  per cases by A1,NAT_1:25;
  suppose n = 1;
    hence Char R is prime by A2,Th59;
    end;
  suppose A3: n > 1;
    now assume not (n is prime);
      then consider m being Nat such that
      A4: m divides n & not(m = 1 or m = n) by A3,INT_2:def 4;
      consider u being Integer such that A5: m * u = n by A4;
      u > 0 by A5,A3;
      then u in NAT by INT_1:3;
      then reconsider u as positive Nat by A5,A3;
      m <> 0 by A5,A3;
      then reconsider m as positive Nat;
      0.R = (m * u) '*' 1.R by A5,Def5 .= (m '*' 1.R) * (u '*' 1.R) by Th66;
      then A6: (m '*' 1.R) = 0.R or (u '*' 1.R) = 0.R by VECTSP_2:def 1;
      m <= n by A3,A4,INT_2:27;
      then A7: m < n by A4,XXREAL_0:1;
      A8: u <= n by A3,INT_2:27,A5,INT_1:def 3;
      now assume u = n;
        then n/n = (m * n) / n by A5 .= m * (n/n)
                .= m*1 by A1,XCMPLX_1:60;
        hence contradiction by A4,A3,XCMPLX_1:60;
        end;
      then u < n by A8,XXREAL_0:1;
      hence contradiction by A7,A6,Def5;
      end;
    hence Char R is prime;
    end;
  end;
hence thesis;
end;
