reserve a,b for object, I,J for set;
reserve b for bag of I;
reserve R for asymmetric transitive non empty RelStr,
  a,b,c for bag of the carrier of R,
  x,y,z for Element of R;
reserve p for partition of b-'a, q for partition of b;
reserve J for set, m for bag of I;

theorem Th36:
  q is ordered & q = <*a*>^p & c in rng p & c.x > 0 implies
  ex y st a.y > 0 & x <= y
  proof
    assume Z0: q is ordered;
    assume Z1: q = <*a*>^p;
    assume c in rng p;
    then consider i being object such that
A1: i in dom p & c = p.i by FUNCT_1:def 3;
    reconsider i as Nat by A1;
A2: 1 <= i & p.i = p/.i by A1,FINSEQ_3:25,PARTFUN1:def 6;
    defpred P[Nat] means $1 in dom p implies for x st (p/.$1).x > 0
    ex y st a.y > 0 & x <= y;
A5: len <*a*> = 1 & dom <*a*> c= dom q by Z1,FINSEQ_1:26,40;
A3: P[1]
    proof assume
A4:   1 in dom p;
      then
A6:   1+1 in dom q by Z1,A5,FINSEQ_1:28;
B0:   1 in dom <*a*> by A5,FINSEQ_3:25;
      then 1 in dom q & q.1 = <*a*>.1 = a by Z1,A5,FINSEQ_1:def 7;
      then q/.1 = a & q/.2 = q.2 = p.1 = p/.1
      by Z1,A4,A5,A6,FINSEQ_1:def 7,PARTFUN1:def 6;
      hence thesis by Z0,A6,A5,B0;
    end;
A8: for i being Nat st i >= 1 & P[i] holds P[i+1]
    proof let i be Nat; assume
B1:   i >= 1 & P[i] & i+1 in dom p;
      then i < i+1 <= len p by NAT_1:13,FINSEQ_3:25;
      then
BB:   i <= len p by XXREAL_0:2;
      then
B3:   i in dom p by B1,FINSEQ_3:25;
B4:   1+i in dom q & 1+i+1 in dom q by Z1,A5,B1,BB,FINSEQ_3:25,FINSEQ_1:28;
B5:   q/.(1+i) = q.(1+i) = p.i = p/.i & q/.(1+i+1) = q.(1+i+1) = p.(i+1)
      = p/.(i+1) by Z1,A5,B1,B3,FINSEQ_1:28,def 7,PARTFUN1:def 6;
      let x; assume
      (p/.(i+1)).x > 0;
      then consider y such that
B6:   (p/.i).y > 0 & x <= y by Z0,B4,B5;
      consider z such that
B7:   a.z > 0 & y <= z by BB,B1,FINSEQ_3:25,B6;
      take z;
      thus a.z > 0 & x <= z by B6,B7,ORDERS_2:3;
    end;
    for i being Nat st i >= 1 holds P[i] from NAT_1:sch 8(A3,A8);
    hence thesis by A1,A2;
  end;
