Article DIFF_1, MML version 4.99.1005

:: DIFF_1:funcnot 1 => DIFF_1:func 1
definition
  let a1 be Function-like Relation of REAL,REAL;
  let a2 be real set;
  func Shift(A1,A2) -> Function-like Relation of REAL,REAL means
    dom it = (- a2) ++ dom a1 &
     (for b1 being Element of REAL
           st b1 in (- a2) ++ dom a1
        holds it . b1 = a1 . (b1 + a2));
end;

:: DIFF_1:def 1
theorem
for b1 being Function-like Relation of REAL,REAL
for b2 being real set
for b3 being Function-like Relation of REAL,REAL holds
      b3 = Shift(b1,b2)
   iff
      dom b3 = (- b2) ++ dom b1 &
       (for b4 being Element of REAL
             st b4 in (- b2) ++ dom b1
          holds b3 . b4 = b1 . (b4 + b2));

:: DIFF_1:funcnot 2 => DIFF_1:func 2
definition
  let a1 be Function-like quasi_total Relation of REAL,REAL;
  let a2 be real set;
  redefine func Shift(A1,A2) -> Function-like quasi_total Relation of REAL,REAL means
    for b1 being Element of REAL holds
       it . b1 = a1 . (b1 + a2);
end;

:: DIFF_1:def 2
theorem
for b1 being Function-like quasi_total Relation of REAL,REAL
for b2 being real set
for b3 being Function-like quasi_total Relation of REAL,REAL holds
      b3 = Shift(b1,b2)
   iff
      for b4 being Element of REAL holds
         b3 . b4 = b1 . (b4 + b2);

:: DIFF_1:funcnot 3 => DIFF_1:func 3
definition
  let a1 be Function-like Relation of REAL,REAL;
  let a2 be real set;
  func fD(A1,A2) -> Function-like Relation of REAL,REAL equals
    (Shift(a1,a2)) - a1;
end;

:: DIFF_1:def 3
theorem
for b1 being Function-like Relation of REAL,REAL
for b2 being real set holds
   fD(b1,b2) = (Shift(b1,b2)) - b1;

:: DIFF_1:funcnot 4 => DIFF_1:func 4
definition
  let a1 be Function-like quasi_total Relation of REAL,REAL;
  let a2 be real set;
  redefine func fD(a1,a2) -> Function-like quasi_total Relation of REAL,REAL;
end;

:: DIFF_1:funcnot 5 => DIFF_1:func 5
definition
  let a1 be Function-like Relation of REAL,REAL;
  let a2 be real set;
  func bD(A1,A2) -> Function-like Relation of REAL,REAL equals
    a1 - Shift(a1,- a2);
end;

:: DIFF_1:def 4
theorem
for b1 being Function-like Relation of REAL,REAL
for b2 being real set holds
   bD(b1,b2) = b1 - Shift(b1,- b2);

:: DIFF_1:funcnot 6 => DIFF_1:func 6
definition
  let a1 be Function-like quasi_total Relation of REAL,REAL;
  let a2 be real set;
  redefine func bD(a1,a2) -> Function-like quasi_total Relation of REAL,REAL;
end;

:: DIFF_1:th 1
theorem
for b1 being Element of REAL
for b2 being Function-like Relation of REAL,REAL holds
   bD(b2,b1) = - fD(b2,- b1);

:: DIFF_1:funcnot 7 => DIFF_1:func 7
definition
  let a1 be Function-like Relation of REAL,REAL;
  let a2 be real set;
  func cD(A1,A2) -> Function-like Relation of REAL,REAL equals
    (Shift(a1,a2 / 2)) - Shift(a1,- (a2 / 2));
end;

:: DIFF_1:def 5
theorem
for b1 being Function-like Relation of REAL,REAL
for b2 being real set holds
   cD(b1,b2) = (Shift(b1,b2 / 2)) - Shift(b1,- (b2 / 2));

:: DIFF_1:funcnot 8 => DIFF_1:func 8
definition
  let a1 be Function-like quasi_total Relation of REAL,REAL;
  let a2 be real set;
  redefine func cD(a1,a2) -> Function-like quasi_total Relation of REAL,REAL;
end;

:: DIFF_1:funcnot 9 => DIFF_1:func 9
definition
  let a1 be Function-like Relation of REAL,REAL;
  let a2 be real set;
  func forward_difference(A1,A2) -> Functional_Sequence of REAL,REAL means
    it . 0 = a1 &
     (for b1 being Element of NAT holds
        it . (b1 + 1) = fD(it . b1,a2));
end;

:: DIFF_1:def 6
theorem
for b1 being Function-like Relation of REAL,REAL
for b2 being real set
for b3 being Functional_Sequence of REAL,REAL holds
      b3 = forward_difference(b1,b2)
   iff
      b3 . 0 = b1 &
       (for b4 being Element of NAT holds
          b3 . (b4 + 1) = fD(b3 . b4,b2));

:: DIFF_1:funcnot 10 => DIFF_1:func 9
notation
  let a1 be Function-like Relation of REAL,REAL;
  let a2 be real set;
  synonym fdif(a1,a2) for forward_difference(a1,a2);
end;

:: DIFF_1:th 2
theorem
for b1 being Element of REAL
for b2 being Function-like quasi_total Relation of REAL,REAL
for b3 being Element of NAT holds
   (forward_difference(b2,b1)) . b3 is Function-like quasi_total Relation of REAL,REAL;

:: DIFF_1:th 3
theorem
for b1, b2 being Element of REAL
for b3 being Function-like quasi_total Relation of REAL,REAL holds
   (fD(b3,b1)) . b2 = (b3 . (b2 + b1)) - (b3 . b2);

:: DIFF_1:th 4
theorem
for b1, b2 being Element of REAL
for b3 being Function-like quasi_total Relation of REAL,REAL holds
   (bD(b3,b1)) . b2 = (b3 . b2) - (b3 . (b2 - b1));

:: DIFF_1:th 5
theorem
for b1, b2 being Element of REAL
for b3 being Function-like quasi_total Relation of REAL,REAL holds
   (cD(b3,b1)) . b2 = (b3 . (b2 + (b1 / 2))) - (b3 . (b2 - (b1 / 2)));

:: DIFF_1:th 6
theorem
for b1 being Element of NAT
for b2 being Element of REAL
for b3 being Function-like quasi_total Relation of REAL,REAL
   st b3 is constant
for b4 being Element of REAL holds
   ((forward_difference(b3,b2)) . (b1 + 1)) . b4 = 0;

:: DIFF_1:th 7
theorem
for b1 being Element of NAT
for b2, b3, b4 being Element of REAL
for b5 being Function-like quasi_total Relation of REAL,REAL holds
   ((forward_difference(b2 (#) b5,b3)) . (b1 + 1)) . b4 = b2 * (((forward_difference(b5,b3)) . (b1 + 1)) . b4);

:: DIFF_1:th 8
theorem
for b1 being Element of NAT
for b2, b3 being Element of REAL
for b4, b5 being Function-like quasi_total Relation of REAL,REAL holds
((forward_difference(b4 + b5,b2)) . (b1 + 1)) . b3 = (((forward_difference(b4,b2)) . (b1 + 1)) . b3) + (((forward_difference(b5,b2)) . (b1 + 1)) . b3);

:: DIFF_1:th 9
theorem
for b1 being Element of NAT
for b2, b3 being Element of REAL
for b4, b5 being Function-like quasi_total Relation of REAL,REAL holds
((forward_difference(b4 - b5,b2)) . (b1 + 1)) . b3 = (((forward_difference(b4,b2)) . (b1 + 1)) . b3) - (((forward_difference(b5,b2)) . (b1 + 1)) . b3);

:: DIFF_1:th 10
theorem
for b1 being Element of NAT
for b2, b3, b4, b5 being Element of REAL
for b6, b7 being Function-like quasi_total Relation of REAL,REAL holds
((forward_difference((b2 (#) b6) + (b3 (#) b7),b4)) . (b1 + 1)) . b5 = (b2 * (((forward_difference(b6,b4)) . (b1 + 1)) . b5)) + (b3 * (((forward_difference(b7,b4)) . (b1 + 1)) . b5));

:: DIFF_1:th 11
theorem
for b1, b2 being Element of REAL
for b3 being Function-like quasi_total Relation of REAL,REAL holds
   ((forward_difference(b3,b1)) . 1) . b2 = ((Shift(b3,b1)) . b2) - (b3 . b2);

:: DIFF_1:funcnot 11 => DIFF_1:func 10
definition
  let a1 be Function-like Relation of REAL,REAL;
  let a2 be real set;
  func backward_difference(A1,A2) -> Functional_Sequence of REAL,REAL means
    it . 0 = a1 &
     (for b1 being Element of NAT holds
        it . (b1 + 1) = bD(it . b1,a2));
end;

:: DIFF_1:def 7
theorem
for b1 being Function-like Relation of REAL,REAL
for b2 being real set
for b3 being Functional_Sequence of REAL,REAL holds
      b3 = backward_difference(b1,b2)
   iff
      b3 . 0 = b1 &
       (for b4 being Element of NAT holds
          b3 . (b4 + 1) = bD(b3 . b4,b2));

:: DIFF_1:funcnot 12 => DIFF_1:func 10
notation
  let a1 be Function-like Relation of REAL,REAL;
  let a2 be real set;
  synonym bdif(a1,a2) for backward_difference(a1,a2);
end;

:: DIFF_1:th 12
theorem
for b1 being Element of REAL
for b2 being Function-like quasi_total Relation of REAL,REAL
for b3 being Element of NAT holds
   (backward_difference(b2,b1)) . b3 is Function-like quasi_total Relation of REAL,REAL;

:: DIFF_1:th 13
theorem
for b1 being Element of NAT
for b2 being Element of REAL
for b3 being Function-like quasi_total Relation of REAL,REAL
   st b3 is constant
for b4 being Element of REAL holds
   ((backward_difference(b3,b2)) . (b1 + 1)) . b4 = 0;

:: DIFF_1:th 14
theorem
for b1 being Element of NAT
for b2, b3, b4 being Element of REAL
for b5 being Function-like quasi_total Relation of REAL,REAL holds
   ((backward_difference(b2 (#) b5,b3)) . (b1 + 1)) . b4 = b2 * (((backward_difference(b5,b3)) . (b1 + 1)) . b4);

:: DIFF_1:th 15
theorem
for b1 being Element of NAT
for b2, b3 being Element of REAL
for b4, b5 being Function-like quasi_total Relation of REAL,REAL holds
((backward_difference(b4 + b5,b2)) . (b1 + 1)) . b3 = (((backward_difference(b4,b2)) . (b1 + 1)) . b3) + (((backward_difference(b5,b2)) . (b1 + 1)) . b3);

:: DIFF_1:th 16
theorem
for b1 being Element of NAT
for b2, b3 being Element of REAL
for b4, b5 being Function-like quasi_total Relation of REAL,REAL holds
((backward_difference(b4 - b5,b2)) . (b1 + 1)) . b3 = (((backward_difference(b4,b2)) . (b1 + 1)) . b3) - (((backward_difference(b5,b2)) . (b1 + 1)) . b3);

:: DIFF_1:th 17
theorem
for b1 being Element of NAT
for b2, b3, b4, b5 being Element of REAL
for b6, b7 being Function-like quasi_total Relation of REAL,REAL holds
((backward_difference((b2 (#) b6) + (b3 (#) b7),b4)) . (b1 + 1)) . b5 = (b2 * (((backward_difference(b6,b4)) . (b1 + 1)) . b5)) + (b3 * (((backward_difference(b7,b4)) . (b1 + 1)) . b5));

:: DIFF_1:th 18
theorem
for b1, b2 being Element of REAL
for b3 being Function-like quasi_total Relation of REAL,REAL holds
   ((backward_difference(b3,b1)) . 1) . b2 = (b3 . b2) - ((Shift(b3,- b1)) . b2);

:: DIFF_1:funcnot 13 => DIFF_1:func 11
definition
  let a1 be Function-like Relation of REAL,REAL;
  let a2 be real set;
  func central_difference(A1,A2) -> Functional_Sequence of REAL,REAL means
    it . 0 = a1 &
     (for b1 being Element of NAT holds
        it . (b1 + 1) = cD(it . b1,a2));
end;

:: DIFF_1:def 8
theorem
for b1 being Function-like Relation of REAL,REAL
for b2 being real set
for b3 being Functional_Sequence of REAL,REAL holds
      b3 = central_difference(b1,b2)
   iff
      b3 . 0 = b1 &
       (for b4 being Element of NAT holds
          b3 . (b4 + 1) = cD(b3 . b4,b2));

:: DIFF_1:funcnot 14 => DIFF_1:func 11
notation
  let a1 be Function-like Relation of REAL,REAL;
  let a2 be real set;
  synonym cdif(a1,a2) for central_difference(a1,a2);
end;

:: DIFF_1:th 19
theorem
for b1 being Element of REAL
for b2 being Function-like quasi_total Relation of REAL,REAL
for b3 being Element of NAT holds
   (central_difference(b2,b1)) . b3 is Function-like quasi_total Relation of REAL,REAL;

:: DIFF_1:th 20
theorem
for b1 being Element of NAT
for b2 being Element of REAL
for b3 being Function-like quasi_total Relation of REAL,REAL
   st b3 is constant
for b4 being Element of REAL holds
   ((central_difference(b3,b2)) . (b1 + 1)) . b4 = 0;

:: DIFF_1:th 21
theorem
for b1 being Element of NAT
for b2, b3, b4 being Element of REAL
for b5 being Function-like quasi_total Relation of REAL,REAL holds
   ((central_difference(b2 (#) b5,b3)) . (b1 + 1)) . b4 = b2 * (((central_difference(b5,b3)) . (b1 + 1)) . b4);

:: DIFF_1:th 22
theorem
for b1 being Element of NAT
for b2, b3 being Element of REAL
for b4, b5 being Function-like quasi_total Relation of REAL,REAL holds
((central_difference(b4 + b5,b2)) . (b1 + 1)) . b3 = (((central_difference(b4,b2)) . (b1 + 1)) . b3) + (((central_difference(b5,b2)) . (b1 + 1)) . b3);

:: DIFF_1:th 23
theorem
for b1 being Element of NAT
for b2, b3 being Element of REAL
for b4, b5 being Function-like quasi_total Relation of REAL,REAL holds
((central_difference(b4 - b5,b2)) . (b1 + 1)) . b3 = (((central_difference(b4,b2)) . (b1 + 1)) . b3) - (((central_difference(b5,b2)) . (b1 + 1)) . b3);

:: DIFF_1:th 24
theorem
for b1 being Element of NAT
for b2, b3, b4, b5 being Element of REAL
for b6, b7 being Function-like quasi_total Relation of REAL,REAL holds
((central_difference((b2 (#) b6) + (b3 (#) b7),b4)) . (b1 + 1)) . b5 = (b2 * (((central_difference(b6,b4)) . (b1 + 1)) . b5)) + (b3 * (((central_difference(b7,b4)) . (b1 + 1)) . b5));

:: DIFF_1:th 25
theorem
for b1, b2 being Element of REAL
for b3 being Function-like quasi_total Relation of REAL,REAL holds
   ((central_difference(b3,b1)) . 1) . b2 = ((Shift(b3,b1 / 2)) . b2) - ((Shift(b3,- (b1 / 2))) . b2);

:: DIFF_1:th 26
theorem
for b1 being Element of NAT
for b2, b3 being Element of REAL
for b4 being Function-like quasi_total Relation of REAL,REAL holds
   ((forward_difference(b4,b2)) . b1) . b3 = ((backward_difference(b4,b2)) . b1) . (b3 + (b1 * b2));

:: DIFF_1:th 27
theorem
for b1 being Element of NAT
for b2, b3 being Element of REAL
for b4 being Function-like quasi_total Relation of REAL,REAL holds
   ((forward_difference(b4,b2)) . (2 * b1)) . b3 = ((central_difference(b4,b2)) . (2 * b1)) . (b3 + (b1 * b2));

:: DIFF_1:th 28
theorem
for b1 being Element of NAT
for b2, b3 being Element of REAL
for b4 being Function-like quasi_total Relation of REAL,REAL holds
   ((forward_difference(b4,b2)) . ((2 * b1) + 1)) . b3 = ((central_difference(b4,b2)) . ((2 * b1) + 1)) . ((b3 + (b1 * b2)) + (b2 / 2));

:: DIFF_1:funcnot 15 => DIFF_1:func 12
definition
  let a1 be Relation-like Function-like real-valued set;
  let a2, a3 be real set;
  func [!A1,A2,A3!] -> Element of REAL equals
    ((a1 . a2) - (a1 . a3)) / (a2 - a3);
end;

:: DIFF_1:def 9
theorem
for b1 being Relation-like Function-like real-valued set
for b2, b3 being real set holds
[!b1,b2,b3!] = ((b1 . b2) - (b1 . b3)) / (b2 - b3);

:: DIFF_1:funcnot 16 => DIFF_1:func 13
definition
  let a1 be Relation-like Function-like real-valued set;
  let a2, a3, a4 be real set;
  func [!A1,A2,A3,A4!] -> Element of REAL equals
    ([!a1,a2,a3!] - [!a1,a3,a4!]) / (a2 - a4);
end;

:: DIFF_1:def 10
theorem
for b1 being Relation-like Function-like real-valued set
for b2, b3, b4 being real set holds
[!b1,b2,b3,b4!] = ([!b1,b2,b3!] - [!b1,b3,b4!]) / (b2 - b4);

:: DIFF_1:funcnot 17 => DIFF_1:func 14
definition
  let a1 be Relation-like Function-like real-valued set;
  let a2, a3, a4, a5 be real set;
  func [!A1,A2,A3,A4,A5!] -> Element of REAL equals
    ([!a1,a2,a3,a4!] - [!a1,a3,a4,a5!]) / (a2 - a5);
end;

:: DIFF_1:def 11
theorem
for b1 being Relation-like Function-like real-valued set
for b2, b3, b4, b5 being real set holds
[!b1,b2,b3,b4,b5!] = ([!b1,b2,b3,b4!] - [!b1,b3,b4,b5!]) / (b2 - b5);

:: DIFF_1:th 29
theorem
for b1, b2 being Element of REAL
for b3 being Function-like quasi_total Relation of REAL,REAL holds
   [!b3,b1,b2!] = [!b3,b2,b1!];

:: DIFF_1:th 30
theorem
for b1, b2 being Element of REAL
for b3 being Function-like quasi_total Relation of REAL,REAL
      st b3 is constant
   holds [!b3,b1,b2!] = 0;

:: DIFF_1:th 31
theorem
for b1, b2, b3 being Element of REAL
for b4 being Function-like quasi_total Relation of REAL,REAL holds
   [!b1 (#) b4,b2,b3!] = b1 * [!b4,b2,b3!];

:: DIFF_1:th 32
theorem
for b1, b2 being Element of REAL
for b3, b4 being Function-like quasi_total Relation of REAL,REAL holds
[!b3 + b4,b1,b2!] = [!b3,b1,b2!] + [!b4,b1,b2!];

:: DIFF_1:th 33
theorem
for b1, b2, b3, b4 being Element of REAL
for b5, b6 being Function-like quasi_total Relation of REAL,REAL holds
[!(b1 (#) b5) + (b2 (#) b6),b3,b4!] = (b1 * [!b5,b3,b4!]) + (b2 * [!b6,b3,b4!]);

:: DIFF_1:th 34
theorem
for b1, b2, b3 being Element of REAL
for b4 being Function-like quasi_total Relation of REAL,REAL
      st b1,b2,b3 are_mutually_different
   holds [!b4,b1,b2,b3!] = [!b4,b2,b3,b1!] &
    [!b4,b1,b2,b3!] = [!b4,b3,b2,b1!];

:: DIFF_1:th 35
theorem
for b1, b2, b3 being Element of REAL
for b4 being Function-like quasi_total Relation of REAL,REAL
      st b1,b2,b3 are_mutually_different
   holds [!b4,b1,b2,b3!] = [!b4,b3,b1,b2!] &
    [!b4,b1,b2,b3!] = [!b4,b2,b1,b3!];

:: DIFF_1:th 36
theorem
for b1, b2 being Element of NAT
for b3, b4 being Element of REAL
for b5 being Function-like quasi_total Relation of REAL,REAL holds
   ((forward_difference((forward_difference(b5,b3)) . b1,b3)) . b2) . b4 = ((forward_difference(b5,b3)) . (b1 + b2)) . b4;

:: DIFF_1:attrnot 1 => DIFF_1:attr 1
definition
  let a1 be Functional_Sequence of REAL,REAL;
  attr a1 is Sequence-yielding means
    for b1 being Element of NAT holds
       a1 . b1 is Function-like quasi_total Relation of NAT,REAL;
end;

:: DIFF_1:dfs 12
definiens
  let a1 be Functional_Sequence of REAL,REAL;
To prove
     a1 is Sequence-yielding
it is sufficient to prove
  thus for b1 being Element of NAT holds
       a1 . b1 is Function-like quasi_total Relation of NAT,REAL;

:: DIFF_1:def 12
theorem
for b1 being Functional_Sequence of REAL,REAL holds
      b1 is Sequence-yielding
   iff
      for b2 being Element of NAT holds
         b1 . b2 is Function-like quasi_total Relation of NAT,REAL;

:: DIFF_1:exreg 1
registration
  cluster Relation-like Function-like Sequence-yielding Functional_Sequence of REAL,REAL;
end;

:: DIFF_1:modenot 1
definition
  mode Seq_Sequence is Sequence-yielding Functional_Sequence of REAL,REAL;
end;

:: DIFF_1:funcnot 18 => DIFF_1:func 15
definition
  let a1 be Sequence-yielding Functional_Sequence of REAL,REAL;
  let a2 be Element of NAT;
  redefine func a1 . a2 -> Function-like quasi_total Relation of NAT,REAL;
end;

:: DIFF_1:th 37
theorem
for b1, b2 being Element of REAL
for b3, b4 being Function-like quasi_total Relation of REAL,REAL
for b5 being Sequence-yielding Functional_Sequence of REAL,REAL
      st for b6, b7 being Element of NAT
              st b7 <= b6
           holds (b5 . b6) . b7 = ((b6 choose b7) * (((forward_difference(b3,b1)) . b7) . b2)) * (((forward_difference(b4,b1)) . (b6 -' b7)) . (b2 + (b7 * b1)))
   holds ((forward_difference(b3 (#) b4,b1)) . 1) . b2 = Sum(b5 . 1,1) &
    ((forward_difference(b3 (#) b4,b1)) . 2) . b2 = Sum(b5 . 2,2);