reserve x, X, Y for set;
reserve L for complete LATTICE,
  a for Element of L;

theorem Th29: :: Theorem 2.3 (The Fixed-Point Theorem)
  for f being Function of L, L st f is monotone for M being Subset
of L st M = {x where x is Element of L: x = f.x} holds subrelstr M is complete
  LATTICE
proof
  let f be Function of L, L such that
A1: f is monotone;
  let M be Subset of L such that
A2: M = {x where x is Element of L: x = f.x};
  set S = subrelstr M;
A3: for X being Subset of S for Y being Subset of L st Y = {y where y is
  Element of L: X is_<=_than f.y & f.y <= y} holds inf Y in M
  proof
    let X be Subset of S;
    let Y be Subset of L such that
A4: Y = {y where y is Element of L: X is_<=_than f.y & f.y <= y};
    set z = inf Y;
A5: f.z is_<=_than Y
    proof
      let u be Element of L;
      assume
A6:   u in Y;
      then consider y being Element of L such that
A7:   y = u and
      X is_<=_than f.y and
A8:   f.y <= y by A4;
      z <= u by A6,Th22;
      then f.z <= f.y by A1,A7;
      hence f.z <= u by A7,A8,ORDERS_2:3;
    end;
A9: X is_<=_than f.(f.z)
    proof
      let m be Element of L;
      assume
A10:  m in X;
      m is_<=_than Y
      proof
        let u be Element of L;
        assume u in Y;
        then consider y being Element of L such that
A11:    y = u and
A12:    X is_<=_than f.y and
A13:    f.y <= y by A4;
        m <= f.y by A10,A12;
        hence m <= u by A11,A13,ORDERS_2:3;
      end;
      then m <= z by YELLOW_0:33;
      then
A14:  f.m <= f.z by A1;
      X c= the carrier of S;
      then X c= M by YELLOW_0:def 15;
      then m in M by A10;
      then ex x being Element of L st x = m & x = f.x by A2;
      hence m <= f.(f.z) by A1,A14;
    end;
    ex_inf_of Y,L by YELLOW_0:17;
    then
A15: f.z <= z by A5,YELLOW_0:31;
    then f.(f.z) <= f.z by A1;
    then f.z in Y by A4,A9;
    then z <= f.z by Th22;
    then z = f.z by A15,ORDERS_2:2;
    hence thesis by A2;
  end;
  M c= the carrier of S by YELLOW_0:def 15;
  then reconsider M as Subset of S;
  defpred P[Element of L] means M is_<=_than f.$1 & f.$1 <= $1;
  reconsider Y = {y where y is Element of L: P[y]} as Subset of L from
  DOMAIN_1:sch 7;
  inf Y in M by A3;
  then reconsider S as non empty Poset;
  for X being Subset of S holds ex_sup_of X, S
  proof
    let X be Subset of S;
    defpred Q[Element of L] means X is_<=_than f.$1 & f.$1 <= $1;
    reconsider Y = {y where y is Element of L: Q[y]} as Subset of L from
    DOMAIN_1:sch 7;
    set z = inf Y;
    z in M by A3;
    then reconsider z as Element of S;
A16: X is_<=_than z
    proof
      let x be Element of S;
      x in the carrier of S;
      then x in M by YELLOW_0:def 15;
      then consider m being Element of L such that
A17:  x = m and
      m = f.m by A2;
      assume
A18:  x in X;
      m is_<=_than Y
      proof
        let u be Element of L;
        assume u in Y;
        then consider y being Element of L such that
A19:    y = u and
A20:    X is_<=_than f.y and
A21:    f.y <= y;
        m <= f.y by A18,A17,A20;
        hence m <= u by A19,A21,ORDERS_2:3;
      end;
      then m <= inf Y by YELLOW_0:33;
      hence x <= z by A17,YELLOW_0:60;
    end;
    for b being Element of S st X is_<=_than b holds z <= b
    proof
      let b be Element of S;
      b in the carrier of S;
      then b in M by YELLOW_0:def 15;
      then consider x being Element of L such that
A22:  x = b and
A23:  x = f.x by A2;
      assume X is_<=_than b;
      then X is_<=_than f.x by A22,A23,YELLOW_0:62;
      then x in Y by A23;
      hence thesis by A22,Th22,YELLOW_0:60;
    end;
    hence thesis by A16,YELLOW_0:30;
  end;
  then reconsider S as complete non empty Poset by YELLOW_0:53;
  S is complete LATTICE;
  hence thesis;
end;
