
theorem Th28: :: Prop 4.42 (i) -> (ii)
  for R being non empty RelStr st R is Dickson
  for f being sequence of R ex i,j being Nat st i < j & f.i <= f.j
proof
  let R be non empty RelStr such that
A1: R is Dickson;
  let f be sequence of R;
  set N = rng f;
A2: dom f = NAT by FUNCT_2:def 1;
  consider B being set such that
A3: B is_Dickson-basis_of N,R and
A4: B is finite by A1;
  reconsider B as finite non empty set by A3,A4,Th25;
  defpred P[set] means not contradiction;
  deffunc F(set) = f mindex $1;
  set BI = { F(b) where b is Element of B : P[b] };
A5: BI is finite from PRE_CIRC:sch 1;
  set b = the Element of B;
A6: f mindex b in BI;
  now
    let x be object;
    assume x in BI;
    then ex b being Element of B st ( x = f mindex b);
    hence x in NAT;
  end;
  then reconsider BI as finite non empty Subset of NAT by A5,A6,TARSKI:def 3;
  reconsider mB = max BI as Element of NAT by ORDINAL1:def 12;
  set j = mB+1;
  reconsider fj = f.j as Element of R;
  fj in N by A2,FUNCT_1:3;
  then consider b being Element of R such that
A7: b in B and
A8: b <= fj by A3;
A9: B c= N by A3;
  take i = f mindex b;
  take j;
  i in BI by A7;
  then i <= max(BI) by XXREAL_2:def 8;
  hence i < j by NAT_1:13;
  dom f = NAT by NORMSP_1:12;
  hence thesis by A7,A8,A9,Def11;
end;
