Skip to content

Commit

Permalink
clean up walk on spheres
Browse files Browse the repository at this point in the history
  • Loading branch information
lecopivo committed Mar 12, 2024
1 parent ea8cedc commit 99f53af
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions SciLean/Core/Rand/Distributions/WalkOnSpheres.lean
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,14 @@ def walkOnSpheres (φ : Vec3 → Float) (g : Vec3 → Y) (n : ℕ) (x : Vec3) :
return f x


#print walkOnSpheres


@[fun_prop]
theorem harmonicRec.arg_x.CDifferentiable_rule (n : ℕ)
(φ : Vec3 → Float) (g : Vec3 → Y)
(hφ : CDifferentiable Float φ) (hg : CDifferentiable Float g) :
CDifferentiable Float (fun x : Vec3 => harmonicRec n φ g x) := by
induction n <;> (simp[harmonicRec]; fun_prop)

variable {W} [Vec Float W]

-- set_option pp.notation false
noncomputable
def harmonicRec_fwdDeriv (n : ℕ)
(φ : Vec3 → Float) (φ' : Vec3 → Vec3 → Float×Float)
Expand Down Expand Up @@ -99,6 +94,7 @@ def harmonicRec.arg_x.fwdDeriv_randApprox (n : ℕ)

set_default_scalar Float


noncomputable
def harmonicRec' (n : ℕ) (φ : Vec3 ⟿FD Float) (g : Vec3 ⟿FD Y) (x : Vec3) : Y :=
match n with
Expand All @@ -111,8 +107,6 @@ theorem harmonicRec'_CDifferentiable (n : ℕ) :
CDifferentiable Float (fun (w : (Vec3 ⟿FD Float)×(Vec3 ⟿FD Y)×Vec3) => harmonicRec' n w.1 w.2.1 w.2.2) := by
induction n <;> (simp[harmonicRec']; fun_prop)

variable (n : Nat)


noncomputable
def harmonicRec'_fwdDeriv (n : ℕ) :=
Expand Down

0 comments on commit 99f53af

Please sign in to comment.