
theorem
  for L being non empty RelStr, X being non empty set for R being full
non empty SubRelStr of L|^X st for a being set holds a is Element of R iff ex x
  being Element of L st a = X --> x holds L, R are_isomorphic
proof
  let L be non empty RelStr, X be non empty set;
  deffunc F(set) = X --> $1;
  consider f being ManySortedSet of the carrier of L such that
A1: for i being Element of L holds f.i = F(i) from PBOOLE:sch 5;
  let R be full non empty SubRelStr of L|^X such that
A2: for a being set holds a is Element of R iff ex x being Element of L
  st a = X --> x;
A3: rng f c= the carrier of R
  proof
    let y be object;
    assume y in rng f;
    then consider x being object such that
A4: x in dom f and
A5: y = f.x by FUNCT_1:def 3;
    reconsider x as Element of L by A4;
    y = X --> x by A1,A5;
    then y is Element of R by A2;
    hence thesis;
  end;
A6: dom f = the carrier of L by PARTFUN1:def 2;
  then reconsider f as Function of L, R by A3,FUNCT_2:2;
A7: f is one-to-one
  proof
    let x,y be Element of L;
    f.y = X --> y by A1;
    then
A8: f.y = [:X,{y}:] by FUNCOP_1:def 2;
    f.x = X --> x by A1;
    then f.x = [:X,{x}:] by FUNCOP_1:def 2;
    then f.x = f.y implies {x} = {y} by A8,ZFMISC_1:110;
    hence thesis by ZFMISC_1:3;
  end;
A9: now
    set i = the Element of X;
    let x,y be Element of L;
    reconsider a = f.x, b = f.y as Element of L|^X by YELLOW_0:58;
    reconsider Xx = X --> x, Xy = X --> y as Function of X,L;
    reconsider a9 = a, b9 = b as Element of product (X --> L);
A11: f.y = X --> y by A1;
A12: f.x = X --> x by A1;
    hereby
      assume
A13:  x <= y;
      Xx <= Xy
      proof
        let i be set;
        assume
A14:    i in X;
        then
A15:    (X --> y).i = y by FUNCOP_1:7;
        (X --> x).i = x by A14,FUNCOP_1:7;
        hence thesis by A13,A15;
      end;
      then a <= b by A12,A11,WAYBEL10:11;
      hence f.x <= f.y by YELLOW_0:60;
    end;
    assume f.x <= f.y;
    then a <= b by YELLOW_0:59;
    then a9.i <= b9.i by WAYBEL_3:28;
    then x <= Xy.i by A12,A11;
    hence x <= y;
  end;
  take f;
  rng f = the carrier of R
  proof
    thus rng f c= the carrier of R;
    let x be object;
    assume x in the carrier of R;
    then reconsider a = x as Element of R;
    consider i being Element of L such that
A16: a = X --> i by A2;
    a = f.i by A1,A16;
    hence thesis by A6,FUNCT_1:def 3;
  end;
  hence thesis by A7,A9,WAYBEL_0:66;
end;
