let L be non empty Poset; :: thesis: for p being Element of L holds
( p is completely-irreducible iff ex q being Element of L st
( p < q & ( for s being Element of L st p < s holds
q <= s ) & uparrow p = {p} \/ (uparrow q) ) )

let p be Element of L; :: thesis: ( p is completely-irreducible iff ex q being Element of L st
( p < q & ( for s being Element of L st p < s holds
q <= s ) & uparrow p = {p} \/ (uparrow q) ) )

thus ( p is completely-irreducible implies ex q being Element of L st
( p < q & ( for s being Element of L st p < s holds
q <= s ) & uparrow p = {p} \/ (uparrow q) ) ) :: thesis: ( ex q being Element of L st
( p < q & ( for s being Element of L st p < s holds
q <= s ) & uparrow p = {p} \/ (uparrow q) ) implies p is completely-irreducible )
proof
assume A1: p is completely-irreducible ; :: thesis: ex q being Element of L st
( p < q & ( for s being Element of L st p < s holds
q <= s ) & uparrow p = {p} \/ (uparrow q) )

then A2: ex_min_of (uparrow p) \ {p},L by Def3;
A3: "/\" ((uparrow p) \ {p}),L <> p by A1, Th19;
take q = "/\" ((uparrow p) \ {p}),L; :: thesis: ( p < q & ( for s being Element of L st p < s holds
q <= s ) & uparrow p = {p} \/ (uparrow q) )

A4: ex_inf_of (uparrow p) \ {p},L by A2, WAYBEL_1:def 4;
then A5: q is_<=_than (uparrow p) \ {p} by YELLOW_0:def 10;
now
let s be Element of L; :: thesis: ( s in (uparrow p) \ {p} implies p <= s )
assume s in (uparrow p) \ {p} ; :: thesis: p <= s
then s in uparrow p by XBOOLE_0:def 5;
hence p <= s by WAYBEL_0:18; :: thesis: verum
end;
then p is_<=_than (uparrow p) \ {p} by LATTICE3:def 8;
then A6: p <= q by A4, YELLOW_0:def 10;
hence p < q by A3, ORDERS_2:def 10; :: thesis: ( ( for s being Element of L st p < s holds
q <= s ) & uparrow p = {p} \/ (uparrow q) )

thus for s being Element of L st p < s holds
q <= s :: thesis: uparrow p = {p} \/ (uparrow q)
proof end;
thus uparrow p = {p} \/ (uparrow q) :: thesis: verum
proof
thus uparrow p c= {p} \/ (uparrow q) :: according to XBOOLE_0:def 10 :: thesis: {p} \/ (uparrow q) c= uparrow p
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in uparrow p or x in {p} \/ (uparrow q) )
assume A9: x in uparrow p ; :: thesis: x in {p} \/ (uparrow q)
then reconsider x1 = x as Element of L ;
( p = x1 or ( x1 in uparrow p & not x1 in {p} ) ) by A9, TARSKI:def 1;
then ( p = x1 or x1 in (uparrow p) \ {p} ) by XBOOLE_0:def 5;
then ( p = x1 or "/\" ((uparrow p) \ {p}),L <= x1 ) by A5, LATTICE3:def 8;
then ( x in {p} or x in uparrow q ) by TARSKI:def 1, WAYBEL_0:18;
hence x in {p} \/ (uparrow q) by XBOOLE_0:def 3; :: thesis: verum
end;
thus {p} \/ (uparrow q) c= uparrow p :: thesis: verum
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in {p} \/ (uparrow q) or x in uparrow p )
assume A10: x in {p} \/ (uparrow q) ; :: thesis: x in uparrow p
hence x in uparrow p ; :: thesis: verum
end;
end;
end;
thus ( ex q being Element of L st
( p < q & ( for s being Element of L st p < s holds
q <= s ) & uparrow p = {p} \/ (uparrow q) ) implies p is completely-irreducible ) :: thesis: verum
proof
given q being Element of L such that A12: p < q and
A13: for s being Element of L st p < s holds
q <= s and
A14: uparrow p = {p} \/ (uparrow q) ; :: thesis: p is completely-irreducible
ex q being Element of L st
( (uparrow p) \ {p} is_>=_than q & ( for b being Element of L st (uparrow p) \ {p} is_>=_than b holds
q >= b ) )
proof
take q ; :: thesis: ( (uparrow p) \ {p} is_>=_than q & ( for b being Element of L st (uparrow p) \ {p} is_>=_than b holds
q >= b ) )

now
let a be Element of L; :: thesis: ( a in (uparrow p) \ {p} implies q <= a )
assume a in (uparrow p) \ {p} ; :: thesis: q <= a
then ( a in uparrow p & not a in {p} ) by XBOOLE_0:def 5;
then ( p <= a & a <> p ) by TARSKI:def 1, WAYBEL_0:18;
then p < a by ORDERS_2:def 10;
hence q <= a by A13; :: thesis: verum
end;
hence (uparrow p) \ {p} is_>=_than q by LATTICE3:def 8; :: thesis: for b being Element of L st (uparrow p) \ {p} is_>=_than b holds
q >= b

let b be Element of L; :: thesis: ( (uparrow p) \ {p} is_>=_than b implies q >= b )
assume A15: (uparrow p) \ {p} is_>=_than b ; :: thesis: q >= b
( q <> p & q <= q ) by A12;
then ( q in uparrow q & q <> p ) by WAYBEL_0:18;
then ( q in {p} \/ (uparrow q) & not q in {p} ) by TARSKI:def 1, XBOOLE_0:def 3;
then q in (uparrow p) \ {p} by A14, XBOOLE_0:def 5;
hence q >= b by A15, LATTICE3:def 8; :: thesis: verum
end;
then A16: ex_inf_of (uparrow p) \ {p},L by YELLOW_0:16;
now
let c be Element of L; :: thesis: ( c in (uparrow p) \ {p} implies q <= c )
assume c in (uparrow p) \ {p} ; :: thesis: q <= c
then ( c in uparrow p & not c in {p} ) by XBOOLE_0:def 5;
then c in uparrow q by A14, XBOOLE_0:def 3;
hence q <= c by WAYBEL_0:18; :: thesis: verum
end;
then A17: q is_<=_than (uparrow p) \ {p} by LATTICE3:def 8;
now end;
then A19: q = "/\" ((uparrow p) \ {p}),L by A17, YELLOW_0:31;
( p <= q & p <> q ) by A12, ORDERS_2:def 10;
then ( q in uparrow p & not q in {p} ) by TARSKI:def 1, WAYBEL_0:18;
then "/\" ((uparrow p) \ {p}),L in (uparrow p) \ {p} by A19, XBOOLE_0:def 5;
then ex_min_of (uparrow p) \ {p},L by A16, WAYBEL_1:def 4;
hence p is completely-irreducible by Def3; :: thesis: verum
end;