Two physical quantities are compatible if their physical-dimensions are equal. Compatibility constrains how quantities can be compared and combined with algebraic operators.
(<=> (Compatible-Quantities ?X ?Y) (And (Physical-Quantity ?X) (Physical-Quantity ?Y) (= (Quantity.Dimension ?X) (Quantity.Dimension ?Y))))
(* 20 meters)