chore: avoid importing List.Basic without List.Impl (#5245)
This doesn't completely resolve the danger (only relevant in `prelude` files) of importing `Init.Data.List.Basic` but not `Init.Data.List.Impl` and thereby not having `@[csimp]` lemmas installed for some list operations. I'm going to address this better while working on `Array`.
This commit is contained in:
parent
4eea57841d
commit
318e455d96
9 changed files with 9 additions and 10 deletions
|
|
@ -8,7 +8,7 @@ The integers, with addition, multiplication, and subtraction.
|
|||
prelude
|
||||
import Init.Data.Cast
|
||||
import Init.Data.Nat.Div
|
||||
import Init.Data.List.Basic
|
||||
|
||||
set_option linter.missingDocs true -- keep it documented
|
||||
open Nat
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ The following operations were already given `@[csimp]` replacements in `Init/Dat
|
|||
`length`, `map`, `filter`, `replicate`, `leftPad`, `unzip`, `range'`, `iota`, `intersperse`.
|
||||
|
||||
The following operations are given `@[csimp]` replacements below:
|
||||
``set`, `filterMap`, `foldr`, `append`, `bind`, `join`,
|
||||
`take`, `takeWhile`, `dropLast`, `replace`, `erase`, `eraseIdx`, `zipWith`, ,
|
||||
`set`, `filterMap`, `foldr`, `append`, `bind`, `join`,
|
||||
`take`, `takeWhile`, `dropLast`, `replace`, `erase`, `eraseIdx`, `zipWith`,
|
||||
`enumFrom`, and `intercalate`.
|
||||
|
||||
-/
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ Author: Leonardo de Moura
|
|||
-/
|
||||
prelude
|
||||
import Init.Control.Id
|
||||
import Init.Data.List.Basic
|
||||
import Init.Data.List.Impl
|
||||
|
||||
universe u v w w'
|
||||
namespace Lean
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ Author: Leonardo de Moura
|
|||
-/
|
||||
prelude
|
||||
import Init.Data.Nat.Power2
|
||||
import Init.Data.List.Control
|
||||
import Std.Data.HashSet.Basic
|
||||
import Std.Data.HashSet.Raw
|
||||
namespace Lean
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
Authors: Gabriel Ebner, Marc Huisinga
|
||||
-/
|
||||
prelude
|
||||
import Init.Data.List.Control
|
||||
import Init.Data.Range
|
||||
import Init.Data.OfScientific
|
||||
import Init.Data.Hashable
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
Authors: Leonardo de Moura
|
||||
-/
|
||||
prelude
|
||||
import Init.Data.List.Control
|
||||
import Init.Data.List.Impl
|
||||
import Init.Data.Format.Syntax
|
||||
|
||||
namespace Lean
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ with a directory `A/`. `import A` resolves to `path/A.olean`.
|
|||
-/
|
||||
prelude
|
||||
import Init.System.IO
|
||||
import Init.Data.List.Control
|
||||
|
||||
namespace Lean
|
||||
open System
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
Authors: Leonardo de Moura
|
||||
-/
|
||||
prelude
|
||||
import Init.Data.List.Control
|
||||
import Lean.Data.HashMap
|
||||
import Std.Data.HashMap.Basic
|
||||
namespace Lean.SCC
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
prelude
|
||||
import Init.MetaTypes
|
||||
import Init.Data.List.Basic
|
||||
import Init.Data.List.Lemmas
|
||||
|
||||
attribute [-simp] List.map_map -- Turn off the global simp lemma so we can turn on and off the local version.
|
||||
|
||||
@[simp] theorem map_comp_map (f : α → β) (g : β → γ) : List.map g ∘ List.map f = List.map (g ∘ f) :=
|
||||
sorry
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue