 reserve R for commutative Ring;
 reserve A,B for non degenerated commutative Ring;
 reserve h for Function of A,B;
 reserve I0,I,I1,I2 for Ideal of A;
 reserve J,J1,J2 for proper Ideal of A;
 reserve p for prime Ideal of A;
 reserve S,S1 for non empty Subset of A;
 reserve E,E1,E2 for Subset of A;
 reserve a,b,f for Element of A;
 reserve n for Nat;
 reserve x,o,o1 for object;

theorem Th17:
  (for x holds x in [#]A \ J implies x is Unit of A) implies A is local
   proof
     assume
A1:  (for x holds x in [#]A \ J implies x is Unit of A);
     consider m1 be maximal Ideal of A such that
A2:  J c= m1 by Th10;
:: claim any m st maximal implies m = m1
A3:  for m be maximal Ideal of A holds m = m1
     proof
       let m be maximal Ideal of A;
       o in m implies o in m1
       proof
         assume
A4:      o in m; then
         o is NonUnit of A by Th15; then
         not o in [#]A \ J by A1; then
         o in J by A4,XBOOLE_0:def 5;
         hence thesis by A2;
       end; then
       m c= m1;
       hence thesis by RING_1:def 3;
     end;
     for o1,o2 be object st o1 in m-Spectrum A & o2 in m-Spectrum A holds
       o1 = o2
     proof
       let o1,o2 be object;
       assume that
A8:    o1 in m-Spectrum A and
A9:    o2 in m-Spectrum A;
       consider x1 being maximal Ideal of A such that
A10:   x1 = o1 by A8;
       consider x2 being maximal Ideal of A such that
A11:   x2 = o2 by A9;
       o1 = m1 by A10,A3 .= o2 by A3,A11;
       hence thesis;
     end;
     hence thesis by Th16;
    end;
