reserve A for non degenerated comRing;
reserve R for non degenerated domRing;
reserve n for non empty Ordinal;
reserve o,o1,o2 for object;
reserve X,Y for Subset of Funcs(n,[#]R);
reserve S,T for Subset of Polynom-Ring(n,R);
reserve F,G for FinSequence of the carrier of Polynom-Ring(n,R);
reserve x for Function of n,R;

theorem
    for V be non empty Algebraic_Set of n,R holds
    V is irreducible iff Ideal_V is prime Ideal of Polynom-Ring(n,R)
    proof
      let V be non empty Algebraic_Set of n,R;
A1:   Ideal_V is prime Ideal of Polynom-Ring(n,R) implies V is irreducible
      proof
        assume
A2:     Ideal_V is prime Ideal of Polynom-Ring(n,R);
        assume not V is irreducible; then
        consider V1,V2 be Algebraic_Set of n,R such that
A4:     V = V1 \/ V2 & V1 c< V & V2 c< V;
        consider o1 such that
A5:     o1 in Ideal_V1 & not o1 in Ideal_V by A4,Th38, XBOOLE_0:6;
        consider o2 such that
A6:     o2 in Ideal_V2 & not o2 in Ideal_V by A4,Th38,XBOOLE_0:6;
   reconsider f1 = o1, f2 = o2 as Element of Polynom-Ring(n,R) by A6, A5;
   reconsider p1 = o1, p2 = o2 as Polynomial of n,R by A6, A5,POLYNOM1:def 11;
A7:    Zero_(p1*'p2) = Zero_({p1*'p2}) by Th15
        .= Zero_({p1}) \/ Zero_({p2}) by Th21;
        Zero_(Ideal_V1) c= Zero_{p1} & Zero_Ideal_V2 c= Zero_{p2}
          by A5, A6, ZFMISC_1:31, Th16; then
A8:     V1 c= Zero_{p1} & V2 c= Zero_{p2} by Th36;
        V c= Zero_(p1*'p2) by A7, A8, A4, XBOOLE_1:13; then
        p1*'p2 in Ideal_V; then
A9:     f1*f2 in Ideal_V by POLYNOM1:def 11;
        Ideal_V is quasi-prime by A2;
        hence contradiction by A9, A5, A6;
      end;
      V is irreducible implies Ideal_V is prime Ideal of Polynom-Ring(n,R)
      proof
        assume
A10:    V is irreducible;
A11:    Ideal_V <> [#]Polynom-Ring(n,R) by Th30;
        assume not Ideal_V is prime Ideal of Polynom-Ring(n,R); then
        not(Ideal_V is proper & Ideal_V is quasi-prime); then
        consider f1,f2 be Element of Polynom-Ring(n,R) such that
A14:    f1*f2 in Ideal_V & not f1 in Ideal_V & not f2 in Ideal_V by A11;
        f1 in Polynom-Ring(n,R) & f2 in Polynom-Ring(n,R) by SUBSET_1:def 1;
        then
   reconsider p1 = f1, p2 = f2 as Polynomial of n,R by POLYNOM1:def 11;
        consider g be Polynomial of n,R such that
A15:    f1*f2 = g & V c= Zero_ g by A14;
A16:    g = p1*'p2 by A15,POLYNOM1:def 11;
A17:    (Zero_{p1} \/ Zero_{p2}) = Zero_{p1*'p2} by Th21 .= Zero_(p1*'p2)
          by Th15;
A18:    V c/= Zero_{p1}
        proof
          assume V c= Zero_{p1}; then
A20:      Ideal_Zero_{p1} c= Ideal_V by Th29;
          {p1} c= Ideal_Zero_{p1} by Th32;
          hence contradiction by A14,ZFMISC_1:31,A20;
        end;
A21:    V c/= Zero_{p2}
        proof
          assume V c= Zero_{p2}; then
A23:      Ideal_Zero_{p2} c= Ideal_V by Th29;
          {p2} c= Ideal_Zero_{p2} by Th32;
          hence contradiction by A14,ZFMISC_1:31,A23;
        end;
A24:    V /\ Zero_{p1} c= V & V /\ Zero_{p2} c= V by XBOOLE_1:17;
A27:    (V /\ Zero_{p1}) c< V & V /\ Zero_{p2} c< V
          by A18,A21,XBOOLE_1:18;
        V c= (V /\ Zero_{p1}) \/ (V /\ Zero_{p2})
        proof
          let x be object;
          assume
A28:      x in V;
          assume not x in (V /\ Zero_{p1}) \/ (V /\ Zero_{p2}); then
          not x in (V /\ Zero_{p1}) & not x in (V /\ Zero_{p2})
            by XBOOLE_0:def 3; then
          not x in Zero_{p1} & not x in Zero_{p2} by A28,XBOOLE_0:def 4;
          hence contradiction by A28,A15, A16, A17,XBOOLE_0:def 3;
        end; then
A30:    V = (V /\ Zero_{f1}) \/ (V /\ Zero_{f2}) by A24,XBOOLE_1:8;
        Zero_{f1} <> {} by A21,A15,A16,A17,BOOLE:1; then
        reconsider Z = Zero_{f1} as non empty Subset of Funcs(n,[#]R);
        Z = Zero_({f1}-Ideal) by Th17; then
A32:    Z is algebraic_set_from_ideal;
        Zero_{f2} <> {} by A15,A16,A17,BOOLE:1,A18; then
        reconsider Z = Zero_{f2} as non empty Subset of Funcs(n,[#]R);
        Z = Zero_({f2}-Ideal) by Th17; then
        Z is algebraic_set_from_ideal; then
        V /\ Zero_{f1} is Algebraic_Set of n,R &
        V /\ Zero_{f2} is Algebraic_Set of n,R by A32,Th19;
        hence contradiction by A10,A30,A27;
      end;
      hence thesis by A1;
    end;
