nielsr's picture
nielsr HF Staff
Add Formal Conjectures (snapshot 86a2f58): statements + files parquet, Lean project (part 7)
8ca48d7 verified
Raw History Blame Contribute Delete
6.32 kB
/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
module
public meta import FormalConjecturesUtil.Linters.ImportLinter
@[expose] public section
open ImportLinter
set_option linter.style.imports true
-- Standard valid import
#guard_msgs in
#check_imports "module\npublic import FormalConjecturesUtil"
-- Files must be modules
/--
warning: Files in 'FormalConjectures' must be modules. Add 'module' before the imports, use 'public import FormalConjecturesUtil', and add '@[expose] public section' after the module docstring.
Note: This linter can be disabled with `set_option linter.style.imports false`
-/
#guard_msgs in
#check_imports "import FormalConjecturesUtil"
-- In a module, a plain `import` is private
/--
warning: Use 'public import FormalConjecturesUtil'. In a module, a plain 'import' is private, so the statements of public declarations cannot use it.
Note: This linter can be disabled with `set_option linter.style.imports false`
-/
#guard_msgs in
#check_imports "module\nimport FormalConjecturesUtil"
/--
warning: Direct imports from 'Mathlib' (such as 'Mathlib.Data.Nat.Prime.Nth') are disallowed in 'FormalConjectures'. Use 'import FormalConjecturesUtil' instead.
Note: This linter can be disabled with `set_option linter.style.imports false`
-/
#guard_msgs in
#check_imports "module\npublic import FormalConjecturesUtil\npublic import Mathlib.Data.Nat.Prime.Nth"
/--
warning: Direct imports from 'Mathlib' (such as 'Mathlib') are disallowed in 'FormalConjectures'. Use 'import FormalConjecturesUtil' instead.
Note: This linter can be disabled with `set_option linter.style.imports false`
-/
#guard_msgs in
#check_imports "module\npublic import FormalConjecturesUtil\npublic import Mathlib"
/--
warning: Direct imports from 'Mathlib' (such as 'Mathlib.Topology.Basic') are disallowed in 'FormalConjectures'. Use 'import FormalConjecturesUtil' instead.
Note: This linter can be disabled with `set_option linter.style.imports false`
---
warning: Files in 'FormalConjectures' must import 'FormalConjecturesUtil'.
Note: This linter can be disabled with `set_option linter.style.imports false`
-/
#guard_msgs in
#check_imports "module\npublic import Mathlib.Topology.Basic"
/--
warning: Files in 'FormalConjectures' must import 'FormalConjecturesUtil'.
Note: This linter can be disabled with `set_option linter.style.imports false`
-/
#guard_msgs in
#check_imports "module\npublic import FormalConjectures.ErdosProblems.«508»"
/--
warning: Direct imports from 'FormalConjecturesForMathlib' (such as 'FormalConjecturesForMathlib.Combinatorics.Basic') are disallowed in 'FormalConjectures'. Use 'import FormalConjecturesUtil' instead.
Note: This linter can be disabled with `set_option linter.style.imports false`
-/
#guard_msgs in
#check_imports "module\npublic import FormalConjecturesUtil\npublic import FormalConjecturesForMathlib.Combinatorics.Basic"
/--
warning: Direct imports from 'FormalConjecturesForMathlib' (such as 'FormalConjecturesForMathlib') are disallowed in 'FormalConjectures'. Use 'import FormalConjecturesUtil' instead.
Note: This linter can be disabled with `set_option linter.style.imports false`
-/
#guard_msgs in
#check_imports "module\npublic import FormalConjecturesUtil\npublic import FormalConjecturesForMathlib"
-- When disabled via set_option, no warnings are emitted
set_option linter.style.imports false in
#guard_msgs in
#check_imports "import Mathlib.Topology.Basic"
set_option linter.style.imports false in
#guard_msgs in
#check_imports "import FormalConjecturesForMathlib.Combinatorics.Basic"
-- `meta import`s only load compiled code and are exempt from the direct-import rules
#guard_msgs in
#check_imports "module\npublic import FormalConjecturesUtil\nmeta import FormalConjecturesForMathlib.Combinatorics.Basic"
#guard_msgs in
#check_imports "module\npublic import FormalConjecturesUtil\nmeta import Mathlib.Combinatorics.Enumerative.Partition"
-- `meta import`ing a whole library is disallowed
/--
warning: 'meta import FormalConjecturesUtil' loads the compiled code of the whole library. Instead, 'meta import' only the module defining the declaration that is evaluated (for example by 'native_decide').
Note: This linter can be disabled with `set_option linter.style.imports false`
-/
#guard_msgs in
#check_imports "module\npublic import FormalConjecturesUtil\nmeta import FormalConjecturesUtil"
/--
warning: 'meta import FormalConjecturesForMathlib' loads the compiled code of the whole library. Instead, 'meta import' only the module defining the declaration that is evaluated (for example by 'native_decide').
Note: This linter can be disabled with `set_option linter.style.imports false`
-/
#guard_msgs in
#check_imports "module\npublic import FormalConjecturesUtil\nmeta import FormalConjecturesForMathlib"
/--
warning: 'meta import Mathlib' loads the compiled code of the whole library. Instead, 'meta import' only the module defining the declaration that is evaluated (for example by 'native_decide').
Note: This linter can be disabled with `set_option linter.style.imports false`
-/
#guard_msgs in
#check_imports "module\npublic import FormalConjecturesUtil\nmeta import Mathlib"
-- a `meta import` of `FormalConjecturesUtil` also does not count as importing it
/--
warning: 'meta import FormalConjecturesUtil' loads the compiled code of the whole library. Instead, 'meta import' only the module defining the declaration that is evaluated (for example by 'native_decide').
Note: This linter can be disabled with `set_option linter.style.imports false`
---
warning: Files in 'FormalConjectures' must import 'FormalConjecturesUtil'.
Note: This linter can be disabled with `set_option linter.style.imports false`
-/
#guard_msgs in
#check_imports "module\nmeta import FormalConjecturesUtil"