`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`.
19 lines
429 B
Text
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
|