Article CATALAN2, MML version 4.99.1005

:: CATALAN2:th 1
theorem
for b1, b2 being Relation-like Function-like T-Sequence-like finite set holds
(b1 ^ b2) | dom b1 = b1;

:: CATALAN2:th 2
theorem
for b1 being Element of NAT
for b2, b3 being Relation-like Function-like T-Sequence-like finite set
      st b1 <= dom b2
   holds (b2 ^ b3) | b1 = b2 | b1;

:: CATALAN2:th 3
theorem
for b1, b2 being Element of NAT
for b3, b4 being Relation-like Function-like T-Sequence-like finite set
      st b1 = (dom b3) + b2
   holds (b3 ^ b4) | b1 = b3 ^ (b4 | b2);

:: CATALAN2:th 4
theorem
for b1 being Element of NAT
for b2 being Relation-like Function-like T-Sequence-like finite set holds
   ex b3 being Relation-like Function-like T-Sequence-like finite set st
      b2 = (b2 | b1) ^ b3;

:: CATALAN2:th 5
theorem
for b1 being set
for b2 being Element of NAT
for b3 being finite T-Sequence of b1 holds
   ex b4 being finite T-Sequence of b1 st
      b3 = (b3 | b2) ^ b4;

:: CATALAN2:attrnot 1 => CATALAN2:attr 1
definition
  let a1 be finite T-Sequence of NAT;
  attr a1 is dominated_by_0 means
    proj2 a1 c= {0,1} &
     (for b1 being Element of NAT
           st b1 <= dom a1
        holds 2 * Sum (a1 | b1) <= b1);
end;

:: CATALAN2:dfs 1
definiens
  let a1 be finite T-Sequence of NAT;
To prove
     a1 is dominated_by_0
it is sufficient to prove
  thus proj2 a1 c= {0,1} &
     (for b1 being Element of NAT
           st b1 <= dom a1
        holds 2 * Sum (a1 | b1) <= b1);

:: CATALAN2:def 1
theorem
for b1 being finite T-Sequence of NAT holds
      b1 is dominated_by_0
   iff
      proj2 b1 c= {0,1} &
       (for b2 being Element of NAT
             st b2 <= dom b1
          holds 2 * Sum (b1 | b2) <= b2);

:: CATALAN2:th 6
theorem
for b1 being Element of NAT
for b2 being finite T-Sequence of NAT
      st b2 is dominated_by_0
   holds 2 * Sum (b2 | b1) <= b1;

:: CATALAN2:th 7
theorem
for b1 being finite T-Sequence of NAT
      st b1 is dominated_by_0
   holds b1 . 0 = 0;

:: CATALAN2:funcnot 1 => CATALAN2:func 1
definition
  let a1, a2 be Element of NAT;
  redefine func a1 --> a2 -> finite T-Sequence of NAT;
end;

:: CATALAN2:exreg 1
registration
  cluster Relation-like Function-like T-Sequence-like empty complex-valued ext-real-valued real-valued rational-valued integer-valued natural-valued finite dominated_by_0 T-Sequence of NAT;
end;

:: CATALAN2:exreg 2
registration
  cluster Relation-like Function-like T-Sequence-like non empty complex-valued ext-real-valued real-valued rational-valued integer-valued natural-valued finite dominated_by_0 T-Sequence of NAT;
end;

:: CATALAN2:th 8
theorem
for b1 being Element of NAT holds
   b1 --> 0 is dominated_by_0;

:: CATALAN2:th 9
theorem
for b1, b2 being Element of NAT
      st b2 <= b1
   holds (b1 --> 0) ^ (b2 --> 1) is dominated_by_0;

:: CATALAN2:th 10
theorem
for b1 being Element of NAT
for b2 being finite T-Sequence of NAT
      st b2 is dominated_by_0
   holds b2 | b1 is dominated_by_0;

:: CATALAN2:th 11
theorem
for b1, b2 being finite T-Sequence of NAT
      st b1 is dominated_by_0 & b2 is dominated_by_0
   holds b1 ^ b2 is dominated_by_0;

:: CATALAN2:th 12
theorem
for b1 being Element of NAT
for b2 being finite T-Sequence of NAT
      st b2 is dominated_by_0
   holds 2 * Sum (b2 | ((2 * b1) + 1)) < (2 * b1) + 1;

:: CATALAN2:th 13
theorem
for b1 being Element of NAT
for b2 being finite T-Sequence of NAT
      st b2 is dominated_by_0 &
         b1 <= (len b2) - (2 * Sum b2)
   holds b2 ^ (b1 --> 1) is dominated_by_0;

:: CATALAN2:th 14
theorem
for b1, b2 being Element of NAT
for b3 being finite T-Sequence of NAT
      st b3 is dominated_by_0 &
         b1 <= (b2 + len b3) - (2 * Sum b3)
   holds ((b2 --> 0) ^ b3) ^ (b1 --> 1) is dominated_by_0;

:: CATALAN2:th 15
theorem
for b1 being Element of NAT
for b2 being finite T-Sequence of NAT
      st b2 is dominated_by_0 & 2 * Sum (b2 | b1) = b1
   holds b1 <= len b2 & len (b2 | b1) = b1;

:: CATALAN2:th 16
theorem
for b1 being Element of NAT
for b2, b3 being finite T-Sequence of NAT
      st b2 is dominated_by_0 & 2 * Sum (b2 | b1) = b1 & b2 = (b2 | b1) ^ b3
   holds b3 is dominated_by_0;

:: CATALAN2:th 17
theorem
for b1, b2 being Element of NAT
for b3 being finite T-Sequence of NAT
      st b3 is dominated_by_0 & 2 * Sum (b3 | b1) = b1 & b1 = b2 + 1
   holds b3 | b1 = (b3 | b2) ^ (1 --> 1);

:: CATALAN2:th 18
theorem
for b1 being Element of NAT
for b2 being finite T-Sequence of NAT
      st b1 = min* {b3 where b3 is Element of NAT: 2 * Sum (b2 | b3) = b3 & 0 < b3} &
         0 < b1 &
         b2 is dominated_by_0
   holds ex b3 being finite T-Sequence of NAT st
      b2 | b1 = ((1 --> 0) ^ b3) ^ (1 --> 1) &
       b3 is dominated_by_0;

:: CATALAN2:th 19
theorem
for b1 being finite T-Sequence of NAT
      st proj2 b1 c= {0,1} & b1 is not dominated_by_0
   holds ex b2 being Element of NAT st
      (2 * b2) + 1 = min* {b3 where b3 is Element of NAT: b3 < 2 * Sum (b1 | b3)} &
       (2 * b2) + 1 <= dom b1 &
       b2 = Sum (b1 | (2 * b2)) &
       b1 . (2 * b2) = 1;

:: CATALAN2:th 20
theorem
for b1, b2 being finite T-Sequence of NAT
for b3 being Element of NAT
      st b1 | ((2 * b3) + len b2) = ((b3 --> 0) ^ b2) ^ (b3 --> 1) &
         b2 is dominated_by_0 &
         2 * Sum b2 = len b2 &
         0 < b3
   holds min* {b4 where b4 is Element of NAT: 2 * Sum (b1 | b4) = b4 & 0 < b4} = (2 * b3) + len b2;

:: CATALAN2:th 21
theorem
for b1 being finite T-Sequence of NAT
      st b1 is dominated_by_0 &
         {b2 where b2 is Element of NAT: 2 * Sum (b1 | b2) = b2 & 0 < b2} = {} &
         0 < len b1
   holds ex b2 being finite T-Sequence of NAT st
      b1 = <%0%> ^ b2 & b2 is dominated_by_0;

:: CATALAN2:th 22
theorem
for b1 being finite T-Sequence of NAT
      st b1 is dominated_by_0
   holds <%0%> ^ b1 is dominated_by_0 &
    {b2 where b2 is Element of NAT: 2 * Sum ((<%0%> ^ b1) | b2) = b2 &
     0 < b2} = {};

:: CATALAN2:th 23
theorem
for b1 being Element of NAT
for b2 being finite T-Sequence of NAT
      st proj2 b2 c= {0,1} &
         b2 is not dominated_by_0 &
         (2 * b1) + 1 = min* {b3 where b3 is Element of NAT: b3 < 2 * Sum (b2 | b3)}
   holds b2 | (2 * b1) is dominated_by_0;

:: CATALAN2:funcnot 2 => CATALAN2:func 2
definition
  let a1, a2 be natural set;
  func Domin_0(A1,A2) -> Element of bool ({0,1} ^omega) means
    for b1 being set holds
          b1 in it
       iff
          ex b2 being finite T-Sequence of NAT st
             b2 = b1 & b2 is dominated_by_0 & dom b2 = a1 & Sum b2 = a2;
end;

:: CATALAN2:def 2
theorem
for b1, b2 being natural set
for b3 being Element of bool ({0,1} ^omega) holds
      b3 = Domin_0(b1,b2)
   iff
      for b4 being set holds
            b4 in b3
         iff
            ex b5 being finite T-Sequence of NAT st
               b5 = b4 & b5 is dominated_by_0 & dom b5 = b1 & Sum b5 = b2;

:: CATALAN2:th 24
theorem
for b1, b2 being Element of NAT
for b3 being finite T-Sequence of NAT holds
      b3 in Domin_0(b1,b2)
   iff
      b3 is dominated_by_0 & dom b3 = b1 & Sum b3 = b2;

:: CATALAN2:th 25
theorem
for b1, b2 being Element of NAT holds
Domin_0(b1,b2) c= Choose(b1,b2,1,0);

:: CATALAN2:funcreg 1
registration
  let a1, a2 be Element of NAT;
  cluster Domin_0(a1,a2) -> finite;
end;

:: CATALAN2:th 26
theorem
for b1, b2 being Element of NAT holds
   Domin_0(b1,b2) is empty
iff
   b1 < 2 * b2;

:: CATALAN2:th 27
theorem
for b1 being Element of NAT holds
   Domin_0(b1,0) = {b1 --> 0};

:: CATALAN2:th 28
theorem
for b1 being Element of NAT holds
   card Domin_0(b1,0) = 1;

:: CATALAN2:th 29
theorem
for b1 being finite T-Sequence of NAT
for b2 being Element of NAT
      st proj2 b1 c= {0,b2}
   holds ex b3 being finite T-Sequence of NAT st
      len b1 = len b3 &
       proj2 b3 c= {0,b2} &
       (for b4 being Element of NAT
             st b4 <= len b1
          holds (Sum (b1 | b4)) + Sum (b3 | b4) = b2 * b4) &
       (for b4 being Element of NAT
             st b4 in len b1
          holds b3 . b4 = b2 - (b1 . b4));

:: CATALAN2:th 30
theorem
for b1, b2 being Element of NAT
      st b1 <= b2
   holds 0 < b2 choose b1;

:: CATALAN2:th 31
theorem
for b1, b2 being Element of NAT
      st 2 * (b1 + 1) <= b2
   holds card ((Choose(b2,b1 + 1,1,0)) \ Domin_0(b2,b1 + 1)) = card Choose(b2,b1,1,0);

:: CATALAN2:th 32
theorem
for b1, b2 being Element of NAT
      st 2 * (b1 + 1) <= b2
   holds card Domin_0(b2,b1 + 1) = (b2 choose (b1 + 1)) - (b2 choose b1);

:: CATALAN2:th 33
theorem
for b1, b2 being Element of NAT
      st 2 * b1 <= b2
   holds card Domin_0(b2,b1) = (((b2 + 1) - (2 * b1)) / ((b2 + 1) - b1)) * (b2 choose b1);

:: CATALAN2:th 34
theorem
for b1 being Element of NAT holds
   card Domin_0(2 + b1,1) = b1 + 1;

:: CATALAN2:th 35
theorem
for b1 being Element of NAT holds
   card Domin_0(4 + b1,2) = ((b1 + 1) * (b1 + 4)) / 2;

:: CATALAN2:th 36
theorem
for b1 being Element of NAT holds
   card Domin_0(6 + b1,3) = (((b1 + 1) * (b1 + 5)) * (b1 + 6)) / 6;

:: CATALAN2:th 37
theorem
for b1 being Element of NAT holds
   card Domin_0(2 * b1,b1) = ((2 * b1) choose b1) / (b1 + 1);

:: CATALAN2:th 38
theorem
for b1 being Element of NAT holds
   card Domin_0(2 * b1,b1) = Catalan (b1 + 1);

:: CATALAN2:modenot 1 => CATALAN2:mode 1
definition
  let a1 be set;
  mode OMEGA of A1 -> non empty functional set means
    for b1 being set
          st b1 in it
       holds b1 is finite T-Sequence of a1;
end;

:: CATALAN2:dfs 3
definiens
  let a1 be set;
  let a2 be non empty functional set;
To prove
     a2 is OMEGA of a1
it is sufficient to prove
  thus for b1 being set
          st b1 in a2
       holds b1 is finite T-Sequence of a1;

:: CATALAN2:def 3
theorem
for b1 being set
for b2 being non empty functional set holds
      b2 is OMEGA of b1
   iff
      for b3 being set
            st b3 in b2
         holds b3 is finite T-Sequence of b1;

:: CATALAN2:funcnot 3 => CATALAN2:func 3
definition
  let a1 be set;
  redefine func a1 ^omega -> OMEGA of a1;
end;

:: CATALAN2:modenot 2 => CATALAN2:mode 2
definition
  let a1 be set;
  let a2 be OMEGA of a1;
  redefine mode Element of a2 -> finite T-Sequence of a1;
end;

:: CATALAN2:th 39
theorem
for b1 being Element of NAT holds
   Card {b2 where b2 is Element of NAT ^omega: dom b2 = 2 * b1 & b2 is dominated_by_0} = (2 * b1) choose b1;

:: CATALAN2:th 40
theorem
for b1, b2, b3, b4, b5 being Element of NAT
      st b4 = b1 - (2 * (b3 + 1)) & b5 = b2 - (b3 + 1)
   holds Card {b6 where b6 is Element of NAT ^omega: b6 in Domin_0(b1,b2) &
    2 * (b3 + 1) = min* {b7 where b7 is Element of NAT: 2 * Sum (b6 | b7) = b7 & 0 < b7}} = (card Domin_0(2 * b3,b3)) * card Domin_0(b4,b5);

:: CATALAN2:th 41
theorem
for b1, b2 being Element of NAT
      st 2 * b2 <= b1
   holds ex b3 being finite T-Sequence of NAT st
      Card {b4 where b4 is Element of NAT ^omega: b4 in Domin_0(b1,b2) &
        {b5 where b5 is Element of NAT: 2 * Sum (b4 | b5) = b5 & 0 < b5} <> {}} = Sum b3 &
       dom b3 = b2 &
       (for b4 being Element of NAT
             st b4 < b2
          holds b3 . b4 = (card Domin_0(2 * b4,b4)) * card Domin_0(b1 -' (2 * (b4 + 1)),b2 -' (b4 + 1)));

:: CATALAN2:th 42
theorem
for b1 being Element of NAT
      st 0 < b1
   holds Domin_0(2 * b1,b1) = {b2 where b2 is Element of NAT ^omega: b2 in Domin_0(2 * b1,b1) &
    {b3 where b3 is Element of NAT: 2 * Sum (b2 | b3) = b3 & 0 < b3} <> {}};

:: CATALAN2:th 43
theorem
for b1 being Element of NAT
      st 0 < b1
   holds ex b2 being finite T-Sequence of NAT st
      Sum b2 = Catalan (b1 + 1) &
       dom b2 = b1 &
       (for b3 being Element of NAT
             st b3 < b1
          holds b2 . b3 = (Catalan (b3 + 1)) * Catalan (b1 -' b3));

:: CATALAN2:th 44
theorem
for b1, b2 being Element of NAT holds
Card {b3 where b3 is Element of NAT ^omega: b3 in Domin_0(b1 + 1,b2) &
 {b4 where b4 is Element of NAT: 2 * Sum (b3 | b4) = b4 & 0 < b4} = {}} = card Domin_0(b1,b2);

:: CATALAN2:th 45
theorem
for b1, b2 being Element of NAT
      st 2 * b2 <= b1
   holds ex b3 being finite T-Sequence of NAT st
      card Domin_0(b1,b2) = (Sum b3) + card Domin_0(b1 -' 1,b2) &
       dom b3 = b2 &
       (for b4 being Element of NAT
             st b4 < b2
          holds b3 . b4 = (card Domin_0(2 * b4,b4)) * card Domin_0(b1 -' (2 * (b4 + 1)),b2 -' (b4 + 1)));

:: CATALAN2:th 46
theorem
for b1, b2 being Element of NAT holds
ex b3 being finite T-Sequence of NAT st
   Sum b3 = card Domin_0(((2 * b1) + 2) + b2,b1 + 1) &
    dom b3 = b2 + 1 &
    (for b4 being Element of NAT
          st b4 <= b2
       holds b3 . b4 = card Domin_0(((2 * b1) + 1) + b4,b1));

:: CATALAN2:funcnot 4 => CATALAN2:func 4
definition
  let a1 be finite T-Sequence of REAL;
  func Sum A1 -> Element of REAL equals
    addreal "**" a1;
end;

:: CATALAN2:def 4
theorem
for b1 being finite T-Sequence of REAL holds
   Sum b1 = addreal "**" b1;

:: CATALAN2:funcnot 5 => CATALAN2:func 5
definition
  let a1, a2 be Function-like quasi_total Relation of NAT,REAL;
  func A1 (##) A2 -> Function-like quasi_total Relation of NAT,REAL means
    for b1 being natural set holds
       ex b2 being finite T-Sequence of REAL st
          dom b2 = b1 + 1 &
           (for b3 being Element of NAT
                 st b3 in b1 + 1
              holds b2 . b3 = (a1 . b3) * (a2 . (b1 -' b3))) &
           Sum b2 = it . b1;
  commutativity;
::  for a1, a2 being Function-like quasi_total Relation of NAT,REAL holds
::  a1 (##) a2 = a2 (##) a1;
end;

:: CATALAN2:def 5
theorem
for b1, b2, b3 being Function-like quasi_total Relation of NAT,REAL holds
   b3 = b1 (##) b2
iff
   for b4 being natural set holds
      ex b5 being finite T-Sequence of REAL st
         dom b5 = b4 + 1 &
          (for b6 being Element of NAT
                st b6 in b4 + 1
             holds b5 . b6 = (b1 . b6) * (b2 . (b4 -' b6))) &
          Sum b5 = b3 . b4;

:: CATALAN2:th 47
theorem
for b1 being finite T-Sequence of REAL
for b2 being Element of NAT
      st b2 in dom b1
   holds (Sum (b1 | b2)) + (b1 . b2) = Sum (b1 | (b2 + 1));

:: CATALAN2:th 48
theorem
for b1, b2 being finite T-Sequence of REAL
      st dom b1 = dom b2 &
         (for b3 being Element of NAT
               st b3 in len b1
            holds b1 . b3 = b2 . ((len b1) -' (1 + b3)))
   holds Sum b1 = Sum b2;

:: CATALAN2:th 49
theorem
for b1 being real set
for b2, b3 being finite T-Sequence of REAL
      st dom b2 = dom b3 &
         (for b4 being Element of NAT
               st b4 in len b2
            holds b2 . b4 = b1 * (b3 . b4))
   holds Sum b2 = b1 * Sum b3;

:: CATALAN2:th 50
theorem
for b1, b2 being Function-like quasi_total Relation of NAT,REAL
for b3 being real set holds
   b1 (##) (b3 (#) b2) = b3 (#) (b1 (##) b2);

:: CATALAN2:th 51
theorem
for b1, b2, b3 being Function-like quasi_total Relation of NAT,REAL holds
b1 (##) (b2 + b3) = (b1 (##) b2) + (b1 (##) b3);

:: CATALAN2:th 52
theorem
for b1, b2 being Function-like quasi_total Relation of NAT,REAL holds
(b1 (##) b2) . 0 = (b1 . 0) * (b2 . 0);

:: CATALAN2:th 53
theorem
for b1, b2 being Function-like quasi_total Relation of NAT,REAL
for b3 being Element of NAT holds
   ex b4 being finite T-Sequence of REAL st
      (Partial_Sums (b1 (##) b2)) . b3 = Sum b4 &
       dom b4 = b3 + 1 &
       (for b5 being Element of NAT
             st b5 in b3 + 1
          holds b4 . b5 = (b1 . b5) * ((Partial_Sums b2) . (b3 -' b5)));

:: CATALAN2:th 54
theorem
for b1, b2 being Function-like quasi_total Relation of NAT,REAL
for b3 being Element of NAT
      st b2 is summable
   holds ex b4 being finite T-Sequence of REAL st
      (Partial_Sums (b1 (##) b2)) . b3 = ((Sum b2) * ((Partial_Sums b1) . b3)) - Sum b4 &
       dom b4 = b3 + 1 &
       (for b5 being Element of NAT
             st b5 in b3 + 1
          holds b4 . b5 = (b1 . b5) * Sum (b2 ^\ ((b3 -' b5) + 1)));

:: CATALAN2:th 55
theorem
for b1 being finite T-Sequence of REAL holds
   ex b2 being finite T-Sequence of REAL st
      dom b2 = dom b1 &
       abs Sum b1 <= Sum b2 &
       (for b3 being Element of NAT
             st b3 in dom b2
          holds b2 . b3 = abs (b1 . b3));

:: CATALAN2:th 56
theorem
for b1 being Function-like quasi_total Relation of NAT,REAL
      st b1 is summable
   holds ex b2 being real set st
      0 < b2 &
       (for b3 being Element of NAT holds
          abs Sum (b1 ^\ b3) < b2);

:: CATALAN2:th 57
theorem
for b1 being Function-like quasi_total Relation of NAT,REAL
for b2, b3 being Element of NAT
      st b2 <= b3 &
         (for b4 being Element of NAT holds
            0 <= b1 . b4)
   holds (Partial_Sums b1) . b2 <= (Partial_Sums b1) . b3;

:: CATALAN2:th 58
theorem
for b1, b2 being Function-like quasi_total Relation of NAT,REAL
      st b1 is absolutely_summable & b2 is summable
   holds b1 (##) b2 is summable &
    Sum (b1 (##) b2) = (Sum b1) * Sum b2;

:: CATALAN2:th 59
theorem
for b1 being finite T-Sequence of NAT
for b2 being finite T-Sequence of REAL
      st b1 = b2
   holds Sum b1 = Sum b2;

:: CATALAN2:th 60
theorem
for b1 being real set holds
   ex b2 being Function-like quasi_total Relation of NAT,REAL st
      (for b3 being Element of NAT holds
          b2 . b3 = (Catalan (b3 + 1)) * (b1 |^ b3)) &
       (1 / 4 <= abs b1 or b2 is absolutely_summable &
        Sum b2 = 1 + (b1 * ((Sum b2) |^ 2)) &
        Sum b2 = 2 / (1 + sqrt (1 - (4 * b1))) &
        (b1 = 0 or Sum b2 = (1 - sqrt (1 - (4 * b1))) / (2 * b1)));