Questions tagged [semantic-matching]

Posts about semantic pattern matching rather than syntactic pattern matching (which is the built-in pattern matcher of Mathematica) e.g. "Why x^3 /. x^2->a doesn't work!"

Filter by
Sorted by
Tagged with
3
votes
3answers
71 views

Identify complex expression and replace

I'm having trouble finding a way (if there is) to analyse an expression, identify a complex pattern in it and then replace it with another thing. I think it will be easier to explain my problem with ...
3
votes
1answer
125 views

“Smart” substitution of subexpressions

I have the following question. An expression, which I want to simplify contains several subexpressions which appear quite frequently all over the place. To optimize simplification I would like to ...
3
votes
0answers
101 views

SemanticImport extremely slow with “Number” format

With the following definition: col = "num\n" <> StringRiffle[Table[i, {i, 1000}], "\n"]; I do not understand why the ...
2
votes
2answers
98 views

Sets of identical equality/inequalities

So I've used Mathematica for some months, but I never noticed this sort of thing about it, namely: (a > b) == (b < a) which are supposed to be identical ...
0
votes
1answer
158 views

Simplifying expressions

Let's define a function $\Omega(x,y)$ ...
55
votes
4answers
7k views

Can I simplify an expression into form which uses my own definitions?

This seems like a simple thing to do, but I couldn't find anything relevant from Mathematica documentation. So suppose I have an expression: a*b/(a + a*Cos[a/b]) ...