Zulip Chat Archive
Stream: mathlib4
Topic: The `continuity` tactic and `![f x, g x]`
Eric Wieser (Jan 02 2025 at 14:21):
Is it expected that continuity
can't handle this?
import Mathlib
attribute [continuity] Continuous.matrixVecCons
-- fails
example : Continuous fun θ : ℝ => ![Real.sin θ, Real.cos θ] := by
continuity
-- succeeds
example : Continuous fun θ : ℝ => ![Real.sin θ, Real.cos θ] := by
apply Continuous.matrixVecCons
· continuity
apply Continuous.matrixVecCons
· continuity
continuity
Eric Wieser (Jan 02 2025 at 14:22):
(docs#Continuous.matrixVecCons isn't in the web editor nor the docs just yet, but is in master)
Eric Wieser (Jan 02 2025 at 14:22):
@Tomas Skrivan, is this something that fun_prop
can hope to handle?
Edward van de Meent (Jan 02 2025 at 15:00):
are you maybe missing the Matrix.vecEmpty version?
Eric Wieser (Jan 02 2025 at 15:21):
Huh, I guess it is surprising that the second · continuity
works, but I assume something about Unique
is firing (edit: changed to not rely on this)
Jireh Loreaux (Jan 02 2025 at 15:29):
are there any places where continuity
is still preferred to fun_prop
at all? My hope would be that we could deprecate continuity
sometime soon.
Eric Wieser (Jan 02 2025 at 15:35):
Edward van de Meent said:
are you maybe missing the Matrix.vecEmpty version?
(continuous_const
dispatches this one)
Tomas Skrivan (Jan 02 2025 at 17:20):
Eric Wieser said:
Tomas Skrivan, is this something that
fun_prop
can hope to handle?
It is definitely something I want to support. However, last time I wanted to prove differentiability for ![...]
I noticed that it is implemented using List
which is not a vector space so I wasn't sure how to proceed.
It might be a case that one has to write a sufficiently smart theorem to handle it. I will think about it.
Eric Wieser (Jan 02 2025 at 17:40):
I think you're getting confused with #[]
?
Eric Wieser (Jan 02 2025 at 17:40):
![
makes no mention of List
Yury G. Kudryashov (Jan 02 2025 at 17:47):
![
unfolds to docs#Matrix.vecCons and docs#Matrix.vecEmpty
Tomas Skrivan (Jan 02 2025 at 17:49):
Then marking theorems like Continuous.matrixVecCons
with fum_prop
should be enough.
Tomas Skrivan (Jan 02 2025 at 17:51):
I will test it out, there might be an issue and fun_prop
might expect the theorem to have the index of the output vector fixed.
Eric Wieser (Jan 02 2025 at 18:13):
Yes, I get the feeling this is either an indexing problem, or that I have stated the wrong theorem and it expects the one saying that it is jointly continuous in all the arguments
Eric Wieser (Jan 02 2025 at 18:14):
Tomas Skrivan said:
Then marking theorems like
Continuous.matrixVecCons
withfum_prop
should be enough.
The web editor is now up to date; unfortunately this doesn't work there
Eric Wieser (Jan 02 2025 at 18:14):
Nevermind, it does work after all!
Eric Wieser (Jan 02 2025 at 19:31):
Tomas Skrivan said:
However, last time I wanted to prove differentiability for
![...]
...
#20407 should help a lot here, though this only does the FDeriv half and there are some TODOs
Last updated: May 02 2025 at 03:31 UTC