reserve a,b,c for set;

theorem Th37:
  for D being non empty set,f,g being File of D,n being Element of
  NAT st 0<n & g={} holds instr(n,f,g)=n
proof
  let D be non empty set,f,g being File of D,n being Element of NAT;
  assume that
A1: 0<n and
A2: g={};
A3: len g=0 by A2;
  instr(n,f,g) <> 0
  proof
    assume instr(n,f,g)=0;
    then not g is_substring_of f,n by FINSEQ_8:def 10;
    hence contradiction by A3,FINSEQ_8:def 7;
  end;
  then
A4: n <= instr(n,f,g) by FINSEQ_8:def 10;
  g is_preposition_of f/^(n-'1) by A3,FINSEQ_8:def 8;
  then n >= instr(n,f,g) by A1,FINSEQ_8:def 10;
  hence thesis by A4,XXREAL_0:1;
end;
