Skip to content

Commit 5e8967d

Browse files
authored
chore: conform to header linter (#517)
I recently discovered that while the header linter is included as part of the weekly linting set that CSLib enables, its implementation was such that it only worked in Mathlib. Kim has kindly fixed this in leanprover-community/mathlib4#38396, which should be merged soon. Unfortunately, when I did the port to the module system, I accidentally placed some of the `public section` incorrectly above the module docstring, getting no warning from the header linter, and subsequently others followed my lead. Most of the changes here are just this, plus just a few missing module docstrings and typos.
1 parent f908775 commit 5e8967d

121 files changed

Lines changed: 271 additions & 235 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cslib/Algorithms/Lean/MergeSort/MergeSort.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ public import Mathlib.Data.Nat.Cast.Order.Ring
1111
public import Mathlib.Data.Nat.Lattice
1212
public import Mathlib.Data.Nat.Log
1313

14-
@[expose] public section
15-
1614
/-!
1715
# MergeSort on a list
1816
@@ -27,6 +25,8 @@ over the list `TimeM ℕ (List α)`. The time complexity of `mergeSort` is the n
2725
2826
-/
2927

28+
@[expose] public section
29+
3030
set_option autoImplicit false
3131

3232
namespace Cslib.Algorithms.Lean.TimeM

Cslib/Algorithms/Lean/TimeM.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ module
99
public import Cslib.Init
1010
public import Mathlib.Algebra.Group.Defs
1111

12-
13-
@[expose] public section
14-
1512
/-!
1613
1714
# TimeM: Time Complexity Monad
@@ -40,6 +37,9 @@ actual wall time, or as more complex types in order to model more general costs.
4037
4138
See [Danielsson2008] for the discussion.
4239
-/
40+
41+
@[expose] public section
42+
4343
namespace Cslib.Algorithms.Lean
4444

4545
/-- A monad for tracking time complexity of computations.

Cslib/Computability/Automata/Acceptors/Acceptor.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ module
99
public import Cslib.Init
1010
public import Mathlib.Computability.Language
1111

12+
/-! -/
13+
1214
@[expose] public section
1315

1416
namespace Cslib.Automata

Cslib/Computability/Automata/Acceptors/OmegaAcceptor.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ module
88

99
public import Cslib.Computability.Languages.OmegaLanguage
1010

11+
/-! -/
12+
1113
@[expose] public section
1214

1315
namespace Cslib.Automata

Cslib/Computability/Automata/DA/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ public import Cslib.Computability.Automata.Acceptors.OmegaAcceptor
1111
public import Cslib.Foundations.Data.OmegaSequence.InfOcc
1212
public import Cslib.Foundations.Semantics.FLTS.Basic
1313

14-
@[expose] public section
15-
1614
/-! # Deterministic Automata
1715
1816
A Deterministic Automaton (`DA`) is an automaton defined by a transition function equipped with an
@@ -28,6 +26,8 @@ finiteness assumptions), deterministic Buchi automata, and deterministic Muller
2826
*Introduction to Automata Theory, Languages, and Computation*][Hopcroft2006]
2927
-/
3028

29+
@[expose] public section
30+
3131
open List Filter Cslib.ωSequence
3232
open scoped Cslib.FLTS
3333

Cslib/Computability/Automata/DA/Buchi.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ module
88

99
public import Cslib.Computability.Automata.DA.Basic
1010

11-
public section
12-
1311
/-! # Deterministic Buchi automata.
1412
-/
1513

16-
open Filter
14+
public section
1715

1816
namespace Cslib.Automata.DA
1917

Cslib/Computability/Automata/DA/Congr.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ module
99
public import Cslib.Computability.Automata.DA.Basic
1010
public import Cslib.Computability.Languages.Congruences.RightCongruence
1111

12-
@[expose] public section
13-
1412
/-! # Deterministic automaton corresponding to a right congruence. -/
1513

14+
@[expose] public section
15+
1616
namespace Cslib
1717

1818
open scoped FLTS RightCongruence

Cslib/Computability/Automata/DA/Prod.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ module
99
public import Cslib.Computability.Automata.DA.Basic
1010
public import Cslib.Foundations.Semantics.FLTS.Prod
1111

12-
@[expose] public section
13-
1412
/-! # Product of deterministic automata. -/
1513

14+
@[expose] public section
15+
1616
namespace Cslib.Automata
1717

1818
open List

Cslib/Computability/Automata/DA/ToNA.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ public import Cslib.Computability.Automata.DA.Basic
1010
public import Cslib.Computability.Automata.NA.Basic
1111
public import Cslib.Foundations.Semantics.FLTS.FLTSToLTS
1212

13-
@[expose] public section
14-
1513
/-! # Translation of Deterministic Automata into Nonodeterministic Automata.
1614
1715
This is the general version of the standard translation of DFAs into NFAs. -/
1816

17+
@[expose] public section
18+
1919
namespace Cslib.Automata.DA
2020

2121
variable {State Symbol : Type*}

Cslib/Computability/Automata/EpsilonNA/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ module
99
public import Cslib.Computability.Automata.NA.Basic
1010
public import Cslib.Foundations.Semantics.LTS.HasTau
1111

12-
@[expose] public section
13-
1412
/-! # Nondeterministic automata with ε-transitions. -/
1513

14+
@[expose] public section
15+
1616
namespace Cslib.Automata
1717

1818
/-- A nondeterministic finite automaton with ε-transitions (`εNA`) is an `NA` with an `Option`

0 commit comments

Comments
 (0)