:: Real Sequences and Basic Operations on Them
:: by Jaros{\l}aw Kotowicz
::
:: Received July 4, 1989
:: Copyright (c) 1990 Association of Mizar Users


begin

definition
mode Real_Sequence is sequence of REAL;
end;

theorem :: SEQ_1:1
canceled;

theorem :: SEQ_1:2
canceled;

theorem Th3: :: SEQ_1:3
for f being Function holds
( f is Real_Sequence iff ( dom f = NAT & ( for x being set st x in NAT holds
f . x is real ) ) )
proof end;

theorem Th4: :: SEQ_1:4
for f being Function holds
( f is Real_Sequence iff ( dom f = NAT & ( for n being Element of NAT holds f . n is real ) ) )
proof end;

definition
let f be real-valued Function;
let x be set ;
:: original: .
redefine func f . x -> Real;
coherence
f . x is Real
by XREAL_0:def 1;
end;

registration
cluster Relation-like non-zero NAT -defined REAL -valued Function-like complex-valued ext-real-valued real-valued Element of K21(K22(NAT,REAL));
existence
ex b1 being PartFunc of NAT,REAL st b1 is non-zero
proof end;
end;

theorem :: SEQ_1:5
for f being non-zero PartFunc of NAT,REAL holds rng f c= REAL \ {0}
proof end;

theorem Th6: :: SEQ_1:6
for seq being Real_Sequence holds
( seq is non-zero iff for x being set st x in NAT holds
seq . x <> 0 )
proof end;

theorem Th7: :: SEQ_1:7
for seq being Real_Sequence holds
( seq is non-zero iff for n being Element of NAT holds seq . n <> 0 )
proof end;

theorem :: SEQ_1:8
canceled;

theorem :: SEQ_1:9
canceled;

theorem :: SEQ_1:10
for r being real number ex seq being Real_Sequence st rng seq = {r}
proof end;

scheme :: SEQ_1:sch 1
ExRealSeq{ F1( set ) -> real number } :
ex seq being Real_Sequence st
for n being Element of NAT holds seq . n = F1(n)
proof end;

scheme :: SEQ_1:sch 2
PartFuncExD9{ F1() -> non empty set , F2() -> non empty set , P1[ set , set ] } :
ex f being PartFunc of F1(),F2() st
( ( for d being Element of F1() holds
( d in dom f iff ex c being Element of F2() st P1[d,c] ) ) & ( for d being Element of F1() st d in dom f holds
P1[d,f . d] ) )
proof end;

scheme :: SEQ_1:sch 3
LambdaPFD9{ F1() -> non empty set , F2() -> non empty set , F3( set ) -> Element of F2(), P1[ set ] } :
ex f being PartFunc of F1(),F2() st
( ( for d being Element of F1() holds
( d in dom f iff P1[d] ) ) & ( for d being Element of F1() st d in dom f holds
f . d = F3(d) ) )
proof end;

scheme :: SEQ_1:sch 4
UnPartFuncD9{ F1() -> set , F2() -> set , F3() -> set , F4( set ) -> set } :
for f, g being PartFunc of F1(),F2() st dom f = F3() & ( for c being Element of F1() st c in dom f holds
f . c = F4(c) ) & dom g = F3() & ( for c being Element of F1() st c in dom g holds
g . c = F4(c) ) holds
f = g
proof end;

theorem Th11: :: SEQ_1:11
for seq, seq1, seq2 being Real_Sequence holds
( seq = seq1 + seq2 iff for n being Element of NAT holds seq . n = (seq1 . n) + (seq2 . n) )
proof end;

theorem Th12: :: SEQ_1:12
for seq, seq1, seq2 being Real_Sequence holds
( seq = seq1 (#) seq2 iff for n being Element of NAT holds seq . n = (seq1 . n) * (seq2 . n) )
proof end;

theorem Th13: :: SEQ_1:13
for r being real number
for seq1, seq2 being Real_Sequence holds
( seq1 = r (#) seq2 iff for n being Element of NAT holds seq1 . n = r * (seq2 . n) )
proof end;

theorem :: SEQ_1:14
for seq1, seq2 being Real_Sequence holds
( seq1 = - seq2 iff for n being Element of NAT holds seq1 . n = - (seq2 . n) )
proof end;

theorem :: SEQ_1:15
for seq1, seq2 being Real_Sequence holds seq1 - seq2 = seq1 + (- seq2) ;

theorem Th16: :: SEQ_1:16
for seq1, seq being Real_Sequence holds
( seq1 = abs seq iff for n being Element of NAT holds seq1 . n = abs (seq . n) )
proof end;

theorem :: SEQ_1:17
canceled;

theorem :: SEQ_1:18
canceled;

theorem :: SEQ_1:19
canceled;

theorem Th20: :: SEQ_1:20
for seq1, seq2, seq3 being Real_Sequence holds (seq1 + seq2) + seq3 = seq1 + (seq2 + seq3)
proof end;

theorem :: SEQ_1:21
canceled;

theorem Th22: :: SEQ_1:22
for seq1, seq2, seq3 being Real_Sequence holds (seq1 (#) seq2) (#) seq3 = seq1 (#) (seq2 (#) seq3)
proof end;

theorem Th23: :: SEQ_1:23
for seq1, seq2, seq3 being Real_Sequence holds (seq1 + seq2) (#) seq3 = (seq1 (#) seq3) + (seq2 (#) seq3)
proof end;

theorem :: SEQ_1:24
for seq3, seq1, seq2 being Real_Sequence holds seq3 (#) (seq1 + seq2) = (seq3 (#) seq1) + (seq3 (#) seq2) by Th23;

theorem :: SEQ_1:25
for seq being Real_Sequence holds - seq = (- 1) (#) seq ;

theorem Th26: :: SEQ_1:26
for r being real number
for seq1, seq2 being Real_Sequence holds r (#) (seq1 (#) seq2) = (r (#) seq1) (#) seq2
proof end;

theorem Th27: :: SEQ_1:27
for r being real number
for seq1, seq2 being Real_Sequence holds r (#) (seq1 (#) seq2) = seq1 (#) (r (#) seq2)
proof end;

theorem Th28: :: SEQ_1:28
for seq1, seq2, seq3 being Real_Sequence holds (seq1 - seq2) (#) seq3 = (seq1 (#) seq3) - (seq2 (#) seq3)
proof end;

theorem :: SEQ_1:29
for seq3, seq1, seq2 being Real_Sequence holds (seq3 (#) seq1) - (seq3 (#) seq2) = seq3 (#) (seq1 - seq2) by Th28;

theorem Th30: :: SEQ_1:30
for r being real number
for seq1, seq2 being Real_Sequence holds r (#) (seq1 + seq2) = (r (#) seq1) + (r (#) seq2)
proof end;

theorem Th31: :: SEQ_1:31
for r, p being real number
for seq being Real_Sequence holds (r * p) (#) seq = r (#) (p (#) seq)
proof end;

theorem Th32: :: SEQ_1:32
for r being real number
for seq1, seq2 being Real_Sequence holds r (#) (seq1 - seq2) = (r (#) seq1) - (r (#) seq2)
proof end;

theorem :: SEQ_1:33
for r being real number
for seq1, seq being Real_Sequence holds r (#) (seq1 /" seq) = (r (#) seq1) /" seq
proof end;

theorem :: SEQ_1:34
for seq1, seq2, seq3 being Real_Sequence holds seq1 - (seq2 + seq3) = (seq1 - seq2) - seq3
proof end;

theorem :: SEQ_1:35
for seq being Real_Sequence holds 1 (#) seq = seq
proof end;

theorem :: SEQ_1:36
for F being real-valued Function holds - (- F) = F ;

theorem :: SEQ_1:37
for seq1, seq2 being Real_Sequence holds seq1 - (- seq2) = seq1 + seq2 ;

theorem :: SEQ_1:38
for seq1, seq2, seq3 being Real_Sequence holds seq1 - (seq2 - seq3) = (seq1 - seq2) + seq3
proof end;

theorem :: SEQ_1:39
for seq1, seq2, seq3 being Real_Sequence holds seq1 + (seq2 - seq3) = (seq1 + seq2) - seq3
proof end;

theorem :: SEQ_1:40
for seq1, seq2 being Real_Sequence holds
( (- seq1) (#) seq2 = - (seq1 (#) seq2) & seq1 (#) (- seq2) = - (seq1 (#) seq2) ) by Th26;

theorem Th41: :: SEQ_1:41
for seq being Real_Sequence st seq is non-zero holds
seq " is non-zero
proof end;

theorem :: SEQ_1:42
for seq being Real_Sequence holds (seq ") " = seq ;

theorem Th43: :: SEQ_1:43
for seq, seq1 being Real_Sequence holds
( ( seq is non-zero & seq1 is non-zero ) iff seq (#) seq1 is non-zero )
proof end;

theorem Th44: :: SEQ_1:44
for seq, seq1 being Real_Sequence holds (seq ") (#) (seq1 ") = (seq (#) seq1) "
proof end;

theorem :: SEQ_1:45
for seq, seq1 being Real_Sequence st seq is non-zero holds
(seq1 /" seq) (#) seq = seq1
proof end;

theorem :: SEQ_1:46
for seq9, seq, seq19, seq1 being Real_Sequence holds (seq9 /" seq) (#) (seq19 /" seq1) = (seq9 (#) seq19) /" (seq (#) seq1)
proof end;

theorem :: SEQ_1:47
for seq, seq1 being Real_Sequence st seq is non-zero & seq1 is non-zero holds
seq /" seq1 is non-zero
proof end;

theorem Th48: :: SEQ_1:48
for seq, seq1 being Real_Sequence holds (seq /" seq1) " = seq1 /" seq
proof end;

theorem :: SEQ_1:49
for seq2, seq1, seq being Real_Sequence holds seq2 (#) (seq1 /" seq) = (seq2 (#) seq1) /" seq
proof end;

theorem :: SEQ_1:50
for seq2, seq, seq1 being Real_Sequence holds seq2 /" (seq /" seq1) = (seq2 (#) seq1) /" seq
proof end;

theorem Th51: :: SEQ_1:51
for seq1, seq2, seq being Real_Sequence st seq1 is non-zero holds
seq2 /" seq = (seq2 (#) seq1) /" (seq (#) seq1)
proof end;

theorem Th52: :: SEQ_1:52
for r being real number
for seq being Real_Sequence st r <> 0 & seq is non-zero holds
r (#) seq is non-zero
proof end;

theorem :: SEQ_1:53
for seq being Real_Sequence st seq is non-zero holds
- seq is non-zero by Th52;

theorem Th54: :: SEQ_1:54
for r being real number
for seq being Real_Sequence holds (r (#) seq) " = (r ") (#) (seq ")
proof end;

Lm1: (- 1) " = - 1
;

theorem :: SEQ_1:55
for seq being Real_Sequence holds (- seq) " = (- 1) (#) (seq ") by Lm1, Th54;

theorem :: SEQ_1:56
for seq1, seq being Real_Sequence holds
( - (seq1 /" seq) = (- seq1) /" seq & seq1 /" (- seq) = - (seq1 /" seq) )
proof end;

theorem :: SEQ_1:57
for seq1, seq, seq19 being Real_Sequence holds
( (seq1 /" seq) + (seq19 /" seq) = (seq1 + seq19) /" seq & (seq1 /" seq) - (seq19 /" seq) = (seq1 - seq19) /" seq )
proof end;

theorem :: SEQ_1:58
for seq, seq9, seq1, seq19 being Real_Sequence st seq is non-zero & seq9 is non-zero holds
( (seq1 /" seq) + (seq19 /" seq9) = ((seq1 (#) seq9) + (seq19 (#) seq)) /" (seq (#) seq9) & (seq1 /" seq) - (seq19 /" seq9) = ((seq1 (#) seq9) - (seq19 (#) seq)) /" (seq (#) seq9) )
proof end;

theorem :: SEQ_1:59
for seq19, seq, seq9, seq1 being Real_Sequence holds (seq19 /" seq) /" (seq9 /" seq1) = (seq19 (#) seq1) /" (seq (#) seq9)
proof end;

theorem Th60: :: SEQ_1:60
for seq, seq9 being Real_Sequence holds abs (seq (#) seq9) = (abs seq) (#) (abs seq9)
proof end;

theorem :: SEQ_1:61
for seq being Real_Sequence st seq is non-zero holds
abs seq is non-zero
proof end;

theorem Th62: :: SEQ_1:62
for seq being Real_Sequence holds (abs seq) " = abs (seq ")
proof end;

theorem :: SEQ_1:63
for seq9, seq being Real_Sequence holds abs (seq9 /" seq) = (abs seq9) /" (abs seq)
proof end;

theorem :: SEQ_1:64
for r being real number
for seq being Real_Sequence holds abs (r (#) seq) = (abs r) (#) (abs seq)
proof end;