File: set.tst

package info (click to toggle)
gap 4r8p6-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 33,476 kB
  • ctags: 7,663
  • sloc: ansic: 108,841; xml: 47,807; sh: 3,628; perl: 2,342; makefile: 796; asm: 62; awk: 6
file content (66 lines) | stat: -rw-r--r-- 1,793 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#############################################################################
##
#W  set.tst                   GAP Library                    Alexander Hulpke
##
##
#Y  Copyright (C)  1996,  Lehrstuhl D für Mathematik,  RWTH Aachen,  Germany
##
##  Exclude from testinstall.g: why?
##
gap> START_TEST("set.tst");
gap> a:=Set([(1,3,2),(4,5)]);;
gap> b:=[(1,2),(5,9,7)];;
gap> UniteSet(a,b);
gap> a;  
[ (5,9,7), (4,5), (1,2), (1,3,2) ]
gap> HasIsSSortedList(a);
true
gap> IsSSortedList(a);
true
gap> c:=Union(a,[(5,3,7),(1,2)]);
[ (5,9,7), (4,5), (3,7,5), (1,2), (1,3,2) ]
gap> HasIsSSortedList(c) and IsSSortedList(c);
true
gap> SubtractSet(c,[(1,2),(1,2,3)]);
gap> c;
[ (5,9,7), (4,5), (3,7,5), (1,3,2) ]
gap> HasIsSSortedList(c) and IsSSortedList(c);
true
gap> AddSet(c,5);  
gap> c;
[ 5, (5,9,7), (4,5), (3,7,5), (1,3,2) ]
gap> HasIsSSortedList(c) and IsSSortedList(c);
true
gap> AddSet(a,(5,6));

#gap> HasIsSSortedList(a) and IsSSortedList(a);
#true
gap> c:=Union(a,[(1,2),(1,2,3)]);
[ (5,6), (5,9,7), (4,5), (1,2), (1,2,3), (1,3,2) ]
gap> HasIsSSortedList(c) and IsSSortedList(c);
true
gap> g:=Group((3,11)(4,7)(6,8)(9,10),(1,3)(2,8,10,12)(4,5,6,7)(9,11));;        
gap> l:=AsSortedList(g);;
gap> HasIsSSortedList(l) and IsSSortedList(l);
true
gap> c:=Difference(l,[(3,11)( 4, 7)( 6, 8)( 9,10)]);;
gap> HasIsSSortedList(c) and IsSSortedList(c);
true
gap> Length(c);
7919
gap> c:=Difference(l,a);;                            
gap> c=l;
true
gap> [1..10000] = Set([1..10000], x -> x);
true
gap> [1..10000] = Set([-10000..-1], x -> -x);
true
gap> [0..2016] = Set([1..2017], x -> (x * 503) mod 2017);
true
gap> [0..2016] = Set([1..5000], x -> (x * 503) mod 2017);
true
gap> STOP_TEST( "set.tst", 670000);

#############################################################################
##
#E