reserve x,y for set;
reserve G for Graph;
reserve vs,vs9 for FinSequence of the carrier of G;
reserve IT for oriented Chain of G;
reserve N for Nat;
reserve n,m,k,i,j for Nat;
reserve r,r1,r2 for Real;
reserve X for non empty set;

theorem Th14:
  for f being FinSequence of TOP-REAL 2 st f is nodic & PairF(f)
  is Simple holds f is s.c.c.
proof
  let f be FinSequence of TOP-REAL 2;
  assume that
A1: f is nodic and
A2: PairF(f) is Simple;
  reconsider f1=f as FinSequence of the carrier of PGraph(the carrier of
  TOP-REAL 2);
  per cases;
  suppose
    len f>=1;
    then
A3: f1 is_oriented_vertex_seq_of PairF(f) by Th7;
    for i,j st i+1 < j & (i > 1 & j < len f or j+1 < len f) holds LSeg(f,i
    ) misses LSeg(f,j)
    proof
      let i,j;
      assume that
A4:   i+1 < j and
A5:   i > 1 & j < len f or j+1 < len f;
      per cases;
      suppose
A6:     i>=1;
A7:     i<j by A4,NAT_1:13;
        then
A8:     1<=j by A6,XXREAL_0:2;
        then
A9:     1<j+1 by NAT_1:13;
A10:    i+1<j+1 by A4,NAT_1:13;
A11:    1<i+1 by A6,NAT_1:13;
A12:    j<len f by A5,NAT_1:13;
        then
A13:    i+1<len f by A4,XXREAL_0:2;
A14:    j+1<=len f by A5,NAT_1:13;
A15:    i<j+1 by A7,NAT_1:13;
        then
A16:    i<len f by A14,XXREAL_0:2;
        now
          assume
A17:      LSeg(f,i) meets LSeg(f,j);
          now
            per cases by A1,A17;
            case
A18:          LSeg(f,i) /\ LSeg(f,j)={f.i} &(f.i=f.j or f.i=f.(j+1))&
              LSeg(f,i)<>LSeg(f,j);
              now
                per cases by A18;
                case
                  f.i=f.j;
                  hence contradiction by A2,A3,A6,A7,A12,Th1;
                end;
                case
                  f.i=f.(j+1);
                  hence contradiction by A2,A3,A5,A6,A15,A14,Th1;
                end;
              end;
              hence contradiction;
            end;
            case
A19:          LSeg(f,i) /\ LSeg(f,j)={f.(i+1)} &(f.(i+1)=f.j or f.(i+
              1)=f.(j+1))&LSeg(f,i)<>LSeg(f,j);
              now
                per cases by A19;
                case
                  f.(i+1)=f.j;
                  hence contradiction by A2,A3,A4,A12,A11,Th1;
                end;
                case
                  f.(i+1)=f.(j+1);
                  hence contradiction by A2,A3,A10,A14,A11,Th1;
                end;
              end;
              hence contradiction;
            end;
            case
              LSeg(f,i)=LSeg(f,j);
              then LSeg(f/.i,f/.(i+1))=LSeg(f,j) by A6,A13,TOPREAL1:def 3;
              then
A20:          LSeg(f/.i,f/.(i+1))=LSeg(f/.j,f/.(j+1)) by A8,A14,TOPREAL1:def 3;
A21:          f/.j=f.j & f/.(j+1)=f.(j+1) by A8,A12,A14,A9,FINSEQ_4:15;
A22:          f/.i=f.i & f/.(i+1)=f.(i+1) by A6,A13,A16,A11,FINSEQ_4:15;
              now
                per cases by A20,A22,A21,SPPOL_1:8;
                case
                  f.i=f.j & f.(i+1)=f.(j+1);
                  hence contradiction by A2,A3,A10,A14,A11,Th1;
                end;
                case
                  f.i=f.(j+1) & f.(i+1)=f.j;
                  hence contradiction by A2,A3,A4,A12,A11,Th1;
                end;
              end;
              hence contradiction;
            end;
          end;
          hence contradiction;
        end;
        hence thesis;
      end;
      suppose
        i<1;
        then LSeg(f,i)={} by TOPREAL1:def 3;
        then LSeg(f,i) /\ LSeg(f,j) = {};
        hence thesis;
      end;
    end;
    hence thesis by GOBOARD5:def 4;
  end;
  suppose
A23: len f<1;
    for i,j st i+1 < j & (i > 1 & j < len f or j+1 < len f) holds LSeg(f,
    i) misses LSeg(f,j)
    proof
      let i,j;
      assume that
      i+1 < j and
      i > 1 & j < len f or j+1 < len f;
      per cases;
      suppose
        i>=1;
        then i>len f by A23,XXREAL_0:2;
        then i+1>len f by NAT_1:13;
        then LSeg(f,i)={} by TOPREAL1:def 3;
        then LSeg(f,i) /\ LSeg(f,j) = {};
        hence thesis;
      end;
      suppose
        i<1;
        then LSeg(f,i)={} by TOPREAL1:def 3;
        then LSeg(f,i) /\ LSeg(f,j) = {};
        hence thesis;
      end;
    end;
    hence thesis by GOBOARD5:def 4;
  end;
end;
