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/PadicHodge): map matrix-vector products in Hodge coordinates

CollinYuanjieRen066ed024233a
diff --git a/src/Lib/PadicHodge/BlochKato.lean b/src/Lib/PadicHodge/BlochKato.lean
index eb06d96ed17..0ff217b54cd 100644
--- a/src/Lib/PadicHodge/BlochKato.lean
+++ b/src/Lib/PadicHodge/BlochKato.lean
@@ -228,10 +228,7 @@ private lemma exists_comp_eq_hodgeMatrix_mulVec_iff {ι : Type*} [Fintype ι] [D
rw [mulVec_diagonal, Units.val_zpow_eq_zpow_val, mul_left_comm,
mul_inv_cancel₀ (zpow_ne_zero _ tUnit.ne_zero), mul_one]
rw [h_diag]
- funext i
- change ∑ j, (W i j : BdR) * (f j : BdR) = algebraMap BdRPlus BdR (∑ j, W i j * f j)
- rw [map_sum]
- exact Finset.sum_congr rfl fun j _ ↦ (map_mul (algebraMap BdRPlus BdR) _ _).symm
+ exact (funext ((algebraMap BdRPlus BdR).map_mulVec W f)).symm
simp only [h_mul]
/-- Hodge basis over B_dR. Let `j = toGp : Γ → Gal(Q̄_p/Q_p)` have open image, and let T be
@@ -287,11 +284,7 @@ lemma IsPotentiallyCrystalline.exists_hodge_basis {ι : Type*} [Fintype ι] [Dec
have h_act (g : Γ) (b : ι → BdR) : coordAction ρ e g (L b) = L (toGp g • b) := by
have h_smul_mulVec :
toGp g • (hodgeMatrix W k *ᵥ b) = (toGp g • hodgeMatrix W k) *ᵥ (toGp g • b) := by
- funext j
- change toGp g • ∑ l, hodgeMatrix W k j l * b l =
- ∑ l, toGp g • hodgeMatrix W k j l * toGp g • b l
- rw [Finset.smul_sum]
- exact Finset.sum_congr rfl fun l _ ↦ smul_mul' ..
+ exact funext ((MulSemiringAction.toRingHom (Gp p) BdR (toGp g)).map_mulVec _ b)
change (repMatrix ρ e g).map (↑) *ᵥ (toGp g • (hodgeMatrix W k *ᵥ b)) =
hodgeMatrix W k *ᵥ (toGp g • b)
rw [h_smul_mulVec, mulVec_mulVec, h_inv g]