reserve a,b,c for set;
reserve r for Real,
  X for set,
  n for Element of NAT;

theorem Th31:
  for A being Subset-Family of REAL st card A in continuum holds
  card {x where x is Element of REAL: ex U being set st U in UniCl A & x
  is_local_minimum_of U} in continuum
proof
  deffunc F(set) = {x where x is Element of REAL: x is_local_minimum_of $1};
  let A be Subset-Family of REAL such that
A1: card A in continuum;
A2: now
    per cases;
    suppose
      card A is empty;
      then (card A)*`omega = 0 by CARD_2:20;
      hence (card A)*`omega in continuum by ORDINAL3:8;
    end;
    suppose
A3:   card A is non empty finite;
      then
A4:   card card A in omega by CARD_3:84;
      0 in card A by A3,ORDINAL3:8;
      hence (card A)*`omega in continuum by A4,Th30,CARD_4:16;
    end;
    suppose
A5:   card A is infinite;
      then omega c= card A by CARD_5:16;
      hence (card A)*`omega in continuum by A1,A5,CARD_4:16;
    end;
  end;
  set Y = {x where x is Element of REAL: ex U being set st U in A & x
  is_local_minimum_of U};
  set X = {x where x is Element of REAL: ex U being set st U in UniCl A & x
  is_local_minimum_of U};
A6: for a being set st a in A holds F(a) in bool REAL
  proof let a be set;
    F(a) c= REAL
    proof
      let b be object;
      assume b in F(a);
      then ex x being Element of REAL st b = x
         & x is_local_minimum_of a;
      hence thesis;
    end;
    hence thesis;
  end;
  consider f being Function of A, bool REAL such that
A7: for a being set st a in A holds f.a = F(a) from FUNCT_2:sch 11(A6);
A8: X c= Y
  proof
    let a be object;
    assume a in X;
    then consider x being Element of REAL such that
A9: a = x and
A10: ex U being set st U in UniCl A & x is_local_minimum_of U;
    consider U being set such that
A11: U in UniCl A and
A12: x is_local_minimum_of U by A10;
    reconsider U as Subset of REAL by A11;
    consider B being Subset-Family of REAL such that
A13: B c= A and
A14: U = union B by A11,CANTOR_1:def 1;
    x in U by A12;
    then consider C being set such that
A15: x in C and
A16: C in B by A14,TARSKI:def 4;
    consider y being Real such that
A17: y < x and
A18: ].y,x.[ misses U by A12;
    reconsider C as Subset of REAL by A16;
    ].y,x.[ misses C
    proof
      assume not thesis;
      then consider b being object such that
A19:  b in ].y,x.[ and
A20:  b in C by XBOOLE_0:3;
      b in U by A14,A16,A20,TARSKI:def 4;
      hence thesis by A18,A19,XBOOLE_0:3;
    end;
    then x is_local_minimum_of C by A17,A15;
    hence thesis by A13,A16,A9;
  end;
  Y c= Union f
  proof
    let a be object;
A21: dom f = A by FUNCT_2:def 1;
    assume a in Y;
    then consider x being Element of REAL such that
A22: a = x and
A23: ex U being set st U in A & x is_local_minimum_of U;
    consider U being set such that
A24: U in A and
A25: x is_local_minimum_of U by A23;
A26: f.U = F(U) by A7,A24;
    a in F(U) by A22,A25;
    hence thesis by A26,A21,A24,CARD_5:2;
  end;
  then X c= Union f by A8;
  then
A27: card X c= card Union f by CARD_1:11;
A28: for a being object holds a in A implies card (f.a) c= omega
  proof let a be object;
    assume
A29: a in A;
    then reconsider b = a as Subset of REAL;

    f.a = F(b) by A7,A29;
    then f.a is countable by Th19;
    hence thesis;
  end;
  dom f = A by FUNCT_2:def 1;
  then card Union f c= (card A)*`omega by A28,CARD_2:86;
  hence thesis by A27,A2,ORDINAL1:12,XBOOLE_1:1;
end;
