
theorem
  for D being non empty set, f,g being FinSequence of D,
    n,m being Nat st m >= n
  holds (g is_odd_substring_of f,m implies g is_odd_substring_of f,n) &
    (g is_even_substring_of f,m implies g is_even_substring_of f,n)
proof
  let D be non empty set, f,g be FinSequence of D, n,m be Nat;
  assume A1: m >= n;
  hereby
    assume A2: g is_odd_substring_of f,m;
    per cases;
    suppose len g > 0;
      then consider i being odd Nat such that
        A3: m<=i & i<=len f & mid(f,i,(i-'1)+len g) = g by A2;
      n <= i by A1, A3, XXREAL_0:2;
      hence g is_odd_substring_of f,n by A3;
    end;
    suppose not len g > 0;
      hence g is_odd_substring_of f,n;
    end;
  end;
  assume A4: g is_even_substring_of f,m;
  per cases;
  suppose len g > 0;
    then consider i being even Nat such that
      A5: m<=i & i<=len f & mid(f,i,(i-'1)+len g) = g by A4;
    n <= i by A1, A5, XXREAL_0:2;
    hence g is_even_substring_of f,n by A5;
  end;
  suppose not len g > 0;
    hence g is_even_substring_of f,n;
  end;
end;
