Let's
VPC is abbreviation for Volume Percentage Content,
sb1 denotes some sample, specimen, i.e. a [solid] body.
We have a formula of unary function like this:
Definition. VPC_M(sb1) = VPC_Ol(sb1)+VPC_Opx(sb1)+VPC_Cpx(sb1)+VPC_Hbl(sb1)+...
where Ol, Opx, Cpx, Hbl are abbreviations for mineral names.
Problem. To finish this formula we need a list of all mafic minerals.
Well, may be only rock-forming one.
Available descriptions:
"M = mafic and related minerals, e.g. mica, amphibole, pyroxene, olivine, opaque minerals, accessory minerals (e.g. zircon, apatite, titanite), epidote, allanite, garnet, melilite, monticellite, primary carbonate."
see [1] page 4.
Following IUGS classification we use this predicate to define for ex. ultramafic rocks as with VPC_M(sb1) >= 90.
Important note: VPC_x(sb1) is a very straightforward - 100*Volume(x in sb1)/Volume(sb1)