Example #1
0
def split_all(given, cond, wrt):
    from axiom.algebra.sum.to.add.split import split

    if isinstance(cond, Boolean):
        if wrt is None:
            wrt = cond.wrt

        cond = wrt.domain_conditioned(cond)

        if wrt not in given.variables:
            domain = given.domain_defined(wrt)
            function, *limits = given.of(All)
            given = All(function, *limits, (wrt, domain))

    return split(All, given, cond, wrt=wrt)
Example #2
0
def apply(self, *, cond, wrt=None, simplify=True):
    from axiom.algebra.sum.to.add.split import split
    return Equal(self, split(Cup, self, cond, wrt=wrt, simplify=simplify))
Example #3
0
def apply(self, indices, wrt=None, evaluate=False):
    from axiom.algebra.sum.to.add.split import split
    return Equivalent(self,
                      split(Any, self, indices, wrt=wrt),
                      evaluate=evaluate)
Example #4
0
def apply(self, indices, wrt=None, *, simplify=True):
    from axiom.algebra.sum.to.add.split import split
    return Equal(self, split(Cap, self, indices, wrt=wrt, simplify=simplify))
Example #5
0
def apply(self, *, cond=None, wrt=None, evaluate=False):
    from axiom.algebra.sum.to.add.split import split
    return Equivalent(self, split(All, self, cond, wrt=wrt), evaluate=evaluate)