let F be Field; :: thesis: for E being FieldExtension of F
for a being Element of E
for n being Element of NAT
for M being Subset of (VecSp (E,F)) st M = { (a |^ i) where i is Element of NAT : i <= n } & ( for i, j being Element of NAT st i < j & j <= n holds
a |^ i <> a |^ j ) holds
for l being Linear_Combination of M
for p being Polynomial of F st deg p <= n & ( for i being Element of NAT st i <= n holds
p . i = l . (a |^ i) ) holds
Ext_eval (p,a) = Sum l

let E be FieldExtension of F; :: thesis: for a being Element of E
for n being Element of NAT
for M being Subset of (VecSp (E,F)) st M = { (a |^ i) where i is Element of NAT : i <= n } & ( for i, j being Element of NAT st i < j & j <= n holds
a |^ i <> a |^ j ) holds
for l being Linear_Combination of M
for p being Polynomial of F st deg p <= n & ( for i being Element of NAT st i <= n holds
p . i = l . (a |^ i) ) holds
Ext_eval (p,a) = Sum l

let a be Element of E; :: thesis: for n being Element of NAT
for M being Subset of (VecSp (E,F)) st M = { (a |^ i) where i is Element of NAT : i <= n } & ( for i, j being Element of NAT st i < j & j <= n holds
a |^ i <> a |^ j ) holds
for l being Linear_Combination of M
for p being Polynomial of F st deg p <= n & ( for i being Element of NAT st i <= n holds
p . i = l . (a |^ i) ) holds
Ext_eval (p,a) = Sum l

let n be Element of NAT ; :: thesis: for M being Subset of (VecSp (E,F)) st M = { (a |^ i) where i is Element of NAT : i <= n } & ( for i, j being Element of NAT st i < j & j <= n holds
a |^ i <> a |^ j ) holds
for l being Linear_Combination of M
for p being Polynomial of F st deg p <= n & ( for i being Element of NAT st i <= n holds
p . i = l . (a |^ i) ) holds
Ext_eval (p,a) = Sum l

let M be Subset of (VecSp (E,F)); :: thesis: ( M = { (a |^ i) where i is Element of NAT : i <= n } & ( for i, j being Element of NAT st i < j & j <= n holds
a |^ i <> a |^ j ) implies for l being Linear_Combination of M
for p being Polynomial of F st deg p <= n & ( for i being Element of NAT st i <= n holds
p . i = l . (a |^ i) ) holds
Ext_eval (p,a) = Sum l )

assume AS1: ( M = { (a |^ i) where i is Element of NAT : i <= n } & ( for i, j being Element of NAT st i < j & j <= n holds
a |^ i <> a |^ j ) ) ; :: thesis: for l being Linear_Combination of M
for p being Polynomial of F st deg p <= n & ( for i being Element of NAT st i <= n holds
p . i = l . (a |^ i) ) holds
Ext_eval (p,a) = Sum l

let l be Linear_Combination of M; :: thesis: for p being Polynomial of F st deg p <= n & ( for i being Element of NAT st i <= n holds
p . i = l . (a |^ i) ) holds
Ext_eval (p,a) = Sum l

let p be Polynomial of F; :: thesis: ( deg p <= n & ( for i being Element of NAT st i <= n holds
p . i = l . (a |^ i) ) implies Ext_eval (p,a) = Sum l )

assume AS2: ( deg p <= n & ( for i being Element of NAT st i <= n holds
p . i = l . (a |^ i) ) ) ; :: thesis: Ext_eval (p,a) = Sum l
set V = VecSp (E,F);
defpred S1[ Nat] means for l being Linear_Combination of M st card (Carrier l) = $1 holds
for p being Polynomial of F st deg p <= n & ( for i being Element of NAT st i <= n holds
p . i = l . (a |^ i) ) holds
Sum l = Ext_eval (p,a);
IA: S1[ 0 ]
proof
let l be Linear_Combination of M; :: thesis: ( card (Carrier l) = 0 implies for p being Polynomial of F st deg p <= n & ( for i being Element of NAT st i <= n holds
p . i = l . (a |^ i) ) holds
Sum l = Ext_eval (p,a) )

assume card (Carrier l) = 0 ; :: thesis: for p being Polynomial of F st deg p <= n & ( for i being Element of NAT st i <= n holds
p . i = l . (a |^ i) ) holds
Sum l = Ext_eval (p,a)

then Carrier l = {} ;
then A2: l = ZeroLC (VecSp (E,F)) by VECTSP_6:def 3;
let p be Polynomial of F; :: thesis: ( deg p <= n & ( for i being Element of NAT st i <= n holds
p . i = l . (a |^ i) ) implies Sum l = Ext_eval (p,a) )

assume A4: ( deg p <= n & ( for i being Element of NAT st i <= n holds
p . i = l . (a |^ i) ) ) ; :: thesis: Sum l = Ext_eval (p,a)
now :: thesis: for i being Element of NAT holds p . i = (0_. F) . i
let i be Element of NAT ; :: thesis: p . b1 = (0_. F) . b1
per cases ( i > n or i <= n ) ;
suppose i > n ; :: thesis: p . b1 = (0_. F) . b1
then A5: i > deg p by A4, XXREAL_0:2;
deg p = (len p) - 1 by HURWITZ:def 2;
then i + 1 > ((len p) - 1) + 1 by A5, XREAL_1:6;
hence p . i = (0_. F) . i by NAT_1:13, ALGSEQ_1:8; :: thesis: verum
end;
suppose A5: i <= n ; :: thesis: p . b1 = (0_. F) . b1
then a |^ i in M by AS1;
then reconsider v = a |^ i as Element of (VecSp (E,F)) ;
thus p . i = l . v by A4, A5
.= (0_. F) . i by A2, VECTSP_6:3 ; :: thesis: verum
end;
end;
end;
then p = 0_. F ;
hence Ext_eval (p,a) = 0. E by ALGNUM_1:13
.= 0. (VecSp (E,F)) by FIELD_4:def 6
.= Sum l by A2, VECTSP_6:15 ;
:: thesis: verum
end;
IS: now :: thesis: for k being Nat st S1[k] holds
S1[k + 1]
let k be Nat; :: thesis: ( S1[k] implies S1[k + 1] )
assume B0: S1[k] ; :: thesis: S1[k + 1]
now :: thesis: for l being Linear_Combination of M st card (Carrier l) = k + 1 holds
for pp being Polynomial of F st deg pp <= n & ( for i being Element of NAT st i <= n holds
pp . i = l . (a |^ i) ) holds
Sum l = Ext_eval (pp,a)
let l be Linear_Combination of M; :: thesis: ( card (Carrier l) = k + 1 implies for pp being Polynomial of F st deg pp <= n & ( for i being Element of NAT st i <= n holds
pp . i = l . (a |^ i) ) holds
Sum l = Ext_eval (pp,a) )

assume B1: card (Carrier l) = k + 1 ; :: thesis: for pp being Polynomial of F st deg pp <= n & ( for i being Element of NAT st i <= n holds
pp . i = l . (a |^ i) ) holds
Sum l = Ext_eval (pp,a)

let pp be Polynomial of F; :: thesis: ( deg pp <= n & ( for i being Element of NAT st i <= n holds
pp . i = l . (a |^ i) ) implies Sum l = Ext_eval (pp,a) )

assume B2: ( deg pp <= n & ( for i being Element of NAT st i <= n holds
pp . i = l . (a |^ i) ) ) ; :: thesis: Sum l = Ext_eval (pp,a)
now :: thesis: not pp = 0_. F
assume C0: pp = 0_. F ; :: thesis: contradiction
now :: thesis: for o being object holds not o in Carrier l
let o be object ; :: thesis: not o in Carrier l
assume C1: o in Carrier l ; :: thesis: contradiction
Carrier l c= M by VECTSP_6:def 4;
then o in M by C1;
then consider i being Element of NAT such that
C2: ( o = a |^ i & i <= n ) by AS1;
l . (a |^ i) = pp . i by B2, C2
.= 0. F by C0 ;
hence contradiction by C1, C2, VECTSP_6:2; :: thesis: verum
end;
then Carrier l = {} by XBOOLE_0:def 1;
hence contradiction by B1; :: thesis: verum
end;
then reconsider p = pp as non zero Polynomial of F by UPROOTS:def 5;
defpred S2[ object , object ] means ( ( $1 = a |^ (deg p) & $2 = LC p ) or ( $1 <> a |^ (deg p) & $2 = 0. F ) );
A: for x being object st x in the carrier of (VecSp (E,F)) holds
ex y being object st
( y in the carrier of F & S2[x,y] )
proof
let x be object ; :: thesis: ( x in the carrier of (VecSp (E,F)) implies ex y being object st
( y in the carrier of F & S2[x,y] ) )

assume x in the carrier of (VecSp (E,F)) ; :: thesis: ex y being object st
( y in the carrier of F & S2[x,y] )

per cases ( x = a |^ (deg p) or x <> a |^ (deg p) ) ;
suppose x = a |^ (deg p) ; :: thesis: ex y being object st
( y in the carrier of F & S2[x,y] )

hence ex y being object st
( y in the carrier of F & S2[x,y] ) ; :: thesis: verum
end;
suppose x <> a |^ (deg p) ; :: thesis: ex y being object st
( y in the carrier of F & S2[x,y] )

hence ex y being object st
( y in the carrier of F & S2[x,y] ) ; :: thesis: verum
end;
end;
end;
consider lp being Function of the carrier of (VecSp (E,F)), the carrier of F such that
L: for x being object st x in the carrier of (VecSp (E,F)) holds
S2[x,lp . x] from FUNCT_2:sch 1(A);
reconsider lp = lp as Element of Funcs ( the carrier of (VecSp (E,F)), the carrier of F) by FUNCT_2:8;
U: M is finite
proof
deffunc H1( Nat) -> Element of the carrier of E = a |^ $1;
defpred S3[ Nat] means $1 <= n;
D: { H1(i) where i is Nat : ( i <= n & S3[i] ) } is finite from FINSEQ_1:sch 6();
E: now :: thesis: for o being object st o in { H1(i) where i is Nat : ( i <= n & S3[i] ) } holds
o in M
let o be object ; :: thesis: ( o in { H1(i) where i is Nat : ( i <= n & S3[i] ) } implies o in M )
assume o in { H1(i) where i is Nat : ( i <= n & S3[i] ) } ; :: thesis: o in M
then consider i being Nat such that
E1: ( o = a |^ i & i <= n & i <= n ) ;
i is Element of NAT by ORDINAL1:def 12;
hence o in M by E1, AS1; :: thesis: verum
end;
now :: thesis: for o being object st o in M holds
o in { H1(i) where i is Nat : ( i <= n & S3[i] ) }
let o be object ; :: thesis: ( o in M implies o in { H1(i) where i is Nat : ( i <= n & S3[i] ) } )
assume o in M ; :: thesis: o in { H1(i) where i is Nat : ( i <= n & S3[i] ) }
then consider i being Element of NAT such that
E1: ( o = a |^ i & i <= n ) by AS1;
thus o in { H1(i) where i is Nat : ( i <= n & S3[i] ) } by E1; :: thesis: verum
end;
hence M is finite by D, E, TARSKI:2; :: thesis: verum
end;
for v being Element of (VecSp (E,F)) st not v in M holds
lp . v = 0. F
proof
let v be Element of (VecSp (E,F)); :: thesis: ( not v in M implies lp . v = 0. F )
assume not v in M ; :: thesis: lp . v = 0. F
then v <> a |^ (deg p) by B2, AS1;
hence lp . v = 0. F by L; :: thesis: verum
end;
then reconsider lp = lp as Linear_Combination of VecSp (E,F) by U, VECTSP_6:def 1;
now :: thesis: for o being object st o in Carrier lp holds
o in M
let o be object ; :: thesis: ( o in Carrier lp implies o in M )
assume o in Carrier lp ; :: thesis: o in M
then consider v being Element of (VecSp (E,F)) such that
A1: ( o = v & lp . v <> 0. F ) by VECTSP_6:1;
( v = a |^ (deg p) & lp . v = LC p ) by L, A1;
hence o in M by A1, B2, AS1; :: thesis: verum
end;
then Carrier lp c= M ;
then reconsider lp = lp as Linear_Combination of M by VECTSP_6:def 4;
X1: {a} is Subset of (FAdj (F,{a})) by FAt;
a in {a} by TARSKI:def 1;
then reconsider a1 = a as Element of the carrier of (FAdj (F,{a})) by X1;
X: a |^ (deg p) is Element of (VecSp (E,F)) by FIELD_4:def 6;
C0: Carrier lp = {(a |^ (deg p))}
proof
C2: now :: thesis: for o being object st o in {(a |^ (deg p))} holds
o in Carrier lp
let o be object ; :: thesis: ( o in {(a |^ (deg p))} implies o in Carrier lp )
assume o in {(a |^ (deg p))} ; :: thesis: o in Carrier lp
then C3: o = a |^ (deg p) by TARSKI:def 1;
then lp . o <> 0. F by X, L;
hence o in Carrier lp by X, C3, VECTSP_6:2; :: thesis: verum
end;
now :: thesis: for o being object st o in Carrier lp holds
o in {(a |^ (deg p))}
let o be object ; :: thesis: ( o in Carrier lp implies o in {(a |^ (deg p))} )
assume C3: o in Carrier lp ; :: thesis: o in {(a |^ (deg p))}
Carrier lp = { v where v is Element of (VecSp (E,F)) : lp . v <> 0. F } by VECTSP_6:def 2;
then consider v being Element of (VecSp (E,F)) such that
C4: ( o = v & lp . v <> 0. F ) by C3;
o = a |^ (deg p) by C4, L;
hence o in {(a |^ (deg p))} by TARSKI:def 1; :: thesis: verum
end;
hence Carrier lp = {(a |^ (deg p))} by C2, TARSKI:2; :: thesis: verum
end;
lp . (a |^ (deg p)) = LC p by X, L;
then C: Ext_eval ((LM p),a) = Sum lp by C0, lembasx1a;
set q = p - (LM p);
reconsider lk = l - lp as Linear_Combination of M by VECTSP_6:42;
C2: l = lk + lp
proof
thus lk + lp = (l + (- lp)) + lp by VECTSP_6:def 11
.= l + ((- lp) + lp) by VECTSP_6:26
.= l + (lp + (- lp)) by VECTSP_6:25
.= l + (lp - lp) by VECTSP_6:def 11
.= l + (ZeroLC (VecSp (E,F))) by VECTSP_6:43
.= l by VECTSP_6:27 ; :: thesis: verum
end;
C3: Carrier lk = (Carrier l) \ (Carrier lp)
proof
C4: now :: thesis: for o being object st o in Carrier lk holds
o in (Carrier l) \ (Carrier lp)
let o be object ; :: thesis: ( o in Carrier lk implies o in (Carrier l) \ (Carrier lp) )
assume o in Carrier lk ; :: thesis: o in (Carrier l) \ (Carrier lp)
then consider v being Element of (VecSp (E,F)) such that
C5: ( o = v & lk . v <> 0. F ) by VECTSP_6:1;
C6: now :: thesis: not v = a |^ (deg p)
assume C7: v = a |^ (deg p) ; :: thesis: contradiction
then C9: l . v = p . (deg p) by B2
.= LC p by thLC ;
lk . v = (l . v) - (lp . v) by VECTSP_6:40
.= (LC p) - (LC p) by L, C7, C9 ;
hence contradiction by C5, RLVECT_1:15; :: thesis: verum
end;
then C7: not v in Carrier lp by C0, TARSKI:def 1;
lk . v = (l . v) - (lp . v) by VECTSP_6:40
.= (l . v) - (0. F) by C6, L ;
then v in Carrier l by C5, VECTSP_6:2;
hence o in (Carrier l) \ (Carrier lp) by C7, C5, XBOOLE_0:def 5; :: thesis: verum
end;
now :: thesis: for o being object st o in (Carrier l) \ (Carrier lp) holds
o in Carrier lk
let o be object ; :: thesis: ( o in (Carrier l) \ (Carrier lp) implies o in Carrier lk )
assume o in (Carrier l) \ (Carrier lp) ; :: thesis: o in Carrier lk
then C5: ( o in Carrier l & not o in Carrier lp ) by XBOOLE_0:def 5;
then consider v being Element of (VecSp (E,F)) such that
C6: ( o = v & l . v <> 0. F ) by VECTSP_6:1;
C7: o <> a |^ (deg p) by C0, C5, TARSKI:def 1;
lk . v = (l . v) - (lp . v) by VECTSP_6:40
.= (l . v) - (0. F) by C6, C7, L ;
hence o in Carrier lk by C6, VECTSP_6:1; :: thesis: verum
end;
hence Carrier lk = (Carrier l) \ (Carrier lp) by C4, TARSKI:2; :: thesis: verum
end;
now :: thesis: for o being object st o in Carrier lp holds
o in Carrier l
let o be object ; :: thesis: ( o in Carrier lp implies o in Carrier l )
assume C5: o in Carrier lp ; :: thesis: o in Carrier l
then C4: o = a |^ (deg p) by C0, TARSKI:def 1;
reconsider v = o as Element of (VecSp (E,F)) by C5;
lp . v = LC p by L, C4
.= pp . (deg p) by thLC
.= l . v by C4, B2 ;
then l . v <> 0. F by C5, VECTSP_6:2;
hence o in Carrier l by VECTSP_6:2; :: thesis: verum
end;
then Carrier lp c= Carrier l ;
then A: card ((Carrier l) \ (Carrier lp)) = (card (Carrier l)) - (card (Carrier lp)) by CARD_2:44
.= (k + 1) - 1 by B1, C0, CARD_2:42 ;
B: deg (p - (LM p)) < n by thdLM, B2, XXREAL_0:2;
for i being Element of NAT st i <= n holds
(p - (LM p)) . i = lk . (a |^ i)
proof
let i be Element of NAT ; :: thesis: ( i <= n implies (p - (LM p)) . i = lk . (a |^ i) )
assume B1: i <= n ; :: thesis: (p - (LM p)) . i = lk . (a |^ i)
reconsider v = a |^ i as Element of (VecSp (E,F)) by FIELD_4:def 6;
per cases ( i = deg p or i <> deg p ) ;
suppose B3: i = deg p ; :: thesis: (p - (LM p)) . i = lk . (a |^ i)
hence (p - (LM p)) . i = (p . (deg p)) - ((LM p) . (deg p)) by POLYNOM3:27
.= (p . (deg p)) - ((LM p) . (deg (LM p))) by thdegLM
.= (l . v) - ((LM p) . (deg (LM p))) by B3, B2
.= (l . v) - (LC (LM p)) by thLC
.= (l . v) - (LC p) by thdegLC
.= (l . v) - (lp . v) by B3, L
.= lk . (a |^ i) by VECTSP_6:40 ;
:: thesis: verum
end;
suppose D2: i <> deg p ; :: thesis: (p - (LM p)) . i = lk . (a |^ i)
D3: a |^ i <> a |^ (deg p)
proof
per cases ( i < deg p or i > deg p ) by D2, XXREAL_0:1;
suppose i < deg p ; :: thesis: a |^ i <> a |^ (deg p)
hence a |^ i <> a |^ (deg p) by B2, AS1; :: thesis: verum
end;
suppose i > deg p ; :: thesis: a |^ i <> a |^ (deg p)
hence a |^ i <> a |^ (deg p) by B1, AS1; :: thesis: verum
end;
end;
end;
p <> 0_. F ;
then len p <> 0 by POLYNOM4:5;
then (len p) + 1 > 0 + 1 by XREAL_1:6;
then len p >= 1 by NAT_1:13;
then D5: (len p) -' 1 = (len p) - 1 by XREAL_0:def 2;
D4: i <> (len p) -' 1 by D5, D2, HURWITZ:def 2;
thus (p - (LM p)) . i = (p . i) - ((LM p) . i) by POLYNOM3:27
.= (p . i) - (0. F) by D4, POLYNOM4:def 1
.= (l . v) - (0. F) by B2, B1
.= (l . v) - (lp . v) by D3, L
.= lk . (a |^ i) by VECTSP_6:40 ; :: thesis: verum
end;
end;
end;
then D: Ext_eval ((p - (LM p)),a) = Sum lk by A, C3, B, B0;
thus Sum l = (Sum lk) + (Sum lp) by C2, VECTSP_6:44
.= the addF of E . ((Sum lk),(Sum lp)) by FIELD_4:def 6
.= ((Ext_eval (p,a)) - (Ext_eval ((LM p),a))) + (Ext_eval ((LM p),a)) by C, D, exevalminus2
.= (Ext_eval (p,a)) + ((- (Ext_eval ((LM p),a))) + (Ext_eval ((LM p),a))) by RLVECT_1:def 3
.= (Ext_eval (p,a)) + (0. E) by RLVECT_1:5
.= Ext_eval (pp,a) ; :: thesis: verum
end;
hence S1[k + 1] ; :: thesis: verum
end;
I: for k being Nat holds S1[k] from NAT_1:sch 2(IA, IS);
consider n being Nat such that
H: card (Carrier l) = n ;
thus Ext_eval (p,a) = Sum l by AS2, I, H; :: thesis: verum