def _merge_supporteds(content, increment): merged_value = merge(content.value, increment.value) if merged_value == content.value: if implies(increment.value, merged_value): # Confirmation of existing information if increment.support.more_informative_than(content.support): return increment else: return content else: # New information is not interesting return content elif merged_value == increment.value: # New information overrides old information return increment else: # Interesting merge, need both provenances return Supported(merged_value, content.support | increment.support)
def subsumes(self, other): assert is_supported(other) return implies(self.value, other.value) and self.support.issubset(other.support)
def subsumes(self, other): assert is_supported(other) return implies(self.value, other.value) and self.support.issubset( other.support)