33 views

### Except not working in Function [duplicate]

I have defined the CirclePlus operator as follows: ...
140 views

### How can we create a Mathematica function that can accept 0 or more arguments?

How can we create a Mathematica function that can accept 0 or more arguments in the same way the Times function does? Specially, I'd like to replace the Times function to work with Reals, Complexes, ...
45 views

### How to make a Flat function return x when evaluated as f[x]? [duplicate]

With SetAttributes[f, Flat], f[a_] can get matched to f of any number arguments. How can I ...
570 views

### partial numerical evaluation

Context The following is an issue I have come across many times and still do not have a satisfactory solution for. The context of it is this. Let's say we have an equation, a linear ODE for the ...
71 views

### non listable plus and times [duplicate]

I am trying to create my own Plus and Times functions, which are identical to the built in ones with the exception that they are ...
202 views

### Recursion depth exceeded in pattern matching with attribute Flat

I am defining a linear associative multiplication operation Mult[]: ...
126 views

### Functions in a different context are replaced with infix forms of their namesake in System

So, in an attempt to help out Fabian with his question, I did what I often do, and created a new symbol in the Pillsy package that I could play with. Since it was ...
236 views

### What are Flat Attribute best practices? [duplicate]

I would like, as an example, to build a Times-like function. Take the following example ...
158 views

### How can Mathematica automatically replace NonCommutativeMultiply[x] with x for a single argument x? [duplicate]

By default, an expression like NoncommutativeMultiply[x] does not simplify to x, unlike ...
537 views

### Evaluation of Alternatives

I recently stumbled upon a few examples that suggest patterns containing Alternatives do not evaluate for individual alternatives. For example: ...
367 views

### Why rule does not work if Flat attribute?

The following works: ...
1 vote
2k views

### Why does Mathematica add Hold to the result of my user defined symbol?

In the code below I have defined a symbol that multiplies two block-matrices (I can't use the builtin Dot since Dot assumes that the matrix coefficients commute): ...