module labelled is

  assert must_have_preferred_label is
    with
      def has_pref_label(anns -> {0..} Annotation) -> boolean ≔
          ∃ a ∈ anns, name(a) = skos:prefLabel ∧ ¬empty(value(a))
    for
      has_pref_label(self.annotations)
      ∧ ∀ d ∈ self.definitions,
          has_pref_label(d.annotations)
            ∧ Entity(d) ⇒ ∀ m ∈ d.flat_members, ( has_pref_label(m.annotations) )
                ∧ Enumeration(d) ⇒ ∀ m ∈ d.variants, ( has_pref_label(m.annotations) )
                    ∧ Event(d) ⇒ ∀ m ∈ d.flat_members, ( has_pref_label(m.annotations) )
                        ∧ Structure(d) ⇒ ∀ m ∈ d.flat_members, ( has_pref_label(m.annotations) )
                            ∧ Union(d) ⇒ ∀ m ∈ d.variants, ( has_pref_label(m.annotations) )
    end
  end

end
