Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fun_trans can't see through let bindings #34

Open
lecopivo opened this issue Apr 22, 2024 · 0 comments
Open

fun_trans can't see through let bindings #34

lecopivo opened this issue Apr 22, 2024 · 0 comments

Comments

@lecopivo
Copy link
Owner

When running simp/fun_trans with zeta:=false, the tactic fun_prop is unable to see through let bindings. For example this does is not provable:

import SciLean

open SciLean

variable
  {K : Type} [RealScalar K]
  {X : Type} [Vec K X]
  {ι : Type} {κ : Type} [IndexType ι] [IndexType κ]

set_default_scalar K

example (f : X → X) (hf : CDifferentiable K f)
  : (∂ x, let df := ∂ (x':=0), f x'
          df x + df x)
    =
    let df := ∂ (x':=0), f x';
    fun x dx => ∂ (x:=x;dx), df x + ∂ (x:=x;dx), df x :=
by
  conv =>
    lhs; autodiff
  sorry

This is because simp introduces new (non-let) free variable df when differentiating df x + df x. This prevents fun_prop unfolding df.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant