let F be Field; :: thesis: for E being FieldExtension of F
for m being Ordinal st m in card (nonConstantPolys F) holds
for p being Polynomial of F
for x being Function of (card (nonConstantPolys F)),E st card (Support (Poly (m,p))) = 1 holds
Ext_eval ((Poly (m,p)),x) = Ext_eval (p,(x /. m))

let E be FieldExtension of F; :: thesis: for m being Ordinal st m in card (nonConstantPolys F) holds
for p being Polynomial of F
for x being Function of (card (nonConstantPolys F)),E st card (Support (Poly (m,p))) = 1 holds
Ext_eval ((Poly (m,p)),x) = Ext_eval (p,(x /. m))

let m be Ordinal; :: thesis: ( m in card (nonConstantPolys F) implies for p being Polynomial of F
for x being Function of (card (nonConstantPolys F)),E st card (Support (Poly (m,p))) = 1 holds
Ext_eval ((Poly (m,p)),x) = Ext_eval (p,(x /. m)) )

assume AS0: m in card (nonConstantPolys F) ; :: thesis: for p being Polynomial of F
for x being Function of (card (nonConstantPolys F)),E st card (Support (Poly (m,p))) = 1 holds
Ext_eval ((Poly (m,p)),x) = Ext_eval (p,(x /. m))

let p be Polynomial of F; :: thesis: for x being Function of (card (nonConstantPolys F)),E st card (Support (Poly (m,p))) = 1 holds
Ext_eval ((Poly (m,p)),x) = Ext_eval (p,(x /. m))

let x be Function of (card (nonConstantPolys F)),E; :: thesis: ( card (Support (Poly (m,p))) = 1 implies Ext_eval ((Poly (m,p)),x) = Ext_eval (p,(x /. m)) )
set q = Poly (m,p);
set n = card (nonConstantPolys F);
assume card (Support (Poly (m,p))) = 1 ; :: thesis: Ext_eval ((Poly (m,p)),x) = Ext_eval (p,(x /. m))
then consider b being object such that
AS: Support (Poly (m,p)) = {b} by CARD_2:42;
b in Support (Poly (m,p)) by AS, TARSKI:def 1;
then reconsider b = b as bag of card (nonConstantPolys F) ;
AS1: (Poly (m,p)) . b = p . (b . m)
proof
A0: b in Support (Poly (m,p)) by AS, TARSKI:def 1;
Support (Poly (m,p)) c= {(EmptyBag (card (nonConstantPolys F)))} \/ { b where b is bag of card (nonConstantPolys F) : support b = {m} } by Th14c;
per cases then ( b in {(EmptyBag (card (nonConstantPolys F)))} or b in { b where b is bag of card (nonConstantPolys F) : support b = {m} } ) by A0, XBOOLE_0:def 3;
suppose b in {(EmptyBag (card (nonConstantPolys F)))} ; :: thesis: (Poly (m,p)) . b = p . (b . m)
then A1: b = EmptyBag (card (nonConstantPolys F)) by TARSKI:def 1;
hence (Poly (m,p)) . b = p . 0 by defPg
.= p . (b . m) by A1, PBOOLE:5 ;
:: thesis: verum
end;
suppose b in { b where b is bag of card (nonConstantPolys F) : support b = {m} } ; :: thesis: (Poly (m,p)) . b = p . (b . m)
then consider b1 being bag of card (nonConstantPolys F) such that
A1: ( b1 = b & support b1 = {m} ) ;
thus (Poly (m,p)) . b = p . (b . m) by A1, defPg; :: thesis: verum
end;
end;
end;
consider y being FinSequence of E such that
A: ( Ext_eval ((Poly (m,p)),x) = Sum y & len y = len (SgmX ((BagOrder (card (nonConstantPolys F))),(Support (Poly (m,p))))) & ( for i being Element of NAT st 1 <= i & i <= len y holds
y . i = (In ((((Poly (m,p)) * (SgmX ((BagOrder (card (nonConstantPolys F))),(Support (Poly (m,p)))))) . i),E)) * (eval (((SgmX ((BagOrder (card (nonConstantPolys F))),(Support (Poly (m,p))))) /. i),x)) ) ) by defeval;
field (BagOrder (card (nonConstantPolys F))) = Bags (card (nonConstantPolys F)) by ORDERS_1:12;
then B: BagOrder (card (nonConstantPolys F)) linearly_orders Support (Poly (m,p)) by ORDERS_1:37, ORDERS_1:38;
then C: rng (SgmX ((BagOrder (card (nonConstantPolys F))),(Support (Poly (m,p))))) = {b} by AS, PRE_POLY:def 2;
D: len y = card {b} by AS, A, B, PRE_POLY:11
.= 1 by CARD_1:30 ;
then F: y = <*(y . 1)*> by FINSEQ_1:40;
len (SgmX ((BagOrder (card (nonConstantPolys F))),(Support (Poly (m,p))))) = card {b} by AS, B, PRE_POLY:11
.= 1 by CARD_1:30 ;
then H: SgmX ((BagOrder (card (nonConstantPolys F))),(Support (Poly (m,p)))) = <*b*> by C, FINSEQ_1:39;
then dom (SgmX ((BagOrder (card (nonConstantPolys F))),(Support (Poly (m,p))))) = Seg 1 by FINSEQ_1:38;
then I: 1 in dom (SgmX ((BagOrder (card (nonConstantPolys F))),(Support (Poly (m,p))))) ;
J: (SgmX ((BagOrder (card (nonConstantPolys F))),(Support (Poly (m,p))))) . 1 = b by H;
then G: eval (((SgmX ((BagOrder (card (nonConstantPolys F))),(Support (Poly (m,p))))) /. 1),x) = eval (b,x) by I, PARTFUN1:def 6;
((Poly (m,p)) * (SgmX ((BagOrder (card (nonConstantPolys F))),(Support (Poly (m,p)))))) . 1 = p . (b . m) by J, AS1, I, FUNCT_1:13;
then y . 1 = (In ((p . (b . m)),E)) * (eval (b,x)) by G, D, A;
then Z: Ext_eval ((Poly (m,p)),x) = (In ((p . (b . m)),E)) * (eval (b,x)) by A, F, RLVECT_1:44;
Y: m in dom x by AS0, FUNCT_2:def 1;
then ( x . m in rng x & rng x c= the carrier of E ) by RELAT_1:def 19, FUNCT_1:3;
then reconsider a = x . m as Element of E ;
per cases ( p = 0_. F or p <> 0_. F ) ;
suppose A1: p = 0_. F ; :: thesis: Ext_eval ((Poly (m,p)),x) = Ext_eval (p,(x /. m))
now :: thesis: for o being object holds not o in Support (Poly (m,p))
let o be object ; :: thesis: not o in Support (Poly (m,p))
assume B: o in Support (Poly (m,p)) ; :: thesis: contradiction
Support (Poly (m,p)) c= {(EmptyBag (card (nonConstantPolys F)))} \/ { b where b is bag of card (nonConstantPolys F) : support b = {m} } by Th14c;
per cases then ( o in {(EmptyBag (card (nonConstantPolys F)))} or o in { b where b is bag of card (nonConstantPolys F) : support b = {m} } ) by B, XBOOLE_0:def 3;
suppose o in { b where b is bag of card (nonConstantPolys F) : support b = {m} } ; :: thesis: contradiction
then consider b being bag of card (nonConstantPolys F) such that
D: ( o = b & support b = {m} ) ;
(Poly (m,p)) . b = p . (b . m) by D, defPg;
hence contradiction by D, B, A1, POLYNOM1:def 4; :: thesis: verum
end;
end;
end;
then Support (Poly (m,p)) = {} by XBOOLE_0:def 1;
then Poly (m,p) = 0_ ((card (nonConstantPolys F)),F) by YY;
hence Ext_eval ((Poly (m,p)),x) = 0. E by ev0
.= Ext_eval (p,(x /. m)) by A1, ALGNUM_1:13 ;
:: thesis: verum
end;
suppose p <> 0_. F ; :: thesis: Ext_eval ((Poly (m,p)),x) = Ext_eval (p,(x /. m))
b in Support (Poly (m,p)) by AS, TARSKI:def 1;
then H3: p . (b . m) <> 0. F by POLYNOM1:def 3, AS1;
reconsider i = b . m as Element of NAT ;
AA: now :: thesis: for o being object st o in Support p holds
o = b . m
let o be object ; :: thesis: ( o in Support p implies o = b . m )
assume H0: o in Support p ; :: thesis: o = b . m
then reconsider u = o as Element of NAT ;
H4: p . u <> 0. F by H0, POLYNOM1:def 3;
H5: now :: thesis: ( u <> i implies card (Support (Poly (m,p))) >= 2 )
assume H6: u <> i ; :: thesis: card (Support (Poly (m,p))) >= 2
for o being object st o in {m} holds
o in card (nonConstantPolys F) by AS0, TARSKI:def 1;
then reconsider S = {m} as finite Subset of (card (nonConstantPolys F)) by TARSKI:def 3;
set b1 = (S,u) -bag ;
set b2 = (S,i) -bag ;
J: m in S by TARSKI:def 1;
per cases ( u = 0 or u <> 0 ) ;
suppose H7: u = 0 ; :: thesis: card (Support (Poly (m,p))) >= 2
then H12: (S,u) -bag = EmptyBag (card (nonConstantPolys F)) by UPROOTS:9;
then H8: (Poly (m,p)) . ((S,u) -bag) = p . u by H7, defPg;
support ((S,i) -bag) = S by H7, H6, UPROOTS:8;
then H9: (Poly (m,p)) . ((S,i) -bag) = p . (((S,i) -bag) . m) by defPg
.= p . i by J, UPROOTS:7 ;
((S,i) -bag) . m = i by J, UPROOTS:7;
then (S,i) -bag <> EmptyBag (card (nonConstantPolys F)) by H7, H6, PBOOLE:5;
then H10: card {((S,u) -bag),((S,i) -bag)} = 2 by H12, CARD_2:57;
{((S,u) -bag),((S,i) -bag)} c= Support (Poly (m,p))
proof
now :: thesis: for o being object st o in {((S,u) -bag),((S,i) -bag)} holds
o in Support (Poly (m,p))
let o be object ; :: thesis: ( o in {((S,u) -bag),((S,i) -bag)} implies b1 in Support (Poly (m,p)) )
assume o in {((S,u) -bag),((S,i) -bag)} ; :: thesis: b1 in Support (Poly (m,p))
per cases then ( o = (S,u) -bag or o = (S,i) -bag ) by TARSKI:def 2;
end;
end;
hence {((S,u) -bag),((S,i) -bag)} c= Support (Poly (m,p)) ; :: thesis: verum
end;
hence card (Support (Poly (m,p))) >= 2 by H10, NAT_1:43; :: thesis: verum
end;
suppose H7a: u <> 0 ; :: thesis: card (Support (Poly (m,p))) >= 2
then support ((S,u) -bag) = S by UPROOTS:8;
then H9: (Poly (m,p)) . ((S,u) -bag) = p . (((S,u) -bag) . m) by defPg
.= p . u by J, UPROOTS:7 ;
per cases ( i = 0 or i <> 0 ) ;
suppose H11: i = 0 ; :: thesis: card (Support (Poly (m,p))) >= 2
then H12: (S,i) -bag = EmptyBag (card (nonConstantPolys F)) by UPROOTS:9;
then H8: (Poly (m,p)) . ((S,i) -bag) = p . i by H11, defPg;
((S,u) -bag) . m = u by J, UPROOTS:7;
then (S,u) -bag <> EmptyBag (card (nonConstantPolys F)) by H7a, PBOOLE:5;
then H10: card {((S,u) -bag),((S,i) -bag)} = 2 by H12, CARD_2:57;
{((S,u) -bag),((S,i) -bag)} c= Support (Poly (m,p))
proof
now :: thesis: for o being object st o in {((S,u) -bag),((S,i) -bag)} holds
o in Support (Poly (m,p))
let o be object ; :: thesis: ( o in {((S,u) -bag),((S,i) -bag)} implies b1 in Support (Poly (m,p)) )
assume o in {((S,u) -bag),((S,i) -bag)} ; :: thesis: b1 in Support (Poly (m,p))
per cases then ( o = (S,u) -bag or o = (S,i) -bag ) by TARSKI:def 2;
end;
end;
hence {((S,u) -bag),((S,i) -bag)} c= Support (Poly (m,p)) ; :: thesis: verum
end;
hence card (Support (Poly (m,p))) >= 2 by H10, NAT_1:43; :: thesis: verum
end;
suppose i <> 0 ; :: thesis: card (Support (Poly (m,p))) >= 2
then support ((S,i) -bag) = S by UPROOTS:8;
then H9a: (Poly (m,p)) . ((S,i) -bag) = p . (((S,i) -bag) . m) by defPg
.= p . i by J, UPROOTS:7 ;
( ((S,u) -bag) . m = u & ((S,i) -bag) . m = i ) by J, UPROOTS:7;
then H10: card {((S,u) -bag),((S,i) -bag)} = 2 by H6, CARD_2:57;
{((S,u) -bag),((S,i) -bag)} c= Support (Poly (m,p))
proof
now :: thesis: for o being object st o in {((S,u) -bag),((S,i) -bag)} holds
o in Support (Poly (m,p))
let o be object ; :: thesis: ( o in {((S,u) -bag),((S,i) -bag)} implies b1 in Support (Poly (m,p)) )
assume o in {((S,u) -bag),((S,i) -bag)} ; :: thesis: b1 in Support (Poly (m,p))
per cases then ( o = (S,u) -bag or o = (S,i) -bag ) by TARSKI:def 2;
end;
end;
hence {((S,u) -bag),((S,i) -bag)} c= Support (Poly (m,p)) ; :: thesis: verum
end;
hence card (Support (Poly (m,p))) >= 2 by H10, NAT_1:43; :: thesis: verum
end;
end;
end;
end;
end;
card (Support (Poly (m,p))) = 1 by AS, CARD_1:30;
hence o = b . m by H5; :: thesis: verum
end;
consider G being FinSequence of E such that
A1: ( Ext_eval (p,a) = Sum G & len G = len p & ( for n being Element of NAT st n in dom G holds
G . n = (In ((p . (n -' 1)),E)) * ((power E) . (a,(n -' 1))) ) ) by ALGNUM_1:def 1;
A2: now :: thesis: for j being Element of NAT st j in dom G & j <> i + 1 holds
0. E = G /. j
let j be Element of NAT ; :: thesis: ( j in dom G & j <> i + 1 implies 0. E = G /. j )
assume A3: ( j in dom G & j <> i + 1 ) ; :: thesis: 0. E = G /. j
H: F is Subring of E by FIELD_4:def 1;
now :: thesis: not j -' 1 = iend;
then not j -' 1 in Support p by AA;
then p . (j -' 1) = 0. F by POLYNOM1:def 4
.= 0. E by H, C0SP1:def 3 ;
then (In ((p . (j -' 1)),E)) * ((power E) . (a,(j -' 1))) = 0. E ;
hence 0. E = G . j by A1, A3
.= G /. j by A3, PARTFUN1:def 6 ;
:: thesis: verum
end;
( 1 <= i + 1 & i + 1 <= len p ) by H3, NAT_1:11, NAT_1:13, ALGSEQ_1:8;
then i + 1 in Seg (len G) by A1;
then A3: i + 1 in dom G by FINSEQ_1:def 3;
A5: (i + 1) -' 1 = (i + 1) - 1 by NAT_1:11, XREAL_1:233;
A4: Ext_eval (p,a) = G /. (i + 1) by A3, A2, A1, POLYNOM2:3
.= G . (i + 1) by A3, PARTFUN1:def 6
.= (In ((p . i),E)) * ((power E) . (a,i)) by A5, A3, A1 ;
per cases ( support b = {} or support b <> {} ) ;
suppose support b = {} ; :: thesis: Ext_eval ((Poly (m,p)),x) = Ext_eval (p,(x /. m))
then A6: b = EmptyBag (card (nonConstantPolys F)) by PRE_POLY:81;
then A5: ( b . m = 0 & eval (b,x) = 1. E ) by PBOOLE:5, POLYNOM2:14;
thus Ext_eval ((Poly (m,p)),x) = (In ((p . i),E)) * (1_ E) by Z, A6, POLYNOM2:14
.= (In ((p . i),E)) * ((power E) . (a,i)) by A5, GROUP_1:def 7
.= Ext_eval (p,(x /. m)) by A4, Y, PARTFUN1:def 6 ; :: thesis: verum
end;
suppose support b <> {} ; :: thesis: Ext_eval ((Poly (m,p)),x) = Ext_eval (p,(x /. m))
then b <> EmptyBag (card (nonConstantPolys F)) ;
then A6: ( not b in {(EmptyBag (card (nonConstantPolys F)))} & b in Support (Poly (m,p)) ) by AS, TARSKI:def 1;
Support (Poly (m,p)) c= {(EmptyBag (card (nonConstantPolys F)))} \/ { b where b is bag of card (nonConstantPolys F) : support b = {m} } by Th14c;
then b in { b where b is bag of card (nonConstantPolys F) : support b = {m} } by A6, XBOOLE_0:def 3;
then consider b1 being bag of card (nonConstantPolys F) such that
A5: ( b1 = b & support b1 = {m} ) ;
thus Ext_eval ((Poly (m,p)),x) = (In ((p . i),E)) * ((power E) . (a,i)) by A5, Z, POLYNOM2:15
.= Ext_eval (p,(x /. m)) by A4, Y, PARTFUN1:def 6 ; :: thesis: verum
end;
end;
end;
end;