:: PENCIL_3 semantic presentation

theorem Th1: :: PENCIL_3:1
for b1 being non empty non void TopStruct
for b2 being Collineation of b1
for b3, b4 being Point of b1 st b3,b4 are_collinear holds
b2 . b3,b2 . b4 are_collinear
proof end;

theorem Th2: :: PENCIL_3:2
for b1 being non empty set
for b2 being Element of b1
for b3 being 1-sorted-yielding non-Trivial-yielding ManySortedSet of b1 holds not b3 . b2 is trivial
proof end;

theorem Th3: :: PENCIL_3:3
for b1 being non void identifying_close_blocks TopStruct st b1 is strongly_connected holds
b1 is without_isolated_points
proof end;

theorem Th4: :: PENCIL_3:4
for b1 being non empty non void identifying_close_blocks TopStruct st b1 is strongly_connected holds
b1 is connected
proof end;

theorem Th5: :: PENCIL_3:5
for b1 being non void non degenerated TopStruct
for b2 being Block of b1 holds
not for b3 being Point of b1 holds b3 in b2
proof end;

theorem Th6: :: PENCIL_3:6
for b1 being non empty set
for b2 being non-Empty TopStruct-yielding ManySortedSet of b1
for b3 being Point of (Segre_Product b2) holds b3 is Element of Carrier b2
proof end;

theorem Th7: :: PENCIL_3:7
for b1 being non empty set
for b2 being 1-sorted-yielding ManySortedSet of b1
for b3 being Element of b1 holds (Carrier b2) . b3 = [#] (b2 . b3)
proof end;

theorem Th8: :: PENCIL_3:8
for b1 being non empty set
for b2 being Element of b1
for b3 being TopStruct-yielding non-Trivial-yielding ManySortedSet of b1 ex b4 being non trivial-yielding Segre-like ManySortedSubset of Carrier b3 st
( indx b4 = b2 & product b4 is Segre-Coset of b3 )
proof end;

theorem Th9: :: PENCIL_3:9
for b1 being non empty set
for b2 being Element of b1
for b3 being TopStruct-yielding non-Trivial-yielding ManySortedSet of b1
for b4 being Point of (Segre_Product b3) ex b5 being non trivial-yielding Segre-like ManySortedSubset of Carrier b3 st
( indx b5 = b2 & product b5 is Segre-Coset of b3 & b4 in product b5 )
proof end;

theorem Th10: :: PENCIL_3:10
for b1 being non empty set
for b2 being TopStruct-yielding non-Trivial-yielding ManySortedSet of b1
for b3 being non trivial-yielding Segre-like ManySortedSubset of Carrier b2 st product b3 is Segre-Coset of b2 holds
b3 . (indx b3) = [#] (b2 . (indx b3))
proof end;

theorem Th11: :: PENCIL_3:11
for b1 being non empty set
for b2 being TopStruct-yielding non-Trivial-yielding ManySortedSet of b1
for b3, b4 being non trivial-yielding Segre-like ManySortedSubset of Carrier b2 st product b3 is Segre-Coset of b2 & product b4 is Segre-Coset of b2 & indx b3 = indx b4 & product b3 meets product b4 holds
b3 = b4
proof end;

theorem Th12: :: PENCIL_3:12
for b1 being non empty set
for b2 being PLS-yielding ManySortedSet of b1
for b3 being non trivial-yielding Segre-like ManySortedSubset of Carrier b2
for b4 being Block of (b2 . (indx b3)) holds product (b3 +* (indx b3),b4) is Block of (Segre_Product b2)
proof end;

theorem Th13: :: PENCIL_3:13
for b1 being non empty set
for b2 being PLS-yielding ManySortedSet of b1
for b3 being Element of b1
for b4 being Point of (b2 . b3)
for b5 being non trivial-yielding Segre-like ManySortedSubset of Carrier b2 st b3 <> indx b5 holds
b5 +* b3,{b4} is non trivial-yielding Segre-like ManySortedSubset of Carrier b2
proof end;

theorem Th14: :: PENCIL_3:14
for b1 being non empty set
for b2 being PLS-yielding ManySortedSet of b1
for b3 being Element of b1
for b4 being Subset of (b2 . b3)
for b5 being non trivial-yielding Segre-like ManySortedSubset of Carrier b2 holds product (b5 +* b3,b4) is Subset of (Segre_Product b2)
proof end;

theorem Th15: :: PENCIL_3:15
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3 being Element of b1 holds
( not {b2} . b3 is empty & {b2} . b3 is trivial )
proof end;

theorem Th16: :: PENCIL_3:16
for b1 being non empty set
for b2 being Element of b1
for b3 being PLS-yielding ManySortedSet of b1
for b4 being Block of (b3 . b2)
for b5 being Element of Carrier b3 holds product ({b5} +* b2,b4) is Block of (Segre_Product b3)
proof end;

theorem Th17: :: PENCIL_3:17
for b1 being non empty set
for b2 being PLS-yielding ManySortedSet of b1
for b3, b4 being Point of (Segre_Product b2) st b3 <> b4 holds
( b3,b4 are_collinear iff for b5, b6 being ManySortedSet of b1 st b5 = b3 & b6 = b4 holds
ex b7 being Element of b1 st
( ( for b8, b9 being Point of (b2 . b7) st b8 = b5 . b7 & b9 = b6 . b7 holds
( b8 <> b9 & b8,b9 are_collinear ) ) & ( for b8 being Element of b1 st b8 <> b7 holds
b5 . b8 = b6 . b8 ) ) )
proof end;

theorem Th18: :: PENCIL_3:18
for b1 being non empty set
for b2 being PLS-yielding ManySortedSet of b1
for b3 being non trivial-yielding Segre-like ManySortedSubset of Carrier b2
for b4 being Point of (b2 . (indx b3)) ex b5 being ManySortedSet of b1 st
( b5 in product b3 & {(b5 +* (indx b3),b4)} = product (b3 +* (indx b3),{b4}) )
proof end;

definition
let c1 be non empty finite set ;
let c2, c3 be ManySortedSet of c1;
func diff c2,c3 -> Nat equals :: PENCIL_3:def 1
Card { b1 where B is Element of a1 : a2 . b1 <> a3 . b1 } ;
correctness
coherence
Card { b1 where B is Element of c1 : c2 . b1 <> c3 . b1 } is Nat
;
proof end;
end;

:: deftheorem Def1 defines diff PENCIL_3:def 1 :
for b1 being non empty finite set
for b2, b3 being ManySortedSet of b1 holds diff b2,b3 = Card { b4 where B is Element of b1 : b2 . b4 <> b3 . b4 } ;

theorem Th19: :: PENCIL_3:19
for b1 being non empty finite set
for b2, b3 being ManySortedSet of b1
for b4 being Element of b1 st b2 . b4 <> b3 . b4 holds
diff b2,b3 = (diff b2,(b3 +* b4,(b2 . b4))) + 1
proof end;

definition
let c1 be non empty set ;
let c2 be PLS-yielding ManySortedSet of c1;
let c3, c4 be Segre-Coset of c2;
pred c3 '||' c4 means :Def2: :: PENCIL_3:def 2
for b1 being Point of (Segre_Product a2) st b1 in a3 holds
ex b2 being Point of (Segre_Product a2) st
( b2 in a4 & b1,b2 are_collinear );
end;

:: deftheorem Def2 defines '||' PENCIL_3:def 2 :
for b1 being non empty set
for b2 being PLS-yielding ManySortedSet of b1
for b3, b4 being Segre-Coset of b2 holds
( b3 '||' b4 iff for b5 being Point of (Segre_Product b2) st b5 in b3 holds
ex b6 being Point of (Segre_Product b2) st
( b6 in b4 & b5,b6 are_collinear ) );

theorem Th20: :: PENCIL_3:20
for b1 being non empty set
for b2 being PLS-yielding ManySortedSet of b1
for b3, b4 being Segre-Coset of b2 st b3 '||' b4 holds
for b5 being Collineation of (Segre_Product b2)
for b6, b7 being Segre-Coset of b2 st b6 = b5 .: b3 & b7 = b5 .: b4 holds
b6 '||' b7
proof end;

theorem Th21: :: PENCIL_3:21
for b1 being non empty set
for b2 being PLS-yielding ManySortedSet of b1
for b3, b4 being Segre-Coset of b2 st b3 misses b4 holds
( b3 '||' b4 iff for b5, b6 being non trivial-yielding Segre-like ManySortedSubset of Carrier b2 st b3 = product b5 & b4 = product b6 holds
( indx b5 = indx b6 & ex b7 being Element of b1 st
( b7 <> indx b5 & ( for b8 being Element of b1 st b8 <> b7 holds
b5 . b8 = b6 . b8 ) & ( for b8, b9 being Point of (b2 . b7) st b5 . b7 = {b8} & b6 . b7 = {b9} holds
b8,b9 are_collinear ) ) ) )
proof end;

theorem Th22: :: PENCIL_3:22
for b1 being non empty finite set
for b2 being PLS-yielding ManySortedSet of b1 st ( for b3 being Element of b1 holds b2 . b3 is connected ) holds
for b3 being Element of b1
for b4 being Point of (b2 . b3)
for b5, b6 being non trivial-yielding Segre-like ManySortedSubset of Carrier b2 st product b5 is Segre-Coset of b2 & product b6 is Segre-Coset of b2 & b5 = b6 +* b3,{b4} & not b4 in b6 . b3 holds
ex b7 being FinSequence of bool the carrier of (Segre_Product b2) st
( b7 . 1 = product b5 & b7 . (len b7) = product b6 & ( for b8 being Nat st b8 in dom b7 holds
b7 . b8 is Segre-Coset of b2 ) & ( for b8 being Nat st 1 <= b8 & b8 < len b7 holds
for b9, b10 being Segre-Coset of b2 st b9 = b7 . b8 & b10 = b7 . (b8 + 1) holds
( b9 misses b10 & b9 '||' b10 ) ) )
proof end;

theorem Th23: :: PENCIL_3:23
for b1 being non empty finite set
for b2 being PLS-yielding ManySortedSet of b1 st ( for b3 being Element of b1 holds b2 . b3 is connected ) holds
for b3, b4 being Segre-Coset of b2 st b3 misses b4 holds
for b5, b6 being non trivial-yielding Segre-like ManySortedSubset of Carrier b2 st b3 = product b5 & b4 = product b6 holds
( indx b5 = indx b6 iff ex b7 being FinSequence of bool the carrier of (Segre_Product b2) st
( b7 . 1 = b3 & b7 . (len b7) = b4 & ( for b8 being Nat st b8 in dom b7 holds
b7 . b8 is Segre-Coset of b2 ) & ( for b8 being Nat st 1 <= b8 & b8 < len b7 holds
for b9, b10 being Segre-Coset of b2 st b9 = b7 . b8 & b10 = b7 . (b8 + 1) holds
( b9 misses b10 & b9 '||' b10 ) ) ) )
proof end;

theorem Th24: :: PENCIL_3:24
for b1 being non empty finite set
for b2 being PLS-yielding ManySortedSet of b1 st ( for b3 being Element of b1 holds b2 . b3 is strongly_connected ) holds
for b3 being Collineation of (Segre_Product b2)
for b4, b5 being Segre-Coset of b2
for b6, b7, b8, b9 being non trivial-yielding Segre-like ManySortedSubset of Carrier b2 st b4 = product b6 & b5 = product b7 & b3 .: b4 = product b8 & b3 .: b5 = product b9 & indx b6 = indx b7 holds
indx b8 = indx b9
proof end;

theorem Th25: :: PENCIL_3:25
for b1 being non empty finite set
for b2 being PLS-yielding ManySortedSet of b1 st ( for b3 being Element of b1 holds b2 . b3 is strongly_connected ) holds
for b3 being Collineation of (Segre_Product b2) ex b4 being Permutation of b1 st
for b5, b6 being Element of b1 holds
( b4 . b5 = b6 iff for b7 being Segre-Coset of b2
for b8, b9 being non trivial-yielding Segre-like ManySortedSubset of Carrier b2 st b7 = product b8 & b3 .: b7 = product b9 & indx b8 = b5 holds
indx b9 = b6 )
proof end;

definition
let c1 be non empty finite set ;
let c2 be PLS-yielding ManySortedSet of c1;
assume E26: for b1 being Element of c1 holds c2 . b1 is strongly_connected ;
let c3 be Collineation of (Segre_Product c2);
func permutation_of_indices c3 -> Permutation of a1 means :Def3: :: PENCIL_3:def 3
for b1, b2 being Element of a1 holds
( a4 . b1 = b2 iff for b3 being Segre-Coset of a2
for b4, b5 being non trivial-yielding Segre-like ManySortedSubset of Carrier a2 st b3 = product b4 & a3 .: b3 = product b5 & indx b4 = b1 holds
indx b5 = b2 );
existence
ex b1 being Permutation of c1 st
for b2, b3 being Element of c1 holds
( b1 . b2 = b3 iff for b4 being Segre-Coset of c2
for b5, b6 being non trivial-yielding Segre-like ManySortedSubset of Carrier c2 st b4 = product b5 & c3 .: b4 = product b6 & indx b5 = b2 holds
indx b6 = b3 )
by E26, Th25;
uniqueness
for b1, b2 being Permutation of c1 st ( for b3, b4 being Element of c1 holds
( b1 . b3 = b4 iff for b5 being Segre-Coset of c2
for b6, b7 being non trivial-yielding Segre-like ManySortedSubset of Carrier c2 st b5 = product b6 & c3 .: b5 = product b7 & indx b6 = b3 holds
indx b7 = b4 ) ) & ( for b3, b4 being Element of c1 holds
( b2 . b3 = b4 iff for b5 being Segre-Coset of c2
for b6, b7 being non trivial-yielding Segre-like ManySortedSubset of Carrier c2 st b5 = product b6 & c3 .: b5 = product b7 & indx b6 = b3 holds
indx b7 = b4 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def3 defines permutation_of_indices PENCIL_3:def 3 :
for b1 being non empty finite set
for b2 being PLS-yielding ManySortedSet of b1 st ( for b3 being Element of b1 holds b2 . b3 is strongly_connected ) holds
for b3 being Collineation of (Segre_Product b2)
for b4 being Permutation of b1 holds
( b4 = permutation_of_indices b3 iff for b5, b6 being Element of b1 holds
( b4 . b5 = b6 iff for b7 being Segre-Coset of b2
for b8, b9 being non trivial-yielding Segre-like ManySortedSubset of Carrier b2 st b7 = product b8 & b3 .: b7 = product b9 & indx b8 = b5 holds
indx b9 = b6 ) );

definition
let c1 be non empty finite set ;
let c2 be PLS-yielding ManySortedSet of c1;
assume E27: for b1 being Element of c1 holds c2 . b1 is strongly_connected ;
let c3 be Collineation of (Segre_Product c2);
let c4 be non trivial-yielding Segre-like ManySortedSubset of Carrier c2;
assume E28: product c4 is Segre-Coset of c2 ;
func canonical_embedding c3,c4 -> Function of (a2 . (indx a4)),(a2 . ((permutation_of_indices a3) . (indx a4))) means :Def4: :: PENCIL_3:def 4
( a5 is isomorphic & ( for b1 being ManySortedSet of a1 st b1 is Point of (Segre_Product a2) & b1 in product a4 holds
for b2 being ManySortedSet of a1 st b2 = a3 . b1 holds
b2 . ((permutation_of_indices a3) . (indx a4)) = a5 . (b1 . (indx a4)) ) );
existence
ex b1 being Function of (c2 . (indx c4)),(c2 . ((permutation_of_indices c3) . (indx c4))) st
( b1 is isomorphic & ( for b2 being ManySortedSet of c1 st b2 is Point of (Segre_Product c2) & b2 in product c4 holds
for b3 being ManySortedSet of c1 st b3 = c3 . b2 holds
b3 . ((permutation_of_indices c3) . (indx c4)) = b1 . (b2 . (indx c4)) ) )
proof end;
uniqueness
for b1, b2 being Function of (c2 . (indx c4)),(c2 . ((permutation_of_indices c3) . (indx c4))) st b1 is isomorphic & ( for b3 being ManySortedSet of c1 st b3 is Point of (Segre_Product c2) & b3 in product c4 holds
for b4 being ManySortedSet of c1 st b4 = c3 . b3 holds
b4 . ((permutation_of_indices c3) . (indx c4)) = b1 . (b3 . (indx c4)) ) & b2 is isomorphic & ( for b3 being ManySortedSet of c1 st b3 is Point of (Segre_Product c2) & b3 in product c4 holds
for b4 being ManySortedSet of c1 st b4 = c3 . b3 holds
b4 . ((permutation_of_indices c3) . (indx c4)) = b2 . (b3 . (indx c4)) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def4 defines canonical_embedding PENCIL_3:def 4 :
for b1 being non empty finite set
for b2 being PLS-yielding ManySortedSet of b1 st ( for b3 being Element of b1 holds b2 . b3 is strongly_connected ) holds
for b3 being Collineation of (Segre_Product b2)
for b4 being non trivial-yielding Segre-like ManySortedSubset of Carrier b2 st product b4 is Segre-Coset of b2 holds
for b5 being Function of (b2 . (indx b4)),(b2 . ((permutation_of_indices b3) . (indx b4))) holds
( b5 = canonical_embedding b3,b4 iff ( b5 is isomorphic & ( for b6 being ManySortedSet of b1 st b6 is Point of (Segre_Product b2) & b6 in product b4 holds
for b7 being ManySortedSet of b1 st b7 = b3 . b6 holds
b7 . ((permutation_of_indices b3) . (indx b4)) = b5 . (b6 . (indx b4)) ) ) );

theorem Th26: :: PENCIL_3:26
for b1 being non empty finite set
for b2 being PLS-yielding ManySortedSet of b1 st ( for b3 being Element of b1 holds b2 . b3 is strongly_connected ) holds
for b3 being Collineation of (Segre_Product b2)
for b4, b5 being Segre-Coset of b2 st b4 misses b5 & b4 '||' b5 holds
for b6, b7 being non trivial-yielding Segre-like ManySortedSubset of Carrier b2 st product b6 = b4 & product b7 = b5 holds
canonical_embedding b3,b6 = canonical_embedding b3,b7
proof end;

theorem Th27: :: PENCIL_3:27
for b1 being non empty finite set
for b2 being PLS-yielding ManySortedSet of b1 st ( for b3 being Element of b1 holds b2 . b3 is strongly_connected ) holds
for b3 being Collineation of (Segre_Product b2)
for b4, b5 being non trivial-yielding Segre-like ManySortedSubset of Carrier b2 st product b4 is Segre-Coset of b2 & product b5 is Segre-Coset of b2 & indx b4 = indx b5 holds
canonical_embedding b3,b4 = canonical_embedding b3,b5
proof end;

definition
let c1 be non empty finite set ;
let c2 be PLS-yielding ManySortedSet of c1;
assume E30: for b1 being Element of c1 holds c2 . b1 is strongly_connected ;
let c3 be Collineation of (Segre_Product c2);
let c4 be Element of c1;
func canonical_embedding c3,c4 -> Function of (a2 . a4),(a2 . ((permutation_of_indices a3) . a4)) means :Def5: :: PENCIL_3:def 5
for b1 being non trivial-yielding Segre-like ManySortedSubset of Carrier a2 st product b1 is Segre-Coset of a2 & indx b1 = a4 holds
a5 = canonical_embedding a3,b1;
existence
ex b1 being Function of (c2 . c4),(c2 . ((permutation_of_indices c3) . c4)) st
for b2 being non trivial-yielding Segre-like ManySortedSubset of Carrier c2 st product b2 is Segre-Coset of c2 & indx b2 = c4 holds
b1 = canonical_embedding c3,b2
proof end;
uniqueness
for b1, b2 being Function of (c2 . c4),(c2 . ((permutation_of_indices c3) . c4)) st ( for b3 being non trivial-yielding Segre-like ManySortedSubset of Carrier c2 st product b3 is Segre-Coset of c2 & indx b3 = c4 holds
b1 = canonical_embedding c3,b3 ) & ( for b3 being non trivial-yielding Segre-like ManySortedSubset of Carrier c2 st product b3 is Segre-Coset of c2 & indx b3 = c4 holds
b2 = canonical_embedding c3,b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def5 defines canonical_embedding PENCIL_3:def 5 :
for b1 being non empty finite set
for b2 being PLS-yielding ManySortedSet of b1 st ( for b3 being Element of b1 holds b2 . b3 is strongly_connected ) holds
for b3 being Collineation of (Segre_Product b2)
for b4 being Element of b1
for b5 being Function of (b2 . b4),(b2 . ((permutation_of_indices b3) . b4)) holds
( b5 = canonical_embedding b3,b4 iff for b6 being non trivial-yielding Segre-like ManySortedSubset of Carrier b2 st product b6 is Segre-Coset of b2 & indx b6 = b4 holds
b5 = canonical_embedding b3,b6 );

theorem Th28: :: PENCIL_3:28
for b1 being non empty finite set
for b2 being PLS-yielding ManySortedSet of b1 st ( for b3 being Element of b1 holds b2 . b3 is strongly_connected ) holds
for b3 being Collineation of (Segre_Product b2) ex b4 being Permutation of b1ex b5 being Function-yielding ManySortedSet of b1 st
for b6 being Element of b1 holds
( b5 . b6 is Function of (b2 . b6),(b2 . (b4 . b6)) & ( for b7 being Function of (b2 . b6),(b2 . (b4 . b6)) st b7 = b5 . b6 holds
b7 is isomorphic ) & ( for b7 being Point of (Segre_Product b2)
for b8 being ManySortedSet of b1 st b8 = b7 holds
for b9 being ManySortedSet of b1 st b9 = b3 . b7 holds
for b10 being Function of (b2 . b6),(b2 . (b4 . b6)) st b10 = b5 . b6 holds
b9 . (b4 . b6) = b10 . (b8 . b6) ) )
proof end;