:: BAGORDER semantic presentation
theorem Th1: :: BAGORDER:1
for b
1, b
2, b
3 being
set holds
( b
3 in b
1 & b
3 in b
2 implies ( b
1 \ {b3} = b
2 \ {b3} iff b
1 = b
2 ) )
theorem Th2: :: BAGORDER:2
for b
1, b
2 being
Nat holds
( b
2 in Seg b
1 iff ( b
2 - 1 is
Nat & b
2 - 1
< b
1 ) )
theorem Th3: :: BAGORDER:3
theorem Th4: :: BAGORDER:4
theorem Th5: :: BAGORDER:5
:: deftheorem Def1 defines -cut BAGORDER:def 1 :
theorem Th6: :: BAGORDER:6
:: deftheorem Def2 defines Fin BAGORDER:def 2 :
theorem Th7: :: BAGORDER:7
theorem Th8: :: BAGORDER:8
theorem Th9: :: BAGORDER:9
:: deftheorem Def3 defines non-increasing BAGORDER:def 3 :
theorem Th10: :: BAGORDER:10
theorem Th11: :: BAGORDER:11
theorem Th12: :: BAGORDER:12
:: deftheorem Def4 defines TotDegree BAGORDER:def 4 :
theorem Th13: :: BAGORDER:13
theorem Th14: :: BAGORDER:14
theorem Th15: :: BAGORDER:15
theorem Th16: :: BAGORDER:16
theorem Th17: :: BAGORDER:17
theorem Th18: :: BAGORDER:18
for b
1, b
2, b
3 being
Natfor b
4, b
5 being
bag of b
3 holds b
1,b
2 -cut (b4 + b5) = (b1,b2 -cut b4) + (b1,b2 -cut b5)
theorem Th19: :: BAGORDER:19
theorem Th20: :: BAGORDER:20
theorem Th21: :: BAGORDER:21
for b
1, b
2 being
Ordinalfor b
3 being
bag of b
1 holds
( b
2 in b
1 implies b
3 | b
2 is
bag of b
2 )
theorem Th22: :: BAGORDER:22
:: deftheorem Def5 BAGORDER:def 5 :
canceled;
:: deftheorem Def6 BAGORDER:def 6 :
canceled;
:: deftheorem Def7 defines admissible BAGORDER:def 7 :
theorem Th23: :: BAGORDER:23
theorem Th24: :: BAGORDER:24
definition
let c
1 be
Ordinal;
func InvLexOrder c
1 -> TermOrder of a
1 means :
Def8:
:: BAGORDER:def 8
for b
1, b
2 being
bag of a
1 holds
(
[b1,b2] in a
2 iff not ( not b
1 = b
2 & ( for b
3 being
Ordinal holds
not ( b
3 in a
1 & b
1 . b
3 < b
2 . b
3 & ( for b
4 being
Ordinal holds
( b
3 in b
4 & b
4 in a
1 implies b
1 . b
4 = b
2 . b
4 ) ) ) ) ) );
existence
ex b1 being TermOrder of c1 st
for b2, b3 being bag of c1 holds
( [b2,b3] in b1 iff not ( not b2 = b3 & ( for b4 being Ordinal holds
not ( b4 in c1 & b2 . b4 < b3 . b4 & ( for b5 being Ordinal holds
( b4 in b5 & b5 in c1 implies b2 . b5 = b3 . b5 ) ) ) ) ) )
uniqueness
for b1, b2 being TermOrder of c1 holds
( ( for b3, b4 being bag of c1 holds
( [b3,b4] in b1 iff not ( not b3 = b4 & ( for b5 being Ordinal holds
not ( b5 in c1 & b3 . b5 < b4 . b5 & ( for b6 being Ordinal holds
( b5 in b6 & b6 in c1 implies b3 . b6 = b4 . b6 ) ) ) ) ) ) ) & ( for b3, b4 being bag of c1 holds
( [b3,b4] in b2 iff not ( not b3 = b4 & ( for b5 being Ordinal holds
not ( b5 in c1 & b3 . b5 < b4 . b5 & ( for b6 being Ordinal holds
( b5 in b6 & b6 in c1 implies b3 . b6 = b4 . b6 ) ) ) ) ) ) ) implies b1 = b2 )
end;
:: deftheorem Def8 defines InvLexOrder BAGORDER:def 8 :
for b
1 being
Ordinalfor b
2 being
TermOrder of b
1 holds
( b
2 = InvLexOrder b
1 iff for b
3, b
4 being
bag of b
1 holds
(
[b3,b4] in b
2 iff not ( not b
3 = b
4 & ( for b
5 being
Ordinal holds
not ( b
5 in b
1 & b
3 . b
5 < b
4 . b
5 & ( for b
6 being
Ordinal holds
( b
5 in b
6 & b
6 in b
1 implies b
3 . b
6 = b
4 . b
6 ) ) ) ) ) ) );
theorem Th25: :: BAGORDER:25
theorem Th26: :: BAGORDER:26
definition
let c
1 be
Ordinal;
let c
2 be
TermOrder of c
1;
assume E26:
for b
1, b
2, b
3 being
bag of c
1 holds
(
[b1,b2] in c
2 implies
[(b1 + b3),(b2 + b3)] in c
2 )
;
func Graded c
2 -> TermOrder of a
1 means :
Def9:
:: BAGORDER:def 9
for b
1, b
2 being
bag of a
1 holds
(
[b1,b2] in a
3 iff not ( not
TotDegree b
1 < TotDegree b
2 & not (
TotDegree b
1 = TotDegree b
2 &
[b1,b2] in a
2 ) ) );
existence
ex b1 being TermOrder of c1 st
for b2, b3 being bag of c1 holds
( [b2,b3] in b1 iff not ( not TotDegree b2 < TotDegree b3 & not ( TotDegree b2 = TotDegree b3 & [b2,b3] in c2 ) ) )
uniqueness
for b1, b2 being TermOrder of c1 holds
( ( for b3, b4 being bag of c1 holds
( [b3,b4] in b1 iff not ( not TotDegree b3 < TotDegree b4 & not ( TotDegree b3 = TotDegree b4 & [b3,b4] in c2 ) ) ) ) & ( for b3, b4 being bag of c1 holds
( [b3,b4] in b2 iff not ( not TotDegree b3 < TotDegree b4 & not ( TotDegree b3 = TotDegree b4 & [b3,b4] in c2 ) ) ) ) implies b1 = b2 )
end;
:: deftheorem Def9 defines Graded BAGORDER:def 9 :
theorem Th27: :: BAGORDER:27
:: deftheorem Def10 defines GrLexOrder BAGORDER:def 10 :
:: deftheorem Def11 defines GrInvLexOrder BAGORDER:def 11 :
theorem Th28: :: BAGORDER:28
theorem Th29: :: BAGORDER:29
theorem Th30: :: BAGORDER:30
theorem Th31: :: BAGORDER:31
definition
let c
1, c
2 be
Nat;
let c
3 be
TermOrder of
(c1 + 1);
let c
4 be
TermOrder of
(c2 -' (c1 + 1));
func BlockOrder c
1,c
2,c
3,c
4 -> TermOrder of a
2 means :
Def12:
:: BAGORDER:def 12
for b
1, b
2 being
bag of a
2 holds
(
[b1,b2] in a
5 iff ( ( 0,
(a1 + 1) -cut b
1 <> 0,
(a1 + 1) -cut b
2 &
[(0,(a1 + 1) -cut b1),(0,(a1 + 1) -cut b2)] in a
3 ) or ( 0,
(a1 + 1) -cut b
1 = 0,
(a1 + 1) -cut b
2 &
[((a1 + 1),a2 -cut b1),((a1 + 1),a2 -cut b2)] in a
4 ) ) );
existence
ex b1 being TermOrder of c2 st
for b2, b3 being bag of c2 holds
( [b2,b3] in b1 iff ( ( 0,(c1 + 1) -cut b2 <> 0,(c1 + 1) -cut b3 & [(0,(c1 + 1) -cut b2),(0,(c1 + 1) -cut b3)] in c3 ) or ( 0,(c1 + 1) -cut b2 = 0,(c1 + 1) -cut b3 & [((c1 + 1),c2 -cut b2),((c1 + 1),c2 -cut b3)] in c4 ) ) )
uniqueness
for b1, b2 being TermOrder of c2 holds
( ( for b3, b4 being bag of c2 holds
( [b3,b4] in b1 iff ( ( 0,(c1 + 1) -cut b3 <> 0,(c1 + 1) -cut b4 & [(0,(c1 + 1) -cut b3),(0,(c1 + 1) -cut b4)] in c3 ) or ( 0,(c1 + 1) -cut b3 = 0,(c1 + 1) -cut b4 & [((c1 + 1),c2 -cut b3),((c1 + 1),c2 -cut b4)] in c4 ) ) ) ) & ( for b3, b4 being bag of c2 holds
( [b3,b4] in b2 iff ( ( 0,(c1 + 1) -cut b3 <> 0,(c1 + 1) -cut b4 & [(0,(c1 + 1) -cut b3),(0,(c1 + 1) -cut b4)] in c3 ) or ( 0,(c1 + 1) -cut b3 = 0,(c1 + 1) -cut b4 & [((c1 + 1),c2 -cut b3),((c1 + 1),c2 -cut b4)] in c4 ) ) ) ) implies b1 = b2 )
end;
:: deftheorem Def12 defines BlockOrder BAGORDER:def 12 :
for b
1, b
2 being
Natfor b
3 being
TermOrder of
(b1 + 1)for b
4 being
TermOrder of
(b2 -' (b1 + 1))for b
5 being
TermOrder of b
2 holds
( b
5 = BlockOrder b
1,b
2,b
3,b
4 iff for b
6, b
7 being
bag of b
2 holds
(
[b6,b7] in b
5 iff ( ( 0,
(b1 + 1) -cut b
6 <> 0,
(b1 + 1) -cut b
7 &
[(0,(b1 + 1) -cut b6),(0,(b1 + 1) -cut b7)] in b
3 ) or ( 0,
(b1 + 1) -cut b
6 = 0,
(b1 + 1) -cut b
7 &
[((b1 + 1),b2 -cut b6),((b1 + 1),b2 -cut b7)] in b
4 ) ) ) );
theorem Th32: :: BAGORDER:32
:: deftheorem Def13 defines NaivelyOrderedBags BAGORDER:def 13 :
theorem Th33: :: BAGORDER:33
theorem Th34: :: BAGORDER:34
theorem Th35: :: BAGORDER:35
definition
let c
1 be non
empty connected Poset;
let c
2 be
Element of
Fin the
carrier of c
1;
assume E34:
not c
2 is
empty
;
func PosetMin c
2 -> Element of a
1 means :: BAGORDER:def 14
( a
3 in a
2 & a
3 is_minimal_wrt a
2,the
InternalRel of a
1 );
existence
ex b1 being Element of c1 st
( b1 in c2 & b1 is_minimal_wrt c2,the InternalRel of c1 )
uniqueness
for b1, b2 being Element of c1 holds
( b1 in c2 & b1 is_minimal_wrt c2,the InternalRel of c1 & b2 in c2 & b2 is_minimal_wrt c2,the InternalRel of c1 implies b1 = b2 )
func PosetMax c
2 -> Element of a
1 means :
Def15:
:: BAGORDER:def 15
( a
3 in a
2 & a
3 is_maximal_wrt a
2,the
InternalRel of a
1 );
existence
ex b1 being Element of c1 st
( b1 in c2 & b1 is_maximal_wrt c2,the InternalRel of c1 )
uniqueness
for b1, b2 being Element of c1 holds
( b1 in c2 & b1 is_maximal_wrt c2,the InternalRel of c1 & b2 in c2 & b2 is_maximal_wrt c2,the InternalRel of c1 implies b1 = b2 )
end;
:: deftheorem Def14 defines PosetMin BAGORDER:def 14 :
:: deftheorem Def15 defines PosetMax BAGORDER:def 15 :
definition
let c
1 be non
empty connected Poset;
func FinOrd-Approx c
1 -> Function of
NAT ,
bool [:(Fin the carrier of a1),(Fin the carrier of a1):] means :
Def16:
:: BAGORDER:def 16
(
dom a
2 = NAT & a
2 . 0
= { [b1,b2] where B is Element of Fin the carrier of a1, B is Element of Fin the carrier of a1 : ( b1 = {} or ( b1 <> {} & b2 <> {} & PosetMax b1 <> PosetMax b2 & [(PosetMax b1),(PosetMax b2)] in the InternalRel of a1 ) ) } & ( for b
1 being
Element of
NAT holds a
2 . (b1 + 1) = { [b2,b3] where B is Element of Fin the carrier of a1, B is Element of Fin the carrier of a1 : ( b2 <> {} & b3 <> {} & PosetMax b2 = PosetMax b3 & [(b2 \ {(PosetMax b2)}),(b3 \ {(PosetMax b3)})] in a2 . b1 ) } ) );
existence
ex b1 being Function of NAT , bool [:(Fin the carrier of c1),(Fin the carrier of c1):] st
( dom b1 = NAT & b1 . 0 = { [b2,b3] where B is Element of Fin the carrier of c1, B is Element of Fin the carrier of c1 : ( b2 = {} or ( b2 <> {} & b3 <> {} & PosetMax b2 <> PosetMax b3 & [(PosetMax b2),(PosetMax b3)] in the InternalRel of c1 ) ) } & ( for b2 being Element of NAT holds b1 . (b2 + 1) = { [b3,b4] where B is Element of Fin the carrier of c1, B is Element of Fin the carrier of c1 : ( b3 <> {} & b4 <> {} & PosetMax b3 = PosetMax b4 & [(b3 \ {(PosetMax b3)}),(b4 \ {(PosetMax b4)})] in b1 . b2 ) } ) )
uniqueness
for b1, b2 being Function of NAT , bool [:(Fin the carrier of c1),(Fin the carrier of c1):] holds
( dom b1 = NAT & b1 . 0 = { [b3,b4] where B is Element of Fin the carrier of c1, B is Element of Fin the carrier of c1 : ( b3 = {} or ( b3 <> {} & b4 <> {} & PosetMax b3 <> PosetMax b4 & [(PosetMax b3),(PosetMax b4)] in the InternalRel of c1 ) ) } & ( for b3 being Element of NAT holds b1 . (b3 + 1) = { [b4,b5] where B is Element of Fin the carrier of c1, B is Element of Fin the carrier of c1 : ( b4 <> {} & b5 <> {} & PosetMax b4 = PosetMax b5 & [(b4 \ {(PosetMax b4)}),(b5 \ {(PosetMax b5)})] in b1 . b3 ) } ) & dom b2 = NAT & b2 . 0 = { [b3,b4] where B is Element of Fin the carrier of c1, B is Element of Fin the carrier of c1 : ( b3 = {} or ( b3 <> {} & b4 <> {} & PosetMax b3 <> PosetMax b4 & [(PosetMax b3),(PosetMax b4)] in the InternalRel of c1 ) ) } & ( for b3 being Element of NAT holds b2 . (b3 + 1) = { [b4,b5] where B is Element of Fin the carrier of c1, B is Element of Fin the carrier of c1 : ( b4 <> {} & b5 <> {} & PosetMax b4 = PosetMax b5 & [(b4 \ {(PosetMax b4)}),(b5 \ {(PosetMax b5)})] in b2 . b3 ) } ) implies b1 = b2 )
end;
:: deftheorem Def16 defines FinOrd-Approx BAGORDER:def 16 :
theorem Th36: :: BAGORDER:36
theorem Th37: :: BAGORDER:37
theorem Th38: :: BAGORDER:38
Lemma39:
for b1 being non empty connected Poset
for b2 being Nat
for b3 being Element of Fin the carrier of b1 holds
( Card b3 = b2 + 1 implies Card (b3 \ {(PosetMax b3)}) = b2 )
theorem Th39: :: BAGORDER:39
:: deftheorem Def17 defines FinOrd BAGORDER:def 17 :
:: deftheorem Def18 defines FinPoset BAGORDER:def 18 :
theorem Th40: :: BAGORDER:40
:: deftheorem Def19 defines MinElement BAGORDER:def 19 :
:: deftheorem Def20 defines SeqShift BAGORDER:def 20 :
theorem Th41: :: BAGORDER:41
theorem Th42: :: BAGORDER:42