:: HEYTING2 semantic presentation

registration
let a be set , b be set ;
cluster {[a1,a2]} -> Relation-like Function-like ;
coherence
( {[a,b]} is Function-like & {[a,b]} is Relation-like )
proof end;
end;

theorem Th1: :: HEYTING2:1
for V, C being non empty set ex f being Element of PFuncs V,C st f <> {}
proof end;

theorem Th2: :: HEYTING2:2
for V, C, a, b being set st b in SubstitutionSet V,C & a in b holds
a is finite Function
proof end;

theorem Th3: :: HEYTING2:3
for V, C being set
for f being Element of PFuncs V,C
for g being set st g c= f holds
g in PFuncs V,C
proof end;

Lemma36: for A, B, C being set st A = B \/ C & A c= B holds
A = B
proof end;

theorem Th4: :: HEYTING2:4
for V, C being set holds PFuncs V,C c= bool [:V,C:]
proof end;

theorem Th5: :: HEYTING2:5
for V, C being set st V is finite & C is finite holds
PFuncs V,C is finite
proof end;

registration
cluster non empty functional finite set ;
existence
ex b1 being set st
( b1 is functional & b1 is finite & not b1 is empty )
proof end;
end;

theorem Th6: :: HEYTING2:6
for V, C being set
for a being finite Element of PFuncs V,C holds {a} in SubstitutionSet V,C
proof end;

theorem Th7: :: HEYTING2:7
for V, C being set
for A, B being Element of SubstitutionSet V,C st A ^ B = A holds
for a being set st a in A holds
ex b being set st
( b in B & b c= a )
proof end;

theorem Th8: :: HEYTING2:8
for V, C being set
for A, B being Element of SubstitutionSet V,C st mi (A ^ B) = A holds
for a being set st a in A holds
ex b being set st
( b in B & b c= a )
proof end;

theorem Th9: :: HEYTING2:9
for V, C being set
for A, B being Element of SubstitutionSet V,C st ( for a being set st a in A holds
ex b being set st
( b in B & b c= a ) ) holds
mi (A ^ B) = A
proof end;

definition
let V be set ;
let C be finite set ;
let A be Element of Fin (PFuncs V,C);
func Involved c3 -> set means :Def1: :: HEYTING2:def 1
for x being set holds
( x in it iff ex f being finite Function st
( f in A & x in dom f ) );
existence
ex b1 being set st
for x being set holds
( x in b1 iff ex f being finite Function st
( f in A & x in dom f ) )
proof end;
uniqueness
for b1, b2 being set st ( for x being set holds
( x in b1 iff ex f being finite Function st
( f in A & x in dom f ) ) ) & ( for x being set holds
( x in b2 iff ex f being finite Function st
( f in A & x in dom f ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def1 defines Involved HEYTING2:def 1 :
for V being set
for C being finite set
for A being Element of Fin (PFuncs V,C)
for b4 being set holds
( b4 = Involved A iff for x being set holds
( x in b4 iff ex f being finite Function st
( f in A & x in dom f ) ) );

theorem Th10: :: HEYTING2:10
for V being set
for C being finite set
for A being Element of Fin (PFuncs V,C) holds Involved A c= V
proof end;

Lemma66: for V being set
for C being finite set
for A being non empty Element of Fin (PFuncs V,C) holds Involved A is finite
proof end;

theorem Th11: :: HEYTING2:11
for V being set
for C being finite set
for A being Element of Fin (PFuncs V,C) st A = {} holds
Involved A = {}
proof end;

theorem Th12: :: HEYTING2:12
for V being set
for C being finite set
for A being Element of Fin (PFuncs V,C) holds Involved A is finite
proof end;

theorem Th13: :: HEYTING2:13
for C being finite set
for A being Element of Fin (PFuncs {} ,C) holds Involved A = {}
proof end;

definition
let V be set ;
let C be finite set ;
let A be Element of Fin (PFuncs V,C);
func - c3 -> Element of Fin (PFuncs a1,a2) equals :: HEYTING2:def 2
{ f where f is Element of PFuncs (Involved A),C : for g being Element of PFuncs V,C st g in A holds
not f tolerates g
}
;
coherence
{ f where f is Element of PFuncs (Involved A),C : for g being Element of PFuncs V,C st g in A holds
not f tolerates g
}
is Element of Fin (PFuncs V,C)
proof end;
end;

:: deftheorem Def2 defines - HEYTING2:def 2 :
for V being set
for C being finite set
for A being Element of Fin (PFuncs V,C) holds - A = { f where f is Element of PFuncs (Involved A),C : for g being Element of PFuncs V,C st g in A holds
not f tolerates g
}
;

theorem Th14: :: HEYTING2:14
for V being set
for C being finite set
for A being Element of SubstitutionSet V,C holds A ^ (- A) = {}
proof end;

theorem Th15: :: HEYTING2:15
for V being set
for C being finite set
for A being Element of SubstitutionSet V,C st A = {} holds
- A = {{} }
proof end;

theorem Th16: :: HEYTING2:16
for V being set
for C being finite set
for A being Element of SubstitutionSet V,C st A = {{} } holds
- A = {}
proof end;

theorem Th17: :: HEYTING2:17
for V being set
for C being finite set
for A being Element of SubstitutionSet V,C holds mi (A ^ (- A)) = Bottom (SubstLatt V,C)
proof end;

theorem Th18: :: HEYTING2:18
for V being non empty set
for C being non empty finite set
for A being Element of SubstitutionSet V,C st A = {} holds
mi (- A) = Top (SubstLatt V,C)
proof end;

theorem Th19: :: HEYTING2:19
for V being set
for C being finite set
for A being Element of SubstitutionSet V,C
for a being Element of PFuncs V,C
for B being Element of SubstitutionSet V,C st B = {a} & A ^ B = {} holds
ex b being finite set st
( b in - A & b c= a )
proof end;

definition
let V be set ;
let C be finite set ;
let A be Element of Fin (PFuncs V,C), B be Element of Fin (PFuncs V,C);
func c3 =>> c4 -> Element of Fin (PFuncs a1,a2) equals :: HEYTING2:def 3
(PFuncs V,C) /\ { (union { ((f . i) \ i) where i is Element of PFuncs V,C : i in A } ) where f is Element of PFuncs A,B : dom f = A } ;
coherence
(PFuncs V,C) /\ { (union { ((f . i) \ i) where i is Element of PFuncs V,C : i in A } ) where f is Element of PFuncs A,B : dom f = A } is Element of Fin (PFuncs V,C)
proof end;
end;

:: deftheorem Def3 defines =>> HEYTING2:def 3 :
for V being set
for C being finite set
for A, B being Element of Fin (PFuncs V,C) holds A =>> B = (PFuncs V,C) /\ { (union { ((f . i) \ i) where i is Element of PFuncs V,C : i in A } ) where f is Element of PFuncs A,B : dom f = A } ;

theorem Th20: :: HEYTING2:20
for V being set
for C being finite set
for A, B being Element of Fin (PFuncs V,C)
for s being set st s in A =>> B holds
ex f being PartFunc of A,B st
( s = union { ((f . i) \ i) where i is Element of PFuncs V,C : i in A } & dom f = A )
proof end;

Lemma100: for a, V being set
for C being finite set
for A being Element of Fin (PFuncs V,C)
for K being Element of SubstitutionSet V,C st a in A ^ (A =>> K) holds
ex b being set st
( b in K & b c= a )
proof end;

theorem Th21: :: HEYTING2:21
for V being set
for C being finite set
for A being Element of Fin (PFuncs V,C) st A = {} holds
A =>> A = {{} }
proof end;

Lemma103: for V being set
for C being finite set
for K being Element of SubstitutionSet V,C
for X being set st X c= K holds
X in SubstitutionSet V,C
proof end;

theorem Th22: :: HEYTING2:22
for V being set
for C being finite set
for u being Element of (SubstLatt V,C)
for X being set st X c= u holds
X is Element of (SubstLatt V,C)
proof end;

definition
let V be set ;
let C be finite set ;
func pseudo_compl c1,c2 -> UnOp of the carrier of (SubstLatt a1,a2) means :Def4: :: HEYTING2:def 4
for u being Element of (SubstLatt V,C)
for u' being Element of SubstitutionSet V,C st u' = u holds
it . u = mi (- u');
existence
ex b1 being UnOp of the carrier of (SubstLatt V,C) st
for u being Element of (SubstLatt V,C)
for u' being Element of SubstitutionSet V,C st u' = u holds
b1 . u = mi (- u')
proof end;
correctness
uniqueness
for b1, b2 being UnOp of the carrier of (SubstLatt V,C) st ( for u being Element of (SubstLatt V,C)
for u' being Element of SubstitutionSet V,C st u' = u holds
b1 . u = mi (- u') ) & ( for u being Element of (SubstLatt V,C)
for u' being Element of SubstitutionSet V,C st u' = u holds
b2 . u = mi (- u') ) holds
b1 = b2
;
proof end;
func StrongImpl c1,c2 -> BinOp of the carrier of (SubstLatt a1,a2) means :Def5: :: HEYTING2:def 5
for u, v being Element of (SubstLatt V,C)
for u', v' being Element of SubstitutionSet V,C st u' = u & v' = v holds
it . u,v = mi (u' =>> v');
existence
ex b1 being BinOp of the carrier of (SubstLatt V,C) st
for u, v being Element of (SubstLatt V,C)
for u', v' being Element of SubstitutionSet V,C st u' = u & v' = v holds
b1 . u,v = mi (u' =>> v')
proof end;
correctness
uniqueness
for b1, b2 being BinOp of the carrier of (SubstLatt V,C) st ( for u, v being Element of (SubstLatt V,C)
for u', v' being Element of SubstitutionSet V,C st u' = u & v' = v holds
b1 . u,v = mi (u' =>> v') ) & ( for u, v being Element of (SubstLatt V,C)
for u', v' being Element of SubstitutionSet V,C st u' = u & v' = v holds
b2 . u,v = mi (u' =>> v') ) holds
b1 = b2
;
proof end;
let u be Element of (SubstLatt V,C);
func SUB c3 -> Element of Fin the carrier of (SubstLatt a1,a2) equals :: HEYTING2:def 6
bool u;
coherence
bool u is Element of Fin the carrier of (SubstLatt V,C)
proof end;
correctness
;
func diff c3 -> UnOp of the carrier of (SubstLatt a1,a2) means :Def7: :: HEYTING2:def 7
for v being Element of (SubstLatt V,C) holds it . v = u \ v;
existence
ex b1 being UnOp of the carrier of (SubstLatt V,C) st
for v being Element of (SubstLatt V,C) holds b1 . v = u \ v
proof end;
correctness
uniqueness
for b1, b2 being UnOp of the carrier of (SubstLatt V,C) st ( for v being Element of (SubstLatt V,C) holds b1 . v = u \ v ) & ( for v being Element of (SubstLatt V,C) holds b2 . v = u \ v ) holds
b1 = b2
;
proof end;
end;

:: deftheorem Def4 defines pseudo_compl HEYTING2:def 4 :
for V being set
for C being finite set
for b3 being UnOp of the carrier of (SubstLatt V,C) holds
( b3 = pseudo_compl V,C iff for u being Element of (SubstLatt V,C)
for u' being Element of SubstitutionSet V,C st u' = u holds
b3 . u = mi (- u') );

:: deftheorem Def5 defines StrongImpl HEYTING2:def 5 :
for V being set
for C being finite set
for b3 being BinOp of the carrier of (SubstLatt V,C) holds
( b3 = StrongImpl V,C iff for u, v being Element of (SubstLatt V,C)
for u', v' being Element of SubstitutionSet V,C st u' = u & v' = v holds
b3 . u,v = mi (u' =>> v') );

:: deftheorem Def6 defines SUB HEYTING2:def 6 :
for V being set
for C being finite set
for u being Element of (SubstLatt V,C) holds SUB u = bool u;

:: deftheorem Def7 defines diff HEYTING2:def 7 :
for V being set
for C being finite set
for u being Element of (SubstLatt V,C)
for b4 being UnOp of the carrier of (SubstLatt V,C) holds
( b4 = diff u iff for v being Element of (SubstLatt V,C) holds b4 . v = u \ v );

Lemma119: for V being set
for C being finite set
for v, u being Element of (SubstLatt V,C) st v in SUB u holds
v "\/" ((diff u) . v) = u
proof end;

Lemma121: for V being set
for C being finite set
for u being Element of (SubstLatt V,C)
for a being Element of PFuncs V,C
for K being Element of Fin (PFuncs V,C) st a is finite & K = {a} holds
ex v being Element of SubstitutionSet V,C st
( v in SUB u & v ^ K = {} & ( for b being Element of PFuncs V,C st b in (diff u) . v holds
b tolerates a ) )
proof end;

definition
let V be set ;
let C be finite set ;
func Atom c1,c2 -> Function of PFuncs a1,a2,the carrier of (SubstLatt a1,a2) means :Def8: :: HEYTING2:def 8
for a being Element of PFuncs V,C holds it . a = mi {.a.};
existence
ex b1 being Function of PFuncs V,C,the carrier of (SubstLatt V,C) st
for a being Element of PFuncs V,C holds b1 . a = mi {.a.}
proof end;
correctness
uniqueness
for b1, b2 being Function of PFuncs V,C,the carrier of (SubstLatt V,C) st ( for a being Element of PFuncs V,C holds b1 . a = mi {.a.} ) & ( for a being Element of PFuncs V,C holds b2 . a = mi {.a.} ) holds
b1 = b2
;
proof end;
end;

:: deftheorem Def8 defines Atom HEYTING2:def 8 :
for V being set
for C being finite set
for b3 being Function of PFuncs V,C,the carrier of (SubstLatt V,C) holds
( b3 = Atom V,C iff for a being Element of PFuncs V,C holds b3 . a = mi {.a.} );

Lemma128: for V being set
for C being finite set
for a being Element of PFuncs V,C st a is finite holds
(Atom V,C) . a = {a}
proof end;

theorem Th23: :: HEYTING2:23
for V being set
for C being finite set
for K being Element of SubstitutionSet V,C holds FinJoin K,(Atom V,C) = FinUnion K,(singleton (PFuncs V,C))
proof end;

theorem Th24: :: HEYTING2:24
for V being set
for C being finite set
for u being Element of SubstitutionSet V,C holds u = FinJoin u,(Atom V,C)
proof end;

Lemma141: for V being set
for C being finite set
for u, v being Element of (SubstLatt V,C) st ( for a being set st a in u holds
ex b being set st
( b in v & b c= a ) ) holds
u [= v
proof end;

theorem Th25: :: HEYTING2:25
for V being set
for C being finite set
for u, v being Element of (SubstLatt V,C) holds (diff u) . v [= u
proof end;

theorem Th26: :: HEYTING2:26
for V being set
for C being finite set
for a being Element of PFuncs V,C st a is finite holds
for c being set st c in (Atom V,C) . a holds
c = a
proof end;

theorem Th27: :: HEYTING2:27
for V being set
for C being finite set
for u being Element of (SubstLatt V,C)
for K, L being Element of SubstitutionSet V,C
for a being Element of PFuncs V,C st K = {a} & L = u & L ^ K = {} holds
(Atom V,C) . a [= (pseudo_compl V,C) . u
proof end;

theorem Th28: :: HEYTING2:28
for V being set
for C being finite set
for a being finite Element of PFuncs V,C holds a in (Atom V,C) . a
proof end;

Lemma147: for V being set
for C being finite set
for u, v being Element of (SubstLatt V,C) st u [= v holds
for x being set st x in u holds
ex b being set st
( b in v & b c= x )
proof end;

theorem Th29: :: HEYTING2:29
for V being set
for C being finite set
for a being Element of PFuncs V,C
for u, v being Element of SubstitutionSet V,C st ( for c being set st c in u holds
ex b being set st
( b in v & b c= c \/ a ) ) holds
ex b being set st
( b in u =>> v & b c= a )
proof end;

theorem Th30: :: HEYTING2:30
for V being set
for C being finite set
for u, v being Element of (SubstLatt V,C)
for a being finite Element of PFuncs V,C st ( for b being Element of PFuncs V,C st b in u holds
b tolerates a ) & u "/\" ((Atom V,C) . a) [= v holds
(Atom V,C) . a [= (StrongImpl V,C) . u,v
proof end;

deffunc H1( set , set ) -> Relation of [:the carrier of (SubstLatt a1,a2),the carrier of (SubstLatt a1,a2):],the carrier of (SubstLatt a1,a2) = the L_meet of (SubstLatt a1,a2);

theorem Th31: :: HEYTING2:31
for V being set
for C being finite set
for u being Element of (SubstLatt V,C) holds u "/\" ((pseudo_compl V,C) . u) = Bottom (SubstLatt V,C)
proof end;

theorem Th32: :: HEYTING2:32
for V being set
for C being finite set
for u, v being Element of (SubstLatt V,C) holds u "/\" ((StrongImpl V,C) . u,v) [= v
proof end;

E155: now
let V be set ;
let C be finite set ;
let u be Element of (SubstLatt V,C);
let v be Element of (SubstLatt V,C);
deffunc H2( Element of (SubstLatt V,C), Element of (SubstLatt V,C)) -> Element of the carrier of (SubstLatt V,C) = FinJoin (SUB a1),(H1(V,C) .: (pseudo_compl V,C),((StrongImpl V,C) [:] (diff a1),a2));
set Psi = H1(V,C) .: (pseudo_compl V,C),((StrongImpl V,C) [:] (diff u),v);
E21: now
let w be Element of (SubstLatt V,C);
set u2 = (diff u) . w;
set pc = (pseudo_compl V,C) . w;
set si = (StrongImpl V,C) . ((diff u) . w),v;
assume w in SUB u ;
then E24: w "\/" ((diff u) . w) = u by E25;
E25: w "/\" (((pseudo_compl V,C) . w) "/\" ((StrongImpl V,C) . ((diff u) . w),v)) = (w "/\" ((pseudo_compl V,C) . w)) "/\" ((StrongImpl V,C) . ((diff u) . w),v) by LATTICES:def 7
.= (Bottom (SubstLatt V,C)) "/\" ((StrongImpl V,C) . ((diff u) . w),v) by
.= Bottom (SubstLatt V,C) by LATTICES:40 ;
E44: ((diff u) . w) "/\" ((StrongImpl V,C) . ((diff u) . w),v) [= v by Th6;
(H1(V,C) [;] u,(H1(V,C) .: (pseudo_compl V,C),((StrongImpl V,C) [:] (diff u),v))) . w = H1(V,C) . u,((H1(V,C) .: (pseudo_compl V,C),((StrongImpl V,C) [:] (diff u),v)) . w) by FUNCOP_1:66
.= u "/\" ((H1(V,C) .: (pseudo_compl V,C),((StrongImpl V,C) [:] (diff u),v)) . w) by LATTICES:def 2
.= u "/\" (H1(V,C) . ((pseudo_compl V,C) . w),(((StrongImpl V,C) [:] (diff u),v) . w)) by FUNCOP_1:48
.= u "/\" (((pseudo_compl V,C) . w) "/\" (((StrongImpl V,C) [:] (diff u),v) . w)) by LATTICES:def 2
.= u "/\" (((pseudo_compl V,C) . w) "/\" ((StrongImpl V,C) . ((diff u) . w),v)) by FUNCOP_1:60
.= (w "/\" (((pseudo_compl V,C) . w) "/\" ((StrongImpl V,C) . ((diff u) . w),v))) "\/" (((diff u) . w) "/\" (((pseudo_compl V,C) . w) "/\" ((StrongImpl V,C) . ((diff u) . w),v))) by Th9, LATTICES:def 11
.= ((diff u) . w) "/\" (((StrongImpl V,C) . ((diff u) . w),v) "/\" ((pseudo_compl V,C) . w)) by E44, LATTICES:39
.= (((diff u) . w) "/\" ((StrongImpl V,C) . ((diff u) . w),v)) "/\" ((pseudo_compl V,C) . w) by LATTICES:def 7 ;
then (H1(V,C) [;] u,(H1(V,C) .: (pseudo_compl V,C),((StrongImpl V,C) [:] (diff u),v))) . w [= ((diff u) . w) "/\" ((StrongImpl V,C) . ((diff u) . w),v) by LATTICES:23;
hence (H1(V,C) [;] u,(H1(V,C) .: (pseudo_compl V,C),((StrongImpl V,C) [:] (diff u),v))) . w [= v by , LATTICES:25;
end;
u "/\" H2(u,v) = FinJoin (SUB u),(H1(V,C) [;] u,(H1(V,C) .: (pseudo_compl V,C),((StrongImpl V,C) [:] (diff u),v))) by LATTICE2:83;
hence u "/\" H2(u,v) [= v by Th8, LATTICE2:70;
let w be Element of (SubstLatt V,C);
reconsider v' = v as Element of SubstitutionSet V,C by SUBSTLAT:def 4;
E46: v = FinJoin v',(Atom V,C) by ;
then E49: u "/\" v = FinJoin v',(H1(V,C) [;] u,(Atom V,C)) by LATTICE2:83;
assume E50: u "/\" v [= w ;
now
let a be Element of PFuncs V,C;
assume E51: a in v' ;
then (H1(V,C) [;] u,(Atom V,C)) . a [= w by , , LATTICE2:46;
then H1(V,C) . u,((Atom V,C) . a) [= w by FUNCOP_1:66;
then E52: u "/\" ((Atom V,C) . a) [= w by LATTICES:def 2;
reconsider SA = {.a.} as Element of Fin (PFuncs V,C) ;
E53: a is finite by E46, ;
then reconsider SS = {a} as Element of SubstitutionSet V,C by ;
consider v being Element of SubstitutionSet V,C such that
E54: v in SUB u and
E56: v ^ SA = {} and
E57: for b being Element of PFuncs V,C st b in (diff u) . v holds
b tolerates a by , ;
E58: v ^ SS = {} by E50;
reconsider v' = v as Element of (SubstLatt V,C) by SUBSTLAT:def 4;
set dv = (diff u) . v';
(diff u) . v' [= u by Th3;
then ((diff u) . v') "/\" ((Atom V,C) . a) [= u "/\" ((Atom V,C) . a) by LATTICES:27;
then E60: ((diff u) . v') "/\" ((Atom V,C) . a) [= w by , LATTICES:25;
set pf = pseudo_compl V,C;
set sf = (StrongImpl V,C) [:] (diff u),w;
E88: a is finite by E46, ;
E90: (Atom V,C) . a [= (pseudo_compl V,C) . v' by E52, ;
(Atom V,C) . a [= (StrongImpl V,C) . ((diff u) . v'),w by E51, E53, E54, Th5;
then E91: (Atom V,C) . a [= ((StrongImpl V,C) [:] (diff u),w) . v' by FUNCOP_1:60;
((pseudo_compl V,C) . v') "/\" (((StrongImpl V,C) [:] (diff u),w) . v') = H1(V,C) . ((pseudo_compl V,C) . v'),(((StrongImpl V,C) [:] (diff u),w) . v') by LATTICES:def 2
.= (H1(V,C) .: (pseudo_compl V,C),((StrongImpl V,C) [:] (diff u),w)) . v' by FUNCOP_1:48 ;
then (Atom V,C) . a [= (H1(V,C) .: (pseudo_compl V,C),((StrongImpl V,C) [:] (diff u),w)) . v' by , E56, FILTER_0:7;
hence (Atom V,C) . a [= H2(u,w) by E49, LATTICE2:44;
end;
hence v [= H2(u,w) by Th9, LATTICE2:70;
end;

Lemma166: for V being set
for C being finite set holds SubstLatt V,C is implicative
proof end;

registration
let V be set ;
let C be finite set ;
cluster SubstLatt a1,a2 -> implicative ;
coherence
SubstLatt V,C is implicative
by Th8;
end;

theorem Th33: :: HEYTING2:33
for V being set
for C being finite set
for u, v being Element of (SubstLatt V,C) holds u => v = FinJoin (SUB u),(the L_meet of (SubstLatt V,C) .: (pseudo_compl V,C),((StrongImpl V,C) [:] (diff u),v))
proof end;