Hello, working with relations on sets.
for example:
R={ [x,y] ∈ R ⁄ ((y=x^2 ) ∧ (x ∈ Z) ∧ (-3≤x≤3 ) ) }
f:=unapply(x^2,x); [enter] (x)->x^2
X_:=[-3,-2,-1,0,1,2,3]; [enter] [-3,-2,-1,0,1,2,3] // input set
apply(f,X_); [enter] [9,4,1,0,1,4,9]
apply((x)->x^2,[-3,-2,-1,0,1,2,3]); [enter] [9,4,1,0,1,4,9] // output set
to indicate then relation, this is both the output set and the input set, it is coded as
apply((x)->[x,x^2],[-3,-2,-1,0,1,2,3]) [enter]
[[-3,9],
[-2,4],
[-1,1],
[0,0],
[1,1],
[2,4],
[3,9]]
I propose that the first argument can also be an array of relations.
apply([x->x, x->x^2],[-3,-2,-1,0,1,2,3]) [enter]
[[-3,9],
[-2,4],
[-1,1],
[0,0],
[1,1],
[2,4],
[3,9]]
g:=x->x;
f:=x->x^2
apply([g, f],[-3,-2,-1,0,1,2,3]) [enter]
[[-3,9],
[-2,4],
[-1,1],
[0,0],
[1,1],
[2,4],
[3,9]]
R_:=apply([x, x->x^2],[-3,-2,-1,0,1,2,3]) [enter]
[[-3,9],
[-2,4],
[-1,1],
[0,0],
[1,1],
[2,4],
[3,9]]
relations on sets
Modérateur : xcasadmin
-
- Messages : 603
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :