lean4-htt/src/Lean
Scott Morrison 02c5700c63
feat: change apply_rfl tactic so that it does not operate on = (#3784)
Previously:

If the `rfl` macro was going to fail, it would:
1. expand to `eq_refl`, which is implemented by
`Lean.Elab.Tactic.evalRefl`, and call `Lean.MVarId.refl` which would:
* either try kernel defeq (if in `.default` or `.all` transparency mode)
  * otherwise try `IsDefEq`
  * then fail.
2. Next expand to the `apply_rfl` tactic, which is implemented by
`Lean.Elab.Tactic.Rfl.evalApplyRfl`, and call `Lean.MVarId.applyRefl`
which would look for lemmas labelled `@[refl]`, and unfortunately in
Mathlib find `Eq.refl`, so try applying that (resulting in another
`IsDefEq`)
3. Because of an accidental duplication, if `Lean.Elab.Tactic.Rfl` was
imported, it would *again* expand to `apply_rfl`.

Now:
1. Same behaviour in `eq_refl`.
2. The `@[refl]` attribute will reject `Eq.refl`, and `MVarId.applyRefl`
will fail when applied to equality goals.
3. The duplication has been removed.
2024-03-27 12:04:22 +00:00
..
Compiler chore: remove the coercion from String to Name (#3589) 2024-03-21 23:46:03 +00:00
Data chore: reorganising to reduce imports (#3790) 2024-03-27 11:15:01 +00:00
Elab feat: change apply_rfl tactic so that it does not operate on = (#3784) 2024-03-27 12:04:22 +00:00
Language fix: restore default of stderrAsMessages (#3733) 2024-03-21 17:43:29 +00:00
Linter perf: rewrite UnusedVariables lint (#3186) 2024-03-21 12:28:57 +00:00
Meta feat: change apply_rfl tactic so that it does not operate on = (#3784) 2024-03-27 12:04:22 +00:00
Parser fix: remove derive_functional_induction (#3788) 2024-03-27 10:08:13 +00:00
ParserCompiler feat: reserved names (#3675) 2024-03-15 00:33:22 +00:00
PrettyPrinter feat: flatten parent projections when pretty printing structure instance notation (#3749) 2024-03-23 09:20:52 +00:00
Server chore: more generic import out of date diagnostic (#3739) 2024-03-22 13:13:20 +00:00
Util feat: MonadAlwaysExcept for MonadCacheT (#3726) 2024-03-21 09:01:13 +00:00
Widget chore: remove the coercion from String to Name (#3589) 2024-03-21 23:46:03 +00:00
Attributes.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
AuxRecursor.lean chore: remove the coercion from String to Name (#3589) 2024-03-21 23:46:03 +00:00
Class.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Compiler.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
CoreM.lean chore: remove the coercion from String to Name (#3589) 2024-03-21 23:46:03 +00:00
Data.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Declaration.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
DeclarationRange.lean feat: snapshot trees and language processors (#3014) 2024-03-14 13:40:08 +00:00
DocString.lean chore: reorganising to reduce imports (#3790) 2024-03-27 11:15:01 +00:00
Elab.lean feat: macro expander for match_expr terms 2024-03-01 22:33:14 -08:00
Environment.lean feat: reserved names (#3675) 2024-03-15 00:33:22 +00:00
Eval.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Exception.lean doc: fix typos (#3543) 2024-02-29 13:23:19 +00:00
Expr.lean feat: upstream rw? tactic (#3719) 2024-03-23 05:01:35 +00:00
HeadIndex.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Hygiene.lean chore: remove the coercion from String to Name (#3589) 2024-03-21 23:46:03 +00:00
ImportingFlag.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
InternalExceptionId.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
KeyedDeclsAttribute.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
LabelAttribute.lean chore: reorganising to reduce imports (#3790) 2024-03-27 11:15:01 +00:00
LazyInitExtension.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Level.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Linter.lean chore: add missing copyright headers (#3411) 2024-02-20 01:49:55 +00:00
LoadDynlib.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
LocalContext.lean chore: upstream omega (#3367) 2024-02-19 00:19:55 +00:00
Log.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Message.lean feat: snapshot trees and language processors (#3014) 2024-03-14 13:40:08 +00:00
Meta.lean fix: add Canonicalizer.lean and use it to canonicalize terms in omega (#3639) 2024-03-12 23:18:56 +00:00
MetavarContext.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Modifiers.lean fix: auto-completion bugs and performance (#3460) 2024-02-26 09:43:19 +00:00
MonadEnv.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Parser.lean chore: remove the coercion from String to Name (#3589) 2024-03-21 23:46:03 +00:00
ParserCompiler.lean refactor: Offset.lean and related files (#3614) 2024-03-05 19:40:15 -08:00
PrettyPrinter.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
ProjFns.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
ReducibilityAttrs.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Replay.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
ReservedNameAction.lean feat: reserved names (#3675) 2024-03-15 00:33:22 +00:00
ResolveName.lean feat: reserved names (#3675) 2024-03-15 00:33:22 +00:00
Runtime.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
ScopedEnvExtension.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Server.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Structure.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
SubExpr.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Syntax.lean refactor: simplify some nomatch with nofun (#3564) 2024-03-02 20:43:31 +00:00
ToExpr.lean fix: ToExpr instance for Fin 2024-02-24 16:08:07 -08:00
Util.lean chore: upstream exact? and apply? from Std (#3447) 2024-02-23 21:55:24 +00:00
Widget.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00