# Express relationships

Many of these are 'convenience' primitives, since mostly you could build this up with assertions of equality or even from glyphs and grouping.

Some simple, three-term relationships to start off with:

``````SumABC{one}{two}{three}
DifferenceABC{one}{two}{three}
ProductABC{one}{two}{three}
FractionABC{one}{two}{three}
``````

``````ProductAnBC{one}{two}{three}
FractionAnBC{one}{two}{three}
``````

And sometimes you know you're dealing with symbols for physical quantities, so insert a 'Quantity'.

``````ProductQuantityABC{A}{B}{C}
FractionQuantityABC{A}{B}{C}
``````

You can do both quantity and negation:

``````ProductQuantityAnBC{A}{B}{C}
FractionQuantityAnBC{A}{B}{C}
``````

Occasionally you'll want to reverse the order, to change emphasis ('d' here is a reminder of what gets divided):

``````FractionBdCeqA{one}{two}{three}
FractionQuantityBdCeqA{A}{B}{C}
``````

Common four term pattens are supported, where 'eq' denotes the location of the equality.

``````ProductABeqCD{one}{two}{three}{four}
``````

And one six-term item:

``````FractionAdBeqCDdEF{one}{two}{three}{four}{five}{six}
``````

A couple of specials, for calculating efficiency and expressing accumulations:

``````EfficiencyCalc{power in}{power out}
AccumulateRelationship{v}{a}{AtoB}
``````

And finally, you can just set things equal, approximately equal, or proportional (this, of course, looks after spacing, and prevents equations being split over lines, so its a fundamental building block):

``````EqualityAssertion{one}{two}
ApproxeqAssertion{one}{two}
ProportionAssertion{one}{two}
``````

The aim should be not to have any ad-hoc '=' or other symbols to 'short-cut' the layout, as these will not reliably render physics well when rendered on responsive displays.

## Samples, parsed

one = two + three
one = two − three
one = two × three
one = twothree
one = − two × three
one = − twothree
A = B × C
A = BC
A = − B × C
A = − BC
twothree = one
BC = A
one × two = three × four
onetwo = threefour
onetwo = threefour × fivesix
efficiency = power inpower out × 100 %
v final(AtoB) = v initial(AtoB) + a × Δt
one}{two}
one ≈ two
ProportionAssertion{one = two