Article REARRAN1, MML version 4.99.1005

:: REARRAN1:funcnot 1 => REARRAN1:func 1
definition
  let a1 be non empty set;
  let a2 be real-membered set;
  let a3 be Function-like Relation of a1,a2;
  let a4 be Element of REAL;
  redefine func a4 (#) a3 -> Element of PFuncs(a1,REAL);
end;

:: REARRAN1:attrnot 1 => REARRAN1:attr 1
definition
  let a1 be Relation-like Function-like FinSequence-like set;
  attr a1 is terms've_same_card_as_number means
    for b1 being natural set
       st 1 <= b1 & b1 <= len a1
    for b2 being finite set
          st b2 = a1 . b1
       holds card b2 = b1;
end;

:: REARRAN1:dfs 1
definiens
  let a1 be Relation-like Function-like FinSequence-like set;
To prove
     a1 is terms've_same_card_as_number
it is sufficient to prove
  thus for b1 being natural set
       st 1 <= b1 & b1 <= len a1
    for b2 being finite set
          st b2 = a1 . b1
       holds card b2 = b1;

:: REARRAN1:def 1
theorem
for b1 being Relation-like Function-like FinSequence-like set holds
      b1 is terms've_same_card_as_number
   iff
      for b2 being natural set
         st 1 <= b2 & b2 <= len b1
      for b3 being finite set
            st b3 = b1 . b2
         holds card b3 = b2;

:: REARRAN1:attrnot 2 => REARRAN1:attr 2
definition
  let a1 be Relation-like Function-like FinSequence-like set;
  attr a1 is ascending means
    for b1 being natural set
          st 1 <= b1 & b1 <= (len a1) - 1
       holds a1 . b1 c= a1 . (b1 + 1);
end;

:: REARRAN1:dfs 2
definiens
  let a1 be Relation-like Function-like FinSequence-like set;
To prove
     a1 is ascending
it is sufficient to prove
  thus for b1 being natural set
          st 1 <= b1 & b1 <= (len a1) - 1
       holds a1 . b1 c= a1 . (b1 + 1);

:: REARRAN1:def 2
theorem
for b1 being Relation-like Function-like FinSequence-like set holds
      b1 is ascending
   iff
      for b2 being natural set
            st 1 <= b2 & b2 <= (len b1) - 1
         holds b1 . b2 c= b1 . (b2 + 1);

:: REARRAN1:attrnot 3 => REARRAN1:attr 3
definition
  let a1 be set;
  let a2 be FinSequence of a1;
  attr a2 is lenght_equal_card_of_set means
    ex b1 being finite set st
       b1 = union a1 & len a2 = card b1;
end;

:: REARRAN1:dfs 3
definiens
  let a1 be set;
  let a2 be FinSequence of a1;
To prove
     a2 is lenght_equal_card_of_set
it is sufficient to prove
  thus ex b1 being finite set st
       b1 = union a1 & len a2 = card b1;

:: REARRAN1:def 3
theorem
for b1 being set
for b2 being FinSequence of b1 holds
      b2 is lenght_equal_card_of_set(b1)
   iff
      ex b3 being finite set st
         b3 = union b1 & len b2 = card b3;

:: REARRAN1:exreg 1
registration
  let a1 be non empty finite set;
  cluster Relation-like Function-like finite FinSequence-like terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool a1;
end;

:: REARRAN1:modenot 1
definition
  let a1 be non empty finite set;
  mode RearrangmentGen of a1 is terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool a1;
end;

:: REARRAN1:th 1
theorem
for b1 being non empty finite set
for b2 being FinSequence of bool b1 holds
      b2 is lenght_equal_card_of_set(bool b1)
   iff
      len b2 = card b1;

:: REARRAN1:th 2
theorem
for b1 being Relation-like Function-like FinSequence-like set holds
      b1 is ascending
   iff
      for b2, b3 being Element of NAT
            st b2 <= b3 & b2 in dom b1 & b3 in dom b1
         holds b1 . b2 c= b1 . b3;

:: REARRAN1:th 3
theorem
for b1 being non empty finite set
for b2 being terms've_same_card_as_number lenght_equal_card_of_set FinSequence of bool b1 holds
   b2 . len b2 = b1;

:: REARRAN1:th 4
theorem
for b1 being non empty finite set
for b2 being lenght_equal_card_of_set FinSequence of bool b1 holds
   len b2 <> 0;

:: REARRAN1:th 5
theorem
for b1 being non empty finite set
for b2 being terms've_same_card_as_number ascending FinSequence of bool b1
for b3, b4 being Element of NAT
      st b3 in dom b2 & b4 in dom b2 & b3 <> b4
   holds b2 . b3 <> b2 . b4;

:: REARRAN1:th 6
theorem
for b1 being non empty finite set
for b2 being terms've_same_card_as_number ascending FinSequence of bool b1
for b3 being Element of NAT
      st 1 <= b3 & b3 <= (len b2) - 1
   holds b2 . b3 <> b2 . (b3 + 1);

:: REARRAN1:th 7
theorem
for b1 being Element of NAT
for b2 being non empty finite set
for b3 being terms've_same_card_as_number FinSequence of bool b2
      st b1 in dom b3
   holds b3 . b1 <> {};

:: REARRAN1:th 8
theorem
for b1 being Element of NAT
for b2 being non empty finite set
for b3 being terms've_same_card_as_number FinSequence of bool b2
      st 1 <= b1 & b1 <= (len b3) - 1
   holds (b3 . (b1 + 1)) \ (b3 . b1) <> {};

:: REARRAN1:th 9
theorem
for b1 being non empty finite set
for b2 being terms've_same_card_as_number lenght_equal_card_of_set FinSequence of bool b1 holds
   ex b3 being Element of b1 st
      b2 . 1 = {b3};

:: REARRAN1:th 10
theorem
for b1 being Element of NAT
for b2 being non empty finite set
for b3 being terms've_same_card_as_number ascending FinSequence of bool b2
      st 1 <= b1 & b1 <= (len b3) - 1
   holds ex b4 being Element of b2 st
      (b3 . (b1 + 1)) \ (b3 . b1) = {b4} &
       b3 . (b1 + 1) = (b3 . b1) \/ {b4} &
       (b3 . (b1 + 1)) \ {b4} = b3 . b1;

:: REARRAN1:funcnot 2 => REARRAN1:func 2
definition
  let a1 be non empty finite set;
  let a2 be terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool a1;
  func Co_Gen A2 -> terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool a1 means
    for b1 being natural set
          st 1 <= b1 & b1 <= (len it) - 1
       holds it . b1 = a1 \ (a2 . ((len a2) - b1));
end;

:: REARRAN1:def 4
theorem
for b1 being non empty finite set
for b2, b3 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b1 holds
   b3 = Co_Gen b2
iff
   for b4 being natural set
         st 1 <= b4 & b4 <= (len b3) - 1
      holds b3 . b4 = b1 \ (b2 . ((len b2) - b4));

:: REARRAN1:th 11
theorem
for b1 being non empty finite set
for b2 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b1 holds
   Co_Gen Co_Gen b2 = b2;

:: REARRAN1:th 12
theorem
for b1, b2 being non empty finite set
for b3 being Function-like Relation of b1,REAL
for b4 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
      st b3 is total(b1, REAL) & card b2 = card b1
   holds len MIM FinS(b3,b1) = len CHI(b4,b2);

:: REARRAN1:funcnot 3 => REARRAN1:func 3
definition
  let a1, a2 be non empty finite set;
  let a3 be terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool a2;
  let a4 be Function-like Relation of a1,REAL;
  func Rland(A4,A3) -> Function-like Relation of a2,REAL equals
    Sum ((MIM FinS(a4,a1)) (#) CHI(a3,a2));
end;

:: REARRAN1:def 5
theorem
for b1, b2 being non empty finite set
for b3 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
for b4 being Function-like Relation of b1,REAL holds
   Rland(b4,b3) = Sum ((MIM FinS(b4,b1)) (#) CHI(b3,b2));

:: REARRAN1:funcnot 4 => REARRAN1:func 4
definition
  let a1, a2 be non empty finite set;
  let a3 be terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool a2;
  let a4 be Function-like Relation of a1,REAL;
  func Rlor(A4,A3) -> Function-like Relation of a2,REAL equals
    Sum ((MIM FinS(a4,a1)) (#) CHI(Co_Gen a3,a2));
end;

:: REARRAN1:def 6
theorem
for b1, b2 being non empty finite set
for b3 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
for b4 being Function-like Relation of b1,REAL holds
   Rlor(b4,b3) = Sum ((MIM FinS(b4,b1)) (#) CHI(Co_Gen b3,b2));

:: REARRAN1:th 13
theorem
for b1, b2 being non empty finite set
for b3 being Function-like Relation of b1,REAL
for b4 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
      st b3 is total(b1, REAL) & card b2 = card b1
   holds dom Rland(b3,b4) = b2;

:: REARRAN1:th 14
theorem
for b1, b2 being non empty finite set
for b3 being Element of b1
for b4 being Function-like Relation of b2,REAL
for b5 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b1
      st b4 is total(b2, REAL) & card b1 = card b2
   holds (b3 in b5 . 1 implies ((MIM FinS(b4,b2)) (#) CHI(b5,b1)) # b3 = MIM FinS(b4,b2)) &
    (for b6 being Element of NAT
          st 1 <= b6 &
             b6 < len b5 &
             b3 in (b5 . (b6 + 1)) \ (b5 . b6)
       holds ((MIM FinS(b4,b2)) (#) CHI(b5,b1)) # b3 = (b6 |-> 0) ^ MIM ((FinS(b4,b2)) /^ b6));

:: REARRAN1:th 15
theorem
for b1, b2 being non empty finite set
for b3 being Element of b1
for b4 being Function-like Relation of b2,REAL
for b5 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b1
      st b4 is total(b2, REAL) & card b1 = card b2
   holds (b3 in b5 . 1 implies (Rland(b4,b5)) . b3 = (FinS(b4,b2)) . 1) &
    (for b6 being Element of NAT
          st 1 <= b6 &
             b6 < len b5 &
             b3 in (b5 . (b6 + 1)) \ (b5 . b6)
       holds (Rland(b4,b5)) . b3 = (FinS(b4,b2)) . (b6 + 1));

:: REARRAN1:th 16
theorem
for b1, b2 being non empty finite set
for b3 being Function-like Relation of b1,REAL
for b4 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
      st b3 is total(b1, REAL) & card b2 = card b1
   holds rng Rland(b3,b4) = rng FinS(b3,b1);

:: REARRAN1:th 17
theorem
for b1, b2 being non empty finite set
for b3 being Function-like Relation of b1,REAL
for b4 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
      st b3 is total(b1, REAL) & card b2 = card b1
   holds Rland(b3,b4),FinS(b3,b1) are_fiberwise_equipotent;

:: REARRAN1:th 18
theorem
for b1, b2 being non empty finite set
for b3 being Function-like Relation of b1,REAL
for b4 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
      st b3 is total(b1, REAL) & card b2 = card b1
   holds FinS(Rland(b3,b4),b2) = FinS(b3,b1);

:: REARRAN1:th 19
theorem
for b1, b2 being non empty finite set
for b3 being Function-like Relation of b1,REAL
for b4 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
      st b3 is total(b1, REAL) & card b2 = card b1
   holds Sum(Rland(b3,b4),b2) = Sum(b3,b1);

:: REARRAN1:th 20
theorem
for b1 being Element of REAL
for b2, b3 being non empty finite set
for b4 being Function-like Relation of b2,REAL
for b5 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b3
      st b4 is total(b2, REAL) & card b3 = card b2
   holds FinS((Rland(b4,b5)) - b1,b3) = FinS(b4 - b1,b2) &
    Sum((Rland(b4,b5)) - b1,b3) = Sum(b4 - b1,b2);

:: REARRAN1:th 21
theorem
for b1, b2 being non empty finite set
for b3 being Function-like Relation of b1,REAL
for b4 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
      st b3 is total(b1, REAL) & card b2 = card b1
   holds dom Rlor(b3,b4) = b2;

:: REARRAN1:th 22
theorem
for b1, b2 being non empty finite set
for b3 being Element of b1
for b4 being Function-like Relation of b2,REAL
for b5 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b1
      st b4 is total(b2, REAL) & card b1 = card b2
   holds (b3 in (Co_Gen b5) . 1 implies (Rlor(b4,b5)) . b3 = (FinS(b4,b2)) . 1) &
    (for b6 being Element of NAT
          st 1 <= b6 &
             b6 < len Co_Gen b5 &
             b3 in ((Co_Gen b5) . (b6 + 1)) \ ((Co_Gen b5) . b6)
       holds (Rlor(b4,b5)) . b3 = (FinS(b4,b2)) . (b6 + 1));

:: REARRAN1:th 23
theorem
for b1, b2 being non empty finite set
for b3 being Function-like Relation of b1,REAL
for b4 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
      st b3 is total(b1, REAL) & card b2 = card b1
   holds rng Rlor(b3,b4) = rng FinS(b3,b1);

:: REARRAN1:th 24
theorem
for b1, b2 being non empty finite set
for b3 being Function-like Relation of b1,REAL
for b4 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
      st b3 is total(b1, REAL) & card b2 = card b1
   holds Rlor(b3,b4),FinS(b3,b1) are_fiberwise_equipotent;

:: REARRAN1:th 25
theorem
for b1, b2 being non empty finite set
for b3 being Function-like Relation of b1,REAL
for b4 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
      st b3 is total(b1, REAL) & card b2 = card b1
   holds FinS(Rlor(b3,b4),b2) = FinS(b3,b1);

:: REARRAN1:th 26
theorem
for b1, b2 being non empty finite set
for b3 being Function-like Relation of b1,REAL
for b4 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
      st b3 is total(b1, REAL) & card b2 = card b1
   holds Sum(Rlor(b3,b4),b2) = Sum(b3,b1);

:: REARRAN1:th 27
theorem
for b1 being Element of REAL
for b2, b3 being non empty finite set
for b4 being Function-like Relation of b2,REAL
for b5 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b3
      st b4 is total(b2, REAL) & card b3 = card b2
   holds FinS((Rlor(b4,b5)) - b1,b3) = FinS(b4 - b1,b2) &
    Sum((Rlor(b4,b5)) - b1,b3) = Sum(b4 - b1,b2);

:: REARRAN1:th 28
theorem
for b1, b2 being non empty finite set
for b3 being Function-like Relation of b1,REAL
for b4 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
      st b3 is total(b1, REAL) & card b2 = card b1
   holds Rlor(b3,b4),Rland(b3,b4) are_fiberwise_equipotent &
    FinS(Rlor(b3,b4),b2) = FinS(Rland(b3,b4),b2) &
    Sum(Rlor(b3,b4),b2) = Sum(Rland(b3,b4),b2);

:: REARRAN1:th 29
theorem
for b1 being Element of REAL
for b2, b3 being non empty finite set
for b4 being Function-like Relation of b2,REAL
for b5 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b3
      st b4 is total(b2, REAL) & card b3 = card b2
   holds max+ ((Rland(b4,b5)) - b1),max+ (b4 - b1) are_fiberwise_equipotent &
    FinS(max+ ((Rland(b4,b5)) - b1),b3) = FinS(max+ (b4 - b1),b2) &
    Sum(max+ ((Rland(b4,b5)) - b1),b3) = Sum(max+ (b4 - b1),b2);

:: REARRAN1:th 30
theorem
for b1 being Element of REAL
for b2, b3 being non empty finite set
for b4 being Function-like Relation of b2,REAL
for b5 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b3
      st b4 is total(b2, REAL) & card b3 = card b2
   holds max- ((Rland(b4,b5)) - b1),max- (b4 - b1) are_fiberwise_equipotent &
    FinS(max- ((Rland(b4,b5)) - b1),b3) = FinS(max- (b4 - b1),b2) &
    Sum(max- ((Rland(b4,b5)) - b1),b3) = Sum(max- (b4 - b1),b2);

:: REARRAN1:th 31
theorem
for b1, b2 being non empty finite set
for b3 being Function-like Relation of b1,REAL
for b4 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
      st b3 is total(b1, REAL) & card b1 = card b2
   holds len FinS(Rland(b3,b4),b2) = card b2 & 1 <= len FinS(Rland(b3,b4),b2);

:: REARRAN1:th 32
theorem
for b1 being Element of NAT
for b2, b3 being non empty finite set
for b4 being Function-like Relation of b2,REAL
for b5 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b3
      st b4 is total(b2, REAL) & card b2 = card b3 & b1 in dom b5
   holds (FinS(Rland(b4,b5),b3)) | b1 = FinS(Rland(b4,b5),b5 . b1);

:: REARRAN1:th 33
theorem
for b1 being Element of REAL
for b2, b3 being non empty finite set
for b4 being Function-like Relation of b2,REAL
for b5 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b3
      st b4 is total(b2, REAL) & card b2 = card b3
   holds Rland(b4 - b1,b5) = (Rland(b4,b5)) - b1;

:: REARRAN1:th 34
theorem
for b1 being Element of REAL
for b2, b3 being non empty finite set
for b4 being Function-like Relation of b2,REAL
for b5 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b3
      st b4 is total(b2, REAL) & card b3 = card b2
   holds max+ ((Rlor(b4,b5)) - b1),max+ (b4 - b1) are_fiberwise_equipotent &
    FinS(max+ ((Rlor(b4,b5)) - b1),b3) = FinS(max+ (b4 - b1),b2) &
    Sum(max+ ((Rlor(b4,b5)) - b1),b3) = Sum(max+ (b4 - b1),b2);

:: REARRAN1:th 35
theorem
for b1 being Element of REAL
for b2, b3 being non empty finite set
for b4 being Function-like Relation of b2,REAL
for b5 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b3
      st b4 is total(b2, REAL) & card b3 = card b2
   holds max- ((Rlor(b4,b5)) - b1),max- (b4 - b1) are_fiberwise_equipotent &
    FinS(max- ((Rlor(b4,b5)) - b1),b3) = FinS(max- (b4 - b1),b2) &
    Sum(max- ((Rlor(b4,b5)) - b1),b3) = Sum(max- (b4 - b1),b2);

:: REARRAN1:th 36
theorem
for b1, b2 being non empty finite set
for b3 being Function-like Relation of b1,REAL
for b4 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
      st b3 is total(b1, REAL) & card b1 = card b2
   holds len FinS(Rlor(b3,b4),b2) = card b2 & 1 <= len FinS(Rlor(b3,b4),b2);

:: REARRAN1:th 37
theorem
for b1 being Element of NAT
for b2, b3 being non empty finite set
for b4 being Function-like Relation of b2,REAL
for b5 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b3
      st b4 is total(b2, REAL) & card b2 = card b3 & b1 in dom b5
   holds (FinS(Rlor(b4,b5),b3)) | b1 = FinS(Rlor(b4,b5),(Co_Gen b5) . b1);

:: REARRAN1:th 38
theorem
for b1 being Element of REAL
for b2, b3 being non empty finite set
for b4 being Function-like Relation of b2,REAL
for b5 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b3
      st b4 is total(b2, REAL) & card b2 = card b3
   holds Rlor(b4 - b1,b5) = (Rlor(b4,b5)) - b1;

:: REARRAN1:th 39
theorem
for b1, b2 being non empty finite set
for b3 being Function-like Relation of b1,REAL
for b4 being terms've_same_card_as_number ascending lenght_equal_card_of_set FinSequence of bool b2
      st b3 is total(b1, REAL) & card b1 = card b2
   holds Rland(b3,b4),b3 are_fiberwise_equipotent & Rlor(b3,b4),b3 are_fiberwise_equipotent & rng Rland(b3,b4) = rng b3 & rng Rlor(b3,b4) = rng b3;