reserve i,j,k,l,m,n for Nat,
  D for non empty set,
  f for FinSequence of D;
reserve X for compact Subset of TOP-REAL 2;
reserve r for Real;
reserve f for non trivial FinSequence of TOP-REAL 2;
reserve f for non constant standard special_circular_sequence;
reserve z for clockwise_oriented non constant standard
  special_circular_sequence;

theorem
  z/.1 = N-min L~z & N-max L~z <> E-max L~z implies (N-max L~z)..z < (
  E-max L~z)..z
proof
  set i1 = (N-max L~z)..z, i2 = (E-max L~z)..z, j = (S-max L~z)..z;
  assume that
A1: z/.1 = N-min L~z and
A2: N-max L~z <> E-max L~z & i1 >= i2;
  (N-min L~z)..z = 1 by A1,FINSEQ_6:43;
  then
A3: 1 < i2 by A1,Lm4;
  (N-min L~z)`2 = N-bound L~z & (S-max L~z)`2 = S-bound L~z by EUCLID:52;
  then
A4: N-min L~z <> S-max L~z by TOPREAL5:16;
A5: S-max L~z in rng z by Th42;
  then
A6: j in dom z by FINSEQ_4:20;
  then
A7: z/.j = z.j by PARTFUN1:def 6
    .= S-max L~z by A5,FINSEQ_4:19;
A8: j <= len z by A6,FINSEQ_3:25;
  z/.len z = z/.1 by FINSEQ_6:def 1;
  then
A9: j < len z by A1,A8,A7,A4,XXREAL_0:1;
A10: N-max L~z in rng z by Th40;
  then
A11: i1 in dom z by FINSEQ_4:20;
  then
A12: 1 <= i1 by FINSEQ_3:25;
A13: z/.i1 = z.i1 by A11,PARTFUN1:def 6
    .= N-max L~z by A10,FINSEQ_4:19;
A14: j > i1 by A1,Lm5;
  then reconsider h = mid(z,j,i1) as S-Sequence_in_R2 by A12,A9,Th37;
  h/.1 = S-max L~z by A11,A6,A7,Th8;
  then
A15: (h/.1)`2 = S-bound L~z by EUCLID:52;
  h/.len h = z/.i1 by A11,A6,Th9;
  then
A16: (h/.len h)`2 = N-bound L~z by A13,EUCLID:52;
  h is_in_the_area_of z by A11,A6,Th21,Th22;
  then
A17: h is_a_v.c._for z by A15,A16;
A18: 1 <= j by A6,FINSEQ_3:25;
A19: i1 <= len z by A11,FINSEQ_3:25;
A20: E-max L~z in rng z by Th46;
  then
A21: i2 in dom z by FINSEQ_4:20;
  then
A22: 1 <= i2 & i2 <= len z by FINSEQ_3:25;
  z/.i2 = z.i2 by A21,PARTFUN1:def 6
    .= E-max L~z by A20,FINSEQ_4:19;
  then
A23: i1 > i2 by A2,A13,XXREAL_0:1;
  then i2 < len z by A19,XXREAL_0:2;
  then reconsider M = mid(z,1,i2) as S-Sequence_in_R2 by A3,Th38;
A24: len M >= 2 by TOPREAL1:def 8;
A25: 1 in dom z by FINSEQ_5:6;
  then
A26: M/.len M = z/.i2 by A21,Th9
    .= E-max L~z by A20,FINSEQ_5:38;
A27: len h >= 2 & L~M misses L~h by A14,A9,A3,A23,Th48,TOPREAL1:def 8;
  per cases;
  suppose
A28: NW-corner L~z = N-min L~z;
    M/.1 = z/.1 by A25,A21,Th8;
    then
A29: (M/.1)`1 = W-bound L~z by A1,A28,EUCLID:52;
    M is_in_the_area_of z & (M/.len M)`1 = E-bound L~z by A25,A21,A26,Th21,Th22
,EUCLID:52;
    then M is_a_h.c._for z by A29;
    hence contradiction by A17,A24,A27,Th29;
  end;
  suppose
    NW-corner L~z <> N-min L~z;
    then reconsider g = <*NW-corner L~z*>^M as S-Sequence_in_R2 by A1,A25,A21
,Th66;
A30: len g >= 2 & L~g = L~M \/ LSeg(NW-corner L~z,M/.1) by SPPOL_2:20
,TOPREAL1:def 8;
    g/.1 = NW-corner L~z by FINSEQ_5:15;
    then
A31: (g/.1)`1 = W-bound L~z by EUCLID:52;
    len M = i2 -' 1 + 1 by A22,FINSEQ_6:186
      .= i2 by A3,XREAL_1:235;
    then len M >= 1+1 by A3,NAT_1:13;
    then
A32: M/.1 in L~M by JORDAN3:1;
    len M in dom M & len g = len M + len<*NW-corner L~z*> by FINSEQ_1:22
,FINSEQ_5:6;
    then g/.len g = M/.len M by FINSEQ_4:69
      .= z/.i2 by A25,A21,Th9
      .= E-max L~z by A20,FINSEQ_5:38;
    then
A33: (g/.len g)`1 = E-bound L~z by EUCLID:52;
    M/.1 = z/.1 & LSeg(M/.1,NW-corner L~z) /\ L~h c= LSeg(M/.1,NW-corner
    L~z) /\ L~z by A25,A12,A19,A18,A8,A21,Th8,JORDAN4:35,XBOOLE_1:26;
    then
A34: LSeg(M/.1,NW-corner L~z) /\ L~h c= {M/.1} by A1,PSCOMP_1:43;
    M is_in_the_area_of z & <*NW-corner L~z*> is_in_the_area_of z by A25,A21
,Th21,Th22,Th26;
    then g is_in_the_area_of z by Th24;
    then g is_a_h.c._for z by A31,A33;
    hence contradiction by A17,A27,A30,A34,A32,Th29,ZFMISC_1:125;
  end;
end;
