lean4-htt/tests/lean/run/reductionBug.lean
Leonardo de Moura 45475d6434
feat: allow users to disable simpCtorEq simproc (#5167)
`simp only` will not apply this simproc anymore. Users must now write
`simp only [reduceCtorEq]`. See RFC #5046 for motivation.
This PR also renames simproc to `reduceCtorEq`. 

close #5046 


@semorrison A few `simp only ...` tactics will probably break in
Mathlib. Fix: include `reduceCtorEq`.
2024-08-26 13:51:21 +00:00

19 lines
429 B
Text

abbrev VName := String
inductive Ty where
| Bool
| Int
def Ctxt := VName → Option Ty
variable (Γ : Ctxt) in
inductive Expr : Ty → Type where
| var (h : Γ x = some τ) : Expr τ
def Expr.constFold : Expr Γ τ → Option Unit
| var n => none
theorem Expr.constFold_sound {e : Expr Γ τ} : constFold e = some v → True := by
intro h
induction e with
| var => simp only [reduceCtorEq, constFold] at h