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 Th25:
  for a st f.a [= a for O1, O2 st O1 c= O2 holds (f, O2)-.a [= (f, O1)-.a
proof
  let a;
  defpred S[Ordinal] means for O1, O2 st O1 c= O2 & O2 c= $1 holds (f, O2)-.a
  [= (f, O1)-.a;
A1: now
    let O4;
    assume that
A2: O4 <> 0 & O4 is limit_ordinal and
A3: for O3 st O3 in O4 holds S[O3];
    thus S[O4]
    proof
      let O1, O2;
      assume that
A4:   O1 c= O2 and
A5:   O2 c= O4;
A6:   O2 c< O4 iff O2 c= O4 & O2 <> O4;
A7:   O1 c< O2 iff O1 c= O2 & O1 <> O2;
      per cases by A5,A6,ORDINAL1:11;
      suppose
A8:     O2 = O4;
        thus (f, O2)-.a [= (f, O1)-.a
        proof
          per cases by A4,A7,ORDINAL1:11;
          suppose
            O1 = O2;
            hence thesis;
          end;
          suppose
A9:         O1 in O2;
            deffunc F(Ordinal)=(f, $1)-.a;
            consider L1 being Sequence such that
A10:        dom L1 = O2 & for O3 st O3 in O2 holds L1.O3 = F(O3) from
            ORDINAL2:sch 2;
A11:        L1.O1 = (f, O1)-.a & L1.O1 in rng L1 by A9,A10,FUNCT_1:def 3;
            (f, O2)-.a = "/\"(rng L1, L) by A2,A8,A10,Th18;
            hence thesis by A11,LATTICE3:38;
          end;
        end;
      end;
      suppose
        O2 in O4;
        hence thesis by A3,A4;
      end;
    end;
  end;
  assume
A12: f.a [= a;
A13: now
    let O4;
    assume
A14: S[O4];
    thus S[succ O4]
    proof
      let O1, O2;
      assume that
A15:  O1 c= O2 and
A16:  O2 c= succ O4;
      per cases;
      suppose
        O1 = O2 & O2 <> succ O4;
        hence thesis;
      end;
      suppose
        O1 <> O2 & O2 <> succ O4;
        then O2 c< succ O4 by A16;
        then O2 in succ O4 by ORDINAL1:11;
        then O2 c= O4 by ORDINAL1:22;
        hence thesis by A14,A15;
      end;
      suppose
        O1 = O2 & O2 = succ O4;
        hence thesis;
      end;
      suppose
A17:    O1 <> O2 & O2 = succ O4;
A18:    (f, succ O4)-.a [= (f, O4)-.a
        proof
          per cases by ORDINAL1:29;
          suppose
A19:        O4 is limit_ordinal;
            thus thesis
            proof
              per cases;
              suppose
                O4 = {};
                then (f, O4)-.a = a by Th14;
                hence thesis by A12,Th16;
              end;
              suppose
A20:            O4 <> {};
                deffunc F(Ordinal)=(f, $1)-.a;
                consider L1 being Sequence such that
A21:            dom L1 = O4 & for O3 st O3 in O4 holds L1.O3 = F(O3)
                from ORDINAL2:sch 2;
A22:            (f, succ O4)-.a is_less_than rng L1
                proof
                  let q be Element of L;
                  assume q in rng L1;
                  then consider O3 being object such that
A23:              O3 in dom L1 and
A24:              q = L1.O3 by FUNCT_1:def 3;
                  reconsider O3 as Ordinal by A23;
                  O3 in succ O3 by ORDINAL1:6;
                  then
A25:              O3 c= succ O3 by ORDINAL1:def 2;
                  O3 c= O4 by A21,A23,ORDINAL1:def 2;
                  then (f, O4)-.a [= (f, O3)-.a by A14;
                  then f.(f, O4)-.a [= f.(f, O3)-.a by QUANTAL1:def 12;
                  then (f, succ O4)-.a [= f.(f, O3)-.a by Th16;
                  then
A26:              (f, succ O4)-.a [= (f, succ O3)-.a by Th16;
                  succ O3 c= O4 by A21,A23,ORDINAL1:21;
                  then
A27:              (f, succ O3)-.a [= (f, O3)-.a by A14,A25;
                  q = (f, O3)-.a by A21,A23,A24;
                  hence (f, succ O4)-.a [= q by A26,A27,LATTICES:7;
                end;
                (f, O4)-.a = "/\"(rng L1, L) by A19,A20,A21,Th18;
                hence thesis by A22,LATTICE3:34;
              end;
            end;
          end;
          suppose
            ex O3 st O4 = succ O3;
            then consider O3 such that
A28:        O4 = succ O3;
            O3 c= O4 by A28,XBOOLE_1:7;
            then (f, O4)-.a [= (f, O3)-.a by A14;
            then f.((f, O4)-.a) [= f.((f, O3)-.a) by QUANTAL1:def 12;
            then f.((f, O4)-.a) [= (f, O4)-.a by A28,Th16;
            hence thesis by Th16;
          end;
        end;
        O1 c< O2 by A15,A17;
        then O1 in O2 by ORDINAL1:11;
        then O1 c= O4 by A17,ORDINAL1:22;
        then (f, O4)-.a [= (f, O1)-.a by A14;
        hence thesis by A17,A18,LATTICES:7;
      end;
    end;
  end;
  let O1, O2;
  assume
A29: O1 c= O2;
A30: S[0];
  for O4 holds S[O4] from ORDINAL2:sch 1(A30, A13, A1);
  hence thesis by A29;
end;
