possible errors
the expression is_included( D_, B_ ) currently returns 0 should return 1
is_included( D_, B_ ) [enter] true
In the following image, you can see that many outputs are confusing when shown to the public in a presentation, it is not known if it is a position, or logical value true or false, for this reason I suggest that the commands is_element? and is_included? return True/ False
is_element( set[ 2, 6 ], B_ ) [enter] true, in adition in exits others commands that return a position number/ find/ contains / member/ index
Thank you
Inputs
Code : Tout sélectionner
D_ := set[ 2, 6 ]
B_ := set[ 10, 4, set[ 2, 6 ] ]
member( 8, B_ )
member( 10, B_ )
member( 4, B_ )
member( set[ 2, 6 ], B_ )
is_included( D_, B_ )
is_included( set[], B_ )
is_included( set[11], B_ )
is_element( 8, B_ )
is_element( 10, B_ )
is_element( 4, B_ )
is_element( set[ 2, 6 ], B_ )
contains( B_, 8 )
contains( B_, 10 )
contains( B_, 4 )
contains( B_, set[ 2, 6 ] )
find( 8, B_ )
find( 10, B_ )
find( 4, B_ )
find( set[ 2, 6 ], B_ )
index( B_, 10 )
index( B_, 4 )
index( B_, set[ 2, 6 ] )
index( B_, 8 )
A_ := prepend( set[ a, b, -1 ], a )
eval(A_)
find(a, prepend( set[ a, b, -1 ], a ))
find(a, A_)
find(b, prepend( set[ a, b, -1 ], a ))
find(-1, prepend( set[ a, b, -1 ], a ))