Article BINOM, MML version 4.99.1005

:: BINOM:condreg 1
registration
  cluster non empty right_add-cancelable Abelian -> left_add-cancelable (addLoopStr);
end;

:: BINOM:condreg 2
registration
  cluster non empty left_add-cancelable Abelian -> right_add-cancelable (addLoopStr);
end;

:: BINOM:condreg 3
registration
  cluster non empty right_complementable add-associative right_zeroed -> right_add-cancelable (addLoopStr);
end;

:: BINOM:exreg 1
registration
  cluster non empty add-cancelable left_zeroed unital associative commutative distributive Abelian add-associative right_zeroed doubleLoopStr;
end;

:: BINOM:th 1
theorem
for b1 being non empty left_add-cancelable left-distributive right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1 holds
   (0. b1) * b2 = 0. b1;

:: BINOM:th 2
theorem
for b1 being non empty right_add-cancelable left_zeroed right-distributive doubleLoopStr
for b2 being Element of the carrier of b1 holds
   b2 * 0. b1 = 0. b1;

:: BINOM:sch 1
scheme BINOM:sch 1
{F1 -> non empty set,
  F2 -> non empty set,
  F3 -> Element of F2(),
  F4 -> Function-like quasi_total Relation of [:F1(),F2():],F2()}:
ex b1 being Function-like quasi_total Relation of [:NAT,F1():],F2() st
   for b2 being Element of F1() holds
      b1 .(0,b2) = F3() &
       (for b3 being Element of NAT holds
          b1 .(b3 + 1,b2) = F4() .(b2,b1 .(b3,b2)))


:: BINOM:sch 2
scheme BINOM:sch 2
{F1 -> non empty set,
  F2 -> non empty set,
  F3 -> Element of F2(),
  F4 -> Function-like quasi_total Relation of [:F2(),F1():],F2()}:
ex b1 being Function-like quasi_total Relation of [:F1(),NAT:],F2() st
   for b2 being Element of F1() holds
      b1 .(b2,0) = F3() &
       (for b3 being Element of NAT holds
          b1 .(b2,b3 + 1) = F4() .(b1 .(b2,b3),b2))


:: BINOM:th 3
theorem
for b1 being non empty left_zeroed addLoopStr
for b2 being Element of the carrier of b1 holds
   Sum <*b2*> = b2;

:: BINOM:th 4
theorem
for b1 being non empty right_add-cancelable left_zeroed right-distributive doubleLoopStr
for b2 being Element of the carrier of b1
for b3 being FinSequence of the carrier of b1 holds
   Sum (b2 * b3) = b2 * Sum b3;

:: BINOM:th 5
theorem
for b1 being non empty left_add-cancelable left-distributive right_zeroed doubleLoopStr
for b2 being Element of the carrier of b1
for b3 being FinSequence of the carrier of b1 holds
   Sum (b3 * b2) = (Sum b3) * b2;

:: BINOM:th 6
theorem
for b1 being non empty commutative doubleLoopStr
for b2 being Element of the carrier of b1
for b3 being FinSequence of the carrier of b1 holds
   Sum (b3 * b2) = Sum (b2 * b3);

:: BINOM:funcnot 1 => BINOM:func 1
definition
  let a1 be non empty addLoopStr;
  let a2, a3 be FinSequence of the carrier of a1;
  assume dom a2 = dom a3;
  func A2 + A3 -> FinSequence of the carrier of a1 means
    dom it = dom a2 &
     (for b1 being natural set
           st 1 <= b1 & b1 <= len it
        holds it /. b1 = (a2 /. b1) + (a3 /. b1));
end;

:: BINOM:def 4
theorem
for b1 being non empty addLoopStr
for b2, b3 being FinSequence of the carrier of b1
   st dom b2 = dom b3
for b4 being FinSequence of the carrier of b1 holds
      b4 = b2 + b3
   iff
      dom b4 = dom b2 &
       (for b5 being natural set
             st 1 <= b5 & b5 <= len b4
          holds b4 /. b5 = (b2 /. b5) + (b3 /. b5));

:: BINOM:th 7
theorem
for b1 being non empty Abelian add-associative right_zeroed addLoopStr
for b2, b3 being FinSequence of the carrier of b1
      st dom b2 = dom b3
   holds Sum (b2 + b3) = (Sum b2) + Sum b3;

:: BINOM:funcnot 2 => BINOM:func 2
definition
  let a1 be non empty unital multMagma;
  let a2 be Element of the carrier of a1;
  let a3 be natural set;
  func A2 |^ A3 -> Element of the carrier of a1 equals
    (power a1) .(a2,a3);
end;

:: BINOM:def 5
theorem
for b1 being non empty unital multMagma
for b2 being Element of the carrier of b1
for b3 being natural set holds
   b2 |^ b3 = (power b1) .(b2,b3);

:: BINOM:th 8
theorem
for b1 being non empty unital multMagma
for b2 being Element of the carrier of b1 holds
   b2 |^ 0 = 1_ b1 & b2 |^ 1 = b2;

:: BINOM:th 10
theorem
for b1 being non empty unital associative commutative multMagma
for b2, b3 being Element of the carrier of b1
for b4 being Element of NAT holds
   (b2 * b3) |^ b4 = (b2 |^ b4) * (b3 |^ b4);

:: BINOM:th 11
theorem
for b1 being non empty unital associative multMagma
for b2 being Element of the carrier of b1
for b3, b4 being Element of NAT holds
b2 |^ (b3 + b4) = (b2 |^ b3) * (b2 |^ b4);

:: BINOM:th 12
theorem
for b1 being non empty unital associative multMagma
for b2 being Element of the carrier of b1
for b3, b4 being Element of NAT holds
(b2 |^ b3) |^ b4 = b2 |^ (b3 * b4);

:: BINOM:funcnot 3 => BINOM:func 3
definition
  let a1 be non empty addLoopStr;
  func Nat-mult-left A1 -> Function-like quasi_total Relation of [:NAT,the carrier of a1:],the carrier of a1 means
    for b1 being Element of the carrier of a1 holds
       it .(0,b1) = 0. a1 &
        (for b2 being Element of NAT holds
           it .(b2 + 1,b1) = b1 + (it .(b2,b1)));
end;

:: BINOM:def 6
theorem
for b1 being non empty addLoopStr
for b2 being Function-like quasi_total Relation of [:NAT,the carrier of b1:],the carrier of b1 holds
      b2 = Nat-mult-left b1
   iff
      for b3 being Element of the carrier of b1 holds
         b2 .(0,b3) = 0. b1 &
          (for b4 being Element of NAT holds
             b2 .(b4 + 1,b3) = b3 + (b2 .(b4,b3)));

:: BINOM:funcnot 4 => BINOM:func 4
definition
  let a1 be non empty addLoopStr;
  func Nat-mult-right A1 -> Function-like quasi_total Relation of [:the carrier of a1,NAT:],the carrier of a1 means
    for b1 being Element of the carrier of a1 holds
       it .(b1,0) = 0. a1 &
        (for b2 being Element of NAT holds
           it .(b1,b2 + 1) = (it .(b1,b2)) + b1);
end;

:: BINOM:def 7
theorem
for b1 being non empty addLoopStr
for b2 being Function-like quasi_total Relation of [:the carrier of b1,NAT:],the carrier of b1 holds
      b2 = Nat-mult-right b1
   iff
      for b3 being Element of the carrier of b1 holds
         b2 .(b3,0) = 0. b1 &
          (for b4 being Element of NAT holds
             b2 .(b3,b4 + 1) = (b2 .(b3,b4)) + b3);

:: BINOM:funcnot 5 => BINOM:func 5
definition
  let a1 be non empty addLoopStr;
  let a2 be Element of the carrier of a1;
  let a3 be Element of NAT;
  func A3 * A2 -> Element of the carrier of a1 equals
    (Nat-mult-left a1) .(a3,a2);
end;

:: BINOM:def 8
theorem
for b1 being non empty addLoopStr
for b2 being Element of the carrier of b1
for b3 being Element of NAT holds
   b3 * b2 = (Nat-mult-left b1) .(b3,b2);

:: BINOM:funcnot 6 => BINOM:func 6
definition
  let a1 be non empty addLoopStr;
  let a2 be Element of the carrier of a1;
  let a3 be Element of NAT;
  func A2 * A3 -> Element of the carrier of a1 equals
    (Nat-mult-right a1) .(a2,a3);
end;

:: BINOM:def 9
theorem
for b1 being non empty addLoopStr
for b2 being Element of the carrier of b1
for b3 being Element of NAT holds
   b2 * b3 = (Nat-mult-right b1) .(b2,b3);

:: BINOM:th 13
theorem
for b1 being non empty addLoopStr
for b2 being Element of the carrier of b1 holds
   0 * b2 = 0. b1 & b2 * 0 = 0. b1;

:: BINOM:th 14
theorem
for b1 being non empty right_zeroed addLoopStr
for b2 being Element of the carrier of b1 holds
   1 * b2 = b2;

:: BINOM:th 15
theorem
for b1 being non empty left_zeroed addLoopStr
for b2 being Element of the carrier of b1 holds
   b2 * 1 = b2;

:: BINOM:th 16
theorem
for b1 being non empty left_zeroed add-associative addLoopStr
for b2 being Element of the carrier of b1
for b3, b4 being Element of NAT holds
(b3 + b4) * b2 = (b3 * b2) + (b4 * b2);

:: BINOM:th 17
theorem
for b1 being non empty add-associative right_zeroed addLoopStr
for b2 being Element of the carrier of b1
for b3, b4 being Element of NAT holds
b2 * (b3 + b4) = (b2 * b3) + (b2 * b4);

:: BINOM:th 18
theorem
for b1 being non empty left_zeroed add-associative right_zeroed addLoopStr
for b2 being Element of the carrier of b1
for b3 being Element of NAT holds
   b3 * b2 = b2 * b3;

:: BINOM:th 19
theorem
for b1 being non empty Abelian addLoopStr
for b2 being Element of the carrier of b1
for b3 being Element of NAT holds
   b3 * b2 = b2 * b3;

:: BINOM:th 20
theorem
for b1 being non empty left_add-cancelable left_zeroed left-distributive add-associative right_zeroed doubleLoopStr
for b2, b3 being Element of the carrier of b1
for b4 being Element of NAT holds
   (b4 * b2) * b3 = b4 * (b2 * b3);

:: BINOM:th 21
theorem
for b1 being non empty right_add-cancelable left_zeroed distributive add-associative right_zeroed doubleLoopStr
for b2, b3 being Element of the carrier of b1
for b4 being Element of NAT holds
   b3 * (b4 * b2) = (b3 * b2) * b4;

:: BINOM:th 22
theorem
for b1 being non empty add-cancelable left_zeroed distributive add-associative right_zeroed doubleLoopStr
for b2, b3 being Element of the carrier of b1
for b4 being Element of NAT holds
   (b2 * b4) * b3 = b2 * (b4 * b3);

:: BINOM:funcnot 7 => BINOM:func 7
definition
  let a1, a2 be Element of NAT;
  redefine func a2 choose a1 -> Element of NAT;
end;

:: BINOM:funcnot 8 => BINOM:func 8
definition
  let a1 be non empty unital doubleLoopStr;
  let a2, a3 be Element of the carrier of a1;
  let a4 be Element of NAT;
  func (A2,A3)In_Power A4 -> FinSequence of the carrier of a1 means
    len it = a4 + 1 &
     (for b1, b2, b3 being Element of NAT
           st b1 in dom it & b3 = b1 - 1 & b2 = a4 - b3
        holds it /. b1 = ((a4 choose b3) * (a2 |^ b2)) * (a3 |^ b3));
end;

:: BINOM:def 10
theorem
for b1 being non empty unital doubleLoopStr
for b2, b3 being Element of the carrier of b1
for b4 being Element of NAT
for b5 being FinSequence of the carrier of b1 holds
      b5 = (b2,b3)In_Power b4
   iff
      len b5 = b4 + 1 &
       (for b6, b7, b8 being Element of NAT
             st b6 in dom b5 & b8 = b6 - 1 & b7 = b4 - b8
          holds b5 /. b6 = ((b4 choose b8) * (b2 |^ b7)) * (b3 |^ b8));

:: BINOM:th 23
theorem
for b1 being non empty unital right_zeroed doubleLoopStr
for b2, b3 being Element of the carrier of b1 holds
(b2,b3)In_Power 0 = <*1_ b1*>;

:: BINOM:th 24
theorem
for b1 being non empty unital right_zeroed doubleLoopStr
for b2, b3 being Element of the carrier of b1
for b4 being Element of NAT holds
   ((b2,b3)In_Power b4) . 1 = b2 |^ b4;

:: BINOM:th 25
theorem
for b1 being non empty unital right_zeroed doubleLoopStr
for b2, b3 being Element of the carrier of b1
for b4 being Element of NAT holds
   ((b2,b3)In_Power b4) . (b4 + 1) = b3 |^ b4;

:: BINOM:th 26
theorem
for b1 being non empty add-cancelable left_zeroed unital associative commutative distributive Abelian add-associative right_zeroed doubleLoopStr
for b2, b3 being Element of the carrier of b1
for b4 being Element of NAT holds
   (b2 + b3) |^ b4 = Sum ((b2,b3)In_Power b4);