
theorem
for F being Field,
    E being FieldExtension of F
for a being Element of E
holds a is F-algebraic iff FAdj(F,{a}) is F-finite
proof
let F be Field, E be FieldExtension of F; let a be Element of E;
now assume AS: FAdj(F,{a}) is F-finite;
then reconsider n = deg(FAdj(F,{a}),F) as Element of NAT by ORDINAL1:def 12;
H: n = dim VecSp(FAdj(F,{a}),F) by FIELD_4:def 7;
per cases;
  suppose ex i,j being Element of NAT st i < j & j <= n & a|^i = a|^j;
    then consider i,j being Element of NAT such that
    U:  i < j & j <= n & a|^i = a|^j;
    set p1 = <%0.F,1.F%>`^j, p2 = <%0.F,1.F%>`^i;
    set p = p1 - p2;
    now assume p = 0_.(F);
      then 0.F = p.j
              .= p1.j - p2.j by POLYNOM3:27
              .= 1.F - p2.j by help1
              .= 1.F - 0.F by U,help2;
      hence contradiction;
      end;
    then reconsider p as non zero Polynomial of F by UPROOTS:def 5;
    per cases;
    suppose T: i = 0; then
      W: a|^i = 1_E by BINOM:8;
      Ext_eval(p,a) = Ext_eval(p1,a) - Ext_eval(p2,a) by exevalminus2
                   .= Ext_eval(p1,a) - Ext_eval(1_.(F),a) by T,POLYNOM5:15
                   .= Ext_eval(p1,a) - 1.E by FIELD_4:23
                   .= a|^j - 1.E by U,help3
                   .= 0.E by W,U,RLVECT_1:15;
      hence a is F-algebraic by alg00;
      end;
    suppose T: i is non zero;
      Ext_eval(p,a) = Ext_eval(p1,a) - Ext_eval(p2,a) by exevalminus2
                   .= a|^j - Ext_eval(p2,a) by U,help3
                   .= a|^j - a|^i by T,help3
                   .= 0.E by U,RLVECT_1:15;
      hence a is F-algebraic by alg00;
      end;
    end;
  suppose U: not ex i,j being Element of NAT st i < j & j <= n & a|^i = a|^j;
    set M = {a|^i where i is Element of NAT : i <= n},
        V = VecSp(FAdj(F,{a}),F);
    X: {a} is Subset of FAdj(F,{a}) by FAt;
    a in {a} by TARSKI:def 1; then
    reconsider a1 = a as Element of FAdj(F,{a}) by X;
    I: M c= the carrier of VecSp(FAdj(F,{a}),F)
       proof
       now let o be object;
        assume o in M;
        then consider i being Element of NAT such that
        H: o = a|^i & i <= n;
        I: the carrier of VecSp(FAdj(F,{a}),F) = the carrier of FAdj(F,{a})
           by FIELD_4:def 6;
        FAdj(F,{a}) is Subring of E by FIELD_5:12; then
        a|^i = a1|^i by pr5;
        hence o in the carrier of VecSp(FAdj(F,{a}),F) by H,I;
        end;
       hence thesis;
      end;
    M is finite
      proof
      deffunc F(Nat) = a|^($1);
      defpred P[Nat] means $1 <= n;
      D: {F(i) where i is Nat: i<=n & P[i]} is finite from FINSEQ_1:sch 6;
      E: now let o be object;
         assume o in {F(i) where i is Nat: i<=n & P[i]};
         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;
         end;
      now let o be object;
         assume o in M; then
         consider i being Element of NAT such that E1: o = a|^i & i <= n;
         thus o in {F(i) where i is Nat: i<=n & P[i]} by E1;
         end;
      hence thesis by D,E,TARSKI:2;
      end; then
    reconsider M as finite Subset of VecSp(FAdj(F,{a}),F) by I;
    card M = n + 1
      proof
      set m = n + 1;
      defpred P[object,object] means
        ex x being Element of Seg m,
           y being Element of NAT st $1 = x & y = x-1 & $2 = a|^y;
      B1: for x,y1,y2 being object st x in Seg m & P[x,y1] & P[x,y2]
          holds y1 = y2;
      B2: now let x be object;
          assume B3: x in Seg m;
          then reconsider i = x as Element of Seg m;
          1 <= i by B3,FINSEQ_1:1; then
          reconsider z = i - 1 as Element of NAT by INT_1:3;
          thus ex y being object st P[x,y]
            proof
            take a|^z;
            thus thesis;
            end;
          end;
      consider f being Function such that
      C: dom f = Seg m &
         for x being object st x in Seg m holds P[x,f.x]
         from FUNCT_1:sch 2(B1,B2);
      A1: now let o be object;
          assume o in M;
          then consider i being Element of NAT such that
          A2: o = a|^i & i <= n;
          A3: 0 + 1 <= i + 1 & i + 1 <= n+1 by A2,XREAL_1:6; then
          reconsider x = i + 1 as Element of Seg m by FINSEQ_1:1;
          A4: x in Seg m by FINSEQ_1:1,A3;
          P[x,f.x] by C,FINSEQ_1:1,A3;
          hence o in rng f by A4,C,A2,FUNCT_1:def 3;
          end;
      now let o be object;
         assume o in rng f;
         then consider u being object such that
         A2: u in dom f & o = f.u by FUNCT_1:def 3;
         P[u,f.u] by C,A2; then
         consider x being Element of Seg m, y being Element of NAT such that
         A3: u = x & y = x-1 & f.x = a|^y;
         m in Seg m by FINSEQ_1:3; then
         1 <= x & x <= m by FINSEQ_1:1; then
         y < m - 1 + 1 by A3,XREAL_1:9,NAT_1:13; then
         y <= n by NAT_1:13;
         hence o in M by A2,A3;
         end;
      then A: rng f = M by A1,TARSKI:2;
      now assume not f is one-to-one;
        then consider x1,x2 being object such that
        A1: x1 in dom f & x2 in dom f & f.x1 = f.x2 & x1 <> x2;
        consider n1 being Element of Seg m,
                 y1 being Element of NAT such that
        A2: x1 = n1 & y1 = n1-1 & f.x1 = a|^y1 by A1,C;
        consider n2 being Element of Seg m,
                 y2 being Element of NAT such that
        A3: x2 = n2 & y2 = n2-1 & f.x2 = a|^y2 by A1,C;
        n1 <= m & n2 <= m by C,A1,FINSEQ_1:1; then
        A4: y1 < m - 1 + 1 & y2 < m - 1 + 1 by A3,A2,XREAL_1:9,NAT_1:13;
        A5: y1 <> y2 by A1,A2,A3;
        A6: y1 <= n & y2 <= n by A4,NAT_1:13;
        per cases by A5,XXREAL_0:1;
        suppose y1 < y2;
          hence contradiction by U,A1,A2,A3,A6;
          end;
        suppose y1 > y2;
          hence contradiction by U,A1,A2,A3,A6;
          end;
        end;
      then card M = card(Seg m) by A,C,CARD_1:70 .= m by FINSEQ_1:57;
      hence thesis;
      end;
    then card M > n by NAT_1:13;
    then M is linearly-dependent by H,AS,lemlin;
    then consider l being Linear_Combination of M such that
    D1: Sum(l) = 0.V & Carrier(l) <> {} by VECTSP_7:def 1;
    set z = the Element of Carrier(l);
    consider v being Element of V such that
    D2: z = v & l.v <> 0.F by D1,VECTSP_6:1;
    H1: M = {a1|^i where i is Element of NAT : i <= n}
        proof
        V: FAdj(F,{a}) is Subring of E by FIELD_5:12;
        A: now let o be object;
           assume o in M; then
           consider i being Element of NAT such that B: o = a|^i & i <= n;
           a|^i = a1|^i by V,pr5;
           hence o in {a1|^i where i is Element of NAT : i <= n} by B;
           end;
        now let o be object;
           assume o in {a1|^i where i is Element of NAT : i <= n}; then
           consider i being Element of NAT such that B: o = a1|^i & i <= n;
           a|^i = a1|^i by V,pr5;
           hence o in M by B;
           end;
        hence thesis by A,TARSKI:2;
        end;
    H2: for i,j being Element of NAT st i < j & j <= n holds a1|^i <> a1|^j
        proof
        let i,j be Element of NAT;
        assume W: i < j & j <= n;
        V: FAdj(F,{a}) is Subring of E by FIELD_5:12;
        assume a1|^i = a1|^j;
        then a|^i = a1|^j by V,pr5 .= a|^j by V,pr5;
        hence thesis by W,U;
        end;
    I: E is FAdj(F,{a})-extending by FIELD_4:7;
    Carrier(l) c= M by VECTSP_6:def 4; then
    z in M by D1; then
    consider i being Element of NAT such that D3: z = a|^i & i <= n;
    FAdj(F,{a}) is Subring of E by FIELD_5:12; then
    D3a: a|^i = a1|^i by pr5;
    consider pM being Polynomial of F such that
    D4a: deg pM <= n &
         for i being Element of NAT st i <= n holds pM.i = l.(a1|^i)
         by lembasx2;
    pM.i <> 0.F by D3a,D3,D2,D4a;
    then pM <> 0_.(F); then
    reconsider pM as non zero Polynomial of F by UPROOTS:def 5;
    reconsider pMC = pM as Element of the carrier of Polynom-Ring F
      by POLYNOM3:def 10;
    Ext_eval(pMC,a) = Ext_eval(pMC,a1) by I,lemma7
                   .= 0.V by H1,H2,D1,D4a,lembasx1
                   .= 0.FAdj(F,{a}) by FIELD_4:def 6
                   .= 0.E by dFA;
    hence a is F-algebraic by alg00;
    end;
end;
hence thesis;
end;
