reserve f, g, h for Function;
reserve x, y, z, u, X for set,
  A for non empty set,
  n for Element of NAT,
  f for Function of X, X;
reserve f for c=-monotone Function of bool X, bool X,
  S for Subset of X;
reserve X, Y for non empty set,
  f for Function of X, Y,
  g for Function of Y, X;
reserve L for Lattice,
  f for Function of the carrier of L, the carrier of L,
  x for Element of L,
  O, O1, O2, O3, O4 for Ordinal,
  T for Sequence;
reserve L for complete Lattice,
  f for monotone UnOp of L,
  a, b for Element of L;

theorem Th43:
  a is_a_fixpoint_of f implies lfp f [= a & a [= gfp f
proof
  defpred S[Ordinal] means (f, $1)+.Bottom L [= a;
A1: now
    deffunc F(Ordinal)=(f, $1)+.Bottom L;
    let O1;
    assume that
A2: O1 <> 0 & O1 is limit_ordinal and
A3: for O2 st O2 in O1 holds S[O2];
    consider L1 being Sequence such that
A4: dom L1 = O1 & for O3 st O3 in O1 holds L1.O3 = F(O3) from
    ORDINAL2:sch 2;
A5: rng L1 is_less_than a
    proof
      let q be Element of L;
      assume q in rng L1;
      then consider C being object such that
A6:   C in dom L1 and
A7:   q = L1.C by FUNCT_1:def 3;
      reconsider C as Ordinal by A6;
      (f, C)+.Bottom L [= a by A3,A4,A6;
      hence q [= a by A4,A6,A7;
    end;
    (f, O1)+.Bottom L = "\/"(rng L1, L) by A2,A4,Th17;
    hence S[O1] by A5,LATTICE3:def 21;
  end;
  assume a is_a_fixpoint_of f;
  then
A8: f.a = a;
A9: now
    let O1;
    assume S[O1];
    then f.(f, O1)+.Bottom L [= f.a by QUANTAL1:def 12;
    hence S[succ O1] by A8,Th15;
  end;
  (f, {})+.Bottom L = Bottom L by Th13;
  then
A10: S[0] by LATTICES:16;
  for O2 holds S[O2] from ORDINAL2:sch 1(A10, A9, A1);
  hence lfp f [= a;
  defpred S[Ordinal] means a [= (f, $1)-.Top L;
A11: now
    let O1;
    assume S[O1];
    then f.a [= f.(f, O1)-.Top L by QUANTAL1:def 12;
    hence S[succ O1] by A8,Th16;
  end;
A12: now
    deffunc F(Ordinal)=(f, $1)-.Top L;
    let O1;
    assume that
A13: O1 <> 0 & O1 is limit_ordinal and
A14: for O2 st O2 in O1 holds S[O2];
    consider L1 being Sequence such that
A15: dom L1 = O1 & for O3 st O3 in O1 holds L1.O3 = F(O3) from
    ORDINAL2:sch 2;
A16: a is_less_than rng L1
    proof
      let q be Element of L;
      assume q in rng L1;
      then consider C being object such that
A17:  C in dom L1 and
A18:  q = L1.C by FUNCT_1:def 3;
      reconsider C as Ordinal by A17;
      a [= (f, C)-.Top L by A14,A15,A17;
      hence a [= q by A15,A17,A18;
    end;
    (f, O1)-.Top L = "/\"(rng L1, L) by A13,A15,Th18;
    hence S[O1] by A16,LATTICE3:39;
  end;
  (f, {})-.Top L = Top L by Th14;
  then
A19: S[0] by LATTICES:19;
  for O2 holds S[O2] from ORDINAL2:sch 1(A19, A11, A12);
  hence thesis;
end;
