Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em committed Aug 12, 2024
2 parents 2fae043 + ad26fe1 commit 4ff2a6a
Show file tree
Hide file tree
Showing 30 changed files with 22 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Batteries/CodeAction/Attr.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2023 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Lean.Server.CodeActions
import Lean.Server.CodeActions.Basic

/-!
# Initial setup for code action attributes
Expand Down
1 change: 0 additions & 1 deletion Batteries/CodeAction/Deprecated.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Authors: Mario Carneiro
-/
import Lean.Server.CodeActions
import Batteries.CodeAction.Basic
import Batteries.Lean.Position

/-!
# Code action for @[deprecated] replacements
Expand Down
1 change: 0 additions & 1 deletion Batteries/Data/ByteArray.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Copyright (c) 2023 François G. Dorais. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: François G. Dorais
-/
import Batteries.Data.Array.Lemmas

namespace ByteArray

Expand Down
1 change: 0 additions & 1 deletion Batteries/Data/HashMap/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
-/
import Batteries.Data.HashMap.Basic
import Batteries.Data.Array.Lemmas

/-!
# Lemmas for `Batteries.HashMap`
Expand Down
3 changes: 2 additions & 1 deletion Batteries/Data/HashMap/WF.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ Copyright (c) 2022 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Batteries.Tactic.SeqFocus
import Batteries.Data.HashMap.Basic
import Batteries.Data.Array.Lemmas
import Batteries.Data.Nat.Lemmas
import Batteries.Data.List.Lemmas

namespace Batteries.HashMap
namespace Imp
Expand Down
1 change: 0 additions & 1 deletion Batteries/Data/List/Pairwise.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, James Gallicchio
-/
import Batteries.Data.List.Count
import Batteries.Data.Fin.Lemmas

/-!
# Pairwise relations on a list
Expand Down
1 change: 0 additions & 1 deletion Batteries/Data/Rat/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Batteries.Data.Nat.Gcd
import Batteries.Data.Int.DivMod
import Batteries.Lean.Float

/-! # Basics for the Rational Numbers -/
Expand Down
1 change: 0 additions & 1 deletion Batteries/Data/String/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Batteries.Data.List.Lemmas
import Batteries.Data.String.Basic
import Batteries.Tactic.Lint.Misc
import Batteries.Tactic.SeqFocus
import Batteries.Tactic.SqueezeScope

namespace String

Expand Down
2 changes: 1 addition & 1 deletion Batteries/Data/UnionFind/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Copyright (c) 2021 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Batteries.Data.Array.Lemmas
import Batteries.Tactic.Lint.Misc
import Batteries.Tactic.SeqFocus

namespace Batteries

Expand Down
2 changes: 1 addition & 1 deletion Batteries/Lean/Meta/AssertHypotheses.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jannis Limperg
-/

import Batteries.Lean.Meta.Basic
import Lean.Meta.Tactic.Assert

open Lean Lean.Meta

Expand Down
4 changes: 1 addition & 3 deletions Batteries/Lean/Meta/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ Copyright (c) 2022 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Jannis Limperg
-/
import Lean.Elab.Term
import Lean.Meta.Tactic.Apply
import Lean.Meta.Tactic.Replace
import Lean.Meta.Tactic.Intro

open Lean Lean.Meta

Expand Down
1 change: 1 addition & 0 deletions Batteries/Lean/Meta/Clear.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Authors: Jannis Limperg
-/

import Batteries.Lean.Meta.Basic
import Lean.Meta.Tactic.Clear

open Lean Lean.Meta

Expand Down
2 changes: 1 addition & 1 deletion Batteries/Lean/Meta/Inaccessible.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2022 Jannis Limperg. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jannis Limperg
-/
import Lean.Meta.InferType
import Lean.Meta.Basic

open Lean Lean.Meta Std

Expand Down
1 change: 0 additions & 1 deletion Batteries/Lean/Position.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Lean.Syntax
import Lean.Meta.Tactic.TryThis
import Lean.Data.Lsp.Utf16

/-- Gets the LSP range of syntax `stx`. -/
Expand Down
1 change: 0 additions & 1 deletion Batteries/Lean/System/IO.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Copyright (c) 2023 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
-/
import Batteries.Data.List.Lemmas

/-!
# Functions for manipulating a list of tasks
Expand Down
2 changes: 0 additions & 2 deletions Batteries/Logic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ Copyright (c) 2014 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Jeremy Avigad, Floris van Doorn, Mario Carneiro
-/
import Batteries.Tactic.Init
import Batteries.Tactic.Alias
import Batteries.Tactic.Lint.Misc

instance {f : α → β} [DecidablePred p] : DecidablePred (p ∘ f) :=
inferInstanceAs <| DecidablePred fun x => p (f x)
Expand Down
8 changes: 4 additions & 4 deletions Batteries/StdDeprecations.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kim Morrison
-/
import Batteries.Tactic.Alias
import Batteries.Data.HashMap
import Batteries.Data.DList
import Batteries.Data.PairingHeap
import Batteries.Data.RBMap
import Batteries.Data.BinomialHeap
import Batteries.Data.UnionFind
import Batteries.Data.BinomialHeap.Basic
import Batteries.Data.HashMap.Basic
import Batteries.Data.RBMap.Basic
import Batteries.Data.UnionFind.Basic

/-!
# We set up deprecations for identifiers formerly in the `Std` namespace.
Expand Down
2 changes: 1 addition & 1 deletion Batteries/Tactic/Case.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2023 Kyle Miller. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
-/
import Lean.Elab.Tactic.Conv.Pattern
import Lean.Elab.Tactic.BuiltinTactic

/-!
# Extensions to the `case` tactic
Expand Down
2 changes: 1 addition & 1 deletion Batteries/Tactic/Classical.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2021 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Lean.Elab.ElabRules
import Lean.Elab.Tactic.Basic

/-! # `classical` tactic -/

Expand Down
6 changes: 2 additions & 4 deletions Batteries/Tactic/Init.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ Copyright (c) 2021 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Batteries.Lean.Meta.Basic
import Lean.Elab.Command
import Lean.Elab.Tactic.BuiltinTactic
import Lean.Elab.Tactic.ElabTerm

/-!
# Simple tactics that are used throughout Batteries.
-/

namespace Batteries.Tactic
open Lean Parser.Tactic Elab Command Elab.Tactic Meta
open Lean Parser.Tactic Elab Elab.Tactic Meta

/--
`_` in tactic position acts like the `done` tactic: it fails and gives the list
Expand Down
2 changes: 1 addition & 1 deletion Batteries/Tactic/NoMatch.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Copyright (c) 2021 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Lean.Elab.ElabRules
import Lean.DocString
import Lean.Elab.Tactic.Basic

/-!
Deprecation warnings for `match ⋯ with.`, `fun.`, `λ.`, and `intro.`.
Expand Down
1 change: 0 additions & 1 deletion Batteries/Tactic/PrintDependents.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Authors: Mario Carneiro
-/
import Lean.Elab.Command
import Lean.Util.FoldConsts
import Batteries.Lean.Delaborator

/-!
# `#print dependents` command
Expand Down
1 change: 0 additions & 1 deletion Batteries/Tactic/PrintPrefix.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Shing Tak Lam, Daniel Selsam, Mario Carneiro
-/
import Batteries.Lean.Util.EnvSearch
import Batteries.Lean.Delaborator
import Lean.Elab.Tactic.Config

namespace Batteries.Tactic
Expand Down
2 changes: 1 addition & 1 deletion Batteries/Tactic/SeqFocus.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2022 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad
-/
import Lean.Elab.ElabRules
import Lean.Elab.Tactic.Basic

open Lean Elab Meta Tactic

Expand Down
1 change: 0 additions & 1 deletion Batteries/Tactic/ShowUnused.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Authors: Mario Carneiro
-/
import Lean.Util.FoldConsts
import Lean.Linter.UnusedVariables
import Batteries.Lean.Delaborator

/-!
# The `#show_unused` command
Expand Down
2 changes: 1 addition & 1 deletion Batteries/Tactic/Unreachable.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2021 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Lean.Elab.ElabRules
import Lean.Elab.Tactic.Basic

namespace Batteries.Tactic

Expand Down
2 changes: 1 addition & 1 deletion Batteries/Util/Cache.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2021 Gabriel Ebner. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Gabriel Ebner
-/
import Batteries.Lean.Meta.DiscrTree
import Lean.Meta.DiscrTree

/-!
# Once-per-file cache for tactics
Expand Down
2 changes: 0 additions & 2 deletions Batteries/Util/ExtendedBinder.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Gabriel Ebner
-/
import Lean.Elab.MacroArgUtil
import Lean.Linter.MissingDocs

/-!
Defines an extended binder syntax supporting `∀ ε > 0, ...` etc.
Expand Down
2 changes: 1 addition & 1 deletion Batteries/Util/LibraryNote.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2022 Gabriel Ebner. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Gabriel Ebner
-/
import Lean.Elab.ElabRules
import Lean.Elab.Command

/-!
# Define the `library_note` command.
Expand Down
1 change: 1 addition & 0 deletions test/MLList.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Batteries.Data.MLList.IO
import Batteries.Data.List.Basic

set_option linter.missingDocs false

Expand Down

0 comments on commit 4ff2a6a

Please sign in to comment.