Skip to content

Commit 0a79ece

Browse files
committed
update dsimp
1 parent 5a0c83f commit 0a79ece

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/Init/MetaTypes.lean

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ It is immediately converted to `Lean.Meta.Simp.Config` by `Lean.Elab.Tactic.elab
5757
-/
5858
structure Config where
5959
/--
60-
When `true` (default: `true`), performs zeta reduction of let expressions.
60+
When `true` (default: `true`), performs zeta reduction of `let` and `have` expressions.
6161
That is, `let x := v; e[x]` reduces to `e[v]`.
62+
If `zetaHave` is `false` then `have` expressions are not zeta reduced.
6263
See also `zetaDelta`.
6364
-/
6465
zeta : Bool := true
@@ -107,7 +108,8 @@ structure Config where
107108
unfoldPartialApp : Bool := false
108109
/--
109110
When `true` (default: `false`), local definitions are unfolded.
110-
That is, given a local context containing entry `x : t := e`, the free variable `x` reduces to `e`.
111+
That is, given a local context containing `x : t := e`, then the free variable `x` reduces to `e`.
112+
Otherwise, `x` must be provided as a `simp` argument.
111113
-/
112114
zetaDelta : Bool := false
113115
/--
@@ -116,10 +118,17 @@ structure Config where
116118
-/
117119
index : Bool := true
118120
/--
119-
When `true` (default : `true`), then simps will remove unused let-declarations:
121+
When `true` (default : `true`), then `simp` will remove unused `let` and `have` expressions:
120122
`let x := v; e` simplifies to `e` when `x` does not occur in `e`.
121123
-/
122124
zetaUnused : Bool := true
125+
/--
126+
(Unimplemented)
127+
When `false` (default: `true`), then disables zeta reduction of `have` expressions.
128+
If `zeta` is `false`, then this option has no effect.
129+
Unused `have`s are still removed if `zeta` or `zetaUnused` are true.
130+
-/
131+
zetaHave : Bool := true
123132
deriving Inhabited, BEq
124133

125134
end DSimp

0 commit comments

Comments
 (0)