This doesn't match my experience, and no dictionary I've checked says the past participle depends on the context; only that "proven" and "proved" can both be used (in any context). See e.g. https://en.wiktionary.org/wiki/proven#Verb

I'm not a mathematician though, so maybe this is a genuine semantic convention that neither I nor my dictionary are aware of. Maybe it's just that some mathematical style guides say to prefer "proved", for consistency, not that it really depends on the context?

Also not aware of it, but am mathematically trained and would always say "proved".

It seems to me that in North American English, we use the proven participle as an adjective (almost exclusively?). So that is to say a remedy, having been proved effective, is then considered "proven effective". This usage is drilled into people's heads by advertisements.

It feels sort of like the difference between gilded and golden. Something that has been gilded now has a golden surface. Now golden has that en suffix like some participles, but isn't one. It's a pure adjective.

I would also always use that in a mathematical context but feel it’s weird to hear, say, “proved in a court of law”.

Grammatically, or semantically?