Skip to content

Commit

Permalink
few theorems about ContCDiffFD
Browse files Browse the repository at this point in the history
  • Loading branch information
lecopivo committed Mar 12, 2024
1 parent 0e913ce commit d671401
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions SciLean/Core/FunctionSpaces/ContCDiffMapFD.lean
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ structure ContCDiffMapFD (n : ℕ∞) (X Y : Type _) [Vec K X] [Vec K Y] where
toFun : X → X → Y×Y
is_cont_cdiff_map : ContCDiff K n (fun x => (toFun x 0).1)
cderiv_snd : cderiv K (fun x => (toFun x 0).1) = fun x dx => (toFun x dx).2
dir_independence : ∀ x dx, toFun x dx = toFun x 0

attribute [simp, ftrans_simp] ContCDiffMapFD.cderiv_snd ContCDiffMapFD.dir_independence

variable (n : ℕ∞)

Expand Down Expand Up @@ -55,7 +58,7 @@ theorem ContCDiffMapFD_apply_right (f : X ⟿FD[K,n] Y) : ContCDiff K n (fun x =
--------------------------------------------------------------------------------

def ContCDiffMapFD.mk' (f : X → Y) (f' : X → X → Y×Y) (h : fwdDeriv K f = f') (hf : ContCDiff K n f) : X ⟿FD[K,n] Y :=
⟨f', sorry_proof, sorry_proof⟩
⟨f', sorry_proof, sorry_proof, sorry_proof


open Lean Parser Term
Expand Down Expand Up @@ -86,11 +89,26 @@ def ContCDiffMapFD.FD (f : X ⟿FD[K,n] Y) (x dx : X) : Y×Y := f.toFun x dx

@[fun_trans]
theorem ContCDiffMapFD_eval_fwdDeriv (f : X ⟿FD[K,n] Y) :
fwdDeriv K (fun x => f x) = f.FD := sorry_proof
fwdDeriv K (fun x => f x) = f.FD := by
unfold ContCDiffMapFD.FD fwdDeriv
simp[DFunLike.coe]

@[fun_prop]
theorem ContCDiffMapFD_eval_cdifferentiable (f : X ⟿FD[K,n] Y) (h : 0 < n) :
CDifferentiable K (fun x => f x) := by
simp[DFunLike.coe]
apply CDifferentaible.ContCDiff_rule
apply ContCDiffMapFD.is_cont_cdiff_map
assumption

@[fun_prop]
theorem ContCDiffMapFD_eval_cdifferentiable (f : X ⟿FD[K,n] Y) :
CDifferentiable K (fun x => f x) := sorry_proof
theorem ContCDiffMapFD_eval_cdifferentiable' (f : X ⟿FD[K,∞] Y) :
CDifferentiable K (fun x => f x) := by
fun_prop (disch:=apply ENat.zero_lt_top)

@[simp, ftrans_simp]
theorem ContCDiffMapFD.FD_fst (f : X ⟿FD[K,n] Y) (x dx : X) :
(f.FD x dx).1 = f x := by rw[← ContCDiffMapFD_eval_fwdDeriv]; unfold fwdDeriv; simp


-- Algebra ---------------------------------------------------------------------
Expand Down Expand Up @@ -215,6 +233,3 @@ theorem ContCDiffMapFD_fwdDeriv_rule :
(ydy.1, dy' + ydy.2) := by
unfold fwdDeriv
fun_trans
funext (f,x) (df,dx)
simp
sorry_proof -- this is easy from the definition

0 comments on commit d671401

Please sign in to comment.