# Restrictions commutativity

• DarkFalz
In summary, applying two restrictions in a different order does not change the final result because logical "and" is commutative, meaning the order does not matter.

#### DarkFalz

Hello,

i've always believed and accepted that applying two restrictions over a set of numbers N can be done in any order. Let's consider we want to apply the restrictions R1 and R2 over the set N,
how can it be proved that the order in which we apply the restrictions does not matter for the final result?

It isn't true in general. If by a "set of numbers N" you mean really any set of numbers, then for example we can take two matrices A and B. These are indeed two "sets of numbers", but the order of the restrictions on them matters. Ex: A x B (cross product if they are vectors in R3) ≠ B x A (Non-commutative), also AB≠BA (Multiplication of matrices is non-commutative in general.)

For your question, if you indeed think that you have a set of numbers for which commutativity holds, all you have to do it apply the R1 restriction one way, apply the R2 restriction, and then show that both of these restrictions come out to the same thing.

I should have explained my question in a better way. I was referring to restrictions such as these ones:

R1: X<4
R2: X is even

I have a set N such as {1,2,3,4,5,6,7,8,...}

If i apply R1 and then R2, how can it be proved for a general case that is it the same as applying R2 and then R1?

So you have a set, and you define a new set by letting the elements be all those elements of the original set which satisfy both properties? Clearly the order doesn't matter, because A and B ==> B and A.

I would like to explain it in terms of subsets. Let's say that by applying the restriction R1 over N generates Nr1, and applying the restriction R2 over N generates Nr2, how can i prove that by applying R2 over Nr1 and R1 over Nr2 has the same results?

Jamma is right. Logical "and" is commutative, therefore...you're done. That's it. You're dealing with an axiom of logic.

DarkFalz said:
I would like to explain it in terms of subsets. Let's say that by applying the restriction R1 over N generates Nr1, and applying the restriction R2 over N generates Nr2, how can i prove that by applying R2 over Nr1 and R1 over Nr2 has the same results?

Because, as I said, "and" is commutative. If Nr1 is the set generated by restriction R1 and Nr2 is the one given by the restriction R2, then Nr1 restricted to R2 is, by definition, elements of S that first satisfy R1, and of those they need to satisfy R2 also. Hence, they will all satisfy R1 and R2. Conversely, if an element satisfies R1 and R2, then it will be in Nr1 restricted with R2.

Analogously, something is in Nr2 restricted by R1 if and only if it satisfies firstly R2 and secondly R1 i.e. it is the set of elements satisfying R2 and R1.

If something satisfies R1 and R2, then it satisfies R2 and R1 (commutativity of and) and hence is in Nr2 restricted by R1. Hence Nr1 restricted by R2 is a subset of Nr2 restricted by R1. Analogously, Nr2 restricted by R1 is a subset of Nr1 restricted by R2, so the two sets are equal.Explaining all that seems a bit like overkill.

## 1. What is restrictions commutativity?

Restrictions commutativity is a concept in mathematics and computer science that describes the ability for certain operations or functions to be performed in any order without affecting the final result. In other words, the order in which the operations are carried out does not change the outcome.

## 2. How does restrictions commutativity differ from regular commutativity?

Regular commutativity refers to the ability for any two elements in a set to be swapped in a binary operation without affecting the result. Restrictions commutativity, on the other hand, only applies to certain elements or operations within a set.

## 3. What are some examples of restrictions commutativity?

Some examples of restrictions commutativity include the multiplication of real numbers, where the order of the numbers does not change the result, and the AND operation in computer programming, where the order of logical statements does not affect the overall outcome.

## 4. Are there any drawbacks to restrictions commutativity?

One potential drawback of restrictions commutativity is that it can limit the flexibility and expressiveness of a system. In some cases, certain operations may need to be performed in a specific order in order to achieve a desired result, which may not be possible with restrictions commutativity.

## 5. How is restrictions commutativity useful in scientific research?

Restrictions commutativity is useful in scientific research as it allows for more efficient and accurate calculations and analyses. By being able to manipulate the order of certain operations without changing the final result, researchers can save time and resources in their experiments and studies.