reserve N for Cardinal;
reserve M for Aleph;
reserve X for non empty set;
reserve Y,Z,Z1,Z2,Y1,Y2,Y3,Y4 for Subset of X;
reserve S for Subset-Family of X;
reserve x for set;
reserve F,Uf for Filter of X;
reserve S for non empty Subset-Family of X;
reserve I for Ideal of X;
reserve S,S1 for Subset-Family of X;
reserve FS for non empty Subset of Filters(X);
reserve X for infinite set;
reserve Y,Y1,Y2,Z for Subset of X;
reserve F,Uf for Filter of X;
reserve x for Element of X;
reserve X for set;
reserve M for non limit_cardinal Aleph;
reserve F for Filter of M;
reserve N1,N2,N3 for Element of predecessor M;
reserve K1,K2 for Element of M;
reserve T for Inf_Matrix of predecessor M, M, bool M;

theorem Th35:
  for M for I being Ideal of M st I is_complete_with M &
  Frechet_Ideal(M) c= I ex S being Subset-Family of M st card S = M & ( for X1
being set st X1 in S holds not X1 in I ) & for X1,X2 being set st X1 in S & X2
  in S & X1 <> X2 holds X1 misses X2
proof
  let M;
  set N = predecessor M;
  let I be Ideal of M such that
A1: I is_complete_with M and
A2: Frechet_Ideal(M) c= I;
  consider T such that
A3: T is_Ulam_Matrix_of M by Th34;
  defpred P[set,set] means not T.($2,$1) in I;
A4: M = nextcard N by Def17;
A5: for K1 holds union {T.(N1,K1): N1 in N} in dual I
  proof
    deffunc F(Element of predecessor M,Element of M) = T.($1,$2);
    defpred R[set,set] means $1 in N;
    let K1;
    defpred P[set,set] means $2=K1 & $1 in N;
A6: {F(N1,K2): K2=K1 & R[N1,K2]} = {F(N2,K1): R[N2,K1] } from FRAENKEL:sch
    20;
    {F(N1,K2): P[N1,K2]} is Subset-Family of M from DOMAIN_1:sch 9;
    then reconsider C={T.(N1,K1): N1 in N} as Subset-Family of M by A6;
    assume not union {T.(N1,K1): N1 in N} in dual I;
    then not (union C)` in Frechet_Ideal(M) by A2,SETFAM_1:def 7;
    then not card (M \ union {T.(N1,K1): N1 in N}) in card M by Th19;
    then
A7: not card (M \ union {T.(N1,K1): N1 in N}) in nextcard N by A4;
    card (M \ union {T.(N1,K1): N1 in N}) c= N by A3;
    hence contradiction by A7,CARD_3:91;
  end;
A8: for K1 ex N2 st P[K1,N2]
  proof
    deffunc F(set) = T.$1;
    let K1;
A9: {T.(N1,K1): N1 in N} is non empty
    proof
      set N2 = the Element of predecessor M;
      T.(N2,K1) in {T.(N1,K1): N1 in N};
      hence thesis;
    end;
A10: card {F(X) where X is Element of [:N,M:]: X in [:N,{K1}:] } c= card
    [:N,{K1}:] from TREES_2:sch 2;
    {T.(N1,K1) : N1 in N } c= {T.X where X is Element of [:N,M:]: X in [:
    N,{K1}:] }
    proof
      let Y be object;
      assume Y in {T.(N1,K1) : N1 in N };
      then consider N1 such that
A11:  Y=T.(N1,K1) and
      N1 in N;
      [N1,K1] is Element of [:N,M:] & [N1,K1] in [:N,{K1}:] by ZFMISC_1:87,106;
      hence thesis by A11;
    end;
    then
A12: card {T.(N1,K1) : N1 in N} c= card {T.X where X is Element of [:N,M:]
    : X in [:N,{K1}:]} by CARD_1:11;
    assume
A13: for N2 holds T.(N2,K1) in I;
A14: {T.(N1,K1): N1 in N} c= I
    proof
      let X be object;
      assume X in {T.(N1,K1): N1 in N};
      then ex N2 st X = T.(N2,K1) & N2 in N;
      hence thesis by A13;
    end;
    card [:N,{K1}:] = card N by CARD_1:69;
    then
A15: card [:N,{K1}:] = N;
    N in M by A4,CARD_1:18;
    then card {T.(N1,K1): N1 in N} in M by A10,A12,A15,ORDINAL1:12,XBOOLE_1:1;
    then union {T.(N1,K1): N1 in N} in I by A1,A14,A9;
    hence contradiction by A5,Th10;
  end;
  consider h being Function of M,N such that
A16: for K1 holds P[K1,h.K1] from FUNCT_2:sch 3(A8);
  ex N2 st card (h"{N2}) = M
  proof
    deffunc F(set) = sup (h"{$1});
    assume
A17: for N2 holds card (h"{N2}) <> M;
A18: {sup (h"{N2}): N2 in N} c= M
    proof
      let x be object;
      assume x in {sup (h"{N2}): N2 in N};
      then consider N2 such that
A19:  x=sup (h"{N2}) and
      N2 in N;
      card (h"{N2}) c= M & card (h"{N2}) <> M by A17,CARD_1:7;
      then card (h"{N2}) in M by CARD_1:3;
      then card (h"{N2}) in cf M by CARD_5:def 3;
      hence thesis by A19,CARD_5:26;
    end;
    card {F(N2): N2 in N} c= card N from TREES_2:sch 2;
    then card {sup (h"{N2}): N2 in N} c= N;
    then card {sup (h"{N2}): N2 in N} in M by A4,CARD_3:91;
    then card {sup (h"{N2}): N2 in N} in cf M by CARD_5:def 3;
    then reconsider K1 = sup {sup (h"{N3}): N3 in N} as Element of M by A18,
CARD_5:26;
    for N2 holds sup (h"{N2}) in sup {sup (h"{N3}): N3 in N}
    proof
      let N2;
      sup (h"{N2}) in {sup (h"{N3}): N3 in N};
      hence thesis by ORDINAL2:19;
    end;
    then sup (h"{h.K1}) in K1;
    hence contradiction by ORDINAL2:19,SETWISEO:7;
  end;
  then consider N2 such that
A20: card (h"{N2}) = M;
  {T.(N2,K2) : h.K2=N2} c= bool M
  proof
    let X be object;
    assume X in {T.(N2,K2) : h.K2=N2};
    then ex K2 st X=T.(N2,K2) & h.K2 = N2;
    hence thesis;
  end;
  then reconsider S={T.(N2,K2) : h.K2=N2} as Subset-Family of M;
  dom T = [:N,M:] by FUNCT_2:def 1;
  then consider G being Function such that
  (curry T).N2 = G and
A21: dom G = M and
  rng G c= rng T and
A22: for y being object st y in M holds G.y = T.(N2,y) by FUNCT_5:29;
  h"{N2},M are_equipotent by A20,CARD_1:def 2;
  then consider f being Function such that
A23: f is one-to-one and
A24: dom f = M and
A25: rng f = h"{N2} by WELLORD2:def 4;
A26: dom (G*f) = dom f by A25,A21,RELAT_1:27;
A27: S c= rng (G*f)
  proof
    let X be object;
    assume X in S;
    then consider K2 such that
A28: X=T.(N2,K2) and
A29: h.K2=N2;
    K2 in M;
    then
A30: K2 in dom h by FUNCT_2:def 1;
    h.K2 in {N2} by A29,TARSKI:def 1;
    then K2 in h"{N2} by A30,FUNCT_1:def 7;
    then consider K3 being object such that
A31: K3 in dom f and
A32: f.K3=K2 by A25,FUNCT_1:def 3;
    X = G.(f.K3) by A22,A28,A32;
    then X = (G*f).K3 by A26,A31,FUNCT_1:12;
    hence thesis by A26,A31,FUNCT_1:def 3;
  end;
A33: for X being set st X in dom f holds h.(f.X) = N2
  proof
    let X be set;
    assume X in dom f;
    then f.X in h"{N2} by A25,FUNCT_1:def 3;
    then h.(f.X) in {N2} by FUNCT_1:def 7;
    hence thesis by TARSKI:def 1;
  end;
  rng (G*f) c= S
  proof
    let X be object;
    assume X in rng (G*f);
    then consider K1 being object such that
A34: K1 in dom (G*f) and
A35: X = (G*f).K1 by FUNCT_1:def 3;
    f.K1 in rng f by A26,A34,FUNCT_1:def 3;
    then reconsider K3=f.K1 as Element of M by A25;
    X = G.(f.K1) by A34,A35,FUNCT_1:12;
    then
A36: X = T.(N2,K3) by A22;
    h.K3=N2 by A33,A26,A34;
    hence thesis by A36;
  end;
  then
A37: rng (G*f) = S by A27;
A38: for K1,K2 st h.K1=N2 & K1<> K2 holds T.(N2,K1) <> T.(N2,K2)
  proof
    let K1,K2 such that
A39: h.K1=N2 and
A40: K1<>K2;
    assume T.(N2,K1) = T.(N2,K2);
    then T.(N2,K1) /\ T.(N2,K2) <> {} by A16,A39,Th11;
    hence contradiction by A3,A40;
  end;
A41: G*f is one-to-one
  proof
    let K1,K2 be object such that
A42: K1 in dom (G*f) and
A43: K2 in dom (G*f) and
A44: (G*f).K1 = (G*f).K2;
    assume K1<>K2;
    then
A45: f.K1 <> f.K2 by A23,A26,A42,A43;
A46: f.K2 in rng f by A26,A43,FUNCT_1:def 3;
    then reconsider K4=f.K2 as Element of M by A25;
A47: (G*f).K2 = G.(f.K2) by A43,FUNCT_1:12
      .= T.(N2,f.K2) by A25,A22,A46;
A48: f.K1 in rng f by A26,A42,FUNCT_1:def 3;
    then reconsider K3=f.K1 as Element of M by A25;
    h.K3 = N2 by A33,A26,A42;
    then
A49: T.(N2,K3) <> T.(N2,K4) by A38,A45;
    (G*f).K1 = G.(f.K1) by A42,FUNCT_1:12
      .= T.(N2,f.K1) by A25,A22,A48;
    hence contradiction by A44,A49,A47;
  end;
  take S;
  dom (G*f) = M by A24,A25,A21,RELAT_1:27;
  then S,M are_equipotent by A37,A41,WELLORD2:def 4;
  hence card S = M by CARD_1:def 2;
  thus for X1 being set st X1 in S holds not X1 in I
  proof
    let X1 be set;
    assume X1 in S;
    then ex K1 st T.(N2,K1) = X1 & h.K1=N2;
    hence thesis by A16;
  end;
  thus for X1,X2 being set st X1 in S & X2 in S & X1 <> X2 holds X1 misses X2
  proof
    let X1,X2 be set such that
A50: X1 in S and
A51: X2 in S and
A52: X1 <> X2;
    consider K2 such that
A53: T.(N2,K2) = X2 and
    h.K2=N2 by A51;
    consider K1 such that
A54: T.(N2,K1) = X1 and
    h.K1=N2 by A50;
    T.(N2,K1) /\ T.(N2,K2) = {} by A3,A52,A54,A53;
    hence thesis by A54,A53;
  end;
end;
