Skip to content

Commit

Permalink
basic definition of reverse derivative
Browse files Browse the repository at this point in the history
  • Loading branch information
lecopivo committed Jul 27, 2023
1 parent b8c9503 commit 2ea6000
Show file tree
Hide file tree
Showing 3 changed files with 548 additions and 3 deletions.
5 changes: 2 additions & 3 deletions SciLean/FTrans/Adjoint/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ instance {E : ι → Type _} [∀ i, UniformSpace (E i)] [∀ i, CompleteSpace (

-- Set up custom notation for adjoint. Mathlib's notation for adjoint seems to be broken
instance (f : X →L[K] Y) : SciLean.Dagger f (ContinuousLinearMap.adjoint f : Y →L[K] X) := ⟨⟩
variable (g : X → Y) (hg : SciLean.IsContinuousLinearMap K g)


-- Basic lambda calculus rules -------------------------------------------------
Expand Down Expand Up @@ -237,7 +236,7 @@ by sorry
--------------------------------------------------------------------------------

@[ftrans_rule]
theorem Prod.fst.arg_self.fderiv_comp
theorem Prod.fst.arg_self.adjoint_comp
(f : X → Y×Z) (hf : SciLean.IsContinuousLinearMap K f)
: (fun x =>L[K] (f x).1)†
=
Expand All @@ -250,7 +249,7 @@ by
--------------------------------------------------------------------------------

@[ftrans_rule]
theorem Prod.snd.arg_self.fderiv_comp
theorem Prod.snd.arg_self.adjoint_comp
(f : X → Y×Z) (hf : SciLean.IsContinuousLinearMap K f)
: (fun x =>L[K] (f x).2)†
=
Expand Down
9 changes: 9 additions & 0 deletions SciLean/FTrans/FDeriv/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,15 @@ theorem fderiv.pi_rule
:= by funext x; apply fderiv_pi (fun i => hf i x)


theorem fderiv.proj_rule
[DecidableEq ι] (i : ι)
: (fderiv K fun (x : (i : ι) → E i) => x i)
=
fun x => fun dx =>L[K] dx i :=
by
funext x; sorry



-- Register `fderiv` as function transformation --------------------------------
--------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 2ea6000

Please sign in to comment.