
theorem Th20:
  for G1 being WGraph, G2 being WSubgraph of G1, W1 being Walk of
  G1, W2 being Walk of G2 st W1 = W2 holds W1.weightSeq() = W2.weightSeq()
proof
  let G1 be WGraph, G2 be WSubgraph of G1, W1 be Walk of G1, W2 be Walk of G2;
  set WS1 = W1.weightSeq(), WS2 = W2.weightSeq();
  assume W1 = W2;
  then
A1: W1.edgeSeq() = W2.edgeSeq() by GLIB_001:86;
  now
    thus len WS1 = len WS1;
    thus
A2: len WS2 = len W1.edgeSeq() by A1,Def18
      .= len WS1 by Def18;
    let x be Nat;
    assume
A3: x in dom WS1;
    then
A4: 1 <= x by FINSEQ_3:25;
A5: x <= len WS2 by A2,A3,FINSEQ_3:25;
    then x <= len W2.edgeSeq() by Def18;
    then
A6: x in dom W2.edgeSeq() by A4,FINSEQ_3:25;
A7: x <= len WS1 by A3,FINSEQ_3:25;
    thus WS2.x = (the_Weight_of G2).(W2.edgeSeq().x) by A4,A5,Def18
      .= ((the_Weight_of G1)|(the_Edges_of G2)).(W2.edgeSeq().x) by Def10
      .= (the_Weight_of G1).(W1.edgeSeq().x) by A1,A6,FUNCT_1:49,GLIB_001:79
      .= WS1.x by A4,A7,Def18;
  end;
  hence thesis by FINSEQ_2:9;
end;
