Skip to content

Commit 95fdbd6

Browse files
committed
chore: clean up backward.privateInPublic around d₂₃ (leanprover-community#40228)
Inlines a single-use private declaration, which allows us to get rid of a couple `backward.privateInPublic`s. This reduces instructions in that file by ~29% (but this gets swallowed in the overall noise). Note: before this PR, `LieModule.Cohomology.d₂₃_aux._proof_17` was the biggest proof in mathlib (counted with sharing). :) This PR changes it to `CategoryTheory.Functor.IsDenseSubsite.isIso_ranCounit_app_of_isDenseSubsite`.
1 parent 20d9d3d commit 95fdbd6

1 file changed

Lines changed: 11 additions & 17 deletions

File tree

Mathlib/Algebra/Lie/Cochain.lean

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -117,26 +117,20 @@ lemma d₁₂_apply_apply_ofTrivial [LieModule.IsTrivial L M] (f : oneCochain R
117117
d₁₂ R L M f x y = - f ⁅x, y⁆ := by
118118
simp [trivial_lie_zero]
119119

120-
set_option backward.privateInPublic true in
121120
/-- The coboundary operator taking degree 2 cochains to a space containing degree 3 cochains. -/
122-
private def d₂₃Aux (a : twoCochain R L M) : L →ₗ[R] L →ₗ[R] L →ₗ[R] M where
123-
toFun x :=
124-
{ toFun y :=
125-
{ toFun z := ⁅x, a y z⁆ - ⁅y, a x z⁆ + ⁅z, a x y⁆ - a ⁅x, y⁆ z + a ⁅x, z⁆ y - a ⁅y, z⁆ x
126-
map_add' _ _ := by simp; abel
127-
map_smul' _ _ := by abel_nf; simp }
121+
def d₂₃ : twoCochain R L M →ₗ[R] L →ₗ[R] L →ₗ[R] L →ₗ[R] M where
122+
toFun a := {
123+
toFun x := {
124+
toFun y := {
125+
toFun z := ⁅x, a y z⁆ - ⁅y, a x z⁆ + ⁅z, a x y⁆ - a ⁅x, y⁆ z + a ⁅x, z⁆ y - a ⁅y, z⁆ x
126+
map_add' _ _ := by simp; abel
127+
map_smul' _ _ := by simp; abel_nf; simp }
128128
map_add' _ _ := by ext; simp; abel
129-
map_smul' _ _ := by ext; abel_nf; simp }
129+
map_smul' _ _ := by ext; simp; abel_nf; simp }
130+
map_add' _ _ := by ext; simp; abel
131+
map_smul' _ _ := by ext; simp; abel_nf; simp }
130132
map_add' _ _ := by ext; simp; abel
131-
map_smul' _ _ := by ext; abel_nf; simp
132-
133-
set_option backward.privateInPublic true in
134-
set_option backward.privateInPublic.warn false in
135-
/-- The coboundary operator taking degree 2 cochains to a space containing degree 3 cochains. -/
136-
def d₂₃ : twoCochain R L M →ₗ[R] L →ₗ[R] L →ₗ[R] L →ₗ[R] M where
137-
toFun := d₂₃Aux R L M
138-
map_add' _ _ := by ext; simp [d₂₃Aux]; abel
139-
map_smul' _ _ := by ext; simp [d₂₃Aux]; abel_nf; simp
133+
map_smul' _ _ := by ext; simp; abel_nf; simp
140134

141135
@[simp]
142136
lemma d₂₃_apply (a : twoCochain R L M) (x y z : L) :

0 commit comments

Comments
 (0)