reserve p, q for FinSequence,
  X, Y, x, y, e for set,
  D for non empty set,
  i, j, k, l, m, n, r for Nat;
reserve G for Graph;
reserve v, v1, v2, v3, v4 for Element of G;
reserve vs, vs1, vs2 for FinSequence of the carrier of G,
  c, c1, c2 for Chain of G;

theorem Th37:
  c alternates_vertices_in G & vs is_vertex_seq_of c implies vs is
  TwoValued Alternating FinSequence
proof
  assume that
A1: c alternates_vertices_in G and
A2: vs is_vertex_seq_of c;
A3: c <>{} by A1;
A4: len vs = len c + 1 by A2;
A5: now
    let k be Nat;
    assume that
A6: 1<=k and
A7: (k+1)<=len vs;
    k<=len c by A4,A7,XREAL_1:6;
    hence vs.k <> vs.(k+1) by A1,A2,Th35,A6,FINSEQ_3:25;
  end;
  card rng vs = 2 by A2,A3,Th31,A1;
  hence thesis by A5,FINSEQ_6:def 6,FINSEQ_6:def 7;
end;
