:: O_RING_2 semantic presentation

Lemma17: for n being Nat st n < 1 holds
n = 0
by CQC_THE1:2;

Lemma18: for n being Nat st n <> 0 holds
1 <= n
by CQC_THE1:2;

Lemma19: for n being Nat holds
( not n <= 1 or n = 0 or n = 1 )
by CQC_THE1:2;

Lemma26: for R being non empty doubleLoopStr
for h, f, g being FinSequence of the carrier of R holds
( h = f ^ g iff ( dom h = Seg ((len f) + (len g)) & ( for k being Nat st k in dom f holds
h /. k = f /. k ) & ( for k being Nat st k in dom g holds
h /. ((len f) + k) = g /. k ) ) )
proof end;

Lemma41: for R being non empty doubleLoopStr
for x being Scalar of R
for f being FinSequence of the carrier of R holds
( f = <*x*> iff ( len f = 1 & f /. 1 = x ) )
proof end;

Lemma42: for R being non empty doubleLoopStr
for x being Scalar of R
for f being FinSequence of the carrier of R holds (f ^ <*x*>) /. ((len f) + 1) = x
proof end;

Lemma43: for i being Nat
for R being non empty doubleLoopStr
for f, g being FinSequence of the carrier of R st i <> 0 & i <= len f holds
(f ^ g) /. i = f /. i
proof end;

Lemma44: for i being Nat
for R being non empty doubleLoopStr
for g, f being FinSequence of the carrier of R st i <> 0 & i <= len g holds
(f ^ g) /. ((len f) + i) = g /. i
proof end;

Lemma45: for R being non empty doubleLoopStr
for x being Scalar of R st x is_a_square holds
<*x*> is_a_Sum_of_squares
proof end;

Lemma46: for R being non empty doubleLoopStr
for x being Scalar of R
for f being FinSequence of the carrier of R st f is_a_Sum_of_squares & x is_a_square holds
f ^ <*((f /. (len f)) + x)*> is_a_Sum_of_squares
proof end;

Lemma47: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_squares & y is_a_square holds
x + y is_a_sum_of_squares
proof end;

Lemma48: for R being non empty doubleLoopStr
for x being Scalar of R st x is_a_square holds
<*x*> is_a_Product_of_squares
proof end;

Lemma49: for R being non empty doubleLoopStr
for x being Scalar of R st x is_a_square holds
x is_a_product_of_squares
proof end;

Lemma50: for R being non empty doubleLoopStr
for x being Scalar of R
for f being FinSequence of the carrier of R st f is_a_Sum_of_products_of_squares & x is_a_product_of_squares holds
f ^ <*((f /. (len f)) + x)*> is_a_Sum_of_products_of_squares
proof end;

Lemma51: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_products_of_squares & y is_a_product_of_squares holds
x + y is_a_sum_of_products_of_squares
proof end;

Lemma52: for R being non empty doubleLoopStr
for x being Scalar of R st x is_a_square holds
<*x*> is_an_Amalgam_of_squares
proof end;

Lemma53: for R being non empty doubleLoopStr
for x being Scalar of R st x is_a_square holds
x is_an_amalgam_of_squares
proof end;

Lemma54: for R being non empty doubleLoopStr
for x being Scalar of R
for f being FinSequence of the carrier of R st f is_a_Sum_of_amalgams_of_squares & x is_an_amalgam_of_squares holds
f ^ <*((f /. (len f)) + x)*> is_a_Sum_of_amalgams_of_squares
proof end;

Lemma55: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_amalgams_of_squares & y is_an_amalgam_of_squares holds
x + y is_a_sum_of_amalgams_of_squares
proof end;

Lemma56: for R being non empty doubleLoopStr
for x being Scalar of R
for f being FinSequence of the carrier of R st f is_a_generation_from_squares & x is_an_amalgam_of_squares holds
f ^ <*x*> is_a_generation_from_squares
proof end;

Lemma58: for i, j being Nat
for R being non empty doubleLoopStr
for f being FinSequence of the carrier of R st f is_a_generation_from_squares & i <> 0 & i <= len f & j <> 0 & j <= len f holds
f ^ <*((f /. i) + (f /. j))*> is_a_generation_from_squares
proof end;

Lemma59: for R being non empty doubleLoopStr
for x being Scalar of R
for f being FinSequence of the carrier of R st f is_a_generation_from_squares & x is_a_square holds
f ^ <*x*> is_a_generation_from_squares
proof end;

Lemma60: for R being non empty doubleLoopStr
for x being Scalar of R
for f being FinSequence of the carrier of R st f is_a_generation_from_squares & x is_a_square holds
(f ^ <*x*>) ^ <*((f /. (len f)) + x)*> is_a_generation_from_squares
proof end;

Lemma61: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_generated_from_squares & y is_a_square holds
x + y is_generated_from_squares
proof end;

Lemma62: for R being non empty doubleLoopStr
for x being Scalar of R
for f being FinSequence of the carrier of R st f is_a_generation_from_squares & x is_an_amalgam_of_squares holds
(f ^ <*x*>) ^ <*((f /. (len f)) + x)*> is_a_generation_from_squares
proof end;

Lemma63: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_generated_from_squares & y is_an_amalgam_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma64: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_square & y is_a_square holds
x + y is_a_sum_of_squares
proof end;

Lemma65: for R being non empty doubleLoopStr
for f, g being FinSequence of the carrier of R st f is_a_generation_from_squares & g is_a_generation_from_squares holds
f ^ g is_a_generation_from_squares
proof end;

Lemma75: for R being non empty doubleLoopStr
for f, g being FinSequence of the carrier of R st f is_a_generation_from_squares & g is_a_generation_from_squares holds
(f ^ g) ^ <*((f /. (len f)) + (g /. (len g)))*> is_a_generation_from_squares
proof end;

Lemma76: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_generated_from_squares & y is_generated_from_squares holds
x + y is_generated_from_squares
proof end;

theorem Th1: :: O_RING_2:1
for R being non empty doubleLoopStr
for x, y being Scalar of R st ( ( x is_a_square & y is_a_square ) or ( x is_a_sum_of_squares & y is_a_square ) ) holds
x + y is_a_sum_of_squares by , ;

Lemma77: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_products_of_squares & y is_a_square holds
x + y is_a_sum_of_products_of_squares
proof end;

theorem Th2: :: O_RING_2:2
for R being non empty doubleLoopStr
for x, y being Scalar of R st ( ( x is_a_sum_of_products_of_squares & y is_a_square ) or ( x is_a_sum_of_products_of_squares & y is_a_product_of_squares ) ) holds
x + y is_a_sum_of_products_of_squares by , ;

Lemma78: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_an_amalgam_of_squares & y is_a_product_of_squares holds
x + y is_a_sum_of_amalgams_of_squares
proof end;

Lemma79: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_an_amalgam_of_squares & y is_an_amalgam_of_squares holds
x + y is_a_sum_of_amalgams_of_squares
proof end;

Lemma80: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_amalgams_of_squares & y is_a_product_of_squares holds
x + y is_a_sum_of_amalgams_of_squares
proof end;

Lemma81: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_amalgams_of_squares & y is_a_square holds
x + y is_a_sum_of_amalgams_of_squares
proof end;

theorem Th3: :: O_RING_2:3
for R being non empty doubleLoopStr
for x, y being Scalar of R st ( ( x is_an_amalgam_of_squares & y is_a_product_of_squares ) or ( x is_an_amalgam_of_squares & y is_an_amalgam_of_squares ) or ( x is_a_sum_of_amalgams_of_squares & y is_a_square ) or ( x is_a_sum_of_amalgams_of_squares & y is_a_product_of_squares ) or ( x is_a_sum_of_amalgams_of_squares & y is_an_amalgam_of_squares ) ) holds
x + y is_a_sum_of_amalgams_of_squares by Lemma19, , , , ;

Lemma82: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_square & y is_a_sum_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma83: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_square & y is_a_product_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma84: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_square & y is_a_sum_of_products_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma85: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_square & y is_an_amalgam_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma86: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_square & y is_a_sum_of_amalgams_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma87: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_square & y is_generated_from_squares holds
x + y is_generated_from_squares
proof end;

theorem Th4: :: O_RING_2:4
for R being non empty doubleLoopStr
for x, y being Scalar of R st ( ( x is_a_square & y is_a_sum_of_squares ) or ( x is_a_square & y is_a_product_of_squares ) or ( x is_a_square & y is_a_sum_of_products_of_squares ) or ( x is_a_square & y is_an_amalgam_of_squares ) or ( x is_a_square & y is_a_sum_of_amalgams_of_squares ) or ( x is_a_square & y is_generated_from_squares ) ) holds
x + y is_generated_from_squares by , , , , , Lemma41;

Lemma88: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_squares & y is_a_sum_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma89: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_squares & y is_a_product_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma90: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_squares & y is_a_sum_of_products_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma91: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_squares & y is_an_amalgam_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma92: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_squares & y is_a_sum_of_amalgams_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma93: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_squares & y is_generated_from_squares holds
x + y is_generated_from_squares
proof end;

theorem Th5: :: O_RING_2:5
for R being non empty doubleLoopStr
for x, y being Scalar of R st ( ( x is_a_sum_of_squares & y is_a_sum_of_squares ) or ( x is_a_sum_of_squares & y is_a_product_of_squares ) or ( x is_a_sum_of_squares & y is_a_sum_of_products_of_squares ) or ( x is_a_sum_of_squares & y is_an_amalgam_of_squares ) or ( x is_a_sum_of_squares & y is_a_sum_of_amalgams_of_squares ) or ( x is_a_sum_of_squares & y is_generated_from_squares ) ) holds
x + y is_generated_from_squares by Lemma42, Lemma43, Lemma44, Lemma45, Lemma46, Lemma47;

Lemma94: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_product_of_squares & y is_generated_from_squares holds
x + y is_generated_from_squares
proof end;

Lemma95: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_product_of_squares & y is_a_sum_of_amalgams_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma96: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_product_of_squares & y is_an_amalgam_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma97: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_product_of_squares & y is_a_sum_of_products_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma98: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_product_of_squares & y is_a_product_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma99: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_product_of_squares & y is_a_sum_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma100: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_product_of_squares & y is_a_square holds
x + y is_generated_from_squares
proof end;

theorem Th6: :: O_RING_2:6
for R being non empty doubleLoopStr
for x, y being Scalar of R st ( ( x is_a_product_of_squares & y is_a_square ) or ( x is_a_product_of_squares & y is_a_sum_of_squares ) or ( x is_a_product_of_squares & y is_a_product_of_squares ) or ( x is_a_product_of_squares & y is_a_sum_of_products_of_squares ) or ( x is_a_product_of_squares & y is_an_amalgam_of_squares ) or ( x is_a_product_of_squares & y is_a_sum_of_amalgams_of_squares ) or ( x is_a_product_of_squares & y is_generated_from_squares ) ) holds
x + y is_generated_from_squares by Lemma48, Lemma49, Lemma50, Lemma51, Lemma52, Lemma53, Lemma54;

Lemma101: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_products_of_squares & y is_generated_from_squares holds
x + y is_generated_from_squares
proof end;

Lemma102: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_products_of_squares & y is_a_sum_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma103: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_products_of_squares & y is_a_sum_of_products_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma104: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_products_of_squares & y is_an_amalgam_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma105: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_products_of_squares & y is_a_sum_of_amalgams_of_squares holds
x + y is_generated_from_squares
proof end;

theorem Th7: :: O_RING_2:7
for R being non empty doubleLoopStr
for x, y being Scalar of R st ( ( x is_a_sum_of_products_of_squares & y is_a_sum_of_squares ) or ( x is_a_sum_of_products_of_squares & y is_a_sum_of_products_of_squares ) or ( x is_a_sum_of_products_of_squares & y is_an_amalgam_of_squares ) or ( x is_a_sum_of_products_of_squares & y is_a_sum_of_amalgams_of_squares ) or ( x is_a_sum_of_products_of_squares & y is_generated_from_squares ) ) holds
x + y is_generated_from_squares by Lemma55, Lemma56, , Lemma58, Lemma59;

Lemma106: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_an_amalgam_of_squares & y is_generated_from_squares holds
x + y is_generated_from_squares
proof end;

Lemma107: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_an_amalgam_of_squares & y is_a_square holds
x + y is_generated_from_squares
proof end;

Lemma108: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_an_amalgam_of_squares & y is_a_sum_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma109: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_an_amalgam_of_squares & y is_a_sum_of_products_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma110: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_an_amalgam_of_squares & y is_a_sum_of_amalgams_of_squares holds
x + y is_generated_from_squares
proof end;

theorem Th8: :: O_RING_2:8
for R being non empty doubleLoopStr
for x, y being Scalar of R st ( ( x is_an_amalgam_of_squares & y is_a_square ) or ( x is_an_amalgam_of_squares & y is_a_sum_of_squares ) or ( x is_an_amalgam_of_squares & y is_a_sum_of_products_of_squares ) or ( x is_an_amalgam_of_squares & y is_a_sum_of_amalgams_of_squares ) or ( x is_an_amalgam_of_squares & y is_generated_from_squares ) ) holds
x + y is_generated_from_squares by Lemma60, Lemma61, Lemma62, Lemma63, Lemma64;

Lemma111: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_amalgams_of_squares & y is_a_sum_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma112: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_amalgams_of_squares & y is_a_sum_of_products_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma113: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_amalgams_of_squares & y is_a_sum_of_amalgams_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma114: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_a_sum_of_amalgams_of_squares & y is_generated_from_squares holds
x + y is_generated_from_squares
proof end;

theorem Th9: :: O_RING_2:9
for R being non empty doubleLoopStr
for x, y being Scalar of R st ( ( x is_a_sum_of_amalgams_of_squares & y is_a_sum_of_squares ) or ( x is_a_sum_of_amalgams_of_squares & y is_a_sum_of_products_of_squares ) or ( x is_a_sum_of_amalgams_of_squares & y is_a_sum_of_amalgams_of_squares ) or ( x is_a_sum_of_amalgams_of_squares & y is_generated_from_squares ) ) holds
x + y is_generated_from_squares by Lemma65, , , ;

Lemma115: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_generated_from_squares & y is_a_sum_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma116: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_generated_from_squares & y is_a_product_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma117: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_generated_from_squares & y is_a_sum_of_products_of_squares holds
x + y is_generated_from_squares
proof end;

Lemma118: for R being non empty doubleLoopStr
for x, y being Scalar of R st x is_generated_from_squares & y is_a_sum_of_amalgams_of_squares holds
x + y is_generated_from_squares
proof end;

theorem Th10: :: O_RING_2:10
for R being non empty doubleLoopStr
for x, y being Scalar of R st ( ( x is_generated_from_squares & y is_a_square ) or ( x is_generated_from_squares & y is_a_sum_of_squares ) or ( x is_generated_from_squares & y is_a_product_of_squares ) or ( x is_generated_from_squares & y is_a_sum_of_products_of_squares ) or ( x is_generated_from_squares & y is_an_amalgam_of_squares ) or ( x is_generated_from_squares & y is_a_sum_of_amalgams_of_squares ) or ( x is_generated_from_squares & y is_generated_from_squares ) ) holds
x + y is_generated_from_squares by , Lemma26, , , , , ;