reserve x for set;

theorem
  for L being non empty reflexive transitive RelStr, a,b being Element
  of L holds [#a,b#] = uparrow a /\ downarrow b
proof
  let L be non empty reflexive transitive RelStr;
  let a,b be Element of L;
  thus [#a,b#] c= uparrow a /\ downarrow b
  proof
    let x be object;
A1: a in {a} by TARSKI:def 1;
A2: b in {b} by TARSKI:def 1;
    assume
A3: x in [#a,b#];
    then reconsider y=x as Element of L;
    y <= b by A3,Def4;
    then
    y in {z where z is Element of L : ex w being Element of L st z <= w &
    w in {b}} by A2;
    then
A4: y in downarrow {b} by WAYBEL_0:14;
    a <= y by A3,Def4;
    then
    y in {z where z is Element of L : ex w being Element of L st z >= w &
    w in {a}} by A1;
    then y in uparrow {a} by WAYBEL_0:15;
    hence thesis by A4,XBOOLE_0:def 4;
  end;
  thus uparrow a /\ downarrow b c= [#a,b#]
  proof
    let x be object;
    assume
A5: x in uparrow a /\ downarrow b;
    then x in uparrow {a} by XBOOLE_0:def 4;
    then
    x in {z where z is Element of L : ex w being Element of L st z >= w &
    w in {a}} by WAYBEL_0:15;
    then consider y1 being Element of L such that
A6: x=y1 and
A7: ex w being Element of L st y1 >= w & w in {a};
A8: a <= y1 by A7,TARSKI:def 1;
    x in downarrow {b} by A5,XBOOLE_0:def 4;
    then
    x in {z where z is Element of L : ex w being Element of L st z <= w &
    w in {b}} by WAYBEL_0:14;
    then
    ex y2 being Element of L st x=y2 & ex w being Element of L st y2 <= w
    & w in {b};
    then y1 <= b by A6,TARSKI:def 1;
    hence thesis by A6,A8,Def4;
  end;
end;
