def i_groupAttributeSet(ss: Substrate, attset: attributeSet) -> sctIdGroups_or_Error: lhs = i_groupSubAttributeSet(ss, attset.first) rhs = attset.second return lhs if rhs.is_empty else \ gintersect(lhs, i_groupConjunctionAttributeSet(ss, rhs.head.attset_conjattset)) if rhs.head.inran( 'attset_conjattset') else \ gunion(lhs, i_groupDisjunctionAttributeSet(ss, rhs.head.attset_disjattset))
def i_groupDisjunctionAttributeSet(ss: Substrate, disjset: disjunctionAttributeSet) -> sctIdGroups_or_Error: return i_groupSubAttributeSet(ss, disjset.head) if disjset.tail.is_empty else \ gunion(i_groupSubAttributeSet(ss, disjset.head), i_groupConjunctionAttributeSet(ss, disjset.tail))