Article UPROOTS, MML version 4.99.1005

:: UPROOTS:th 1
theorem
for b1 being natural set holds
      b1 is not empty
   iff
      (b1 <> 1 implies 1 < b1);

:: UPROOTS:th 2
theorem
for b1 being FinSequence of NAT
      st for b2 being Element of NAT
              st b2 in dom b1
           holds b1 . b2 <> 0
   holds    Sum b1 = len b1
   iff
      b1 = (len b1) |-> 1;

:: UPROOTS:sch 1
scheme UPROOTS:sch 1
{F1 -> Relation-like Function-like FinSequence-like set}:
for b1 being Element of NAT
      st 1 <= b1 & b1 <= len F1()
   holds P1[b1, F1() . b1]
provided
   P1[1, F1() . 1]
and
   for b1 being Element of NAT
         st 1 <= b1 & b1 < len F1() & P1[b1, F1() . b1]
      holds P1[b1 + 1, F1() . (b1 + 1)];


:: UPROOTS:th 3
theorem
for b1 being non empty right_complementable add-associative right_zeroed addLoopStr
for b2 being FinSequence of the carrier of b1
      st 2 <= len b2 &
         (for b3 being Element of NAT
               st 2 < b3 & b3 in dom b2
            holds b2 . b3 = 0. b1)
   holds Sum b2 = (b2 /. 1) + (b2 /. 2);

:: UPROOTS:funcnot 1 => UPROOTS:func 1
definition
  let a1 be finite set;
  func canFS A1 -> FinSequence of a1 means
    len it = card a1 &
     (ex b1 being Relation-like Function-like FinSequence-like set st
        len b1 = card a1 &
         (b1 . 1 = [choose a1,a1 \ {choose a1}] or card a1 = 0) &
         (for b2 being Element of NAT
            st 1 <= b2 & b2 < card a1
         for b3 being set
               st b1 . b2 = b3
            holds b1 . (b2 + 1) = [choose (b3 `2),b3 `2 \ {choose (b3 `2)}]) &
         (for b2 being Element of NAT
               st b2 in dom it
            holds it . b2 = (b1 . b2) `1));
end;

:: UPROOTS:def 1
theorem
for b1 being finite set
for b2 being FinSequence of b1 holds
      b2 = canFS b1
   iff
      len b2 = card b1 &
       (ex b3 being Relation-like Function-like FinSequence-like set st
          len b3 = card b1 &
           (b3 . 1 = [choose b1,b1 \ {choose b1}] or card b1 = 0) &
           (for b4 being Element of NAT
              st 1 <= b4 & b4 < card b1
           for b5 being set
                 st b3 . b4 = b5
              holds b3 . (b4 + 1) = [choose (b5 `2),b5 `2 \ {choose (b5 `2)}]) &
           (for b4 being Element of NAT
                 st b4 in dom b2
              holds b2 . b4 = (b3 . b4) `1));

:: UPROOTS:th 4
theorem
for b1 being finite set holds
   canFS b1 is one-to-one;

:: UPROOTS:th 5
theorem
for b1 being finite set holds
   rng canFS b1 = b1;

:: UPROOTS:th 6
theorem
for b1 being set holds
   canFS {b1} = <*b1*>;

:: UPROOTS:th 7
theorem
for b1 being finite set holds
   (canFS b1) " is Function-like quasi_total Relation of b1,Seg card b1;

:: UPROOTS:funcnot 2 => UPROOTS:func 2
definition
  let a1 be set;
  let a2 be finite Element of bool a1;
  let a3 be Element of NAT;
  func (A2,A3)-bag -> Element of Bags a1 equals
    (EmptyBag a1) +* (a2 --> a3);
end;

:: UPROOTS:def 2
theorem
for b1 being set
for b2 being finite Element of bool b1
for b3 being Element of NAT holds
   (b2,b3)-bag = (EmptyBag b1) +* (b2 --> b3);

:: UPROOTS:th 8
theorem
for b1 being set
for b2 being finite Element of bool b1
for b3 being Element of NAT
for b4 being set
      st not b4 in b2
   holds (b2,b3)-bag . b4 = 0;

:: UPROOTS:th 9
theorem
for b1 being set
for b2 being finite Element of bool b1
for b3 being Element of NAT
for b4 being set
      st b4 in b2
   holds (b2,b3)-bag . b4 = b3;

:: UPROOTS:th 10
theorem
for b1 being set
for b2 being finite Element of bool b1
for b3 being Element of NAT
      st b3 <> 0
   holds support ((b2,b3)-bag) = b2;

:: UPROOTS:th 11
theorem
for b1 being set
for b2 being finite Element of bool b1
for b3 being Element of NAT
      st (b2 is empty or b3 = 0)
   holds (b2,b3)-bag = EmptyBag b1;

:: UPROOTS:th 12
theorem
for b1 being set
for b2, b3 being finite Element of bool b1
for b4 being Element of NAT
      st b2 misses b3
   holds (b2 \/ b3,b4)-bag = (b2,b4)-bag + ((b3,b4)-bag);

:: UPROOTS:modenot 1
definition
  let a1 be set;
  mode Rbag of a1 is real-valued finite-support ManySortedSet of a1;
end;

:: UPROOTS:funcnot 3 => UPROOTS:func 3
definition
  let a1 be set;
  let a2 be real-valued finite-support ManySortedSet of a1;
  func Sum A2 -> real set means
    ex b1 being FinSequence of REAL st
       it = Sum b1 & b1 = (canFS support a2) * a2;
end;

:: UPROOTS:def 3
theorem
for b1 being set
for b2 being real-valued finite-support ManySortedSet of b1
for b3 being real set holds
      b3 = Sum b2
   iff
      ex b4 being FinSequence of REAL st
         b3 = Sum b4 & b4 = (canFS support b2) * b2;

:: UPROOTS:funcnot 4 => UPROOTS:func 3
notation
  let a1 be set;
  let a2 be natural-valued finite-support ManySortedSet of a1;
  synonym degree a2 for Sum a2;
end;

:: UPROOTS:funcnot 5 => UPROOTS:func 4
definition
  let a1 be set;
  let a2 be natural-valued finite-support ManySortedSet of a1;
  redefine func degree A2 -> Element of NAT means
    ex b1 being FinSequence of NAT st
       it = Sum b1 & b1 = (canFS support a2) * a2;
end;

:: UPROOTS:def 4
theorem
for b1 being set
for b2 being natural-valued finite-support ManySortedSet of b1
for b3 being Element of NAT holds
      b3 = degree b2
   iff
      ex b4 being FinSequence of NAT st
         b3 = Sum b4 & b4 = (canFS support b2) * b2;

:: UPROOTS:th 13
theorem
for b1 being set
for b2 being real-valued finite-support ManySortedSet of b1
      st b2 = EmptyBag b1
   holds Sum b2 = 0;

:: UPROOTS:th 14
theorem
for b1 being set
for b2 being natural-valued finite-support ManySortedSet of b1
      st Sum b2 = 0
   holds b2 = EmptyBag b1;

:: UPROOTS:th 15
theorem
for b1 being set
for b2 being finite Element of bool b1
for b3 being natural-valued finite-support ManySortedSet of b1 holds
      b2 = support b3 & degree b3 = card b2
   iff
      b3 = (b2,1)-bag;

:: UPROOTS:th 16
theorem
for b1 being set
for b2 being finite Element of bool b1
for b3 being real-valued finite-support ManySortedSet of b1
      st support b3 c= b2
   holds ex b4 being FinSequence of REAL st
      b4 = (canFS b2) * b3 & Sum b3 = Sum b4;

:: UPROOTS:th 17
theorem
for b1 being set
for b2, b3, b4 being real-valued finite-support ManySortedSet of b1
      st b2 = b3 + b4
   holds Sum b2 = (Sum b3) + Sum b4;

:: UPROOTS:th 18
theorem
for b1 being non empty unital associative commutative multMagma
for b2, b3 being FinSequence of the carrier of b1
for b4 being Function-like quasi_total bijective Relation of dom b2,dom b2
      st b3 = b2 * b4
   holds Product b3 = Product b2;

:: UPROOTS:attrnot 1 => UPROOTS:attr 1
definition
  let a1 be non empty ZeroStr;
  let a2 be Function-like quasi_total finite-Support Relation of NAT,the carrier of a1;
  attr a2 is non-zero means
    a2 <> 0_. a1;
end;

:: UPROOTS:dfs 5
definiens
  let a1 be non empty ZeroStr;
  let a2 be Function-like quasi_total finite-Support Relation of NAT,the carrier of a1;
To prove
     a2 is non-zero
it is sufficient to prove
  thus a2 <> 0_. a1;

:: UPROOTS:def 5
theorem
for b1 being non empty ZeroStr
for b2 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1 holds
      b2 is non-zero(b1)
   iff
      b2 <> 0_. b1;

:: UPROOTS:th 19
theorem
for b1 being non empty ZeroStr
for b2 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1 holds
      b2 is non-zero(b1)
   iff
      0 < len b2;

:: UPROOTS:exreg 1
registration
  let a1 be non empty non trivial ZeroStr;
  cluster Relation-like Function-like quasi_total finite-Support non-zero Relation of NAT,the carrier of a1;
end;

:: UPROOTS:funcreg 1
registration
  let a1 be non empty non degenerated multLoopStr_0;
  let a2 be Element of the carrier of a1;
  cluster <%a2,1. a1%> -> Function-like quasi_total non-zero;
end;

:: UPROOTS:th 20
theorem
for b1 being non empty ZeroStr
for b2 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st 0 < len b2
   holds b2 . ((len b2) -' 1) <> 0. b1;

:: UPROOTS:th 21
theorem
for b1 being non empty ZeroStr
for b2 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st len b2 = 1
   holds b2 = <%b2 . 0%> & b2 . 0 <> 0. b1;

:: UPROOTS:th 22
theorem
for b1 being non empty right_complementable right-distributive add-associative right_zeroed doubleLoopStr
for b2 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1 holds
   b2 *' 0_. b1 = 0_. b1;

:: UPROOTS:exreg 2
registration
  cluster non empty non degenerated right_complementable unital associative commutative distributive Abelian add-associative right_zeroed domRing-like algebraic-closed doubleLoopStr;
end;

:: UPROOTS:th 23
theorem
for b1 being non empty right_complementable distributive add-associative right_zeroed domRing-like doubleLoopStr
for b2, b3 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st b2 *' b3 = 0_. b1 & not b2 = 0_. b1
   holds b3 = 0_. b1;

:: UPROOTS:funcreg 2
registration
  let a1 be non empty right_complementable distributive add-associative right_zeroed domRing-like doubleLoopStr;
  cluster Polynom-Ring a1 -> non empty strict domRing-like;
end;

:: UPROOTS:funcreg 3
registration
  let a1 be non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr;
  let a2, a3 be Function-like quasi_total finite-Support non-zero Relation of NAT,the carrier of a1;
  cluster a2 *' a3 -> Function-like quasi_total non-zero;
end;

:: UPROOTS:th 24
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2, b3 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1 holds
(Roots b2) \/ Roots b3 c= Roots (b2 *' b3);

:: UPROOTS:th 25
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2, b3 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1 holds
Roots (b2 *' b3) = (Roots b2) \/ Roots b3;

:: UPROOTS:th 26
theorem
for b1 being non empty right_complementable distributive add-associative right_zeroed doubleLoopStr
for b2 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
for b3 being Element of the carrier of Polynom-Ring b1
      st b2 = b3
   holds - b2 = - b3;

:: UPROOTS:th 27
theorem
for b1 being non empty right_complementable distributive add-associative right_zeroed doubleLoopStr
for b2, b3 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
for b4, b5 being Element of the carrier of Polynom-Ring b1
      st b2 = b4 & b3 = b5
   holds b2 - b3 = b4 - b5;

:: UPROOTS:th 28
theorem
for b1 being non empty right_complementable distributive Abelian add-associative right_zeroed doubleLoopStr
for b2, b3, b4 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1 holds
(b2 *' b3) - (b2 *' b4) = b2 *' (b3 - b4);

:: UPROOTS:th 29
theorem
for b1 being non empty right_complementable distributive add-associative right_zeroed doubleLoopStr
for b2, b3 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st b2 - b3 = 0_. b1
   holds b2 = b3;

:: UPROOTS:th 30
theorem
for b1 being non empty right_complementable distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2, b3, b4 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st b2 <> 0_. b1 & b2 *' b3 = b2 *' b4
   holds b3 = b4;

:: UPROOTS:th 31
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2 being Element of NAT
for b3 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st b3 <> 0_. b1
   holds b3 `^ b2 <> 0_. b1;

:: UPROOTS:th 32
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2, b3 being Element of NAT
for b4 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1 holds
   (b4 `^ b2) *' (b4 `^ b3) = b4 `^ (b2 + b3);

:: UPROOTS:th 33
theorem
for b1 being non empty multLoopStr_0 holds
   1_. b1 = <%1. b1%>;

:: UPROOTS:th 34
theorem
for b1 being non empty right_complementable right-distributive well-unital add-associative right_zeroed doubleLoopStr
for b2 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1 holds
   b2 *' <%1. b1%> = b2;

:: UPROOTS:th 35
theorem
for b1 being non empty right_complementable distributive add-associative right_zeroed doubleLoopStr
for b2, b3 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st (len b2 = 0 or len b3 = 0)
   holds len (b2 *' b3) = 0;

:: UPROOTS:th 36
theorem
for b1 being non empty right_complementable distributive add-associative right_zeroed doubleLoopStr
for b2, b3 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st b2 *' b3 is non-zero(b1)
   holds b2 is non-zero(b1) & b3 is non-zero(b1);

:: UPROOTS:th 37
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive add-associative right_zeroed doubleLoopStr
for b2, b3 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st (b2 . ((len b2) -' 1)) * (b3 . ((len b3) -' 1)) <> 0. b1
   holds 0 < len (b2 *' b3);

:: UPROOTS:th 38
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive add-associative right_zeroed domRing-like doubleLoopStr
for b2, b3 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st 1 < len b2 & 1 < len b3
   holds len b2 < len (b2 *' b3);

:: UPROOTS:th 39
theorem
for b1 being non empty right_complementable left-distributive add-associative right_zeroed doubleLoopStr
for b2, b3 being Element of the carrier of b1
for b4 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1 holds
   (<%b2,b3%> *' b4) . 0 = b2 * (b4 . 0) &
    (for b5 being natural set holds
       (<%b2,b3%> *' b4) . (b5 + 1) = (b2 * (b4 . (b5 + 1))) + (b3 * (b4 . b5)));

:: UPROOTS:th 40
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive add-associative right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1
for b3 being Function-like quasi_total finite-Support non-zero Relation of NAT,the carrier of b1 holds
   len (<%b2,1. b1%> *' b3) = (len b3) + 1;

:: UPROOTS:th 41
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1
for b3 being Element of NAT holds
   len (<%b2,1. b1%> `^ b3) = b3 + 1;

:: UPROOTS:funcreg 4
registration
  let a1 be non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr;
  let a2 be Element of the carrier of a1;
  let a3 be Element of NAT;
  cluster <%a2,1. a1%> `^ a3 -> Function-like quasi_total non-zero;
end;

:: UPROOTS:th 42
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1
for b3 being Function-like quasi_total finite-Support non-zero Relation of NAT,the carrier of b1
for b4 being Element of NAT holds
   len ((<%b2,1. b1%> `^ b4) *' b3) = b4 + len b3;

:: UPROOTS:th 43
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive add-associative right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1
for b3, b4 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st b3 = <%b2,1. b1%> *' b4 &
         b3 . ((len b3) -' 1) = 1. b1
   holds b4 . ((len b4) -' 1) = 1. b1;

:: UPROOTS:funcnot 6 => UPROOTS:func 5
definition
  let a1 be non empty ZeroStr;
  let a2 be Function-like quasi_total finite-Support Relation of NAT,the carrier of a1;
  let a3 be natural set;
  func poly_shift(A2,A3) -> Function-like quasi_total finite-Support Relation of NAT,the carrier of a1 means
    for b1 being natural set holds
       it . b1 = a2 . (a3 + b1);
end;

:: UPROOTS:def 6
theorem
for b1 being non empty ZeroStr
for b2 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
for b3 being natural set
for b4 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1 holds
      b4 = poly_shift(b2,b3)
   iff
      for b5 being natural set holds
         b4 . b5 = b2 . (b3 + b5);

:: UPROOTS:th 44
theorem
for b1 being non empty ZeroStr
for b2 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1 holds
   poly_shift(b2,0) = b2;

:: UPROOTS:th 45
theorem
for b1 being non empty ZeroStr
for b2 being Element of NAT
for b3 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st len b3 <= b2
   holds poly_shift(b3,b2) = 0_. b1;

:: UPROOTS:th 46
theorem
for b1 being non empty non degenerated multLoopStr_0
for b2 being Element of NAT
for b3 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st b2 <= len b3
   holds (len poly_shift(b3,b2)) + b2 = len b3;

:: UPROOTS:th 47
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1
for b3 being Element of NAT
for b4 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st b3 < len b4
   holds eval(poly_shift(b4,b3),b2) = (b2 * eval(poly_shift(b4,b3 + 1),b2)) + (b4 . b3);

:: UPROOTS:th 48
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st len b2 = 1
   holds Roots b2 = {};

:: UPROOTS:funcnot 7 => UPROOTS:func 6
definition
  let a1 be non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr;
  let a2 be Element of the carrier of a1;
  let a3 be Function-like quasi_total finite-Support Relation of NAT,the carrier of a1;
  assume a2 is_a_root_of a3;
  func poly_quotient(A3,A2) -> Function-like quasi_total finite-Support Relation of NAT,the carrier of a1 means
    (len it) + 1 = len a3 &
     (for b1 being natural set holds
        it . b1 = eval(poly_shift(a3,b1 + 1),a2))
    if 0 < len a3
    otherwise it = 0_. a1;
end;

:: UPROOTS:def 7
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1
for b3 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
   st b2 is_a_root_of b3
for b4 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1 holds
   (len b3 <= 0 or    (b4 = poly_quotient(b3,b2)
    iff
       (len b4) + 1 = len b3 &
        (for b5 being natural set holds
           b4 . b5 = eval(poly_shift(b3,b5 + 1),b2)))) &
    (len b3 <= 0 implies    (b4 = poly_quotient(b3,b2)
    iff
       b4 = 0_. b1));

:: UPROOTS:th 49
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1
for b3 being Function-like quasi_total finite-Support non-zero Relation of NAT,the carrier of b1
      st b2 is_a_root_of b3
   holds 0 < len poly_quotient(b3,b2);

:: UPROOTS:th 50
theorem
for b1 being non empty right_complementable left-distributive well-unital add-associative right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1 holds
   Roots <%- b2,1. b1%> = {b2};

:: UPROOTS:th 51
theorem
for b1 being non empty non trivial right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1
for b3, b4 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st b3 = <%- b2,1. b1%> *' b4
   holds b2 is_a_root_of b3;

:: UPROOTS:th 52
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1
for b3 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st b2 is_a_root_of b3
   holds b3 = <%- b2,1. b1%> *' poly_quotient(b3,b2);

:: UPROOTS:th 53
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1
for b3, b4 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1
      st b3 = <%- b2,1. b1%> *' b4
   holds b2 is_a_root_of b3;

:: UPROOTS:funcreg 5
registration
  let a1 be non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr;
  let a2 be Function-like quasi_total finite-Support non-zero Relation of NAT,the carrier of a1;
  cluster Roots a2 -> finite;
end;

:: UPROOTS:funcnot 8 => UPROOTS:func 7
definition
  let a1 be non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr;
  let a2 be Element of the carrier of a1;
  let a3 be Function-like quasi_total finite-Support non-zero Relation of NAT,the carrier of a1;
  func multiplicity(A3,A2) -> Element of NAT means
    ex b1 being non empty finite Element of bool NAT st
       b1 = {b2 where b2 is Element of NAT: ex b3 being Function-like quasi_total finite-Support Relation of NAT,the carrier of a1 st
           a3 = (<%- a2,1. a1%> `^ b2) *' b3} &
        it = max b1;
end;

:: UPROOTS:def 8
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1
for b3 being Function-like quasi_total finite-Support non-zero Relation of NAT,the carrier of b1
for b4 being Element of NAT holds
      b4 = multiplicity(b3,b2)
   iff
      ex b5 being non empty finite Element of bool NAT st
         b5 = {b6 where b6 is Element of NAT: ex b7 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1 st
             b3 = (<%- b2,1. b1%> `^ b6) *' b7} &
          b4 = max b5;

:: UPROOTS:th 54
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2 being Function-like quasi_total finite-Support non-zero Relation of NAT,the carrier of b1
for b3 being Element of the carrier of b1 holds
      b3 is_a_root_of b2
   iff
      1 <= multiplicity(b2,b3);

:: UPROOTS:th 55
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1 holds
   multiplicity(<%- b2,1. b1%>,b2) = 1;

:: UPROOTS:funcnot 9 => UPROOTS:func 8
definition
  let a1 be non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr;
  let a2 be Function-like quasi_total finite-Support non-zero Relation of NAT,the carrier of a1;
  func BRoots A2 -> natural-valued finite-support ManySortedSet of the carrier of a1 means
    support it = Roots a2 &
     (for b1 being Element of the carrier of a1 holds
        it . b1 = multiplicity(a2,b1));
end;

:: UPROOTS:def 9
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2 being Function-like quasi_total finite-Support non-zero Relation of NAT,the carrier of b1
for b3 being natural-valued finite-support ManySortedSet of the carrier of b1 holds
      b3 = BRoots b2
   iff
      support b3 = Roots b2 &
       (for b4 being Element of the carrier of b1 holds
          b3 . b4 = multiplicity(b2,b4));

:: UPROOTS:th 56
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2 being Element of the carrier of b1 holds
   BRoots <%- b2,1. b1%> = ({b2},1)-bag;

:: UPROOTS:th 57
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2 being Element of the carrier of b1
for b3, b4 being Function-like quasi_total finite-Support non-zero Relation of NAT,the carrier of b1 holds
multiplicity(b3 *' b4,b2) = (multiplicity(b3,b2)) + multiplicity(b4,b2);

:: UPROOTS:th 58
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2, b3 being Function-like quasi_total finite-Support non-zero Relation of NAT,the carrier of b1 holds
BRoots (b2 *' b3) = (BRoots b2) + BRoots b3;

:: UPROOTS:th 59
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2 being Function-like quasi_total finite-Support non-zero Relation of NAT,the carrier of b1
      st len b2 = 1
   holds degree BRoots b2 = 0;

:: UPROOTS:th 60
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2 being Element of the carrier of b1
for b3 being Element of NAT holds
   degree BRoots (<%- b2,1. b1%> `^ b3) = b3;

:: UPROOTS:th 61
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like algebraic-closed doubleLoopStr
for b2 being Function-like quasi_total finite-Support non-zero Relation of NAT,the carrier of b1 holds
   degree BRoots b2 = (len b2) -' 1;

:: UPROOTS:funcnot 10 => UPROOTS:func 9
definition
  let a1 be non empty right_complementable distributive add-associative right_zeroed doubleLoopStr;
  let a2 be Element of the carrier of a1;
  let a3 be Element of NAT;
  func fpoly_mult_root(A2,A3) -> FinSequence of the carrier of Polynom-Ring a1 means
    len it = a3 &
     (for b1 being Element of NAT
           st b1 in dom it
        holds it . b1 = <%- a2,1. a1%>);
end;

:: UPROOTS:def 10
theorem
for b1 being non empty right_complementable distributive add-associative right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1
for b3 being Element of NAT
for b4 being FinSequence of the carrier of Polynom-Ring b1 holds
      b4 = fpoly_mult_root(b2,b3)
   iff
      len b4 = b3 &
       (for b5 being Element of NAT
             st b5 in dom b4
          holds b4 . b5 = <%- b2,1. b1%>);

:: UPROOTS:funcnot 11 => UPROOTS:func 10
definition
  let a1 be non empty right_complementable distributive add-associative right_zeroed doubleLoopStr;
  let a2 be natural-valued finite-support ManySortedSet of the carrier of a1;
  func poly_with_roots A2 -> Function-like quasi_total finite-Support Relation of NAT,the carrier of a1 means
    ex b1 being FinSequence of (the carrier of Polynom-Ring a1) * st
       ex b2 being FinSequence of the carrier of a1 st
          len b1 = card support a2 &
           b2 = canFS support a2 &
           (for b3 being Element of NAT
                 st b3 in dom b1
              holds b1 . b3 = fpoly_mult_root(b2 /. b3,a2 . (b2 /. b3))) &
           it = Product FlattenSeq b1;
end;

:: UPROOTS:def 11
theorem
for b1 being non empty right_complementable distributive add-associative right_zeroed doubleLoopStr
for b2 being natural-valued finite-support ManySortedSet of the carrier of b1
for b3 being Function-like quasi_total finite-Support Relation of NAT,the carrier of b1 holds
      b3 = poly_with_roots b2
   iff
      ex b4 being FinSequence of (the carrier of Polynom-Ring b1) * st
         ex b5 being FinSequence of the carrier of b1 st
            len b4 = card support b2 &
             b5 = canFS support b2 &
             (for b6 being Element of NAT
                   st b6 in dom b4
                holds b4 . b6 = fpoly_mult_root(b5 /. b6,b2 . (b5 /. b6))) &
             b3 = Product FlattenSeq b4;

:: UPROOTS:th 62
theorem
for b1 being non empty right_complementable commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr holds
   poly_with_roots EmptyBag the carrier of b1 = <%1. b1%>;

:: UPROOTS:th 63
theorem
for b1 being non empty right_complementable distributive add-associative right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1 holds
   poly_with_roots (({b2},1)-bag) = <%- b2,1. b1%>;

:: UPROOTS:th 64
theorem
for b1 being non empty right_complementable distributive add-associative right_zeroed doubleLoopStr
for b2 being natural-valued finite-support ManySortedSet of the carrier of b1
for b3 being FinSequence of (the carrier of Polynom-Ring b1) *
for b4 being FinSequence of the carrier of b1
      st len b3 = card support b2 &
         b4 = canFS support b2 &
         (for b5 being Element of NAT
               st b5 in dom b3
            holds b3 . b5 = fpoly_mult_root(b4 /. b5,b2 . (b4 /. b5)))
   holds len FlattenSeq b3 = degree b2;

:: UPROOTS:th 65
theorem
for b1 being non empty right_complementable distributive add-associative right_zeroed doubleLoopStr
for b2 being natural-valued finite-support ManySortedSet of the carrier of b1
for b3 being FinSequence of (the carrier of Polynom-Ring b1) *
for b4 being FinSequence of the carrier of b1
for b5 being Element of the carrier of b1
      st len b3 = card support b2 &
         b4 = canFS support b2 &
         (for b6 being Element of NAT
               st b6 in dom b3
            holds b3 . b6 = fpoly_mult_root(b4 /. b6,b2 . (b4 /. b6)))
   holds (b5 in support b2 implies card ((FlattenSeq b3) " {<%- b5,1. b1%>}) = b2 . b5) &
    (b5 in support b2 or card ((FlattenSeq b3) " {<%- b5,1. b1%>}) = 0);

:: UPROOTS:th 66
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2, b3 being natural-valued finite-support ManySortedSet of the carrier of b1 holds
poly_with_roots (b2 + b3) = (poly_with_roots b2) *' poly_with_roots b3;

:: UPROOTS:th 67
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like algebraic-closed doubleLoopStr
for b2 being Function-like quasi_total finite-Support non-zero Relation of NAT,the carrier of b1
      st b2 . ((len b2) -' 1) = 1. b1
   holds b2 = poly_with_roots BRoots b2;

:: UPROOTS:th 68
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2 being non empty finite Element of bool the carrier of b1
for b3 being FinSequence of the carrier of Polynom-Ring b1
      st len b3 = card b2 &
         (for b4 being Element of NAT
         for b5 being Element of the carrier of b1
               st b4 in dom b3 & b5 = (canFS b2) . b4
            holds b3 . b4 = <%- b5,1. b1%>)
   holds poly_with_roots ((b2,1)-bag) = Product b3;

:: UPROOTS:th 69
theorem
for b1 being non empty non trivial right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2 being non empty finite Element of bool the carrier of b1
for b3 being Element of the carrier of b1
for b4 being FinSequence of the carrier of b1
      st len b4 = card b2 &
         (for b5 being Element of NAT
         for b6 being Element of the carrier of b1
               st b5 in dom b4 & b6 = (canFS b2) . b5
            holds b4 . b5 = eval(<%- b6,1. b1%>,b3))
   holds eval(poly_with_roots ((b2,1)-bag),b3) = Product b4;