is_derive_trmx - #2060
Conversation
| Proof. | ||
| elim: n => [|n ih]. | ||
| rewrite /F_ /max_approxRN_seq. | ||
| under eq_fun do rewrite big_ord_recr/=; rewrite -/(measurable_fun _ _). |
There was a problem hiding this comment.
@proux If this file (radon_nikodym.v) imports unstable.v (which now contains an instance of ComLaw for (@maxr {nonneg K}), then this line produces an error that I cannot explain.
The issue is easily avoided by not importint unstable.v but this is certainly a problem that will occur again later. Could you take a look?
There was a problem hiding this comment.
Well, using @maxr {nonneg K} is probably asking for troubles. Seems safer to use @maxr K and reinfer the nonnegativity of the result when needed with an interval instance on maxr (which we should already have). I would refrain from adding this kind of instances.
There was a problem hiding this comment.
When dealing with bigmax, {nonneg _} is nice because we have a neutral elements (0) and therefore access to more bigop lemmas. We will try again without it.
There was a problem hiding this comment.
Yes but then everything comes with an interval and a proof that the value is in that interval, so you loose equality, you'll probably rapidly need morphism lemmas for %:num and bigops and thing can become painful. So not sure we want to engage in that direction. I agree that writing (\bigmax_i (F i)%:num)%:nng can be a bit heavy though, not sure what's best.
There was a problem hiding this comment.
And to explain the error:
Print Canonical Projections Order.max (* HB.about could maybe also do the job *)
(* without loading unstable.v *)
(* Order.max <- Monoid.Law.sort ( Order_max__canonical__Monoid_Law ) *)
(* Order_max__canonical__Monoid_Law : forall {R : realDomainType}, Monoid.Law.type -oo%E (from constructive_ereal.v) *)
(* after loading it *)
(* Order.max <- Monoid.Law.sort ( unstable.Order_max__canonical__Monoid_Law ) *)due to canonical structures matching on a single key, there can only be a single instance of Monoid.Law.sort on Order.max and we have to choose between them. By the way, having it on ereal is already a bit strange.
I guess the correct fix would be to have a structure of "max is a monoid operator", which maybe is Order.BPreorder, and put the monoid instance on it (and then ensure that both ereal and nonneg have that BPreorder instance).
There was a problem hiding this comment.
For the time being, I have recorded the problem as an issue #2093.
|
@holgerthies I found two things puzzling about the the instance on |
Co-authored-by: Reynald Affeldt <reynald.affeldt@aist.go.jp>
Co-authored-by: Pierre Roux <pierre.roux@onera.fr>
This PR introduces
is_derive_trmxinstance, which provides automatic differentiation for transposed matrices.It is particularly useful as the development uses a row-vector convention rather than the more common column-vector convention found in physics and mechanics literature.
Most of the code is from robot-rocq, co-authored by @affeldt-aist.
Motivation for this change
Checklist
CHANGELOG_UNRELEASED.mdReference: How to document
Merge policy
As a rule of thumb:
all compile are preferentially merged into master.
Reminder to reviewers