Skip to content

Commit

Permalink
add some explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
JovanGerb committed Feb 6, 2025
1 parent 56c9748 commit 18c9e61
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Lean/Meta/Tactic/Simp/SimpTheorems.lean
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ structure SimpTheorems where

/--
Configuration for `MetaM` used to process global simp theorems
Note that this configuration should be similar to the default `simp` configuration,
so that the discrimination tree keys are appropriate for `simp`lified expressions.
-/
def simpGlobalConfig : ConfigWithKey :=
{ proj := .no
Expand Down
7 changes: 7 additions & 0 deletions tests/lean/run/6909.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ abbrev Multiseries : List Nat → Type

opaque maxExp (n : Nat) (ns : List Nat) (li : List (Multiseries (n :: ns))) : Nat

/-
Previously, this lemma couldn't simplify itself, because the discrimination tree
keys were computed with `iota := false`.
Because `simp` uses `iota := true`, `Multiseries (n :: ns)` reduces to `Int`,
so the discrimination tree keys didn't match.
-/

@[simp]
axiom bad_simp_lemma (n : Nat) (ns : List Nat) : maxExp n ns [] = 8

Expand Down

0 comments on commit 18c9e61

Please sign in to comment.