 reserve a,Z1,Z2,Z3 for set,
         x,y,z for object,
         k for Nat;
 reserve S for RelStr;
 reserve P,Q for non empty flat Poset;
 reserve p,p1,p2 for Element of P;
 reserve K for non empty Chain of P;
 reserve X,Y for non empty set;

theorem
  for L being finite lower-bounded antisymmetric non empty LATTICE holds
    L is flat iff for x being Element of L holds height x <= 2
  proof
    let L be finite lower-bounded antisymmetric non empty LATTICE;
    hereby assume
A0:   L is flat;
      let x be Element of L;
S0:   Bottom L <= x by YELLOW_0:44;
      reconsider D = {Bottom L, x} as Chain of Bottom L, x
        by LATTICE7:1,YELLOW_0:44;
      per cases;
      suppose
    KK: Bottom L <> x; then
t1:     card D = 2 by CARD_2:57;
        for A be Chain of Bottom L, x holds card A <= 2
        proof
          let A be Chain of Bottom L, x;
          consider b being Element of L such that
H1:       A = {b} or A = {Bottom L, b} by Thflat01,A0;
H2:       x in A & Bottom L in A by LATTICE7:def 2,S0;
          A <> {b}
          proof
            assume A = {b}; then
            x = b & b = Bottom L by TARSKI:def 1,H2;
            hence thesis by KK;
          end;
          hence card A <= 2 by CARD_2:50,H1;
        end;
        hence height x <= 2 by LATTICE7:def 3,t1;
      end;
      suppose Bottom L = x; then
        height x = 1 by LATTICE7:6;
        hence height x <= 2;
      end;
    end;
    assume
AA: for x being Element of L holds height x <= 2;
    ex a being Element of L st
      for x,y being Element of L holds x <= y iff x = a or x = y
    proof
      take a = Bottom L;
      let x,y be Element of L;
      hereby assume
AS:     x <= y;
        per cases;
        suppose x = a & y = x;
          hence x = a or x = y;
        end;
        suppose x <> a & y = x;
          hence x = a or x = y;
        end;
        suppose
a1:       x <> a & y <> x; then
          a < x by YELLOW_0:44; then
          height a < height x by LATTICE7:2; then
          1 < height x by LATTICE7:6; then
y1:       1 + 1 <= height x by NAT_1:13;
          x < y by a1,AS; then
Y2:       height x < height y by LATTICE7:2;
          height x <= 2 by AA; then
          height x = 2 by y1,XXREAL_0:1;
          hence x = a or x = y by AA,Y2;
        end;
        suppose x = a & y <> x;
          hence x = a or x = y;
        end;
      end;
      thus thesis by YELLOW_0:44;
    end;
    hence thesis;
  end;
