Commit 2026-10-04 06:22 aaf410c7
View on Github →feat(Translate): command for adding a translation (#43750)
This PR introduced to_dual_for, a command that adds a translation for a given constant. It gives two benefits:
- When a translation has to be added just to make
to_dualwork, it is much more convenient to do so withto_dual_for - When you want to translate a definition to another definition but this is not possible because a proof argument does not match up, you can now use
to_dual_forto do the translation, which was previously not possible. This is becauseto_dual_forlets you translate to an arbitrary expression, rather than to a constant. This is in particular useful forCone.ext/Cocone.extI am not sure what the command should be called. I considered the potential namesto_dual_exisingor just plainto_dual, but I thought those might cause confusion with the attribute syntax we already have. This PR removes some declarations without deprecations. I claim that this is acceptable because all of the removed declarations were added just to maketo_dualwork and haven't been used for anything else. By the way, maybe it's becoming time to split the file Mathlib.Tactic.Translate.Core?