Skip to content

Lean formalization of the Riemann Hypothesis (Alpöge, 2026-11-20) being cleaned up by members of the Lean community.

Python

refactor(Lib/GaloisRep/BaseChange/CommutingHeckeFamilies): shorten the case splits in exists_remaining_places

sangxsh2c67c0325b9b
diff --git a/src/Lib/GaloisRep/BaseChange/CommutingHeckeFamilies.lean b/src/Lib/GaloisRep/BaseChange/CommutingHeckeFamilies.lean
index 528375016d3..6669824ef51 100644
--- a/src/Lib/GaloisRep/BaseChange/CommutingHeckeFamilies.lean
+++ b/src/Lib/GaloisRep/BaseChange/CommutingHeckeFamilies.lean
@@ -597,20 +597,14 @@ lemma exists_remaining_places (H : ∀ w ∈ T, w ∉ S ∧ star w ∉ S)
tauto
have h_notMem_S (u : FinPlace E') (hu : u ∈ placesAbove E' T) : u ∉ placesAbove E' S := by
rcases hu with hu | hu
- · obtain ⟨h_not_S, h_star_not_S⟩ : u.below E ∉ S ∧ star (u.below E) ∉ S := H _ hu
- exact not_or.2 ⟨h_not_S, h_star_not_S⟩
- · obtain ⟨h_star_not_S, h_not_S⟩ :
- star (u.below E) ∉ S ∧ star (star (u.below E)) ∉ S := H _ hu
- rw [star_star] at h_not_S
- exact not_or.2 ⟨h_not_S, h_star_not_S⟩
+ · exact not_or.2 (H _ hu)
+ · exact not_or.2 (by simpa [and_comm] using H _ hu)
have h_compl : (placesAbove E' S)ᶜ = placesAbove E' T ∪ placesAbove E' Y :=
(union_sdiff_cancel (t := (placesAbove E' S)ᶜ) h_notMem_S).symm.trans
(congrArg (placesAbove E' T ∪ ·) (Set.ext fun u ↦ (h_mem_Y u).symm))
refine ⟨Y, ?_, ?_, ?_, ?_, ?_⟩
· refine DFunLike.ext _ _ fun u ↦ ?_
- by_cases hu : u ∈ placesAbove E' T
- · simp [h_mem_Y, hu]
- · simp [hu]
+ by_cases hu : u ∈ placesAbove E' T <;> simp [h_mem_Y, hu]
· intro g hg u hu
obtain ⟨-, hu_T⟩ : u ∉ placesAbove E' S ∧ u ∉ placesAbove E' T := (h_mem_Y u).1 hu
have hu_star : star u ∉ placesAbove E' T := by
@@ -623,9 +617,7 @@ lemma exists_remaining_places (H : ∀ w ∈ T, w ∉ S ∧ star w ∉ S)
tauto
· rw [← idem_compl, h_compl]
refine DFunLike.ext _ _ fun u ↦ ?_
- by_cases hu : u ∈ placesAbove E' T
- · simp [h_mem_Y, hu]
- · simp [idem_apply, hu]
+ by_cases hu : u ∈ placesAbove E' T <;> simp [idem_apply, h_mem_Y, hu]
· have h_level : localLevel n (placesAbove E' T) K = localLevel n (placesAbove E' T) := by
have hK (u : FinPlace E') (hu : u ∈ placesAbove E' T) : K u = localIntGL n u := by
rcases hu with hu | hu