
theorem Th14: :: Exercise 4.29 (addition)
  for R being RelStr st R is well_founded holds R\~ is well_founded
proof
  let R be RelStr such that
A1: R is well_founded;
  set IR = the InternalRel of R, CR = the carrier of R;
  set IR9 = the InternalRel of R\~, CR9 = the carrier of R\~;
A2: IR is_well_founded_in CR by A1,WELLFND1:def 2;
  now
    let Y be set such that
A3: Y c= CR9 and
A4: Y <> {};
    consider a being object such that
A5: a in Y and
A6: IR-Seg(a) misses Y by A2,A3,A4,WELLORD1:def 3;
A7: IR-Seg(a) /\ Y = {} by A6,XBOOLE_0:def 7;
    take a;
    thus a in Y by A5;
    now
      given z being object such that
A8:   z in IR9-Seg(a) /\ Y;
A9:   z in IR9-Seg(a) by A8,XBOOLE_0:def 4;
A10:  z in Y by A8,XBOOLE_0:def 4;
A11:  z <> a by A9,WELLORD1:1;
      [z,a] in IR9 by A9,WELLORD1:1;
      then z in IR-Seg(a) by A11,WELLORD1:1;
      hence contradiction by A7,A10,XBOOLE_0:def 4;
    end;
    then IR9-Seg(a) /\ Y = {} by XBOOLE_0:def 1;
    hence IR9-Seg(a) misses Y by XBOOLE_0:def 7;
  end;
  then IR9 is_well_founded_in CR9 by WELLORD1:def 3;
  hence thesis by WELLFND1:def 2;
end;
