An operator to check the relationship between two variables?

231 Views Asked by At

I want to know if there is an operator that can ask the following succinctly:

'What (if any)is the relationship between variable A and variable B?'

I cannot find a symbol/operator and will be using the following symbol(patent pending) to further explain why this could be great.

EDIT: Here is also one that could be typed which would not be too bad:

'?='

Relationship Verifier

This symbol could be used to ask relationship between two variables of a graph:

x vs y | y ?= x

Answer:

y is inversely proportional to x


It can be seen with volume vs pressure in:

Boyle's Law | V ?= P

Answer:

V ∝ 1/P

or

Volume is inversely proportional to Pressure


Acceleration vs mass in:

Newtons 2nd Law | a ?= m

Answer:

a ∝ 1/m

or

acceleration is inversely proportional to mass


Voltage vs Current in:

Ohms Law | V ?= I

Answer:

V ∝ I

or

voltage is proportional to current


Here would be an example of some programming in a terminal for using the symbol:

terminal |

  • a ?= b
  • a ?= c

Output:

  • a equals b

  • a and c are the same


Perhaps a default 'null' or 'nil' answer could be:

"No relationship could be found between A and B"


This is just an idea that could be handy if it was something that was standard but could also just be short hand for when asking questions and making notes.

For instance when one writes -ve or +ve instead of negative and positive. It is rather pleasant to have

Obligatory 'standards' comic: https://xkcd.com/927/


However my question remains: Is there already a symbol that exists like this? If so I want to use it to easier talk to people and ask things.

The reason I chose to draw the symbol in the way it is, due to operators seen below

=, ==, !=,≈,≥, ≤,


Lastly I realise if the pictures are not accessible to some this will not be a helpful post at all. So please if any one knows how to makes this a more 'future proof post' that will not lose the images which are neccessary for this post please let me know.

Or if there is just a better way to describe the idea please let me know.

1

There are 1 best solutions below

0
On

This idea is a goal driven, programming and/or learning tool which comes from the idea of the predicate from Predicate Logic

https://en.wikipedia.org/wiki/Predicate_(mathematical_logic)

nice summary from the above wiki in the intro: 'when a theory defines the concept of a relation, then a predicate is simply the characteristic function (otherwise known as the indicator function) of a relation.'


Here are some resources on the topic:

Introduction to Logic: Predicate Logic

Understanding Symbolic Logic

Haskell Programming book with section on Predicate Logic


Credit to u/HeraclitusZ on reddit for leading me to the answer.

Here is the helpful comment