reserve X for BCI-algebra;
reserve n for Nat;
reserve x,y for Element of X;
reserve a,b for Element of AtomSet(X);
reserve m,n for Nat;
reserve i,j for Integer;
reserve X,X9,Y for BCI-algebra,
  H9 for SubAlgebra of X9,
  G for SubAlgebra of X,

  A9 for non empty Subset of X9,
  I for Ideal of X,
  CI,K for closed Ideal of X,
  x,y,a,b for Element of X,
  RI for I-congruence of X,I,
  RK for I-congruence of X,K;
reserve f for BCI-homomorphism of X,X9;
reserve g for BCI-homomorphism of X9,X;
reserve h for BCI-homomorphism of X9,Y;

theorem
  for K1 being Ideal of HK(G,RK),RK1 being I-congruence of HK(G,RK),K1,
I being Ideal of G,RI being I-congruence of G,I st RK1=RK & I=(the carrier of G
  )/\K holds G./.RI,HK(G,RK)./.RK1 are_isomorphic
proof
  let K1 be Ideal of HK(G,RK),RK1 be I-congruence of HK(G,RK),K1, I be Ideal
  of G,RI be I-congruence of G,I;
  assume that
A1: RK1=RK and
A2: I=(the carrier of G)/\K;
  defpred P[Element of G,set] means $2 = Class(RK1,$1);
A3: the carrier of G c= the carrier of HK(G,RK)
  proof
    let xx be object;
    assume xx in the carrier of G;
    then reconsider x=xx as Element of G;
    the carrier of G c= the carrier of X by BCIALG_1:def 10;
    then
A4: x in the carrier of X;
    then Class(RK,x) in the carrier of X./.RK by EQREL_1:def 3;
    then
A5: Class(RK,x) in {Class(RK,a) where a is Element of G:Class(RK,a) in
    the carrier of X./.RK};
    [x,x] in RK by A4,EQREL_1:5;
    then x in Class(RK,x) by EQREL_1:18;
    hence thesis by A5,TARSKI:def 4;
  end;
A6: for x being Element of G ex y being Element of HK(G,RK)./.RK1 st P[x,y]
  proof
    let x be Element of G;
    set y=Class(RK1,x);
    x in the carrier of G;
    then reconsider y as Element of HK(G,RK)./.RK1 by A3,EQREL_1:def 3;
    take y;
    thus thesis;
  end;
  consider f being Function of G, HK(G,RK)./.RK1 such that
A7: for x being Element of G holds P[x,f.x]from FUNCT_2:sch 3(A6);
  now
    let a,b be Element of G;
    the carrier of G c= the carrier of X by BCIALG_1:def 10;
    then reconsider xa=a,xb=b as Element of X;
    a in the carrier of G & b in the carrier of G;
    then reconsider
    Wa=Class(RK1,a),Wb=Class(RK1,b)as Element of Class RK1 by A3,EQREL_1:def 3;
    reconsider a1=a,b1=b as Element of HK(G,RK) by A3;
    Wa=f.a & Wb=f.b by A7;
    then
A8: f.a\f.b=Class(RK1,a1\b1) by BCIALG_2:def 17;
    HK(G,RK) is SubAlgebra of X by Th55;
    then xa\xb=a1\b1 by Th34;
    then f.a\f.b=Class(RK1,a\b) by A8,Th34;
    hence f.(a\b)=f.a\f.b by A7;
  end;
  then reconsider f as BCI-homomorphism of G, HK(G,RK)./.RK1 by Def6;
A9: Ker f = I
  proof
    set X9 = HK(G,RK)./.RK1;
    thus Ker f c= I
    proof
      let h be object;
      assume h in Ker f;
      then consider x being Element of G such that
A10:  h=x and
A11:  f.x = 0.X9;
      x in the carrier of G & the carrier of G c= the carrier of X by
BCIALG_1:def 10;
      then reconsider x as Element of X;
      Class(RK,x)= Class(RK,0.X)by A1,A7,A11;
      then 0.X in Class(RK,x) by EQREL_1:23;
      then [x,0.X] in RK by EQREL_1:18;
      then
A12:  x\0.X in K by BCIALG_2:def 12;
      x in K by A12,BCIALG_1:def 18;
      hence thesis by A2,A10,XBOOLE_0:def 4;
    end;
    let h be object;
    assume
A13: h in I;
    then reconsider x=h as Element of X by A2;
    h in K by A2,A13,XBOOLE_0:def 4;
    then x\0.X in K & x` in K by BCIALG_1:2,def 19;
    then [x,0.X] in RK by BCIALG_2:def 12;
    then 0.X in Class(RK,x) by EQREL_1:18;
    then Class(RK1,h)= Class(RK1,0.X)by A1,EQREL_1:23;
    then f.h = 0.X9 by A7,A13;
    hence thesis by A13;
  end;
  now
    let y be object;
    y in the carrier of HK(G,RK)./.RK1 implies y in rng f
    proof
      assume y in the carrier of HK(G,RK)./.RK1;
      then consider x being object such that
A14:  x in the carrier of HK(G,RK) and
A15:  y=Class(RK1,x) by EQREL_1:def 3;
      consider a being Element of G such that
A16:  x in Class(RK,a) by A14,Lm5;
      a in the carrier of G & the carrier of G c= the carrier of X by
BCIALG_1:def 10;
      then y = Class(RK1,a) by A1,A15,A16,EQREL_1:23;
      then
A17:  y=f.a by A7;
      dom f = the carrier of G by FUNCT_2:def 1;
      hence thesis by A17,FUNCT_1:def 3;
    end;
    hence y in rng f iff y in the carrier of HK(G,RK)./.RK1;
  end;
  then rng f = the carrier of HK(G,RK)./.RK1 by TARSKI:2;
  then f is onto by FUNCT_2:def 3;
  hence thesis by A9,Th53;
end;
