Article MATRPROB, MML version 4.99.1005

:: MATRPROB:funcnot 1 => MATRPROB:func 1
definition
  let a1 be set;
  let a2 be FinSequence of a1 *;
  let a3 be natural set;
  redefine func a2 . a3 -> FinSequence of a1;
end;

:: MATRPROB:funcnot 2 => MATRPROB:func 2
definition
  let a1 be real set;
  redefine func <*a1*> -> FinSequence of REAL;
end;

:: MATRPROB:th 1
theorem
for b1 being non empty set
for b2 being Element of b1
for b3 being non empty natural set
for b4 being FinSequence of b1 holds
      len b4 = b3 &
       (for b5 being natural set
             st b5 in dom b4
          holds b4 . b5 = b2)
   iff
      b4 = b3 |-> b2;

:: MATRPROB:th 2
theorem
for b1 being non empty set
for b2 being Element of NAT
for b3 being natural set
for b4, b5 being Element of b1 holds
ex b6 being FinSequence of b1 st
   len b6 = b3 &
    (for b7 being natural set
          st b7 in Seg b3
       holds (b7 in Seg b2 implies b6 . b7 = b4) & (b7 in Seg b2 or b6 . b7 = b5));

:: MATRPROB:th 3
theorem
for b1 being FinSequence of REAL
   st for b2 being natural set
           st b2 in dom b1
        holds 0 <= b1 . b2
for b2 being Function-like quasi_total Relation of NAT,REAL
   st b2 . 1 = b1 . 1 &
      (for b3 being natural set
            st 0 <> b3 & b3 < len b1
         holds b2 . (b3 + 1) = (b2 . b3) + (b1 . (b3 + 1)))
for b3, b4 being natural set
      st b3 in dom b1 & b4 in dom b1 & b3 <= b4
   holds b2 . b3 <= b2 . b4;

:: MATRPROB:th 4
theorem
for b1 being FinSequence of REAL
   st 1 <= len b1 &
      (for b2 being natural set
            st b2 in dom b1
         holds 0 <= b1 . b2)
for b2 being Function-like quasi_total Relation of NAT,REAL
   st b2 . 1 = b1 . 1 &
      (for b3 being natural set
            st 0 <> b3 & b3 < len b1
         holds b2 . (b3 + 1) = (b2 . b3) + (b1 . (b3 + 1)))
for b3 being natural set
      st b3 in dom b1
   holds b1 . b3 <= b2 . b3;

:: MATRPROB:th 5
theorem
for b1 being FinSequence of REAL
   st for b2 being natural set
           st b2 in dom b1
        holds 0 <= b1 . b2
for b2 being natural set
      st b2 in dom b1
   holds b1 . b2 <= Sum b1;

:: MATRPROB:th 6
theorem
for b1, b2 being Element of REAL
for b3 being natural set
for b4 being Function-like quasi_total Relation of NAT,REAL holds
   ex b5 being Function-like quasi_total Relation of NAT,REAL st
      b5 . 0 = b1 &
       (for b6 being natural set holds
          (b6 <> 0 & b6 <= b3 implies b5 . b6 = b4 . b6) &
           (b6 <= b3 or b5 . b6 = b2));

:: MATRPROB:th 7
theorem
for b1 being FinSequence of REAL holds
   ex b2 being Function-like quasi_total Relation of NAT,REAL st
      b2 . 0 = 0 &
       (for b3 being natural set
             st b3 < len b1
          holds b2 . (b3 + 1) = (b2 . b3) + (b1 . (b3 + 1))) &
       Sum b1 = b2 . len b1;

:: MATRPROB:th 8
theorem
for b1 being natural set
for b2 being set
for b3 being FinSequence of b2 holds
   b1 |-> b3 is FinSequence of b2 *;

:: MATRPROB:th 9
theorem
for b1 being Element of NAT
for b2 being natural set
for b3 being set
for b4, b5 being FinSequence of b3 holds
ex b6 being FinSequence of b3 * st
   len b6 = b2 &
    (for b7 being natural set
          st b7 in Seg b2
       holds (b7 in Seg b1 implies b6 . b7 = b4) & (b7 in Seg b1 or b6 . b7 = b5));

:: MATRPROB:th 10
theorem
for b1 being set
for b2 being Relation-like Function-like FinSequence-like set holds
      b2 is tabular FinSequence of b1 *
   iff
      ex b3 being natural set st
         for b4 being Element of NAT
               st b4 in dom b2
            holds ex b5 being FinSequence of b1 st
               b2 . b4 = b5 & len b5 = b3;

:: MATRPROB:th 11
theorem
for b1 being set
for b2 being FinSequence of b1 * holds
      ex b3 being natural set st
         for b4 being Element of NAT
               st b4 in dom b2
            holds len (b2 . b4) = b3
   iff
      b2 is tabular FinSequence of b1 *;

:: MATRPROB:th 12
theorem
for b1, b2 being Element of NAT
for b3 being Relation-like Function-like FinSequence-like tabular set holds
      [b1,b2] in Indices b3
   iff
      b1 in Seg len b3 & b2 in Seg width b3;

:: MATRPROB:th 13
theorem
for b1, b2 being Element of NAT
for b3 being non empty set
for b4 being tabular FinSequence of b3 * holds
      [b1,b2] in Indices b4
   iff
      b1 in dom b4 & b2 in dom (b4 . b1);

:: MATRPROB:th 14
theorem
for b1, b2 being Element of NAT
for b3 being non empty set
for b4 being tabular FinSequence of b3 *
      st [b1,b2] in Indices b4
   holds b4 *(b1,b2) = (b4 . b1) . b2;

:: MATRPROB:th 15
theorem
for b1, b2 being Element of NAT
for b3 being non empty set
for b4 being tabular FinSequence of b3 * holds
      [b1,b2] in Indices b4
   iff
      b1 in dom Col(b4,b2) & b2 in dom Line(b4,b1);

:: MATRPROB:th 16
theorem
for b1, b2 being non empty set
for b3 being tabular FinSequence of b1 *
for b4 being tabular FinSequence of b2 *
   st b3 = b4
for b5 being Element of NAT
      st b5 in dom b3
   holds Line(b3,b5) = Line(b4,b5);

:: MATRPROB:th 17
theorem
for b1, b2 being non empty set
for b3 being tabular FinSequence of b1 *
for b4 being tabular FinSequence of b2 *
   st b3 = b4
for b5 being Element of NAT
      st b5 in Seg width b3
   holds Col(b3,b5) = Col(b4,b5);

:: MATRPROB:th 18
theorem
for b1 being non empty set
for b2, b3 being natural set
for b4 being FinSequence of b1
      st len b4 = b2
   holds b3 |-> b4 is Matrix of b3,b2,b1;

:: MATRPROB:th 19
theorem
for b1 being non empty set
for b2 being Element of NAT
for b3, b4 being natural set
for b5, b6 being FinSequence of b1
      st len b5 = b3 & len b6 = b3
   holds ex b7 being Matrix of b4,b3,b1 st
      for b8 being natural set
            st b8 in Seg b4
         holds (b8 in Seg b2 implies b7 . b8 = b5) & (b8 in Seg b2 or b7 . b8 = b6);

:: MATRPROB:funcnot 3 => MATRPROB:func 3
definition
  let a1 be FinSequence of REAL *;
  func Sum A1 -> FinSequence of REAL means
    len it = len a1 &
     (for b1 being Element of NAT
           st b1 in dom it
        holds it . b1 = Sum (a1 . b1));
end;

:: MATRPROB:def 1
theorem
for b1 being FinSequence of REAL *
for b2 being FinSequence of REAL holds
      b2 = Sum b1
   iff
      len b2 = len b1 &
       (for b3 being Element of NAT
             st b3 in dom b2
          holds b2 . b3 = Sum (b1 . b3));

:: MATRPROB:funcnot 4 => MATRPROB:func 3
notation
  let a1 be tabular FinSequence of REAL *;
  synonym LineSum a1 for Sum a1;
end;

:: MATRPROB:th 20
theorem
for b1 being tabular FinSequence of REAL * holds
   len Sum b1 = len b1 &
    (for b2 being Element of NAT
          st b2 in Seg len b1
       holds (Sum b1) . b2 = Sum Line(b1,b2));

:: MATRPROB:funcnot 5 => MATRPROB:func 4
definition
  let a1 be tabular FinSequence of REAL *;
  func ColSum A1 -> FinSequence of REAL means
    len it = width a1 &
     (for b1 being natural set
           st b1 in Seg width a1
        holds it . b1 = Sum Col(a1,b1));
end;

:: MATRPROB:def 2
theorem
for b1 being tabular FinSequence of REAL *
for b2 being FinSequence of REAL holds
      b2 = ColSum b1
   iff
      len b2 = width b1 &
       (for b3 being natural set
             st b3 in Seg width b1
          holds b2 . b3 = Sum Col(b1,b3));

:: MATRPROB:th 21
theorem
for b1 being tabular FinSequence of REAL *
      st 0 < width b1
   holds Sum b1 = ColSum (b1 @);

:: MATRPROB:th 22
theorem
for b1 being tabular FinSequence of REAL * holds
   ColSum b1 = Sum (b1 @);

:: MATRPROB:funcnot 6 => MATRPROB:func 5
definition
  let a1 be tabular FinSequence of REAL *;
  func SumAll A1 -> Element of REAL equals
    Sum Sum a1;
end;

:: MATRPROB:def 3
theorem
for b1 being tabular FinSequence of REAL * holds
   SumAll b1 = Sum Sum b1;

:: MATRPROB:th 23
theorem
for b1 being tabular FinSequence of REAL *
      st len b1 = 0
   holds SumAll b1 = 0;

:: MATRPROB:th 24
theorem
for b1 being natural set
for b2 being Matrix of b1,0,REAL holds
   SumAll b2 = 0;

:: MATRPROB:th 25
theorem
for b1 being Element of NAT
for b2, b3 being natural set
for b4 being Matrix of b2,b1,REAL
for b5 being Matrix of b3,b1,REAL holds
   Sum (b4 ^ b5) = (Sum b4) ^ Sum b5;

:: MATRPROB:th 26
theorem
for b1, b2 being tabular FinSequence of REAL * holds
(Sum b1) + Sum b2 = Sum (b1 ^^ b2);

:: MATRPROB:th 27
theorem
for b1, b2 being tabular FinSequence of REAL *
      st len b1 = len b2
   holds (SumAll b1) + SumAll b2 = SumAll (b1 ^^ b2);

:: MATRPROB:th 28
theorem
for b1 being tabular FinSequence of REAL * holds
   SumAll b1 = SumAll (b1 @);

:: MATRPROB:th 29
theorem
for b1 being tabular FinSequence of REAL * holds
   SumAll b1 = Sum ColSum b1;

:: MATRPROB:th 30
theorem
for b1, b2 being FinSequence of REAL
      st len b1 = len b2
   holds len mlt(b1,b2) = len b1;

:: MATRPROB:th 31
theorem
for b1 being Element of NAT
for b2 being Element of b1 -tuples_on REAL holds
   mlt(b1 |-> 1,b2) = b2;

:: MATRPROB:th 32
theorem
for b1 being FinSequence of REAL holds
   mlt((len b1) |-> 1,b1) = b1;

:: MATRPROB:th 33
theorem
for b1, b2 being FinSequence of REAL
   st (for b3 being Element of NAT
            st b3 in dom b1
         holds 0 <= b1 . b3) &
      (for b3 being Element of NAT
            st b3 in dom b2
         holds 0 <= b2 . b3)
for b3 being Element of NAT
      st b3 in dom mlt(b1,b2)
   holds 0 <= (mlt(b1,b2)) . b3;

:: MATRPROB:th 34
theorem
for b1 being Element of NAT
for b2, b3 being Element of b1 -tuples_on REAL
for b4, b5 being Element of b1 -tuples_on the carrier of F_Real
      st b2 = b4 & b3 = b5
   holds mlt(b2,b3) = mlt(b4,b5);

:: MATRPROB:th 35
theorem
for b1, b2 being FinSequence of REAL
for b3, b4 being FinSequence of the carrier of F_Real
      st len b1 = len b2 & b1 = b3 & b2 = b4
   holds mlt(b1,b2) = mlt(b3,b4);

:: MATRPROB:th 36
theorem
for b1 being FinSequence of REAL
for b2 being FinSequence of the carrier of F_Real
      st b1 = b2
   holds Sum b1 = Sum b2;

:: MATRPROB:funcnot 7 => EUCLID_2:func 1
notation
  let a1, a2 be FinSequence of REAL;
  synonym a1 "*" a2 for |(a1,a2)|;
end;

:: MATRPROB:th 37
theorem
for b1 being Element of NAT
for b2, b3 being Element of b1 -tuples_on REAL
for b4, b5 being Element of b1 -tuples_on the carrier of F_Real
      st b2 = b4 & b3 = b5
   holds |(b2,b3)| = b4 "*" b5;

:: MATRPROB:th 38
theorem
for b1, b2 being FinSequence of REAL
for b3, b4 being FinSequence of the carrier of F_Real
      st len b1 = len b2 & b1 = b3 & b2 = b4
   holds |(b1,b2)| = b3 "*" b4;

:: MATRPROB:th 39
theorem
for b1, b2, b3 being tabular FinSequence of REAL *
      st width b2 = len b3
   holds    b1 = b2 * b3
   iff
      len b1 = len b2 &
       width b1 = width b3 &
       (for b4, b5 being Element of NAT
             st [b4,b5] in Indices b1
          holds b1 *(b4,b5) = |(Line(b2,b4),Col(b3,b5))|);

:: MATRPROB:th 40
theorem
for b1 being tabular FinSequence of REAL *
for b2 being FinSequence of REAL
   st len b1 = len b2
for b3 being Element of NAT
      st b3 in Seg len (b2 * b1)
   holds (b2 * b1) . b3 = |(b2,Col(b1,b3))|;

:: MATRPROB:th 41
theorem
for b1 being tabular FinSequence of REAL *
for b2 being FinSequence of REAL
   st width b1 = len b2 & 0 < width b1
for b3 being Element of NAT
      st b3 in Seg len (b1 * b2)
   holds (b1 * b2) . b3 = |(Line(b1,b3),b2)|;

:: MATRPROB:th 42
theorem
for b1, b2, b3 being tabular FinSequence of REAL *
      st width b2 = len b3 & 0 < width b2 & 0 < width b3
   holds    b1 = b2 * b3
   iff
      len b1 = len b2 &
       width b1 = width b3 &
       (for b4 being Element of NAT
             st b4 in Seg len b1
          holds Line(b1,b4) = (Line(b2,b4)) * b3);

:: MATRPROB:funcreg 1
registration
  let a1, a2, a3 be non empty natural set;
  let a4 be Matrix of a1,a3,REAL;
  let a5 be Matrix of a3,a2,REAL;
  cluster a4 * a5 -> ;
end;

:: MATRPROB:funcnot 8 => MATRPROB:func 6
definition
  let a1, a2 be FinSequence of REAL;
  let a3 be tabular FinSequence of REAL *;
  assume len a1 = len a3 & len a2 = width a3;
  func QuadraticForm(A1,A3,A2) -> tabular FinSequence of REAL * means
    len it = len a1 &
     width it = len a2 &
     (for b1, b2 being natural set
           st [b1,b2] in Indices a3
        holds it *(b1,b2) = ((a1 . b1) * (a3 *(b1,b2))) * (a2 . b2));
end;

:: MATRPROB:def 4
theorem
for b1, b2 being FinSequence of REAL
for b3 being tabular FinSequence of REAL *
   st len b1 = len b3 & len b2 = width b3
for b4 being tabular FinSequence of REAL * holds
      b4 = QuadraticForm(b1,b3,b2)
   iff
      len b4 = len b1 &
       width b4 = len b2 &
       (for b5, b6 being natural set
             st [b5,b6] in Indices b3
          holds b4 *(b5,b6) = ((b1 . b5) * (b3 *(b5,b6))) * (b2 . b6));

:: MATRPROB:th 43
theorem
for b1, b2 being FinSequence of REAL
for b3 being tabular FinSequence of REAL *
      st len b1 = len b3 & len b2 = width b3 & 0 < len b1 & 0 < len b2
   holds (QuadraticForm(b1,b3,b2)) @ = QuadraticForm(b2,b3 @,b1);

:: MATRPROB:th 44
theorem
for b1, b2 being FinSequence of REAL
for b3 being tabular FinSequence of REAL *
      st len b1 = len b3 & len b2 = width b3 & 0 < len b1 & 0 < len b2
   holds |(b1,b3 * b2)| = SumAll QuadraticForm(b1,b3,b2);

:: MATRPROB:th 45
theorem
for b1 being FinSequence of REAL holds
   |(b1,(len b1) |-> 1)| = Sum b1;

:: MATRPROB:th 46
theorem
for b1, b2 being FinSequence of REAL
for b3 being tabular FinSequence of REAL *
      st len b1 = len b3 & len b2 = width b3 & 0 < len b1 & 0 < len b2
   holds |(b1 * b3,b2)| = SumAll QuadraticForm(b1,b3,b2);

:: MATRPROB:th 47
theorem
for b1, b2 being FinSequence of REAL
for b3 being tabular FinSequence of REAL *
      st len b1 = len b3 & len b2 = width b3 & 0 < len b1 & 0 < len b2
   holds |(b1 * b3,b2)| = |(b1,b3 * b2)|;

:: MATRPROB:th 48
theorem
for b1, b2 being FinSequence of REAL
for b3 being tabular FinSequence of REAL *
      st len b2 = len b3 & len b1 = width b3 & 0 < len b1 & 0 < len b2
   holds |(b3 * b1,b2)| = |(b1,b3 @ * b2)|;

:: MATRPROB:th 49
theorem
for b1, b2 being FinSequence of REAL
for b3 being tabular FinSequence of REAL *
      st len b2 = len b3 & len b1 = width b3 & 0 < len b1 & 0 < len b2
   holds |(b1,b2 * b3)| = |(b1 * (b3 @),b2)|;

:: MATRPROB:th 50
theorem
for b1 being FinSequence of REAL
for b2 being tabular FinSequence of REAL *
   st len b1 = len b2 & b1 = (len b1) |-> 1
for b3 being Element of NAT
      st b3 in Seg len (b1 * b2)
   holds (b1 * b2) . b3 = Sum Col(b2,b3);

:: MATRPROB:th 51
theorem
for b1 being FinSequence of REAL
for b2 being tabular FinSequence of REAL *
   st len b1 = width b2 & 0 < width b2 & b1 = (len b1) |-> 1
for b3 being Element of NAT
      st b3 in Seg len (b2 * b1)
   holds (b2 * b1) . b3 = Sum Line(b2,b3);

:: MATRPROB:th 52
theorem
for b1 being non empty natural set holds
   ex b2 being FinSequence of REAL st
      len b2 = b1 &
       (for b3 being Element of NAT
             st b3 in dom b2
          holds 0 <= b2 . b3) &
       Sum b2 = 1;

:: MATRPROB:attrnot 1 => MATRPROB:attr 1
definition
  let a1 be FinSequence of REAL;
  attr a1 is ProbFinS means
    (for b1 being Element of NAT
           st b1 in dom a1
        holds 0 <= a1 . b1) &
     Sum a1 = 1;
end;

:: MATRPROB:dfs 5
definiens
  let a1 be FinSequence of REAL;
To prove
     a1 is ProbFinS
it is sufficient to prove
  thus (for b1 being Element of NAT
           st b1 in dom a1
        holds 0 <= a1 . b1) &
     Sum a1 = 1;

:: MATRPROB:def 5
theorem
for b1 being FinSequence of REAL holds
      b1 is ProbFinS
   iff
      (for b2 being Element of NAT
             st b2 in dom b1
          holds 0 <= b1 . b2) &
       Sum b1 = 1;

:: MATRPROB:exreg 1
registration
  cluster Relation-like Function-like non empty finite FinSequence-like complex-valued ext-real-valued real-valued ProbFinS FinSequence of REAL;
end;

:: MATRPROB:th 53
theorem
for b1 being non empty ProbFinS FinSequence of REAL
for b2 being Element of NAT
      st b2 in dom b1
   holds b1 . b2 <= 1;

:: MATRPROB:th 54
theorem
for b1 being non empty set
for b2 being non empty-yielding tabular FinSequence of b1 * holds
   1 <= len b2 & 1 <= width b2;

:: MATRPROB:attrnot 2 => MATRPROB:attr 2
definition
  let a1 be tabular FinSequence of REAL *;
  attr a1 is m-nonnegative means
    for b1, b2 being Element of NAT
          st [b1,b2] in Indices a1
       holds 0 <= a1 *(b1,b2);
end;

:: MATRPROB:dfs 6
definiens
  let a1 be tabular FinSequence of REAL *;
To prove
     a1 is m-nonnegative
it is sufficient to prove
  thus for b1, b2 being Element of NAT
          st [b1,b2] in Indices a1
       holds 0 <= a1 *(b1,b2);

:: MATRPROB:def 6
theorem
for b1 being tabular FinSequence of REAL * holds
      b1 is m-nonnegative
   iff
      for b2, b3 being Element of NAT
            st [b2,b3] in Indices b1
         holds 0 <= b1 *(b2,b3);

:: MATRPROB:attrnot 3 => MATRPROB:attr 3
definition
  let a1 be tabular FinSequence of REAL *;
  attr a1 is with_sum=1 means
    SumAll a1 = 1;
end;

:: MATRPROB:dfs 7
definiens
  let a1 be tabular FinSequence of REAL *;
To prove
     a1 is with_sum=1
it is sufficient to prove
  thus SumAll a1 = 1;

:: MATRPROB:def 7
theorem
for b1 being tabular FinSequence of REAL * holds
      b1 is with_sum=1
   iff
      SumAll b1 = 1;

:: MATRPROB:attrnot 4 => MATRPROB:attr 4
definition
  let a1 be tabular FinSequence of REAL *;
  attr a1 is Joint_Probability means
    a1 is m-nonnegative & a1 is with_sum=1;
end;

:: MATRPROB:dfs 8
definiens
  let a1 be tabular FinSequence of REAL *;
To prove
     a1 is Joint_Probability
it is sufficient to prove
  thus a1 is m-nonnegative & a1 is with_sum=1;

:: MATRPROB:def 8
theorem
for b1 being tabular FinSequence of REAL * holds
      b1 is Joint_Probability
   iff
      b1 is m-nonnegative & b1 is with_sum=1;

:: MATRPROB:condreg 1
registration
  cluster tabular Joint_Probability -> m-nonnegative with_sum=1 (FinSequence of REAL *);
end;

:: MATRPROB:condreg 2
registration
  cluster tabular m-nonnegative with_sum=1 -> Joint_Probability (FinSequence of REAL *);
end;

:: MATRPROB:th 55
theorem
for b1, b2 being non empty natural set holds
ex b3 being Matrix of b1,b2,REAL st
   b3 is m-nonnegative & SumAll b3 = 1;

:: MATRPROB:exreg 2
registration
  cluster Relation-like non empty-yielding Function-like finite FinSequence-like tabular FinSequence-yielding Joint_Probability FinSequence of REAL *;
end;

:: MATRPROB:funcreg 2
registration
  let a1, a2 be non empty natural set;
  let a3 be non empty set;
  let a4 be Matrix of a1,a2,a3;
  cluster a4 @ -> ;
end;

:: MATRPROB:th 56
theorem
for b1 being non empty-yielding tabular Joint_Probability FinSequence of REAL * holds
   b1 @ is non empty-yielding tabular Joint_Probability FinSequence of REAL *;

:: MATRPROB:th 57
theorem
for b1 being non empty-yielding tabular Joint_Probability FinSequence of REAL *
for b2, b3 being Element of NAT
      st [b2,b3] in Indices b1
   holds b1 *(b2,b3) <= 1;

:: MATRPROB:attrnot 5 => MATRPROB:attr 5
definition
  let a1 be tabular FinSequence of REAL *;
  attr a1 is with_line_sum=1 means
    for b1 being Element of NAT
          st b1 in dom a1
       holds Sum (a1 . b1) = 1;
end;

:: MATRPROB:dfs 9
definiens
  let a1 be tabular FinSequence of REAL *;
To prove
     a1 is with_line_sum=1
it is sufficient to prove
  thus for b1 being Element of NAT
          st b1 in dom a1
       holds Sum (a1 . b1) = 1;

:: MATRPROB:def 9
theorem
for b1 being tabular FinSequence of REAL * holds
      b1 is with_line_sum=1
   iff
      for b2 being Element of NAT
            st b2 in dom b1
         holds Sum (b1 . b2) = 1;

:: MATRPROB:th 58
theorem
for b1, b2 being non empty natural set holds
ex b3 being Matrix of b1,b2,REAL st
   b3 is m-nonnegative & b3 is with_line_sum=1;

:: MATRPROB:attrnot 6 => MATRPROB:attr 6
definition
  let a1 be tabular FinSequence of REAL *;
  attr a1 is Conditional_Probability means
    a1 is m-nonnegative & a1 is with_line_sum=1;
end;

:: MATRPROB:dfs 10
definiens
  let a1 be tabular FinSequence of REAL *;
To prove
     a1 is Conditional_Probability
it is sufficient to prove
  thus a1 is m-nonnegative & a1 is with_line_sum=1;

:: MATRPROB:def 10
theorem
for b1 being tabular FinSequence of REAL * holds
      b1 is Conditional_Probability
   iff
      b1 is m-nonnegative & b1 is with_line_sum=1;

:: MATRPROB:condreg 3
registration
  cluster tabular Conditional_Probability -> m-nonnegative with_line_sum=1 (FinSequence of REAL *);
end;

:: MATRPROB:condreg 4
registration
  cluster tabular m-nonnegative with_line_sum=1 -> Conditional_Probability (FinSequence of REAL *);
end;

:: MATRPROB:exreg 3
registration
  cluster Relation-like non empty-yielding Function-like finite FinSequence-like tabular FinSequence-yielding Conditional_Probability FinSequence of REAL *;
end;

:: MATRPROB:th 59
theorem
for b1 being non empty-yielding tabular Conditional_Probability FinSequence of REAL *
for b2, b3 being Element of NAT
      st [b2,b3] in Indices b1
   holds b1 *(b2,b3) <= 1;

:: MATRPROB:th 60
theorem
for b1 being non empty-yielding tabular FinSequence of REAL * holds
      b1 is non empty-yielding tabular Conditional_Probability FinSequence of REAL *
   iff
      for b2 being Element of NAT
            st b2 in dom b1
         holds Line(b1,b2) is non empty ProbFinS FinSequence of REAL;

:: MATRPROB:th 61
theorem
for b1 being non empty-yielding tabular with_line_sum=1 FinSequence of REAL * holds
   SumAll b1 = len b1;

:: MATRPROB:funcnot 9 => MATRPROB:func 3
notation
  let a1 be tabular FinSequence of REAL *;
  synonym Row_Marginal a1 for Sum a1;
end;

:: MATRPROB:funcnot 10 => MATRPROB:func 4
notation
  let a1 be tabular FinSequence of REAL *;
  synonym Column_Marginal a1 for ColSum a1;
end;

:: MATRPROB:funcreg 3
registration
  let a1 be non empty-yielding tabular Joint_Probability FinSequence of REAL *;
  cluster Sum a1 -> non empty ProbFinS;
end;

:: MATRPROB:funcreg 4
registration
  let a1 be non empty-yielding tabular Joint_Probability FinSequence of REAL *;
  cluster ColSum a1 -> non empty ProbFinS;
end;

:: MATRPROB:funcreg 5
registration
  let a1 be non empty-yielding tabular FinSequence of REAL *;
  cluster a1 @ -> non empty-yielding tabular;
end;

:: MATRPROB:funcreg 6
registration
  let a1 be non empty-yielding tabular Joint_Probability FinSequence of REAL *;
  cluster a1 @ -> tabular Joint_Probability;
end;

:: MATRPROB:th 62
theorem
for b1 being non empty ProbFinS FinSequence of REAL
for b2 being non empty-yielding tabular Conditional_Probability FinSequence of REAL *
      st len b1 = len b2
   holds b1 * b2 is non empty ProbFinS FinSequence of REAL &
    len (b1 * b2) = width b2;

:: MATRPROB:th 63
theorem
for b1, b2 being non empty-yielding tabular Conditional_Probability FinSequence of REAL *
      st width b1 = len b2
   holds b1 * b2 is non empty-yielding tabular Conditional_Probability FinSequence of REAL * &
    len (b1 * b2) = len b1 &
    width (b1 * b2) = width b2;