
theorem Th7:
  for R being RelStr, X, Y being well_founded Subset of R st X is
  lower holds X \/ Y is well_founded Subset of R
proof
  let R be RelStr, X, Y be well_founded Subset of R;
  set r = the InternalRel of R;
  assume
A1: X is lower;
  reconsider XY = X \/ Y as Subset of R;
A2: r is_well_founded_in Y by Def3;
A3: r is_well_founded_in X by Def3;
  XY is well_founded
  proof
    let Z be set such that
A4: Z c= XY and
A5: Z <> {};
    set XZ = X /\ Z;
A6: XZ c= X by XBOOLE_1:17;
    per cases;
    suppose
      XZ = {};
      then X misses Z;
      then Z c= Y by A4,XBOOLE_1:73;
      hence thesis by A2,A5;
    end;
    suppose
      XZ <> {};
      then consider a being object such that
A7:   a in XZ and
A8:   r-Seg a misses XZ by A3,A6;
A9:   a in X by A7,XBOOLE_0:def 4;
      take a;
      thus a in Z by A7,XBOOLE_0:def 4;
      assume r-Seg a /\ Z <> {};
      then consider b being object such that
A10:  b in r-Seg a /\ Z by XBOOLE_0:def 1;
A11:  b in Z by A10,XBOOLE_0:def 4;
A12:  b in r-Seg a by A10,XBOOLE_0:def 4;
      then [b,a] in r by WELLORD1:1;
      then b in X by A1,A9;
      then b in XZ by A11,XBOOLE_0:def 4;
      hence contradiction by A8,A12,XBOOLE_0:3;
    end;
  end;
  hence thesis;
end;
