Skip to content

Commit

Permalink
addressing comment by Pierre
Browse files Browse the repository at this point in the history
  • Loading branch information
affeldt-aist committed Aug 9, 2024
1 parent 3d23ae4 commit bb8e668
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
+ lemma `derive_cst`
+ lemma `deriveMr`, `deriveMl`

- in `functions.v`:
+ lemmas `mull_funE`, `mulr_funE`

### Changed

### Renamed
Expand Down
8 changes: 8 additions & 0 deletions classical/functions.v
Original file line number Diff line number Diff line change
Expand Up @@ -2617,6 +2617,14 @@ Lemma fct_sumE (I T : Type) (M : zmodType) r (P : {pred I}) (f : I -> T -> M)
(\sum_(i <- r | P i) f i) x = \sum_(i <- r | P i) f i x.
Proof. by elim/big_rec2: _ => //= i y ? Pi <-. Qed.

Lemma mull_funE (T : Type) {R : comSemiRingType} (f : T -> R) (r : R) :
r \*o f = r \o* f.
Proof. by apply/funext => x/=; rewrite mulrC. Qed.

Lemma mulr_funE (T : Type) {R : comSemiRingType} (f : T -> R) (r : R) :
r \o* f = r \*o f.
Proof. by rewrite mull_funE. Qed.

End function_space.

Section function_space_lemmas.
Expand Down
9 changes: 3 additions & 6 deletions theories/derive.v
Original file line number Diff line number Diff line change
Expand Up @@ -1300,18 +1300,15 @@ exact: der_mult.
Qed.

Lemma deriveMr f (r : R) (x v : V) :
derivable f x v -> 'D_v (fun x => f x * r) x = (r * 'D_v f x)%R.
derivable f x v -> 'D_v (r \o* f) x = (r * 'D_v f x)%R.
Proof.
move/deriveM => /(_ _ (derivable_cst _ _ _)) ->.
by rewrite derive_cst scaler0 add0r.
Qed.

Lemma deriveMl f (r : R) (x v : V) :
derivable f x v -> 'D_v (fun x => r * f x) x = (r * 'D_v f x)%R.
Proof.
move=> fxv.
by rewrite -deriveMr//; under eq_fun do rewrite mulrC.
Qed.
derivable f x v -> 'D_v (r \*o f) x = (r * 'D_v f x)%R.
Proof. by move=> fxv; rewrite -deriveMr// mulr_funE. Qed.

Global Instance is_deriveM f g (x v : V) (df dg : R) :
is_derive x v f df -> is_derive x v g dg ->
Expand Down

0 comments on commit bb8e668

Please sign in to comment.