Sponsored links: Algebra eBooks
 

Related

intersect-powerset-union

intersect({a, b, c, d...

union({a, b, c, d}, {...

powerset({a, b, c, d,...

Calculate

intersect

A : {1,2,3,4,5};

B : {1,2,3,{4,5}};

C : {1,{2,{3,{4,{5}}}}};

Calculate

intersect-length-listify

length([1,2]);

ans1: {1,2};

x_1: 1;

Calculate

intersect-union

A:{1,2,3};

B:{3,4,5,6};

C:union(A,B);

Calculate

intersect

Run Example
(%i1)H:{1,2,3,4};
(%o1)                            {1, 2, 3, 4}
(%i2) A:{2,3};
(%o2)                               {2, 3}
(%i3) B:{3,4};
(%o3)                               {3, 4}
(%i4) V:union(A,B);
(%o4)                              {2, 3, 4}
(%i5) D_H_V:setdifference(H,V);
(%o5)                                 {1}
(%i6) L1:setdifference(H,union(A,B));
(%o6)                                 {1}
(%i7) D_H_A:setdifference(H,A);
(%o7)                               {1, 4}
(%i8) D_H_B:setdifference(H,B);
(%o8)                               {1, 2}
(%i9) R1:intersect(D_H_A,D_H_B);
(%o9)                                 {1}
(%i10) is(L1=R1);
(%o10)                               true
(%i11) not B;
(%o11)                            not {3, 4}
(%i12) 
Run Example
A:{-5,-4,-3,-2,-1,0};
(%o1)                    {- 5, - 4, - 3, - 2, - 1, 0}
(%i2) B:{2,3,4,5};
(%o2)                            {2, 3, 4, 5}
(%i3) C:{0};
(%o3)                                 {0}
(%i4) intersect(A,B);
(%o4)                                 {}
(%i5) union(A,B,C);
(%o5)              {- 5, - 4, - 3, - 2, - 1, 0, 2, 3, 4, 5}
(%i6) setdifference(A,C);
(%o6)                      {- 5, - 4, - 3, - 2, - 1}
(%i7) setdifference(B,C);
(%o7)                            {2, 3, 4, 5}
(%i8) sublist([1,2,3,4,5],lambda([x],x=3));
(%o8)                                 [3]
(%i9) subset(A,lambda([x], (x >
 2 and x = 1) ));
(%o9)                                 {}
(%i10) 
Run Example
A : {1,2,3};
(%o1)                              {1, 2, 3}
(%i2) B : {};
(%o2)                                 {}
(%i3) union(A,B);
(%o3)                              {1, 2, 3}
(%i4) intersect(A,B);
(%o4)                                 {}
(%i5) 

Related Help

Help for Intersect