lecopivo / SciLean

Scientific computing in Lean 4
https://lecopivo.github.io/scientific-computing-lean/
Apache License 2.0
309 stars 25 forks source link

`lsimp` is not fully normalizing let bindings through application #26

Closed lecopivo closed 11 months ago

lecopivo commented 11 months ago

lsimp is not fully normalizing let bindings through application. Consider this code

import SciLean
#check 
  (a + 
    (a + 
    let x := a + a
    x))
  rewrite_by
    lsimp (config := {zeta := false, singlePass := true})

which produces

a +
  let x := a + a;
  a + x : ℕ

but

let x := a + a;
a + (a + x)

is expected