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;
