
theorem Th11:
  for n being Nat st n > 1 holds INT.Ring(n) is non
  degenerated & INT.Ring(n) is well-unital distributive commutative Ring
proof
  let n be Nat;
  assume
A1: n > 1;
  then reconsider n as non zero Nat;
  set F = INT.Ring(n);
A2: 1.F = 1 by A1,Lm7;
A3: for a being Element of F holds 1.F * a = a & a * 1.F = a
  proof
    let a be Element of F;
    reconsider a9 = a as Element of Segm(n);
A4: 1 * a9 < (0 + 1) * n & 1 is Element of Segm(n) by A1,NAT_1:44;
    then
A5: (multint(n)).(a,1) = a9 - 0 * n by Th8
      .= a9;
    (multint(n)).(1,a) = a9 - 0 * n by A4,Th8
      .= a9;
    hence thesis by A1,A5,Lm7;
  end;
A6: F is well-unital
  by A3;
A7: for a,b being Element of F holds a + b = b + a
  proof
    let a,b be Element of F;
    reconsider a9 = a as Element of Segm(n);
    reconsider b9 = b as Element of Segm(n);
    now
      per cases;
      case
A8:     a9 + b9 < n;
        hence (addint(n)).(a,b) = a9 + b9 by Th7
          .= (addint(n)).(b,a) by A8,Th7;
      end;
      case
A9:     a9 + b9 >= n;
        hence (addint(n)).(a,b) = (a9 + b9) - n by Th7
          .= (addint(n)).(b,a) by A9,Th7;
      end;
    end;
    hence thesis;
  end;
A10: for a,b,c being Element of F holds (a * b) * c = a * (b * c)
  proof
    let a,b,c be Element of F;
    reconsider a9 = a, b9 = b, c9 = c as Element of Segm(n);
    reconsider aa = a9 as Element of NAT;
    reconsider aa as Integer;
    reconsider bb = b9 as Element of NAT;
    reconsider bb as Integer;
    reconsider cc = c9 as Element of NAT;
    reconsider cc as Integer;
A11: cc < n by NAT_1:44;
    aa < n by NAT_1:44;
    then
A12: (a9 * ((b9 * c9) mod n)) mod n = ((aa mod n) * (bb * cc mod n)) mod n
    by NAT_D:63
      .= (aa * (bb * cc)) mod n by NAT_D:67
      .= ((aa * bb) * cc) mod n
      .= (((aa * bb) mod n) * (cc mod n)) mod n by NAT_D:67
      .= (((a9 * b9) mod n) * c9) mod n by A11,NAT_D:63;
    (aa * bb) mod n < n by NAT_D:62;
    then
A13: (a9 * b9) mod n is Element of Segm(n) by NAT_1:44;
    (bb * cc) mod n < n by NAT_D:62;
    then
A14: (b9 * c9) mod n is Element of Segm(n) by NAT_1:44;
A15: a * (b * c) = (multint(n)).(a9, (b9 * c9) mod n) by Def10
      .= (a9 * ((b9 * c9) mod n)) mod n by A14,Def10;
    (a * b) * c = (multint(n)).((a9 * b9) mod n, c9) by Def10
      .= (((a9 * b9) mod n) * c9) mod n by A13,Def10;
    hence thesis by A15,A12;
  end;
A16: for a,b being Element of F holds a * b = b * a
  proof
    let a,b be Element of F;
    reconsider a9 = a as Element of Segm(n);
    reconsider b9 = b as Element of Segm(n);
    consider k being Element of NAT such that
A17: k * n <= a9 * b9 & a9 * b9 < (k + 1) * n by Lm5;
    (multint(n)).(a9,b9) = a9 * b9 - k * n by A17,Th8
      .= (multint(n)).(b9,a9) by A17,Th8;
    hence thesis;
  end;
A18: for a,b,c being Element of F holds (a + b) + c = a + (b + c)
  proof
    let a,b,c be Element of F;
    reconsider a9 = a, b9 = b, c9 = c as Element of Segm(n);
    reconsider aa = a9 as Element of NAT;
    reconsider aa as Integer;
    reconsider bb = b9 as Element of NAT;
    reconsider bb as Integer;
    reconsider cc = c9 as Element of NAT;
    reconsider cc as Integer;
A19: cc < n by NAT_1:44;
    aa < n by NAT_1:44;
    then
A20: (a9 + ((b9 + c9) mod n)) mod n = ((aa mod n) + (bb + cc mod n)) mod n
    by NAT_D:63
      .= (aa + (bb + cc)) mod n by NAT_D:66
      .= ((aa + bb) + cc) mod n
      .= (((aa + bb) mod n) + (cc mod n)) mod n by NAT_D:66
      .= (((a9 + b9) mod n) + c9) mod n by A19,NAT_D:63;
    (aa + bb) mod n < n by NAT_D:62;
    then
A21: (a9 + b9) mod n is Element of Segm(n) by NAT_1:44;
    (bb + cc) mod n < n by NAT_D:62;
    then
A22: (b9 + c9) mod n is Element of Segm(n) by NAT_1:44;
A23: a + (b + c) = (addint(n)).(a9, (b9 + c9) mod n) by GR_CY_1:def 4
      .= (a9 + ((b9 + c9) mod n)) mod n by A22,GR_CY_1:def 4;
    (a + b) + c = (addint(n)).((a9 + b9) mod n, c9) by GR_CY_1:def 4
      .= (((a9 + b9) mod n) + c9) mod n by A21,GR_CY_1:def 4;
    hence thesis by A23,A20;
  end;
  0 in Segm(n) by NAT_1:44;
  then
A24: 0.F = 0 by SUBSET_1:def 8;
A25: for a being Element of F holds a + 0.F = a
  proof
    let a be Element of F;
    reconsider a9 = a as Element of Segm(n);
    a9 + 0 < n by NAT_1:44;
    hence thesis by A24,Th7;
  end;
A26: F is right_complementable
  proof
    let a be Element of F;
    reconsider a9 = a as Element of Segm(n);
    reconsider a9 as Element of NAT;
    per cases;
    suppose
A27:  a9 = 0;
      take 0.F;
      thus thesis by A24,A25,A27;
    end;
    suppose
      a9 <> 0;
      then reconsider b = n-a9 as Element of Segm n by Lm6;
      reconsider v = b as Element of F;
      take v;
      thus a + v = (a9+b) mod n by GR_CY_1:def 4
        .= 0.F by A24,NAT_D:25;
    end;
  end;
A28: for a,b,c being Element of F holds (b + c) * a = b * a + c * a
  proof
    let a,b,c be Element of F;
    reconsider a9 = a, b9 = b, c9 = c as Element of Segm(n);
    reconsider aa = a9 as Element of NAT;
    reconsider aa as Integer;
    reconsider bb = b9 as Element of NAT;
    reconsider bb as Integer;
    reconsider cc = c9 as Element of NAT;
    reconsider cc as Integer;
A29: aa < n by NAT_1:44;
A30: (((b9 * a9) mod n) + ((c9 * a9) mod n)) mod n = (bb * aa + cc * aa)
    mod n by NAT_D:66
      .= ((bb + cc) * aa) mod n
      .= (((bb + cc) mod n) * (aa mod n)) mod n by NAT_D:67
      .= (((b9 + c9) mod n) * a9) mod n by A29,NAT_D:63;
    (bb + cc) mod n < n by NAT_D:62;
    then
A31: (b9 + c9) mod n is Element of Segm(n) by NAT_1:44;
    (cc * aa) mod n < n by NAT_D:62;
    then
A32: (c9 * a9) mod n is Element of Segm(n) by NAT_1:44;
    (bb * aa) mod n < n by NAT_D:62;
    then
A33: (b9 * a9) mod n is Element of Segm(n) by NAT_1:44;
A34: (b + c) * a = (multint(n)).((b9 + c9) mod n, a9) by GR_CY_1:def 4
      .= (((b9 + c9) mod n) * a9) mod n by A31,Def10;
    b * a + c * a = (addint(n)).((multint(n)).(b,a),(c9 * a9) mod n) by Def10
      .= (addint(n)).((b9 * a9) mod n,(c9 * a9) mod n) by Def10
      .= (((b9 * a9) mod n) + ((c9 * a9) mod n)) mod n by A33,A32,GR_CY_1:def 4
;
    hence thesis by A34,A30;
  end;
  for a,b,c being Element of F holds a * (b + c) = a * b + a * c
  proof
    let a,b,c be Element of F;
    thus a * (b + c) = (b + c) * a by A16
      .= b * a + c * a by A28
      .= a * b + c * a by A16
      .= a * b + a * c by A16;
  end;
  then reconsider F as commutative Ring by A7,A16,A18,A10,A25,A28,A26,A6,
GROUP_1:def 3,def 12,RLVECT_1:def 2,def 3,def 4,VECTSP_1:def 7;
  F is non degenerated by A24,A2;
  hence thesis;
end;
