reserve G,G1,G2 for _Graph;
reserve W,W1,W2 for Walk of G;
reserve e,x,y,z for set;
reserve v for Vertex of G;
reserve n,m for Element of NAT;

theorem Th161:
  W1 is Subwalk of W2 implies W1.edges() c= W2.edges() & W1
  .vertices() c= W2.vertices()
proof
  assume
A1: W1 is Subwalk of W2;
  then consider es being Subset of W2.edgeSeq() such that
A2: W1.edgeSeq() = Seq es by Def32;
  now
    let e be object;
    assume e in W1.edges();
    then consider n being even Element of NAT such that
A3: 1 <= n and
A4: n <= len W1 and
A5: W1.n = e by Lm46;
A6: W1.n = (Seq es).(n div 2) by A2,A3,A4,Lm40;
    n div 2 in dom Seq es by A2,A3,A4,Lm40;
    then
    ex m being Element of NAT st m in dom W2.edgeSeq() & n div 2 <= m &
    W1.n = W2.edgeSeq().m by A6,Th3;
    hence e in W2.edges() by A5,Th102;
  end;
  hence
A7: W1.edges() c= W2.edges() by TARSKI:def 3;
  now
    per cases;
    suppose
A8:   W1 is trivial;
      now
        let v be object;
        assume v in W1.vertices();
        then consider n being odd Element of NAT such that
A9:     n <= len W1 and
A10:    W1.n = v by Lm45;
A11:    1 <= n by ABIAN:12;
        n <= 1 by A8,A9,Lm55;
        then v = W1.first() by A10,A11,XXREAL_0:1;
        then v = W2.first() by A1,Th159;
        hence v in W2.vertices() by Th86;
      end;
      hence thesis by TARSKI:def 3;
    end;
    suppose
      W1 is non trivial;
      hence thesis by A7,Th132;
    end;
  end;
  hence thesis;
end;
