:: LFUZZY_0 semantic presentation

definition
let c1 be RelStr ;
attr a1 is real means :Def1: :: LFUZZY_0:def 1
( the carrier of a1 c= REAL & ( for b1, b2 being real number st b1 in the carrier of a1 & b2 in the carrier of a1 holds
( [b1,b2] in the InternalRel of a1 iff b1 <= b2 ) ) );
end;

:: deftheorem Def1 defines real LFUZZY_0:def 1 :
for b1 being RelStr holds
( b1 is real iff ( the carrier of b1 c= REAL & ( for b2, b3 being real number st b2 in the carrier of b1 & b3 in the carrier of b1 holds
( [b2,b3] in the InternalRel of b1 iff b2 <= b3 ) ) ) );

definition
let c1 be RelStr ;
attr a1 is interval means :Def2: :: LFUZZY_0:def 2
( a1 is real & ex b1, b2 being real number st
( b1 <= b2 & the carrier of a1 = [.b1,b2.] ) );
end;

:: deftheorem Def2 defines interval LFUZZY_0:def 2 :
for b1 being RelStr holds
( b1 is interval iff ( b1 is real & ex b2, b3 being real number st
( b2 <= b3 & the carrier of b1 = [.b2,b3.] ) ) );

registration
cluster interval -> non empty real RelStr ;
coherence
for b1 being RelStr st b1 is interval holds
( b1 is real & not b1 is empty )
proof end;
end;

registration
cluster empty -> real RelStr ;
coherence
for b1 being RelStr st b1 is empty holds
b1 is real
proof end;
end;

theorem Th1: :: LFUZZY_0:1
for b1 being Subset of REAL ex b2 being strict RelStr st
( the carrier of b2 = b1 & b2 is real )
proof end;

registration
cluster non empty strict real interval RelStr ;
existence
ex b1 being RelStr st
( b1 is interval & b1 is strict )
proof end;
end;

theorem Th2: :: LFUZZY_0:2
for b1, b2 being real RelStr st the carrier of b1 = the carrier of b2 holds
RelStr(# the carrier of b1,the InternalRel of b1 #) = RelStr(# the carrier of b2,the InternalRel of b2 #)
proof end;

registration
let c1 be non empty real RelStr ;
cluster -> real Element of the carrier of a1;
coherence
for b1 being Element of c1 holds b1 is real
proof end;
end;

definition
let c1 be Subset of REAL ;
func RealPoset c1 -> strict real RelStr means :Def3: :: LFUZZY_0:def 3
the carrier of a2 = a1;
existence
ex b1 being strict real RelStr st the carrier of b1 = c1
proof end;
uniqueness
for b1, b2 being strict real RelStr st the carrier of b1 = c1 & the carrier of b2 = c1 holds
b1 = b2
by Th2;
end;

:: deftheorem Def3 defines RealPoset LFUZZY_0:def 3 :
for b1 being Subset of REAL
for b2 being strict real RelStr holds
( b2 = RealPoset b1 iff the carrier of b2 = b1 );

registration
let c1 be non empty Subset of REAL ;
cluster RealPoset a1 -> non empty strict real ;
coherence
not RealPoset c1 is empty
proof end;
end;

notation
let c1 be RelStr ;
let c2, c3 be Element of c1;
synonym c2 <<= c3 for c2 <= c3;
synonym c3 >>= c2 for c2 <= c3;
antonym c2 ~<= c3 for c2 <= c3;
antonym c3 ~>= c2 for c2 <= c3;
end;

notation
let c1, c2 be real number ;
synonym c1 <R= c2 for c1 <= c2;
antonym c2 <R c1 for c1 <= c2;
synonym c2 >R= c1 for c1 <= c2;
antonym c1 >R c2 for c1 <= c2;
end;

theorem Th3: :: LFUZZY_0:3
for b1 being non empty real RelStr
for b2, b3 being Element of b1 holds
( b2 <R= b3 iff b2 <<= b3 )
proof end;

registration
cluster real -> reflexive transitive antisymmetric RelStr ;
coherence
for b1 being RelStr st b1 is real holds
( b1 is reflexive & b1 is antisymmetric & b1 is transitive )
proof end;
end;

registration
cluster non empty real -> non empty reflexive transitive antisymmetric connected real RelStr ;
coherence
for b1 being non empty real RelStr holds b1 is connected
proof end;
end;

definition
let c1 be non empty real RelStr ;
let c2, c3 be Element of c1;
redefine func max as max c2,c3 -> Element of a1;
coherence
max c2,c3 is Element of c1
by SQUARE_1:49;
end;

definition
let c1 be non empty real RelStr ;
let c2, c3 be Element of c1;
redefine func min as min c2,c3 -> Element of a1;
coherence
min c2,c3 is Element of c1
by SQUARE_1:38;
end;

registration
cluster non empty real -> non empty reflexive transitive antisymmetric connected with_suprema with_infima real RelStr ;
coherence
for b1 being non empty real RelStr holds
( b1 is with_suprema & b1 is with_infima )
;
end;

theorem Th4: :: LFUZZY_0:4
for b1 being non empty real RelStr
for b2, b3 being Element of b1 holds b2 "\/" b3 = max b2,b3
proof end;

theorem Th5: :: LFUZZY_0:5
for b1 being non empty real RelStr
for b2, b3 being Element of b1 holds b2 "/\" b3 = min b2,b3
proof end;

theorem Th6: :: LFUZZY_0:6
for b1 being non empty real RelStr holds
( ex b2 being real number st
( b2 in the carrier of b1 & ( for b3 being real number st b3 in the carrier of b1 holds
b2 <= b3 ) ) iff b1 is lower-bounded )
proof end;

theorem Th7: :: LFUZZY_0:7
for b1 being non empty real RelStr holds
( ex b2 being real number st
( b2 in the carrier of b1 & ( for b3 being real number st b3 in the carrier of b1 holds
b2 >= b3 ) ) iff b1 is upper-bounded )
proof end;

registration
cluster non empty interval -> non empty bounded RelStr ;
coherence
for b1 being non empty RelStr st b1 is interval holds
b1 is bounded
proof end;
end;

theorem Th8: :: LFUZZY_0:8
for b1 being non empty interval RelStr
for b2 being set holds ex_sup_of b2,b1
proof end;

registration
cluster non empty interval -> non empty reflexive transitive antisymmetric bounded connected with_suprema with_infima complete real interval RelStr ;
coherence
for b1 being non empty interval RelStr holds b1 is complete
proof end;
end;

registration
cluster -> distributive RelStr ;
coherence
for b1 being Chain holds b1 is distributive
proof end;
end;

registration
cluster non empty interval -> non empty reflexive transitive antisymmetric bounded connected with_suprema with_infima complete distributive Heyting real interval RelStr ;
coherence
for b1 being non empty interval RelStr holds b1 is Heyting
proof end;
end;

registration
cluster [.0,1.] -> non empty ;
coherence
not [.0,1.] is empty
proof end;
end;

registration
cluster RealPoset [.0,1.] -> non empty strict reflexive transitive antisymmetric bounded connected with_suprema with_infima complete distributive Heyting real interval ;
coherence
RealPoset [.0,1.] is interval
proof end;
end;

theorem Th9: :: LFUZZY_0:9
for b1 being non empty set
for b2 being RelStr-yielding non-Empty reflexive-yielding ManySortedSet of b1 st ( for b3 being Element of b1 holds b2 . b3 is sup-Semilattice ) holds
product b2 is with_suprema
proof end;

theorem Th10: :: LFUZZY_0:10
for b1 being non empty set
for b2 being RelStr-yielding non-Empty reflexive-yielding ManySortedSet of b1 st ( for b3 being Element of b1 holds b2 . b3 is Semilattice ) holds
product b2 is with_infima
proof end;

theorem Th11: :: LFUZZY_0:11
for b1 being non empty set
for b2 being RelStr-yielding non-Empty reflexive-yielding ManySortedSet of b1 st ( for b3 being Element of b1 holds b2 . b3 is Semilattice ) holds
for b3, b4 being Element of (product b2)
for b5 being Element of b1 holds (b3 "/\" b4) . b5 = (b3 . b5) "/\" (b4 . b5)
proof end;

theorem Th12: :: LFUZZY_0:12
for b1 being non empty set
for b2 being RelStr-yielding non-Empty reflexive-yielding ManySortedSet of b1 st ( for b3 being Element of b1 holds b2 . b3 is sup-Semilattice ) holds
for b3, b4 being Element of (product b2)
for b5 being Element of b1 holds (b3 "\/" b4) . b5 = (b3 . b5) "\/" (b4 . b5)
proof end;

theorem Th13: :: LFUZZY_0:13
for b1 being non empty set
for b2 being RelStr-yielding non-Empty reflexive-yielding ManySortedSet of b1 st ( for b3 being Element of b1 holds b2 . b3 is complete Heyting LATTICE ) holds
( product b2 is complete & product b2 is Heyting )
proof end;

registration
let c1 be non empty set ;
let c2 be complete Heyting LATTICE;
cluster a2 |^ a1 -> Heyting ;
coherence
c2 |^ c1 is Heyting
proof end;
end;

definition
let c1 be non empty set ;
func FuzzyLattice c1 -> complete Heyting LATTICE equals :: LFUZZY_0:def 4
(RealPoset [.0,1.]) |^ a1;
coherence
(RealPoset [.0,1.]) |^ c1 is complete Heyting LATTICE
;
end;

:: deftheorem Def4 defines FuzzyLattice LFUZZY_0:def 4 :
for b1 being non empty set holds FuzzyLattice b1 = (RealPoset [.0,1.]) |^ b1;

theorem Th14: :: LFUZZY_0:14
for b1 being non empty set holds the carrier of (FuzzyLattice b1) = Funcs b1,[.0,1.]
proof end;

Lemma18: for b1 being non empty set holds FuzzyLattice b1 is constituted-Functions
proof end;

registration
let c1 be non empty set ;
cluster FuzzyLattice a1 -> complete Heyting constituted-Functions ;
coherence
FuzzyLattice c1 is constituted-Functions
by Lemma18;
end;

theorem Th15: :: LFUZZY_0:15
for b1 being complete Heyting LATTICE
for b2 being Subset of b1
for b3 being Element of b1 holds ("\/" b2,b1) "/\" b3 = "\/" { (b4 "/\" b3) where B is Element of b1 : b4 in b2 } ,b1
proof end;

Lemma20: for b1 being non empty set
for b2 being Element of (FuzzyLattice b1) holds b2 is Membership_Func of b1
proof end;

definition
let c1 be non empty set ;
let c2 be Element of (FuzzyLattice c1);
func @ c2 -> Membership_Func of a1 equals :: LFUZZY_0:def 5
a2;
coherence
c2 is Membership_Func of c1
by Lemma20;
end;

:: deftheorem Def5 defines @ LFUZZY_0:def 5 :
for b1 being non empty set
for b2 being Element of (FuzzyLattice b1) holds @ b2 = b2;

Lemma21: for b1 being non empty set
for b2 being Membership_Func of b1 holds b2 is Element of (FuzzyLattice b1)
proof end;

definition
let c1 be non empty set ;
let c2 be Membership_Func of c1;
func c1,c2 @ -> Element of (FuzzyLattice a1) equals :: LFUZZY_0:def 6
a2;
coherence
c2 is Element of (FuzzyLattice c1)
by Lemma21;
end;

:: deftheorem Def6 defines @ LFUZZY_0:def 6 :
for b1 being non empty set
for b2 being Membership_Func of b1 holds b1,b2 @ = b2;

definition
let c1 be non empty set ;
let c2 be Membership_Func of c1;
let c3 be Element of c1;
redefine func . as c2 . c3 -> Element of (RealPoset [.0,1.]);
coherence
c2 . c3 is Element of (RealPoset [.0,1.])
proof end;
end;

definition
let c1 be non empty set ;
let c2 be Element of (FuzzyLattice c1);
let c3 be Element of c1;
redefine func . as c2 . c3 -> Element of (RealPoset [.0,1.]);
coherence
c2 . c3 is Element of (RealPoset [.0,1.])
proof end;
end;

theorem Th16: :: LFUZZY_0:16
for b1 being non empty set
for b2, b3 being Membership_Func of b1 holds
( ( for b4 being Element of b1 holds b2 . b4 <R= b3 . b4 ) iff b1,b2 @ <<= b1,b3 @ )
proof end;

theorem Th17: :: LFUZZY_0:17
for b1 being non empty set
for b2, b3 being Element of (FuzzyLattice b1) holds
( b2 <<= b3 iff for b4 being Element of b1 holds (@ b2) . b4 <R= (@ b3) . b4 )
proof end;

theorem Th18: :: LFUZZY_0:18
for b1 being non empty set
for b2, b3 being Membership_Func of b1 holds max b2,b3 = (b1,b2 @ ) "\/" (b1,b3 @ )
proof end;

theorem Th19: :: LFUZZY_0:19
for b1 being non empty set
for b2, b3 being Element of (FuzzyLattice b1) holds b2 "\/" b3 = max (@ b2),(@ b3)
proof end;

theorem Th20: :: LFUZZY_0:20
for b1 being non empty set
for b2, b3 being Membership_Func of b1 holds min b2,b3 = (b1,b2 @ ) "/\" (b1,b3 @ )
proof end;

theorem Th21: :: LFUZZY_0:21
for b1 being non empty set
for b2, b3 being Element of (FuzzyLattice b1) holds b2 "/\" b3 = min (@ b2),(@ b3)
proof end;

scheme :: LFUZZY_0:sch 1
s1{ F1() -> complete LATTICE, F2() -> non empty set , F3() -> non empty set , F4( set , set ) -> Element of F1(), P1[ set ], P2[ set ] } :
"\/" { ("\/" { F4(b1,b2) where B is Element of F3() : P2[b2] } ,F1()) where B is Element of F2() : P1[b1] } ,F1() = "\/" { F4(b1,b2) where B is Element of F2(), B is Element of F3() : ( P1[b1] & P2[b2] ) } ,F1()
proof end;

scheme :: LFUZZY_0:sch 2
s2{ F1() -> complete LATTICE, F2() -> non empty set , F3() -> non empty set , F4( set , set ) -> Element of F1(), P1[ set ], P2[ set ] } :
"\/" { ("\/" { F4(b2,b1) where B is Element of F2() : P1[b2] } ,F1()) where B is Element of F3() : P2[b1] } ,F1() = "\/" { F4(b1,b2) where B is Element of F2(), B is Element of F3() : ( P1[b1] & P2[b2] ) } ,F1()
proof end;

scheme :: LFUZZY_0:sch 3
s3{ F1() -> non empty set , F2() -> non empty set , F3( set , set ) -> set , F4( set , set ) -> set , P1[ set , set ] } :
{ F3(b1,b2) where B is Element of F1(), B is Element of F2() : P1[b1,b2] } = { F4(b1,b2) where B is Element of F1(), B is Element of F2() : P1[b1,b2] }
provided
E25: for b1 being Element of F1()
for b2 being Element of F2() st P1[b1,b2] holds
F3(b1,b2) = F4(b1,b2)
proof end;

scheme :: LFUZZY_0:sch 4
s4{ F1() -> non empty set , F2() -> non empty set , F3( set , set ) -> set , F4( set , set ) -> set , P1[ set , set ], P2[ set , set ] } :
{ F3(b1,b2) where B is Element of F1(), B is Element of F2() : P1[b1,b2] } = { F4(b1,b2) where B is Element of F1(), B is Element of F2() : P2[b1,b2] }
provided
E25: for b1 being Element of F1()
for b2 being Element of F2() holds
( P1[b1,b2] iff P2[b1,b2] ) and
E26: for b1 being Element of F1()
for b2 being Element of F2() st P1[b1,b2] holds
F3(b1,b2) = F4(b1,b2)
proof end;

scheme :: LFUZZY_0:sch 5
s5{ F1() -> complete LATTICE, F2() -> non empty set , F3() -> non empty set , F4( set , set ) -> Element of F1(), F5( set , set ) -> Element of F1(), P1[ set ], P2[ set ] } :
"\/" { ("\/" { F4(b1,b2) where B is Element of F3() : P2[b2] } ,F1()) where B is Element of F2() : P1[b1] } ,F1() = "\/" { ("\/" { F5(b2,b1) where B is Element of F2() : P1[b2] } ,F1()) where B is Element of F3() : P2[b1] } ,F1()
provided
E25: for b1 being Element of F2()
for b2 being Element of F3() st P1[b1] & P2[b2] holds
F4(b1,b2) = F5(b1,b2)
proof end;

Lemma25: for b1 being Element of (RealPoset [.0,1.]) holds b1 is Real
proof end;

Lemma26: for b1, b2, b3 being non empty set
for b4 being RMembership_Func of b1,b2
for b5 being RMembership_Func of b2,b3
for b6 being Element of b1
for b7 being Element of b3 holds
( rng (min b4,b5,b6,b7) = { ((b4 . [b6,b8]) "/\" (b5 . [b8,b7])) where B is Element of b2 : verum } & rng (min b4,b5,b6,b7) <> {} )
proof end;

theorem Th22: :: LFUZZY_0:22
for b1, b2, b3 being non empty set
for b4 being RMembership_Func of b1,b2
for b5 being RMembership_Func of b2,b3
for b6 being Element of b1
for b7 being Element of b3 holds (b4 (#) b5) . [b6,b7] = "\/" { ((b4 . [b6,b8]) "/\" (b5 . [b8,b7])) where B is Element of b2 : verum } ,(RealPoset [.0,1.])
proof end;

Lemma28: for b1, b2, b3 being non empty set
for b4 being RMembership_Func of b1,b2
for b5 being RMembership_Func of b2,b3
for b6 being Element of b1
for b7 being Element of b3
for b8 being Element of (RealPoset [.0,1.]) holds ((b4 (#) b5) . [b6,b7]) "/\" b8 = "\/" { (((b4 . [b6,b9]) "/\" (b5 . [b9,b7])) "/\" b8) where B is Element of b2 : verum } ,(RealPoset [.0,1.])
proof end;

Lemma29: for b1, b2, b3 being non empty set
for b4 being RMembership_Func of b1,b2
for b5 being RMembership_Func of b2,b3
for b6 being Element of b1
for b7 being Element of b3
for b8 being Element of (RealPoset [.0,1.]) holds b8 "/\" ((b4 (#) b5) . [b6,b7]) = "\/" { ((b8 "/\" (b4 . [b6,b9])) "/\" (b5 . [b9,b7])) where B is Element of b2 : verum } ,(RealPoset [.0,1.])
proof end;

theorem Th23: :: LFUZZY_0:23
for b1, b2, b3, b4 being non empty set
for b5 being RMembership_Func of b1,b2
for b6 being RMembership_Func of b2,b3
for b7 being RMembership_Func of b3,b4 holds (b5 (#) b6) (#) b7 = b5 (#) (b6 (#) b7)
proof end;