reserve R,R1 for commutative Ring;
reserve A,B for non degenerated commutative Ring;
reserve o,o1,o2 for object;
reserve r,r1,r2 for Element of R;
reserve a,a1,a2,b,b1 for Element of A;
reserve f for Function of R, R1;
reserve p for Element of Spectrum A;
reserve S for non empty multiplicatively-closed Subset of R;
reserve u,v,w,x,y,z for Element of Frac(S);
reserve a, b, c for Element of Frac(S);
reserve x, y, z for Element of S~R;
reserve S for without_zero non empty multiplicatively-closed Subset of A;
reserve p for Element of Spectrum A;
reserve a,m,n for Element of A~p;

theorem Th54:
  for x be object holds x in [#](A~p) \ Loc-Ideal(p) implies x is Unit of A~p
   proof
     let x be object;
     assume
A1:  x in [#](A~p) \ Loc-Ideal(p); then
     consider a being Element of Frac(Loc(A,p)) such that
A2:  x = Class(EqRel(Loc(A,p)),a) by Th32;
     a in Frac(Loc(A,p)); then
     a in [:[#]A, Loc(A,p):] by Th15; then
A3:  a`1 in [#]A & a`2 in Loc(A,p) by MCART_1:10;
     per cases;
       suppose
A4:      a`1 in [#]A \p;
         reconsider b = [a`1,a`2] as Element of Frac(Loc(A,p));
         thus thesis by A4,A2,Lm45;
       end;
       suppose
         not a`1 in [#]A \p; then
A7:      a`1 in p by XBOOLE_0:def 5;
         reconsider b = [a`1,a`2] as Element of Frac(Loc(A,p));
         reconsider y = x as Element of A~p by A1;
A8:      b in [:p, Loc(A,p):] by A3,A7,ZFMISC_1:87;
         y = Class(EqRel(Loc(A,p)),b) by A2; then
         x in Loc-Ideal(p) by A8;
         hence thesis by A1,XBOOLE_0:def 5;
       end;
     end;
