a thoughtful web.
comment
Devac  ·  347 days ago  ·  link  ·    ·  parent  ·  post: Teaching stuff is resolved.

EDIT: More or less you can (and should) ignore this post. I'll leave it as it is for the sake of the rest of the conversation below, but I was seriously jamming words together at places.

So an invariant is not a constant because an invariant is subject to conditions while a constant is defined?

I'm going to answer "yes, but". Invariants can be constants, but not all constants are invariants. It depends on in respect to what something is invariant.

Let's make the karma example more explicit. We already have a set of 4 people. 3 of them have good karma, 1 has a bad karma. This might be an invariant depending on the rules for karma exchange we will make.

Now here are the rules for karma exchange (in pairs, interact with everyone around you):

1. A person with good karma will give good karma to a person with good karma. (Harmony)

2. A person with good karma will have to do something bad to a person with bad karma. (They get what they deserve)

3. A person with bad karma will have to do something good to a person with good karma. (They repent for what they have done)

4. A person with bad karma will do something bad to a person with bad karma. (War never changes)

Now, let's go turn by turn:

Turn 0:

``  G G``  G B``

Turn 1:

``  G <1> G  ^         ^   2         4  v         v``  G <3> B``

1. Good with Good, nothing changes.

2. Good with Good, nothing changes.

4. Good with Good, nothing changes.

So the state goes:

``  G G     G G   G G    G G    G G ``  G B     G B    G B    B G    B G``

Turn 2 (same order of operation):

``  G G    G G    B G     B G    B G``  B G    B G    G G     G G    G G``

(sorry if I made some sort of mistake along the way, I am seriously tired after last few days)

The invariant can be anything that does not changes as a holistic property when discussing examples like the one above. There will always be one Bad karma, it just passes to the next person in this case. But as a more general term, it's anything that will come as a result of a certain type of operation. Adding any number to it's opposite:

``  1 + (-1), 2 + (-2) … n + (-n)``
will be always equal to zero (for a given definition of addition ;)). While trivial, it is indeed an invariant of the operation as it will work for any object. You always have to specify in respect to what you have your invariant property.

Am I making any sense? Sorry, I'm seriously not at my best but I wanted to respond today. If that's not clear please tell me.