:: EUCLID_7 semantic presentation
begin
theorem :: EUCLID_7:1
for f, g being Function holds dom (f * g) = (dom g) /\ (g " (dom f))
proof
let f, g be Function; ::_thesis: dom (f * g) = (dom g) /\ (g " (dom f))
thus dom (f * g) c= (dom g) /\ (g " (dom f)) :: according to XBOOLE_0:def_10 ::_thesis: (dom g) /\ (g " (dom f)) c= dom (f * g)
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in dom (f * g) or x in (dom g) /\ (g " (dom f)) )
assume A1: x in dom (f * g) ; ::_thesis: x in (dom g) /\ (g " (dom f))
then A2: x in dom g by FUNCT_1:11;
g . x in dom f by A1, FUNCT_1:11;
then x in g " (dom f) by A2, FUNCT_1:def_7;
hence x in (dom g) /\ (g " (dom f)) by A2, XBOOLE_0:def_4; ::_thesis: verum
end;
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in (dom g) /\ (g " (dom f)) or x in dom (f * g) )
assume A3: x in (dom g) /\ (g " (dom f)) ; ::_thesis: x in dom (f * g)
then x in g " (dom f) by XBOOLE_0:def_4;
then A4: g . x in dom f by FUNCT_1:def_7;
x in dom g by A3, XBOOLE_0:def_4;
hence x in dom (f * g) by A4, FUNCT_1:11; ::_thesis: verum
end;
theorem Th2: :: EUCLID_7:2
for R being Relation
for Y being set st rng R c= Y holds
R " Y = dom R
proof
let R be Relation; ::_thesis: for Y being set st rng R c= Y holds
R " Y = dom R
let Y be set ; ::_thesis: ( rng R c= Y implies R " Y = dom R )
assume rng R c= Y ; ::_thesis: R " Y = dom R
then (rng R) /\ Y = rng R by XBOOLE_1:28;
hence R " Y = R " (rng R) by RELAT_1:133
.= dom R by RELAT_1:134 ;
::_thesis: verum
end;
Lm1: for X being set
for Y being non empty set
for f being Function of X,Y st f is bijective holds
card X = card Y
by EULER_1:11;
theorem :: EUCLID_7:3
for z being set holds <*z*> * <*1*> = <*z*>
proof
let z be set ; ::_thesis: <*z*> * <*1*> = <*z*>
A1: dom <*z*> = Seg 1 by FINSEQ_1:38;
rng <*1*> = {1} by FINSEQ_1:38;
then A2: dom (<*z*> * <*1*>) = dom <*1*> by A1, FINSEQ_1:2, RELAT_1:27;
A3: dom <*1*> = Seg 1 by FINSEQ_1:38;
then 1 in dom <*1*> by FINSEQ_1:2, TARSKI:def_1;
then (<*z*> * <*1*>) . 1 = <*z*> . (<*1*> . 1) by FUNCT_1:13
.= <*z*> . 1 by FINSEQ_1:40
.= z by FINSEQ_1:40 ;
hence <*z*> * <*1*> = <*z*> by A3, A2, FINSEQ_1:def_8; ::_thesis: verum
end;
theorem :: EUCLID_7:4
for x being Element of REAL 0 holds x = <*> REAL ;
theorem Th5: :: EUCLID_7:5
for n being Nat
for a, b, c being Element of REAL n holds ((a - b) + c) + b = a + c
proof
let n be Nat; ::_thesis: for a, b, c being Element of REAL n holds ((a - b) + c) + b = a + c
let a, b, c be Element of REAL n; ::_thesis: ((a - b) + c) + b = a + c
reconsider a2 = a, b2 = b, c2 = c as Element of n -tuples_on REAL ;
((a2 - b2) + c2) + b2 = ((a2 + (- b2)) + b2) + c2 by RFUNCT_1:8
.= (a2 + (b2 + (- b2))) + c2 by RFUNCT_1:8
.= (a2 + (n |-> 0)) + c2 by RVSUM_1:22
.= a2 + c2 by RVSUM_1:16 ;
hence ((a - b) + c) + b = a + c ; ::_thesis: verum
end;
registration
let f1, f2 be FinSequence;
cluster<:f1,f2:> -> FinSequence-like ;
coherence
<:f1,f2:> is FinSequence-like
proof
dom <:f1,f2:> = (dom f1) /\ (dom f2) by FUNCT_3:def_7;
hence <:f1,f2:> is FinSequence-like by VALUED_1:19; ::_thesis: verum
end;
end;
definition
let D be set ;
let f1, f2 be FinSequence of D;
:: original: <:
redefine func<:f1,f2:> -> FinSequence of [:D,D:];
coherence
<:f1,f2:> is FinSequence of [:D,D:]
proof
A1: [:(rng f1),(rng f2):] c= [:D,D:] by ZFMISC_1:96;
rng <:f1,f2:> c= [:(rng f1),(rng f2):] by FUNCT_3:51;
then rng <:f1,f2:> c= [:D,D:] by A1, XBOOLE_1:1;
hence <:f1,f2:> is FinSequence of [:D,D:] by FINSEQ_1:def_4; ::_thesis: verum
end;
end;
Lm2: for n, m being Nat st n < m holds
ex k being Nat st m = (n + 1) + k
proof
let n, m be Nat; ::_thesis: ( n < m implies ex k being Nat st m = (n + 1) + k )
assume A1: n < m ; ::_thesis: ex k being Nat st m = (n + 1) + k
then consider k1 being Nat such that
A2: m = n + k1 by NAT_1:10;
k1 <> 0 by A1, A2;
then consider n1 being Nat such that
A3: k1 = n1 + 1 by NAT_1:6;
take n1 ; ::_thesis: m = (n + 1) + n1
thus m = (n + 1) + n1 by A2, A3; ::_thesis: verum
end;
definition
let h be real-valued FinSequence;
redefine attr h is increasing means :Def1: :: EUCLID_7:def 1
for i being Nat st 1 <= i & i < len h holds
h . i < h . (i + 1);
compatibility
( h is increasing iff for i being Nat st 1 <= i & i < len h holds
h . i < h . (i + 1) )
proof
hereby ::_thesis: ( ( for i being Nat st 1 <= i & i < len h holds
h . i < h . (i + 1) ) implies h is increasing )
assume A1: h is increasing ; ::_thesis: for i being Nat st 1 <= i & i < len h holds
h . i < h . (i + 1)
let i be Nat; ::_thesis: ( 1 <= i & i < len h implies h . i < h . (i + 1) )
assume that
A2: 1 <= i and
A3: i < len h ; ::_thesis: h . i < h . (i + 1)
A4: 1 <= i + 1 by NAT_1:12;
i + 1 <= len h by A3, NAT_1:13;
then A5: i + 1 in dom h by A4, FINSEQ_3:25;
A6: i < i + 1 by NAT_1:16;
i in dom h by A2, A3, FINSEQ_3:25;
hence h . i < h . (i + 1) by A1, A5, A6, VALUED_0:def_13; ::_thesis: verum
end;
assume A7: for i being Nat st 1 <= i & i < len h holds
h . i < h . (i + 1) ; ::_thesis: h is increasing
now__::_thesis:_for_n,_m_being_ext-real_number_st_n_in_dom_h_&_m_in_dom_h_&_n_<_m_holds_
h_._n_<_h_._m
let n, m be ext-real number ; ::_thesis: ( n in dom h & m in dom h & n < m implies h . n < h . m )
assume A8: n in dom h ; ::_thesis: ( m in dom h & n < m implies h . n < h . m )
assume A9: m in dom h ; ::_thesis: ( n < m implies h . n < h . m )
then reconsider m1 = m, n1 = n as Element of NAT by A8;
defpred S1[ Nat] means ( n1 + $1 < len h implies h . n < h . ((n1 + 1) + $1) );
A10: now__::_thesis:_for_a_being_Nat_st_S1[a]_holds_
S1[a_+_1]
let a be Nat; ::_thesis: ( S1[a] implies S1[a + 1] )
assume A11: S1[a] ; ::_thesis: S1[a + 1]
thus S1[a + 1] ::_thesis: verum
proof
A12: (n1 + a) + 0 < (n1 + a) + 1 by XREAL_1:6;
assume A13: n1 + (a + 1) < len h ; ::_thesis: h . n < h . ((n1 + 1) + (a + 1))
1 <= 1 + (n1 + a) by NAT_1:11;
then h . ((n1 + 1) + a) < h . (((n1 + 1) + a) + 1) by A7, A13;
hence h . n < h . ((n1 + 1) + (a + 1)) by A11, A13, A12, XXREAL_0:2; ::_thesis: verum
end;
end;
1 <= n by A8, FINSEQ_3:25;
then A14: S1[ 0 ] by A7;
A15: for k being Nat holds S1[k] from NAT_1:sch_2(A14, A10);
assume n < m ; ::_thesis: h . n < h . m
then consider k being Nat such that
A16: m1 = (n1 + 1) + k by Lm2;
m <= len h by A9, FINSEQ_3:25;
then m1 - 1 < (len h) - 0 by XREAL_1:15;
then n1 + k < len h by A16;
hence h . n < h . m by A16, A15; ::_thesis: verum
end;
hence h is increasing by VALUED_0:def_13; ::_thesis: verum
end;
end;
:: deftheorem Def1 defines increasing EUCLID_7:def_1_:_
for h being real-valued FinSequence holds
( h is increasing iff for i being Nat st 1 <= i & i < len h holds
h . i < h . (i + 1) );
theorem Th6: :: EUCLID_7:6
for h being real-valued FinSequence st h is increasing holds
for i, j being Nat st i < j & 1 <= i & j <= len h holds
h . i < h . j
proof
let h be real-valued FinSequence; ::_thesis: ( h is increasing implies for i, j being Nat st i < j & 1 <= i & j <= len h holds
h . i < h . j )
assume A1: h is increasing ; ::_thesis: for i, j being Nat st i < j & 1 <= i & j <= len h holds
h . i < h . j
let i, j be Nat; ::_thesis: ( i < j & 1 <= i & j <= len h implies h . i < h . j )
assume that
A2: i < j and
A3: 1 <= i and
A4: j <= len h ; ::_thesis: h . i < h . j
defpred S1[ Nat] means ( (i + 1) + $1 <= len h implies h . i < h . ((i + 1) + $1) );
A5: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A6: S1[k] ; ::_thesis: S1[k + 1]
( (i + 1) + (k + 1) <= len h implies h . i < h . ((i + 1) + (k + 1)) )
proof
A7: i + 1 <= (i + 1) + k by NAT_1:11;
i < i + 1 by XREAL_1:29;
then i < (i + 1) + k by A7, XXREAL_0:2;
then A8: 1 < (i + 1) + k by A3, XXREAL_0:2;
k < k + 1 by XREAL_1:29;
then A9: (i + 1) + k < (i + 1) + (k + 1) by XREAL_1:6;
assume A10: (i + 1) + (k + 1) <= len h ; ::_thesis: h . i < h . ((i + 1) + (k + 1))
then (i + 1) + k < len h by A9, XXREAL_0:2;
then h . ((i + 1) + k) < h . (((i + 1) + k) + 1) by A1, A8, Def1;
hence h . i < h . ((i + 1) + (k + 1)) by A6, A10, A9, XXREAL_0:2; ::_thesis: verum
end;
hence S1[k + 1] ; ::_thesis: verum
end;
i < len h by A2, A4, XXREAL_0:2;
then A11: S1[ 0 ] by A1, A3, Def1;
for k being Nat holds S1[k] from NAT_1:sch_2(A11, A5);
then A12: ( (i + 1) + (j -' (i + 1)) <= len h implies h . i < h . ((i + 1) + (j -' (i + 1))) ) ;
i + 1 <= j by A2, NAT_1:13;
then j -' (i + 1) = j - (i + 1) by XREAL_1:233;
hence h . i < h . j by A4, A12; ::_thesis: verum
end;
theorem Th7: :: EUCLID_7:7
for h being real-valued FinSequence st h is increasing holds
for i, j being Nat st i <= j & 1 <= i & j <= len h holds
h . i <= h . j
proof
let h be real-valued FinSequence; ::_thesis: ( h is increasing implies for i, j being Nat st i <= j & 1 <= i & j <= len h holds
h . i <= h . j )
assume A1: h is increasing ; ::_thesis: for i, j being Nat st i <= j & 1 <= i & j <= len h holds
h . i <= h . j
let i, j be Nat; ::_thesis: ( i <= j & 1 <= i & j <= len h implies h . i <= h . j )
assume that
A2: i <= j and
A3: 1 <= i and
A4: j <= len h ; ::_thesis: h . i <= h . j
( i < j or i = j ) by A2, XXREAL_0:1;
hence h . i <= h . j by A1, A3, A4, Th6; ::_thesis: verum
end;
theorem Th8: :: EUCLID_7:8
for h being natural-valued FinSequence st h is increasing holds
for i being Nat st i <= len h & 1 <= h . 1 holds
i <= h . i
proof
let h be natural-valued FinSequence; ::_thesis: ( h is increasing implies for i being Nat st i <= len h & 1 <= h . 1 holds
i <= h . i )
assume A1: h is increasing ; ::_thesis: for i being Nat st i <= len h & 1 <= h . 1 holds
i <= h . i
defpred S1[ Nat] means ( $1 <= len h implies $1 <= h . $1 );
let i be Nat; ::_thesis: ( i <= len h & 1 <= h . 1 implies i <= h . i )
assume that
A2: i <= len h and
A3: 1 <= h . 1 ; ::_thesis: i <= h . i
A4: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A5: S1[k] ; ::_thesis: S1[k + 1]
( k + 1 <= len h implies k + 1 <= h . (k + 1) )
proof
A6: k < k + 1 by XREAL_1:29;
assume A7: k + 1 <= len h ; ::_thesis: k + 1 <= h . (k + 1)
then A8: k < len h by A6, XXREAL_0:2;
percases ( k = 0 or k > 0 ) ;
suppose k = 0 ; ::_thesis: k + 1 <= h . (k + 1)
hence k + 1 <= h . (k + 1) by A3; ::_thesis: verum
end;
suppose k > 0 ; ::_thesis: k + 1 <= h . (k + 1)
then 0 + 1 <= k by NAT_1:13;
then h . k < h . (k + 1) by A1, A8, Def1;
then k < h . (k + 1) by A5, A7, A6, XXREAL_0:2;
hence k + 1 <= h . (k + 1) by NAT_1:13; ::_thesis: verum
end;
end;
end;
hence S1[k + 1] ; ::_thesis: verum
end;
A9: S1[ 0 ] ;
for k being Nat holds S1[k] from NAT_1:sch_2(A9, A4);
hence i <= h . i by A2; ::_thesis: verum
end;
theorem Th9: :: EUCLID_7:9
for V being RealLinearSpace
for X being Subspace of V st V is strict & X is strict & the carrier of X = the carrier of V holds
X = V
proof
let V be RealLinearSpace; ::_thesis: for X being Subspace of V st V is strict & X is strict & the carrier of X = the carrier of V holds
X = V
let X be Subspace of V; ::_thesis: ( V is strict & X is strict & the carrier of X = the carrier of V implies X = V )
assume that
A1: V is strict and
A2: X is strict and
A3: the carrier of X = the carrier of V ; ::_thesis: X = V
A4: the Mult of X = the Mult of V | [:REAL, the carrier of V:] by A3, RLSUB_1:def_2
.= the Mult of V ;
A5: 0. X = 0. V by RLSUB_1:def_2;
the addF of X = the addF of V || the carrier of V by A3, RLSUB_1:def_2
.= the addF of V | [: the carrier of V, the carrier of V:] by REALSET1:def_2
.= the addF of V ;
hence X = V by A1, A2, A3, A5, A4; ::_thesis: verum
end;
definition
let D be set ;
let F be FinSequence of D;
let h be Permutation of (dom F);
funcF (*) h -> FinSequence of D equals :: EUCLID_7:def 2
F * h;
coherence
F * h is FinSequence of D
proof
reconsider G = F as Function ;
A1: h " (dom G) = h " (rng h) by FUNCT_2:def_3
.= dom h by RELAT_1:134 ;
dom (G * h) = h " (dom G) by RELAT_1:147
.= dom F by A1, FUNCT_2:52
.= Seg (len F) by FINSEQ_1:def_3 ;
then A2: F * h is FinSequence by FINSEQ_1:def_2;
rng (F * h) c= D ;
hence F * h is FinSequence of D by A2, FINSEQ_1:def_4; ::_thesis: verum
end;
end;
:: deftheorem defines (*) EUCLID_7:def_2_:_
for D being set
for F being FinSequence of D
for h being Permutation of (dom F) holds F (*) h = F * h;
theorem Th10: :: EUCLID_7:10
for i, j being Nat
for D being non empty set
for f being FinSequence of D st 1 <= i & i <= len f & 1 <= j & j <= len f holds
( (Swap (f,i,j)) . i = f . j & (Swap (f,i,j)) . j = f . i )
proof
let i, j be Nat; ::_thesis: for D being non empty set
for f being FinSequence of D st 1 <= i & i <= len f & 1 <= j & j <= len f holds
( (Swap (f,i,j)) . i = f . j & (Swap (f,i,j)) . j = f . i )
let D be non empty set ; ::_thesis: for f being FinSequence of D st 1 <= i & i <= len f & 1 <= j & j <= len f holds
( (Swap (f,i,j)) . i = f . j & (Swap (f,i,j)) . j = f . i )
let f be FinSequence of D; ::_thesis: ( 1 <= i & i <= len f & 1 <= j & j <= len f implies ( (Swap (f,i,j)) . i = f . j & (Swap (f,i,j)) . j = f . i ) )
assume that
A1: 1 <= i and
A2: i <= len f and
A3: 1 <= j and
A4: j <= len f ; ::_thesis: ( (Swap (f,i,j)) . i = f . j & (Swap (f,i,j)) . j = f . i )
A5: len (Replace (f,i,(f /. j))) = len f by FINSEQ_7:5;
A6: len (Swap (f,i,j)) = len f by FINSEQ_7:18;
then (Swap (f,i,j)) /. j = (Swap (f,i,j)) . j by A3, A4, FINSEQ_4:15;
then A7: (Swap (f,i,j)) . j = (Replace ((Replace (f,i,(f /. j))),j,(f /. i))) /. j by A1, A2, A3, A4, FINSEQ_7:def_2
.= f /. i by A3, A4, A5, FINSEQ_7:8
.= f . i by A1, A2, FINSEQ_4:15 ;
A8: Swap (f,i,j) = Swap (f,j,i) by FINSEQ_7:21;
A9: len (Replace (f,j,(f /. i))) = len f by FINSEQ_7:5;
(Swap (f,i,j)) /. i = (Swap (f,i,j)) . i by A1, A2, A6, FINSEQ_4:15;
then (Swap (f,i,j)) . i = (Replace ((Replace (f,j,(f /. i))),i,(f /. j))) /. i by A1, A2, A3, A4, A8, FINSEQ_7:def_2
.= f /. j by A1, A2, A9, FINSEQ_7:8
.= f . j by A3, A4, FINSEQ_4:15 ;
hence ( (Swap (f,i,j)) . i = f . j & (Swap (f,i,j)) . j = f . i ) by A7; ::_thesis: verum
end;
theorem Th11: :: EUCLID_7:11
{} is Permutation of {}
proof
A1: rng {} = {} ;
dom {} = {} ;
then reconsider f = {} as Function of {},{} by A1, FUNCT_2:1;
f is one-to-one onto Function of {},{} by A1, FUNCT_2:def_3;
hence {} is Permutation of {} ; ::_thesis: verum
end;
theorem :: EUCLID_7:12
<*1*> is Permutation of {1}
proof
set g = <*1*>;
A1: rng <*1*> = {1} by FINSEQ_1:38;
dom <*1*> = {1} by FINSEQ_1:2, FINSEQ_1:38;
then reconsider f = <*1*> as Function of {1},{1} by A1, FUNCT_2:1;
f is one-to-one onto Function of {1},{1} by A1, FUNCT_2:def_3;
hence <*1*> is Permutation of {1} ; ::_thesis: verum
end;
theorem Th13: :: EUCLID_7:13
for h being FinSequence of REAL holds
( h is one-to-one iff sort_a h is one-to-one )
proof
let h be FinSequence of REAL ; ::_thesis: ( h is one-to-one iff sort_a h is one-to-one )
A1: h, sort_a h are_fiberwise_equipotent by RFINSEQ2:def_6;
then ex H being Function st
( dom H = dom (sort_a h) & rng H = dom h & H is one-to-one & sort_a h = h * H ) by CLASSES1:77;
hence ( h is one-to-one implies sort_a h is one-to-one ) ; ::_thesis: ( sort_a h is one-to-one implies h is one-to-one )
ex G being Function st
( dom G = dom h & rng G = dom (sort_a h) & G is one-to-one & h = (sort_a h) * G ) by A1, CLASSES1:77;
hence ( sort_a h is one-to-one implies h is one-to-one ) ; ::_thesis: verum
end;
theorem Th14: :: EUCLID_7:14
for h being FinSequence of NAT st h is one-to-one holds
ex h3 being Permutation of (dom h) ex h2 being FinSequence of NAT st
( h2 = h * h3 & h2 is increasing & dom h = dom h2 & rng h = rng h2 )
proof
let h be FinSequence of NAT ; ::_thesis: ( h is one-to-one implies ex h3 being Permutation of (dom h) ex h2 being FinSequence of NAT st
( h2 = h * h3 & h2 is increasing & dom h = dom h2 & rng h = rng h2 ) )
assume A1: h is one-to-one ; ::_thesis: ex h3 being Permutation of (dom h) ex h2 being FinSequence of NAT st
( h2 = h * h3 & h2 is increasing & dom h = dom h2 & rng h = rng h2 )
percases ( dom h <> {} or dom h = {} ) ;
supposeA2: dom h <> {} ; ::_thesis: ex h3 being Permutation of (dom h) ex h2 being FinSequence of NAT st
( h2 = h * h3 & h2 is increasing & dom h = dom h2 & rng h = rng h2 )
rng h c= REAL by XBOOLE_1:1;
then reconsider hr = h as FinSequence of REAL by FINSEQ_1:def_4;
A3: hr, sort_a hr are_fiberwise_equipotent by RFINSEQ2:def_6;
then consider H being Function such that
A4: dom H = dom (sort_a hr) and
A5: rng H = dom hr and
A6: H is one-to-one and
A7: sort_a hr = hr * H by CLASSES1:77;
rng (sort_a hr) = rng hr by A3, CLASSES1:75;
then reconsider h4 = sort_a hr as FinSequence of NAT by FINSEQ_1:def_4;
A8: rng h = rng h4 by A5, A7, RELAT_1:28;
A9: dom h4 = Seg (len h4) by FINSEQ_1:def_3;
for i being Nat st 1 <= i & i < len h4 holds
h4 . i < h4 . (i + 1)
proof
let i be Nat; ::_thesis: ( 1 <= i & i < len h4 implies h4 . i < h4 . (i + 1) )
assume that
A10: 1 <= i and
A11: i < len h4 ; ::_thesis: h4 . i < h4 . (i + 1)
A12: i + 1 <= len h4 by A11, NAT_1:13;
A13: i in dom h4 by A9, A10, A11, FINSEQ_1:1;
1 < i + 1 by A10, XREAL_1:29;
then A14: i + 1 in dom h4 by A9, A12, FINSEQ_1:1;
A15: h4 is one-to-one by A1, Th13;
A16: now__::_thesis:_not_h4_._i_=_h4_._(i_+_1)
assume h4 . i = h4 . (i + 1) ; ::_thesis: contradiction
then i = i + 1 by A14, A13, A15, FUNCT_1:def_4;
hence contradiction ; ::_thesis: verum
end;
h4 . i <= h4 . (i + 1) by A14, A13, INTEGRA2:def_1;
hence h4 . i < h4 . (i + 1) by A16, XXREAL_0:1; ::_thesis: verum
end;
then A17: h4 is increasing by Def1;
dom (sort_a hr) = dom hr by RFINSEQ2:31;
then reconsider H2 = H as Function of (dom h),(dom h) by A4, A5, FUNCT_2:1;
H2 is onto by A5, FUNCT_2:def_3;
then reconsider h5 = H as Permutation of (dom h) by A6;
A18: h4 = h * h5 by A7;
dom h = dom h5 by A2, FUNCT_2:def_1
.= dom h4 by A4 ;
hence ex h3 being Permutation of (dom h) ex h2 being FinSequence of NAT st
( h2 = h * h3 & h2 is increasing & dom h = dom h2 & rng h = rng h2 ) by A18, A17, A8; ::_thesis: verum
end;
supposeA19: dom h = {} ; ::_thesis: ex h3 being Permutation of (dom h) ex h2 being FinSequence of NAT st
( h2 = h * h3 & h2 is increasing & dom h = dom h2 & rng h = rng h2 )
then rng h = {} by RELAT_1:42;
then reconsider h5 = h as Function of {},{} by A19, FUNCT_2:1;
reconsider h22 = h * h5 as FinSequence of NAT ;
h22 is increasing ;
hence ex h3 being Permutation of (dom h) ex h2 being FinSequence of NAT st
( h2 = h * h3 & h2 is increasing & dom h = dom h2 & rng h = rng h2 ) by A19, Th11; ::_thesis: verum
end;
end;
end;
begin
definition
let B0 be set ;
attrB0 is R-orthogonal means :Def3: :: EUCLID_7:def 3
for x, y being real-valued FinSequence st x in B0 & y in B0 & x <> y holds
|(x,y)| = 0 ;
end;
:: deftheorem Def3 defines R-orthogonal EUCLID_7:def_3_:_
for B0 being set holds
( B0 is R-orthogonal iff for x, y being real-valued FinSequence st x in B0 & y in B0 & x <> y holds
|(x,y)| = 0 );
registration
cluster empty -> R-orthogonal for set ;
coherence
for b1 being set st b1 is empty holds
b1 is R-orthogonal
proof
let X be set ; ::_thesis: ( X is empty implies X is R-orthogonal )
assume A1: X is empty ; ::_thesis: X is R-orthogonal
let f be real-valued FinSequence; :: according to EUCLID_7:def_3 ::_thesis: for y being real-valued FinSequence st f in X & y in X & f <> y holds
|(f,y)| = 0
thus for y being real-valued FinSequence st f in X & y in X & f <> y holds
|(f,y)| = 0 by A1; ::_thesis: verum
end;
end;
theorem :: EUCLID_7:15
for B0 being set holds
( B0 is R-orthogonal iff for x, y being real-valued FinSequence st x in B0 & y in B0 & x <> y holds
x,y are_orthogonal )
proof
let B0 be set ; ::_thesis: ( B0 is R-orthogonal iff for x, y being real-valued FinSequence st x in B0 & y in B0 & x <> y holds
x,y are_orthogonal )
thus ( B0 is R-orthogonal implies for x, y being real-valued FinSequence st x in B0 & y in B0 & x <> y holds
x,y are_orthogonal ) ::_thesis: ( ( for x, y being real-valued FinSequence st x in B0 & y in B0 & x <> y holds
x,y are_orthogonal ) implies B0 is R-orthogonal )
proof
assume A1: B0 is R-orthogonal ; ::_thesis: for x, y being real-valued FinSequence st x in B0 & y in B0 & x <> y holds
x,y are_orthogonal
let x, y be real-valued FinSequence; ::_thesis: ( x in B0 & y in B0 & x <> y implies x,y are_orthogonal )
assume that
A2: x in B0 and
A3: y in B0 and
A4: x <> y ; ::_thesis: x,y are_orthogonal
thus |(x,y)| = 0 by A1, A2, A3, A4, Def3; :: according to RVSUM_1:def_17 ::_thesis: verum
end;
assume A5: for x, y being real-valued FinSequence st x in B0 & y in B0 & x <> y holds
x,y are_orthogonal ; ::_thesis: B0 is R-orthogonal
let x, y be real-valued FinSequence; :: according to EUCLID_7:def_3 ::_thesis: ( x in B0 & y in B0 & x <> y implies |(x,y)| = 0 )
assume that
A6: x in B0 and
A7: y in B0 and
A8: x <> y ; ::_thesis: |(x,y)| = 0
x,y are_orthogonal by A5, A6, A7, A8;
hence |(x,y)| = 0 by RVSUM_1:def_17; ::_thesis: verum
end;
definition
let B0 be set ;
attrB0 is R-normal means :Def4: :: EUCLID_7:def 4
for x being real-valued FinSequence st x in B0 holds
|.x.| = 1;
end;
:: deftheorem Def4 defines R-normal EUCLID_7:def_4_:_
for B0 being set holds
( B0 is R-normal iff for x being real-valued FinSequence st x in B0 holds
|.x.| = 1 );
registration
cluster empty -> R-normal for set ;
coherence
for b1 being set st b1 is empty holds
b1 is R-normal
proof
let X be set ; ::_thesis: ( X is empty implies X is R-normal )
assume A1: X is empty ; ::_thesis: X is R-normal
let f be real-valued FinSequence; :: according to EUCLID_7:def_4 ::_thesis: ( f in X implies |.f.| = 1 )
thus ( f in X implies |.f.| = 1 ) by A1; ::_thesis: verum
end;
end;
registration
cluster R-normal for set ;
existence
ex b1 being set st b1 is R-normal
proof
take {} ; ::_thesis: {} is R-normal
thus {} is R-normal ; ::_thesis: verum
end;
end;
registration
let B0, B1 be R-normal set ;
clusterB0 \/ B1 -> R-normal ;
coherence
B0 \/ B1 is R-normal
proof
let x be real-valued FinSequence; :: according to EUCLID_7:def_4 ::_thesis: ( x in B0 \/ B1 implies |.x.| = 1 )
assume x in B0 \/ B1 ; ::_thesis: |.x.| = 1
then ( x in B0 or x in B1 ) by XBOOLE_0:def_3;
hence |.x.| = 1 by Def4; ::_thesis: verum
end;
end;
theorem Th16: :: EUCLID_7:16
for f being real-valued FinSequence st |.f.| = 1 holds
{f} is R-normal
proof
let f be real-valued FinSequence; ::_thesis: ( |.f.| = 1 implies {f} is R-normal )
assume A1: |.f.| = 1 ; ::_thesis: {f} is R-normal
let x be real-valued FinSequence; :: according to EUCLID_7:def_4 ::_thesis: ( x in {f} implies |.x.| = 1 )
assume x in {f} ; ::_thesis: |.x.| = 1
hence |.x.| = 1 by A1, TARSKI:def_1; ::_thesis: verum
end;
theorem Th17: :: EUCLID_7:17
for B0 being set
for x0 being real-valued FinSequence st B0 is R-normal & |.x0.| = 1 holds
B0 \/ {x0} is R-normal
proof
let B0 be set ; ::_thesis: for x0 being real-valued FinSequence st B0 is R-normal & |.x0.| = 1 holds
B0 \/ {x0} is R-normal
let x0 be real-valued FinSequence; ::_thesis: ( B0 is R-normal & |.x0.| = 1 implies B0 \/ {x0} is R-normal )
assume that
A1: B0 is R-normal and
A2: |.x0.| = 1 ; ::_thesis: B0 \/ {x0} is R-normal
{x0} is R-normal by A2, Th16;
hence B0 \/ {x0} is R-normal by A1; ::_thesis: verum
end;
definition
let B0 be set ;
attrB0 is R-orthonormal means :Def5: :: EUCLID_7:def 5
( B0 is R-orthogonal & B0 is R-normal );
end;
:: deftheorem Def5 defines R-orthonormal EUCLID_7:def_5_:_
for B0 being set holds
( B0 is R-orthonormal iff ( B0 is R-orthogonal & B0 is R-normal ) );
registration
cluster R-orthonormal -> R-orthogonal R-normal for set ;
coherence
for b1 being set st b1 is R-orthonormal holds
( b1 is R-orthogonal & b1 is R-normal ) by Def5;
cluster R-orthogonal R-normal -> R-orthonormal for set ;
coherence
for b1 being set st b1 is R-orthogonal & b1 is R-normal holds
b1 is R-orthonormal by Def5;
end;
registration
cluster{<*1*>} -> R-orthonormal ;
coherence
{<*1*>} is R-orthonormal
proof
set B0 = {<*1*>};
thus for x, y being real-valued FinSequence st x in {<*1*>} & y in {<*1*>} & x <> y holds
|(x,y)| = 0 :: according to EUCLID_7:def_3,EUCLID_7:def_5 ::_thesis: {<*1*>} is R-normal
proof
let x, y be real-valued FinSequence; ::_thesis: ( x in {<*1*>} & y in {<*1*>} & x <> y implies |(x,y)| = 0 )
assume that
A1: x in {<*1*>} and
A2: y in {<*1*>} ; ::_thesis: ( not x <> y or |(x,y)| = 0 )
x = <*1*> by A1, TARSKI:def_1;
hence ( not x <> y or |(x,y)| = 0 ) by A2, TARSKI:def_1; ::_thesis: verum
end;
let x be real-valued FinSequence; :: according to EUCLID_7:def_4 ::_thesis: ( x in {<*1*>} implies |.x.| = 1 )
assume x in {<*1*>} ; ::_thesis: |.x.| = 1
then x = <*1*> by TARSKI:def_1;
then sqr x = <*(1 ^2)*> by RVSUM_1:55;
hence |.x.| = 1 by RVSUM_1:73, SQUARE_1:18; ::_thesis: verum
end;
end;
registration
cluster non empty R-orthonormal for set ;
existence
ex b1 being set st
( b1 is R-orthonormal & not b1 is empty )
proof
take {<*1*>} ; ::_thesis: ( {<*1*>} is R-orthonormal & not {<*1*>} is empty )
thus ( {<*1*>} is R-orthonormal & not {<*1*>} is empty ) ; ::_thesis: verum
end;
end;
registration
let n be Nat;
cluster functional FinSequence-membered R-orthonormal for Element of bool (REAL n);
existence
ex b1 being Subset of (REAL n) st b1 is R-orthonormal
proof
{} (REAL n) is R-orthonormal ;
hence ex b1 being Subset of (REAL n) st b1 is R-orthonormal ; ::_thesis: verum
end;
end;
definition
let n be Nat;
let B0 be Subset of (REAL n);
attrB0 is complete means :Def6: :: EUCLID_7:def 6
for B being R-orthonormal Subset of (REAL n) st B0 c= B holds
B = B0;
end;
:: deftheorem Def6 defines complete EUCLID_7:def_6_:_
for n being Nat
for B0 being Subset of (REAL n) holds
( B0 is complete iff for B being R-orthonormal Subset of (REAL n) st B0 c= B holds
B = B0 );
definition
let n be Nat;
let B0 be Subset of (REAL n);
attrB0 is orthogonal_basis means :Def7: :: EUCLID_7:def 7
( B0 is R-orthonormal & B0 is complete );
end;
:: deftheorem Def7 defines orthogonal_basis EUCLID_7:def_7_:_
for n being Nat
for B0 being Subset of (REAL n) holds
( B0 is orthogonal_basis iff ( B0 is R-orthonormal & B0 is complete ) );
registration
let n be Nat;
cluster orthogonal_basis -> R-orthonormal complete for Element of bool (REAL n);
coherence
for b1 being Subset of (REAL n) st b1 is orthogonal_basis holds
( b1 is R-orthonormal & b1 is complete ) by Def7;
cluster R-orthonormal complete -> orthogonal_basis for Element of bool (REAL n);
coherence
for b1 being Subset of (REAL n) st b1 is R-orthonormal & b1 is complete holds
b1 is orthogonal_basis by Def7;
end;
theorem Th18: :: EUCLID_7:18
for B0 being Subset of (REAL 0) st B0 is orthogonal_basis holds
B0 = {}
proof
let B0 be Subset of (REAL 0); ::_thesis: ( B0 is orthogonal_basis implies B0 = {} )
assume that
A1: B0 is orthogonal_basis and
A2: B0 <> {} ; ::_thesis: contradiction
set x = the Element of B0;
the Element of B0 in B0 by A2;
then reconsider x0 = the Element of B0 as Element of REAL 0 ;
|((0* (len x0)),(0* (len x0)))| = 0 by EUCLID_2:9;
then |.(0* (len x0)).| = 0 by EUCLID_2:8;
hence contradiction by A1, A2, Def4; ::_thesis: verum
end;
theorem :: EUCLID_7:19
for n being Nat
for B0 being Subset of (REAL n)
for y being Element of REAL n st B0 is orthogonal_basis & ( for x being Element of REAL n st x in B0 holds
|(x,y)| = 0 ) holds
y = 0* n
proof
let n be Nat; ::_thesis: for B0 being Subset of (REAL n)
for y being Element of REAL n st B0 is orthogonal_basis & ( for x being Element of REAL n st x in B0 holds
|(x,y)| = 0 ) holds
y = 0* n
let B0 be Subset of (REAL n); ::_thesis: for y being Element of REAL n st B0 is orthogonal_basis & ( for x being Element of REAL n st x in B0 holds
|(x,y)| = 0 ) holds
y = 0* n
let y be Element of REAL n; ::_thesis: ( B0 is orthogonal_basis & ( for x being Element of REAL n st x in B0 holds
|(x,y)| = 0 ) implies y = 0* n )
assume that
A1: B0 is orthogonal_basis and
A2: for x being Element of REAL n st x in B0 holds
|(x,y)| = 0 ; ::_thesis: y = 0* n
now__::_thesis:_not_y_<>_0*_n
reconsider y1 = (1 / |.y.|) * y as Element of REAL n ;
reconsider B1 = B0 \/ {y1} as Subset of (REAL n) ;
y1 in {y1} by TARSKI:def_1;
then A3: y1 in B1 by XBOOLE_0:def_3;
A4: len y = n by CARD_1:def_7;
for x2, y2 being real-valued FinSequence st x2 in B1 & y2 in B1 & x2 <> y2 holds
|(x2,y2)| = 0
proof
let x2, y2 be real-valued FinSequence; ::_thesis: ( x2 in B1 & y2 in B1 & x2 <> y2 implies |(x2,y2)| = 0 )
assume that
A5: x2 in B1 and
A6: y2 in B1 and
A7: x2 <> y2 ; ::_thesis: |(x2,y2)| = 0
reconsider X2 = x2, Y2 = y2 as Element of REAL n by A5, A6;
A8: len Y2 = n by CARD_1:def_7;
percases ( x2 in B0 or x2 in {y1} ) by A5, XBOOLE_0:def_3;
supposeA9: x2 in B0 ; ::_thesis: |(x2,y2)| = 0
percases ( y2 in B0 or y2 in {y1} ) by A6, XBOOLE_0:def_3;
suppose y2 in B0 ; ::_thesis: |(x2,y2)| = 0
hence |(x2,y2)| = 0 by A1, A7, A9, Def3; ::_thesis: verum
end;
supposeA10: y2 in {y1} ; ::_thesis: |(x2,y2)| = 0
A11: len X2 = n by CARD_1:def_7;
|(x2,y)| = 0 by A2, A9;
then A12: (1 / |.y.|) * |(x2,y)| = 0 ;
y2 = y1 by A10, TARSKI:def_1;
hence |(x2,y2)| = 0 by A4, A11, A12, RVSUM_1:121; ::_thesis: verum
end;
end;
end;
supposeA13: x2 in {y1} ; ::_thesis: |(x2,y2)| = 0
then x2 = y1 by TARSKI:def_1;
then not y2 in {y1} by A7, TARSKI:def_1;
then y2 in B0 by A6, XBOOLE_0:def_3;
then |(y2,y)| = 0 by A2;
then (1 / |.y.|) * |(y2,y)| = 0 ;
then |(Y2,((1 / |.y.|) * y))| = 0 by A4, A8, RVSUM_1:121;
hence |(x2,y2)| = 0 by A13, TARSKI:def_1; ::_thesis: verum
end;
end;
end;
then A14: B1 is R-orthogonal by Def3;
assume A15: y <> 0* n ; ::_thesis: contradiction
A16: |.y1.| = (abs (1 / |.y.|)) * |.y.| by EUCLID:11
.= (1 / |.y.|) * |.y.| by ABSVALUE:def_1
.= 1 by A15, EUCLID:8, XCMPLX_1:106 ;
for x being real-valued FinSequence st x in B1 holds
|.x.| = 1
proof
let x be real-valued FinSequence; ::_thesis: ( x in B1 implies |.x.| = 1 )
assume x in B1 ; ::_thesis: |.x.| = 1
then ( x in B0 or x in {y1} ) by XBOOLE_0:def_3;
hence |.x.| = 1 by A1, A16, Def4, TARSKI:def_1; ::_thesis: verum
end;
then A17: B1 is R-normal by Def4;
A18: len y1 = n by CARD_1:def_7;
A19: now__::_thesis:_not_y1_in_B0
assume y1 in B0 ; ::_thesis: contradiction
then |(y1,y)| = 0 by A2;
then (1 / |.y.|) * |(y1,y)| = 0 ;
then |(y1,((1 / |.y.|) * y))| = 0 by A4, A18, RVSUM_1:121;
hence contradiction by A16, EUCLID_2:8; ::_thesis: verum
end;
B0 c= B1 by XBOOLE_1:7;
hence contradiction by A1, A19, A3, A14, A17, Def6; ::_thesis: verum
end;
hence y = 0* n ; ::_thesis: verum
end;
begin
definition
let n be Nat;
let X be Subset of (REAL n);
attrX is linear_manifold means :Def8: :: EUCLID_7:def 8
for x, y being Element of REAL n
for a, b being Element of REAL st x in X & y in X holds
(a * x) + (b * y) in X;
end;
:: deftheorem Def8 defines linear_manifold EUCLID_7:def_8_:_
for n being Nat
for X being Subset of (REAL n) holds
( X is linear_manifold iff for x, y being Element of REAL n
for a, b being Element of REAL st x in X & y in X holds
(a * x) + (b * y) in X );
registration
let n be Nat;
cluster [#] (REAL n) -> linear_manifold ;
coherence
[#] (REAL n) is linear_manifold
proof
let x, y be Element of REAL n; :: according to EUCLID_7:def_8 ::_thesis: for a, b being Element of REAL st x in [#] (REAL n) & y in [#] (REAL n) holds
(a * x) + (b * y) in [#] (REAL n)
let a, b be Element of REAL ; ::_thesis: ( x in [#] (REAL n) & y in [#] (REAL n) implies (a * x) + (b * y) in [#] (REAL n) )
assume that
x in [#] (REAL n) and
y in [#] (REAL n) ; ::_thesis: (a * x) + (b * y) in [#] (REAL n)
(a * x) + (b * y) in REAL n ;
hence (a * x) + (b * y) in [#] (REAL n) by SUBSET_1:def_3; ::_thesis: verum
end;
end;
theorem Th20: :: EUCLID_7:20
for n being Nat holds {(0* n)} is linear_manifold
proof
let n be Nat; ::_thesis: {(0* n)} is linear_manifold
let x, y be Element of REAL n; :: according to EUCLID_7:def_8 ::_thesis: for a, b being Element of REAL st x in {(0* n)} & y in {(0* n)} holds
(a * x) + (b * y) in {(0* n)}
let a, b be Element of REAL ; ::_thesis: ( x in {(0* n)} & y in {(0* n)} implies (a * x) + (b * y) in {(0* n)} )
assume that
A1: x in {(0* n)} and
A2: y in {(0* n)} ; ::_thesis: (a * x) + (b * y) in {(0* n)}
reconsider nn = n as Element of NAT by ORDINAL1:def_12;
A3: y = 0* n by A2, TARSKI:def_1;
x = 0* n by A1, TARSKI:def_1;
then (a * x) + (b * y) = (0* nn) + (b * (0* nn)) by A3, EUCLID_4:2
.= (0* nn) + (0* nn) by EUCLID_4:2
.= 0* nn by EUCLID_4:1 ;
hence (a * x) + (b * y) in {(0* n)} by TARSKI:def_1; ::_thesis: verum
end;
registration
let n be Nat;
cluster{(0* n)} -> linear_manifold for Subset of (REAL n);
coherence
for b1 being Subset of (REAL n) st b1 = {(0* n)} holds
b1 is linear_manifold by Th20;
end;
definition
let n be Nat;
let X be Subset of (REAL n);
func L_Span X -> Subset of (REAL n) equals :: EUCLID_7:def 9
meet { Y where Y is Subset of (REAL n) : ( Y is linear_manifold & X c= Y ) } ;
correctness
coherence
meet { Y where Y is Subset of (REAL n) : ( Y is linear_manifold & X c= Y ) } is Subset of (REAL n);
proof
X c= REAL n ;
then X c= [#] (REAL n) by SUBSET_1:def_3;
then [#] (REAL n) in { Y where Y is Subset of (REAL n) : ( Y is linear_manifold & X c= Y ) } ;
hence meet { Y where Y is Subset of (REAL n) : ( Y is linear_manifold & X c= Y ) } is Subset of (REAL n) by SETFAM_1:7; ::_thesis: verum
end;
end;
:: deftheorem defines L_Span EUCLID_7:def_9_:_
for n being Nat
for X being Subset of (REAL n) holds L_Span X = meet { Y where Y is Subset of (REAL n) : ( Y is linear_manifold & X c= Y ) } ;
registration
let n be Nat;
let X be Subset of (REAL n);
cluster L_Span X -> linear_manifold ;
coherence
L_Span X is linear_manifold
proof
X c= REAL n ;
then X c= [#] (REAL n) by SUBSET_1:def_3;
then [#] (REAL n) in { Y where Y is Subset of (REAL n) : ( Y is linear_manifold & X c= Y ) } ;
then reconsider Z = { Y where Y is Subset of (REAL n) : ( Y is linear_manifold & X c= Y ) } as non empty set ;
let x, y be Element of REAL n; :: according to EUCLID_7:def_8 ::_thesis: for a, b being Element of REAL st x in L_Span X & y in L_Span X holds
(a * x) + (b * y) in L_Span X
let a, b be Element of REAL ; ::_thesis: ( x in L_Span X & y in L_Span X implies (a * x) + (b * y) in L_Span X )
assume that
A1: x in L_Span X and
A2: y in L_Span X ; ::_thesis: (a * x) + (b * y) in L_Span X
A3: for Y4 being set st Y4 in { Y where Y is Subset of (REAL n) : ( Y is linear_manifold & X c= Y ) } holds
(a * x) + (b * y) in Y4
proof
let Y4 be set ; ::_thesis: ( Y4 in { Y where Y is Subset of (REAL n) : ( Y is linear_manifold & X c= Y ) } implies (a * x) + (b * y) in Y4 )
assume A4: Y4 in { Y where Y is Subset of (REAL n) : ( Y is linear_manifold & X c= Y ) } ; ::_thesis: (a * x) + (b * y) in Y4
then A5: ex Y0 being Subset of (REAL n) st
( Y4 = Y0 & Y0 is linear_manifold & X c= Y0 ) ;
A6: y in Y4 by A2, A4, SETFAM_1:def_1;
x in Y4 by A1, A4, SETFAM_1:def_1;
hence (a * x) + (b * y) in Y4 by A6, A5, Def8; ::_thesis: verum
end;
Z <> {} ;
hence (a * x) + (b * y) in L_Span X by A3, SETFAM_1:def_1; ::_thesis: verum
end;
end;
definition
let n be Nat;
let f be FinSequence of REAL n;
func accum f -> FinSequence of REAL n means :Def10: :: EUCLID_7:def 10
( len f = len it & f . 1 = it . 1 & ( for i being Nat st 1 <= i & i < len f holds
it . (i + 1) = (it /. i) + (f /. (i + 1)) ) );
existence
ex b1 being FinSequence of REAL n st
( len f = len b1 & f . 1 = b1 . 1 & ( for i being Nat st 1 <= i & i < len f holds
b1 . (i + 1) = (b1 /. i) + (f /. (i + 1)) ) )
proof
percases ( len f > 0 or len f <= 0 ) ;
supposeA1: len f > 0 ; ::_thesis: ex b1 being FinSequence of REAL n st
( len f = len b1 & f . 1 = b1 . 1 & ( for i being Nat st 1 <= i & i < len f holds
b1 . (i + 1) = (b1 /. i) + (f /. (i + 1)) ) )
reconsider q = <*(f /. 1)*> as FinSequence of REAL n ;
A2: 0 + 1 <= len f by A1, NAT_1:13;
then f /. 1 = f . 1 by FINSEQ_4:15;
then A3: q . 1 = f . 1 by FINSEQ_1:40;
defpred S1[ Nat] means ( $1 + 1 <= len f implies ex g being FinSequence of REAL n st
( $1 + 1 = len g & f . 1 = g . 1 & ( for i being Nat st 1 <= i & i < $1 + 1 holds
g . (i + 1) = (g /. i) + (f /. (i + 1)) ) ) );
A4: for i being Nat st 1 <= i & i < 0 + 1 holds
q . (i + 1) = (q /. i) + (f /. (i + 1)) ;
A5: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A6: S1[k] ; ::_thesis: S1[k + 1]
now__::_thesis:_(_(_(k_+_1)_+_1_<=_len_f_&_S1[k_+_1]_)_or_(_(k_+_1)_+_1_>_len_f_&_S1[k_+_1]_)_)
percases ( (k + 1) + 1 <= len f or (k + 1) + 1 > len f ) ;
caseA7: (k + 1) + 1 <= len f ; ::_thesis: S1[k + 1]
k + 1 < (k + 1) + 1 by XREAL_1:29;
then consider g being FinSequence of REAL n such that
A8: k + 1 = len g and
A9: f . 1 = g . 1 and
A10: for i being Nat st 1 <= i & i < k + 1 holds
g . (i + 1) = (g /. i) + (f /. (i + 1)) by A6, A7, XXREAL_0:2;
reconsider g2 = g ^ <*((g /. (k + 1)) + (f /. ((k + 1) + 1)))*> as FinSequence of REAL n ;
A11: Seg (len g) = dom g by FINSEQ_1:def_3;
A12: len g2 = (len g) + (len <*((g /. (k + 1)) + (f /. ((k + 1) + 1)))*>) by FINSEQ_1:22
.= (k + 1) + 1 by A8, FINSEQ_1:40 ;
A13: for i being Nat st 1 <= i & i < (k + 1) + 1 holds
g2 . (i + 1) = (g2 /. i) + (f /. (i + 1))
proof
let i be Nat; ::_thesis: ( 1 <= i & i < (k + 1) + 1 implies g2 . (i + 1) = (g2 /. i) + (f /. (i + 1)) )
assume that
A14: 1 <= i and
A15: i < (k + 1) + 1 ; ::_thesis: g2 . (i + 1) = (g2 /. i) + (f /. (i + 1))
A16: i <= k + 1 by A15, NAT_1:13;
percases ( i < k + 1 or i = k + 1 ) by A16, XXREAL_0:1;
supposeA17: i < k + 1 ; ::_thesis: g2 . (i + 1) = (g2 /. i) + (f /. (i + 1))
A18: 1 <= i + 1 by NAT_1:12;
i + 1 <= k + 1 by A17, NAT_1:13;
then i + 1 in Seg (len g) by A8, A18, FINSEQ_1:1;
then A19: g2 . (i + 1) = g . (i + 1) by A11, FINSEQ_1:def_7;
i in Seg (len g) by A8, A14, A16, FINSEQ_1:1;
then A20: g2 . i = g . i by A11, FINSEQ_1:def_7;
A21: g /. i = g . i by A8, A14, A17, FINSEQ_4:15;
g2 /. i = g2 . i by A12, A14, A15, FINSEQ_4:15;
hence g2 . (i + 1) = (g2 /. i) + (f /. (i + 1)) by A10, A14, A17, A19, A20, A21; ::_thesis: verum
end;
supposeA22: i = k + 1 ; ::_thesis: g2 . (i + 1) = (g2 /. i) + (f /. (i + 1))
A23: g2 /. i = g2 . i by A12, A14, A15, FINSEQ_4:15;
i in Seg (len g) by A8, A14, A16, FINSEQ_1:1;
then A24: g . i = g2 . i by A11, FINSEQ_1:def_7;
g /. i = g . i by A8, A14, A16, FINSEQ_4:15;
hence g2 . (i + 1) = (g2 /. i) + (f /. (i + 1)) by A8, A22, A24, A23, FINSEQ_1:42; ::_thesis: verum
end;
end;
end;
1 <= k + 1 by NAT_1:11;
then 1 in Seg (len g) by A8, FINSEQ_1:1;
then g2 . 1 = f . 1 by A9, A11, FINSEQ_1:def_7;
hence S1[k + 1] by A12, A13; ::_thesis: verum
end;
case (k + 1) + 1 > len f ; ::_thesis: S1[k + 1]
hence S1[k + 1] ; ::_thesis: verum
end;
end;
end;
hence S1[k + 1] ; ::_thesis: verum
end;
(len f) -' 1 = (len f) - 1 by A2, XREAL_1:233;
then A25: ((len f) -' 1) + 1 = len f ;
len q = 1 by FINSEQ_1:40;
then A26: S1[ 0 ] by A3, A4;
for k being Nat holds S1[k] from NAT_1:sch_2(A26, A5);
hence ex b1 being FinSequence of REAL n st
( len f = len b1 & f . 1 = b1 . 1 & ( for i being Nat st 1 <= i & i < len f holds
b1 . (i + 1) = (b1 /. i) + (f /. (i + 1)) ) ) by A25; ::_thesis: verum
end;
supposeA27: len f <= 0 ; ::_thesis: ex b1 being FinSequence of REAL n st
( len f = len b1 & f . 1 = b1 . 1 & ( for i being Nat st 1 <= i & i < len f holds
b1 . (i + 1) = (b1 /. i) + (f /. (i + 1)) ) )
take f ; ::_thesis: ( len f = len f & f . 1 = f . 1 & ( for i being Nat st 1 <= i & i < len f holds
f . (i + 1) = (f /. i) + (f /. (i + 1)) ) )
thus ( len f = len f & f . 1 = f . 1 ) ; ::_thesis: for i being Nat st 1 <= i & i < len f holds
f . (i + 1) = (f /. i) + (f /. (i + 1))
let i be Nat; ::_thesis: ( 1 <= i & i < len f implies f . (i + 1) = (f /. i) + (f /. (i + 1)) )
thus ( 1 <= i & i < len f implies f . (i + 1) = (f /. i) + (f /. (i + 1)) ) by A27; ::_thesis: verum
end;
end;
end;
uniqueness
for b1, b2 being FinSequence of REAL n st len f = len b1 & f . 1 = b1 . 1 & ( for i being Nat st 1 <= i & i < len f holds
b1 . (i + 1) = (b1 /. i) + (f /. (i + 1)) ) & len f = len b2 & f . 1 = b2 . 1 & ( for i being Nat st 1 <= i & i < len f holds
b2 . (i + 1) = (b2 /. i) + (f /. (i + 1)) ) holds
b1 = b2
proof
let g1, g2 be FinSequence of REAL n; ::_thesis: ( len f = len g1 & f . 1 = g1 . 1 & ( for i being Nat st 1 <= i & i < len f holds
g1 . (i + 1) = (g1 /. i) + (f /. (i + 1)) ) & len f = len g2 & f . 1 = g2 . 1 & ( for i being Nat st 1 <= i & i < len f holds
g2 . (i + 1) = (g2 /. i) + (f /. (i + 1)) ) implies g1 = g2 )
assume that
A28: len f = len g1 and
A29: f . 1 = g1 . 1 and
A30: for i being Nat st 1 <= i & i < len f holds
g1 . (i + 1) = (g1 /. i) + (f /. (i + 1)) ; ::_thesis: ( not len f = len g2 or not f . 1 = g2 . 1 or ex i being Nat st
( 1 <= i & i < len f & not g2 . (i + 1) = (g2 /. i) + (f /. (i + 1)) ) or g1 = g2 )
defpred S1[ Nat] means ( 1 <= $1 & $1 <= len f implies g1 . $1 = g2 . $1 );
assume that
A31: len f = len g2 and
A32: f . 1 = g2 . 1 and
A33: for i being Nat st 1 <= i & i < len f holds
g2 . (i + 1) = (g2 /. i) + (f /. (i + 1)) ; ::_thesis: g1 = g2
A34: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A35: S1[k] ; ::_thesis: S1[k + 1]
( 1 <= k + 1 & k + 1 <= len f implies g1 . (k + 1) = g2 . (k + 1) )
proof
assume that
1 <= k + 1 and
A36: k + 1 <= len f ; ::_thesis: g1 . (k + 1) = g2 . (k + 1)
A37: k < k + 1 by XREAL_1:29;
then A38: k < len f by A36, XXREAL_0:2;
percases ( 1 <= k or 1 > k ) ;
supposeA39: 1 <= k ; ::_thesis: g1 . (k + 1) = g2 . (k + 1)
then A40: g2 . (k + 1) = (g2 /. k) + (f /. (k + 1)) by A33, A38;
A41: k <= len g2 by A31, A36, A37, XXREAL_0:2;
A42: g1 /. k = g1 . k by A28, A38, A39, FINSEQ_4:15;
g1 . (k + 1) = (g1 /. k) + (f /. (k + 1)) by A30, A38, A39;
hence g1 . (k + 1) = g2 . (k + 1) by A35, A36, A37, A39, A40, A42, A41, FINSEQ_4:15, XXREAL_0:2; ::_thesis: verum
end;
suppose 1 > k ; ::_thesis: g1 . (k + 1) = g2 . (k + 1)
then 0 + 1 > k ;
then k = 0 by NAT_1:13;
hence g1 . (k + 1) = g2 . (k + 1) by A29, A32; ::_thesis: verum
end;
end;
end;
hence S1[k + 1] ; ::_thesis: verum
end;
A43: S1[ 0 ] ;
for k being Nat holds S1[k] from NAT_1:sch_2(A43, A34);
hence g1 = g2 by A28, A31, FINSEQ_1:14; ::_thesis: verum
end;
end;
:: deftheorem Def10 defines accum EUCLID_7:def_10_:_
for n being Nat
for f, b3 being FinSequence of REAL n holds
( b3 = accum f iff ( len f = len b3 & f . 1 = b3 . 1 & ( for i being Nat st 1 <= i & i < len f holds
b3 . (i + 1) = (b3 /. i) + (f /. (i + 1)) ) ) );
definition
let n be Nat;
let f be FinSequence of REAL n;
func Sum f -> Element of REAL n equals :Def11: :: EUCLID_7:def 11
(accum f) . (len f) if len f > 0
otherwise 0* n;
coherence
( ( len f > 0 implies (accum f) . (len f) is Element of REAL n ) & ( not len f > 0 implies 0* n is Element of REAL n ) )
proof
A1: len f = len (accum f) by Def10;
now__::_thesis:_(_(_len_f_>_0_&_(accum_f)_._(len_f)_is_Element_of_REAL_n_)_or_(_len_f_<=_0_&_(_len_f_>_0_implies_(accum_f)_._(len_f)_is_Element_of_REAL_n_)_&_(_not_len_f_>_0_implies_0*_n_is_Element_of_REAL_n_)_)_)
percases ( len f > 0 or len f <= 0 ) ;
case len f > 0 ; ::_thesis: (accum f) . (len f) is Element of REAL n
then 0 + 1 <= len f by NAT_1:13;
then len f in dom (accum f) by A1, FINSEQ_3:25;
then (accum f) . (len f) in rng (accum f) by FUNCT_1:def_3;
hence (accum f) . (len f) is Element of REAL n ; ::_thesis: verum
end;
case len f <= 0 ; ::_thesis: ( ( len f > 0 implies (accum f) . (len f) is Element of REAL n ) & ( not len f > 0 implies 0* n is Element of REAL n ) )
hence ( ( len f > 0 implies (accum f) . (len f) is Element of REAL n ) & ( not len f > 0 implies 0* n is Element of REAL n ) ) ; ::_thesis: verum
end;
end;
end;
hence ( ( len f > 0 implies (accum f) . (len f) is Element of REAL n ) & ( not len f > 0 implies 0* n is Element of REAL n ) ) ; ::_thesis: verum
end;
consistency
for b1 being Element of REAL n holds verum ;
end;
:: deftheorem Def11 defines Sum EUCLID_7:def_11_:_
for n being Nat
for f being FinSequence of REAL n holds
( ( len f > 0 implies Sum f = (accum f) . (len f) ) & ( not len f > 0 implies Sum f = 0* n ) );
theorem Th21: :: EUCLID_7:21
for n being Nat
for F, F2 being FinSequence of REAL n
for h being Permutation of (dom F) st F2 = F (*) h holds
Sum F2 = Sum F
proof
let n be Nat; ::_thesis: for F, F2 being FinSequence of REAL n
for h being Permutation of (dom F) st F2 = F (*) h holds
Sum F2 = Sum F
let F, F2 be FinSequence of REAL n; ::_thesis: for h being Permutation of (dom F) st F2 = F (*) h holds
Sum F2 = Sum F
let h be Permutation of (dom F); ::_thesis: ( F2 = F (*) h implies Sum F2 = Sum F )
assume A1: F2 = F (*) h ; ::_thesis: Sum F2 = Sum F
percases ( len F > 0 or len F <= 0 ) ;
supposeA2: len F > 0 ; ::_thesis: Sum F2 = Sum F
then A3: 0 + 1 <= len F by NAT_1:13;
then A4: 1 in Seg (len F) by FINSEQ_1:1;
then A5: 1 in dom F by FINSEQ_1:def_3;
then A6: dom h = dom F by FUNCT_2:def_1;
then rng h = dom h by FUNCT_2:def_3;
then A7: dom F2 = dom h by A1, RELAT_1:27;
then A8: Seg (len F2) = dom F by A6, FINSEQ_1:def_3;
set gF = accum F;
A9: len F = len (accum F) by Def10;
A10: for i being Nat st 1 <= i & i < len F holds
(accum F) . (i + 1) = ((accum F) /. i) + (F /. (i + 1)) by Def10;
defpred S1[ Nat] means for h2 being Permutation of (dom F) st $1 < len F & ( for i being Nat st $1 + 1 < i & i <= len F holds
h2 . i = i ) holds
(accum F) . ($1 + 1) = (accum (F (*) h2)) . ($1 + 1);
A11: dom F = Seg (len F) by FINSEQ_1:def_3;
1 in Seg (len F2) by A5, A6, A7, FINSEQ_1:def_3;
then A12: 1 <= len F2 by FINSEQ_1:1;
A13: (len F) -' 1 = (len F) - 1 by A3, XREAL_1:233;
then A14: for i being Nat st ((len F) -' 1) + 1 < i & i <= len F holds
h . i = i ;
A15: dom F <> {} by A4, FINSEQ_1:def_3;
A16: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A17: S1[k] ; ::_thesis: S1[k + 1]
for h2 being Permutation of (dom F) st k + 1 < len F & ( for i being Nat st (k + 1) + 1 < i & i <= len F holds
h2 . i = i ) holds
(accum F) . ((k + 1) + 1) = (accum (F (*) h2)) . ((k + 1) + 1)
proof
A18: 1 <= k + 1 by NAT_1:11;
A19: k + 1 < (k + 1) + 1 by XREAL_1:29;
let h2 be Permutation of (dom F); ::_thesis: ( k + 1 < len F & ( for i being Nat st (k + 1) + 1 < i & i <= len F holds
h2 . i = i ) implies (accum F) . ((k + 1) + 1) = (accum (F (*) h2)) . ((k + 1) + 1) )
assume that
A20: k + 1 < len F and
A21: for i being Nat st (k + 1) + 1 < i & i <= len F holds
h2 . i = i ; ::_thesis: (accum F) . ((k + 1) + 1) = (accum (F (*) h2)) . ((k + 1) + 1)
A22: (k + 1) + 1 <= len F by A20, NAT_1:13;
k < k + 1 by XREAL_1:29;
then A23: k < len F by A20, XXREAL_0:2;
A24: 1 < (k + 1) + 1 by XREAL_1:29;
then A25: (k + 1) + 1 in Seg (len F) by A22, FINSEQ_1:1;
then A26: (k + 1) + 1 in dom F by FINSEQ_1:def_3;
A27: dom h2 = dom F by A5, FUNCT_2:def_1;
then A28: rng h2 = dom h2 by FUNCT_2:def_3;
then A29: dom (F (*) h2) = dom h2 by RELAT_1:27
.= dom F by A5, FUNCT_2:def_1 ;
then A30: Seg (len (F (*) h2)) = dom F by FINSEQ_1:def_3;
then A31: Seg (len (F (*) h2)) = Seg (len F) by FINSEQ_1:def_3;
A32: len (F (*) h2) = len F by A30, FINSEQ_1:def_3;
h2 is FinSequence by A11, A27, FINSEQ_1:def_2;
then reconsider h2r = h2 as FinSequence of NAT by A27, A28, FINSEQ_1:def_4;
dom h2 = Seg (len F) by A2, A11, FUNCT_2:def_1;
then A33: len h2r = len F by FINSEQ_1:def_3;
consider x being set such that
A34: x in dom h2 and
A35: (k + 1) + 1 = h2 . x by A11, A27, A28, A25, FUNCT_1:def_3;
reconsider nx = x as Element of NAT by A27, A34;
A36: nx <= len F by A11, A34, FINSEQ_1:1;
reconsider h2b = Swap (h2r,nx,((k + 1) + 1)) as FinSequence of NAT ;
A37: rng h2b = rng h2 by FINSEQ_7:22
.= dom F by FUNCT_2:def_3 ;
A38: len h2b = len h2r by FINSEQ_7:18;
then dom h2b = Seg (len h2r) by FINSEQ_1:def_3;
then A39: dom h2b = dom h2 by FINSEQ_1:def_3
.= dom F by A15, FUNCT_2:def_1 ;
then reconsider h2d = h2b as Function of (dom F),(dom F) by A37, FUNCT_2:1;
A40: h2d is one-to-one by INT_5:39;
h2d is onto by A37, FUNCT_2:def_3;
then reconsider h4 = h2d as Permutation of (dom F) by A40;
A41: 1 <= nx by A11, A34, FINSEQ_1:1;
then A42: h4 . nx = h2r . ((k + 1) + 1) by A22, A24, A36, A33, Th10;
A43: dom h4 = dom F by A5, FUNCT_2:def_1;
rng h4 c= dom F ;
then A44: dom (F (*) h4) = dom h4 by RELAT_1:27
.= dom F by A5, FUNCT_2:def_1 ;
then Seg (len (F (*) h4)) = dom F by FINSEQ_1:def_3;
then A45: len (F (*) h4) = len F by FINSEQ_1:def_3;
percases ( nx <= k + 1 or nx > k + 1 ) ;
supposeA46: nx <= k + 1 ; ::_thesis: (accum F) . ((k + 1) + 1) = (accum (F (*) h2)) . ((k + 1) + 1)
A47: (k + 1) + 1 <= len h2r by A20, A33, NAT_1:13;
A48: nx <= len h2r by A11, A34, A33, FINSEQ_1:1;
A49: F . ((k + 1) + 1) = (F (*) h2) . nx by A34, A35, FUNCT_1:13;
A50: len (accum (F (*) h4)) = len (F (*) h4) by Def10;
A51: 1 <= nx by A11, A34, FINSEQ_1:1;
A52: 1 <= (k + 1) + 1 by NAT_1:11;
then A53: h2b . ((k + 1) + 1) = (k + 1) + 1 by A35, A51, A48, A47, Th10;
A54: for i being Nat st k + 1 < i & i <= len F holds
h4 . i = i
proof
let i be Nat; ::_thesis: ( k + 1 < i & i <= len F implies h4 . i = i )
assume that
A55: k + 1 < i and
A56: i <= len F ; ::_thesis: h4 . i = i
A57: (k + 1) + 1 <= i by A55, NAT_1:13;
percases ( (k + 1) + 1 < i or (k + 1) + 1 >= i ) ;
supposeA58: (k + 1) + 1 < i ; ::_thesis: h4 . i = i
1 <= k + 1 by NAT_1:11;
then A59: 1 < i by A55, XXREAL_0:2;
then h4 . i = h2b /. i by A33, A38, A56, FINSEQ_4:15
.= h2r /. i by A33, A46, A55, A56, A58, A59, FINSEQ_7:30
.= h2 . i by A33, A56, A59, FINSEQ_4:15
.= i by A21, A56, A58 ;
hence h4 . i = i ; ::_thesis: verum
end;
suppose (k + 1) + 1 >= i ; ::_thesis: h4 . i = i
then i = (k + 1) + 1 by A57, XXREAL_0:1;
hence h4 . i = i by A35, A51, A48, A52, A47, Th10; ::_thesis: verum
end;
end;
end;
A60: F /. ((k + 1) + 1) = F . ((k + 1) + 1) by A22, A24, FINSEQ_4:15;
A61: 1 <= k + 1 by NAT_1:11;
A62: len (accum (F (*) h2)) = len (F (*) h2) by Def10;
A63: nx < (k + 1) + 1 by A19, A46, XXREAL_0:2;
A64: for i4 being Nat st 1 <= i4 & i4 < nx holds
(accum (F (*) h2)) . i4 = (accum (F (*) h4)) . i4
proof
defpred S2[ Nat] means ( 1 + $1 < nx implies (accum (F (*) h2)) . (1 + $1) = (accum (F (*) h4)) . (1 + $1) );
let i4 be Nat; ::_thesis: ( 1 <= i4 & i4 < nx implies (accum (F (*) h2)) . i4 = (accum (F (*) h4)) . i4 )
assume that
A65: 1 <= i4 and
A66: i4 < nx ; ::_thesis: (accum (F (*) h2)) . i4 = (accum (F (*) h4)) . i4
A67: 1 + (i4 -' 1) = (i4 - 1) + 1 by A65, XREAL_1:233
.= i4 ;
A68: for k3 being Nat st S2[k3] holds
S2[k3 + 1]
proof
let k3 be Nat; ::_thesis: ( S2[k3] implies S2[k3 + 1] )
A69: 1 <= k3 + 1 by NAT_1:11;
assume A70: S2[k3] ; ::_thesis: S2[k3 + 1]
( 1 + (k3 + 1) < nx implies (accum (F (*) h2)) . (1 + (k3 + 1)) = (accum (F (*) h4)) . (1 + (k3 + 1)) )
proof
assume A71: 1 + (k3 + 1) < nx ; ::_thesis: (accum (F (*) h2)) . (1 + (k3 + 1)) = (accum (F (*) h4)) . (1 + (k3 + 1))
then A72: 1 + (k3 + 1) < len F by A36, XXREAL_0:2;
then A73: h2r /. ((k3 + 1) + 1) = h2r . ((k3 + 1) + 1) by A33, FINSEQ_4:15, NAT_1:11;
A74: (k3 + 1) + 1 < (k + 1) + 1 by A63, A71, XXREAL_0:2;
A75: h2b /. ((k3 + 1) + 1) = h2b . ((k3 + 1) + 1) by A33, A38, A72, FINSEQ_4:15, NAT_1:11;
1 <= 1 + (k3 + 1) by NAT_1:11;
then (k3 + 1) + 1 in Seg (len F) by A72, FINSEQ_1:1;
then A76: (k3 + 1) + 1 in dom (F (*) h2) by A29, FINSEQ_1:def_3;
then A77: (F (*) h2) . ((k3 + 1) + 1) = F . (h2 . ((k3 + 1) + 1)) by FUNCT_1:12
.= F . (h4 . ((k3 + 1) + 1)) by A33, A71, A72, A74, A73, A75, FINSEQ_7:30, NAT_1:11
.= (F (*) h4) . ((k3 + 1) + 1) by A44, A29, A76, FUNCT_1:12 ;
A78: (F (*) h4) /. ((k3 + 1) + 1) = (F (*) h4) . ((k3 + 1) + 1) by A45, A72, FINSEQ_4:15, NAT_1:11;
A79: k3 + 1 < 1 + (k3 + 1) by XREAL_1:29;
then A80: k3 + 1 < nx by A71, XXREAL_0:2;
then A81: k3 + 1 < len F by A36, XXREAL_0:2;
k3 + 1 < len (F (*) h2) by A36, A32, A80, XXREAL_0:2;
then A82: (accum (F (*) h4)) /. (1 + k3) = (accum (F (*) h4)) . (1 + k3) by A45, A32, A50, FINSEQ_4:15, NAT_1:11;
(accum (F (*) h2)) /. (1 + k3) = (accum (F (*) h2)) . (1 + k3) by A32, A62, A81, FINSEQ_4:15, NAT_1:11;
then (accum (F (*) h2)) . (1 + (k3 + 1)) = ((accum (F (*) h4)) /. (k3 + 1)) + ((F (*) h2) /. ((k3 + 1) + 1)) by A32, A70, A69, A71, A79, A81, A82, Def10, XXREAL_0:2
.= ((accum (F (*) h4)) /. (k3 + 1)) + ((F (*) h4) /. ((k3 + 1) + 1)) by A32, A72, A77, A78, FINSEQ_4:15, NAT_1:11 ;
hence (accum (F (*) h2)) . (1 + (k3 + 1)) = (accum (F (*) h4)) . (1 + (k3 + 1)) by A45, A69, A81, Def10; ::_thesis: verum
end;
hence S2[k3 + 1] ; ::_thesis: verum
end;
0 < k + 1 ;
then A83: 1 <> (k + 1) + 1 ;
A84: h2b /. 1 = h2b . 1 by A3, A33, A38, FINSEQ_4:15;
A85: h2r /. 1 = h2r . 1 by A3, A33, FINSEQ_4:15;
(F (*) h2) . 1 = F . (h2 . 1) by A5, A29, FUNCT_1:12
.= F . (h4 . 1) by A3, A33, A65, A66, A83, A85, A84, FINSEQ_7:30
.= (F (*) h4) . 1 by A5, A44, FUNCT_1:12 ;
then (accum (F (*) h2)) . (1 + 0) = (F (*) h4) . 1 by Def10
.= (accum (F (*) h4)) . (1 + 0) by Def10 ;
then A86: S2[ 0 ] ;
for k3 being Nat holds S2[k3] from NAT_1:sch_2(A86, A68);
hence (accum (F (*) h2)) . i4 = (accum (F (*) h4)) . i4 by A66, A67; ::_thesis: verum
end;
A87: for i being Nat st nx <= i & i < (k + 1) + 1 holds
(accum (F (*) h2)) . i = (((accum (F (*) h4)) /. i) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx)
proof
defpred S2[ Nat] means ( nx <= nx + $1 & nx + $1 < (k + 1) + 1 implies (accum (F (*) h2)) . (nx + $1) = (((accum (F (*) h4)) /. (nx + $1)) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx) );
let i be Nat; ::_thesis: ( nx <= i & i < (k + 1) + 1 implies (accum (F (*) h2)) . i = (((accum (F (*) h4)) /. i) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx) )
assume that
A88: nx <= i and
A89: i < (k + 1) + 1 ; ::_thesis: (accum (F (*) h2)) . i = (((accum (F (*) h4)) /. i) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx)
A90: len (accum (F (*) h4)) = len (F (*) h4) by Def10;
A91: len (accum (F (*) h2)) = len (F (*) h2) by Def10;
A92: for k3 being Nat st S2[k3] holds
S2[k3 + 1]
proof
let k3 be Nat; ::_thesis: ( S2[k3] implies S2[k3 + 1] )
assume A93: S2[k3] ; ::_thesis: S2[k3 + 1]
( nx <= nx + (k3 + 1) & nx + (k3 + 1) < (k + 1) + 1 implies (accum (F (*) h2)) . (nx + (k3 + 1)) = (((accum (F (*) h4)) /. (nx + (k3 + 1))) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx) )
proof
reconsider f3 = (F (*) h2) /. ((nx + k3) + 1) as Element of REAL n ;
A94: nx <= nx + k3 by NAT_1:11;
reconsider f2 = (F (*) h2) /. ((k + 1) + 1) as Element of REAL n ;
A95: nx + k3 < (nx + k3) + 1 by XREAL_1:29;
reconsider f4 = (F (*) h2) /. nx as Element of REAL n ;
reconsider f1 = (accum (F (*) h4)) /. (nx + k3) as Element of REAL n ;
assume that
nx <= nx + (k3 + 1) and
A96: nx + (k3 + 1) < (k + 1) + 1 ; ::_thesis: (accum (F (*) h2)) . (nx + (k3 + 1)) = (((accum (F (*) h4)) /. (nx + (k3 + 1))) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx)
A97: nx + (k3 + 1) < len (accum (F (*) h4)) by A22, A45, A90, A96, XXREAL_0:2;
A98: nx + k3 < (nx + k3) + 1 by XREAL_1:29;
then nx + k3 < (k + 1) + 1 by A96, XXREAL_0:2;
then A99: nx + k3 < len (F (*) h2) by A33, A32, A47, XXREAL_0:2;
then A100: (nx + k3) + 1 <= len (F (*) h2) by NAT_1:13;
nx + k3 >= 0 + 1 by A41, NAT_1:13;
then A101: 1 < nx + (k3 + 1) by A98, XXREAL_0:2;
then A102: (F (*) h4) /. ((nx + k3) + 1) = (F (*) h4) . ((nx + k3) + 1) by A45, A32, A100, FINSEQ_4:15;
(nx + k3) + 1 in Seg (len (F (*) h2)) by A101, A100, FINSEQ_1:1;
then A103: (nx + k3) + 1 in dom (F (*) h2) by FINSEQ_1:def_3;
then A104: (F (*) h4) . ((nx + k3) + 1) = F . (h4 . ((nx + k3) + 1)) by A44, A29, FUNCT_1:12
.= F . (h2b /. ((nx + k3) + 1)) by A33, A38, A32, A101, A100, FINSEQ_4:15
.= F . (h2r /. ((nx + k3) + 1)) by A33, A32, A96, A101, A100, A95, A94, FINSEQ_7:30
.= F . (h2r . ((nx + k3) + 1)) by A33, A32, A101, A100, FINSEQ_4:15
.= (F (*) h2) . ((nx + k3) + 1) by A103, FUNCT_1:12 ;
nx <= nx + k3 by NAT_1:11;
then A105: 1 <= nx + k3 by A51, XXREAL_0:2;
then (accum (F (*) h4)) . (nx + (k3 + 1)) = ((accum (F (*) h4)) /. (nx + k3)) + ((F (*) h4) /. ((nx + k3) + 1)) by A45, A32, A99, Def10
.= ((accum (F (*) h4)) /. (nx + k3)) + ((F (*) h2) /. ((nx + k3) + 1)) by A101, A100, A104, A102, FINSEQ_4:15 ;
then A106: (((accum (F (*) h4)) /. (nx + (k3 + 1))) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx) = ((f1 + f3) - f2) + f4 by A101, A97, FINSEQ_4:15
.= ((f1 - f2) + f3) + f4 by RFUNCT_1:8
.= ((f1 - f2) + f4) + f3 by RFUNCT_1:8 ;
(accum (F (*) h2)) . (nx + (k3 + 1)) = ((accum (F (*) h2)) /. (nx + k3)) + ((F (*) h2) /. ((nx + k3) + 1)) by A105, A99, Def10
.= ((((accum (F (*) h4)) /. (nx + k3)) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx)) + ((F (*) h2) /. ((nx + k3) + 1)) by A91, A93, A96, A98, A105, A99, FINSEQ_4:15, NAT_1:11, XXREAL_0:2 ;
hence (accum (F (*) h2)) . (nx + (k3 + 1)) = (((accum (F (*) h4)) /. (nx + (k3 + 1))) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx) by A106; ::_thesis: verum
end;
hence S2[k3 + 1] ; ::_thesis: verum
end;
now__::_thesis:_(_(_1_=_nx_&_(accum_(F_(*)_h2))_._(nx_+_0)_=_(((accum_(F_(*)_h4))_/._(nx_+_0))_-_((F_(*)_h2)_/._((k_+_1)_+_1)))_+_((F_(*)_h2)_/._nx)_)_or_(_1_<_nx_&_(accum_(F_(*)_h2))_._(nx_+_0)_=_(((accum_(F_(*)_h4))_/._(nx_+_0))_-_((F_(*)_h2)_/._((k_+_1)_+_1)))_+_((F_(*)_h2)_/._nx)_)_)
percases ( 1 = nx or 1 < nx ) by A41, XXREAL_0:1;
caseA107: 1 = nx ; ::_thesis: (accum (F (*) h2)) . (nx + 0) = (((accum (F (*) h4)) /. (nx + 0)) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx)
A108: n in NAT by ORDINAL1:def_12;
(accum (F (*) h4)) /. (nx + 0) = (accum (F (*) h4)) . 1 by A3, A45, A90, A107, FINSEQ_4:15
.= (F (*) h4) . 1 by Def10
.= F . (h2 . ((k + 1) + 1)) by A5, A43, A42, A107, FUNCT_1:13
.= (F (*) h2) . ((k + 1) + 1) by A27, A26, FUNCT_1:13
.= (F (*) h2) /. ((k + 1) + 1) by A22, A24, A32, FINSEQ_4:15 ;
then A109: (((accum (F (*) h4)) /. (nx + 0)) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx) = (0* n) + ((F (*) h2) /. nx) by A108, EUCLIDLP:2
.= (F (*) h2) /. nx by EUCLID_4:1 ;
(accum (F (*) h2)) . (nx + 0) = (F (*) h2) . 1 by A107, Def10
.= (F (*) h2) /. nx by A36, A32, A107, FINSEQ_4:15 ;
hence (accum (F (*) h2)) . (nx + 0) = (((accum (F (*) h4)) /. (nx + 0)) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx) by A109; ::_thesis: verum
end;
caseA110: 1 < nx ; ::_thesis: (accum (F (*) h2)) . (nx + 0) = (((accum (F (*) h4)) /. (nx + 0)) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx)
A111: (F (*) h4) /. nx = (F (*) h4) . nx by A41, A36, A45, FINSEQ_4:15
.= F . (h2 . ((k + 1) + 1)) by A34, A43, A42, FUNCT_1:13
.= (F (*) h2) . ((k + 1) + 1) by A27, A26, FUNCT_1:13
.= (F (*) h2) /. ((k + 1) + 1) by A22, A24, A32, FINSEQ_4:15 ;
A112: nx -' 1 = nx - 1 by A110, XREAL_1:233;
then nx -' 1 > 0 by A110, XREAL_1:50;
then A113: nx -' 1 >= 0 + 1 by NAT_1:13;
nx < nx + 1 by XREAL_1:29;
then A114: nx - 1 < (nx + 1) - 1 by XREAL_1:9;
then A115: nx -' 1 < len (F (*) h2) by A33, A32, A48, A112, XXREAL_0:2;
then A116: (accum (F (*) h2)) /. (nx -' 1) = (accum (F (*) h2)) . (nx -' 1) by A91, A113, FINSEQ_4:15;
(accum (F (*) h4)) . (nx + 0) = ((accum (F (*) h4)) /. (nx -' 1)) + ((F (*) h4) /. ((nx -' 1) + 1)) by A45, A32, A112, A113, A115, Def10
.= ((accum (F (*) h4)) /. (nx -' 1)) + ((F (*) h2) /. ((k + 1) + 1)) by A112, A111 ;
then A117: ((accum (F (*) h4)) /. (nx + 0)) - ((F (*) h2) /. ((k + 1) + 1)) = (((accum (F (*) h4)) /. (nx -' 1)) + ((F (*) h2) /. ((k + 1) + 1))) - ((F (*) h2) /. ((k + 1) + 1)) by A33, A45, A51, A48, A90, FINSEQ_4:15
.= (accum (F (*) h4)) /. (nx -' 1) by RVSUM_1:42 ;
A118: (accum (F (*) h4)) /. (nx -' 1) = (accum (F (*) h4)) . (nx -' 1) by A45, A32, A90, A113, A115, FINSEQ_4:15;
(accum (F (*) h2)) . (nx + 0) = ((accum (F (*) h2)) /. (nx -' 1)) + ((F (*) h2) /. ((nx -' 1) + 1)) by A112, A113, A115, Def10
.= ((accum (F (*) h4)) /. (nx -' 1)) + ((F (*) h2) /. nx) by A64, A112, A113, A114, A116, A118 ;
hence (accum (F (*) h2)) . (nx + 0) = (((accum (F (*) h4)) /. (nx + 0)) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx) by A117; ::_thesis: verum
end;
end;
end;
then A119: S2[ 0 ] ;
A120: for k3 being Nat holds S2[k3] from NAT_1:sch_2(A119, A92);
A121: i -' nx = i - nx by A88, XREAL_1:233;
then nx <= nx + (i -' nx) by A88;
hence (accum (F (*) h2)) . i = (((accum (F (*) h4)) /. i) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx) by A89, A120, A121; ::_thesis: verum
end;
A122: (F (*) h2) /. nx = (F (*) h2) . nx by A41, A36, A32, FINSEQ_4:15;
A123: (k + 1) + 1 in dom h4 by A25, A39, FINSEQ_1:def_3;
A124: (F (*) h4) /. ((k + 1) + 1) = (F (*) h4) . ((k + 1) + 1) by A22, A24, A45, FINSEQ_4:15;
A125: for i being Nat st (k + 1) + 1 <= i & i <= len F holds
(accum (F (*) h2)) . i = (accum (F (*) h4)) . i
proof
defpred S2[ Nat] means ( ((k + 1) + 1) + $1 <= len F implies (accum (F (*) h2)) . (((k + 1) + 1) + $1) = (accum (F (*) h4)) . (((k + 1) + 1) + $1) );
let i be Nat; ::_thesis: ( (k + 1) + 1 <= i & i <= len F implies (accum (F (*) h2)) . i = (accum (F (*) h4)) . i )
assume that
A126: (k + 1) + 1 <= i and
A127: i <= len F ; ::_thesis: (accum (F (*) h2)) . i = (accum (F (*) h4)) . i
A128: for k3 being Nat st S2[k3] holds
S2[k3 + 1]
proof
let k3 be Nat; ::_thesis: ( S2[k3] implies S2[k3 + 1] )
assume A129: S2[k3] ; ::_thesis: S2[k3 + 1]
( ((k + 1) + 1) + (k3 + 1) <= len F implies (accum (F (*) h2)) . (((k + 1) + 1) + (k3 + 1)) = (accum (F (*) h4)) . (((k + 1) + 1) + (k3 + 1)) )
proof
A130: (k + 1) + 1 <= ((k + 1) + 1) + k3 by NAT_1:11;
A131: ((k + 1) + 1) + k3 < (((k + 1) + 1) + k3) + 1 by XREAL_1:29;
then A132: (k + 1) + 1 < (((k + 1) + 1) + k3) + 1 by A130, XXREAL_0:2;
assume A133: ((k + 1) + 1) + (k3 + 1) <= len F ; ::_thesis: (accum (F (*) h2)) . (((k + 1) + 1) + (k3 + 1)) = (accum (F (*) h4)) . (((k + 1) + 1) + (k3 + 1))
then A134: (F (*) h4) /. ((((k + 1) + 1) + k3) + 1) = (F (*) h4) . ((((k + 1) + 1) + k3) + 1) by A45, FINSEQ_4:15, NAT_1:11;
1 <= (((k + 1) + 1) + k3) + 1 by NAT_1:11;
then (((k + 1) + 1) + k3) + 1 in Seg (len (F (*) h2)) by A31, A133, FINSEQ_1:1;
then A135: (((k + 1) + 1) + k3) + 1 in dom (F (*) h2) by FINSEQ_1:def_3;
then A136: (F (*) h4) . ((((k + 1) + 1) + k3) + 1) = F . (h4 . ((((k + 1) + 1) + k3) + 1)) by A44, A29, FUNCT_1:12
.= F . (h2b /. ((((k + 1) + 1) + k3) + 1)) by A33, A38, A133, FINSEQ_4:15, NAT_1:11
.= F . (h2r /. ((((k + 1) + 1) + k3) + 1)) by A33, A63, A133, A132, FINSEQ_7:30, NAT_1:11
.= F . (h2r . ((((k + 1) + 1) + k3) + 1)) by A33, A133, FINSEQ_4:15, NAT_1:11
.= (F (*) h2) . ((((k + 1) + 1) + k3) + 1) by A135, FUNCT_1:12 ;
1 <= (k + 1) + 1 by NAT_1:11;
then A137: 1 <= ((k + 1) + 1) + k3 by A130, XXREAL_0:2;
A138: ((k + 1) + 1) + k3 < len F by A133, A131, XXREAL_0:2;
then A139: (accum (F (*) h4)) /. (((k + 1) + 1) + k3) = (accum (F (*) h4)) . (((k + 1) + 1) + k3) by A45, A50, A137, FINSEQ_4:15;
(accum (F (*) h2)) . (((k + 1) + 1) + (k3 + 1)) = ((accum (F (*) h2)) /. (((k + 1) + 1) + k3)) + ((F (*) h2) /. ((((k + 1) + 1) + k3) + 1)) by A32, A138, A137, Def10
.= ((accum (F (*) h4)) /. (((k + 1) + 1) + k3)) + ((F (*) h2) /. ((((k + 1) + 1) + k3) + 1)) by A32, A62, A129, A138, A137, A139, FINSEQ_4:15
.= ((accum (F (*) h4)) /. (((k + 1) + 1) + k3)) + ((F (*) h4) /. ((((k + 1) + 1) + k3) + 1)) by A32, A133, A136, A134, FINSEQ_4:15, NAT_1:11 ;
hence (accum (F (*) h2)) . (((k + 1) + 1) + (k3 + 1)) = (accum (F (*) h4)) . (((k + 1) + 1) + (k3 + 1)) by A45, A138, A137, Def10; ::_thesis: verum
end;
hence S2[k3 + 1] ; ::_thesis: verum
end;
A140: len (accum (F (*) h2)) = len (F (*) h2) by Def10;
A141: (accum (F (*) h2)) . (k + 1) = (((accum (F (*) h4)) /. (k + 1)) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx) by A19, A46, A87;
A142: 1 <= k + 1 by NAT_1:11;
k + 1 < len (F (*) h2) by A20, A30, FINSEQ_1:def_3;
then (accum (F (*) h2)) . ((k + 1) + 1) = ((accum (F (*) h2)) /. (k + 1)) + ((F (*) h2) /. ((k + 1) + 1)) by A142, Def10
.= ((((accum (F (*) h4)) /. (k + 1)) - ((F (*) h2) /. ((k + 1) + 1))) + ((F (*) h2) /. nx)) + ((F (*) h2) /. ((k + 1) + 1)) by A20, A32, A140, A141, FINSEQ_4:15, NAT_1:11
.= ((accum (F (*) h4)) /. (k + 1)) + ((F (*) h2) /. nx) by Th5
.= ((accum (F (*) h4)) /. (k + 1)) + ((F (*) h4) /. ((k + 1) + 1)) by A123, A53, A49, A124, A122, FUNCT_1:13 ;
then A143: S2[ 0 ] by A20, A18, A45, Def10;
A144: for k3 being Nat holds S2[k3] from NAT_1:sch_2(A143, A128);
((k + 1) + 1) + (i -' ((k + 1) + 1)) = (i - ((k + 1) + 1)) + ((k + 1) + 1) by A126, XREAL_1:233
.= i ;
hence (accum (F (*) h2)) . i = (accum (F (*) h4)) . i by A127, A144; ::_thesis: verum
end;
A145: (accum F) /. (k + 1) = (accum F) . (k + 1) by A9, A20, FINSEQ_4:15, NAT_1:11;
A146: dom h4 = dom F by A5, FUNCT_2:def_1;
rng h4 c= dom F ;
then A147: dom (F (*) h4) = dom h4 by RELAT_1:27;
then Seg (len (F (*) h4)) = dom h4 by FINSEQ_1:def_3;
then A148: k + 1 < len (F (*) h4) by A20, A146, FINSEQ_1:def_3;
Seg (len (F (*) h4)) = dom F by A146, A147, FINSEQ_1:def_3;
then len (F (*) h4) = len F by FINSEQ_1:def_3;
then A149: (F (*) h4) /. ((k + 1) + 1) = (F (*) h4) . ((k + 1) + 1) by A22, A24, FINSEQ_4:15;
len (accum (F (*) h4)) = len (F (*) h4) by Def10;
then A150: (accum (F (*) h4)) /. (k + 1) = (accum (F (*) h4)) . (k + 1) by A148, FINSEQ_4:15, NAT_1:11;
(accum F) . ((k + 1) + 1) = ((accum F) /. (k + 1)) + (F /. ((k + 1) + 1)) by A10, A20, NAT_1:11
.= ((accum (F (*) h4)) /. (k + 1)) + (F /. ((k + 1) + 1)) by A17, A23, A54, A150, A145
.= ((accum (F (*) h4)) /. (k + 1)) + ((F (*) h4) /. ((k + 1) + 1)) by A123, A53, A149, A60, FUNCT_1:13
.= (accum (F (*) h4)) . ((k + 1) + 1) by A61, A148, Def10 ;
hence (accum F) . ((k + 1) + 1) = (accum (F (*) h2)) . ((k + 1) + 1) by A22, A125; ::_thesis: verum
end;
suppose nx > k + 1 ; ::_thesis: (accum F) . ((k + 1) + 1) = (accum (F (*) h2)) . ((k + 1) + 1)
then A151: (k + 1) + 1 <= nx by NAT_1:13;
percases ( (k + 1) + 1 = nx or (k + 1) + 1 < nx ) by A151, XXREAL_0:1;
supposeA152: (k + 1) + 1 = nx ; ::_thesis: (accum F) . ((k + 1) + 1) = (accum (F (*) h2)) . ((k + 1) + 1)
A153: for i being Nat st k + 1 < i & i <= len F holds
h2 . i = i
proof
let i be Nat; ::_thesis: ( k + 1 < i & i <= len F implies h2 . i = i )
assume that
A154: k + 1 < i and
A155: i <= len F ; ::_thesis: h2 . i = i
A156: (k + 1) + 1 <= i by A154, NAT_1:13;
percases ( (k + 1) + 1 < i or (k + 1) + 1 = i ) by A156, XXREAL_0:1;
suppose (k + 1) + 1 < i ; ::_thesis: h2 . i = i
hence h2 . i = i by A21, A155; ::_thesis: verum
end;
suppose (k + 1) + 1 = i ; ::_thesis: h2 . i = i
hence h2 . i = i by A35, A152; ::_thesis: verum
end;
end;
end;
A157: k + 1 < len (F (*) h2) by A20, A30, FINSEQ_1:def_3;
len (accum (F (*) h2)) = len (F (*) h2) by Def10;
then A158: (accum (F (*) h2)) /. (k + 1) = (accum (F (*) h2)) . (k + 1) by A20, A32, FINSEQ_4:15, NAT_1:11;
A159: 1 <= k + 1 by NAT_1:11;
A160: F . ((k + 1) + 1) = (F (*) h2) . nx by A34, A35, FUNCT_1:13;
A161: (accum F) /. (k + 1) = (accum F) . (k + 1) by A9, A20, FINSEQ_4:15, NAT_1:11;
A162: F /. ((k + 1) + 1) = F . ((k + 1) + 1) by A22, A24, FINSEQ_4:15;
(accum F) . ((k + 1) + 1) = ((accum F) /. (k + 1)) + (F /. ((k + 1) + 1)) by A10, A20, NAT_1:11
.= ((accum (F (*) h2)) /. (k + 1)) + (F /. ((k + 1) + 1)) by A17, A23, A153, A158, A161
.= ((accum (F (*) h2)) /. (k + 1)) + ((F (*) h2) /. ((k + 1) + 1)) by A22, A24, A32, A152, A162, A160, FINSEQ_4:15
.= (accum (F (*) h2)) . ((k + 1) + 1) by A159, A157, Def10 ;
hence (accum F) . ((k + 1) + 1) = (accum (F (*) h2)) . ((k + 1) + 1) ; ::_thesis: verum
end;
suppose (k + 1) + 1 < nx ; ::_thesis: (accum F) . ((k + 1) + 1) = (accum (F (*) h2)) . ((k + 1) + 1)
hence (accum F) . ((k + 1) + 1) = (accum (F (*) h2)) . ((k + 1) + 1) by A21, A35, A36; ::_thesis: verum
end;
end;
end;
end;
end;
hence S1[k + 1] ; ::_thesis: verum
end;
for h2 being Permutation of (dom F) st ( for i being Nat st 0 + 1 < i & i <= len F holds
h2 . i = i ) holds
(accum F) . (0 + 1) = (accum (F (*) h2)) . (0 + 1)
proof
let h2 be Permutation of (dom F); ::_thesis: ( ( for i being Nat st 0 + 1 < i & i <= len F holds
h2 . i = i ) implies (accum F) . (0 + 1) = (accum (F (*) h2)) . (0 + 1) )
A163: rng h2 = dom F by FUNCT_2:def_3;
A164: dom h2 = dom F by A5, FUNCT_2:def_1;
assume A165: for i being Nat st 0 + 1 < i & i <= len F holds
h2 . i = i ; ::_thesis: (accum F) . (0 + 1) = (accum (F (*) h2)) . (0 + 1)
A166: now__::_thesis:_not_h2_._1_<>_1
assume A167: h2 . 1 <> 1 ; ::_thesis: contradiction
consider x being set such that
A168: x in dom h2 and
A169: h2 . x = 1 by A5, A163, FUNCT_1:def_3;
reconsider nx = x as Element of NAT by A164, A168;
1 <= nx by A11, A168, FINSEQ_1:1;
then ( nx = 1 or ( 1 < nx & nx <= len F ) ) by A11, A168, FINSEQ_1:1, XXREAL_0:1;
hence contradiction by A165, A167, A169; ::_thesis: verum
end;
(accum (F (*) h2)) . 1 = (F (*) h2) . 1 by Def10
.= F . 1 by A5, A164, A166, FUNCT_1:13 ;
hence (accum F) . (0 + 1) = (accum (F (*) h2)) . (0 + 1) by Def10; ::_thesis: verum
end;
then A170: S1[ 0 ] ;
for k being Nat holds S1[k] from NAT_1:sch_2(A170, A16);
then (accum F) . (len F) = (accum (F (*) h)) . (len F) by A13, A14, XREAL_1:44
.= (accum F2) . (len F2) by A1, A8, FINSEQ_1:def_3
.= Sum F2 by A12, Def11 ;
hence Sum F2 = Sum F by A2, Def11; ::_thesis: verum
end;
supposeA171: len F <= 0 ; ::_thesis: Sum F2 = Sum F
rng h c= dom F ;
then A172: dom (F (*) h) = dom h by RELAT_1:27;
Seg (len F) = {} by A171;
then dom F = {} by FINSEQ_1:def_3;
then Seg (len F) = dom F2 by A1, A172, FINSEQ_1:def_3;
then A173: len F = len F2 by FINSEQ_1:def_3;
Sum F = 0* n by A171, Def11;
hence Sum F2 = Sum F by A171, A173, Def11; ::_thesis: verum
end;
end;
end;
theorem Th22: :: EUCLID_7:22
for n being Nat
for k being Element of NAT holds Sum (k |-> (0* n)) = 0* n
proof
let n be Nat; ::_thesis: for k being Element of NAT holds Sum (k |-> (0* n)) = 0* n
let k be Element of NAT ; ::_thesis: Sum (k |-> (0* n)) = 0* n
set g = k |-> (0* n);
A1: for i being Nat st i in dom (k |-> (0* n)) holds
(k |-> (0* n)) . i = 0* n
proof
let i be Nat; ::_thesis: ( i in dom (k |-> (0* n)) implies (k |-> (0* n)) . i = 0* n )
assume i in dom (k |-> (0* n)) ; ::_thesis: (k |-> (0* n)) . i = 0* n
then i in Seg k by FUNCOP_1:13;
hence (k |-> (0* n)) . i = 0* n by FINSEQ_2:57; ::_thesis: verum
end;
percases ( len (k |-> (0* n)) > 0 or len (k |-> (0* n)) <= 0 ) ;
supposeA2: len (k |-> (0* n)) > 0 ; ::_thesis: Sum (k |-> (0* n)) = 0* n
set g3 = accum (k |-> (0* n));
A3: len (k |-> (0* n)) = len (accum (k |-> (0* n))) by Def10;
A4: (k |-> (0* n)) . 1 = (accum (k |-> (0* n))) . 1 by Def10;
defpred S1[ Nat] means ( $1 < len (k |-> (0* n)) implies (accum (k |-> (0* n))) . ($1 + 1) = 0* n );
A5: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A6: S1[k] ; ::_thesis: S1[k + 1]
A7: k < k + 1 by XREAL_1:29;
percases ( k + 1 < len (k |-> (0* n)) or k + 1 >= len (k |-> (0* n)) ) ;
supposeA8: k + 1 < len (k |-> (0* n)) ; ::_thesis: S1[k + 1]
then A9: (k + 1) + 1 <= len (k |-> (0* n)) by NAT_1:13;
percases ( 1 <= k + 1 or 1 > k + 1 ) ;
supposeA10: 1 <= k + 1 ; ::_thesis: S1[k + 1]
A11: 1 <= (k + 1) + 1 by XREAL_1:29;
then (k + 1) + 1 in Seg (len (k |-> (0* n))) by A9, FINSEQ_1:1;
then (k + 1) + 1 in dom (k |-> (0* n)) by FINSEQ_1:def_3;
then A12: (k |-> (0* n)) . ((k + 1) + 1) = 0* n by A1;
A13: (accum (k |-> (0* n))) /. (k + 1) = (accum (k |-> (0* n))) . (k + 1) by A3, A8, A10, FINSEQ_4:15;
(accum (k |-> (0* n))) . ((k + 1) + 1) = ((accum (k |-> (0* n))) /. (k + 1)) + ((k |-> (0* n)) /. ((k + 1) + 1)) by Def10, A8, A10;
then (accum (k |-> (0* n))) . ((k + 1) + 1) = (0* n) + (0* n) by A6, A7, A8, A9, A13, A11, A12, FINSEQ_4:15, XXREAL_0:2
.= 0* n by EUCLID_4:1 ;
hence S1[k + 1] ; ::_thesis: verum
end;
suppose 1 > k + 1 ; ::_thesis: S1[k + 1]
hence S1[k + 1] by NAT_1:14; ::_thesis: verum
end;
end;
end;
suppose k + 1 >= len (k |-> (0* n)) ; ::_thesis: S1[k + 1]
hence S1[k + 1] ; ::_thesis: verum
end;
end;
end;
A14: 0 + 1 <= len (k |-> (0* n)) by A2, NAT_1:13;
then 1 in Seg (len (k |-> (0* n))) by FINSEQ_1:1;
then 1 in dom (k |-> (0* n)) by FINSEQ_1:def_3;
then A15: S1[ 0 ] by A1, A4;
for k being Nat holds S1[k] from NAT_1:sch_2(A15, A5);
then A16: S1[(len (accum (k |-> (0* n)))) -' 1] ;
(len (accum (k |-> (0* n)))) -' 1 = (len (accum (k |-> (0* n)))) - 1 by A3, A14, XREAL_1:233;
hence Sum (k |-> (0* n)) = 0* n by A3, Def11, A16, XREAL_1:44; ::_thesis: verum
end;
suppose len (k |-> (0* n)) <= 0 ; ::_thesis: Sum (k |-> (0* n)) = 0* n
hence Sum (k |-> (0* n)) = 0* n by Def11; ::_thesis: verum
end;
end;
end;
theorem Th23: :: EUCLID_7:23
for n being Nat
for g being FinSequence of REAL n
for h being FinSequence of NAT
for F being FinSequence of REAL n st h is increasing & rng h c= dom g & F = g * h & ( for i being Element of NAT st i in dom g & not i in rng h holds
g . i = 0* n ) holds
Sum g = Sum F
proof
let n be Nat; ::_thesis: for g being FinSequence of REAL n
for h being FinSequence of NAT
for F being FinSequence of REAL n st h is increasing & rng h c= dom g & F = g * h & ( for i being Element of NAT st i in dom g & not i in rng h holds
g . i = 0* n ) holds
Sum g = Sum F
let g be FinSequence of REAL n; ::_thesis: for h being FinSequence of NAT
for F being FinSequence of REAL n st h is increasing & rng h c= dom g & F = g * h & ( for i being Element of NAT st i in dom g & not i in rng h holds
g . i = 0* n ) holds
Sum g = Sum F
let h be FinSequence of NAT ; ::_thesis: for F being FinSequence of REAL n st h is increasing & rng h c= dom g & F = g * h & ( for i being Element of NAT st i in dom g & not i in rng h holds
g . i = 0* n ) holds
Sum g = Sum F
let F be FinSequence of REAL n; ::_thesis: ( h is increasing & rng h c= dom g & F = g * h & ( for i being Element of NAT st i in dom g & not i in rng h holds
g . i = 0* n ) implies Sum g = Sum F )
assume that
A1: h is increasing and
A2: rng h c= dom g and
A3: F = g * h and
A4: for i being Element of NAT st i in dom g & not i in rng h holds
g . i = 0* n ; ::_thesis: Sum g = Sum F
A5: dom (h * g) = dom h by A2, RELAT_1:27;
dom (g * h) = dom h by A2, RELAT_1:27;
then A6: dom F = Seg (len h) by A3, FINSEQ_1:def_3;
then A7: len F = len h by FINSEQ_1:def_3;
dom h c= dom g
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in dom h or x in dom g )
assume A8: x in dom h ; ::_thesis: x in dom g
then reconsider nx = x as Element of NAT ;
A9: h . x in rng h by A8, FUNCT_1:def_3;
then reconsider nhx = h . x as Element of NAT ;
A10: nx in Seg (len h) by A8, FINSEQ_1:def_3;
then A11: 1 <= nx by FINSEQ_1:1;
A12: nx <= len h by A10, FINSEQ_1:1;
then 1 <= len h by A11, XXREAL_0:2;
then 1 in Seg (len h) by FINSEQ_1:1;
then 1 in dom h by FINSEQ_1:def_3;
then h . 1 in rng h by FUNCT_1:def_3;
then h . 1 in dom g by A2;
then h . 1 in Seg (len g) by FINSEQ_1:def_3;
then 1 <= h . 1 by FINSEQ_1:1;
then A13: nx <= nhx by A1, A12, Th8;
h . x in dom g by A2, A9;
then h . x in Seg (len g) by FINSEQ_1:def_3;
then nhx <= len g by FINSEQ_1:1;
then nx <= len g by A13, XXREAL_0:2;
then nx in Seg (len g) by A11, FINSEQ_1:1;
hence x in dom g by FINSEQ_1:def_3; ::_thesis: verum
end;
then dom h c= Seg (len g) by FINSEQ_1:def_3;
then Seg (len h) c= Seg (len g) by FINSEQ_1:def_3;
then A14: len h <= len g by FINSEQ_1:5;
percases ( len F > 0 or len F <= 0 ) ;
supposeA15: len F > 0 ; ::_thesis: Sum g = Sum F
then A16: 0 + 1 <= len F by NAT_1:13;
then 1 in Seg (len F) by FINSEQ_1:1;
then A17: 1 in dom F by FINSEQ_1:def_3;
then A18: 1 in Seg (len h) by A3, A5, FINSEQ_1:def_3;
then A19: 1 <= len h by FINSEQ_1:1;
then len h in Seg (len h) by FINSEQ_1:1;
then len h in dom h by FINSEQ_1:def_3;
then h . (len h) in rng h by FUNCT_1:def_3;
then h . (len h) in dom g by A2;
then A20: h . (len h) in Seg (len g) by FINSEQ_1:def_3;
reconsider j = h . 1 as Nat ;
dom (h * g) = dom h by A2, RELAT_1:27;
then A21: Seg (len F) = dom h by A3, FINSEQ_1:def_3;
then A22: len F = len h by FINSEQ_1:def_3;
A23: h . 1 in rng h by A3, A5, A17, FUNCT_1:def_3;
then A24: h . 1 in dom g by A2;
then A25: h . 1 in Seg (len g) by FINSEQ_1:def_3;
then A26: 1 <= h . 1 by FINSEQ_1:1;
then A27: j -' 1 = j - 1 by XREAL_1:233;
Seg (len g) <> {} by A2, A23, FINSEQ_1:def_3;
then 0 < len g ;
then A28: 0 + 1 <= len g by NAT_1:13;
then A29: (len g) -' 1 = (len g) - 1 by XREAL_1:233;
then A30: h . (len h) <= ((len g) -' 1) + 1 by A20, FINSEQ_1:1;
A31: 1 <= j by A25, FINSEQ_1:1;
set g4 = accum g;
A32: len g = len (accum g) by Def10;
A33: g . 1 = (accum g) . 1 by Def10;
A34: for i being Nat st 1 <= i & i < len g holds
(accum g) . (i + 1) = ((accum g) /. i) + (g /. (i + 1)) by Def10;
A35: Sum g = (accum g) . (len g) by A7, A14, A15, Def11;
set g2 = accum F;
A36: len F = len (accum F) by Def10;
A37: F . 1 = (accum F) . 1 by Def10;
A38: for i being Nat st 1 <= i & i < len F holds
(accum F) . (i + 1) = ((accum F) /. i) + (F /. (i + 1)) by Def10;
A39: Sum F = (accum F) . (len F) by A15, Def11;
defpred S1[ Nat] means ( 1 <= $1 + 1 & $1 + 1 < j implies (accum g) . ($1 + 1) = 0* n );
A40: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A41: S1[k] ; ::_thesis: S1[k + 1]
( 1 <= (k + 1) + 1 & (k + 1) + 1 < j implies (accum g) . ((k + 1) + 1) = 0* n )
proof
assume that
A42: 1 <= (k + 1) + 1 and
A43: (k + 1) + 1 < j ; ::_thesis: (accum g) . ((k + 1) + 1) = 0* n
percases ( 1 < (k + 1) + 1 or 1 = (k + 1) + 1 ) by A42, XXREAL_0:1;
supposeA44: 1 < (k + 1) + 1 ; ::_thesis: (accum g) . ((k + 1) + 1) = 0* n
j in Seg (len g) by A24, FINSEQ_1:def_3;
then A45: j <= len g by FINSEQ_1:1;
then (k + 1) + 1 < len g by A43, XXREAL_0:2;
then A46: g /. ((k + 1) + 1) = g . ((k + 1) + 1) by A44, FINSEQ_4:15;
A47: now__::_thesis:_not_(k_+_1)_+_1_in_rng_h
assume (k + 1) + 1 in rng h ; ::_thesis: contradiction
then consider x0 being set such that
A48: x0 in dom h and
A49: h . x0 = (k + 1) + 1 by FUNCT_1:def_3;
reconsider nx0 = x0 as Element of NAT by A48;
A50: x0 in Seg (len h) by A48, FINSEQ_1:def_3;
then A51: nx0 <= len h by FINSEQ_1:1;
1 <= nx0 by A50, FINSEQ_1:1;
hence contradiction by A1, A43, A49, A51, Th7; ::_thesis: verum
end;
A52: k + 1 < (k + 1) + 1 by XREAL_1:29;
then k + 1 < j by A43, XXREAL_0:2;
then A53: k + 1 < len g by A45, XXREAL_0:2;
then A54: (accum g) /. (k + 1) = (accum g) . (k + 1) by A32, FINSEQ_4:15, NAT_1:11;
(k + 1) + 1 <= len g by A53, NAT_1:13;
then (k + 1) + 1 in Seg (len g) by A42, FINSEQ_1:1;
then (k + 1) + 1 in dom g by FINSEQ_1:def_3;
then A55: g . ((k + 1) + 1) = 0* n by A4, A47;
(accum g) . ((k + 1) + 1) = ((accum g) /. (k + 1)) + (g /. ((k + 1) + 1)) by A34, A53, NAT_1:11;
hence (accum g) . ((k + 1) + 1) = 0* n by A41, A43, A52, A55, A54, A46, EUCLID_4:1, NAT_1:11, XXREAL_0:2; ::_thesis: verum
end;
suppose 1 = (k + 1) + 1 ; ::_thesis: (accum g) . ((k + 1) + 1) = 0* n
hence (accum g) . ((k + 1) + 1) = 0* n ; ::_thesis: verum
end;
end;
end;
hence S1[k + 1] ; ::_thesis: verum
end;
defpred S2[ Nat] means ( 1 <= $1 + 1 & $1 + 1 <= len (accum F) implies (accum g) . (h . ($1 + 1)) = (accum F) . ($1 + 1) );
A56: 1 in Seg (len g) by A28, FINSEQ_1:1;
( 1 < j implies ( 1 in dom g & not 1 in rng h ) )
proof
assume A57: 1 < j ; ::_thesis: ( 1 in dom g & not 1 in rng h )
thus 1 in dom g by A56, FINSEQ_1:def_3; ::_thesis: not 1 in rng h
hereby ::_thesis: verum
assume 1 in rng h ; ::_thesis: contradiction
then consider x0 being set such that
A58: x0 in dom h and
A59: h . x0 = 1 by FUNCT_1:def_3;
reconsider nx0 = x0 as Element of NAT by A58;
A60: x0 in Seg (len h) by A58, FINSEQ_1:def_3;
then A61: nx0 <= len h by FINSEQ_1:1;
1 <= nx0 by A60, FINSEQ_1:1;
hence contradiction by A1, A57, A59, A61, Th7; ::_thesis: verum
end;
end;
then A62: S1[ 0 ] by A4, A33;
A63: for k being Nat holds S1[k] from NAT_1:sch_2(A62, A40);
A64: now__::_thesis:_(_(_1_<_j_&_S2[_0_]_)_or_(_j_=_1_&_S2[_0_]_)_)
percases ( 1 < j or j = 1 ) by A26, XXREAL_0:1;
case 1 < j ; ::_thesis: S2[ 0 ]
then 1 + 1 <= j by NAT_1:13;
then A65: (1 + 1) - 1 <= j - 1 by XREAL_1:9;
then 1 <= j -' 1 by A31, XREAL_1:233;
then A66: ((j -' 1) -' 1) + 1 = ((j -' 1) - 1) + 1 by XREAL_1:233
.= j -' 1 ;
A67: g . j = (accum F) . 1 by A3, A5, A37, A17, FUNCT_1:13;
A68: S1[(j -' 1) -' 1] by A63;
A69: j in Seg (len g) by A24, FINSEQ_1:def_3;
then A70: j <= len g by FINSEQ_1:1;
1 <= j by A69, FINSEQ_1:1;
then A71: g /. j = g . j by A70, FINSEQ_4:15;
A72: (accum F) /. 1 = (accum F) . 1 by A36, A16, FINSEQ_4:15;
A73: j -' 1 < (j -' 1) + 1 by XREAL_1:29;
then A74: j -' 1 < len g by A27, A70, XXREAL_0:2;
then (accum g) /. (j -' 1) = (accum g) . (j -' 1) by A32, A27, A65, FINSEQ_4:15;
then (accum g) . j = (0* n) + ((accum F) /. 1) by Def10, A27, A65, A73, A74, A68, A66, A71, A72, A67
.= (accum F) /. 1 by EUCLID_4:1 ;
hence S2[ 0 ] by FINSEQ_4:15; ::_thesis: verum
end;
case j = 1 ; ::_thesis: S2[ 0 ]
hence S2[ 0 ] by A3, A5, A37, A33, A17, FUNCT_1:13; ::_thesis: verum
end;
end;
end;
A75: for k being Nat st S2[k] holds
S2[k + 1]
proof
let k be Nat; ::_thesis: ( S2[k] implies S2[k + 1] )
assume A76: S2[k] ; ::_thesis: S2[k + 1]
( 1 <= (k + 1) + 1 & (k + 1) + 1 <= len (accum F) implies (accum g) . (h . ((k + 1) + 1)) = (accum F) . ((k + 1) + 1) )
proof
defpred S3[ Nat] means ( h . (k + 1) <= $1 + 1 & $1 + 1 < h . ((k + 1) + 1) implies (accum g) . ($1 + 1) = (accum F) . (k + 1) );
assume that
A77: 1 <= (k + 1) + 1 and
A78: (k + 1) + 1 <= len (accum F) ; ::_thesis: (accum g) . (h . ((k + 1) + 1)) = (accum F) . ((k + 1) + 1)
A79: (k + 1) + 1 in Seg (len (accum F)) by A77, A78, FINSEQ_1:1;
then h . ((k + 1) + 1) in rng h by A36, A21, FUNCT_1:def_3;
then h . ((k + 1) + 1) in dom g by A2;
then A80: h . ((k + 1) + 1) in Seg (len g) by FINSEQ_1:def_3;
then A81: 1 <= h . ((k + 1) + 1) by FINSEQ_1:1;
A82: k + 1 < (k + 1) + 1 by XREAL_1:29;
then A83: k + 1 < len (accum F) by A78, XXREAL_0:2;
now__::_thesis:_(_(_1_<=_k_&_S3[_0_]_)_or_(_k_<_1_&_S3[_0_]_)_)
percases ( 1 <= k or k < 1 ) ;
caseA84: 1 <= k ; ::_thesis: S3[ 0 ]
k < k + 1 by XREAL_1:29;
then A85: k < len h by A36, A22, A83, XXREAL_0:2;
then k <= h . k by A1, A26, Th8;
then A86: 1 <= h . k by A84, XXREAL_0:2;
h . k < h . (k + 1) by A1, A84, A85, Def1;
hence S3[ 0 ] by A86, XXREAL_0:2; ::_thesis: verum
end;
case k < 1 ; ::_thesis: S3[ 0 ]
hence S3[ 0 ] by A15, A36, A64, NAT_1:14; ::_thesis: verum
end;
end;
end;
then A87: S3[ 0 ] ;
A88: h . ((k + 1) + 1) <= len g by A80, FINSEQ_1:1;
1 <= k + 1 by NAT_1:11;
then A89: h . (k + 1) < h . ((k + 1) + 1) by A1, A36, A22, A83, Def1;
A90: for k2 being Nat st S3[k2] holds
S3[k2 + 1]
proof
let k2 be Nat; ::_thesis: ( S3[k2] implies S3[k2 + 1] )
assume A91: S3[k2] ; ::_thesis: S3[k2 + 1]
( h . (k + 1) <= (k2 + 1) + 1 & (k2 + 1) + 1 < h . ((k + 1) + 1) implies (accum g) . ((k2 + 1) + 1) = (accum F) . (k + 1) )
proof
assume that
A92: h . (k + 1) <= (k2 + 1) + 1 and
A93: (k2 + 1) + 1 < h . ((k + 1) + 1) ; ::_thesis: (accum g) . ((k2 + 1) + 1) = (accum F) . (k + 1)
percases ( h . (k + 1) < (k2 + 1) + 1 or h . (k + 1) = (k2 + 1) + 1 ) by A92, XXREAL_0:1;
supposeA94: h . (k + 1) < (k2 + 1) + 1 ; ::_thesis: (accum g) . ((k2 + 1) + 1) = (accum F) . (k + 1)
A95: now__::_thesis:_not_(k2_+_1)_+_1_in_rng_h
assume (k2 + 1) + 1 in rng h ; ::_thesis: contradiction
then consider x0 being set such that
A96: x0 in dom h and
A97: h . x0 = (k2 + 1) + 1 by FUNCT_1:def_3;
reconsider nx0 = x0 as Element of NAT by A96;
A98: x0 in Seg (len h) by A96, FINSEQ_1:def_3;
then nx0 <= len h by FINSEQ_1:1;
then A99: ( nx0 >= (k + 1) + 1 implies h . nx0 >= h . ((k + 1) + 1) ) by A1, A77, Th7;
1 <= nx0 by A98, FINSEQ_1:1;
then ( nx0 <= k + 1 implies h . nx0 <= h . (k + 1) ) by A1, A36, A22, A83, Th7;
hence contradiction by A93, A94, A97, A99, NAT_1:13; ::_thesis: verum
end;
h . ((k + 1) + 1) in rng h by A36, A21, A79, FUNCT_1:def_3;
then h . ((k + 1) + 1) in dom g by A2;
then h . ((k + 1) + 1) in Seg (len g) by FINSEQ_1:def_3;
then h . ((k + 1) + 1) <= len g by FINSEQ_1:1;
then A100: (k2 + 1) + 1 < len g by A93, XXREAL_0:2;
A101: 1 < (k2 + 1) + 1 by XREAL_1:29;
then A102: g /. ((k2 + 1) + 1) = g . ((k2 + 1) + 1) by A100, FINSEQ_4:15;
A103: k2 + 1 < (k2 + 1) + 1 by XREAL_1:29;
then A104: k2 + 1 < len g by A100, XXREAL_0:2;
(k2 + 1) + 1 in Seg (len g) by A100, A101, FINSEQ_1:1;
then (k2 + 1) + 1 in dom g by FINSEQ_1:def_3;
then A105: g . ((k2 + 1) + 1) = 0* n by A4, A95;
k2 + 1 < len g by A103, A100, XXREAL_0:2;
then (accum g) . ((k2 + 1) + 1) = ((accum g) /. (k2 + 1)) + (g /. ((k2 + 1) + 1)) by A34, NAT_1:11
.= (accum g) /. (k2 + 1) by A105, A102, EUCLID_4:1
.= (accum g) . (k2 + 1) by A32, A104, FINSEQ_4:15, NAT_1:11 ;
hence (accum g) . ((k2 + 1) + 1) = (accum F) . (k + 1) by A91, A93, A94, NAT_1:13; ::_thesis: verum
end;
suppose h . (k + 1) = (k2 + 1) + 1 ; ::_thesis: (accum g) . ((k2 + 1) + 1) = (accum F) . (k + 1)
hence (accum g) . ((k2 + 1) + 1) = (accum F) . (k + 1) by A76, A78, A82, NAT_1:11, XXREAL_0:2; ::_thesis: verum
end;
end;
end;
hence S3[k2 + 1] ; ::_thesis: verum
end;
A106: for k2 being Nat holds S3[k2] from NAT_1:sch_2(A87, A90);
then A107: ( h . (k + 1) <= (((h . ((k + 1) + 1)) -' 1) -' 1) + 1 & (((h . ((k + 1) + 1)) -' 1) -' 1) + 1 < h . ((k + 1) + 1) implies (accum g) . ((((h . ((k + 1) + 1)) -' 1) -' 1) + 1) = (accum F) . (k + 1) ) ;
now__::_thesis:_(_(_1_<=_k_&_(accum_g)_._(h_._((k_+_1)_+_1))_=_(accum_F)_._((k_+_1)_+_1)_)_or_(_k_<_1_&_(accum_g)_._(h_._((k_+_1)_+_1))_=_(accum_F)_._((k_+_1)_+_1)_)_)
percases ( 1 <= k or k < 1 ) ;
caseA108: 1 <= k ; ::_thesis: (accum g) . (h . ((k + 1) + 1)) = (accum F) . ((k + 1) + 1)
k < k + 1 by XREAL_1:29;
then A109: k < len h by A36, A22, A83, XXREAL_0:2;
then k <= h . k by A1, A26, Th8;
then A110: 1 <= h . k by A108, XXREAL_0:2;
A111: 1 + (h . (k + 1)) <= h . ((k + 1) + 1) by A89, NAT_1:13;
then A112: ((h . (k + 1)) + 1) - 1 <= (h . ((k + 1) + 1)) - 1 by XREAL_1:9;
h . k < h . (k + 1) by A1, A108, A109, Def1;
then 1 < h . (k + 1) by A110, XXREAL_0:2;
then 1 + 1 < (h . (k + 1)) + 1 by XREAL_1:6;
then 1 + 1 < h . ((k + 1) + 1) by A111, XXREAL_0:2;
then A113: (1 + 1) - 1 < (h . ((k + 1) + 1)) - 1 by XREAL_1:9;
then A114: (h . ((k + 1) + 1)) -' 1 = (h . ((k + 1) + 1)) - 1 by XREAL_0:def_2;
then A115: ((h . ((k + 1) + 1)) -' 1) -' 1 = ((h . ((k + 1) + 1)) - 1) - 1 by A113, XREAL_1:233;
A116: g /. (h . ((k + 1) + 1)) = g . (h . ((k + 1) + 1)) by A81, A88, FINSEQ_4:15;
A117: F . ((k + 1) + 1) = g . (h . ((k + 1) + 1)) by A3, A36, A21, A79, FUNCT_1:13;
A118: k + 1 <= len (accum F) by A78, A82, XXREAL_0:2;
h . ((k + 1) + 1) < (h . ((k + 1) + 1)) + 1 by XREAL_1:29;
then A119: (h . ((k + 1) + 1)) - 1 < ((h . ((k + 1) + 1)) + 1) - 1 by XREAL_1:9;
then A120: (h . ((k + 1) + 1)) -' 1 < len g by A88, A114, XXREAL_0:2;
then A121: (accum g) /. ((h . ((k + 1) + 1)) -' 1) = (accum g) . ((h . ((k + 1) + 1)) -' 1) by A32, A113, A114, FINSEQ_4:15;
(accum F) . ((k + 1) + 1) = ((accum F) /. (k + 1)) + (F /. ((k + 1) + 1)) by A36, A38, A83, NAT_1:11
.= ((accum g) /. ((h . ((k + 1) + 1)) -' 1)) + (F /. ((k + 1) + 1)) by A107, A114, A115, A112, A119, A121, A118, FINSEQ_4:15, NAT_1:11
.= ((accum g) /. ((h . ((k + 1) + 1)) -' 1)) + (g /. (h . ((k + 1) + 1))) by A36, A77, A78, A117, A116, FINSEQ_4:15
.= (accum g) . (((h . ((k + 1) + 1)) -' 1) + 1) by Def10, A113, A114, A120 ;
hence (accum g) . (h . ((k + 1) + 1)) = (accum F) . ((k + 1) + 1) by A114; ::_thesis: verum
end;
case k < 1 ; ::_thesis: (accum g) . (h . ((k + 1) + 1)) = (accum F) . ((k + 1) + 1)
then A122: k = 0 by NAT_1:14;
then 1 < len h by A36, A22, A78, NAT_1:13;
then A123: h . 1 < h . (1 + 1) by A1, Def1;
then A124: (h . (1 + 1)) -' 1 = (h . (1 + 1)) - 1 by A31, XREAL_1:233, XXREAL_0:2;
then A125: ((h . ((k + 1) + 1)) -' 1) + 1 = h . ((k + 1) + 1) by A122;
A126: F /. 1 = F . 1 by A19, A22, FINSEQ_4:15;
k + 1 < len F by A36, A78, NAT_1:13;
then A127: (accum F) . ((k + 1) + 1) = ((accum F) /. (k + 1)) + (F /. ((k + 1) + 1)) by A38, NAT_1:11
.= (F /. 1) + (F /. (1 + 1)) by A36, A37, A19, A22, A122, A126, FINSEQ_4:15 ;
A128: F /. (1 + 1) = F . (1 + 1) by A36, A78, A122, FINSEQ_4:15;
(h . 1) + 1 <= h . (1 + 1) by A123, NAT_1:13;
then ((h . 1) + 1) - 1 <= (h . (1 + 1)) - 1 by XREAL_1:9;
then A129: h . 1 <= (h . (1 + 1)) -' 1 by A26, A123, XREAL_1:233, XXREAL_0:2;
h . (1 + 1) < (h . (1 + 1)) + 1 by XREAL_1:29;
then A130: (h . (1 + 1)) - 1 < ((h . (1 + 1)) + 1) - 1 by XREAL_1:9;
then A131: (h . (1 + 1)) -' 1 < h . (1 + 1) by A26, A123, XREAL_1:233, XXREAL_0:2;
A132: 1 < h . (1 + 1) by A26, A123, XXREAL_0:2;
then 1 + 1 <= h . (1 + 1) by NAT_1:13;
then A133: (1 + 1) - 1 <= (h . (1 + 1)) - 1 by XREAL_1:9;
then ((h . (1 + 1)) -' 1) -' 1 = ((h . (1 + 1)) -' 1) - 1 by A124, XREAL_1:233;
then A134: (((h . (1 + 1)) -' 1) -' 1) + 1 = (h . (1 + 1)) -' 1 ;
1 + 1 in Seg (len h) by A36, A22, A78, A122, FINSEQ_1:1;
then 1 + 1 in dom h by FINSEQ_1:def_3;
then h . (1 + 1) in rng h by FUNCT_1:def_3;
then h . (1 + 1) in dom g by A2;
then A135: h . (1 + 1) in Seg (len g) by FINSEQ_1:def_3;
then h . (1 + 1) <= len g by FINSEQ_1:1;
then A136: g /. (h . ((k + 1) + 1)) = g . (h . (1 + 1)) by A122, A132, FINSEQ_4:15
.= F . (1 + 1) by A3, A36, A21, A79, A122, FUNCT_1:13 ;
h . (1 + 1) <= len g by A135, FINSEQ_1:1;
then (h . (1 + 1)) -' 1 < len (accum g) by A32, A124, A130, XXREAL_0:2;
then A137: (accum g) /. ((h . ((k + 1) + 1)) -' 1) = (accum g) . ((h . (1 + 1)) -' 1) by A122, A124, A133, FINSEQ_4:15
.= F . 1 by A37, A106, A122, A134, A131, A129 ;
h . (1 + 1) <= len g by A135, FINSEQ_1:1;
then A138: (h . ((k + 1) + 1)) -' 1 < len g by A122, A125, NAT_1:13;
1 <= (h . ((k + 1) + 1)) -' 1 by A122, A132, A125, NAT_1:13;
then (accum g) . (((h . ((k + 1) + 1)) -' 1) + 1) = ((accum g) /. ((h . ((k + 1) + 1)) -' 1)) + (g /. (h . ((k + 1) + 1))) by Def10, A122, A124, A138
.= (F /. 1) + (F /. (1 + 1)) by A19, A22, A128, A137, A136, FINSEQ_4:15 ;
hence (accum g) . (h . ((k + 1) + 1)) = (accum F) . ((k + 1) + 1) by A122, A124, A127; ::_thesis: verum
end;
end;
end;
hence (accum g) . (h . ((k + 1) + 1)) = (accum F) . ((k + 1) + 1) ; ::_thesis: verum
end;
hence S2[k + 1] ; ::_thesis: verum
end;
defpred S3[ Nat] means ( h . (len h) <= $1 + 1 & $1 + 1 <= len g implies (accum g) . ($1 + 1) = (accum F) . (len (accum F)) );
A139: S2[ 0 ] by A64;
A140: for k being Nat holds S2[k] from NAT_1:sch_2(A139, A75);
A141: for k being Nat st S3[k] holds
S3[k + 1]
proof
let k be Nat; ::_thesis: ( S3[k] implies S3[k + 1] )
assume A142: S3[k] ; ::_thesis: S3[k + 1]
( h . (len h) <= (k + 1) + 1 & (k + 1) + 1 <= len g implies (accum g) . ((k + 1) + 1) = (accum F) . (len (accum F)) )
proof
assume that
A143: h . (len h) <= (k + 1) + 1 and
A144: (k + 1) + 1 <= len g ; ::_thesis: (accum g) . ((k + 1) + 1) = (accum F) . (len (accum F))
percases ( h . (len h) < (k + 1) + 1 or h . (len h) = (k + 1) + 1 ) by A143, XXREAL_0:1;
supposeA145: h . (len h) < (k + 1) + 1 ; ::_thesis: (accum g) . ((k + 1) + 1) = (accum F) . (len (accum F))
A146: now__::_thesis:_not_(k_+_1)_+_1_in_rng_h
assume (k + 1) + 1 in rng h ; ::_thesis: contradiction
then consider x being set such that
A147: x in dom h and
A148: h . x = (k + 1) + 1 by FUNCT_1:def_3;
reconsider nx = x as Element of NAT by A147;
A149: x in Seg (len h) by A147, FINSEQ_1:def_3;
then A150: nx <= len h by FINSEQ_1:1;
1 <= nx by A149, FINSEQ_1:1;
hence contradiction by A1, A145, A148, A150, Th7; ::_thesis: verum
end;
1 <= (k + 1) + 1 by NAT_1:11;
then (k + 1) + 1 in Seg (len g) by A144, FINSEQ_1:1;
then A151: (k + 1) + 1 in dom g by FINSEQ_1:def_3;
k + 1 < (k + 1) + 1 by XREAL_1:29;
then A152: k + 1 < len g by A144, XXREAL_0:2;
then A153: (accum g) . ((k + 1) + 1) = ((accum g) /. (k + 1)) + (g /. ((k + 1) + 1)) by A34, NAT_1:11;
1 <= k + 1 by NAT_1:11;
then A154: (accum g) /. (k + 1) = (accum F) . (len (accum F)) by A32, A142, A145, A152, FINSEQ_4:15, NAT_1:13;
1 < (k + 1) + 1 by XREAL_1:29;
then g /. ((k + 1) + 1) = g . ((k + 1) + 1) by A144, FINSEQ_4:15
.= 0* n by A4, A146, A151 ;
hence (accum g) . ((k + 1) + 1) = (accum F) . (len (accum F)) by A154, A153, EUCLID_4:1; ::_thesis: verum
end;
supposeA155: h . (len h) = (k + 1) + 1 ; ::_thesis: (accum g) . ((k + 1) + 1) = (accum F) . (len (accum F))
A156: (len h) -' 1 = (len h) - 1 by A19, XREAL_1:233;
( 1 <= ((len h) -' 1) + 1 & ((len h) -' 1) + 1 <= len (accum F) implies (accum g) . (h . (((len h) -' 1) + 1)) = (accum F) . (((len h) -' 1) + 1) ) by A140;
hence (accum g) . ((k + 1) + 1) = (accum F) . (len (accum F)) by A36, A18, A21, A155, A156, FINSEQ_1:1, FINSEQ_1:def_3; ::_thesis: verum
end;
end;
end;
hence S3[k + 1] ; ::_thesis: verum
end;
A157: 1 <= h . (len h) by A20, FINSEQ_1:1;
( h . (len h) <= 1 & 1 <= len g implies (accum g) . (0 + 1) = (accum F) . (len (accum F)) )
proof
assume that
A158: h . (len h) <= 1 and
1 <= len g ; ::_thesis: (accum g) . (0 + 1) = (accum F) . (len (accum F))
h . (len h) = 1 by A157, A158, XXREAL_0:1;
then len h <= 1 by A1, A26, Th8;
then A159: len h = 1 by A19, XXREAL_0:1;
(accum F) . 1 = g . (h . 1) by A3, A5, A37, A17, FUNCT_1:13
.= g . 1 by A157, A158, A159, XXREAL_0:1 ;
hence (accum g) . (0 + 1) = (accum F) . (len (accum F)) by A6, A36, A33, A159, FINSEQ_1:def_3; ::_thesis: verum
end;
then A160: S3[ 0 ] ;
for k being Nat holds S3[k] from NAT_1:sch_2(A160, A141);
hence Sum g = Sum F by A36, A39, A35, A29, A30; ::_thesis: verum
end;
supposeA161: len F <= 0 ; ::_thesis: Sum g = Sum F
then A162: Sum F = 0* n by Def11;
A163: dom g = Seg (len g) by FINSEQ_1:def_3;
Seg (len F) = {} by A161;
then dom F = {} by FINSEQ_1:def_3;
then A164: rng h = {} by A3, A5, RELAT_1:42;
A165: now__::_thesis:_for_z_being_set_st_z_in_dom_g_holds_
g_._z_=_((len_g)_|->_(0*_n))_._z
let z be set ; ::_thesis: ( z in dom g implies g . z = ((len g) |-> (0* n)) . z )
assume A166: z in dom g ; ::_thesis: g . z = ((len g) |-> (0* n)) . z
hence g . z = 0* n by A4, A164
.= ((len g) |-> (0* n)) . z by A163, A166, FINSEQ_2:57 ;
::_thesis: verum
end;
Seg (len g) = dom ((len g) |-> (0* n)) by FUNCOP_1:13;
then g = (len g) |-> (0* n) by A163, A165, FUNCT_1:2;
hence Sum g = Sum F by A162, Th22; ::_thesis: verum
end;
end;
end;
theorem Th24: :: EUCLID_7:24
for n being Nat
for g being FinSequence of REAL n
for h being FinSequence of NAT
for F being FinSequence of REAL n st h is one-to-one & rng h c= dom g & F = g * h & ( for i being Element of NAT st i in dom g & not i in rng h holds
g . i = 0* n ) holds
Sum g = Sum F
proof
let n be Nat; ::_thesis: for g being FinSequence of REAL n
for h being FinSequence of NAT
for F being FinSequence of REAL n st h is one-to-one & rng h c= dom g & F = g * h & ( for i being Element of NAT st i in dom g & not i in rng h holds
g . i = 0* n ) holds
Sum g = Sum F
let g be FinSequence of REAL n; ::_thesis: for h being FinSequence of NAT
for F being FinSequence of REAL n st h is one-to-one & rng h c= dom g & F = g * h & ( for i being Element of NAT st i in dom g & not i in rng h holds
g . i = 0* n ) holds
Sum g = Sum F
let h be FinSequence of NAT ; ::_thesis: for F being FinSequence of REAL n st h is one-to-one & rng h c= dom g & F = g * h & ( for i being Element of NAT st i in dom g & not i in rng h holds
g . i = 0* n ) holds
Sum g = Sum F
let F be FinSequence of REAL n; ::_thesis: ( h is one-to-one & rng h c= dom g & F = g * h & ( for i being Element of NAT st i in dom g & not i in rng h holds
g . i = 0* n ) implies Sum g = Sum F )
assume that
A1: h is one-to-one and
A2: rng h c= dom g and
A3: F = g * h and
A4: for i being Element of NAT st i in dom g & not i in rng h holds
g . i = 0* n ; ::_thesis: Sum g = Sum F
consider h3 being Permutation of (dom h), h2 being FinSequence of NAT such that
A5: h2 = h * h3 and
A6: h2 is increasing and
A7: dom h = dom h2 and
A8: rng h = rng h2 by A1, Th14;
dom (g * h) = dom h by A2, RELAT_1:27;
then reconsider h33 = h3 as Permutation of (dom F) by A3;
reconsider F22 = g * h2 as Function ;
dom F22 = dom h by A2, A7, A8, RELAT_1:27
.= Seg (len h) by FINSEQ_1:def_3 ;
then reconsider F23 = F22 as FinSequence by FINSEQ_1:def_2;
rng F22 c= rng g by RELAT_1:26;
then rng F23 c= REAL n by XBOOLE_1:1;
then reconsider F2 = F23 as FinSequence of REAL n by FINSEQ_1:def_4;
F2 = F (*) h33 by A3, A5, RELAT_1:36;
then Sum F = Sum F2 by Th21;
hence Sum g = Sum F by A2, A4, A6, A8, Th23; ::_thesis: verum
end;
begin
definition
let n, i be Nat;
:: original: Base_FinSeq
redefine func Base_FinSeq (n,i) -> Element of REAL n;
coherence
Base_FinSeq (n,i) is Element of REAL n
proof
len (Base_FinSeq (n,i)) = n by MATRIXR2:74;
hence Base_FinSeq (n,i) is Element of REAL n by FINSEQ_2:92; ::_thesis: verum
end;
end;
theorem Th25: :: EUCLID_7:25
for n, i1, i2 being Nat st 1 <= i1 & i1 <= n & Base_FinSeq (n,i1) = Base_FinSeq (n,i2) holds
i1 = i2
proof
let n be Nat; ::_thesis: for i1, i2 being Nat st 1 <= i1 & i1 <= n & Base_FinSeq (n,i1) = Base_FinSeq (n,i2) holds
i1 = i2
let i1, i2 be Nat; ::_thesis: ( 1 <= i1 & i1 <= n & Base_FinSeq (n,i1) = Base_FinSeq (n,i2) implies i1 = i2 )
assume that
A1: 1 <= i1 and
A2: i1 <= n and
A3: Base_FinSeq (n,i1) = Base_FinSeq (n,i2) ; ::_thesis: i1 = i2
(Base_FinSeq (n,i1)) . i1 = 1 by A1, A2, MATRIXR2:75;
hence i1 = i2 by A1, A2, A3, MATRIXR2:76; ::_thesis: verum
end;
theorem Th26: :: EUCLID_7:26
for n, i being Nat holds sqr (Base_FinSeq (n,i)) = Base_FinSeq (n,i)
proof
let n, i be Nat; ::_thesis: sqr (Base_FinSeq (n,i)) = Base_FinSeq (n,i)
A1: dom (sqrreal * (Base_FinSeq (n,i))) = (Base_FinSeq (n,i)) " (dom sqrreal) by RELAT_1:147;
A2: rng (Base_FinSeq (n,i)) c= REAL ;
A3: for x being set st x in dom (Base_FinSeq (n,i)) holds
(sqrreal * (Base_FinSeq (n,i))) . x = (Base_FinSeq (n,i)) . x
proof
let x be set ; ::_thesis: ( x in dom (Base_FinSeq (n,i)) implies (sqrreal * (Base_FinSeq (n,i))) . x = (Base_FinSeq (n,i)) . x )
assume A4: x in dom (Base_FinSeq (n,i)) ; ::_thesis: (sqrreal * (Base_FinSeq (n,i))) . x = (Base_FinSeq (n,i)) . x
then reconsider nx = x as Element of NAT ;
A5: (sqrreal * (Base_FinSeq (n,i))) . x = sqrreal . ((Base_FinSeq (n,i)) . x) by A4, FUNCT_1:13;
A6: x in Seg (len (Base_FinSeq (n,i))) by A4, FINSEQ_1:def_3;
then A7: 1 <= nx by FINSEQ_1:1;
len (Base_FinSeq (n,i)) = n by MATRIXR2:74;
then A8: nx <= n by A6, FINSEQ_1:1;
percases ( nx = i or nx <> i ) ;
supposeA9: nx = i ; ::_thesis: (sqrreal * (Base_FinSeq (n,i))) . x = (Base_FinSeq (n,i)) . x
hence (sqrreal * (Base_FinSeq (n,i))) . x = sqrreal . 1 by A7, A8, A5, MATRIXR2:75
.= 1 ^2 by RVSUM_1:def_2
.= (Base_FinSeq (n,i)) . x by A7, A8, A9, MATRIXR2:75 ;
::_thesis: verum
end;
supposeA10: nx <> i ; ::_thesis: (sqrreal * (Base_FinSeq (n,i))) . x = (Base_FinSeq (n,i)) . x
hence (sqrreal * (Base_FinSeq (n,i))) . x = sqrreal . 0 by A7, A8, A5, MATRIXR2:76
.= 0 ^2 by RVSUM_1:def_2
.= (Base_FinSeq (n,i)) . x by A7, A8, A10, MATRIXR2:76 ;
::_thesis: verum
end;
end;
end;
(Base_FinSeq (n,i)) " (dom sqrreal) = (Base_FinSeq (n,i)) " REAL by FUNCT_2:def_1
.= dom (Base_FinSeq (n,i)) by A2, Th2 ;
hence sqr (Base_FinSeq (n,i)) = Base_FinSeq (n,i) by A1, A3, FUNCT_1:2; ::_thesis: verum
end;
theorem Th27: :: EUCLID_7:27
for i, n being Nat st 1 <= i & i <= n holds
Sum (Base_FinSeq (n,i)) = 1
proof
let i, n be Nat; ::_thesis: ( 1 <= i & i <= n implies Sum (Base_FinSeq (n,i)) = 1 )
assume that
A1: 1 <= i and
A2: i <= n ; ::_thesis: Sum (Base_FinSeq (n,i)) = 1
defpred S1[ set , set ] means ( ( not $1 in i implies $2 = 1 ) & ( $1 in i implies $2 = 0 ) );
set F = Base_FinSeq (n,i);
A3: for x being set st x in NAT holds
ex y being set st
( y in REAL & S1[x,y] )
proof
let x be set ; ::_thesis: ( x in NAT implies ex y being set st
( y in REAL & S1[x,y] ) )
assume x in NAT ; ::_thesis: ex y being set st
( y in REAL & S1[x,y] )
then reconsider nx = x as Element of NAT ;
percases ( nx >= i or nx < i ) ;
suppose nx >= i ; ::_thesis: ex y being set st
( y in REAL & S1[x,y] )
then not nx in i by NAT_1:44;
hence ex y being set st
( y in REAL & S1[x,y] ) ; ::_thesis: verum
end;
suppose nx < i ; ::_thesis: ex y being set st
( y in REAL & S1[x,y] )
then nx in i by NAT_1:44;
hence ex y being set st
( y in REAL & S1[x,y] ) ; ::_thesis: verum
end;
end;
end;
consider f0 being Function of NAT,REAL such that
A4: for x being set st x in NAT holds
S1[x,f0 . x] from FUNCT_2:sch_1(A3);
A5: len (Base_FinSeq (n,i)) = n by MATRIXR2:74;
A6: for n2 being Element of NAT st 0 <> n2 & n2 < len (Base_FinSeq (n,i)) holds
f0 . (n2 + 1) = addreal . ((f0 . n2),((Base_FinSeq (n,i)) . (n2 + 1)))
proof
let n2 be Element of NAT ; ::_thesis: ( 0 <> n2 & n2 < len (Base_FinSeq (n,i)) implies f0 . (n2 + 1) = addreal . ((f0 . n2),((Base_FinSeq (n,i)) . (n2 + 1))) )
assume that
0 <> n2 and
A7: n2 < len (Base_FinSeq (n,i)) ; ::_thesis: f0 . (n2 + 1) = addreal . ((f0 . n2),((Base_FinSeq (n,i)) . (n2 + 1)))
A8: n2 + 1 <= n by A5, A7, NAT_1:13;
percases ( n2 + 1 < i or i <= n2 + 1 ) ;
supposeA9: n2 + 1 < i ; ::_thesis: f0 . (n2 + 1) = addreal . ((f0 . n2),((Base_FinSeq (n,i)) . (n2 + 1)))
then n2 < i by NAT_1:13;
then n2 in i by NAT_1:44;
then A10: f0 . n2 = 0 by A4;
A11: 1 <= n2 + 1 by NAT_1:11;
A12: n2 + 1 in i by A9, NAT_1:44;
n2 + 1 <= len (Base_FinSeq (n,i)) by A7, NAT_1:13;
then addreal . ((f0 . n2),((Base_FinSeq (n,i)) . (n2 + 1))) = addreal . (0,0) by A5, A9, A10, A11, MATRIXR2:76
.= 0 + 0 by BINOP_2:def_9 ;
hence f0 . (n2 + 1) = addreal . ((f0 . n2),((Base_FinSeq (n,i)) . (n2 + 1))) by A4, A12; ::_thesis: verum
end;
supposeA13: i <= n2 + 1 ; ::_thesis: f0 . (n2 + 1) = addreal . ((f0 . n2),((Base_FinSeq (n,i)) . (n2 + 1)))
percases ( i < n2 + 1 or i = n2 + 1 ) by A13, XXREAL_0:1;
supposeA14: i < n2 + 1 ; ::_thesis: f0 . (n2 + 1) = addreal . ((f0 . n2),((Base_FinSeq (n,i)) . (n2 + 1)))
then i <= n2 by NAT_1:13;
then A15: not n2 in i by NAT_1:44;
A16: not n2 + 1 in i by A14, NAT_1:44;
1 <= n2 + 1 by A1, A14, XXREAL_0:2;
then (Base_FinSeq (n,i)) . (n2 + 1) = 0 by A8, A14, MATRIXR2:76;
then addreal . ((f0 . n2),((Base_FinSeq (n,i)) . (n2 + 1))) = addreal . (1,0) by A4, A15
.= 1 + 0 by BINOP_2:def_9 ;
hence f0 . (n2 + 1) = addreal . ((f0 . n2),((Base_FinSeq (n,i)) . (n2 + 1))) by A4, A16; ::_thesis: verum
end;
supposeA17: i = n2 + 1 ; ::_thesis: f0 . (n2 + 1) = addreal . ((f0 . n2),((Base_FinSeq (n,i)) . (n2 + 1)))
n2 < n2 + 1 by XREAL_1:29;
then n2 in i by A17, NAT_1:44;
then f0 . n2 = 0 by A4;
then A18: addreal . ((f0 . n2),((Base_FinSeq (n,i)) . (n2 + 1))) = addreal . (0,1) by A1, A2, A17, MATRIXR2:75
.= 0 + 1 by BINOP_2:def_9 ;
not n2 + 1 in i by A17;
hence f0 . (n2 + 1) = addreal . ((f0 . n2),((Base_FinSeq (n,i)) . (n2 + 1))) by A4, A18; ::_thesis: verum
end;
end;
end;
end;
end;
A19: f0 . 1 = (Base_FinSeq (n,i)) . 1
proof
percases ( 1 < i or 1 >= i ) ;
supposeA20: 1 < i ; ::_thesis: f0 . 1 = (Base_FinSeq (n,i)) . 1
then 1 in i by NAT_1:44;
then A21: f0 . 1 = 0 by A4;
1 <= n by A1, A2, XXREAL_0:2;
hence f0 . 1 = (Base_FinSeq (n,i)) . 1 by A20, A21, MATRIXR2:76; ::_thesis: verum
end;
supposeA22: 1 >= i ; ::_thesis: f0 . 1 = (Base_FinSeq (n,i)) . 1
then not 1 in i by NAT_1:44;
then A23: f0 . 1 = 1 by A4;
1 = i by A1, A22, XXREAL_0:1;
hence f0 . 1 = (Base_FinSeq (n,i)) . 1 by A2, A23, MATRIXR2:75; ::_thesis: verum
end;
end;
end;
A24: f0 . (len (Base_FinSeq (n,i))) = 1
proof
percases ( len (Base_FinSeq (n,i)) < i or len (Base_FinSeq (n,i)) >= i ) ;
suppose len (Base_FinSeq (n,i)) < i ; ::_thesis: f0 . (len (Base_FinSeq (n,i))) = 1
hence f0 . (len (Base_FinSeq (n,i))) = 1 by A2, MATRIXR2:74; ::_thesis: verum
end;
suppose len (Base_FinSeq (n,i)) >= i ; ::_thesis: f0 . (len (Base_FinSeq (n,i))) = 1
then not len (Base_FinSeq (n,i)) in i by NAT_1:44;
hence f0 . (len (Base_FinSeq (n,i))) = 1 by A4; ::_thesis: verum
end;
end;
end;
len (Base_FinSeq (n,i)) >= 1 by A1, A2, A5, XXREAL_0:2;
hence Sum (Base_FinSeq (n,i)) = 1 by A19, A24, A6, FINSOP_1:def_1; ::_thesis: verum
end;
theorem Th28: :: EUCLID_7:28
for i, n being Nat st 1 <= i & i <= n holds
|.(Base_FinSeq (n,i)).| = 1
proof
let i, n be Nat; ::_thesis: ( 1 <= i & i <= n implies |.(Base_FinSeq (n,i)).| = 1 )
assume that
A1: 1 <= i and
A2: i <= n ; ::_thesis: |.(Base_FinSeq (n,i)).| = 1
sqrt (Sum (Base_FinSeq (n,i))) = 1 by A1, A2, Th27, SQUARE_1:18;
hence |.(Base_FinSeq (n,i)).| = 1 by Th26; ::_thesis: verum
end;
theorem Th29: :: EUCLID_7:29
for i, n, j being Nat st 1 <= i & i <= n & i <> j holds
|((Base_FinSeq (n,i)),(Base_FinSeq (n,j)))| = 0
proof
let i, n, j be Nat; ::_thesis: ( 1 <= i & i <= n & i <> j implies |((Base_FinSeq (n,i)),(Base_FinSeq (n,j)))| = 0 )
assume that
A1: 1 <= i and
A2: i <= n and
A3: i <> j ; ::_thesis: |((Base_FinSeq (n,i)),(Base_FinSeq (n,j)))| = 0
set x1 = Base_FinSeq (n,i);
set x2 = Base_FinSeq (n,j);
A4: dom (0* n) = Seg (len (n |-> 0)) by FINSEQ_1:def_3
.= Seg n by CARD_1:def_7 ;
A5: dom (Base_FinSeq (n,j)) = Seg (len (Base_FinSeq (n,j))) by FINSEQ_1:def_3
.= Seg n by MATRIXR2:74 ;
A6: dom (Base_FinSeq (n,i)) = Seg (len (Base_FinSeq (n,i))) by FINSEQ_1:def_3
.= Seg n by MATRIXR2:74 ;
A7: dom <:(Base_FinSeq (n,i)),(Base_FinSeq (n,j)):> = (dom (Base_FinSeq (n,i))) /\ (dom (Base_FinSeq (n,j))) by FUNCT_3:def_7;
dom multreal = [:REAL,REAL:] by FUNCT_2:def_1;
then A8: dom (multreal * <:(Base_FinSeq (n,i)),(Base_FinSeq (n,j)):>) = <:(Base_FinSeq (n,i)),(Base_FinSeq (n,j)):> " [:REAL,REAL:] by RELAT_1:147
.= Seg n by A7, A6, A5, RELSET_1:22 ;
for x being set st x in dom (0* n) holds
(multreal * <:(Base_FinSeq (n,i)),(Base_FinSeq (n,j)):>) . x = (0* n) . x
proof
let x be set ; ::_thesis: ( x in dom (0* n) implies (multreal * <:(Base_FinSeq (n,i)),(Base_FinSeq (n,j)):>) . x = (0* n) . x )
assume A9: x in dom (0* n) ; ::_thesis: (multreal * <:(Base_FinSeq (n,i)),(Base_FinSeq (n,j)):>) . x = (0* n) . x
then reconsider nx = x as Element of NAT ;
A10: (multreal * <:(Base_FinSeq (n,i)),(Base_FinSeq (n,j)):>) . x = multreal . (<:(Base_FinSeq (n,i)),(Base_FinSeq (n,j)):> . x) by A4, A8, A9, FUNCT_1:12
.= multreal . [((Base_FinSeq (n,i)) . nx),((Base_FinSeq (n,j)) . nx)] by A4, A7, A6, A5, A9, FUNCT_3:def_7 ;
A11: nx <= n by A4, A9, FINSEQ_1:1;
A12: 1 <= nx by A4, A9, FINSEQ_1:1;
percases ( nx = i or nx <> i ) ;
supposeA13: nx = i ; ::_thesis: (multreal * <:(Base_FinSeq (n,i)),(Base_FinSeq (n,j)):>) . x = (0* n) . x
then A14: (Base_FinSeq (n,i)) . nx = 1 by A1, A2, MATRIXR2:75;
A15: (Base_FinSeq (n,j)) . nx = 0 by A1, A2, A3, A13, MATRIXR2:76;
multreal . [((Base_FinSeq (n,i)) . nx),((Base_FinSeq (n,j)) . nx)] = multreal . (((Base_FinSeq (n,i)) . nx),((Base_FinSeq (n,j)) . nx))
.= 1 * 0 by A15, A14, BINOP_2:def_11
.= 0 ;
hence (multreal * <:(Base_FinSeq (n,i)),(Base_FinSeq (n,j)):>) . x = (0* n) . x by A10; ::_thesis: verum
end;
supposeA16: nx <> i ; ::_thesis: (multreal * <:(Base_FinSeq (n,i)),(Base_FinSeq (n,j)):>) . x = (0* n) . x
reconsider r = (Base_FinSeq (n,j)) . nx as Element of REAL ;
A17: (Base_FinSeq (n,i)) . nx = 0 by A12, A11, A16, MATRIXR2:76;
multreal . [((Base_FinSeq (n,i)) . nx),((Base_FinSeq (n,j)) . nx)] = multreal . (((Base_FinSeq (n,i)) . nx),((Base_FinSeq (n,j)) . nx))
.= 0 * r by A17, BINOP_2:def_11
.= 0 ;
hence (multreal * <:(Base_FinSeq (n,i)),(Base_FinSeq (n,j)):>) . x = (0* n) . x by A10; ::_thesis: verum
end;
end;
end;
then multreal * <:(Base_FinSeq (n,i)),(Base_FinSeq (n,j)):> = 0* n by A4, A8, FUNCT_1:2;
then multreal .: ((Base_FinSeq (n,i)),(Base_FinSeq (n,j))) = 0* n by FUNCOP_1:def_3;
hence |((Base_FinSeq (n,i)),(Base_FinSeq (n,j)))| = 0 by RVSUM_1:81; ::_thesis: verum
end;
theorem Th30: :: EUCLID_7:30
for n, i being Nat
for x being Element of REAL n st 1 <= i & i <= n holds
|(x,(Base_FinSeq (n,i)))| = x . i
proof
let n, i be Nat; ::_thesis: for x being Element of REAL n st 1 <= i & i <= n holds
|(x,(Base_FinSeq (n,i)))| = x . i
let x be Element of REAL n; ::_thesis: ( 1 <= i & i <= n implies |(x,(Base_FinSeq (n,i)))| = x . i )
assume that
A1: 1 <= i and
A2: i <= n ; ::_thesis: |(x,(Base_FinSeq (n,i)))| = x . i
set x2 = Base_FinSeq (n,i);
A3: len x = n by CARD_1:def_7;
A4: len (Base_FinSeq (n,i)) = n by MATRIXR2:74;
then A5: len (mlt (x,(Base_FinSeq (n,i)))) = n by A3, MATRPROB:30;
A6: for j being Nat st 1 <= j & j <= n holds
(mlt (x,(Base_FinSeq (n,i)))) . j = ((x /. i) * (Base_FinSeq (n,i))) . j
proof
let j be Nat; ::_thesis: ( 1 <= j & j <= n implies (mlt (x,(Base_FinSeq (n,i)))) . j = ((x /. i) * (Base_FinSeq (n,i))) . j )
assume that
A7: 1 <= j and
A8: j <= n ; ::_thesis: (mlt (x,(Base_FinSeq (n,i)))) . j = ((x /. i) * (Base_FinSeq (n,i))) . j
reconsider j0 = j as Element of NAT by ORDINAL1:def_12;
A9: now__::_thesis:_(_(_i_=_j_&_((x_/._i)_*_(Base_FinSeq_(n,i)))_._j_=_(x_/._j)_*_((Base_FinSeq_(n,i))_._j)_)_or_(_i_<>_j_&_((x_/._i)_*_(Base_FinSeq_(n,i)))_._j_=_(x_/._j)_*_((Base_FinSeq_(n,i))_._j)_)_)
percases ( i = j or i <> j ) ;
case i = j ; ::_thesis: ((x /. i) * (Base_FinSeq (n,i))) . j = (x /. j) * ((Base_FinSeq (n,i)) . j)
hence ((x /. i) * (Base_FinSeq (n,i))) . j = (x /. j) * ((Base_FinSeq (n,i)) . j) by RVSUM_1:44; ::_thesis: verum
end;
case i <> j ; ::_thesis: ((x /. i) * (Base_FinSeq (n,i))) . j = (x /. j) * ((Base_FinSeq (n,i)) . j)
then A10: (Base_FinSeq (n,i)) . j0 = 0 by A7, A8, MATRIXR2:76;
((x /. i) * (Base_FinSeq (n,i))) . j = (x /. i) * ((Base_FinSeq (n,i)) . j) by RVSUM_1:44
.= (x /. j) * ((Base_FinSeq (n,i)) . j) by A10 ;
hence ((x /. i) * (Base_FinSeq (n,i))) . j = (x /. j) * ((Base_FinSeq (n,i)) . j) ; ::_thesis: verum
end;
end;
end;
(mlt (x,(Base_FinSeq (n,i)))) . j = (x . j) * ((Base_FinSeq (n,i)) . j) by RVSUM_1:59;
hence (mlt (x,(Base_FinSeq (n,i)))) . j = ((x /. i) * (Base_FinSeq (n,i))) . j by A3, A7, A8, A9, FINSEQ_4:15; ::_thesis: verum
end;
len ((x /. i) * (Base_FinSeq (n,i))) = n by A4, RVSUM_1:117;
then mlt (x,(Base_FinSeq (n,i))) = (x /. i) * (Base_FinSeq (n,i)) by A5, A6, FINSEQ_1:14;
then Sum (mlt (x,(Base_FinSeq (n,i)))) = (x /. i) * (Sum (Base_FinSeq (n,i))) by RVSUM_1:87
.= (x /. i) * 1 by A1, A2, Th27
.= x . i by A1, A2, A3, FINSEQ_4:15 ;
hence |(x,(Base_FinSeq (n,i)))| = x . i ; ::_thesis: verum
end;
definition
let n be Nat;
let x0 be Element of REAL n;
func ProjFinSeq x0 -> FinSequence of REAL n means :Def12: :: EUCLID_7:def 12
( len it = n & ( for i being Nat st 1 <= i & i <= n holds
it . i = |(x0,(Base_FinSeq (n,i)))| * (Base_FinSeq (n,i)) ) );
existence
ex b1 being FinSequence of REAL n st
( len b1 = n & ( for i being Nat st 1 <= i & i <= n holds
b1 . i = |(x0,(Base_FinSeq (n,i)))| * (Base_FinSeq (n,i)) ) )
proof
defpred S1[ set , set ] means for i being Nat st i = $1 & 1 <= i & i <= n holds
$2 = |(x0,(Base_FinSeq (n,i)))| * (Base_FinSeq (n,i));
A1: for k being Nat st k in Seg n holds
ex x being Element of REAL n st S1[k,x]
proof
reconsider n0 = n as Element of NAT by ORDINAL1:def_12;
let k be Nat; ::_thesis: ( k in Seg n implies ex x being Element of REAL n st S1[k,x] )
assume k in Seg n ; ::_thesis: ex x being Element of REAL n st S1[k,x]
reconsider k0 = k as Element of NAT by ORDINAL1:def_12;
reconsider x00 = |(x0,(Base_FinSeq (n0,k0)))| * (Base_FinSeq (n0,k0)) as Element of REAL n ;
for i being Nat st i = k & 1 <= i & i <= n holds
x00 = |(x0,(Base_FinSeq (n,i)))| * (Base_FinSeq (n,i)) ;
hence ex x being Element of REAL n st S1[k,x] ; ::_thesis: verum
end;
consider p being FinSequence of REAL n such that
A2: ( dom p = Seg n & ( for k being Nat st k in Seg n holds
S1[k,p . k] ) ) from FINSEQ_1:sch_5(A1);
A3: for i being Nat st 1 <= i & i <= n holds
p . i = |(x0,(Base_FinSeq (n,i)))| * (Base_FinSeq (n,i))
proof
let i be Nat; ::_thesis: ( 1 <= i & i <= n implies p . i = |(x0,(Base_FinSeq (n,i)))| * (Base_FinSeq (n,i)) )
assume that
A4: 1 <= i and
A5: i <= n ; ::_thesis: p . i = |(x0,(Base_FinSeq (n,i)))| * (Base_FinSeq (n,i))
i in Seg n by A4, A5, FINSEQ_1:1;
hence p . i = |(x0,(Base_FinSeq (n,i)))| * (Base_FinSeq (n,i)) by A2, A4, A5; ::_thesis: verum
end;
Seg n = Seg (len p) by A2, FINSEQ_1:def_3;
hence ex b1 being FinSequence of REAL n st
( len b1 = n & ( for i being Nat st 1 <= i & i <= n holds
b1 . i = |(x0,(Base_FinSeq (n,i)))| * (Base_FinSeq (n,i)) ) ) by A3, FINSEQ_1:6; ::_thesis: verum
end;
uniqueness
for b1, b2 being FinSequence of REAL n st len b1 = n & ( for i being Nat st 1 <= i & i <= n holds
b1 . i = |(x0,(Base_FinSeq (n,i)))| * (Base_FinSeq (n,i)) ) & len b2 = n & ( for i being Nat st 1 <= i & i <= n holds
b2 . i = |(x0,(Base_FinSeq (n,i)))| * (Base_FinSeq (n,i)) ) holds
b1 = b2
proof
let r1, r2 be FinSequence of REAL n; ::_thesis: ( len r1 = n & ( for i being Nat st 1 <= i & i <= n holds
r1 . i = |(x0,(Base_FinSeq (n,i)))| * (Base_FinSeq (n,i)) ) & len r2 = n & ( for i being Nat st 1 <= i & i <= n holds
r2 . i = |(x0,(Base_FinSeq (n,i)))| * (Base_FinSeq (n,i)) ) implies r1 = r2 )
assume that
A6: len r1 = n and
A7: for i being Nat st 1 <= i & i <= n holds
r1 . i = |(x0,(Base_FinSeq (n,i)))| * (Base_FinSeq (n,i)) and
A8: len r2 = n and
A9: for i being Nat st 1 <= i & i <= n holds
r2 . i = |(x0,(Base_FinSeq (n,i)))| * (Base_FinSeq (n,i)) ; ::_thesis: r1 = r2
for k being Nat st 1 <= k & k <= n holds
r1 . k = r2 . k
proof
reconsider n22 = n as Element of NAT by ORDINAL1:def_12;
let k be Nat; ::_thesis: ( 1 <= k & k <= n implies r1 . k = r2 . k )
assume that
A10: 1 <= k and
A11: k <= n ; ::_thesis: r1 . k = r2 . k
reconsider k0 = k as Element of NAT by ORDINAL1:def_12;
r1 . k0 = |(x0,(Base_FinSeq (n22,k0)))| * (Base_FinSeq (n22,k0)) by A7, A10, A11;
hence r1 . k = r2 . k by A9, A10, A11; ::_thesis: verum
end;
hence r1 = r2 by A6, A8, FINSEQ_1:14; ::_thesis: verum
end;
end;
:: deftheorem Def12 defines ProjFinSeq EUCLID_7:def_12_:_
for n being Nat
for x0 being Element of REAL n
for b3 being FinSequence of REAL n holds
( b3 = ProjFinSeq x0 iff ( len b3 = n & ( for i being Nat st 1 <= i & i <= n holds
b3 . i = |(x0,(Base_FinSeq (n,i)))| * (Base_FinSeq (n,i)) ) ) );
theorem Th31: :: EUCLID_7:31
for n being Nat
for x0 being Element of REAL n holds x0 = Sum (ProjFinSeq x0)
proof
let n be Nat; ::_thesis: for x0 being Element of REAL n holds x0 = Sum (ProjFinSeq x0)
let x0 be Element of REAL n; ::_thesis: x0 = Sum (ProjFinSeq x0)
set f = ProjFinSeq x0;
reconsider n2 = n as Element of NAT by ORDINAL1:def_12;
now__::_thesis:_(_(_len_(ProjFinSeq_x0)_>_0_&_x0_=_(accum_(ProjFinSeq_x0))_._(len_(ProjFinSeq_x0))_)_or_(_len_(ProjFinSeq_x0)_<=_0_&_x0_=_0*_n_)_)
percases ( len (ProjFinSeq x0) > 0 or len (ProjFinSeq x0) <= 0 ) ;
caseA1: len (ProjFinSeq x0) > 0 ; ::_thesis: x0 = (accum (ProjFinSeq x0)) . (len (ProjFinSeq x0))
set g2 = accum (ProjFinSeq x0);
A2: len (ProjFinSeq x0) = len (accum (ProjFinSeq x0)) by Def10;
A3: (ProjFinSeq x0) . 1 = (accum (ProjFinSeq x0)) . 1 by Def10;
defpred S1[ Nat] means for i being Nat st 1 <= i & i <= len (ProjFinSeq x0) & 1 <= $1 & $1 <= len (ProjFinSeq x0) holds
( ( i <= $1 implies ((accum (ProjFinSeq x0)) /. $1) . i = x0 . i ) & ( i > $1 implies ((accum (ProjFinSeq x0)) /. $1) . i = 0 ) );
A4: len (ProjFinSeq x0) = n by Def12;
A5: 0 + 1 <= len (ProjFinSeq x0) by A1, NAT_1:13;
A6: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
reconsider k2 = k as Element of NAT by ORDINAL1:def_12;
assume A7: S1[k] ; ::_thesis: S1[k + 1]
for i being Nat st 1 <= i & i <= len (ProjFinSeq x0) & 1 <= k + 1 & k + 1 <= len (ProjFinSeq x0) holds
( ( i <= k + 1 implies ((accum (ProjFinSeq x0)) /. (k + 1)) . i = x0 . i ) & ( i > k + 1 implies ((accum (ProjFinSeq x0)) /. (k + 1)) . i = 0 ) )
proof
let i be Nat; ::_thesis: ( 1 <= i & i <= len (ProjFinSeq x0) & 1 <= k + 1 & k + 1 <= len (ProjFinSeq x0) implies ( ( i <= k + 1 implies ((accum (ProjFinSeq x0)) /. (k + 1)) . i = x0 . i ) & ( i > k + 1 implies ((accum (ProjFinSeq x0)) /. (k + 1)) . i = 0 ) ) )
assume that
A8: 1 <= i and
A9: i <= len (ProjFinSeq x0) and
A10: 1 <= k + 1 and
A11: k + 1 <= len (ProjFinSeq x0) ; ::_thesis: ( ( i <= k + 1 implies ((accum (ProjFinSeq x0)) /. (k + 1)) . i = x0 . i ) & ( i > k + 1 implies ((accum (ProjFinSeq x0)) /. (k + 1)) . i = 0 ) )
(accum (ProjFinSeq x0)) /. (k + 1) is Element of REAL n ;
then reconsider r = (accum (ProjFinSeq x0)) . (k + 1) as Element of REAL n by A2, A10, A11, FINSEQ_4:15;
reconsider i2 = i as Element of NAT by ORDINAL1:def_12;
A12: (accum (ProjFinSeq x0)) /. (k + 1) = (accum (ProjFinSeq x0)) . (k + 1) by A2, A10, A11, FINSEQ_4:15;
now__::_thesis:_(_(_1_<=_k_&_(_i_<=_k_+_1_implies_((accum_(ProjFinSeq_x0))_/._(k_+_1))_._i_=_x0_._i_)_&_(_i_>_k_+_1_implies_((accum_(ProjFinSeq_x0))_/._(k_+_1))_._i_=_0_)_)_or_(_k_<_1_&_(_i_<=_k_+_1_implies_((accum_(ProjFinSeq_x0))_/._(k_+_1))_._i_=_x0_._i_)_&_(_i_>_k_+_1_implies_((accum_(ProjFinSeq_x0))_/._(k_+_1))_._i_=_0_)_)_)
percases ( 1 <= k or k < 1 ) ;
caseA13: 1 <= k ; ::_thesis: ( ( i <= k + 1 implies ((accum (ProjFinSeq x0)) /. (k + 1)) . i = x0 . i ) & ( i > k + 1 implies ((accum (ProjFinSeq x0)) /. (k + 1)) . i = 0 ) )
reconsider r3 = (ProjFinSeq x0) /. (k + 1) as Element of REAL n ;
reconsider r2 = (accum (ProjFinSeq x0)) /. k as Element of REAL n ;
A14: (ProjFinSeq x0) /. (k + 1) = (ProjFinSeq x0) . (k + 1) by A10, A11, FINSEQ_4:15
.= |(x0,(Base_FinSeq (n2,(k + 1))))| * (Base_FinSeq (n2,(k + 1))) by A4, A10, A11, Def12 ;
A15: k < k + 1 by XREAL_1:29;
then A16: k < len (ProjFinSeq x0) by A11, XXREAL_0:2;
then r = ((accum (ProjFinSeq x0)) /. k) + ((ProjFinSeq x0) /. (k + 1)) by Def10, A13;
then A17: r . i = (r2 . i) + (r3 . i) by RVSUM_1:11;
A18: now__::_thesis:_(_i_<=_k_+_1_implies_((accum_(ProjFinSeq_x0))_/._(k_+_1))_._i_=_x0_._i_)
assume A19: i <= k + 1 ; ::_thesis: ((accum (ProjFinSeq x0)) /. (k + 1)) . i = x0 . i
percases ( i < k + 1 or i = k + 1 ) by A19, XXREAL_0:1;
supposeA20: i < k + 1 ; ::_thesis: ((accum (ProjFinSeq x0)) /. (k + 1)) . i = x0 . i
then A21: i <= k by NAT_1:13;
((ProjFinSeq x0) /. (k + 1)) . i = |(x0,(Base_FinSeq (n2,(k + 1))))| * ((Base_FinSeq (n2,(k2 + 1))) . i2) by A14, RVSUM_1:44
.= |(x0,(Base_FinSeq (n2,(k + 1))))| * 0 by A4, A8, A9, A20, MATRIXR2:76 ;
hence ((accum (ProjFinSeq x0)) /. (k + 1)) . i = x0 . i by A7, A8, A9, A12, A13, A16, A17, A21; ::_thesis: verum
end;
supposeA22: i = k + 1 ; ::_thesis: ((accum (ProjFinSeq x0)) /. (k + 1)) . i = x0 . i
then A23: ((accum (ProjFinSeq x0)) /. k) . i = 0 by A7, A8, A9, A13, A15, A16;
((ProjFinSeq x0) /. (k + 1)) . i = |(x0,(Base_FinSeq (n2,(k + 1))))| * ((Base_FinSeq (n2,(k2 + 1))) . i2) by A14, RVSUM_1:44
.= |(x0,(Base_FinSeq (n2,(k + 1))))| * 1 by A4, A8, A9, A22, MATRIXR2:75
.= x0 . (k + 1) by A4, A10, A11, Th30 ;
hence ((accum (ProjFinSeq x0)) /. (k + 1)) . i = x0 . i by A2, A8, A9, A17, A22, A23, FINSEQ_4:15; ::_thesis: verum
end;
end;
end;
now__::_thesis:_(_i_>_k_+_1_implies_((accum_(ProjFinSeq_x0))_/._(k_+_1))_._i_=_0_)
assume A24: i > k + 1 ; ::_thesis: ((accum (ProjFinSeq x0)) /. (k + 1)) . i = 0
then A25: i > k by A15, XXREAL_0:2;
((ProjFinSeq x0) /. (k + 1)) . i = |(x0,(Base_FinSeq (n2,(k + 1))))| * ((Base_FinSeq (n2,(k2 + 1))) . i2) by A14, RVSUM_1:44
.= |(x0,(Base_FinSeq (n2,(k + 1))))| * 0 by A4, A8, A9, A24, MATRIXR2:76
.= 0 ;
hence ((accum (ProjFinSeq x0)) /. (k + 1)) . i = 0 by A7, A8, A9, A12, A13, A16, A17, A25; ::_thesis: verum
end;
hence ( ( i <= k + 1 implies ((accum (ProjFinSeq x0)) /. (k + 1)) . i = x0 . i ) & ( i > k + 1 implies ((accum (ProjFinSeq x0)) /. (k + 1)) . i = 0 ) ) by A18; ::_thesis: verum
end;
case k < 1 ; ::_thesis: ( ( i <= k + 1 implies ((accum (ProjFinSeq x0)) /. (k + 1)) . i = x0 . i ) & ( i > k + 1 implies ((accum (ProjFinSeq x0)) /. (k + 1)) . i = 0 ) )
then A26: k + 1 <= 0 + 1 by NAT_1:13;
then A27: k = 0 by XREAL_1:6;
A28: now__::_thesis:_(_i_>_0_+_1_implies_((accum_(ProjFinSeq_x0))_/._(k_+_1))_._i_=_0_)
assume A29: i > 0 + 1 ; ::_thesis: ((accum (ProjFinSeq x0)) /. (k + 1)) . i = 0
(accum (ProjFinSeq x0)) /. 1 = (ProjFinSeq x0) . 1 by A5, A2, A3, FINSEQ_4:15;
then ((accum (ProjFinSeq x0)) /. 1) . i = (|(x0,(Base_FinSeq (n2,1)))| * (Base_FinSeq (n2,1))) . i by A5, A4, Def12
.= |(x0,(Base_FinSeq (n2,1)))| * ((Base_FinSeq (n2,1)) . i2) by RVSUM_1:44
.= |(x0,(Base_FinSeq (n2,1)))| * 0 by A4, A9, A29, MATRIXR2:76
.= 0 ;
hence ((accum (ProjFinSeq x0)) /. (k + 1)) . i = 0 by A27; ::_thesis: verum
end;
A30: now__::_thesis:_(_i_<=_0_+_1_implies_((accum_(ProjFinSeq_x0))_/._(0_+_1))_._i_=_x0_._i_)
assume i <= 0 + 1 ; ::_thesis: ((accum (ProjFinSeq x0)) /. (0 + 1)) . i = x0 . i
then A31: i = 1 by A8, XXREAL_0:1;
(accum (ProjFinSeq x0)) /. 1 = (ProjFinSeq x0) . 1 by A5, A2, A3, FINSEQ_4:15;
then ((accum (ProjFinSeq x0)) /. 1) . 1 = (|(x0,(Base_FinSeq (n2,1)))| * (Base_FinSeq (n2,1))) . 1 by A5, A4, Def12
.= |(x0,(Base_FinSeq (n2,1)))| * ((Base_FinSeq (n2,1)) . 1) by RVSUM_1:44
.= |(x0,(Base_FinSeq (n2,1)))| * 1 by A5, A4, MATRIXR2:75
.= x0 . 1 by A5, A4, Th30 ;
hence ((accum (ProjFinSeq x0)) /. (0 + 1)) . i = x0 . i by A31; ::_thesis: verum
end;
k <= 0 by A26, XREAL_1:6;
hence ( ( i <= k + 1 implies ((accum (ProjFinSeq x0)) /. (k + 1)) . i = x0 . i ) & ( i > k + 1 implies ((accum (ProjFinSeq x0)) /. (k + 1)) . i = 0 ) ) by A30, A28; ::_thesis: verum
end;
end;
end;
hence ( ( i <= k + 1 implies ((accum (ProjFinSeq x0)) /. (k + 1)) . i = x0 . i ) & ( i > k + 1 implies ((accum (ProjFinSeq x0)) /. (k + 1)) . i = 0 ) ) ; ::_thesis: verum
end;
hence S1[k + 1] ; ::_thesis: verum
end;
reconsider r4 = (accum (ProjFinSeq x0)) /. (len (ProjFinSeq x0)) as Element of REAL n ;
A32: len x0 = n by CARD_1:def_7;
then A33: len x0 = len r4 by CARD_1:def_7;
A34: S1[ 0 ] ;
A35: for k being Nat holds S1[k] from NAT_1:sch_2(A34, A6);
for i being Nat st 1 <= i & i <= len r4 holds
((accum (ProjFinSeq x0)) /. (len (ProjFinSeq x0))) . i = x0 . i
proof
let i be Nat; ::_thesis: ( 1 <= i & i <= len r4 implies ((accum (ProjFinSeq x0)) /. (len (ProjFinSeq x0))) . i = x0 . i )
assume that
A36: 1 <= i and
A37: i <= len r4 ; ::_thesis: ((accum (ProjFinSeq x0)) /. (len (ProjFinSeq x0))) . i = x0 . i
A38: i <= len (ProjFinSeq x0) by A4, A37, CARD_1:def_7;
1 <= len (ProjFinSeq x0) by A4, A32, A33, A36, A37, XXREAL_0:2;
hence ((accum (ProjFinSeq x0)) /. (len (ProjFinSeq x0))) . i = x0 . i by A35, A36, A38; ::_thesis: verum
end;
then x0 = (accum (ProjFinSeq x0)) /. (len (ProjFinSeq x0)) by A33, FINSEQ_1:14;
hence x0 = (accum (ProjFinSeq x0)) . (len (ProjFinSeq x0)) by A5, A2, FINSEQ_4:15; ::_thesis: verum
end;
case len (ProjFinSeq x0) <= 0 ; ::_thesis: x0 = 0* n
then A39: n = 0 by Def12;
then x0 = <*> REAL ;
hence x0 = 0* n by A39; ::_thesis: verum
end;
end;
end;
hence x0 = Sum (ProjFinSeq x0) by Def11; ::_thesis: verum
end;
definition
let n be Nat;
func RN_Base n -> Subset of (REAL n) equals :: EUCLID_7:def 13
{ (Base_FinSeq (n,i)) where i is Element of NAT : ( 1 <= i & i <= n ) } ;
coherence
{ (Base_FinSeq (n,i)) where i is Element of NAT : ( 1 <= i & i <= n ) } is Subset of (REAL n)
proof
{ (Base_FinSeq (n,i)) where i is Element of NAT : ( 1 <= i & i <= n ) } c= REAL n
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { (Base_FinSeq (n,i)) where i is Element of NAT : ( 1 <= i & i <= n ) } or x in REAL n )
assume x in { (Base_FinSeq (n,i)) where i is Element of NAT : ( 1 <= i & i <= n ) } ; ::_thesis: x in REAL n
then ex i being Element of NAT st
( x = Base_FinSeq (n,i) & 1 <= i & i <= n ) ;
hence x in REAL n ; ::_thesis: verum
end;
hence { (Base_FinSeq (n,i)) where i is Element of NAT : ( 1 <= i & i <= n ) } is Subset of (REAL n) ; ::_thesis: verum
end;
end;
:: deftheorem defines RN_Base EUCLID_7:def_13_:_
for n being Nat holds RN_Base n = { (Base_FinSeq (n,i)) where i is Element of NAT : ( 1 <= i & i <= n ) } ;
theorem Th32: :: EUCLID_7:32
for n being non zero Nat holds RN_Base n <> {}
proof
let n be non zero Nat; ::_thesis: RN_Base n <> {}
0 + 1 <= n by NAT_1:13;
then Base_FinSeq (n,1) in { (Base_FinSeq (n,i)) where i is Element of NAT : ( 1 <= i & i <= n ) } ;
hence RN_Base n <> {} ; ::_thesis: verum
end;
registration
cluster RN_Base 0 -> empty ;
coherence
RN_Base 0 is empty
proof
assume not RN_Base 0 is empty ; ::_thesis: contradiction
then consider x being set such that
A1: x in RN_Base 0 by XBOOLE_0:def_1;
ex i being Element of NAT st
( x = Base_FinSeq (0,i) & 1 <= i & i <= 0 ) by A1;
hence contradiction ; ::_thesis: verum
end;
end;
registration
let n be non zero Nat;
cluster RN_Base n -> non empty ;
coherence
not RN_Base n is empty by Th32;
end;
registration
let n be Nat;
cluster RN_Base n -> orthogonal_basis ;
coherence
RN_Base n is orthogonal_basis
proof
set B = RN_Base n;
A1: { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } c= RN_Base n
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } or y in RN_Base n )
assume y in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } ; ::_thesis: y in RN_Base n
then ex x being Element of REAL n st
( y = x & ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) ) ;
hence y in RN_Base n ; ::_thesis: verum
end;
RN_Base n c= { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) }
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in RN_Base n or y in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } )
assume y in RN_Base n ; ::_thesis: y in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) }
then ex i2 being Element of NAT st
( y = Base_FinSeq (n,i2) & 1 <= i2 & i2 <= n ) ;
hence y in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } ; ::_thesis: verum
end;
then A2: RN_Base n = { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } by A1, XBOOLE_0:def_10;
thus RN_Base n is R-orthogonal :: according to EUCLID_7:def_5,EUCLID_7:def_7 ::_thesis: ( RN_Base n is R-normal & RN_Base n is complete )
proof
let x, y be real-valued FinSequence; :: according to EUCLID_7:def_3 ::_thesis: ( x in RN_Base n & y in RN_Base n & x <> y implies |(x,y)| = 0 )
assume that
A3: x in RN_Base n and
A4: y in RN_Base n and
A5: x <> y ; ::_thesis: |(x,y)| = 0
A6: ex y0 being Element of REAL n st
( y = y0 & ex i being Element of NAT st
( 1 <= i & i <= n & y0 = Base_FinSeq (n,i) ) ) by A2, A4;
ex x0 being Element of REAL n st
( x = x0 & ex i being Element of NAT st
( 1 <= i & i <= n & x0 = Base_FinSeq (n,i) ) ) by A2, A3;
hence |(x,y)| = 0 by A5, A6, Th29; ::_thesis: verum
end;
thus RN_Base n is R-normal ::_thesis: RN_Base n is complete
proof
let x be real-valued FinSequence; :: according to EUCLID_7:def_4 ::_thesis: ( x in RN_Base n implies |.x.| = 1 )
assume x in RN_Base n ; ::_thesis: |.x.| = 1
then ex x0 being Element of REAL n st
( x = x0 & ex i being Element of NAT st
( 1 <= i & i <= n & x0 = Base_FinSeq (n,i) ) ) by A2;
hence |.x.| = 1 by Th28; ::_thesis: verum
end;
let B2 be R-orthonormal Subset of (REAL n); :: according to EUCLID_7:def_6 ::_thesis: ( RN_Base n c= B2 implies B2 = RN_Base n )
assume A7: RN_Base n c= B2 ; ::_thesis: B2 = RN_Base n
now__::_thesis:_B2_c=_RN_Base_n
assume not B2 c= RN_Base n ; ::_thesis: contradiction
then consider x being set such that
A8: x in B2 and
A9: not x in RN_Base n by TARSKI:def_3;
reconsider rx = x as Element of REAL n by A8;
A10: now__::_thesis:_not_rx_<>_0*_n
A11: n in NAT by ORDINAL1:def_12;
assume rx <> 0* n ; ::_thesis: contradiction
then consider i being Element of NAT such that
A12: 1 <= i and
A13: i <= n and
A14: rx . i <> 0 by A11, JORDAN2C:46;
Base_FinSeq (n,i) in RN_Base n by A12, A13;
then |(rx,(Base_FinSeq (n,i)))| = 0 by A7, A8, A9, Def3;
hence contradiction by A12, A13, A14, Th30; ::_thesis: verum
end;
|.(0* n).| = 0 by EUCLID:7;
hence contradiction by A8, A10, Def4; ::_thesis: verum
end;
hence B2 = RN_Base n by A7, XBOOLE_0:def_10; ::_thesis: verum
end;
end;
registration
let n be Nat;
cluster functional FinSequence-membered orthogonal_basis for Element of bool (REAL n);
existence
ex b1 being Subset of (REAL n) st b1 is orthogonal_basis
proof
take RN_Base n ; ::_thesis: RN_Base n is orthogonal_basis
thus RN_Base n is orthogonal_basis ; ::_thesis: verum
end;
end;
definition
let n be Nat;
mode Orthogonal_Basis of n is orthogonal_basis Subset of (REAL n);
end;
registration
let n be non zero Nat;
cluster orthogonal_basis -> non empty for Element of bool (REAL n);
coherence
for b1 being Orthogonal_Basis of n holds not b1 is empty
proof
let B be Orthogonal_Basis of n; ::_thesis: not B is empty
assume A1: B is empty ; ::_thesis: contradiction
then B c= RN_Base n by XBOOLE_1:2;
hence contradiction by A1, Def6; ::_thesis: verum
end;
end;
begin
registration
let n be Element of NAT ;
cluster REAL-US n -> constituted-FinSeqs ;
coherence
REAL-US n is constituted-FinSeqs
proof
let a be Element of (REAL-US n); :: according to MONOID_0:def_2 ::_thesis: a is set
reconsider a = a as Element of REAL n by REAL_NS1:def_6;
a is FinSequence of REAL ;
hence a is set ; ::_thesis: verum
end;
end;
registration
let n be Element of NAT ;
cluster -> real-valued for Element of the carrier of (REAL-US n);
coherence
for b1 being Element of (REAL-US n) holds b1 is real-valued
proof
let a be Element of (REAL-US n); ::_thesis: a is real-valued
reconsider a = a as Element of REAL n by REAL_NS1:def_6;
a is FinSequence of REAL ;
hence a is real-valued ; ::_thesis: verum
end;
end;
registration
let n be Element of NAT ;
let x, y be VECTOR of (REAL-US n);
let a, b be real-valued Function;
identifyx + y with a + b when x = a, y = b;
compatibility
( x = a & y = b implies x + y = a + b )
proof
assume that
A1: x = a and
A2: y = b ; ::_thesis: x + y = a + b
reconsider a1 = a, b1 = b as Element of REAL n by A1, A2, REAL_NS1:def_6;
thus x + y = (Euclid_add n) . (a1,b1) by A1, A2, REAL_NS1:def_6
.= a + b by REAL_NS1:def_1 ; ::_thesis: verum
end;
end;
registration
let n be Element of NAT ;
let x be VECTOR of (REAL-US n);
let y be real-valued Function;
let a, b be Element of REAL ;
identifya * x with b * y when x = y, a = b;
compatibility
( x = y & a = b implies a * x = b * y )
proof
assume that
A1: x = y and
A2: a = b ; ::_thesis: a * x = b * y
reconsider y1 = y as Element of REAL n by A1, REAL_NS1:def_6;
thus a * x = (Euclid_mult n) . (b,y1) by A1, A2, REAL_NS1:def_6
.= b (#) y by REAL_NS1:def_2 ; ::_thesis: verum
end;
end;
registration
let n be Element of NAT ;
let x be VECTOR of (REAL-US n);
let a be real-valued Function;
identify - x with - a when x = a;
compatibility
( x = a implies - x = - a )
proof
x is Element of REAL n by REAL_NS1:def_6;
then reconsider xn = x as Element of (REAL-NS n) by REAL_NS1:def_4;
assume A1: x = a ; ::_thesis: - x = - a
then reconsider a1 = a as Element of REAL n by REAL_NS1:def_6;
thus - x = - xn by REAL_NS1:13
.= - a1 by A1, REAL_NS1:4
.= - a ; ::_thesis: verum
end;
end;
registration
let n be Element of NAT ;
let x, y be VECTOR of (REAL-US n);
let a, b be real-valued Function;
identifyx - y with a - b when x = a, y = b;
compatibility
( x = a & y = b implies x - y = a - b ) ;
end;
theorem Th33: :: EUCLID_7:33
for n, j being Element of NAT
for F being FinSequence of the carrier of (REAL-US n)
for Bn being Subset of (REAL-US n)
for v0 being Element of (REAL-US n)
for l being Linear_Combination of Bn st F is one-to-one & Bn is R-orthogonal & rng F = Carrier l & v0 in Bn & j in dom (l (#) F) & v0 = F . j holds
(Euclid_scalar n) . (v0,(Sum (l (#) F))) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0))
proof
let n, j be Element of NAT ; ::_thesis: for F being FinSequence of the carrier of (REAL-US n)
for Bn being Subset of (REAL-US n)
for v0 being Element of (REAL-US n)
for l being Linear_Combination of Bn st F is one-to-one & Bn is R-orthogonal & rng F = Carrier l & v0 in Bn & j in dom (l (#) F) & v0 = F . j holds
(Euclid_scalar n) . (v0,(Sum (l (#) F))) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0))
let F be FinSequence of the carrier of (REAL-US n); ::_thesis: for Bn being Subset of (REAL-US n)
for v0 being Element of (REAL-US n)
for l being Linear_Combination of Bn st F is one-to-one & Bn is R-orthogonal & rng F = Carrier l & v0 in Bn & j in dom (l (#) F) & v0 = F . j holds
(Euclid_scalar n) . (v0,(Sum (l (#) F))) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0))
let Bn be Subset of (REAL-US n); ::_thesis: for v0 being Element of (REAL-US n)
for l being Linear_Combination of Bn st F is one-to-one & Bn is R-orthogonal & rng F = Carrier l & v0 in Bn & j in dom (l (#) F) & v0 = F . j holds
(Euclid_scalar n) . (v0,(Sum (l (#) F))) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0))
let v0 be Element of (REAL-US n); ::_thesis: for l being Linear_Combination of Bn st F is one-to-one & Bn is R-orthogonal & rng F = Carrier l & v0 in Bn & j in dom (l (#) F) & v0 = F . j holds
(Euclid_scalar n) . (v0,(Sum (l (#) F))) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0))
let l be Linear_Combination of Bn; ::_thesis: ( F is one-to-one & Bn is R-orthogonal & rng F = Carrier l & v0 in Bn & j in dom (l (#) F) & v0 = F . j implies (Euclid_scalar n) . (v0,(Sum (l (#) F))) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) )
assume that
A1: F is one-to-one and
A2: Bn is R-orthogonal and
A3: rng F = Carrier l and
A4: v0 in Bn and
A5: j in dom (l (#) F) and
A6: v0 = F . j ; ::_thesis: (Euclid_scalar n) . (v0,(Sum (l (#) F))) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0))
A7: len (l (#) F) = len F by RLVECT_2:def_7;
then A8: dom (l (#) F) = Seg (len F) by FINSEQ_1:def_3
.= dom F by FINSEQ_1:def_3 ;
reconsider F2 = l (#) F as FinSequence of the carrier of (REAL-US n) ;
reconsider rv0 = v0 as Element of REAL n by REAL_NS1:def_6;
A9: Carrier l c= Bn by RLVECT_2:def_6;
A10: dom (l (#) F) = Seg (len (l (#) F)) by FINSEQ_1:def_3;
then A11: j <= len F by A5, A7, FINSEQ_1:1;
consider f being Function of NAT, the carrier of (REAL-US n) such that
A12: Sum F2 = f . (len F2) and
A13: f . 0 = 0. (REAL-US n) and
A14: for j2 being Element of NAT
for v being Element of (REAL-US n) st j2 < len F2 & v = F2 . (j2 + 1) holds
f . (j2 + 1) = (f . j2) + v by RLVECT_1:def_12;
defpred S1[ Nat] means ( $1 >= j & $1 <= len F implies (Euclid_scalar n) . (v0,(f . $1)) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) );
defpred S2[ Nat] means ( $1 < j implies (Euclid_scalar n) . (v0,(f . $1)) = 0 );
0. (REAL-US n) = 0* n by REAL_NS1:def_6;
then (Euclid_scalar n) . (v0,(f . 0)) = |(rv0,(0* n))| by A13, REAL_NS1:def_5
.= 0 by EUCLID_4:18 ;
then A15: S2[ 0 ] ;
A16: j in Seg (len F) by A5, A7, FINSEQ_1:def_3;
then A17: j <= len F2 by A7, FINSEQ_1:1;
A18: for k being Element of NAT st S2[k] holds
S2[k + 1]
proof
let k be Element of NAT ; ::_thesis: ( S2[k] implies S2[k + 1] )
assume A19: S2[k] ; ::_thesis: S2[k + 1]
now__::_thesis:_(_(_k_<_len_F2_&_S2[k_+_1]_)_or_(_k_>=_len_F2_&_S2[k_+_1]_)_)
percases ( k < len F2 or k >= len F2 ) ;
caseA20: k < len F2 ; ::_thesis: verum
A21: 1 <= k + 1 by NAT_1:11;
k + 1 <= len F2 by A20, NAT_1:13;
then k + 1 in Seg (len F2) by A21, FINSEQ_1:1;
then k + 1 in dom F2 by FINSEQ_1:def_3;
then F2 . (k + 1) in rng F2 by FUNCT_1:def_3;
then reconsider v = F2 . (k + 1) as Element of (REAL-US n) ;
A22: f . (k + 1) = (f . k) + v by A14, A20;
reconsider rv = v as Element of REAL n by REAL_NS1:def_6;
reconsider fk = f . k as Element of REAL n by REAL_NS1:def_6;
percases ( k + 1 < j or k + 1 >= j ) ;
supposeA23: k + 1 < j ; ::_thesis: S2[k + 1]
A24: 1 <= k + 1 by NAT_1:11;
k + 1 < len F by A11, A23, XXREAL_0:2;
then k + 1 in Seg (len F) by A24, FINSEQ_1:1;
then A25: k + 1 in dom F by FINSEQ_1:def_3;
then A26: F /. (k + 1) = F . (k + 1) by PARTFUN1:def_6;
then A27: rv0 <> F /. (k + 1) by A1, A5, A6, A8, A23, A25, FUNCT_1:def_4;
reconsider fk1 = F /. (k + 1) as Element of REAL n by REAL_NS1:def_6;
A28: k < k + 1 by XREAL_1:29;
A29: |(rv0,(fk + rv))| = |(rv0,fk)| + |(rv0,rv)| by EUCLID_4:28;
A30: F /. (k + 1) in rng F by A25, A26, FUNCT_1:def_3;
v = (l . (F /. (k + 1))) * (F /. (k + 1)) by A8, A25, RLVECT_2:def_7;
then |(rv0,rv)| = (l . (F /. (k + 1))) * |(rv0,fk1)| by EUCLID_4:22
.= (l . (F /. (k + 1))) * 0 by A2, A3, A4, A9, A30, A27, Def3
.= 0 ;
then |(rv0,(fk + rv))| = 0 by A19, A23, A28, A29, REAL_NS1:def_5, XXREAL_0:2;
hence S2[k + 1] by A22, REAL_NS1:def_5; ::_thesis: verum
end;
suppose k + 1 >= j ; ::_thesis: S2[k + 1]
hence S2[k + 1] ; ::_thesis: verum
end;
end;
end;
caseA31: k >= len F2 ; ::_thesis: S2[k + 1]
k + 1 > k by XREAL_1:29;
then k + 1 > len F2 by A31, XXREAL_0:2;
hence S2[k + 1] by A17, XXREAL_0:2; ::_thesis: verum
end;
end;
end;
hence S2[k + 1] ; ::_thesis: verum
end;
A32: for i being Element of NAT holds S2[i] from NAT_1:sch_1(A15, A18);
A33: for i being Nat st i < j holds
(Euclid_scalar n) . (v0,(f . i)) = 0
proof
let i be Nat; ::_thesis: ( i < j implies (Euclid_scalar n) . (v0,(f . i)) = 0 )
reconsider i0 = i as Element of NAT by ORDINAL1:def_12;
assume i < j ; ::_thesis: (Euclid_scalar n) . (v0,(f . i)) = 0
then (Euclid_scalar n) . (v0,(f . i0)) = 0 by A32;
hence (Euclid_scalar n) . (v0,(f . i)) = 0 ; ::_thesis: verum
end;
A34: for k being Element of NAT st S1[k] holds
S1[k + 1]
proof
let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A35: S1[k] ; ::_thesis: S1[k + 1]
percases ( k + 1 < j or k + 1 >= j ) ;
suppose k + 1 < j ; ::_thesis: S1[k + 1]
hence S1[k + 1] ; ::_thesis: verum
end;
supposeA36: k + 1 >= j ; ::_thesis: S1[k + 1]
percases ( k + 1 > j or k + 1 = j ) by A36, XXREAL_0:1;
supposeA37: k + 1 > j ; ::_thesis: S1[k + 1]
percases ( k + 1 <= len F2 or k + 1 > len F2 ) ;
supposeA38: k + 1 <= len F2 ; ::_thesis: S1[k + 1]
1 <= k + 1 by NAT_1:11;
then A39: k + 1 in Seg (len F2) by A38, FINSEQ_1:1;
then A40: k + 1 in dom F by A7, FINSEQ_1:def_3;
then A41: F /. (k + 1) = F . (k + 1) by PARTFUN1:def_6;
then A42: F /. (k + 1) in rng F by A40, FUNCT_1:def_3;
k + 1 in dom F2 by A39, FINSEQ_1:def_3;
then F2 . (k + 1) in rng F2 by FUNCT_1:def_3;
then reconsider v = F2 . (k + 1) as Element of (REAL-US n) ;
reconsider fk1 = F /. (k + 1) as Element of REAL n by REAL_NS1:def_6;
reconsider fk = f . k as Element of REAL n by REAL_NS1:def_6;
k < k + 1 by XREAL_1:29;
then A43: k < len F2 by A38, XXREAL_0:2;
then A44: f . (k + 1) = (f . k) + v by A14;
A45: rv0 <> F /. (k + 1) by A1, A5, A6, A8, A37, A40, A41, FUNCT_1:def_4;
reconsider rv = v as Element of REAL n by REAL_NS1:def_6;
v = (l . (F /. (k + 1))) * (F /. (k + 1)) by A8, A40, RLVECT_2:def_7;
then A46: |(rv0,rv)| = (l . (F /. (k + 1))) * |(rv0,fk1)| by EUCLID_4:22
.= (l . (F /. (k + 1))) * 0 by A2, A3, A4, A9, A42, A45, Def3
.= 0 ;
|(rv0,(fk + rv))| = |(rv0,fk)| + |(rv0,rv)| by EUCLID_4:28;
then |(rv0,(fk + rv))| = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) by A35, A37, A43, A46, NAT_1:13, REAL_NS1:def_5, RLVECT_2:def_7;
hence S1[k + 1] by A44, REAL_NS1:def_5; ::_thesis: verum
end;
suppose k + 1 > len F2 ; ::_thesis: S1[k + 1]
hence S1[k + 1] by RLVECT_2:def_7; ::_thesis: verum
end;
end;
end;
supposeA47: k + 1 = j ; ::_thesis: S1[k + 1]
then F2 . (k + 1) in rng F2 by A5, FUNCT_1:def_3;
then reconsider v = F2 . (k + 1) as Element of (REAL-US n) ;
reconsider rv = v as Element of REAL n by REAL_NS1:def_6;
A48: v = (l . (F /. (k + 1))) * (F /. (k + 1)) by A5, A47, RLVECT_2:def_7;
k + 1 in dom F by A5, A10, A7, A47, FINSEQ_1:def_3;
then A49: |(rv0,rv)| = |(rv0,((l . (F /. j)) * rv0))| by A6, A47, A48, PARTFUN1:def_6
.= (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) by REAL_NS1:def_5 ;
k < k + 1 by XREAL_1:29;
then k < len F2 by A7, A11, A47, XXREAL_0:2;
then A50: f . (k + 1) = (f . k) + v by A14;
reconsider fk = f . k as Element of REAL n by REAL_NS1:def_6;
(Euclid_scalar n) . (v0,(f . k)) = 0 by A33, A47, XREAL_1:29;
then A51: |(rv0,fk)| = 0 by REAL_NS1:def_5;
|(rv0,(fk + rv))| = |(rv0,fk)| + |(rv0,rv)| by EUCLID_4:28;
hence S1[k + 1] by A50, A51, A49, REAL_NS1:def_5; ::_thesis: verum
end;
end;
end;
end;
end;
A52: S1[ 0 ] by A16, FINSEQ_1:1;
A53: for i being Element of NAT holds S1[i] from NAT_1:sch_1(A52, A34);
for i being Nat st i >= j & i <= len F holds
(Euclid_scalar n) . (v0,(f . i)) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0))
proof
let i be Nat; ::_thesis: ( i >= j & i <= len F implies (Euclid_scalar n) . (v0,(f . i)) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) )
assume that
A54: i >= j and
A55: i <= len F ; ::_thesis: (Euclid_scalar n) . (v0,(f . i)) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0))
reconsider i0 = i as Element of NAT by ORDINAL1:def_12;
(Euclid_scalar n) . (v0,(f . i0)) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) by A53, A54, A55;
hence (Euclid_scalar n) . (v0,(f . i)) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) ; ::_thesis: verum
end;
hence (Euclid_scalar n) . (v0,(Sum (l (#) F))) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) by A12, A7, A11; ::_thesis: verum
end;
theorem Th34: :: EUCLID_7:34
for n being Element of NAT
for f being FinSequence of REAL n
for g being FinSequence of the carrier of (REAL-US n) st f = g holds
Sum f = Sum g
proof
let n be Element of NAT ; ::_thesis: for f being FinSequence of REAL n
for g being FinSequence of the carrier of (REAL-US n) st f = g holds
Sum f = Sum g
let f be FinSequence of REAL n; ::_thesis: for g being FinSequence of the carrier of (REAL-US n) st f = g holds
Sum f = Sum g
let g be FinSequence of the carrier of (REAL-US n); ::_thesis: ( f = g implies Sum f = Sum g )
set V = REAL-US n;
assume A1: f = g ; ::_thesis: Sum f = Sum g
now__::_thesis:_(_(_len_f_>_0_&_ex_f2_being_Function_of_NAT,_the_carrier_of_(REAL-US_n)_st_
(_Sum_f_=_f2_._(len_g)_&_f2_._0_=_0._(REAL-US_n)_&_(_for_j_being_Element_of_NAT_
for_v_being_Element_of_(REAL-US_n)_st_j_<_len_g_&_v_=_g_._(j_+_1)_holds_
f2_._(j_+_1)_=_(f2_._j)_+_v_)_)_)_or_(_len_f_<=_0_&_ex_f2_being_Function_of_NAT,_the_carrier_of_(REAL-US_n)_st_
(_Sum_f_=_f2_._(len_g)_&_f2_._0_=_0._(REAL-US_n)_&_(_for_j_being_Element_of_NAT_
for_v_being_Element_of_(REAL-US_n)_st_j_<_len_g_&_v_=_g_._(j_+_1)_holds_
f2_._(j_+_1)_=_(f2_._j)_+_v_)_)_)_)
percases ( len f > 0 or len f <= 0 ) ;
caseA2: len f > 0 ; ::_thesis: ex f2 being Function of NAT, the carrier of (REAL-US n) st
( Sum f = f2 . (len g) & f2 . 0 = 0. (REAL-US n) & ( for j being Element of NAT
for v being Element of (REAL-US n) st j < len g & v = g . (j + 1) holds
f2 . (j + 1) = (f2 . j) + v ) )
set g2 = accum f;
A3: len f = len (accum f) by Def10;
A4: f . 1 = (accum f) . 1 by Def10;
A5: Sum f = (accum f) . (len f) by A2, Def11;
deffunc H1( set ) -> set = IFIN ($1,((len f) + 1),(IFEQ ($1,0,(0. (REAL-US n)),((accum f) /. $1))),(0. (REAL-US n)));
A6: for x being set st x in NAT holds
H1(x) in the carrier of (REAL-US n)
proof
let x be set ; ::_thesis: ( x in NAT implies H1(x) in the carrier of (REAL-US n) )
assume x in NAT ; ::_thesis: H1(x) in the carrier of (REAL-US n)
then reconsider nx = x as Element of NAT ;
percases ( nx in (len f) + 1 or not nx in (len f) + 1 ) ;
suppose nx in (len f) + 1 ; ::_thesis: H1(x) in the carrier of (REAL-US n)
then A7: H1(x) = IFEQ (x,0,(0. (REAL-US n)),((accum f) /. nx)) by MATRIX_7:def_1;
percases ( x = 0 or x <> 0 ) ;
suppose x = 0 ; ::_thesis: H1(x) in the carrier of (REAL-US n)
then H1(x) = 0. (REAL-US n) by A7, FUNCOP_1:def_8;
hence H1(x) in the carrier of (REAL-US n) ; ::_thesis: verum
end;
supposeA8: x <> 0 ; ::_thesis: H1(x) in the carrier of (REAL-US n)
A9: the carrier of (REAL-US n) = REAL n by REAL_NS1:def_6;
H1(x) = (accum f) /. nx by A7, A8, FUNCOP_1:def_8;
hence H1(x) in the carrier of (REAL-US n) by A9; ::_thesis: verum
end;
end;
end;
suppose not nx in (len f) + 1 ; ::_thesis: H1(x) in the carrier of (REAL-US n)
then H1(x) = 0. (REAL-US n) by MATRIX_7:def_1;
hence H1(x) in the carrier of (REAL-US n) ; ::_thesis: verum
end;
end;
end;
consider f3 being Function of NAT, the carrier of (REAL-US n) such that
A10: for x being set st x in NAT holds
f3 . x = H1(x) from FUNCT_2:sch_2(A6);
A11: for j being Element of NAT
for v being Element of (REAL-US n) st j < len g & v = g . (j + 1) holds
f3 . (j + 1) = (f3 . j) + v
proof
let j be Element of NAT ; ::_thesis: for v being Element of (REAL-US n) st j < len g & v = g . (j + 1) holds
f3 . (j + 1) = (f3 . j) + v
let v be Element of (REAL-US n); ::_thesis: ( j < len g & v = g . (j + 1) implies f3 . (j + 1) = (f3 . j) + v )
assume that
A12: j < len g and
A13: v = g . (j + 1) ; ::_thesis: f3 . (j + 1) = (f3 . j) + v
A14: j + 1 <= len f by A1, A12, NAT_1:13;
percases ( j = 0 or j <> 0 ) ;
supposeA15: j = 0 ; ::_thesis: f3 . (j + 1) = (f3 . j) + v
then j + 1 < (len f) + 1 by A2, XREAL_1:6;
then A16: j + 1 in (len f) + 1 by NAT_1:44;
A17: 0 in (len f) + 1 by NAT_1:44;
A18: f3 . j = IFIN (j,((len f) + 1),(IFEQ (j,0,(0. (REAL-US n)),((accum f) /. j))),(0. (REAL-US n))) by A10
.= IFEQ (j,0,(0. (REAL-US n)),((accum f) /. j)) by A15, A17, MATRIX_7:def_1
.= 0. (REAL-US n) by A15, FUNCOP_1:def_8 ;
thus f3 . (j + 1) = IFIN ((j + 1),((len f) + 1),(IFEQ ((j + 1),0,(0. (REAL-US n)),((accum f) /. (j + 1)))),(0. (REAL-US n))) by A10
.= IFEQ ((j + 1),0,(0. (REAL-US n)),((accum f) /. (j + 1))) by A16, MATRIX_7:def_1
.= (accum f) /. 1 by A15, FUNCOP_1:def_8
.= g . (j + 1) by A1, A3, A4, A14, A15, FINSEQ_4:15
.= (f3 . j) + v by A13, A18, RLVECT_1:4 ; ::_thesis: verum
end;
supposeA19: j <> 0 ; ::_thesis: f3 . (j + 1) = (f3 . j) + v
len f < (len f) + 1 by XREAL_1:29;
then j < (len f) + 1 by A1, A12, XXREAL_0:2;
then A20: j in (len f) + 1 by NAT_1:44;
A21: f3 . j = IFIN (j,((len f) + 1),(IFEQ (j,0,(0. (REAL-US n)),((accum f) /. j))),(0. (REAL-US n))) by A10
.= IFEQ (j,0,(0. (REAL-US n)),((accum f) /. j)) by A20, MATRIX_7:def_1
.= (accum f) /. j by A19, FUNCOP_1:def_8 ;
A22: 0 + 1 <= j + 1 by NAT_1:13;
A23: 0 + 1 <= j by A19, NAT_1:13;
j + 1 < (len f) + 1 by A1, A12, XREAL_1:6;
then A24: j + 1 in (len f) + 1 by NAT_1:44;
thus f3 . (j + 1) = IFIN ((j + 1),((len f) + 1),(IFEQ ((j + 1),0,(0. (REAL-US n)),((accum f) /. (j + 1)))),(0. (REAL-US n))) by A10
.= IFEQ ((j + 1),0,(0. (REAL-US n)),((accum f) /. (j + 1))) by A24, MATRIX_7:def_1
.= (accum f) /. (j + 1) by FUNCOP_1:def_8
.= (accum f) . (j + 1) by A3, A14, A22, FINSEQ_4:15
.= ((accum f) /. j) + (f /. (j + 1)) by A1, Def10, A12, A23
.= (f3 . j) + v by A1, A13, A14, A22, A21, FINSEQ_4:15 ; ::_thesis: verum
end;
end;
end;
len f < (len f) + 1 by XREAL_1:29;
then A25: len f in (len f) + 1 by NAT_1:44;
A26: 0 + 1 <= len f by A2, NAT_1:13;
A27: 0 in (len f) + 1 by NAT_1:44;
A28: f3 . 0 = IFIN (0,((len f) + 1),(IFEQ (0,0,(0. (REAL-US n)),((accum f) /. 0))),(0. (REAL-US n))) by A10
.= IFEQ (0,0,(0. (REAL-US n)),((accum f) /. 0)) by A27, MATRIX_7:def_1
.= 0. (REAL-US n) by FUNCOP_1:def_8 ;
f3 . (len g) = H1( len f) by A1, A10
.= IFEQ ((len f),0,(0. (REAL-US n)),((accum f) /. (len f))) by A25, MATRIX_7:def_1
.= (accum f) /. (len f) by A2, FUNCOP_1:def_8
.= Sum f by A3, A5, A26, FINSEQ_4:15 ;
hence ex f2 being Function of NAT, the carrier of (REAL-US n) st
( Sum f = f2 . (len g) & f2 . 0 = 0. (REAL-US n) & ( for j being Element of NAT
for v being Element of (REAL-US n) st j < len g & v = g . (j + 1) holds
f2 . (j + 1) = (f2 . j) + v ) ) by A28, A11; ::_thesis: verum
end;
caseA29: len f <= 0 ; ::_thesis: ex f2 being Function of NAT, the carrier of (REAL-US n) st
( Sum f = f2 . (len g) & f2 . 0 = 0. (REAL-US n) & ( for j being Element of NAT
for v being Element of (REAL-US n) st j < len g & v = g . (j + 1) holds
f2 . (j + 1) = (f2 . j) + v ) )
set f3 = NAT --> (0. (REAL-US n));
A30: for j being Element of NAT
for v being Element of (REAL-US n) st j < len g & v = g . (j + 1) holds
(NAT --> (0. (REAL-US n))) . (j + 1) = ((NAT --> (0. (REAL-US n))) . j) + v by A1, A29;
A31: (NAT --> (0. (REAL-US n))) . (len g) = 0. (REAL-US n) by FUNCOP_1:7
.= 0* n by REAL_NS1:def_6 ;
A32: (NAT --> (0. (REAL-US n))) . 0 = 0. (REAL-US n) by FUNCOP_1:7;
Sum f = 0* n by A29, Def11;
hence ex f2 being Function of NAT, the carrier of (REAL-US n) st
( Sum f = f2 . (len g) & f2 . 0 = 0. (REAL-US n) & ( for j being Element of NAT
for v being Element of (REAL-US n) st j < len g & v = g . (j + 1) holds
f2 . (j + 1) = (f2 . j) + v ) ) by A31, A32, A30; ::_thesis: verum
end;
end;
end;
hence Sum f = Sum g by RLVECT_1:def_12; ::_thesis: verum
end;
registration
let A be set ;
cluster RealVectSpace A -> constituted-Functions ;
coherence
RealVectSpace A is constituted-Functions
proof
let a be Element of (RealVectSpace A); :: according to MONOID_0:def_1 ::_thesis: a is set
thus a is set ; ::_thesis: verum
end;
end;
registration
let n be Nat;
cluster RealVectSpace (Seg n) -> constituted-FinSeqs ;
coherence
RealVectSpace (Seg n) is constituted-FinSeqs
proof
let a be Element of (RealVectSpace (Seg n)); :: according to MONOID_0:def_2 ::_thesis: a is set
a is Element of REAL n by FINSEQ_2:93;
hence a is set ; ::_thesis: verum
end;
end;
registration
let A be set ;
cluster -> real-valued for Element of the carrier of (RealVectSpace A);
coherence
for b1 being Element of (RealVectSpace A) holds b1 is real-valued
proof
let a be Element of (RealVectSpace A); ::_thesis: a is real-valued
( a is Function of A,REAL or a is empty ) by FUNCT_2:66;
hence a is real-valued ; ::_thesis: verum
end;
end;
registration
let A be set ;
let x, y be VECTOR of (RealVectSpace A);
let a, b be real-valued Function;
identifyx + y with a + b when x = a, y = b;
compatibility
( x = a & y = b implies x + y = a + b )
proof
A1: dom y = A by FUNCT_2:92;
assume that
A2: x = a and
A3: y = b ; ::_thesis: x + y = a + b
dom (x + y) = A by FUNCT_2:92;
then A4: for c being set st c in dom (x + y) holds
(x + y) . c = (a . c) + (b . c) by A2, A3, FUNCSDOM:1;
dom x = A by FUNCT_2:92;
then dom (x + y) = (dom a) /\ (dom b) by A2, A3, A1, FUNCT_2:92;
hence x + y = a + b by A4, VALUED_1:def_1; ::_thesis: verum
end;
end;
registration
let A be set ;
let x be VECTOR of (RealVectSpace A);
let y be real-valued Function;
let a, b be Element of REAL ;
identifya * x with b * y when x = y, a = b;
compatibility
( x = y & a = b implies a * x = b * y )
proof
A1: dom x = A by FUNCT_2:92;
assume that
A2: x = y and
A3: a = b ; ::_thesis: a * x = b * y
A4: dom (a * x) = A by FUNCT_2:92;
then for c being set st c in dom (a * x) holds
(a * x) . c = b * (y . c) by A2, A3, FUNCSDOM:4;
hence a * x = b * y by A2, A4, A1, VALUED_1:def_5; ::_thesis: verum
end;
end;
registration
let A be set ;
let x be VECTOR of (RealVectSpace A);
let a be real-valued Function;
identify - x with - a when x = a;
compatibility
( x = a implies - x = - a )
proof
assume A1: x = a ; ::_thesis: - x = - a
A2: now__::_thesis:_for_c_being_set_st_c_in_dom_a_holds_
(-_x)_._c_=_-_(a_._c)
let c be set ; ::_thesis: ( c in dom a implies (- x) . c = - (a . c) )
assume c in dom a ; ::_thesis: (- x) . c = - (a . c)
thus (- x) . c = ((- 1) * x) . c by RLVECT_1:16
.= (- 1) * (a . c) by A1, VALUED_1:6
.= - (a . c) ; ::_thesis: verum
end;
dom (- x) = A by FUNCT_2:92;
hence - x = - a by A1, A2, FUNCT_2:92, VALUED_1:9; ::_thesis: verum
end;
end;
registration
let A be set ;
let x, y be VECTOR of (RealVectSpace A);
let a, b be real-valued Function;
identifyx - y with a - b when x = a, y = b;
compatibility
( x = a & y = b implies x - y = a - b ) ;
end;
theorem Th35: :: EUCLID_7:35
for n being Nat
for X being Subspace of RealVectSpace (Seg n)
for x being Element of REAL n
for a being Real st x in the carrier of X holds
a * x in the carrier of X
proof
let n be Nat; ::_thesis: for X being Subspace of RealVectSpace (Seg n)
for x being Element of REAL n
for a being Real st x in the carrier of X holds
a * x in the carrier of X
let X be Subspace of RealVectSpace (Seg n); ::_thesis: for x being Element of REAL n
for a being Real st x in the carrier of X holds
a * x in the carrier of X
let x be Element of REAL n; ::_thesis: for a being Real st x in the carrier of X holds
a * x in the carrier of X
let a be Real; ::_thesis: ( x in the carrier of X implies a * x in the carrier of X )
reconsider x1 = x as Element of (RealVectSpace (Seg n)) by FINSEQ_2:93;
assume x in the carrier of X ; ::_thesis: a * x in the carrier of X
then A1: x in X by STRUCT_0:def_5;
a * x = a * x1 ;
then a * x in X by A1, RLSUB_1:21;
hence a * x in the carrier of X by STRUCT_0:def_5; ::_thesis: verum
end;
theorem Th36: :: EUCLID_7:36
for n being Nat
for X being Subspace of RealVectSpace (Seg n)
for x, y being Element of REAL n st x in the carrier of X & y in the carrier of X holds
x + y in the carrier of X
proof
let n be Nat; ::_thesis: for X being Subspace of RealVectSpace (Seg n)
for x, y being Element of REAL n st x in the carrier of X & y in the carrier of X holds
x + y in the carrier of X
let X be Subspace of RealVectSpace (Seg n); ::_thesis: for x, y being Element of REAL n st x in the carrier of X & y in the carrier of X holds
x + y in the carrier of X
let x, y be Element of REAL n; ::_thesis: ( x in the carrier of X & y in the carrier of X implies x + y in the carrier of X )
assume that
A1: x in the carrier of X and
A2: y in the carrier of X ; ::_thesis: x + y in the carrier of X
A3: y in X by A2, STRUCT_0:def_5;
reconsider x1 = x, y1 = y as Element of (RealVectSpace (Seg n)) by FINSEQ_2:93;
A4: x1 + y1 = x + y ;
x in X by A1, STRUCT_0:def_5;
then x + y in X by A3, A4, RLSUB_1:20;
hence x + y in the carrier of X by STRUCT_0:def_5; ::_thesis: verum
end;
theorem :: EUCLID_7:37
for n being Nat
for X being Subspace of RealVectSpace (Seg n)
for x, y being Element of REAL n
for a, b being Real st x in the carrier of X & y in the carrier of X holds
(a * x) + (b * y) in the carrier of X
proof
let n be Nat; ::_thesis: for X being Subspace of RealVectSpace (Seg n)
for x, y being Element of REAL n
for a, b being Real st x in the carrier of X & y in the carrier of X holds
(a * x) + (b * y) in the carrier of X
let X be Subspace of RealVectSpace (Seg n); ::_thesis: for x, y being Element of REAL n
for a, b being Real st x in the carrier of X & y in the carrier of X holds
(a * x) + (b * y) in the carrier of X
let x, y be Element of REAL n; ::_thesis: for a, b being Real st x in the carrier of X & y in the carrier of X holds
(a * x) + (b * y) in the carrier of X
let a, b be Real; ::_thesis: ( x in the carrier of X & y in the carrier of X implies (a * x) + (b * y) in the carrier of X )
assume that
A1: x in the carrier of X and
A2: y in the carrier of X ; ::_thesis: (a * x) + (b * y) in the carrier of X
A3: b * y in the carrier of X by A2, Th35;
a * x in the carrier of X by A1, Th35;
hence (a * x) + (b * y) in the carrier of X by A3, Th36; ::_thesis: verum
end;
Lm3: for n being Nat
for X being Subspace of RealVectSpace (Seg n)
for x, y being Element of REAL n
for a being Real st x in the carrier of X & y in the carrier of X holds
(a * x) + y in the carrier of X
proof
let n be Nat; ::_thesis: for X being Subspace of RealVectSpace (Seg n)
for x, y being Element of REAL n
for a being Real st x in the carrier of X & y in the carrier of X holds
(a * x) + y in the carrier of X
let X be Subspace of RealVectSpace (Seg n); ::_thesis: for x, y being Element of REAL n
for a being Real st x in the carrier of X & y in the carrier of X holds
(a * x) + y in the carrier of X
let x, y be Element of REAL n; ::_thesis: for a being Real st x in the carrier of X & y in the carrier of X holds
(a * x) + y in the carrier of X
let a be Real; ::_thesis: ( x in the carrier of X & y in the carrier of X implies (a * x) + y in the carrier of X )
assume that
A1: x in the carrier of X and
A2: y in the carrier of X ; ::_thesis: (a * x) + y in the carrier of X
a * x in the carrier of X by A1, Th35;
hence (a * x) + y in the carrier of X by A2, Th36; ::_thesis: verum
end;
theorem :: EUCLID_7:38
for n being Nat
for u, v being Element of REAL n holds (Euclid_scalar n) . (u,v) = |(u,v)| by REAL_NS1:def_5;
theorem Th39: :: EUCLID_7:39
for n, j being Nat
for F being FinSequence of the carrier of (RealVectSpace (Seg n))
for Bn being Subset of (RealVectSpace (Seg n))
for v0 being Element of (RealVectSpace (Seg n))
for l being Linear_Combination of Bn st F is one-to-one & Bn is R-orthogonal & rng F = Carrier l & v0 in Bn & j in dom (l (#) F) & v0 = F . j holds
(Euclid_scalar n) . (v0,(Sum (l (#) F))) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0))
proof
let n, j be Nat; ::_thesis: for F being FinSequence of the carrier of (RealVectSpace (Seg n))
for Bn being Subset of (RealVectSpace (Seg n))
for v0 being Element of (RealVectSpace (Seg n))
for l being Linear_Combination of Bn st F is one-to-one & Bn is R-orthogonal & rng F = Carrier l & v0 in Bn & j in dom (l (#) F) & v0 = F . j holds
(Euclid_scalar n) . (v0,(Sum (l (#) F))) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0))
let F be FinSequence of the carrier of (RealVectSpace (Seg n)); ::_thesis: for Bn being Subset of (RealVectSpace (Seg n))
for v0 being Element of (RealVectSpace (Seg n))
for l being Linear_Combination of Bn st F is one-to-one & Bn is R-orthogonal & rng F = Carrier l & v0 in Bn & j in dom (l (#) F) & v0 = F . j holds
(Euclid_scalar n) . (v0,(Sum (l (#) F))) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0))
let Bn be Subset of (RealVectSpace (Seg n)); ::_thesis: for v0 being Element of (RealVectSpace (Seg n))
for l being Linear_Combination of Bn st F is one-to-one & Bn is R-orthogonal & rng F = Carrier l & v0 in Bn & j in dom (l (#) F) & v0 = F . j holds
(Euclid_scalar n) . (v0,(Sum (l (#) F))) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0))
let v0 be Element of (RealVectSpace (Seg n)); ::_thesis: for l being Linear_Combination of Bn st F is one-to-one & Bn is R-orthogonal & rng F = Carrier l & v0 in Bn & j in dom (l (#) F) & v0 = F . j holds
(Euclid_scalar n) . (v0,(Sum (l (#) F))) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0))
let l be Linear_Combination of Bn; ::_thesis: ( F is one-to-one & Bn is R-orthogonal & rng F = Carrier l & v0 in Bn & j in dom (l (#) F) & v0 = F . j implies (Euclid_scalar n) . (v0,(Sum (l (#) F))) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) )
assume that
A1: F is one-to-one and
A2: Bn is R-orthogonal and
A3: rng F = Carrier l and
A4: v0 in Bn and
A5: j in dom (l (#) F) and
A6: v0 = F . j ; ::_thesis: (Euclid_scalar n) . (v0,(Sum (l (#) F))) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0))
A7: len (l (#) F) = len F by RLVECT_2:def_7;
then A8: dom (l (#) F) = Seg (len F) by FINSEQ_1:def_3
.= dom F by FINSEQ_1:def_3 ;
reconsider F2 = l (#) F as FinSequence of the carrier of (RealVectSpace (Seg n)) ;
reconsider rv0 = v0 as Element of REAL n by FINSEQ_2:93;
consider f being Function of NAT, the carrier of (RealVectSpace (Seg n)) such that
A9: Sum F2 = f . (len F2) and
A10: f . 0 = 0. (RealVectSpace (Seg n)) and
A11: for j2 being Element of NAT
for v being Element of (RealVectSpace (Seg n)) st j2 < len F2 & v = F2 . (j2 + 1) holds
f . (j2 + 1) = (f . j2) + v by RLVECT_1:def_12;
defpred S1[ Nat] means ( $1 >= j & $1 <= len F implies (Euclid_scalar n) . (v0,(f . $1)) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) );
defpred S2[ Nat] means ( $1 < j implies (Euclid_scalar n) . (v0,(f . $1)) = 0 );
(Euclid_scalar n) . (v0,(f . 0)) = |(rv0,(0* n))| by A10, REAL_NS1:def_5
.= 0 by EUCLID_4:18 ;
then A12: S2[ 0 ] ;
A13: dom (l (#) F) = Seg (len (l (#) F)) by FINSEQ_1:def_3;
then A14: j <= len F by A5, A7, FINSEQ_1:1;
A15: Carrier l c= Bn by RLVECT_2:def_6;
A16: for k being Element of NAT st S2[k] holds
S2[k + 1]
proof
let k be Element of NAT ; ::_thesis: ( S2[k] implies S2[k + 1] )
assume A17: S2[k] ; ::_thesis: S2[k + 1]
now__::_thesis:_(_(_k_<_len_F2_&_S2[k_+_1]_)_or_(_k_>=_len_F2_&_S2[k_+_1]_)_)
percases ( k < len F2 or k >= len F2 ) ;
caseA18: k < len F2 ; ::_thesis: verum
A19: 1 <= k + 1 by NAT_1:11;
k + 1 <= len F2 by A18, NAT_1:13;
then k + 1 in Seg (len F2) by A19, FINSEQ_1:1;
then k + 1 in dom F2 by FINSEQ_1:def_3;
then F2 . (k + 1) in rng F2 by FUNCT_1:def_3;
then reconsider v = F2 . (k + 1) as Element of (RealVectSpace (Seg n)) ;
reconsider rv = v as Element of REAL n by FINSEQ_2:93;
reconsider fk = f . k as Element of REAL n by FINSEQ_2:93;
percases ( k + 1 < j or k + 1 >= j ) ;
supposeA20: k + 1 < j ; ::_thesis: S2[k + 1]
A21: 1 <= k + 1 by NAT_1:11;
k + 1 < len F by A14, A20, XXREAL_0:2;
then k + 1 in Seg (len F) by A21, FINSEQ_1:1;
then A22: k + 1 in dom F by FINSEQ_1:def_3;
then A23: F /. (k + 1) = F . (k + 1) by PARTFUN1:def_6;
then A24: rv0 <> F /. (k + 1) by A1, A5, A6, A8, A20, A22, FUNCT_1:def_4;
k < k + 1 by XREAL_1:29;
then A25: |(rv0,fk)| = 0 by A17, A20, REAL_NS1:def_5, XXREAL_0:2;
reconsider fk1 = F /. (k + 1) as Element of REAL n by FINSEQ_2:93;
A26: |(rv0,(fk + rv))| = |(rv0,fk)| + |(rv0,rv)| by EUCLID_4:28;
A27: F /. (k + 1) in rng F by A22, A23, FUNCT_1:def_3;
v = (l . (F /. (k + 1))) * (F /. (k + 1)) by A8, A22, RLVECT_2:def_7;
then |(rv0,rv)| = (l . (F /. (k + 1))) * |(rv0,fk1)| by EUCLID_4:22
.= (l . (F /. (k + 1))) * 0 by A2, A3, A4, A15, A27, A24, Def3
.= 0 ;
then (Euclid_scalar n) . (v0,((f . k) + v)) = 0 by A25, A26, REAL_NS1:def_5;
hence S2[k + 1] by A11, A18; ::_thesis: verum
end;
suppose k + 1 >= j ; ::_thesis: S2[k + 1]
hence S2[k + 1] ; ::_thesis: verum
end;
end;
end;
caseA28: k >= len F2 ; ::_thesis: S2[k + 1]
k + 1 > k by XREAL_1:29;
then k + 1 > len F2 by A28, XXREAL_0:2;
hence S2[k + 1] by A7, A14, XXREAL_0:2; ::_thesis: verum
end;
end;
end;
hence S2[k + 1] ; ::_thesis: verum
end;
A29: for i being Element of NAT holds S2[i] from NAT_1:sch_1(A12, A16);
A30: for i being Nat st i < j holds
(Euclid_scalar n) . (v0,(f . i)) = 0
proof
let i be Nat; ::_thesis: ( i < j implies (Euclid_scalar n) . (v0,(f . i)) = 0 )
reconsider i0 = i as Element of NAT by ORDINAL1:def_12;
assume i < j ; ::_thesis: (Euclid_scalar n) . (v0,(f . i)) = 0
then (Euclid_scalar n) . (v0,(f . i0)) = 0 by A29;
hence (Euclid_scalar n) . (v0,(f . i)) = 0 ; ::_thesis: verum
end;
A31: for k being Element of NAT st S1[k] holds
S1[k + 1]
proof
let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A32: S1[k] ; ::_thesis: S1[k + 1]
percases ( k + 1 < j or k + 1 >= j ) ;
suppose k + 1 < j ; ::_thesis: S1[k + 1]
hence S1[k + 1] ; ::_thesis: verum
end;
supposeA33: k + 1 >= j ; ::_thesis: S1[k + 1]
percases ( k + 1 > j or k + 1 = j ) by A33, XXREAL_0:1;
supposeA34: k + 1 > j ; ::_thesis: S1[k + 1]
percases ( k + 1 <= len F2 or k + 1 > len F2 ) ;
supposeA35: k + 1 <= len F2 ; ::_thesis: S1[k + 1]
1 <= k + 1 by NAT_1:11;
then A36: k + 1 in Seg (len F2) by A35, FINSEQ_1:1;
then A37: k + 1 in dom F by A7, FINSEQ_1:def_3;
then A38: F /. (k + 1) = F . (k + 1) by PARTFUN1:def_6;
then A39: F /. (k + 1) in rng F by A37, FUNCT_1:def_3;
k + 1 in dom F2 by A36, FINSEQ_1:def_3;
then F2 . (k + 1) in rng F2 by FUNCT_1:def_3;
then reconsider v = F2 . (k + 1) as Element of (RealVectSpace (Seg n)) ;
reconsider rv = v as Element of REAL n by FINSEQ_2:93;
reconsider fk1 = F /. (k + 1) as Element of REAL n by FINSEQ_2:93;
reconsider fk = f . k as Element of REAL n by FINSEQ_2:93;
A40: |(rv0,(fk + rv))| = |(rv0,fk)| + |(rv0,rv)| by EUCLID_4:28;
A41: rv0 <> F /. (k + 1) by A1, A5, A6, A8, A34, A37, A38, FUNCT_1:def_4;
v = (l . (F /. (k + 1))) * (F /. (k + 1)) by A8, A37, RLVECT_2:def_7;
then A42: |(rv0,rv)| = (l . (F /. (k + 1))) * |(rv0,fk1)| by EUCLID_4:22
.= (l . (F /. (k + 1))) * 0 by A2, A3, A4, A15, A39, A41, Def3
.= 0 ;
k < k + 1 by XREAL_1:29;
then A43: k < len F2 by A35, XXREAL_0:2;
then |(rv0,fk)| = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) by A32, A34, NAT_1:13, REAL_NS1:def_5, RLVECT_2:def_7;
then (Euclid_scalar n) . (v0,((f . k) + v)) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) by A40, A42, REAL_NS1:def_5;
hence S1[k + 1] by A11, A43; ::_thesis: verum
end;
suppose k + 1 > len F2 ; ::_thesis: S1[k + 1]
hence S1[k + 1] by RLVECT_2:def_7; ::_thesis: verum
end;
end;
end;
supposeA44: k + 1 = j ; ::_thesis: S1[k + 1]
then F2 . (k + 1) in rng F2 by A5, FUNCT_1:def_3;
then reconsider v = F2 . (k + 1) as Element of (RealVectSpace (Seg n)) ;
A45: v = (l . (F /. (k + 1))) * (F /. (k + 1)) by A5, A44, RLVECT_2:def_7;
reconsider rv = v as Element of REAL n by FINSEQ_2:93;
k + 1 in dom F by A5, A13, A7, A44, FINSEQ_1:def_3;
then A46: |(rv0,rv)| = |(rv0,((l . (F /. j)) * rv0))| by A6, A44, A45, PARTFUN1:def_6
.= (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) by REAL_NS1:def_5 ;
reconsider fk = f . k as Element of REAL n by FINSEQ_2:93;
(Euclid_scalar n) . (v0,(f . k)) = 0 by A30, A44, XREAL_1:29;
then A47: |(rv0,fk)| = 0 by REAL_NS1:def_5;
k < k + 1 by XREAL_1:29;
then A48: k < len F2 by A7, A14, A44, XXREAL_0:2;
|(rv0,(fk + rv))| = |(rv0,fk)| + |(rv0,rv)| by EUCLID_4:28;
then (Euclid_scalar n) . (v0,((f . k) + v)) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) by A47, A46, REAL_NS1:def_5;
hence S1[k + 1] by A11, A48; ::_thesis: verum
end;
end;
end;
end;
end;
A49: S1[ 0 ] by A5, A13, FINSEQ_1:1;
A50: for i being Element of NAT holds S1[i] from NAT_1:sch_1(A49, A31);
for i being Nat st i >= j & i <= len F holds
(Euclid_scalar n) . (v0,(f . i)) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0))
proof
let i be Nat; ::_thesis: ( i >= j & i <= len F implies (Euclid_scalar n) . (v0,(f . i)) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) )
assume that
A51: i >= j and
A52: i <= len F ; ::_thesis: (Euclid_scalar n) . (v0,(f . i)) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0))
reconsider i0 = i as Element of NAT by ORDINAL1:def_12;
(Euclid_scalar n) . (v0,(f . i0)) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) by A50, A51, A52;
hence (Euclid_scalar n) . (v0,(f . i)) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) ; ::_thesis: verum
end;
hence (Euclid_scalar n) . (v0,(Sum (l (#) F))) = (Euclid_scalar n) . (v0,((l . (F /. j)) * v0)) by A9, A7, A14; ::_thesis: verum
end;
registration
let n be Nat;
cluster R-orthonormal -> linearly-independent for Element of bool the carrier of (RealVectSpace (Seg n));
coherence
for b1 being Subset of (RealVectSpace (Seg n)) st b1 is R-orthonormal holds
b1 is linearly-independent
proof
let Bn be Subset of (RealVectSpace (Seg n)); ::_thesis: ( Bn is R-orthonormal implies Bn is linearly-independent )
assume A1: Bn is R-orthonormal ; ::_thesis: Bn is linearly-independent
let l be Linear_Combination of Bn; :: according to RLVECT_3:def_1 ::_thesis: ( not Sum l = 0. (RealVectSpace (Seg n)) or Carrier l = {} )
assume A2: Sum l = 0. (RealVectSpace (Seg n)) ; ::_thesis: Carrier l = {}
set v0 = the Element of Carrier l;
consider F being FinSequence of the carrier of (RealVectSpace (Seg n)) such that
A3: F is one-to-one and
A4: rng F = Carrier l and
A5: Sum l = Sum (l (#) F) by RLVECT_2:def_8;
assume A6: Carrier l <> {} ; ::_thesis: contradiction
then A7: the Element of Carrier l in Carrier l ;
then the Element of Carrier l in { v2 where v2 is Element of (RealVectSpace (Seg n)) : l . v2 <> 0 } by RLVECT_2:def_4;
then consider v being Element of (RealVectSpace (Seg n)) such that
A8: the Element of Carrier l = v and
l . v <> 0 ;
reconsider xv = v as Element of REAL n by FINSEQ_2:93;
A9: (Euclid_scalar n) . (v,(Sum (l (#) F))) = |(xv,(0* n))| by A2, A5, REAL_NS1:def_5
.= 0 by EUCLID_4:18 ;
consider x0 being set such that
A10: x0 in dom F and
A11: the Element of Carrier l = F . x0 by A6, A4, FUNCT_1:def_3;
reconsider nx0 = x0 as Element of NAT by A10;
F . x0 = F /. x0 by A10, PARTFUN1:def_6;
then F /. nx0 in rng F by A10, FUNCT_1:def_3;
then F /. nx0 in { v3 where v3 is Element of (RealVectSpace (Seg n)) : l . v3 <> 0 } by A4, RLVECT_2:def_4;
then A12: ex v3 being Element of (RealVectSpace (Seg n)) st
( v3 = F /. nx0 & l . v3 <> 0 ) ;
A13: dom F = Seg (len F) by FINSEQ_1:def_3;
A14: Carrier l c= Bn by RLVECT_2:def_6;
len (l (#) F) = len F by RLVECT_2:def_7;
then nx0 in dom (l (#) F) by A10, A13, FINSEQ_1:def_3;
then (Euclid_scalar n) . (v,(Sum (l (#) F))) = (Euclid_scalar n) . (v,((l . (F /. nx0)) * v)) by A1, A14, A7, A8, A3, A4, A11, Th39
.= |(xv,((l . (F /. nx0)) * xv))| by REAL_NS1:def_5
.= (l . (F /. nx0)) * |(xv,xv)| by EUCLID_4:22
.= (l . (F /. nx0)) * (|.xv.| ^2) by EUCLID_2:4
.= (l . (F /. nx0)) * (1 ^2) by A1, A14, A7, A8, Def4
.= l . (F /. nx0) ;
hence contradiction by A12, A9; ::_thesis: verum
end;
end;
registration
let n be Element of NAT ;
cluster R-orthonormal -> linearly-independent for Element of bool the carrier of (REAL-US n);
coherence
for b1 being Subset of (REAL-US n) st b1 is R-orthonormal holds
b1 is linearly-independent
proof
let Bn be Subset of (REAL-US n); ::_thesis: ( Bn is R-orthonormal implies Bn is linearly-independent )
assume A1: Bn is R-orthonormal ; ::_thesis: Bn is linearly-independent
let l be Linear_Combination of Bn; :: according to RLVECT_3:def_1 ::_thesis: ( not Sum l = 0. (REAL-US n) or Carrier l = {} )
assume A2: Sum l = 0. (REAL-US n) ; ::_thesis: Carrier l = {}
set v0 = the Element of Carrier l;
consider F being FinSequence of the carrier of (REAL-US n) such that
A3: F is one-to-one and
A4: rng F = Carrier l and
A5: Sum l = Sum (l (#) F) by RLVECT_2:def_8;
assume A6: Carrier l <> {} ; ::_thesis: contradiction
then A7: the Element of Carrier l in Carrier l ;
then the Element of Carrier l in { v2 where v2 is Element of (REAL-US n) : l . v2 <> 0 } by RLVECT_2:def_4;
then consider v being Element of (REAL-US n) such that
A8: the Element of Carrier l = v and
l . v <> 0 ;
reconsider xv = v as Element of REAL n by REAL_NS1:def_6;
0. (REAL-US n) = 0* n by REAL_NS1:def_6;
then A9: (Euclid_scalar n) . (v,(Sum (l (#) F))) = |(xv,(0* n))| by A2, A5, REAL_NS1:def_5
.= 0 by EUCLID_4:18 ;
consider x0 being set such that
A10: x0 in dom F and
A11: the Element of Carrier l = F . x0 by A6, A4, FUNCT_1:def_3;
reconsider nx0 = x0 as Element of NAT by A10;
F . x0 = F /. x0 by A10, PARTFUN1:def_6;
then F /. nx0 in rng F by A10, FUNCT_1:def_3;
then F /. nx0 in { v3 where v3 is Element of (REAL-US n) : l . v3 <> 0 } by A4, RLVECT_2:def_4;
then A12: ex v3 being Element of (REAL-US n) st
( v3 = F /. nx0 & l . v3 <> 0 ) ;
A13: dom F = Seg (len F) by FINSEQ_1:def_3;
A14: Carrier l c= Bn by RLVECT_2:def_6;
len (l (#) F) = len F by RLVECT_2:def_7;
then nx0 in dom (l (#) F) by A10, A13, FINSEQ_1:def_3;
then (Euclid_scalar n) . (v,(Sum (l (#) F))) = (Euclid_scalar n) . (v,((l . (F /. nx0)) * v)) by A1, A14, A7, A8, A3, A4, A11, Th33
.= |(xv,((l . (F /. nx0)) * xv))| by REAL_NS1:def_5
.= (l . (F /. nx0)) * |(xv,xv)| by EUCLID_4:22
.= (l . (F /. nx0)) * (|.xv.| ^2) by EUCLID_2:4
.= (l . (F /. nx0)) * (1 ^2) by A1, A14, A7, A8, Def4
.= l . (F /. nx0) ;
hence contradiction by A12, A9; ::_thesis: verum
end;
end;
theorem Th40: :: EUCLID_7:40
for n being Nat
for Bn being Subset of (RealVectSpace (Seg n))
for x, y being Element of REAL n
for a being Real st Bn is linearly-independent & x in Bn & y in Bn & y = a * x holds
x = y
proof
let n be Nat; ::_thesis: for Bn being Subset of (RealVectSpace (Seg n))
for x, y being Element of REAL n
for a being Real st Bn is linearly-independent & x in Bn & y in Bn & y = a * x holds
x = y
let Bn be Subset of (RealVectSpace (Seg n)); ::_thesis: for x, y being Element of REAL n
for a being Real st Bn is linearly-independent & x in Bn & y in Bn & y = a * x holds
x = y
let x, y be Element of REAL n; ::_thesis: for a being Real st Bn is linearly-independent & x in Bn & y in Bn & y = a * x holds
x = y
let a be Real; ::_thesis: ( Bn is linearly-independent & x in Bn & y in Bn & y = a * x implies x = y )
assume that
A1: Bn is linearly-independent and
A2: x in Bn and
A3: y in Bn and
A4: y = a * x ; ::_thesis: x = y
reconsider x0 = x, y0 = y as Element of (RealVectSpace (Seg n)) by FINSEQ_2:93;
reconsider A = {y0,x0} as Subset of (RealVectSpace (Seg n)) ;
A c= Bn
proof
let u be set ; :: according to TARSKI:def_3 ::_thesis: ( not u in A or u in Bn )
assume u in A ; ::_thesis: u in Bn
hence u in Bn by A2, A3, TARSKI:def_2; ::_thesis: verum
end;
then A5: A is linearly-independent by A1, RLVECT_3:5;
y0 = a * x0 by A4;
hence x = y by A5, RLVECT_3:12; ::_thesis: verum
end;
Lm4: now__::_thesis:_for_n_being_Nat_holds_
(_RN_Base_n_is_finite_&_card_(RN_Base_n)_=_n_)
let n be Nat; ::_thesis: ( RN_Base n is finite & card (RN_Base n) = n )
thus ( RN_Base n is finite & card (RN_Base n) = n ) ::_thesis: verum
proof
percases ( n is empty or not n is empty ) ;
suppose n is empty ; ::_thesis: ( RN_Base n is finite & card (RN_Base n) = n )
hence ( RN_Base n is finite & card (RN_Base n) = n ) ; ::_thesis: verum
end;
suppose not n is empty ; ::_thesis: ( RN_Base n is finite & card (RN_Base n) = n )
then reconsider n = n as non empty Nat ;
defpred S1[ set , set ] means for i being Element of NAT st i = $1 holds
$2 = Base_FinSeq (n,i);
A1: for x being set st x in Seg n holds
ex y being set st S1[x,y]
proof
let x be set ; ::_thesis: ( x in Seg n implies ex y being set st S1[x,y] )
assume x in Seg n ; ::_thesis: ex y being set st S1[x,y]
then reconsider j = x as Element of NAT ;
for i being Element of NAT st i = j holds
Base_FinSeq (n,j) = Base_FinSeq (n,i) ;
hence ex y being set st S1[x,y] ; ::_thesis: verum
end;
consider f being Function such that
A2: ( dom f = Seg n & ( for x2 being set st x2 in Seg n holds
S1[x2,f . x2] ) ) from CLASSES1:sch_1(A1);
A3: rng f c= RN_Base n
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in rng f or y in RN_Base n )
assume y in rng f ; ::_thesis: y in RN_Base n
then consider x being set such that
A4: x in dom f and
A5: y = f . x by FUNCT_1:def_3;
reconsider nx = x as Element of NAT by A2, A4;
A6: nx <= n by A2, A4, FINSEQ_1:1;
A7: f . x = Base_FinSeq (n,nx) by A2, A4;
1 <= nx by A2, A4, FINSEQ_1:1;
hence y in RN_Base n by A5, A6, A7; ::_thesis: verum
end;
then reconsider f2 = f as Function of (Seg n),(RN_Base n) by A2, FUNCT_2:2;
for x1, x2 being set st x1 in dom f & x2 in dom f & f . x1 = f . x2 holds
x1 = x2
proof
let x1, x2 be set ; ::_thesis: ( x1 in dom f & x2 in dom f & f . x1 = f . x2 implies x1 = x2 )
assume that
A8: x1 in dom f and
A9: x2 in dom f and
A10: f . x1 = f . x2 ; ::_thesis: x1 = x2
reconsider nx1 = x1, nx2 = x2 as Element of NAT by A2, A8, A9;
A11: nx1 <= n by A2, A8, FINSEQ_1:1;
A12: f . x2 = Base_FinSeq (n,nx2) by A2, A9;
A13: f . x1 = Base_FinSeq (n,nx1) by A2, A8;
1 <= nx1 by A2, A8, FINSEQ_1:1;
hence x1 = x2 by A10, A11, A13, A12, Th25; ::_thesis: verum
end;
then A14: f2 is one-to-one by FUNCT_1:def_4;
RN_Base n c= rng f
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in RN_Base n or y in rng f )
assume y in RN_Base n ; ::_thesis: y in rng f
then consider i being Element of NAT such that
A15: y = Base_FinSeq (n,i) and
A16: 1 <= i and
A17: i <= n ;
A18: i in Seg n by A16, A17, FINSEQ_1:1;
then f . i = Base_FinSeq (n,i) by A2;
hence y in rng f by A2, A15, A18, FUNCT_1:def_3; ::_thesis: verum
end;
then rng f = RN_Base n by A3, XBOOLE_0:def_10;
then f2 is onto by FUNCT_2:def_3;
then card (Seg n) = card (RN_Base n) by A14, Lm1;
hence ( RN_Base n is finite & card (RN_Base n) = n ) by FINSEQ_1:57; ::_thesis: verum
end;
end;
end;
end;
begin
registration
let n be Nat;
cluster RN_Base n -> finite ;
coherence
RN_Base n is finite by Lm4;
end;
theorem :: EUCLID_7:41
for n being Nat holds card (RN_Base n) = n by Lm4;
theorem Th42: :: EUCLID_7:42
for n being Nat
for f being FinSequence of REAL n
for g being FinSequence of the carrier of (RealVectSpace (Seg n)) st f = g holds
Sum f = Sum g
proof
let n be Nat; ::_thesis: for f being FinSequence of REAL n
for g being FinSequence of the carrier of (RealVectSpace (Seg n)) st f = g holds
Sum f = Sum g
let f be FinSequence of REAL n; ::_thesis: for g being FinSequence of the carrier of (RealVectSpace (Seg n)) st f = g holds
Sum f = Sum g
let g be FinSequence of the carrier of (RealVectSpace (Seg n)); ::_thesis: ( f = g implies Sum f = Sum g )
assume A1: f = g ; ::_thesis: Sum f = Sum g
set V = RealVectSpace (Seg n);
A2: REAL n = the carrier of (RealVectSpace (Seg n)) by FINSEQ_2:93;
now__::_thesis:_(_(_len_f_>_0_&_ex_f2_being_Function_of_NAT,_the_carrier_of_(RealVectSpace_(Seg_n))_st_
(_Sum_f_=_f2_._(len_g)_&_f2_._0_=_0._(RealVectSpace_(Seg_n))_&_(_for_j_being_Element_of_NAT_
for_v_being_Element_of_(RealVectSpace_(Seg_n))_st_j_<_len_g_&_v_=_g_._(j_+_1)_holds_
f2_._(j_+_1)_=_(f2_._j)_+_v_)_)_)_or_(_len_f_<=_0_&_ex_f2_being_Function_of_NAT,_the_carrier_of_(RealVectSpace_(Seg_n))_st_
(_Sum_f_=_f2_._(len_g)_&_f2_._0_=_0._(RealVectSpace_(Seg_n))_&_(_for_j_being_Element_of_NAT_
for_v_being_Element_of_(RealVectSpace_(Seg_n))_st_j_<_len_g_&_v_=_g_._(j_+_1)_holds_
f2_._(j_+_1)_=_(f2_._j)_+_v_)_)_)_)
percases ( len f > 0 or len f <= 0 ) ;
caseA3: len f > 0 ; ::_thesis: ex f2 being Function of NAT, the carrier of (RealVectSpace (Seg n)) st
( Sum f = f2 . (len g) & f2 . 0 = 0. (RealVectSpace (Seg n)) & ( for j being Element of NAT
for v being Element of (RealVectSpace (Seg n)) st j < len g & v = g . (j + 1) holds
f2 . (j + 1) = (f2 . j) + v ) )
set g2 = accum f;
A4: len f = len (accum f) by Def10;
A5: f . 1 = (accum f) . 1 by Def10;
A6: Sum f = (accum f) . (len f) by Def11, A3;
deffunc H1( set ) -> set = IFIN ($1,((len f) + 1),(IFEQ ($1,0,(0. (RealVectSpace (Seg n))),((accum f) /. $1))),(0. (RealVectSpace (Seg n))));
A7: for x being set st x in NAT holds
H1(x) in the carrier of (RealVectSpace (Seg n))
proof
let x be set ; ::_thesis: ( x in NAT implies H1(x) in the carrier of (RealVectSpace (Seg n)) )
assume x in NAT ; ::_thesis: H1(x) in the carrier of (RealVectSpace (Seg n))
then reconsider nx = x as Element of NAT ;
percases ( nx in (len f) + 1 or not nx in (len f) + 1 ) ;
suppose nx in (len f) + 1 ; ::_thesis: H1(x) in the carrier of (RealVectSpace (Seg n))
then A8: H1(x) = IFEQ (x,0,(0. (RealVectSpace (Seg n))),((accum f) /. nx)) by MATRIX_7:def_1;
percases ( x = 0 or x <> 0 ) ;
suppose x = 0 ; ::_thesis: H1(x) in the carrier of (RealVectSpace (Seg n))
then H1(x) = 0. (RealVectSpace (Seg n)) by A8, FUNCOP_1:def_8;
hence H1(x) in the carrier of (RealVectSpace (Seg n)) ; ::_thesis: verum
end;
suppose x <> 0 ; ::_thesis: H1(x) in the carrier of (RealVectSpace (Seg n))
then H1(x) = (accum f) /. nx by A8, FUNCOP_1:def_8;
hence H1(x) in the carrier of (RealVectSpace (Seg n)) by A2; ::_thesis: verum
end;
end;
end;
suppose not nx in (len f) + 1 ; ::_thesis: H1(x) in the carrier of (RealVectSpace (Seg n))
then H1(x) = 0. (RealVectSpace (Seg n)) by MATRIX_7:def_1;
hence H1(x) in the carrier of (RealVectSpace (Seg n)) ; ::_thesis: verum
end;
end;
end;
consider f3 being Function of NAT, the carrier of (RealVectSpace (Seg n)) such that
A9: for x being set st x in NAT holds
f3 . x = H1(x) from FUNCT_2:sch_2(A7);
A10: for j being Element of NAT
for v being Element of (RealVectSpace (Seg n)) st j < len g & v = g . (j + 1) holds
f3 . (j + 1) = (f3 . j) + v
proof
let j be Element of NAT ; ::_thesis: for v being Element of (RealVectSpace (Seg n)) st j < len g & v = g . (j + 1) holds
f3 . (j + 1) = (f3 . j) + v
let v be Element of (RealVectSpace (Seg n)); ::_thesis: ( j < len g & v = g . (j + 1) implies f3 . (j + 1) = (f3 . j) + v )
assume that
A11: j < len g and
A12: v = g . (j + 1) ; ::_thesis: f3 . (j + 1) = (f3 . j) + v
A13: j + 1 <= len f by A1, A11, NAT_1:13;
percases ( j = 0 or j <> 0 ) ;
supposeA14: j = 0 ; ::_thesis: f3 . (j + 1) = (f3 . j) + v
then j + 1 < (len f) + 1 by A3, XREAL_1:6;
then A15: j + 1 in (len f) + 1 by NAT_1:44;
A16: 0 in (len f) + 1 by NAT_1:44;
A17: f3 . j = IFIN (j,((len f) + 1),(IFEQ (j,0,(0. (RealVectSpace (Seg n))),((accum f) /. j))),(0. (RealVectSpace (Seg n)))) by A9
.= IFEQ (j,0,(0. (RealVectSpace (Seg n))),((accum f) /. j)) by A14, A16, MATRIX_7:def_1
.= 0. (RealVectSpace (Seg n)) by A14, FUNCOP_1:def_8 ;
thus f3 . (j + 1) = IFIN ((j + 1),((len f) + 1),(IFEQ ((j + 1),0,(0. (RealVectSpace (Seg n))),((accum f) /. (j + 1)))),(0. (RealVectSpace (Seg n)))) by A9
.= IFEQ ((j + 1),0,(0. (RealVectSpace (Seg n))),((accum f) /. (j + 1))) by A15, MATRIX_7:def_1
.= (accum f) /. 1 by A14, FUNCOP_1:def_8
.= g . (j + 1) by A1, A4, A5, A13, A14, FINSEQ_4:15
.= (f3 . j) + v by A12, A17, RLVECT_1:4 ; ::_thesis: verum
end;
supposeA18: j <> 0 ; ::_thesis: f3 . (j + 1) = (f3 . j) + v
len f < (len f) + 1 by XREAL_1:29;
then j < (len f) + 1 by A1, A11, XXREAL_0:2;
then A19: j in (len f) + 1 by NAT_1:44;
A20: f3 . j = IFIN (j,((len f) + 1),(IFEQ (j,0,(0. (RealVectSpace (Seg n))),((accum f) /. j))),(0. (RealVectSpace (Seg n)))) by A9
.= IFEQ (j,0,(0. (RealVectSpace (Seg n))),((accum f) /. j)) by A19, MATRIX_7:def_1
.= (accum f) /. j by A18, FUNCOP_1:def_8 ;
A21: 0 + 1 <= j + 1 by NAT_1:13;
A22: 0 + 1 <= j by A18, NAT_1:13;
j + 1 < (len f) + 1 by A1, A11, XREAL_1:6;
then A23: j + 1 in (len f) + 1 by NAT_1:44;
thus f3 . (j + 1) = IFIN ((j + 1),((len f) + 1),(IFEQ ((j + 1),0,(0. (RealVectSpace (Seg n))),((accum f) /. (j + 1)))),(0. (RealVectSpace (Seg n)))) by A9
.= IFEQ ((j + 1),0,(0. (RealVectSpace (Seg n))),((accum f) /. (j + 1))) by A23, MATRIX_7:def_1
.= (accum f) /. (j + 1) by FUNCOP_1:def_8
.= (accum f) . (j + 1) by A4, A13, A21, FINSEQ_4:15
.= ((accum f) /. j) + (f /. (j + 1)) by A1, Def10, A11, A22
.= (f3 . j) + v by A1, A12, A13, A21, A20, FINSEQ_4:15 ; ::_thesis: verum
end;
end;
end;
len f < (len f) + 1 by XREAL_1:29;
then A24: len f in (len f) + 1 by NAT_1:44;
A25: 0 + 1 <= len f by A3, NAT_1:13;
A26: 0 in (len f) + 1 by NAT_1:44;
A27: f3 . 0 = IFIN (0,((len f) + 1),(IFEQ (0,0,(0. (RealVectSpace (Seg n))),((accum f) /. 0))),(0. (RealVectSpace (Seg n)))) by A9
.= IFEQ (0,0,(0. (RealVectSpace (Seg n))),((accum f) /. 0)) by A26, MATRIX_7:def_1
.= 0. (RealVectSpace (Seg n)) by FUNCOP_1:def_8 ;
f3 . (len g) = H1( len f) by A1, A9
.= IFEQ ((len f),0,(0. (RealVectSpace (Seg n))),((accum f) /. (len f))) by A24, MATRIX_7:def_1
.= (accum f) /. (len f) by A3, FUNCOP_1:def_8
.= Sum f by A4, A6, A25, FINSEQ_4:15 ;
hence ex f2 being Function of NAT, the carrier of (RealVectSpace (Seg n)) st
( Sum f = f2 . (len g) & f2 . 0 = 0. (RealVectSpace (Seg n)) & ( for j being Element of NAT
for v being Element of (RealVectSpace (Seg n)) st j < len g & v = g . (j + 1) holds
f2 . (j + 1) = (f2 . j) + v ) ) by A27, A10; ::_thesis: verum
end;
caseA28: len f <= 0 ; ::_thesis: ex f2 being Function of NAT, the carrier of (RealVectSpace (Seg n)) st
( Sum f = f2 . (len g) & f2 . 0 = 0. (RealVectSpace (Seg n)) & ( for j being Element of NAT
for v being Element of (RealVectSpace (Seg n)) st j < len g & v = g . (j + 1) holds
f2 . (j + 1) = (f2 . j) + v ) )
set f3 = NAT --> (0. (RealVectSpace (Seg n)));
A29: for j being Element of NAT
for v being Element of (RealVectSpace (Seg n)) st j < len g & v = g . (j + 1) holds
(NAT --> (0. (RealVectSpace (Seg n)))) . (j + 1) = ((NAT --> (0. (RealVectSpace (Seg n)))) . j) + v by A1, A28;
A30: (NAT --> (0. (RealVectSpace (Seg n)))) . (len g) = 0* n by FUNCOP_1:7;
A31: (NAT --> (0. (RealVectSpace (Seg n)))) . 0 = 0. (RealVectSpace (Seg n)) by FUNCOP_1:7;
Sum f = 0* n by A28, Def11;
hence ex f2 being Function of NAT, the carrier of (RealVectSpace (Seg n)) st
( Sum f = f2 . (len g) & f2 . 0 = 0. (RealVectSpace (Seg n)) & ( for j being Element of NAT
for v being Element of (RealVectSpace (Seg n)) st j < len g & v = g . (j + 1) holds
f2 . (j + 1) = (f2 . j) + v ) ) by A30, A31, A29; ::_thesis: verum
end;
end;
end;
hence Sum f = Sum g by RLVECT_1:def_12; ::_thesis: verum
end;
theorem Th43: :: EUCLID_7:43
for n being Nat
for x0 being Element of (RealVectSpace (Seg n))
for B being Subset of (RealVectSpace (Seg n)) st B = RN_Base n holds
ex l being Linear_Combination of B st x0 = Sum l
proof
let n be Nat; ::_thesis: for x0 being Element of (RealVectSpace (Seg n))
for B being Subset of (RealVectSpace (Seg n)) st B = RN_Base n holds
ex l being Linear_Combination of B st x0 = Sum l
let x0 be Element of (RealVectSpace (Seg n)); ::_thesis: for B being Subset of (RealVectSpace (Seg n)) st B = RN_Base n holds
ex l being Linear_Combination of B st x0 = Sum l
let B be Subset of (RealVectSpace (Seg n)); ::_thesis: ( B = RN_Base n implies ex l being Linear_Combination of B st x0 = Sum l )
reconsider x1 = x0 as Element of REAL n by FINSEQ_2:93;
A1: REAL n = the carrier of (RealVectSpace (Seg n)) by FINSEQ_2:93;
assume A2: B = RN_Base n ; ::_thesis: ex l being Linear_Combination of B st x0 = Sum l
A3: { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } c= B
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } or y in B )
assume y in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } ; ::_thesis: y in B
then ex x being Element of REAL n st
( y = x & ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) ) ;
hence y in B by A2; ::_thesis: verum
end;
B c= { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) }
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in B or y in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } )
assume y in B ; ::_thesis: y in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) }
then ex i2 being Element of NAT st
( y = Base_FinSeq (n,i2) & 1 <= i2 & i2 <= n ) by A2;
hence y in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } ; ::_thesis: verum
end;
then A4: B = { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } by A3, XBOOLE_0:def_10;
A5: { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) & |(x1,x)| <> 0 ) } c= B
proof
let x2 be set ; :: according to TARSKI:def_3 ::_thesis: ( not x2 in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) & |(x1,x)| <> 0 ) } or x2 in B )
assume x2 in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) & |(x1,x)| <> 0 ) } ; ::_thesis: x2 in B
then ex x being Element of REAL n st
( x = x2 & ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) & |(x1,x)| <> 0 ) ) ;
hence x2 in B by A4; ::_thesis: verum
end;
then reconsider B0 = { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) & |(x1,x)| <> 0 ) } as Subset of (RealVectSpace (Seg n)) by XBOOLE_1:1;
A6: dom (ProjFinSeq x1) = Seg (len (ProjFinSeq x1)) by FINSEQ_1:def_3
.= Seg n by Def12 ;
defpred S1[ set , set ] means ( $1 in B0 implies ex i being Element of NAT st
( $2 = i & 1 <= i & i <= n & $1 = Base_FinSeq (n,i) ) );
A7: for x being set st x in B0 holds
ex y being set st
( y in Seg n & S1[x,y] )
proof
let x be set ; ::_thesis: ( x in B0 implies ex y being set st
( y in Seg n & S1[x,y] ) )
assume x in B0 ; ::_thesis: ex y being set st
( y in Seg n & S1[x,y] )
then consider x2 being Element of REAL n such that
A8: x = x2 and
A9: ex i being Element of NAT st
( 1 <= i & i <= n & x2 = Base_FinSeq (n,i) & |(x1,x2)| <> 0 ) ;
consider i0 being Element of NAT such that
A10: 1 <= i0 and
A11: i0 <= n and
A12: x2 = Base_FinSeq (n,i0) and
|(x1,x2)| <> 0 by A9;
i0 in Seg n by A10, A11, FINSEQ_1:1;
hence ex y being set st
( y in Seg n & S1[x,y] ) by A8, A10, A11, A12; ::_thesis: verum
end;
consider f being Function of B0,(Seg n) such that
A13: for x being set st x in B0 holds
S1[x,f . x] from FUNCT_2:sch_1(A7);
defpred S2[ set , set ] means ( ( $1 in B0 implies for i being Element of NAT st 1 <= i & i <= n & $1 = Base_FinSeq (n,i) holds
$2 = |(x1,(Base_FinSeq (n,i)))| ) & ( not $1 in B0 implies $2 = 0 ) );
A14: for x being set st x in the carrier of (RealVectSpace (Seg n)) holds
ex y being set st
( y in REAL & S2[x,y] )
proof
let x be set ; ::_thesis: ( x in the carrier of (RealVectSpace (Seg n)) implies ex y being set st
( y in REAL & S2[x,y] ) )
assume x in the carrier of (RealVectSpace (Seg n)) ; ::_thesis: ex y being set st
( y in REAL & S2[x,y] )
percases ( x in B0 or not x in B0 ) ;
supposeA15: x in B0 ; ::_thesis: ex y being set st
( y in REAL & S2[x,y] )
then consider x2 being Element of REAL n such that
A16: x2 = x and
ex i being Element of NAT st
( 1 <= i & i <= n & x2 = Base_FinSeq (n,i) & |(x1,x2)| <> 0 ) ;
reconsider y0 = |(x1,x2)| as Element of REAL ;
for i2 being Element of NAT st 1 <= i2 & i2 <= n & x = Base_FinSeq (n,i2) holds
y0 = |(x1,(Base_FinSeq (n,i2)))| by A16;
hence ex y being set st
( y in REAL & S2[x,y] ) by A15; ::_thesis: verum
end;
suppose not x in B0 ; ::_thesis: ex y being set st
( y in REAL & S2[x,y] )
hence ex y being set st
( y in REAL & S2[x,y] ) ; ::_thesis: verum
end;
end;
end;
consider l2 being Function of the carrier of (RealVectSpace (Seg n)),REAL such that
A17: for x being set st x in the carrier of (RealVectSpace (Seg n)) holds
S2[x,l2 . x] from FUNCT_2:sch_1(A14);
A18: l2 is Element of Funcs ( the carrier of (RealVectSpace (Seg n)),REAL) by FUNCT_2:8;
for v being Element of (RealVectSpace (Seg n)) st not v in B0 holds
l2 . v = 0 by A17;
then reconsider l3 = l2 as Linear_Combination of RealVectSpace (Seg n) by A2, A5, A18, RLVECT_2:def_3;
Carrier l3 c= B0
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in Carrier l3 or x in B0 )
assume x in Carrier l3 ; ::_thesis: x in B0
then x in { v where v is Element of (RealVectSpace (Seg n)) : l3 . v <> 0 } by RLVECT_2:def_4;
then ex v being Element of (RealVectSpace (Seg n)) st
( x = v & l3 . v <> 0 ) ;
hence x in B0 by A17; ::_thesis: verum
end;
then reconsider l0 = l3 as Linear_Combination of B0 by RLVECT_2:def_6;
A19: Carrier l0 c= B0 by RLVECT_2:def_6;
then Carrier l0 c= B by A5, XBOOLE_1:1;
then reconsider l2 = l0 as Linear_Combination of B by RLVECT_2:def_6;
A20: B0 c= Carrier l0
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in B0 or x in Carrier l0 )
assume A21: x in B0 ; ::_thesis: x in Carrier l0
then consider x6 being Element of REAL n such that
A22: x = x6 and
A23: ex i being Element of NAT st
( 1 <= i & i <= n & x6 = Base_FinSeq (n,i) & |(x1,x6)| <> 0 ) ;
reconsider x66 = x6 as Element of (RealVectSpace (Seg n)) by FINSEQ_2:93;
consider i8 being Element of NAT such that
1 <= i8 and
i8 <= n and
A24: x6 = Base_FinSeq (n,i8) and
|(x1,x6)| <> 0 by A23;
l0 . x66 = |(x1,(Base_FinSeq (n,i8)))| by A17, A21, A22, A23, A24;
then x in { v where v is Element of (RealVectSpace (Seg n)) : l0 . v <> 0 } by A22, A23, A24;
hence x in Carrier l0 by RLVECT_2:def_4; ::_thesis: verum
end;
for x1, x2 being set st x1 in dom f & x2 in dom f & f . x1 = f . x2 holds
x1 = x2
proof
let x1, x2 be set ; ::_thesis: ( x1 in dom f & x2 in dom f & f . x1 = f . x2 implies x1 = x2 )
assume that
A25: x1 in dom f and
A26: x2 in dom f and
A27: f . x1 = f . x2 ; ::_thesis: x1 = x2
A28: ex i2 being Element of NAT st
( f . x2 = i2 & 1 <= i2 & i2 <= n & x2 = Base_FinSeq (n,i2) ) by A13, A26;
ex i1 being Element of NAT st
( f . x1 = i1 & 1 <= i1 & i1 <= n & x1 = Base_FinSeq (n,i1) ) by A13, A25;
hence x1 = x2 by A27, A28; ::_thesis: verum
end;
then A29: f is one-to-one by FUNCT_1:def_4;
A30: ( Seg n = {} implies B0 = {} )
proof
assume A31: Seg n = {} ; ::_thesis: B0 = {}
now__::_thesis:_not_B0_<>_{}
set y = the Element of B0;
assume B0 <> {} ; ::_thesis: contradiction
then the Element of B0 in B0 ;
then ex x being Element of REAL n st
( x = the Element of B0 & ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) & |(x1,x)| <> 0 ) ) ;
hence contradiction by A31; ::_thesis: verum
end;
hence B0 = {} ; ::_thesis: verum
end;
A32: for i3 being Element of NAT st i3 in dom (ProjFinSeq x1) & not i3 in rng (Sgm (rng f)) holds
(ProjFinSeq x1) . i3 = 0* n
proof
let i3 be Element of NAT ; ::_thesis: ( i3 in dom (ProjFinSeq x1) & not i3 in rng (Sgm (rng f)) implies (ProjFinSeq x1) . i3 = 0* n )
assume that
A33: i3 in dom (ProjFinSeq x1) and
A34: not i3 in rng (Sgm (rng f)) ; ::_thesis: (ProjFinSeq x1) . i3 = 0* n
A35: i3 in Seg (len (ProjFinSeq x1)) by A33, FINSEQ_1:def_3;
then A36: 1 <= i3 by FINSEQ_1:1;
len (ProjFinSeq x1) = n by Def12;
then A37: i3 <= n by A35, FINSEQ_1:1;
A38: not i3 in rng f by A34, FINSEQ_1:def_13;
A39: now__::_thesis:_not_|(x1,(Base_FinSeq_(n,i3)))|_<>_0
assume |(x1,(Base_FinSeq (n,i3)))| <> 0 ; ::_thesis: contradiction
then A40: Base_FinSeq (n,i3) in B0 by A36, A37;
then consider i5 being Element of NAT such that
A41: f . (Base_FinSeq (n,i3)) = i5 and
1 <= i5 and
i5 <= n and
A42: Base_FinSeq (n,i3) = Base_FinSeq (n,i5) by A13;
A43: Base_FinSeq (n,i3) in dom f by A30, A40, FUNCT_2:def_1;
i3 = i5 by A36, A37, A42, Th25;
hence contradiction by A38, A41, A43, FUNCT_1:def_3; ::_thesis: verum
end;
(ProjFinSeq x1) . i3 = |(x1,(Base_FinSeq (n,i3)))| * (Base_FinSeq (n,i3)) by A36, A37, Def12;
hence (ProjFinSeq x1) . i3 = 0* n by A39, EUCLID_4:3; ::_thesis: verum
end;
A44: dom (Sgm (rng f)) = Seg (len (Sgm (rng f))) by FINSEQ_1:def_3;
A45: rng ((ProjFinSeq x1) * (Sgm (rng f))) c= REAL n ;
A46: rng (Sgm (rng f)) = rng f by FINSEQ_1:def_13;
dom ((ProjFinSeq x1) * (Sgm (rng f))) = (Sgm (rng f)) " (dom (ProjFinSeq x1)) by RELAT_1:147
.= dom (Sgm (rng f)) by A46, A6, Th2 ;
then (ProjFinSeq x1) * (Sgm (rng f)) is FinSequence by A44, FINSEQ_1:def_2;
then reconsider F2 = (ProjFinSeq x1) * (Sgm (rng f)) as FinSequence of the carrier of (RealVectSpace (Seg n)) by A1, A45, FINSEQ_1:def_4;
dom F2 = (Sgm (rng f)) " (Seg n) by A6, RELAT_1:147
.= dom (Sgm (rng f)) by A46, Th2 ;
then A47: dom F2 = Seg (len (Sgm (rng f))) by FINSEQ_1:def_3;
then A48: Seg (len F2) = Seg (len (Sgm (rng f))) by FINSEQ_1:def_3;
reconsider F3 = F2 as FinSequence of REAL n by FINSEQ_2:93;
A49: x0 = Sum (ProjFinSeq x1) by Th31
.= Sum F3 by A46, A6, A32, Th24, FINSEQ_3:92
.= Sum F2 by Th42 ;
A50: rng ((f ") * (Sgm (rng f))) c= rng (f ") by RELAT_1:26;
A51: dom (Sgm (rng f)) = Seg (len (Sgm (rng f))) by FINSEQ_1:def_3;
A52: len F2 = len (Sgm (rng f)) by A47, FINSEQ_1:def_3;
A53: dom f = B0 by A30, FUNCT_2:def_1;
then rng (f ") = B0 by A29, FUNCT_1:33;
then A54: rng ((f ") * (Sgm (rng f))) c= the carrier of (RealVectSpace (Seg n)) by A50, XBOOLE_1:1;
dom ((f ") * (Sgm (rng f))) = (Sgm (rng f)) " (dom (f ")) by RELAT_1:147
.= (Sgm (rng f)) " (rng f) by A29, FUNCT_1:33
.= dom (Sgm (rng f)) by A46, Th2 ;
then (f ") * (Sgm (rng f)) is FinSequence by A51, FINSEQ_1:def_2;
then reconsider F0 = (f ") * (Sgm (rng f)) as FinSequence of the carrier of (RealVectSpace (Seg n)) by A54, FINSEQ_1:def_4;
dom F0 = (Sgm (rng f)) " (dom (f ")) by RELAT_1:147
.= (Sgm (rng f)) " (rng f) by A29, FUNCT_1:33
.= dom (Sgm (rng f)) by A46, Th2 ;
then A55: dom F0 = Seg (len (Sgm (rng f))) by FINSEQ_1:def_3;
dom (f ") = rng f by A29, FUNCT_1:33;
then rng F0 = rng (f ") by A46, RELAT_1:28
.= dom f by A29, FUNCT_1:33 ;
then A56: rng F0 = Carrier l0 by A53, A19, A20, XBOOLE_0:def_10;
A57: for i being Element of NAT st i in dom F2 holds
F2 . i = (l0 . (F0 /. i)) * (F0 /. i)
proof
let i be Element of NAT ; ::_thesis: ( i in dom F2 implies F2 . i = (l0 . (F0 /. i)) * (F0 /. i) )
A58: Sgm (rng f) is one-to-one by FINSEQ_3:92;
assume i in dom F2 ; ::_thesis: F2 . i = (l0 . (F0 /. i)) * (F0 /. i)
then A59: i in Seg (len F2) by FINSEQ_1:def_3;
then A60: i in dom (Sgm (rng f)) by A52, FINSEQ_1:def_3;
then (Sgm (rng f)) . i in rng (Sgm (rng f)) by FUNCT_1:def_3;
then reconsider i2 = (Sgm (rng f)) . i as Element of NAT ;
reconsider r = Base_FinSeq (n,i2) as Element of (RealVectSpace (Seg n)) by FINSEQ_2:93;
i2 in rng (Sgm (rng f)) by A60, FUNCT_1:def_3;
then consider x2 being set such that
A61: x2 in dom f and
A62: f . x2 = i2 by A46, FUNCT_1:def_3;
dom f = B0 by A30, FUNCT_2:def_1;
then reconsider r2 = x2 as Element of (RealVectSpace (Seg n)) by A61;
A63: ex i22 being Element of NAT st
( f . r2 = i22 & 1 <= i22 & i22 <= n & r2 = Base_FinSeq (n,i22) ) by A13, A61;
then consider i4 being Element of NAT such that
A64: f . r = i4 and
1 <= i4 and
i4 <= n and
A65: r = Base_FinSeq (n,i4) by A62;
A66: dom f = B0 by A30, FUNCT_2:def_1;
F0 . i = (f ") . ((Sgm (rng f)) . i) by A60, FUNCT_1:13
.= Base_FinSeq (n,i2) by A29, A61, A62, A63, FUNCT_1:32 ;
then Base_FinSeq (n,i2) in rng F0 by A55, A48, A59, FUNCT_1:def_3;
then Base_FinSeq (n,i2) in { v where v is Element of (RealVectSpace (Seg n)) : l0 . v <> 0 } by A56, RLVECT_2:def_4;
then A67: ex v0 being Element of (RealVectSpace (Seg n)) st
( Base_FinSeq (n,i2) = v0 & l0 . v0 <> 0 ) ;
then Base_FinSeq (n,i2) in B0 by A17;
then A68: (f ") . (f . (Base_FinSeq (n,i2))) = Base_FinSeq (n,i2) by A29, A66, FUNCT_1:34;
then A69: ((f ") * (Sgm (rng f))) . i = Base_FinSeq (n,i2) by A60, A62, A63, FUNCT_1:13;
A70: i2 in rng f by A46, A60, FUNCT_1:def_3;
then A71: 1 <= i2 by FINSEQ_1:1;
A72: i2 <= n by A70, FINSEQ_1:1;
then i4 = i2 by A71, A65, Th25;
then A73: ((Sgm (rng f)) ") . (f . (Base_FinSeq (n,i2))) = i by A60, A64, A58, FUNCT_1:32;
A74: f . (Base_FinSeq (n,i2)) in rng (Sgm (rng f)) by A46, A61, A62, A63, FUNCT_1:def_3;
then A75: (f ") . ((Sgm (rng f)) . (((Sgm (rng f)) ") . (f . (Base_FinSeq (n,i2))))) = Base_FinSeq (n,i2) by A58, A68, FUNCT_1:35;
dom ((Sgm (rng f)) ") = rng (Sgm (rng f)) by A58, FUNCT_1:33;
then ((Sgm (rng f)) ") . (f . (Base_FinSeq (n,i2))) in rng ((Sgm (rng f)) ") by A74, FUNCT_1:def_3;
then A76: ((Sgm (rng f)) ") . (f . (Base_FinSeq (n,i2))) in dom (Sgm (rng f)) by A58, FUNCT_1:33;
l0 . (F0 /. i) = l0 . (((f ") * (Sgm (rng f))) . i) by A55, A52, A59, PARTFUN1:def_6
.= l0 . (Base_FinSeq (n,i2)) by A73, A76, A75, FUNCT_1:13
.= |(x1,(Base_FinSeq (n,i2)))| by A17, A71, A72, A67 ;
then (l0 . (F0 /. i)) * (F0 /. i) = |(x1,(Base_FinSeq (n,i2)))| * (Base_FinSeq (n,i2)) by A55, A52, A59, A69, PARTFUN1:def_6
.= (ProjFinSeq x1) . ((Sgm (rng f)) . i) by A71, A72, Def12
.= ((ProjFinSeq x1) * (Sgm (rng f))) . i by A60, FUNCT_1:13 ;
hence F2 . i = (l0 . (F0 /. i)) * (F0 /. i) ; ::_thesis: verum
end;
A77: Sgm (rng f) is one-to-one by FINSEQ_3:92;
len F2 = len F0 by A55, A48, FINSEQ_1:def_3;
then x1 = Sum (l0 (#) F0) by A49, A57, RLVECT_2:def_7;
then x1 = Sum l2 by A29, A77, A56, RLVECT_2:def_8;
hence ex l being Linear_Combination of B st x0 = Sum l ; ::_thesis: verum
end;
theorem Th44: :: EUCLID_7:44
for n being Element of NAT
for x0 being Element of (REAL-US n)
for B being Subset of (REAL-US n) st B = RN_Base n holds
ex l being Linear_Combination of B st x0 = Sum l
proof
let n be Element of NAT ; ::_thesis: for x0 being Element of (REAL-US n)
for B being Subset of (REAL-US n) st B = RN_Base n holds
ex l being Linear_Combination of B st x0 = Sum l
let x0 be Element of (REAL-US n); ::_thesis: for B being Subset of (REAL-US n) st B = RN_Base n holds
ex l being Linear_Combination of B st x0 = Sum l
let B be Subset of (REAL-US n); ::_thesis: ( B = RN_Base n implies ex l being Linear_Combination of B st x0 = Sum l )
reconsider x1 = x0 as Element of REAL n by REAL_NS1:def_6;
A1: REAL n = the carrier of (REAL-US n) by REAL_NS1:def_6;
assume A2: B = RN_Base n ; ::_thesis: ex l being Linear_Combination of B st x0 = Sum l
A3: { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } c= B
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } or y in B )
assume y in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } ; ::_thesis: y in B
then ex x being Element of REAL n st
( y = x & ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) ) ;
hence y in B by A2; ::_thesis: verum
end;
B c= { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) }
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in B or y in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } )
assume y in B ; ::_thesis: y in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) }
then ex i2 being Element of NAT st
( y = Base_FinSeq (n,i2) & 1 <= i2 & i2 <= n ) by A2;
hence y in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } ; ::_thesis: verum
end;
then A4: B = { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) ) } by A3, XBOOLE_0:def_10;
A5: { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) & |(x1,x)| <> 0 ) } c= B
proof
let x2 be set ; :: according to TARSKI:def_3 ::_thesis: ( not x2 in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) & |(x1,x)| <> 0 ) } or x2 in B )
assume x2 in { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) & |(x1,x)| <> 0 ) } ; ::_thesis: x2 in B
then ex x being Element of REAL n st
( x = x2 & ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) & |(x1,x)| <> 0 ) ) ;
hence x2 in B by A4; ::_thesis: verum
end;
then reconsider B0 = { x where x is Element of REAL n : ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) & |(x1,x)| <> 0 ) } as Subset of (REAL-US n) by XBOOLE_1:1;
defpred S1[ set , set ] means ( $1 in B0 implies ex i being Element of NAT st
( $2 = i & 1 <= i & i <= n & $1 = Base_FinSeq (n,i) ) );
A6: for x being set st x in B0 holds
ex y being set st
( y in Seg n & S1[x,y] )
proof
let x be set ; ::_thesis: ( x in B0 implies ex y being set st
( y in Seg n & S1[x,y] ) )
assume x in B0 ; ::_thesis: ex y being set st
( y in Seg n & S1[x,y] )
then consider x2 being Element of REAL n such that
A7: x = x2 and
A8: ex i being Element of NAT st
( 1 <= i & i <= n & x2 = Base_FinSeq (n,i) & |(x1,x2)| <> 0 ) ;
consider i0 being Element of NAT such that
A9: 1 <= i0 and
A10: i0 <= n and
A11: x2 = Base_FinSeq (n,i0) and
|(x1,x2)| <> 0 by A8;
i0 in Seg n by A9, A10, FINSEQ_1:1;
hence ex y being set st
( y in Seg n & S1[x,y] ) by A7, A9, A10, A11; ::_thesis: verum
end;
consider f being Function of B0,(Seg n) such that
A12: for x being set st x in B0 holds
S1[x,f . x] from FUNCT_2:sch_1(A6);
defpred S2[ set , set ] means ( ( $1 in B0 implies for i being Element of NAT st 1 <= i & i <= n & $1 = Base_FinSeq (n,i) holds
$2 = |(x1,(Base_FinSeq (n,i)))| ) & ( not $1 in B0 implies $2 = 0 ) );
A13: for x being set st x in the carrier of (REAL-US n) holds
ex y being set st
( y in REAL & S2[x,y] )
proof
let x be set ; ::_thesis: ( x in the carrier of (REAL-US n) implies ex y being set st
( y in REAL & S2[x,y] ) )
assume x in the carrier of (REAL-US n) ; ::_thesis: ex y being set st
( y in REAL & S2[x,y] )
percases ( x in B0 or not x in B0 ) ;
supposeA14: x in B0 ; ::_thesis: ex y being set st
( y in REAL & S2[x,y] )
then consider x2 being Element of REAL n such that
A15: x2 = x and
ex i being Element of NAT st
( 1 <= i & i <= n & x2 = Base_FinSeq (n,i) & |(x1,x2)| <> 0 ) ;
reconsider y0 = |(x1,x2)| as Element of REAL ;
for i2 being Element of NAT st 1 <= i2 & i2 <= n & x = Base_FinSeq (n,i2) holds
y0 = |(x1,(Base_FinSeq (n,i2)))| by A15;
hence ex y being set st
( y in REAL & S2[x,y] ) by A14; ::_thesis: verum
end;
suppose not x in B0 ; ::_thesis: ex y being set st
( y in REAL & S2[x,y] )
hence ex y being set st
( y in REAL & S2[x,y] ) ; ::_thesis: verum
end;
end;
end;
consider l2 being Function of the carrier of (REAL-US n),REAL such that
A16: for x being set st x in the carrier of (REAL-US n) holds
S2[x,l2 . x] from FUNCT_2:sch_1(A13);
A17: l2 is Element of Funcs ( the carrier of (REAL-US n),REAL) by FUNCT_2:8;
for v being Element of (REAL-US n) st not v in B0 holds
l2 . v = 0 by A16;
then reconsider l3 = l2 as Linear_Combination of REAL-US n by A2, A5, A17, RLVECT_2:def_3;
Carrier l3 c= B0
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in Carrier l3 or x in B0 )
assume x in Carrier l3 ; ::_thesis: x in B0
then x in { v where v is Element of (REAL-US n) : l3 . v <> 0 } by RLVECT_2:def_4;
then ex v being Element of (REAL-US n) st
( x = v & l3 . v <> 0 ) ;
hence x in B0 by A16; ::_thesis: verum
end;
then reconsider l0 = l3 as Linear_Combination of B0 by RLVECT_2:def_6;
A18: Carrier l0 c= B0 by RLVECT_2:def_6;
then Carrier l0 c= B by A5, XBOOLE_1:1;
then reconsider l2 = l0 as Linear_Combination of B by RLVECT_2:def_6;
A19: B0 c= Carrier l0
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in B0 or x in Carrier l0 )
assume A20: x in B0 ; ::_thesis: x in Carrier l0
then consider x6 being Element of REAL n such that
A21: x = x6 and
A22: ex i being Element of NAT st
( 1 <= i & i <= n & x6 = Base_FinSeq (n,i) & |(x1,x6)| <> 0 ) ;
reconsider x66 = x6 as Element of (REAL-US n) by REAL_NS1:def_6;
consider i8 being Element of NAT such that
1 <= i8 and
i8 <= n and
A23: x6 = Base_FinSeq (n,i8) and
|(x1,x6)| <> 0 by A22;
l0 . x66 = |(x1,(Base_FinSeq (n,i8)))| by A16, A20, A21, A22, A23;
then x in { v where v is Element of (REAL-US n) : l0 . v <> 0 } by A21, A22, A23;
hence x in Carrier l0 by RLVECT_2:def_4; ::_thesis: verum
end;
A24: dom (Sgm (rng f)) = Seg (len (Sgm (rng f))) by FINSEQ_1:def_3;
A25: rng ((f ") * (Sgm (rng f))) c= rng (f ") by RELAT_1:26;
A26: dom (Sgm (rng f)) = Seg (len (Sgm (rng f))) by FINSEQ_1:def_3;
for x1, x2 being set st x1 in dom f & x2 in dom f & f . x1 = f . x2 holds
x1 = x2
proof
let x1, x2 be set ; ::_thesis: ( x1 in dom f & x2 in dom f & f . x1 = f . x2 implies x1 = x2 )
assume that
A27: x1 in dom f and
A28: x2 in dom f and
A29: f . x1 = f . x2 ; ::_thesis: x1 = x2
A30: ex i2 being Element of NAT st
( f . x2 = i2 & 1 <= i2 & i2 <= n & x2 = Base_FinSeq (n,i2) ) by A12, A28;
ex i1 being Element of NAT st
( f . x1 = i1 & 1 <= i1 & i1 <= n & x1 = Base_FinSeq (n,i1) ) by A12, A27;
hence x1 = x2 by A29, A30; ::_thesis: verum
end;
then A31: f is one-to-one by FUNCT_1:def_4;
A32: ( Seg n = {} implies B0 = {} )
proof
set y = the Element of B0;
assume A33: Seg n = {} ; ::_thesis: B0 = {}
assume B0 <> {} ; ::_thesis: contradiction
then the Element of B0 in B0 ;
then ex x being Element of REAL n st
( x = the Element of B0 & ex i being Element of NAT st
( 1 <= i & i <= n & x = Base_FinSeq (n,i) & |(x1,x)| <> 0 ) ) ;
hence contradiction by A33; ::_thesis: verum
end;
A34: for i3 being Element of NAT st i3 in dom (ProjFinSeq x1) & not i3 in rng (Sgm (rng f)) holds
(ProjFinSeq x1) . i3 = 0* n
proof
let i3 be Element of NAT ; ::_thesis: ( i3 in dom (ProjFinSeq x1) & not i3 in rng (Sgm (rng f)) implies (ProjFinSeq x1) . i3 = 0* n )
assume that
A35: i3 in dom (ProjFinSeq x1) and
A36: not i3 in rng (Sgm (rng f)) ; ::_thesis: (ProjFinSeq x1) . i3 = 0* n
A37: i3 in Seg (len (ProjFinSeq x1)) by A35, FINSEQ_1:def_3;
then A38: 1 <= i3 by FINSEQ_1:1;
len (ProjFinSeq x1) = n by Def12;
then A39: i3 <= n by A37, FINSEQ_1:1;
A40: not i3 in rng f by A36, FINSEQ_1:def_13;
A41: now__::_thesis:_not_|(x1,(Base_FinSeq_(n,i3)))|_<>_0
assume |(x1,(Base_FinSeq (n,i3)))| <> 0 ; ::_thesis: contradiction
then A42: Base_FinSeq (n,i3) in B0 by A38, A39;
then consider i5 being Element of NAT such that
A43: f . (Base_FinSeq (n,i3)) = i5 and
1 <= i5 and
i5 <= n and
A44: Base_FinSeq (n,i3) = Base_FinSeq (n,i5) by A12;
A45: Base_FinSeq (n,i3) in dom f by A32, A42, FUNCT_2:def_1;
i3 = i5 by A38, A39, A44, Th25;
hence contradiction by A40, A43, A45, FUNCT_1:def_3; ::_thesis: verum
end;
(ProjFinSeq x1) . i3 = |(x1,(Base_FinSeq (n,i3)))| * (Base_FinSeq (n,i3)) by A38, A39, Def12;
hence (ProjFinSeq x1) . i3 = 0* n by A41, EUCLID_4:3; ::_thesis: verum
end;
A46: rng ((ProjFinSeq x1) * (Sgm (rng f))) c= REAL n ;
A47: rng (Sgm (rng f)) = rng f by FINSEQ_1:def_13;
A48: dom f = B0 by A32, FUNCT_2:def_1;
then rng (f ") = B0 by A31, FUNCT_1:33;
then A49: rng ((f ") * (Sgm (rng f))) c= the carrier of (REAL-US n) by A25, XBOOLE_1:1;
dom ((f ") * (Sgm (rng f))) = (Sgm (rng f)) " (dom (f ")) by RELAT_1:147
.= (Sgm (rng f)) " (rng f) by A31, FUNCT_1:33
.= dom (Sgm (rng f)) by A47, Th2 ;
then (f ") * (Sgm (rng f)) is FinSequence by A26, FINSEQ_1:def_2;
then reconsider F0 = (f ") * (Sgm (rng f)) as FinSequence of the carrier of (REAL-US n) by A49, FINSEQ_1:def_4;
dom F0 = (Sgm (rng f)) " (dom (f ")) by RELAT_1:147
.= (Sgm (rng f)) " (rng f) by A31, FUNCT_1:33
.= dom (Sgm (rng f)) by A47, Th2 ;
then A50: dom F0 = Seg (len (Sgm (rng f))) by FINSEQ_1:def_3;
A51: dom (ProjFinSeq x1) = Seg (len (ProjFinSeq x1)) by FINSEQ_1:def_3
.= Seg n by Def12 ;
then dom ((ProjFinSeq x1) * (Sgm (rng f))) = (Sgm (rng f)) " (Seg n) by RELAT_1:147
.= dom (Sgm (rng f)) by A47, Th2 ;
then (ProjFinSeq x1) * (Sgm (rng f)) is FinSequence by A24, FINSEQ_1:def_2;
then reconsider F2 = (ProjFinSeq x1) * (Sgm (rng f)) as FinSequence of the carrier of (REAL-US n) by A1, A46, FINSEQ_1:def_4;
dom F2 = (Sgm (rng f)) " (Seg n) by A51, RELAT_1:147
.= dom (Sgm (rng f)) by A47, Th2 ;
then A52: dom F2 = Seg (len (Sgm (rng f))) by FINSEQ_1:def_3;
then A53: Seg (len F2) = Seg (len (Sgm (rng f))) by FINSEQ_1:def_3;
A54: len F2 = len (Sgm (rng f)) by A52, FINSEQ_1:def_3;
dom (f ") = rng f by A31, FUNCT_1:33;
then rng F0 = rng (f ") by A47, RELAT_1:28
.= dom f by A31, FUNCT_1:33 ;
then A55: rng F0 = Carrier l0 by A48, A18, A19, XBOOLE_0:def_10;
A56: for i being Element of NAT st i in dom F2 holds
F2 . i = (l0 . (F0 /. i)) * (F0 /. i)
proof
let i be Element of NAT ; ::_thesis: ( i in dom F2 implies F2 . i = (l0 . (F0 /. i)) * (F0 /. i) )
A57: Sgm (rng f) is one-to-one by FINSEQ_3:92;
assume i in dom F2 ; ::_thesis: F2 . i = (l0 . (F0 /. i)) * (F0 /. i)
then A58: i in Seg (len F2) by FINSEQ_1:def_3;
then A59: i in dom (Sgm (rng f)) by A54, FINSEQ_1:def_3;
then (Sgm (rng f)) . i in rng (Sgm (rng f)) by FUNCT_1:def_3;
then reconsider i2 = (Sgm (rng f)) . i as Element of NAT ;
reconsider r = Base_FinSeq (n,i2) as Element of (REAL-US n) by REAL_NS1:def_6;
i2 in rng (Sgm (rng f)) by A59, FUNCT_1:def_3;
then consider x2 being set such that
A60: x2 in dom f and
A61: f . x2 = i2 by A47, FUNCT_1:def_3;
dom f = B0 by A32, FUNCT_2:def_1;
then reconsider r2 = x2 as Element of (REAL-US n) by A60;
A62: ex i22 being Element of NAT st
( f . r2 = i22 & 1 <= i22 & i22 <= n & r2 = Base_FinSeq (n,i22) ) by A12, A60;
then consider i4 being Element of NAT such that
A63: f . r = i4 and
1 <= i4 and
i4 <= n and
A64: r = Base_FinSeq (n,i4) by A61;
A65: dom f = B0 by A32, FUNCT_2:def_1;
F0 . i = (f ") . ((Sgm (rng f)) . i) by A59, FUNCT_1:13
.= Base_FinSeq (n,i2) by A31, A60, A61, A62, FUNCT_1:32 ;
then Base_FinSeq (n,i2) in rng F0 by A50, A53, A58, FUNCT_1:def_3;
then Base_FinSeq (n,i2) in { v where v is Element of (REAL-US n) : l0 . v <> 0 } by A55, RLVECT_2:def_4;
then A66: ex v0 being Element of (REAL-US n) st
( Base_FinSeq (n,i2) = v0 & l0 . v0 <> 0 ) ;
then Base_FinSeq (n,i2) in B0 by A16;
then A67: (f ") . (f . (Base_FinSeq (n,i2))) = Base_FinSeq (n,i2) by A31, A65, FUNCT_1:34;
then A68: ((f ") * (Sgm (rng f))) . i = Base_FinSeq (n,i2) by A59, A61, A62, FUNCT_1:13;
A69: i2 in rng f by A47, A59, FUNCT_1:def_3;
then A70: 1 <= i2 by FINSEQ_1:1;
A71: i2 <= n by A69, FINSEQ_1:1;
then i4 = i2 by A70, A64, Th25;
then A72: ((Sgm (rng f)) ") . (f . (Base_FinSeq (n,i2))) = i by A59, A63, A57, FUNCT_1:32;
A73: f . (Base_FinSeq (n,i2)) in rng (Sgm (rng f)) by A47, A60, A61, A62, FUNCT_1:def_3;
then A74: (f ") . ((Sgm (rng f)) . (((Sgm (rng f)) ") . (f . (Base_FinSeq (n,i2))))) = Base_FinSeq (n,i2) by A57, A67, FUNCT_1:35;
dom ((Sgm (rng f)) ") = rng (Sgm (rng f)) by A57, FUNCT_1:33;
then ((Sgm (rng f)) ") . (f . (Base_FinSeq (n,i2))) in rng ((Sgm (rng f)) ") by A73, FUNCT_1:def_3;
then A75: ((Sgm (rng f)) ") . (f . (Base_FinSeq (n,i2))) in dom (Sgm (rng f)) by A57, FUNCT_1:33;
l0 . (F0 /. i) = l0 . (((f ") * (Sgm (rng f))) . i) by A50, A54, A58, PARTFUN1:def_6
.= l0 . (Base_FinSeq (n,i2)) by A72, A75, A74, FUNCT_1:13
.= |(x1,(Base_FinSeq (n,i2)))| by A16, A70, A71, A66 ;
then (l0 . (F0 /. i)) * (F0 /. i) = |(x1,(Base_FinSeq (n,i2)))| * (Base_FinSeq (n,i2)) by A50, A54, A58, A68, PARTFUN1:def_6
.= (ProjFinSeq x1) . ((Sgm (rng f)) . i) by A70, A71, Def12
.= ((ProjFinSeq x1) * (Sgm (rng f))) . i by A59, FUNCT_1:13 ;
hence F2 . i = (l0 . (F0 /. i)) * (F0 /. i) ; ::_thesis: verum
end;
A76: Sgm (rng f) is one-to-one by FINSEQ_3:92;
reconsider F3 = F2 as FinSequence of REAL n by REAL_NS1:def_6;
A77: x0 = Sum (ProjFinSeq x1) by Th31
.= Sum F3 by A47, A51, A34, Th24, FINSEQ_3:92
.= Sum F2 by Th34 ;
len F2 = len F0 by A50, A53, FINSEQ_1:def_3;
then x1 = Sum (l0 (#) F0) by A77, A56, RLVECT_2:def_7;
then x1 = Sum l2 by A31, A76, A55, RLVECT_2:def_8;
hence ex l being Linear_Combination of B st x0 = Sum l ; ::_thesis: verum
end;
theorem Th45: :: EUCLID_7:45
for n being Nat
for B being Subset of (RealVectSpace (Seg n)) st B = RN_Base n holds
B is Basis of RealVectSpace (Seg n)
proof
let n be Nat; ::_thesis: for B being Subset of (RealVectSpace (Seg n)) st B = RN_Base n holds
B is Basis of RealVectSpace (Seg n)
let B be Subset of (RealVectSpace (Seg n)); ::_thesis: ( B = RN_Base n implies B is Basis of RealVectSpace (Seg n) )
set V = RealVectSpace (Seg n);
assume A1: B = RN_Base n ; ::_thesis: B is Basis of RealVectSpace (Seg n)
then reconsider B1 = B as R-orthonormal Subset of (RealVectSpace (Seg n)) ;
A2: the carrier of (Lin B) = { (Sum l) where l is Linear_Combination of B : verum } by RLVECT_3:def_2;
A3: now__::_thesis:_the_carrier_of_(RealVectSpace_(Seg_n))_c=_the_carrier_of_(Lin_B)
assume not the carrier of (RealVectSpace (Seg n)) c= the carrier of (Lin B) ; ::_thesis: contradiction
then consider x being set such that
A4: x in the carrier of (RealVectSpace (Seg n)) and
A5: not x in the carrier of (Lin B) by TARSKI:def_3;
reconsider x0 = x as Element of (RealVectSpace (Seg n)) by A4;
ex l being Linear_Combination of B st x0 = Sum l by A1, Th43;
hence contradiction by A2, A5; ::_thesis: verum
end;
the carrier of (Lin B) c= the carrier of (RealVectSpace (Seg n))
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in the carrier of (Lin B) or x in the carrier of (RealVectSpace (Seg n)) )
assume x in the carrier of (Lin B) ; ::_thesis: x in the carrier of (RealVectSpace (Seg n))
then ex l being Linear_Combination of B st x = Sum l by A2;
hence x in the carrier of (RealVectSpace (Seg n)) ; ::_thesis: verum
end;
then the carrier of (Lin B) = the carrier of (RealVectSpace (Seg n)) by A3, XBOOLE_0:def_10;
then Lin B = RealVectSpace (Seg n) by Th9;
then B1 is Basis of RealVectSpace (Seg n) by RLVECT_3:def_3;
hence B is Basis of RealVectSpace (Seg n) ; ::_thesis: verum
end;
registration
let n be Nat;
cluster RealVectSpace (Seg n) -> finite-dimensional ;
coherence
RealVectSpace (Seg n) is finite-dimensional
proof
reconsider B = RN_Base n as Subset of (RealVectSpace (Seg n)) by FINSEQ_2:93;
B is Basis of RealVectSpace (Seg n) by Th45;
hence RealVectSpace (Seg n) is finite-dimensional by RLVECT_5:def_1; ::_thesis: verum
end;
end;
theorem :: EUCLID_7:46
for n being Nat holds dim (RealVectSpace (Seg n)) = n
proof
let n be Nat; ::_thesis: dim (RealVectSpace (Seg n)) = n
reconsider B = RN_Base n as Subset of (RealVectSpace (Seg n)) by FINSEQ_2:93;
A1: for I being Basis of RealVectSpace (Seg n) holds n = card I
proof
let I be Basis of RealVectSpace (Seg n); ::_thesis: n = card I
B is Basis of RealVectSpace (Seg n) by Th45;
then card B = card I by RLVECT_5:25;
hence n = card I by Lm4; ::_thesis: verum
end;
n in NAT by ORDINAL1:def_12;
hence dim (RealVectSpace (Seg n)) = n by A1, RLVECT_5:def_2; ::_thesis: verum
end;
theorem Th47: :: EUCLID_7:47
for n being Nat
for B being Subset of (RealVectSpace (Seg n)) st B is Basis of RealVectSpace (Seg n) holds
card B = n
proof
let n be Nat; ::_thesis: for B being Subset of (RealVectSpace (Seg n)) st B is Basis of RealVectSpace (Seg n) holds
card B = n
let B be Subset of (RealVectSpace (Seg n)); ::_thesis: ( B is Basis of RealVectSpace (Seg n) implies card B = n )
assume A1: B is Basis of RealVectSpace (Seg n) ; ::_thesis: card B = n
reconsider Br = RN_Base n as Subset of (RealVectSpace (Seg n)) by FINSEQ_2:93;
Br is Basis of RealVectSpace (Seg n) by Th45;
then card Br = card B by A1, RLVECT_5:25;
hence card B = n by Lm4; ::_thesis: verum
end;
theorem Th48: :: EUCLID_7:48
{} is Basis of RealVectSpace (Seg 0)
proof
consider A being finite Subset of (RealVectSpace (Seg 0)) such that
A1: A is Basis of RealVectSpace (Seg 0) by RLVECT_5:def_1;
card A = 0 by A1, Th47;
then A = {} ;
hence {} is Basis of RealVectSpace (Seg 0) by A1; ::_thesis: verum
end;
theorem Th49: :: EUCLID_7:49
for n being Element of NAT holds RN_Base n is Basis of REAL-US n
proof
let n be Element of NAT ; ::_thesis: RN_Base n is Basis of REAL-US n
reconsider B = RN_Base n as Subset of (REAL-US n) by REAL_NS1:def_6;
set V = REAL-US n;
A1: the carrier of (Lin B) = { (Sum l) where l is Linear_Combination of B : verum } by RUSUB_3:def_1;
A2: now__::_thesis:_the_carrier_of_(REAL-US_n)_c=_the_carrier_of_(Lin_B)
assume not the carrier of (REAL-US n) c= the carrier of (Lin B) ; ::_thesis: contradiction
then consider x being set such that
A3: x in the carrier of (REAL-US n) and
A4: not x in the carrier of (Lin B) by TARSKI:def_3;
reconsider x0 = x as Element of (REAL-US n) by A3;
ex l being Linear_Combination of B st x0 = Sum l by Th44;
hence contradiction by A1, A4; ::_thesis: verum
end;
the carrier of (Lin B) c= the carrier of (REAL-US n)
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in the carrier of (Lin B) or x in the carrier of (REAL-US n) )
assume x in the carrier of (Lin B) ; ::_thesis: x in the carrier of (REAL-US n)
then ex l being Linear_Combination of B st x = Sum l by A1;
hence x in the carrier of (REAL-US n) ; ::_thesis: verum
end;
then the carrier of (Lin B) = the carrier of (REAL-US n) by A2, XBOOLE_0:def_10;
then Lin B = REAL-US n by RUSUB_1:26;
hence RN_Base n is Basis of REAL-US n by RUSUB_3:def_2; ::_thesis: verum
end;
theorem Th50: :: EUCLID_7:50
for n being Nat
for D being Orthogonal_Basis of n holds D is Basis of RealVectSpace (Seg n)
proof
let n be Nat; ::_thesis: for D being Orthogonal_Basis of n holds D is Basis of RealVectSpace (Seg n)
let D be Orthogonal_Basis of n; ::_thesis: D is Basis of RealVectSpace (Seg n)
set V = RealVectSpace (Seg n);
reconsider B = D as R-orthonormal Subset of (RealVectSpace (Seg n)) by FINSEQ_2:93;
percases ( n = 0 or n <> 0 ) ;
suppose n = 0 ; ::_thesis: D is Basis of RealVectSpace (Seg n)
hence D is Basis of RealVectSpace (Seg n) by Th18, Th48; ::_thesis: verum
end;
supposeA1: n <> 0 ; ::_thesis: D is Basis of RealVectSpace (Seg n)
reconsider D0 = D as R-orthonormal Subset of (REAL n) ;
consider I being Basis of RealVectSpace (Seg n) such that
A2: B c= I by RLVECT_5:2;
card I = n by Th47;
then A3: I is finite ;
A4: for D2 being R-orthonormal Subset of (REAL n) st D0 c= D2 holds
D2 = D0 by Def6;
A5: now__::_thesis:_(_B_<>_I_&_not_I_c=_the_carrier_of_(Lin_B)_implies_B_is_Basis_of_RealVectSpace_(Seg_n)_)
assume that
B <> I and
A6: not I c= the carrier of (Lin B) ; ::_thesis: B is Basis of RealVectSpace (Seg n)
consider x0 being set such that
A7: x0 in I and
A8: not x0 in the carrier of (Lin B) by A6, TARSKI:def_3;
reconsider z0 = x0 as Element of REAL n by A7, FINSEQ_2:93;
not x0 in Lin B by A8, STRUCT_0:def_5;
then A9: not x0 in B by RLVECT_3:15;
consider p being FinSequence such that
A10: rng p = B and
A11: p is one-to-one by A2, A3, FINSEQ_4:58;
A12: 1 <= (len p) + 1 by NAT_1:12;
reconsider p0 = p as FinSequence of REAL n by A10, FINSEQ_1:def_4;
defpred S1[ Nat] means ( 1 <= $1 & $1 <= (len p) + 1 implies ex q being FinSequence of REAL n st
( len q = $1 & ( $1 <= len p implies for d being Real holds not q . $1 = d * (p0 /. $1) ) & q . 1 = z0 & ( for i being Nat
for a, b being Element of REAL n st 1 <= i & i < $1 & a = q /. i & b = p0 /. i holds
( q /. (i + 1) <> 0* n & q . (i + 1) = (q /. i) - (|(a,b)| * (p0 /. i)) ) ) ) );
A13: I is linearly-independent by RLVECT_3:def_3;
A14: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A15: S1[k] ; ::_thesis: S1[k + 1]
percases ( ( 1 <= k + 1 & k + 1 <= (len p) + 1 ) or not 1 <= k + 1 or not k + 1 <= (len p) + 1 ) ;
supposeA16: ( 1 <= k + 1 & k + 1 <= (len p) + 1 ) ; ::_thesis: S1[k + 1]
k < k + 1 by XREAL_1:29;
then A17: k < (len p) + 1 by A16, XXREAL_0:2;
A18: k <= len p by A16, XREAL_1:6;
percases ( 1 <= k or 1 > k ) ;
suppose 1 <= k ; ::_thesis: S1[k + 1]
then consider q0 being FinSequence of REAL n such that
A19: len q0 = k and
A20: 1 <= k and
k <= (len p) + 1 and
A21: ( k <= len p implies for d being Real holds not q0 . k = d * (p0 /. k) ) and
A22: q0 . 1 = z0 and
A23: for i being Nat
for a, b being Element of REAL n st 1 <= i & i < k & a = q0 /. i & b = p0 /. i holds
( q0 /. (i + 1) <> 0* n & q0 . (i + 1) = (q0 /. i) - (|(a,b)| * (p0 /. i)) ) by A15, A17;
reconsider a2 = q0 /. k, b2 = p0 /. k as Element of REAL n ;
reconsider q3 = <*((q0 /. k) - (|(a2,b2)| * (p0 /. k)))*> as FinSequence of REAL n ;
reconsider q1 = q0 ^ q3 as FinSequence of REAL n ;
1 in Seg (len q0) by A19, A20, FINSEQ_1:1;
then A24: 1 in dom q0 by FINSEQ_1:def_3;
then A25: q1 . 1 = z0 by A22, FINSEQ_1:def_7;
A26: 1 <= k + 1 by NAT_1:12;
A27: ( k + 1 <= len p implies p0 /. (k + 1) in B )
proof
assume A28: k + 1 <= len p ; ::_thesis: p0 /. (k + 1) in B
then k + 1 in dom p by A26, FINSEQ_3:25;
then p . (k + 1) in rng p by FUNCT_1:def_3;
hence p0 /. (k + 1) in B by A10, A28, FINSEQ_4:15, NAT_1:12; ::_thesis: verum
end;
A29: len q1 = (len q0) + (len q3) by FINSEQ_1:22
.= k + 1 by A19, FINSEQ_1:40 ;
A30: for i being Nat
for a, b being Element of REAL n st 1 <= i & i < k + 1 & a = q1 /. i & b = p0 /. i holds
( q1 /. (i + 1) <> 0* n & q1 . (i + 1) = (q1 /. i) - (|(a,b)| * (p0 /. i)) )
proof
let i be Nat; ::_thesis: for a, b being Element of REAL n st 1 <= i & i < k + 1 & a = q1 /. i & b = p0 /. i holds
( q1 /. (i + 1) <> 0* n & q1 . (i + 1) = (q1 /. i) - (|(a,b)| * (p0 /. i)) )
let a, b be Element of REAL n; ::_thesis: ( 1 <= i & i < k + 1 & a = q1 /. i & b = p0 /. i implies ( q1 /. (i + 1) <> 0* n & q1 . (i + 1) = (q1 /. i) - (|(a,b)| * (p0 /. i)) ) )
assume that
A31: 1 <= i and
A32: i < k + 1 and
A33: a = q1 /. i and
A34: b = p0 /. i ; ::_thesis: ( q1 /. (i + 1) <> 0* n & q1 . (i + 1) = (q1 /. i) - (|(a,b)| * (p0 /. i)) )
A35: i <= k by A32, NAT_1:13;
A36: i + 1 <= k + 1 by A32, NAT_1:13;
A37: 1 <= i + 1 by NAT_1:12;
percases ( i < k or i = k ) by A35, XXREAL_0:1;
supposeA38: i < k ; ::_thesis: ( q1 /. (i + 1) <> 0* n & q1 . (i + 1) = (q1 /. i) - (|(a,b)| * (p0 /. i)) )
then A39: i + 1 <= k by NAT_1:13;
then A40: q1 . (i + 1) = q0 . (i + 1) by A19, FINSEQ_1:64, NAT_1:12;
A41: q1 /. (i + 1) = q1 . (i + 1) by A29, A37, A36, FINSEQ_4:15;
A42: q0 /. (i + 1) = q0 . (i + 1) by A19, A39, FINSEQ_4:15, NAT_1:12;
q1 /. i = q1 . i by A29, A31, A32, FINSEQ_4:15
.= q0 . i by A19, A31, A35, FINSEQ_1:64
.= q0 /. i by A19, A31, A35, FINSEQ_4:15 ;
hence ( q1 /. (i + 1) <> 0* n & q1 . (i + 1) = (q1 /. i) - (|(a,b)| * (p0 /. i)) ) by A23, A31, A33, A34, A38, A40, A41, A42; ::_thesis: verum
end;
supposeA43: i = k ; ::_thesis: ( q1 /. (i + 1) <> 0* n & q1 . (i + 1) = (q1 /. i) - (|(a,b)| * (p0 /. i)) )
then A44: q1 /. (i + 1) = q1 . (k + 1) by A29, A26, FINSEQ_4:15
.= q3 . ((k + 1) - (len q0)) by A19, A29, FINSEQ_1:24, XREAL_1:29
.= (q0 /. k) - (|(a2,b2)| * (p0 /. k)) by A19, FINSEQ_1:40 ;
A45: now__::_thesis:_not_q1_/._(i_+_1)_=_0*_n
assume q1 /. (i + 1) = 0* n ; ::_thesis: contradiction
then ((q0 /. k) - (|(a2,b2)| * (p0 /. k))) + (|(a2,b2)| * (p0 /. k)) = |(a2,b2)| * (p0 /. k) by A44, EUCLID_4:1;
then A46: q0 /. k = |(a2,b2)| * (p0 /. k) by RVSUM_1:43;
q0 /. k = q0 . k by A19, A20, FINSEQ_4:15;
hence contradiction by A16, A21, A46, XREAL_1:6; ::_thesis: verum
end;
k < k + 1 by XREAL_1:29;
then A47: q1 /. k = q1 . k by A20, A29, FINSEQ_4:15;
A48: q0 /. k = q0 . k by A19, A20, FINSEQ_4:15;
q1 . k = q0 . k by A19, A20, FINSEQ_1:64;
hence ( q1 /. (i + 1) <> 0* n & q1 . (i + 1) = (q1 /. i) - (|(a,b)| * (p0 /. i)) ) by A29, A33, A34, A37, A43, A48, A47, A44, A45, FINSEQ_4:15; ::_thesis: verum
end;
end;
end;
A49: for s1 being Element of (RealVectSpace (Seg n))
for a01 being Real st s1 in B holds
a01 * s1 in the carrier of (Lin B)
proof
let s1 be Element of (RealVectSpace (Seg n)); ::_thesis: for a01 being Real st s1 in B holds
a01 * s1 in the carrier of (Lin B)
let a01 be Real; ::_thesis: ( s1 in B implies a01 * s1 in the carrier of (Lin B) )
assume A50: s1 in B ; ::_thesis: a01 * s1 in the carrier of (Lin B)
{s1} c= B
proof
let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in {s1} or z in B )
assume z in {s1} ; ::_thesis: z in B
hence z in B by A50, TARSKI:def_1; ::_thesis: verum
end;
then Lin {s1} is Subspace of Lin B by RLVECT_3:20;
then A51: the carrier of (Lin {s1}) c= the carrier of (Lin B) by RLSUB_1:def_2;
a01 * s1 in Lin {s1} by RLVECT_4:8;
then a01 * s1 in the carrier of (Lin {s1}) by STRUCT_0:def_5;
hence a01 * s1 in the carrier of (Lin B) by A51; ::_thesis: verum
end;
A52: for s1 being Element of REAL n
for a01 being Real st s1 in B holds
a01 * s1 in the carrier of (Lin B)
proof
let s1 be Element of REAL n; ::_thesis: for a01 being Real st s1 in B holds
a01 * s1 in the carrier of (Lin B)
let a01 be Real; ::_thesis: ( s1 in B implies a01 * s1 in the carrier of (Lin B) )
reconsider s10 = s1 as Element of (RealVectSpace (Seg n)) by FINSEQ_2:93;
A53: a01 * s1 = a01 * s10 ;
assume s1 in B ; ::_thesis: a01 * s1 in the carrier of (Lin B)
hence a01 * s1 in the carrier of (Lin B) by A49, A53; ::_thesis: verum
end;
defpred S2[ Nat] means ( $1 + 1 <= k + 1 implies not q1 . ($1 + 1) in the carrier of (Lin B) );
A54: for j being Nat st S2[j] holds
S2[j + 1]
proof
let j be Nat; ::_thesis: ( S2[j] implies S2[j + 1] )
assume A55: S2[j] ; ::_thesis: S2[j + 1]
( (j + 1) + 1 <= k + 1 implies not q1 . ((j + 1) + 1) in the carrier of (Lin B) )
proof
A56: B c= the carrier of (Lin B)
proof
let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in B or z in the carrier of (Lin B) )
assume z in B ; ::_thesis: z in the carrier of (Lin B)
then z in Lin B by RLVECT_3:15;
hence z in the carrier of (Lin B) by STRUCT_0:def_5; ::_thesis: verum
end;
assume (j + 1) + 1 <= k + 1 ; ::_thesis: not q1 . ((j + 1) + 1) in the carrier of (Lin B)
then A57: j + 1 <= k by XREAL_1:6;
percases ( j + 1 = k or j + 1 < k ) by A57, XXREAL_0:1;
supposeA58: j + 1 = k ; ::_thesis: not q1 . ((j + 1) + 1) in the carrier of (Lin B)
1 <= j + 1 by NAT_1:12;
then j + 1 in dom p0 by A18, A58, FINSEQ_3:25;
then A59: p0 . (j + 1) in rng p by FUNCT_1:def_3;
A60: p0 /. (j + 1) = p0 . (j + 1) by A18, A58, FINSEQ_4:15, NAT_1:12;
1 <= (j + 1) + 1 by NAT_1:12;
then A61: q1 /. ((j + 1) + 1) = q1 . ((j + 1) + 1) by A29, A58, FINSEQ_4:15;
A62: q1 . ((j + 1) + 1) = (q0 /. k) - (|(a2,b2)| * (p0 /. k)) by A19, A58, FINSEQ_1:42;
now__::_thesis:_not_q1_._((j_+_1)_+_1)_in_the_carrier_of_(Lin_B)
assume A63: q1 . ((j + 1) + 1) in the carrier of (Lin B) ; ::_thesis: contradiction
(q1 /. ((j + 1) + 1)) + (|(a2,b2)| * (p0 /. (j + 1))) = q0 /. (j + 1) by A58, A62, A61, RVSUM_1:43;
then q0 /. (j + 1) in the carrier of (Lin B) by A10, A56, A61, A59, A60, A63, Lm3;
then A64: q0 /. (j + 1) in Lin B by STRUCT_0:def_5;
A65: not q1 . (j + 1) in Lin B by A55, A58, STRUCT_0:def_5, XREAL_1:29;
q1 . (j + 1) = q0 . (j + 1) by A19, A20, A58, FINSEQ_1:64;
hence contradiction by A19, A20, A58, A64, A65, FINSEQ_4:15; ::_thesis: verum
end;
hence not q1 . ((j + 1) + 1) in the carrier of (Lin B) ; ::_thesis: verum
end;
supposeA66: j + 1 < k ; ::_thesis: not q1 . ((j + 1) + 1) in the carrier of (Lin B)
reconsider a11 = q0 /. (j + 1), b11 = p0 /. (j + 1) as Element of REAL n ;
A67: (j + 1) + 1 <= k by A66, NAT_1:13;
then A68: q0 /. ((j + 1) + 1) = q0 . ((j + 1) + 1) by A19, FINSEQ_4:15, NAT_1:12;
A69: j + 1 <= len p0 by A18, A66, XXREAL_0:2;
then A70: p0 /. (j + 1) = p0 . (j + 1) by FINSEQ_4:15, NAT_1:12;
A71: 1 <= j + 1 by NAT_1:12;
then j + 1 in dom p0 by A69, FINSEQ_3:25;
then A72: p0 . (j + 1) in rng p by FUNCT_1:def_3;
A73: q1 . ((j + 1) + 1) = q0 . ((j + 1) + 1) by A19, A67, FINSEQ_1:64, NAT_1:12;
A74: q0 . ((j + 1) + 1) = (q0 /. (j + 1)) - (|(a11,b11)| * (p0 /. (j + 1))) by A23, A66, A71;
now__::_thesis:_not_q1_._((j_+_1)_+_1)_in_the_carrier_of_(Lin_B)
assume A75: q1 . ((j + 1) + 1) in the carrier of (Lin B) ; ::_thesis: contradiction
(q0 /. ((j + 1) + 1)) + (|(a11,b11)| * (p0 /. (j + 1))) = q0 /. (j + 1) by A74, A68, RVSUM_1:43;
then q0 /. (j + 1) in the carrier of (Lin B) by A10, A56, A68, A72, A70, A73, A75, Lm3;
then A76: q0 /. (j + 1) in Lin B by STRUCT_0:def_5;
k < k + 1 by XREAL_1:29;
then A77: not q1 . (j + 1) in Lin B by A55, A66, STRUCT_0:def_5, XXREAL_0:2;
q1 . (j + 1) = q0 . (j + 1) by A19, A66, FINSEQ_1:64, NAT_1:12;
hence contradiction by A19, A66, A76, A77, FINSEQ_4:15, NAT_1:12; ::_thesis: verum
end;
hence not q1 . ((j + 1) + 1) in the carrier of (Lin B) ; ::_thesis: verum
end;
end;
end;
hence S2[j + 1] ; ::_thesis: verum
end;
A78: S2[ 0 ] by A8, A22, A24, FINSEQ_1:def_7;
for j being Nat holds S2[j] from NAT_1:sch_2(A78, A54);
then ( k + 1 <= len p implies for d being Real holds not q1 . (k + 1) = d * (p0 /. (k + 1)) ) by A52, A27;
hence S1[k + 1] by A29, A25, A30; ::_thesis: verum
end;
supposeA79: 1 > k ; ::_thesis: S1[k + 1]
reconsider q1 = <*z0*> as FinSequence of REAL n ;
A80: len q1 = 1 by FINSEQ_1:40;
A81: q1 . 1 = z0 by FINSEQ_1:40;
A82: ( 1 <= len p implies for d being Real holds not q1 . 1 = d * (p0 /. 1) )
proof
assume A83: 1 <= len p ; ::_thesis: for d being Real holds not q1 . 1 = d * (p0 /. 1)
thus for d being Real holds not q1 . 1 = d * (p0 /. 1) ::_thesis: verum
proof
let d be Real; ::_thesis: not q1 . 1 = d * (p0 /. 1)
A84: q1 . 1 = z0 by FINSEQ_1:40;
1 in dom p0 by A83, FINSEQ_3:25;
then A85: p0 . 1 in B by A10, FUNCT_1:def_3;
p0 /. 1 = p0 . 1 by A83, FINSEQ_4:15;
hence not q1 . 1 = d * (p0 /. 1) by A2, A7, A9, A13, A84, A85, Th40; ::_thesis: verum
end;
end;
A86: for i being Nat
for a, b being Element of REAL n st 1 <= i & i < 1 & a = q1 /. i & b = p0 /. i holds
( q1 /. (i + 1) <> 0* n & q1 . (i + 1) = (q1 /. i) - (|(a,b)| * (p0 /. i)) ) ;
k = 0 by A79, NAT_1:14;
hence S1[k + 1] by A80, A81, A82, A86; ::_thesis: verum
end;
end;
end;
suppose ( not 1 <= k + 1 or not k + 1 <= (len p) + 1 ) ; ::_thesis: S1[k + 1]
hence S1[k + 1] ; ::_thesis: verum
end;
end;
end;
A87: S1[ 0 ] ;
for k being Nat holds S1[k] from NAT_1:sch_2(A87, A14);
then consider q being FinSequence of REAL n such that
A88: len q = (len p) + 1 and
( (len p) + 1 <= len p implies for d being Real holds not q . ((len p) + 1) = d * (p0 /. ((len p) + 1)) ) and
q . 1 = z0 and
A89: for i being Nat
for a, b being Element of REAL n st 1 <= i & i < (len p) + 1 & a = q /. i & b = p0 /. i holds
( q /. (i + 1) <> 0* n & q . (i + 1) = (q /. i) - (|(a,b)| * (p0 /. i)) ) by A12;
reconsider u4 = q /. (len q) as Element of REAL n ;
A90: len p < (len p) + 1 by XREAL_1:29;
set u0 = (1 / |.u4.|) * u4;
reconsider B3 = B \/ {((1 / |.u4.|) * u4)} as Subset of (REAL n) by XBOOLE_1:8;
A91: for i being Nat
for s being Element of REAL n st 1 <= i & i <= len p & p0 /. i = s holds
|(s,u4)| = 0
proof
defpred S2[ Nat] means for s2, u2 being Element of REAL n
for k being Nat st u2 = q /. $1 & 1 <= k & k < $1 & $1 <= (len p) + 1 & p0 /. k = s2 holds
|(s2,u2)| = 0 ;
let i be Nat; ::_thesis: for s being Element of REAL n st 1 <= i & i <= len p & p0 /. i = s holds
|(s,u4)| = 0
let s be Element of REAL n; ::_thesis: ( 1 <= i & i <= len p & p0 /. i = s implies |(s,u4)| = 0 )
assume that
A92: 1 <= i and
A93: i <= len p and
A94: p0 /. i = s ; ::_thesis: |(s,u4)| = 0
A95: for k being Nat st S2[k] holds
S2[k + 1]
proof
let k be Nat; ::_thesis: ( S2[k] implies S2[k + 1] )
assume A96: S2[k] ; ::_thesis: S2[k + 1]
for s2, u2 being Element of REAL n
for k2 being Nat st u2 = q /. (k + 1) & 1 <= k2 & k2 < k + 1 & k + 1 <= (len p) + 1 & p0 /. k2 = s2 holds
|(s2,u2)| = 0
proof
A97: k < k + 1 by XREAL_1:29;
let s2, u2 be Element of REAL n; ::_thesis: for k2 being Nat st u2 = q /. (k + 1) & 1 <= k2 & k2 < k + 1 & k + 1 <= (len p) + 1 & p0 /. k2 = s2 holds
|(s2,u2)| = 0
let k2 be Nat; ::_thesis: ( u2 = q /. (k + 1) & 1 <= k2 & k2 < k + 1 & k + 1 <= (len p) + 1 & p0 /. k2 = s2 implies |(s2,u2)| = 0 )
assume that
A98: u2 = q /. (k + 1) and
A99: 1 <= k2 and
A100: k2 < k + 1 and
A101: k + 1 <= (len p) + 1 and
A102: p0 /. k2 = s2 ; ::_thesis: |(s2,u2)| = 0
A103: k2 <= k by A100, NAT_1:13;
percases ( k = 0 or k <> 0 ) ;
suppose k = 0 ; ::_thesis: |(s2,u2)| = 0
hence |(s2,u2)| = 0 by A99, A100; ::_thesis: verum
end;
supposeA104: k <> 0 ; ::_thesis: |(s2,u2)| = 0
reconsider a = q /. k, b = p0 /. k as Element of REAL n ;
A105: k < (len p) + 1 by A101, A97, XXREAL_0:2;
then A106: k <= len p by NAT_1:13;
1 <= k + 1 by A99, A100, XXREAL_0:2;
then A107: u2 = q . (k + 1) by A88, A98, A101, FINSEQ_4:15;
A108: 0 + 1 <= k by A104, NAT_1:13;
then q . (k + 1) = (q /. k) - (|(a,b)| * (p0 /. k)) by A89, A105;
then A109: |(s2,u2)| = |(s2,a)| - |(s2,(|(a,b)| * b))| by A107, EUCLID_4:26
.= |(s2,a)| - (|(a,b)| * |(s2,b)|) by EUCLID_4:21 ;
percases ( k2 < k or k2 = k ) by A103, XXREAL_0:1;
supposeA110: k2 < k ; ::_thesis: |(s2,u2)| = 0
then A111: 1 < k by A99, XXREAL_0:2;
then A112: p0 /. k = p0 . k by A106, FINSEQ_4:15;
k in Seg (len p0) by A106, A111, FINSEQ_1:1;
then A113: k in dom p0 by FINSEQ_1:def_3;
then A114: b in D by A10, A112, FUNCT_1:def_3;
A115: k < (len p) + 1 by A101, A97, XXREAL_0:2;
A116: k2 < len p by A106, A110, XXREAL_0:2;
then A117: p0 /. k2 = p0 . k2 by A99, FINSEQ_4:15;
k2 in Seg (len p0) by A99, A116, FINSEQ_1:1;
then A118: k2 in dom p0 by FINSEQ_1:def_3;
then A119: s2 in rng p by A102, A117, FUNCT_1:def_3;
s2 <> b by A11, A102, A110, A117, A118, A112, A113, FUNCT_1:def_4;
then |(s2,b)| = 0 by A10, A119, A114, Def3;
hence |(s2,u2)| = 0 by A96, A99, A102, A109, A110, A115; ::_thesis: verum
end;
supposeA120: k2 = k ; ::_thesis: |(s2,u2)| = 0
k in Seg (len p0) by A108, A106, FINSEQ_1:1;
then A121: k in dom p0 by FINSEQ_1:def_3;
p0 /. k = p0 . k by A108, A106, FINSEQ_4:15;
then b in rng p0 by A121, FUNCT_1:def_3;
then |.b.| = 1 by A10, Def4;
then |.b.| ^2 = 1 ;
hence |(s2,u2)| = |(b,a)| - (|(a,b)| * 1) by A102, A109, A120, EUCLID_2:4
.= 0 ;
::_thesis: verum
end;
end;
end;
end;
end;
hence S2[k + 1] ; ::_thesis: verum
end;
A122: S2[ 0 ] ;
A123: for k being Nat holds S2[k] from NAT_1:sch_2(A122, A95);
len p < (len p) + 1 by XREAL_1:29;
then i < len q by A88, A93, XXREAL_0:2;
hence |(s,u4)| = 0 by A88, A92, A94, A123; ::_thesis: verum
end;
A124: for i being Nat
for s being Element of REAL n st 1 <= i & i <= len p & p0 /. i = s holds
|(s,((1 / |.u4.|) * u4))| = 0
proof
let i be Nat; ::_thesis: for s being Element of REAL n st 1 <= i & i <= len p & p0 /. i = s holds
|(s,((1 / |.u4.|) * u4))| = 0
let s be Element of REAL n; ::_thesis: ( 1 <= i & i <= len p & p0 /. i = s implies |(s,((1 / |.u4.|) * u4))| = 0 )
assume that
A125: 1 <= i and
A126: i <= len p and
A127: p0 /. i = s ; ::_thesis: |(s,((1 / |.u4.|) * u4))| = 0
A128: |(s,((1 / |.u4.|) * u4))| = (1 / |.u4.|) * |(s,u4)| by EUCLID_4:22;
|(s,u4)| = 0 by A91, A125, A126, A127;
hence |(s,((1 / |.u4.|) * u4))| = 0 by A128; ::_thesis: verum
end;
for x, y being real-valued FinSequence st x in B3 & y in B3 & x <> y holds
|(x,y)| = 0
proof
let x, y be real-valued FinSequence; ::_thesis: ( x in B3 & y in B3 & x <> y implies |(x,y)| = 0 )
assume that
A129: x in B3 and
A130: y in B3 and
A131: x <> y ; ::_thesis: |(x,y)| = 0
percases ( ( x in B & y in B ) or ( x in B & y in {((1 / |.u4.|) * u4)} ) or ( x in {((1 / |.u4.|) * u4)} & y in B ) or ( x in {((1 / |.u4.|) * u4)} & y in {((1 / |.u4.|) * u4)} ) ) by A129, A130, XBOOLE_0:def_3;
suppose ( x in B & y in B ) ; ::_thesis: |(x,y)| = 0
hence |(x,y)| = 0 by A131, Def3; ::_thesis: verum
end;
supposeA132: ( x in B & y in {((1 / |.u4.|) * u4)} ) ; ::_thesis: |(x,y)| = 0
then consider x3 being set such that
A133: x3 in dom p0 and
A134: x = p0 . x3 by A10, FUNCT_1:def_3;
reconsider j = x3 as Element of NAT by A133;
A135: x3 in Seg (len p0) by A133, FINSEQ_1:def_3;
then A136: j <= len p0 by FINSEQ_1:1;
A137: y = (1 / |.u4.|) * u4 by A132, TARSKI:def_1;
A138: 1 <= j by A135, FINSEQ_1:1;
then p0 . x3 = p0 /. j by A136, FINSEQ_4:15;
hence |(x,y)| = 0 by A124, A137, A134, A138, A136; ::_thesis: verum
end;
supposeA139: ( x in {((1 / |.u4.|) * u4)} & y in B ) ; ::_thesis: |(x,y)| = 0
then consider y3 being set such that
A140: y3 in dom p0 and
A141: y = p0 . y3 by A10, FUNCT_1:def_3;
reconsider j = y3 as Element of NAT by A140;
A142: y3 in Seg (len p0) by A140, FINSEQ_1:def_3;
then A143: j <= len p0 by FINSEQ_1:1;
A144: x = (1 / |.u4.|) * u4 by A139, TARSKI:def_1;
A145: 1 <= j by A142, FINSEQ_1:1;
then p0 . y3 = p0 /. j by A143, FINSEQ_4:15;
hence |(x,y)| = 0 by A124, A144, A141, A145, A143; ::_thesis: verum
end;
supposeA146: ( x in {((1 / |.u4.|) * u4)} & y in {((1 / |.u4.|) * u4)} ) ; ::_thesis: |(x,y)| = 0
then y = (1 / |.u4.|) * u4 by TARSKI:def_1;
hence |(x,y)| = 0 by A131, A146, TARSKI:def_1; ::_thesis: verum
end;
end;
end;
then A147: B3 is R-orthogonal by Def3;
1 in dom p by A1, A10, FINSEQ_3:32;
then A148: 1 <= len p by FINSEQ_3:25;
set aq = q /. (len p);
set bq = p0 /. (len p);
A149: p0 /. (len p) = p0 /. (len p) ;
q /. (len p) = q /. (len p) ;
then A150: |.u4.| <> 0 by A148, A88, A89, A149, A90, EUCLID:8;
A151: abs (1 / |.u4.|) = 1 / |.u4.| by ABSVALUE:def_1;
A152: (1 / |.u4.|) * u4 in {((1 / |.u4.|) * u4)} by TARSKI:def_1;
A153: |.((1 / |.u4.|) * u4).| = (abs (1 / |.u4.|)) * |.u4.| by EUCLID:11
.= 1 by A150, A151, XCMPLX_1:106 ;
then B3 is R-normal by Th17;
then D0 = B3 by A4, A147, XBOOLE_1:7;
then (1 / |.u4.|) * u4 in B by A152, XBOOLE_0:def_3;
then consider x3 being set such that
A154: x3 in dom p0 and
A155: (1 / |.u4.|) * u4 = p0 . x3 by A10, FUNCT_1:def_3;
reconsider j = x3 as Element of NAT by A154;
A156: x3 in Seg (len p0) by A154, FINSEQ_1:def_3;
then A157: j <= len p0 by FINSEQ_1:1;
A158: 1 <= j by A156, FINSEQ_1:1;
then p0 . x3 = p0 /. j by A157, FINSEQ_4:15;
then |(((1 / |.u4.|) * u4),((1 / |.u4.|) * u4))| = 0 by A124, A155, A158, A157;
hence B is Basis of RealVectSpace (Seg n) by A153, EUCLID_4:16; ::_thesis: verum
end;
Lin B is Subspace of Lin I by A2, RLVECT_3:20;
then A159: the carrier of (Lin B) c= the carrier of (Lin I) by RLSUB_1:def_2;
A160: Lin I = RealVectSpace (Seg n) by RLVECT_3:def_3;
now__::_thesis:_(_I_c=_the_carrier_of_(Lin_B)_implies_B_is_Basis_of_RealVectSpace_(Seg_n)_)
assume I c= the carrier of (Lin B) ; ::_thesis: B is Basis of RealVectSpace (Seg n)
then Lin I is Subspace of Lin B by RLVECT_5:19;
then the carrier of (Lin I) c= the carrier of (Lin B) by RLSUB_1:def_2;
then the carrier of (Lin I) = the carrier of (Lin B) by A159, XBOOLE_0:def_10;
then Lin B = Lin I by RLSUB_1:30;
hence B is Basis of RealVectSpace (Seg n) by A160, RLVECT_3:def_3; ::_thesis: verum
end;
hence D is Basis of RealVectSpace (Seg n) by A5; ::_thesis: verum
end;
end;
end;
registration
let n be Element of NAT ;
cluster REAL-US n -> finite-dimensional ;
coherence
REAL-US n is finite-dimensional
proof
reconsider B = RN_Base n as Subset of (REAL-US n) by REAL_NS1:def_6;
B is Basis of REAL-US n by Th49;
hence REAL-US n is finite-dimensional by RUSUB_4:def_1; ::_thesis: verum
end;
end;
theorem :: EUCLID_7:51
for n being Element of NAT holds dim (REAL-US n) = n
proof
let n be Element of NAT ; ::_thesis: dim (REAL-US n) = n
reconsider B = RN_Base n as Subset of (REAL-US n) by REAL_NS1:def_6;
for I being Basis of REAL-US n holds n = card I
proof
let I be Basis of REAL-US n; ::_thesis: n = card I
B is Basis of REAL-US n by Th49;
then card B = card I by RUSUB_4:5;
hence n = card I by Lm4; ::_thesis: verum
end;
hence dim (REAL-US n) = n by RUSUB_4:def_2; ::_thesis: verum
end;
theorem :: EUCLID_7:52
for n being Nat
for B being Orthogonal_Basis of n holds card B = n
proof
let n be Nat; ::_thesis: for B being Orthogonal_Basis of n holds card B = n
let B be Orthogonal_Basis of n; ::_thesis: card B = n
reconsider B0 = B as Subset of (RealVectSpace (Seg n)) by FINSEQ_2:93;
B0 is Basis of RealVectSpace (Seg n) by Th50;
hence card B = n by Th47; ::_thesis: verum
end;