Skip to content

Commit 3c32718

Browse files
committed
chore: annotate manual alignment (leanprover-community#33789)
The whitespace linter does not support this: disable the linter in these instances. Extracted from leanprover-community#30658 to minimise the diff.
1 parent 7e1b73e commit 3c32718

42 files changed

Lines changed: 61 additions & 6 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.

Archive/Arithcc.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ theorem write_eq_implies_stateEq {t : Register} {v : Word} {ζ₁ ζ₂ : State}
265265
rwa [if_neg (ne_of_lt hr)] at h
266266

267267
set_option linter.flexible false in
268+
set_option linter.style.whitespace false in -- manual alignment is not recognised
268269
/-- The main **compiler correctness theorem**.
269270
270271
Unlike Theorem 1 in the paper, both `map` and the assumption on `t` are explicit.

Archive/Examples/IfNormalization/Result.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ We don't want a `simp` lemma for `(ite i t e).eval` in general, only once we kno
4949
| .ite i t e => 2 * normSize i + max (normSize t) (normSize e) + 1
5050

5151
set_option linter.flexible false in
52+
set_option linter.style.whitespace false in -- manual alignment is not recognised
5253
/-- Normalizes the expression at the same time as assigning all variables in
5354
`e` to the literal Booleans given by `l` -/
5455
def normalize (l : AList (fun _ : ℕ => Bool)) :

Archive/Examples/Kuratowski.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ theorem isOpen_of_mem_theOpenSix (h : t ∈ theOpenSix s) : IsOpen t := by
8181
theorem mem_theOpenSix_iff : t ∈ theOpenSix s ↔ tᶜ ∈ theClosedSix s := by
8282
conv_lhs => rw [theOpenSix, ← compl_compl t, Multiset.mem_map_of_injective compl_injective]
8383

84+
set_option linter.style.whitespace false in -- manual alignment is not recognised
8485
/-- Six inequalities that suffice to deduce the six closed sets obtained from a given set
8586
contain no duplicates. -/
8687
def TheSixIneq (s : Set X) : Prop :=

Mathlib/Algebra/Category/ContinuousCohomology/Basic.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,14 @@ def const : 𝟭 _ ⟶ I R G where
9494

9595
namespace MultiInd
9696

97+
set_option linter.style.whitespace false in -- manual alignment is not recognised
9798
/-- The n-th functor taking `M` to `C(G, C(G,...,C(G, M)))` (with n `G`s).
9899
These functors form a complex, see `MultiInd.complex`. -/
99100
def functor : ℕ → Action (TopModuleCat R) G ⥤ Action (TopModuleCat R) G
100101
| 0 => 𝟭 _
101102
| n + 1 => functor n ⋙ I R G
102103

104+
set_option linter.style.whitespace false in -- manual alignment is not recognised
103105
/-- The differential map in `MultiInd.complex`. -/
104106
def d : ∀ n : ℕ, functor R G n ⟶ functor R G (n + 1)
105107
| 0 => const R G

Mathlib/Algebra/Group/Int/Defs.lean

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ These also prevent non-computable instances like `Int.instNormedCommRing` being
6666
these instances non-computably.
6767
-/
6868

69-
set_option linter.style.whitespace false
69+
section
70+
set_option linter.style.whitespace false -- manual alignment is not recognised
7071

7172
instance instAddCommMonoid : AddCommMonoid ℤ := by infer_instance
7273
instance instAddMonoid : AddMonoid ℤ := by infer_instance
@@ -77,6 +78,8 @@ instance instAddGroup : AddGroup ℤ := by infer_instance
7778
instance instAddCommSemigroup : AddCommSemigroup ℤ := by infer_instance
7879
instance instAddSemigroup : AddSemigroup ℤ := by infer_instance
7980

81+
end
82+
8083
-- This lemma is higher priority than later `_root_.nsmul_eq_mul` so that the `simpNF` is happy
8184
@[simp high] protected lemma nsmul_eq_mul (n : ℕ) (a : ℤ) : n • a = n * a := rfl
8285

Mathlib/Algebra/Group/Irreducible/Indecomposable.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ lemma pairwise_baseOf_div_notMem [InvolutiveInv ι] [CommGroup S] [IsOrderedMono
174174
(baseOf v f).Pairwise fun i j ↦ v i / v j ∉ range v :=
175175
pairwise_div_notMem_range' v hv_inv f hf (baseOf v f) (.refl _)
176176

177+
set_option linter.style.whitespace false in -- manual alignment is not recognised
177178
@[to_additive]
178179
lemma mem_or_inv_mem_closure_baseOf [Finite ι] [InvolutiveInv ι] [CommGroup S] [IsOrderedMonoid S]
179180
(v : ι → G) (hv_inv : ∀ i, v i⁻¹ = (v i)⁻¹)

Mathlib/Algebra/Group/Nat/Defs.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ instance instIsAddTorsionFree : IsAddTorsionFree ℕ where
6666
These also prevent non-computable instances being used to construct these instances non-computably.
6767
-/
6868

69-
set_option linter.style.whitespace false
69+
set_option linter.style.whitespace false -- manual alignment is not recognised
7070

7171
instance instAddCommMonoid : AddCommMonoid ℕ := by infer_instance
7272
instance instAddMonoid : AddMonoid ℕ := by infer_instance

Mathlib/Algebra/Lie/LieTheorem.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ variable {V : Type*} [AddCommGroup V] [Module k V] [LieRingModule L V] [LieModul
164164

165165
variable [CharZero k] [Module.Finite k V]
166166

167+
set_option linter.style.whitespace false in -- manual alignment is not recognised
167168
open Submodule in
168169
theorem exists_nontrivial_weightSpace_of_lieIdeal [LieModule.IsTriangularizable k L V]
169170
(A : LieIdeal k L) (hA : IsCoatom A.toSubmodule)

Mathlib/Algebra/Order/Ring/IsNonarchimedean.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ theorem apply_intCast_le_one_of_isNonarchimedean [IsStrictOrderedRing R]
6464
obtain ⟨a, rfl | rfl⟩ := Int.eq_nat_or_neg n <;>
6565
simp [apply_natCast_le_one_of_isNonarchimedean hna]
6666

67+
set_option linter.style.whitespace false in -- manual alignment is not recognised
6768
lemma add_eq_right_of_lt {F α : Type*} [AddGroup α] [FunLike F α R]
6869
[AddGroupSeminormClass F α R] {f : F} (hna : IsNonarchimedean f) {x y : α}
6970
(h_lt : f x < f y) : f (x + y) = f y := by
@@ -78,6 +79,7 @@ lemma add_eq_right_of_lt {F α : Type*} [AddGroup α] [FunLike F α R]
7879
exact max_lt h_lt <| lt_of_le_of_ne h1 h
7980
_ = f y := max_self (f y)
8081

82+
set_option linter.style.whitespace false in -- manual alignment is not recognised
8183
lemma add_eq_left_of_lt {F α : Type*} [AddGroup α] [FunLike F α R]
8284
[AddGroupSeminormClass F α R] {f : F} (hna : IsNonarchimedean f) {x y : α}
8385
(h_lt : f y < f x) : f (x + y) = f x := by

Mathlib/Algebra/Polynomial/Basic.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ theorem ofFinsupp_smul {S : Type*} [SMulZeroClass S R] (a : S) (b) :
174174
(⟨a • b⟩ : R[X]) = (a • ⟨b⟩ : R[X]) :=
175175
rfl
176176

177+
set_option linter.style.whitespace false in -- manual alignment is not recognised
177178
@[simp]
178179
theorem ofFinsupp_pow (a) (n : ℕ) : (⟨a ^ n⟩ : R[X]) = ⟨a⟩ ^ n := by
179180
change _ = npowRec n _

0 commit comments

Comments
 (0)