reserve C for Simple_closed_curve,
  P for Subset of TOP-REAL 2,
  p for Point of TOP-REAL 2,
  n for Element of NAT;
reserve D for compact with_the_max_arc Subset of TOP-REAL 2;

theorem
  not (LMP C in Upper_Arc C & UMP C in Upper_Arc C)
proof
  assume that
A1: LMP C in Upper_Arc C and
A2: UMP C in Upper_Arc C;
A3: Upper_Arc(C) /\ Lower_Arc(C) = {W-min(C),E-max(C)} by JORDAN6:def 9;
  set s = |[ (W-bound C + E-bound C) / 2, S-bound C ]|;
  set S2 = LSeg(LMP C, s);
A4: Upper_Arc C is_an_arc_of W-min C,E-max C by JORDAN6:def 8;
  Lower_Arc C is_an_arc_of E-max C,W-min C by JORDAN6:def 9;
  then
A5: Lower_Arc C is_an_arc_of W-min C,E-max C by JORDAN5B:14;
A6: UMP C in C & LMP C in C by Th30,Th31;
A7: (UMP C)`1 = (W-bound C + E-bound C)/2 by EUCLID:52;
  set n = |[ (W-bound C + E-bound C) / 2, N-bound C ]|;
  set S1 = LSeg(n, UMP C);
A8: Upper_Arc C c= C by JORDAN6:61;
A9: n`2 = N-bound C by EUCLID:52;
  n`1 = (W-bound C + E-bound C)/2 by EUCLID:52;
  then
A10: S1 is vertical by A7,SPPOL_1:16;
A11: S1 misses S2 by Th42;
A12: UMP C in S1 by RLTOPSP1:68;
A13: (W-min C)`1 = W-bound C & (E-max C)`1 = E-bound C by EUCLID:52;
A14: Lower_Arc C c= C by JORDAN6:61;
  then
A15: for p being Point of TOP-REAL 2 st p in Lower_Arc C holds (W-min C)`1<=
  p`1 & p`1<=(E-max C)`1 by A13,PSCOMP_1:24;
A16: UMP C <> E-max C by Th25;
A17: UMP C <> W-min C by Th24;
A18: now
    assume UMP C in Lower_Arc C;
    then UMP C in Upper_Arc C /\ Lower_Arc C by A2,XBOOLE_0:def 4;
    hence contradiction by A17,A16,A3,TARSKI:def 2;
  end;
A19: W-bound C < E-bound C by SPRECT_1:31;
A20: Lower_Arc C misses S1
  proof
A21: S1 /\ C = {UMP C} by Th34;
    assume Lower_Arc C meets S1;
    then consider x being object such that
A22: x in Lower_Arc C and
A23: x in S1 by XBOOLE_0:3;
    x in S1 /\ C by A14,A22,A23,XBOOLE_0:def 4;
    then
A24: x = UMP C by A21,TARSKI:def 1;
    then x in Lower_Arc C /\ Upper_Arc C by A2,A22,XBOOLE_0:def 4;
    hence contradiction by A17,A16,A3,A24,TARSKI:def 2;
  end;
A25: LMP C <> E-max C by Th27;
A26: LMP C <> W-min C by Th26;
A27: now
    assume LMP C in Lower_Arc C;
    then LMP C in Upper_Arc C /\ Lower_Arc C by A1,XBOOLE_0:def 4;
    hence contradiction by A26,A25,A3,TARSKI:def 2;
  end;
A28: LMP C <> UMP C by Th37;
A29: (LMP C)`1 = (W-bound C + E-bound C)/2 by EUCLID:52;
A30: Lower_Arc C misses S2
  proof
A31: S2 /\ C = {LMP C} by Th35;
    assume Lower_Arc C meets S2;
    then consider x being object such that
A32: x in Lower_Arc C and
A33: x in S2 by XBOOLE_0:3;
    x in S2 /\ C by A14,A32,A33,XBOOLE_0:def 4;
    then
A34: x = LMP C by A31,TARSKI:def 1;
    then x in Lower_Arc C /\ Upper_Arc C by A1,A32,XBOOLE_0:def 4;
    hence contradiction by A26,A25,A3,A34,TARSKI:def 2;
  end;
  s`1 = (W-bound C + E-bound C)/2 by EUCLID:52;
  then
A35: S2 is vertical by A29,SPPOL_1:16;
A36: LMP C in S2 by RLTOPSP1:68;
A37: s`2 = S-bound C by EUCLID:52;
  then
A38: for p being Point of TOP-REAL 2 st p in Lower_Arc C holds s`2<=p`2 & p
  `2<=n`2 by A14,A9,PSCOMP_1:24;
  per cases by A6,JORDAN16:7;
  suppose
A39: LE LMP C, UMP C, C;
    set S = Segment(Upper_Arc C, W-min C, E-max C, LMP C, UMP C);
A40: S c= Upper_Arc C by JORDAN16:2;
    then
A41: S c= C by A8;
A42: now
      let p be Point of TOP-REAL 2;
      assume
A43:  p in S1 \/ S \/ S2;
      per cases by A43,Lm3;
      suppose
        p in S1;
        then p`1 = (UMP C)`1 by A10,A12,SPPOL_1:def 3;
        hence (W-min C)`1<=p`1 & p`1<=(E-max C)`1 by A7,A13,A19,XREAL_1:226;
      end;
      suppose
        p in S;
        hence (W-min C)`1<=p`1 & p`1<=(E-max C)`1 by A13,A41,PSCOMP_1:24;
      end;
      suppose
        p in S2;
        then p`1 = (LMP C)`1 by A35,A36,SPPOL_1:def 3;
        hence (W-min C)`1<=p`1 & p`1<=(E-max C)`1 by A29,A13,A19,XREAL_1:226;
      end;
    end;
A44: now
      let p be Point of TOP-REAL 2;
      assume
A45:  p in S1 \/ S \/ S2;
      per cases by A45,Lm3;
      suppose
A46:    p in S1;
A47:    s`2<=(UMP C)`2 by A37,Th38;
A48:    (UMP C)`2<=n`2 by A9,Th39;
        then (UMP C)`2<=p`2 by A46,TOPREAL1:4;
        hence s`2<=p`2 & p`2<=n`2 by A46,A48,A47,TOPREAL1:4,XXREAL_0:2;
      end;
      suppose
        p in S;
        hence s`2<=p`2 & p`2<=n`2 by A37,A9,A41,PSCOMP_1:24;
      end;
      suppose
A49:    p in S2;
A50:    s`2<=(LMP C)`2 by A37,Th40;
        hence s`2<=p`2 by A49,TOPREAL1:4;
        p`2<=(LMP C)`2 by A49,A50,TOPREAL1:4;
        hence p`2<=n`2 by A9,Th41,XXREAL_0:2;
      end;
    end;
A51: S c= Upper_Arc C \ {W-min C,E-max C}
    proof
      let s be object;
      assume
A52:  s in S;
      now
        assume s in {W-min C,E-max C};
        then s = W-min C or s = E-max C by TARSKI:def 2;
        hence contradiction by A16,A26,A4,A52,Th11;
      end;
      hence thesis by A40,A52,XBOOLE_0:def 5;
    end;
    Lower_Arc C misses S
    proof
      assume Lower_Arc C meets S;
      then consider x being object such that
A53:  x in Lower_Arc C and
A54:  x in S by XBOOLE_0:3;
      x in Upper_Arc C by A51,A54,XBOOLE_0:def 5;
      then x in Lower_Arc C /\ Upper_Arc C by A53,XBOOLE_0:def 4;
      hence contradiction by A3,A51,A54,XBOOLE_0:def 5;
    end;
    then
A55: Lower_Arc C misses S1 \/ S \/ S2 by A20,A30,Lm4;
A56: LE LMP C, UMP C, Upper_Arc C, W-min C, E-max C by A18,A39,JORDAN6:def 10;
    then
A57: UMP C in S by JORDAN16:5;
A58: S1 /\ S = {UMP C}
    proof
      S1 /\ C = {UMP C} by Th34;
      hence S1 /\ S c= {UMP C} by A41,XBOOLE_1:26;
      let x be object;
      assume x in {UMP C};
      then
A59:  x = UMP C by TARSKI:def 1;
      UMP C in S1 by RLTOPSP1:68;
      hence thesis by A57,A59,XBOOLE_0:def 4;
    end;
A60: LMP C in S by A56,JORDAN16:5;
A61: S2 /\ S = {LMP C}
    proof
      S2 /\ C = {LMP C} by Th35;
      hence S2 /\ S c= {LMP C} by A41,XBOOLE_1:26;
      let x be object;
      assume x in {LMP C};
      then x = LMP C by TARSKI:def 1;
      hence thesis by A36,A60,XBOOLE_0:def 4;
    end;
    S is_an_arc_of LMP C, UMP C by A28,A4,A56,JORDAN16:21;
    then S is_an_arc_of UMP C, LMP C by JORDAN5B:14;
    then
A62: S1 \/ S is_an_arc_of n,LMP C by A58,TOPREAL1:11;
    (S1 \/ S) /\ S2 = S1 /\ S2 \/ S /\ S2 by XBOOLE_1:23
      .= {} \/ S /\ S2 by A11;
    then S1 \/ S \/ S2 is_an_arc_of n,s by A61,A62,TOPREAL1:10;
    then S1 \/ S \/ S2 is_an_arc_of s,n by JORDAN5B:14;
    hence thesis by A5,A38,A15,A55,A44,A42,JGRAPH_1:44;
  end;
  suppose
A63: LE UMP C, LMP C, C;
    set S = Segment(Upper_Arc C, W-min C, E-max C, UMP C, LMP C);
A64: S c= Upper_Arc C by JORDAN16:2;
    then
A65: S c= C by A8;
A66: now
      let p be Point of TOP-REAL 2;
      assume
A67:  p in S1 \/ S \/ S2;
      per cases by A67,Lm3;
      suppose
        p in S1;
        then p`1 = (UMP C)`1 by A10,A12,SPPOL_1:def 3;
        hence (W-min C)`1<=p`1 & p`1<=(E-max C)`1 by A7,A13,A19,XREAL_1:226;
      end;
      suppose
        p in S;
        hence (W-min C)`1<=p`1 & p`1<=(E-max C)`1 by A13,A65,PSCOMP_1:24;
      end;
      suppose
        p in S2;
        then p`1 = (LMP C)`1 by A35,A36,SPPOL_1:def 3;
        hence (W-min C)`1<=p`1 & p`1<=(E-max C)`1 by A29,A13,A19,XREAL_1:226;
      end;
    end;
A68: now
      let p be Point of TOP-REAL 2;
      assume
A69:  p in S1 \/ S \/ S2;
      per cases by A69,Lm3;
      suppose
A70:    p in S1;
A71:    s`2<=(UMP C)`2 by A37,Th38;
A72:    (UMP C)`2<=n`2 by A9,Th39;
        then (UMP C)`2<=p`2 by A70,TOPREAL1:4;
        hence s`2<=p`2 & p`2<=n`2 by A70,A72,A71,TOPREAL1:4,XXREAL_0:2;
      end;
      suppose
        p in S;
        hence s`2<=p`2 & p`2<=n`2 by A37,A9,A65,PSCOMP_1:24;
      end;
      suppose
A73:    p in S2;
A74:    s`2<=(LMP C)`2 by A37,Th40;
        hence s`2<=p`2 by A73,TOPREAL1:4;
        p`2<=(LMP C)`2 by A73,A74,TOPREAL1:4;
        hence p`2<=n`2 by A9,Th41,XXREAL_0:2;
      end;
    end;
A75: S c= Upper_Arc C \ {W-min C,E-max C}
    proof
      let s be object;
      assume
A76:  s in S;
      now
        assume s in {W-min C,E-max C};
        then s = W-min C or s = E-max C by TARSKI:def 2;
        hence contradiction by A17,A25,A4,A76,Th11;
      end;
      hence thesis by A64,A76,XBOOLE_0:def 5;
    end;
    Lower_Arc C misses S
    proof
      assume Lower_Arc C meets S;
      then consider x being object such that
A77:  x in Lower_Arc C and
A78:  x in S by XBOOLE_0:3;
      x in Upper_Arc C by A75,A78,XBOOLE_0:def 5;
      then x in Lower_Arc C /\ Upper_Arc C by A77,XBOOLE_0:def 4;
      hence contradiction by A3,A75,A78,XBOOLE_0:def 5;
    end;
    then
A79: Lower_Arc C misses S1 \/ S \/ S2 by A20,A30,Lm4;
A80: LE UMP C, LMP C, Upper_Arc C, W-min C, E-max C by A27,A63,JORDAN6:def 10;
    then
A81: UMP C in S by JORDAN16:5;
A82: S1 /\ S = {UMP C}
    proof
      S1 /\ C = {UMP C} by Th34;
      hence S1 /\ S c= {UMP C} by A65,XBOOLE_1:26;
      let x be object;
      assume x in {UMP C};
      then
A83:  x = UMP C by TARSKI:def 1;
      UMP C in S1 by RLTOPSP1:68;
      hence thesis by A81,A83,XBOOLE_0:def 4;
    end;
A84: LMP C in S by A80,JORDAN16:5;
A85: S2 /\ S = {LMP C}
    proof
      S2 /\ C = {LMP C} by Th35;
      hence S2 /\ S c= {LMP C} by A65,XBOOLE_1:26;
      let x be object;
      assume x in {LMP C};
      then x = LMP C by TARSKI:def 1;
      hence thesis by A36,A84,XBOOLE_0:def 4;
    end;
    S is_an_arc_of UMP C, LMP C by A4,A80,Th37,JORDAN16:21;
    then
A86: S1 \/ S is_an_arc_of n,LMP C by A82,TOPREAL1:11;
    (S1 \/ S) /\ S2 = S1 /\ S2 \/ S /\ S2 by XBOOLE_1:23
      .= {} \/ S /\ S2 by A11;
    then S1 \/ S \/ S2 is_an_arc_of n,s by A85,A86,TOPREAL1:10;
    then S1 \/ S \/ S2 is_an_arc_of s,n by JORDAN5B:14;
    hence thesis by A5,A38,A15,A79,A68,A66,JGRAPH_1:44;
  end;
end;
