Skip to content

Commit 5b48041

Browse files
committed
feat: last adaptations for v4.31.0 (#229)
Sorry, automated processes fell apart at the last moment.
1 parent f58ed90 commit 5b48041

23 files changed

Lines changed: 59 additions & 43 deletions

File tree

Mathlib/Algebra/Exact/Sequence.lean

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,23 @@ public lemma sum_neg_one_pow_finrank_eq_zero_of_exact {n : ℕ} (V : Fin (n + 2)
4848
simp_rw [← smul_eq_mul]
4949
refine Fin.sum_neg_one_pow_eq_zero _ (fun i ↦ finrank k (f i).range) ?_ (fun i ↦ ?_) ?_
5050
· aesop
51-
· grind [(h_exact i).linearMap_ker_eq, (f i.succ).finrank_range_add_finrank_ker]
52-
· grind [finrank_top]
51+
· #adaptation_note /-- Prior to v4.31.0-rc1, this proof was
52+
```
53+
grind [(h_exact i).linearMap_ker_eq, (f i.succ).finrank_range_add_finrank_ker]
54+
```
55+
-/
56+
have hrn := (f i.succ).finrank_range_add_finrank_ker
57+
have hker : finrank k ↥(LinearMap.ker (f i.succ)) =
58+
finrank k ↥(LinearMap.range (f i.castSucc)) :=
59+
congrArg (fun S : Submodule k (V i.succ.castSucc) => finrank k ↥S)
60+
(h_exact i).linearMap_ker_eq
61+
omega
62+
· #adaptation_note /-- Prior to v4.31.0-rc1, this proof was
63+
```
64+
grind [finrank_top]
65+
```
66+
-/
67+
rw [surj, finrank_top, Fin.succ_last]
5368

5469
/- An unrolled version of `Module.sum_neg_one_pow_finrank_eq_zero_of_exact`. This is an auxiliary
5570
lemma en route to `Module.sum_neg_one_pow_finrank_eq_zero_of_exact_six`. -/
@@ -78,7 +93,7 @@ private lemma sum_neg_one_pow_finrank_eq_zero_of_exact_six_aux {V₀ V₁ V₂ V
7893
| 0 => ‹_› | 1 => ‹_› | 2 => ‹_› | 3 => ‹_› | 4 => ‹_› | 5 => ‹_›
7994
letI fs (i : Fin 5) : Vs i.castSucc →ₗ[k] Vs i.succ := match i with
8095
| 0 => f₀ | 1 => f₁ | 2 => f₂ | 3 => f₃ | 4 => f₄
81-
simpa [Fin.sum_univ_six] using Module.sum_neg_one_pow_finrank_eq_zero_of_exact Vs fs inj
96+
simpa [Fin.sum_univ_six] using! Module.sum_neg_one_pow_finrank_eq_zero_of_exact Vs fs inj
8297
(fun i ↦ by fin_cases i; exacts [exact₁, exact₂, exact₃, exact₄]) surj
8398

8499
/-- This is an unrolled, universe-polymorphic version of

Mathlib/AlgebraicGeometry/Birational/Dominant.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ namespace Scheme
3434

3535
namespace PartialMap
3636

37+
set_option backward.defeqAttrib.useBackward true in
3738
/-- Restricting a dominant partial map to a dense open yields a dominant partial map. -/
3839
lemma isDominant_restrict_hom (f : X.PartialMap Y) [IsDominant f.hom] (U : X.Opens)
3940
(hU : Dense (U : Set X)) (hU' : U ≤ f.domain) : IsDominant (f.restrict U hU hU').hom := by
@@ -54,6 +55,7 @@ lemma isDominant_hom_iff_isDominant_restrict_hom (f : X.PartialMap Y) (U : X.Ope
5455
fun _ ↦ f.isDominant_restrict_hom U hU hU',
5556
fun _ ↦ f.isDominant_hom_of_isDominant_restrict_hom U hU hU'⟩
5657

58+
set_option backward.defeqAttrib.useBackward true in
5759
/-- Dominance of the underlying morphism is invariant under equivalence of partial maps. -/
5860
lemma isDominant_hom_iff_of_equiv (f g : X.PartialMap Y) (h : f.equiv g) :
5961
IsDominant f.hom ↔ IsDominant g.hom := by

Mathlib/AlgebraicTopology/AlternatingFaceMapComplex.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ theorem d_squared (n : ℕ) : objD X (n + 1) ≫ objD X n = 0 := by
101101
simp_rw [S, Finset.compl_filter, Finset.mem_filter_univ, not_le] at hij'
102102
refine ⟨(j'.pred <| ?_, Fin.castSucc i'), ?_, ?_⟩
103103
· rintro rfl
104-
simp only [Fin.val_zero, not_lt_zero'] at hij'
104+
simp only [Fin.val_zero, not_lt_zero] at hij'
105105
· simpa [S] using! Nat.le_sub_one_of_lt hij'
106106
· simp only [φ, Fin.castLT_castSucc, Fin.succ_pred]
107107
· -- identification of corresponding terms in both sums

Mathlib/CategoryTheory/Functor/KanExtension/Pointwise.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ lemma hasPointwiseRightKanExtensionAt_iff_of_equivalence
160160
isoWhiskerLeft L E.unitIso.symm ≪≫ L.rightUnitor) Y' Y
161161
(E.inverse.mapIso e.symm ≪≫ E.unitIso.symm.app Y)
162162

163+
set_option backward.defeqAttrib.useBackward true in
163164
lemma HasPointwiseLeftKanExtensionAt.of_natIso {L L' : C ⥤ D} {F F' : C ⥤ H} (Y : D)
164165
[L.HasPointwiseLeftKanExtensionAt F Y] (e₁ : L ≅ L') (e₂ : F ≅ F') :
165166
L'.HasPointwiseLeftKanExtensionAt F' Y := by
@@ -176,6 +177,7 @@ lemma hasPointwiseLeftKanExtensionAt_iff_of_natIso {L L' : C ⥤ D} {F F' : C
176177
L.HasPointwiseLeftKanExtensionAt F Y ↔ L'.HasPointwiseLeftKanExtensionAt F' Y :=
177178
fun _ ↦ .of_natIso Y e₁ e₂, fun _ ↦ .of_natIso Y e₁.symm e₂.symm⟩
178179

180+
set_option backward.defeqAttrib.useBackward true in
179181
lemma HasPointwiseRightKanExtensionAt.of_natIso {L L' : C ⥤ D} {F F' : C ⥤ H} (Y : D)
180182
[L.HasPointwiseRightKanExtensionAt F Y] (e₁ : L ≅ L') (e₂ : F ≅ F') :
181183
L'.HasPointwiseRightKanExtensionAt F' Y := by

Mathlib/CategoryTheory/Monoidal/Free/Coherence.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ def normalizeIsoApp' :
204204
@[simp] theorem normalizeIsoApp'_unit (n : NormalMonoidalObject C) :
205205
normalizeIsoApp' C (𝟙_ (F C)) n = ρ_ _ := rfl
206206

207+
set_option backward.defeqAttrib.useBackward true in
207208
theorem normalizeIsoApp_eq :
208209
∀ (X : F C) (n : N C), normalizeIsoApp C X n = normalizeIsoApp' C X n.as
209210
| of _, _ => rfl
@@ -279,6 +280,7 @@ theorem normalize_naturality (n : NormalMonoidalObject C) {X Y : F C} (f : X ⟶
279280

280281
end
281282

283+
set_option backward.defeqAttrib.useBackward true in
282284
/-- The isomorphism between `n ⊗ X` and `normalize X n` is natural (in both `X` and `n`, but
283285
naturality in `n` is trivial and was "proved" in `normalizeIsoAux`). This is the real heart
284286
of our proof of the coherence theorem. -/

Mathlib/CategoryTheory/MorphismProperty/LocalEpi.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def localEpi (P : ObjectProperty C) : MorphismProperty C := fun _ _ f ↦
4747
∀ ⦃Z⦄, P Z → Function.Injective fun (g : _ ⟶ Z) ↦ f ≫ g
4848

4949
instance : P.localEpi.IsMultiplicative where
50-
id_mem X Z _ := by simpa using Function.injective_id
50+
id_mem X Z _ := by simpa using! Function.injective_id
5151
comp_mem f g hf hg T hT _ _ huv := hg hT (hf hT <| by simpa using huv)
5252

5353
lemma localEpi.of_epi {X Y : C} (f : X ⟶ Y) [Epi f] : P.localEpi f := by
@@ -101,6 +101,7 @@ variable {D : Type*} [Category* D] {F : C ⥤ D} {G : D ⥤ C} (adj : F ⊣ G)
101101
[G.Faithful] [G.Full]
102102
include adj
103103

104+
set_option backward.isDefEq.respectTransparency false in
104105
lemma localEpi_mem_range_iff_epi {X Y : C} (f : X ⟶ Y) :
105106
localEpi (· ∈ Set.range G.obj) f ↔ Epi (F.map f) := by
106107
rw [← dsimp% (localEpi (· ∈ Set.range G.obj)).postcomp_iff _ _ (isLocal_adj_unit_app adj Y),

Mathlib/CategoryTheory/MorphismProperty/OverAdjunction.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def Over.mapCongr [Q.RespectsIso] {X Y : T} {f g : X ⟶ Y} (hfg : f = g) (hf :
5858
NatIso.ofComponents (fun Y ↦ Over.isoMk (Iso.refl _))
5959

6060
set_option backward.defeqAttrib.useBackward true in
61+
set_option linter.overlappingInstances false in
6162
/-- `Over.map` preserves identities. -/
6263
@[simps!]
6364
def Over.mapId [P.IsMultiplicative] [Q.RespectsIso] (X : T) (f : X ⟶ X := 𝟙 X)
@@ -237,6 +238,7 @@ def Under.mapCongr [Q.RespectsIso] {X Y : T} {f g : X ⟶ Y} (hfg : f = g) (hf :
237238
NatIso.ofComponents (fun Y ↦ Under.isoMk (Iso.refl _))
238239

239240
set_option backward.defeqAttrib.useBackward true in
241+
set_option linter.overlappingInstances false in
240242
/-- `Under.map` preserves identities. -/
241243
@[simps!]
242244
def Under.mapId [P.IsMultiplicative] [Q.RespectsIso] (X : T) (f : X ⟶ X := 𝟙 X)

Mathlib/CategoryTheory/Presentable/CardinalDirectedPoset.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ instance (J : Type u) [SmallCategory J] [IsCardinalFiltered J κ] :
7676
simp only [(isCardinalFiltered κ).prop_iff_of_iso
7777
(p.isColimit.coconePointUniqueUpToIso
7878
(Limits.isColimitCocone (colimit.isColimit (p.diag ⋙ forget PartOrdEmb)))),
79-
isCardinalFiltered_iff, Limits.cocone_pt_coe]
79+
isCardinalFiltered_iff]
8080
exact Limits.CoconePt.isCardinalFiltered_pt _ p.prop_diag_obj
8181

8282
end PartOrdEmb
@@ -138,6 +138,7 @@ variable {J : CardinalFilteredPoset κ} (P : Set J.obj → Prop)
138138
[IsDirectedOrder (Subtype P)] [Nonempty (Subtype P)]
139139
[∀ (S : Subtype P), IsCardinalFiltered S.val κ]
140140

141+
set_option backward.defeqAttrib.useBackward true in
141142
/-- Given a predicate `P : Set J.obj → Prop` on the underlying type
142143
of `J : CardinalFilteredPoset κ` such that all the subsets satisfying `P`
143144
are `κ`-filtered, this is the functor `Subtype P ⥤ CardinalFilteredPoset κ`

Mathlib/Data/Finsupp/Single.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ lemma apply_surjective (a : α) : Surjective fun f : α →₀ M ↦ f a :=
162162
RightInverse.surjective fun _ ↦ single_eq_same
163163

164164
theorem support_single_ne_bot (i : α) (h : b ≠ 0) : (single i b).support ≠ ⊥ := by
165-
simpa only [support_single_ne_zero _ h] using! singleton_ne_empty _
165+
simpa only [support_single _ h] using! singleton_ne_empty _
166166

167167
theorem support_single_disjoint {b' : M} (hb : b ≠ 0) (hb' : b' ≠ 0) {i j : α} :
168168
Disjoint (single i b).support (single j b').support ↔ i ≠ j := by

Mathlib/FieldTheory/Galois/IsGaloisGroup.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ theorem map_quotientMk' [Finite G] [IsGaloisGroup G K L] (h : E ≤ F) :
658658
isInvariant := ⟨fun x h ↦ by
659659
obtain ⟨a, ha⟩ := hE.isInvariant.isInvariant (algebraMap F L x) (by
660660
rintro ⟨g, hg⟩
661-
simpa only [← algebraMap.smul'] using congr_arg (algebraMap F L) <| h ⟨g, ⟨g, hg, rfl⟩⟩)
661+
simpa only [← algebraMap.smul'] using! congr_arg (algebraMap F L) <| h ⟨g, ⟨g, hg, rfl⟩⟩)
662662
exact ⟨a, FaithfulSMul.algebraMap_injective F L
663663
(by rw [← IsScalarTower.algebraMap_apply, ha])⟩⟩ }
664664

0 commit comments

Comments
 (0)