{"id": "TauCeti.Analysis.Normed.Module.Exhaustion", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Analysis/Normed/Module/Exhaustion.lean", "module": "TauCeti.Analysis.Normed.Module.Exhaustion", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Analysis.Normed.Module.Basic\npublic import Mathlib.Topology.MetricSpace.Thickening\npublic import TauCeti.Topology.FilledIn\nimport Mathlib.Analysis.Convex.PathConnected\nimport Mathlib.Analysis.LocallyConvex.WithSeminorms\nimport Mathlib.Analysis.Normed.Group.InfiniteSum\nimport Mathlib.Analysis.Normed.Module.Convex\nimport TauCeti.Analysis.Normed.Module.FilledHull\nimport TauCeti.Topology.ConnectedComponents\nimport TauCeti.Topology.Frontier\n\n/-!\n# Filled compact exhaustions of open sets\n\nEvery open subset `\u03a9` of a proper real seminormed space has an exhaustion by compact sets\n`K n \u2286 interior (K (n + 1))`, each of which is filled in `\u03a9` in the sense of `TauCeti.IsFilledIn`:\nno connected component of `\u03a9 \\ K n` is relatively compact in `\u03a9`\n(`IsOpen.exists_isFilledIn_compact_exhaustion`). Such an exhaustion is the device which turns\nRunge-type approximation on compact sets into global constructions and solutions of equations on\nall of `\u03a9`: successive local solutions are corrected by global approximants with summable errors\non the stages `K n`.\n\nFor any subset `\u03a9` of a seminormed group `E`, `TauCeti.filledExhaustion \u03a9 n` is the explicit stage\n\n`K n = closedBall 0 (n + 1) \\ thickening (n + 1 : \u211d)\u207b\u00b9 \u03a9\u1d9c`,\n\nconsisting of the points of norm at most `n + 1` at extended distance at least `(n + 1)\u207b\u00b9` from\n`\u03a9\u1d9c`. Each stage is closed and bounded, lies in `\u03a9`, and satisfies\n`K n \u2286 interior (K (n + 1))`, with union `\u22c3 n, K n = interior \u03a9` (`= \u03a9` when `\u03a9` is open).\nConsequently every compact subset of an open set `\u03a9` lies in `interior (K n)` for some `n`\n(`IsOpen.exists_subset_interior_filledExhaustion`).\n\nIn a proper space each stage is compact (`TauCeti.isCompact_filledExhaustion`). In a real\nseminormed space, `IsOpen.isFilledIn_closedBall_sdiff_thickening` shows without properness that\nremoving any thickening of `\u03a9\u1d9c` from a closed ball of nonnegative radius produces a set filled in\nan open set `\u03a9`: a point outside the stage either lies outside the ball, hence outside the filled\nhull of the ball and so of the stage, or is joined to a point of `\u03a9\u1d9c` by a short segment avoiding\nthe stage. Combining both properties yields `IsOpen.exists_isFilledIn_compact_exhaustion` on proper\nreal seminormed spaces.\n\n## Main declarations\n\n* `TauCeti.filledExhaustion`: the explicit exhaustion stages\n `closedBall 0 (n + 1) \\ thickening (n + 1 : \u211d)\u207b\u00b9 \u03a9\u1d9c`.\n* `TauCeti.mem_filledExhaustion_iff`, `TauCeti.norm_le_of_mem_filledExhaustion`,\n `TauCeti.le_edist_of_mem_filledExhaustion`, and `TauCeti.le_dist_of_mem_filledExhaustion`:\n membership and norm/complement-distance bounds on each stage.\n* `TauCeti.filledExhaustion_subset_interior_succ`, `TauCeti.filledExhaustion_subset_interior`,\n `TauCeti.filledExhaustion_monotone`, `TauCeti.filledExhaustion_mono`,\n `TauCeti.iUnion_filledExhaustion`, `IsOpen.iUnion_filledExhaustion`,\n `IsOpen.exists_subset_interior_filledExhaustion`, and `IsOpen.exists_subset_filledExhaustion`:\n monotonicity, interior nesting, union, and compact cofinality.\n* `TauCeti.summable_of_forall_norm_le_filledExhaustion`: pointwise convergence of a series whose\n `k`-th term is bounded on the `k`-th stage by a summable sequence.\n* `TauCeti.isCompact_filledExhaustion`: compactness of each stage in a proper space.\n* `IsOpen.isFilledIn_closedBall_sdiff_thickening` and `IsOpen.isFilledIn_filledExhaustion`:\n filledness of `closedBall a r \\ thickening \u03b4 \u03a9\u1d9c` and of each exhaustion stage in an open `\u03a9`.\n* `IsOpen.exists_isFilledIn_compact_exhaustion`: an open set in a proper real seminormed space has\n a compact exhaustion by sets filled in it.\n\n## References\n\n* W. Rudin, *Real and Complex Analysis*, 3rd ed., Theorem 13.3.\n* L. H\u00f6rmander, *An Introduction to Complex Analysis in Several Variables*, 3rd ed., Theorem 1.3.9.\n* A. Rainer, *Advanced Complex Analysis*, Theorem 12.1.\n-/\n\npublic section\n\nopen Bornology Metric Set\n\nnamespace TauCeti\n\nsection Stages\n\nvariable {E : Type*} [SeminormedAddCommGroup E]\n\n/-- The `n`th canonical filled-exhaustion stage of `\u03a9`:\n`closedBall 0 (n + 1) \\ thickening (n + 1 : \u211d)\u207b\u00b9 \u03a9\u1d9c`, consisting of the points of norm at most\n`n + 1` at extended distance at least `(n + 1)\u207b\u00b9` from `\u03a9\u1d9c`. -/\nnoncomputable def filledExhaustion (\u03a9 : Set E) (n : \u2115) : Set E :=\n closedBall 0 (n + 1) \\ thickening (n + 1 : \u211d)\u207b\u00b9 \u03a9\u1d9c\n\ntheorem filledExhaustion_def (\u03a9 : Set E) (n : \u2115) :\n filledExhaustion \u03a9 n = closedBall 0 (n + 1) \\ thickening (n + 1 : \u211d)\u207b\u00b9 \u03a9\u1d9c :=\n (rfl)\n\n/-- Membership in `filledExhaustion \u03a9 n` in terms of norm and extended distance to `\u03a9\u1d9c`. -/\n@[grind =]\ntheorem mem_filledExhaustion_iff {\u03a9 : Set E} {n : \u2115} {x : E} :\n x \u2208 filledExhaustion \u03a9 n \u2194\n \u2016x\u2016 \u2264 n + 1 \u2227 ENNReal.ofReal (n + 1 : \u211d)\u207b\u00b9 \u2264 infEDist x \u03a9\u1d9c := by\n rw [filledExhaustion_def, mem_sdiff, mem_closedBall_zero_iff, mem_thickening_iff_infEDist_lt,\n not_lt]\n\n/-- Every point of `filledExhaustion \u03a9 n` has norm at most `n + 1`. -/\ntheorem norm_le_of_mem_filledExhaustion {\u03a9 : Set E} {n : \u2115} {x : E}\n (hx : x \u2208 filledExhaustion \u03a9 n) : \u2016x\u2016 \u2264 n + 1 :=\n (mem_filledExhaustion_iff.mp hx).1\n\n/-- Every point of `filledExhaustion \u03a9 n` is at extended distance at least\n`ENNReal.ofReal (n + 1 : \u211d)\u207b\u00b9` from any point outside `\u03a9`. -/\ntheorem le_edist_of_mem_filledExhaustion {\u03a9 : Set E} {n : \u2115} {x y : E}\n (hx : x \u2208 filledExhaustion \u03a9 n) (hy : y \u2209 \u03a9) :\n ENNReal.ofReal (n + 1 : \u211d)\u207b\u00b9 \u2264 edist x y :=\n (mem_filledExhaustion_iff.mp hx).2.trans (infEDist_le_edist_of_mem hy)\n\n/-- Every point of `filledExhaustion \u03a9 n` is at distance at least `(n + 1 : \u211d)\u207b\u00b9` from any point\noutside `\u03a9`. -/\ntheorem le_dist_of_mem_filledExhaustion {\u03a9 : Set E} {n : \u2115} {x y : E}\n (hx : x \u2208 filledExhaustion \u03a9 n) (hy : y \u2209 \u03a9) :\n (n + 1 : \u211d)\u207b\u00b9 \u2264 dist x y := by\n have h := le_edist_of_mem_filledExhaustion hx hy\n rw [edist_dist] at h\n exact (ENNReal.ofReal_le_ofReal_iff dist_nonneg).mp h\n\n/-- Every stage `filledExhaustion \u03a9 n` lies in `\u03a9`. -/\ntheorem filledExhaustion_subset (\u03a9 : Set E) (n : \u2115) : filledExhaustion \u03a9 n \u2286 \u03a9 := fun x hx \u21a6 by\n by_contra hx\u03a9\n have h := le_dist_of_mem_filledExhaustion hx hx\u03a9\n rw [dist_self] at h\n exact h.not_gt (by positivity)\n\n@[simp]\ntheorem filledExhaustion_empty (n : \u2115) : filledExhaustion (\u2205 : Set E) n = \u2205 :=\n subset_empty_iff.mp (filledExhaustion_subset \u2205 n)\n\n@[simp]\ntheorem filledExhaustion_univ (n : \u2115) :\n filledExhaustion (univ : Set E) n = closedBall 0 (n + 1) := by\n rw [filledExhaustion_def, compl_univ, thickening_empty, sdiff_empty]\n\n/-- For `1 \u2264 n`, `filledExhaustion \u03a9 (n - 1)` is `closedBall 0 n \\ thickening n\u207b\u00b9 \u03a9\u1d9c`. -/\ntheorem filledExhaustion_sub_one (\u03a9 : Set E) {n : \u2115} (hn : 1 \u2264 n) :\n filledExhaustion \u03a9 (n - 1) = closedBall 0 n \\ thickening (n : \u211d)\u207b\u00b9 \u03a9\u1d9c := by\n have hcast : ((n - 1 : \u2115) : \u211d) + 1 = n := by exact_mod_cast Nat.sub_add_cancel hn\n rw [filledExhaustion_def, hcast]\n\n/-- Every stage `filledExhaustion \u03a9 n` lies in `closedBall 0 (n + 1)`. -/\ntheorem filledExhaustion_subset_closedBall (\u03a9 : Set E) (n : \u2115) :\n filledExhaustion \u03a9 n \u2286 closedBall 0 (n + 1) := fun _ hx \u21a6\n mem_closedBall_zero_iff.mpr (norm_le_of_mem_filledExhaustion hx)\n\n/-- Every stage `filledExhaustion \u03a9 n` is closed. -/\ntheorem isClosed_filledExhaustion (\u03a9 : Set E) (n : \u2115) : IsClosed (filledExhaustion \u03a9 n) := by\n rw [filledExhaustion_def]\n exact isClosed_closedBall.sdiff isOpen_thickening\n\n/-- Every stage `filledExhaustion \u03a9 n` is bounded. -/\ntheorem isBounded_filledExhaustion (\u03a9 : Set E) (n : \u2115) : IsBounded (filledExhaustion \u03a9 n) :=\n isBounded_closedBall.subset (filledExhaustion_subset_closedBall \u03a9 n)\n\n/-- Each stage `filledExhaustion \u03a9 n` lies in the interior of the next stage\n`filledExhaustion \u03a9 (n + 1)`. -/\ntheorem filledExhaustion_subset_interior_succ (\u03a9 : Set E) (n : \u2115) :\n filledExhaustion \u03a9 n \u2286 interior (filledExhaustion \u03a9 (n + 1)) := by\n -- `K n` lies in the open set `ball 0 (n + 2) \\ cthickening (n + 2)\u207b\u00b9 \u03a9\u1d9c \u2286 K (n + 1)`.\n have hopen : IsOpen (ball (0 : E) (n + 1 + 1) \\ cthickening (n + 1 + 1 : \u211d)\u207b\u00b9 \u03a9\u1d9c) :=\n isOpen_ball.sdiff isClosed_cthickening\n refine Subset.trans ?_ (hopen.subset_interior_iff.mpr ?_)\n \u00b7 intro x hx\n rw [filledExhaustion_def] at hx\n refine \u27e8mem_ball_zero_iff.mpr ((mem_closedBall_zero_iff.mp hx.1).trans_lt (by linarith)),\n fun h \u21a6 hx.2 (cthickening_subset_thickening' (by positivity) ?_ _ h)\u27e9\n gcongr\n linarith\n \u00b7 simp only [filledExhaustion_def, Nat.cast_add, Nat.cast_one]\n exact sdiff_subset_sdiff ball_subset_closedBall (thickening_subset_cthickening _ _)\n\n/-- The stages `filledExhaustion \u03a9 n` increase with `n`. -/\ntheorem filledExhaustion_monotone (\u03a9 : Set E) : Monotone (filledExhaustion \u03a9) :=\n monotone_nat_of_le_succ fun n \u21a6\n (filledExhaustion_subset_interior_succ \u03a9 n).trans interior_subset\n\n/-- Enlarging the stage index `n` enlarges `filledExhaustion \u03a9 n`. -/\n@[gcongr]\ntheorem filledExhaustion_mono {\u03a9 : Set E} {m n : \u2115} (h : m \u2264 n) :\n filledExhaustion \u03a9 m \u2286 filledExhaustion \u03a9 n :=\n filledExhaustion_monotone \u03a9 h\n\n/-- For `m < n`, `filledExhaustion \u03a9 m` lies in `interior (filledExhaustion \u03a9 n)`. -/\ntheorem filledExhaustion_subset_interior {\u03a9 : Set E} {m n : \u2115} (h : m < n) :\n filledExhaustion \u03a9 m \u2286 interior (filledExhaustion \u03a9 n) :=\n (filledExhaustion_subset_interior_succ \u03a9 m).trans (interior_mono (filledExhaustion_mono h))\n\n/-- Enlarging the ambient set `\u03a9` enlarges each stage `filledExhaustion \u03a9 n`. -/\n@[gcongr]\ntheorem filledExhaustion_mono_left {\u03a9\u2081 \u03a9\u2082 : Set E} (h : \u03a9\u2081 \u2286 \u03a9\u2082) (n : \u2115) :\n filledExhaustion \u03a9\u2081 n \u2286 filledExhaustion \u03a9\u2082 n := by\n rw [filledExhaustion_def, filledExhaustion_def]\n exact sdiff_subset_sdiff Subset.rfl (thickening_subset_of_subset _ (compl_subset_compl.mpr h))\n\n/-- For any set `\u03a9`, the union of the stages `filledExhaustion \u03a9 n` is `interior \u03a9`. -/\ntheorem iUnion_filledExhaustion (\u03a9 : Set E) : \u22c3 n, filledExhaustion \u03a9 n = interior \u03a9 := by\n refine Subset.antisymm (iUnion_subset fun n \u21a6 (filledExhaustion_subset_interior_succ \u03a9 n).trans\n (interior_mono (filledExhaustion_subset \u03a9 (n + 1)))) fun x hx \u21a6 ?_\n obtain \u27e8\u03b5, h\u03b5, hball\u27e9 := Metric.mem_nhds_iff.mp (mem_interior_iff_mem_nhds.mp hx)\n obtain \u27e8n, hn\u27e9 := exists_nat_ge (max \u2016x\u2016 \u03b5\u207b\u00b9)\n have hn\u2081 : \u2016x\u2016 \u2264 n := (le_max_left _ _).trans hn\n have hn\u2082 : \u03b5\u207b\u00b9 < n + 1 := ((le_max_right _ _).trans hn).trans_lt (by linarith)\n refine mem_iUnion.mpr \u27e8n, ?_\u27e9\n rw [filledExhaustion_def]\n refine \u27e8mem_closedBall_zero_iff.mpr (by linarith), fun h \u21a6 ?_\u27e9\n obtain \u27e8y, hy, hxy\u27e9 := mem_thickening_iff.mp h\n refine hy (hball ?_)\n rw [mem_ball, dist_comm]\n exact hxy.trans (inv_lt_of_inv_lt\u2080 h\u03b5 hn\u2082)\n\n/-- For an open set `\u03a9`, the stages `filledExhaustion \u03a9 n` have union `\u03a9`. -/\ntheorem _root_.IsOpen.iUnion_filledExhaustion {\u03a9 : Set E} (h\u03a9 : IsOpen \u03a9) :\n \u22c3 n, filledExhaustion \u03a9 n = \u03a9 := by\n rw [TauCeti.iUnion_filledExhaustion, h\u03a9.interior_eq]\n\n/-- **Compact cofinality in the interior.** Every compact subset `K \u2286 interior \u03a9` lies inside\n`interior (filledExhaustion \u03a9 n)` for some `n`. -/\ntheorem _root_.IsCompact.exists_subset_interior_filledExhaustion {\u03a9 K : Set E}\n (hK : IsCompact K) (hK\u03a9 : K \u2286 interior \u03a9) :\n \u2203 n, K \u2286 interior (filledExhaustion \u03a9 n) := by\n refine hK.elim_directed_cover (fun n \u21a6 interior (filledExhaustion \u03a9 n))\n (fun _ \u21a6 isOpen_interior) ?_\n (Monotone.directed_le fun _ _ h \u21a6 interior_mono (filledExhaustion_monotone \u03a9 h))\n intro x hx\n obtain \u27e8n, hn\u27e9 := mem_iUnion.mp ((iUnion_filledExhaustion \u03a9).symm \u25b8 hK\u03a9 hx)\n exact mem_iUnion.mpr \u27e8n + 1, filledExhaustion_subset_interior_succ \u03a9 n hn\u27e9\n\n/-- **Compact cofinality (strict).** Every compact subset `K` of an open set `\u03a9` lies inside\n`interior (filledExhaustion \u03a9 n)` for some `n`. -/\ntheorem _root_.IsOpen.exists_subset_interior_filledExhaustion {\u03a9 K : Set E}\n (h\u03a9 : IsOpen \u03a9) (hK : IsCompact K) (hK\u03a9 : K \u2286 \u03a9) :\n \u2203 n, K \u2286 interior (filledExhaustion \u03a9 n) :=\n hK.exists_subset_interior_filledExhaustion (by rwa [h\u03a9.interior_eq])\n\n/-- **Compact cofinality.** Every compact subset `K` of an open set `\u03a9` lies inside\n`filledExhaustion \u03a9 n` for some `n`. -/\ntheorem _root_.IsOpen.exists_subset_filledExhaustion {\u03a9 K : Set E}\n (h\u03a9 : IsOpen \u03a9) (hK : IsCompact K) (hK\u03a9 : K \u2286 \u03a9) :\n \u2203 n, K \u2286 filledExhaustion \u03a9 n :=\n (h\u03a9.exists_subset_interior_filledExhaustion hK hK\u03a9).imp fun _ h \u21a6 h.trans interior_subset\n\n/-- A series whose `k`-th term is bounded by `u k` on the stage `filledExhaustion \u03a9 k`, for a\nsummable `u`, converges at every point of `interior \u03a9`: such a point lies in every stage from some\nindex on. -/\ntheorem summable_of_forall_norm_le_filledExhaustion {F : Type*} [NormedAddCommGroup F]\n [CompleteSpace F] {\u03a9 : Set E} {t : \u2115 \u2192 E \u2192 F} {u : \u2115 \u2192 \u211d} (hu : Summable u)\n (hb : \u2200 k, \u2200 x \u2208 filledExhaustion \u03a9 k, \u2016t k x\u2016 \u2264 u k) {x : E} (hx : x \u2208 interior \u03a9) :\n Summable fun k \u21a6 t k x := by\n obtain \u27e8j, hj\u27e9 := mem_iUnion.1 ((iUnion_filledExhaustion \u03a9).symm \u25b8 hx)\n exact .of_norm_bounded_eventually_nat hu <|\n Filter.eventually_atTop.2 \u27e8j, fun k hk \u21a6 hb k x (filledExhaustion_mono hk hj)\u27e9\n\nend Stages\n\nsection Compact\n\nvariable {E : Type*} [SeminormedAddCommGroup E] [ProperSpace E]\n\n/-- In a proper space, each stage `filledExhaustion \u03a9 n` is compact. -/\ntheorem isCompact_filledExhaustion (\u03a9 : Set E) (n : \u2115) : IsCompact (filledExhaustion \u03a9 n) := by\n rw [filledExhaustion_def]\n exact (isCompact_closedBall _ _).diff isOpen_thickening\n\nend Compact\n\nend TauCeti\n\nsection Filled\n\nopen TauCeti\n\nvariable {E : Type*} [SeminormedAddCommGroup E] [NormedSpace \u211d E]\n\n/-- **A closed ball minus a thickening of `\u03a9\u1d9c` is filled in `\u03a9`.** In a real seminormed space, for\nany open set `\u03a9`, radius `0 \u2264 r`, and `\u03b4 : \u211d`, no connected component of\n`\u03a9 \\ (closedBall a r \\ thickening \u03b4 \u03a9\u1d9c)` has compact closure contained in `\u03a9`. -/\ntheorem IsOpen.isFilledIn_closedBall_sdiff_thickening {\u03a9 : Set E} (h\u03a9 : IsOpen \u03a9) (a : E)\n {r : \u211d} (hr : 0 \u2264 r) (\u03b4 : \u211d) :\n IsFilledIn (closedBall a r \\ thickening \u03b4 \u03a9\u1d9c) \u03a9 := by\n set K := closedBall a r \\ thickening \u03b4 \u03a9\u1d9c\n have hKclosed : IsClosed K := isClosed_closedBall.sdiff isOpen_thickening\n rw [isFilledIn_iff]\n rintro x hx \u27e8hcpt, hcl\u27e9\n set C := connectedComponentIn (\u03a9 \\ K) x\n have hfrK : frontier C \u2286 K :=\n (h\u03a9.frontier_connectedComponentIn_sdiff_subset_closure hcl).trans hKclosed.closure_subset\n by_cases hxb : x \u2208 closedBall a r\n \u00b7 have hxt : x \u2208 thickening \u03b4 \u03a9\u1d9c := by_contra fun hxt \u21a6 hx.2 \u27e8hxb, hxt\u27e9\n obtain \u27e8y, hy, hxy\u27e9 := mem_thickening_iff.mp hxt\n have hseg : segment \u211d x y \u2286 C :=\n (convex_segment x y).isPreconnected.subset_of_disjoint_frontier\n (disjoint_left.mpr fun z hzS hzfr \u21a6 (hfrK hzfr).2 <| mem_thickening_iff.mpr\n \u27e8y, hy, (mem_closedBall.mp (segment_subset_closedBall_right x y hzS)).trans_lt hxy\u27e9)\n \u27e8x, left_mem_segment \u211d x y, mem_connectedComponentIn hx\u27e9\n exact hy (hcl (subset_closure (hseg (right_mem_segment \u211d x y))))\n \u00b7 exact hxb (closedConvexHull_min subset_rfl (convex_closedBall a r) isClosed_closedBall\n (filledHull_subset_closedConvexHull (nonempty_closedBall.mpr hr)\n (filledHull_mono sdiff_subset\n (subset_filledHull_of_frontier_subset (hcpt.isBounded.subset subset_closure) hfrK\n (mem_connectedComponentIn hx)))))\n\n/-- Every stage `filledExhaustion \u03a9 n` of an open set `\u03a9` in a real seminormed space is filled in\n`\u03a9`. -/\ntheorem IsOpen.isFilledIn_filledExhaustion {\u03a9 : Set E} (h\u03a9 : IsOpen \u03a9) (n : \u2115) :\n IsFilledIn (filledExhaustion \u03a9 n) \u03a9 := by\n rw [filledExhaustion_def]\n exact h\u03a9.isFilledIn_closedBall_sdiff_thickening 0 (by positivity) _\n\nend Filled\n\nsection Exhaustion\n\nopen TauCeti\n\nvariable {E : Type*} [SeminormedAddCommGroup E] [NormedSpace \u211d E] [ProperSpace E]\n\n/-- **Filled compact exhaustion.** Every open set `\u03a9` of a proper real seminormed space is the\nunion of compact sets `K n` with `K n \u2286 interior (K (n + 1))`, each of which is filled in `\u03a9`: no\nconnected component of `\u03a9 \\ K n` is relatively compact in `\u03a9`. -/\ntheorem IsOpen.exists_isFilledIn_compact_exhaustion {\u03a9 : Set E} (h\u03a9 : IsOpen \u03a9) :\n \u2203 K : \u2115 \u2192 Set E, (\u2200 n, IsCompact (K n)) \u2227 (\u2200 n, K n \u2286 interior (K (n + 1))) \u2227\n \u22c3 n, K n = \u03a9 \u2227 \u2200 n, IsFilledIn (K n) \u03a9 :=\n \u27e8filledExhaustion \u03a9, isCompact_filledExhaustion \u03a9, filledExhaustion_subset_interior_succ \u03a9,\n h\u03a9.iUnion_filledExhaustion, h\u03a9.isFilledIn_filledExhaustion\u27e9\n\nend Exhaustion\n", "public_theorems": ["TauCeti.filledExhaustion_def", "TauCeti.mem_filledExhaustion_iff", "TauCeti.norm_le_of_mem_filledExhaustion", "TauCeti.le_edist_of_mem_filledExhaustion", "TauCeti.le_dist_of_mem_filledExhaustion", "TauCeti.filledExhaustion_subset", "TauCeti.filledExhaustion_empty", "TauCeti.filledExhaustion_univ", "TauCeti.filledExhaustion_sub_one", "TauCeti.filledExhaustion_subset_closedBall", "TauCeti.isClosed_filledExhaustion", "TauCeti.isBounded_filledExhaustion", "TauCeti.filledExhaustion_subset_interior_succ", "TauCeti.filledExhaustion_monotone", "TauCeti.filledExhaustion_mono", "TauCeti.filledExhaustion_subset_interior", "TauCeti.filledExhaustion_mono_left", "TauCeti.iUnion_filledExhaustion", "IsOpen.iUnion_filledExhaustion", "IsCompact.exists_subset_interior_filledExhaustion", "IsOpen.exists_subset_interior_filledExhaustion", "IsOpen.exists_subset_filledExhaustion", "TauCeti.summable_of_forall_norm_le_filledExhaustion", "TauCeti.isCompact_filledExhaustion", "IsOpen.isFilledIn_closedBall_sdiff_thickening", "IsOpen.isFilledIn_filledExhaustion", "IsOpen.exists_isFilledIn_compact_exhaustion"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Analysis.Normed.Module.Basic\npublic import Mathlib.Topology.MetricSpace.Thickening\npublic import TauCeti.Topology.FilledIn\nimport Mathlib.Analysis.Convex.PathConnected\nimport Mathlib.Analysis.LocallyConvex.WithSeminorms\nimport Mathlib.Analysis.Normed.Group.InfiniteSum\nimport Mathlib.Analysis.Normed.Module.Convex\nimport TauCeti.Analysis.Normed.Module.FilledHull\nimport TauCeti.Topology.ConnectedComponents\nimport TauCeti.Topology.Frontier\n\n/-!\n# Filled compact exhaustions of open sets\n\nEvery open subset `\u03a9` of a proper real seminormed space has an exhaustion by compact sets\n`K n \u2286 interior (K (n + 1))`, each of which is filled in `\u03a9` in the sense of `TauCeti.IsFilledIn`:\nno connected component of `\u03a9 \\ K n` is relatively compact in `\u03a9`\n(`IsOpen.exists_isFilledIn_compact_exhaustion`). Such an exhaustion is the device which turns\nRunge-type approximation on compact sets into global constructions and solutions of equations on\nall of `\u03a9`: successive local solutions are corrected by global approximants with summable errors\non the stages `K n`.\n\nFor any subset `\u03a9` of a seminormed group `E`, `TauCeti.filledExhaustion \u03a9 n` is the explicit stage\n\n`K n = closedBall 0 (n + 1) \\ thickening (n + 1 : \u211d)\u207b\u00b9 \u03a9\u1d9c`,\n\nconsisting of the points of norm at most `n + 1` at extended distance at least `(n + 1)\u207b\u00b9` from\n`\u03a9\u1d9c`. Each stage is closed and bounded, lies in `\u03a9`, and satisfies\n`K n \u2286 interior (K (n + 1))`, with union `\u22c3 n, K n = interior \u03a9` (`= \u03a9` when `\u03a9` is open).\nConsequently every compact subset of an open set `\u03a9` lies in `interior (K n)` for some `n`\n(`IsOpen.exists_subset_interior_filledExhaustion`).\n\nIn a proper space each stage is compact (`TauCeti.isCompact_filledExhaustion`). In a real\nseminormed space, `IsOpen.isFilledIn_closedBall_sdiff_thickening` shows without properness that\nremoving any thickening of `\u03a9\u1d9c` from a closed ball of nonnegative radius produces a set filled in\nan open set `\u03a9`: a point outside the stage either lies outside the ball, hence outside the filled\nhull of the ball and so of the stage, or is joined to a point of `\u03a9\u1d9c` by a short segment avoiding\nthe stage. Combining both properties yields `IsOpen.exists_isFilledIn_compact_exhaustion` on proper\nreal seminormed spaces.\n\n## Main declarations\n\n* `TauCeti.filledExhaustion`: the explicit exhaustion stages\n `closedBall 0 (n + 1) \\ thickening (n + 1 : \u211d)\u207b\u00b9 \u03a9\u1d9c`.\n* `TauCeti.mem_filledExhaustion_iff`, `TauCeti.norm_le_of_mem_filledExhaustion`,\n `TauCeti.le_edist_of_mem_filledExhaustion`, and `TauCeti.le_dist_of_mem_filledExhaustion`:\n membership and norm/complement-distance bounds on each stage.\n* `TauCeti.filledExhaustion_subset_interior_succ`, `TauCeti.filledExhaustion_subset_interior`,\n `TauCeti.filledExhaustion_monotone`, `TauCeti.filledExhaustion_mono`,\n `TauCeti.iUnion_filledExhaustion`, `IsOpen.iUnion_filledExhaustion`,\n `IsOpen.exists_subset_interior_filledExhaustion`, and `IsOpen.exists_subset_filledExhaustion`:\n monotonicity, interior nesting, union, and compact cofinality.\n* `TauCeti.summable_of_forall_norm_le_filledExhaustion`: pointwise convergence of a series whose\n `k`-th term is bounded on the `k`-th stage by a summable sequence.\n* `TauCeti.isCompact_filledExhaustion`: compactness of each stage in a proper space.\n* `IsOpen.isFilledIn_closedBall_sdiff_thickening` and `IsOpen.isFilledIn_filledExhaustion`:\n filledness of `closedBall a r \\ thickening \u03b4 \u03a9\u1d9c` and of each exhaustion stage in an open `\u03a9`.\n* `IsOpen.exists_isFilledIn_compact_exhaustion`: an open set in a proper real seminormed space has\n a compact exhaustion by sets filled in it.\n\n## References\n\n* W. Rudin, *Real and Complex Analysis*, 3rd ed., Theorem 13.3.\n* L. H\u00f6rmander, *An Introduction to Complex Analysis in Several Variables*, 3rd ed., Theorem 1.3.9.\n* A. Rainer, *Advanced Complex Analysis*, Theorem 12.1.\n-/\n\npublic section\n\nopen Bornology Metric Set\n\nnamespace TauCeti\n\nsection Stages\n\nvariable {E : Type*} [SeminormedAddCommGroup E]\n\n/-- The `n`th canonical filled-exhaustion stage of `\u03a9`:\n`closedBall 0 (n + 1) \\ thickening (n + 1 : \u211d)\u207b\u00b9 \u03a9\u1d9c`, consisting of the points of norm at most\n`n + 1` at extended distance at least `(n + 1)\u207b\u00b9` from `\u03a9\u1d9c`. -/\nnoncomputable def filledExhaustion (\u03a9 : Set E) (n : \u2115) : Set E :=\n closedBall 0 (n + 1) \\ thickening (n + 1 : \u211d)\u207b\u00b9 \u03a9\u1d9c", "theorem filledExhaustion_def (\u03a9 : Set E) (n : \u2115) :\n filledExhaustion \u03a9 n = closedBall 0 (n + 1) \\ thickening (n + 1 : \u211d)\u207b\u00b9 \u03a9\u1d9c :=", "/-- Membership in `filledExhaustion \u03a9 n` in terms of norm and extended distance to `\u03a9\u1d9c`. -/\n@[grind =]\ntheorem mem_filledExhaustion_iff {\u03a9 : Set E} {n : \u2115} {x : E} :\n x \u2208 filledExhaustion \u03a9 n \u2194\n \u2016x\u2016 \u2264 n + 1 \u2227 ENNReal.ofReal (n + 1 : \u211d)\u207b\u00b9 \u2264 infEDist x \u03a9\u1d9c :=", "/-- Every point of `filledExhaustion \u03a9 n` has norm at most `n + 1`. -/\ntheorem norm_le_of_mem_filledExhaustion {\u03a9 : Set E} {n : \u2115} {x : E}\n (hx : x \u2208 filledExhaustion \u03a9 n) : \u2016x\u2016 \u2264 n + 1 :=", "/-- Every point of `filledExhaustion \u03a9 n` is at extended distance at least\n`ENNReal.ofReal (n + 1 : \u211d)\u207b\u00b9` from any point outside `\u03a9`. -/\ntheorem le_edist_of_mem_filledExhaustion {\u03a9 : Set E} {n : \u2115} {x y : E}\n (hx : x \u2208 filledExhaustion \u03a9 n) (hy : y \u2209 \u03a9) :\n ENNReal.ofReal (n + 1 : \u211d)\u207b\u00b9 \u2264 edist x y :=", "/-- Every point of `filledExhaustion \u03a9 n` is at distance at least `(n + 1 : \u211d)\u207b\u00b9` from any point\noutside `\u03a9`. -/\ntheorem le_dist_of_mem_filledExhaustion {\u03a9 : Set E} {n : \u2115} {x y : E}\n (hx : x \u2208 filledExhaustion \u03a9 n) (hy : y \u2209 \u03a9) :\n (n + 1 : \u211d)\u207b\u00b9 \u2264 dist x y :=", "/-- Every stage `filledExhaustion \u03a9 n` lies in `\u03a9`. -/\ntheorem filledExhaustion_subset (\u03a9 : Set E) (n : \u2115) : filledExhaustion \u03a9 n \u2286 \u03a9 :=", "@[simp]\ntheorem filledExhaustion_empty (n : \u2115) : filledExhaustion (\u2205 : Set E) n = \u2205 :=", "@[simp]\ntheorem filledExhaustion_univ (n : \u2115) :\n filledExhaustion (univ : Set E) n = closedBall 0 (n + 1) :=", "/-- For `1 \u2264 n`, `filledExhaustion \u03a9 (n - 1)` is `closedBall 0 n \\ thickening n\u207b\u00b9 \u03a9\u1d9c`. -/\ntheorem filledExhaustion_sub_one (\u03a9 : Set E) {n : \u2115} (hn : 1 \u2264 n) :\n filledExhaustion \u03a9 (n - 1) = closedBall 0 n \\ thickening (n : \u211d)\u207b\u00b9 \u03a9\u1d9c :=", "/-- Every stage `filledExhaustion \u03a9 n` lies in `closedBall 0 (n + 1)`. -/\ntheorem filledExhaustion_subset_closedBall (\u03a9 : Set E) (n : \u2115) :\n filledExhaustion \u03a9 n \u2286 closedBall 0 (n + 1) :=", "/-- Every stage `filledExhaustion \u03a9 n` is closed. -/\ntheorem isClosed_filledExhaustion (\u03a9 : Set E) (n : \u2115) : IsClosed (filledExhaustion \u03a9 n) :=", "/-- Every stage `filledExhaustion \u03a9 n` is bounded. -/\ntheorem isBounded_filledExhaustion (\u03a9 : Set E) (n : \u2115) : IsBounded (filledExhaustion \u03a9 n) :=", "/-- Each stage `filledExhaustion \u03a9 n` lies in the interior of the next stage\n`filledExhaustion \u03a9 (n + 1)`. -/\ntheorem filledExhaustion_subset_interior_succ (\u03a9 : Set E) (n : \u2115) :\n filledExhaustion \u03a9 n \u2286 interior (filledExhaustion \u03a9 (n + 1)) :=", "/-- The stages `filledExhaustion \u03a9 n` increase with `n`. -/\ntheorem filledExhaustion_monotone (\u03a9 : Set E) : Monotone (filledExhaustion \u03a9) :=", "/-- Enlarging the stage index `n` enlarges `filledExhaustion \u03a9 n`. -/\n@[gcongr]\ntheorem filledExhaustion_mono {\u03a9 : Set E} {m n : \u2115} (h : m \u2264 n) :\n filledExhaustion \u03a9 m \u2286 filledExhaustion \u03a9 n :=", "/-- For `m < n`, `filledExhaustion \u03a9 m` lies in `interior (filledExhaustion \u03a9 n)`. -/\ntheorem filledExhaustion_subset_interior {\u03a9 : Set E} {m n : \u2115} (h : m < n) :\n filledExhaustion \u03a9 m \u2286 interior (filledExhaustion \u03a9 n) :=", "/-- Enlarging the ambient set `\u03a9` enlarges each stage `filledExhaustion \u03a9 n`. -/\n@[gcongr]\ntheorem filledExhaustion_mono_left {\u03a9\u2081 \u03a9\u2082 : Set E} (h : \u03a9\u2081 \u2286 \u03a9\u2082) (n : \u2115) :\n filledExhaustion \u03a9\u2081 n \u2286 filledExhaustion \u03a9\u2082 n :=", "/-- For any set `\u03a9`, the union of the stages `filledExhaustion \u03a9 n` is `interior \u03a9`. -/\ntheorem iUnion_filledExhaustion (\u03a9 : Set E) : \u22c3 n, filledExhaustion \u03a9 n = interior \u03a9 :=", "/-- For an open set `\u03a9`, the stages `filledExhaustion \u03a9 n` have union `\u03a9`. -/\ntheorem _root_.IsOpen.iUnion_filledExhaustion {\u03a9 : Set E} (h\u03a9 : IsOpen \u03a9) :\n \u22c3 n, filledExhaustion \u03a9 n = \u03a9 :=", "/-- **Compact cofinality in the interior.** Every compact subset `K \u2286 interior \u03a9` lies inside\n`interior (filledExhaustion \u03a9 n)` for some `n`. -/\ntheorem _root_.IsCompact.exists_subset_interior_filledExhaustion {\u03a9 K : Set E}\n (hK : IsCompact K) (hK\u03a9 : K \u2286 interior \u03a9) :\n \u2203 n, K \u2286 interior (filledExhaustion \u03a9 n) :=", "/-- **Compact cofinality (strict).** Every compact subset `K` of an open set `\u03a9` lies inside\n`interior (filledExhaustion \u03a9 n)` for some `n`. -/\ntheorem _root_.IsOpen.exists_subset_interior_filledExhaustion {\u03a9 K : Set E}\n (h\u03a9 : IsOpen \u03a9) (hK : IsCompact K) (hK\u03a9 : K \u2286 \u03a9) :\n \u2203 n, K \u2286 interior (filledExhaustion \u03a9 n) :=", "/-- **Compact cofinality.** Every compact subset `K` of an open set `\u03a9` lies inside\n`filledExhaustion \u03a9 n` for some `n`. -/\ntheorem _root_.IsOpen.exists_subset_filledExhaustion {\u03a9 K : Set E}\n (h\u03a9 : IsOpen \u03a9) (hK : IsCompact K) (hK\u03a9 : K \u2286 \u03a9) :\n \u2203 n, K \u2286 filledExhaustion \u03a9 n :=", "/-- A series whose `k`-th term is bounded by `u k` on the stage `filledExhaustion \u03a9 k`, for a\nsummable `u`, converges at every point of `interior \u03a9`: such a point lies in every stage from some\nindex on. -/\ntheorem summable_of_forall_norm_le_filledExhaustion {F : Type*} [NormedAddCommGroup F]\n [CompleteSpace F] {\u03a9 : Set E} {t : \u2115 \u2192 E \u2192 F} {u : \u2115 \u2192 \u211d} (hu : Summable u)\n (hb : \u2200 k, \u2200 x \u2208 filledExhaustion \u03a9 k, \u2016t k x\u2016 \u2264 u k) {x : E} (hx : x \u2208 interior \u03a9) :\n Summable fun k \u21a6 t k x :=", "end Stages\n\nsection Compact\n\nvariable {E : Type*} [SeminormedAddCommGroup E] [ProperSpace E]", "/-- In a proper space, each stage `filledExhaustion \u03a9 n` is compact. -/\ntheorem isCompact_filledExhaustion (\u03a9 : Set E) (n : \u2115) : IsCompact (filledExhaustion \u03a9 n) :=", "end Compact\n\nend TauCeti\n\nsection Filled\n\nopen TauCeti\n\nvariable {E : Type*} [SeminormedAddCommGroup E] [NormedSpace \u211d E]", "/-- **A closed ball minus a thickening of `\u03a9\u1d9c` is filled in `\u03a9`.** In a real seminormed space, for\nany open set `\u03a9`, radius `0 \u2264 r`, and `\u03b4 : \u211d`, no connected component of\n`\u03a9 \\ (closedBall a r \\ thickening \u03b4 \u03a9\u1d9c)` has compact closure contained in `\u03a9`. -/\ntheorem IsOpen.isFilledIn_closedBall_sdiff_thickening {\u03a9 : Set E} (h\u03a9 : IsOpen \u03a9) (a : E)\n {r : \u211d} (hr : 0 \u2264 r) (\u03b4 : \u211d) :\n IsFilledIn (closedBall a r \\ thickening \u03b4 \u03a9\u1d9c) \u03a9 :=", "/-- Every stage `filledExhaustion \u03a9 n` of an open set `\u03a9` in a real seminormed space is filled in\n`\u03a9`. -/\ntheorem IsOpen.isFilledIn_filledExhaustion {\u03a9 : Set E} (h\u03a9 : IsOpen \u03a9) (n : \u2115) :\n IsFilledIn (filledExhaustion \u03a9 n) \u03a9 :=", "end Filled\n\nsection Exhaustion\n\nopen TauCeti\n\nvariable {E : Type*} [SeminormedAddCommGroup E] [NormedSpace \u211d E] [ProperSpace E]", "/-- **Filled compact exhaustion.** Every open set `\u03a9` of a proper real seminormed space is the\nunion of compact sets `K n` with `K n \u2286 interior (K (n + 1))`, each of which is filled in `\u03a9`: no\nconnected component of `\u03a9 \\ K n` is relatively compact in `\u03a9`. -/\ntheorem IsOpen.exists_isFilledIn_compact_exhaustion {\u03a9 : Set E} (h\u03a9 : IsOpen \u03a9) :\n \u2203 K : \u2115 \u2192 Set E, (\u2200 n, IsCompact (K n)) \u2227 (\u2200 n, K n \u2286 interior (K (n + 1))) \u2227\n \u22c3 n, K n = \u03a9 \u2227 \u2200 n, IsFilledIn (K n) \u03a9 :=", "end Exhaustion"], "free_length": 4756, "file_length": 9421, "heartbeats": 5011, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.RepresentationTheory.Induction.Cyclotomic.SplittingField", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/RepresentationTheory/Induction/Cyclotomic/SplittingField.lean", "module": "TauCeti.RepresentationTheory.Induction.Cyclotomic.SplittingField", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.RepresentationTheory.Induction.Cyclotomic.Basic\npublic import TauCeti.RepresentationTheory.CharacterTable.Realization\nimport Mathlib.Algebra.Group.Shrink\nimport Mathlib.Data.Fintype.Shrink\nimport TauCeti.RepresentationTheory.CharacterTable.CoefficientAction\nimport TauCeti.RepresentationTheory.Induction.Brauer.Induction\nimport TauCeti.RepresentationTheory.Induction.Monomial\n\n/-!\n# Cyclotomic splitting fields for finite groups\n\nLet `G` be a finite group and `L / K` an extension of characteristic-zero fields with `L`\nalgebraically closed. If `K` contains a primitive root of unity of order divisible by the\nexponent of `G`, every virtual character over `L` is the image of a virtual character over `K`.\nConsequently every irreducible representation over `L` is the scalar extension of an absolutely\nirreducible representation over `K`.\n\nIn particular, every irreducible complex representation is realized over `\u211a(\u03b6_e)`, where\n`e = Monoid.exponent G` and `\u03b6_e` is any primitive `e`-th root in `\u2102`.\n\nThe character statement uses Brauer induction, the monomiality of irreducible representations\nof finite elementary groups, and transitivity of induction. The induced linear characters\ndescend by `TauCeti.exists_virtualCharacter_indFDRep_of_isPrimitiveRoot`. Passing from that\nintegral character identity to an actual representation uses\n`FDRep.exists_simple_nonempty_iso_baseChange_of_character_eq`; having values in `K` alone would\nnot suffice.\n\nThe character statement allows `K`, `L` and `G` in independent universes. The monomiality\ntheorem for nilpotent groups puts the group in the universe of `L`, so the Brauer argument runs on\nthe copy `Shrink G` of `G` in that universe, and its conclusion returns to `G` by pulling virtual\ncharacters back along the group isomorphism `Shrink.mulEquiv`\n(`TauCeti.comp_mem_virtualCharacters`). The reverse inclusion is the change of coefficients\n`RingHom.comp_mem_virtualCharacters`. The realization statements keep `K` and `L` in one universe,\nsince they compare the scalar extension with a representation over `L`. No cyclotomic hypothesis\non the whole ambient field `L` is needed.\n\n## References\n\n* J.-P. Serre, *Linear Representations of Finite Groups* (1977), Section 12.3.\n-/\n\npublic section\n\nopen CategoryTheory\n\nuniverse u v w\n\nnamespace TauCeti\n\nsection\n\nvariable {K : Type u} {L : Type w} [Field K] [Field L] [Algebra K L] [CharZero K] [IsAlgClosed L]\n\n/-- The descent of virtual characters when the group lives in the universe of `L`, where\nBrauer's induction theorem and the monomiality of nilpotent groups apply directly. -/\nprivate theorem virtualCharacters_le_map_of_isPrimitiveRoot_aux {G : Type w} [Group G] [Finite G]\n {n : \u2115} [NeZero n] {\u03b6 : K} (h\u03b6 : IsPrimitiveRoot \u03b6 n) (hG : Monoid.exponent G \u2223 n) :\n virtualCharacters L G \u2264\n (virtualCharacters K G).map ((algebraMap K L).toAddMonoidHom.compLeft G) := by\n have : CharZero L := charZero_of_injective_algebraMap (algebraMap K L).injective\n -- Brauer reduces the inclusion to elementary-group irreducibles.\n rw [\u2190 ClassFunction.indVirtualCharacters_eq_virtualCharacters_isElementary,\n ClassFunction.indVirtualCharacters_eq_indCharacterSpanInt\n (fun E _ => isUnit_iff_ne_zero.mpr (Nat.cast_ne_zero.mpr Nat.card_pos.ne'))]\n refine ClassFunction.indCharacterSpanInt_le_iff.mpr fun E hE d \u03c1 h\u03c1 => ?_\n have : Group.IsNilpotent E := hE.isNilpotent\n have : Representation.IsIrreducible (FDRep.of \u03c1).\u03c1 := by\n simpa only [FDRep.of_\u03c1'] using h\u03c1\n have : Simple (FDRep.of \u03c1) := FDRep.simple_of_isIrreducible _\n obtain \u27e8D, \u03c7, h\u03c7\u27e9 := (FDRep.of \u03c1).exists_character_eq_indClassFun_of_isNilpotent\n -- Read the subgroup of `E` as a subgroup of `G`, then induce in stages.\n obtain \u27e8H, hHE, rfl\u27e9 : \u2203 H \u2264 E, H.subgroupOf E = D :=\n \u27e8D.map E.subtype, Subgroup.map_subtype_le D,\n Subgroup.comap_map_eq_self_of_injective E.subtype_injective D\u27e9\n let \u03c8 : H \u2192* L\u02e3 := \u03c7.comp (Subgroup.subgroupOfEquivOfLe hHE).symm.toMonoidHom\n have hind : ((Subgroup.indClassFunction E (ClassFunction.ofCharacter \u03c1) : ClassFunction L G) :\n G \u2192 L) = (indFDRep (FDRep.ofLinearCharacter \u03c8)).character := by\n rw [\u2190 Subgroup.indClassFun_ofFDRep_character]\n have h\u03c8\u03c7 : (FDRep.ofLinearCharacter \u03c8).character = fun h => (\u03c8 h : L) :=\n funext (FDRep.char_ofLinearCharacter \u03c8)\n rw [h\u03c8\u03c7]\n have h\u03c1\u03c7 : ((ClassFunction.ofCharacter \u03c1 : ClassFunction L E) : E \u2192 L) =\n (FDRep.of \u03c1).character := funext fun g => by simp\n have hInd : ((Subgroup.indClassFunction E (ClassFunction.ofCharacter \u03c1) : ClassFunction L G) :\n G \u2192 L) = Subgroup.indClassFun E (ClassFunction.ofCharacter \u03c1) :=\n funext (Subgroup.indClassFunction_apply E (ClassFunction.ofCharacter \u03c1))\n rw [hInd, h\u03c1\u03c7, h\u03c7]\n convert Subgroup.indClassFun_indClassFun_subgroupOf H hHE\n (ClassFunction.mem_iff.mp (MonoidHom.comp_mem_classFunction \u03c8 Units.val)) using 1\n simp [\u03c8]\n obtain \u27e8f, hf, hdescent\u27e9 := exists_virtualCharacter_indFDRep_of_isPrimitiveRoot h\u03b6 hG \u03c8\n rw [hind, hdescent]\n exact AddSubgroup.mem_map.mpr \u27e8f, hf, rfl\u27e9\n\nvariable {G : Type v} [Group G] [Finite G]\n\n/-- **Brauer induction in its field-of-definition form.** If `K` contains a primitive root\nwhose order is divisible by the exponent of `G`, coefficient extension identifies its\nvirtual-character lattice with the entire virtual-character lattice over the algebraically\nclosed extension `L`. The coefficients in both lattices are integers, and `K`, `L` and `G` may\nlive in any universes. -/\ntheorem virtualCharacters_eq_map_of_isPrimitiveRoot {n : \u2115} [NeZero n] {\u03b6 : K}\n (h\u03b6 : IsPrimitiveRoot \u03b6 n) (hG : Monoid.exponent G \u2223 n) :\n virtualCharacters L G =\n (virtualCharacters K G).map ((algebraMap K L).toAddMonoidHom.compLeft G) := by\n apply le_antisymm\n \u00b7 -- Descend on the copy of `G` in the universe of `L`, then pull back to `G`.\n intro f hf\n let e : Shrink.{w} G \u2243* G := Shrink.mulEquiv\n have hG' : Monoid.exponent (Shrink.{w} G) \u2223 n := Monoid.exponent_eq_of_mulEquiv e \u25b8 hG\n obtain \u27e8g, hg, hgf\u27e9 := AddSubgroup.mem_map.mp\n (virtualCharacters_le_map_of_isPrimitiveRoot_aux h\u03b6 hG'\n (comp_mem_virtualCharacters e.toMonoidHom hf))\n refine AddSubgroup.mem_map.mpr \u27e8g \u2218 e.symm, comp_mem_virtualCharacters e.symm.toMonoidHom hg,\n funext fun x => ?_\u27e9\n simpa using congrFun hgf (e.symm x)\n \u00b7 -- Changing coefficients along `K \u2192 L` preserves virtual characters.\n exact AddSubgroup.map_le_iff_le_comap.mpr fun _ hf =>\n (algebraMap K L).comp_mem_virtualCharacters hf\n\nend\n\nsection\n\nvariable {K L : Type u} [Field K] [Field L] [Algebra K L] [CharZero K] [IsAlgClosed L]\nvariable {G : Type v} [Group G] [Finite G]\n\n/-- **A field containing the requisite roots of unity realizes every irreducible\nrepresentation.** The realizing representation over `K` is simple and its endomorphisms are\nexactly the scalars, so it is absolutely irreducible. -/\ntheorem _root_.FDRep.exists_simple_nonempty_iso_baseChange_of_isPrimitiveRoot\n (W : FDRep L G) [Simple W] {n : \u2115} [NeZero n] {\u03b6 : K}\n (h\u03b6 : IsPrimitiveRoot \u03b6 n) (hG : Monoid.exponent G \u2223 n) :\n \u2203 V : FDRep K G, Simple V \u2227 Module.finrank K (V \u27f6 V) = 1 \u2227\n Nonempty (FDRep.of (Representation.baseChange L V.\u03c1) \u2245 W) := by\n have h\u03c7 := character_mem_virtualCharacters W\n rw [virtualCharacters_eq_map_of_isPrimitiveRoot h\u03b6 hG] at h\u03c7\n obtain \u27e8f, hf, h\u03c7\u27e9 := AddSubgroup.mem_map.mp h\u03c7\n exact W.exists_simple_nonempty_iso_baseChange_of_character_eq\n (finrank_endomorphism_simple_eq_one L W) hf h\u03c7.symm\n\nomit [CharZero K] in\n/-- **The exponent cyclotomic field is a splitting field for `G`.** Every irreducible\nrepresentation over an algebraically closed extension is the scalar extension of an absolutely\nirreducible representation over the cyclotomic field. -/\ntheorem _root_.FDRep.exists_simple_nonempty_iso_baseChange_of_isCyclotomicExtension\n [Algebra \u211a K] [IsCyclotomicExtension {Monoid.exponent G} \u211a K]\n (W : FDRep L G) [Simple W] :\n \u2203 V : FDRep K G, Simple V \u2227 Module.finrank K (V \u27f6 V) = 1 \u2227\n Nonempty (FDRep.of (Representation.baseChange L V.\u03c1) \u2245 W) :=\n have : CharZero K := algebraRat.charZero K\n W.exists_simple_nonempty_iso_baseChange_of_isPrimitiveRoot\n (IsCyclotomicExtension.zeta_spec (Monoid.exponent G) \u211a K) (dvd_refl _)\n\nend\n\nend TauCeti\n\nnamespace TauCeti\n\nvariable {G : Type v} [Group G] [Finite G]\n\n/-- **Every irreducible complex representation is defined over `\u211a(\u03b6_e)`.** Here `e` is the\nexponent of `G` and the cyclotomic field is the actual intermediate field of `\u2102` generated by\nany primitive `e`-th root `\u03b6`. -/\ntheorem _root_.FDRep.exists_simple_nonempty_iso_baseChange_adjoin_of_isPrimitiveRoot\n (W : FDRep \u2102 G) [Simple W] {\u03b6 : \u2102} (h\u03b6 : IsPrimitiveRoot \u03b6 (Monoid.exponent G)) :\n \u2203 V : FDRep (IntermediateField.adjoin \u211a {\u03b6}) G,\n Simple V \u2227 Module.finrank (IntermediateField.adjoin \u211a {\u03b6}) (V \u27f6 V) = 1 \u2227\n Nonempty (FDRep.of (Representation.baseChange \u2102 V.\u03c1) \u2245 W) := by\n have := h\u03b6.intermediateField_adjoin_isCyclotomicExtension \u211a\n exact W.exists_simple_nonempty_iso_baseChange_of_isCyclotomicExtension\n\nend TauCeti\n", "public_theorems": ["TauCeti.virtualCharacters_eq_map_of_isPrimitiveRoot", "FDRep.exists_simple_nonempty_iso_baseChange_of_isPrimitiveRoot", "FDRep.exists_simple_nonempty_iso_baseChange_of_isCyclotomicExtension", "FDRep.exists_simple_nonempty_iso_baseChange_adjoin_of_isPrimitiveRoot"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.RepresentationTheory.Induction.Cyclotomic.Basic\npublic import TauCeti.RepresentationTheory.CharacterTable.Realization\nimport Mathlib.Algebra.Group.Shrink\nimport Mathlib.Data.Fintype.Shrink\nimport TauCeti.RepresentationTheory.CharacterTable.CoefficientAction\nimport TauCeti.RepresentationTheory.Induction.Brauer.Induction\nimport TauCeti.RepresentationTheory.Induction.Monomial\n\n/-!\n# Cyclotomic splitting fields for finite groups\n\nLet `G` be a finite group and `L / K` an extension of characteristic-zero fields with `L`\nalgebraically closed. If `K` contains a primitive root of unity of order divisible by the\nexponent of `G`, every virtual character over `L` is the image of a virtual character over `K`.\nConsequently every irreducible representation over `L` is the scalar extension of an absolutely\nirreducible representation over `K`.\n\nIn particular, every irreducible complex representation is realized over `\u211a(\u03b6_e)`, where\n`e = Monoid.exponent G` and `\u03b6_e` is any primitive `e`-th root in `\u2102`.\n\nThe character statement uses Brauer induction, the monomiality of irreducible representations\nof finite elementary groups, and transitivity of induction. The induced linear characters\ndescend by `TauCeti.exists_virtualCharacter_indFDRep_of_isPrimitiveRoot`. Passing from that\nintegral character identity to an actual representation uses\n`FDRep.exists_simple_nonempty_iso_baseChange_of_character_eq`; having values in `K` alone would\nnot suffice.\n\nThe character statement allows `K`, `L` and `G` in independent universes. The monomiality\ntheorem for nilpotent groups puts the group in the universe of `L`, so the Brauer argument runs on\nthe copy `Shrink G` of `G` in that universe, and its conclusion returns to `G` by pulling virtual\ncharacters back along the group isomorphism `Shrink.mulEquiv`\n(`TauCeti.comp_mem_virtualCharacters`). The reverse inclusion is the change of coefficients\n`RingHom.comp_mem_virtualCharacters`. The realization statements keep `K` and `L` in one universe,\nsince they compare the scalar extension with a representation over `L`. No cyclotomic hypothesis\non the whole ambient field `L` is needed.\n\n## References\n\n* J.-P. Serre, *Linear Representations of Finite Groups* (1977), Section 12.3.\n-/\n\npublic section\n\nopen CategoryTheory\n\nuniverse u v w\n\nnamespace TauCeti\n\nsection\n\nvariable {K : Type u} {L : Type w} [Field K] [Field L] [Algebra K L] [CharZero K] [IsAlgClosed L]", "variable {G : Type v} [Group G] [Finite G]", "/-- **Brauer induction in its field-of-definition form.** If `K` contains a primitive root\nwhose order is divisible by the exponent of `G`, coefficient extension identifies its\nvirtual-character lattice with the entire virtual-character lattice over the algebraically\nclosed extension `L`. The coefficients in both lattices are integers, and `K`, `L` and `G` may\nlive in any universes. -/\ntheorem virtualCharacters_eq_map_of_isPrimitiveRoot {n : \u2115} [NeZero n] {\u03b6 : K}\n (h\u03b6 : IsPrimitiveRoot \u03b6 n) (hG : Monoid.exponent G \u2223 n) :\n virtualCharacters L G =\n (virtualCharacters K G).map ((algebraMap K L).toAddMonoidHom.compLeft G) :=", "end\n\nsection\n\nvariable {K L : Type u} [Field K] [Field L] [Algebra K L] [CharZero K] [IsAlgClosed L]\nvariable {G : Type v} [Group G] [Finite G]", "/-- **A field containing the requisite roots of unity realizes every irreducible\nrepresentation.** The realizing representation over `K` is simple and its endomorphisms are\nexactly the scalars, so it is absolutely irreducible. -/\ntheorem _root_.FDRep.exists_simple_nonempty_iso_baseChange_of_isPrimitiveRoot\n (W : FDRep L G) [Simple W] {n : \u2115} [NeZero n] {\u03b6 : K}\n (h\u03b6 : IsPrimitiveRoot \u03b6 n) (hG : Monoid.exponent G \u2223 n) :\n \u2203 V : FDRep K G, Simple V \u2227 Module.finrank K (V \u27f6 V) = 1 \u2227\n Nonempty (FDRep.of (Representation.baseChange L V.\u03c1) \u2245 W) :=", "omit [CharZero K] in\n/-- **The exponent cyclotomic field is a splitting field for `G`.** Every irreducible\nrepresentation over an algebraically closed extension is the scalar extension of an absolutely\nirreducible representation over the cyclotomic field. -/\ntheorem _root_.FDRep.exists_simple_nonempty_iso_baseChange_of_isCyclotomicExtension\n [Algebra \u211a K] [IsCyclotomicExtension {Monoid.exponent G} \u211a K]\n (W : FDRep L G) [Simple W] :\n \u2203 V : FDRep K G, Simple V \u2227 Module.finrank K (V \u27f6 V) = 1 \u2227\n Nonempty (FDRep.of (Representation.baseChange L V.\u03c1) \u2245 W) :=", "end\n\nend TauCeti\n\nnamespace TauCeti\n\nvariable {G : Type v} [Group G] [Finite G]", "/-- **Every irreducible complex representation is defined over `\u211a(\u03b6_e)`.** Here `e` is the\nexponent of `G` and the cyclotomic field is the actual intermediate field of `\u2102` generated by\nany primitive `e`-th root `\u03b6`. -/\ntheorem _root_.FDRep.exists_simple_nonempty_iso_baseChange_adjoin_of_isPrimitiveRoot\n (W : FDRep \u2102 G) [Simple W] {\u03b6 : \u2102} (h\u03b6 : IsPrimitiveRoot \u03b6 (Monoid.exponent G)) :\n \u2203 V : FDRep (IntermediateField.adjoin \u211a {\u03b6}) G,\n Simple V \u2227 Module.finrank (IntermediateField.adjoin \u211a {\u03b6}) (V \u27f6 V) = 1 \u2227\n Nonempty (FDRep.of (Representation.baseChange \u2102 V.\u03c1) \u2245 W) :=", "end TauCeti"], "free_length": 3314, "file_length": 5383, "heartbeats": 12238, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.RingTheory.PowerSeries.PontryaginSeries", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/RingTheory/PowerSeries/PontryaginSeries.lean", "module": "TauCeti.RingTheory.PowerSeries.PontryaginSeries", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.RingTheory.PowerSeries.Cartier\nimport TauCeti.RingTheory.PowerSeries.Rescale\n\n/-!\n# The formal Pontryagin series and its Whitney correction\n\nThe Pontryagin classes of a real vector bundle `E` are defined from the Chern classes of its\ncomplexification by `p\u2096(E) = (-1)\u1d4f c\u2082\u2096(E \u2297 \u2102)`. Over a commutative ring `R`, this file isolates\nthe formal algebra behind that definition. For a power series `C = \u2211 c\u1d62 X\u2071`, standing for the\ntotal Chern class of `E \u2297 \u2102`, the *Pontryagin series* is `\u2211\u2096 (-1)\u1d4f c\u2082\u2096 X\u1d4f`.\n\nSince `(E \u2295 F) \u2297 \u2102 = (E \u2297 \u2102) \u2295 (F \u2297 \u2102)`, the Whitney sum formula for Chern classes reduces the\nPontryagin classes of a direct sum to the Pontryagin series of a product. Writing\n`C(X) = C\u2080(X\u00b2) + X C\u2081(X\u00b2)` for the even and odd parts, the product formula for even parts gives\nthe exact integral Whitney formula\n`p\u2096(E \u2295 F) = \u2211_{a+b=k} p\u2090(E) p_b(F) + (-1)\u1d4f \u2211_{a+b=k-1} c_{2a+1}(E \u2297 \u2102) c_{2b+1}(F \u2297 \u2102)` for\n`k \u2265 1`.\nThe odd Chern classes of a complexification are annihilated by `2`, so the correction term is\n`2`-torsion, and the Pontryagin series is multiplicative once `2` is a non-zero-divisor, for\ninstance over `\u2124[1/2]` or `\u211a`.\n\nFor a complex bundle `E` with formal Chern roots `x\u2c7c`, the complexification of the underlying\nreal bundle is `E \u2295 \u0112` and `c(\u0112)(X) = c(E)(-X)`. The product `C(-X) C(X)` is even, which gives\nMilnor\u2013Stasheff's formula `1 - p\u2081 + p\u2082 - \u22ef = (1 - c\u2081 + c\u2082 - \u22ef)(1 + c\u2081 + c\u2082 + \u22ef)` and, in terms\nof roots, `p(E_\u211d) = \u220f\u2c7c (1 + x\u2c7c\u00b2)`.\n\nThe even and odd parts are the Cartier components `PowerSeries.cartier R 2 0` and\n`PowerSeries.cartier R 2 1`; their product formulas are `PowerSeries.cartier_two_zero_mul` and\n`PowerSeries.cartier_two_one_mul`, and the evenness of `C(-X) C(X)` is\n`PowerSeries.cartier_two_one_rescale_neg_one_mul_self`.\n\n## Main definitions\n\n* `PowerSeries.pontryaginSeries R C`: the series `\u2211\u2096 (-1)\u1d4f c\u2082\u2096 X\u1d4f` of a series `C = \u2211 c\u1d62 X\u2071`.\n\n## Main results\n\n* `PowerSeries.pontryaginSeries_mul`, `PowerSeries.coeff_succ_pontryaginSeries_mul`: the exact\n Whitney formula with its odd-times-odd correction, as series and coefficientwise.\n* `PowerSeries.two_mul_pontryaginSeries_mul_sub_mul_eq_zero`: if the odd coefficients of `P`\n are annihilated by `2`, then the Pontryagin series is multiplicative modulo `2`-torsion.\n* `PowerSeries.twice_even_product_correction_eq_zero`: if the odd coefficients of `P` are\n annihilated by `2`, then twice the difference between an even coefficient of `P * Q` and the\n convolution of the even coefficients of `P` and `Q` vanishes.\n* `PowerSeries.pontryaginSeries_mul_of_isLeftRegular_two_of_two_mul_coeff_eq_zero`: the\n Pontryagin series is multiplicative when `2` is a non-zero-divisor and the odd coefficients of\n one factor are annihilated by `2`.\n* `PowerSeries.expand_rescale_pontryaginSeries_of_cartier_two_one_eq_zero`: an even series is\n recovered from its Pontryagin series by `p \u21a6 p(-X\u00b2)`.\n* `PowerSeries.expand_rescale_pontryaginSeries_rescale_neg_one_mul_self`: Milnor\u2013Stasheff's formula\n for the Pontryagin series of `C(-X) C(X)`.\n* `PowerSeries.pontryaginSeries_rescale_neg_one_prod_map_one_add_C_mul_X_mul_self`: on formal roots,\n `C = \u220f\u2c7c (1 + x\u2c7c X)` gives the Pontryagin series `\u220f\u2c7c (1 + x\u2c7c\u00b2 X)`.\n\n## References\n\n* J. W. Milnor and J. D. Stasheff, *Characteristic classes*, \u00a715: the Whitney product formula\n for Pontryagin classes modulo `2`-torsion, and Corollary 15.5 for complex bundles.\n-/\n\npublic section\n\nnamespace PowerSeries\n\nvariable {R : Type*} [CommRing R]\n\nvariable (R) in\n/-- The *Pontryagin series* of a power series `C = \u2211 c\u1d62 X\u2071` is `\u2211\u2096 (-1)\u1d4f c\u2082\u2096 X\u1d4f`. When `C` is\nthe total Chern class of the complexification `E \u2297 \u2102` of a real vector bundle, its coefficients\nare the Pontryagin classes `p\u2096(E) = (-1)\u1d4f c\u2082\u2096(E \u2297 \u2102)`. -/\nnoncomputable def pontryaginSeries : R\u27e6X\u27e7 \u2192\u2097[R] R\u27e6X\u27e7 :=\n (rescaleAlgHom (-1 : R)).toLinearMap \u2218\u2097 cartier R 2 0\n\n/-- The Pontryagin series is the even part of the series, evaluated at `-X`. -/\ntheorem pontryaginSeries_apply (C : R\u27e6X\u27e7) :\n pontryaginSeries R C = rescale (-1) (cartier R 2 0 C) :=\n RingHom.congr_fun (coe_rescaleAlgHom (-1 : R)) (cartier R 2 0 C)\n\n/-- The coefficients of the Pontryagin series: `p\u2096 = (-1)\u1d4f c\u2082\u2096`. -/\n@[simp]\ntheorem coeff_pontryaginSeries (C : R\u27e6X\u27e7) (k : \u2115) :\n coeff k (pontryaginSeries R C) = (-1) ^ k * coeff (2 * k) C := by\n simp [pontryaginSeries_apply]\n\n/-- The constant coefficient of the Pontryagin series is the constant coefficient of the\nseries. -/\n@[simp]\ntheorem constantCoeff_pontryaginSeries (C : R\u27e6X\u27e7) :\n constantCoeff (pontryaginSeries R C) = constantCoeff C := by\n simp [\u2190 coeff_zero_eq_constantCoeff_apply, -coeff_zero_eq_constantCoeff]\n\n/-- The trivial total Chern class has trivial Pontryagin series. -/\n@[simp]\ntheorem pontryaginSeries_one : pontryaginSeries R (1 : R\u27e6X\u27e7) = 1 := by\n simp [pontryaginSeries_apply]\n\n/-- The Pontryagin series of a constant series is that constant. -/\n@[simp]\ntheorem pontryaginSeries_C (a : R) : pontryaginSeries R (C a) = C a := by\n ext k\n rcases k with _ | k <;> simp [coeff_C]\n\n/-- The Pontryagin series of `X` vanishes: `X` has no even part. -/\n@[simp]\ntheorem pontryaginSeries_X : pontryaginSeries R (X : R\u27e6X\u27e7) = 0 := by\n ext k\n simp [coeff_X]\n\n/-- The Pontryagin series commutes with multiplication by constants. -/\n@[simp]\ntheorem pontryaginSeries_C_mul (a : R) (F : R\u27e6X\u27e7) :\n pontryaginSeries R (C a * F) = C a * pontryaginSeries R F := by\n simp [\u2190 smul_eq_C_mul]\n\n/-- The Pontryagin series of an even monomial: `a X\u00b2\u1d4f \u21a6 (-1)\u1d4f a X\u1d4f`. -/\n@[simp]\ntheorem pontryaginSeries_monomial_two_mul (k : \u2115) (a : R) :\n pontryaginSeries R (monomial (2 * k) a) = monomial k ((-1) ^ k * a) := by\n ext n\n simp [coeff_monomial]\n split_ifs <;> simp_all\n\n/-- The Pontryagin series of an odd monomial vanishes. -/\n@[simp]\ntheorem pontryaginSeries_monomial_two_mul_add_one (k : \u2115) (a : R) :\n pontryaginSeries R (monomial (2 * k + 1) a) = 0 := by\n ext n\n simp [coeff_monomial]\n omega\n\n/-- Rescaling the variable by `a` rescales the Pontryagin series by `a ^ 2`. -/\ntheorem pontryaginSeries_rescale (a : R) (F : R\u27e6X\u27e7) :\n pontryaginSeries R (rescale a F) = rescale (a ^ 2) (pontryaginSeries R F) := by\n simp [pontryaginSeries_apply, cartier_rescale, rescale_rescale, mul_comm]\n\n/-- The Pontryagin series of `F(-X)` is that of `F`. -/\n@[simp]\ntheorem pontryaginSeries_rescale_neg_one (F : R\u27e6X\u27e7) :\n pontryaginSeries R (rescale (-1) F) = pontryaginSeries R F := by\n simp [pontryaginSeries_apply]\n\n/-- The Pontryagin series of `F(X\u00b2)` is `F(-X)`. -/\n@[simp]\ntheorem pontryaginSeries_expand_two (F : R\u27e6X\u27e7) :\n pontryaginSeries R (expand 2 two_ne_zero F) = rescale (-1) F := by\n ext n\n simp\n\n/-- The Pontryagin series is natural for coefficient ring homomorphisms. -/\n@[simp]\ntheorem map_pontryaginSeries {S : Type*} [CommRing S] (f : R \u2192+* S) (C : R\u27e6X\u27e7) :\n map f (pontryaginSeries R C) = pontryaginSeries S (map f C) := by\n ext k\n simp\n\n/-- **The exact Whitney formula for Pontryagin series.** The Pontryagin series of a product is\nthe product of the Pontryagin series, corrected by the product of the odd parts:\n`p(P Q) = p(P) p(Q) - X P\u2081(-X) Q\u2081(-X)`, where `P(X) = P\u2080(X\u00b2) + X P\u2081(X\u00b2)` and similarly for\n`Q`. -/\ntheorem pontryaginSeries_mul (P Q : R\u27e6X\u27e7) :\n pontryaginSeries R (P * Q) = pontryaginSeries R P * pontryaginSeries R Q -\n X * rescale (-1) (cartier R 2 1 P * cartier R 2 1 Q) := by\n simp only [pontryaginSeries_apply, cartier_two_zero_mul, map_add, map_mul (rescale (-1 : R)),\n rescale_neg_one_X]\n ring\n\n/-- **The exact integral Whitney formula, coefficientwise.** The coefficient of `X ^ (k + 1)` in\nthe Pontryagin series of `P * Q` is the convolution of the coefficients of the Pontryagin series\nof `P` and `Q`, plus the correction `(-1) ^ (k + 1) \u2211_{a+b=k} P_{2a+1} Q_{2b+1}`. -/\ntheorem coeff_succ_pontryaginSeries_mul (P Q : R\u27e6X\u27e7) (k : \u2115) :\n coeff (k + 1) (pontryaginSeries R (P * Q)) =\n \u2211 p \u2208 Finset.antidiagonal (k + 1),\n coeff p.1 (pontryaginSeries R P) * coeff p.2 (pontryaginSeries R Q) +\n (-1) ^ (k + 1) * \u2211 p \u2208 Finset.antidiagonal k,\n coeff (2 * p.1 + 1) P * coeff (2 * p.2 + 1) Q := by\n rw [pontryaginSeries_mul, map_sub, coeff_succ_X_mul, \u2190 coeff_mul]\n simp only [coeff_rescale, coeff_mul, coeff_cartier, Finset.mul_sum, sub_eq_add_neg,\n \u2190 Finset.sum_neg_distrib]\n refine congrArg _ (Finset.sum_congr rfl fun p _ \u21a6 ?_)\n ring\n\n/-- **The Whitney formula for Pontryagin series modulo `2`-torsion.** If the odd coefficients of\n`P` are annihilated by `2`, as for the total Chern class of a complexification, then\n`p(P Q) - p(P) p(Q)` is annihilated by `2`. -/\ntheorem two_mul_pontryaginSeries_mul_sub_mul_eq_zero (P Q : R\u27e6X\u27e7)\n (hodd : \u2200 j : \u2115, 2 * coeff (2 * j + 1) P = 0) :\n 2 * (pontryaginSeries R (P * Q) - pontryaginSeries R P * pontryaginSeries R Q) = 0 := by\n have hP : 2 * cartier R 2 1 P = 0 := by\n ext j\n simpa using hodd j\n rw [pontryaginSeries_mul, sub_sub_cancel_left, mul_neg, neg_eq_zero, mul_left_comm,\n \u2190 map_ofNat (rescale (-1 : R)) 2, \u2190 map_mul, \u2190 mul_assoc, hP]\n simp\n\n/-- **The `2`-torsion of the Pontryagin Whitney correction.** If the odd coefficients of `P` are\nannihilated by `2`, then twice the difference between an even coefficient of `P * Q` and the\nconvolution of the even coefficients of `P` and `Q` vanishes. The difference itself need not\nvanish, so the even parts multiply cleanly once `2` is a non-zero-divisor (for instance after\ninverting `2`). -/\ntheorem twice_even_product_correction_eq_zero {R : Type*} [Ring R] (P Q : R\u27e6X\u27e7)\n (hodd : \u2200 j : \u2115, 2 * coeff (2 * j + 1) P = 0) (k : \u2115) :\n 2 * (coeff (2 * k) (P * Q) -\n \u2211 i \u2208 Finset.range (k + 1), coeff (2 * i) P * coeff (2 * (k - i)) Q) = 0 := by\n have h := congrArg (coeff k) (cartier_two_zero_mul P Q)\n rw [coeff_cartier, add_zero, map_add] at h\n rw [h, coeff_mul, Finset.Nat.sum_antidiagonal_eq_sum_range_succ_mk]\n simp only [coeff_cartier, add_zero, Nat.succ_eq_add_one, add_sub_cancel_left]\n rcases k with _ | k\n \u00b7 simp\n \u00b7 rw [coeff_succ_X_mul, coeff_mul, Finset.mul_sum]\n refine Finset.sum_eq_zero fun p _ \u21a6 ?_\n simp only [coeff_cartier, \u2190 mul_assoc, hodd, zero_mul]\n\n/-- **Multiplicativity of the Pontryagin series away from `2`.** If `2` is a non-zero-divisor in\n`R` and the odd coefficients of `P` are annihilated by `2`, then the Pontryagin series of\n`P * Q` is the product of the Pontryagin series of `P` and `Q`. -/\ntheorem pontryaginSeries_mul_of_isLeftRegular_two_of_two_mul_coeff_eq_zero\n (h2 : IsLeftRegular (2 : R)) (P Q : R\u27e6X\u27e7)\n (hodd : \u2200 j : \u2115, 2 * coeff (2 * j + 1) P = 0) :\n pontryaginSeries R (P * Q) = pontryaginSeries R P * pontryaginSeries R Q := by\n have hP : cartier R 2 1 P = 0 := by\n ext j\n exact h2 (by simpa using hodd j)\n simp [pontryaginSeries_mul, hP]\n\n/-- An even series is recovered from its Pontryagin series `p` as `p(-X\u00b2)`. -/\ntheorem expand_rescale_pontryaginSeries_of_cartier_two_one_eq_zero {C : R\u27e6X\u27e7}\n (hC : cartier R 2 1 C = 0) :\n expand 2 two_ne_zero (rescale (-1) (pontryaginSeries R C)) = C := by\n rw [pontryaginSeries_apply, rescale_neg_one_rescale_neg_one]\n refine expand_cartier_zero_of_coeff_eq_zero 2 two_ne_zero fun n hn \u21a6 ?_\n obtain \u27e8m, rfl\u27e9 := Nat.odd_iff.2 (Nat.two_dvd_ne_zero.1 hn)\n simpa using congrArg (coeff m) hC\n\n/-- **Milnor\u2013Stasheff's formula for a complex bundle.** For a series `C`, standing for the total\nChern class of a complex bundle `E`, the series `C(-X) C(X)` is the total Chern class of the\ncomplexification `E \u2295 \u0112` of its underlying real bundle, and its Pontryagin series `p`\nsatisfies `p(-X\u00b2) = C(-X) C(X)`, that is, `1 - p\u2081 + p\u2082 - \u22ef = (1 - c\u2081 + c\u2082 - \u22ef)(1 + c\u2081 + c\u2082 + \u22ef)`.\n-/\ntheorem expand_rescale_pontryaginSeries_rescale_neg_one_mul_self (C : R\u27e6X\u27e7) :\n expand 2 two_ne_zero (rescale (-1) (pontryaginSeries R (rescale (-1) C * C))) =\n rescale (-1) C * C :=\n expand_rescale_pontryaginSeries_of_cartier_two_one_eq_zero\n (cartier_two_one_rescale_neg_one_mul_self C)\n\n/-- **The Pontryagin series on formal roots.** For `C = \u220f\u2c7c (1 + x\u2c7c X)`, standing for the total\nChern class of a complex bundle with Chern roots `x\u2c7c`, the Pontryagin series of `C(-X) C(X)` is\n`\u220f\u2c7c (1 + x\u2c7c\u00b2 X)`; that is, `p(E_\u211d) = \u220f\u2c7c (1 + x\u2c7c\u00b2)`. -/\ntheorem pontryaginSeries_rescale_neg_one_prod_map_one_add_C_mul_X_mul_self (s : Multiset R) :\n pontryaginSeries R (rescale (-1) (s.map fun x \u21a6 1 + C x * X).prod *\n (s.map fun x \u21a6 1 + C x * X).prod) = (s.map fun x \u21a6 1 + C (x ^ 2) * X).prod := by\n set c := (s.map fun x \u21a6 1 + C x * X).prod\n have hc : rescale (-1) c * c =\n expand 2 two_ne_zero (rescale (-1) (s.map fun x \u21a6 1 + C (x ^ 2) * X).prod) := by\n simp only [c, map_multiset_prod, Multiset.map_map, Function.comp_def, \u2190 Multiset.prod_map_mul,\n map_add, map_one, map_mul, rescale_C, rescale_neg_one_X, expand_C]\n congr 1\n refine Multiset.map_congr rfl fun x _ \u21a6 ?_\n rw [map_neg, expand_X, map_pow]\n ring\n rw [hc, pontryaginSeries_expand_two, rescale_neg_one_rescale_neg_one]\n\nend PowerSeries\n", "public_theorems": ["PowerSeries.pontryaginSeries_apply", "PowerSeries.coeff_pontryaginSeries", "PowerSeries.constantCoeff_pontryaginSeries", "PowerSeries.pontryaginSeries_one", "PowerSeries.pontryaginSeries_C", "PowerSeries.pontryaginSeries_X", "PowerSeries.pontryaginSeries_C_mul", "PowerSeries.pontryaginSeries_monomial_two_mul", "PowerSeries.pontryaginSeries_monomial_two_mul_add_one", "PowerSeries.pontryaginSeries_rescale", "PowerSeries.pontryaginSeries_rescale_neg_one", "PowerSeries.pontryaginSeries_expand_two", "PowerSeries.map_pontryaginSeries", "PowerSeries.pontryaginSeries_mul", "PowerSeries.coeff_succ_pontryaginSeries_mul", "PowerSeries.two_mul_pontryaginSeries_mul_sub_mul_eq_zero", "PowerSeries.twice_even_product_correction_eq_zero", "PowerSeries.pontryaginSeries_mul_of_isLeftRegular_two_of_two_mul_coeff_eq_zero", "PowerSeries.expand_rescale_pontryaginSeries_of_cartier_two_one_eq_zero", "PowerSeries.expand_rescale_pontryaginSeries_rescale_neg_one_mul_self", "PowerSeries.pontryaginSeries_rescale_neg_one_prod_map_one_add_C_mul_X_mul_self"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.RingTheory.PowerSeries.Cartier\nimport TauCeti.RingTheory.PowerSeries.Rescale\n\n/-!\n# The formal Pontryagin series and its Whitney correction\n\nThe Pontryagin classes of a real vector bundle `E` are defined from the Chern classes of its\ncomplexification by `p\u2096(E) = (-1)\u1d4f c\u2082\u2096(E \u2297 \u2102)`. Over a commutative ring `R`, this file isolates\nthe formal algebra behind that definition. For a power series `C = \u2211 c\u1d62 X\u2071`, standing for the\ntotal Chern class of `E \u2297 \u2102`, the *Pontryagin series* is `\u2211\u2096 (-1)\u1d4f c\u2082\u2096 X\u1d4f`.\n\nSince `(E \u2295 F) \u2297 \u2102 = (E \u2297 \u2102) \u2295 (F \u2297 \u2102)`, the Whitney sum formula for Chern classes reduces the\nPontryagin classes of a direct sum to the Pontryagin series of a product. Writing\n`C(X) = C\u2080(X\u00b2) + X C\u2081(X\u00b2)` for the even and odd parts, the product formula for even parts gives\nthe exact integral Whitney formula\n`p\u2096(E \u2295 F) = \u2211_{a+b=k} p\u2090(E) p_b(F) + (-1)\u1d4f \u2211_{a+b=k-1} c_{2a+1}(E \u2297 \u2102) c_{2b+1}(F \u2297 \u2102)` for\n`k \u2265 1`.\nThe odd Chern classes of a complexification are annihilated by `2`, so the correction term is\n`2`-torsion, and the Pontryagin series is multiplicative once `2` is a non-zero-divisor, for\ninstance over `\u2124[1/2]` or `\u211a`.\n\nFor a complex bundle `E` with formal Chern roots `x\u2c7c`, the complexification of the underlying\nreal bundle is `E \u2295 \u0112` and `c(\u0112)(X) = c(E)(-X)`. The product `C(-X) C(X)` is even, which gives\nMilnor\u2013Stasheff's formula `1 - p\u2081 + p\u2082 - \u22ef = (1 - c\u2081 + c\u2082 - \u22ef)(1 + c\u2081 + c\u2082 + \u22ef)` and, in terms\nof roots, `p(E_\u211d) = \u220f\u2c7c (1 + x\u2c7c\u00b2)`.\n\nThe even and odd parts are the Cartier components `PowerSeries.cartier R 2 0` and\n`PowerSeries.cartier R 2 1`; their product formulas are `PowerSeries.cartier_two_zero_mul` and\n`PowerSeries.cartier_two_one_mul`, and the evenness of `C(-X) C(X)` is\n`PowerSeries.cartier_two_one_rescale_neg_one_mul_self`.\n\n## Main definitions\n\n* `PowerSeries.pontryaginSeries R C`: the series `\u2211\u2096 (-1)\u1d4f c\u2082\u2096 X\u1d4f` of a series `C = \u2211 c\u1d62 X\u2071`.\n\n## Main results\n\n* `PowerSeries.pontryaginSeries_mul`, `PowerSeries.coeff_succ_pontryaginSeries_mul`: the exact\n Whitney formula with its odd-times-odd correction, as series and coefficientwise.\n* `PowerSeries.two_mul_pontryaginSeries_mul_sub_mul_eq_zero`: if the odd coefficients of `P`\n are annihilated by `2`, then the Pontryagin series is multiplicative modulo `2`-torsion.\n* `PowerSeries.twice_even_product_correction_eq_zero`: if the odd coefficients of `P` are\n annihilated by `2`, then twice the difference between an even coefficient of `P * Q` and the\n convolution of the even coefficients of `P` and `Q` vanishes.\n* `PowerSeries.pontryaginSeries_mul_of_isLeftRegular_two_of_two_mul_coeff_eq_zero`: the\n Pontryagin series is multiplicative when `2` is a non-zero-divisor and the odd coefficients of\n one factor are annihilated by `2`.\n* `PowerSeries.expand_rescale_pontryaginSeries_of_cartier_two_one_eq_zero`: an even series is\n recovered from its Pontryagin series by `p \u21a6 p(-X\u00b2)`.\n* `PowerSeries.expand_rescale_pontryaginSeries_rescale_neg_one_mul_self`: Milnor\u2013Stasheff's formula\n for the Pontryagin series of `C(-X) C(X)`.\n* `PowerSeries.pontryaginSeries_rescale_neg_one_prod_map_one_add_C_mul_X_mul_self`: on formal roots,\n `C = \u220f\u2c7c (1 + x\u2c7c X)` gives the Pontryagin series `\u220f\u2c7c (1 + x\u2c7c\u00b2 X)`.\n\n## References\n\n* J. W. Milnor and J. D. Stasheff, *Characteristic classes*, \u00a715: the Whitney product formula\n for Pontryagin classes modulo `2`-torsion, and Corollary 15.5 for complex bundles.\n-/\n\npublic section\n\nnamespace PowerSeries\n\nvariable {R : Type*} [CommRing R]\n\nvariable (R) in\n/-- The *Pontryagin series* of a power series `C = \u2211 c\u1d62 X\u2071` is `\u2211\u2096 (-1)\u1d4f c\u2082\u2096 X\u1d4f`. When `C` is\nthe total Chern class of the complexification `E \u2297 \u2102` of a real vector bundle, its coefficients\nare the Pontryagin classes `p\u2096(E) = (-1)\u1d4f c\u2082\u2096(E \u2297 \u2102)`. -/\nnoncomputable def pontryaginSeries : R\u27e6X\u27e7 \u2192\u2097[R] R\u27e6X\u27e7 :=\n (rescaleAlgHom (-1 : R)).toLinearMap \u2218\u2097 cartier R 2 0", "/-- The Pontryagin series is the even part of the series, evaluated at `-X`. -/\ntheorem pontryaginSeries_apply (C : R\u27e6X\u27e7) :\n pontryaginSeries R C = rescale (-1) (cartier R 2 0 C) :=", "/-- The coefficients of the Pontryagin series: `p\u2096 = (-1)\u1d4f c\u2082\u2096`. -/\n@[simp]\ntheorem coeff_pontryaginSeries (C : R\u27e6X\u27e7) (k : \u2115) :\n coeff k (pontryaginSeries R C) = (-1) ^ k * coeff (2 * k) C :=", "/-- The constant coefficient of the Pontryagin series is the constant coefficient of the\nseries. -/\n@[simp]\ntheorem constantCoeff_pontryaginSeries (C : R\u27e6X\u27e7) :\n constantCoeff (pontryaginSeries R C) = constantCoeff C :=", "/-- The trivial total Chern class has trivial Pontryagin series. -/\n@[simp]\ntheorem pontryaginSeries_one : pontryaginSeries R (1 : R\u27e6X\u27e7) = 1 :=", "/-- The Pontryagin series of a constant series is that constant. -/\n@[simp]\ntheorem pontryaginSeries_C (a : R) : pontryaginSeries R (C a) = C a :=", "/-- The Pontryagin series of `X` vanishes: `X` has no even part. -/\n@[simp]\ntheorem pontryaginSeries_X : pontryaginSeries R (X : R\u27e6X\u27e7) = 0 :=", "/-- The Pontryagin series commutes with multiplication by constants. -/\n@[simp]\ntheorem pontryaginSeries_C_mul (a : R) (F : R\u27e6X\u27e7) :\n pontryaginSeries R (C a * F) = C a * pontryaginSeries R F :=", "/-- The Pontryagin series of an even monomial: `a X\u00b2\u1d4f \u21a6 (-1)\u1d4f a X\u1d4f`. -/\n@[simp]\ntheorem pontryaginSeries_monomial_two_mul (k : \u2115) (a : R) :\n pontryaginSeries R (monomial (2 * k) a) = monomial k ((-1) ^ k * a) :=", "/-- The Pontryagin series of an odd monomial vanishes. -/\n@[simp]\ntheorem pontryaginSeries_monomial_two_mul_add_one (k : \u2115) (a : R) :\n pontryaginSeries R (monomial (2 * k + 1) a) = 0 :=", "/-- Rescaling the variable by `a` rescales the Pontryagin series by `a ^ 2`. -/\ntheorem pontryaginSeries_rescale (a : R) (F : R\u27e6X\u27e7) :\n pontryaginSeries R (rescale a F) = rescale (a ^ 2) (pontryaginSeries R F) :=", "/-- The Pontryagin series of `F(-X)` is that of `F`. -/\n@[simp]\ntheorem pontryaginSeries_rescale_neg_one (F : R\u27e6X\u27e7) :\n pontryaginSeries R (rescale (-1) F) = pontryaginSeries R F :=", "/-- The Pontryagin series of `F(X\u00b2)` is `F(-X)`. -/\n@[simp]\ntheorem pontryaginSeries_expand_two (F : R\u27e6X\u27e7) :\n pontryaginSeries R (expand 2 two_ne_zero F) = rescale (-1) F :=", "/-- The Pontryagin series is natural for coefficient ring homomorphisms. -/\n@[simp]\ntheorem map_pontryaginSeries {S : Type*} [CommRing S] (f : R \u2192+* S) (C : R\u27e6X\u27e7) :\n map f (pontryaginSeries R C) = pontryaginSeries S (map f C) :=", "/-- **The exact Whitney formula for Pontryagin series.** The Pontryagin series of a product is\nthe product of the Pontryagin series, corrected by the product of the odd parts:\n`p(P Q) = p(P) p(Q) - X P\u2081(-X) Q\u2081(-X)`, where `P(X) = P\u2080(X\u00b2) + X P\u2081(X\u00b2)` and similarly for\n`Q`. -/\ntheorem pontryaginSeries_mul (P Q : R\u27e6X\u27e7) :\n pontryaginSeries R (P * Q) = pontryaginSeries R P * pontryaginSeries R Q -\n X * rescale (-1) (cartier R 2 1 P * cartier R 2 1 Q) :=", "/-- **The exact integral Whitney formula, coefficientwise.** The coefficient of `X ^ (k + 1)` in\nthe Pontryagin series of `P * Q` is the convolution of the coefficients of the Pontryagin series\nof `P` and `Q`, plus the correction `(-1) ^ (k + 1) \u2211_{a+b=k} P_{2a+1} Q_{2b+1}`. -/\ntheorem coeff_succ_pontryaginSeries_mul (P Q : R\u27e6X\u27e7) (k : \u2115) :\n coeff (k + 1) (pontryaginSeries R (P * Q)) =\n \u2211 p \u2208 Finset.antidiagonal (k + 1),\n coeff p.1 (pontryaginSeries R P) * coeff p.2 (pontryaginSeries R Q) +\n (-1) ^ (k + 1) * \u2211 p \u2208 Finset.antidiagonal k,\n coeff (2 * p.1 + 1) P * coeff (2 * p.2 + 1) Q :=", "/-- **The Whitney formula for Pontryagin series modulo `2`-torsion.** If the odd coefficients of\n`P` are annihilated by `2`, as for the total Chern class of a complexification, then\n`p(P Q) - p(P) p(Q)` is annihilated by `2`. -/\ntheorem two_mul_pontryaginSeries_mul_sub_mul_eq_zero (P Q : R\u27e6X\u27e7)\n (hodd : \u2200 j : \u2115, 2 * coeff (2 * j + 1) P = 0) :\n 2 * (pontryaginSeries R (P * Q) - pontryaginSeries R P * pontryaginSeries R Q) = 0 :=", "/-- **The `2`-torsion of the Pontryagin Whitney correction.** If the odd coefficients of `P` are\nannihilated by `2`, then twice the difference between an even coefficient of `P * Q` and the\nconvolution of the even coefficients of `P` and `Q` vanishes. The difference itself need not\nvanish, so the even parts multiply cleanly once `2` is a non-zero-divisor (for instance after\ninverting `2`). -/\ntheorem twice_even_product_correction_eq_zero {R : Type*} [Ring R] (P Q : R\u27e6X\u27e7)\n (hodd : \u2200 j : \u2115, 2 * coeff (2 * j + 1) P = 0) (k : \u2115) :\n 2 * (coeff (2 * k) (P * Q) -\n \u2211 i \u2208 Finset.range (k + 1), coeff (2 * i) P * coeff (2 * (k - i)) Q) = 0 :=", "/-- **Multiplicativity of the Pontryagin series away from `2`.** If `2` is a non-zero-divisor in\n`R` and the odd coefficients of `P` are annihilated by `2`, then the Pontryagin series of\n`P * Q` is the product of the Pontryagin series of `P` and `Q`. -/\ntheorem pontryaginSeries_mul_of_isLeftRegular_two_of_two_mul_coeff_eq_zero\n (h2 : IsLeftRegular (2 : R)) (P Q : R\u27e6X\u27e7)\n (hodd : \u2200 j : \u2115, 2 * coeff (2 * j + 1) P = 0) :\n pontryaginSeries R (P * Q) = pontryaginSeries R P * pontryaginSeries R Q :=", "/-- An even series is recovered from its Pontryagin series `p` as `p(-X\u00b2)`. -/\ntheorem expand_rescale_pontryaginSeries_of_cartier_two_one_eq_zero {C : R\u27e6X\u27e7}\n (hC : cartier R 2 1 C = 0) :\n expand 2 two_ne_zero (rescale (-1) (pontryaginSeries R C)) = C :=", "/-- **Milnor\u2013Stasheff's formula for a complex bundle.** For a series `C`, standing for the total\nChern class of a complex bundle `E`, the series `C(-X) C(X)` is the total Chern class of the\ncomplexification `E \u2295 \u0112` of its underlying real bundle, and its Pontryagin series `p`\nsatisfies `p(-X\u00b2) = C(-X) C(X)`, that is, `1 - p\u2081 + p\u2082 - \u22ef = (1 - c\u2081 + c\u2082 - \u22ef)(1 + c\u2081 + c\u2082 + \u22ef)`.\n-/\ntheorem expand_rescale_pontryaginSeries_rescale_neg_one_mul_self (C : R\u27e6X\u27e7) :\n expand 2 two_ne_zero (rescale (-1) (pontryaginSeries R (rescale (-1) C * C))) =\n rescale (-1) C * C :=", "/-- **The Pontryagin series on formal roots.** For `C = \u220f\u2c7c (1 + x\u2c7c X)`, standing for the total\nChern class of a complex bundle with Chern roots `x\u2c7c`, the Pontryagin series of `C(-X) C(X)` is\n`\u220f\u2c7c (1 + x\u2c7c\u00b2 X)`; that is, `p(E_\u211d) = \u220f\u2c7c (1 + x\u2c7c\u00b2)`. -/\ntheorem pontryaginSeries_rescale_neg_one_prod_map_one_add_C_mul_X_mul_self (s : Multiset R) :\n pontryaginSeries R (rescale (-1) (s.map fun x \u21a6 1 + C x * X).prod *\n (s.map fun x \u21a6 1 + C x * X).prod) = (s.map fun x \u21a6 1 + C (x ^ 2) * X).prod :=", "end PowerSeries"], "free_length": 2432, "file_length": 6015, "heartbeats": 12694, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Geometry.Manifold.Distribution.IntegralManifold.Basic", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Geometry/Manifold/Distribution/IntegralManifold/Basic.lean", "module": "TauCeti.Geometry.Manifold.Distribution.IntegralManifold.Basic", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Geometry.Manifold.Distribution\npublic import TauCeti.Geometry.Manifold.IsManifold.Basic\npublic import Mathlib.Geometry.Manifold.Immersion\npublic import Mathlib.Geometry.Manifold.Instances.Real\npublic import Mathlib.Geometry.Manifold.LocalDiffeomorph\n\nimport TauCeti.Geometry.Manifold.Immersion.LocalDiffeomorph\nimport TauCeti.Geometry.Manifold.LocalDiffeomorph.Constructions\nimport TauCeti.Geometry.Manifold.LocalDiffeomorph.Submodule\nimport TauCeti.Geometry.Manifold.MFDeriv.Constancy\nimport Mathlib.Analysis.LocallyConvex.HahnBanach\n\n/-!\n# Integral manifolds of a distribution\n\nAn integral manifold of a tangent distribution `D` is a `C^n` immersion of a nonempty charted space\nwhose differential has image exactly `D` at every point. The source has its own topology and\ncharted-space structure: it is not given the subspace topology from the ambient manifold, and the\nimmersion need not be injective. This is the notion needed by the Frobenius theorem and by the\nconstruction of immersed Lie subgroups.\n\nThis file provides both the unbundled predicate `TauCeti.IsIntegralManifold` for a specified\nimmersion and `TauCeti.IntegralManifold`, which packages a `k`-dimensional source manifold and its\nparametrization. The rank theorem shows that, for regularity `n \u2260 0`, the dimension of any\nfinite-dimensional source equals the rank of the distribution at any image point; it is not extra\ndata hidden in the definition. For regularity at least one, integral immersions of a\nfinite-dimensional constant distribution have partial-diffeomorphism charts into its direction\nsubspace near interior source points. These charts give local changes of parameter between\ninterior source points with the same ambient image, intertwining the two integral immersions.\n\n## Main definitions\n\n* `TauCeti.IsIntegralManifold`: an immersion of a nonempty charted space whose tangent image equals\n the given distribution.\n* `TauCeti.IntegralManifold`: a packaged integral manifold with Euclidean model of dimension `k`.\n\n## Main results\n\n* `TauCeti.IsIntegralManifold.finrank_model_eq`: for regularity `n \u2260 0`, the source model\n dimension equals the rank of the distribution at any image point.\n* `TauCeti.isIntegralManifold_id`: the identity is an integral manifold of the full tangent\n distribution.\n* `TauCeti.IsIntegralManifold.comp_isLocalDiffeomorph` and\n `TauCeti.IsIntegralManifold.comp_subtypeVal`: precomposition with a local diffeomorphism and\n restriction to a nonempty open subset preserve `IsIntegralManifold` for `n \u2260 0`.\n* `TauCeti.IsIntegralManifold.eventually_sub_mem`: an integral immersion, of regularity at least\n one, of a finite-dimensional constant distribution locally stays in one affine plaque, including\n at boundary source points.\n* `TauCeti.IsIntegralManifold.exists_plaque_chart`: a local chart in an affine plaque with the\n prescribed ambient inclusion.\n* `TauCeti.IsIntegralManifold.exists_plaque_transition`: a local change of integral parameters\n intertwining their ambient maps.\n\n## References\n\n* J. M. Lee, *Introduction to Smooth Manifolds*, 2nd ed., Springer GTM 218 (2013), Chapter 19,\n Proposition 19.16 (Local Structure of Integral Manifolds), p. 500.\n-/\n\npublic section\n\nnoncomputable section\n\nopen Function\nopen scoped Manifold ContDiff Topology\n\nuniverse u v\n\nnamespace TauCeti\n\nvariable {E : Type*} [NormedAddCommGroup E] [NormedSpace \u211d E]\n {H : Type*} [TopologicalSpace H] {I : ModelWithCorners \u211d E H}\n {M : Type u} [TopologicalSpace M] [ChartedSpace H M]\n {n : \u2115\u221e\u03c9} {k : \u2115}\n\nsection Unbundled\n\n/-- A map is an **integral manifold** of `D` when its source is a nonempty charted space, it is a\n`C^n` immersion, and the image of its differential at every point is exactly the prescribed tangent\nsubspace.\n\nNonemptiness rules out the empty map, which would otherwise satisfy the remaining conditions\nvacuously for every distribution.\n\nThe source topology and charted-space structure are independent of the ambient topology. In\nparticular, this predicate neither requires the map to be injective nor equips its range with the\nsubspace topology. -/\ndef IsIntegralManifold {E' : Type*} [NormedAddCommGroup E'] [NormedSpace \u211d E']\n {H' : Type*} [TopologicalSpace H'] (J : ModelWithCorners \u211d E' H')\n (n : \u2115\u221e\u03c9) {N : Type v} [TopologicalSpace N] [ChartedSpace H' N]\n (D : \u2200 x : M, Submodule \u211d (TangentSpace I x)) (f : N \u2192 M) : Prop :=\n Nonempty N \u2227 Manifold.IsImmersion J I n f \u2227\n \u2200 y, LinearMap.range (mfderiv J I f y).toLinearMap = D (f y)\n\nvariable {E' : Type*} [NormedAddCommGroup E'] [NormedSpace \u211d E']\n {H' : Type*} [TopologicalSpace H'] {J : ModelWithCorners \u211d E' H'}\n {N : Type v} [TopologicalSpace N] [ChartedSpace H' N]\n {D : \u2200 x : M, Submodule \u211d (TangentSpace I x)} {f : N \u2192 M}\n\n/-- Characterization of an integral manifold as an immersion of a nonempty charted space with the\nprescribed differential range. -/\ntheorem isIntegralManifold_iff : IsIntegralManifold J n D f \u2194\n Nonempty N \u2227 Manifold.IsImmersion J I n f \u2227\n \u2200 y, LinearMap.range (mfderiv J I f y).toLinearMap = D (f y) :=\n Iff.rfl\n\n/-- The source of an integral manifold is nonempty. -/\ntheorem IsIntegralManifold.nonempty (hf : IsIntegralManifold J n D f) : Nonempty N :=\n hf.1\n\n/-- The parametrization of an integral manifold is an immersion. -/\ntheorem IsIntegralManifold.isImmersion (hf : IsIntegralManifold J n D f) :\n Manifold.IsImmersion J I n f :=\n hf.2.1\n\n/-- The tangent image of an integral manifold is the prescribed distribution fiber. -/\ntheorem IsIntegralManifold.range_mfderiv (hf : IsIntegralManifold J n D f) (y : N) :\n LinearMap.range (mfderiv J I f y).toLinearMap = D (f y) :=\n hf.2.2 y\n\n/-- The parametrization of an integral manifold is of class `C^n`. -/\ntheorem IsIntegralManifold.contMDiff (hf : IsIntegralManifold J n D f) :\n ContMDiff J I n f :=\n hf.isImmersion.contMDiff\n\n/-- For regularity `n \u2260 0`, the model dimension of an integral manifold `f` equals the rank of\nthe distribution at the image point `f y` of any source point `y`. -/\ntheorem IsIntegralManifold.finrank_model_eq\n (hf : IsIntegralManifold J n D f) (hn : n \u2260 0) (y : N)\n (hD : Module.finrank \u211d (D (f y)) = k) : Module.finrank \u211d E' = k := by\n -- Integrality identifies the fiber of `D` with the range of the injective differential.\n rw [\u2190 hD, \u2190 hf.range_mfderiv y,\n LinearMap.finrank_range_of_inj (hf.isImmersion.mfderiv_injective hn y)]\n exact finrank_tangentSpace (I := J) y\n\n/-- The identity map of a nonempty manifold is an integral manifold of the full tangent\ndistribution. -/\ntheorem isIntegralManifold_id [IsManifold I n M] [Nonempty M] :\n IsIntegralManifold I n (fun x : M \u21a6 (\u22a4 : Submodule \u211d (TangentSpace I x))) id := by\n refine \u27e8inferInstance, Manifold.IsImmersion.id, fun x \u21a6 ?_\u27e9\n rw [mfderiv_id]\n exact LinearMap.range_id\n\n/-- Precomposing an integral manifold of regularity `n \u2260 0` with a `C^n` local diffeomorphism of a\nnonempty `C^n` manifold with the same source model gives an integral manifold. -/\ntheorem IsIntegralManifold.comp_isLocalDiffeomorph\n {N' : Type*} [TopologicalSpace N'] [ChartedSpace H' N'] [IsManifold J n N'] [Nonempty N']\n {g : N' \u2192 N} (hf : IsIntegralManifold J n D f) (hn : n \u2260 0) (hg : IsLocalDiffeomorph J J n g) :\n IsIntegralManifold J n D (f \u2218 g) :=\n \u27e8inferInstance, isImmersion_comp_isLocalDiffeomorph hg hf.isImmersion,\n fun y \u21a6 ((hg y).range_mfderiv_comp hn).trans (hf.range_mfderiv (g y))\u27e9\n\n/-- Restricting an integral manifold of regularity `n \u2260 0` of a `C^n` manifold to a nonempty open\nsubset gives an integral manifold. -/\ntheorem IsIntegralManifold.comp_subtypeVal [IsManifold J n N]\n {U : TopologicalSpace.Opens N} [Nonempty U]\n (hf : IsIntegralManifold J n D f) (hn : n \u2260 0) :\n IsIntegralManifold J n D (f \u2218 (Subtype.val : U \u2192 N)) :=\n hf.comp_isLocalDiffeomorph hn isLocalDiffeomorph_subtype_val\n\nend Unbundled\n\nsection Bundled\n\n/-- A packaged `k`-dimensional integral manifold of `D`.\n\nIts carrier is nonempty and has an independent `C^n` manifold structure modelled on `\u211d^k`; the\nmap into the ambient manifold is only required to be an immersion. Injectivity,\nembeddedness, connectedness, and maximality are deliberately separate properties. -/\nstructure IntegralManifold (n : \u2115\u221e\u03c9)\n (D : \u2200 x : M, Submodule \u211d (TangentSpace I x)) (k : \u2115) where\n /-- The carrier of the integral manifold. -/\n carrier : Type v\n /-- The topology of the carrier, which need not be the subspace topology from `M`. -/\n [topologicalSpace : TopologicalSpace carrier]\n /-- The carrier is charted by the `k`-dimensional Euclidean model. -/\n [chartedSpace : ChartedSpace (EuclideanSpace \u211d (Fin k)) carrier]\n /-- The carrier is a manifold of regularity `n`. -/\n [isManifold : IsManifold (\ud835\udce1 k) n carrier]\n /-- The carrier is nonempty, so a packaged integral manifold is never vacuous. -/\n [nonempty : Nonempty carrier]\n /-- The parametrizing immersion into the ambient manifold. -/\n map : carrier \u2192 M\n /-- The parametrization is a `C^n` immersion. -/\n isImmersion : Manifold.IsImmersion (\ud835\udce1 k) I n map\n /-- The image of the differential is exactly the distribution fiber. -/\n range_mfderiv : \u2200 y,\n LinearMap.range (mfderiv (\ud835\udce1 k) I map y).toLinearMap = D (map y)\n\nattribute [instance] IntegralManifold.topologicalSpace IntegralManifold.chartedSpace\n IntegralManifold.isManifold IntegralManifold.nonempty\nattribute [simp] IntegralManifold.range_mfderiv\n\nnamespace IntegralManifold\n\nvariable {D : \u2200 x : M, Submodule \u211d (TangentSpace I x)}\n\n/-- The map of a packaged integral manifold satisfies the unbundled integral-manifold\npredicate. -/\ntheorem isIntegralManifold (N : IntegralManifold (I := I) n D k) :\n IsIntegralManifold (\ud835\udce1 k) n D N.map :=\n \u27e8N.nonempty, N.isImmersion, N.range_mfderiv\u27e9\n\n/-- The map of a packaged integral manifold is of class `C^n`. -/\ntheorem contMDiff_map (N : IntegralManifold (I := I) n D k) :\n ContMDiff (\ud835\udce1 k) I n N.map :=\n N.isImmersion.contMDiff\n\nend IntegralManifold\n\nend Bundled\n\nsection AffinePlaques\n\nopen Set Filter\n\nvariable {F : Type*} [NormedAddCommGroup F] [NormedSpace \u211d F]\n {H' : Type*} [TopologicalSpace H'] {J : ModelWithCorners \u211d F H'}\n {N : Type*} [TopologicalSpace N] [ChartedSpace H' N] [IsManifold J n N]\n {W : Submodule \u211d E} [FiniteDimensional \u211d W] {f : N \u2192 E} {x : N} {s : Set N}\n\n/-- An integral immersion, of regularity at least one, of a finite-dimensional constant\ndistribution locally stays in one affine plaque. -/\ntheorem IsIntegralManifold.eventually_sub_mem\n (hf : IsIntegralManifold (I := \ud835\udcd8(\u211d, E)) J n (fun _ : E \u21a6 W) f)\n (hn : 1 \u2264 n) : \u2200\u1da0 z in \ud835\udcdd x, f z - f x \u2208 W := by\n let _ : IsManifold J 1 N := .of_le hn\n obtain \u27e8p, hp\u27e9 := Submodule.ClosedComplemented.of_finiteDimensional W\n let q : E \u2192L[\u211d] E := ContinuousLinearMap.id \u211d E - W.subtypeL.comp p\n have hq (v : E) : q v = v - (p v : E) := by simp [q]\n have hqzero (v : E) (hv : v \u2208 W) : q v = 0 := by\n rw [hq]\n exact sub_eq_zero.mpr (congrArg Subtype.val (hp \u27e8v, hv\u27e9)).symm\n have hn0 : n \u2260 0 := by rintro rfl; simp at hn\n have hfD := hf.contMDiff.mdifferentiable hn0\n have hqD : MDifferentiable J \ud835\udcd8(\u211d, E) (fun z \u21a6 q (f z)) :=\n q.mdifferentiable.comp hfD\n have hzero (z : N) : mfderiv J \ud835\udcd8(\u211d, E) (fun z \u21a6 q (f z)) z = 0 := by\n have hd : HasMFDerivAt J \ud835\udcd8(\u211d, E) (fun z \u21a6 q (f z)) z\n (q.comp (mfderiv J \ud835\udcd8(\u211d, E) f z)) :=\n q.hasMFDerivAt.comp z (hfD z).hasMFDerivAt\n rw [hd.mfderiv]\n ext v\n apply hqzero\n rw [\u2190 hf.range_mfderiv z]\n exact \u27e8v, rfl\u27e9\n have hconst := hqD.mdifferentiableOn.eventuallyEq_const_of_mfderiv_eq_zero\n isOpen_univ (fun z _ \u21a6 hzero z) (mem_univ x)\n filter_upwards [hconst] with z hz\n have hsub : q (f z - f x) = 0 := by rw [map_sub, hz, sub_self]\n rw [hq] at hsub\n rw [sub_eq_zero.mp hsub]\n exact (p (f z - f x)).property\n\n/-- An integral immersion of a finite-dimensional constant distribution has a partial-diffeomorphism\nchart into its direction subspace at every interior source point. The chart sends the point to zero\nand identifies the immersion with translation of the subtype inclusion. Its source lies inside\nthe specified open neighborhood. -/\ntheorem IsIntegralManifold.exists_plaque_chart\n (hf : IsIntegralManifold (I := \ud835\udcd8(\u211d, E)) J n (fun _ : E \u21a6 W) f)\n (hn : 1 \u2264 n) (hx : J.IsInteriorPoint x) (hs : IsOpen s) (hxs : x \u2208 s) :\n \u2203 e : PartialDiffeomorph J \ud835\udcd8(\u211d, W) N W n,\n x \u2208 e.source \u2227 e x = 0 \u2227 e.source \u2286 s \u2227\n \u2200 y \u2208 e.source, f y = f x + (e y : E) := by\n have hn0 : n \u2260 0 := by rintro rfl; simp at hn\n exact ContMDiffOn.exists_plaque_chart hf.contMDiff.contMDiffOn hs hxs hn hx\n (hf.isImmersion.mfderiv_injective hn0 x) (hf.range_mfderiv x)\n (hf.eventually_sub_mem hn)\n\nvariable {F' : Type*} [NormedAddCommGroup F'] [NormedSpace \u211d F']\n {H'' : Type*} [TopologicalSpace H''] {K : ModelWithCorners \u211d F' H''}\n {P : Type*} [TopologicalSpace P] [ChartedSpace H'' P] [IsManifold K n P]\n {g : P \u2192 E} {y : P}\n\n/-- Two integral immersions of the same finite-dimensional constant distribution, through the same\nambient point, are related near interior source points by a partial diffeomorphism intertwining\ntheir ambient maps. -/\ntheorem IsIntegralManifold.exists_plaque_transition\n (hf : IsIntegralManifold (I := \ud835\udcd8(\u211d, E)) J n (fun _ : E \u21a6 W) f)\n (hg : IsIntegralManifold (I := \ud835\udcd8(\u211d, E)) K n (fun _ : E \u21a6 W) g)\n (hn : 1 \u2264 n) (hx : J.IsInteriorPoint x) (hy : K.IsInteriorPoint y)\n (hfg : f x = g y) :\n \u2203 e : PartialDiffeomorph J K N P n,\n x \u2208 e.source \u2227 e x = y \u2227 \u2200 z \u2208 e.source, f z = g (e z) := by\n obtain \u27e8c, hxc, hc0, _, hfc\u27e9 := hf.exists_plaque_chart hn hx isOpen_univ (mem_univ x)\n obtain \u27e8d, hyd, hd0, _, hgd\u27e9 := hg.exists_plaque_chart hn hy isOpen_univ (mem_univ y)\n obtain \u27e8e, hxe, hex, hec, hed, he\u27e9 :=\n c.exists_transition d hxc hyd (hc0.trans hd0.symm)\n refine \u27e8e, hxe, hex, ?_\u27e9\n intro z hz\n rw [hfc z (hec hz), hgd (e z) (hed hz), hfg, he z hz]\n\nend AffinePlaques\n\nend TauCeti\n", "public_theorems": ["TauCeti.isIntegralManifold_iff", "TauCeti.IsIntegralManifold.nonempty", "TauCeti.IsIntegralManifold.isImmersion", "TauCeti.IsIntegralManifold.range_mfderiv", "TauCeti.IsIntegralManifold.contMDiff", "TauCeti.IsIntegralManifold.finrank_model_eq", "TauCeti.isIntegralManifold_id", "TauCeti.IsIntegralManifold.comp_isLocalDiffeomorph", "TauCeti.IsIntegralManifold.comp_subtypeVal", "TauCeti.IntegralManifold.isIntegralManifold", "TauCeti.IntegralManifold.contMDiff_map", "TauCeti.IsIntegralManifold.eventually_sub_mem", "TauCeti.IsIntegralManifold.exists_plaque_chart", "TauCeti.IsIntegralManifold.exists_plaque_transition"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Geometry.Manifold.Distribution\npublic import TauCeti.Geometry.Manifold.IsManifold.Basic\npublic import Mathlib.Geometry.Manifold.Immersion\npublic import Mathlib.Geometry.Manifold.Instances.Real\npublic import Mathlib.Geometry.Manifold.LocalDiffeomorph\n\nimport TauCeti.Geometry.Manifold.Immersion.LocalDiffeomorph\nimport TauCeti.Geometry.Manifold.LocalDiffeomorph.Constructions\nimport TauCeti.Geometry.Manifold.LocalDiffeomorph.Submodule\nimport TauCeti.Geometry.Manifold.MFDeriv.Constancy\nimport Mathlib.Analysis.LocallyConvex.HahnBanach\n\n/-!\n# Integral manifolds of a distribution\n\nAn integral manifold of a tangent distribution `D` is a `C^n` immersion of a nonempty charted space\nwhose differential has image exactly `D` at every point. The source has its own topology and\ncharted-space structure: it is not given the subspace topology from the ambient manifold, and the\nimmersion need not be injective. This is the notion needed by the Frobenius theorem and by the\nconstruction of immersed Lie subgroups.\n\nThis file provides both the unbundled predicate `TauCeti.IsIntegralManifold` for a specified\nimmersion and `TauCeti.IntegralManifold`, which packages a `k`-dimensional source manifold and its\nparametrization. The rank theorem shows that, for regularity `n \u2260 0`, the dimension of any\nfinite-dimensional source equals the rank of the distribution at any image point; it is not extra\ndata hidden in the definition. For regularity at least one, integral immersions of a\nfinite-dimensional constant distribution have partial-diffeomorphism charts into its direction\nsubspace near interior source points. These charts give local changes of parameter between\ninterior source points with the same ambient image, intertwining the two integral immersions.\n\n## Main definitions\n\n* `TauCeti.IsIntegralManifold`: an immersion of a nonempty charted space whose tangent image equals\n the given distribution.\n* `TauCeti.IntegralManifold`: a packaged integral manifold with Euclidean model of dimension `k`.\n\n## Main results\n\n* `TauCeti.IsIntegralManifold.finrank_model_eq`: for regularity `n \u2260 0`, the source model\n dimension equals the rank of the distribution at any image point.\n* `TauCeti.isIntegralManifold_id`: the identity is an integral manifold of the full tangent\n distribution.\n* `TauCeti.IsIntegralManifold.comp_isLocalDiffeomorph` and\n `TauCeti.IsIntegralManifold.comp_subtypeVal`: precomposition with a local diffeomorphism and\n restriction to a nonempty open subset preserve `IsIntegralManifold` for `n \u2260 0`.\n* `TauCeti.IsIntegralManifold.eventually_sub_mem`: an integral immersion, of regularity at least\n one, of a finite-dimensional constant distribution locally stays in one affine plaque, including\n at boundary source points.\n* `TauCeti.IsIntegralManifold.exists_plaque_chart`: a local chart in an affine plaque with the\n prescribed ambient inclusion.\n* `TauCeti.IsIntegralManifold.exists_plaque_transition`: a local change of integral parameters\n intertwining their ambient maps.\n\n## References\n\n* J. M. Lee, *Introduction to Smooth Manifolds*, 2nd ed., Springer GTM 218 (2013), Chapter 19,\n Proposition 19.16 (Local Structure of Integral Manifolds), p. 500.\n-/\n\npublic section\n\nnoncomputable section\n\nopen Function\nopen scoped Manifold ContDiff Topology\n\nuniverse u v\n\nnamespace TauCeti\n\nvariable {E : Type*} [NormedAddCommGroup E] [NormedSpace \u211d E]\n {H : Type*} [TopologicalSpace H] {I : ModelWithCorners \u211d E H}\n {M : Type u} [TopologicalSpace M] [ChartedSpace H M]\n {n : \u2115\u221e\u03c9} {k : \u2115}\n\nsection Unbundled\n\n/-- A map is an **integral manifold** of `D` when its source is a nonempty charted space, it is a\n`C^n` immersion, and the image of its differential at every point is exactly the prescribed tangent\nsubspace.\n\nNonemptiness rules out the empty map, which would otherwise satisfy the remaining conditions\nvacuously for every distribution.\n\nThe source topology and charted-space structure are independent of the ambient topology. In\nparticular, this predicate neither requires the map to be injective nor equips its range with the\nsubspace topology. -/\ndef IsIntegralManifold {E' : Type*} [NormedAddCommGroup E'] [NormedSpace \u211d E']\n {H' : Type*} [TopologicalSpace H'] (J : ModelWithCorners \u211d E' H')\n (n : \u2115\u221e\u03c9) {N : Type v} [TopologicalSpace N] [ChartedSpace H' N]\n (D : \u2200 x : M, Submodule \u211d (TangentSpace I x)) (f : N \u2192 M) : Prop :=\n Nonempty N \u2227 Manifold.IsImmersion J I n f \u2227\n \u2200 y, LinearMap.range (mfderiv J I f y).toLinearMap = D (f y)\n\nvariable {E' : Type*} [NormedAddCommGroup E'] [NormedSpace \u211d E']\n {H' : Type*} [TopologicalSpace H'] {J : ModelWithCorners \u211d E' H'}\n {N : Type v} [TopologicalSpace N] [ChartedSpace H' N]\n {D : \u2200 x : M, Submodule \u211d (TangentSpace I x)} {f : N \u2192 M}", "/-- Characterization of an integral manifold as an immersion of a nonempty charted space with the\nprescribed differential range. -/\ntheorem isIntegralManifold_iff : IsIntegralManifold J n D f \u2194\n Nonempty N \u2227 Manifold.IsImmersion J I n f \u2227\n \u2200 y, LinearMap.range (mfderiv J I f y).toLinearMap = D (f y) :=", "/-- The source of an integral manifold is nonempty. -/\ntheorem IsIntegralManifold.nonempty (hf : IsIntegralManifold J n D f) : Nonempty N :=", "/-- The parametrization of an integral manifold is an immersion. -/\ntheorem IsIntegralManifold.isImmersion (hf : IsIntegralManifold J n D f) :\n Manifold.IsImmersion J I n f :=", "/-- The tangent image of an integral manifold is the prescribed distribution fiber. -/\ntheorem IsIntegralManifold.range_mfderiv (hf : IsIntegralManifold J n D f) (y : N) :\n LinearMap.range (mfderiv J I f y).toLinearMap = D (f y) :=", "/-- The parametrization of an integral manifold is of class `C^n`. -/\ntheorem IsIntegralManifold.contMDiff (hf : IsIntegralManifold J n D f) :\n ContMDiff J I n f :=", "/-- For regularity `n \u2260 0`, the model dimension of an integral manifold `f` equals the rank of\nthe distribution at the image point `f y` of any source point `y`. -/\ntheorem IsIntegralManifold.finrank_model_eq\n (hf : IsIntegralManifold J n D f) (hn : n \u2260 0) (y : N)\n (hD : Module.finrank \u211d (D (f y)) = k) : Module.finrank \u211d E' = k :=", "/-- The identity map of a nonempty manifold is an integral manifold of the full tangent\ndistribution. -/\ntheorem isIntegralManifold_id [IsManifold I n M] [Nonempty M] :\n IsIntegralManifold I n (fun x : M \u21a6 (\u22a4 : Submodule \u211d (TangentSpace I x))) id :=", "/-- Precomposing an integral manifold of regularity `n \u2260 0` with a `C^n` local diffeomorphism of a\nnonempty `C^n` manifold with the same source model gives an integral manifold. -/\ntheorem IsIntegralManifold.comp_isLocalDiffeomorph\n {N' : Type*} [TopologicalSpace N'] [ChartedSpace H' N'] [IsManifold J n N'] [Nonempty N']\n {g : N' \u2192 N} (hf : IsIntegralManifold J n D f) (hn : n \u2260 0) (hg : IsLocalDiffeomorph J J n g) :\n IsIntegralManifold J n D (f \u2218 g) :=", "/-- Restricting an integral manifold of regularity `n \u2260 0` of a `C^n` manifold to a nonempty open\nsubset gives an integral manifold. -/\ntheorem IsIntegralManifold.comp_subtypeVal [IsManifold J n N]\n {U : TopologicalSpace.Opens N} [Nonempty U]\n (hf : IsIntegralManifold J n D f) (hn : n \u2260 0) :\n IsIntegralManifold J n D (f \u2218 (Subtype.val : U \u2192 N)) :=", "end Unbundled\n\nsection Bundled\n\n/-- A packaged `k`-dimensional integral manifold of `D`.\n\nIts carrier is nonempty and has an independent `C^n` manifold structure modelled on `\u211d^k`; the\nmap into the ambient manifold is only required to be an immersion. Injectivity,\nembeddedness, connectedness, and maximality are deliberately separate properties. -/\nstructure IntegralManifold (n : \u2115\u221e\u03c9)\n (D : \u2200 x : M, Submodule \u211d (TangentSpace I x)) (k : \u2115) where\n /-- The carrier of the integral manifold. -/\n carrier : Type v\n /-- The topology of the carrier, which need not be the subspace topology from `M`. -/\n [topologicalSpace : TopologicalSpace carrier]\n /-- The carrier is charted by the `k`-dimensional Euclidean model. -/\n [chartedSpace : ChartedSpace (EuclideanSpace \u211d (Fin k)) carrier]\n /-- The carrier is a manifold of regularity `n`. -/\n [isManifold : IsManifold (\ud835\udce1 k) n carrier]\n /-- The carrier is nonempty, so a packaged integral manifold is never vacuous. -/\n [nonempty : Nonempty carrier]\n /-- The parametrizing immersion into the ambient manifold. -/\n map : carrier \u2192 M\n /-- The parametrization is a `C^n` immersion. -/\n isImmersion : Manifold.IsImmersion (\ud835\udce1 k) I n map\n /-- The image of the differential is exactly the distribution fiber. -/\n range_mfderiv : \u2200 y,\n LinearMap.range (mfderiv (\ud835\udce1 k) I map y).toLinearMap = D (map y)\n\nattribute [instance] IntegralManifold.topologicalSpace IntegralManifold.chartedSpace\n IntegralManifold.isManifold IntegralManifold.nonempty\nattribute [simp] IntegralManifold.range_mfderiv\n\nnamespace IntegralManifold\n\nvariable {D : \u2200 x : M, Submodule \u211d (TangentSpace I x)}", "/-- The map of a packaged integral manifold satisfies the unbundled integral-manifold\npredicate. -/\ntheorem isIntegralManifold (N : IntegralManifold (I := I) n D k) :\n IsIntegralManifold (\ud835\udce1 k) n D N.map :=", "/-- The map of a packaged integral manifold is of class `C^n`. -/\ntheorem contMDiff_map (N : IntegralManifold (I := I) n D k) :\n ContMDiff (\ud835\udce1 k) I n N.map :=", "end IntegralManifold\n\nend Bundled\n\nsection AffinePlaques\n\nopen Set Filter\n\nvariable {F : Type*} [NormedAddCommGroup F] [NormedSpace \u211d F]\n {H' : Type*} [TopologicalSpace H'] {J : ModelWithCorners \u211d F H'}\n {N : Type*} [TopologicalSpace N] [ChartedSpace H' N] [IsManifold J n N]\n {W : Submodule \u211d E} [FiniteDimensional \u211d W] {f : N \u2192 E} {x : N} {s : Set N}", "/-- An integral immersion, of regularity at least one, of a finite-dimensional constant\ndistribution locally stays in one affine plaque. -/\ntheorem IsIntegralManifold.eventually_sub_mem\n (hf : IsIntegralManifold (I := \ud835\udcd8(\u211d, E)) J n (fun _ : E \u21a6 W) f)\n (hn : 1 \u2264 n) : \u2200\u1da0 z in \ud835\udcdd x, f z - f x \u2208 W :=", "/-- An integral immersion of a finite-dimensional constant distribution has a partial-diffeomorphism\nchart into its direction subspace at every interior source point. The chart sends the point to zero\nand identifies the immersion with translation of the subtype inclusion. Its source lies inside\nthe specified open neighborhood. -/\ntheorem IsIntegralManifold.exists_plaque_chart\n (hf : IsIntegralManifold (I := \ud835\udcd8(\u211d, E)) J n (fun _ : E \u21a6 W) f)\n (hn : 1 \u2264 n) (hx : J.IsInteriorPoint x) (hs : IsOpen s) (hxs : x \u2208 s) :\n \u2203 e : PartialDiffeomorph J \ud835\udcd8(\u211d, W) N W n,\n x \u2208 e.source \u2227 e x = 0 \u2227 e.source \u2286 s \u2227\n \u2200 y \u2208 e.source, f y = f x + (e y : E) :=", "variable {F' : Type*} [NormedAddCommGroup F'] [NormedSpace \u211d F']\n {H'' : Type*} [TopologicalSpace H''] {K : ModelWithCorners \u211d F' H''}\n {P : Type*} [TopologicalSpace P] [ChartedSpace H'' P] [IsManifold K n P]\n {g : P \u2192 E} {y : P}", "/-- Two integral immersions of the same finite-dimensional constant distribution, through the same\nambient point, are related near interior source points by a partial diffeomorphism intertwining\ntheir ambient maps. -/\ntheorem IsIntegralManifold.exists_plaque_transition\n (hf : IsIntegralManifold (I := \ud835\udcd8(\u211d, E)) J n (fun _ : E \u21a6 W) f)\n (hg : IsIntegralManifold (I := \ud835\udcd8(\u211d, E)) K n (fun _ : E \u21a6 W) g)\n (hn : 1 \u2264 n) (hx : J.IsInteriorPoint x) (hy : K.IsInteriorPoint y)\n (hfg : f x = g y) :\n \u2203 e : PartialDiffeomorph J K N P n,\n x \u2208 e.source \u2227 e x = y \u2227 \u2200 z \u2208 e.source, f z = g (e z) :=", "end AffinePlaques\n\nend TauCeti"], "free_length": 2223, "file_length": 7518, "heartbeats": 13124, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Geometry.Manifold.Orientation.Cover.Descent", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Geometry/Manifold/Orientation/Cover/Descent.lean", "module": "TauCeti.Geometry.Manifold.Orientation.Cover.Descent", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Geometry.Manifold.DifferentialForm.Involution\npublic import TauCeti.Geometry.Manifold.DifferentialForm.Pullback.LocalDiffeomorph\npublic import TauCeti.Geometry.Manifold.Orientation.Cover.Smooth\n\n/-!\n# Descent of forms along the orientation double cover\n\nThe projection of the orientation double cover of a manifold `M` is a local diffeomorphism whose\nfibre through a point `p` is `{p, deck p}`, where `deck` is the orientation-reversing deck\ninvolution. Hence a form on the cover is the pullback of a form on `M` exactly when it is\ninvariant under `deck`, and for smooth forms the form on `M` can be taken smooth. In particular the\ndeck-invariant part `(\u03c6 + deck\u204e\u03c6) / 2` of any form `\u03c6` on the cover descends to `M`.\n\nSince the cover is always orientable, this is how statements about forms on nonorientable\nmanifolds are reduced to the orientable case: average a form on the cover over the deck\ninvolution, then descend it. This is the descent step in the standard proof that the top\ncompactly supported de Rham cohomology of a connected nonorientable manifold vanishes.\n\n## Main results\n\n* `TauCeti.Manifold.OrientationCover.exists_mpullback_proj_eq_iff`: a form on the orientation\n cover is a pullback from `M` if and only if it is invariant under the deck involution.\n* `TauCeti.Manifold.OrientationCover.exists_smoothForm_mpullback_proj_eq_iff`: the same for\n smooth forms, with a smooth form on `M`.\n* `TauCeti.Manifold.OrientationCover.exists_mpullback_proj_eq_invariantPart`: the deck-invariant\n part of every form on the cover descends to `M`.\n* `TauCeti.Manifold.OrientationCover.exists_mextDeriv\u2097_eq_of_mextDeriv\u2097_eq_mpullback_proj`: a form\n whose pullback to the orientation cover is exact is exact, with a primitive pulling back to the\n deck-invariant part of the given one.\n\n## References\n\n* John M. Lee, *Introduction to Smooth Manifolds*, second edition, Graduate Texts in\n Mathematics 218, Springer, 2013, Chapter 15, \"The Orientation Covering\", and the proof of\n Theorem 17.34.\n-/\n\npublic section\n\nnoncomputable section\n\nopen scoped ContDiff Manifold\n\nnamespace TauCeti.Manifold.OrientationCover\n\nvariable {E H M F : Type*} [NormedAddCommGroup E] [NormedSpace \u211d E] [TopologicalSpace H]\n {I : ModelWithCorners \u211d E H} [TopologicalSpace M] [ChartedSpace H M]\n {k : \u2115}\n\n/-- The two points of the orientation cover over a point of `M` are related by the deck\ninvolution. -/\nprivate theorem eq_or_exists_deck_eq [IsManifold I 1 M] {p q : OrientationCover I M}\n (h : p.proj = q.proj) :\n p = q \u2228 \u2203 _ : Unit, VectorBundleOrientationCover.deck p = q :=\n (VectorBundleOrientationCover.eq_or_eq_deck (Fintype.card_fin _) h.symm).imp Eq.symm\n fun h' \u21a6 \u27e8(), h'.symm\u27e9\n\nsection Rough\n\nvariable [AddCommGroup F] [Module \u211d F] [TopologicalSpace F] [IsManifold I 1 M]\n\n/-- **Descent along the orientation cover.** A form on the orientation double cover of `M` is\nthe pullback of a form on `M` if and only if it is invariant under the deck involution. -/\ntheorem exists_mpullback_proj_eq_iff {\u03c6 : RoughForm I (OrientationCover I M) F k} :\n (\u2203 \u03c8 : RoughForm I M F k, mpullback I I VectorBundleOrientationCover.proj \u03c8 = \u03c6) \u2194\n mpullback I I VectorBundleOrientationCover.deck \u03c6 = \u03c6 := by\n simpa only [forall_const] using\n (isLocalDiffeomorph_proj (I := I) (M := M) (n := 1)).exists_mpullback_eq_iff one_ne_zero\n (\u03c3 := fun _ : Unit \u21a6 VectorBundleOrientationCover.deck)\n (fun _ \u21a6 contMDiff_deck.mdifferentiable one_ne_zero)\n (fun _ \u21a6 funext VectorBundleOrientationCover.proj_deck) fun _ _ \u21a6 eq_or_exists_deck_eq\n\n/-- The deck-invariant part `(\u03c6 + deck\u204e\u03c6) / 2` of a form `\u03c6` on the orientation double cover of\n`M` is the pullback of a form on `M`. -/\ntheorem exists_mpullback_proj_eq_invariantPart [IsTopologicalAddGroup F]\n [ContinuousConstSMul \u211d F] (\u03c6 : RoughForm I (OrientationCover I M) F k) :\n \u2203 \u03c8 : RoughForm I M F k, mpullback I I VectorBundleOrientationCover.proj \u03c8 =\n invariantPart VectorBundleOrientationCover.deck \u03c6 :=\n exists_mpullback_proj_eq_iff.mpr <| mpullback_invariantPart\n VectorBundleOrientationCover.deck_deck (contMDiff_deck.mdifferentiable one_ne_zero) \u03c6\n\nend Rough\n\nvariable [FiniteDimensional \u211d E]\n\n/-- **Descent of smooth forms along the orientation cover.** A smooth form on the orientation\ndouble cover of `M` is the pullback of a smooth form on `M` if and only if it is invariant under\nthe deck involution. -/\ntheorem exists_smoothForm_mpullback_proj_eq_iff [NormedAddCommGroup F] [NormedSpace \u211d F]\n [IsManifold I \u221e M] {\u03c6 : SmoothForm I (OrientationCover I M) F k} :\n (\u2203 \u03c8 : SmoothForm I M F k,\n SmoothForm.mpullback VectorBundleOrientationCover.proj contMDiff_proj \u03c8 = \u03c6) \u2194\n SmoothForm.mpullback VectorBundleOrientationCover.deck contMDiff_deck \u03c6 = \u03c6 := by\n simpa only [forall_const] using\n (isLocalDiffeomorph_proj (I := I) (M := M) (n := \u221e)).exists_smoothForm_mpullback_eq_iff\n (VectorBundleOrientationCover.surjective_proj (Fintype.card_fin _))\n (\u03c3 := fun _ : Unit \u21a6 VectorBundleOrientationCover.deck) (fun _ \u21a6 contMDiff_deck)\n (fun _ \u21a6 funext VectorBundleOrientationCover.proj_deck) fun _ _ \u21a6 eq_or_exists_deck_eq\n\nsection Primitive\n\nvariable [NormedAddCommGroup F] [NormedSpace \u211d F] [IsManifold I \u221e M]\n\n/-- Pullback along the orientation-cover projection is injective on smooth forms. -/\ntheorem smoothForm_mpullback_proj_injective :\n Function.Injective (SmoothForm.mpullback (F := F) (k := k)\n (VectorBundleOrientationCover.proj : OrientationCover I M \u2192 M) contMDiff_proj) :=\n SmoothForm.mpullback_injective_of_surjective contMDiff_proj\n (VectorBundleOrientationCover.surjective_proj (Fintype.card_fin _)) fun p \u21a6\n ((isLocalDiffeomorph_proj (n := 1)).isInvertible_mfderiv one_ne_zero p).surjective\n\n/-- **Descent of primitives along the orientation cover.** If the pullback of a smooth\n`(k + 1)`-form `\u03c6` on `M` to the orientation double cover is the exterior derivative of a smooth\nform `\u03b7`, then `\u03c6` is the exterior derivative of a smooth form `\u03c8` on `M`, whose pullback to the\ncover is the deck-invariant part `(\u03b7 + \u03c4^*\u03b7) / 2` of `\u03b7`. -/\ntheorem exists_mextDeriv\u2097_eq_of_mextDeriv\u2097_eq_mpullback_proj {\u03c6 : SmoothForm I M F (k + 1)}\n {\u03b7 : SmoothForm I (OrientationCover I M) F k}\n (h\u03b7 : mextDeriv\u2097 I k \u03b7 =\n SmoothForm.mpullback VectorBundleOrientationCover.proj contMDiff_proj \u03c6) :\n \u2203 \u03c8 : SmoothForm I M F k, mextDeriv\u2097 I k \u03c8 = \u03c6 \u2227\n mpullback I I VectorBundleOrientationCover.proj \u03c8.val =\n invariantPart (F := F) (k := k) VectorBundleOrientationCover.deck \u03b7.val := by\n let \u03c4 : OrientationCover I M \u2192 OrientationCover I M := VectorBundleOrientationCover.deck\n -- The deck-invariant part of `\u03b7`, as a smooth form.\n let \u03b7' : SmoothForm I (OrientationCover I M) F k :=\n (2 : \u211d)\u207b\u00b9 \u2022 (\u03b7 + SmoothForm.mpullback \u03c4 contMDiff_deck \u03b7)\n have h\u03b7' : \u03b7'.val = invariantPart (I := I) (F := F) (k := k) \u03c4 \u03b7.val := by\n rw [invariantPart_def, \u2190 SmoothForm.coe_mpullback \u03c4 contMDiff_deck, SetLike.val_smul,\n Submodule.coe_add]\n have h\u03c4\u03b7' : SmoothForm.mpullback \u03c4 contMDiff_deck \u03b7' = \u03b7' := Subtype.ext <| by\n rw [SmoothForm.coe_mpullback, h\u03b7']\n exact mpullback_invariantPart (I := I) (F := F) (k := k) VectorBundleOrientationCover.deck_deck\n (contMDiff_deck.mdifferentiable one_ne_zero) \u03b7.val\n obtain \u27e8\u03c8, h\u03c8\u27e9 := exists_smoothForm_mpullback_proj_eq_iff.mpr h\u03c4\u03b7'\n refine \u27e8\u03c8, smoothForm_mpullback_proj_injective ?_, by\n rw [\u2190 SmoothForm.coe_mpullback _ contMDiff_proj, h\u03c8, h\u03b7']\u27e9\n -- Pullbacks along the projection are deck-invariant, so the averaged primitive still works.\n have h\u03c4\u03c6 := exists_smoothForm_mpullback_proj_eq_iff.mp \u27e8\u03c6, rfl\u27e9\n rw [\u2190 SmoothForm.mextDeriv\u2097_mpullback, h\u03c8, map_smul, map_add, SmoothForm.mextDeriv\u2097_mpullback,\n h\u03b7, h\u03c4\u03c6]\n module\n\nend Primitive\n\nend TauCeti.Manifold.OrientationCover\n", "public_theorems": ["TauCeti.Manifold.OrientationCover.exists_mpullback_proj_eq_iff", "TauCeti.Manifold.OrientationCover.exists_mpullback_proj_eq_invariantPart", "TauCeti.Manifold.OrientationCover.exists_smoothForm_mpullback_proj_eq_iff", "TauCeti.Manifold.OrientationCover.smoothForm_mpullback_proj_injective", "TauCeti.Manifold.OrientationCover.exists_mextDeriv\u2097_eq_of_mextDeriv\u2097_eq_mpullback_proj"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Geometry.Manifold.DifferentialForm.Involution\npublic import TauCeti.Geometry.Manifold.DifferentialForm.Pullback.LocalDiffeomorph\npublic import TauCeti.Geometry.Manifold.Orientation.Cover.Smooth\n\n/-!\n# Descent of forms along the orientation double cover\n\nThe projection of the orientation double cover of a manifold `M` is a local diffeomorphism whose\nfibre through a point `p` is `{p, deck p}`, where `deck` is the orientation-reversing deck\ninvolution. Hence a form on the cover is the pullback of a form on `M` exactly when it is\ninvariant under `deck`, and for smooth forms the form on `M` can be taken smooth. In particular the\ndeck-invariant part `(\u03c6 + deck\u204e\u03c6) / 2` of any form `\u03c6` on the cover descends to `M`.\n\nSince the cover is always orientable, this is how statements about forms on nonorientable\nmanifolds are reduced to the orientable case: average a form on the cover over the deck\ninvolution, then descend it. This is the descent step in the standard proof that the top\ncompactly supported de Rham cohomology of a connected nonorientable manifold vanishes.\n\n## Main results\n\n* `TauCeti.Manifold.OrientationCover.exists_mpullback_proj_eq_iff`: a form on the orientation\n cover is a pullback from `M` if and only if it is invariant under the deck involution.\n* `TauCeti.Manifold.OrientationCover.exists_smoothForm_mpullback_proj_eq_iff`: the same for\n smooth forms, with a smooth form on `M`.\n* `TauCeti.Manifold.OrientationCover.exists_mpullback_proj_eq_invariantPart`: the deck-invariant\n part of every form on the cover descends to `M`.\n* `TauCeti.Manifold.OrientationCover.exists_mextDeriv\u2097_eq_of_mextDeriv\u2097_eq_mpullback_proj`: a form\n whose pullback to the orientation cover is exact is exact, with a primitive pulling back to the\n deck-invariant part of the given one.\n\n## References\n\n* John M. Lee, *Introduction to Smooth Manifolds*, second edition, Graduate Texts in\n Mathematics 218, Springer, 2013, Chapter 15, \"The Orientation Covering\", and the proof of\n Theorem 17.34.\n-/\n\npublic section\n\nnoncomputable section\n\nopen scoped ContDiff Manifold\n\nnamespace TauCeti.Manifold.OrientationCover\n\nvariable {E H M F : Type*} [NormedAddCommGroup E] [NormedSpace \u211d E] [TopologicalSpace H]\n {I : ModelWithCorners \u211d E H} [TopologicalSpace M] [ChartedSpace H M]\n {k : \u2115}", "section Rough\n\nvariable [AddCommGroup F] [Module \u211d F] [TopologicalSpace F] [IsManifold I 1 M]", "/-- **Descent along the orientation cover.** A form on the orientation double cover of `M` is\nthe pullback of a form on `M` if and only if it is invariant under the deck involution. -/\ntheorem exists_mpullback_proj_eq_iff {\u03c6 : RoughForm I (OrientationCover I M) F k} :\n (\u2203 \u03c8 : RoughForm I M F k, mpullback I I VectorBundleOrientationCover.proj \u03c8 = \u03c6) \u2194\n mpullback I I VectorBundleOrientationCover.deck \u03c6 = \u03c6 :=", "/-- The deck-invariant part `(\u03c6 + deck\u204e\u03c6) / 2` of a form `\u03c6` on the orientation double cover of\n`M` is the pullback of a form on `M`. -/\ntheorem exists_mpullback_proj_eq_invariantPart [IsTopologicalAddGroup F]\n [ContinuousConstSMul \u211d F] (\u03c6 : RoughForm I (OrientationCover I M) F k) :\n \u2203 \u03c8 : RoughForm I M F k, mpullback I I VectorBundleOrientationCover.proj \u03c8 =\n invariantPart VectorBundleOrientationCover.deck \u03c6 :=", "end Rough\n\nvariable [FiniteDimensional \u211d E]", "/-- **Descent of smooth forms along the orientation cover.** A smooth form on the orientation\ndouble cover of `M` is the pullback of a smooth form on `M` if and only if it is invariant under\nthe deck involution. -/\ntheorem exists_smoothForm_mpullback_proj_eq_iff [NormedAddCommGroup F] [NormedSpace \u211d F]\n [IsManifold I \u221e M] {\u03c6 : SmoothForm I (OrientationCover I M) F k} :\n (\u2203 \u03c8 : SmoothForm I M F k,\n SmoothForm.mpullback VectorBundleOrientationCover.proj contMDiff_proj \u03c8 = \u03c6) \u2194\n SmoothForm.mpullback VectorBundleOrientationCover.deck contMDiff_deck \u03c6 = \u03c6 :=", "section Primitive\n\nvariable [NormedAddCommGroup F] [NormedSpace \u211d F] [IsManifold I \u221e M]", "/-- Pullback along the orientation-cover projection is injective on smooth forms. -/\ntheorem smoothForm_mpullback_proj_injective :\n Function.Injective (SmoothForm.mpullback (F := F) (k := k)\n (VectorBundleOrientationCover.proj : OrientationCover I M \u2192 M) contMDiff_proj) :=", "/-- **Descent of primitives along the orientation cover.** If the pullback of a smooth\n`(k + 1)`-form `\u03c6` on `M` to the orientation double cover is the exterior derivative of a smooth\nform `\u03b7`, then `\u03c6` is the exterior derivative of a smooth form `\u03c8` on `M`, whose pullback to the\ncover is the deck-invariant part `(\u03b7 + \u03c4^*\u03b7) / 2` of `\u03b7`. -/\ntheorem exists_mextDeriv\u2097_eq_of_mextDeriv\u2097_eq_mpullback_proj {\u03c6 : SmoothForm I M F (k + 1)}\n {\u03b7 : SmoothForm I (OrientationCover I M) F k}\n (h\u03b7 : mextDeriv\u2097 I k \u03b7 =\n SmoothForm.mpullback VectorBundleOrientationCover.proj contMDiff_proj \u03c6) :\n \u2203 \u03c8 : SmoothForm I M F k, mextDeriv\u2097 I k \u03c8 = \u03c6 \u2227\n mpullback I I VectorBundleOrientationCover.proj \u03c8.val =\n invariantPart (F := F) (k := k) VectorBundleOrientationCover.deck \u03b7.val :=", "end Primitive\n\nend TauCeti.Manifold.OrientationCover"], "free_length": 2316, "file_length": 4542, "heartbeats": 37442, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.GroupTheory.Index.PrimaryComponent", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/GroupTheory/Index/PrimaryComponent.lean", "module": "TauCeti.GroupTheory.Index.PrimaryComponent", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.GroupTheory.Torsion\npublic import Mathlib.GroupTheory.Index\n\nimport Mathlib.Data.Fintype.Pigeonhole\nimport TauCeti.GroupTheory.Index.Quotient\n\n/-!\n# Cokernels and primary components over a uniquely `n`-divisible subgroup of finite index\n\nLet `G` be a commutative group and `n` a natural number, and write `G[n^\u221e]` for Mathlib's\n`AddCommGroup.primaryComponent G n`, the subgroup of elements killed by some power of `n` (`n`\nneed not be prime). Suppose that `G` has a subgroup `U` of finite index on which multiplication by\n`n` is bijective, as for the points of an elliptic curve over a local field, where `U` is the\nkernel of reduction and `n` is prime to the residue characteristic. Then:\n\n* `G[n^\u221e]` is finite, since it meets `U` trivially and so embeds in `G \u29f8 U`;\n* `G = n G + G[n^\u221e]`: every element is divisible by `n` up to an element of `G[n^\u221e]`.\n\nConsequently, if `f : A \u2192 B` and `g : B \u2192 A` are homomorphisms of commutative groups with\n`g \u2218 f = n` and `f \u2218 g = n`, and `B` has such a subgroup, then the cokernel of `f` is accounted for\nby the `n`-primary components alone:\n\n`[B : f(A)] \u00b7 #A[n^\u221e] = #B[n^\u221e] \u00b7 #ker(f)`.\n\nFor an isogeny `\u03c6` of elliptic curves with dual `\u03c6\u0302` and `n = deg \u03c6`, this computes the ratio\n`#coker(\u03c6) / #ker(\u03c6)` on local points at a place not dividing `deg \u03c6`.\n\n## Main results\n\n* `AddSubgroup.finite_primaryComponent_of_injective`: `G[n^\u221e]` is finite when `n` acts injectively\n on a subgroup of finite index.\n* `AddSubgroup.range_nsmul_sup_primaryComponent_eq_top_of_surjective`: `n G + G[n^\u221e] = G` when `n`\n acts surjectively on a subgroup of finite index.\n* `AddMonoidHom.index_range_mul_card_primaryComponent`: the cokernel formula above.\n\n## References\n\n* J. W. S. Cassels, *Arithmetic on curves of genus 1. VIII. On conjectures of Birch and\n Swinnerton-Dyer*, J. Reine Angew. Math. 217 (1965), 180\u2013199.\n* [J. Silverman, *The Arithmetic of Elliptic Curves*][silverman2009], VII.6 and X.4.\n-/\n\npublic section\n\nnamespace AddSubgroup\n\nvariable {G : Type*} [AddCommGroup G]\n\n/-- **The `n`-primary component is finite** when `n` acts injectively on a subgroup `U` of finite\nindex: it meets `U` trivially, so it embeds in the finite quotient `G \u29f8 U`. -/\ntheorem finite_primaryComponent_of_injective (U : AddSubgroup G) [U.FiniteIndex] {n : \u2115}\n (hU : Function.Injective (fun x : U \u21a6 n \u2022 x)) :\n Finite (AddCommGroup.primaryComponent G n) := by\n refine Finite.of_injective (fun x \u21a6 ((x : G) : G \u29f8 U)) fun x y h \u21a6 ?_\n obtain \u27e8k, hk\u27e9 := AddCommGroup.mem_primaryComponent.mp (sub_mem x.property y.property)\n have : (\u27e8(x : G) - y, QuotientAddGroup.eq_iff_sub_mem.mp h\u27e9 : U) = 0 :=\n (smul_iterate (\u03b1 := U) n k \u25b8 hU.iterate k) (Subtype.ext (by simpa using hk))\n exact Subtype.ext (sub_eq_zero.mp (congrArg Subtype.val this))\n\n/-- **Divisibility up to the `n`-primary component**: if `n` acts surjectively on a subgroup `U` of\nfinite index, then `n G + G[n^\u221e] = G`. -/\ntheorem range_nsmul_sup_primaryComponent_eq_top_of_surjective (U : AddSubgroup G) [U.FiniteIndex]\n {n : \u2115} (hU : Function.Surjective (fun x : U \u21a6 n \u2022 x)) :\n (nsmulAddMonoidHom (\u03b1 := G) n).range \u2294\n AddCommGroup.primaryComponent G n = \u22a4 := by\n refine eq_top_iff.mpr fun x _ \u21a6 ?_\n -- in the finite quotient `G \u29f8 U`, two of the classes of `n\u1d4f x` coincide\n obtain \u27e8i, j, hij, h\u27e9 := Finite.exists_ne_map_eq_of_infinite\n (fun k : \u2115 \u21a6 ((n ^ k \u2022 x : G) : G \u29f8 U))\n wlog hlt : i < j generalizing i j\n \u00b7 exact this j i hij.symm h.symm (lt_of_le_of_ne (not_lt.mp hlt) hij.symm)\n -- so `n\u2071 (x - n c) \u2208 U` for `c = n^(j - i - 1) x`\n set c := n ^ (j - i - 1) \u2022 x\n have hmem : n ^ i \u2022 (x - n \u2022 c) \u2208 U := by\n have hj : n ^ j \u2022 x = n ^ i \u2022 (n \u2022 c) := by\n rw [\u2190 mul_nsmul, \u2190 mul_nsmul, \u2190 pow_succ', \u2190 pow_add]\n congr 2\n omega\n rw [nsmul_sub, \u2190 hj, \u2190 neg_sub, neg_mem_iff, \u2190 QuotientAddGroup.eq_iff_sub_mem]\n exact h.symm\n -- write that element of `U` as `n\u2071 d` with `d \u2208 U`, and `d` as `n e` with `e \u2208 U`\n obtain \u27e8d, hd\u27e9 := (smul_iterate (\u03b1 := U) n i \u25b8 hU.iterate i) \u27e8_, hmem\u27e9\n obtain \u27e8e, rfl\u27e9 := hU d\n have hd' : n ^ i \u2022 (x - n \u2022 c - n \u2022 (e : G)) = 0 := by\n have h' := congrArg Subtype.val hd\n simp only [AddSubgroup.coe_nsmul] at h'\n rw [nsmul_sub, \u2190 h', sub_self]\n have hx : x = n \u2022 (c + e) + (x - n \u2022 c - n \u2022 (e : G)) := by\n rw [nsmul_add, sub_sub, add_sub_cancel]\n rw [hx]\n exact add_mem (mem_sup_left \u27e8c + e, rfl\u27e9)\n (mem_sup_right (AddCommGroup.mem_primaryComponent.mpr \u27e8i, hd'\u27e9))\n\nend AddSubgroup\n\nnamespace AddMonoidHom\n\nvariable {A B : Type*} [AddCommGroup A] [AddCommGroup B]\n\n/-- **The cokernel of a homomorphism invertible up to `n`**: let `f : A \u2192+ B` and `g : B \u2192+ A`\nsatisfy `g \u2218 f = n` and `f \u2218 g = n`, and suppose that `n` acts surjectively on a subgroup of\nfinite index of `B`. Then\n\n`[B : f(A)] \u00b7 #A[n^\u221e] = #B[n^\u221e] \u00b7 #ker(f)`,\n\nwhere `A[n^\u221e]` and `B[n^\u221e]` are the `n`-primary components. No finiteness is assumed of the\nother quantities: infinite orders and indices are read as `0`. -/\ntheorem index_range_mul_card_primaryComponent (f : A \u2192+ B) (g : B \u2192+ A) {n : \u2115}\n (hgf : \u2200 a, g (f a) = n \u2022 a) (hfg : \u2200 b, f (g b) = n \u2022 b) (U : AddSubgroup B) [U.FiniteIndex]\n (hU : Function.Surjective (fun x : U \u21a6 n \u2022 x)) :\n f.range.index * Nat.card (AddCommGroup.primaryComponent A n) =\n Nat.card (AddCommGroup.primaryComponent B n) * Nat.card f.ker := by\n set T := AddCommGroup.primaryComponent B n\n -- the inverse image of `B[n^\u221e]` is `A[n^\u221e]`\n have hcomap : T.comap f = AddCommGroup.primaryComponent A n := by\n ext a\n rw [AddSubgroup.mem_comap, AddCommGroup.mem_primaryComponent,\n AddCommGroup.mem_primaryComponent]\n refine \u27e8fun \u27e8k, hk\u27e9 \u21a6 \u27e8k + 1, ?_\u27e9, fun \u27e8k, hk\u27e9 \u21a6 \u27e8k, by rw [\u2190 map_nsmul, hk, map_zero]\u27e9\u27e9\n rw [pow_succ, mul_nsmul, \u2190 hgf, map_nsmul, hk, map_zero]\n -- the image of `f` together with `B[n^\u221e]` is everything, as `f(A)` contains `n B`\n have hsup : f.range \u2294 T = \u22a4 := by\n refine eq_top_iff.mpr ((U.range_nsmul_sup_primaryComponent_eq_top_of_surjective hU).ge.trans\n (sup_le_sup_right ?_ _))\n rintro _ \u27e8b, rfl\u27e9\n exact \u27e8g b, hfg b\u27e9\n have hmap : (f.range.map (QuotientAddGroup.mk' T)).index = 1 := by\n rw [AddSubgroup.index_map, QuotientAddGroup.ker_mk', hsup]\n simp [range_eq_top_of_surjective _ (QuotientAddGroup.mk'_surjective T)]\n have h := TauCeti.index_range_mul_card_comap (f := f) (S := T)\n rw [hcomap, hmap, one_mul] at h\n exact h\n\nend AddMonoidHom\n", "public_theorems": ["AddSubgroup.finite_primaryComponent_of_injective", "AddSubgroup.range_nsmul_sup_primaryComponent_eq_top_of_surjective", "AddMonoidHom.index_range_mul_card_primaryComponent"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.GroupTheory.Torsion\npublic import Mathlib.GroupTheory.Index\n\nimport Mathlib.Data.Fintype.Pigeonhole\nimport TauCeti.GroupTheory.Index.Quotient\n\n/-!\n# Cokernels and primary components over a uniquely `n`-divisible subgroup of finite index\n\nLet `G` be a commutative group and `n` a natural number, and write `G[n^\u221e]` for Mathlib's\n`AddCommGroup.primaryComponent G n`, the subgroup of elements killed by some power of `n` (`n`\nneed not be prime). Suppose that `G` has a subgroup `U` of finite index on which multiplication by\n`n` is bijective, as for the points of an elliptic curve over a local field, where `U` is the\nkernel of reduction and `n` is prime to the residue characteristic. Then:\n\n* `G[n^\u221e]` is finite, since it meets `U` trivially and so embeds in `G \u29f8 U`;\n* `G = n G + G[n^\u221e]`: every element is divisible by `n` up to an element of `G[n^\u221e]`.\n\nConsequently, if `f : A \u2192 B` and `g : B \u2192 A` are homomorphisms of commutative groups with\n`g \u2218 f = n` and `f \u2218 g = n`, and `B` has such a subgroup, then the cokernel of `f` is accounted for\nby the `n`-primary components alone:\n\n`[B : f(A)] \u00b7 #A[n^\u221e] = #B[n^\u221e] \u00b7 #ker(f)`.\n\nFor an isogeny `\u03c6` of elliptic curves with dual `\u03c6\u0302` and `n = deg \u03c6`, this computes the ratio\n`#coker(\u03c6) / #ker(\u03c6)` on local points at a place not dividing `deg \u03c6`.\n\n## Main results\n\n* `AddSubgroup.finite_primaryComponent_of_injective`: `G[n^\u221e]` is finite when `n` acts injectively\n on a subgroup of finite index.\n* `AddSubgroup.range_nsmul_sup_primaryComponent_eq_top_of_surjective`: `n G + G[n^\u221e] = G` when `n`\n acts surjectively on a subgroup of finite index.\n* `AddMonoidHom.index_range_mul_card_primaryComponent`: the cokernel formula above.\n\n## References\n\n* J. W. S. Cassels, *Arithmetic on curves of genus 1. VIII. On conjectures of Birch and\n Swinnerton-Dyer*, J. Reine Angew. Math. 217 (1965), 180\u2013199.\n* [J. Silverman, *The Arithmetic of Elliptic Curves*][silverman2009], VII.6 and X.4.\n-/\n\npublic section\n\nnamespace AddSubgroup\n\nvariable {G : Type*} [AddCommGroup G]", "/-- **The `n`-primary component is finite** when `n` acts injectively on a subgroup `U` of finite\nindex: it meets `U` trivially, so it embeds in the finite quotient `G \u29f8 U`. -/\ntheorem finite_primaryComponent_of_injective (U : AddSubgroup G) [U.FiniteIndex] {n : \u2115}\n (hU : Function.Injective (fun x : U \u21a6 n \u2022 x)) :\n Finite (AddCommGroup.primaryComponent G n) :=", "/-- **Divisibility up to the `n`-primary component**: if `n` acts surjectively on a subgroup `U` of\nfinite index, then `n G + G[n^\u221e] = G`. -/\ntheorem range_nsmul_sup_primaryComponent_eq_top_of_surjective (U : AddSubgroup G) [U.FiniteIndex]\n {n : \u2115} (hU : Function.Surjective (fun x : U \u21a6 n \u2022 x)) :\n (nsmulAddMonoidHom (\u03b1 := G) n).range \u2294\n AddCommGroup.primaryComponent G n = \u22a4 :=", "end AddSubgroup\n\nnamespace AddMonoidHom\n\nvariable {A B : Type*} [AddCommGroup A] [AddCommGroup B]", "/-- **The cokernel of a homomorphism invertible up to `n`**: let `f : A \u2192+ B` and `g : B \u2192+ A`\nsatisfy `g \u2218 f = n` and `f \u2218 g = n`, and suppose that `n` acts surjectively on a subgroup of\nfinite index of `B`. Then\n\n`[B : f(A)] \u00b7 #A[n^\u221e] = #B[n^\u221e] \u00b7 #ker(f)`,\n\nwhere `A[n^\u221e]` and `B[n^\u221e]` are the `n`-primary components. No finiteness is assumed of the\nother quantities: infinite orders and indices are read as `0`. -/\ntheorem index_range_mul_card_primaryComponent (f : A \u2192+ B) (g : B \u2192+ A) {n : \u2115}\n (hgf : \u2200 a, g (f a) = n \u2022 a) (hfg : \u2200 b, f (g b) = n \u2022 b) (U : AddSubgroup B) [U.FiniteIndex]\n (hU : Function.Surjective (fun x : U \u21a6 n \u2022 x)) :\n f.range.index * Nat.card (AddCommGroup.primaryComponent A n) =\n Nat.card (AddCommGroup.primaryComponent B n) * Nat.card f.ker :=", "end AddMonoidHom"], "free_length": 2215, "file_length": 3344, "heartbeats": 3967, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Geometry.Symplectic.Hamiltonian.CentralForce.TurningPoint", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Geometry/Symplectic/Hamiltonian/CentralForce/TurningPoint.lean", "module": "TauCeti.Geometry.Symplectic.Hamiltonian.CentralForce.TurningPoint", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Geometry.Symplectic.Hamiltonian.CentralForce.Radial\npublic import TauCeti.Geometry.Symplectic.Hamiltonian.CentralForce.RadialAction\nimport TauCeti.MeasureTheory.Function.Jacobian.OneDim\n\n/-!\n# Radial motion between simple turning points\n\nA particle of mass `m > 0` with angular momentum `\u2113` in a central potential `U` moves radially\naccording to the reduced Hamiltonian `H_\u2113(r, p_r) = p_r\u00b2 / (2m) + U_\u2113(r)` on the half-line `r > 0`,\nwith effective potential `U_\u2113(r) = \u2113\u00b2 / (2 m r\u00b2) + U(r)` (`TauCeti.effectivePotential`). At energy\n`E` the absolute radial momentum is `|p_r| = \u221a(2 m (E - U_\u2113(r)))`\n(`TauCeti.absRadialMomentum_eq_abs`), and the classical quadratures between two radii `r\u2081 < r\u2082`\nare the radial period `TauCeti.radialPeriod`, twice `\u222b m dr / |p_r| = \u222b dr / \u221a((2 / m) (E - U_\u2113))`,\nand the apsidal angle `TauCeti.apsidalAngle`, `\u222b \u2113 dr / (r\u00b2 |p_r|)`.\n\nThis file treats an arbitrary potential, rather than the closed forms for the Kepler problem and the\nisotropic oscillator in `TauCeti.Geometry.Symplectic.Hamiltonian.CentralForce.RadialAction`.\n\n* **Convergence.** The integrands are unbounded at turning points, where `U_\u2113(r\u1d62) = E`. At *simple*\n turning points, `U_\u2113'(r\u1d62) \u2260 0`, with `U_\u2113 < E` in between, the radicand `2 m (E - U_\u2113)` dominates\n a multiple of `(r - r\u2081) (r\u2082 - r)`, and both quadratures converge\n (`TauCeti.intervalIntegrable_div_absRadialMomentum`,\n `TauCeti.intervalIntegrable_div_sq_mul_absRadialMomentum`). The time integrand `m / |p_r|` is\n positive where `U_\u2113 < E` (`TauCeti.div_absRadialMomentum_pos`), so the radial period is positive\n (`TauCeti.radialPeriod_pos`).\n* **Time and angle.** Along an integral curve `(r(t), p_r(t))` of the reduced Hamiltonian vector\n field with energy `E`, suppose the radius moves from one of `r\u2081`, `r\u2082` to the other during\n `[t\u2081, t\u2082]` and stays strictly between them meanwhile, where `U_\u2113 < E`. The energy is conserved and\n `p_r` does not vanish, so `r` is monotone and `dt = m dr / |p_r|`. Hence the elapsed time is the\n quadrature, `t\u2082 - t\u2081 = \u222b_{r\u2081}^{r\u2082} m dr / |p_r|`\n (`TauCeti.sub_eq_integral_div_absRadialMomentum`). If moreover `\u03b8' = \u2113 / (m r\u00b2)`, the polar\n Hamilton equation of the angle (`TauCeti.hasDerivAt_polarCanonical_comp`), the angle swept is the\n apsidal angle (`TauCeti.sub_eq_apsidalAngle`). These identities need no hypothesis on the\n derivative of `U_\u2113` at `r\u2081` and `r\u2082`.\n* **The radial period.** For a full radial oscillation, from one turning radius to the other and\n back, the elapsed time is the radial period, twice the time integral between the turning points\n (`TauCeti.sub_eq_radialPeriod`), and the angle swept is twice the apsidal angle\n (`TauCeti.sub_eq_two_mul_apsidalAngle`).\n\n## References\n\n* V. I. Arnold, *Mathematical Methods of Classical Mechanics*, 2nd ed., Graduate Texts in\n Mathematics 60, Springer, 1989, Sections 4 and 8.\n* L. D. Landau, E. M. Lifshitz, *Mechanics*, 3rd ed., Pergamon, 1976, Sections 11 and 14.\n-/\n\npublic section\n\nopen Real Set intervalIntegral MeasureTheory\n\nnamespace TauCeti\n\nvariable {m \u2113 E r\u2081 r\u2082 : \u211d} {U : \u211d \u2192 \u211d}\n\n/-- For a nonzero mass, the absolute radial momentum is `\u221a(2 m (E - U_\u2113(r)))`. -/\ntheorem absRadialMomentum_eq_sqrt (hm : m \u2260 0) (r : \u211d) :\n absRadialMomentum m U \u2113 E r = \u221a(2 * m * (E - effectivePotential m \u2113 U r)) := by\n rw [absRadialMomentum_def, effectivePotential_apply]\n congr 1\n rcases eq_or_ne r 0 with rfl | hr\n \u00b7 simp\n \u00b7 field_simp\n ring\n\n/-- On the level `E` of the reduced Hamiltonian, the absolute radial momentum at a radius `r > 0`\nis `|p_r|`. -/\ntheorem absRadialMomentum_eq_abs (hm : m \u2260 0) {r p : \u211d} (hr : 0 < r)\n (hE : centralForceHamiltonian m (effectivePotential m \u2113 U) (r, p) = E) :\n absRadialMomentum m U \u2113 E r = |p| := by\n rw [centralForceHamiltonian_effectivePotential_apply hr.le] at hE\n rw [absRadialMomentum_def, \u2190 sqrt_sq_eq_abs, \u2190 hE]\n congr 1\n field_simp\n ring\n\n/-- Where the effective potential is below `E`, the integrand `m / |p_r|` of the time quadrature is\npositive. -/\ntheorem div_absRadialMomentum_pos (hm : 0 < m) {r : \u211d} (hr : effectivePotential m \u2113 U r < E) :\n 0 < m / absRadialMomentum m U \u2113 E r := by\n rw [absRadialMomentum_eq_sqrt hm.ne']\n exact div_pos hm (sqrt_pos.2 (mul_pos (by positivity) (sub_pos.2 hr)))\n\n/-! ### Convergence of the quadratures at simple turning points -/\n\nsection Convergence\n\n/-- **The time quadrature converges at simple turning points.** Let `0 < r\u2081 < r\u2082` with\n`U_\u2113 < E` in between, and suppose that each `r\u1d62` that is a turning point of energy `E`,\n`U_\u2113(r\u1d62) = E`, is a simple one: the effective potential has a nonzero one-sided derivative there.\nThen `r \u21a6 m / |p_r|` is interval integrable on `[r\u2081, r\u2082]`, although it is unbounded at a turning\npoint. -/\ntheorem intervalIntegrable_div_absRadialMomentum (hm : 0 < m) (hr\u2081 : 0 < r\u2081) (h\u2081\u2082 : r\u2081 < r\u2082)\n (hU : ContinuousOn U (Icc r\u2081 r\u2082))\n (hlt : \u2200 r \u2208 Ioo r\u2081 r\u2082, effectivePotential m \u2113 U r < E)\n (hd\u2081 : effectivePotential m \u2113 U r\u2081 = E \u2192\n \u2203 d\u2081 \u2260 0, HasDerivWithinAt (effectivePotential m \u2113 U) d\u2081 (Ici r\u2081) r\u2081)\n (hd\u2082 : effectivePotential m \u2113 U r\u2082 = E \u2192\n \u2203 d\u2082 \u2260 0, HasDerivWithinAt (effectivePotential m \u2113 U) d\u2082 (Iic r\u2082) r\u2082) :\n IntervalIntegrable (fun r \u21a6 m / absRadialMomentum m U \u2113 E r) volume r\u2081 r\u2082 := by\n have hcont : ContinuousOn (fun r \u21a6 2 * m * (E - effectivePotential m \u2113 U r)) (Icc r\u2081 r\u2082) := by\n refine continuousOn_const.mul (continuousOn_const.sub ?_)\n rw [show effectivePotential m \u2113 U = fun r \u21a6 \u2113 ^ 2 / (2 * m * r ^ 2) + U r from\n funext (effectivePotential_apply m \u2113 U)]\n refine ContinuousOn.add ?_ hU\n exact continuousOn_const.div (continuousOn_const.mul (continuousOn_id.pow 2))\n fun r hr \u21a6 by have := hr\u2081.trans_le hr.1; positivity\n -- A simple turning point of `U_\u2113` is a simple zero of the radicand `2 m (E - U_\u2113)`.\n have hd {r : \u211d} {s : Set \u211d} (h : effectivePotential m \u2113 U r = E \u2192\n \u2203 d \u2260 0, HasDerivWithinAt (effectivePotential m \u2113 U) d s r)\n (h0 : 2 * m * (E - effectivePotential m \u2113 U r) = 0) :\n \u2203 d \u2260 0, HasDerivWithinAt (fun r \u21a6 2 * m * (E - effectivePotential m \u2113 U r)) d s r := by\n obtain \u27e8d, hd0, hd\u27e9 := h (by linarith [(mul_eq_zero.mp h0).resolve_left (by positivity)])\n exact \u27e82 * m * -d, by simp [hm.ne', hd0], (hd.const_sub E).const_mul (2 * m)\u27e9\n have h := intervalIntegrable_one_div_sqrt_of_hasDerivWithinAt h\u2081\u2082 hcont\n (fun r hr \u21a6 mul_pos (by positivity) (sub_pos.2 (hlt r hr))) (hd hd\u2081) (hd hd\u2082)\n convert h.const_mul m using 2 with r\n rw [absRadialMomentum_eq_sqrt hm.ne', mul_one_div]\n\n/-- **The angle quadrature converges at simple turning points.** Under the hypotheses of\n`TauCeti.intervalIntegrable_div_absRadialMomentum`, `r \u21a6 \u2113 / (r\u00b2 |p_r|)` is interval integrable on\n`[r\u2081, r\u2082]`. -/\ntheorem intervalIntegrable_div_sq_mul_absRadialMomentum (hm : 0 < m) (hr\u2081 : 0 < r\u2081)\n (h\u2081\u2082 : r\u2081 < r\u2082) (hU : ContinuousOn U (Icc r\u2081 r\u2082))\n (hlt : \u2200 r \u2208 Ioo r\u2081 r\u2082, effectivePotential m \u2113 U r < E)\n (hd\u2081 : effectivePotential m \u2113 U r\u2081 = E \u2192\n \u2203 d\u2081 \u2260 0, HasDerivWithinAt (effectivePotential m \u2113 U) d\u2081 (Ici r\u2081) r\u2081)\n (hd\u2082 : effectivePotential m \u2113 U r\u2082 = E \u2192\n \u2203 d\u2082 \u2260 0, HasDerivWithinAt (effectivePotential m \u2113 U) d\u2082 (Iic r\u2082) r\u2082) :\n IntervalIntegrable (fun r \u21a6 \u2113 / (r ^ 2 * absRadialMomentum m U \u2113 E r)) volume r\u2081 r\u2082 := by\n have h := (intervalIntegrable_div_absRadialMomentum hm hr\u2081 h\u2081\u2082 hU hlt hd\u2081\n hd\u2082).continuousOn_mul (g := fun r \u21a6 \u2113 / (m * r ^ 2)) <| by\n rw [uIcc_of_le h\u2081\u2082.le]\n exact continuousOn_const.div (continuousOn_const.mul (continuousOn_id.pow 2))\n fun r hr \u21a6 by have := hr\u2081.trans_le hr.1; positivity\n convert h using 2 with r\n rw [div_mul_div_comm, mul_assoc, mul_comm \u2113 m, mul_div_mul_left _ _ hm.ne']\n\n/-- **The radial period is positive.** Under the hypotheses of\n`TauCeti.intervalIntegrable_div_absRadialMomentum`, the radial period, twice the time quadrature\n`\u222b_{r\u2081}^{r\u2082} m dr / |p_r|`, is positive. -/\ntheorem radialPeriod_pos (hm : 0 < m) (hr\u2081 : 0 < r\u2081) (h\u2081\u2082 : r\u2081 < r\u2082)\n (hU : ContinuousOn U (Icc r\u2081 r\u2082))\n (hlt : \u2200 r \u2208 Ioo r\u2081 r\u2082, effectivePotential m \u2113 U r < E)\n (hd\u2081 : effectivePotential m \u2113 U r\u2081 = E \u2192\n \u2203 d\u2081 \u2260 0, HasDerivWithinAt (effectivePotential m \u2113 U) d\u2081 (Ici r\u2081) r\u2081)\n (hd\u2082 : effectivePotential m \u2113 U r\u2082 = E \u2192\n \u2203 d\u2082 \u2260 0, HasDerivWithinAt (effectivePotential m \u2113 U) d\u2082 (Iic r\u2082) r\u2082) :\n 0 < radialPeriod m U \u2113 E r\u2081 r\u2082 := by\n rw [radialPeriod_def]\n exact mul_pos two_pos (intervalIntegral_pos_of_pos_on\n (intervalIntegrable_div_absRadialMomentum hm hr\u2081 h\u2081\u2082 hU hlt hd\u2081 hd\u2082)\n (fun r hr \u21a6 div_absRadialMomentum_pos hm (hlt r hr)) h\u2081\u2082)\n\nend Convergence\n\n/-! ### Time and angle along the radial motion -/\n\nsection Motion\n\nvariable {\u03b3 : \u211d \u2192 \u211d \u00d7 \u211d} {t\u2081 t\u2082 : \u211d}\n\n/-- The hypotheses shared by the time and angle formulas along one leg of the radial motion give\nthe change of variables from time to radius with `|p_r| = |p_r|(r)`. -/\nprivate theorem leg_data (hm : 0 < m) (ht : t\u2081 \u2264 t\u2082)\n (h\u03b3 : \u2200 t \u2208 Icc t\u2081 t\u2082, HasDerivAt \u03b3 ((stdSymplecticForm (V := \u211d)).hamiltonianVectorField\n (centralForceHamiltonian m (effectivePotential m \u2113 U)) (\u03b3 t)) t)\n (hr : \u2200 t \u2208 Icc t\u2081 t\u2082, 0 < (\u03b3 t).1) (hU : \u2200 t \u2208 Icc t\u2081 t\u2082, DifferentiableAt \u211d U (\u03b3 t).1)\n (hE : centralForceHamiltonian m (effectivePotential m \u2113 U) (\u03b3 t\u2081) = E)\n (hlt : \u2200 r \u2208 Ioo r\u2081 r\u2082, effectivePotential m \u2113 U r < E)\n (hends : (\u03b3 t\u2081).1 = r\u2081 \u2227 (\u03b3 t\u2082).1 = r\u2082 \u2228 (\u03b3 t\u2081).1 = r\u2082 \u2227 (\u03b3 t\u2082).1 = r\u2081)\n (hmem : \u2200 t \u2208 Ioo t\u2081 t\u2082, (\u03b3 t).1 \u2208 Ioo r\u2081 r\u2082) :\n (\u2200 t \u2208 Ioo t\u2081 t\u2082, absRadialMomentum m U \u2113 E (\u03b3 t).1 = |(\u03b3 t).2| \u2227 (\u03b3 t).2 \u2260 0) \u2227\n \u2200 g : \u211d \u2192 \u211d, \u222b r in r\u2081..r\u2082, g r = \u222b t in Ioo t\u2081 t\u2082, |(\u03b3 t).2| / m * g (\u03b3 t).1 := by\n have hIoo : Ioo t\u2081 t\u2082 \u2286 Icc t\u2081 t\u2082 := Ioo_subset_Icc_self\n have hEt := centralForceHamiltonian_effectivePotential_eq_of_hasDerivAt h\u03b3 hr hU\n -- On the level `E`, `p_r\u00b2 / (2m) = E - U_\u2113(r) > 0` strictly between the radii.\n have hp (t : \u211d) (htI : t \u2208 Ioo t\u2081 t\u2082) :\n absRadialMomentum m U \u2113 E (\u03b3 t).1 = |(\u03b3 t).2| \u2227 (\u03b3 t).2 \u2260 0 := by\n have hEt' : centralForceHamiltonian m (effectivePotential m \u2113 U) ((\u03b3 t).1, (\u03b3 t).2) = E :=\n (hEt t (hIoo htI)).trans hE\n refine \u27e8absRadialMomentum_eq_abs hm.ne' (hr t (hIoo htI)) hEt', fun h0 \u21a6 ?_\u27e9\n have hlt' := hlt _ (hmem t htI)\n rw [centralForceHamiltonian_effectivePotential_apply (hr t (hIoo htI)).le, h0,\n add_assoc] at hEt'\n rw [effectivePotential_apply] at hlt'\n simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, zero_div,\n zero_add] at hEt'\n linarith\n refine \u27e8hp, fun g \u21a6 ?_\u27e9\n rw [integral_eq_integral_Ioo_abs_deriv_smul_of_ne_zero ht\n (fun t ht \u21a6 (h\u03b3 t ht).continuousAt.fst.continuousWithinAt)\n (fun t htI \u21a6 (hasDerivAt_fst_of_hasDerivAt_hamiltonianVectorField_effectivePotential\n (h\u03b3 t (hIoo htI)) (hr t (hIoo htI)) (hU t (hIoo htI))).hasDerivWithinAt)\n (fun t htI \u21a6 div_ne_zero (hp t htI).2 hm.ne') hends hmem g]\n simp only [smul_eq_mul, abs_div, abs_of_pos hm]\n\n/-- **The time between turning radii is the radial quadrature.** Let `(r(t), p_r(t))` be an\nintegral curve on `[t\u2081, t\u2082]`, in the half-line `r > 0`, of the Hamiltonian vector field of the\nreduced Hamiltonian `H_\u2113(r, p_r) = p_r\u00b2 / (2m) + U_\u2113(r)`, with energy `E`. Suppose the radius moves\nfrom one of `r\u2081`, `r\u2082` to the other and stays strictly between them, where `U_\u2113 < E`. Then the\nelapsed time is\n\n`t\u2082 - t\u2081 = \u222b_{r\u2081}^{r\u2082} m dr / |p_r| = \u222b_{r\u2081}^{r\u2082} dr / \u221a((2 / m) (E - U_\u2113(r)))`. -/\ntheorem sub_eq_integral_div_absRadialMomentum (hm : 0 < m) (ht : t\u2081 \u2264 t\u2082)\n (h\u03b3 : \u2200 t \u2208 Icc t\u2081 t\u2082, HasDerivAt \u03b3 ((stdSymplecticForm (V := \u211d)).hamiltonianVectorField\n (centralForceHamiltonian m (effectivePotential m \u2113 U)) (\u03b3 t)) t)\n (hr : \u2200 t \u2208 Icc t\u2081 t\u2082, 0 < (\u03b3 t).1) (hU : \u2200 t \u2208 Icc t\u2081 t\u2082, DifferentiableAt \u211d U (\u03b3 t).1)\n (hE : centralForceHamiltonian m (effectivePotential m \u2113 U) (\u03b3 t\u2081) = E)\n (hlt : \u2200 r \u2208 Ioo r\u2081 r\u2082, effectivePotential m \u2113 U r < E)\n (hends : (\u03b3 t\u2081).1 = r\u2081 \u2227 (\u03b3 t\u2082).1 = r\u2082 \u2228 (\u03b3 t\u2081).1 = r\u2082 \u2227 (\u03b3 t\u2082).1 = r\u2081)\n (hmem : \u2200 t \u2208 Ioo t\u2081 t\u2082, (\u03b3 t).1 \u2208 Ioo r\u2081 r\u2082) :\n t\u2082 - t\u2081 = \u222b r in r\u2081..r\u2082, m / absRadialMomentum m U \u2113 E r := by\n obtain \u27e8hp, hcov\u27e9 := leg_data hm ht h\u03b3 hr hU hE hlt hends hmem\n rw [hcov, setIntegral_congr_fun measurableSet_Ioo (g := fun _ \u21a6 (1 : \u211d)) fun t htI \u21a6 ?_,\n setIntegral_const, smul_eq_mul, mul_one, Real.volume_real_Ioo_of_le ht]\n rw [(hp t htI).1]\n field_simp [abs_ne_zero.2 (hp t htI).2]\n\n/-- **The angle swept between turning radii is the apsidal angle.** Under the hypotheses of\n`TauCeti.sub_eq_integral_div_absRadialMomentum`, let `\u03b8` satisfy the polar Hamilton equation\n`\u03b8' = \u2113 / (m r\u00b2)`. Then the angle swept while the radius moves between `r\u2081` and `r\u2082` is\n\n`\u03b8(t\u2082) - \u03b8(t\u2081) = \u222b_{r\u2081}^{r\u2082} \u2113 dr / (r\u00b2 |p_r|)`. -/\ntheorem sub_eq_apsidalAngle (hm : 0 < m) (ht : t\u2081 \u2264 t\u2082)\n (h\u03b3 : \u2200 t \u2208 Icc t\u2081 t\u2082, HasDerivAt \u03b3 ((stdSymplecticForm (V := \u211d)).hamiltonianVectorField\n (centralForceHamiltonian m (effectivePotential m \u2113 U)) (\u03b3 t)) t)\n (hr : \u2200 t \u2208 Icc t\u2081 t\u2082, 0 < (\u03b3 t).1) (hU : \u2200 t \u2208 Icc t\u2081 t\u2082, DifferentiableAt \u211d U (\u03b3 t).1)\n (hE : centralForceHamiltonian m (effectivePotential m \u2113 U) (\u03b3 t\u2081) = E)\n (hlt : \u2200 r \u2208 Ioo r\u2081 r\u2082, effectivePotential m \u2113 U r < E)\n (hends : (\u03b3 t\u2081).1 = r\u2081 \u2227 (\u03b3 t\u2082).1 = r\u2082 \u2228 (\u03b3 t\u2081).1 = r\u2082 \u2227 (\u03b3 t\u2082).1 = r\u2081)\n (hmem : \u2200 t \u2208 Ioo t\u2081 t\u2082, (\u03b3 t).1 \u2208 Ioo r\u2081 r\u2082) {\u03b8 : \u211d \u2192 \u211d}\n (h\u03b8 : \u2200 t \u2208 Icc t\u2081 t\u2082, HasDerivAt \u03b8 (\u2113 / (m * (\u03b3 t).1 ^ 2)) t) :\n \u03b8 t\u2082 - \u03b8 t\u2081 = apsidalAngle m U \u2113 E r\u2081 r\u2082 := by\n obtain \u27e8hp, hcov\u27e9 := leg_data hm ht h\u03b3 hr hU hE hlt hends hmem\n have hcont : ContinuousOn (fun t \u21a6 \u2113 / (m * (\u03b3 t).1 ^ 2)) (Icc t\u2081 t\u2082) := fun t ht \u21a6\n (continuousAt_const.div (continuousAt_const.mul ((h\u03b3 t ht).continuousAt.fst.pow 2))\n (mul_ne_zero hm.ne' (pow_ne_zero 2 (hr t ht).ne'))).continuousWithinAt\n rw [\u2190 integral_eq_sub_of_hasDerivAt (by rwa [uIcc_of_le ht])\n (hcont.intervalIntegrable_of_Icc ht), apsidalAngle_def, hcov, integral_of_le ht,\n integral_Ioc_eq_integral_Ioo]\n refine setIntegral_congr_fun measurableSet_Ioo fun t htI \u21a6 ?_\n have hr' := hr t (Ioo_subset_Icc_self htI)\n rw [(hp t htI).1]\n field_simp [abs_ne_zero.2 (hp t htI).2]\n\n/-- **A full radial oscillation lasts one radial period.** Let `(r(t), p_r(t))` be an integral curve\non `[t\u2081, t\u2083]`, in the half-line `r > 0`, of the Hamiltonian vector field of the reduced Hamiltonian,\nwith energy `E`. Suppose the radius moves from one of `r\u2081`, `r\u2082` to the other during `[t\u2081, t\u2082]`\nand back during `[t\u2082, t\u2083]`, staying strictly between them, where `U_\u2113 < E`, except at these\ntimes. Then `t\u2083 - t\u2081` is the radial period, twice the time integral between the turning radii. -/\ntheorem sub_eq_radialPeriod (hm : 0 < m) {t\u2083 : \u211d} (ht\u2081\u2082 : t\u2081 \u2264 t\u2082) (ht\u2082\u2083 : t\u2082 \u2264 t\u2083)\n (h\u03b3 : \u2200 t \u2208 Icc t\u2081 t\u2083, HasDerivAt \u03b3 ((stdSymplecticForm (V := \u211d)).hamiltonianVectorField\n (centralForceHamiltonian m (effectivePotential m \u2113 U)) (\u03b3 t)) t)\n (hr : \u2200 t \u2208 Icc t\u2081 t\u2083, 0 < (\u03b3 t).1) (hU : \u2200 t \u2208 Icc t\u2081 t\u2083, DifferentiableAt \u211d U (\u03b3 t).1)\n (hE : centralForceHamiltonian m (effectivePotential m \u2113 U) (\u03b3 t\u2081) = E)\n (hlt : \u2200 r \u2208 Ioo r\u2081 r\u2082, effectivePotential m \u2113 U r < E)\n (hends : (\u03b3 t\u2081).1 = r\u2081 \u2227 (\u03b3 t\u2082).1 = r\u2082 \u2228 (\u03b3 t\u2081).1 = r\u2082 \u2227 (\u03b3 t\u2082).1 = r\u2081)\n (h\u2083 : (\u03b3 t\u2083).1 = (\u03b3 t\u2081).1) (hmem\u2081\u2082 : \u2200 t \u2208 Ioo t\u2081 t\u2082, (\u03b3 t).1 \u2208 Ioo r\u2081 r\u2082)\n (hmem\u2082\u2083 : \u2200 t \u2208 Ioo t\u2082 t\u2083, (\u03b3 t).1 \u2208 Ioo r\u2081 r\u2082) :\n t\u2083 - t\u2081 = radialPeriod m U \u2113 E r\u2081 r\u2082 := by\n have hsub\u2081 : Icc t\u2081 t\u2082 \u2286 Icc t\u2081 t\u2083 := Icc_subset_Icc_right ht\u2082\u2083\n have hsub\u2082 : Icc t\u2082 t\u2083 \u2286 Icc t\u2081 t\u2083 := Icc_subset_Icc_left ht\u2081\u2082\n have hE\u2082 := (centralForceHamiltonian_effectivePotential_eq_of_hasDerivAt h\u03b3 hr hU t\u2082\n \u27e8ht\u2081\u2082, ht\u2082\u2083\u27e9).trans hE\n have h\u2081 := sub_eq_integral_div_absRadialMomentum hm ht\u2081\u2082 (fun t ht \u21a6 h\u03b3 t (hsub\u2081 ht))\n (fun t ht \u21a6 hr t (hsub\u2081 ht)) (fun t ht \u21a6 hU t (hsub\u2081 ht)) hE hlt hends hmem\u2081\u2082\n have h\u2082 := sub_eq_integral_div_absRadialMomentum hm ht\u2082\u2083 (fun t ht \u21a6 h\u03b3 t (hsub\u2082 ht))\n (fun t ht \u21a6 hr t (hsub\u2082 ht)) (fun t ht \u21a6 hU t (hsub\u2082 ht)) hE\u2082 hlt\n (by rw [h\u2083]; tauto) hmem\u2082\u2083\n rw [radialPeriod_def]\n linarith\n\n/-- **The angle swept in a full radial oscillation is twice the apsidal angle.** Under the\nhypotheses of `TauCeti.sub_eq_radialPeriod`, if `\u03b8' = \u2113 / (m r\u00b2)` on `[t\u2081, t\u2083]`, then\n`\u03b8(t\u2083) - \u03b8(t\u2081) = 2 \u0394\u03b8`, where `\u0394\u03b8` is the apsidal angle. -/\ntheorem sub_eq_two_mul_apsidalAngle (hm : 0 < m) {t\u2083 : \u211d} (ht\u2081\u2082 : t\u2081 \u2264 t\u2082) (ht\u2082\u2083 : t\u2082 \u2264 t\u2083)\n (h\u03b3 : \u2200 t \u2208 Icc t\u2081 t\u2083, HasDerivAt \u03b3 ((stdSymplecticForm (V := \u211d)).hamiltonianVectorField\n (centralForceHamiltonian m (effectivePotential m \u2113 U)) (\u03b3 t)) t)\n (hr : \u2200 t \u2208 Icc t\u2081 t\u2083, 0 < (\u03b3 t).1) (hU : \u2200 t \u2208 Icc t\u2081 t\u2083, DifferentiableAt \u211d U (\u03b3 t).1)\n (hE : centralForceHamiltonian m (effectivePotential m \u2113 U) (\u03b3 t\u2081) = E)\n (hlt : \u2200 r \u2208 Ioo r\u2081 r\u2082, effectivePotential m \u2113 U r < E)\n (hends : (\u03b3 t\u2081).1 = r\u2081 \u2227 (\u03b3 t\u2082).1 = r\u2082 \u2228 (\u03b3 t\u2081).1 = r\u2082 \u2227 (\u03b3 t\u2082).1 = r\u2081)\n (h\u2083 : (\u03b3 t\u2083).1 = (\u03b3 t\u2081).1) (hmem\u2081\u2082 : \u2200 t \u2208 Ioo t\u2081 t\u2082, (\u03b3 t).1 \u2208 Ioo r\u2081 r\u2082)\n (hmem\u2082\u2083 : \u2200 t \u2208 Ioo t\u2082 t\u2083, (\u03b3 t).1 \u2208 Ioo r\u2081 r\u2082) {\u03b8 : \u211d \u2192 \u211d}\n (h\u03b8 : \u2200 t \u2208 Icc t\u2081 t\u2083, HasDerivAt \u03b8 (\u2113 / (m * (\u03b3 t).1 ^ 2)) t) :\n \u03b8 t\u2083 - \u03b8 t\u2081 = 2 * apsidalAngle m U \u2113 E r\u2081 r\u2082 := by\n have hsub\u2081 : Icc t\u2081 t\u2082 \u2286 Icc t\u2081 t\u2083 := Icc_subset_Icc_right ht\u2082\u2083\n have hsub\u2082 : Icc t\u2082 t\u2083 \u2286 Icc t\u2081 t\u2083 := Icc_subset_Icc_left ht\u2081\u2082\n have hE\u2082 := (centralForceHamiltonian_effectivePotential_eq_of_hasDerivAt h\u03b3 hr hU t\u2082\n \u27e8ht\u2081\u2082, ht\u2082\u2083\u27e9).trans hE\n have h\u2081 := sub_eq_apsidalAngle hm ht\u2081\u2082 (fun t ht \u21a6 h\u03b3 t (hsub\u2081 ht))\n (fun t ht \u21a6 hr t (hsub\u2081 ht)) (fun t ht \u21a6 hU t (hsub\u2081 ht)) hE hlt hends hmem\u2081\u2082\n fun t ht \u21a6 h\u03b8 t (hsub\u2081 ht)\n have h\u2082 := sub_eq_apsidalAngle hm ht\u2082\u2083 (fun t ht \u21a6 h\u03b3 t (hsub\u2082 ht))\n (fun t ht \u21a6 hr t (hsub\u2082 ht)) (fun t ht \u21a6 hU t (hsub\u2082 ht)) hE\u2082 hlt\n (by rw [h\u2083]; tauto) hmem\u2082\u2083 fun t ht \u21a6 h\u03b8 t (hsub\u2082 ht)\n linarith\n\nend Motion\n\nend TauCeti\n", "public_theorems": ["TauCeti.absRadialMomentum_eq_sqrt", "TauCeti.absRadialMomentum_eq_abs", "TauCeti.div_absRadialMomentum_pos", "TauCeti.intervalIntegrable_div_absRadialMomentum", "TauCeti.intervalIntegrable_div_sq_mul_absRadialMomentum", "TauCeti.radialPeriod_pos", "TauCeti.sub_eq_integral_div_absRadialMomentum", "TauCeti.sub_eq_apsidalAngle", "TauCeti.sub_eq_radialPeriod", "TauCeti.sub_eq_two_mul_apsidalAngle"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Geometry.Symplectic.Hamiltonian.CentralForce.Radial\npublic import TauCeti.Geometry.Symplectic.Hamiltonian.CentralForce.RadialAction\nimport TauCeti.MeasureTheory.Function.Jacobian.OneDim\n\n/-!\n# Radial motion between simple turning points\n\nA particle of mass `m > 0` with angular momentum `\u2113` in a central potential `U` moves radially\naccording to the reduced Hamiltonian `H_\u2113(r, p_r) = p_r\u00b2 / (2m) + U_\u2113(r)` on the half-line `r > 0`,\nwith effective potential `U_\u2113(r) = \u2113\u00b2 / (2 m r\u00b2) + U(r)` (`TauCeti.effectivePotential`). At energy\n`E` the absolute radial momentum is `|p_r| = \u221a(2 m (E - U_\u2113(r)))`\n(`TauCeti.absRadialMomentum_eq_abs`), and the classical quadratures between two radii `r\u2081 < r\u2082`\nare the radial period `TauCeti.radialPeriod`, twice `\u222b m dr / |p_r| = \u222b dr / \u221a((2 / m) (E - U_\u2113))`,\nand the apsidal angle `TauCeti.apsidalAngle`, `\u222b \u2113 dr / (r\u00b2 |p_r|)`.\n\nThis file treats an arbitrary potential, rather than the closed forms for the Kepler problem and the\nisotropic oscillator in `TauCeti.Geometry.Symplectic.Hamiltonian.CentralForce.RadialAction`.\n\n* **Convergence.** The integrands are unbounded at turning points, where `U_\u2113(r\u1d62) = E`. At *simple*\n turning points, `U_\u2113'(r\u1d62) \u2260 0`, with `U_\u2113 < E` in between, the radicand `2 m (E - U_\u2113)` dominates\n a multiple of `(r - r\u2081) (r\u2082 - r)`, and both quadratures converge\n (`TauCeti.intervalIntegrable_div_absRadialMomentum`,\n `TauCeti.intervalIntegrable_div_sq_mul_absRadialMomentum`). The time integrand `m / |p_r|` is\n positive where `U_\u2113 < E` (`TauCeti.div_absRadialMomentum_pos`), so the radial period is positive\n (`TauCeti.radialPeriod_pos`).\n* **Time and angle.** Along an integral curve `(r(t), p_r(t))` of the reduced Hamiltonian vector\n field with energy `E`, suppose the radius moves from one of `r\u2081`, `r\u2082` to the other during\n `[t\u2081, t\u2082]` and stays strictly between them meanwhile, where `U_\u2113 < E`. The energy is conserved and\n `p_r` does not vanish, so `r` is monotone and `dt = m dr / |p_r|`. Hence the elapsed time is the\n quadrature, `t\u2082 - t\u2081 = \u222b_{r\u2081}^{r\u2082} m dr / |p_r|`\n (`TauCeti.sub_eq_integral_div_absRadialMomentum`). If moreover `\u03b8' = \u2113 / (m r\u00b2)`, the polar\n Hamilton equation of the angle (`TauCeti.hasDerivAt_polarCanonical_comp`), the angle swept is the\n apsidal angle (`TauCeti.sub_eq_apsidalAngle`). These identities need no hypothesis on the\n derivative of `U_\u2113` at `r\u2081` and `r\u2082`.\n* **The radial period.** For a full radial oscillation, from one turning radius to the other and\n back, the elapsed time is the radial period, twice the time integral between the turning points\n (`TauCeti.sub_eq_radialPeriod`), and the angle swept is twice the apsidal angle\n (`TauCeti.sub_eq_two_mul_apsidalAngle`).\n\n## References\n\n* V. I. Arnold, *Mathematical Methods of Classical Mechanics*, 2nd ed., Graduate Texts in\n Mathematics 60, Springer, 1989, Sections 4 and 8.\n* L. D. Landau, E. M. Lifshitz, *Mechanics*, 3rd ed., Pergamon, 1976, Sections 11 and 14.\n-/\n\npublic section\n\nopen Real Set intervalIntegral MeasureTheory\n\nnamespace TauCeti\n\nvariable {m \u2113 E r\u2081 r\u2082 : \u211d} {U : \u211d \u2192 \u211d}", "/-- For a nonzero mass, the absolute radial momentum is `\u221a(2 m (E - U_\u2113(r)))`. -/\ntheorem absRadialMomentum_eq_sqrt (hm : m \u2260 0) (r : \u211d) :\n absRadialMomentum m U \u2113 E r = \u221a(2 * m * (E - effectivePotential m \u2113 U r)) :=", "/-- On the level `E` of the reduced Hamiltonian, the absolute radial momentum at a radius `r > 0`\nis `|p_r|`. -/\ntheorem absRadialMomentum_eq_abs (hm : m \u2260 0) {r p : \u211d} (hr : 0 < r)\n (hE : centralForceHamiltonian m (effectivePotential m \u2113 U) (r, p) = E) :\n absRadialMomentum m U \u2113 E r = |p| :=", "/-- Where the effective potential is below `E`, the integrand `m / |p_r|` of the time quadrature is\npositive. -/\ntheorem div_absRadialMomentum_pos (hm : 0 < m) {r : \u211d} (hr : effectivePotential m \u2113 U r < E) :\n 0 < m / absRadialMomentum m U \u2113 E r :=", "/-! ### Convergence of the quadratures at simple turning points -/\n\nsection Convergence", "/-- **The time quadrature converges at simple turning points.** Let `0 < r\u2081 < r\u2082` with\n`U_\u2113 < E` in between, and suppose that each `r\u1d62` that is a turning point of energy `E`,\n`U_\u2113(r\u1d62) = E`, is a simple one: the effective potential has a nonzero one-sided derivative there.\nThen `r \u21a6 m / |p_r|` is interval integrable on `[r\u2081, r\u2082]`, although it is unbounded at a turning\npoint. -/\ntheorem intervalIntegrable_div_absRadialMomentum (hm : 0 < m) (hr\u2081 : 0 < r\u2081) (h\u2081\u2082 : r\u2081 < r\u2082)\n (hU : ContinuousOn U (Icc r\u2081 r\u2082))\n (hlt : \u2200 r \u2208 Ioo r\u2081 r\u2082, effectivePotential m \u2113 U r < E)\n (hd\u2081 : effectivePotential m \u2113 U r\u2081 = E \u2192\n \u2203 d\u2081 \u2260 0, HasDerivWithinAt (effectivePotential m \u2113 U) d\u2081 (Ici r\u2081) r\u2081)\n (hd\u2082 : effectivePotential m \u2113 U r\u2082 = E \u2192\n \u2203 d\u2082 \u2260 0, HasDerivWithinAt (effectivePotential m \u2113 U) d\u2082 (Iic r\u2082) r\u2082) :\n IntervalIntegrable (fun r \u21a6 m / absRadialMomentum m U \u2113 E r) volume r\u2081 r\u2082 :=", "/-- **The angle quadrature converges at simple turning points.** Under the hypotheses of\n`TauCeti.intervalIntegrable_div_absRadialMomentum`, `r \u21a6 \u2113 / (r\u00b2 |p_r|)` is interval integrable on\n`[r\u2081, r\u2082]`. -/\ntheorem intervalIntegrable_div_sq_mul_absRadialMomentum (hm : 0 < m) (hr\u2081 : 0 < r\u2081)\n (h\u2081\u2082 : r\u2081 < r\u2082) (hU : ContinuousOn U (Icc r\u2081 r\u2082))\n (hlt : \u2200 r \u2208 Ioo r\u2081 r\u2082, effectivePotential m \u2113 U r < E)\n (hd\u2081 : effectivePotential m \u2113 U r\u2081 = E \u2192\n \u2203 d\u2081 \u2260 0, HasDerivWithinAt (effectivePotential m \u2113 U) d\u2081 (Ici r\u2081) r\u2081)\n (hd\u2082 : effectivePotential m \u2113 U r\u2082 = E \u2192\n \u2203 d\u2082 \u2260 0, HasDerivWithinAt (effectivePotential m \u2113 U) d\u2082 (Iic r\u2082) r\u2082) :\n IntervalIntegrable (fun r \u21a6 \u2113 / (r ^ 2 * absRadialMomentum m U \u2113 E r)) volume r\u2081 r\u2082 :=", "/-- **The radial period is positive.** Under the hypotheses of\n`TauCeti.intervalIntegrable_div_absRadialMomentum`, the radial period, twice the time quadrature\n`\u222b_{r\u2081}^{r\u2082} m dr / |p_r|`, is positive. -/\ntheorem radialPeriod_pos (hm : 0 < m) (hr\u2081 : 0 < r\u2081) (h\u2081\u2082 : r\u2081 < r\u2082)\n (hU : ContinuousOn U (Icc r\u2081 r\u2082))\n (hlt : \u2200 r \u2208 Ioo r\u2081 r\u2082, effectivePotential m \u2113 U r < E)\n (hd\u2081 : effectivePotential m \u2113 U r\u2081 = E \u2192\n \u2203 d\u2081 \u2260 0, HasDerivWithinAt (effectivePotential m \u2113 U) d\u2081 (Ici r\u2081) r\u2081)\n (hd\u2082 : effectivePotential m \u2113 U r\u2082 = E \u2192\n \u2203 d\u2082 \u2260 0, HasDerivWithinAt (effectivePotential m \u2113 U) d\u2082 (Iic r\u2082) r\u2082) :\n 0 < radialPeriod m U \u2113 E r\u2081 r\u2082 :=", "end Convergence\n\n/-! ### Time and angle along the radial motion -/\n\nsection Motion\n\nvariable {\u03b3 : \u211d \u2192 \u211d \u00d7 \u211d} {t\u2081 t\u2082 : \u211d}", "/-- **The time between turning radii is the radial quadrature.** Let `(r(t), p_r(t))` be an\nintegral curve on `[t\u2081, t\u2082]`, in the half-line `r > 0`, of the Hamiltonian vector field of the\nreduced Hamiltonian `H_\u2113(r, p_r) = p_r\u00b2 / (2m) + U_\u2113(r)`, with energy `E`. Suppose the radius moves\nfrom one of `r\u2081`, `r\u2082` to the other and stays strictly between them, where `U_\u2113 < E`. Then the\nelapsed time is\n\n`t\u2082 - t\u2081 = \u222b_{r\u2081}^{r\u2082} m dr / |p_r| = \u222b_{r\u2081}^{r\u2082} dr / \u221a((2 / m) (E - U_\u2113(r)))`. -/\ntheorem sub_eq_integral_div_absRadialMomentum (hm : 0 < m) (ht : t\u2081 \u2264 t\u2082)\n (h\u03b3 : \u2200 t \u2208 Icc t\u2081 t\u2082, HasDerivAt \u03b3 ((stdSymplecticForm (V := \u211d)).hamiltonianVectorField\n (centralForceHamiltonian m (effectivePotential m \u2113 U)) (\u03b3 t)) t)\n (hr : \u2200 t \u2208 Icc t\u2081 t\u2082, 0 < (\u03b3 t).1) (hU : \u2200 t \u2208 Icc t\u2081 t\u2082, DifferentiableAt \u211d U (\u03b3 t).1)\n (hE : centralForceHamiltonian m (effectivePotential m \u2113 U) (\u03b3 t\u2081) = E)\n (hlt : \u2200 r \u2208 Ioo r\u2081 r\u2082, effectivePotential m \u2113 U r < E)\n (hends : (\u03b3 t\u2081).1 = r\u2081 \u2227 (\u03b3 t\u2082).1 = r\u2082 \u2228 (\u03b3 t\u2081).1 = r\u2082 \u2227 (\u03b3 t\u2082).1 = r\u2081)\n (hmem : \u2200 t \u2208 Ioo t\u2081 t\u2082, (\u03b3 t).1 \u2208 Ioo r\u2081 r\u2082) :\n t\u2082 - t\u2081 = \u222b r in r\u2081..r\u2082, m / absRadialMomentum m U \u2113 E r :=", "/-- **The angle swept between turning radii is the apsidal angle.** Under the hypotheses of\n`TauCeti.sub_eq_integral_div_absRadialMomentum`, let `\u03b8` satisfy the polar Hamilton equation\n`\u03b8' = \u2113 / (m r\u00b2)`. Then the angle swept while the radius moves between `r\u2081` and `r\u2082` is\n\n`\u03b8(t\u2082) - \u03b8(t\u2081) = \u222b_{r\u2081}^{r\u2082} \u2113 dr / (r\u00b2 |p_r|)`. -/\ntheorem sub_eq_apsidalAngle (hm : 0 < m) (ht : t\u2081 \u2264 t\u2082)\n (h\u03b3 : \u2200 t \u2208 Icc t\u2081 t\u2082, HasDerivAt \u03b3 ((stdSymplecticForm (V := \u211d)).hamiltonianVectorField\n (centralForceHamiltonian m (effectivePotential m \u2113 U)) (\u03b3 t)) t)\n (hr : \u2200 t \u2208 Icc t\u2081 t\u2082, 0 < (\u03b3 t).1) (hU : \u2200 t \u2208 Icc t\u2081 t\u2082, DifferentiableAt \u211d U (\u03b3 t).1)\n (hE : centralForceHamiltonian m (effectivePotential m \u2113 U) (\u03b3 t\u2081) = E)\n (hlt : \u2200 r \u2208 Ioo r\u2081 r\u2082, effectivePotential m \u2113 U r < E)\n (hends : (\u03b3 t\u2081).1 = r\u2081 \u2227 (\u03b3 t\u2082).1 = r\u2082 \u2228 (\u03b3 t\u2081).1 = r\u2082 \u2227 (\u03b3 t\u2082).1 = r\u2081)\n (hmem : \u2200 t \u2208 Ioo t\u2081 t\u2082, (\u03b3 t).1 \u2208 Ioo r\u2081 r\u2082) {\u03b8 : \u211d \u2192 \u211d}\n (h\u03b8 : \u2200 t \u2208 Icc t\u2081 t\u2082, HasDerivAt \u03b8 (\u2113 / (m * (\u03b3 t).1 ^ 2)) t) :\n \u03b8 t\u2082 - \u03b8 t\u2081 = apsidalAngle m U \u2113 E r\u2081 r\u2082 :=", "/-- **A full radial oscillation lasts one radial period.** Let `(r(t), p_r(t))` be an integral curve\non `[t\u2081, t\u2083]`, in the half-line `r > 0`, of the Hamiltonian vector field of the reduced Hamiltonian,\nwith energy `E`. Suppose the radius moves from one of `r\u2081`, `r\u2082` to the other during `[t\u2081, t\u2082]`\nand back during `[t\u2082, t\u2083]`, staying strictly between them, where `U_\u2113 < E`, except at these\ntimes. Then `t\u2083 - t\u2081` is the radial period, twice the time integral between the turning radii. -/\ntheorem sub_eq_radialPeriod (hm : 0 < m) {t\u2083 : \u211d} (ht\u2081\u2082 : t\u2081 \u2264 t\u2082) (ht\u2082\u2083 : t\u2082 \u2264 t\u2083)\n (h\u03b3 : \u2200 t \u2208 Icc t\u2081 t\u2083, HasDerivAt \u03b3 ((stdSymplecticForm (V := \u211d)).hamiltonianVectorField\n (centralForceHamiltonian m (effectivePotential m \u2113 U)) (\u03b3 t)) t)\n (hr : \u2200 t \u2208 Icc t\u2081 t\u2083, 0 < (\u03b3 t).1) (hU : \u2200 t \u2208 Icc t\u2081 t\u2083, DifferentiableAt \u211d U (\u03b3 t).1)\n (hE : centralForceHamiltonian m (effectivePotential m \u2113 U) (\u03b3 t\u2081) = E)\n (hlt : \u2200 r \u2208 Ioo r\u2081 r\u2082, effectivePotential m \u2113 U r < E)\n (hends : (\u03b3 t\u2081).1 = r\u2081 \u2227 (\u03b3 t\u2082).1 = r\u2082 \u2228 (\u03b3 t\u2081).1 = r\u2082 \u2227 (\u03b3 t\u2082).1 = r\u2081)\n (h\u2083 : (\u03b3 t\u2083).1 = (\u03b3 t\u2081).1) (hmem\u2081\u2082 : \u2200 t \u2208 Ioo t\u2081 t\u2082, (\u03b3 t).1 \u2208 Ioo r\u2081 r\u2082)\n (hmem\u2082\u2083 : \u2200 t \u2208 Ioo t\u2082 t\u2083, (\u03b3 t).1 \u2208 Ioo r\u2081 r\u2082) :\n t\u2083 - t\u2081 = radialPeriod m U \u2113 E r\u2081 r\u2082 :=", "/-- **The angle swept in a full radial oscillation is twice the apsidal angle.** Under the\nhypotheses of `TauCeti.sub_eq_radialPeriod`, if `\u03b8' = \u2113 / (m r\u00b2)` on `[t\u2081, t\u2083]`, then\n`\u03b8(t\u2083) - \u03b8(t\u2081) = 2 \u0394\u03b8`, where `\u0394\u03b8` is the apsidal angle. -/\ntheorem sub_eq_two_mul_apsidalAngle (hm : 0 < m) {t\u2083 : \u211d} (ht\u2081\u2082 : t\u2081 \u2264 t\u2082) (ht\u2082\u2083 : t\u2082 \u2264 t\u2083)\n (h\u03b3 : \u2200 t \u2208 Icc t\u2081 t\u2083, HasDerivAt \u03b3 ((stdSymplecticForm (V := \u211d)).hamiltonianVectorField\n (centralForceHamiltonian m (effectivePotential m \u2113 U)) (\u03b3 t)) t)\n (hr : \u2200 t \u2208 Icc t\u2081 t\u2083, 0 < (\u03b3 t).1) (hU : \u2200 t \u2208 Icc t\u2081 t\u2083, DifferentiableAt \u211d U (\u03b3 t).1)\n (hE : centralForceHamiltonian m (effectivePotential m \u2113 U) (\u03b3 t\u2081) = E)\n (hlt : \u2200 r \u2208 Ioo r\u2081 r\u2082, effectivePotential m \u2113 U r < E)\n (hends : (\u03b3 t\u2081).1 = r\u2081 \u2227 (\u03b3 t\u2082).1 = r\u2082 \u2228 (\u03b3 t\u2081).1 = r\u2082 \u2227 (\u03b3 t\u2082).1 = r\u2081)\n (h\u2083 : (\u03b3 t\u2083).1 = (\u03b3 t\u2081).1) (hmem\u2081\u2082 : \u2200 t \u2208 Ioo t\u2081 t\u2082, (\u03b3 t).1 \u2208 Ioo r\u2081 r\u2082)\n (hmem\u2082\u2083 : \u2200 t \u2208 Ioo t\u2082 t\u2083, (\u03b3 t).1 \u2208 Ioo r\u2081 r\u2082) {\u03b8 : \u211d \u2192 \u211d}\n (h\u03b8 : \u2200 t \u2208 Icc t\u2081 t\u2083, HasDerivAt \u03b8 (\u2113 / (m * (\u03b3 t).1 ^ 2)) t) :\n \u03b8 t\u2083 - \u03b8 t\u2081 = 2 * apsidalAngle m U \u2113 E r\u2081 r\u2082 :=", "end Motion\n\nend TauCeti"], "free_length": 6048, "file_length": 11112, "heartbeats": 10794, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Analysis.ODE.EnergyEstimate.WeightCrossing", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Analysis/ODE/EnergyEstimate/WeightCrossing.lean", "module": "TauCeti.Analysis.ODE.EnergyEstimate.WeightCrossing", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Analysis.ODE.EnergyEstimate.Index\nimport TauCeti.Analysis.SpecialFunctions.Hyperbolic\n\n/-!\n# The index of the trajectory operator as a weight crosses an eigenvalue\n\nLet `A : \u211d \u2192 End(E)` be a continuous family of operators on a finite-dimensional real inner\nproduct space `E` with symmetric limits `A\u00b1` at `\u00b1\u221e`. Multiplication by `exp w` conjugates the\ntrajectory operator `D_A u = u' + A u` on the weighted spaces `{u | exp w \u2022 u \u2208 W^{1,2}}` to the\nunweighted trajectory operator `D_{A - w'}` (see `TauCeti.Analysis.ODE.EnergyEstimate.Weighted`).\nWhen the slope `w'` tends to `\u03b4\u00b1` at `\u00b1\u221e`, the limits of `A - w'` are `A\u00b1 - \u03b4\u00b1`, which are\ninvertible when `\u03b4\u00b1` is not an eigenvalue of `A\u00b1`. For these non-exceptional weights the weighted\noperator is Fredholm, and this file computes its index:\n\n`ind D_{A - w'} = n_{< \u03b4\u207b}(A\u207b) - n_{< \u03b4\u207a}(A\u207a)`,\n\nwhere `n_{< \u03b4}(B)` is the number of eigenvalues of `B` below `\u03b4`, counted with multiplicity\n(`index_trajectoryOperator_sub_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank`).\nThis is the index formula for invertible symmetric limits\n(`TauCeti.WeakDerivStep.index_trajectoryOperator_eq_finrank_pointSpectralSubspace_sub_finrank`)\napplied to the shifted limits, since the eigenvalues of `A\u00b1 - \u03b4\u00b1` are those of `A\u00b1` shifted by\n`-\u03b4\u00b1` (`Module.End.pointSpectralSubspace_sub_smul_id`).\n\nConsequently the index depends on the weight only through the position of its slopes relative to\nthe spectra of the limits, and it changes only when a slope crosses an eigenvalue. A decay weight\n`exp (\u03b4 |s|)` has slopes `\u03b4\u207a = \u03b4` and `\u03b4\u207b = -\u03b4`; making it stronger moves `\u03b4\u207a` up and `\u03b4\u207b` down,\nand the index decreases by the number of eigenvalues of `A\u207a` crossed by `\u03b4\u207a` plus the number of\neigenvalues of `A\u207b` crossed by `\u03b4\u207b`, counted with multiplicity\n(`TauCeti.WeakDerivStep.index_trajectoryOperator_eq_add_finrank_pointSpectralSubspace_Ico`). In\nparticular, as the weight increases through one exceptional value at either end, the index\ndecreases by the multiplicity of the crossed eigenvalue\n(`TauCeti.WeakDerivStep.index_trajectoryOperator_eq_add_finrank_eigenspace_atTop` and\n`TauCeti.WeakDerivStep.index_trajectoryOperator_eq_add_finrank_eigenspace_atBot`).\nThe weights below the spectral gap of `TauCeti.Analysis.ODE.EnergyEstimate.Weighted` cross no\neigenvalue, and leave the index unchanged. The limits `A\u00b1` may have kernels: for small decay\nweights, with slopes `\u03b4\u207b < 0 < \u03b4\u207a` closer to `0` than every nonzero eigenvalue of the respective\nlimits, the index is `n\u207b(A\u207b) - n\u207b(A\u207a) - dim ker A\u207a`, so the kernel of the limit at `+\u221e` is counted\nas negative and that at `-\u221e` as positive\n(`index_trajectoryOperator_sub_smul_id_eq_finrank_sub_finrank_sub_finrank_ker`, in\n`TauCeti.WeakDerivStep`).\n\nFor the symmetric weight `w(s) = \u03b4 log (cosh s)`, which is `\u03b4 |s|` up to a bounded error, the slope\nis `\u03b4 tanh s` and the index is `n_{< -\u03b4}(A\u207b) - n_{< \u03b4}(A\u207a)`\n(`index_trajectoryOperator_sub_mul_tanh_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank`).\nFor a continuous family `B` with nonzero scalar limits `b\u00b1 \u2022 id` the index is `dim E` when\n`b\u207b < 0 < b\u207a`, `-dim E` when `b\u207a < 0 < b\u207b`, and `0` otherwise\n(`TauCeti.WeakDerivStep.index_trajectoryOperator_of_tendsto_smul_id`). In particular, for a\nconstant scalar coefficient `a \u2022 id` on `E` the index is `dim E` when `\u03b4\u207a < a < \u03b4\u207b`,\n`-dim E` when `\u03b4\u207b < a < \u03b4\u207a`, and `0` when `\u03b4\u207b` and `\u03b4\u207a` lie on the same side of `a`\n(`TauCeti.WeakDerivStep.index_trajectoryOperator_smul_id_sub_smul_id`); for `a = 0` the\nunweighted operator `d/ds`, which is not Fredholm when `E \u2260 0`, becomes Fredholm of index\n`-dim E` for decay weights and of index `dim E` for growth weights.\nIn the scalar case `E = \u211d` with constant coefficient `a`, the operator `u \u21a6 u' + (a - \u03b4 tanh s) u`\nhas index `0` for `|\u03b4| < |a|` and index `-1` for `\u03b4 > |a|`: as `\u03b4` increases through `|a|`, one\nof the two slopes `\u00b1\u03b4` crosses the simple eigenvalue `a` of the limits.\n\n## Main results\n\nIn the namespace `TauCeti.WeakDerivStep`:\n\n* `isFredholm_trajectoryOperator_sub_smul_id`: `D_{A - c}` is Fredholm for slopes `c` with\n non-exceptional limits `\u03b4\u00b1`.\n* `index_trajectoryOperator_sub_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank`: the index of\n `D_{A - c}` for slopes `c` with non-exceptional limits `\u03b4\u00b1` is `n_{< \u03b4\u207b}(A\u207b) - n_{< \u03b4\u207a}(A\u207a)`.\n* `index_trajectoryOperator_eq_add_finrank_pointSpectralSubspace_Ico`: moving the limits of the\n slope outward changes the index by the number of eigenvalues crossed at the two ends.\n* `index_trajectoryOperator_eq_add_finrank_eigenspace_atTop`,\n `index_trajectoryOperator_eq_add_finrank_eigenspace_atBot`: crossing one eigenvalue\n at one end changes the index by its multiplicity.\n* `index_trajectoryOperator_sub_smul_id_eq_finrank_sub_finrank_sub_finrank_ker`: small decay\n weights give the index `n\u207b(A\u207b) - n\u207b(A\u207a) - dim ker A\u207a`.\n* `index_trajectoryOperator_sub_mul_tanh_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank`:\n the index for the symmetric weight `\u03b4 log (cosh s)`.\n* `index_trajectoryOperator_of_tendsto_smul_id`: the index for nonzero scalar limits.\n* `index_trajectoryOperator_smul_id_sub_smul_id`: the index for a constant scalar coefficient on\n `E`.\n* `index_trajectoryOperator_smul_id_sub_mul_tanh_smul_id_eq_zero_of_abs_lt_abs`,\n `index_trajectoryOperator_smul_id_sub_mul_tanh_smul_id_eq_neg_one_of_abs_lt`: the scalar crossing,\n index `0` below `|a|` and `-1` above it.\n\n## References\n\n* R. B. Lockhart and R. C. McOwen, *Elliptic differential operators on noncompact manifolds*,\n Ann. Scuola Norm. Sup. Pisa Cl. Sci. (4) **12** (1985), 409\u2013447 (the index on weighted spaces\n is locally constant in the weight and jumps at the exceptional weights by the dimension of the\n crossed asymptotic eigenspace).\n-/\n\npublic section\n\nnoncomputable section\n\nopen MeasureTheory TopologicalSpace Set Filter\nopen scoped ENNReal Topology InnerProductSpace\nopen ContinuousLinearMap (isSymmetric_sub_smul_id ker_sub_smul_id_eq_bot_of_not_hasEigenvalue)\n\nnamespace TauCeti.WeakDerivStep\n\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace \u211d E] [FiniteDimensional \u211d E]\n {A : \u211d \u2192 E \u2192L[\u211d] E} {Aminus Aplus : E \u2192L[\u211d] E}\n\n/-- **The weighted trajectory operator is Fredholm.** Let `A` be a continuous family of operators\non a finite-dimensional real inner product space with symmetric limits `A\u00b1` at `\u00b1\u221e`, and let `c`\nbe a continuous slope tending to `\u03b4\u00b1` at `\u00b1\u221e`, where `\u03b4\u00b1` is not an eigenvalue of `A\u00b1`. Then the\ntrajectory operator `u \u21a6 u' + (A - c) u` from `W^{1,2}(\u211d, E)` to `L\u00b2(\u211d, E)` is Fredholm. For\n`c = w'` this operator is the conjugate of `D_A` on the spaces weighted by `exp w`. -/\ntheorem isFredholm_trajectoryOperator_sub_smul_id\n (hA : Continuous A) (hsymminus : (Aminus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hsymplus : (Aplus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hbot : Tendsto A atBot (\ud835\udcdd Aminus)) (htop : Tendsto A atTop (\ud835\udcdd Aplus))\n {c : \u211d \u2192 \u211d} (hc : Continuous c) {\u03b4minus \u03b4plus : \u211d}\n (hcbot : Tendsto c atBot (\ud835\udcdd \u03b4minus)) (hctop : Tendsto c atTop (\ud835\udcdd \u03b4plus))\n (h\u03b4minus : \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03b4minus)\n (h\u03b4plus : \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03b4plus)\n (BL : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c s \u2022 ContinuousLinearMap.id \u211d E) :\n (trajectoryOperator (p := 2) BL).IsFredholm := by\n -- The shifted limits `A\u00b1 - \u03b4\u00b1` are symmetric, and injective since `\u03b4\u00b1` is not an eigenvalue.\n exact (isFredholm_trajectoryOperator_iff (hA.sub (hc.smul continuous_const))\n (isSymmetric_sub_smul_id hsymminus (conj_trivial \u03b4minus))\n (isSymmetric_sub_smul_id hsymplus (conj_trivial \u03b4plus))\n (hbot.sub (hcbot.smul_const _)) (htop.sub (hctop.smul_const _)) BL hBL).2\n \u27e8LinearMap.ker_eq_bot.1 (ker_sub_smul_id_eq_bot_of_not_hasEigenvalue h\u03b4minus),\n LinearMap.ker_eq_bot.1 (ker_sub_smul_id_eq_bot_of_not_hasEigenvalue h\u03b4plus)\u27e9\n\n/-- **The index on exponentially weighted spaces.** Let `A` be a continuous family of operators on\na finite-dimensional real inner product space with symmetric limits `A\u00b1` at `\u00b1\u221e`, and let `c` be\na continuous slope tending to `\u03b4\u00b1` at `\u00b1\u221e`, where `\u03b4\u00b1` is not an eigenvalue of `A\u00b1`. Then the\nindex of the trajectory operator `u \u21a6 u' + (A - c) u` from `W^{1,2}(\u211d, E)` to `L\u00b2(\u211d, E)` is the\nnumber of eigenvalues of `A\u207b` below `\u03b4\u207b` minus the number of eigenvalues of `A\u207a` below `\u03b4\u207a`,\ncounted with multiplicity. For `c = w'` this operator is the conjugate of `D_A` on the spaces\nweighted by `exp w`. -/\ntheorem index_trajectoryOperator_sub_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank\n (hA : Continuous A) (hsymminus : (Aminus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hsymplus : (Aplus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hbot : Tendsto A atBot (\ud835\udcdd Aminus)) (htop : Tendsto A atTop (\ud835\udcdd Aplus))\n {c : \u211d \u2192 \u211d} (hc : Continuous c) {\u03b4minus \u03b4plus : \u211d}\n (hcbot : Tendsto c atBot (\ud835\udcdd \u03b4minus)) (hctop : Tendsto c atTop (\ud835\udcdd \u03b4plus))\n (h\u03b4minus : \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03b4minus)\n (h\u03b4plus : \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03b4plus)\n (BL : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c s \u2022 ContinuousLinearMap.id \u211d E) :\n (trajectoryOperator (p := 2) BL).index =\n (Module.finrank \u211d (Module.End.pointSpectralSubspace (Aminus : E \u2192\u2097[\u211d] E) (Iio \u03b4minus)) : \u2124) -\n Module.finrank \u211d (Module.End.pointSpectralSubspace (Aplus : E \u2192\u2097[\u211d] E) (Iio \u03b4plus)) := by\n set I := ContinuousLinearMap.id \u211d E\n -- The shifted limits `A\u00b1 - \u03b4\u00b1` are symmetric, and invertible since `\u03b4\u00b1` is not an eigenvalue.\n have hbound {T : E \u2192L[\u211d] E} {\u03b4 : \u211d} (hT : \u00acModule.End.HasEigenvalue (T : E \u2192\u2097[\u211d] E) \u03b4) :\n \u2203 \u03b1 > 0, \u2200 v, \u03b1 * \u2016v\u2016 \u2264 \u2016(T - \u03b4 \u2022 I) v\u2016 := by\n obtain \u27e8K, -, hKT\u27e9 := LinearMap.exists_antilipschitzWith _\n (ker_sub_smul_id_eq_bot_of_not_hasEigenvalue hT)\n exact antilipschitzWith_iff_exists_mul_le_norm.1 \u27e8K, hKT\u27e9\n obtain \u27e8\u03b1\u2081, h\u03b1\u2081, h\u2081\u27e9 := hbound h\u03b4minus\n obtain \u27e8\u03b1\u2082, h\u03b1\u2082, h\u2082\u27e9 := hbound h\u03b4plus\n have hshift (T : E \u2192L[\u211d] E) (\u03b4 : \u211d) :\n Module.End.pointSpectralSubspace ((T - \u03b4 \u2022 I : E \u2192L[\u211d] E) : E \u2192\u2097[\u211d] E) (Iio 0) =\n Module.End.pointSpectralSubspace (T : E \u2192\u2097[\u211d] E) (Iio \u03b4) := by\n simpa [I] using Module.End.pointSpectralSubspace_sub_smul_id (A := (T : E \u2192\u2097[\u211d] E))\n (\u03a9 := Iio 0) \u03b4\n rw [index_trajectoryOperator_eq_finrank_pointSpectralSubspace_sub_finrank\n (hA.sub (hc.smul continuous_const)) (isSymmetric_sub_smul_id hsymminus (conj_trivial \u03b4minus))\n (isSymmetric_sub_smul_id hsymplus (conj_trivial \u03b4plus)) (lt_min h\u03b1\u2081 h\u03b1\u2082)\n (fun v \u21a6 (mul_le_mul_of_nonneg_right (min_le_left _ _) (norm_nonneg v)).trans (h\u2081 v))\n (fun v \u21a6 (mul_le_mul_of_nonneg_right (min_le_right _ _) (norm_nonneg v)).trans (h\u2082 v))\n (hbot.sub (hcbot.smul_const I)) (htop.sub (hctop.smul_const I)) BL hBL,\n hshift, hshift]\n\n/-- **The index jumps by the eigenvalues crossed by the weight.** Let `c\u2081` and `c\u2082` be continuous\nslopes with non-exceptional limits for the symmetric limits `A\u00b1` of `A`, such that the limits of\n`c\u2082` lie outside those of `c\u2081`: `\u03b4\u2082\u207b \u2264 \u03b4\u2081\u207b` at `-\u221e` and `\u03b4\u2081\u207a \u2264 \u03b4\u2082\u207a` at `+\u221e`, as for a stronger\ndecay weight. Then the index of `u \u21a6 u' + (A - c\u2081) u` exceeds that of `u \u21a6 u' + (A - c\u2082) u` by the\nnumber of eigenvalues of `A\u207b` in `[\u03b4\u2082\u207b, \u03b4\u2081\u207b)` plus the number of eigenvalues of `A\u207a` in\n`[\u03b4\u2081\u207a, \u03b4\u2082\u207a)`, counted with multiplicity. -/\ntheorem index_trajectoryOperator_eq_add_finrank_pointSpectralSubspace_Ico\n (hA : Continuous A) (hsymminus : (Aminus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hsymplus : (Aplus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hbot : Tendsto A atBot (\ud835\udcdd Aminus)) (htop : Tendsto A atTop (\ud835\udcdd Aplus))\n {c\u2081 c\u2082 : \u211d \u2192 \u211d} (hc\u2081 : Continuous c\u2081) (hc\u2082 : Continuous c\u2082)\n {\u03b4\u2081minus \u03b4\u2081plus \u03b4\u2082minus \u03b4\u2082plus : \u211d}\n (hc\u2081bot : Tendsto c\u2081 atBot (\ud835\udcdd \u03b4\u2081minus)) (hc\u2081top : Tendsto c\u2081 atTop (\ud835\udcdd \u03b4\u2081plus))\n (hc\u2082bot : Tendsto c\u2082 atBot (\ud835\udcdd \u03b4\u2082minus)) (hc\u2082top : Tendsto c\u2082 atTop (\ud835\udcdd \u03b4\u2082plus))\n (hminus : \u03b4\u2082minus \u2264 \u03b4\u2081minus) (hplus : \u03b4\u2081plus \u2264 \u03b4\u2082plus)\n (h\u03b4\u2081minus : \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03b4\u2081minus)\n (h\u03b4\u2081plus : \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03b4\u2081plus)\n (h\u03b4\u2082minus : \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03b4\u2082minus)\n (h\u03b4\u2082plus : \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03b4\u2082plus)\n (BL\u2081 BL\u2082 : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL\u2081 : BL\u2081 =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c\u2081 s \u2022 ContinuousLinearMap.id \u211d E)\n (hBL\u2082 : BL\u2082 =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c\u2082 s \u2022 ContinuousLinearMap.id \u211d E) :\n (trajectoryOperator (p := 2) BL\u2081).index =\n (trajectoryOperator (p := 2) BL\u2082).index +\n Module.finrank \u211d\n (Module.End.pointSpectralSubspace (Aminus : E \u2192\u2097[\u211d] E) (Ico \u03b4\u2082minus \u03b4\u2081minus)) +\n Module.finrank \u211d\n (Module.End.pointSpectralSubspace (Aplus : E \u2192\u2097[\u211d] E) (Ico \u03b4\u2081plus \u03b4\u2082plus)) := by\n rw [index_trajectoryOperator_sub_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank hA\n hsymminus hsymplus hbot htop hc\u2081 hc\u2081bot hc\u2081top h\u03b4\u2081minus h\u03b4\u2081plus BL\u2081 hBL\u2081,\n index_trajectoryOperator_sub_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank hA\n hsymminus hsymplus hbot htop hc\u2082 hc\u2082bot hc\u2082top h\u03b4\u2082minus h\u03b4\u2082plus BL\u2082 hBL\u2082,\n Module.End.finrank_pointSpectralSubspace_Iio_eq_add hminus,\n Module.End.finrank_pointSpectralSubspace_Iio_eq_add (A := (Aplus : E \u2192\u2097[\u211d] E)) hplus]\n push_cast\n ring\n\n/-- **Crossing one exceptional value at `+\u221e`.** Let `c\u2081` and `c\u2082` be continuous slopes with the\nsame non-exceptional limit at `-\u221e`, and with limits `\u03b4\u2081 < \u03bd < \u03b4\u2082` at `+\u221e`, where `\u03bd` is the only\neigenvalue of the symmetric limit `A\u207a` in `[\u03b4\u2081, \u03b4\u2082]`. Then the index of `u \u21a6 u' + (A - c\u2081) u`\nexceeds that of `u \u21a6 u' + (A - c\u2082) u` by the multiplicity of `\u03bd`: as the decay weight at `+\u221e`\nincreases through `\u03bd`, the index decreases by the dimension of the eigenspace of `A\u207a` at `\u03bd`. -/\ntheorem index_trajectoryOperator_eq_add_finrank_eigenspace_atTop\n (hA : Continuous A) (hsymminus : (Aminus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hsymplus : (Aplus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hbot : Tendsto A atBot (\ud835\udcdd Aminus)) (htop : Tendsto A atTop (\ud835\udcdd Aplus))\n {c\u2081 c\u2082 : \u211d \u2192 \u211d} (hc\u2081 : Continuous c\u2081) (hc\u2082 : Continuous c\u2082) {\u03b4minus \u03b4\u2081 \u03b4\u2082 \u03bd : \u211d}\n (hc\u2081bot : Tendsto c\u2081 atBot (\ud835\udcdd \u03b4minus)) (hc\u2081top : Tendsto c\u2081 atTop (\ud835\udcdd \u03b4\u2081))\n (hc\u2082bot : Tendsto c\u2082 atBot (\ud835\udcdd \u03b4minus)) (hc\u2082top : Tendsto c\u2082 atTop (\ud835\udcdd \u03b4\u2082))\n (h\u03bd : \u03bd \u2208 Ioo \u03b4\u2081 \u03b4\u2082) (h\u03b4minus : \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03b4minus)\n (h\u03b4\u2081 : \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03b4\u2081)\n (h\u03b4\u2082 : \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03b4\u2082)\n (hother : \u2200 \u03bc \u2208 Ioo \u03b4\u2081 \u03b4\u2082, \u03bc \u2260 \u03bd \u2192 \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03bc)\n (BL\u2081 BL\u2082 : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL\u2081 : BL\u2081 =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c\u2081 s \u2022 ContinuousLinearMap.id \u211d E)\n (hBL\u2082 : BL\u2082 =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c\u2082 s \u2022 ContinuousLinearMap.id \u211d E) :\n (trajectoryOperator (p := 2) BL\u2081).index =\n (trajectoryOperator (p := 2) BL\u2082).index +\n Module.finrank \u211d (Module.End.eigenspace (Aplus : E \u2192\u2097[\u211d] E) \u03bd) := by\n rw [index_trajectoryOperator_eq_add_finrank_pointSpectralSubspace_Ico hA hsymminus hsymplus\n hbot htop hc\u2081 hc\u2082 hc\u2081bot hc\u2081top hc\u2082bot hc\u2082top le_rfl (h\u03bd.1.trans h\u03bd.2).le h\u03b4minus h\u03b4\u2081\n h\u03b4minus h\u03b4\u2082 BL\u2081 BL\u2082 hBL\u2081 hBL\u2082,\n Ico_self, Module.End.pointSpectralSubspace_empty, finrank_bot, Nat.cast_zero, add_zero,\n Module.End.pointSpectralSubspace_Ico_eq_eigenspace (\ud835\udd5c := \u211d) (Ioo_subset_Ico_self h\u03bd) h\u03b4\u2081\n hother,\n RCLike.ofReal_real_eq_id, id_eq]\n\n/-- **Crossing one exceptional value at `-\u221e`.** Let `c\u2081` and `c\u2082` be continuous slopes with the\nsame non-exceptional limit at `+\u221e`, and with limits `\u03b4\u2082 < \u03bd < \u03b4\u2081` at `-\u221e`, where `\u03bd` is the only\neigenvalue of the symmetric limit `A\u207b` in `[\u03b4\u2082, \u03b4\u2081]`. Then the index of `u \u21a6 u' + (A - c\u2081) u`\nexceeds that of `u \u21a6 u' + (A - c\u2082) u` by the multiplicity of `\u03bd`: as the decay weight at `-\u221e`\nstrengthens, its slope decreasing through `\u03bd`, the index decreases by the dimension of the\neigenspace of `A\u207b` at `\u03bd`. -/\ntheorem index_trajectoryOperator_eq_add_finrank_eigenspace_atBot\n (hA : Continuous A) (hsymminus : (Aminus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hsymplus : (Aplus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hbot : Tendsto A atBot (\ud835\udcdd Aminus)) (htop : Tendsto A atTop (\ud835\udcdd Aplus))\n {c\u2081 c\u2082 : \u211d \u2192 \u211d} (hc\u2081 : Continuous c\u2081) (hc\u2082 : Continuous c\u2082) {\u03b4plus \u03b4\u2081 \u03b4\u2082 \u03bd : \u211d}\n (hc\u2081bot : Tendsto c\u2081 atBot (\ud835\udcdd \u03b4\u2081)) (hc\u2081top : Tendsto c\u2081 atTop (\ud835\udcdd \u03b4plus))\n (hc\u2082bot : Tendsto c\u2082 atBot (\ud835\udcdd \u03b4\u2082)) (hc\u2082top : Tendsto c\u2082 atTop (\ud835\udcdd \u03b4plus))\n (h\u03bd : \u03bd \u2208 Ioo \u03b4\u2082 \u03b4\u2081) (h\u03b4plus : \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03b4plus)\n (h\u03b4\u2081 : \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03b4\u2081)\n (h\u03b4\u2082 : \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03b4\u2082)\n (hother : \u2200 \u03bc \u2208 Ioo \u03b4\u2082 \u03b4\u2081, \u03bc \u2260 \u03bd \u2192 \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03bc)\n (BL\u2081 BL\u2082 : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL\u2081 : BL\u2081 =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c\u2081 s \u2022 ContinuousLinearMap.id \u211d E)\n (hBL\u2082 : BL\u2082 =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c\u2082 s \u2022 ContinuousLinearMap.id \u211d E) :\n (trajectoryOperator (p := 2) BL\u2081).index =\n (trajectoryOperator (p := 2) BL\u2082).index +\n Module.finrank \u211d (Module.End.eigenspace (Aminus : E \u2192\u2097[\u211d] E) \u03bd) := by\n rw [index_trajectoryOperator_eq_add_finrank_pointSpectralSubspace_Ico hA hsymminus hsymplus\n hbot htop hc\u2081 hc\u2082 hc\u2081bot hc\u2081top hc\u2082bot hc\u2082top (h\u03bd.1.trans h\u03bd.2).le le_rfl h\u03b4\u2081 h\u03b4plus\n h\u03b4\u2082 h\u03b4plus BL\u2081 BL\u2082 hBL\u2081 hBL\u2082,\n Ico_self, Module.End.pointSpectralSubspace_empty, finrank_bot, Nat.cast_zero, add_zero,\n Module.End.pointSpectralSubspace_Ico_eq_eigenspace (\ud835\udd5c := \u211d) (Ioo_subset_Ico_self h\u03bd) h\u03b4\u2082\n hother,\n RCLike.ofReal_real_eq_id, id_eq]\n\n/-- **The index for small decay weights.** Let `\u03b4minus > 0` be smaller than the absolute value of\nevery negative eigenvalue of `A\u207b`, let `\u03b4plus > 0` be smaller than every positive eigenvalue of\n`A\u207a`, and let `c` be a continuous slope with limits `-\u03b4minus` at `-\u221e` and `\u03b4plus` at `+\u221e`, as for\na decay weight equal to `\u03b4minus |s|` near `-\u221e` and to `\u03b4plus |s|` near `+\u221e`. Then the index of\n`u \u21a6 u' + (A - c) u` is the number of negative eigenvalues of `A\u207b`, minus the number of negative\neigenvalues of `A\u207a`, minus the dimension of the kernel of `A\u207a`: the kernel of the limit at `+\u221e`\nis counted as negative, and that at `-\u221e` as positive. -/\ntheorem index_trajectoryOperator_sub_smul_id_eq_finrank_sub_finrank_sub_finrank_ker\n (hA : Continuous A) (hsymminus : (Aminus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hsymplus : (Aplus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hbot : Tendsto A atBot (\ud835\udcdd Aminus)) (htop : Tendsto A atTop (\ud835\udcdd Aplus))\n {c : \u211d \u2192 \u211d} (hc : Continuous c) {\u03b4minus \u03b4plus : \u211d} (h\u03b4minus : 0 < \u03b4minus)\n (h\u03b4plus : 0 < \u03b4plus) (hcbot : Tendsto c atBot (\ud835\udcdd (-\u03b4minus)))\n (hctop : Tendsto c atTop (\ud835\udcdd \u03b4plus))\n (hgapminus : \u2200 \u03bc \u2208 Ico (-\u03b4minus) 0, \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03bc)\n (hgapplus : \u2200 \u03bc \u2208 Ioc 0 \u03b4plus, \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03bc)\n (BL : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c s \u2022 ContinuousLinearMap.id \u211d E) :\n (trajectoryOperator (p := 2) BL).index =\n (Module.finrank \u211d (Module.End.pointSpectralSubspace (Aminus : E \u2192\u2097[\u211d] E) (Iio 0)) : \u2124) -\n Module.finrank \u211d (Module.End.pointSpectralSubspace (Aplus : E \u2192\u2097[\u211d] E) (Iio 0)) -\n Module.finrank \u211d (LinearMap.ker (Aplus : E \u2192\u2097[\u211d] E)) := by\n rw [index_trajectoryOperator_sub_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank hA\n hsymminus hsymplus hbot htop hc hcbot hctop (hgapminus _ \u27e8le_rfl, neg_lt_zero.2 h\u03b4minus\u27e9)\n (hgapplus _ \u27e8h\u03b4plus, le_rfl\u27e9) BL hBL]\n -- No eigenvalue of `A\u207b` lies in `[-\u03b4minus, 0)`, and the only one of `A\u207a` in `[0, \u03b4plus)` is\n -- `0`, whose eigenspace is the kernel.\n have hplus : Module.End.pointSpectralSubspace (Aplus : E \u2192\u2097[\u211d] E) (Ico 0 \u03b4plus) =\n LinearMap.ker (Aplus : E \u2192\u2097[\u211d] E) := by\n rw [Module.End.pointSpectralSubspace_eq_eigenspace (\ud835\udd5c := \u211d) (\u03a9 := Ico 0 \u03b4plus) (\u03bc := 0)\n \u27e8le_rfl, h\u03b4plus\u27e9\n fun \u03bd h\u03bd h\u03bd0 \u21a6 not_not.1 (Module.End.hasEigenvalue_iff.not.1\n (hgapplus \u03bd \u27e8lt_of_le_of_ne h\u03bd.1 h\u03bd0.symm, h\u03bd.2.le\u27e9))]\n simp\n rw [Module.End.finrank_pointSpectralSubspace_Iio_eq_add (A := (Aminus : E \u2192\u2097[\u211d] E))\n (neg_nonpos.2 h\u03b4minus.le),\n Module.End.finrank_pointSpectralSubspace_Iio_eq_add (A := (Aplus : E \u2192\u2097[\u211d] E)) h\u03b4plus.le,\n Module.End.pointSpectralSubspace_eq_bot_iff.2 hgapminus, finrank_bot, hplus]\n push_cast\n ring\n\n/-- **The index for the symmetric weight `\u03b4 log (cosh s)`.** Let `A` be a continuous family with\nsymmetric limits `A\u00b1`, and let `\u03b4` be a real number such that `-\u03b4` is not an eigenvalue of `A\u207b`\nand `\u03b4` is not an eigenvalue of `A\u207a`. The weight `\u03b4 log (cosh s)`, which is `\u03b4 |s|` up to a\nbounded error, has slope `\u03b4 tanh s`, and the index of `u \u21a6 u' + (A - \u03b4 tanh s) u` is the number of\neigenvalues of `A\u207b` below `-\u03b4` minus the number of eigenvalues of `A\u207a` below `\u03b4`. -/\ntheorem index_trajectoryOperator_sub_mul_tanh_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank\n (hA : Continuous A) (hsymminus : (Aminus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hsymplus : (Aplus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hbot : Tendsto A atBot (\ud835\udcdd Aminus)) (htop : Tendsto A atTop (\ud835\udcdd Aplus)) {\u03b4 : \u211d}\n (h\u03b4minus : \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) (-\u03b4))\n (h\u03b4plus : \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03b4)\n (BL : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - (\u03b4 * Real.tanh s) \u2022 ContinuousLinearMap.id \u211d E) :\n (trajectoryOperator (p := 2) BL).index =\n (Module.finrank \u211d (Module.End.pointSpectralSubspace (Aminus : E \u2192\u2097[\u211d] E) (Iio (-\u03b4))) : \u2124) -\n Module.finrank \u211d (Module.End.pointSpectralSubspace (Aplus : E \u2192\u2097[\u211d] E) (Iio \u03b4)) :=\n index_trajectoryOperator_sub_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank hA hsymminus\n hsymplus hbot htop (c := fun s \u21a6 \u03b4 * Real.tanh s) (continuous_const.mul Real.continuous_tanh)\n (by simpa using Real.tendsto_tanh_atBot.const_mul \u03b4)\n (by simpa using Real.tendsto_tanh_atTop.const_mul \u03b4) h\u03b4minus h\u03b4plus BL hBL\n\nsection Scalar\n\n/-- **The index for scalar limits.** Let `B` be a continuous family of operators on a\nfinite-dimensional real inner product space `E` whose limits at `\u00b1\u221e` are nonzero scalars\n`b\u00b1 \u2022 id`. Then the trajectory operator `u \u21a6 u' + B u` has index `dim E` when `b\u207b < 0 < b\u207a`,\n`-dim E` when `b\u207a < 0 < b\u207b`, and `0` when `b\u207b` and `b\u207a` have the same sign: each limit has the\nsingle eigenvalue `b\u00b1`, of multiplicity `dim E`. -/\ntheorem index_trajectoryOperator_of_tendsto_smul_id {B : \u211d \u2192 E \u2192L[\u211d] E} (hB : Continuous B)\n {bminus bplus : \u211d} (hbot : Tendsto B atBot (\ud835\udcdd (bminus \u2022 ContinuousLinearMap.id \u211d E)))\n (htop : Tendsto B atTop (\ud835\udcdd (bplus \u2022 ContinuousLinearMap.id \u211d E)))\n (hbminus : bminus \u2260 0) (hbplus : bplus \u2260 0)\n (BL : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)] B) :\n (trajectoryOperator (p := 2) BL).index =\n (if bminus < 0 then (Module.finrank \u211d E : \u2124) else 0) -\n if bplus < 0 then (Module.finrank \u211d E : \u2124) else 0 := by\n have hcoe (b : \u211d) :\n ((b \u2022 ContinuousLinearMap.id \u211d E : E \u2192L[\u211d] E) : E \u2192\u2097[\u211d] E) = b \u2022 LinearMap.id := by\n rw [ContinuousLinearMap.toLinearMap_smul, ContinuousLinearMap.coe_id]\n have hsym (b : \u211d) : ((b \u2022 ContinuousLinearMap.id \u211d E : E \u2192L[\u211d] E) : E \u2192\u2097[\u211d] E).IsSymmetric := by\n simpa using LinearMap.IsSymmetric.id.smul (conj_trivial b)\n -- The scalar `b` has the single eigenvalue `b`. The lemmas on scalars are stated over `RCLike`;\n -- over `\u211d` the cast `\u211d \u2192 \u211d` is the identity.\n have hscalar (b : \u211d) (\u03a9 : Set \u211d) (hb : b \u2209 \u03a9) : Module.End.pointSpectralSubspace\n ((b \u2022 ContinuousLinearMap.id \u211d E : E \u2192L[\u211d] E) : E \u2192\u2097[\u211d] E) \u03a9 = \u22a5 := by\n have hs := Module.End.pointSpectralSubspace_smul_id_of_notMem (\ud835\udd5c := \u211d) (E := E) hb\n simp only [RCLike.ofReal_real_eq_id, id_eq] at hs\n rw [hcoe, hs]\n have hne {b : \u211d} (hb : b \u2260 0) :\n \u00acModule.End.HasEigenvalue ((b \u2022 ContinuousLinearMap.id \u211d E : E \u2192L[\u211d] E) : E \u2192\u2097[\u211d] E) 0 := by\n simpa using Module.End.pointSpectralSubspace_eq_bot_iff.mp\n (hscalar b {0} (notMem_singleton_iff.2 hb)) 0 (mem_singleton 0)\n have hfinrank (b : \u211d) : (Module.finrank \u211d (Module.End.pointSpectralSubspace\n ((b \u2022 ContinuousLinearMap.id \u211d E : E \u2192L[\u211d] E) : E \u2192\u2097[\u211d] E) (Iio 0)) : \u2124) =\n if b < 0 then (Module.finrank \u211d E : \u2124) else 0 := by\n split_ifs with h\n \u00b7 have hs := Module.End.pointSpectralSubspace_smul_id_of_mem (\ud835\udd5c := \u211d) (E := E) (\u03a9 := Iio 0) h\n simp only [RCLike.ofReal_real_eq_id, id_eq] at hs\n rw [hcoe, hs, finrank_top]\n \u00b7 rw [hscalar b _ h, finrank_bot, Nat.cast_zero]\n rw [index_trajectoryOperator_sub_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank\n (c := fun _ \u21a6 0) hB (hsym bminus) (hsym bplus) hbot htop continuous_const tendsto_const_nhds\n tendsto_const_nhds (hne hbminus) (hne hbplus) BL (by simpa using hBL),\n hfinrank, hfinrank]\n\n/-- **The scalar example.** For the constant coefficient `a \u2022 id` on a finite-dimensional real\ninner product space `E` and a continuous slope `c` with limits `\u03b4\u00b1` different from `a`, the\ntrajectory operator `u \u21a6 u' + (a - c) u` has index `dim E` when `\u03b4\u207a < a < \u03b4\u207b`, `-dim E` when\n`\u03b4\u207b < a < \u03b4\u207a`, and `0` when `\u03b4\u207b` and `\u03b4\u207a` lie on the same side of `a`. This is\n`index_trajectoryOperator_of_tendsto_smul_id` for the limits `(a - \u03b4\u00b1) \u2022 id`. In particular, for\n`a = 0` the operator `d/ds`, which is not Fredholm on unweighted spaces when `E \u2260 0`, has index\n`-dim E` for decay weights (`\u03b4\u207b < 0 < \u03b4\u207a`) and `dim E` for growth weights (`\u03b4\u207a < 0 < \u03b4\u207b`). -/\ntheorem index_trajectoryOperator_smul_id_sub_smul_id (a : \u211d) {c : \u211d \u2192 \u211d} (hc : Continuous c)\n {\u03b4minus \u03b4plus : \u211d} (hcbot : Tendsto c atBot (\ud835\udcdd \u03b4minus)) (hctop : Tendsto c atTop (\ud835\udcdd \u03b4plus))\n (hminus : \u03b4minus \u2260 a) (hplus : \u03b4plus \u2260 a)\n (BL : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 a \u2022 ContinuousLinearMap.id \u211d E - c s \u2022 ContinuousLinearMap.id \u211d E) :\n (trajectoryOperator (p := 2) BL).index =\n (if a < \u03b4minus then (Module.finrank \u211d E : \u2124) else 0) -\n if a < \u03b4plus then (Module.finrank \u211d E : \u2124) else 0 := by\n have hlim {l : Filter \u211d} {\u03b4 : \u211d} (h : Tendsto c l (\ud835\udcdd \u03b4)) :\n Tendsto (fun s \u21a6 a \u2022 ContinuousLinearMap.id \u211d E - c s \u2022 ContinuousLinearMap.id \u211d E) l\n (\ud835\udcdd ((a - \u03b4) \u2022 ContinuousLinearMap.id \u211d E)) := by\n rw [sub_smul]\n exact tendsto_const_nhds.sub (h.smul_const _)\n rw [index_trajectoryOperator_of_tendsto_smul_id (continuous_const.sub (hc.smul continuous_const))\n (hlim hcbot) (hlim hctop) (sub_ne_zero.2 hminus.symm) (sub_ne_zero.2 hplus.symm) BL hBL]\n simp only [sub_neg]\n\nvariable {a \u03b4 : \u211d}\n\n/-- The index of the scalar operator `u \u21a6 u' + (a - \u03b4 tanh s) u`, by the scalar example\n`index_trajectoryOperator_smul_id_sub_smul_id` for the slope `\u03b4 tanh s`, whose limits are `\u2213\u03b4`\nat `\u2213\u221e`. -/\nprivate theorem index_trajectoryOperator_smul_id_sub_mul_tanh_smul_id (h\u2081 : a \u2260 -\u03b4)\n (h\u2082 : a \u2260 \u03b4) (BL : Lp (\u211d \u2192L[\u211d] \u211d) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 a \u2022 ContinuousLinearMap.id \u211d \u211d - (\u03b4 * Real.tanh s) \u2022 ContinuousLinearMap.id \u211d \u211d) :\n (trajectoryOperator (p := 2) BL).index =\n (if a < -\u03b4 then 1 else 0 : \u2124) - (if a < \u03b4 then 1 else 0 : \u2124) := by\n rw [index_trajectoryOperator_smul_id_sub_smul_id a (c := fun s \u21a6 \u03b4 * Real.tanh s)\n (continuous_const.mul Real.continuous_tanh)\n (by simpa using Real.tendsto_tanh_atBot.const_mul \u03b4)\n (by simpa using Real.tendsto_tanh_atTop.const_mul \u03b4) h\u2081.symm h\u2082.symm BL hBL,\n Module.finrank_self, Nat.cast_one]\n\n/-- **The scalar crossing below the rate.** For `|\u03b4| < |a|`, the operator\n`u \u21a6 u' + (a - \u03b4 tanh s) u` on `W^{1,2}(\u211d)`, the conjugate of `u \u21a6 u' + a u` on the spaces weighted\nby `exp (\u03b4 log (cosh s))`, has index `0`. -/\ntheorem index_trajectoryOperator_smul_id_sub_mul_tanh_smul_id_eq_zero_of_abs_lt_abs\n (h\u03b4a : |\u03b4| < |a|) (BL : Lp (\u211d \u2192L[\u211d] \u211d) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 a \u2022 ContinuousLinearMap.id \u211d \u211d - (\u03b4 * Real.tanh s) \u2022 ContinuousLinearMap.id \u211d \u211d) :\n (trajectoryOperator (p := 2) BL).index = 0 := by\n rw [index_trajectoryOperator_smul_id_sub_mul_tanh_smul_id (by rintro rfl; simp at h\u03b4a)\n (by rintro rfl; simp at h\u03b4a) BL hBL]\n have h\u03b4\u2081 := le_abs_self \u03b4\n have h\u03b4\u2082 := neg_abs_le \u03b4\n rcases lt_abs.mp h\u03b4a with h | h\n \u00b7 simp [show \u00aca < -\u03b4 by linarith, show \u00aca < \u03b4 by linarith]\n \u00b7 simp [show a < -\u03b4 by linarith, show a < \u03b4 by linarith]\n\n/-- **The scalar crossing above the rate.** For `\u03b4 > |a|`, the operator\n`u \u21a6 u' + (a - \u03b4 tanh s) u` on `W^{1,2}(\u211d)`, the conjugate of `u \u21a6 u' + a u` on the spaces weighted\nby `exp (\u03b4 log (cosh s))`, has index `-1`. -/\ntheorem index_trajectoryOperator_smul_id_sub_mul_tanh_smul_id_eq_neg_one_of_abs_lt (h\u03b4a : |a| < \u03b4)\n (BL : Lp (\u211d \u2192L[\u211d] \u211d) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 a \u2022 ContinuousLinearMap.id \u211d \u211d - (\u03b4 * Real.tanh s) \u2022 ContinuousLinearMap.id \u211d \u211d) :\n (trajectoryOperator (p := 2) BL).index = -1 := by\n obtain \u27e8h\u2081, h\u2082\u27e9 := abs_lt.mp h\u03b4a\n rw [index_trajectoryOperator_smul_id_sub_mul_tanh_smul_id h\u2081.ne' h\u2082.ne BL hBL]\n simp [show \u00aca < -\u03b4 by linarith, show a < \u03b4 by linarith]\n\nend Scalar\n\nend TauCeti.WeakDerivStep\n", "public_theorems": ["TauCeti.WeakDerivStep.isFredholm_trajectoryOperator_sub_smul_id", "TauCeti.WeakDerivStep.index_trajectoryOperator_sub_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank", "TauCeti.WeakDerivStep.index_trajectoryOperator_eq_add_finrank_pointSpectralSubspace_Ico", "TauCeti.WeakDerivStep.index_trajectoryOperator_eq_add_finrank_eigenspace_atTop", "TauCeti.WeakDerivStep.index_trajectoryOperator_eq_add_finrank_eigenspace_atBot", "TauCeti.WeakDerivStep.index_trajectoryOperator_sub_smul_id_eq_finrank_sub_finrank_sub_finrank_ker", "TauCeti.WeakDerivStep.index_trajectoryOperator_sub_mul_tanh_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank", "TauCeti.WeakDerivStep.index_trajectoryOperator_of_tendsto_smul_id", "TauCeti.WeakDerivStep.index_trajectoryOperator_smul_id_sub_smul_id", "TauCeti.WeakDerivStep.index_trajectoryOperator_smul_id_sub_mul_tanh_smul_id_eq_zero_of_abs_lt_abs", "TauCeti.WeakDerivStep.index_trajectoryOperator_smul_id_sub_mul_tanh_smul_id_eq_neg_one_of_abs_lt"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Analysis.ODE.EnergyEstimate.Index\nimport TauCeti.Analysis.SpecialFunctions.Hyperbolic\n\n/-!\n# The index of the trajectory operator as a weight crosses an eigenvalue\n\nLet `A : \u211d \u2192 End(E)` be a continuous family of operators on a finite-dimensional real inner\nproduct space `E` with symmetric limits `A\u00b1` at `\u00b1\u221e`. Multiplication by `exp w` conjugates the\ntrajectory operator `D_A u = u' + A u` on the weighted spaces `{u | exp w \u2022 u \u2208 W^{1,2}}` to the\nunweighted trajectory operator `D_{A - w'}` (see `TauCeti.Analysis.ODE.EnergyEstimate.Weighted`).\nWhen the slope `w'` tends to `\u03b4\u00b1` at `\u00b1\u221e`, the limits of `A - w'` are `A\u00b1 - \u03b4\u00b1`, which are\ninvertible when `\u03b4\u00b1` is not an eigenvalue of `A\u00b1`. For these non-exceptional weights the weighted\noperator is Fredholm, and this file computes its index:\n\n`ind D_{A - w'} = n_{< \u03b4\u207b}(A\u207b) - n_{< \u03b4\u207a}(A\u207a)`,\n\nwhere `n_{< \u03b4}(B)` is the number of eigenvalues of `B` below `\u03b4`, counted with multiplicity\n(`index_trajectoryOperator_sub_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank`).\nThis is the index formula for invertible symmetric limits\n(`TauCeti.WeakDerivStep.index_trajectoryOperator_eq_finrank_pointSpectralSubspace_sub_finrank`)\napplied to the shifted limits, since the eigenvalues of `A\u00b1 - \u03b4\u00b1` are those of `A\u00b1` shifted by\n`-\u03b4\u00b1` (`Module.End.pointSpectralSubspace_sub_smul_id`).\n\nConsequently the index depends on the weight only through the position of its slopes relative to\nthe spectra of the limits, and it changes only when a slope crosses an eigenvalue. A decay weight\n`exp (\u03b4 |s|)` has slopes `\u03b4\u207a = \u03b4` and `\u03b4\u207b = -\u03b4`; making it stronger moves `\u03b4\u207a` up and `\u03b4\u207b` down,\nand the index decreases by the number of eigenvalues of `A\u207a` crossed by `\u03b4\u207a` plus the number of\neigenvalues of `A\u207b` crossed by `\u03b4\u207b`, counted with multiplicity\n(`TauCeti.WeakDerivStep.index_trajectoryOperator_eq_add_finrank_pointSpectralSubspace_Ico`). In\nparticular, as the weight increases through one exceptional value at either end, the index\ndecreases by the multiplicity of the crossed eigenvalue\n(`TauCeti.WeakDerivStep.index_trajectoryOperator_eq_add_finrank_eigenspace_atTop` and\n`TauCeti.WeakDerivStep.index_trajectoryOperator_eq_add_finrank_eigenspace_atBot`).\nThe weights below the spectral gap of `TauCeti.Analysis.ODE.EnergyEstimate.Weighted` cross no\neigenvalue, and leave the index unchanged. The limits `A\u00b1` may have kernels: for small decay\nweights, with slopes `\u03b4\u207b < 0 < \u03b4\u207a` closer to `0` than every nonzero eigenvalue of the respective\nlimits, the index is `n\u207b(A\u207b) - n\u207b(A\u207a) - dim ker A\u207a`, so the kernel of the limit at `+\u221e` is counted\nas negative and that at `-\u221e` as positive\n(`index_trajectoryOperator_sub_smul_id_eq_finrank_sub_finrank_sub_finrank_ker`, in\n`TauCeti.WeakDerivStep`).\n\nFor the symmetric weight `w(s) = \u03b4 log (cosh s)`, which is `\u03b4 |s|` up to a bounded error, the slope\nis `\u03b4 tanh s` and the index is `n_{< -\u03b4}(A\u207b) - n_{< \u03b4}(A\u207a)`\n(`index_trajectoryOperator_sub_mul_tanh_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank`).\nFor a continuous family `B` with nonzero scalar limits `b\u00b1 \u2022 id` the index is `dim E` when\n`b\u207b < 0 < b\u207a`, `-dim E` when `b\u207a < 0 < b\u207b`, and `0` otherwise\n(`TauCeti.WeakDerivStep.index_trajectoryOperator_of_tendsto_smul_id`). In particular, for a\nconstant scalar coefficient `a \u2022 id` on `E` the index is `dim E` when `\u03b4\u207a < a < \u03b4\u207b`,\n`-dim E` when `\u03b4\u207b < a < \u03b4\u207a`, and `0` when `\u03b4\u207b` and `\u03b4\u207a` lie on the same side of `a`\n(`TauCeti.WeakDerivStep.index_trajectoryOperator_smul_id_sub_smul_id`); for `a = 0` the\nunweighted operator `d/ds`, which is not Fredholm when `E \u2260 0`, becomes Fredholm of index\n`-dim E` for decay weights and of index `dim E` for growth weights.\nIn the scalar case `E = \u211d` with constant coefficient `a`, the operator `u \u21a6 u' + (a - \u03b4 tanh s) u`\nhas index `0` for `|\u03b4| < |a|` and index `-1` for `\u03b4 > |a|`: as `\u03b4` increases through `|a|`, one\nof the two slopes `\u00b1\u03b4` crosses the simple eigenvalue `a` of the limits.\n\n## Main results\n\nIn the namespace `TauCeti.WeakDerivStep`:\n\n* `isFredholm_trajectoryOperator_sub_smul_id`: `D_{A - c}` is Fredholm for slopes `c` with\n non-exceptional limits `\u03b4\u00b1`.\n* `index_trajectoryOperator_sub_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank`: the index of\n `D_{A - c}` for slopes `c` with non-exceptional limits `\u03b4\u00b1` is `n_{< \u03b4\u207b}(A\u207b) - n_{< \u03b4\u207a}(A\u207a)`.\n* `index_trajectoryOperator_eq_add_finrank_pointSpectralSubspace_Ico`: moving the limits of the\n slope outward changes the index by the number of eigenvalues crossed at the two ends.\n* `index_trajectoryOperator_eq_add_finrank_eigenspace_atTop`,\n `index_trajectoryOperator_eq_add_finrank_eigenspace_atBot`: crossing one eigenvalue\n at one end changes the index by its multiplicity.\n* `index_trajectoryOperator_sub_smul_id_eq_finrank_sub_finrank_sub_finrank_ker`: small decay\n weights give the index `n\u207b(A\u207b) - n\u207b(A\u207a) - dim ker A\u207a`.\n* `index_trajectoryOperator_sub_mul_tanh_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank`:\n the index for the symmetric weight `\u03b4 log (cosh s)`.\n* `index_trajectoryOperator_of_tendsto_smul_id`: the index for nonzero scalar limits.\n* `index_trajectoryOperator_smul_id_sub_smul_id`: the index for a constant scalar coefficient on\n `E`.\n* `index_trajectoryOperator_smul_id_sub_mul_tanh_smul_id_eq_zero_of_abs_lt_abs`,\n `index_trajectoryOperator_smul_id_sub_mul_tanh_smul_id_eq_neg_one_of_abs_lt`: the scalar crossing,\n index `0` below `|a|` and `-1` above it.\n\n## References\n\n* R. B. Lockhart and R. C. McOwen, *Elliptic differential operators on noncompact manifolds*,\n Ann. Scuola Norm. Sup. Pisa Cl. Sci. (4) **12** (1985), 409\u2013447 (the index on weighted spaces\n is locally constant in the weight and jumps at the exceptional weights by the dimension of the\n crossed asymptotic eigenspace).\n-/\n\npublic section\n\nnoncomputable section\n\nopen MeasureTheory TopologicalSpace Set Filter\nopen scoped ENNReal Topology InnerProductSpace\nopen ContinuousLinearMap (isSymmetric_sub_smul_id ker_sub_smul_id_eq_bot_of_not_hasEigenvalue)\n\nnamespace TauCeti.WeakDerivStep\n\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace \u211d E] [FiniteDimensional \u211d E]\n {A : \u211d \u2192 E \u2192L[\u211d] E} {Aminus Aplus : E \u2192L[\u211d] E}", "/-- **The weighted trajectory operator is Fredholm.** Let `A` be a continuous family of operators\non a finite-dimensional real inner product space with symmetric limits `A\u00b1` at `\u00b1\u221e`, and let `c`\nbe a continuous slope tending to `\u03b4\u00b1` at `\u00b1\u221e`, where `\u03b4\u00b1` is not an eigenvalue of `A\u00b1`. Then the\ntrajectory operator `u \u21a6 u' + (A - c) u` from `W^{1,2}(\u211d, E)` to `L\u00b2(\u211d, E)` is Fredholm. For\n`c = w'` this operator is the conjugate of `D_A` on the spaces weighted by `exp w`. -/\ntheorem isFredholm_trajectoryOperator_sub_smul_id\n (hA : Continuous A) (hsymminus : (Aminus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hsymplus : (Aplus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hbot : Tendsto A atBot (\ud835\udcdd Aminus)) (htop : Tendsto A atTop (\ud835\udcdd Aplus))\n {c : \u211d \u2192 \u211d} (hc : Continuous c) {\u03b4minus \u03b4plus : \u211d}\n (hcbot : Tendsto c atBot (\ud835\udcdd \u03b4minus)) (hctop : Tendsto c atTop (\ud835\udcdd \u03b4plus))\n (h\u03b4minus : \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03b4minus)\n (h\u03b4plus : \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03b4plus)\n (BL : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c s \u2022 ContinuousLinearMap.id \u211d E) :\n (trajectoryOperator (p := 2) BL).IsFredholm :=", "/-- **The index on exponentially weighted spaces.** Let `A` be a continuous family of operators on\na finite-dimensional real inner product space with symmetric limits `A\u00b1` at `\u00b1\u221e`, and let `c` be\na continuous slope tending to `\u03b4\u00b1` at `\u00b1\u221e`, where `\u03b4\u00b1` is not an eigenvalue of `A\u00b1`. Then the\nindex of the trajectory operator `u \u21a6 u' + (A - c) u` from `W^{1,2}(\u211d, E)` to `L\u00b2(\u211d, E)` is the\nnumber of eigenvalues of `A\u207b` below `\u03b4\u207b` minus the number of eigenvalues of `A\u207a` below `\u03b4\u207a`,\ncounted with multiplicity. For `c = w'` this operator is the conjugate of `D_A` on the spaces\nweighted by `exp w`. -/\ntheorem index_trajectoryOperator_sub_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank\n (hA : Continuous A) (hsymminus : (Aminus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hsymplus : (Aplus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hbot : Tendsto A atBot (\ud835\udcdd Aminus)) (htop : Tendsto A atTop (\ud835\udcdd Aplus))\n {c : \u211d \u2192 \u211d} (hc : Continuous c) {\u03b4minus \u03b4plus : \u211d}\n (hcbot : Tendsto c atBot (\ud835\udcdd \u03b4minus)) (hctop : Tendsto c atTop (\ud835\udcdd \u03b4plus))\n (h\u03b4minus : \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03b4minus)\n (h\u03b4plus : \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03b4plus)\n (BL : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c s \u2022 ContinuousLinearMap.id \u211d E) :\n (trajectoryOperator (p := 2) BL).index =\n (Module.finrank \u211d (Module.End.pointSpectralSubspace (Aminus : E \u2192\u2097[\u211d] E) (Iio \u03b4minus)) : \u2124) -\n Module.finrank \u211d (Module.End.pointSpectralSubspace (Aplus : E \u2192\u2097[\u211d] E) (Iio \u03b4plus)) :=", "/-- **The index jumps by the eigenvalues crossed by the weight.** Let `c\u2081` and `c\u2082` be continuous\nslopes with non-exceptional limits for the symmetric limits `A\u00b1` of `A`, such that the limits of\n`c\u2082` lie outside those of `c\u2081`: `\u03b4\u2082\u207b \u2264 \u03b4\u2081\u207b` at `-\u221e` and `\u03b4\u2081\u207a \u2264 \u03b4\u2082\u207a` at `+\u221e`, as for a stronger\ndecay weight. Then the index of `u \u21a6 u' + (A - c\u2081) u` exceeds that of `u \u21a6 u' + (A - c\u2082) u` by the\nnumber of eigenvalues of `A\u207b` in `[\u03b4\u2082\u207b, \u03b4\u2081\u207b)` plus the number of eigenvalues of `A\u207a` in\n`[\u03b4\u2081\u207a, \u03b4\u2082\u207a)`, counted with multiplicity. -/\ntheorem index_trajectoryOperator_eq_add_finrank_pointSpectralSubspace_Ico\n (hA : Continuous A) (hsymminus : (Aminus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hsymplus : (Aplus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hbot : Tendsto A atBot (\ud835\udcdd Aminus)) (htop : Tendsto A atTop (\ud835\udcdd Aplus))\n {c\u2081 c\u2082 : \u211d \u2192 \u211d} (hc\u2081 : Continuous c\u2081) (hc\u2082 : Continuous c\u2082)\n {\u03b4\u2081minus \u03b4\u2081plus \u03b4\u2082minus \u03b4\u2082plus : \u211d}\n (hc\u2081bot : Tendsto c\u2081 atBot (\ud835\udcdd \u03b4\u2081minus)) (hc\u2081top : Tendsto c\u2081 atTop (\ud835\udcdd \u03b4\u2081plus))\n (hc\u2082bot : Tendsto c\u2082 atBot (\ud835\udcdd \u03b4\u2082minus)) (hc\u2082top : Tendsto c\u2082 atTop (\ud835\udcdd \u03b4\u2082plus))\n (hminus : \u03b4\u2082minus \u2264 \u03b4\u2081minus) (hplus : \u03b4\u2081plus \u2264 \u03b4\u2082plus)\n (h\u03b4\u2081minus : \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03b4\u2081minus)\n (h\u03b4\u2081plus : \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03b4\u2081plus)\n (h\u03b4\u2082minus : \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03b4\u2082minus)\n (h\u03b4\u2082plus : \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03b4\u2082plus)\n (BL\u2081 BL\u2082 : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL\u2081 : BL\u2081 =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c\u2081 s \u2022 ContinuousLinearMap.id \u211d E)\n (hBL\u2082 : BL\u2082 =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c\u2082 s \u2022 ContinuousLinearMap.id \u211d E) :\n (trajectoryOperator (p := 2) BL\u2081).index =\n (trajectoryOperator (p := 2) BL\u2082).index +\n Module.finrank \u211d\n (Module.End.pointSpectralSubspace (Aminus : E \u2192\u2097[\u211d] E) (Ico \u03b4\u2082minus \u03b4\u2081minus)) +\n Module.finrank \u211d\n (Module.End.pointSpectralSubspace (Aplus : E \u2192\u2097[\u211d] E) (Ico \u03b4\u2081plus \u03b4\u2082plus)) :=", "/-- **Crossing one exceptional value at `+\u221e`.** Let `c\u2081` and `c\u2082` be continuous slopes with the\nsame non-exceptional limit at `-\u221e`, and with limits `\u03b4\u2081 < \u03bd < \u03b4\u2082` at `+\u221e`, where `\u03bd` is the only\neigenvalue of the symmetric limit `A\u207a` in `[\u03b4\u2081, \u03b4\u2082]`. Then the index of `u \u21a6 u' + (A - c\u2081) u`\nexceeds that of `u \u21a6 u' + (A - c\u2082) u` by the multiplicity of `\u03bd`: as the decay weight at `+\u221e`\nincreases through `\u03bd`, the index decreases by the dimension of the eigenspace of `A\u207a` at `\u03bd`. -/\ntheorem index_trajectoryOperator_eq_add_finrank_eigenspace_atTop\n (hA : Continuous A) (hsymminus : (Aminus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hsymplus : (Aplus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hbot : Tendsto A atBot (\ud835\udcdd Aminus)) (htop : Tendsto A atTop (\ud835\udcdd Aplus))\n {c\u2081 c\u2082 : \u211d \u2192 \u211d} (hc\u2081 : Continuous c\u2081) (hc\u2082 : Continuous c\u2082) {\u03b4minus \u03b4\u2081 \u03b4\u2082 \u03bd : \u211d}\n (hc\u2081bot : Tendsto c\u2081 atBot (\ud835\udcdd \u03b4minus)) (hc\u2081top : Tendsto c\u2081 atTop (\ud835\udcdd \u03b4\u2081))\n (hc\u2082bot : Tendsto c\u2082 atBot (\ud835\udcdd \u03b4minus)) (hc\u2082top : Tendsto c\u2082 atTop (\ud835\udcdd \u03b4\u2082))\n (h\u03bd : \u03bd \u2208 Ioo \u03b4\u2081 \u03b4\u2082) (h\u03b4minus : \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03b4minus)\n (h\u03b4\u2081 : \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03b4\u2081)\n (h\u03b4\u2082 : \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03b4\u2082)\n (hother : \u2200 \u03bc \u2208 Ioo \u03b4\u2081 \u03b4\u2082, \u03bc \u2260 \u03bd \u2192 \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03bc)\n (BL\u2081 BL\u2082 : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL\u2081 : BL\u2081 =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c\u2081 s \u2022 ContinuousLinearMap.id \u211d E)\n (hBL\u2082 : BL\u2082 =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c\u2082 s \u2022 ContinuousLinearMap.id \u211d E) :\n (trajectoryOperator (p := 2) BL\u2081).index =\n (trajectoryOperator (p := 2) BL\u2082).index +\n Module.finrank \u211d (Module.End.eigenspace (Aplus : E \u2192\u2097[\u211d] E) \u03bd) :=", "/-- **Crossing one exceptional value at `-\u221e`.** Let `c\u2081` and `c\u2082` be continuous slopes with the\nsame non-exceptional limit at `+\u221e`, and with limits `\u03b4\u2082 < \u03bd < \u03b4\u2081` at `-\u221e`, where `\u03bd` is the only\neigenvalue of the symmetric limit `A\u207b` in `[\u03b4\u2082, \u03b4\u2081]`. Then the index of `u \u21a6 u' + (A - c\u2081) u`\nexceeds that of `u \u21a6 u' + (A - c\u2082) u` by the multiplicity of `\u03bd`: as the decay weight at `-\u221e`\nstrengthens, its slope decreasing through `\u03bd`, the index decreases by the dimension of the\neigenspace of `A\u207b` at `\u03bd`. -/\ntheorem index_trajectoryOperator_eq_add_finrank_eigenspace_atBot\n (hA : Continuous A) (hsymminus : (Aminus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hsymplus : (Aplus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hbot : Tendsto A atBot (\ud835\udcdd Aminus)) (htop : Tendsto A atTop (\ud835\udcdd Aplus))\n {c\u2081 c\u2082 : \u211d \u2192 \u211d} (hc\u2081 : Continuous c\u2081) (hc\u2082 : Continuous c\u2082) {\u03b4plus \u03b4\u2081 \u03b4\u2082 \u03bd : \u211d}\n (hc\u2081bot : Tendsto c\u2081 atBot (\ud835\udcdd \u03b4\u2081)) (hc\u2081top : Tendsto c\u2081 atTop (\ud835\udcdd \u03b4plus))\n (hc\u2082bot : Tendsto c\u2082 atBot (\ud835\udcdd \u03b4\u2082)) (hc\u2082top : Tendsto c\u2082 atTop (\ud835\udcdd \u03b4plus))\n (h\u03bd : \u03bd \u2208 Ioo \u03b4\u2082 \u03b4\u2081) (h\u03b4plus : \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03b4plus)\n (h\u03b4\u2081 : \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03b4\u2081)\n (h\u03b4\u2082 : \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03b4\u2082)\n (hother : \u2200 \u03bc \u2208 Ioo \u03b4\u2082 \u03b4\u2081, \u03bc \u2260 \u03bd \u2192 \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03bc)\n (BL\u2081 BL\u2082 : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL\u2081 : BL\u2081 =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c\u2081 s \u2022 ContinuousLinearMap.id \u211d E)\n (hBL\u2082 : BL\u2082 =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c\u2082 s \u2022 ContinuousLinearMap.id \u211d E) :\n (trajectoryOperator (p := 2) BL\u2081).index =\n (trajectoryOperator (p := 2) BL\u2082).index +\n Module.finrank \u211d (Module.End.eigenspace (Aminus : E \u2192\u2097[\u211d] E) \u03bd) :=", "/-- **The index for small decay weights.** Let `\u03b4minus > 0` be smaller than the absolute value of\nevery negative eigenvalue of `A\u207b`, let `\u03b4plus > 0` be smaller than every positive eigenvalue of\n`A\u207a`, and let `c` be a continuous slope with limits `-\u03b4minus` at `-\u221e` and `\u03b4plus` at `+\u221e`, as for\na decay weight equal to `\u03b4minus |s|` near `-\u221e` and to `\u03b4plus |s|` near `+\u221e`. Then the index of\n`u \u21a6 u' + (A - c) u` is the number of negative eigenvalues of `A\u207b`, minus the number of negative\neigenvalues of `A\u207a`, minus the dimension of the kernel of `A\u207a`: the kernel of the limit at `+\u221e`\nis counted as negative, and that at `-\u221e` as positive. -/\ntheorem index_trajectoryOperator_sub_smul_id_eq_finrank_sub_finrank_sub_finrank_ker\n (hA : Continuous A) (hsymminus : (Aminus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hsymplus : (Aplus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hbot : Tendsto A atBot (\ud835\udcdd Aminus)) (htop : Tendsto A atTop (\ud835\udcdd Aplus))\n {c : \u211d \u2192 \u211d} (hc : Continuous c) {\u03b4minus \u03b4plus : \u211d} (h\u03b4minus : 0 < \u03b4minus)\n (h\u03b4plus : 0 < \u03b4plus) (hcbot : Tendsto c atBot (\ud835\udcdd (-\u03b4minus)))\n (hctop : Tendsto c atTop (\ud835\udcdd \u03b4plus))\n (hgapminus : \u2200 \u03bc \u2208 Ico (-\u03b4minus) 0, \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) \u03bc)\n (hgapplus : \u2200 \u03bc \u2208 Ioc 0 \u03b4plus, \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03bc)\n (BL : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - c s \u2022 ContinuousLinearMap.id \u211d E) :\n (trajectoryOperator (p := 2) BL).index =\n (Module.finrank \u211d (Module.End.pointSpectralSubspace (Aminus : E \u2192\u2097[\u211d] E) (Iio 0)) : \u2124) -\n Module.finrank \u211d (Module.End.pointSpectralSubspace (Aplus : E \u2192\u2097[\u211d] E) (Iio 0)) -\n Module.finrank \u211d (LinearMap.ker (Aplus : E \u2192\u2097[\u211d] E)) :=", "/-- **The index for the symmetric weight `\u03b4 log (cosh s)`.** Let `A` be a continuous family with\nsymmetric limits `A\u00b1`, and let `\u03b4` be a real number such that `-\u03b4` is not an eigenvalue of `A\u207b`\nand `\u03b4` is not an eigenvalue of `A\u207a`. The weight `\u03b4 log (cosh s)`, which is `\u03b4 |s|` up to a\nbounded error, has slope `\u03b4 tanh s`, and the index of `u \u21a6 u' + (A - \u03b4 tanh s) u` is the number of\neigenvalues of `A\u207b` below `-\u03b4` minus the number of eigenvalues of `A\u207a` below `\u03b4`. -/\ntheorem index_trajectoryOperator_sub_mul_tanh_smul_id_eq_finrank_pointSpectralSubspace_sub_finrank\n (hA : Continuous A) (hsymminus : (Aminus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hsymplus : (Aplus : E \u2192\u2097[\u211d] E).IsSymmetric)\n (hbot : Tendsto A atBot (\ud835\udcdd Aminus)) (htop : Tendsto A atTop (\ud835\udcdd Aplus)) {\u03b4 : \u211d}\n (h\u03b4minus : \u00acModule.End.HasEigenvalue (Aminus : E \u2192\u2097[\u211d] E) (-\u03b4))\n (h\u03b4plus : \u00acModule.End.HasEigenvalue (Aplus : E \u2192\u2097[\u211d] E) \u03b4)\n (BL : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 A s - (\u03b4 * Real.tanh s) \u2022 ContinuousLinearMap.id \u211d E) :\n (trajectoryOperator (p := 2) BL).index =\n (Module.finrank \u211d (Module.End.pointSpectralSubspace (Aminus : E \u2192\u2097[\u211d] E) (Iio (-\u03b4))) : \u2124) -\n Module.finrank \u211d (Module.End.pointSpectralSubspace (Aplus : E \u2192\u2097[\u211d] E) (Iio \u03b4)) :=", "section Scalar", "/-- **The index for scalar limits.** Let `B` be a continuous family of operators on a\nfinite-dimensional real inner product space `E` whose limits at `\u00b1\u221e` are nonzero scalars\n`b\u00b1 \u2022 id`. Then the trajectory operator `u \u21a6 u' + B u` has index `dim E` when `b\u207b < 0 < b\u207a`,\n`-dim E` when `b\u207a < 0 < b\u207b`, and `0` when `b\u207b` and `b\u207a` have the same sign: each limit has the\nsingle eigenvalue `b\u00b1`, of multiplicity `dim E`. -/\ntheorem index_trajectoryOperator_of_tendsto_smul_id {B : \u211d \u2192 E \u2192L[\u211d] E} (hB : Continuous B)\n {bminus bplus : \u211d} (hbot : Tendsto B atBot (\ud835\udcdd (bminus \u2022 ContinuousLinearMap.id \u211d E)))\n (htop : Tendsto B atTop (\ud835\udcdd (bplus \u2022 ContinuousLinearMap.id \u211d E)))\n (hbminus : bminus \u2260 0) (hbplus : bplus \u2260 0)\n (BL : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)] B) :\n (trajectoryOperator (p := 2) BL).index =\n (if bminus < 0 then (Module.finrank \u211d E : \u2124) else 0) -\n if bplus < 0 then (Module.finrank \u211d E : \u2124) else 0 :=", "/-- **The scalar example.** For the constant coefficient `a \u2022 id` on a finite-dimensional real\ninner product space `E` and a continuous slope `c` with limits `\u03b4\u00b1` different from `a`, the\ntrajectory operator `u \u21a6 u' + (a - c) u` has index `dim E` when `\u03b4\u207a < a < \u03b4\u207b`, `-dim E` when\n`\u03b4\u207b < a < \u03b4\u207a`, and `0` when `\u03b4\u207b` and `\u03b4\u207a` lie on the same side of `a`. This is\n`index_trajectoryOperator_of_tendsto_smul_id` for the limits `(a - \u03b4\u00b1) \u2022 id`. In particular, for\n`a = 0` the operator `d/ds`, which is not Fredholm on unweighted spaces when `E \u2260 0`, has index\n`-dim E` for decay weights (`\u03b4\u207b < 0 < \u03b4\u207a`) and `dim E` for growth weights (`\u03b4\u207a < 0 < \u03b4\u207b`). -/\ntheorem index_trajectoryOperator_smul_id_sub_smul_id (a : \u211d) {c : \u211d \u2192 \u211d} (hc : Continuous c)\n {\u03b4minus \u03b4plus : \u211d} (hcbot : Tendsto c atBot (\ud835\udcdd \u03b4minus)) (hctop : Tendsto c atTop (\ud835\udcdd \u03b4plus))\n (hminus : \u03b4minus \u2260 a) (hplus : \u03b4plus \u2260 a)\n (BL : Lp (E \u2192L[\u211d] E) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 a \u2022 ContinuousLinearMap.id \u211d E - c s \u2022 ContinuousLinearMap.id \u211d E) :\n (trajectoryOperator (p := 2) BL).index =\n (if a < \u03b4minus then (Module.finrank \u211d E : \u2124) else 0) -\n if a < \u03b4plus then (Module.finrank \u211d E : \u2124) else 0 :=", "variable {a \u03b4 : \u211d}", "/-- **The scalar crossing below the rate.** For `|\u03b4| < |a|`, the operator\n`u \u21a6 u' + (a - \u03b4 tanh s) u` on `W^{1,2}(\u211d)`, the conjugate of `u \u21a6 u' + a u` on the spaces weighted\nby `exp (\u03b4 log (cosh s))`, has index `0`. -/\ntheorem index_trajectoryOperator_smul_id_sub_mul_tanh_smul_id_eq_zero_of_abs_lt_abs\n (h\u03b4a : |\u03b4| < |a|) (BL : Lp (\u211d \u2192L[\u211d] \u211d) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 a \u2022 ContinuousLinearMap.id \u211d \u211d - (\u03b4 * Real.tanh s) \u2022 ContinuousLinearMap.id \u211d \u211d) :\n (trajectoryOperator (p := 2) BL).index = 0 :=", "/-- **The scalar crossing above the rate.** For `\u03b4 > |a|`, the operator\n`u \u21a6 u' + (a - \u03b4 tanh s) u` on `W^{1,2}(\u211d)`, the conjugate of `u \u21a6 u' + a u` on the spaces weighted\nby `exp (\u03b4 log (cosh s))`, has index `-1`. -/\ntheorem index_trajectoryOperator_smul_id_sub_mul_tanh_smul_id_eq_neg_one_of_abs_lt (h\u03b4a : |a| < \u03b4)\n (BL : Lp (\u211d \u2192L[\u211d] \u211d) \u221e (volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)))\n (hBL : BL =\u1d50[volume.restrict ((\u22a4 : Opens \u211d) : Set \u211d)]\n fun s \u21a6 a \u2022 ContinuousLinearMap.id \u211d \u211d - (\u03b4 * Real.tanh s) \u2022 ContinuousLinearMap.id \u211d \u211d) :\n (trajectoryOperator (p := 2) BL).index = -1 :=", "end Scalar\n\nend TauCeti.WeakDerivStep"], "free_length": 7392, "file_length": 17092, "heartbeats": 110600, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.RingTheory.Kaehler.FormallyEtale", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/RingTheory/Kaehler/FormallyEtale.lean", "module": "TauCeti.RingTheory.Kaehler.FormallyEtale", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.LinearAlgebra.TensorProduct.Basis\npublic import Mathlib.RingTheory.Etale.Kaehler\npublic import Mathlib.RingTheory.Kaehler.JacobiZariski\npublic import Mathlib.RingTheory.Kaehler.Polynomial\npublic import Mathlib.RingTheory.RingHom.Etale\nimport Mathlib.RingTheory.TensorProduct.Quotient\nimport TauCeti.RingTheory.MvPolynomial.Ideal\n\n/-!\n# K\u00e4hler differentials along a formally \u00e9tale extension\n\nFor a tower `R \u2192 S \u2192 T` with `T` formally \u00e9tale over `S`, Mathlib's\n`KaehlerDifferential.tensorKaehlerEquivOfFormallyEtale` identifies `T \u2297[S] \u03a9[S\u2044R]` with\n`\u03a9[T\u2044R]`. This file records what that says about bases, and proves a converse.\n\nAn `S`-basis of `\u03a9[S\u2044R]` becomes a `T`-basis of `\u03a9[T\u2044R]` on the same index type, each basis\nvector going to its image under `KaehlerDifferential.map`. The motivating application is a tower of\nfields `k \u2192 K \u2192 F` with `F/K` separable algebraic, so that `Algebra.FormallyEtale.of_isSeparable`\nsupplies the hypothesis: the differentials of `F` over `k` are then computed by those of `K`\nover `k`.\n\nConversely, if `T` is formally smooth over `R` and `T \u2297[S] \u03a9[S\u2044R] \u2192 \u03a9[T\u2044R]` is bijective, then `T`\nis formally \u00e9tale over `S`. By the Jacobi\u2013Zariski sequence\n\n`H\u00b9(L_{T/R}) \u2192 H\u00b9(L_{T/S}) \u2192 T \u2297[S] \u03a9[S\u2044R] \u2192 \u03a9[T\u2044R] \u2192 \u03a9[T\u2044S] \u2192 0`,\n\n`\u03a9[T\u2044S]` vanishes when the middle map is surjective, and `H\u00b9(L_{T/S})` vanishes when it is\ninjective, since `H\u00b9(L_{T/R}) = 0` by formal smoothness. The typical use is with `S` a polynomial\nring over `R`: if the differentials `d a\u1d62` of elements `a\u1d62` of a formally smooth `R`-algebra `T`\nform a basis of `\u03a9[T\u2044R]`, then `T` is formally \u00e9tale over `R[X\u1d62]` via `X\u1d62 \u21a6 a\u1d62`, and \u00e9tale when `T`\nis smooth over `R` (`TauCeti.etale_aeval_of_basis`). Base changing along `R[X\u1d62] \u2192 R`, `X\u1d62 \u21a6 0`,\nthe common zero locus `T \u29f8 (a\u1d62)` of such elements is then \u00e9tale over `R`\n(`Module.Basis.etale_quotient_span_range`).\n\n## Main declarations\n\n* `TauCeti.kaehlerBasisOfFormallyEtale`: the induced basis of `\u03a9[T\u2044R]`, with coordinates\n computed by `TauCeti.kaehlerBasisOfFormallyEtale_repr_map` and determinants by\n `TauCeti.kaehlerBasisOfFormallyEtale_det_map`;\n* `TauCeti.formallyEtale_of_bijective_mapBaseChange` and\n `TauCeti.formallyEtale_iff_bijective_mapBaseChange`: formal \u00e9taleness of `T` over `S` when `T`\n is formally smooth over `R`;\n* `TauCeti.bijective_mapBaseChange_of_basis`: `T \u2297[S] \u03a9[S\u2044R] \u2192 \u03a9[T\u2044R]` is bijective when it\n carries a basis to a basis;\n* `TauCeti.etale_aeval_of_basis`: a smooth algebra is \u00e9tale over the polynomial ring on elements\n whose differentials form a basis of its differentials;\n* `Module.Basis.etale_aeval_localization_away_det`: after inverting the determinant of the\n differentials of finitely many elements in a basis of the differentials of a smooth algebra, it is\n \u00e9tale over the polynomial ring on those elements;\n* `Module.Basis.etale_quotient_span_range`: the common zero locus of such elements is \u00e9tale over\n the base.\n\n## References\n\n* The Stacks Project, Tag 00S2, for the Jacobi\u2013Zariski sequence.\n-/\n\npublic section\n\nnoncomputable section\n\nnamespace TauCeti\n\nopen Module TensorProduct KaehlerDifferential\n\nvariable (R S T : Type*) [CommRing R] [CommRing S] [CommRing T] [Algebra R S] [Algebra R T]\n [Algebra S T] [IsScalarTower R S T]\n\nsection Basis\n\nvariable [Algebra.FormallyEtale S T]\n\n/-- The `T`-basis of `\u03a9[T\u2044R]` induced by an `S`-basis of `\u03a9[S\u2044R]`, when `T` is formally \u00e9tale\nover `S`. Its vectors are the images of the given ones under `KaehlerDifferential.map`, as\nrecorded in `TauCeti.kaehlerBasisOfFormallyEtale_apply`. -/\ndef kaehlerBasisOfFormallyEtale {\u03b9 : Type*} (b : Basis \u03b9 S \u03a9[S\u2044R]) : Basis \u03b9 T \u03a9[T\u2044R] :=\n (b.baseChange T).map (KaehlerDifferential.tensorKaehlerEquivOfFormallyEtale R S T)\n\n@[simp]\ntheorem kaehlerBasisOfFormallyEtale_apply {\u03b9 : Type*} (b : Basis \u03b9 S \u03a9[S\u2044R]) (i : \u03b9) :\n kaehlerBasisOfFormallyEtale R S T b i = KaehlerDifferential.map R R S T (b i) := by\n simp [kaehlerBasisOfFormallyEtale, KaehlerDifferential.mapBaseChange_tmul]\n\n/-- The coordinates of the image of `\u03c9 \u2208 \u03a9[S\u2044R]` in the induced basis of `\u03a9[T\u2044R]` are the images\nof the coordinates of `\u03c9`. -/\n@[simp]\ntheorem kaehlerBasisOfFormallyEtale_repr_map {\u03b9 : Type*} (b : Basis \u03b9 S \u03a9[S\u2044R]) (\u03c9 : \u03a9[S\u2044R])\n (i : \u03b9) :\n (kaehlerBasisOfFormallyEtale R S T b).repr (map R R S T \u03c9) i = algebraMap S T (b.repr \u03c9 i) := by\n have : map R R S T \u03c9 = tensorKaehlerEquivOfFormallyEtale R S T (1 \u2297\u209c \u03c9) := by\n simp [mapBaseChange_tmul]\n simp [kaehlerBasisOfFormallyEtale, -tensorKaehlerEquivOfFormallyEtale_apply, this,\n Algebra.smul_def]\n\n/-- The determinant, in the induced basis of `\u03a9[T\u2044R]`, of the images of differentials of `S` is\nthe image of their determinant in the original basis. -/\ntheorem kaehlerBasisOfFormallyEtale_det_map {\u03b9 : Type*} [Fintype \u03b9] [DecidableEq \u03b9]\n (b : Basis \u03b9 S \u03a9[S\u2044R]) (v : \u03b9 \u2192 \u03a9[S\u2044R]) :\n (kaehlerBasisOfFormallyEtale R S T b).det (fun i \u21a6 map R R S T (v i)) =\n algebraMap S T (b.det v) := by\n simp only [Basis.det_apply, RingHom.map_det]\n congr 1\n ext i j\n simp [Basis.toMatrix_apply]\n\nend Basis\n\nvariable {R S T}\n\n/-- If `T` is formally smooth over `R` and `T \u2297[S] \u03a9[S\u2044R] \u2192 \u03a9[T\u2044R]` is bijective, then `T` is\nformally \u00e9tale over `S`. -/\ntheorem formallyEtale_of_bijective_mapBaseChange [Algebra.FormallySmooth R T]\n (h : Function.Bijective (mapBaseChange R S T)) : Algebra.FormallyEtale S T := by\n refine \u27e8subsingleton_of_forall_eq 0 fun x \u21a6 ?_, subsingleton_of_forall_eq 0 fun x \u21a6 ?_\u27e9\n \u00b7 -- `\u03a9[T\u2044R] \u2192 \u03a9[T\u2044S]` is onto, and its kernel is the image of `T \u2297[S] \u03a9[S\u2044R]`, which is all.\n obtain \u27e8y, rfl\u27e9 := map_surjective R S T x\n exact (exact_mapBaseChange_map R S T y).mpr (h.2 y)\n \u00b7 -- `\u03b4` vanishes since `mapBaseChange` is injective, so `x` comes from `H\u00b9(L_{T/R}) = 0`.\n have h\u03b4 : Algebra.H1Cotangent.\u03b4 R S T x = 0 := (map_eq_zero_iff _ h.1).mp <|\n (Algebra.H1Cotangent.exact_\u03b4_mapBaseChange R S T _).mpr \u27e8x, rfl\u27e9\n obtain \u27e8y, rfl\u27e9 := (Algebra.H1Cotangent.exact_map_\u03b4 R S T x).mp h\u03b4\n rw [Subsingleton.elim y 0, map_zero]\n\n/-- For `T` formally smooth over `R`, `T` is formally \u00e9tale over `S` exactly when\n`T \u2297[S] \u03a9[S\u2044R] \u2192 \u03a9[T\u2044R]` is bijective. -/\ntheorem formallyEtale_iff_bijective_mapBaseChange [Algebra.FormallySmooth R T] :\n Algebra.FormallyEtale S T \u2194 Function.Bijective (mapBaseChange R S T) :=\n \u27e8fun _ \u21a6 (tensorKaehlerEquivOfFormallyEtale R S T).bijective,\n formallyEtale_of_bijective_mapBaseChange\u27e9\n\n/-- The map `T \u2297[S] \u03a9[S\u2044R] \u2192 \u03a9[T\u2044R]` is bijective when it carries the base change of a basis of\n`\u03a9[S\u2044R]` to a basis of `\u03a9[T\u2044R]`. -/\ntheorem bijective_mapBaseChange_of_basis {\u03b9 : Type*} (bS : Basis \u03b9 S \u03a9[S\u2044R])\n (bT : Basis \u03b9 T \u03a9[T\u2044R]) (h : \u2200 i, map R R S T (bS i) = bT i) :\n Function.Bijective (mapBaseChange R S T) := by\n have : mapBaseChange R S T = ((bS.baseChange T).equiv bT (Equiv.refl \u03b9)).toLinearMap :=\n (bS.baseChange T).ext fun i \u21a6 by\n simp only [LinearEquiv.coe_coe, Basis.equiv_apply, Equiv.refl_apply]\n simpa using h i\n rw [this]\n exact LinearEquiv.bijective _\n\n/-- **The Jacobian criterion for \u00e9taleness.** If `T` is smooth over `R` and the differentials\n`d a\u1d62` of elements `a\u1d62` of `T` form a basis of `\u03a9[T\u2044R]`, then `T` is \u00e9tale over the\npolynomial ring `R[X\u1d62]` via `X\u1d62 \u21a6 a\u1d62`. The index type is then automatically finite unless `T` is\ntrivial. -/\ntheorem etale_aeval_of_basis [Algebra.Smooth R T] {\u03b9 : Type*} (a : \u03b9 \u2192 T)\n (b : Basis \u03b9 T \u03a9[T\u2044R]) (hb : \u2200 i, b i = D R T (a i)) :\n (MvPolynomial.aeval (R := R) a).toRingHom.Etale := by\n let := (MvPolynomial.aeval (R := R) a).toAlgebra\n have : IsScalarTower R (MvPolynomial \u03b9 R) T := .of_algebraMap_eq fun r \u21a6 by\n simp [RingHom.algebraMap_toAlgebra]\n have : Algebra.FormallyEtale (MvPolynomial \u03b9 R) T :=\n formallyEtale_of_bijective_mapBaseChange <|\n bijective_mapBaseChange_of_basis (mvPolynomialBasis R \u03b9) b fun i \u21a6 by\n rw [mvPolynomialBasis_apply, map_D, hb, RingHom.algebraMap_toAlgebra]\n simp\n have : Algebra.FinitePresentation (MvPolynomial \u03b9 R) T := by\n by_cases hT : Subsingleton T\n \u00b7 -- the zero ring is the quotient of `R[X\u1d62]` by the unit ideal\n exact .of_surjective (f := Algebra.ofId (MvPolynomial \u03b9 R) T)\n (fun _ \u21a6 \u27e80, Subsingleton.elim _ _\u27e9)\n (by rw [RingHom.ker_eq_top_of_subsingleton]; exact Ideal.fg_top _)\n \u00b7 have := not_subsingleton_iff_nontrivial.mp hT\n have : Finite \u03b9 := Module.Finite.finite_basis b\n exact .of_restrict_scalars_finitePresentation R _ _\n exact RingHom.etale_algebraMap.mpr \u27e8inferInstance, inferInstance\u27e9\n\nend TauCeti\n\nnamespace Module.Basis\n\nopen KaehlerDifferential MvPolynomial\n\n/-- If `W\u2081` is smooth over `A` and `d` is the determinant of the differentials `d a\u1d62` in a basis\nof `\u03a9[W\u2081\u2044A]`, then after inverting `d` the map `A[X\u1d62] \u2192 W\u2081[1/d]` given by `X\u1d62 \u21a6 a\u1d62` is \u00e9tale. -/\ntheorem etale_aeval_localization_away_det {A W\u2081 : Type*} [CommRing A] [CommRing W\u2081]\n [Algebra A W\u2081] [Algebra.Smooth A W\u2081] {\u03b9 : Type*} [Fintype \u03b9] [DecidableEq \u03b9]\n (bW\u2081 : Basis \u03b9 W\u2081 \u03a9[W\u2081\u2044A]) (a : \u03b9 \u2192 W\u2081) (d : W\u2081)\n (hd : d = bW\u2081.det fun i \u21a6 D A W\u2081 (a i)) :\n (MvPolynomial.aeval (R := A)\n fun i \u21a6 algebraMap W\u2081 (Localization.Away d) (a i)).toRingHom.Etale := by\n subst hd\n set d := bW\u2081.det fun i \u21a6 D A W\u2081 (a i)\n -- The differentials of the `a\u1d62` form a basis of `\u03a9[W'\u2044A]`: their determinant in the basis\n -- induced by `bW\u2081` is the unit `d`.\n let bW' := TauCeti.kaehlerBasisOfFormallyEtale A W\u2081 (Localization.Away d) bW\u2081\n have hdet : bW'.det (fun i \u21a6 D A (Localization.Away d) (algebraMap W\u2081 _ (a i))) =\n algebraMap W\u2081 (Localization.Away d) d := by\n rw [\u2190 TauCeti.kaehlerBasisOfFormallyEtale_det_map]\n congr 1\n ext i\n simp\n obtain \u27e8hli, hspan\u27e9 := bW'.is_basis_iff_det.mpr\n (hdet \u25b8 IsLocalization.Away.algebraMap_isUnit d)\n have : Algebra.Smooth A (Localization.Away d) := .comp A W\u2081 _\n exact TauCeti.etale_aeval_of_basis _ (.mk hli hspan.ge) fun i \u21a6 by simp\n\n/-- **The common zero locus of \u00e9tale coordinates is \u00e9tale over the base.** If `W` is smooth over\n`A` and the differentials of `x : \u03b9 \u2192 W` form a basis of `\u03a9[W\u2044A]`, then `W \u29f8 (x)` is \u00e9tale over\n`A`. It is the base change of the \u00e9tale map `A[X\u1d62] \u2192 W`, `X\u1d62 \u21a6 x\u1d62`\n(`TauCeti.etale_aeval_of_basis`), along `A[X\u1d62] \u2192 A[X\u1d62] \u29f8 (X\u1d62) \u2243 A`. -/\ntheorem etale_quotient_span_range {A W : Type*} [CommRing A] [CommRing W] [Algebra A W]\n [Algebra.Smooth A W] {\u03b9 : Type*} {x : \u03b9 \u2192 W}\n (b : Basis \u03b9 W \u03a9[W\u2044A]) (hb : \u2200 i, b i = D A W (x i)) :\n Algebra.Etale A (W \u29f8 Ideal.span (Set.range x)) := by\n let R := MvPolynomial \u03b9 A\n let _ : Algebra R W := (aeval x).toRingHom.toAlgebra\n have : Algebra.Etale R W := RingHom.etale_algebraMap.mp (TauCeti.etale_aeval_of_basis x b hb)\n have : IsScalarTower A R W := .of_algebraMap_eq fun a \u21a6 (aeval_C x a).symm\n let J := idealOfVars \u03b9 A\n -- `R \u29f8 (X) \u2243 A` through the constant coefficient.\n let c : R \u2192\u2090[A] A := { constantCoeff with commutes' := constantCoeff_C \u03b9 }\n have hc : J = RingHom.ker c := (ker_constantCoeff A \u03b9).symm\n have : Algebra.Etale A (R \u29f8 J) := .of_equiv ((Ideal.quotientEquivAlgOfEq A hc).trans\n (Ideal.quotientKerAlgEquivOfRightInverse (f := c) (g := C) (constantCoeff_C \u03b9))).symm\n -- `W \u29f8 (X) W` is the base change of `W` along `R \u2192 R \u29f8 (X)`. This is stated over an arbitrary\n -- base ring, so that the instances on `R \u29f8 J` are those of a quotient of a commutative ring.\n have hbase (R : Type _) [CommRing R] [Algebra R W] [Algebra.Etale R W] (J : Ideal R) :\n Algebra.Etale (R \u29f8 J) (W \u29f8 J.map (algebraMap R W)) :=\n .of_equiv (Algebra.TensorProduct.quotIdealMapEquivQuotTensor W J).symm\n have := hbase R J\n have : IsScalarTower A (R \u29f8 J) (W \u29f8 J.map (algebraMap R W)) :=\n .of_algebraMap_eq (R := A) (S := R \u29f8 J) fun a \u21a6 by\n rw [\u2190 Ideal.Quotient.mk_algebraMap, \u2190 Ideal.Quotient.mk_algebraMap,\n IsScalarTower.algebraMap_apply A R W, Ideal.Quotient.algebraMap_quotient_map_quotient]\n have : Algebra.Etale A (W \u29f8 J.map (algebraMap R W)) := .comp A (R \u29f8 J) _\n -- `(X) W = (x)`.\n refine .of_equiv (Ideal.quotientEquivAlgOfEq A (I := J.map (algebraMap R W)) ?_)\n rw [RingHom.algebraMap_toAlgebra, AlgHom.toRingHom_eq_coe, Ideal.map_coe,\n map_aeval_idealOfVars]\n\nend Module.Basis\n", "public_theorems": ["TauCeti.kaehlerBasisOfFormallyEtale_apply", "TauCeti.kaehlerBasisOfFormallyEtale_repr_map", "TauCeti.kaehlerBasisOfFormallyEtale_det_map", "TauCeti.formallyEtale_of_bijective_mapBaseChange", "TauCeti.formallyEtale_iff_bijective_mapBaseChange", "TauCeti.bijective_mapBaseChange_of_basis", "TauCeti.etale_aeval_of_basis", "Module.Basis.etale_aeval_localization_away_det", "Module.Basis.etale_quotient_span_range"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.LinearAlgebra.TensorProduct.Basis\npublic import Mathlib.RingTheory.Etale.Kaehler\npublic import Mathlib.RingTheory.Kaehler.JacobiZariski\npublic import Mathlib.RingTheory.Kaehler.Polynomial\npublic import Mathlib.RingTheory.RingHom.Etale\nimport Mathlib.RingTheory.TensorProduct.Quotient\nimport TauCeti.RingTheory.MvPolynomial.Ideal\n\n/-!\n# K\u00e4hler differentials along a formally \u00e9tale extension\n\nFor a tower `R \u2192 S \u2192 T` with `T` formally \u00e9tale over `S`, Mathlib's\n`KaehlerDifferential.tensorKaehlerEquivOfFormallyEtale` identifies `T \u2297[S] \u03a9[S\u2044R]` with\n`\u03a9[T\u2044R]`. This file records what that says about bases, and proves a converse.\n\nAn `S`-basis of `\u03a9[S\u2044R]` becomes a `T`-basis of `\u03a9[T\u2044R]` on the same index type, each basis\nvector going to its image under `KaehlerDifferential.map`. The motivating application is a tower of\nfields `k \u2192 K \u2192 F` with `F/K` separable algebraic, so that `Algebra.FormallyEtale.of_isSeparable`\nsupplies the hypothesis: the differentials of `F` over `k` are then computed by those of `K`\nover `k`.\n\nConversely, if `T` is formally smooth over `R` and `T \u2297[S] \u03a9[S\u2044R] \u2192 \u03a9[T\u2044R]` is bijective, then `T`\nis formally \u00e9tale over `S`. By the Jacobi\u2013Zariski sequence\n\n`H\u00b9(L_{T/R}) \u2192 H\u00b9(L_{T/S}) \u2192 T \u2297[S] \u03a9[S\u2044R] \u2192 \u03a9[T\u2044R] \u2192 \u03a9[T\u2044S] \u2192 0`,\n\n`\u03a9[T\u2044S]` vanishes when the middle map is surjective, and `H\u00b9(L_{T/S})` vanishes when it is\ninjective, since `H\u00b9(L_{T/R}) = 0` by formal smoothness. The typical use is with `S` a polynomial\nring over `R`: if the differentials `d a\u1d62` of elements `a\u1d62` of a formally smooth `R`-algebra `T`\nform a basis of `\u03a9[T\u2044R]`, then `T` is formally \u00e9tale over `R[X\u1d62]` via `X\u1d62 \u21a6 a\u1d62`, and \u00e9tale when `T`\nis smooth over `R` (`TauCeti.etale_aeval_of_basis`). Base changing along `R[X\u1d62] \u2192 R`, `X\u1d62 \u21a6 0`,\nthe common zero locus `T \u29f8 (a\u1d62)` of such elements is then \u00e9tale over `R`\n(`Module.Basis.etale_quotient_span_range`).\n\n## Main declarations\n\n* `TauCeti.kaehlerBasisOfFormallyEtale`: the induced basis of `\u03a9[T\u2044R]`, with coordinates\n computed by `TauCeti.kaehlerBasisOfFormallyEtale_repr_map` and determinants by\n `TauCeti.kaehlerBasisOfFormallyEtale_det_map`;\n* `TauCeti.formallyEtale_of_bijective_mapBaseChange` and\n `TauCeti.formallyEtale_iff_bijective_mapBaseChange`: formal \u00e9taleness of `T` over `S` when `T`\n is formally smooth over `R`;\n* `TauCeti.bijective_mapBaseChange_of_basis`: `T \u2297[S] \u03a9[S\u2044R] \u2192 \u03a9[T\u2044R]` is bijective when it\n carries a basis to a basis;\n* `TauCeti.etale_aeval_of_basis`: a smooth algebra is \u00e9tale over the polynomial ring on elements\n whose differentials form a basis of its differentials;\n* `Module.Basis.etale_aeval_localization_away_det`: after inverting the determinant of the\n differentials of finitely many elements in a basis of the differentials of a smooth algebra, it is\n \u00e9tale over the polynomial ring on those elements;\n* `Module.Basis.etale_quotient_span_range`: the common zero locus of such elements is \u00e9tale over\n the base.\n\n## References\n\n* The Stacks Project, Tag 00S2, for the Jacobi\u2013Zariski sequence.\n-/\n\npublic section\n\nnoncomputable section\n\nnamespace TauCeti\n\nopen Module TensorProduct KaehlerDifferential\n\nvariable (R S T : Type*) [CommRing R] [CommRing S] [CommRing T] [Algebra R S] [Algebra R T]\n [Algebra S T] [IsScalarTower R S T]\n\nsection Basis\n\nvariable [Algebra.FormallyEtale S T]\n\n/-- The `T`-basis of `\u03a9[T\u2044R]` induced by an `S`-basis of `\u03a9[S\u2044R]`, when `T` is formally \u00e9tale\nover `S`. Its vectors are the images of the given ones under `KaehlerDifferential.map`, as\nrecorded in `TauCeti.kaehlerBasisOfFormallyEtale_apply`. -/\ndef kaehlerBasisOfFormallyEtale {\u03b9 : Type*} (b : Basis \u03b9 S \u03a9[S\u2044R]) : Basis \u03b9 T \u03a9[T\u2044R] :=\n (b.baseChange T).map (KaehlerDifferential.tensorKaehlerEquivOfFormallyEtale R S T)", "@[simp]\ntheorem kaehlerBasisOfFormallyEtale_apply {\u03b9 : Type*} (b : Basis \u03b9 S \u03a9[S\u2044R]) (i : \u03b9) :\n kaehlerBasisOfFormallyEtale R S T b i = KaehlerDifferential.map R R S T (b i) :=", "/-- The coordinates of the image of `\u03c9 \u2208 \u03a9[S\u2044R]` in the induced basis of `\u03a9[T\u2044R]` are the images\nof the coordinates of `\u03c9`. -/\n@[simp]\ntheorem kaehlerBasisOfFormallyEtale_repr_map {\u03b9 : Type*} (b : Basis \u03b9 S \u03a9[S\u2044R]) (\u03c9 : \u03a9[S\u2044R])\n (i : \u03b9) :\n (kaehlerBasisOfFormallyEtale R S T b).repr (map R R S T \u03c9) i = algebraMap S T (b.repr \u03c9 i) :=", "/-- The determinant, in the induced basis of `\u03a9[T\u2044R]`, of the images of differentials of `S` is\nthe image of their determinant in the original basis. -/\ntheorem kaehlerBasisOfFormallyEtale_det_map {\u03b9 : Type*} [Fintype \u03b9] [DecidableEq \u03b9]\n (b : Basis \u03b9 S \u03a9[S\u2044R]) (v : \u03b9 \u2192 \u03a9[S\u2044R]) :\n (kaehlerBasisOfFormallyEtale R S T b).det (fun i \u21a6 map R R S T (v i)) =\n algebraMap S T (b.det v) :=", "end Basis\n\nvariable {R S T}", "/-- If `T` is formally smooth over `R` and `T \u2297[S] \u03a9[S\u2044R] \u2192 \u03a9[T\u2044R]` is bijective, then `T` is\nformally \u00e9tale over `S`. -/\ntheorem formallyEtale_of_bijective_mapBaseChange [Algebra.FormallySmooth R T]\n (h : Function.Bijective (mapBaseChange R S T)) : Algebra.FormallyEtale S T :=", "/-- For `T` formally smooth over `R`, `T` is formally \u00e9tale over `S` exactly when\n`T \u2297[S] \u03a9[S\u2044R] \u2192 \u03a9[T\u2044R]` is bijective. -/\ntheorem formallyEtale_iff_bijective_mapBaseChange [Algebra.FormallySmooth R T] :\n Algebra.FormallyEtale S T \u2194 Function.Bijective (mapBaseChange R S T) :=", "/-- The map `T \u2297[S] \u03a9[S\u2044R] \u2192 \u03a9[T\u2044R]` is bijective when it carries the base change of a basis of\n`\u03a9[S\u2044R]` to a basis of `\u03a9[T\u2044R]`. -/\ntheorem bijective_mapBaseChange_of_basis {\u03b9 : Type*} (bS : Basis \u03b9 S \u03a9[S\u2044R])\n (bT : Basis \u03b9 T \u03a9[T\u2044R]) (h : \u2200 i, map R R S T (bS i) = bT i) :\n Function.Bijective (mapBaseChange R S T) :=", "/-- **The Jacobian criterion for \u00e9taleness.** If `T` is smooth over `R` and the differentials\n`d a\u1d62` of elements `a\u1d62` of `T` form a basis of `\u03a9[T\u2044R]`, then `T` is \u00e9tale over the\npolynomial ring `R[X\u1d62]` via `X\u1d62 \u21a6 a\u1d62`. The index type is then automatically finite unless `T` is\ntrivial. -/\ntheorem etale_aeval_of_basis [Algebra.Smooth R T] {\u03b9 : Type*} (a : \u03b9 \u2192 T)\n (b : Basis \u03b9 T \u03a9[T\u2044R]) (hb : \u2200 i, b i = D R T (a i)) :\n (MvPolynomial.aeval (R := R) a).toRingHom.Etale :=", "end TauCeti\n\nnamespace Module.Basis\n\nopen KaehlerDifferential MvPolynomial", "/-- If `W\u2081` is smooth over `A` and `d` is the determinant of the differentials `d a\u1d62` in a basis\nof `\u03a9[W\u2081\u2044A]`, then after inverting `d` the map `A[X\u1d62] \u2192 W\u2081[1/d]` given by `X\u1d62 \u21a6 a\u1d62` is \u00e9tale. -/\ntheorem etale_aeval_localization_away_det {A W\u2081 : Type*} [CommRing A] [CommRing W\u2081]\n [Algebra A W\u2081] [Algebra.Smooth A W\u2081] {\u03b9 : Type*} [Fintype \u03b9] [DecidableEq \u03b9]\n (bW\u2081 : Basis \u03b9 W\u2081 \u03a9[W\u2081\u2044A]) (a : \u03b9 \u2192 W\u2081) (d : W\u2081)\n (hd : d = bW\u2081.det fun i \u21a6 D A W\u2081 (a i)) :\n (MvPolynomial.aeval (R := A)\n fun i \u21a6 algebraMap W\u2081 (Localization.Away d) (a i)).toRingHom.Etale :=", "/-- **The common zero locus of \u00e9tale coordinates is \u00e9tale over the base.** If `W` is smooth over\n`A` and the differentials of `x : \u03b9 \u2192 W` form a basis of `\u03a9[W\u2044A]`, then `W \u29f8 (x)` is \u00e9tale over\n`A`. It is the base change of the \u00e9tale map `A[X\u1d62] \u2192 W`, `X\u1d62 \u21a6 x\u1d62`\n(`TauCeti.etale_aeval_of_basis`), along `A[X\u1d62] \u2192 A[X\u1d62] \u29f8 (X\u1d62) \u2243 A`. -/\ntheorem etale_quotient_span_range {A W : Type*} [CommRing A] [CommRing W] [Algebra A W]\n [Algebra.Smooth A W] {\u03b9 : Type*} {x : \u03b9 \u2192 W}\n (b : Basis \u03b9 W \u03a9[W\u2044A]) (hb : \u2200 i, b i = D A W (x i)) :\n Algebra.Etale A (W \u29f8 Ideal.span (Set.range x)) :=", "end Module.Basis"], "free_length": 3922, "file_length": 6726, "heartbeats": 15590, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.NumberTheory.NewtonPolygon.Mul", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/NumberTheory/NewtonPolygon/Mul.lean", "module": "TauCeti.NumberTheory.NewtonPolygon.Mul", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Analysis.Convex.Sequence.Minkowski.SlopeData\npublic import TauCeti.Analysis.Convex.Sequence.Vertex\npublic import TauCeti.NumberTheory.NewtonPolygon.Slopes\nimport Mathlib.Tactic.LinearCombination\n\n/-!\n# Newton polygons of products\n\nThe Newton polygon of a product of polynomials is the Minkowski sum of the Newton polygons of\nthe factors, given by the min-convolution `TauCeti.minkowskiSum`. When both Newton polygons are\nnonempty, for example when both factors are nonzero over a field, the finite slopes of the\nproduct are those of the two factors together. These are the identities from which the slopes\nof a split polynomial are read off its linear factors.\n\nOne inequality is the ultrametric inequality for the coefficients of a product, and holds for\npower series with admissible coefficient heights. For the other, fix a slope `\u03c3` and take the\nfirst index at which the coefficient heights of each factor touch their supporting line of\nslope `\u03c3`. At the sum of these two indices the coefficient of the product has a unique dominant\nterm, so its valuation is the sum of the two valuations. Hence the supporting values of the\nproduct are the sums of the supporting values of the factors, and a convex sequence is\ndetermined by its supporting values.\n\nThe same dominant-term argument works for power series at any slope where supporting lines\ntouch the coefficient heights of both factors, with no convergence hypothesis. There the\nsupporting values of the product are again the sums of those of the factors. When `v` comes\nfrom an absolute value, this is the multiplicativity of Gauss norms at the corresponding radius.\nIf such contacts exist at every slope, the Newton polygon of the product is the Minkowski sum\nof the Newton polygons of the factors; the polynomial identity is the case of finitely many\nfinite heights.\n\nAt a common slope where both power-series polygons have finite faces, the product has the\nfinite face whose absolute endpoints are the sums of those of the factors. This local law\nrequires no convergence hypothesis and does not assert a global product identity outside the\nface. Singleton faces are allowed and contribute width zero; endpoints include any initial\norder of vanishing.\n\n## Main results\n\n* `PowerSeries.addValuation_coeff_mul_eq_add_of_isLeast` and\n `PowerSeries.addValuation_coeff_mul_eq_add_of_isGreatest`: at the sum of the first,\n respectively last, contact indices of supporting lines of a common slope, the valuation of\n the coefficient of a product is the sum of the valuations of the two coefficients;\n `PowerSeries.addValuation_coeff_mul_eq_add_of_lt` is the general unique-dominant-term form.\n* `PowerSeries.minkowskiSum_le_addValuation_coeff_mul`: the coefficient heights of a product\n lie above the Minkowski sum of the coefficient heights of the factors.\n* `PowerSeries.supportingValue_addValuation_coeff_mul`: supporting values of coefficient\n heights add under multiplication, at any slope where both factors touch a supporting line.\n* `PowerSeries.minkowskiSum_newtonPolygon_le_newtonPolygon_mul`: for admissible coefficient\n heights, the Minkowski sum of the Newton polygons of two power series lies below the Newton\n polygon of their product.\n* `PowerSeries.supportingValue_newtonPolygon_mul`: the same additivity for the supporting\n values of the Newton polygons.\n* `PowerSeries.newtonPolygon_mul_of_forall_exists_mem_supportingFace`: if the coefficient\n heights of both factors touch supporting lines of every slope, the Newton polygon of the\n product is the Minkowski sum of the Newton polygons of the factors.\n* `PowerSeries.isFiniteFace_newtonPolygon_mul`: finite faces at a common slope add under\n multiplication, with both absolute endpoints adding.\n* `Polynomial.newtonPolygon_mul`: the Newton polygon of a product of polynomials is the\n Minkowski sum of the Newton polygons of the factors. No hypothesis is needed: if either\n factor has the empty polygon, so does the product.\n* `Polynomial.supportingValue_addValuation_coeff_mul`: supporting values of coefficient heights\n add under multiplication of polynomials, at every slope.\n* `Polynomial.newtonSlopes_mul`, `Polynomial.newtonSlopes_multiset_prod`,\n `Polynomial.newtonSlopes_prod` and `Polynomial.newtonSlopes_finprod`: when the factors have\n nonempty Newton polygons, the finite slope multiset of a product of polynomials is the sum of\n the finite slope multisets of the factors.\n* `Polynomial.newtonSlopes_le_of_dvd`: the finite slopes of a factor of a polynomial with a\n nonempty Newton polygon are among those of the polynomial, with multiplicity.\n\n## References\n\n* M. Lazard, *Les z\u00e9ros d'une fonction analytique d'une variable sur un corps valu\u00e9 complet*,\n Publications Math\u00e9matiques de l'IH\u00c9S 14 (1962), \u00a71, Proposition 1.\n* K. S. Kedlaya, [*Newton polygons*](https://kskedlaya.org/18.787/newton-poly.pdf),\n MIT 18.787, fall 2007, \u00a7\u00a71\u20132. Kedlaya plots coefficient points at negative indices; our\n convention uses positive indices, so the slopes have the opposite sign.\n* N. Koblitz, *p-adic Numbers, p-adic Analysis, and Zeta-Functions*, second edition,\n Graduate Texts in Mathematics 58, Springer, 1984, Chapter IV \u00a7\u00a73\u20134.\n-/\n\npublic section\n\nopen TauCeti\n\nnamespace PowerSeries\n\nvariable {R : Type*} [Ring R] (v : AddValuation R (WithTop \u211d)) {f g : R\u27e6X\u27e7}\n\n/-- The unique dominant term of a coefficient of a product. Suppose the coefficient heights of\n`f` and `g` touch supporting lines of a common slope `\u03c3` at `i` and `j`, and every other split\n`p + q = i + j` has `p` or `q` strictly above its line. Then the valuation of the coefficient of\n`f * g` at `i + j` is the sum of the valuations of the coefficients of `f` at `i` and of `g`\nat `j`. -/\ntheorem addValuation_coeff_mul_eq_add_of_lt {\u03c3 c d : \u211d} {i j : \u2115}\n (hf : IsSupportingLine (fun n => v (coeff n f)) \u03c3 c)\n (hi : i \u2208 supportingFace (fun n => v (coeff n f)) \u03c3 c)\n (hg : IsSupportingLine (fun n => v (coeff n g)) \u03c3 d)\n (hj : j \u2208 supportingFace (fun n => v (coeff n g)) \u03c3 d)\n (hsplit : \u2200 p q, p + q = i + j \u2192 p \u2260 i \u2192\n ((c + \u03c3 * p : \u211d) : WithTop \u211d) < v (coeff p f) \u2228\n ((d + \u03c3 * q : \u211d) : WithTop \u211d) < v (coeff q g)) :\n v (coeff (i + j) (f * g)) = v (coeff i f) + v (coeff j g) := by\n simp only [mem_supportingFace] at hi hj\n have hmem : (i, j) \u2208 Finset.antidiagonal (i + j) := Finset.mem_antidiagonal.mpr rfl\n rw [coeff_mul, \u2190 Finset.add_sum_erase _ _ hmem, \u2190 AddValuation.map_mul]\n refine AddValuation.map_add_eq_of_lt_left v ?_\n rw [AddValuation.map_mul, hi, hj, \u2190 WithTop.coe_add]\n refine AddValuation.map_lt_sum v WithTop.coe_ne_top fun x hx => ?_\n obtain \u27e8hxij, hx\u27e9 := Finset.mem_erase.mp hx\n have hpq := Finset.mem_antidiagonal.mp hx\n have hp : x.1 \u2260 i := fun h => hxij (Prod.ext h (by omega))\n have hline : (c + \u03c3 * i) + (d + \u03c3 * j) = (c + \u03c3 * x.1) + (d + \u03c3 * x.2) := by\n have hcast : (x.1 : \u211d) + x.2 = i + j := by exact_mod_cast hpq\n linear_combination (-\u03c3) * hcast\n rw [AddValuation.map_mul, hline, WithTop.coe_add]\n rcases hsplit x.1 x.2 hpq hp with h | h\n \u00b7 exact WithTop.add_lt_add_of_lt_of_le WithTop.coe_ne_top h\n (isSupportingLine_iff_forall.mp hg x.2)\n \u00b7 exact WithTop.add_lt_add_of_le_of_lt WithTop.coe_ne_top\n (isSupportingLine_iff_forall.mp hf x.1) h\n\n/-- The valuation of the coefficient of a product at the sum of the first contact indices.\nIf `i` and `j` are the least indices at which the coefficient heights of `f` and `g` touch\nsupporting lines of a common slope, then the valuation of the coefficient of `f * g` at `i + j`\nis the sum of the valuations of the coefficients of `f` at `i` and of `g` at `j`. -/\ntheorem addValuation_coeff_mul_eq_add_of_isLeast {\u03c3 c d : \u211d} {i j : \u2115}\n (hf : IsSupportingLine (fun n => v (coeff n f)) \u03c3 c)\n (hi : IsLeast (supportingFace (fun n => v (coeff n f)) \u03c3 c) i)\n (hg : IsSupportingLine (fun n => v (coeff n g)) \u03c3 d)\n (hj : IsLeast (supportingFace (fun n => v (coeff n g)) \u03c3 d) j) :\n v (coeff (i + j) (f * g)) = v (coeff i f) + v (coeff j g) := by\n refine addValuation_coeff_mul_eq_add_of_lt v hf hi.1 hg hj.1 fun p q hpq hp => ?_\n rcases lt_or_gt_of_ne hp with hp | hp\n \u00b7 exact .inl <| (isSupportingLine_iff_forall.mp hf p).lt_of_ne fun h => by\n have := hi.2 (mem_supportingFace.mpr h.symm)\n omega\n \u00b7 exact .inr <| (isSupportingLine_iff_forall.mp hg q).lt_of_ne fun h => by\n have := hj.2 (mem_supportingFace.mpr h.symm)\n omega\n\n/-- The valuation of the coefficient of a product at the sum of the last contact indices.\nIf `i` and `j` are the greatest indices at which the coefficient heights of `f` and `g` touch\nsupporting lines of a common slope, then the valuation of the coefficient of `f * g` at `i + j`\nis the sum of the valuations of the coefficients of `f` at `i` and of `g` at `j`. -/\ntheorem addValuation_coeff_mul_eq_add_of_isGreatest {\u03c3 c d : \u211d} {i j : \u2115}\n (hf : IsSupportingLine (fun n => v (coeff n f)) \u03c3 c)\n (hi : IsGreatest (supportingFace (fun n => v (coeff n f)) \u03c3 c) i)\n (hg : IsSupportingLine (fun n => v (coeff n g)) \u03c3 d)\n (hj : IsGreatest (supportingFace (fun n => v (coeff n g)) \u03c3 d) j) :\n v (coeff (i + j) (f * g)) = v (coeff i f) + v (coeff j g) := by\n refine addValuation_coeff_mul_eq_add_of_lt v hf hi.1 hg hj.1 fun p q hpq hp => ?_\n rcases lt_or_gt_of_ne hp with hp | hp\n \u00b7 exact .inr <| (isSupportingLine_iff_forall.mp hg q).lt_of_ne fun h => by\n have := hj.2 (mem_supportingFace.mpr h.symm)\n omega\n \u00b7 exact .inl <| (isSupportingLine_iff_forall.mp hf p).lt_of_ne fun h => by\n have := hi.2 (mem_supportingFace.mpr h.symm)\n omega\n\n/-- The coefficient heights of a product of power series lie above the Minkowski sum of the\ncoefficient heights of the factors. -/\ntheorem minkowskiSum_le_addValuation_coeff_mul (n : \u2115) :\n minkowskiSum (fun n => v (coeff n f)) (fun n => v (coeff n g)) n \u2264\n v (coeff n (f * g)) := by\n rw [coeff_mul]\n exact AddValuation.map_le_sum v fun x hx =>\n (minkowskiSum_le_add_of_add_eq (Finset.mem_antidiagonal.mp hx)).trans_eq\n (AddValuation.map_mul v _ _).symm\n\n/-- If supporting lines of a common slope touch the coefficient heights of `f` and `g`, then\nthe supporting value of the coefficient heights of `f * g` at that slope is the sum of those\nof `f` and `g`. When `v` comes from an absolute value, this is the multiplicativity of Gauss\nnorms at the corresponding radius. -/\ntheorem supportingValue_addValuation_coeff_mul {\u03c3 c d : \u211d} {i j : \u2115}\n (hf : IsSupportingLine (fun n => v (coeff n f)) \u03c3 c)\n (hi : i \u2208 supportingFace (fun n => v (coeff n f)) \u03c3 c)\n (hg : IsSupportingLine (fun n => v (coeff n g)) \u03c3 d)\n (hj : j \u2208 supportingFace (fun n => v (coeff n g)) \u03c3 d) :\n supportingValue (fun n => v (coeff n (f * g))) \u03c3 =\n supportingValue (fun n => v (coeff n f)) \u03c3 +\n supportingValue (fun n => v (coeff n g)) \u03c3 := by\n -- The sum of the two supporting lines supports the product heights and touches them at the\n -- sum of the least contact indices, by the unique dominant term there.\n have hline : IsSupportingLine (fun n => v (coeff n (f * g))) \u03c3 (c + d) :=\n isSupportingLine_iff_forall.mpr fun n =>\n (isSupportingLine_iff_forall.mp (hf.minkowskiSum hg) n).trans\n (minkowskiSum_le_addValuation_coeff_mul v n)\n have hm := isLeast_csInf \u27e8i, hi\u27e9\n have hm' := isLeast_csInf \u27e8j, hj\u27e9\n have hmem : sInf (supportingFace (fun n => v (coeff n f)) \u03c3 c) +\n sInf (supportingFace (fun n => v (coeff n g)) \u03c3 d) \u2208\n supportingFace (fun n => v (coeff n (f * g))) \u03c3 (c + d) := by\n have key := addValuation_coeff_mul_eq_add_of_isLeast v hf hm hg hm'\n have hmc := hm.1\n have hmc' := hm'.1\n rw [mem_supportingFace] at hmc hmc' \u22a2\n rw [key, hmc, hmc', \u2190 WithTop.coe_add, WithTop.coe_eq_coe, Nat.cast_add]\n ring\n rw [supportingValue_eq_coe_of_mem_supportingFace hline hmem,\n supportingValue_eq_coe_of_mem_supportingFace hf hi,\n supportingValue_eq_coe_of_mem_supportingFace hg hj, EReal.coe_add]\n\n/-- For admissible coefficient heights, the Minkowski sum of the Newton polygons of two power\nseries lies below the Newton polygon of their product. -/\ntheorem minkowskiSum_newtonPolygon_le_newtonPolygon_mul\n (hf : IsAdmissible fun n => v (coeff n f)) (hg : IsAdmissible fun n => v (coeff n g)) :\n minkowskiSum (f.newtonPolygon v) (g.newtonPolygon v) \u2264 (f * g).newtonPolygon v :=\n le_newtonPolygon ((isConvexSeq_newtonPolygon f v).minkowskiSum (isConvexSeq_newtonPolygon g v))\n fun n => (minkowskiSum_mono (newtonPolygon_le hf) (newtonPolygon_le hg) n).trans\n (minkowskiSum_le_addValuation_coeff_mul v n)\n\n/-- If supporting lines of a common slope `\u03c3` touch the coefficient heights of `f` and `g`, then\nthe supporting value at `\u03c3` of the Newton polygon of `f * g` is the sum of those of the Newton\npolygons of `f` and `g`. No convergence hypothesis is needed beyond these two contacts. -/\ntheorem supportingValue_newtonPolygon_mul {\u03c3 c d : \u211d} {i j : \u2115}\n (hf : IsSupportingLine (fun n => v (coeff n f)) \u03c3 c)\n (hi : i \u2208 supportingFace (fun n => v (coeff n f)) \u03c3 c)\n (hg : IsSupportingLine (fun n => v (coeff n g)) \u03c3 d)\n (hj : j \u2208 supportingFace (fun n => v (coeff n g)) \u03c3 d) :\n supportingValue ((f * g).newtonPolygon v) \u03c3 =\n supportingValue (f.newtonPolygon v) \u03c3 + supportingValue (g.newtonPolygon v) \u03c3 := by\n have hfg : IsAdmissible fun n => v (coeff n (f * g)) :=\n (hf.minkowskiSum hg).isAdmissible.mono (minkowskiSum_le_addValuation_coeff_mul v)\n rw [supportingValue_newtonPolygon hfg, supportingValue_newtonPolygon hf.isAdmissible,\n supportingValue_newtonPolygon hg.isAdmissible]\n exact supportingValue_addValuation_coeff_mul v hf hi hg hj\n\n/-- If the coefficient heights of `f` touch a supporting line of some slope, the Newton polygon\nof `f` is nonempty. -/\nprivate theorem newtonPolygon_ne_top_of_mem_supportingFace {\u03c3 c : \u211d} {i : \u2115}\n (hf : IsSupportingLine (fun n => v (coeff n f)) \u03c3 c)\n (hi : i \u2208 supportingFace (fun n => v (coeff n f)) \u03c3 c) : f.newtonPolygon v \u2260 \u22a4 := by\n intro htop\n have hle := newtonPolygon_le hf.isAdmissible i\n rw [htop, mem_supportingFace.mp hi] at hle\n exact WithTop.coe_ne_top (top_le_iff.mp hle)\n\n/-- The Newton polygon of a product is the Minkowski sum of the Newton polygons of the factors,\nprovided that at every slope the coefficient heights of each factor touch a supporting line.\nThis holds for polynomials with nonempty Newton polygons, and for nonzero entire series when the\nvaluation comes from the norm. Without contact the identity can fail: `1 - X` and the geometric\nseries `\u2211 X\u207f` have product `1`, a single point, while the Minkowski sum of their polygons is a\nhorizontal half-line. -/\ntheorem newtonPolygon_mul_of_forall_exists_mem_supportingFace\n (hf : \u2200 \u03c3 : \u211d, \u2203 (c : \u211d) (i : \u2115), IsSupportingLine (fun n => v (coeff n f)) \u03c3 c \u2227\n i \u2208 supportingFace (fun n => v (coeff n f)) \u03c3 c)\n (hg : \u2200 \u03c3 : \u211d, \u2203 (d : \u211d) (j : \u2115), IsSupportingLine (fun n => v (coeff n g)) \u03c3 d \u2227\n j \u2208 supportingFace (fun n => v (coeff n g)) \u03c3 d) :\n (f * g).newtonPolygon v = minkowskiSum (f.newtonPolygon v) (g.newtonPolygon v) := by\n obtain \u27e8c\u2080, i\u2080, hc\u2080, hi\u2080\u27e9 := hf 0\n obtain \u27e8d\u2080, j\u2080, hd\u2080, hj\u2080\u27e9 := hg 0\n refine le_antisymm ?_\n (minkowskiSum_newtonPolygon_le_newtonPolygon_mul v hc\u2080.isAdmissible hd\u2080.isAdmissible)\n -- Compare supporting values: those of the product are the sums at every slope.\n rw [(isConvexSeq_newtonPolygon _ v).le_iff_forall_supportingValue_le]\n intro \u03c3\n obtain \u27e8c, i, hc, hi\u27e9 := hf \u03c3\n obtain \u27e8d, j, hd, hj\u27e9 := hg \u03c3\n rw [supportingValue_minkowskiSum (newtonPolygon_ne_top_of_mem_supportingFace v hc\u2080 hi\u2080)\n (newtonPolygon_ne_top_of_mem_supportingFace v hd\u2080 hj\u2080),\n supportingValue_newtonPolygon_mul v hc hi hd hj]\n\n/-- Finite Newton faces at a common slope add under multiplication, with both absolute\nendpoints adding. This is a local product law: the polygons need not agree with their\nMinkowski sum away from this face. No convergence hypothesis is required. -/\ntheorem isFiniteFace_newtonPolygon_mul {\u03c3 : \u211d} {l u l' u' : \u2115}\n (hf : IsFiniteFace (f.newtonPolygon v) \u03c3 l u)\n (hg : IsFiniteFace (g.newtonPolygon v) \u03c3 l' u') :\n IsFiniteFace ((f * g).newtonPolygon v) \u03c3 (l + l') (u + u') := by\n have hfa : IsAdmissible fun n => v (coeff n f) :=\n isAdmissible_of_lowerConvexEnvelope_ne_top\n (by simpa only [newtonPolygon_def] using hf.left_ne_top)\n have hga : IsAdmissible fun n => v (coeff n g) :=\n isAdmissible_of_lowerConvexEnvelope_ne_top\n (by simpa only [newtonPolygon_def] using hg.left_ne_top)\n have hF := isLowerConvexEnvelope_newtonPolygon hfa\n have hG := isLowerConvexEnvelope_newtonPolygon hga\n obtain \u27e8c, hc, hfl, hfu\u27e9 :=\n hF.exists_isSupportingLine_isLeast_isGreatest_of_isFiniteFace hf\n obtain \u27e8d, hd, hgl, hgu\u27e9 :=\n hG.exists_isSupportingLine_isLeast_isGreatest_of_isFiniteFace hg\n have hcF : IsSupportingLine (f.newtonPolygon v) \u03c3 c :=\n isSupportingLine_iff_forall.mpr\n (hF.greatest (isConvexSeq_affine c \u03c3) (isSupportingLine_iff_forall.mp hc))\n have hdG : IsSupportingLine (g.newtonPolygon v) \u03c3 d :=\n isSupportingLine_iff_forall.mpr\n (hG.greatest (isConvexSeq_affine d \u03c3) (isSupportingLine_iff_forall.mp hd))\n have hprod : IsAdmissible fun n => v (coeff n (f * g)) :=\n (hc.minkowskiSum hd).isAdmissible.mono (minkowskiSum_le_addValuation_coeff_mul v)\n have hle := minkowskiSum_newtonPolygon_le_newtonPolygon_mul v hfa hga\n -- At either extreme split, the unique dominant coefficient makes the lower bound exact.\n have hend (i j : \u2115)\n (hi : i \u2208 supportingFace (fun n => v (coeff n f)) \u03c3 c)\n (hj : j \u2208 supportingFace (fun n => v (coeff n g)) \u03c3 d)\n (hij : v (coeff (i + j) (f * g)) = v (coeff i f) + v (coeff j g)) :\n (f * g).newtonPolygon v (i + j) =\n minkowskiSum (f.newtonPolygon v) (g.newtonPolygon v) (i + j) := by\n have hiF := hF.supportingFace_subset hc hi\n have hjG := hG.supportingFace_subset hd hj\n have hfi : f.newtonPolygon v i = v (coeff i f) :=\n (mem_supportingFace.mp hiF).trans (mem_supportingFace.mp hi).symm\n have hgj : g.newtonPolygon v j = v (coeff j g) :=\n (mem_supportingFace.mp hjG).trans (mem_supportingFace.mp hj).symm\n apply le_antisymm ?_ (hle (i + j))\n calc\n (f * g).newtonPolygon v (i + j) \u2264 v (coeff (i + j) (f * g)) :=\n newtonPolygon_le hprod _\n _ = f.newtonPolygon v i + g.newtonPolygon v j := by rw [hij, hfi, hgj]\n _ = minkowskiSum (f.newtonPolygon v) (g.newtonPolygon v) (i + j) :=\n (minkowskiSum_add_eq_of_mem_supportingFace hcF hiF hdG hjG).symm\n exact (hf.minkowskiSum hg).of_le_of_eq_endpoints\n (isConvexSeq_newtonPolygon (f * g) v) hle\n (hend l l' hfl.1 hgl.1 (addValuation_coeff_mul_eq_add_of_isLeast v hc hfl hd hgl))\n (hend u u' hfu.1 hgu.1 (addValuation_coeff_mul_eq_add_of_isGreatest v hc hfu hd hgu))\n\nend PowerSeries\n\nnamespace Polynomial\n\nsection Ring\n\nvariable {R : Type*} [Ring R] (f g : R[X]) (v : AddValuation R (WithTop \u211d))\n\n/-- A polynomial with a nonempty Newton polygon has coefficient heights touching a supporting\nline of each slope. -/\nprivate theorem exists_isSupportingLine_mem_supportingFace_coeff_coe\n (hf : f.newtonPolygon v \u2260 \u22a4) (\u03c3 : \u211d) : \u2203 (c : \u211d) (i : \u2115),\n IsSupportingLine (fun n => v (PowerSeries.coeff n (f : PowerSeries R))) \u03c3 c \u2227\n i \u2208 supportingFace (fun n => v (PowerSeries.coeff n (f : PowerSeries R))) \u03c3 c := by\n obtain \u27e8c, i, hc, hi\u27e9 := exists_isSupportingLine_isLeast_supportingFace\n (h := fun n => v (PowerSeries.coeff n (f : PowerSeries R)))\n (by simpa only [coeff_coe] using finite_setOf_addValuation_coeff_ne_top f v)\n (by\n obtain \u27e8n, hn\u27e9 := not_forall.mp (mt (newtonPolygon_eq_top_iff f v).mpr hf)\n exact \u27e8n, by rwa [Set.mem_ofPred_eq, coeff_coe]\u27e9) \u03c3\n exact \u27e8c, i, hc, hi.1\u27e9\n\n/-- The Newton polygon of a product of polynomials is the Minkowski sum of the Newton polygons\nof the factors. If either factor has the empty Newton polygon, for example if it is zero, so\ndoes the product. -/\ntheorem newtonPolygon_mul :\n (f * g).newtonPolygon v = minkowskiSum (f.newtonPolygon v) (g.newtonPolygon v) := by\n refine le_antisymm ?_ ?_\n swap\n \u00b7 simpa only [\u2190 newtonPolygon_coe, coe_mul] using\n PowerSeries.minkowskiSum_newtonPolygon_le_newtonPolygon_mul v\n (by simpa only [coeff_coe] using isAdmissible_addValuation_coeff f v)\n (by simpa only [coeff_coe] using isAdmissible_addValuation_coeff g v)\n rcases eq_or_ne (f.newtonPolygon v) \u22a4 with hf | hf\n \u00b7 simp [hf]\n rcases eq_or_ne (g.newtonPolygon v) \u22a4 with hg | hg\n \u00b7 simp [hg]\n simpa only [\u2190 newtonPolygon_coe, coe_mul] using\n (PowerSeries.newtonPolygon_mul_of_forall_exists_mem_supportingFace v\n (exists_isSupportingLine_mem_supportingFace_coeff_coe f v hf)\n (exists_isSupportingLine_mem_supportingFace_coeff_coe g v hg)).le\n\n/-- Supporting values of coefficient heights add under multiplication of polynomials. When `v`\ncomes from an absolute value, this is the multiplicativity of Gauss norms at every radius.\nNo hypothesis is needed: if all coefficient heights of a factor are infinite, both sides\nare `\u22a4`. -/\ntheorem supportingValue_addValuation_coeff_mul (\u03c3 : \u211d) :\n supportingValue (fun n => v ((f * g).coeff n)) \u03c3 =\n supportingValue (fun n => v (f.coeff n)) \u03c3 +\n supportingValue (fun n => v (g.coeff n)) \u03c3 := by\n have hB (h : R[X]) : supportingValue (h.newtonPolygon v) \u03c3 \u2260 \u22a5 := by\n rw [supportingValue_newtonPolygon]\n exact supportingValue_ne_bot_of_finite (finite_setOf_addValuation_coeff_ne_top h v) \u03c3\n rw [\u2190 supportingValue_newtonPolygon (f * g), \u2190 supportingValue_newtonPolygon f,\n \u2190 supportingValue_newtonPolygon g, newtonPolygon_mul,\n supportingValue_minkowskiSum_of_ne_bot (hB f) (hB g)]\n\n/-- If both factors have nonempty Newton polygons, the finite slope multiset of a product of\npolynomials is the sum of the finite slope multisets of the factors. The hypotheses exclude\nzero factors: the product `0 * g` has no finite slopes, whatever those of `g`. If only zero\nhas infinite valuation, a nonzero polynomial has a nonempty Newton polygon by\n`Polynomial.newtonPolygon_ne_top_of_ne_zero`. -/\ntheorem newtonSlopes_mul (hf : f.newtonPolygon v \u2260 \u22a4) (hg : g.newtonPolygon v \u2260 \u22a4) :\n (f * g).newtonSlopes v = f.newtonSlopes v + g.newtonSlopes v := by\n obtain \u27e8d\u2081, hd\u2081\u27e9 := (exists_finiteSlopeData_heights_eq_iff f v).2 hf\n obtain \u27e8d\u2082, hd\u2082\u27e9 := (exists_finiteSlopeData_heights_eq_iff g v).2 hg\n rw [newtonSlopes_eq_slopeMultiset hd\u2081, newtonSlopes_eq_slopeMultiset hd\u2082,\n \u2190 FiniteSlopeData.slopeMultiset_minkowskiSum]\n exact newtonSlopes_eq_slopeMultiset\n (by rw [FiniteSlopeData.heights_minkowskiSum, hd\u2081, hd\u2082, newtonPolygon_mul])\n\nvariable {f g v} in\n/-- If `f` has a nonempty Newton polygon, the finite slopes of a factor `g` of `f` are among the\nfinite slopes of `f`, counted with multiplicity. This holds for every nonzero `f` when only zero\nhas infinite valuation, by `Polynomial.newtonPolygon_ne_top_of_ne_zero`. -/\ntheorem newtonSlopes_le_of_dvd (hf : f.newtonPolygon v \u2260 \u22a4) (hgf : g \u2223 f) :\n g.newtonSlopes v \u2264 f.newtonSlopes v := by\n obtain \u27e8h, rfl\u27e9 := hgf\n have hg : g.newtonPolygon v \u2260 \u22a4 := fun hg => hf (by rw [newtonPolygon_mul, hg, top_minkowskiSum])\n have hh : h.newtonPolygon v \u2260 \u22a4 := fun hh => hf (by rw [newtonPolygon_mul, hh, minkowskiSum_top])\n rw [newtonSlopes_mul _ _ v hg hh]\n exact Multiset.le_add_right _ _\n\nend Ring\n\nsection CommRing\n\nvariable {\u03b9 R : Type*} [CommRing R] (v : AddValuation R (WithTop \u211d))\n\n/-- A product of a multiset of polynomials with nonempty Newton polygons has a nonempty Newton\npolygon. -/\ntheorem newtonPolygon_ne_top_multiset_prod (s : Multiset R[X])\n (hs : \u2200 p \u2208 s, p.newtonPolygon v \u2260 \u22a4) : s.prod.newtonPolygon v \u2260 \u22a4 := by\n induction s using Multiset.induction_on with\n | empty => simpa using monic_one.newtonPolygon_ne_top v\n | cons a s ih =>\n rw [Multiset.prod_cons, newtonPolygon_mul]\n obtain \u27e8m, hm\u27e9 := Function.ne_iff.mp (hs a (Multiset.mem_cons_self a s))\n obtain \u27e8n, hn\u27e9 := Function.ne_iff.mp (ih fun p hp => hs p (Multiset.mem_cons_of_mem hp))\n intro htop\n exact (minkowskiSum_ne_top_iff.mpr \u27e8m, n, rfl, hm, hn\u27e9) (congrFun htop (m + n))\n\n/-- A finite product of polynomials with nonempty Newton polygons has a nonempty Newton polygon. -/\ntheorem newtonPolygon_ne_top_prod (s : Finset \u03b9) (g : \u03b9 \u2192 R[X])\n (hg : \u2200 i \u2208 s, (g i).newtonPolygon v \u2260 \u22a4) : (\u220f i \u2208 s, g i).newtonPolygon v \u2260 \u22a4 := by\n rw [Finset.prod_eq_multiset_prod]\n exact newtonPolygon_ne_top_multiset_prod v _ fun p hp => by\n obtain \u27e8i, hi, rfl\u27e9 := Multiset.mem_map.mp hp\n exact hg i hi\n\n/-- The finite slope multiset of the product of a multiset of polynomials with nonempty Newton\npolygons is the sum of the finite slope multisets of the factors. -/\ntheorem newtonSlopes_multiset_prod (s : Multiset R[X]) (hs : \u2200 p \u2208 s, p.newtonPolygon v \u2260 \u22a4) :\n s.prod.newtonSlopes v = (s.map (\u00b7.newtonSlopes v)).sum := by\n induction s using Multiset.induction_on with\n | empty => simpa using newtonSlopes_C v (1 : R)\n | cons a s ih =>\n have hs' : \u2200 p \u2208 s, p.newtonPolygon v \u2260 \u22a4 := fun p hp => hs p (Multiset.mem_cons_of_mem hp)\n rw [Multiset.prod_cons, Multiset.map_cons, Multiset.sum_cons,\n newtonSlopes_mul _ _ v (hs a (Multiset.mem_cons_self a s))\n (newtonPolygon_ne_top_multiset_prod v s hs'), ih hs']\n\n/-- The finite slope multiset of a finite product of polynomials with nonempty Newton polygons is\nthe sum of the finite slope multisets of the factors. -/\ntheorem newtonSlopes_prod (s : Finset \u03b9) (g : \u03b9 \u2192 R[X])\n (hg : \u2200 i \u2208 s, (g i).newtonPolygon v \u2260 \u22a4) :\n (\u220f i \u2208 s, g i).newtonSlopes v = \u2211 i \u2208 s, (g i).newtonSlopes v := by\n rw [Finset.prod_eq_multiset_prod, Finset.sum_eq_multiset_sum, newtonSlopes_multiset_prod,\n Multiset.map_map]\n \u00b7 rfl\n \u00b7 intro p hp\n obtain \u27e8i, hi, rfl\u27e9 := Multiset.mem_map.mp hp\n exact hg i hi\n\n/-- The finite slope multiset of a finitely supported product `\u220f\u1da0 i, g i`, whose nontrivial\nfactors have nonempty Newton polygons, is the sum of their finite slope multisets. -/\ntheorem newtonSlopes_finprod (g : \u03b9 \u2192 R[X]) (hfin : (Function.mulSupport g).Finite)\n (hg : \u2200 i \u2208 Function.mulSupport g, (g i).newtonPolygon v \u2260 \u22a4) :\n (\u220f\u1da0 i, g i).newtonSlopes v = \u2211 i \u2208 hfin.toFinset, (g i).newtonSlopes v := by\n rw [finprod_eq_prod g hfin]\n exact newtonSlopes_prod v hfin.toFinset g fun i hi => hg i (hfin.mem_toFinset.mp hi)\n\nend CommRing\n\nend Polynomial\n", "public_theorems": ["PowerSeries.addValuation_coeff_mul_eq_add_of_lt", "PowerSeries.addValuation_coeff_mul_eq_add_of_isLeast", "PowerSeries.addValuation_coeff_mul_eq_add_of_isGreatest", "PowerSeries.minkowskiSum_le_addValuation_coeff_mul", "PowerSeries.supportingValue_addValuation_coeff_mul", "PowerSeries.minkowskiSum_newtonPolygon_le_newtonPolygon_mul", "PowerSeries.supportingValue_newtonPolygon_mul", "PowerSeries.newtonPolygon_mul_of_forall_exists_mem_supportingFace", "PowerSeries.isFiniteFace_newtonPolygon_mul", "Polynomial.newtonPolygon_mul", "Polynomial.supportingValue_addValuation_coeff_mul", "Polynomial.newtonSlopes_mul", "Polynomial.newtonSlopes_le_of_dvd", "Polynomial.newtonPolygon_ne_top_multiset_prod", "Polynomial.newtonPolygon_ne_top_prod", "Polynomial.newtonSlopes_multiset_prod", "Polynomial.newtonSlopes_prod", "Polynomial.newtonSlopes_finprod"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Analysis.Convex.Sequence.Minkowski.SlopeData\npublic import TauCeti.Analysis.Convex.Sequence.Vertex\npublic import TauCeti.NumberTheory.NewtonPolygon.Slopes\nimport Mathlib.Tactic.LinearCombination\n\n/-!\n# Newton polygons of products\n\nThe Newton polygon of a product of polynomials is the Minkowski sum of the Newton polygons of\nthe factors, given by the min-convolution `TauCeti.minkowskiSum`. When both Newton polygons are\nnonempty, for example when both factors are nonzero over a field, the finite slopes of the\nproduct are those of the two factors together. These are the identities from which the slopes\nof a split polynomial are read off its linear factors.\n\nOne inequality is the ultrametric inequality for the coefficients of a product, and holds for\npower series with admissible coefficient heights. For the other, fix a slope `\u03c3` and take the\nfirst index at which the coefficient heights of each factor touch their supporting line of\nslope `\u03c3`. At the sum of these two indices the coefficient of the product has a unique dominant\nterm, so its valuation is the sum of the two valuations. Hence the supporting values of the\nproduct are the sums of the supporting values of the factors, and a convex sequence is\ndetermined by its supporting values.\n\nThe same dominant-term argument works for power series at any slope where supporting lines\ntouch the coefficient heights of both factors, with no convergence hypothesis. There the\nsupporting values of the product are again the sums of those of the factors. When `v` comes\nfrom an absolute value, this is the multiplicativity of Gauss norms at the corresponding radius.\nIf such contacts exist at every slope, the Newton polygon of the product is the Minkowski sum\nof the Newton polygons of the factors; the polynomial identity is the case of finitely many\nfinite heights.\n\nAt a common slope where both power-series polygons have finite faces, the product has the\nfinite face whose absolute endpoints are the sums of those of the factors. This local law\nrequires no convergence hypothesis and does not assert a global product identity outside the\nface. Singleton faces are allowed and contribute width zero; endpoints include any initial\norder of vanishing.\n\n## Main results\n\n* `PowerSeries.addValuation_coeff_mul_eq_add_of_isLeast` and\n `PowerSeries.addValuation_coeff_mul_eq_add_of_isGreatest`: at the sum of the first,\n respectively last, contact indices of supporting lines of a common slope, the valuation of\n the coefficient of a product is the sum of the valuations of the two coefficients;\n `PowerSeries.addValuation_coeff_mul_eq_add_of_lt` is the general unique-dominant-term form.\n* `PowerSeries.minkowskiSum_le_addValuation_coeff_mul`: the coefficient heights of a product\n lie above the Minkowski sum of the coefficient heights of the factors.\n* `PowerSeries.supportingValue_addValuation_coeff_mul`: supporting values of coefficient\n heights add under multiplication, at any slope where both factors touch a supporting line.\n* `PowerSeries.minkowskiSum_newtonPolygon_le_newtonPolygon_mul`: for admissible coefficient\n heights, the Minkowski sum of the Newton polygons of two power series lies below the Newton\n polygon of their product.\n* `PowerSeries.supportingValue_newtonPolygon_mul`: the same additivity for the supporting\n values of the Newton polygons.\n* `PowerSeries.newtonPolygon_mul_of_forall_exists_mem_supportingFace`: if the coefficient\n heights of both factors touch supporting lines of every slope, the Newton polygon of the\n product is the Minkowski sum of the Newton polygons of the factors.\n* `PowerSeries.isFiniteFace_newtonPolygon_mul`: finite faces at a common slope add under\n multiplication, with both absolute endpoints adding.\n* `Polynomial.newtonPolygon_mul`: the Newton polygon of a product of polynomials is the\n Minkowski sum of the Newton polygons of the factors. No hypothesis is needed: if either\n factor has the empty polygon, so does the product.\n* `Polynomial.supportingValue_addValuation_coeff_mul`: supporting values of coefficient heights\n add under multiplication of polynomials, at every slope.\n* `Polynomial.newtonSlopes_mul`, `Polynomial.newtonSlopes_multiset_prod`,\n `Polynomial.newtonSlopes_prod` and `Polynomial.newtonSlopes_finprod`: when the factors have\n nonempty Newton polygons, the finite slope multiset of a product of polynomials is the sum of\n the finite slope multisets of the factors.\n* `Polynomial.newtonSlopes_le_of_dvd`: the finite slopes of a factor of a polynomial with a\n nonempty Newton polygon are among those of the polynomial, with multiplicity.\n\n## References\n\n* M. Lazard, *Les z\u00e9ros d'une fonction analytique d'une variable sur un corps valu\u00e9 complet*,\n Publications Math\u00e9matiques de l'IH\u00c9S 14 (1962), \u00a71, Proposition 1.\n* K. S. Kedlaya, [*Newton polygons*](https://kskedlaya.org/18.787/newton-poly.pdf),\n MIT 18.787, fall 2007, \u00a7\u00a71\u20132. Kedlaya plots coefficient points at negative indices; our\n convention uses positive indices, so the slopes have the opposite sign.\n* N. Koblitz, *p-adic Numbers, p-adic Analysis, and Zeta-Functions*, second edition,\n Graduate Texts in Mathematics 58, Springer, 1984, Chapter IV \u00a7\u00a73\u20134.\n-/\n\npublic section\n\nopen TauCeti\n\nnamespace PowerSeries\n\nvariable {R : Type*} [Ring R] (v : AddValuation R (WithTop \u211d)) {f g : R\u27e6X\u27e7}", "/-- The unique dominant term of a coefficient of a product. Suppose the coefficient heights of\n`f` and `g` touch supporting lines of a common slope `\u03c3` at `i` and `j`, and every other split\n`p + q = i + j` has `p` or `q` strictly above its line. Then the valuation of the coefficient of\n`f * g` at `i + j` is the sum of the valuations of the coefficients of `f` at `i` and of `g`\nat `j`. -/\ntheorem addValuation_coeff_mul_eq_add_of_lt {\u03c3 c d : \u211d} {i j : \u2115}\n (hf : IsSupportingLine (fun n => v (coeff n f)) \u03c3 c)\n (hi : i \u2208 supportingFace (fun n => v (coeff n f)) \u03c3 c)\n (hg : IsSupportingLine (fun n => v (coeff n g)) \u03c3 d)\n (hj : j \u2208 supportingFace (fun n => v (coeff n g)) \u03c3 d)\n (hsplit : \u2200 p q, p + q = i + j \u2192 p \u2260 i \u2192\n ((c + \u03c3 * p : \u211d) : WithTop \u211d) < v (coeff p f) \u2228\n ((d + \u03c3 * q : \u211d) : WithTop \u211d) < v (coeff q g)) :\n v (coeff (i + j) (f * g)) = v (coeff i f) + v (coeff j g) :=", "/-- The valuation of the coefficient of a product at the sum of the first contact indices.\nIf `i` and `j` are the least indices at which the coefficient heights of `f` and `g` touch\nsupporting lines of a common slope, then the valuation of the coefficient of `f * g` at `i + j`\nis the sum of the valuations of the coefficients of `f` at `i` and of `g` at `j`. -/\ntheorem addValuation_coeff_mul_eq_add_of_isLeast {\u03c3 c d : \u211d} {i j : \u2115}\n (hf : IsSupportingLine (fun n => v (coeff n f)) \u03c3 c)\n (hi : IsLeast (supportingFace (fun n => v (coeff n f)) \u03c3 c) i)\n (hg : IsSupportingLine (fun n => v (coeff n g)) \u03c3 d)\n (hj : IsLeast (supportingFace (fun n => v (coeff n g)) \u03c3 d) j) :\n v (coeff (i + j) (f * g)) = v (coeff i f) + v (coeff j g) :=", "/-- The valuation of the coefficient of a product at the sum of the last contact indices.\nIf `i` and `j` are the greatest indices at which the coefficient heights of `f` and `g` touch\nsupporting lines of a common slope, then the valuation of the coefficient of `f * g` at `i + j`\nis the sum of the valuations of the coefficients of `f` at `i` and of `g` at `j`. -/\ntheorem addValuation_coeff_mul_eq_add_of_isGreatest {\u03c3 c d : \u211d} {i j : \u2115}\n (hf : IsSupportingLine (fun n => v (coeff n f)) \u03c3 c)\n (hi : IsGreatest (supportingFace (fun n => v (coeff n f)) \u03c3 c) i)\n (hg : IsSupportingLine (fun n => v (coeff n g)) \u03c3 d)\n (hj : IsGreatest (supportingFace (fun n => v (coeff n g)) \u03c3 d) j) :\n v (coeff (i + j) (f * g)) = v (coeff i f) + v (coeff j g) :=", "/-- The coefficient heights of a product of power series lie above the Minkowski sum of the\ncoefficient heights of the factors. -/\ntheorem minkowskiSum_le_addValuation_coeff_mul (n : \u2115) :\n minkowskiSum (fun n => v (coeff n f)) (fun n => v (coeff n g)) n \u2264\n v (coeff n (f * g)) :=", "/-- If supporting lines of a common slope touch the coefficient heights of `f` and `g`, then\nthe supporting value of the coefficient heights of `f * g` at that slope is the sum of those\nof `f` and `g`. When `v` comes from an absolute value, this is the multiplicativity of Gauss\nnorms at the corresponding radius. -/\ntheorem supportingValue_addValuation_coeff_mul {\u03c3 c d : \u211d} {i j : \u2115}\n (hf : IsSupportingLine (fun n => v (coeff n f)) \u03c3 c)\n (hi : i \u2208 supportingFace (fun n => v (coeff n f)) \u03c3 c)\n (hg : IsSupportingLine (fun n => v (coeff n g)) \u03c3 d)\n (hj : j \u2208 supportingFace (fun n => v (coeff n g)) \u03c3 d) :\n supportingValue (fun n => v (coeff n (f * g))) \u03c3 =\n supportingValue (fun n => v (coeff n f)) \u03c3 +\n supportingValue (fun n => v (coeff n g)) \u03c3 :=", "/-- For admissible coefficient heights, the Minkowski sum of the Newton polygons of two power\nseries lies below the Newton polygon of their product. -/\ntheorem minkowskiSum_newtonPolygon_le_newtonPolygon_mul\n (hf : IsAdmissible fun n => v (coeff n f)) (hg : IsAdmissible fun n => v (coeff n g)) :\n minkowskiSum (f.newtonPolygon v) (g.newtonPolygon v) \u2264 (f * g).newtonPolygon v :=", "/-- If supporting lines of a common slope `\u03c3` touch the coefficient heights of `f` and `g`, then\nthe supporting value at `\u03c3` of the Newton polygon of `f * g` is the sum of those of the Newton\npolygons of `f` and `g`. No convergence hypothesis is needed beyond these two contacts. -/\ntheorem supportingValue_newtonPolygon_mul {\u03c3 c d : \u211d} {i j : \u2115}\n (hf : IsSupportingLine (fun n => v (coeff n f)) \u03c3 c)\n (hi : i \u2208 supportingFace (fun n => v (coeff n f)) \u03c3 c)\n (hg : IsSupportingLine (fun n => v (coeff n g)) \u03c3 d)\n (hj : j \u2208 supportingFace (fun n => v (coeff n g)) \u03c3 d) :\n supportingValue ((f * g).newtonPolygon v) \u03c3 =\n supportingValue (f.newtonPolygon v) \u03c3 + supportingValue (g.newtonPolygon v) \u03c3 :=", "/-- The Newton polygon of a product is the Minkowski sum of the Newton polygons of the factors,\nprovided that at every slope the coefficient heights of each factor touch a supporting line.\nThis holds for polynomials with nonempty Newton polygons, and for nonzero entire series when the\nvaluation comes from the norm. Without contact the identity can fail: `1 - X` and the geometric\nseries `\u2211 X\u207f` have product `1`, a single point, while the Minkowski sum of their polygons is a\nhorizontal half-line. -/\ntheorem newtonPolygon_mul_of_forall_exists_mem_supportingFace\n (hf : \u2200 \u03c3 : \u211d, \u2203 (c : \u211d) (i : \u2115), IsSupportingLine (fun n => v (coeff n f)) \u03c3 c \u2227\n i \u2208 supportingFace (fun n => v (coeff n f)) \u03c3 c)\n (hg : \u2200 \u03c3 : \u211d, \u2203 (d : \u211d) (j : \u2115), IsSupportingLine (fun n => v (coeff n g)) \u03c3 d \u2227\n j \u2208 supportingFace (fun n => v (coeff n g)) \u03c3 d) :\n (f * g).newtonPolygon v = minkowskiSum (f.newtonPolygon v) (g.newtonPolygon v) :=", "/-- Finite Newton faces at a common slope add under multiplication, with both absolute\nendpoints adding. This is a local product law: the polygons need not agree with their\nMinkowski sum away from this face. No convergence hypothesis is required. -/\ntheorem isFiniteFace_newtonPolygon_mul {\u03c3 : \u211d} {l u l' u' : \u2115}\n (hf : IsFiniteFace (f.newtonPolygon v) \u03c3 l u)\n (hg : IsFiniteFace (g.newtonPolygon v) \u03c3 l' u') :\n IsFiniteFace ((f * g).newtonPolygon v) \u03c3 (l + l') (u + u') :=", "end PowerSeries\n\nnamespace Polynomial\n\nsection Ring\n\nvariable {R : Type*} [Ring R] (f g : R[X]) (v : AddValuation R (WithTop \u211d))", "/-- The Newton polygon of a product of polynomials is the Minkowski sum of the Newton polygons\nof the factors. If either factor has the empty Newton polygon, for example if it is zero, so\ndoes the product. -/\ntheorem newtonPolygon_mul :\n (f * g).newtonPolygon v = minkowskiSum (f.newtonPolygon v) (g.newtonPolygon v) :=", "/-- Supporting values of coefficient heights add under multiplication of polynomials. When `v`\ncomes from an absolute value, this is the multiplicativity of Gauss norms at every radius.\nNo hypothesis is needed: if all coefficient heights of a factor are infinite, both sides\nare `\u22a4`. -/\ntheorem supportingValue_addValuation_coeff_mul (\u03c3 : \u211d) :\n supportingValue (fun n => v ((f * g).coeff n)) \u03c3 =\n supportingValue (fun n => v (f.coeff n)) \u03c3 +\n supportingValue (fun n => v (g.coeff n)) \u03c3 :=", "/-- If both factors have nonempty Newton polygons, the finite slope multiset of a product of\npolynomials is the sum of the finite slope multisets of the factors. The hypotheses exclude\nzero factors: the product `0 * g` has no finite slopes, whatever those of `g`. If only zero\nhas infinite valuation, a nonzero polynomial has a nonempty Newton polygon by\n`Polynomial.newtonPolygon_ne_top_of_ne_zero`. -/\ntheorem newtonSlopes_mul (hf : f.newtonPolygon v \u2260 \u22a4) (hg : g.newtonPolygon v \u2260 \u22a4) :\n (f * g).newtonSlopes v = f.newtonSlopes v + g.newtonSlopes v :=", "variable {f g v} in", "/-- If `f` has a nonempty Newton polygon, the finite slopes of a factor `g` of `f` are among the\nfinite slopes of `f`, counted with multiplicity. This holds for every nonzero `f` when only zero\nhas infinite valuation, by `Polynomial.newtonPolygon_ne_top_of_ne_zero`. -/\ntheorem newtonSlopes_le_of_dvd (hf : f.newtonPolygon v \u2260 \u22a4) (hgf : g \u2223 f) :\n g.newtonSlopes v \u2264 f.newtonSlopes v :=", "end Ring\n\nsection CommRing\n\nvariable {\u03b9 R : Type*} [CommRing R] (v : AddValuation R (WithTop \u211d))", "/-- A product of a multiset of polynomials with nonempty Newton polygons has a nonempty Newton\npolygon. -/\ntheorem newtonPolygon_ne_top_multiset_prod (s : Multiset R[X])\n (hs : \u2200 p \u2208 s, p.newtonPolygon v \u2260 \u22a4) : s.prod.newtonPolygon v \u2260 \u22a4 :=", "/-- A finite product of polynomials with nonempty Newton polygons has a nonempty Newton polygon. -/\ntheorem newtonPolygon_ne_top_prod (s : Finset \u03b9) (g : \u03b9 \u2192 R[X])\n (hg : \u2200 i \u2208 s, (g i).newtonPolygon v \u2260 \u22a4) : (\u220f i \u2208 s, g i).newtonPolygon v \u2260 \u22a4 :=", "/-- The finite slope multiset of the product of a multiset of polynomials with nonempty Newton\npolygons is the sum of the finite slope multisets of the factors. -/\ntheorem newtonSlopes_multiset_prod (s : Multiset R[X]) (hs : \u2200 p \u2208 s, p.newtonPolygon v \u2260 \u22a4) :\n s.prod.newtonSlopes v = (s.map (\u00b7.newtonSlopes v)).sum :=", "/-- The finite slope multiset of a finite product of polynomials with nonempty Newton polygons is\nthe sum of the finite slope multisets of the factors. -/\ntheorem newtonSlopes_prod (s : Finset \u03b9) (g : \u03b9 \u2192 R[X])\n (hg : \u2200 i \u2208 s, (g i).newtonPolygon v \u2260 \u22a4) :\n (\u220f i \u2208 s, g i).newtonSlopes v = \u2211 i \u2208 s, (g i).newtonSlopes v :=", "/-- The finite slope multiset of a finitely supported product `\u220f\u1da0 i, g i`, whose nontrivial\nfactors have nonempty Newton polygons, is the sum of their finite slope multisets. -/\ntheorem newtonSlopes_finprod (g : \u03b9 \u2192 R[X]) (hfin : (Function.mulSupport g).Finite)\n (hg : \u2200 i \u2208 Function.mulSupport g, (g i).newtonPolygon v \u2260 \u22a4) :\n (\u220f\u1da0 i, g i).newtonSlopes v = \u2211 i \u2208 hfin.toFinset, (g i).newtonSlopes v :=", "end CommRing\n\nend Polynomial"], "free_length": 10114, "file_length": 15205, "heartbeats": 7766, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Geometry.Manifold.SmoothEmbedding.Euclidean", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Geometry/Manifold/SmoothEmbedding/Euclidean.lean", "module": "TauCeti.Geometry.Manifold.SmoothEmbedding.Euclidean", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Geometry.Manifold.SmoothEmbedding.Basic\npublic import TauCeti.Geometry.Manifold.Immersion.Differential\npublic import Mathlib.Geometry.Manifold.WhitneyEmbedding\nimport TauCeti.Geometry.Manifold.MFDeriv.Opens\nimport TauCeti.Geometry.Manifold.PartitionOfUnity.Compact\n\n/-!\n# Smooth embeddings into Euclidean space\n\nEvery compact Hausdorff boundaryless manifold has a smooth embedding into some Euclidean space\n(`TauCeti.SmoothEmbedding.exists_nonempty_euclidean_of_compact`). This repackages Mathlib's\nWhitney embedding theorem `exists_embedding_euclidean_of_compact` as a bundled\n`TauCeti.SmoothEmbedding`, reading its injective differential as an immersion.\n\nA compact subset `K` of a Hausdorff manifold, which need not be compact or boundaryless, has a\nsmooth map into some Euclidean space which is injective on `K` with injective differential at each\npoint of `K` (`IsCompact.exists_contMDiff_injOn_injective_mfderiv_euclidean`). For a finite smooth\nbump covering `(\u03c1_i)` of `K`, with `\u03c6_i` the extended chart at the centre of `\u03c1_i`, the map\n`x \u21a6 (\u03c1_i x \u2022 \u03c6_i x, \u03c1_i x)_i` has these properties. If the manifold is boundaryless, `K` lies in\nthe interior of a compact set `L`, and the map built for `L` embeds the interior of `L`: so `K` has\nan open neighbourhood with compact closure that embeds smoothly into some Euclidean space\n(`IsCompact.exists_opens_nonempty_smoothEmbedding_euclidean`). The map of a bump covering\nis Mathlib's `SmoothBumpCovering.embeddingPiTangent`; Mathlib does not export it, so it is\nrepeated here as a private auxiliary. This reduces statements about maps with relatively compact\nimage into an arbitrary boundaryless manifold, such as Whitney approximation, to the case of an\nembedded target.\n-/\n\npublic section\n\nopen Function Set Topology TopologicalSpace Module\nopen scoped ContDiff Manifold\n\nvariable {E H M : Type*} [NormedAddCommGroup E] [NormedSpace \u211d E] [FiniteDimensional \u211d E]\n [TopologicalSpace H] {I : ModelWithCorners \u211d E H}\n [TopologicalSpace M] [ChartedSpace H M] [IsManifold I \u221e M]\n\nnamespace TauCeti.SmoothEmbedding\n\n/-- A compact Hausdorff boundaryless manifold has a smooth embedding into a Euclidean space.\nThis is Mathlib's Whitney embedding theorem `exists_embedding_euclidean_of_compact`, with its\ninjective differential read as an immersion. -/\ntheorem exists_nonempty_euclidean_of_compact [I.Boundaryless] [CompactSpace M] [T2Space M] :\n \u2203 n : \u2115, Nonempty (SmoothEmbedding I \ud835\udcd8(\u211d, EuclideanSpace \u211d (Fin n)) \u221e M\n (EuclideanSpace \u211d (Fin n))) := by\n obtain \u27e8n, e, he, hemb, hinj\u27e9 := exists_embedding_euclidean_of_compact (I := I) (M := M)\n exact \u27e8n, \u27e8.ofIsSmoothEmbedding e\n \u27e8he.isImmersion_of_injective_mfderiv (by simp) hinj, hemb.isEmbedding\u27e9\u27e9\u27e9\n\n/-! The map `x \u21a6 (f i x \u2022 \u03c6_i x, f i x)_i` of a finite smooth bump covering `f`, where `\u03c6_i` is the\nextended chart at the centre of the `i`-th bump function, together with its injectivity and the\ninjectivity of its differential on the covered set. These are Mathlib's\n`SmoothBumpCovering.embeddingPiTangent`, `SmoothBumpCovering.embeddingPiTangent_injOn` and\n`SmoothBumpCovering.embeddingPiTangent_injective_mfderiv`, which\n`Mathlib.Geometry.Manifold.WhitneyEmbedding` does not export; the proofs are Mathlib's. -/\n\nvariable {\u03b9 : Type*} [Fintype \u03b9] {s : Set M}\n\n/-- The Whitney map `x \u21a6 (f i x \u2022 \u03c6_i x, f i x)_i` of a finite smooth bump covering. -/\nprivate noncomputable def whitneyMap (f : SmoothBumpCovering \u03b9 I M s) : M \u2192 (\u03b9 \u2192 E \u00d7 \u211d) :=\n fun x i \u21a6 (f i x \u2022 extChartAt I (f.c i) x, f i x)\n\nprivate theorem contMDiff_whitneyMap [T2Space M] (f : SmoothBumpCovering \u03b9 I M s) :\n ContMDiff I \ud835\udcd8(\u211d, \u03b9 \u2192 E \u00d7 \u211d) \u221e (whitneyMap f) :=\n contMDiff_pi_module_iff.2 fun i \u21a6\n ((f i).contMDiff_smul contMDiffOn_extChartAt).prodMk_space (f i).contMDiff\n\nomit [IsManifold I \u221e M] [Fintype \u03b9] in\nprivate theorem injOn_whitneyMap (f : SmoothBumpCovering \u03b9 I M s) : InjOn (whitneyMap f) s := by\n intro x hx y _ h\n simp only [whitneyMap, funext_iff] at h\n obtain \u27e8h\u2081, h\u2082\u27e9 := Prod.mk_inj.1 (h (f.ind x hx))\n rw [f.apply_ind x hx] at h\u2082\n rw [\u2190 h\u2082, f.apply_ind x hx, one_smul, one_smul] at h\u2081\n exact (extChartAt I (f.c _)).injOn (f.mem_extChartAt_ind_source x hx)\n (f.mem_extChartAt_source_of_eq_one h\u2082.symm) h\u2081\n\nprivate theorem injective_mfderiv_whitneyMap [T2Space M] (f : SmoothBumpCovering \u03b9 I M s)\n {x : M} (hx : x \u2208 s) : Injective (mfderiv I \ud835\udcd8(\u211d, \u03b9 \u2192 E \u00d7 \u211d) (whitneyMap f) x) := by\n -- Near `x` the bump function of index `f.ind x hx` is `1`, so the `E`-component of that index\n -- is the extended chart, whose differential is injective.\n let L : (\u03b9 \u2192 E \u00d7 \u211d) \u2192L[\u211d] E :=\n (ContinuousLinearMap.fst \u211d E \u211d).comp (ContinuousLinearMap.proj (f.ind x hx))\n have hL : L.comp (mfderiv I \ud835\udcd8(\u211d, \u03b9 \u2192 E \u00d7 \u211d) (whitneyMap f) x) =\n mfderiv I I (chartAt H (f.c (f.ind x hx))) x := by\n have := L.hasMFDerivAt.comp x\n ((contMDiff_whitneyMap f).mdifferentiableAt (by simp)).hasMFDerivAt\n -- The two derivatives are read in the model space `E` through different models.\n convert! hasMFDerivAt_unique this _\n refine (hasMFDerivAt_extChartAt (f.mem_chartAt_ind_source x hx)).congr_of_eventuallyEq ?_\n filter_upwards [f.eventuallyEq_one x hx] with y hy\n simp [L, whitneyMap, hy]\n refine LinearMap.ker_eq_bot.1 (bot_unique ?_)\n rw [\u2190 (mdifferentiable_chart (f.c (f.ind x hx))).ker_mfderiv_eq_bot\n (f.mem_chartAt_ind_source x hx), \u2190 hL]\n exact LinearMap.ker_le_ker_comp _ _\n\nend TauCeti.SmoothEmbedding\n\nopen TauCeti.SmoothEmbedding in\n/-- **A Euclidean immersion injective on a compact set.** A compact subset `K` of a Hausdorff\nmanifold modelled on a finite-dimensional space has a smooth map into some Euclidean space which is\ninjective on `K` and has injective differential at every point of `K`. The manifold need not be\ncompact, \u03c3-compact or boundaryless. -/\ntheorem IsCompact.exists_contMDiff_injOn_injective_mfderiv_euclidean [T2Space M] {K : Set M}\n (hK : IsCompact K) :\n \u2203 (n : \u2115) (g : M \u2192 EuclideanSpace \u211d (Fin n)),\n ContMDiff I \ud835\udcd8(\u211d, EuclideanSpace \u211d (Fin n)) \u221e g \u2227 InjOn g K \u2227\n \u2200 x \u2208 K, Injective (mfderiv I \ud835\udcd8(\u211d, EuclideanSpace \u211d (Fin n)) g x) := by\n obtain \u27e8\u03b9, _, f, -\u27e9 :=\n hK.exists_smoothBumpCovering_isSubordinate I (U := fun _ \u21a6 univ) fun _ _ \u21a6 Filter.univ_mem\n let V := \u03b9 \u2192 E \u00d7 \u211d\n let eV : V \u2243L[\u211d] EuclideanSpace \u211d (Fin (finrank \u211d V)) :=\n ContinuousLinearEquiv.ofFinrankEq finrank_euclideanSpace_fin.symm\n refine \u27e8_, eV \u2218 whitneyMap f, eV.toDiffeomorph.contMDiff.comp (contMDiff_whitneyMap f),\n eV.injective.comp_injOn (injOn_whitneyMap f), fun x hx \u21a6 ?_\u27e9\n rw [mfderiv_comp _ eV.differentiableAt.mdifferentiableAt\n ((contMDiff_whitneyMap f).mdifferentiableAt (by simp)), eV.mfderiv_eq]\n exact eV.injective.comp (injective_mfderiv_whitneyMap f hx)\n\n/-- **A Euclidean embedding near a compact set.** A compact subset `K` of a Hausdorff\nboundaryless manifold modelled on a finite-dimensional space has an open neighbourhood `W` with\ncompact closure which, as an open submanifold, has a smooth embedding into some Euclidean\nspace. -/\ntheorem IsCompact.exists_opens_nonempty_smoothEmbedding_euclidean [I.Boundaryless] [T2Space M]\n {K : Set M} (hK : IsCompact K) :\n \u2203 W : Opens M, K \u2286 W \u2227 IsCompact (closure (W : Set M)) \u2227 \u2203 n : \u2115,\n Nonempty (TauCeti.SmoothEmbedding I \ud835\udcd8(\u211d, EuclideanSpace \u211d (Fin n)) \u221e W\n (EuclideanSpace \u211d (Fin n))) := by\n have : LocallyCompactSpace H := I.locallyCompactSpace\n have : LocallyCompactSpace M := ChartedSpace.locallyCompactSpace H M\n obtain \u27e8L, hL, hKL\u27e9 := exists_compact_superset hK\n obtain \u27e8n, F, hF, hFi, hFd\u27e9 := hL.exists_contMDiff_injOn_injective_mfderiv_euclidean (I := I)\n -- On the interior of `L`, `F` is a smooth embedding, being injective on the compact set `L`.\n let W : Opens M := \u27e8interior L, isOpen_interior\u27e9\n have hemb : IsEmbedding (F \u2218 ((\u2191) : W \u2192 M)) := by\n have : CompactSpace L := isCompact_iff_compactSpace.1 hL\n exact ((hF.continuous.comp continuous_subtypeVal).isClosedEmbedding\n hFi.injective).isEmbedding.comp (IsEmbedding.inclusion interior_subset)\n refine \u27e8W, hKL, hL.closure_of_subset interior_subset, n, \u27e8.ofIsSmoothEmbedding _\n \u27e8(hF.comp contMDiff_subtypeVal).isImmersion_of_injective_mfderiv (by simp) fun x v w hvw \u21a6\n hFd _ (interior_subset x.property) ?_, hemb\u27e9\u27e9\u27e9\n rwa [\u2190 TauCeti.Manifold.mfderiv_comp_subtype_val_apply,\n \u2190 TauCeti.Manifold.mfderiv_comp_subtype_val_apply]\n", "public_theorems": ["TauCeti.SmoothEmbedding.exists_nonempty_euclidean_of_compact", "IsCompact.exists_contMDiff_injOn_injective_mfderiv_euclidean", "IsCompact.exists_opens_nonempty_smoothEmbedding_euclidean"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Geometry.Manifold.SmoothEmbedding.Basic\npublic import TauCeti.Geometry.Manifold.Immersion.Differential\npublic import Mathlib.Geometry.Manifold.WhitneyEmbedding\nimport TauCeti.Geometry.Manifold.MFDeriv.Opens\nimport TauCeti.Geometry.Manifold.PartitionOfUnity.Compact\n\n/-!\n# Smooth embeddings into Euclidean space\n\nEvery compact Hausdorff boundaryless manifold has a smooth embedding into some Euclidean space\n(`TauCeti.SmoothEmbedding.exists_nonempty_euclidean_of_compact`). This repackages Mathlib's\nWhitney embedding theorem `exists_embedding_euclidean_of_compact` as a bundled\n`TauCeti.SmoothEmbedding`, reading its injective differential as an immersion.\n\nA compact subset `K` of a Hausdorff manifold, which need not be compact or boundaryless, has a\nsmooth map into some Euclidean space which is injective on `K` with injective differential at each\npoint of `K` (`IsCompact.exists_contMDiff_injOn_injective_mfderiv_euclidean`). For a finite smooth\nbump covering `(\u03c1_i)` of `K`, with `\u03c6_i` the extended chart at the centre of `\u03c1_i`, the map\n`x \u21a6 (\u03c1_i x \u2022 \u03c6_i x, \u03c1_i x)_i` has these properties. If the manifold is boundaryless, `K` lies in\nthe interior of a compact set `L`, and the map built for `L` embeds the interior of `L`: so `K` has\nan open neighbourhood with compact closure that embeds smoothly into some Euclidean space\n(`IsCompact.exists_opens_nonempty_smoothEmbedding_euclidean`). The map of a bump covering\nis Mathlib's `SmoothBumpCovering.embeddingPiTangent`; Mathlib does not export it, so it is\nrepeated here as a private auxiliary. This reduces statements about maps with relatively compact\nimage into an arbitrary boundaryless manifold, such as Whitney approximation, to the case of an\nembedded target.\n-/\n\npublic section\n\nopen Function Set Topology TopologicalSpace Module\nopen scoped ContDiff Manifold\n\nvariable {E H M : Type*} [NormedAddCommGroup E] [NormedSpace \u211d E] [FiniteDimensional \u211d E]\n [TopologicalSpace H] {I : ModelWithCorners \u211d E H}\n [TopologicalSpace M] [ChartedSpace H M] [IsManifold I \u221e M]\n\nnamespace TauCeti.SmoothEmbedding", "/-- A compact Hausdorff boundaryless manifold has a smooth embedding into a Euclidean space.\nThis is Mathlib's Whitney embedding theorem `exists_embedding_euclidean_of_compact`, with its\ninjective differential read as an immersion. -/\ntheorem exists_nonempty_euclidean_of_compact [I.Boundaryless] [CompactSpace M] [T2Space M] :\n \u2203 n : \u2115, Nonempty (SmoothEmbedding I \ud835\udcd8(\u211d, EuclideanSpace \u211d (Fin n)) \u221e M\n (EuclideanSpace \u211d (Fin n))) :=", "/-! The map `x \u21a6 (f i x \u2022 \u03c6_i x, f i x)_i` of a finite smooth bump covering `f`, where `\u03c6_i` is the\nextended chart at the centre of the `i`-th bump function, together with its injectivity and the\ninjectivity of its differential on the covered set. These are Mathlib's\n`SmoothBumpCovering.embeddingPiTangent`, `SmoothBumpCovering.embeddingPiTangent_injOn` and\n`SmoothBumpCovering.embeddingPiTangent_injective_mfderiv`, which\n`Mathlib.Geometry.Manifold.WhitneyEmbedding` does not export; the proofs are Mathlib's. -/\n\nvariable {\u03b9 : Type*} [Fintype \u03b9] {s : Set M}\n\n/-- The Whitney map `x \u21a6 (f i x \u2022 \u03c6_i x, f i x)_i` of a finite smooth bump covering. -/\nprivate noncomputable def whitneyMap (f : SmoothBumpCovering \u03b9 I M s) : M \u2192 (\u03b9 \u2192 E \u00d7 \u211d) :=\n fun x i \u21a6 (f i x \u2022 extChartAt I (f.c i) x, f i x)", "end TauCeti.SmoothEmbedding\n\nopen TauCeti.SmoothEmbedding in", "/-- **A Euclidean immersion injective on a compact set.** A compact subset `K` of a Hausdorff\nmanifold modelled on a finite-dimensional space has a smooth map into some Euclidean space which is\ninjective on `K` and has injective differential at every point of `K`. The manifold need not be\ncompact, \u03c3-compact or boundaryless. -/\ntheorem IsCompact.exists_contMDiff_injOn_injective_mfderiv_euclidean [T2Space M] {K : Set M}\n (hK : IsCompact K) :\n \u2203 (n : \u2115) (g : M \u2192 EuclideanSpace \u211d (Fin n)),\n ContMDiff I \ud835\udcd8(\u211d, EuclideanSpace \u211d (Fin n)) \u221e g \u2227 InjOn g K \u2227\n \u2200 x \u2208 K, Injective (mfderiv I \ud835\udcd8(\u211d, EuclideanSpace \u211d (Fin n)) g x) :=", "/-- **A Euclidean embedding near a compact set.** A compact subset `K` of a Hausdorff\nboundaryless manifold modelled on a finite-dimensional space has an open neighbourhood `W` with\ncompact closure which, as an open submanifold, has a smooth embedding into some Euclidean\nspace. -/\ntheorem IsCompact.exists_opens_nonempty_smoothEmbedding_euclidean [I.Boundaryless] [T2Space M]\n {K : Set M} (hK : IsCompact K) :\n \u2203 W : Opens M, K \u2286 W \u2227 IsCompact (closure (W : Set M)) \u2227 \u2203 n : \u2115,\n Nonempty (TauCeti.SmoothEmbedding I \ud835\udcd8(\u211d, EuclideanSpace \u211d (Fin n)) \u221e W\n (EuclideanSpace \u211d (Fin n))) :="], "free_length": 3252, "file_length": 4906, "heartbeats": 13755, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.RingTheory.CompositionSeries.Semisimplification.Charpoly", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/RingTheory/CompositionSeries/Semisimplification/Charpoly.lean", "module": "TauCeti.RingTheory.CompositionSeries.Semisimplification.Charpoly", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.LinearAlgebra.Charpoly.BaseChange\npublic import TauCeti.LinearAlgebra.Charpoly.Lsmul\npublic import TauCeti.LinearAlgebra.Charpoly.Quotient\npublic import TauCeti.LinearAlgebra.Charpoly.Trace\npublic import TauCeti.RingTheory.CompositionSeries.Semisimplification.Basic\npublic import TauCeti.RingTheory.Semisimple.Charpoly\n\n/-!\n# Characteristic polynomials on the semisimplification\n\nLet `A` be an algebra over a field `k` and `M` an `A`-module that is finite-dimensional over `k`.\nThe semisimplification `M^ss` is again a finite-dimensional `k`-vector space\n(`TauCeti.semisimplification.instModule`), and every `a : A` has the same characteristic polynomial\non `M^ss` as on `M` (`TauCeti.charpoly_lsmul_semisimplification`). Applied to `A = k[\u0393]`, a\nfinite-dimensional representation and its semisimplification have the same characteristic\npolynomial, hence the same trace and determinant, at every element of `\u0393`\n(`TauCeti.trace_lsmul_semisimplification`, `TauCeti.det_lsmul_semisimplification`).\n\nThe proof is by induction on the dimension: a nonzero proper submodule `P` gives\n`M^ss \u2245 P^ss \u00d7 (M/P)^ss`, and the characteristic polynomial is multiplicative on `P` and `M/P`\n(`Submodule.charpoly_lsmul_eq_mul_quotient`); a module with no such submodule is zero or simple,\nhence semisimple and isomorphic to `M^ss`.\n\n## Main results\n\n* `TauCeti.charpoly_lsmul_semisimplification`: `charpoly (a | M^ss) = charpoly (a | M)`.\n* `TauCeti.trace_lsmul_semisimplification`: `trace (a | M^ss) = trace (a | M)`.\n* `TauCeti.det_lsmul_semisimplification`: `det (a | M^ss) = det (a | M)`.\n* `TauCeti.nonempty_linearEquiv_semisimplification_iff_charpoly_eq`: conversely, over any field\n the characteristic polynomials of all `a : A` determine `M^ss` up to isomorphism.\n-/\n\npublic section\n\nnamespace TauCeti\n\nvariable {k A : Type*} [Field k] [Ring A] [Algebra k A]\n\nsection Charpoly\n\nvariable {M : Type*} [AddCommGroup M] [Module A M] [Module k M] [IsScalarTower k A M]\n [FiniteDimensional k M] [IsNoetherian A M] [IsArtinian A M]\n\n/-- **The semisimplification has the characteristic polynomials of the module.** For an\n`A`-module `M` that is finite-dimensional over a field `k` (with `A` a `k`-algebra), every\n`a : A` has the same characteristic polynomial on `M^ss` as on `M`. -/\n@[simp]\ntheorem charpoly_lsmul_semisimplification (a : A) :\n (Algebra.lsmul k k (semisimplification A M) a).charpoly =\n (Algebra.lsmul k k M a).charpoly := by\n induction hn : Module.finrank k M using Nat.strong_induction_on generalizing M with\n | _ n ih =>\n by_cases hP : \u2203 P : Submodule A M, P \u2260 \u22a5 \u2227 P \u2260 \u22a4\n \u00b7 obtain \u27e8P, hbot, htop\u27e9 := hP\n obtain \u27e8e\u27e9 := nonempty_linearEquiv_semisimplification_prod_quotient P\n have hW : Module.finrank k P = Module.finrank k (P.restrictScalars k) :=\n ((P.restrictScalarsEquiv k A M).restrictScalars k).finrank_eq.symm\n have hsum : Module.finrank k (M \u29f8 P) = n - Module.finrank k P :=\n hn \u25b8 Submodule.finrank_quotient (R := k) P\n have hP : Module.finrank k P < n := by\n rw [\u2190 hn, hW]\n exact Submodule.finrank_lt (by rwa [Ne, Submodule.restrictScalars_eq_top_iff])\n have hQ : Module.finrank k (M \u29f8 P) < n := by\n have : Module.finrank k P \u2260 0 := by\n rwa [hW, Ne, Submodule.finrank_eq_zero, Submodule.restrictScalars_eq_bot_iff]\n omega\n rw [e.charpoly_lsmul_eq, Algebra.charpoly_lsmul_prod, ih _ hP rfl, ih _ hQ rfl,\n P.charpoly_lsmul_eq_mul_quotient]\n \u00b7 have : IsSemisimpleModule A M :=\n { exists_isCompl P := by\n rcases eq_or_ne P \u22a5 with rfl | hbot\n \u00b7 exact \u27e8\u22a4, isCompl_bot_top\u27e9\n \u00b7 obtain rfl : P = \u22a4 := by_contra fun htop \u21a6 hP \u27e8P, hbot, htop\u27e9\n exact \u27e8\u22a5, isCompl_top_bot\u27e9 }\n obtain \u27e8e\u27e9 := nonempty_linearEquiv_semisimplification_of_isSemisimpleModule (R := A) (M := M)\n exact e.charpoly_lsmul_eq a\n\n/-- Every `a : A` has the same trace over `k` on the semisimplification `M^ss` as on `M`. -/\n@[simp]\ntheorem trace_lsmul_semisimplification (a : A) :\n LinearMap.trace k (semisimplification A M) (Algebra.lsmul k k (semisimplification A M) a) =\n LinearMap.trace k M (Algebra.lsmul k k M a) :=\n LinearMap.trace_eq_of_charpoly_eq (charpoly_lsmul_semisimplification a)\n\n/-- Every `a : A` has the same determinant over `k` on the semisimplification `M^ss` as on `M`. -/\n@[simp]\ntheorem det_lsmul_semisimplification (a : A) :\n LinearMap.det (Algebra.lsmul k k (semisimplification A M) a) =\n LinearMap.det (Algebra.lsmul k k M a) :=\n LinearMap.det_eq_of_charpoly_eq (charpoly_lsmul_semisimplification a)\n\nvariable {N : Type*} [AddCommGroup N] [Module A N] [Module k N] [IsScalarTower k A N]\n [FiniteDimensional k N] [IsNoetherian A N] [IsArtinian A N]\n\n/-- **The characteristic polynomials determine the semisimplification**, over any field: for\n`A`-modules `M` and `N` that are finite-dimensional over a field `k` (with `A` a `k`-algebra),\n`M^ss \u2245 N^ss` if and only if every `a : A` has the same characteristic polynomial on `M` as on\n`N`. -/\ntheorem nonempty_linearEquiv_semisimplification_iff_charpoly_eq :\n Nonempty (semisimplification A M \u2243\u2097[A] semisimplification A N) \u2194\n \u2200 a : A, (Algebra.lsmul k k M a).charpoly = (Algebra.lsmul k k N a).charpoly := by\n refine \u27e8fun \u27e8e\u27e9 a => ?_, fun h =>\n IsSemisimpleModule.nonempty_linearEquiv_of_forall_charpoly_eq (k := k) fun a => ?_\u27e9\n \u00b7 rw [\u2190 charpoly_lsmul_semisimplification, e.charpoly_lsmul_eq,\n charpoly_lsmul_semisimplification]\n \u00b7 rw [charpoly_lsmul_semisimplification, charpoly_lsmul_semisimplification, h]\n\nend Charpoly\n\nend TauCeti\n", "public_theorems": ["TauCeti.charpoly_lsmul_semisimplification", "TauCeti.trace_lsmul_semisimplification", "TauCeti.det_lsmul_semisimplification", "TauCeti.nonempty_linearEquiv_semisimplification_iff_charpoly_eq"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.LinearAlgebra.Charpoly.BaseChange\npublic import TauCeti.LinearAlgebra.Charpoly.Lsmul\npublic import TauCeti.LinearAlgebra.Charpoly.Quotient\npublic import TauCeti.LinearAlgebra.Charpoly.Trace\npublic import TauCeti.RingTheory.CompositionSeries.Semisimplification.Basic\npublic import TauCeti.RingTheory.Semisimple.Charpoly\n\n/-!\n# Characteristic polynomials on the semisimplification\n\nLet `A` be an algebra over a field `k` and `M` an `A`-module that is finite-dimensional over `k`.\nThe semisimplification `M^ss` is again a finite-dimensional `k`-vector space\n(`TauCeti.semisimplification.instModule`), and every `a : A` has the same characteristic polynomial\non `M^ss` as on `M` (`TauCeti.charpoly_lsmul_semisimplification`). Applied to `A = k[\u0393]`, a\nfinite-dimensional representation and its semisimplification have the same characteristic\npolynomial, hence the same trace and determinant, at every element of `\u0393`\n(`TauCeti.trace_lsmul_semisimplification`, `TauCeti.det_lsmul_semisimplification`).\n\nThe proof is by induction on the dimension: a nonzero proper submodule `P` gives\n`M^ss \u2245 P^ss \u00d7 (M/P)^ss`, and the characteristic polynomial is multiplicative on `P` and `M/P`\n(`Submodule.charpoly_lsmul_eq_mul_quotient`); a module with no such submodule is zero or simple,\nhence semisimple and isomorphic to `M^ss`.\n\n## Main results\n\n* `TauCeti.charpoly_lsmul_semisimplification`: `charpoly (a | M^ss) = charpoly (a | M)`.\n* `TauCeti.trace_lsmul_semisimplification`: `trace (a | M^ss) = trace (a | M)`.\n* `TauCeti.det_lsmul_semisimplification`: `det (a | M^ss) = det (a | M)`.\n* `TauCeti.nonempty_linearEquiv_semisimplification_iff_charpoly_eq`: conversely, over any field\n the characteristic polynomials of all `a : A` determine `M^ss` up to isomorphism.\n-/\n\npublic section\n\nnamespace TauCeti\n\nvariable {k A : Type*} [Field k] [Ring A] [Algebra k A]\n\nsection Charpoly\n\nvariable {M : Type*} [AddCommGroup M] [Module A M] [Module k M] [IsScalarTower k A M]\n [FiniteDimensional k M] [IsNoetherian A M] [IsArtinian A M]", "/-- **The semisimplification has the characteristic polynomials of the module.** For an\n`A`-module `M` that is finite-dimensional over a field `k` (with `A` a `k`-algebra), every\n`a : A` has the same characteristic polynomial on `M^ss` as on `M`. -/\n@[simp]\ntheorem charpoly_lsmul_semisimplification (a : A) :\n (Algebra.lsmul k k (semisimplification A M) a).charpoly =\n (Algebra.lsmul k k M a).charpoly :=", "/-- Every `a : A` has the same trace over `k` on the semisimplification `M^ss` as on `M`. -/\n@[simp]\ntheorem trace_lsmul_semisimplification (a : A) :\n LinearMap.trace k (semisimplification A M) (Algebra.lsmul k k (semisimplification A M) a) =\n LinearMap.trace k M (Algebra.lsmul k k M a) :=", "/-- Every `a : A` has the same determinant over `k` on the semisimplification `M^ss` as on `M`. -/\n@[simp]\ntheorem det_lsmul_semisimplification (a : A) :\n LinearMap.det (Algebra.lsmul k k (semisimplification A M) a) =\n LinearMap.det (Algebra.lsmul k k M a) :=", "variable {N : Type*} [AddCommGroup N] [Module A N] [Module k N] [IsScalarTower k A N]\n [FiniteDimensional k N] [IsNoetherian A N] [IsArtinian A N]", "/-- **The characteristic polynomials determine the semisimplification**, over any field: for\n`A`-modules `M` and `N` that are finite-dimensional over a field `k` (with `A` a `k`-algebra),\n`M^ss \u2245 N^ss` if and only if every `a : A` has the same characteristic polynomial on `M` as on\n`N`. -/\ntheorem nonempty_linearEquiv_semisimplification_iff_charpoly_eq :\n Nonempty (semisimplification A M \u2243\u2097[A] semisimplification A N) \u2194\n \u2200 a : A, (Algebra.lsmul k k M a).charpoly = (Algebra.lsmul k k N a).charpoly :=", "end Charpoly\n\nend TauCeti"], "free_length": 1685, "file_length": 3179, "heartbeats": 9369, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Analysis.ODE.CenterEquation", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Analysis/ODE/CenterEquation.lean", "module": "TauCeti.Analysis.ODE.CenterEquation", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent\npublic import Mathlib.Analysis.Asymptotics.Theta\npublic import Mathlib.Analysis.Calculus.Deriv.Basic\nimport Mathlib.Analysis.Asymptotics.Lemmas\nimport Mathlib.Analysis.Calculus.Deriv.Inv\nimport Mathlib.Analysis.Calculus.Deriv.MeanValue\nimport Mathlib.Analysis.Calculus.MeanValue\nimport Mathlib.Analysis.Calculus.Deriv.Mul\nimport Mathlib.Analysis.Calculus.Deriv.Pow\nimport TauCeti.Analysis.Calculus.Deriv.Growth\n\n/-!\n# The scalar center equation at a degenerate end\n\nNear a degenerate critical point whose linearization has a one-dimensional kernel and a nonzero\nquadratic fold coefficient `\u03ba`, the component `\u03b2` of a gradient trajectory along the kernel (its\n*center amplitude*) satisfies, after reduction to a center manifold, the scalar equation\n\n`\u03b2' = -\u03ba \u03b2\u00b2 + o(\u03b2\u00b2)` as `s \u2192 +\u221e`.\n\nThis file shows that, when `\u03ba > 0`, such an amplitude which tends to `0` and is not eventually\nzero decays polynomially rather than exponentially, at the exact rate of the model solution\n`\u03b2(s) = (\u03ba s)\u207b\u00b9` of `\u03b2' = -\u03ba \u03b2\u00b2`:\n\n* it is eventually positive (`IsCenterEquationSolution.eventually_pos`); without the\n nonvanishing assumption, it is either eventually zero or eventually positive\n (`IsCenterEquationSolution.eventuallyEq_zero_or_eventually_pos`);\n* `s \u03b2(s) \u2192 \u03ba\u207b\u00b9` (`IsCenterEquationSolution.tendsto_mul`), that is `\u03b2 ~ (\u03ba s)\u207b\u00b9`\n (`IsCenterEquationSolution.isEquivalent`), and `\u03b2' ~ -(\u03ba s\u00b2)\u207b\u00b9`\n (`IsCenterEquationSolution.isEquivalent_deriv`);\n* hence the two-sided bounds `c s\u207b\u00b9 \u2264 \u03b2(s) \u2264 C s\u207b\u00b9` and `c s\u207b\u00b2 \u2264 |\u03b2'(s)| \u2264 C s\u207b\u00b2` for large `s`\n (equivalently with `1 + s` in place of `s`), stated as `IsTheta` relations\n (`IsCenterEquationSolution.isTheta`, `IsCenterEquationSolution.isTheta_deriv`).\n\nThe remainder is only assumed to be `o(\u03b2\u00b2)`, which includes the usual `O(\u03b2\u00b3)` remainder of a center\nmanifold reduction since `\u03b2 \u2192 0` (`Asymptotics.IsBigO.trans_isLittleO`). It may depend on `s`, so\nthat the transverse components of the trajectory can enter it.\n\nFor an autonomous equation `\u03b2' = f(\u03b2)` with `f(0) = f'(0) = 0` and `f''(0) = -2\u03ba`, every\nsolution tending to `0` solves the center equation (`TauCeti.isCenterEquationSolution_comp`). If\nmoreover `\u03ba > 0` and the solution is not eventually zero, the second derivative\n`\u03b2'' = f'(\u03b2) f(\u03b2)` is equivalent to `2 (\u03ba s\u00b3)\u207b\u00b9`, the second derivative of the model solution\n(`IsCenterEquationSolution.isEquivalent_comp_mul_comp`), so `\u03b2'' =\u0398 s\u207b\u00b3`\n(`IsCenterEquationSolution.isTheta_comp_mul_comp`).\n\n## Main definitions\n\n* `TauCeti.IsCenterEquationSolution \u03ba \u03b2 \u03b2'`: `\u03b2` has derivative `\u03b2'` near `+\u221e`, satisfies\n `\u03b2' + \u03ba \u03b2\u00b2 = o(\u03b2\u00b2)` and tends to `0`.\n\n## Implementation notes\n\nThe proof passes to `y = 1 / \u03b2`: the equation becomes `y' = \u03ba + o(1)`, so `y(s) / s \u2192 \u03ba` by the\nmean value inequality (`TauCeti.tendsto_inv_smul_atTop_of_tendsto_deriv`). Positivity comes from\nmonotonicity: `\u03b2' \u2264 -(\u03ba / 2) \u03b2\u00b2 \u2264 0` eventually, so `\u03b2` decreases to its limit `0`.\n\n## References\n\n* J. Carr, *Applications of Centre Manifold Theory*, Springer, 1981, Chapter 2: the reduced\n equation on a center manifold.\n-/\n\npublic section\n\nopen Filter Topology Asymptotics Set\n\nnamespace TauCeti\n\n/-- `\u03b2` solves the **scalar center equation** `\u03b2' = -\u03ba \u03b2\u00b2 + o(\u03b2\u00b2)` near `+\u221e`, with derivative `\u03b2'`,\nand tends to `0`. This is the equation of the center amplitude of a trajectory that converges to a\ndegenerate critical point with fold coefficient `\u03ba`. -/\nstructure IsCenterEquationSolution (\u03ba : \u211d) (\u03b2 \u03b2' : \u211d \u2192 \u211d) : Prop where\n /-- `\u03b2` has derivative `\u03b2'` near `+\u221e`. -/\n hasDerivAt : \u2200\u1da0 s in atTop, HasDerivAt \u03b2 (\u03b2' s) s\n /-- The remainder `\u03b2' + \u03ba \u03b2\u00b2` is negligible compared with `\u03b2\u00b2`. -/\n isLittleO : (fun s \u21a6 \u03b2' s + \u03ba * \u03b2 s ^ 2) =o[atTop] fun s \u21a6 \u03b2 s ^ 2\n /-- `\u03b2` tends to `0` at `+\u221e`. -/\n tendsto : Tendsto \u03b2 atTop (\ud835\udcdd 0)\n\n/-- The model solution `\u03b2(s) = (\u03ba s)\u207b\u00b9` of `\u03b2' = -\u03ba \u03b2\u00b2`. -/\ntheorem isCenterEquationSolution_inv_mul {\u03ba : \u211d} (h\u03ba : \u03ba \u2260 0) :\n IsCenterEquationSolution \u03ba (fun s \u21a6 (\u03ba * s)\u207b\u00b9) fun s \u21a6 -(\u03ba * s ^ 2)\u207b\u00b9 where\n hasDerivAt := by\n filter_upwards [eventually_ne_atTop 0] with s hs\n convert ((hasDerivAt_id' s).const_mul \u03ba).inv (mul_ne_zero h\u03ba hs) using 1\n field_simp\n isLittleO := by\n refine (isLittleO_zero _ _).congr' ?_ EventuallyEq.rfl\n filter_upwards [eventually_ne_atTop 0] with s hs\n field_simp\n ring\n tendsto := by\n have := tendsto_inv_atTop_zero.const_mul \u03ba\u207b\u00b9\n rw [mul_zero] at this\n exact this.congr fun s \u21a6 (mul_inv \u03ba s).symm\n\nnamespace IsCenterEquationSolution\n\nvariable {\u03ba : \u211d} {\u03b2 \u03b2' : \u211d \u2192 \u211d}\n\n/-- Eventually `\u03b2' \u2264 -(\u03ba / 2) \u03b2\u00b2`. -/\nprivate lemma eventually_deriv_le (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba) :\n \u2200\u1da0 s in atTop, \u03b2' s \u2264 -(\u03ba / 2) * \u03b2 s ^ 2 := by\n filter_upwards [h.isLittleO.def (half_pos h\u03ba)] with s hs\n rw [Real.norm_eq_abs, norm_pow, Real.norm_eq_abs, sq_abs] at hs\n linarith [le_abs_self (\u03b2' s + \u03ba * \u03b2 s ^ 2)]\n\n/-- For `\u03ba > 0`, a solution of the center equation is eventually antitone. -/\ntheorem exists_antitoneOn_Ici (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba) :\n \u2203 a, AntitoneOn \u03b2 (Ici a) := by\n obtain \u27e8a, ha\u27e9 := eventually_atTop.1 (h.hasDerivAt.and (h.eventually_deriv_le h\u03ba))\n refine \u27e8a, antitoneOn_of_hasDerivWithinAt_nonpos (f' := \u03b2') (convex_Ici a)\n (fun s hs \u21a6 (ha s hs).1.continuousAt.continuousWithinAt) ?_ ?_\u27e9 <;> rw [interior_Ici]\n \u00b7 exact fun s hs \u21a6 (ha s hs.le).1.hasDerivWithinAt\n \u00b7 intro s hs\n nlinarith [(ha s hs.le).2, sq_nonneg (\u03b2 s)]\n\n/-- For `\u03ba > 0`, a solution of the center equation is eventually nonnegative: it decreases to its\nlimit `0`. -/\ntheorem eventually_nonneg (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba) :\n \u2200\u1da0 s in atTop, 0 \u2264 \u03b2 s := by\n obtain \u27e8a, ha\u27e9 := h.exists_antitoneOn_Ici h\u03ba\n filter_upwards [eventually_ge_atTop a] with s hs\n by_contra! hneg\n obtain \u27e8t, ht, hst\u27e9 :=\n ((h.tendsto.eventually (lt_mem_nhds hneg)).and (eventually_ge_atTop s)).exists\n exact absurd ht (not_lt.2 (ha (mem_Ici.2 hs) (mem_Ici.2 (hs.trans hst)) hst))\n\n/-- For `\u03ba > 0`, a solution of the center equation is either eventually zero or eventually\npositive. -/\ntheorem eventuallyEq_zero_or_eventually_pos (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba) :\n \u03b2 =\u1da0[atTop] 0 \u2228 \u2200\u1da0 s in atTop, 0 < \u03b2 s := by\n obtain \u27e8a, ha\u27e9 := h.exists_antitoneOn_Ici h\u03ba\n obtain \u27e8b, hb\u27e9 := eventually_atTop.1 (h.eventually_nonneg h\u03ba)\n by_cases hz : \u2203 s \u2265 max a b, \u03b2 s = 0\n \u00b7 -- Once `\u03b2` vanishes it stays at `0`, being antitone and nonnegative.\n obtain \u27e8s, hs, hs0\u27e9 := hz\n refine Or.inl ?_\n filter_upwards [eventually_ge_atTop s] with t ht\n have hat : a \u2264 s := (le_max_left a b).trans hs\n have hts := ha (mem_Ici.2 hat) (mem_Ici.2 (hat.trans ht)) ht\n rw [hs0] at hts\n exact le_antisymm hts (hb t (((le_max_right a b).trans hs).trans ht))\n \u00b7 push Not at hz\n refine Or.inr ?_\n filter_upwards [eventually_ge_atTop (max a b)] with s hs\n exact (hb s ((le_max_right a b).trans hs)).lt_of_ne (hz s hs).symm\n\n/-- For `\u03ba > 0`, a solution of the center equation that is not eventually zero is eventually\npositive. -/\ntheorem eventually_pos (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba)\n (hne : \u00ac\u03b2 =\u1da0[atTop] 0) : \u2200\u1da0 s in atTop, 0 < \u03b2 s :=\n (h.eventuallyEq_zero_or_eventually_pos h\u03ba).resolve_left hne\n\n/-- **Polynomial decay at the exact rate.** For `\u03ba > 0`, a solution of the center equation that is\nnot eventually zero satisfies `s \u03b2(s) \u2192 \u03ba\u207b\u00b9`. -/\ntheorem tendsto_mul (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba) (hne : \u00ac\u03b2 =\u1da0[atTop] 0) :\n Tendsto (fun s \u21a6 s * \u03b2 s) atTop (\ud835\udcdd \u03ba\u207b\u00b9) := by\n have hpos := h.eventually_pos h\u03ba hne\n -- The reciprocal `y = 1 / \u03b2` satisfies `y' = \u03ba - (\u03b2' + \u03ba \u03b2\u00b2) / \u03b2\u00b2 = \u03ba + o(1)`.\n have hinv : \u2200\u1da0 s in atTop,\n HasDerivAt (fun s \u21a6 (\u03b2 s)\u207b\u00b9) (\u03ba - (\u03b2' s + \u03ba * \u03b2 s ^ 2) / \u03b2 s ^ 2) s := by\n filter_upwards [h.hasDerivAt, hpos] with s hs hs0\n convert hs.inv hs0.ne' using 1\n field_simp\n ring\n have hlim : Tendsto (fun s \u21a6 \u03ba - (\u03b2' s + \u03ba * \u03b2 s ^ 2) / \u03b2 s ^ 2) atTop (\ud835\udcdd \u03ba) := by\n simpa using h.isLittleO.tendsto_div_nhds_zero.const_sub \u03ba\n refine ((tendsto_inv_smul_atTop_of_tendsto_deriv hinv hlim).inv\u2080 h\u03ba.ne').congr' ?_\n filter_upwards [hpos] with s _\n simp [mul_comm]\n\n/-- For `\u03ba > 0`, a solution of the center equation that is not eventually zero is asymptotically\nequivalent to the model solution `(\u03ba s)\u207b\u00b9`. -/\ntheorem isEquivalent (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba) (hne : \u00ac\u03b2 =\u1da0[atTop] 0) :\n \u03b2 ~[atTop] fun s \u21a6 (\u03ba * s)\u207b\u00b9 := by\n refine isEquivalent_of_tendsto_one ?_\n have := (h.tendsto_mul h\u03ba hne).const_mul \u03ba\n rw [mul_inv_cancel\u2080 h\u03ba.ne'] at this\n refine this.congr' ?_\n filter_upwards [eventually_ne_atTop 0] with s _\n simp only [Pi.div_apply, div_inv_eq_mul]\n ring\n\n/-- For `\u03ba > 0`, the derivative of a solution of the center equation that is not eventually zero\nis asymptotically equivalent to the derivative `-(\u03ba s\u00b2)\u207b\u00b9` of the model solution. -/\ntheorem isEquivalent_deriv (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba)\n (hne : \u00ac\u03b2 =\u1da0[atTop] 0) : \u03b2' ~[atTop] fun s \u21a6 -(\u03ba * s ^ 2)\u207b\u00b9 := by\n -- First `\u03b2' ~ -\u03ba \u03b2\u00b2`, since the remainder is `o(\u03b2\u00b2)`.\n have h\u2081 : \u03b2' ~[atTop] fun s \u21a6 -\u03ba * \u03b2 s ^ 2 :=\n (h.isLittleO.trans_isBigO\n ((isTheta_const_mul_left (neg_ne_zero.2 h\u03ba.ne')).2 (isTheta_refl _ _)).2).congr_left\n fun s \u21a6 by simp\n have h\u2082 : (fun s \u21a6 -\u03ba * \u03b2 s ^ 2) ~[atTop] fun s \u21a6 -\u03ba * (\u03ba * s)\u207b\u00b9 ^ 2 :=\n (IsEquivalent.refl (u := fun _ \u21a6 -\u03ba)).mul ((h.isEquivalent h\u03ba hne).pow 2)\n refine (h\u2081.trans h\u2082).congr_right ?_\n filter_upwards [eventually_ne_atTop 0] with s hs\n field_simp\n\n/-- **Two-sided polynomial bounds.** For `\u03ba > 0`, a solution of the center equation that is not\neventually zero satisfies `\u03b2 =\u0398 s\u207b\u00b9` at `+\u221e`: `c / s \u2264 \u03b2(s) \u2264 C / s` for large `s`. -/\ntheorem isTheta (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba) (hne : \u00ac\u03b2 =\u1da0[atTop] 0) :\n \u03b2 =\u0398[atTop] fun s \u21a6 s\u207b\u00b9 :=\n (h.isEquivalent h\u03ba hne).isTheta.trans <|\n EventuallyEq.trans_isTheta (f\u2082 := fun s \u21a6 \u03ba\u207b\u00b9 * s\u207b\u00b9) (.of_forall fun s \u21a6 mul_inv \u03ba s)\n ((isTheta_const_mul_left (inv_ne_zero h\u03ba.ne')).2 (isTheta_refl _ _))\n\n/-- **Two-sided polynomial bounds on the derivative.** For `\u03ba > 0`, the derivative of a solution\nof the center equation that is not eventually zero satisfies `\u03b2' =\u0398 (s\u00b2)\u207b\u00b9` at `+\u221e`. -/\ntheorem isTheta_deriv (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba)\n (hne : \u00ac\u03b2 =\u1da0[atTop] 0) : \u03b2' =\u0398[atTop] fun s \u21a6 (s ^ 2)\u207b\u00b9 :=\n (h.isEquivalent_deriv h\u03ba hne).isTheta.trans <|\n EventuallyEq.trans_isTheta (f\u2082 := fun s \u21a6 -\u03ba\u207b\u00b9 * (s ^ 2)\u207b\u00b9)\n (.of_forall fun s \u21a6 by simp only [mul_inv, neg_mul])\n ((isTheta_const_mul_left (neg_ne_zero.2 (inv_ne_zero h\u03ba.ne'))).2 (isTheta_refl _ _))\n\nend IsCenterEquationSolution\n\n/-! ### The autonomous center equation -/\n\nsection Autonomous\n\nvariable {\u03ba : \u211d} {\u03b2 f f' : \u211d \u2192 \u211d}\n\n/-- **The autonomous center equation.** Let `f` be differentiable near `0` with `f(0) = 0`,\n`f'(0) = 0` and `f''(0) = -2\u03ba`. A solution `\u03b2` of `\u03b2' = f(\u03b2)` that tends to `0` at `+\u221e` solves the\ncenter equation `\u03b2' = -\u03ba \u03b2\u00b2 + o(\u03b2\u00b2)`. -/\ntheorem isCenterEquationSolution_comp (hf : \u2200\u1da0 x in \ud835\udcdd 0, HasDerivAt f (f' x) x) (hf\u2080 : f 0 = 0)\n (hf'\u2080 : f' 0 = 0) (hf' : HasDerivAt f' (-(2 * \u03ba)) 0)\n (h\u03b2 : \u2200\u1da0 s in atTop, HasDerivAt \u03b2 (f (\u03b2 s)) s) (hlim : Tendsto \u03b2 atTop (\ud835\udcdd 0)) :\n IsCenterEquationSolution \u03ba \u03b2 fun s \u21a6 f (\u03b2 s) where\n hasDerivAt := h\u03b2\n isLittleO := by\n -- `f x + \u03ba x\u00b2` has derivative `f' x + 2 \u03ba x = o(x)`, so it is `o(x\u00b2)`.\n have hg : \u2200\u1da0 x in \ud835\udcdd 0, HasDerivAt (fun x \u21a6 f x + \u03ba * x ^ 2) (f' x + 2 * \u03ba * x) x :=\n hf.mono fun x hx \u21a6 by\n convert hx.add ((hasDerivAt_pow 2 x).const_mul \u03ba) using 1\n ring\n have hg' : (fun x \u21a6 f' x + 2 * \u03ba * x) =o[\ud835\udcdd 0] fun x \u21a6 (x - 0) ^ 1 := by\n simpa [hf'\u2080, sub_eq_add_neg, mul_comm] using (hasDerivAt_iff_isLittleO.1 hf')\n obtain \u27e8\u03b4, h\u03b4, hball\u27e9 := Metric.eventually_nhds_iff_ball.1 hg\n have h\u2080 : (0 : \u211d) \u2208 Metric.ball 0 \u03b4 := Metric.mem_ball_self h\u03b4\n have hnhds := Metric.isOpen_ball.nhdsWithin_eq h\u2080\n have := (convex_ball (0 : \u211d) \u03b4).isLittleO_pow_succ_real h\u2080\n (fun x hx \u21a6 (hball x hx).hasDerivWithinAt) (by rwa [hnhds])\n rw [hnhds] at this\n simp only [hf\u2080, sub_zero, ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true,\n zero_pow, mul_zero, add_zero] at this\n exact this.comp_tendsto hlim\n tendsto := hlim\n\nnamespace IsCenterEquationSolution\n\n/-- **Second derivative at the exact rate.** Let `\u03ba > 0`, and let `\u03b2` be a solution of the\nautonomous center equation `\u03b2' = f(\u03b2)`, not eventually zero, where `f'(0) = 0` and\n`f''(0) = -2\u03ba`. Then `f'(\u03b2) f(\u03b2)`, which is `\u03b2''` by the chain rule when `f` has derivative `f'`\nnear `0`, is asymptotically equivalent to `2 (\u03ba s\u00b3)\u207b\u00b9`, the second derivative of the model\nsolution `(\u03ba s)\u207b\u00b9`. -/\ntheorem isEquivalent_comp_mul_comp (h : IsCenterEquationSolution \u03ba \u03b2 fun s \u21a6 f (\u03b2 s))\n (h\u03ba : 0 < \u03ba) (hne : \u00ac\u03b2 =\u1da0[atTop] 0) (hf'\u2080 : f' 0 = 0) (hf' : HasDerivAt f' (-(2 * \u03ba)) 0) :\n (fun s \u21a6 f' (\u03b2 s) * f (\u03b2 s)) ~[atTop] fun s \u21a6 2 * (\u03ba * s ^ 3)\u207b\u00b9 := by\n -- `f' x ~ -2 \u03ba x` at `0`, hence `f'(\u03b2) ~ -2 \u03ba \u03b2 ~ -2 \u03ba (\u03ba s)\u207b\u00b9`.\n have hf'eq : f' ~[\ud835\udcdd 0] fun x \u21a6 -(2 * \u03ba) * x := by\n simpa [hf'\u2080, Function.comp_def, mul_comm] using\n hf'.isEquivalent_sub (neg_ne_zero.2 (by positivity))\n have h\u2081 : (fun s \u21a6 f' (\u03b2 s)) ~[atTop] fun s \u21a6 -(2 * \u03ba) * (\u03ba * s)\u207b\u00b9 :=\n (hf'eq.comp_tendsto h.tendsto).trans\n ((IsEquivalent.refl (u := fun _ \u21a6 -(2 * \u03ba))).mul (h.isEquivalent h\u03ba hne))\n refine (h\u2081.mul (h.isEquivalent_deriv h\u03ba hne)).congr_right ?_\n filter_upwards [eventually_ne_atTop 0] with s hs\n simp only [Pi.mul_apply]\n field_simp\n\n/-- **Two-sided polynomial bounds on the second derivative.** Under the hypotheses of\n`IsCenterEquationSolution.isEquivalent_comp_mul_comp`, `f'(\u03b2) f(\u03b2) =\u0398 (s\u00b3)\u207b\u00b9` at `+\u221e`. -/\ntheorem isTheta_comp_mul_comp (h : IsCenterEquationSolution \u03ba \u03b2 fun s \u21a6 f (\u03b2 s))\n (h\u03ba : 0 < \u03ba) (hne : \u00ac\u03b2 =\u1da0[atTop] 0) (hf'\u2080 : f' 0 = 0) (hf' : HasDerivAt f' (-(2 * \u03ba)) 0) :\n (fun s \u21a6 f' (\u03b2 s) * f (\u03b2 s)) =\u0398[atTop] fun s \u21a6 (s ^ 3)\u207b\u00b9 :=\n (h.isEquivalent_comp_mul_comp h\u03ba hne hf'\u2080 hf').isTheta.trans <|\n EventuallyEq.trans_isTheta (f\u2082 := fun s \u21a6 2 * \u03ba\u207b\u00b9 * (s ^ 3)\u207b\u00b9)\n (.of_forall fun s \u21a6 by simp only [mul_inv, mul_assoc])\n ((isTheta_const_mul_left (mul_ne_zero two_ne_zero (inv_ne_zero h\u03ba.ne'))).2\n (isTheta_refl _ _))\n\nend IsCenterEquationSolution\n\nend Autonomous\n\nend TauCeti\n", "public_theorems": ["TauCeti.isCenterEquationSolution_inv_mul", "TauCeti.IsCenterEquationSolution.exists_antitoneOn_Ici", "TauCeti.IsCenterEquationSolution.eventually_nonneg", "TauCeti.IsCenterEquationSolution.eventuallyEq_zero_or_eventually_pos", "TauCeti.IsCenterEquationSolution.eventually_pos", "TauCeti.IsCenterEquationSolution.tendsto_mul", "TauCeti.IsCenterEquationSolution.isEquivalent", "TauCeti.IsCenterEquationSolution.isEquivalent_deriv", "TauCeti.IsCenterEquationSolution.isTheta", "TauCeti.IsCenterEquationSolution.isTheta_deriv", "TauCeti.isCenterEquationSolution_comp", "TauCeti.IsCenterEquationSolution.isEquivalent_comp_mul_comp", "TauCeti.IsCenterEquationSolution.isTheta_comp_mul_comp"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent\npublic import Mathlib.Analysis.Asymptotics.Theta\npublic import Mathlib.Analysis.Calculus.Deriv.Basic\nimport Mathlib.Analysis.Asymptotics.Lemmas\nimport Mathlib.Analysis.Calculus.Deriv.Inv\nimport Mathlib.Analysis.Calculus.Deriv.MeanValue\nimport Mathlib.Analysis.Calculus.MeanValue\nimport Mathlib.Analysis.Calculus.Deriv.Mul\nimport Mathlib.Analysis.Calculus.Deriv.Pow\nimport TauCeti.Analysis.Calculus.Deriv.Growth\n\n/-!\n# The scalar center equation at a degenerate end\n\nNear a degenerate critical point whose linearization has a one-dimensional kernel and a nonzero\nquadratic fold coefficient `\u03ba`, the component `\u03b2` of a gradient trajectory along the kernel (its\n*center amplitude*) satisfies, after reduction to a center manifold, the scalar equation\n\n`\u03b2' = -\u03ba \u03b2\u00b2 + o(\u03b2\u00b2)` as `s \u2192 +\u221e`.\n\nThis file shows that, when `\u03ba > 0`, such an amplitude which tends to `0` and is not eventually\nzero decays polynomially rather than exponentially, at the exact rate of the model solution\n`\u03b2(s) = (\u03ba s)\u207b\u00b9` of `\u03b2' = -\u03ba \u03b2\u00b2`:\n\n* it is eventually positive (`IsCenterEquationSolution.eventually_pos`); without the\n nonvanishing assumption, it is either eventually zero or eventually positive\n (`IsCenterEquationSolution.eventuallyEq_zero_or_eventually_pos`);\n* `s \u03b2(s) \u2192 \u03ba\u207b\u00b9` (`IsCenterEquationSolution.tendsto_mul`), that is `\u03b2 ~ (\u03ba s)\u207b\u00b9`\n (`IsCenterEquationSolution.isEquivalent`), and `\u03b2' ~ -(\u03ba s\u00b2)\u207b\u00b9`\n (`IsCenterEquationSolution.isEquivalent_deriv`);\n* hence the two-sided bounds `c s\u207b\u00b9 \u2264 \u03b2(s) \u2264 C s\u207b\u00b9` and `c s\u207b\u00b2 \u2264 |\u03b2'(s)| \u2264 C s\u207b\u00b2` for large `s`\n (equivalently with `1 + s` in place of `s`), stated as `IsTheta` relations\n (`IsCenterEquationSolution.isTheta`, `IsCenterEquationSolution.isTheta_deriv`).\n\nThe remainder is only assumed to be `o(\u03b2\u00b2)`, which includes the usual `O(\u03b2\u00b3)` remainder of a center\nmanifold reduction since `\u03b2 \u2192 0` (`Asymptotics.IsBigO.trans_isLittleO`). It may depend on `s`, so\nthat the transverse components of the trajectory can enter it.\n\nFor an autonomous equation `\u03b2' = f(\u03b2)` with `f(0) = f'(0) = 0` and `f''(0) = -2\u03ba`, every\nsolution tending to `0` solves the center equation (`TauCeti.isCenterEquationSolution_comp`). If\nmoreover `\u03ba > 0` and the solution is not eventually zero, the second derivative\n`\u03b2'' = f'(\u03b2) f(\u03b2)` is equivalent to `2 (\u03ba s\u00b3)\u207b\u00b9`, the second derivative of the model solution\n(`IsCenterEquationSolution.isEquivalent_comp_mul_comp`), so `\u03b2'' =\u0398 s\u207b\u00b3`\n(`IsCenterEquationSolution.isTheta_comp_mul_comp`).\n\n## Main definitions\n\n* `TauCeti.IsCenterEquationSolution \u03ba \u03b2 \u03b2'`: `\u03b2` has derivative `\u03b2'` near `+\u221e`, satisfies\n `\u03b2' + \u03ba \u03b2\u00b2 = o(\u03b2\u00b2)` and tends to `0`.\n\n## Implementation notes\n\nThe proof passes to `y = 1 / \u03b2`: the equation becomes `y' = \u03ba + o(1)`, so `y(s) / s \u2192 \u03ba` by the\nmean value inequality (`TauCeti.tendsto_inv_smul_atTop_of_tendsto_deriv`). Positivity comes from\nmonotonicity: `\u03b2' \u2264 -(\u03ba / 2) \u03b2\u00b2 \u2264 0` eventually, so `\u03b2` decreases to its limit `0`.\n\n## References\n\n* J. Carr, *Applications of Centre Manifold Theory*, Springer, 1981, Chapter 2: the reduced\n equation on a center manifold.\n-/\n\npublic section\n\nopen Filter Topology Asymptotics Set\n\nnamespace TauCeti\n\n/-- `\u03b2` solves the **scalar center equation** `\u03b2' = -\u03ba \u03b2\u00b2 + o(\u03b2\u00b2)` near `+\u221e`, with derivative `\u03b2'`,\nand tends to `0`. This is the equation of the center amplitude of a trajectory that converges to a\ndegenerate critical point with fold coefficient `\u03ba`. -/\nstructure IsCenterEquationSolution (\u03ba : \u211d) (\u03b2 \u03b2' : \u211d \u2192 \u211d) : Prop where\n /-- `\u03b2` has derivative `\u03b2'` near `+\u221e`. -/\n hasDerivAt : \u2200\u1da0 s in atTop, HasDerivAt \u03b2 (\u03b2' s) s\n /-- The remainder `\u03b2' + \u03ba \u03b2\u00b2` is negligible compared with `\u03b2\u00b2`. -/\n isLittleO : (fun s \u21a6 \u03b2' s + \u03ba * \u03b2 s ^ 2) =o[atTop] fun s \u21a6 \u03b2 s ^ 2\n /-- `\u03b2` tends to `0` at `+\u221e`. -/\n tendsto : Tendsto \u03b2 atTop (\ud835\udcdd 0)", "/-- The model solution `\u03b2(s) = (\u03ba s)\u207b\u00b9` of `\u03b2' = -\u03ba \u03b2\u00b2`. -/\ntheorem isCenterEquationSolution_inv_mul {\u03ba : \u211d} (h\u03ba : \u03ba \u2260 0) :\n IsCenterEquationSolution \u03ba (fun s \u21a6 (\u03ba * s)\u207b\u00b9) fun s \u21a6 -(\u03ba * s ^ 2)\u207b\u00b9 where\n hasDerivAt :=", "namespace IsCenterEquationSolution\n\nvariable {\u03ba : \u211d} {\u03b2 \u03b2' : \u211d \u2192 \u211d}", "/-- For `\u03ba > 0`, a solution of the center equation is eventually antitone. -/\ntheorem exists_antitoneOn_Ici (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba) :\n \u2203 a, AntitoneOn \u03b2 (Ici a) :=", "/-- For `\u03ba > 0`, a solution of the center equation is eventually nonnegative: it decreases to its\nlimit `0`. -/\ntheorem eventually_nonneg (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba) :\n \u2200\u1da0 s in atTop, 0 \u2264 \u03b2 s :=", "/-- For `\u03ba > 0`, a solution of the center equation is either eventually zero or eventually\npositive. -/\ntheorem eventuallyEq_zero_or_eventually_pos (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba) :\n \u03b2 =\u1da0[atTop] 0 \u2228 \u2200\u1da0 s in atTop, 0 < \u03b2 s :=", "/-- For `\u03ba > 0`, a solution of the center equation that is not eventually zero is eventually\npositive. -/\ntheorem eventually_pos (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba)\n (hne : \u00ac\u03b2 =\u1da0[atTop] 0) : \u2200\u1da0 s in atTop, 0 < \u03b2 s :=", "/-- **Polynomial decay at the exact rate.** For `\u03ba > 0`, a solution of the center equation that is\nnot eventually zero satisfies `s \u03b2(s) \u2192 \u03ba\u207b\u00b9`. -/\ntheorem tendsto_mul (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba) (hne : \u00ac\u03b2 =\u1da0[atTop] 0) :\n Tendsto (fun s \u21a6 s * \u03b2 s) atTop (\ud835\udcdd \u03ba\u207b\u00b9) :=", "/-- For `\u03ba > 0`, a solution of the center equation that is not eventually zero is asymptotically\nequivalent to the model solution `(\u03ba s)\u207b\u00b9`. -/\ntheorem isEquivalent (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba) (hne : \u00ac\u03b2 =\u1da0[atTop] 0) :\n \u03b2 ~[atTop] fun s \u21a6 (\u03ba * s)\u207b\u00b9 :=", "/-- For `\u03ba > 0`, the derivative of a solution of the center equation that is not eventually zero\nis asymptotically equivalent to the derivative `-(\u03ba s\u00b2)\u207b\u00b9` of the model solution. -/\ntheorem isEquivalent_deriv (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba)\n (hne : \u00ac\u03b2 =\u1da0[atTop] 0) : \u03b2' ~[atTop] fun s \u21a6 -(\u03ba * s ^ 2)\u207b\u00b9 :=", "/-- **Two-sided polynomial bounds.** For `\u03ba > 0`, a solution of the center equation that is not\neventually zero satisfies `\u03b2 =\u0398 s\u207b\u00b9` at `+\u221e`: `c / s \u2264 \u03b2(s) \u2264 C / s` for large `s`. -/\ntheorem isTheta (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba) (hne : \u00ac\u03b2 =\u1da0[atTop] 0) :\n \u03b2 =\u0398[atTop] fun s \u21a6 s\u207b\u00b9 :=", "/-- **Two-sided polynomial bounds on the derivative.** For `\u03ba > 0`, the derivative of a solution\nof the center equation that is not eventually zero satisfies `\u03b2' =\u0398 (s\u00b2)\u207b\u00b9` at `+\u221e`. -/\ntheorem isTheta_deriv (h : IsCenterEquationSolution \u03ba \u03b2 \u03b2') (h\u03ba : 0 < \u03ba)\n (hne : \u00ac\u03b2 =\u1da0[atTop] 0) : \u03b2' =\u0398[atTop] fun s \u21a6 (s ^ 2)\u207b\u00b9 :=", "end IsCenterEquationSolution\n\n/-! ### The autonomous center equation -/\n\nsection Autonomous\n\nvariable {\u03ba : \u211d} {\u03b2 f f' : \u211d \u2192 \u211d}", "/-- **The autonomous center equation.** Let `f` be differentiable near `0` with `f(0) = 0`,\n`f'(0) = 0` and `f''(0) = -2\u03ba`. A solution `\u03b2` of `\u03b2' = f(\u03b2)` that tends to `0` at `+\u221e` solves the\ncenter equation `\u03b2' = -\u03ba \u03b2\u00b2 + o(\u03b2\u00b2)`. -/\ntheorem isCenterEquationSolution_comp (hf : \u2200\u1da0 x in \ud835\udcdd 0, HasDerivAt f (f' x) x) (hf\u2080 : f 0 = 0)\n (hf'\u2080 : f' 0 = 0) (hf' : HasDerivAt f' (-(2 * \u03ba)) 0)\n (h\u03b2 : \u2200\u1da0 s in atTop, HasDerivAt \u03b2 (f (\u03b2 s)) s) (hlim : Tendsto \u03b2 atTop (\ud835\udcdd 0)) :\n IsCenterEquationSolution \u03ba \u03b2 fun s \u21a6 f (\u03b2 s) where\n hasDerivAt :=", "namespace IsCenterEquationSolution", "/-- **Second derivative at the exact rate.** Let `\u03ba > 0`, and let `\u03b2` be a solution of the\nautonomous center equation `\u03b2' = f(\u03b2)`, not eventually zero, where `f'(0) = 0` and\n`f''(0) = -2\u03ba`. Then `f'(\u03b2) f(\u03b2)`, which is `\u03b2''` by the chain rule when `f` has derivative `f'`\nnear `0`, is asymptotically equivalent to `2 (\u03ba s\u00b3)\u207b\u00b9`, the second derivative of the model\nsolution `(\u03ba s)\u207b\u00b9`. -/\ntheorem isEquivalent_comp_mul_comp (h : IsCenterEquationSolution \u03ba \u03b2 fun s \u21a6 f (\u03b2 s))\n (h\u03ba : 0 < \u03ba) (hne : \u00ac\u03b2 =\u1da0[atTop] 0) (hf'\u2080 : f' 0 = 0) (hf' : HasDerivAt f' (-(2 * \u03ba)) 0) :\n (fun s \u21a6 f' (\u03b2 s) * f (\u03b2 s)) ~[atTop] fun s \u21a6 2 * (\u03ba * s ^ 3)\u207b\u00b9 :=", "/-- **Two-sided polynomial bounds on the second derivative.** Under the hypotheses of\n`IsCenterEquationSolution.isEquivalent_comp_mul_comp`, `f'(\u03b2) f(\u03b2) =\u0398 (s\u00b3)\u207b\u00b9` at `+\u221e`. -/\ntheorem isTheta_comp_mul_comp (h : IsCenterEquationSolution \u03ba \u03b2 fun s \u21a6 f (\u03b2 s))\n (h\u03ba : 0 < \u03ba) (hne : \u00ac\u03b2 =\u1da0[atTop] 0) (hf'\u2080 : f' 0 = 0) (hf' : HasDerivAt f' (-(2 * \u03ba)) 0) :\n (fun s \u21a6 f' (\u03b2 s) * f (\u03b2 s)) =\u0398[atTop] fun s \u21a6 (s ^ 3)\u207b\u00b9 :=", "end IsCenterEquationSolution\n\nend Autonomous\n\nend TauCeti"], "free_length": 5152, "file_length": 8242, "heartbeats": 9539, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.RepresentationTheory.Homological.TateCohomology.Cup.CharacterCarry", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/RepresentationTheory/Homological/TateCohomology/Cup/CharacterCarry.lean", "module": "TauCeti.RepresentationTheory.Homological.TateCohomology.Cup.CharacterCarry", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.RepresentationTheory.Homological.ContCohomology.CarryCocycle\npublic import TauCeti.RepresentationTheory.Homological.TateCohomology.Character\npublic import TauCeti.RepresentationTheory.Homological.TateCohomology.Cup.Product\nimport TauCeti.RepresentationTheory.Homological.GroupCohomology.Functoriality\nimport TauCeti.RepresentationTheory.Homological.TateCohomology.Cup.ZeroLeft\nimport TauCeti.RepresentationTheory.Rep.TensorInvariant\n\n/-!\n# Cup product with the connecting class of a character, on cocycles\n\nLet `G` be a finite group, `\u03c7 : G\u1d43\u1d47 \u2192 \u211a/\u2124` a character and `A` a representation of `G` with an\ninvariant `a \u2208 A\u1d33`. Write `\u03c7'(g) \u2208 [0, 1)` for the representative of `\u03c7(g)`. This file computes\nthe cup product `a \u222a \u03b4\u03c7 \u2208 H\u00b2(G, A)` of the degree-zero class of `a` with the connecting class\n`\u03b4\u03c7 \u2208 H\u00b2(G, \u2124)` of `\u03c7` (`TauCeti.TateCohomology.characterConnectingClass`) on cocycles: it is the\nclass of the carry cocycle\n\n```text\n(g, h) \u21a6 \u230a\u03c7'(g) + \u03c7'(h)\u230b \u2022 a,\n```\n\nwith the carry `TauCeti.ContCohomology.characterCarry` of `\u03c7`.\n\nThe connecting map of `0 \u2192 \u2124 \u2192 \u211a \u2192 \u211a/\u2124 \u2192 0` is computed by lifting `\u03c7` to the rational cochain\n`\u03c7'`, whose coboundary `(g, h) \u21a6 \u03c7'(g) + \u03c7'(h) - \u03c7'(gh)` is the carry\n(`TauCeti.ContCohomology.intCast_characterCarry`). Cup product with the class of `a` is induced\nby the map `\u2124 \u2192 A`, `1 \u21a6 a`, which multiplies the carry by `a`.\n\nThis is the cocycle description of the classes `a \u222a \u03b4\u03c7` in the character formula\n`\u03c7(artinMap a) = inv(a \u222a \u03b4\u03c7)` of a class formation, valid for every character of every finite\ngroup. For a cyclic group of order `n` and a character sending a generator to `1 / n`, the carry\ncocycle is the cocycle of two-periodicity (`TauCeti.ContCohomology.characterCarry_eq_ite`).\n\n## Main definitions\n\n* `TauCeti.groupCohomology.characterCarryCocycles\u2082`: the carry cocycle\n `(g, h) \u21a6 \u230a\u03c7'(g) + \u03c7'(h)\u230b \u2022 a` of a character and an invariant, as a `2`-cocycle of an integral\n representation.\n\n## Main results\n\n* `TauCeti.TateCohomology.characterConnectingClass_eq_H2\u03c0`: `\u03b4\u03c7` is the class of the integer\n carry cocycle of `\u03c7`.\n* `TauCeti.TateCohomology.cup_characterConnectingClass_eq_H2\u03c0`: `a \u222a \u03b4\u03c7` is the class of the\n carry cocycle of `\u03c7` and `a`.\n\n## References\n\n* J.-P. Serre, *Local Fields*, Chapter XIV, \u00a71.\n* J. W. S. Cassels and A. Fr\u00f6hlich (eds.), *Algebraic Number Theory*, Chapter VII (Tate, *Global\n Class Field Theory*), \u00a71.\n-/\n\npublic noncomputable section\n\nopen CategoryTheory MonoidalCategory groupCohomology\n\nnamespace TauCeti.groupCohomology\n\nvariable {G : Type} [Group G]\n\n/-- **The carry cocycle** of a character `\u03c7 : G \u2192 \u211a/\u2124` and an invariant `a` of a representation\n`A` of `G`: the `2`-cocycle `(g, h) \u21a6 \u230a\u03c7'(g) + \u03c7'(h)\u230b \u2022 a`, where `\u03c7'(x) \u2208 [0, 1)` represents\n`\u03c7(x)` (`characterCarryCocycles\u2082_apply`). For a finite group its class is the cup product\n`a \u222a \u03b4\u03c7` (`TauCeti.TateCohomology.cup_characterConnectingClass_eq_H2\u03c0`). -/\ndef characterCarryCocycles\u2082 (\u03c7 : Additive G \u2192+ AddCircle (1 : \u211a)) (A : Rep \u2124 G)\n (a : A.\u03c1.invariants) : cocycles\u2082 A :=\n \u27e8fun p \u21a6 ContCohomology.characterCarry \u03c7 p.1 p.2 \u2022 (a : A),\n (mem_cocycles\u2082_iff _).2 fun g h j \u21a6 by\n simp only [map_zsmul, a.property g, \u2190 add_zsmul, ContCohomology.characterCarry_mul_add]\u27e9\n\n/-- The value of the carry cocycle of `\u03c7` and `a` at `(g, h)` is the carry of `\u03c7` times `a`. -/\n@[simp]\ntheorem characterCarryCocycles\u2082_apply (\u03c7 : Additive G \u2192+ AddCircle (1 : \u211a)) (A : Rep \u2124 G)\n (a : A.\u03c1.invariants) (g h : G) :\n characterCarryCocycles\u2082 \u03c7 A a (g, h) = ContCohomology.characterCarry \u03c7 g h \u2022 (a : A) :=\n (rfl)\n\nend TauCeti.groupCohomology\n\nnamespace TauCeti.TateCohomology\n\nvariable {G : Type} [Group G] [Fintype G]\n\n/-- **The connecting class of a character is its carry class.** For a character `\u03c7` of a finite\ngroup, `\u03b4\u03c7 \u2208 H\u00b2(G, \u2124)` is the class of every `2`-cocycle whose value at `(g, h)` is the carry\n`\u230a\u03c7'(g) + \u03c7'(h)\u230b` of `\u03c7`. -/\ntheorem characterConnectingClass_eq_H2\u03c0\n (\u03c7 : Additive (Group.Abelianization G) \u2192+ AddCircle (1 : \u211a)) (c : cocycles\u2082 (Rep.trivial \u2124 G \u2124))\n (hc : \u2200 g h, c (g, h) =\n ContCohomology.characterCarry (\u03c7.comp Group.Abelianization.of.toAdditive) g h) :\n characterConnectingClass G \u03c7 =\n (_root_.TateCohomology.isoGroupCohomology 2).inv.app _ (H2\u03c0 _ c) := by\n set \u03c7' := \u03c7.comp Group.Abelianization.of.toAdditive\n rw [characterConnectingClass_def, H1IsoOfIsTrivial_inv_apply]\n congr 1\n -- `\u03b4\u03c7` is the class of the coboundary of the lift `\u03c7'` of `\u03c7` to `\u211a`, which is the carry. The\n -- closing `rfl` identifies the cocycle produced by `\u03b4\u2081_apply` with `c` (structure eta for the\n -- subtype of cocycles).\n refine (\u03b4\u2081_apply (Rep.ratAddCircleShortComplex_shortExact G) _\n (fun g \u21a6 (AddCircle.equivIco 1 0 (\u03c7' (.ofMul g)) : \u211a)) ?_ (c : G \u00d7 G \u2192 \u2124) ?_).trans rfl\n \u00b7 funext g\n rw [Function.comp_apply, Rep.ratAddCircleShortComplex_g_hom_apply, AddCircle.coe_equivIco]\n -- The `1`-cocycle of a homomorphism `f : G \u2192 \u211a/\u2124` is `f` itself, by definition of\n -- `cocycles\u2081IsoOfIsTrivial`.\n rfl\n \u00b7 funext p\n rw [Function.comp_apply, Rep.ratAddCircleShortComplex_f_hom_apply, d\u2081\u2082_hom_apply, hc,\n ContCohomology.intCast_characterCarry, Representation.trivial_apply]\n ring\n\n/-- **Cup product with the connecting class of a character is the carry class.** For a character\n`\u03c7` of a finite group and an invariant `a` of a representation `A`, the cup product\n`a \u222a \u03b4\u03c7 \u2208 H\u00b2(G, A \u2297 \u2124) = H\u00b2(G, A)` of the degree-zero class of `a` with the connecting class of\n`\u03c7` is the class of the carry cocycle `(g, h) \u21a6 \u230a\u03c7'(g) + \u03c7'(h)\u230b \u2022 a`. -/\ntheorem cup_characterConnectingClass_eq_H2\u03c0\n (\u03c7 : Additive (Group.Abelianization G) \u2192+ AddCircle (1 : \u211a)) (A : Rep \u2124 G) (a :\n A.\u03c1.invariants) :\n (tateCohomologyFunctor 2).map (\u03c1_ A).hom\n (cup A (Rep.trivial \u2124 G \u2124) 0 2 2 (zero_add 2) (H0\u03c0 A a) (characterConnectingClass G \u03c7)) =\n (_root_.TateCohomology.isoGroupCohomology 2).inv.app A\n (H2\u03c0 A (TauCeti.groupCohomology.characterCarryCocycles\u2082\n (\u03c7.comp Group.Abelianization.of.toAdditive) A a)) := by\n set \u03c7' := \u03c7.comp Group.Abelianization.of.toAdditive\n -- The carry cocycle of `1 \u2208 \u2124` is the integer carry of `\u03c7`.\n set c\u2081 := TauCeti.groupCohomology.characterCarryCocycles\u2082 \u03c7' (Rep.trivial \u2124 G \u2124)\n \u27e8(1 : \u2124), fun _ \u21a6 rfl\u27e9\n have hc\u2081 (g h : G) : c\u2081 (g, h) = ContCohomology.characterCarry \u03c7' g h := by\n rw [TauCeti.groupCohomology.characterCarryCocycles\u2082_apply, smul_eq_mul, mul_one]\n rw [cup_zero_left, cup0H_H0\u03c0, characterConnectingClass_eq_H2\u03c0 \u03c7 c\u2081 hc\u2081,\n \u2190 ModuleCat.comp_apply, \u2190 Functor.map_comp, Category.assoc]\n -- Cup product with the class of `a` is induced by `\u03c6 : \u2124 \u2192 A`, `1 \u21a6 a`, which commutes with the\n -- comparison of Tate and ordinary cohomology and sends the carry class of `1` to that of `a`.\n set \u03c6 : Rep.trivial \u2124 G \u2124 \u27f6 A :=\n (Rep.trivial \u2124 G \u2124).tensorInvariant a \u226b (\u03b2_ (Rep.trivial \u2124 G \u2124) A).hom \u226b (\u03c1_ A).hom\n have h := ConcreteCategory.congr_hom\n ((_root_.TateCohomology.isoGroupCohomology 2).inv.naturality \u03c6) (H2\u03c0 _ c\u2081)\n have hmap : groupCohomology.map (MonoidHom.id G) \u03c6 2 (H2\u03c0 _ c\u2081) =\n H2\u03c0 A (TauCeti.groupCohomology.characterCarryCocycles\u2082 \u03c7' A a) := by\n rw [H2\u03c0_comp_map_apply]\n congr 1\n refine Subtype.ext (funext fun q \u21a6 ?_)\n have hq : (mapCocycles\u2082 (MonoidHom.id G) \u03c6 c\u2081 : G \u00d7 G \u2192 A) q =\n TauCeti.groupCohomology.characterCarryCocycles\u2082 \u03c7' A a q := by\n rw [TauCeti.groupCohomology.mapCocycles\u2082_apply, hc\u2081,\n TauCeti.groupCohomology.characterCarryCocycles\u2082_apply]\n -- The scalar action of `\u2124` on `A` is its module structure, which agrees with `zsmul`.\n exact (TauCeti.Rep.tensorInvariant_braiding_rightUnitor_hom_apply a _).trans\n (int_smul_eq_zsmul _ _ _)\n exact hq\n refine h.symm.trans ?_\n rw [\u2190 hmap]\n -- The left side evaluates a composite of morphisms, and the functor `groupCohomology.functor`\n -- acts on `\u03c6` by `groupCohomology.map (MonoidHom.id G) \u03c6` by definition. `ModuleCat.comp_apply`\n -- cannot be rewritten here, since `groupCohomology.functor` and `groupCohomology` give the\n -- carrier of `H\u00b2(G, \u2124)` in two syntactically different forms.\n rfl\n\nend TauCeti.TateCohomology\n", "public_theorems": ["TauCeti.groupCohomology.characterCarryCocycles\u2082_apply", "TauCeti.TateCohomology.characterConnectingClass_eq_H2\u03c0", "TauCeti.TateCohomology.cup_characterConnectingClass_eq_H2\u03c0"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.RepresentationTheory.Homological.ContCohomology.CarryCocycle\npublic import TauCeti.RepresentationTheory.Homological.TateCohomology.Character\npublic import TauCeti.RepresentationTheory.Homological.TateCohomology.Cup.Product\nimport TauCeti.RepresentationTheory.Homological.GroupCohomology.Functoriality\nimport TauCeti.RepresentationTheory.Homological.TateCohomology.Cup.ZeroLeft\nimport TauCeti.RepresentationTheory.Rep.TensorInvariant\n\n/-!\n# Cup product with the connecting class of a character, on cocycles\n\nLet `G` be a finite group, `\u03c7 : G\u1d43\u1d47 \u2192 \u211a/\u2124` a character and `A` a representation of `G` with an\ninvariant `a \u2208 A\u1d33`. Write `\u03c7'(g) \u2208 [0, 1)` for the representative of `\u03c7(g)`. This file computes\nthe cup product `a \u222a \u03b4\u03c7 \u2208 H\u00b2(G, A)` of the degree-zero class of `a` with the connecting class\n`\u03b4\u03c7 \u2208 H\u00b2(G, \u2124)` of `\u03c7` (`TauCeti.TateCohomology.characterConnectingClass`) on cocycles: it is the\nclass of the carry cocycle\n\n```text\n(g, h) \u21a6 \u230a\u03c7'(g) + \u03c7'(h)\u230b \u2022 a,\n```\n\nwith the carry `TauCeti.ContCohomology.characterCarry` of `\u03c7`.\n\nThe connecting map of `0 \u2192 \u2124 \u2192 \u211a \u2192 \u211a/\u2124 \u2192 0` is computed by lifting `\u03c7` to the rational cochain\n`\u03c7'`, whose coboundary `(g, h) \u21a6 \u03c7'(g) + \u03c7'(h) - \u03c7'(gh)` is the carry\n(`TauCeti.ContCohomology.intCast_characterCarry`). Cup product with the class of `a` is induced\nby the map `\u2124 \u2192 A`, `1 \u21a6 a`, which multiplies the carry by `a`.\n\nThis is the cocycle description of the classes `a \u222a \u03b4\u03c7` in the character formula\n`\u03c7(artinMap a) = inv(a \u222a \u03b4\u03c7)` of a class formation, valid for every character of every finite\ngroup. For a cyclic group of order `n` and a character sending a generator to `1 / n`, the carry\ncocycle is the cocycle of two-periodicity (`TauCeti.ContCohomology.characterCarry_eq_ite`).\n\n## Main definitions\n\n* `TauCeti.groupCohomology.characterCarryCocycles\u2082`: the carry cocycle\n `(g, h) \u21a6 \u230a\u03c7'(g) + \u03c7'(h)\u230b \u2022 a` of a character and an invariant, as a `2`-cocycle of an integral\n representation.\n\n## Main results\n\n* `TauCeti.TateCohomology.characterConnectingClass_eq_H2\u03c0`: `\u03b4\u03c7` is the class of the integer\n carry cocycle of `\u03c7`.\n* `TauCeti.TateCohomology.cup_characterConnectingClass_eq_H2\u03c0`: `a \u222a \u03b4\u03c7` is the class of the\n carry cocycle of `\u03c7` and `a`.\n\n## References\n\n* J.-P. Serre, *Local Fields*, Chapter XIV, \u00a71.\n* J. W. S. Cassels and A. Fr\u00f6hlich (eds.), *Algebraic Number Theory*, Chapter VII (Tate, *Global\n Class Field Theory*), \u00a71.\n-/\n\npublic noncomputable section\n\nopen CategoryTheory MonoidalCategory groupCohomology\n\nnamespace TauCeti.groupCohomology\n\nvariable {G : Type} [Group G]\n\n/-- **The carry cocycle** of a character `\u03c7 : G \u2192 \u211a/\u2124` and an invariant `a` of a representation\n`A` of `G`: the `2`-cocycle `(g, h) \u21a6 \u230a\u03c7'(g) + \u03c7'(h)\u230b \u2022 a`, where `\u03c7'(x) \u2208 [0, 1)` represents\n`\u03c7(x)` (`characterCarryCocycles\u2082_apply`). For a finite group its class is the cup product\n`a \u222a \u03b4\u03c7` (`TauCeti.TateCohomology.cup_characterConnectingClass_eq_H2\u03c0`). -/\ndef characterCarryCocycles\u2082 (\u03c7 : Additive G \u2192+ AddCircle (1 : \u211a)) (A : Rep \u2124 G)\n (a : A.\u03c1.invariants) : cocycles\u2082 A :=\n \u27e8fun p \u21a6 ContCohomology.characterCarry \u03c7 p.1 p.2 \u2022 (a : A),\n (mem_cocycles\u2082_iff _).2 fun g h j \u21a6 by\n simp only [map_zsmul, a.property g, \u2190 add_zsmul, ContCohomology.characterCarry_mul_add]\u27e9", "/-- The value of the carry cocycle of `\u03c7` and `a` at `(g, h)` is the carry of `\u03c7` times `a`. -/\n@[simp]\ntheorem characterCarryCocycles\u2082_apply (\u03c7 : Additive G \u2192+ AddCircle (1 : \u211a)) (A : Rep \u2124 G)\n (a : A.\u03c1.invariants) (g h : G) :\n characterCarryCocycles\u2082 \u03c7 A a (g, h) = ContCohomology.characterCarry \u03c7 g h \u2022 (a : A) :=", "end TauCeti.groupCohomology\n\nnamespace TauCeti.TateCohomology\n\nvariable {G : Type} [Group G] [Fintype G]", "/-- **The connecting class of a character is its carry class.** For a character `\u03c7` of a finite\ngroup, `\u03b4\u03c7 \u2208 H\u00b2(G, \u2124)` is the class of every `2`-cocycle whose value at `(g, h)` is the carry\n`\u230a\u03c7'(g) + \u03c7'(h)\u230b` of `\u03c7`. -/\ntheorem characterConnectingClass_eq_H2\u03c0\n (\u03c7 : Additive (Group.Abelianization G) \u2192+ AddCircle (1 : \u211a)) (c : cocycles\u2082 (Rep.trivial \u2124 G \u2124))\n (hc : \u2200 g h, c (g, h) =\n ContCohomology.characterCarry (\u03c7.comp Group.Abelianization.of.toAdditive) g h) :\n characterConnectingClass G \u03c7 =\n (_root_.TateCohomology.isoGroupCohomology 2).inv.app _ (H2\u03c0 _ c) :=", "/-- **Cup product with the connecting class of a character is the carry class.** For a character\n`\u03c7` of a finite group and an invariant `a` of a representation `A`, the cup product\n`a \u222a \u03b4\u03c7 \u2208 H\u00b2(G, A \u2297 \u2124) = H\u00b2(G, A)` of the degree-zero class of `a` with the connecting class of\n`\u03c7` is the class of the carry cocycle `(g, h) \u21a6 \u230a\u03c7'(g) + \u03c7'(h)\u230b \u2022 a`. -/\ntheorem cup_characterConnectingClass_eq_H2\u03c0\n (\u03c7 : Additive (Group.Abelianization G) \u2192+ AddCircle (1 : \u211a)) (A : Rep \u2124 G) (a :\n A.\u03c1.invariants) :\n (tateCohomologyFunctor 2).map (\u03c1_ A).hom\n (cup A (Rep.trivial \u2124 G \u2124) 0 2 2 (zero_add 2) (H0\u03c0 A a) (characterConnectingClass G \u03c7)) =\n (_root_.TateCohomology.isoGroupCohomology 2).inv.app A\n (H2\u03c0 A (TauCeti.groupCohomology.characterCarryCocycles\u2082\n (\u03c7.comp Group.Abelianization.of.toAdditive) A a)) :=", "end TauCeti.TateCohomology"], "free_length": 1824, "file_length": 3867, "heartbeats": 7143, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.LinearAlgebra.FiniteBilinearModule.KleinFour", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/LinearAlgebra/FiniteBilinearModule/KleinFour.lean", "module": "TauCeti.LinearAlgebra.FiniteBilinearModule.KleinFour", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Algebra.AddCircle\npublic import TauCeti.LinearAlgebra.FiniteBilinearModule.Quadratic.Basic\n\n/-!\n# Finite quadratic modules on the Klein four-group\n\nA `\u211a/\u2124`-valued quadratic map on `(\u2124/2)\u00b2` is determined by its three values on the nonzero\nelements, and conversely any three values admissible for the two-torsion of the group occur.\nThis file makes that presentation available as a construction: given `\u03b1 \u03b2 \u03b3 : \u211a/\u2124` with\n`4\u03b1 = 4\u03b2 = 2\u03b3 = 0`, `TauCeti.FiniteQuadraticModule.kleinFour` is the finite quadratic module on\n`ZMod 2 \u00d7 ZMod 2` with\n\n```text\nq(1, 0) = \u03b1, q(0, 1) = \u03b2, q(1, 1) = \u03b1 + \u03b2 + \u03b3, b((1, 0), (0, 1)) = \u03b3.\n```\n\nThe construction is a quotient, not a formula in `ZMod.val`: the parameters define an honest\n`\u2124`-bilinear map on `\u2124 \u00d7 \u2124`, its associated quadratic map `(m, k) \u21a6 m\u00b2\u03b1 + k\u00b2\u03b2 + mk\u03b3` has the\nkernel of the reduction `\u2124 \u00d7 \u2124 \u2192 (\u2124/2)\u00b2` inside its radical exactly under the three torsion\nhypotheses, and `QuadraticMap.liftOfSurjective` descends it. The torsion hypotheses are\ntherefore not technical: `4\u03b1 = 0` is the statement that `q` is well defined on a two-torsion\ngenerator, and `2\u03b3 = 0` the corresponding statement for the pairing.\n\nThe companion `TauCeti.FiniteQuadraticModule.kleinFourIsometryOfGenerators` turns an additive\nequivalence `(\u2124/2)\u00b2 \u2243+ A` matching the three displayed values into an isometry onto `A`, which is\nhow a discriminant form of order four and exponent two is identified.\n\nThe quotient construction is the rank-two adaptation of the cyclic one in\n`TauCeti.LinearAlgebra.FiniteBilinearModule.Cyclic`, which presents a form on `\u2124/m` by the single\nvalue of its generator.\n\n## Main declarations\n\n* `TauCeti.FiniteQuadraticModule.kleinFourMap`: the quadratic map on `ZMod 2 \u00d7 ZMod 2` with the\n displayed generator values.\n* `TauCeti.FiniteQuadraticModule.kleinFour`: the resulting finite quadratic module.\n* `TauCeti.FiniteQuadraticModule.kleinFourIsometryOfGenerators`: an additive equivalence matching\n the three generator values is an isometry.\n* `TauCeti.FiniteBilinearModule.pairing_eq_half_of_addEquiv`: in a nondegenerate alternating\n module identified with `(\u2124/2)\u00b2`, the two generators pair to `1/2`.\n\n## References\n\n* V. V. Nikulin, *Integral symmetric bilinear forms and some of their applications*, \u00a71.1 for\n discriminant forms and \u00a71.8, Proposition 1.8.1 for the forms written `u\u2081` and `v\u2081` in the\n full-norm convention.\n* W. Ebeling, *Lattices and Codes*, Chapter 1.\n-/\n\npublic section\n\nnamespace TauCeti\n\nnamespace FiniteBilinearModule\n\n/-! ## Alternating pairings on the Klein four-group -/\n\n/-- In a nondegenerate alternating Klein four module, the two generators of an additive\nidentification pair nontrivially. -/\ntheorem pairing_ne_zero_of_addEquiv (A : FiniteBilinearModule) (hA : A.IsNondegenerate)\n (hAlt : \u2200 x, A.pairing x x = 0) (e : ZMod 2 \u00d7 ZMod 2 \u2243+ A) :\n A.pairing (e (1, 0)) (e (0, 1)) \u2260 0 := by\n have he11 : e (1, 1) = e (1, 0) + e (0, 1) := by\n simpa using e.map_add (1, 0) (0, 1)\n have hxne : e (1, 0) \u2260 0 := by\n rw [Ne, \u2190 map_zero e, e.injective.eq_iff]\n decide\n intro hxy\n -- If the cross term vanished, `x` would pair trivially with all four elements.\n have hxpair : A.pairing (e (1, 0)) = 0 := by\n apply AddMonoidHom.ext\n intro a\n obtain \u27e8\u27e8c, d\u27e9, rfl\u27e9 := e.surjective a\n -- Expose evaluation at the four coordinate vectors of the Klein four-group.\n change A.pairing (e (1, 0)) (e (c, d)) =\n (0 : AddCircle (1 : \u211a))\n rcases (by decide : \u2200 t : ZMod 2, t = 0 \u2228 t = 1) c with rfl | rfl <;>\n rcases (by decide : \u2200 t : ZMod 2, t = 0 \u2228 t = 1) d with rfl | rfl\n \u00b7 rw [show e (0, 0) = 0 by simp, map_zero]\n \u00b7 exact hxy\n \u00b7 exact hAlt _\n \u00b7 rw [he11, A.pairing_add_right, hAlt, hxy, add_zero]\n exact hxne (FiniteBilinearModule.IsNondegenerate.injective _ hA\n (hxpair.trans (map_zero _).symm))\n\n/-- In a nondegenerate alternating Klein four module, the two generators of an additive\nidentification pair to `1/2`. -/\ntheorem pairing_eq_half_of_addEquiv (A : FiniteBilinearModule)\n (hA : A.IsNondegenerate)\n (hAlt : \u2200 x, A.pairing x x = 0) (e : ZMod 2 \u00d7 ZMod 2 \u2243+ A) :\n A.pairing (e (1, 0)) (e (0, 1)) =\n ((1 / 2 : \u211a) : AddCircle (1 : \u211a)) := by\n have htwoPair : (2 : \u2124) \u2022 A.pairing (e (1, 0)) (e (0, 1)) = 0 := by\n rw [\u2190 map_zsmul]\n have hy2 : (2 : \u2124) \u2022 e (0, 1) = 0 := by\n rw [\u2190 map_zsmul]\n convert map_zero e\n decide\n rw [hy2, map_zero]\n exact (AddCircle.eq_zero_or_eq_coe_period_div_two (1 : \u211a) two_ne_zero htwoPair).resolve_left\n (pairing_ne_zero_of_addEquiv A hA hAlt e)\n\nend FiniteBilinearModule\n\nnamespace FiniteQuadraticModule\n\nvariable (\u03b1 \u03b2 \u03b3 : AddCircle (1 : \u211a))\n\n/-! ## The presenting quadratic map on `\u2124 \u00d7 \u2124` -/\n\n/-- The bilinear map `((m, k), (m', k')) \u21a6 mm'\u03b1 + kk'\u03b2 + mk'\u03b3` on `\u2124 \u00d7 \u2124`. It is not symmetric;\nonly its associated quadratic map is used. -/\nprivate def kleinFourBilin : LinearMap.BilinMap \u2124 (\u2124 \u00d7 \u2124) (AddCircle (1 : \u211a)) :=\n LinearMap.mk\u2082 \u2124 (fun u v \u21a6 (u.1 * v.1) \u2022 \u03b1 + (u.2 * v.2) \u2022 \u03b2 + (u.1 * v.2) \u2022 \u03b3)\n (fun u u' v \u21a6 by\n simp only [Prod.fst_add, Prod.snd_add, add_mul, add_smul]\n abel)\n (fun c u v \u21a6 by\n simp only [Prod.smul_fst, Prod.smul_snd, smul_eq_mul, mul_assoc, mul_smul, smul_add])\n (fun u v v' \u21a6 by\n simp only [Prod.fst_add, Prod.snd_add, mul_add, add_smul]\n abel)\n (fun c u v \u21a6 by\n simp only [Prod.smul_fst, Prod.smul_snd, smul_eq_mul, mul_left_comm, mul_smul, smul_add])\n\nprivate theorem kleinFourBilin_apply (u v : \u2124 \u00d7 \u2124) :\n kleinFourBilin \u03b1 \u03b2 \u03b3 u v =\n (u.1 * v.1) \u2022 \u03b1 + (u.2 * v.2) \u2022 \u03b2 + (u.1 * v.2) \u2022 \u03b3 := by\n rw [kleinFourBilin, LinearMap.mk\u2082_apply]\n\n/-- The quadratic map `(m, k) \u21a6 m\u00b2\u03b1 + k\u00b2\u03b2 + mk\u03b3` on `\u2124 \u00d7 \u2124`. -/\nprivate def kleinFourAux : QuadraticMap \u2124 (\u2124 \u00d7 \u2124) (AddCircle (1 : \u211a)) :=\n (kleinFourBilin \u03b1 \u03b2 \u03b3).toQuadraticMap\n\nprivate theorem kleinFourAux_apply (u : \u2124 \u00d7 \u2124) :\n kleinFourAux \u03b1 \u03b2 \u03b3 u = (u.1 * u.1) \u2022 \u03b1 + (u.2 * u.2) \u2022 \u03b2 + (u.1 * u.2) \u2022 \u03b3 := by\n rw [kleinFourAux, LinearMap.BilinMap.toQuadraticMap_apply, kleinFourBilin_apply]\n\nprivate theorem polar_kleinFourAux (u v : \u2124 \u00d7 \u2124) :\n QuadraticMap.polar (kleinFourAux \u03b1 \u03b2 \u03b3) u v =\n (2 * (u.1 * v.1)) \u2022 \u03b1 + (2 * (u.2 * v.2)) \u2022 \u03b2 + (u.1 * v.2 + u.2 * v.1) \u2022 \u03b3 := by\n rw [kleinFourAux, LinearMap.BilinMap.polar_toQuadraticMap, kleinFourBilin_apply,\n kleinFourBilin_apply]\n have e\u2081 : (2 * (u.1 * v.1) : \u2124) = u.1 * v.1 + v.1 * u.1 := by ring\n have e\u2082 : (2 * (u.2 * v.2) : \u2124) = u.2 * v.2 + v.2 * u.2 := by ring\n have e\u2083 : (u.1 * v.2 + u.2 * v.1 : \u2124) = u.1 * v.2 + v.1 * u.2 := by ring\n rw [e\u2081, e\u2082, e\u2083, add_smul, add_smul, add_smul]\n abel\n\n/-! ## Reduction modulo two -/\n\n/-- Coordinatewise reduction `\u2124 \u00d7 \u2124 \u2192 (\u2124/2)\u00b2`. -/\nprivate def zmodTwoPairProj : (\u2124 \u00d7 \u2124) \u2192\u2097[\u2124] ZMod 2 \u00d7 ZMod 2 :=\n LinearMap.prodMap (Int.castAddHom (ZMod 2)).toIntLinearMap\n (Int.castAddHom (ZMod 2)).toIntLinearMap\n\nprivate theorem zmodTwoPairProj_apply (m k : \u2124) :\n zmodTwoPairProj (m, k) = ((m : ZMod 2), (k : ZMod 2)) := (rfl)\n\nprivate theorem zmodTwoPairProj_surjective : Function.Surjective zmodTwoPairProj := by\n rintro \u27e8x, y\u27e9\n obtain \u27e8m, rfl\u27e9 := ZMod.intCast_surjective x\n obtain \u27e8k, rfl\u27e9 := ZMod.intCast_surjective y\n exact \u27e8(m, k), rfl\u27e9\n\nprivate theorem mem_ker_zmodTwoPairProj_iff (u : \u2124 \u00d7 \u2124) :\n u \u2208 LinearMap.ker zmodTwoPairProj \u2194 (2 : \u2124) \u2223 u.1 \u2227 (2 : \u2124) \u2223 u.2 := by\n obtain \u27e8m, k\u27e9 := u\n rw [LinearMap.mem_ker, zmodTwoPairProj_apply, Prod.ext_iff]\n simpa using\n and_congr (ZMod.intCast_zmod_eq_zero_iff_dvd m 2) (ZMod.intCast_zmod_eq_zero_iff_dvd k 2)\n\n/-- Under the three torsion hypotheses the kernel of reduction modulo two lies in the radical,\nwhich is what lets the quadratic map descend. -/\nprivate theorem ker_zmodTwoPairProj_le_radical (h\u2084\u03b1 : (4 : \u2124) \u2022 \u03b1 = 0) (h\u2084\u03b2 : (4 : \u2124) \u2022 \u03b2 = 0)\n (h\u2082\u03b3 : (2 : \u2124) \u2022 \u03b3 = 0) :\n LinearMap.ker zmodTwoPairProj \u2264 (kleinFourAux \u03b1 \u03b2 \u03b3).radical := by\n rintro \u27e8m, k\u27e9 hu\n rw [mem_ker_zmodTwoPairProj_iff] at hu\n obtain \u27e8\u27e8a, rfl\u27e9, \u27e8b, rfl\u27e9\u27e9 := hu\n have h\u03b1 : \u2200 c : \u2124, (c * 4 : \u2124) \u2022 \u03b1 = 0 := fun c \u21a6 by rw [mul_smul, h\u2084\u03b1, smul_zero]\n have h\u03b2 : \u2200 c : \u2124, (c * 4 : \u2124) \u2022 \u03b2 = 0 := fun c \u21a6 by rw [mul_smul, h\u2084\u03b2, smul_zero]\n have h\u03b3 : \u2200 c : \u2124, (c * 2 : \u2124) \u2022 \u03b3 = 0 := fun c \u21a6 by rw [mul_smul, h\u2082\u03b3, smul_zero]\n constructor\n \u00b7 rw [kleinFourAux_apply]\n have e\u2081 : (2 * a * (2 * a) : \u2124) = a * a * 4 := by ring\n have e\u2082 : (2 * b * (2 * b) : \u2124) = b * b * 4 := by ring\n have e\u2083 : (2 * a * (2 * b) : \u2124) = 2 * a * b * 2 := by ring\n rw [e\u2081, e\u2082, e\u2083, h\u03b1, h\u03b2, h\u03b3, add_zero, add_zero]\n \u00b7 refine LinearMap.ext fun v \u21a6 ?_\n rw [LinearMap.zero_apply, QuadraticMap.polarBilin_apply_apply, polar_kleinFourAux]\n have e\u2081 : (2 * (2 * a * v.1) : \u2124) = a * v.1 * 4 := by ring\n have e\u2082 : (2 * (2 * b * v.2) : \u2124) = b * v.2 * 4 := by ring\n have e\u2083 : (2 * a * v.2 + 2 * b * v.1 : \u2124) = (a * v.2 + b * v.1) * 2 := by ring\n rw [e\u2081, e\u2082, e\u2083, h\u03b1, h\u03b2, h\u03b3, add_zero, add_zero]\n\n/-! ## The quadratic module -/\n\nvariable (h\u2084\u03b1 : (4 : \u2124) \u2022 \u03b1 = 0) (h\u2084\u03b2 : (4 : \u2124) \u2022 \u03b2 = 0) (h\u2082\u03b3 : (2 : \u2124) \u2022 \u03b3 = 0)\n\ninclude h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3\n\n/-- The quadratic map on `(\u2124/2)\u00b2` sending `(1, 0)` to `\u03b1`, `(0, 1)` to `\u03b2`, and `(1, 1)` to\n`\u03b1 + \u03b2 + \u03b3`. -/\nnoncomputable def kleinFourMap : QuadraticMap \u2124 (ZMod 2 \u00d7 ZMod 2) (AddCircle (1 : \u211a)) :=\n QuadraticMap.liftOfSurjective (kleinFourAux \u03b1 \u03b2 \u03b3) zmodTwoPairProj zmodTwoPairProj_surjective\n (ker_zmodTwoPairProj_le_radical \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3)\n\n/-- The value of `kleinFourMap` on the reduction of a pair of integers. -/\ntheorem kleinFourMap_intCast (m k : \u2124) :\n kleinFourMap \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 ((m : ZMod 2), (k : ZMod 2)) =\n (m * m) \u2022 \u03b1 + (k * k) \u2022 \u03b2 + (m * k) \u2022 \u03b3 := by\n rw [kleinFourMap, \u2190 zmodTwoPairProj_apply m k, QuadraticMap.liftOfSurjective_apply,\n kleinFourAux_apply]\n\n@[simp]\ntheorem kleinFourMap_apply_one_zero : kleinFourMap \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 (1, 0) = \u03b1 := by\n simpa using kleinFourMap_intCast \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 1 0\n\n@[simp]\ntheorem kleinFourMap_apply_zero_one : kleinFourMap \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 (0, 1) = \u03b2 := by\n simpa using kleinFourMap_intCast \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 0 1\n\n@[simp]\ntheorem kleinFourMap_apply_one_one :\n kleinFourMap \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 (1, 1) = \u03b1 + \u03b2 + \u03b3 := by\n simpa using kleinFourMap_intCast \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 1 1\n\n/-- The two standard generators of `(\u2124/2)\u00b2` pair to `\u03b3`. -/\n@[simp]\ntheorem polar_kleinFourMap_one_zero_zero_one :\n QuadraticMap.polar (kleinFourMap \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3) (1, 0) (0, 1) = \u03b3 := by\n rw [QuadraticMap.polar, kleinFourMap_apply_one_zero, kleinFourMap_apply_zero_one]\n rw [Prod.mk_add_mk, add_zero, zero_add, kleinFourMap_apply_one_one]\n abel\n\n/-- **The finite quadratic module on `(\u2124/2)\u00b2` with generator values `\u03b1`, `\u03b2` and `\u03b1 + \u03b2 + \u03b3`.** -/\n@[expose] noncomputable def kleinFour : FiniteQuadraticModule :=\n ofQuadraticMap (kleinFourMap \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3)\n\n@[simp]\ntheorem kleinFour_quadratic (x : ZMod 2 \u00d7 ZMod 2) :\n (kleinFour \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3).quadratic x = kleinFourMap \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 x := (rfl)\n\n@[simp]\ntheorem kleinFour_pairing (x y : ZMod 2 \u00d7 ZMod 2) :\n (kleinFour \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3).toFiniteBilinearModule.pairing x y =\n QuadraticMap.polar (kleinFourMap \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3) x y := (rfl)\n\nomit h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 in\n/-- **An additive equivalence from `(\u2124/2)\u00b2` matching all three nonzero values is an isometry.**\n\nNo hypothesis beyond the three displayed values is needed. Both forms are stated as bare quadratic\nmaps so that the construction applies before either is packaged as a finite quadratic module. -/\nnoncomputable def kleinFourIsometryOfGenerators {A : Type*} [AddCommGroup A]\n (q : QuadraticMap \u2124 (ZMod 2 \u00d7 ZMod 2) (AddCircle (1 : \u211a)))\n (r : QuadraticMap \u2124 A (AddCircle (1 : \u211a))) (e : ZMod 2 \u00d7 ZMod 2 \u2243+ A)\n (h\u2081 : r (e (1, 0)) = q (1, 0)) (h\u2082 : r (e (0, 1)) = q (0, 1))\n (h\u2083 : r (e (1, 1)) = q (1, 1)) : q.IsometryEquiv r where\n toLinearEquiv := e.toIntLinearEquiv\n map_app' x := by\n have hcases : \u2200 c : ZMod 2, c = 0 \u2228 c = 1 := by decide\n obtain \u27e8c, d\u27e9 := x\n -- The linear and additive equivalences have definitionally equal coercions, so the named\n -- reflexive theorem `AddEquiv.coe_toIntLinearEquiv` gives `simp` no rewrite step here.\n change r (e (c, d)) = q (c, d)\n rcases hcases c with rfl | rfl <;> rcases hcases d with rfl | rfl\n \u00b7 rw [Prod.mk_zero_zero, map_zero, map_zero, map_zero]\n \u00b7 exact h\u2082\n \u00b7 exact h\u2081\n \u00b7 exact h\u2083\n\nomit h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 in\n@[simp]\ntheorem kleinFourIsometryOfGenerators_apply {A : Type*} [AddCommGroup A]\n (q : QuadraticMap \u2124 (ZMod 2 \u00d7 ZMod 2) (AddCircle (1 : \u211a)))\n (r : QuadraticMap \u2124 A (AddCircle (1 : \u211a))) (e : ZMod 2 \u00d7 ZMod 2 \u2243+ A)\n (h\u2081 : r (e (1, 0)) = q (1, 0)) (h\u2082 : r (e (0, 1)) = q (0, 1))\n (h\u2083 : r (e (1, 1)) = q (1, 1))\n (x : ZMod 2 \u00d7 ZMod 2) :\n kleinFourIsometryOfGenerators q r e h\u2081 h\u2082 h\u2083 x = e x := (rfl)\n\nend FiniteQuadraticModule\n\nend TauCeti\n", "public_theorems": ["TauCeti.FiniteBilinearModule.pairing_ne_zero_of_addEquiv", "TauCeti.FiniteBilinearModule.pairing_eq_half_of_addEquiv", "TauCeti.FiniteQuadraticModule.kleinFourMap_intCast", "TauCeti.FiniteQuadraticModule.kleinFourMap_apply_one_zero", "TauCeti.FiniteQuadraticModule.kleinFourMap_apply_zero_one", "TauCeti.FiniteQuadraticModule.kleinFourMap_apply_one_one", "TauCeti.FiniteQuadraticModule.polar_kleinFourMap_one_zero_zero_one", "TauCeti.FiniteQuadraticModule.kleinFour_quadratic", "TauCeti.FiniteQuadraticModule.kleinFour_pairing", "TauCeti.FiniteQuadraticModule.kleinFourIsometryOfGenerators_apply"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Algebra.AddCircle\npublic import TauCeti.LinearAlgebra.FiniteBilinearModule.Quadratic.Basic\n\n/-!\n# Finite quadratic modules on the Klein four-group\n\nA `\u211a/\u2124`-valued quadratic map on `(\u2124/2)\u00b2` is determined by its three values on the nonzero\nelements, and conversely any three values admissible for the two-torsion of the group occur.\nThis file makes that presentation available as a construction: given `\u03b1 \u03b2 \u03b3 : \u211a/\u2124` with\n`4\u03b1 = 4\u03b2 = 2\u03b3 = 0`, `TauCeti.FiniteQuadraticModule.kleinFour` is the finite quadratic module on\n`ZMod 2 \u00d7 ZMod 2` with\n\n```text\nq(1, 0) = \u03b1, q(0, 1) = \u03b2, q(1, 1) = \u03b1 + \u03b2 + \u03b3, b((1, 0), (0, 1)) = \u03b3.\n```\n\nThe construction is a quotient, not a formula in `ZMod.val`: the parameters define an honest\n`\u2124`-bilinear map on `\u2124 \u00d7 \u2124`, its associated quadratic map `(m, k) \u21a6 m\u00b2\u03b1 + k\u00b2\u03b2 + mk\u03b3` has the\nkernel of the reduction `\u2124 \u00d7 \u2124 \u2192 (\u2124/2)\u00b2` inside its radical exactly under the three torsion\nhypotheses, and `QuadraticMap.liftOfSurjective` descends it. The torsion hypotheses are\ntherefore not technical: `4\u03b1 = 0` is the statement that `q` is well defined on a two-torsion\ngenerator, and `2\u03b3 = 0` the corresponding statement for the pairing.\n\nThe companion `TauCeti.FiniteQuadraticModule.kleinFourIsometryOfGenerators` turns an additive\nequivalence `(\u2124/2)\u00b2 \u2243+ A` matching the three displayed values into an isometry onto `A`, which is\nhow a discriminant form of order four and exponent two is identified.\n\nThe quotient construction is the rank-two adaptation of the cyclic one in\n`TauCeti.LinearAlgebra.FiniteBilinearModule.Cyclic`, which presents a form on `\u2124/m` by the single\nvalue of its generator.\n\n## Main declarations\n\n* `TauCeti.FiniteQuadraticModule.kleinFourMap`: the quadratic map on `ZMod 2 \u00d7 ZMod 2` with the\n displayed generator values.\n* `TauCeti.FiniteQuadraticModule.kleinFour`: the resulting finite quadratic module.\n* `TauCeti.FiniteQuadraticModule.kleinFourIsometryOfGenerators`: an additive equivalence matching\n the three generator values is an isometry.\n* `TauCeti.FiniteBilinearModule.pairing_eq_half_of_addEquiv`: in a nondegenerate alternating\n module identified with `(\u2124/2)\u00b2`, the two generators pair to `1/2`.\n\n## References\n\n* V. V. Nikulin, *Integral symmetric bilinear forms and some of their applications*, \u00a71.1 for\n discriminant forms and \u00a71.8, Proposition 1.8.1 for the forms written `u\u2081` and `v\u2081` in the\n full-norm convention.\n* W. Ebeling, *Lattices and Codes*, Chapter 1.\n-/\n\npublic section\n\nnamespace TauCeti\n\nnamespace FiniteBilinearModule\n\n/-! ## Alternating pairings on the Klein four-group -/", "/-- In a nondegenerate alternating Klein four module, the two generators of an additive\nidentification pair nontrivially. -/\ntheorem pairing_ne_zero_of_addEquiv (A : FiniteBilinearModule) (hA : A.IsNondegenerate)\n (hAlt : \u2200 x, A.pairing x x = 0) (e : ZMod 2 \u00d7 ZMod 2 \u2243+ A) :\n A.pairing (e (1, 0)) (e (0, 1)) \u2260 0 :=", "/-- In a nondegenerate alternating Klein four module, the two generators of an additive\nidentification pair to `1/2`. -/\ntheorem pairing_eq_half_of_addEquiv (A : FiniteBilinearModule)\n (hA : A.IsNondegenerate)\n (hAlt : \u2200 x, A.pairing x x = 0) (e : ZMod 2 \u00d7 ZMod 2 \u2243+ A) :\n A.pairing (e (1, 0)) (e (0, 1)) =\n ((1 / 2 : \u211a) : AddCircle (1 : \u211a)) :=", "end FiniteBilinearModule\n\nnamespace FiniteQuadraticModule\n\nvariable (\u03b1 \u03b2 \u03b3 : AddCircle (1 : \u211a))\n\n/-! ## The presenting quadratic map on `\u2124 \u00d7 \u2124` -/\n\n/-- The bilinear map `((m, k), (m', k')) \u21a6 mm'\u03b1 + kk'\u03b2 + mk'\u03b3` on `\u2124 \u00d7 \u2124`. It is not symmetric;\nonly its associated quadratic map is used. -/\nprivate def kleinFourBilin : LinearMap.BilinMap \u2124 (\u2124 \u00d7 \u2124) (AddCircle (1 : \u211a)) :=\n LinearMap.mk\u2082 \u2124 (fun u v \u21a6 (u.1 * v.1) \u2022 \u03b1 + (u.2 * v.2) \u2022 \u03b2 + (u.1 * v.2) \u2022 \u03b3)\n (fun u u' v \u21a6 by\n simp only [Prod.fst_add, Prod.snd_add, add_mul, add_smul]\n abel)\n (fun c u v \u21a6 by\n simp only [Prod.smul_fst, Prod.smul_snd, smul_eq_mul, mul_assoc, mul_smul, smul_add])\n (fun u v v' \u21a6 by\n simp only [Prod.fst_add, Prod.snd_add, mul_add, add_smul]\n abel)\n (fun c u v \u21a6 by\n simp only [Prod.smul_fst, Prod.smul_snd, smul_eq_mul, mul_left_comm, mul_smul, smul_add])", "/-- The quadratic map `(m, k) \u21a6 m\u00b2\u03b1 + k\u00b2\u03b2 + mk\u03b3` on `\u2124 \u00d7 \u2124`. -/\nprivate def kleinFourAux : QuadraticMap \u2124 (\u2124 \u00d7 \u2124) (AddCircle (1 : \u211a)) :=\n (kleinFourBilin \u03b1 \u03b2 \u03b3).toQuadraticMap", "/-! ## Reduction modulo two -/\n\n/-- Coordinatewise reduction `\u2124 \u00d7 \u2124 \u2192 (\u2124/2)\u00b2`. -/\nprivate def zmodTwoPairProj : (\u2124 \u00d7 \u2124) \u2192\u2097[\u2124] ZMod 2 \u00d7 ZMod 2 :=\n LinearMap.prodMap (Int.castAddHom (ZMod 2)).toIntLinearMap\n (Int.castAddHom (ZMod 2)).toIntLinearMap", "/-! ## The quadratic module -/\n\nvariable (h\u2084\u03b1 : (4 : \u2124) \u2022 \u03b1 = 0) (h\u2084\u03b2 : (4 : \u2124) \u2022 \u03b2 = 0) (h\u2082\u03b3 : (2 : \u2124) \u2022 \u03b3 = 0)\n\ninclude h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3\n\n/-- The quadratic map on `(\u2124/2)\u00b2` sending `(1, 0)` to `\u03b1`, `(0, 1)` to `\u03b2`, and `(1, 1)` to\n`\u03b1 + \u03b2 + \u03b3`. -/\nnoncomputable def kleinFourMap : QuadraticMap \u2124 (ZMod 2 \u00d7 ZMod 2) (AddCircle (1 : \u211a)) :=\n QuadraticMap.liftOfSurjective (kleinFourAux \u03b1 \u03b2 \u03b3) zmodTwoPairProj zmodTwoPairProj_surjective\n (ker_zmodTwoPairProj_le_radical \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3)", "/-- The value of `kleinFourMap` on the reduction of a pair of integers. -/\ntheorem kleinFourMap_intCast (m k : \u2124) :\n kleinFourMap \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 ((m : ZMod 2), (k : ZMod 2)) =\n (m * m) \u2022 \u03b1 + (k * k) \u2022 \u03b2 + (m * k) \u2022 \u03b3 :=", "@[simp]\ntheorem kleinFourMap_apply_one_zero : kleinFourMap \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 (1, 0) = \u03b1 :=", "@[simp]\ntheorem kleinFourMap_apply_zero_one : kleinFourMap \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 (0, 1) = \u03b2 :=", "@[simp]\ntheorem kleinFourMap_apply_one_one :\n kleinFourMap \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 (1, 1) = \u03b1 + \u03b2 + \u03b3 :=", "/-- The two standard generators of `(\u2124/2)\u00b2` pair to `\u03b3`. -/\n@[simp]\ntheorem polar_kleinFourMap_one_zero_zero_one :\n QuadraticMap.polar (kleinFourMap \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3) (1, 0) (0, 1) = \u03b3 :=", "/-- **The finite quadratic module on `(\u2124/2)\u00b2` with generator values `\u03b1`, `\u03b2` and `\u03b1 + \u03b2 + \u03b3`.** -/\n@[expose] noncomputable def kleinFour : FiniteQuadraticModule :=\n ofQuadraticMap (kleinFourMap \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3)", "@[simp]\ntheorem kleinFour_quadratic (x : ZMod 2 \u00d7 ZMod 2) :\n (kleinFour \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3).quadratic x = kleinFourMap \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 x :=", "@[simp]\ntheorem kleinFour_pairing (x y : ZMod 2 \u00d7 ZMod 2) :\n (kleinFour \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3).toFiniteBilinearModule.pairing x y =\n QuadraticMap.polar (kleinFourMap \u03b1 \u03b2 \u03b3 h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3) x y :=", "omit h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 in\n/-- **An additive equivalence from `(\u2124/2)\u00b2` matching all three nonzero values is an isometry.**\n\nNo hypothesis beyond the three displayed values is needed. Both forms are stated as bare quadratic\nmaps so that the construction applies before either is packaged as a finite quadratic module. -/\nnoncomputable def kleinFourIsometryOfGenerators {A : Type*} [AddCommGroup A]\n (q : QuadraticMap \u2124 (ZMod 2 \u00d7 ZMod 2) (AddCircle (1 : \u211a)))\n (r : QuadraticMap \u2124 A (AddCircle (1 : \u211a))) (e : ZMod 2 \u00d7 ZMod 2 \u2243+ A)\n (h\u2081 : r (e (1, 0)) = q (1, 0)) (h\u2082 : r (e (0, 1)) = q (0, 1))\n (h\u2083 : r (e (1, 1)) = q (1, 1)) : q.IsometryEquiv r where\n toLinearEquiv := e.toIntLinearEquiv\n map_app' x := by\n have hcases : \u2200 c : ZMod 2, c = 0 \u2228 c = 1 := by decide\n obtain \u27e8c, d\u27e9 := x\n -- The linear and additive equivalences have definitionally equal coercions, so the named\n -- reflexive theorem `AddEquiv.coe_toIntLinearEquiv` gives `simp` no rewrite step here.\n change r (e (c, d)) = q (c, d)\n rcases hcases c with rfl | rfl <;> rcases hcases d with rfl | rfl\n \u00b7 rw [Prod.mk_zero_zero, map_zero, map_zero, map_zero]\n \u00b7 exact h\u2082\n \u00b7 exact h\u2081\n \u00b7 exact h\u2083", "omit h\u2084\u03b1 h\u2084\u03b2 h\u2082\u03b3 in\n@[simp]\ntheorem kleinFourIsometryOfGenerators_apply {A : Type*} [AddCommGroup A]\n (q : QuadraticMap \u2124 (ZMod 2 \u00d7 ZMod 2) (AddCircle (1 : \u211a)))\n (r : QuadraticMap \u2124 A (AddCircle (1 : \u211a))) (e : ZMod 2 \u00d7 ZMod 2 \u2243+ A)\n (h\u2081 : r (e (1, 0)) = q (1, 0)) (h\u2082 : r (e (0, 1)) = q (0, 1))\n (h\u2083 : r (e (1, 1)) = q (1, 1))\n (x : ZMod 2 \u00d7 ZMod 2) :\n kleinFourIsometryOfGenerators q r e h\u2081 h\u2082 h\u2083 x = e x :=", "end FiniteQuadraticModule\n\nend TauCeti"], "free_length": 4194, "file_length": 8123, "heartbeats": 16432, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.InformationTheory.Coding.Discriminant", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/InformationTheory/Coding/Discriminant.lean", "module": "TauCeti.InformationTheory.Coding.Discriminant", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Data.ZMod.Two\npublic import TauCeti.InformationTheory.Coding.Binary.Basic\npublic import TauCeti.InformationTheory.Coding.Weight.Euclidean\npublic import TauCeti.LinearAlgebra.FiniteBilinearModule.CoordinatePower\npublic import TauCeti.LinearAlgebra.FiniteBilinearModule.ZMod.Standard\n\nimport Mathlib.Algebra.BigOperators.Field\n\n/-!\n# Codes over `\u2124/m` as subgroups of a discriminant module\n\nWords over `\u2124/m` are elements of the coordinate power of the standard alphabet\n`TauCeti.FiniteBilinearModule.zmodStandard`, whose pairing is `xy / m`. Summing that pairing\nover the coordinates gives\n\n```text\nb(x, y) = (x \u2b1d\u1d65 y) / m,\n```\n\nso an additive code and the codes orthogonal to it for the `\u2124/m` dot product are literally a\nsubgroup of a finite bilinear module and its orthogonal complement. In particular a code is\nself-orthogonal exactly when it is isotropic, and self-dual exactly when it is Lagrangian.\n\nWhen `m` is even the coordinate power of the quadratic alphabet adds the value\n\n```text\nq(x) = (\u2211 i, lift (x\u1d62)\u00b2) / (2m),\n```\n\nindependent of the chosen integer lifts because each coordinate value is. At `m = 2` each\ncanonical representative is `0` or `1`, hence equals its square, so `q(x)` is a quarter of the\nHamming weight and quadratic isotropy of a binary code is exactly double evenness. These are the\nidentifications through which a code becomes an isotropic subgroup of the discriminant module of\na lattice.\n\n## Main declarations\n\n* `TauCeti.coordinatePower_zmodStandard_pairing` and\n `TauCeti.coordinatePower_zmodStandard_pairing_intCast`: the coordinate pairing over `\u2124/m` is\n the dot product divided by `m`, including for arbitrary integer lifts.\n* `TauCeti.orthogonalComplement_coordinatePower_zmodStandard`: the orthogonal complement of a\n code is its Euclidean dual.\n* `TauCeti.isIsotropic_coordinatePower_zmodStandard_iff_le_euclideanDual` and\n `TauCeti.isLagrangian_coordinatePower_zmodStandard_iff`: isotropy is self-orthogonality and\n the Lagrangian condition is self-duality.\n* `TauCeti.coordinatePower_zmodStandard_quadratic`: the coordinate quadratic value over an even\n `\u2124/m` is the sum of the squares of the coordinate lifts divided by `2m`.\n* `TauCeti.coordinatePower_zmodStandard_quadratic_intCast_eq_zero_iff` and\n `TauCeti.isIsotropic_coordinatePower_zmodStandard_quadratic_intCast_iff`: the same values and\n isotropy read off any coordinatewise integer lift.\n* `TauCeti.isIsotropic_coordinatePower_zmodStandard_quadratic_iff`: quadratic isotropy over an\n even `\u2124/m` is divisibility of the sum of squared canonical representatives by `2m`.\n* `TauCeti.isIsotropic_coordinatePower_zmodStandard_quadratic_iff_euclideanWeight`: equivalently,\n divisibility of every Euclidean weight by `2m`.\n* `TauCeti.isIsotropic_coordinatePower_zmodStandard_two_iff_isDoublyEven`: over `\u2124/2` quadratic\n isotropy is double evenness.\n\n## References\n\n* W. Ebeling, *Lattices and Codes*, \u00a7\u00a71.2\u20131.3, for binary codes, their weights, and the\n quadratic form `wt / 4` modulo `\u2124`.\n* J. H. Conway and N. J. A. Sloane, *Sphere Packings, Lattices and Groups*, Chapter 4, \u00a73 and\n Chapter 7, \u00a7\u00a78\u20139, for codes as glue groups in discriminant coordinates.\n-/\n\npublic section\n\nnamespace TauCeti\n\nopen Matrix\n\nvariable {\u03b9 : Type*} [Fintype \u03b9] (m : \u2115) [NeZero m]\n\n/-! ## The bilinear coordinate power -/\n\n/-- The pairing of two words over `\u2124/m` is their dot product, divided by `m`. -/\ntheorem coordinatePower_zmodStandard_pairing (x y : \u03b9 \u2192 ZMod m) :\n ((FiniteBilinearModule.zmodStandard m).coordinatePower \u03b9).pairing x y =\n ZMod.toRatAddCircle m (x \u2b1d\u1d65 y) := by\n rw [FiniteBilinearModule.coordinatePower_pairing, dotProduct, map_sum]\n exact Finset.sum_congr rfl fun i _ \u21a6 FiniteBilinearModule.zmodStandard_pairing m (x i) (y i)\n\n/-- The pairing of two words over `\u2124/m`, computed using arbitrary coordinatewise integer lifts. -/\ntheorem coordinatePower_zmodStandard_pairing_intCast (a b : \u03b9 \u2192 \u2124) :\n ((FiniteBilinearModule.zmodStandard m).coordinatePower \u03b9).pairing\n (fun i \u21a6 (a i : ZMod m)) (fun i \u21a6 (b i : ZMod m)) =\n (((\u2211 i, (a i : \u211a) * (b i : \u211a)) / m : \u211a) : AddCircle (1 : \u211a)) := by\n rw [FiniteBilinearModule.coordinatePower_pairing, Finset.sum_div]\n calc\n _ = \u2211 i, ((((a i : \u2124) : \u211a) * (b i : \u211a) / m : \u211a) : AddCircle (1 : \u211a)) :=\n Finset.sum_congr rfl fun i _ \u21a6\n FiniteBilinearModule.zmodStandard_pairing_intCast m (a i) (b i)\n _ = _ := (map_sum (QuotientAddGroup.mk' (AddSubgroup.zmultiples (1 : \u211a)))\n (fun i \u21a6 (a i : \u211a) * (b i : \u211a) / m) Finset.univ).symm\n\n/-- Two words over `\u2124/m` are orthogonal for the coordinate pairing exactly when their dot\nproduct vanishes. -/\n-- Not a `simp` lemma: the coordinate power and the alphabet are both reducible, so `simp` takes\n-- the left-hand side apart into the summed coordinate pairings before this could fire.\ntheorem coordinatePower_zmodStandard_pairing_eq_zero_iff (x y : \u03b9 \u2192 ZMod m) :\n ((FiniteBilinearModule.zmodStandard m).coordinatePower \u03b9).pairing x y = 0 \u2194 x \u2b1d\u1d65 y = 0 := by\n rw [coordinatePower_zmodStandard_pairing, ZMod.toRatAddCircle_eq_zero]\n\n/-- The orthogonal complement of an additive code over `\u2124/m` consists of the words with zero dot\nproduct against every codeword. -/\ntheorem mem_orthogonalComplement_coordinatePower_zmodStandard_iff (C : AdditiveCode (ZMod m) \u03b9)\n (x : \u03b9 \u2192 ZMod m) :\n x \u2208 ((FiniteBilinearModule.zmodStandard m).coordinatePower \u03b9).orthogonalComplement C \u2194\n \u2200 y \u2208 C, x \u2b1d\u1d65 y = 0 := by\n rw [FiniteBilinearModule.mem_orthogonalComplement_iff]\n exact forall\u2082_congr fun y _ \u21a6 coordinatePower_zmodStandard_pairing_eq_zero_iff m x y\n\n/-- **The orthogonal complement of an additive code over `\u2124/m` is its Euclidean dual.** -/\n@[simp]\ntheorem orthogonalComplement_coordinatePower_zmodStandard (C : AdditiveCode (ZMod m) \u03b9) :\n ((FiniteBilinearModule.zmodStandard m).coordinatePower \u03b9).orthogonalComplement C =\n (AddSubgroup.toZModSubmodule m C).euclideanDual.toAddSubgroup := by\n ext x\n rw [mem_orthogonalComplement_coordinatePower_zmodStandard_iff, Submodule.mem_toAddSubgroup,\n Submodule.mem_euclideanDual']\n exact \u27e8fun h y hy \u21a6 (dotProduct_comm x y) \u25b8 h y hy,\n fun h y hy \u21a6 (dotProduct_comm y x) \u25b8 h y hy\u27e9\n\n/-- An additive code over `\u2124/m` is isotropic exactly when any two of its words are\northogonal. -/\ntheorem isIsotropic_coordinatePower_zmodStandard_iff (C : AdditiveCode (ZMod m) \u03b9) :\n ((FiniteBilinearModule.zmodStandard m).coordinatePower \u03b9).IsIsotropic C \u2194\n \u2200 x \u2208 C, \u2200 y \u2208 C, x \u2b1d\u1d65 y = 0 := by\n rw [FiniteBilinearModule.isIsotropic_def]\n exact forall\u2082_congr fun x _ \u21a6 forall\u2082_congr fun y _ \u21a6\n coordinatePower_zmodStandard_pairing_eq_zero_iff m x y\n\n/-- **Isotropy of a code over `\u2124/m` is self-orthogonality.** -/\n@[simp]\ntheorem isIsotropic_coordinatePower_zmodStandard_iff_le_euclideanDual\n (C : AdditiveCode (ZMod m) \u03b9) :\n ((FiniteBilinearModule.zmodStandard m).coordinatePower \u03b9).IsIsotropic C \u2194\n AddSubgroup.toZModSubmodule m C \u2264 (AddSubgroup.toZModSubmodule m C).euclideanDual := by\n rw [FiniteBilinearModule.isIsotropic_iff_le_orthogonalComplement,\n orthogonalComplement_coordinatePower_zmodStandard]\n simp only [IsConcreteLE.le_iff, Submodule.mem_toAddSubgroup, AddSubgroup.mem_toZModSubmodule]\n\n/-- **The Lagrangian condition for a code over `\u2124/m` is self-duality.** -/\n@[simp]\ntheorem isLagrangian_coordinatePower_zmodStandard_iff (C : AdditiveCode (ZMod m) \u03b9) :\n ((FiniteBilinearModule.zmodStandard m).coordinatePower \u03b9).IsLagrangian C \u2194\n AddSubgroup.toZModSubmodule m C = (AddSubgroup.toZModSubmodule m C).euclideanDual := by\n rw [FiniteBilinearModule.isLagrangian_def, orthogonalComplement_coordinatePower_zmodStandard]\n constructor\n \u00b7 intro h\n ext x\n rw [AddSubgroup.mem_toZModSubmodule]\n conv_lhs => rw [h]\n rw [Submodule.mem_toAddSubgroup]\n \u00b7 intro h\n ext x\n rw [Submodule.mem_toAddSubgroup, \u2190 h, AddSubgroup.mem_toZModSubmodule]\n\n/-! ## The quadratic coordinate power for an even modulus -/\n\nvariable (hm : Even m)\n\n/-- The quadratic value of a word over an even `\u2124/m` is the sum of the squares of its coordinate\nrepresentatives, divided by `2m`. -/\ntheorem coordinatePower_zmodStandard_quadratic (x : \u03b9 \u2192 ZMod m) :\n ((FiniteQuadraticModule.zmodStandard m hm).coordinatePower \u03b9).quadratic x =\n (((\u2211 i, ((x i).val : \u211a) ^ 2) / (2 * m) : \u211a) : AddCircle (1 : \u211a)) := by\n rw [FiniteQuadraticModule.coordinatePower_quadratic, Finset.sum_div]\n calc\n _ = \u2211 i, ((((x i).val : \u211a) ^ 2 / (2 * m) : \u211a) : AddCircle (1 : \u211a)) :=\n Finset.sum_congr rfl fun i _ \u21a6 FiniteQuadraticModule.zmodStandardMap_val m hm (x i)\n _ = _ := (map_sum (QuotientAddGroup.mk' (AddSubgroup.zmultiples (1 : \u211a)))\n (fun i \u21a6 ((x i).val : \u211a) ^ 2 / (2 * m)) Finset.univ).symm\n\n/-- The quadratic value of a word over an even `\u2124/m` is computed by any coordinatewise integer\nlift: the sum of the squares of the lifts, divided by `2m`. -/\ntheorem coordinatePower_zmodStandard_quadratic_intCast (z : \u03b9 \u2192 \u2124) :\n ((FiniteQuadraticModule.zmodStandard m hm).coordinatePower \u03b9).quadratic\n (fun i \u21a6 ((z i : ZMod m))) =\n (((\u2211 i, (z i : \u211a) ^ 2) / (2 * m) : \u211a) : AddCircle (1 : \u211a)) := by\n rw [FiniteQuadraticModule.coordinatePower_quadratic, Finset.sum_div]\n calc\n _ = \u2211 i, ((((z i : \u2124) : \u211a) ^ 2 / (2 * m) : \u211a) : AddCircle (1 : \u211a)) :=\n Finset.sum_congr rfl fun i _ \u21a6 FiniteQuadraticModule.zmodStandardMap_intCast m hm (z i)\n _ = _ := (map_sum (QuotientAddGroup.mk' (AddSubgroup.zmultiples (1 : \u211a)))\n (fun i \u21a6 ((z i : \u2124) : \u211a) ^ 2 / (2 * m)) Finset.univ).symm\n\n/-- The quadratic value of a word over an even `\u2124/m` vanishes exactly when `2m` divides the sum\nof the squares of a coordinatewise integer lift. -/\ntheorem coordinatePower_zmodStandard_quadratic_intCast_eq_zero_iff (z : \u03b9 \u2192 \u2124) :\n ((FiniteQuadraticModule.zmodStandard m hm).coordinatePower \u03b9).quadratic\n (fun i \u21a6 ((z i : ZMod m))) = 0 \u2194 (2 * m : \u2124) \u2223 \u2211 i, z i ^ 2 := by\n have hsum : \u2211 i, (z i : \u211a) ^ 2 = ((\u2211 i, z i ^ 2 : \u2124) : \u211a) := by push_cast; rfl\n have hden : ((2 * m : \u2115) : \u211a) = 2 * m := by push_cast; rfl\n rw [coordinatePower_zmodStandard_quadratic_intCast, hsum, \u2190 hden,\n AddCircle.coe_intCast_div_natCast_eq_zero_iff (Nat.mul_ne_zero two_ne_zero (NeZero.ne m))]\n push_cast\n rfl\n\n/-- Quadratic isotropy of an additive code over an even `\u2124/m` means that `2m` divides the sum of\nthe squares of every coordinatewise integer lift of a codeword. -/\ntheorem isIsotropic_coordinatePower_zmodStandard_quadratic_intCast_iff\n (C : AdditiveCode (ZMod m) \u03b9) :\n ((FiniteQuadraticModule.zmodStandard m hm).coordinatePower \u03b9).IsIsotropic C \u2194\n \u2200 z : \u03b9 \u2192 \u2124, (fun i \u21a6 ((z i : ZMod m))) \u2208 C \u2192 (2 * m : \u2124) \u2223 \u2211 i, z i ^ 2 := by\n rw [FiniteQuadraticModule.isIsotropic_def]\n constructor\n \u00b7 intro h z hz\n exact (coordinatePower_zmodStandard_quadratic_intCast_eq_zero_iff m hm z).mp (h _ hz)\n \u00b7 intro h x hx\n have hlift : (fun i \u21a6 ((((x i).val : \u2124) : ZMod m))) = x := by\n simp [ZMod.natCast_val, ZMod.cast_id]\n have hq := (coordinatePower_zmodStandard_quadratic_intCast_eq_zero_iff m hm\n (fun i \u21a6 ((x i).val : \u2124))).mpr (h _ (by rw [hlift]; exact hx))\n rwa [hlift] at hq\n\n/-- Quadratic isotropy of an additive code over an even `\u2124/m` means that the sum of the squares\nof the canonical representatives of every codeword is divisible by `2m`. -/\ntheorem isIsotropic_coordinatePower_zmodStandard_quadratic_iff\n (C : AdditiveCode (ZMod m) \u03b9) :\n ((FiniteQuadraticModule.zmodStandard m hm).coordinatePower \u03b9).IsIsotropic C \u2194\n \u2200 x \u2208 C, 2 * m \u2223 \u2211 i, (x i).val ^ 2 := by\n rw [FiniteQuadraticModule.isIsotropic_def]\n refine forall\u2082_congr fun x _ \u21a6 ?_\n rw [coordinatePower_zmodStandard_quadratic]\n have hsum : \u2211 i, ((x i).val : \u211a) ^ 2 = ((\u2211 i, (x i).val ^ 2 : \u2115) : \u211a) := by\n push_cast\n rfl\n have hden : ((2 * m : \u2115) : \u211a) = 2 * m := by push_cast; rfl\n rw [hsum, \u2190 hden, \u2190 Int.cast_natCast (\u2211 i, (x i).val ^ 2),\n AddCircle.coe_intCast_div_natCast_eq_zero_iff\n (Nat.mul_ne_zero (by norm_num) (NeZero.ne m))]\n exact Int.natCast_dvd_natCast\n\n/-- Quadratic isotropy of an additive code over an even `\u2124/m` means that every codeword has\nEuclidean weight divisible by `2m`. -/\ntheorem isIsotropic_coordinatePower_zmodStandard_quadratic_iff_euclideanWeight\n (C : AdditiveCode (ZMod m) \u03b9) :\n ((FiniteQuadraticModule.zmodStandard m hm).coordinatePower \u03b9).IsIsotropic C \u2194\n \u2200 x \u2208 C, 2 * m \u2223 euclideanWeight x := by\n rw [FiniteQuadraticModule.isIsotropic_def]\n refine forall\u2082_congr fun x _ \u21a6 ?_\n -- evaluate the quadratic value on the least absolute lifts of the coordinates\n have hlift : (fun i \u21a6 (((x i).valMinAbs : \u2124) : ZMod m)) = x :=\n funext fun i \u21a6 ZMod.coe_valMinAbs (x i)\n conv_lhs => rw [\u2190 hlift]\n rw [coordinatePower_zmodStandard_quadratic_intCast_eq_zero_iff, \u2190 natCast_euclideanWeight]\n exact_mod_cast Iff.rfl\n\n/-- The quadratic value of a binary word is a quarter of its Hamming weight. -/\ntheorem coordinatePower_zmodStandard_two_quadratic (x : \u03b9 \u2192 ZMod 2) :\n ((FiniteQuadraticModule.zmodStandard 2 even_two).coordinatePower \u03b9).quadratic x =\n (((hammingNorm x : \u211a) / 4 : \u211a) : AddCircle (1 : \u211a)) := by\n rw [coordinatePower_zmodStandard_quadratic]\n have hval : \u2200 a : ZMod 2, ((a.val : \u211a)) ^ 2 = if a \u2260 0 then (1 : \u211a) else 0 := by\n intro a\n -- a binary residue has representative `0` or `1`, and both are their own squares\n rw [ZMod.val_eq_ite_mod_two]\n split <;> norm_num\n have : \u2211 i, ((x i).val : \u211a) ^ 2 = (hammingNorm x : \u211a) := by\n simp only [hval, Finset.sum_boole, hammingNorm]\n rw [this]\n norm_num\n\n/-- **Quadratic isotropy of a binary code is double evenness of its Hamming weights.** -/\n-- Not a `simp` lemma: `FiniteQuadraticModule.isIsotropic_coordinatePower_iff` already simplifies\n-- the left-hand side, so the `simpNF` linter rejects this declaration as a simp lemma.\ntheorem isIsotropic_coordinatePower_zmodStandard_two_iff (C : AdditiveCode (ZMod 2) \u03b9) :\n ((FiniteQuadraticModule.zmodStandard 2 even_two).coordinatePower \u03b9).IsIsotropic C \u2194\n \u2200 x \u2208 C, 4 \u2223 hammingNorm x := by\n rw [isIsotropic_coordinatePower_zmodStandard_quadratic_iff]\n refine forall\u2082_congr fun x _ \u21a6 ?_\n have hval : \u2200 a : ZMod 2, a.val ^ 2 = if a \u2260 0 then 1 else 0 := by\n intro a\n rw [ZMod.val_eq_ite_mod_two]\n split <;> norm_num\n simp only [hval, Finset.sum_boole, hammingNorm]\n norm_num\n\n/-- A binary linear code is quadratically isotropic in the standard coordinate discriminant\nmodule exactly when it is doubly even. -/\n-- Not a `simp` lemma: `FiniteQuadraticModule.isIsotropic_coordinatePower_iff` already simplifies\n-- the left-hand side, so the `simpNF` linter rejects this declaration as a simp lemma.\ntheorem isIsotropic_coordinatePower_zmodStandard_two_iff_isDoublyEven\n (C : LinearCode (ZMod 2) \u03b9) :\n ((FiniteQuadraticModule.zmodStandard 2 even_two).coordinatePower \u03b9).IsIsotropic\n C.toAddSubgroup \u2194 BinaryCode.IsDoublyEven C := by\n simp only [isIsotropic_coordinatePower_zmodStandard_two_iff, BinaryCode.isDoublyEven_iff,\n Submodule.mem_toAddSubgroup]\n\nend TauCeti\n", "public_theorems": ["TauCeti.coordinatePower_zmodStandard_pairing", "TauCeti.coordinatePower_zmodStandard_pairing_intCast", "TauCeti.coordinatePower_zmodStandard_pairing_eq_zero_iff", "TauCeti.mem_orthogonalComplement_coordinatePower_zmodStandard_iff", "TauCeti.orthogonalComplement_coordinatePower_zmodStandard", "TauCeti.isIsotropic_coordinatePower_zmodStandard_iff", "TauCeti.isIsotropic_coordinatePower_zmodStandard_iff_le_euclideanDual", "TauCeti.isLagrangian_coordinatePower_zmodStandard_iff", "TauCeti.coordinatePower_zmodStandard_quadratic", "TauCeti.coordinatePower_zmodStandard_quadratic_intCast", "TauCeti.coordinatePower_zmodStandard_quadratic_intCast_eq_zero_iff", "TauCeti.isIsotropic_coordinatePower_zmodStandard_quadratic_intCast_iff", "TauCeti.isIsotropic_coordinatePower_zmodStandard_quadratic_iff", "TauCeti.isIsotropic_coordinatePower_zmodStandard_quadratic_iff_euclideanWeight", "TauCeti.coordinatePower_zmodStandard_two_quadratic", "TauCeti.isIsotropic_coordinatePower_zmodStandard_two_iff", "TauCeti.isIsotropic_coordinatePower_zmodStandard_two_iff_isDoublyEven"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Data.ZMod.Two\npublic import TauCeti.InformationTheory.Coding.Binary.Basic\npublic import TauCeti.InformationTheory.Coding.Weight.Euclidean\npublic import TauCeti.LinearAlgebra.FiniteBilinearModule.CoordinatePower\npublic import TauCeti.LinearAlgebra.FiniteBilinearModule.ZMod.Standard\n\nimport Mathlib.Algebra.BigOperators.Field\n\n/-!\n# Codes over `\u2124/m` as subgroups of a discriminant module\n\nWords over `\u2124/m` are elements of the coordinate power of the standard alphabet\n`TauCeti.FiniteBilinearModule.zmodStandard`, whose pairing is `xy / m`. Summing that pairing\nover the coordinates gives\n\n```text\nb(x, y) = (x \u2b1d\u1d65 y) / m,\n```\n\nso an additive code and the codes orthogonal to it for the `\u2124/m` dot product are literally a\nsubgroup of a finite bilinear module and its orthogonal complement. In particular a code is\nself-orthogonal exactly when it is isotropic, and self-dual exactly when it is Lagrangian.\n\nWhen `m` is even the coordinate power of the quadratic alphabet adds the value\n\n```text\nq(x) = (\u2211 i, lift (x\u1d62)\u00b2) / (2m),\n```\n\nindependent of the chosen integer lifts because each coordinate value is. At `m = 2` each\ncanonical representative is `0` or `1`, hence equals its square, so `q(x)` is a quarter of the\nHamming weight and quadratic isotropy of a binary code is exactly double evenness. These are the\nidentifications through which a code becomes an isotropic subgroup of the discriminant module of\na lattice.\n\n## Main declarations\n\n* `TauCeti.coordinatePower_zmodStandard_pairing` and\n `TauCeti.coordinatePower_zmodStandard_pairing_intCast`: the coordinate pairing over `\u2124/m` is\n the dot product divided by `m`, including for arbitrary integer lifts.\n* `TauCeti.orthogonalComplement_coordinatePower_zmodStandard`: the orthogonal complement of a\n code is its Euclidean dual.\n* `TauCeti.isIsotropic_coordinatePower_zmodStandard_iff_le_euclideanDual` and\n `TauCeti.isLagrangian_coordinatePower_zmodStandard_iff`: isotropy is self-orthogonality and\n the Lagrangian condition is self-duality.\n* `TauCeti.coordinatePower_zmodStandard_quadratic`: the coordinate quadratic value over an even\n `\u2124/m` is the sum of the squares of the coordinate lifts divided by `2m`.\n* `TauCeti.coordinatePower_zmodStandard_quadratic_intCast_eq_zero_iff` and\n `TauCeti.isIsotropic_coordinatePower_zmodStandard_quadratic_intCast_iff`: the same values and\n isotropy read off any coordinatewise integer lift.\n* `TauCeti.isIsotropic_coordinatePower_zmodStandard_quadratic_iff`: quadratic isotropy over an\n even `\u2124/m` is divisibility of the sum of squared canonical representatives by `2m`.\n* `TauCeti.isIsotropic_coordinatePower_zmodStandard_quadratic_iff_euclideanWeight`: equivalently,\n divisibility of every Euclidean weight by `2m`.\n* `TauCeti.isIsotropic_coordinatePower_zmodStandard_two_iff_isDoublyEven`: over `\u2124/2` quadratic\n isotropy is double evenness.\n\n## References\n\n* W. Ebeling, *Lattices and Codes*, \u00a7\u00a71.2\u20131.3, for binary codes, their weights, and the\n quadratic form `wt / 4` modulo `\u2124`.\n* J. H. Conway and N. J. A. Sloane, *Sphere Packings, Lattices and Groups*, Chapter 4, \u00a73 and\n Chapter 7, \u00a7\u00a78\u20139, for codes as glue groups in discriminant coordinates.\n-/\n\npublic section\n\nnamespace TauCeti\n\nopen Matrix\n\nvariable {\u03b9 : Type*} [Fintype \u03b9] (m : \u2115) [NeZero m]\n\n/-! ## The bilinear coordinate power -/", "/-- The pairing of two words over `\u2124/m` is their dot product, divided by `m`. -/\ntheorem coordinatePower_zmodStandard_pairing (x y : \u03b9 \u2192 ZMod m) :\n ((FiniteBilinearModule.zmodStandard m).coordinatePower \u03b9).pairing x y =\n ZMod.toRatAddCircle m (x \u2b1d\u1d65 y) :=", "/-- The pairing of two words over `\u2124/m`, computed using arbitrary coordinatewise integer lifts. -/\ntheorem coordinatePower_zmodStandard_pairing_intCast (a b : \u03b9 \u2192 \u2124) :\n ((FiniteBilinearModule.zmodStandard m).coordinatePower \u03b9).pairing\n (fun i \u21a6 (a i : ZMod m)) (fun i \u21a6 (b i : ZMod m)) =\n (((\u2211 i, (a i : \u211a) * (b i : \u211a)) / m : \u211a) : AddCircle (1 : \u211a)) :=", "/-- Two words over `\u2124/m` are orthogonal for the coordinate pairing exactly when their dot\nproduct vanishes. -/\n-- Not a `simp` lemma: the coordinate power and the alphabet are both reducible, so `simp` takes\n-- the left-hand side apart into the summed coordinate pairings before this could fire.\ntheorem coordinatePower_zmodStandard_pairing_eq_zero_iff (x y : \u03b9 \u2192 ZMod m) :\n ((FiniteBilinearModule.zmodStandard m).coordinatePower \u03b9).pairing x y = 0 \u2194 x \u2b1d\u1d65 y = 0 :=", "/-- The orthogonal complement of an additive code over `\u2124/m` consists of the words with zero dot\nproduct against every codeword. -/\ntheorem mem_orthogonalComplement_coordinatePower_zmodStandard_iff (C : AdditiveCode (ZMod m) \u03b9)\n (x : \u03b9 \u2192 ZMod m) :\n x \u2208 ((FiniteBilinearModule.zmodStandard m).coordinatePower \u03b9).orthogonalComplement C \u2194\n \u2200 y \u2208 C, x \u2b1d\u1d65 y = 0 :=", "/-- **The orthogonal complement of an additive code over `\u2124/m` is its Euclidean dual.** -/\n@[simp]\ntheorem orthogonalComplement_coordinatePower_zmodStandard (C : AdditiveCode (ZMod m) \u03b9) :\n ((FiniteBilinearModule.zmodStandard m).coordinatePower \u03b9).orthogonalComplement C =\n (AddSubgroup.toZModSubmodule m C).euclideanDual.toAddSubgroup :=", "/-- An additive code over `\u2124/m` is isotropic exactly when any two of its words are\northogonal. -/\ntheorem isIsotropic_coordinatePower_zmodStandard_iff (C : AdditiveCode (ZMod m) \u03b9) :\n ((FiniteBilinearModule.zmodStandard m).coordinatePower \u03b9).IsIsotropic C \u2194\n \u2200 x \u2208 C, \u2200 y \u2208 C, x \u2b1d\u1d65 y = 0 :=", "/-- **Isotropy of a code over `\u2124/m` is self-orthogonality.** -/\n@[simp]\ntheorem isIsotropic_coordinatePower_zmodStandard_iff_le_euclideanDual\n (C : AdditiveCode (ZMod m) \u03b9) :\n ((FiniteBilinearModule.zmodStandard m).coordinatePower \u03b9).IsIsotropic C \u2194\n AddSubgroup.toZModSubmodule m C \u2264 (AddSubgroup.toZModSubmodule m C).euclideanDual :=", "/-- **The Lagrangian condition for a code over `\u2124/m` is self-duality.** -/\n@[simp]\ntheorem isLagrangian_coordinatePower_zmodStandard_iff (C : AdditiveCode (ZMod m) \u03b9) :\n ((FiniteBilinearModule.zmodStandard m).coordinatePower \u03b9).IsLagrangian C \u2194\n AddSubgroup.toZModSubmodule m C = (AddSubgroup.toZModSubmodule m C).euclideanDual :=", "/-! ## The quadratic coordinate power for an even modulus -/\n\nvariable (hm : Even m)", "/-- The quadratic value of a word over an even `\u2124/m` is the sum of the squares of its coordinate\nrepresentatives, divided by `2m`. -/\ntheorem coordinatePower_zmodStandard_quadratic (x : \u03b9 \u2192 ZMod m) :\n ((FiniteQuadraticModule.zmodStandard m hm).coordinatePower \u03b9).quadratic x =\n (((\u2211 i, ((x i).val : \u211a) ^ 2) / (2 * m) : \u211a) : AddCircle (1 : \u211a)) :=", "/-- The quadratic value of a word over an even `\u2124/m` is computed by any coordinatewise integer\nlift: the sum of the squares of the lifts, divided by `2m`. -/\ntheorem coordinatePower_zmodStandard_quadratic_intCast (z : \u03b9 \u2192 \u2124) :\n ((FiniteQuadraticModule.zmodStandard m hm).coordinatePower \u03b9).quadratic\n (fun i \u21a6 ((z i : ZMod m))) =\n (((\u2211 i, (z i : \u211a) ^ 2) / (2 * m) : \u211a) : AddCircle (1 : \u211a)) :=", "/-- The quadratic value of a word over an even `\u2124/m` vanishes exactly when `2m` divides the sum\nof the squares of a coordinatewise integer lift. -/\ntheorem coordinatePower_zmodStandard_quadratic_intCast_eq_zero_iff (z : \u03b9 \u2192 \u2124) :\n ((FiniteQuadraticModule.zmodStandard m hm).coordinatePower \u03b9).quadratic\n (fun i \u21a6 ((z i : ZMod m))) = 0 \u2194 (2 * m : \u2124) \u2223 \u2211 i, z i ^ 2 :=", "/-- Quadratic isotropy of an additive code over an even `\u2124/m` means that `2m` divides the sum of\nthe squares of every coordinatewise integer lift of a codeword. -/\ntheorem isIsotropic_coordinatePower_zmodStandard_quadratic_intCast_iff\n (C : AdditiveCode (ZMod m) \u03b9) :\n ((FiniteQuadraticModule.zmodStandard m hm).coordinatePower \u03b9).IsIsotropic C \u2194\n \u2200 z : \u03b9 \u2192 \u2124, (fun i \u21a6 ((z i : ZMod m))) \u2208 C \u2192 (2 * m : \u2124) \u2223 \u2211 i, z i ^ 2 :=", "/-- Quadratic isotropy of an additive code over an even `\u2124/m` means that the sum of the squares\nof the canonical representatives of every codeword is divisible by `2m`. -/\ntheorem isIsotropic_coordinatePower_zmodStandard_quadratic_iff\n (C : AdditiveCode (ZMod m) \u03b9) :\n ((FiniteQuadraticModule.zmodStandard m hm).coordinatePower \u03b9).IsIsotropic C \u2194\n \u2200 x \u2208 C, 2 * m \u2223 \u2211 i, (x i).val ^ 2 :=", "/-- Quadratic isotropy of an additive code over an even `\u2124/m` means that every codeword has\nEuclidean weight divisible by `2m`. -/\ntheorem isIsotropic_coordinatePower_zmodStandard_quadratic_iff_euclideanWeight\n (C : AdditiveCode (ZMod m) \u03b9) :\n ((FiniteQuadraticModule.zmodStandard m hm).coordinatePower \u03b9).IsIsotropic C \u2194\n \u2200 x \u2208 C, 2 * m \u2223 euclideanWeight x :=", "/-- The quadratic value of a binary word is a quarter of its Hamming weight. -/\ntheorem coordinatePower_zmodStandard_two_quadratic (x : \u03b9 \u2192 ZMod 2) :\n ((FiniteQuadraticModule.zmodStandard 2 even_two).coordinatePower \u03b9).quadratic x =\n (((hammingNorm x : \u211a) / 4 : \u211a) : AddCircle (1 : \u211a)) :=", "/-- **Quadratic isotropy of a binary code is double evenness of its Hamming weights.** -/\n-- Not a `simp` lemma: `FiniteQuadraticModule.isIsotropic_coordinatePower_iff` already simplifies\n-- the left-hand side, so the `simpNF` linter rejects this declaration as a simp lemma.\ntheorem isIsotropic_coordinatePower_zmodStandard_two_iff (C : AdditiveCode (ZMod 2) \u03b9) :\n ((FiniteQuadraticModule.zmodStandard 2 even_two).coordinatePower \u03b9).IsIsotropic C \u2194\n \u2200 x \u2208 C, 4 \u2223 hammingNorm x :=", "/-- A binary linear code is quadratically isotropic in the standard coordinate discriminant\nmodule exactly when it is doubly even. -/\n-- Not a `simp` lemma: `FiniteQuadraticModule.isIsotropic_coordinatePower_iff` already simplifies\n-- the left-hand side, so the `simpNF` linter rejects this declaration as a simp lemma.\ntheorem isIsotropic_coordinatePower_zmodStandard_two_iff_isDoublyEven\n (C : LinearCode (ZMod 2) \u03b9) :\n ((FiniteQuadraticModule.zmodStandard 2 even_two).coordinatePower \u03b9).IsIsotropic\n C.toAddSubgroup \u2194 BinaryCode.IsDoublyEven C :=", "end TauCeti"], "free_length": 4593, "file_length": 8861, "heartbeats": 6817, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.RepresentationTheory.ClassicalGroups.TensorPower.Basic", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/RepresentationTheory/ClassicalGroups/TensorPower/Basic.lean", "module": "TauCeti.RepresentationTheory.ClassicalGroups.TensorPower.Basic", "file": "/-\nCopyright (c) 2026 Tau Ceti. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.GroupTheory.NoncommCoprod\npublic import Mathlib.RepresentationTheory.Intertwining\npublic import TauCeti.LinearAlgebra.PiTensorProduct.GeneralLinear\npublic import TauCeti.RepresentationTheory.AsAlgebraHom\npublic import TauCeti.RepresentationTheory.ClassicalGroups.Standard\npublic import TauCeti.RepresentationTheory.Symmetric.TensorAction.Basic\npublic import TauCeti.RepresentationTheory.Tensor.Power\n\n/-!\n# Tensor powers of the standard representation\n\nThis file specializes the diagonal tensor-power construction to the standard representation of\nthe general linear group. It supplies the tensor powers that underpin the Weyl construction for\npolynomial representations, together with the description of their monoid-algebra image over an\ninfinite field.\n\n## Main results\n\n* `TauCeti.tensorPowerRep` is the `d`-fold tensor power of `stdRep`.\n* `TauCeti.tensorPowerFDRep` is its bundled finite-dimensional form.\n* `TauCeti.commute_permTensorAction_tensorPowerRep` proves that the general-linear and\n symmetric-group actions commute, and `TauCeti.commute_permTensorActionAlgHom_tensorPowerRep`\n extends that to the whole group algebra `k[S_d]`, pointwise\n `TauCeti.tensorPowerRep_asAlgebraHom_permTensorAction_apply`.\n* `TauCeti.permTensorPowerRep` combines the two commuting actions into one representation of\n `S_d \u00d7 GL n k`, and `TauCeti.range_asAlgebraHom_permTensorAction_le_comap` says that the image of\n any element of `k[S_d]`, such as a Young symmetrizer, is a `GL n k`-subrepresentation.\n* `TauCeti.trace_permTensorAction_conj_mul_tensorPowerRep`: for any `g \u2208 GL n k`, the trace of a\n permutation of the tensor factors composed with `g^{\u2297d}` is a class function of the permutation.\n* `TauCeti.tensorPowerPermIntertwiningMap` packages `g^{\u2297d}` as an intertwining map of the\n symmetric-group action, and `TauCeti.tensorPowerIntertwiningRep` is the resulting action of\n `GL n k` on the `S_d`-intertwining maps into the tensor power, by composition.\n* `TauCeti.toSubmodule_range_tensorPowerRep_asAlgebraHom_eq_span_range_map_const` identifies the\n image of `k[GL\u2099]` with the span of all diagonal tensor operators over an infinite field.\n-/\n\npublic section\n\nopen Matrix\nopen scoped TensorProduct\n\nopen PiTensorProduct\n\nuniverse u\n\nnamespace TauCeti\n\nvariable (k : Type u) (n d : \u2115)\n\nsection CommRing\n\nvariable [CommRing k]\n\n/-- The diagonal action of `GL n k` on the `d`-fold tensor power of its standard representation. -/\nnoncomputable abbrev tensorPowerRep :\n Representation k (GL (Fin n) k) (\u2a02[k]^d (Fin n \u2192 k)) :=\n (stdRep k n).tensorPower d\n\n/-- The tensor power of the standard representation, bundled as an object of `FDRep`. -/\nnoncomputable abbrev tensorPowerFDRep : FDRep k (GL (Fin n) k) :=\n FDRep.of (tensorPowerRep k n d)\n\n/-- The actions of `GL n k` and the symmetric group on the tensor power commute.\n\nThis is the commuting-actions half of Schur--Weyl duality; it makes no double-centralizer claim. -/\ntheorem commute_permTensorAction_tensorPowerRep (\u03c3 : Equiv.Perm (Fin d)) (g : GL (Fin n) k) :\n Commute (permTensorAction k n d \u03c3) (tensorPowerRep k n d g) := by\n rw [tensorPowerRep, Representation.tensorPower_apply, permTensorAction_def]\n exact PiTensorProduct.commute_reindexRepresentation_map k (Fin n \u2192 k) (Fin d) \u03c3 (stdRep k n g)\n\nvariable {k n d} in\n/-- **The trace of a permutation of the tensor factors composed with `g^{\u2297d}` is a class function\nof the permutation**, because the two actions commute. -/\ntheorem trace_permTensorAction_conj_mul_tensorPowerRep (\u03c3 \u03c4 : Equiv.Perm (Fin d))\n (g : GL (Fin n) k) :\n LinearMap.trace k _ (permTensorAction k n d (\u03c4 * \u03c3 * \u03c4\u207b\u00b9) * tensorPowerRep k n d g) =\n LinearMap.trace k _ (permTensorAction k n d \u03c3 * tensorPowerRep k n d g) := by\n set P := permTensorAction k n d\n set G := tensorPowerRep k n d g\n have hc : P \u03c4\u207b\u00b9 * G = G * P \u03c4\u207b\u00b9 := (commute_permTensorAction_tensorPowerRep k n d \u03c4\u207b\u00b9 g).eq\n have hinv : P \u03c4\u207b\u00b9 * P \u03c4 = 1 := by rw [\u2190 map_mul P, inv_mul_cancel, map_one]\n calc LinearMap.trace k _ (P (\u03c4 * \u03c3 * \u03c4\u207b\u00b9) * G)\n _ = LinearMap.trace k _ (P \u03c4 * (P \u03c3 * G * P \u03c4\u207b\u00b9)) := by\n rw [map_mul P, map_mul P, mul_assoc, hc]\n simp only [mul_assoc]\n _ = LinearMap.trace k _ (P \u03c3 * G * (P \u03c4\u207b\u00b9 * P \u03c4)) := by\n rw [LinearMap.trace_mul_comm, mul_assoc]\n _ = LinearMap.trace k _ (P \u03c3 * G) := by rw [hinv, mul_one]\n\n/-- The whole group algebra `k[S_d]` commutes with the general-linear action on the tensor power,\nso a Young symmetrizer cuts out a `GL n k`-subrepresentation. -/\ntheorem commute_permTensorActionAlgHom_tensorPowerRep\n (a : MonoidAlgebra k (Equiv.Perm (Fin d))) (g : GL (Fin n) k) :\n Commute (permTensorActionAlgHom k n d a) (tensorPowerRep k n d g) := by\n rw [tensorPowerRep, Representation.tensorPower_apply, permTensorActionAlgHom_def,\n permTensorAction_def]\n exact PiTensorProduct.commute_reindexRepresentation_asAlgebraHom_map k (Fin n \u2192 k) (Fin d) a\n (stdRep k n g)\n\n/-- The general-linear action commutes pointwise with every permutation of the tensor factors. -/\ntheorem tensorPowerRep_permTensorAction_apply (\u03c3 : Equiv.Perm (Fin d)) (g : GL (Fin n) k)\n (v : \u2a02[k]^d (Fin n \u2192 k)) :\n tensorPowerRep k n d g (permTensorAction k n d \u03c3 v) =\n permTensorAction k n d \u03c3 (tensorPowerRep k n d g v) :=\n (LinearMap.congr_fun (commute_permTensorAction_tensorPowerRep k n d \u03c3 g).eq v).symm\n\n/-- The general-linear action commutes pointwise with every element of `k[S_d]`. -/\ntheorem tensorPowerRep_asAlgebraHom_permTensorAction_apply\n (a : MonoidAlgebra k (Equiv.Perm (Fin d))) (g : GL (Fin n) k) (v : \u2a02[k]^d (Fin n \u2192 k)) :\n tensorPowerRep k n d g ((permTensorAction k n d).asAlgebraHom a v) =\n (permTensorAction k n d).asAlgebraHom a (tensorPowerRep k n d g v) := by\n have h := commute_permTensorActionAlgHom_tensorPowerRep k n d a g\n rw [permTensorActionAlgHom_def] at h\n exact (LinearMap.congr_fun h.eq v).symm\n\n/-- **The image of an element of `k[S_d]` in `(k\u207f)^{\u2297d}` is stable under `GL n k`**, because the\ntwo actions commute. In particular a Young symmetrizer cuts out a subrepresentation. -/\ntheorem range_asAlgebraHom_permTensorAction_le_comap (a : MonoidAlgebra k (Equiv.Perm (Fin d)))\n (g : GL (Fin n) k) :\n LinearMap.range ((permTensorAction k n d).asAlgebraHom a) \u2264\n (LinearMap.range ((permTensorAction k n d).asAlgebraHom a)).comap\n (tensorPowerRep k n d g) := by\n rintro _ \u27e8x, rfl\u27e9\n exact \u27e8tensorPowerRep k n d g x,\n (tensorPowerRep_asAlgebraHom_permTensorAction_apply k n d a g x).symm\u27e9\n\n/-- **The joint action of `S_d \u00d7 GL n k` on `(k\u207f)^{\u2297d}`**: a pair `(\u03c3, g)` acts by permuting the\ntensor factors by `\u03c3` after applying `g` in every factor. It is a representation of the product\ngroup because the two actions commute. -/\nnoncomputable def permTensorPowerRep :\n Representation k (Equiv.Perm (Fin d) \u00d7 GL (Fin n) k) (\u2a02[k]^d (Fin n \u2192 k)) :=\n (permTensorAction k n d).noncommCoprod (tensorPowerRep k n d)\n (commute_permTensorAction_tensorPowerRep k n d)\n\n/-- The pair `(\u03c3, g)` acts on `(k\u207f)^{\u2297d}` as `\u03c3 \u2218 g^{\u2297d}`. -/\n@[simp]\ntheorem permTensorPowerRep_apply (\u03c3 : Equiv.Perm (Fin d)) (g : GL (Fin n) k) :\n permTensorPowerRep k n d (\u03c3, g) = permTensorAction k n d \u03c3 * tensorPowerRep k n d g :=\n (rfl)\n\n/-- The operator `g^{\u2297d}` on `(k\u207f)^{\u2297d}` as an intertwining map of the symmetric-group action:\nthe diagonal action of `GL n k` commutes with permuting the tensor factors. -/\nnoncomputable def tensorPowerPermIntertwiningMap (g : GL (Fin n) k) :\n Representation.IntertwiningMap (permTensorAction k n d) (permTensorAction k n d) where\n toLinearMap := tensorPowerRep k n d g\n isIntertwining' \u03c3 := (commute_permTensorAction_tensorPowerRep k n d \u03c3 g).eq.symm\n\n@[simp]\ntheorem tensorPowerPermIntertwiningMap_apply (g : GL (Fin n) k) (x : \u2a02[k]^d (Fin n \u2192 k)) :\n tensorPowerPermIntertwiningMap k n d g x = tensorPowerRep k n d g x :=\n (rfl)\n\nvariable {k n d} in\n/-- The representation of `GL n k` on the `S_d`-intertwining maps from `\u03c1` into `(k\u207f)^{\u2297d}`, by\ncomposition with `g^{\u2297d}`. In a split semisimple setting, when `\u03c1` is irreducible, this is the\nmultiplicity space of `\u03c1` in the tensor power, with its residual action of the general linear\ngroup. -/\nnoncomputable def tensorPowerIntertwiningRep {W : Type*} [AddCommGroup W] [Module k W]\n (\u03c1 : Representation k (Equiv.Perm (Fin d)) W) :\n Representation k (GL (Fin n) k)\n (Representation.IntertwiningMap \u03c1 (permTensorAction k n d)) where\n toFun g := Representation.IntertwiningMap.llcomp \u03c1 _ _ (tensorPowerPermIntertwiningMap k n d g)\n map_one' := by\n ext f x\n simp only [\u2190 Representation.IntertwiningMap.comp_def,\n Representation.IntertwiningMap.toLinearMap_apply, Representation.IntertwiningMap.comp_apply,\n tensorPowerPermIntertwiningMap_apply, map_one, one_apply_eq_self]\n map_mul' g h := by\n ext f x\n simp only [\u2190 Representation.IntertwiningMap.comp_def,\n Representation.IntertwiningMap.toLinearMap_apply, Representation.IntertwiningMap.comp_apply,\n tensorPowerPermIntertwiningMap_apply, map_mul, mul_apply_eq_comp]\n\nvariable {k n d} in\n@[simp]\ntheorem tensorPowerIntertwiningRep_apply_apply {W : Type*} [AddCommGroup W] [Module k W]\n (\u03c1 : Representation k (Equiv.Perm (Fin d)) W) (g : GL (Fin n) k)\n (f : Representation.IntertwiningMap \u03c1 (permTensorAction k n d)) (w : W) :\n tensorPowerIntertwiningRep \u03c1 g f w = tensorPowerRep k n d g (f w) :=\n (rfl)\n\nend CommRing\n\nsection InfiniteField\n\nvariable [Field k] [Infinite k]\n\n/-- **The general linear group spans the same operators on `(k\u207f)^{\u2297d}` as the whole endomorphism\nalgebra of `k\u207f`**: the span of the diagonal operators `g^{\u2297d}` for `g` invertible is the span of all\nthe diagonal operators `f^{\u2297d}`. This is the Zariski density of the invertible endomorphisms of\n`k\u207f`, and it needs the field to be infinite. -/\ntheorem span_range_tensorPowerRep_eq_span_range_map_const :\n Submodule.span k (Set.range (tensorPowerRep k n d)) =\n Submodule.span k (Set.range fun f : (Fin n \u2192 k) \u2192\u2097[k] (Fin n \u2192 k) =>\n PiTensorProduct.map fun _ : Fin d => f) := by\n have hrange : Set.range (tensorPowerRep k n d) =\n Set.range fun u : ((Fin n \u2192 k) \u2192\u2097[k] Fin n \u2192 k)\u02e3 =>\n PiTensorProduct.map fun _ : Fin d => (u : (Fin n \u2192 k) \u2192\u2097[k] Fin n \u2192 k) := by\n ext x\n constructor\n \u00b7 rintro \u27e8g, rfl\u27e9\n refine \u27e8Matrix.GeneralLinearGroup.toLin g, ?_\u27e9\n rw [tensorPowerRep, Representation.tensorPower_apply, stdRep_apply]\n simp [Matrix.GeneralLinearGroup.coe_toLin]\n \u00b7 rintro \u27e8u, rfl\u27e9\n obtain \u27e8g, rfl\u27e9 := Matrix.GeneralLinearGroup.toLin.surjective u\n refine \u27e8g, ?_\u27e9\n rw [tensorPowerRep, Representation.tensorPower_apply, stdRep_apply]\n simp [Matrix.GeneralLinearGroup.coe_toLin]\n rw [hrange, PiTensorProduct.span_range_map_const_units_eq_span_range_map_const]\n\n/-- **The image of the monoid algebra `k[GL\u2099]` in `End ((k\u207f)^{\u2297d})` is the span of all the\ndiagonal operators `f^{\u2297d}`**, with `f` ranging over every endomorphism of `k\u207f` and not only the\ninvertible ones. -/\ntheorem toSubmodule_range_tensorPowerRep_asAlgebraHom_eq_span_range_map_const :\n Subalgebra.toSubmodule (tensorPowerRep k n d).asAlgebraHom.range =\n Submodule.span k (Set.range fun f : (Fin n \u2192 k) \u2192\u2097[k] (Fin n \u2192 k) =>\n PiTensorProduct.map fun _ : Fin d => f) := by\n rw [Representation.toSubmodule_range_asAlgebraHom,\n span_range_tensorPowerRep_eq_span_range_map_const]\n\nend InfiniteField\n\nsection Field\n\nvariable [Field k]\n\n/-- The character of the tensor power is the corresponding power of the standard character.\n\nThis is intentionally not a simp lemma: `Representation.char_tensorPower` and `char_stdRep`\nalready normalize its left-hand side, so registering this specialization would violate `simpNF`. -/\ntheorem char_tensorPowerRep (g : GL (Fin n) k) : (tensorPowerRep k n d).character g =\n Matrix.trace (g : Matrix (Fin n) (Fin n) k) ^ d := by\n rw [Representation.char_tensorPower, char_stdRep]\n\n/-- The character of the bundled tensor power is the corresponding power of the matrix trace. -/\n@[simp]\ntheorem char_tensorPowerFDRep (g : GL (Fin n) k) : (tensorPowerFDRep k n d).character g =\n Matrix.trace (g : Matrix (Fin n) (Fin n) k) ^ d := by\n simpa only [FDRep.character, FDRep.of_\u03c1', Representation.character] using\n char_tensorPowerRep k n d g\n\nend Field\n\nend TauCeti\n", "public_theorems": ["TauCeti.commute_permTensorAction_tensorPowerRep", "TauCeti.trace_permTensorAction_conj_mul_tensorPowerRep", "TauCeti.commute_permTensorActionAlgHom_tensorPowerRep", "TauCeti.tensorPowerRep_permTensorAction_apply", "TauCeti.tensorPowerRep_asAlgebraHom_permTensorAction_apply", "TauCeti.range_asAlgebraHom_permTensorAction_le_comap", "TauCeti.permTensorPowerRep_apply", "TauCeti.tensorPowerPermIntertwiningMap_apply", "TauCeti.tensorPowerIntertwiningRep_apply_apply", "TauCeti.span_range_tensorPowerRep_eq_span_range_map_const", "TauCeti.toSubmodule_range_tensorPowerRep_asAlgebraHom_eq_span_range_map_const", "TauCeti.char_tensorPowerRep", "TauCeti.char_tensorPowerFDRep"], "frozen": ["/-\nCopyright (c) 2026 Tau Ceti. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.GroupTheory.NoncommCoprod\npublic import Mathlib.RepresentationTheory.Intertwining\npublic import TauCeti.LinearAlgebra.PiTensorProduct.GeneralLinear\npublic import TauCeti.RepresentationTheory.AsAlgebraHom\npublic import TauCeti.RepresentationTheory.ClassicalGroups.Standard\npublic import TauCeti.RepresentationTheory.Symmetric.TensorAction.Basic\npublic import TauCeti.RepresentationTheory.Tensor.Power\n\n/-!\n# Tensor powers of the standard representation\n\nThis file specializes the diagonal tensor-power construction to the standard representation of\nthe general linear group. It supplies the tensor powers that underpin the Weyl construction for\npolynomial representations, together with the description of their monoid-algebra image over an\ninfinite field.\n\n## Main results\n\n* `TauCeti.tensorPowerRep` is the `d`-fold tensor power of `stdRep`.\n* `TauCeti.tensorPowerFDRep` is its bundled finite-dimensional form.\n* `TauCeti.commute_permTensorAction_tensorPowerRep` proves that the general-linear and\n symmetric-group actions commute, and `TauCeti.commute_permTensorActionAlgHom_tensorPowerRep`\n extends that to the whole group algebra `k[S_d]`, pointwise\n `TauCeti.tensorPowerRep_asAlgebraHom_permTensorAction_apply`.\n* `TauCeti.permTensorPowerRep` combines the two commuting actions into one representation of\n `S_d \u00d7 GL n k`, and `TauCeti.range_asAlgebraHom_permTensorAction_le_comap` says that the image of\n any element of `k[S_d]`, such as a Young symmetrizer, is a `GL n k`-subrepresentation.\n* `TauCeti.trace_permTensorAction_conj_mul_tensorPowerRep`: for any `g \u2208 GL n k`, the trace of a\n permutation of the tensor factors composed with `g^{\u2297d}` is a class function of the permutation.\n* `TauCeti.tensorPowerPermIntertwiningMap` packages `g^{\u2297d}` as an intertwining map of the\n symmetric-group action, and `TauCeti.tensorPowerIntertwiningRep` is the resulting action of\n `GL n k` on the `S_d`-intertwining maps into the tensor power, by composition.\n* `TauCeti.toSubmodule_range_tensorPowerRep_asAlgebraHom_eq_span_range_map_const` identifies the\n image of `k[GL\u2099]` with the span of all diagonal tensor operators over an infinite field.\n-/\n\npublic section\n\nopen Matrix\nopen scoped TensorProduct\n\nopen PiTensorProduct\n\nuniverse u\n\nnamespace TauCeti\n\nvariable (k : Type u) (n d : \u2115)\n\nsection CommRing\n\nvariable [CommRing k]\n\n/-- The diagonal action of `GL n k` on the `d`-fold tensor power of its standard representation. -/\nnoncomputable abbrev tensorPowerRep :\n Representation k (GL (Fin n) k) (\u2a02[k]^d (Fin n \u2192 k)) :=\n (stdRep k n).tensorPower d\n\n/-- The tensor power of the standard representation, bundled as an object of `FDRep`. -/\nnoncomputable abbrev tensorPowerFDRep : FDRep k (GL (Fin n) k) :=\n FDRep.of (tensorPowerRep k n d)", "/-- The actions of `GL n k` and the symmetric group on the tensor power commute.\n\nThis is the commuting-actions half of Schur--Weyl duality; it makes no double-centralizer claim. -/\ntheorem commute_permTensorAction_tensorPowerRep (\u03c3 : Equiv.Perm (Fin d)) (g : GL (Fin n) k) :\n Commute (permTensorAction k n d \u03c3) (tensorPowerRep k n d g) :=", "variable {k n d} in", "/-- **The trace of a permutation of the tensor factors composed with `g^{\u2297d}` is a class function\nof the permutation**, because the two actions commute. -/\ntheorem trace_permTensorAction_conj_mul_tensorPowerRep (\u03c3 \u03c4 : Equiv.Perm (Fin d))\n (g : GL (Fin n) k) :\n LinearMap.trace k _ (permTensorAction k n d (\u03c4 * \u03c3 * \u03c4\u207b\u00b9) * tensorPowerRep k n d g) =\n LinearMap.trace k _ (permTensorAction k n d \u03c3 * tensorPowerRep k n d g) :=", "/-- The whole group algebra `k[S_d]` commutes with the general-linear action on the tensor power,\nso a Young symmetrizer cuts out a `GL n k`-subrepresentation. -/\ntheorem commute_permTensorActionAlgHom_tensorPowerRep\n (a : MonoidAlgebra k (Equiv.Perm (Fin d))) (g : GL (Fin n) k) :\n Commute (permTensorActionAlgHom k n d a) (tensorPowerRep k n d g) :=", "/-- The general-linear action commutes pointwise with every permutation of the tensor factors. -/\ntheorem tensorPowerRep_permTensorAction_apply (\u03c3 : Equiv.Perm (Fin d)) (g : GL (Fin n) k)\n (v : \u2a02[k]^d (Fin n \u2192 k)) :\n tensorPowerRep k n d g (permTensorAction k n d \u03c3 v) =\n permTensorAction k n d \u03c3 (tensorPowerRep k n d g v) :=", "/-- The general-linear action commutes pointwise with every element of `k[S_d]`. -/\ntheorem tensorPowerRep_asAlgebraHom_permTensorAction_apply\n (a : MonoidAlgebra k (Equiv.Perm (Fin d))) (g : GL (Fin n) k) (v : \u2a02[k]^d (Fin n \u2192 k)) :\n tensorPowerRep k n d g ((permTensorAction k n d).asAlgebraHom a v) =\n (permTensorAction k n d).asAlgebraHom a (tensorPowerRep k n d g v) :=", "/-- **The image of an element of `k[S_d]` in `(k\u207f)^{\u2297d}` is stable under `GL n k`**, because the\ntwo actions commute. In particular a Young symmetrizer cuts out a subrepresentation. -/\ntheorem range_asAlgebraHom_permTensorAction_le_comap (a : MonoidAlgebra k (Equiv.Perm (Fin d)))\n (g : GL (Fin n) k) :\n LinearMap.range ((permTensorAction k n d).asAlgebraHom a) \u2264\n (LinearMap.range ((permTensorAction k n d).asAlgebraHom a)).comap\n (tensorPowerRep k n d g) :=", "/-- **The joint action of `S_d \u00d7 GL n k` on `(k\u207f)^{\u2297d}`**: a pair `(\u03c3, g)` acts by permuting the\ntensor factors by `\u03c3` after applying `g` in every factor. It is a representation of the product\ngroup because the two actions commute. -/\nnoncomputable def permTensorPowerRep :\n Representation k (Equiv.Perm (Fin d) \u00d7 GL (Fin n) k) (\u2a02[k]^d (Fin n \u2192 k)) :=\n (permTensorAction k n d).noncommCoprod (tensorPowerRep k n d)\n (commute_permTensorAction_tensorPowerRep k n d)", "/-- The pair `(\u03c3, g)` acts on `(k\u207f)^{\u2297d}` as `\u03c3 \u2218 g^{\u2297d}`. -/\n@[simp]\ntheorem permTensorPowerRep_apply (\u03c3 : Equiv.Perm (Fin d)) (g : GL (Fin n) k) :\n permTensorPowerRep k n d (\u03c3, g) = permTensorAction k n d \u03c3 * tensorPowerRep k n d g :=", "/-- The operator `g^{\u2297d}` on `(k\u207f)^{\u2297d}` as an intertwining map of the symmetric-group action:\nthe diagonal action of `GL n k` commutes with permuting the tensor factors. -/\nnoncomputable def tensorPowerPermIntertwiningMap (g : GL (Fin n) k) :\n Representation.IntertwiningMap (permTensorAction k n d) (permTensorAction k n d) where\n toLinearMap := tensorPowerRep k n d g\n isIntertwining' \u03c3 := (commute_permTensorAction_tensorPowerRep k n d \u03c3 g).eq.symm", "@[simp]\ntheorem tensorPowerPermIntertwiningMap_apply (g : GL (Fin n) k) (x : \u2a02[k]^d (Fin n \u2192 k)) :\n tensorPowerPermIntertwiningMap k n d g x = tensorPowerRep k n d g x :=", "variable {k n d} in\n/-- The representation of `GL n k` on the `S_d`-intertwining maps from `\u03c1` into `(k\u207f)^{\u2297d}`, by\ncomposition with `g^{\u2297d}`. In a split semisimple setting, when `\u03c1` is irreducible, this is the\nmultiplicity space of `\u03c1` in the tensor power, with its residual action of the general linear\ngroup. -/\nnoncomputable def tensorPowerIntertwiningRep {W : Type*} [AddCommGroup W] [Module k W]\n (\u03c1 : Representation k (Equiv.Perm (Fin d)) W) :\n Representation k (GL (Fin n) k)\n (Representation.IntertwiningMap \u03c1 (permTensorAction k n d)) where\n toFun g := Representation.IntertwiningMap.llcomp \u03c1 _ _ (tensorPowerPermIntertwiningMap k n d g)\n map_one' := by\n ext f x\n simp only [\u2190 Representation.IntertwiningMap.comp_def,\n Representation.IntertwiningMap.toLinearMap_apply, Representation.IntertwiningMap.comp_apply,\n tensorPowerPermIntertwiningMap_apply, map_one, one_apply_eq_self]\n map_mul' g h := by\n ext f x\n simp only [\u2190 Representation.IntertwiningMap.comp_def,\n Representation.IntertwiningMap.toLinearMap_apply, Representation.IntertwiningMap.comp_apply,\n tensorPowerPermIntertwiningMap_apply, map_mul, mul_apply_eq_comp]\n\nvariable {k n d} in", "@[simp]\ntheorem tensorPowerIntertwiningRep_apply_apply {W : Type*} [AddCommGroup W] [Module k W]\n (\u03c1 : Representation k (Equiv.Perm (Fin d)) W) (g : GL (Fin n) k)\n (f : Representation.IntertwiningMap \u03c1 (permTensorAction k n d)) (w : W) :\n tensorPowerIntertwiningRep \u03c1 g f w = tensorPowerRep k n d g (f w) :=", "end CommRing\n\nsection InfiniteField\n\nvariable [Field k] [Infinite k]", "/-- **The general linear group spans the same operators on `(k\u207f)^{\u2297d}` as the whole endomorphism\nalgebra of `k\u207f`**: the span of the diagonal operators `g^{\u2297d}` for `g` invertible is the span of all\nthe diagonal operators `f^{\u2297d}`. This is the Zariski density of the invertible endomorphisms of\n`k\u207f`, and it needs the field to be infinite. -/\ntheorem span_range_tensorPowerRep_eq_span_range_map_const :\n Submodule.span k (Set.range (tensorPowerRep k n d)) =\n Submodule.span k (Set.range fun f : (Fin n \u2192 k) \u2192\u2097[k] (Fin n \u2192 k) =>\n PiTensorProduct.map fun _ : Fin d => f) :=", "/-- **The image of the monoid algebra `k[GL\u2099]` in `End ((k\u207f)^{\u2297d})` is the span of all the\ndiagonal operators `f^{\u2297d}`**, with `f` ranging over every endomorphism of `k\u207f` and not only the\ninvertible ones. -/\ntheorem toSubmodule_range_tensorPowerRep_asAlgebraHom_eq_span_range_map_const :\n Subalgebra.toSubmodule (tensorPowerRep k n d).asAlgebraHom.range =\n Submodule.span k (Set.range fun f : (Fin n \u2192 k) \u2192\u2097[k] (Fin n \u2192 k) =>\n PiTensorProduct.map fun _ : Fin d => f) :=", "end InfiniteField\n\nsection Field\n\nvariable [Field k]", "/-- The character of the tensor power is the corresponding power of the standard character.\n\nThis is intentionally not a simp lemma: `Representation.char_tensorPower` and `char_stdRep`\nalready normalize its left-hand side, so registering this specialization would violate `simpNF`. -/\ntheorem char_tensorPowerRep (g : GL (Fin n) k) : (tensorPowerRep k n d).character g =\n Matrix.trace (g : Matrix (Fin n) (Fin n) k) ^ d :=", "/-- The character of the bundled tensor power is the corresponding power of the matrix trace. -/\n@[simp]\ntheorem char_tensorPowerFDRep (g : GL (Fin n) k) : (tensorPowerFDRep k n d).character g =\n Matrix.trace (g : Matrix (Fin n) (Fin n) k) ^ d :=", "end Field\n\nend TauCeti"], "free_length": 2232, "file_length": 7385, "heartbeats": 8934, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Analysis.Complex.UpperHalfPlane.Poisson.Boundary.Uniqueness", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Analysis/Complex/UpperHalfPlane/Poisson/Boundary/Uniqueness.lean", "module": "TauCeti.Analysis.Complex.UpperHalfPlane.Poisson.Boundary.Uniqueness", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Analysis.Complex.UpperHalfPlane.Poisson.Boundary.Function\nimport Mathlib.Analysis.SpecialFunctions.Trigonometric.ArctanDeriv\nimport Mathlib.MeasureTheory.Function.Jacobian\nimport TauCeti.Analysis.Complex.Radial.Uniqueness\nimport TauCeti.Analysis.Complex.UpperHalfPlane.Cayley\nimport TauCeti.Analysis.Complex.UpperHalfPlane.Nontangential.Cayley\n\n/-!\n# Uniqueness for boundary functions of bounded holomorphic functions on the half-plane\n\nIf the boundary function `F*` of a bounded holomorphic function `F` on the upper half-plane `\u2102\u208a`\nvanishes on a set of positive measure, then `F` vanishes on `\u2102\u208a`\n(`TauCeti.eqOn_zero_of_upperHalfPlaneBoundaryFun_eq_zero`); more generally, if `F* = c` on a set of\npositive measure then `F = c` (`TauCeti.eqOn_const_of_upperHalfPlaneBoundaryFun_eq`).\n\nThe proof transports the F. and M. Riesz uniqueness theorem on the disc,\n`TauCeti.eqOn_const_ball_of_tendsto_circleMap`, through the Cayley transform. The inverse Cayley\ntransform `w \u21a6 i (1 + w) / (1 - w)` maps the radius of the unit disc ending at\n`\u03b6 = (x - i) / (x + i)` to an arc ending at `x`, inside every cone at `x` near `x`\n(`TauCeti.tendsto_I_mul_one_add_div_one_sub_nontangentialFilter`): along it\n`|Re z - x| = |x| (1 - r) / (1 + r) \u00b7 Im z`. So the radial limits of `F` transported to the disc\nare the nontangential limits of `F`. The point `\u03b6` is `e^{i\u03b8}` for the Cayley angle\n`\u03b8 = \u03c0 + 2 arctan x` (`TauCeti.exp_cayleyAngle_mul_I`), and `\u03b8 \u21a6 tan ((\u03b8 - \u03c0) / 2)` is\ndifferentiable on `(0, 2\u03c0)`, so these angles form a set of positive measure when the points `x` do.\n\n## References\n\n* J. B. Garnett, *Bounded Analytic Functions*, revised 1st ed., Springer (2007), Chapter II.\n* F. Riesz and M. Riesz, *\u00dcber die Randwerte einer analytischen Funktion*, Quatri\u00e8me Congr\u00e8s des\n Math\u00e9maticiens Scandinaves, Stockholm (1916), 27\u201344.\n-/\n\npublic section\n\nnoncomputable section\n\nopen Complex MeasureTheory Filter Metric Set Topology\nopen scoped Real\nopen UpperHalfPlane (upperHalfPlaneSet)\n\nnamespace TauCeti\n\n/-- **Uniqueness for boundary functions.** If `F` is holomorphic and bounded on `\u2102\u208a` and its\nboundary function `F*` equals `c` almost everywhere on a set `A` of positive measure, then `F` is\nthe constant `c` on `\u2102\u208a`. -/\ntheorem eqOn_const_of_upperHalfPlaneBoundaryFun_eq {F : \u2102 \u2192 \u2102} {S : \u211d} {A : Set \u211d} {c : \u2102}\n (hF : DifferentiableOn \u2102 F upperHalfPlaneSet) (hS : \u2200 z \u2208 upperHalfPlaneSet, \u2016F z\u2016 \u2264 S)\n (hA : volume A \u2260 0) (hFA : \u2200\u1d50 x, x \u2208 A \u2192 upperHalfPlaneBoundaryFun F x = c) :\n EqOn F (fun _ \u21a6 c) upperHalfPlaneSet := by\n -- the good boundary points of `A`\n set A' := {x \u2208 A | \u2200 \u03b1 : \u211d, Tendsto F (nontangentialFilter \u03b1 x) (\ud835\udcdd c)}\n have hA' : volume A' \u2260 0 := by\n have hgood : \u2200\u1d50 x, x \u2208 A \u2192 x \u2208 A' := by\n filter_upwards [hFA, ae_tendsto_nontangentialFilter_upperHalfPlaneBoundaryFun hF hS]\n with x hx hlim hxA\n exact \u27e8hxA, fun \u03b1 \u21a6 hx hxA \u25b8 hlim \u03b1\u27e9\n exact fun h0 \u21a6 hA (measure_mono_null_ae hgood h0)\n -- the corresponding angles\n have hE : volume (cayleyAngle '' A') \u2260 0 := by\n intro h0\n have hsub : A' \u2286 (fun t \u21a6 Real.tan ((t - \u03c0) / 2)) '' (cayleyAngle '' A') :=\n fun x hx \u21a6 \u27e8cayleyAngle x, mem_image_of_mem cayleyAngle hx, by simp [cayleyAngle_def]\u27e9\n have hdiff : DifferentiableOn \u211d (fun t \u21a6 Real.tan ((t - \u03c0) / 2)) (cayleyAngle '' A') := by\n rintro _ \u27e8y, -, rfl\u27e9\n refine (Real.differentiableAt_tan.2 ?_).comp _ (by fun_prop) |>.differentiableWithinAt\n simpa [cayleyAngle_def] using (Real.cos_arctan_pos y).ne'\n exact hA' (measure_mono_null hsub\n (addHaar_image_eq_zero_of_differentiableOn_of_addHaar_eq_zero volume hdiff h0))\n -- the transported function on the disc\n set g : \u2102 \u2192 \u2102 := fun w \u21a6 F (I * (1 + w) / (1 - w))\n have hgS : \u2200 w \u2208 ball (0 : \u2102) 1, \u2016g w\u2016 \u2264 S :=\n fun w hw \u21a6 hS _ (bijOn_I_mul_one_add_div_one_sub_ball.mapsTo hw)\n have hlim : \u2200 t \u2208 cayleyAngle '' A', Tendsto (fun r \u21a6 g (circleMap 0 r t)) (\ud835\udcdd[<] 1) (\ud835\udcdd c) := by\n rintro _ \u27e8x, hx, rfl\u27e9\n simp only [g, circleMap_zero, exp_cayleyAngle_mul_I]\n exact (hx.2 1).comp (tendsto_I_mul_one_add_div_one_sub_nontangentialFilter x one_pos)\n have hgc := eqOn_const_ball_of_tendsto_circleMap hF.comp_I_mul_one_add_div_one_sub hgS hE hlim\n intro z hz\n have hzI : z + I \u2260 0 := add_I_ne_zero_of_im_nonneg (le_of_lt hz)\n have := hgc (bijOn_sub_I_div_add_I_upperHalfPlaneSet.mapsTo hz)\n simpa [g, I_mul_one_add_sub_I_div_add_I_div_one_sub hzI] using this\n\n/-- **Uniqueness for boundary functions**, the case `c = 0`. If `F` is holomorphic and bounded on\n`\u2102\u208a` and its boundary function `F*` vanishes almost everywhere on a set of positive measure, then\n`F \u2261 0` on `\u2102\u208a`. -/\ntheorem eqOn_zero_of_upperHalfPlaneBoundaryFun_eq_zero {F : \u2102 \u2192 \u2102} {S : \u211d} {A : Set \u211d}\n (hF : DifferentiableOn \u2102 F upperHalfPlaneSet) (hS : \u2200 z \u2208 upperHalfPlaneSet, \u2016F z\u2016 \u2264 S)\n (hA : volume A \u2260 0) (hFA : \u2200\u1d50 x, x \u2208 A \u2192 upperHalfPlaneBoundaryFun F x = 0) :\n EqOn F 0 upperHalfPlaneSet :=\n eqOn_const_of_upperHalfPlaneBoundaryFun_eq hF hS hA hFA\n\n/-- The boundary function of a bounded holomorphic function that is nonzero somewhere on the\nupper half-plane is nonzero almost everywhere. -/\ntheorem ae_upperHalfPlaneBoundaryFun_ne_zero {F : \u2102 \u2192 \u2102} {S : \u211d}\n (hF : DifferentiableOn \u2102 F upperHalfPlaneSet) (hS : \u2200 z \u2208 upperHalfPlaneSet, \u2016F z\u2016 \u2264 S)\n (h\u2080 : \u2203 z \u2208 upperHalfPlaneSet, F z \u2260 0) : \u2200\u1d50 x : \u211d, upperHalfPlaneBoundaryFun F x \u2260 0 := by\n rw [ae_iff]\n by_contra h\n have he := eqOn_zero_of_upperHalfPlaneBoundaryFun_eq_zero hF hS h\n (Eventually.of_forall fun x hx \u21a6 by simpa only [mem_ofPred_eq, not_not] using hx)\n obtain \u27e8z, hz, hn\u27e9 := h\u2080\n exact hn (he hz)\n\nend TauCeti\n", "public_theorems": ["TauCeti.eqOn_const_of_upperHalfPlaneBoundaryFun_eq", "TauCeti.eqOn_zero_of_upperHalfPlaneBoundaryFun_eq_zero", "TauCeti.ae_upperHalfPlaneBoundaryFun_ne_zero"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Analysis.Complex.UpperHalfPlane.Poisson.Boundary.Function\nimport Mathlib.Analysis.SpecialFunctions.Trigonometric.ArctanDeriv\nimport Mathlib.MeasureTheory.Function.Jacobian\nimport TauCeti.Analysis.Complex.Radial.Uniqueness\nimport TauCeti.Analysis.Complex.UpperHalfPlane.Cayley\nimport TauCeti.Analysis.Complex.UpperHalfPlane.Nontangential.Cayley\n\n/-!\n# Uniqueness for boundary functions of bounded holomorphic functions on the half-plane\n\nIf the boundary function `F*` of a bounded holomorphic function `F` on the upper half-plane `\u2102\u208a`\nvanishes on a set of positive measure, then `F` vanishes on `\u2102\u208a`\n(`TauCeti.eqOn_zero_of_upperHalfPlaneBoundaryFun_eq_zero`); more generally, if `F* = c` on a set of\npositive measure then `F = c` (`TauCeti.eqOn_const_of_upperHalfPlaneBoundaryFun_eq`).\n\nThe proof transports the F. and M. Riesz uniqueness theorem on the disc,\n`TauCeti.eqOn_const_ball_of_tendsto_circleMap`, through the Cayley transform. The inverse Cayley\ntransform `w \u21a6 i (1 + w) / (1 - w)` maps the radius of the unit disc ending at\n`\u03b6 = (x - i) / (x + i)` to an arc ending at `x`, inside every cone at `x` near `x`\n(`TauCeti.tendsto_I_mul_one_add_div_one_sub_nontangentialFilter`): along it\n`|Re z - x| = |x| (1 - r) / (1 + r) \u00b7 Im z`. So the radial limits of `F` transported to the disc\nare the nontangential limits of `F`. The point `\u03b6` is `e^{i\u03b8}` for the Cayley angle\n`\u03b8 = \u03c0 + 2 arctan x` (`TauCeti.exp_cayleyAngle_mul_I`), and `\u03b8 \u21a6 tan ((\u03b8 - \u03c0) / 2)` is\ndifferentiable on `(0, 2\u03c0)`, so these angles form a set of positive measure when the points `x` do.\n\n## References\n\n* J. B. Garnett, *Bounded Analytic Functions*, revised 1st ed., Springer (2007), Chapter II.\n* F. Riesz and M. Riesz, *\u00dcber die Randwerte einer analytischen Funktion*, Quatri\u00e8me Congr\u00e8s des\n Math\u00e9maticiens Scandinaves, Stockholm (1916), 27\u201344.\n-/\n\npublic section\n\nnoncomputable section\n\nopen Complex MeasureTheory Filter Metric Set Topology\nopen scoped Real\nopen UpperHalfPlane (upperHalfPlaneSet)\n\nnamespace TauCeti", "/-- **Uniqueness for boundary functions.** If `F` is holomorphic and bounded on `\u2102\u208a` and its\nboundary function `F*` equals `c` almost everywhere on a set `A` of positive measure, then `F` is\nthe constant `c` on `\u2102\u208a`. -/\ntheorem eqOn_const_of_upperHalfPlaneBoundaryFun_eq {F : \u2102 \u2192 \u2102} {S : \u211d} {A : Set \u211d} {c : \u2102}\n (hF : DifferentiableOn \u2102 F upperHalfPlaneSet) (hS : \u2200 z \u2208 upperHalfPlaneSet, \u2016F z\u2016 \u2264 S)\n (hA : volume A \u2260 0) (hFA : \u2200\u1d50 x, x \u2208 A \u2192 upperHalfPlaneBoundaryFun F x = c) :\n EqOn F (fun _ \u21a6 c) upperHalfPlaneSet :=", "/-- **Uniqueness for boundary functions**, the case `c = 0`. If `F` is holomorphic and bounded on\n`\u2102\u208a` and its boundary function `F*` vanishes almost everywhere on a set of positive measure, then\n`F \u2261 0` on `\u2102\u208a`. -/\ntheorem eqOn_zero_of_upperHalfPlaneBoundaryFun_eq_zero {F : \u2102 \u2192 \u2102} {S : \u211d} {A : Set \u211d}\n (hF : DifferentiableOn \u2102 F upperHalfPlaneSet) (hS : \u2200 z \u2208 upperHalfPlaneSet, \u2016F z\u2016 \u2264 S)\n (hA : volume A \u2260 0) (hFA : \u2200\u1d50 x, x \u2208 A \u2192 upperHalfPlaneBoundaryFun F x = 0) :\n EqOn F 0 upperHalfPlaneSet :=", "/-- The boundary function of a bounded holomorphic function that is nonzero somewhere on the\nupper half-plane is nonzero almost everywhere. -/\ntheorem ae_upperHalfPlaneBoundaryFun_ne_zero {F : \u2102 \u2192 \u2102} {S : \u211d}\n (hF : DifferentiableOn \u2102 F upperHalfPlaneSet) (hS : \u2200 z \u2208 upperHalfPlaneSet, \u2016F z\u2016 \u2264 S)\n (h\u2080 : \u2203 z \u2208 upperHalfPlaneSet, F z \u2260 0) : \u2200\u1d50 x : \u211d, upperHalfPlaneBoundaryFun F x \u2260 0 :=", "end TauCeti"], "free_length": 1918, "file_length": 3293, "heartbeats": 1940, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.CategoryTheory.CategoryOfOperators.LM", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/CategoryTheory/CategoryOfOperators/LM.lean", "module": "TauCeti.CategoryTheory.CategoryOfOperators.LM", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.CategoryTheory.CategoryOfOperators.Assoc\n\n/-!\n# The category of operators of the left module operad\n\nThe operad `LM` has two colors, `a` (the algebra) and `m` (the module). Its operations are\nthose of the associative operad, an ordered word of inputs, subject to a condition on colors: an\noperation with output `a` has only inputs `a`, and an operation with output `m` has an ordered\nword of inputs `a` followed by its one input `m`. Its algebras are the pairs of an associative\nalgebra and a left module over it.\n\nThe category of operators `LM^\u2297` has as objects the finite words of colors, that is a natural\nnumber `n` and a color of each element of `\u27e8n\u27e9` other than the basepoint. A morphism is a\nmorphism of `Assoc^\u2297` between the underlying objects whose word over each output has the input\nprofile allowed by `LM` for the color of that output (`TauCeti.LM.IsProfile`); inputs sent to\nthe basepoint are forgotten, whatever their color. Admissible profiles are closed under\nsubstitution, so these morphisms compose. Forgetting colors is a functor `LM.toAssoc` to\n`Assoc^\u2297`, and `LM.toFinPointed : LM^\u2297 \u2964 Fin_*` is its composite with `Assoc.toFinPointed`.\n\nColoring every element by `a` is a fully faithful functor `Assoc.toLM : Assoc^\u2297 \u2964 LM^\u2297` over\n`Fin_*`, the inclusion of the associative operad. The target of a morphism of `LM^\u2297` is its source\ncolored along the underlying map (`LM.pushforwardColor`), and a map of `Fin_*` lifts with a given\nsource exactly when each of its fibres over the elements other than the basepoint contains at most\none input colored `m` (`LM.exists_hom_toAssoc_base_eq_iff`). In particular every inert map of\n`Fin_*` lifts, with a given source, to `LM^\u2297` (`LM.Hom.ofInert`); every morphism over an inert map\nis that lift up to the identification of its target, and is strongly coCartesian for\n`LM.toFinPointed`.\n\n## Main definitions\n\n* `TauCeti.LM.Color`: the two colors `a` and `m`.\n* `TauCeti.LM.IsProfile`: the input words of colors allowed for an output color.\n* `TauCeti.LM`: the category of operators `LM^\u2297`.\n* `TauCeti.LM.toAssoc`, `TauCeti.LM.toFinPointed`: the functors to `Assoc^\u2297` and `Fin_*`.\n* `TauCeti.Assoc.toLM`: the inclusion `Assoc^\u2297 \u2964 LM^\u2297`.\n* `TauCeti.LM.pushforwardColor`: the colors of the target of a lift of a map of `Fin_*`.\n* `TauCeti.LM.Hom.ofBase`: the lift of a map of `Fin_*` with a given source, when it exists.\n* `TauCeti.LM.Hom.ofInert`: the lift of an inert map of `Fin_*` with a given source.\n\n## Main results\n\n* `TauCeti.LM.homLiftEquiv`: lifts over a fixed pointed map decompose into colored output lifts.\n* `TauCeti.Assoc.fullyFaithfulToLM`: the inclusion `Assoc^\u2297 \u2964 LM^\u2297` is fully faithful.\n* `TauCeti.Assoc.toLM_comp_toFinPointed`: the inclusion lies over `Fin_*`.\n* `TauCeti.LM.exists_hom_toAssoc_base_eq_iff`: the maps of `Fin_*` that lift with a given source.\n* `TauCeti.LM.Hom.ofInert_comp_eqToHom`: every morphism over an inert map is `LM.Hom.ofInert`, up to\n the identification of its target.\n* `TauCeti.LM.isStronglyCocartesian_of_isInert`: every morphism over an inert map is strongly\n coCartesian for `LM.toFinPointed`.\n\n## References\n\n* J. Lurie, *Higher Algebra*, Definition 4.2.1.7.\n-/\n\npublic section\n\nuniverse u\n\nopen CategoryTheory Functor\n\nnamespace TauCeti\n\n/-- The two colors of the left module operad: `a`, the algebra, and `m`, the module. -/\ninductive LM.Color : Type\n /-- The algebra color. -/\n | a\n /-- The module color. -/\n | m\n deriving DecidableEq\n\nnamespace LM\n\nopen Color\n\n/-- The words of input colors allowed for an operation of `LM` with output color `c`: only\ninputs `a` for the output `a`, and inputs `a` followed by one input `m` for the output `m`. -/\ndef IsProfile : Color \u2192 List Color \u2192 Prop\n | a, w => m \u2209 w\n | m, w => \u2203 l, m \u2209 l \u2227 w = l ++ [m]\n\n@[simp]\nlemma isProfile_a (w : List Color) : IsProfile a w \u2194 m \u2209 w := Iff.rfl\n\n@[simp]\nlemma isProfile_m (w : List Color) : IsProfile m w \u2194 \u2203 l, m \u2209 l \u2227 w = l ++ [m] := Iff.rfl\n\n@[simp]\nlemma isProfile_singleton_iff (c c' : Color) : IsProfile c [c'] \u2194 c' = c := by\n cases c <;> cases c'\n case m.a =>\n simp only [isProfile_m, reduceCtorEq, iff_false, not_exists, not_and]\n intro l _ h\n have : m \u2208 [a] := h \u25b8 List.mem_append_right l (List.mem_singleton_self m)\n simp at this\n all_goals simp\n\n/-- Admissible profiles are closed under substitution: substituting, into an operation whose\ninputs `j` have the colors `color j`, operations with outputs `color j` and admissible profiles\ngives an operation with an admissible profile. -/\nlemma IsProfile.flatMap {\u03b1 \u03b2 : Type*} {c : Color} {color : \u03b1 \u2192 Color} {color' : \u03b2 \u2192 Color}\n {l : List \u03b1} (hl : IsProfile c (l.map color)) {f : \u03b1 \u2192 List \u03b2}\n (hf : \u2200 j \u2208 l, IsProfile (color j) ((f j).map color')) :\n IsProfile c ((l.flatMap f).map color') := by\n -- Substituting into an operation with inputs `a` only gives an operation with inputs `a` only.\n have hA {l : List \u03b1} (hl : m \u2209 l.map color)\n (hf : \u2200 j \u2208 l, IsProfile (color j) ((f j).map color')) :\n m \u2209 (l.flatMap f).map color' := by\n simp only [List.map_flatMap, List.mem_flatMap, not_exists, not_and]\n intro j hj\n have hj' : color j = a := by\n cases h : color j\n \u00b7 rfl\n \u00b7 exact absurd (h \u25b8 List.mem_map_of_mem hj) hl\n simpa [hj'] using hf j hj\n cases c with\n | a => exact hA hl hf\n | m =>\n obtain \u27e8w, hw, hlw\u27e9 := hl\n obtain \u27e8l\u2081, l\u2082, rfl, rfl, hl\u2082\u27e9 := List.map_eq_append_iff.1 hlw\n obtain \u27e8j, rfl, hj\u27e9 := List.map_eq_singleton_iff.1 hl\u2082\n have hfj := hf j (by simp)\n rw [hj, isProfile_m] at hfj\n obtain \u27e8w', hw', hjw\u27e9 := hfj\n refine \u27e8(l\u2081.flatMap f).map color' ++ w', ?_, ?_\u27e9\n \u00b7 rw [List.mem_append, not_or]\n exact \u27e8hA hw fun j hj \u21a6 hf j (by simp [hj]), hw'\u27e9\n \u00b7 simp [List.flatMap_append, hjw]\n\nend LM\n\n/-- The category of operators `LM^\u2297` of the left module operad: an object is a natural number `n`\ntogether with a color of each element of `\u27e8n\u27e9` other than the basepoint. -/\nstructure LM : Type u where\n /-- The object `\u27e8n\u27e9` of `LM^\u2297` with the given colors. -/\n mk ::\n /-- The number of elements of the pointed set other than its basepoint. -/\n len : \u2115\n /-- The color of the element `i.succ`. -/\n color : Fin len \u2192 LM.Color\n\nnamespace LM\n\n/-- Two objects of `LM^\u2297` are equal when they have the same length and, along the resulting\nidentification of their elements, the same colors. The colors depend on the length, so no\n`ext_iff` form is generated. -/\n@[ext (iff := false)]\nlemma ext {X Y : LM.{u}} (hlen : X.len = Y.len)\n (hcolor : \u2200 i, X.color i = Y.color (Fin.cast hlen i)) : X = Y := by\n obtain \u27e8n, c\u27e9 := X\n obtain \u27e8n', c'\u27e9 := Y\n obtain rfl : n = n' := hlen\n exact congrArg (LM.mk n) (funext hcolor)\n\n/-- The underlying object of `Assoc^\u2297`, forgetting the colors. -/\nabbrev toAssocObj (X : LM.{u}) : Assoc.{u} := Assoc.mk X.len\n\n/-- A morphism of `LM^\u2297`: a morphism of `Assoc^\u2297` between the underlying objects whose word over\neach output has the input profile allowed for the color of that output. -/\nstructure Hom (X Y : LM.{u}) : Type u where\n /-- The morphism given by a morphism of `Assoc^\u2297` with admissible profiles. -/\n mk ::\n /-- The underlying morphism of `Assoc^\u2297`. -/\n toAssoc : X.toAssocObj \u27f6 Y.toAssocObj\n isProfile (j : Fin Y.len) : IsProfile (Y.color j) ((toAssoc.word j).map X.color)\n\n/-- The composition of `LM^\u2297` is that of `Assoc^\u2297`. -/\ninstance : SmallCategory LM.{u} where\n Hom := Hom\n id X := \u27e8\ud835\udfd9 X.toAssocObj, fun j \u21a6 by simp\u27e9\n comp f g := \u27e8f.toAssoc \u226b g.toAssoc, fun k \u21a6 by\n simpa using (g.isProfile k).flatMap fun j _ \u21a6 f.isProfile j\u27e9\n\nvariable {X Y Z : LM.{u}}\n\n@[ext]\nlemma hom_ext {f g : X \u27f6 Y} (h : f.toAssoc = g.toAssoc) : f = g := by\n cases f\n cases g\n cases h\n rfl\n\n@[simp]\nlemma id_toAssoc : Hom.toAssoc (\ud835\udfd9 X) = \ud835\udfd9 X.toAssocObj := rfl\n\n@[simp]\nlemma comp_toAssoc (f : X \u27f6 Y) (g : Y \u27f6 Z) : (f \u226b g).toAssoc = f.toAssoc \u226b g.toAssoc := rfl\n\n/-- The functor `LM^\u2297 \u2964 Assoc^\u2297` forgetting the colors. -/\n@[expose]\ndef toAssoc : LM.{u} \u2964 Assoc.{u} where\n obj X := X.toAssocObj\n map f := f.toAssoc\n\n@[simp]\nlemma toAssoc_obj (X : LM.{u}) : toAssoc.obj X = X.toAssocObj := (rfl)\n\n@[simp]\nlemma toAssoc_map (f : X \u27f6 Y) : toAssoc.map f = f.toAssoc := (rfl)\n\ninstance : toAssoc.{u}.Faithful where\n map_injective h := hom_ext h\n\n/-- The functor `LM^\u2297 \u2964 Fin_*`, sending a word of colors of length `n` to `\u27e8n\u27e9` and a morphism\nto its underlying map. The body is exposed so that `toFinPointed.obj X` is visibly\n`FinPointed.mk X.len`. -/\n@[expose]\ndef toFinPointed : LM.{u} \u2964 FinPointed.{u} :=\n toAssoc \u22d9 Assoc.toFinPointed\n\n@[simp]\nlemma toFinPointed_obj (X : LM.{u}) : toFinPointed.obj X = FinPointed.mk X.len := (rfl)\n\n@[simp]\nlemma toFinPointed_map (f : X \u27f6 Y) : toFinPointed.map f = f.toAssoc.base := (rfl)\n\n/-- Every morphism lies over its underlying map. -/\ninstance isHomLift_base (f : X \u27f6 Y) : toFinPointed.IsHomLift f.toAssoc.base f :=\n inferInstanceAs (toFinPointed.IsHomLift (toFinPointed.map f) f)\n\n/-- A morphism lies over a map of `Fin_*` exactly when that map is its underlying map. -/\nlemma isHomLift_iff {f : X \u27f6 Y} {g : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk Y.len} :\n toFinPointed.IsHomLift g f \u2194 f.toAssoc.base = g :=\n -- The endpoints are fixed explicitly, since `g` mentions `X` and `Y` only through their\n -- lengths.\n isHomLift_iff_map_eq (p := toFinPointed) (a := X) (b := Y)\n\n/-- The canonical inert projection to the single output with color `Y.color j`. -/\ndef \u03c1 (j : Fin Y.len) : Y \u27f6 \u27e81, fun _ \u21a6 Y.color j\u27e9 where\n toAssoc := Assoc.\u03c1 j\n isProfile _ := by simp\n\n@[simp]\nlemma \u03c1_toAssoc (j : Fin Y.len) : (\u03c1 j).toAssoc = Assoc.\u03c1 j := (rfl)\n\n/-- The lift to `Assoc^\u2297` assembled by `Assoc.homLiftEquiv` from the underlying lifts of a\nfamily of colored output lifts. The objects of `Assoc.homLiftEquiv` are fixed explicitly here:\nits statement mentions them only through their lengths, as in `FinPointed.mk X.len`, and\nunification cannot solve `?X.len =?= X.len` for `?X`. Here the type of the family fixes `X` and\n`Y`, so the proofs below need not supply them. -/\nprivate def assocLift (g : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk Y.len)\n (f : (j : Fin Y.len) \u2192 {f : X \u27f6 LM.mk 1 (fun _ \u21a6 Y.color j) //\n toFinPointed.IsHomLift (g \u226b FinPointed.\u03c1 j) f}) :\n {f : X.toAssocObj \u27f6 Y.toAssocObj // Assoc.toFinPointed.IsHomLift g f} :=\n (Assoc.homLiftEquiv (X := X.toAssocObj) (Y := Y.toAssocObj) g).symm fun j \u21a6\n \u27e8(f j).val.toAssoc, Assoc.isHomLift_iff.2 (isHomLift_iff.1 (f j).property)\u27e9\n\n/-- Lifts of a fixed pointed map are equivalent to families of lifts to its colored outputs.\nThe forward map postcomposes with the canonical inert projections. The inverse assembles\nthe ordered fibres, whose profiles are supplied by the individual lifts. -/\ndef homLiftEquiv (g : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk Y.len) :\n {f : X \u27f6 Y // toFinPointed.IsHomLift g f} \u2243\n ((j : Fin Y.len) \u2192 {f : X \u27f6 LM.mk 1 (fun _ \u21a6 Y.color j) //\n toFinPointed.IsHomLift (g \u226b FinPointed.\u03c1 j) f}) where\n toFun f j := \u27e8f.val \u226b \u03c1 j, isHomLift_iff.2 (by\n simp [isHomLift_iff.1 f.property])\u27e9\n invFun f :=\n \u27e8\u27e8(assocLift g f).val, fun j \u21a6 by\n rw [assocLift, Assoc.homLiftEquiv_symm_apply_word (X := X.toAssocObj) (Y := Y.toAssocObj)]\n exact (f j).val.isProfile 0\u27e9,\n isHomLift_iff.2 (Assoc.isHomLift_iff.1 (assocLift g f).property)\u27e9\n -- Both inverse laws are those of `Assoc.homLiftEquiv`, since forgetting the colors commutes\n -- with the projections.\n left_inv f := by\n refine Subtype.ext (hom_ext ?_)\n have h := congrArg Subtype.val\n ((Assoc.homLiftEquiv (X := X.toAssocObj) (Y := Y.toAssocObj) g).symm_apply_apply\n \u27e8f.val.toAssoc, Assoc.isHomLift_iff.2 (isHomLift_iff.1 f.property)\u27e9)\n refine Eq.trans (congrArg (fun F \u21a6\n ((Assoc.homLiftEquiv (X := X.toAssocObj) (Y := Y.toAssocObj) g).symm F).val)\n (funext fun j \u21a6 Subtype.ext ?_)) h\n rw [Assoc.homLiftEquiv_apply_val]\n exact (comp_toAssoc _ _).trans (congrArg _ (\u03c1_toAssoc j))\n right_inv f := by\n refine funext fun j \u21a6 Subtype.ext (hom_ext ?_)\n have h := congrArg Subtype.val (congrFun\n ((Assoc.homLiftEquiv (X := X.toAssocObj) (Y := Y.toAssocObj) g).apply_symm_apply\n fun j \u21a6 \u27e8(f j).val.toAssoc, Assoc.isHomLift_iff.2 (isHomLift_iff.1 (f j).property)\u27e9) j)\n rw [Assoc.homLiftEquiv_apply_val] at h\n exact h\n\n@[simp]\nlemma homLiftEquiv_apply_val\n (g : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk Y.len)\n (f : {f : X \u27f6 Y // toFinPointed.IsHomLift g f}) (j : Fin Y.len) :\n (homLiftEquiv g f j).val = f.val \u226b \u03c1 j := (rfl)\n\n@[simp]\nlemma homLiftEquiv_symm_apply_word\n (g : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk Y.len)\n (f : (j : Fin Y.len) \u2192 {f : X \u27f6 LM.mk 1 (fun _ \u21a6 Y.color j) //\n toFinPointed.IsHomLift (g \u226b FinPointed.\u03c1 j) f}) (j : Fin Y.len) :\n ((homLiftEquiv g).symm f).val.toAssoc.word j = (f j).val.toAssoc.word 0 :=\n Assoc.homLiftEquiv_symm_apply_word (X := X.toAssocObj) (Y := Y.toAssocObj) g _ j\n\n/-- If the word of `f` over the output `j` is the single letter `i`, then the output `j` has\nthe color of the input `i`. -/\nlemma Hom.color_eq_of_word_eq_singleton (f : X \u27f6 Y) {j : Fin Y.len} {i : Fin X.len}\n (h : f.toAssoc.word j = [i]) : Y.color j = X.color i :=\n (by simpa [h] using f.isProfile j : X.color i = Y.color j).symm\n\n/-- Every morphism of `LM^\u2297` over an inert map of `Fin_*` is strongly coCartesian for the\nfunctor `LM^\u2297 \u2964 Fin_*`. -/\ntheorem isStronglyCocartesian_of_isInert (\u03c6 : X \u27f6 Y) (h\u03c6 : \u03c6.toAssoc.base.IsInert) :\n toFinPointed.IsStronglyCocartesian \u03c6.toAssoc.base \u03c6 := by\n choose \u03c3 h\u03c3 using Assoc.Hom.exists_word_eq_singleton_of_isInert h\u03c6\n have hcc := Assoc.isStronglyCocartesian_of_isInert \u03c6.toAssoc h\u03c6\n refine \u27e8fun {Z} g \u03c6' hl \u21a6 ?_\u27e9\n have h\u03c6' : \u03c6'.toAssoc.base = \u03c6.toAssoc.base \u226b g := isHomLift_iff.1 hl\n -- The universal property of `\u03c6.toAssoc` for `Assoc.toFinPointed`, applied to `\u03c6'.toAssoc`.\n have : Assoc.toFinPointed.IsHomLift (\u03c6.toAssoc.base \u226b g) \u03c6'.toAssoc :=\n Assoc.isHomLift_iff.2 h\u03c6'\n obtain \u27e8\u03c7, \u27e8h\u03c7, hfac\u27e9, huniq\u27e9 := IsStronglyCocartesian.universal_property Assoc.toFinPointed\n \u03c6.toAssoc.base \u03c6.toAssoc g _ rfl \u03c6'.toAssoc\n have h\u03c7' : \u03c7.base = g := Assoc.isHomLift_iff.1 h\u03c7\n -- The colors of `Y` are those of `X` along `\u03c3`, so `\u03c7` has the profiles of `\u03c6'`.\n have hprofile (k : Fin Z.len) : IsProfile (Z.color k) ((\u03c7.word k).map Y.color) := by\n have hY : Y.color = X.color \u2218 \u03c3 :=\n funext fun j \u21a6 \u03c6.color_eq_of_word_eq_singleton (h\u03c3 j)\n rw [hY, \u2190 List.map_map, \u2190 Assoc.Hom.comp_word_of_word_eq_singleton h\u03c3, hfac]\n exact \u03c6'.isProfile k\n refine \u27e8\u27e8\u03c7, hprofile\u27e9, \u27e8isHomLift_iff.2 h\u03c7', hom_ext hfac\u27e9, fun \u03c8 \u27e8h\u03c8l, h\u03c8\u27e9 \u21a6 ?_\u27e9\n exact hom_ext (huniq \u03c8.toAssoc \u27e8Assoc.isHomLift_iff.2 (isHomLift_iff.1 h\u03c8l),\n congrArg Hom.toAssoc h\u03c8\u27e9)\n\n/-- The candidate target colors along a pointed map: an output is colored `m` when one of\nits preimages is. Every LM morphism has these target colors (`Hom.mk_pushforwardColor_eq`), but\nthis coloring alone does not guarantee a lift: a lift exists exactly when each fibre over an\nelement other than the basepoint contains at most one input colored `m`\n(`exists_hom_toAssoc_base_eq_iff`). -/\ndef pushforwardColor (X : LM.{u}) {k : \u2115} (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k)\n (j : Fin k) : Color :=\n if \u2203 i, f.toFun i.succ = j.succ \u2227 X.color i = .m then .m else .a\n\n/-- An output has color `m` exactly when some input over it has color `m`. -/\n@[simp]\nlemma pushforwardColor_eq_m_iff (X : LM.{u}) {k : \u2115}\n (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k) (j : Fin k) :\n X.pushforwardColor f j = .m \u2194 \u2203 i, f.toFun i.succ = j.succ \u2227 X.color i = .m := by\n simp [pushforwardColor]\n\n/-- An output has color `a` exactly when every input over it has color `a`. -/\n@[simp]\nlemma pushforwardColor_eq_a_iff (X : LM.{u}) {k : \u2115}\n (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k) (j : Fin k) :\n X.pushforwardColor f j = .a \u2194 \u2200 i, f.toFun i.succ = j.succ \u2192 X.color i = .a := by\n have h (c : Color) : c \u2260 .m \u2194 c = .a := by cases c <;> simp\n simp [pushforwardColor, h]\n\n/-- Every LM morphism has the target coloring prescribed by its underlying pointed map. -/\nlemma Hom.color_eq_pushforwardColor (f : X \u27f6 Y) (j : Fin Y.len) :\n Y.color j = X.pushforwardColor f.toAssoc.base j := by\n symm\n have hp := f.isProfile j\n cases hc : Y.color j with\n | a =>\n rw [pushforwardColor_eq_a_iff]\n rw [hc, isProfile_a] at hp\n intro i hi\n cases hiC : X.color i with\n | a => rfl\n | m => exact False.elim (hp (List.mem_map.2\n \u27e8i, (f.toAssoc.mem_word_iff i j).2 hi, hiC\u27e9))\n | m =>\n rw [pushforwardColor_eq_m_iff]\n rw [hc, isProfile_m] at hp\n obtain \u27e8l, _, hl\u27e9 := hp\n have hm : .m \u2208 (f.toAssoc.word j).map X.color := by simp [hl]\n obtain \u27e8i, hi, hiC\u27e9 := List.mem_map.1 hm\n exact \u27e8i, (f.toAssoc.mem_word_iff i j).1 hi, hiC\u27e9\n\n/-- An output with exactly one input has the color of that input. -/\nlemma pushforwardColor_eq_of_unique (X : LM.{u}) {k : \u2115}\n (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k) {i : Fin X.len} {j : Fin k}\n (hi : f.toFun i.succ = j.succ) (huniq : \u2200 i', f.toFun i'.succ = j.succ \u2192 i' = i) :\n X.pushforwardColor f j = X.color i := by\n have hpre (i' : Fin X.len) : f.toFun i'.succ = j.succ \u2194 i' = i :=\n \u27e8huniq i', fun h \u21a6 h \u25b8 hi\u27e9\n cases hc : X.color i <;> simp [hpre, hc]\n\n/-- Along an inert map, each output has the color of its unique input. -/\nlemma pushforwardColor_eq_of_isInert (X : LM.{u}) {k : \u2115}\n (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k) (hf : f.IsInert)\n {i : Fin X.len} {j : Fin k} (hi : f.toFun i.succ = j.succ) :\n X.pushforwardColor f j = X.color i :=\n X.pushforwardColor_eq_of_unique f hi fun _ hi' \u21a6 hf.eq_of_toFun_succ_eq hi' hi\n\n/-- The lift of a map `f : \u27e8n\u27e9 \u27f6 \u27e8k\u27e9` of `Fin_*` with source `X` each of whose fibres over the\nelements other than the basepoint contains at most one input colored `m`. Its target is `\u27e8k\u27e9`\ncolored along `f`, and its word over each output lists the inputs colored `a` increasingly,\nfollowed by the input colored `m` if there is one. -/\ndef Hom.ofBase (X : LM.{u}) {k : \u2115} (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k)\n (hf : \u2200 (j : Fin k) (i i' : Fin X.len), f.toFun i.succ = j.succ \u2192 f.toFun i'.succ = j.succ \u2192\n X.color i = .m \u2192 X.color i' = .m \u2192 i = i') :\n X \u27f6 \u27e8k, X.pushforwardColor f\u27e9 where\n toAssoc :=\n { base := f\n word j := (List.finRange X.len).filter (fun i \u21a6 f.toFun i.succ = j.succ \u2227 X.color i = .a) ++\n (List.finRange X.len).filter (fun i \u21a6 f.toFun i.succ = j.succ \u2227 X.color i = .m)\n mem_word_iff i j := by cases hc : X.color i <;> simp [hc]\n nodup_word j := ((List.nodup_finRange _).filter _).append ((List.nodup_finRange _).filter _)\n (List.disjoint_left.2 fun i hi hi' \u21a6 by simp_all) }\n isProfile j := by\n -- The target is a constructor application, so its color at `j` reduces to\n -- `X.pushforwardColor f j`.\n dsimp only\n -- The prefix of inputs colored `a` contains no color `m`.\n have hA : .m \u2209 ((List.finRange X.len).filter\n (fun i \u21a6 f.toFun i.succ = j.succ \u2227 X.color i = .a)).map X.color := by\n simp +contextual\n cases hc : X.pushforwardColor f j with\n | a =>\n rw [pushforwardColor_eq_a_iff] at hc\n -- No input over `j` is colored `m`, so the suffix of inputs colored `m` is empty.\n have hM : (List.finRange X.len).filter\n (fun i \u21a6 f.toFun i.succ = j.succ \u2227 X.color i = .m) = [] :=\n List.filter_eq_nil_iff.2 fun i _ \u21a6 by simp +contextual [hc i]\n rw [isProfile_a, hM, List.append_nil]\n exact hA\n | m =>\n obtain \u27e8i\u2080, hi\u2080, hc\u2080\u27e9 := (X.pushforwardColor_eq_m_iff f j).1 hc\n -- The only input colored `m` over `j` is `i\u2080`.\n have hM : (List.finRange X.len).filter\n (fun i \u21a6 f.toFun i.succ = j.succ \u2227 X.color i = .m) = [i\u2080] :=\n List.Perm.eq_singleton ((List.perm_ext_iff_of_nodup ((List.nodup_finRange _).filter _)\n (List.nodup_singleton i\u2080)).2 fun i \u21a6 by\n simp only [List.mem_filter, List.mem_finRange, true_and, decide_eq_true_eq,\n List.mem_singleton]\n exact \u27e8fun h \u21a6 hf j i i\u2080 h.1 hi\u2080 h.2 hc\u2080, fun h \u21a6 h \u25b8 \u27e8hi\u2080, hc\u2080\u27e9\u27e9)\n exact \u27e8_, hA, by rw [hM, List.map_append, List.map_singleton, hc\u2080]\u27e9\n\n@[simp]\nlemma Hom.ofBase_toAssoc_base (X : LM.{u}) {k : \u2115} (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k)\n (hf : \u2200 (j : Fin k) (i i' : Fin X.len), f.toFun i.succ = j.succ \u2192 f.toFun i'.succ = j.succ \u2192\n X.color i = .m \u2192 X.color i' = .m \u2192 i = i') :\n (Hom.ofBase X f hf).toAssoc.base = f :=\n (rfl)\n\n/-- The word of `Hom.ofBase` over an output lists the inputs colored `a` over it increasingly,\nfollowed by the input colored `m` over it if there is one. -/\nlemma Hom.ofBase_toAssoc_word (X : LM.{u}) {k : \u2115}\n (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k)\n (hf : \u2200 (j : Fin k) (i i' : Fin X.len), f.toFun i.succ = j.succ \u2192 f.toFun i'.succ = j.succ \u2192\n X.color i = .m \u2192 X.color i' = .m \u2192 i = i') (j : Fin k) :\n (Hom.ofBase X f hf).toAssoc.word j =\n (List.finRange X.len).filter (fun i \u21a6 f.toFun i.succ = j.succ \u2227 X.color i = .a) ++\n (List.finRange X.len).filter (fun i \u21a6 f.toFun i.succ = j.succ \u2227 X.color i = .m) :=\n (rfl)\n\n/-- The lift of an inert map `f : \u27e8n\u27e9 \u27f6 \u27e8k\u27e9` of `Fin_*` with source `X`: its target is `\u27e8k\u27e9`\ncolored along `f`, and its words are the one-letter fibres of `f`. It is `Hom.ofBase`, whose\nfibre condition holds since the fibres of `f` over the elements other than the basepoint are\nsingletons. -/\ndef Hom.ofInert (X : LM.{u}) {k : \u2115} (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k)\n (hf : f.IsInert) : X \u27f6 \u27e8k, X.pushforwardColor f\u27e9 :=\n Hom.ofBase X f fun _ _ _ hi hi' _ _ \u21a6 hf.eq_of_toFun_succ_eq hi hi'\n\n@[simp]\nlemma Hom.ofInert_toAssoc (X : LM.{u}) {k : \u2115} (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k)\n (hf : f.IsInert) : (Hom.ofInert X f hf).toAssoc = Assoc.Hom.ofBase f :=\n Assoc.Hom.ext_of_isInert (by rw [Hom.ofInert, Hom.ofBase_toAssoc_base, Assoc.Hom.ofBase_base])\n (by rwa [Hom.ofInert, Hom.ofBase_toAssoc_base])\n\n/-- The target of every morphism is its source colored along its underlying map. -/\nlemma Hom.mk_pushforwardColor_eq (\u03c6 : X \u27f6 Y) :\n (\u27e8Y.len, X.pushforwardColor \u03c6.toAssoc.base\u27e9 : LM.{u}) = Y :=\n congrArg (LM.mk Y.len) (funext fun j \u21a6 (\u03c6.color_eq_pushforwardColor j).symm)\n\n/-- Every morphism over an inert map is the lift `Hom.ofInert` of that map, followed by the\nidentification `Hom.mk_pushforwardColor_eq` of its target with the source colored along that\nmap. -/\nlemma Hom.ofInert_comp_eqToHom (\u03c6 : X \u27f6 Y) (h\u03c6 : \u03c6.toAssoc.base.IsInert) :\n Hom.ofInert X \u03c6.toAssoc.base h\u03c6 \u226b eqToHom \u03c6.mk_pushforwardColor_eq = \u03c6 := by\n refine hom_ext ?_\n -- Forgetting the colors sends the identification of targets to an identity.\n have h : (eqToHom \u03c6.mk_pushforwardColor_eq).toAssoc =\n eqToHom (congrArg toAssocObj \u03c6.mk_pushforwardColor_eq) :=\n eqToHom_map LM.toAssoc \u03c6.mk_pushforwardColor_eq\n rw [comp_toAssoc, h, eqToHom_refl, Category.comp_id]\n exact Assoc.Hom.ext_of_isInert (by simp) (by simpa using h\u03c6)\n\n/-- The lift of an inert map with a given source is strongly coCartesian. -/\nlemma isStronglyCocartesian_ofInert (X : LM.{u}) {k : \u2115}\n (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k) (hf : f.IsInert) :\n toFinPointed.IsStronglyCocartesian f (Hom.ofInert X f hf) := by\n simpa using isStronglyCocartesian_of_isInert (Hom.ofInert X f hf) (by simpa using hf)\n\n/-- A map `f : \u27e8n\u27e9 \u27f6 \u27e8k\u27e9` of `Fin_*` lifts to `LM^\u2297` with source `X`, necessarily with target\n`\u27e8k\u27e9` colored along `f` (`Hom.mk_pushforwardColor_eq`), exactly when each of its fibres over the\nelements other than the basepoint contains at most one input colored `m`. -/\ntheorem exists_hom_toAssoc_base_eq_iff (X : LM.{u}) {k : \u2115}\n (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k) :\n (\u2203 \u03c6 : X \u27f6 \u27e8k, X.pushforwardColor f\u27e9, \u03c6.toAssoc.base = f) \u2194\n \u2200 (j : Fin k) (i i' : Fin X.len), f.toFun i.succ = j.succ \u2192 f.toFun i'.succ = j.succ \u2192\n X.color i = .m \u2192 X.color i' = .m \u2192 i = i' := by\n refine \u27e8fun \u27e8\u03c6, h\u03c6\u27e9 j i i' hi hi' hc hc' \u21a6 ?_, fun hf \u21a6 \u27e8Hom.ofBase X f hf, rfl\u27e9\u27e9\n -- The word of `\u03c6` over `j` is `w ++ [x]`, where no input of `w` is colored `m`.\n have hp := \u03c6.isProfile j\n -- The target is a constructor application, so its color at `j` reduces to\n -- `X.pushforwardColor f j`, which is `m` since the input `i` over `j` is colored `m`.\n dsimp only at hp\n rw [(X.pushforwardColor_eq_m_iff f j).2 \u27e8i, hi, hc\u27e9, isProfile_m] at hp\n obtain \u27e8l, hl, hw\u27e9 := hp\n obtain \u27e8w, w', hww', rfl, hw'\u27e9 := List.map_eq_append_iff.1 hw\n obtain \u27e8x, rfl, -\u27e9 := List.map_eq_singleton_iff.1 hw'\n -- So every input colored `m` over `j` is the last letter `x`.\n have hlast (i : Fin X.len) (hi : f.toFun i.succ = j.succ) (hc : X.color i = .m) : i = x := by\n have hmem := (\u03c6.toAssoc.mem_word_iff i j).2 (by rw [h\u03c6]; exact hi)\n rw [hww'] at hmem\n rcases List.mem_append.1 hmem with h | h\n \u00b7 exact absurd (hc \u25b8 List.mem_map_of_mem h) hl\n \u00b7 exact List.mem_singleton.1 h\n exact (hlast i hi hc).trans (hlast i' hi' hc').symm\n\nend LM\n\nnamespace Assoc\n\n/-- The inclusion `Assoc^\u2297 \u2964 LM^\u2297` of the associative operad, coloring every element by `a`. -/\n@[expose]\ndef toLM : Assoc.{u} \u2964 LM.{u} where\n obj X := \u27e8X.len, fun _ \u21a6 .a\u27e9\n map f := \u27e8f, fun _ \u21a6 by simp\u27e9\n\n@[simp]\nlemma toLM_obj_len (X : Assoc.{u}) : (toLM.obj X).len = X.len := (rfl)\n\n@[simp]\nlemma toLM_obj_color (X : Assoc.{u}) (i : Fin X.len) : (toLM.obj X).color i = .a := (rfl)\n\n@[simp]\nlemma toLM_map_toAssoc {X Y : Assoc.{u}} (f : X \u27f6 Y) : (toLM.map f).toAssoc = f := (rfl)\n\n/-- The inclusion `Assoc^\u2297 \u2964 LM^\u2297` is fully faithful: between objects colored by `a` only, every\nmorphism of `Assoc^\u2297` has admissible profiles. -/\ndef fullyFaithfulToLM : toLM.{u}.FullyFaithful where\n preimage f := f.toAssoc\n\ninstance : toLM.{u}.Full := fullyFaithfulToLM.full\n\ninstance : toLM.{u}.Faithful := fullyFaithfulToLM.faithful\n\n/-- Forgetting the colors of the inclusion `Assoc^\u2297 \u2964 LM^\u2297` gives back `Assoc^\u2297`. -/\n@[simp]\nlemma toLM_comp_toAssoc : toLM.{u} \u22d9 LM.toAssoc = \ud835\udfed _ := rfl\n\n/-- The inclusion `Assoc^\u2297 \u2964 LM^\u2297` lies over `Fin_*`. -/\n@[simp]\nlemma toLM_comp_toFinPointed : toLM.{u} \u22d9 LM.toFinPointed = toFinPointed := rfl\n\nend Assoc\n\nend TauCeti\n", "public_theorems": ["TauCeti.LM.isProfile_a", "TauCeti.LM.isProfile_m", "TauCeti.LM.isProfile_singleton_iff", "TauCeti.LM.IsProfile.flatMap", "TauCeti.LM.ext", "TauCeti.LM.hom_ext", "TauCeti.LM.id_toAssoc", "TauCeti.LM.comp_toAssoc", "TauCeti.LM.toAssoc_obj", "TauCeti.LM.toAssoc_map", "TauCeti.LM.toFinPointed_obj", "TauCeti.LM.toFinPointed_map", "TauCeti.LM.isHomLift_iff", "TauCeti.LM.\u03c1_toAssoc", "TauCeti.LM.homLiftEquiv_apply_val", "TauCeti.LM.homLiftEquiv_symm_apply_word", "TauCeti.LM.Hom.color_eq_of_word_eq_singleton", "TauCeti.LM.isStronglyCocartesian_of_isInert", "TauCeti.LM.pushforwardColor_eq_m_iff", "TauCeti.LM.pushforwardColor_eq_a_iff", "TauCeti.LM.Hom.color_eq_pushforwardColor", "TauCeti.LM.pushforwardColor_eq_of_unique", "TauCeti.LM.pushforwardColor_eq_of_isInert", "TauCeti.LM.Hom.ofBase_toAssoc_base", "TauCeti.LM.Hom.ofBase_toAssoc_word", "TauCeti.LM.Hom.ofInert_toAssoc", "TauCeti.LM.Hom.mk_pushforwardColor_eq", "TauCeti.LM.Hom.ofInert_comp_eqToHom", "TauCeti.LM.isStronglyCocartesian_ofInert", "TauCeti.LM.exists_hom_toAssoc_base_eq_iff", "TauCeti.Assoc.toLM_obj_len", "TauCeti.Assoc.toLM_obj_color", "TauCeti.Assoc.toLM_map_toAssoc", "TauCeti.Assoc.toLM_comp_toAssoc", "TauCeti.Assoc.toLM_comp_toFinPointed"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.CategoryTheory.CategoryOfOperators.Assoc\n\n/-!\n# The category of operators of the left module operad\n\nThe operad `LM` has two colors, `a` (the algebra) and `m` (the module). Its operations are\nthose of the associative operad, an ordered word of inputs, subject to a condition on colors: an\noperation with output `a` has only inputs `a`, and an operation with output `m` has an ordered\nword of inputs `a` followed by its one input `m`. Its algebras are the pairs of an associative\nalgebra and a left module over it.\n\nThe category of operators `LM^\u2297` has as objects the finite words of colors, that is a natural\nnumber `n` and a color of each element of `\u27e8n\u27e9` other than the basepoint. A morphism is a\nmorphism of `Assoc^\u2297` between the underlying objects whose word over each output has the input\nprofile allowed by `LM` for the color of that output (`TauCeti.LM.IsProfile`); inputs sent to\nthe basepoint are forgotten, whatever their color. Admissible profiles are closed under\nsubstitution, so these morphisms compose. Forgetting colors is a functor `LM.toAssoc` to\n`Assoc^\u2297`, and `LM.toFinPointed : LM^\u2297 \u2964 Fin_*` is its composite with `Assoc.toFinPointed`.\n\nColoring every element by `a` is a fully faithful functor `Assoc.toLM : Assoc^\u2297 \u2964 LM^\u2297` over\n`Fin_*`, the inclusion of the associative operad. The target of a morphism of `LM^\u2297` is its source\ncolored along the underlying map (`LM.pushforwardColor`), and a map of `Fin_*` lifts with a given\nsource exactly when each of its fibres over the elements other than the basepoint contains at most\none input colored `m` (`LM.exists_hom_toAssoc_base_eq_iff`). In particular every inert map of\n`Fin_*` lifts, with a given source, to `LM^\u2297` (`LM.Hom.ofInert`); every morphism over an inert map\nis that lift up to the identification of its target, and is strongly coCartesian for\n`LM.toFinPointed`.\n\n## Main definitions\n\n* `TauCeti.LM.Color`: the two colors `a` and `m`.\n* `TauCeti.LM.IsProfile`: the input words of colors allowed for an output color.\n* `TauCeti.LM`: the category of operators `LM^\u2297`.\n* `TauCeti.LM.toAssoc`, `TauCeti.LM.toFinPointed`: the functors to `Assoc^\u2297` and `Fin_*`.\n* `TauCeti.Assoc.toLM`: the inclusion `Assoc^\u2297 \u2964 LM^\u2297`.\n* `TauCeti.LM.pushforwardColor`: the colors of the target of a lift of a map of `Fin_*`.\n* `TauCeti.LM.Hom.ofBase`: the lift of a map of `Fin_*` with a given source, when it exists.\n* `TauCeti.LM.Hom.ofInert`: the lift of an inert map of `Fin_*` with a given source.\n\n## Main results\n\n* `TauCeti.LM.homLiftEquiv`: lifts over a fixed pointed map decompose into colored output lifts.\n* `TauCeti.Assoc.fullyFaithfulToLM`: the inclusion `Assoc^\u2297 \u2964 LM^\u2297` is fully faithful.\n* `TauCeti.Assoc.toLM_comp_toFinPointed`: the inclusion lies over `Fin_*`.\n* `TauCeti.LM.exists_hom_toAssoc_base_eq_iff`: the maps of `Fin_*` that lift with a given source.\n* `TauCeti.LM.Hom.ofInert_comp_eqToHom`: every morphism over an inert map is `LM.Hom.ofInert`, up to\n the identification of its target.\n* `TauCeti.LM.isStronglyCocartesian_of_isInert`: every morphism over an inert map is strongly\n coCartesian for `LM.toFinPointed`.\n\n## References\n\n* J. Lurie, *Higher Algebra*, Definition 4.2.1.7.\n-/\n\npublic section\n\nuniverse u\n\nopen CategoryTheory Functor\n\nnamespace TauCeti\n\n/-- The two colors of the left module operad: `a`, the algebra, and `m`, the module. -/\ninductive LM.Color : Type\n /-- The algebra color. -/\n | a\n /-- The module color. -/\n | m\n deriving DecidableEq\n\nnamespace LM\n\nopen Color\n\n/-- The words of input colors allowed for an operation of `LM` with output color `c`: only\ninputs `a` for the output `a`, and inputs `a` followed by one input `m` for the output `m`. -/\ndef IsProfile : Color \u2192 List Color \u2192 Prop\n | a, w => m \u2209 w\n | m, w => \u2203 l, m \u2209 l \u2227 w = l ++ [m]", "@[simp]\nlemma isProfile_a (w : List Color) : IsProfile a w \u2194 m \u2209 w :=", "@[simp]\nlemma isProfile_m (w : List Color) : IsProfile m w \u2194 \u2203 l, m \u2209 l \u2227 w = l ++ [m] :=", "@[simp]\nlemma isProfile_singleton_iff (c c' : Color) : IsProfile c [c'] \u2194 c' = c :=", "/-- Admissible profiles are closed under substitution: substituting, into an operation whose\ninputs `j` have the colors `color j`, operations with outputs `color j` and admissible profiles\ngives an operation with an admissible profile. -/\nlemma IsProfile.flatMap {\u03b1 \u03b2 : Type*} {c : Color} {color : \u03b1 \u2192 Color} {color' : \u03b2 \u2192 Color}\n {l : List \u03b1} (hl : IsProfile c (l.map color)) {f : \u03b1 \u2192 List \u03b2}\n (hf : \u2200 j \u2208 l, IsProfile (color j) ((f j).map color')) :\n IsProfile c ((l.flatMap f).map color') :=", "end LM\n\n/-- The category of operators `LM^\u2297` of the left module operad: an object is a natural number `n`\ntogether with a color of each element of `\u27e8n\u27e9` other than the basepoint. -/\nstructure LM : Type u where\n /-- The object `\u27e8n\u27e9` of `LM^\u2297` with the given colors. -/\n mk ::\n /-- The number of elements of the pointed set other than its basepoint. -/\n len : \u2115\n /-- The color of the element `i.succ`. -/\n color : Fin len \u2192 LM.Color\n\nnamespace LM", "/-- Two objects of `LM^\u2297` are equal when they have the same length and, along the resulting\nidentification of their elements, the same colors. The colors depend on the length, so no\n`ext_iff` form is generated. -/\n@[ext (iff := false)]\nlemma ext {X Y : LM.{u}} (hlen : X.len = Y.len)\n (hcolor : \u2200 i, X.color i = Y.color (Fin.cast hlen i)) : X = Y :=", "/-- The underlying object of `Assoc^\u2297`, forgetting the colors. -/\nabbrev toAssocObj (X : LM.{u}) : Assoc.{u} := Assoc.mk X.len\n\n/-- A morphism of `LM^\u2297`: a morphism of `Assoc^\u2297` between the underlying objects whose word over\neach output has the input profile allowed for the color of that output. -/\nstructure Hom (X Y : LM.{u}) : Type u where\n /-- The morphism given by a morphism of `Assoc^\u2297` with admissible profiles. -/\n mk ::\n /-- The underlying morphism of `Assoc^\u2297`. -/\n toAssoc : X.toAssocObj \u27f6 Y.toAssocObj\n isProfile (j : Fin Y.len) : IsProfile (Y.color j) ((toAssoc.word j).map X.color)\n\n/-- The composition of `LM^\u2297` is that of `Assoc^\u2297`. -/\ninstance : SmallCategory LM.{u} where\n Hom := Hom\n id X := \u27e8\ud835\udfd9 X.toAssocObj, fun j \u21a6 by simp\u27e9\n comp f g := \u27e8f.toAssoc \u226b g.toAssoc, fun k \u21a6 by\n simpa using (g.isProfile k).flatMap fun j _ \u21a6 f.isProfile j\u27e9\n\nvariable {X Y Z : LM.{u}}", "@[ext]\nlemma hom_ext {f g : X \u27f6 Y} (h : f.toAssoc = g.toAssoc) : f = g :=", "@[simp]\nlemma id_toAssoc : Hom.toAssoc (\ud835\udfd9 X) = \ud835\udfd9 X.toAssocObj :=", "@[simp]\nlemma comp_toAssoc (f : X \u27f6 Y) (g : Y \u27f6 Z) : (f \u226b g).toAssoc = f.toAssoc \u226b g.toAssoc :=", "/-- The functor `LM^\u2297 \u2964 Assoc^\u2297` forgetting the colors. -/\n@[expose]\ndef toAssoc : LM.{u} \u2964 Assoc.{u} where\n obj X := X.toAssocObj\n map f := f.toAssoc", "@[simp]\nlemma toAssoc_obj (X : LM.{u}) : toAssoc.obj X = X.toAssocObj :=", "@[simp]\nlemma toAssoc_map (f : X \u27f6 Y) : toAssoc.map f = f.toAssoc :=", "instance : toAssoc.{u}.Faithful where\n map_injective h := hom_ext h\n\n/-- The functor `LM^\u2297 \u2964 Fin_*`, sending a word of colors of length `n` to `\u27e8n\u27e9` and a morphism\nto its underlying map. The body is exposed so that `toFinPointed.obj X` is visibly\n`FinPointed.mk X.len`. -/\n@[expose]\ndef toFinPointed : LM.{u} \u2964 FinPointed.{u} :=\n toAssoc \u22d9 Assoc.toFinPointed", "@[simp]\nlemma toFinPointed_obj (X : LM.{u}) : toFinPointed.obj X = FinPointed.mk X.len :=", "@[simp]\nlemma toFinPointed_map (f : X \u27f6 Y) : toFinPointed.map f = f.toAssoc.base :=", "/-- Every morphism lies over its underlying map. -/\ninstance isHomLift_base (f : X \u27f6 Y) : toFinPointed.IsHomLift f.toAssoc.base f :=\n inferInstanceAs (toFinPointed.IsHomLift (toFinPointed.map f) f)", "/-- A morphism lies over a map of `Fin_*` exactly when that map is its underlying map. -/\nlemma isHomLift_iff {f : X \u27f6 Y} {g : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk Y.len} :\n toFinPointed.IsHomLift g f \u2194 f.toAssoc.base = g :=", "/-- The canonical inert projection to the single output with color `Y.color j`. -/\ndef \u03c1 (j : Fin Y.len) : Y \u27f6 \u27e81, fun _ \u21a6 Y.color j\u27e9 where\n toAssoc := Assoc.\u03c1 j\n isProfile _ := by simp", "@[simp]\nlemma \u03c1_toAssoc (j : Fin Y.len) : (\u03c1 j).toAssoc = Assoc.\u03c1 j :=", "/-- The lift to `Assoc^\u2297` assembled by `Assoc.homLiftEquiv` from the underlying lifts of a\nfamily of colored output lifts. The objects of `Assoc.homLiftEquiv` are fixed explicitly here:\nits statement mentions them only through their lengths, as in `FinPointed.mk X.len`, and\nunification cannot solve `?X.len =?= X.len` for `?X`. Here the type of the family fixes `X` and\n`Y`, so the proofs below need not supply them. -/\nprivate def assocLift (g : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk Y.len)\n (f : (j : Fin Y.len) \u2192 {f : X \u27f6 LM.mk 1 (fun _ \u21a6 Y.color j) //\n toFinPointed.IsHomLift (g \u226b FinPointed.\u03c1 j) f}) :\n {f : X.toAssocObj \u27f6 Y.toAssocObj // Assoc.toFinPointed.IsHomLift g f} :=\n (Assoc.homLiftEquiv (X := X.toAssocObj) (Y := Y.toAssocObj) g).symm fun j \u21a6\n \u27e8(f j).val.toAssoc, Assoc.isHomLift_iff.2 (isHomLift_iff.1 (f j).property)\u27e9\n\n/-- Lifts of a fixed pointed map are equivalent to families of lifts to its colored outputs.\nThe forward map postcomposes with the canonical inert projections. The inverse assembles\nthe ordered fibres, whose profiles are supplied by the individual lifts. -/\ndef homLiftEquiv (g : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk Y.len) :\n {f : X \u27f6 Y // toFinPointed.IsHomLift g f} \u2243\n ((j : Fin Y.len) \u2192 {f : X \u27f6 LM.mk 1 (fun _ \u21a6 Y.color j) //\n toFinPointed.IsHomLift (g \u226b FinPointed.\u03c1 j) f}) where\n toFun f j := \u27e8f.val \u226b \u03c1 j, isHomLift_iff.2 (by\n simp [isHomLift_iff.1 f.property])\u27e9\n invFun f :=\n \u27e8\u27e8(assocLift g f).val, fun j \u21a6 by\n rw [assocLift, Assoc.homLiftEquiv_symm_apply_word (X := X.toAssocObj) (Y := Y.toAssocObj)]\n exact (f j).val.isProfile 0\u27e9,\n isHomLift_iff.2 (Assoc.isHomLift_iff.1 (assocLift g f).property)\u27e9\n -- Both inverse laws are those of `Assoc.homLiftEquiv`, since forgetting the colors commutes\n -- with the projections.\n left_inv f := by\n refine Subtype.ext (hom_ext ?_)\n have h := congrArg Subtype.val\n ((Assoc.homLiftEquiv (X := X.toAssocObj) (Y := Y.toAssocObj) g).symm_apply_apply\n \u27e8f.val.toAssoc, Assoc.isHomLift_iff.2 (isHomLift_iff.1 f.property)\u27e9)\n refine Eq.trans (congrArg (fun F \u21a6\n ((Assoc.homLiftEquiv (X := X.toAssocObj) (Y := Y.toAssocObj) g).symm F).val)\n (funext fun j \u21a6 Subtype.ext ?_)) h\n rw [Assoc.homLiftEquiv_apply_val]\n exact (comp_toAssoc _ _).trans (congrArg _ (\u03c1_toAssoc j))\n right_inv f := by\n refine funext fun j \u21a6 Subtype.ext (hom_ext ?_)\n have h := congrArg Subtype.val (congrFun\n ((Assoc.homLiftEquiv (X := X.toAssocObj) (Y := Y.toAssocObj) g).apply_symm_apply\n fun j \u21a6 \u27e8(f j).val.toAssoc, Assoc.isHomLift_iff.2 (isHomLift_iff.1 (f j).property)\u27e9) j)\n rw [Assoc.homLiftEquiv_apply_val] at h\n exact h", "@[simp]\nlemma homLiftEquiv_apply_val\n (g : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk Y.len)\n (f : {f : X \u27f6 Y // toFinPointed.IsHomLift g f}) (j : Fin Y.len) :\n (homLiftEquiv g f j).val = f.val \u226b \u03c1 j :=", "@[simp]\nlemma homLiftEquiv_symm_apply_word\n (g : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk Y.len)\n (f : (j : Fin Y.len) \u2192 {f : X \u27f6 LM.mk 1 (fun _ \u21a6 Y.color j) //\n toFinPointed.IsHomLift (g \u226b FinPointed.\u03c1 j) f}) (j : Fin Y.len) :\n ((homLiftEquiv g).symm f).val.toAssoc.word j = (f j).val.toAssoc.word 0 :=", "/-- If the word of `f` over the output `j` is the single letter `i`, then the output `j` has\nthe color of the input `i`. -/\nlemma Hom.color_eq_of_word_eq_singleton (f : X \u27f6 Y) {j : Fin Y.len} {i : Fin X.len}\n (h : f.toAssoc.word j = [i]) : Y.color j = X.color i :=", "/-- Every morphism of `LM^\u2297` over an inert map of `Fin_*` is strongly coCartesian for the\nfunctor `LM^\u2297 \u2964 Fin_*`. -/\ntheorem isStronglyCocartesian_of_isInert (\u03c6 : X \u27f6 Y) (h\u03c6 : \u03c6.toAssoc.base.IsInert) :\n toFinPointed.IsStronglyCocartesian \u03c6.toAssoc.base \u03c6 :=", "/-- The candidate target colors along a pointed map: an output is colored `m` when one of\nits preimages is. Every LM morphism has these target colors (`Hom.mk_pushforwardColor_eq`), but\nthis coloring alone does not guarantee a lift: a lift exists exactly when each fibre over an\nelement other than the basepoint contains at most one input colored `m`\n(`exists_hom_toAssoc_base_eq_iff`). -/\ndef pushforwardColor (X : LM.{u}) {k : \u2115} (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k)\n (j : Fin k) : Color :=\n if \u2203 i, f.toFun i.succ = j.succ \u2227 X.color i = .m then .m else .a", "/-- An output has color `m` exactly when some input over it has color `m`. -/\n@[simp]\nlemma pushforwardColor_eq_m_iff (X : LM.{u}) {k : \u2115}\n (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k) (j : Fin k) :\n X.pushforwardColor f j = .m \u2194 \u2203 i, f.toFun i.succ = j.succ \u2227 X.color i = .m :=", "/-- An output has color `a` exactly when every input over it has color `a`. -/\n@[simp]\nlemma pushforwardColor_eq_a_iff (X : LM.{u}) {k : \u2115}\n (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k) (j : Fin k) :\n X.pushforwardColor f j = .a \u2194 \u2200 i, f.toFun i.succ = j.succ \u2192 X.color i = .a :=", "/-- Every LM morphism has the target coloring prescribed by its underlying pointed map. -/\nlemma Hom.color_eq_pushforwardColor (f : X \u27f6 Y) (j : Fin Y.len) :\n Y.color j = X.pushforwardColor f.toAssoc.base j :=", "/-- An output with exactly one input has the color of that input. -/\nlemma pushforwardColor_eq_of_unique (X : LM.{u}) {k : \u2115}\n (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k) {i : Fin X.len} {j : Fin k}\n (hi : f.toFun i.succ = j.succ) (huniq : \u2200 i', f.toFun i'.succ = j.succ \u2192 i' = i) :\n X.pushforwardColor f j = X.color i :=", "/-- Along an inert map, each output has the color of its unique input. -/\nlemma pushforwardColor_eq_of_isInert (X : LM.{u}) {k : \u2115}\n (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k) (hf : f.IsInert)\n {i : Fin X.len} {j : Fin k} (hi : f.toFun i.succ = j.succ) :\n X.pushforwardColor f j = X.color i :=", "/-- The lift of a map `f : \u27e8n\u27e9 \u27f6 \u27e8k\u27e9` of `Fin_*` with source `X` each of whose fibres over the\nelements other than the basepoint contains at most one input colored `m`. Its target is `\u27e8k\u27e9`\ncolored along `f`, and its word over each output lists the inputs colored `a` increasingly,\nfollowed by the input colored `m` if there is one. -/\ndef Hom.ofBase (X : LM.{u}) {k : \u2115} (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k)\n (hf : \u2200 (j : Fin k) (i i' : Fin X.len), f.toFun i.succ = j.succ \u2192 f.toFun i'.succ = j.succ \u2192\n X.color i = .m \u2192 X.color i' = .m \u2192 i = i') :\n X \u27f6 \u27e8k, X.pushforwardColor f\u27e9 where\n toAssoc :=\n { base := f\n word j := (List.finRange X.len).filter (fun i \u21a6 f.toFun i.succ = j.succ \u2227 X.color i = .a) ++\n (List.finRange X.len).filter (fun i \u21a6 f.toFun i.succ = j.succ \u2227 X.color i = .m)\n mem_word_iff i j := by cases hc : X.color i <;> simp [hc]\n nodup_word j := ((List.nodup_finRange _).filter _).append ((List.nodup_finRange _).filter _)\n (List.disjoint_left.2 fun i hi hi' \u21a6 by simp_all) }\n isProfile j := by\n -- The target is a constructor application, so its color at `j` reduces to\n -- `X.pushforwardColor f j`.\n dsimp only\n -- The prefix of inputs colored `a` contains no color `m`.\n have hA : .m \u2209 ((List.finRange X.len).filter\n (fun i \u21a6 f.toFun i.succ = j.succ \u2227 X.color i = .a)).map X.color := by\n simp +contextual\n cases hc : X.pushforwardColor f j with\n | a =>\n rw [pushforwardColor_eq_a_iff] at hc\n -- No input over `j` is colored `m`, so the suffix of inputs colored `m` is empty.\n have hM : (List.finRange X.len).filter\n (fun i \u21a6 f.toFun i.succ = j.succ \u2227 X.color i = .m) = [] :=\n List.filter_eq_nil_iff.2 fun i _ \u21a6 by simp +contextual [hc i]\n rw [isProfile_a, hM, List.append_nil]\n exact hA\n | m =>\n obtain \u27e8i\u2080, hi\u2080, hc\u2080\u27e9 := (X.pushforwardColor_eq_m_iff f j).1 hc\n -- The only input colored `m` over `j` is `i\u2080`.\n have hM : (List.finRange X.len).filter\n (fun i \u21a6 f.toFun i.succ = j.succ \u2227 X.color i = .m) = [i\u2080] :=\n List.Perm.eq_singleton ((List.perm_ext_iff_of_nodup ((List.nodup_finRange _).filter _)\n (List.nodup_singleton i\u2080)).2 fun i \u21a6 by\n simp only [List.mem_filter, List.mem_finRange, true_and, decide_eq_true_eq,\n List.mem_singleton]\n exact \u27e8fun h \u21a6 hf j i i\u2080 h.1 hi\u2080 h.2 hc\u2080, fun h \u21a6 h \u25b8 \u27e8hi\u2080, hc\u2080\u27e9\u27e9)\n exact \u27e8_, hA, by rw [hM, List.map_append, List.map_singleton, hc\u2080]\u27e9", "@[simp]\nlemma Hom.ofBase_toAssoc_base (X : LM.{u}) {k : \u2115} (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k)\n (hf : \u2200 (j : Fin k) (i i' : Fin X.len), f.toFun i.succ = j.succ \u2192 f.toFun i'.succ = j.succ \u2192\n X.color i = .m \u2192 X.color i' = .m \u2192 i = i') :\n (Hom.ofBase X f hf).toAssoc.base = f :=", "/-- The word of `Hom.ofBase` over an output lists the inputs colored `a` over it increasingly,\nfollowed by the input colored `m` over it if there is one. -/\nlemma Hom.ofBase_toAssoc_word (X : LM.{u}) {k : \u2115}\n (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k)\n (hf : \u2200 (j : Fin k) (i i' : Fin X.len), f.toFun i.succ = j.succ \u2192 f.toFun i'.succ = j.succ \u2192\n X.color i = .m \u2192 X.color i' = .m \u2192 i = i') (j : Fin k) :\n (Hom.ofBase X f hf).toAssoc.word j =\n (List.finRange X.len).filter (fun i \u21a6 f.toFun i.succ = j.succ \u2227 X.color i = .a) ++\n (List.finRange X.len).filter (fun i \u21a6 f.toFun i.succ = j.succ \u2227 X.color i = .m) :=", "/-- The lift of an inert map `f : \u27e8n\u27e9 \u27f6 \u27e8k\u27e9` of `Fin_*` with source `X`: its target is `\u27e8k\u27e9`\ncolored along `f`, and its words are the one-letter fibres of `f`. It is `Hom.ofBase`, whose\nfibre condition holds since the fibres of `f` over the elements other than the basepoint are\nsingletons. -/\ndef Hom.ofInert (X : LM.{u}) {k : \u2115} (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k)\n (hf : f.IsInert) : X \u27f6 \u27e8k, X.pushforwardColor f\u27e9 :=\n Hom.ofBase X f fun _ _ _ hi hi' _ _ \u21a6 hf.eq_of_toFun_succ_eq hi hi'", "@[simp]\nlemma Hom.ofInert_toAssoc (X : LM.{u}) {k : \u2115} (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k)\n (hf : f.IsInert) : (Hom.ofInert X f hf).toAssoc = Assoc.Hom.ofBase f :=", "/-- The target of every morphism is its source colored along its underlying map. -/\nlemma Hom.mk_pushforwardColor_eq (\u03c6 : X \u27f6 Y) :\n (\u27e8Y.len, X.pushforwardColor \u03c6.toAssoc.base\u27e9 : LM.{u}) = Y :=", "/-- Every morphism over an inert map is the lift `Hom.ofInert` of that map, followed by the\nidentification `Hom.mk_pushforwardColor_eq` of its target with the source colored along that\nmap. -/\nlemma Hom.ofInert_comp_eqToHom (\u03c6 : X \u27f6 Y) (h\u03c6 : \u03c6.toAssoc.base.IsInert) :\n Hom.ofInert X \u03c6.toAssoc.base h\u03c6 \u226b eqToHom \u03c6.mk_pushforwardColor_eq = \u03c6 :=", "/-- The lift of an inert map with a given source is strongly coCartesian. -/\nlemma isStronglyCocartesian_ofInert (X : LM.{u}) {k : \u2115}\n (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k) (hf : f.IsInert) :\n toFinPointed.IsStronglyCocartesian f (Hom.ofInert X f hf) :=", "/-- A map `f : \u27e8n\u27e9 \u27f6 \u27e8k\u27e9` of `Fin_*` lifts to `LM^\u2297` with source `X`, necessarily with target\n`\u27e8k\u27e9` colored along `f` (`Hom.mk_pushforwardColor_eq`), exactly when each of its fibres over the\nelements other than the basepoint contains at most one input colored `m`. -/\ntheorem exists_hom_toAssoc_base_eq_iff (X : LM.{u}) {k : \u2115}\n (f : FinPointed.mk.{u} X.len \u27f6 FinPointed.mk k) :\n (\u2203 \u03c6 : X \u27f6 \u27e8k, X.pushforwardColor f\u27e9, \u03c6.toAssoc.base = f) \u2194\n \u2200 (j : Fin k) (i i' : Fin X.len), f.toFun i.succ = j.succ \u2192 f.toFun i'.succ = j.succ \u2192\n X.color i = .m \u2192 X.color i' = .m \u2192 i = i' :=", "end LM\n\nnamespace Assoc\n\n/-- The inclusion `Assoc^\u2297 \u2964 LM^\u2297` of the associative operad, coloring every element by `a`. -/\n@[expose]\ndef toLM : Assoc.{u} \u2964 LM.{u} where\n obj X := \u27e8X.len, fun _ \u21a6 .a\u27e9\n map f := \u27e8f, fun _ \u21a6 by simp\u27e9", "@[simp]\nlemma toLM_obj_len (X : Assoc.{u}) : (toLM.obj X).len = X.len :=", "@[simp]\nlemma toLM_obj_color (X : Assoc.{u}) (i : Fin X.len) : (toLM.obj X).color i = .a :=", "@[simp]\nlemma toLM_map_toAssoc {X Y : Assoc.{u}} (f : X \u27f6 Y) : (toLM.map f).toAssoc = f :=", "/-- The inclusion `Assoc^\u2297 \u2964 LM^\u2297` is fully faithful: between objects colored by `a` only, every\nmorphism of `Assoc^\u2297` has admissible profiles. -/\ndef fullyFaithfulToLM : toLM.{u}.FullyFaithful where\n preimage f := f.toAssoc\n\ninstance : toLM.{u}.Full := fullyFaithfulToLM.full\n\ninstance : toLM.{u}.Faithful := fullyFaithfulToLM.faithful", "/-- Forgetting the colors of the inclusion `Assoc^\u2297 \u2964 LM^\u2297` gives back `Assoc^\u2297`. -/\n@[simp]\nlemma toLM_comp_toAssoc : toLM.{u} \u22d9 LM.toAssoc = \ud835\udfed _ :=", "/-- The inclusion `Assoc^\u2297 \u2964 LM^\u2297` lies over `Fin_*`. -/\n@[simp]\nlemma toLM_comp_toFinPointed : toLM.{u} \u22d9 LM.toFinPointed = toFinPointed :=", "end Assoc\n\nend TauCeti"], "free_length": 4515, "file_length": 15225, "heartbeats": 10493, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Examples.Dynamics.Billiard.RotationNumber", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Examples/Dynamics/Billiard/RotationNumber.lean", "module": "TauCeti.Examples.Dynamics.Billiard.RotationNumber", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Dynamics.Billiard.Circle\nimport Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse\nimport Mathlib.NumberTheory.Real.Irrational\n\n/-!\n# Strict comparison of rotation numbers and periodic orbits: checks\n\nChecks for `CircleDeg1Lift.translationNumber_lt_of_forall_lt_of_irrational_left` and for the\nperiodic orbits on invariant graphs of the billiard map\n(`TauCeti.StrictConvexBilliardTable.IsInvariantGraph.rotationNumber_eq_div_iff`,\n`TauCeti.StrictConvexBilliardTable.IsInvariantGraph.iterate_nextCollision_ne_of_irrational`).\n\n* The translations `g\u2081(x) = x + \u03b1` and `g\u2082(x) = x + \u03b1 + 1/10`, with `\u03b1 = \u221a2/2`: `q = 7`, `p = 5`\n is one admissible choice of the `q`, `p` given by `Irrational.exists_int_sub_nat_mul_mem_Ioo`\n for `\u03b5 = 1/10`, that is `0 < p - q \u03b1 < 1/10`, and the translation number of `g\u2082` is larger\n than `\u03b1`.\n* On the circular table of radius `R`, the constant graph `v = 0` (angle `\u03b4 = \u03c0 / 2`) has\n rotation number `1/2` and carries a periodic orbit of type `(1, 2)`; the constant graph\n `v = cos (\u03c0 \u221a2/2)` (angle `\u03b4 = \u03c0 \u221a2/2`) has rotation number `\u221a2/2` and carries no periodic orbit.\n-/\n\npublic section\n\nnoncomputable section\n\nopen Real Set\n\nnamespace TauCeti.Examples.BilliardRotationNumber\n\n/-- An admissible choice `q = 7`, `p = 5` for `\u03b1 = \u221a2/2` and `\u03b5 = 1/10`: `0 < 5 - 7 \u03b1 < 1/10`. -/\ntheorem five_sub_seven_mul_mem_Ioo : (5 : \u211d) - 7 * (\u221a2 / 2) \u2208 Ioo 0 (1 / 10) := by\n have h\u2081 : \u221a2 < 1.4143 := by\n rw [sqrt_lt' (by norm_num)]\n norm_num\n have h\u2082 : 1.4142 < \u221a2 := by\n rw [lt_sqrt (by norm_num)]\n norm_num\n constructor <;> linarith\n\n/-- Strict comparison at the irrational value `\u03b1 = \u221a2/2`: the translation by `\u03b1 + 1/10` has\ntranslation number larger than `\u03b1`. -/\ntheorem translationNumber_lt_translate :\n (\u221a2 / 2 : \u211d) <\n (CircleDeg1Lift.translate (Multiplicative.ofAdd (\u221a2 / 2 + 1 / 10)) :\n CircleDeg1Lift).translationNumber := by\n have h := CircleDeg1Lift.translationNumber_lt_of_forall_lt_of_irrational_left\n (f := (CircleDeg1Lift.translate (Multiplicative.ofAdd (\u221a2 / 2)) : CircleDeg1Lift))\n (g := (CircleDeg1Lift.translate (Multiplicative.ofAdd (\u221a2 / 2 + 1 / 10)) : CircleDeg1Lift))\n (CircleDeg1Lift.continuous_translate _) (CircleDeg1Lift.continuous_translate _)\n (fun x \u21a6 by simp only [CircleDeg1Lift.translate_apply]; linarith)\n (by\n rw [CircleDeg1Lift.translationNumber_translate]\n exact irrational_sqrt_two.div_natCast two_ne_zero)\n rwa [CircleDeg1Lift.translationNumber_translate] at h\n\nattribute [local instance] Complex.finrank_real_complex_fact\n\nvariable {R : \u211d} (hR : 0 < R)\n\nopen StrictConvexBilliardTable\n\n/-- The angle `\u03b4 = \u03c0 / 2` of the circular table: the graph `v = 0` has rotation number `1/2` and\ncarries a periodic orbit of type `(1, 2)`. -/\ntheorem exists_periodic_circle_zero :\n \u2203 s, (circle hR).nextCollision^[2] (s, 0) = (s + (circle hR).period, 0) := by\n have hc : (0 : \u211d) \u2208 Ioo (-1) 1 := by norm_num\n have h\u03c1 := rotationNumber_circle hR hc\n rw [arccos_zero, div_div_cancel_left\u2080 pi_ne_zero] at h\u03c1\n obtain \u27e8s, hs\u27e9 := ((isInvariantGraph_circle hR hc).rotationNumber_eq_div_iff contDiff_circle\n (p := 1) (q := 2) two_pos).1 (by rw [h\u03c1]; norm_num)\n exact \u27e8s, by simpa using hs\u27e9\n\n/-- The angle `\u03b4 = \u03c0 \u221a2/2` of the circular table: the graph `v = cos (\u03c0 \u221a2/2)` has rotation\nnumber `\u221a2/2`, which is irrational, and carries no periodic orbit. -/\ntheorem iterate_nextCollision_ne_circle_sqrt_two {q : \u2115} (hq : 0 < q) (p : \u2124) (s : \u211d) :\n (circle hR).nextCollision^[q] (s, cos (\u03c0 * (\u221a2 / 2))) \u2260\n (s + p * (circle hR).period, cos (\u03c0 * (\u221a2 / 2))) := by\n have h\u03b1\u2080 : 0 < \u221a2 / 2 := by positivity\n have h\u03b1\u2081 : \u221a2 / 2 < 1 := by\n rw [div_lt_one two_pos, sqrt_lt' two_pos]\n norm_num\n have hx\u2080 : 0 < \u03c0 * (\u221a2 / 2) := mul_pos pi_pos h\u03b1\u2080\n have hx\u2081 : \u03c0 * (\u221a2 / 2) < \u03c0 := mul_lt_of_lt_one_right pi_pos h\u03b1\u2081\n have hc : cos (\u03c0 * (\u221a2 / 2)) \u2208 Ioo (-1) 1 := by\n constructor\n \u00b7 rw [\u2190 cos_pi]\n exact strictAntiOn_cos \u27e8hx\u2080.le, hx\u2081.le\u27e9 \u27e8pi_pos.le, le_rfl\u27e9 hx\u2081\n \u00b7 rw [\u2190 cos_zero]\n exact strictAntiOn_cos \u27e8le_rfl, pi_pos.le\u27e9 \u27e8hx\u2080.le, hx\u2081.le\u27e9 hx\u2080\n refine (isInvariantGraph_circle hR hc).iterate_nextCollision_ne_of_irrational contDiff_circle\n ?_ hq p s\n rw [rotationNumber_circle hR hc, arccos_cos hx\u2080.le hx\u2081.le, mul_div_cancel_left\u2080 _ pi_ne_zero]\n exact irrational_sqrt_two.div_natCast two_ne_zero\n\nend TauCeti.Examples.BilliardRotationNumber\n", "public_theorems": ["TauCeti.Examples.BilliardRotationNumber.five_sub_seven_mul_mem_Ioo", "TauCeti.Examples.BilliardRotationNumber.translationNumber_lt_translate", "TauCeti.Examples.BilliardRotationNumber.exists_periodic_circle_zero", "TauCeti.Examples.BilliardRotationNumber.iterate_nextCollision_ne_circle_sqrt_two"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Dynamics.Billiard.Circle\nimport Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse\nimport Mathlib.NumberTheory.Real.Irrational\n\n/-!\n# Strict comparison of rotation numbers and periodic orbits: checks\n\nChecks for `CircleDeg1Lift.translationNumber_lt_of_forall_lt_of_irrational_left` and for the\nperiodic orbits on invariant graphs of the billiard map\n(`TauCeti.StrictConvexBilliardTable.IsInvariantGraph.rotationNumber_eq_div_iff`,\n`TauCeti.StrictConvexBilliardTable.IsInvariantGraph.iterate_nextCollision_ne_of_irrational`).\n\n* The translations `g\u2081(x) = x + \u03b1` and `g\u2082(x) = x + \u03b1 + 1/10`, with `\u03b1 = \u221a2/2`: `q = 7`, `p = 5`\n is one admissible choice of the `q`, `p` given by `Irrational.exists_int_sub_nat_mul_mem_Ioo`\n for `\u03b5 = 1/10`, that is `0 < p - q \u03b1 < 1/10`, and the translation number of `g\u2082` is larger\n than `\u03b1`.\n* On the circular table of radius `R`, the constant graph `v = 0` (angle `\u03b4 = \u03c0 / 2`) has\n rotation number `1/2` and carries a periodic orbit of type `(1, 2)`; the constant graph\n `v = cos (\u03c0 \u221a2/2)` (angle `\u03b4 = \u03c0 \u221a2/2`) has rotation number `\u221a2/2` and carries no periodic orbit.\n-/\n\npublic section\n\nnoncomputable section\n\nopen Real Set\n\nnamespace TauCeti.Examples.BilliardRotationNumber", "/-- An admissible choice `q = 7`, `p = 5` for `\u03b1 = \u221a2/2` and `\u03b5 = 1/10`: `0 < 5 - 7 \u03b1 < 1/10`. -/\ntheorem five_sub_seven_mul_mem_Ioo : (5 : \u211d) - 7 * (\u221a2 / 2) \u2208 Ioo 0 (1 / 10) :=", "/-- Strict comparison at the irrational value `\u03b1 = \u221a2/2`: the translation by `\u03b1 + 1/10` has\ntranslation number larger than `\u03b1`. -/\ntheorem translationNumber_lt_translate :\n (\u221a2 / 2 : \u211d) <\n (CircleDeg1Lift.translate (Multiplicative.ofAdd (\u221a2 / 2 + 1 / 10)) :\n CircleDeg1Lift).translationNumber :=", "attribute [local instance] Complex.finrank_real_complex_fact\n\nvariable {R : \u211d} (hR : 0 < R)\n\nopen StrictConvexBilliardTable", "/-- The angle `\u03b4 = \u03c0 / 2` of the circular table: the graph `v = 0` has rotation number `1/2` and\ncarries a periodic orbit of type `(1, 2)`. -/\ntheorem exists_periodic_circle_zero :\n \u2203 s, (circle hR).nextCollision^[2] (s, 0) = (s + (circle hR).period, 0) :=", "/-- The angle `\u03b4 = \u03c0 \u221a2/2` of the circular table: the graph `v = cos (\u03c0 \u221a2/2)` has rotation\nnumber `\u221a2/2`, which is irrational, and carries no periodic orbit. -/\ntheorem iterate_nextCollision_ne_circle_sqrt_two {q : \u2115} (hq : 0 < q) (p : \u2124) (s : \u211d) :\n (circle hR).nextCollision^[q] (s, cos (\u03c0 * (\u221a2 / 2))) \u2260\n (s + p * (circle hR).period, cos (\u03c0 * (\u221a2 / 2))) :=", "end TauCeti.Examples.BilliardRotationNumber"], "free_length": 1736, "file_length": 2718, "heartbeats": 4536, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.LinearAlgebra.ExteriorPower.Decomposable", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/LinearAlgebra/ExteriorPower/Decomposable.lean", "module": "TauCeti.LinearAlgebra.ExteriorPower.Decomposable", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.LinearAlgebra.Dual.Lemmas\npublic import Mathlib.LinearAlgebra.ExteriorPower.Basis\npublic import TauCeti.LinearAlgebra.ExteriorPower.WedgePairing\nimport TauCeti.LinearAlgebra.ExteriorAlgebra.Contraction\n\n/-!\n# Decomposable exterior vectors\n\nAn element `\u03b8` of the exterior power `\u22c0\u02b3 V` is *decomposable* if it is an exterior product\n`v\u2081 \u2227 \u22ef \u2227 v\u1d63` of vectors, that is, if it lies in the range of `exteriorPower.\u03b9Multi`. Over a field,\nthe nonzero decomposable vectors are the affine cone over the Pl\u00fccker image of the Grassmannian of\n`r`-dimensional subspaces of `V`, and this file gives the classical basis-free equations cutting\nit out.\n\nFor `\u03b7 \u2208 \u22c0\u207f V*` and `\u03b8 \u2208 \u22c0\u207f\u207a\u00b9 V` the contraction `\u03b9_\u03b7 \u03b8 \u2208 V` (`exteriorPower.contract`) is\ncharacterized by `\u03be (\u03b9_\u03b7 \u03b8) = \u27e8\u03b7 \u2227 \u03be, \u03b8\u27e9` for `\u03be \u2208 V*`, where `\u27e8-, -\u27e9` is the natural pairing\n`exteriorPower.pairingDual` between `\u22c0\u207f\u207a\u00b9 V*` and `\u22c0\u207f\u207a\u00b9 V`. It is defined for every reflexive\nmodule over a commutative ring. On `\u03b8 = v\u2080 \u2227 \u22ef \u2227 v\u2099` it is an explicit combination of the `v\u1d62`\n(`exteriorPower.contract_\u03b9Multi`), so it takes values in the span of the `v\u1d62`, and\nfor linearly independent `v\u1d62` its values are exactly that span: contracting by the exterior\nproduct of a dual family with one member removed returns the corresponding `v\u209a` up to sign.\n\nThe main result is the decomposability criterion, in every characteristic: for `r + 1 \u2265 1` and\n`\u03b8 \u2208 \u22c0\u02b3\u207a\u00b9 V` with `V` finite-dimensional over a field,\n\n`\u03b8` is decomposable `\u2194 (\u03b9_\u03b7 \u03b8) \u2227 \u03b8 = 0` for every `\u03b7 \u2208 \u22c0\u02b3 V*`.\n\nDecomposable vectors satisfy the equations because each `\u03b9_\u03b7 \u03b8` lies in the span of the factors\nof `\u03b8`. Conversely, let `A` be the subspace of vectors `w` with `\u03b8 \u2227 w = 0`, and extend a basis of\n`A` to a basis `e` of `V`. A coordinate of `\u03b8` in the induced basis of `\u22c0\u02b3\u207a\u00b9 V` vanishes if its\nindex set misses a basis vector of `A` (Laplace expansion of the pairing,\n`exteriorPower.pairingDual_\u03b9Multi_wedge`), and it also vanishes if its index set contains a\nbasis vector outside `A`, because the dual coordinate of that vector kills every `\u03b9_\u03b7 \u03b8 \u2208 A`.\nSo `\u03b8` has at most one nonzero coordinate and is decomposable.\n\nThe zero vector is decomposable in every positive degree. The criterion is stated in positive\ndegree `r + 1`; in degree `0` the exterior power is `K` (`exteriorPower.zeroEquiv`) and every\nelement is a multiple of the empty product. When `r + 1 > dim V` the exterior power vanishes\n(`exteriorPower.eq_zero_of_finrank_lt`) and both sides of the criterion hold trivially.\n\n## Main definitions\n\n* `exteriorPower.contract`: the contraction `\u03b9_\u03b7 \u03b8` of `\u03b8 \u2208 \u22c0\u207f\u207a\u00b9 M` by `\u03b7 \u2208 \u22c0\u207f M*`.\n* `exteriorPower.rangeContractBasis`: the basis `v\u2080, \u2026, v\u1d63` of the contraction image of\n `v\u2080 \u2227 \u22ef \u2227 v\u1d63` for linearly independent `v\u1d62`.\n\n## Main results\n\n* `exteriorPower.mem_range_\u03b9Multi_iff_forall_\u03b9_contract_mul_eq_zero`: **the decomposability\n criterion** `\u03b8 \u2208 range \u03b9Multi \u2194 \u2200 \u03b7, (\u03b9_\u03b7 \u03b8) \u2227 \u03b8 = 0`.\n* `exteriorPower.range_contract_flip_\u03b9Multi`: for linearly independent `v`, the contractions of\n `v\u2080 \u2227 \u22ef \u2227 v\u1d63` form the span of the `v\u1d62`.\n* `exteriorPower.contract_\u03b9Multi`: the expansion of `\u03b9_\u03b7 (v\u2080 \u2227 \u22ef \u2227 v\u2099)` in the `v\u1d62`.\n* `exteriorPower.mem_range_\u03b9Multi_of_subsingleton_support_repr`: an element with at most one\n nonzero coordinate in the basis induced by a basis of `M` is decomposable.\n\n## References\n\n* P. Griffiths, J. Harris, *Principles of Algebraic Geometry*, Wiley (1978), Chapter 1, \u00a75\n (the Pl\u00fccker relations).\n* J. Harris, *Algebraic Geometry: A First Course*, GTM 133, Springer (1992), Lecture 6.\n-/\n\npublic section\n\nopen Module Submodule\n\nnamespace exteriorPower\n\nsection Contract\n\nvariable (R M : Type*) [CommRing R] [AddCommGroup M] [Module R M] [IsReflexive R M] (n : \u2115)\n\n/-- The contraction `\u03b9_\u03b7 \u03b8 \u2208 M` of `\u03b8 \u2208 \u22c0\u207f\u207a\u00b9 M` by `\u03b7 \u2208 \u22c0\u207f M*`, characterized by\n`\u03be (\u03b9_\u03b7 \u03b8) = \u27e8\u03b7 \u2227 \u03be, \u03b8\u27e9` for every `\u03be \u2208 M*` (`exteriorPower.apply_contract`), where `\u27e8-, -\u27e9` is\n`exteriorPower.pairingDual`. -/\nnoncomputable def contract : \u22c0[R]^n (Dual R M) \u2192\u2097[R] \u22c0[R]^(n + 1) M \u2192\u2097[R] M :=\n LinearMap.mk\u2082 R\n (fun \u03b7 \u03b8 \u21a6 (evalEquiv R M).symm\n ((pairingDual R M (n + 1)).flip \u03b8 \u2218\u2097 wedge R (Dual R M) n 1 \u03b7 \u2218\u2097\n (oneEquiv R (Dual R M)).symm.toLinearMap))\n (fun \u03b7\u2081 \u03b7\u2082 \u03b8 \u21a6 by apply (evalEquiv R M).injective; ext \u03be; simp)\n (fun c \u03b7 \u03b8 \u21a6 by apply (evalEquiv R M).injective; ext \u03be; simp)\n (fun \u03b7 \u03b8\u2081 \u03b8\u2082 \u21a6 by apply (evalEquiv R M).injective; ext \u03be; simp)\n (fun c \u03b7 \u03b8 \u21a6 by apply (evalEquiv R M).injective; ext \u03be; simp)\n\nvariable {R M n}\n\n/-- The defining property of the contraction: `\u03be (\u03b9_\u03b7 \u03b8) = \u27e8\u03b7 \u2227 \u03be, \u03b8\u27e9`. -/\ntheorem apply_contract (\u03b7 : \u22c0[R]^n (Dual R M)) (\u03b8 : \u22c0[R]^(n + 1) M) (\u03be : Dual R M) :\n \u03be (contract R M n \u03b7 \u03b8) =\n pairingDual R M (n + 1) (wedge R (Dual R M) n 1 \u03b7 ((oneEquiv R (Dual R M)).symm \u03be)) \u03b8 := by\n simp [contract]\n\n/-- The contraction by an exterior product `f\u2080 \u2227 \u22ef \u2227 f\u2099\u208b\u2081` of linear forms:\n`\u03be (\u03b9_\u03b7 \u03b8) = \u27e8f\u2080 \u2227 \u22ef \u2227 f\u2099\u208b\u2081 \u2227 \u03be, \u03b8\u27e9`. -/\n@[simp]\ntheorem apply_contract_\u03b9Multi (f : Fin n \u2192 Dual R M) (\u03b8 : \u22c0[R]^(n + 1) M) (\u03be : Dual R M) :\n \u03be (contract R M n (\u03b9Multi R n f) \u03b8) =\n pairingDual R M (n + 1) (\u03b9Multi R (n + 1) (Fin.snoc f \u03be)) \u03b8 := by\n rw [apply_contract, oneEquiv_symm_apply, wedge_\u03b9Multi, Fin.append_right_eq_snoc]\n\n/-- **Expansion of a contraction of a decomposable vector**:\n`\u03b9_\u03b7 (v\u2080 \u2227 \u22ef \u2227 v\u2099) = \u2211\u2c7c (-1) ^ (j + n) \u27e8\u03b7, v\u2080 \u2227 \u22ef \u2227 v\u0302\u2c7c \u2227 \u22ef \u2227 v\u2099\u27e9 v\u2c7c`. -/\ntheorem contract_\u03b9Multi (\u03b7 : \u22c0[R]^n (Dual R M)) (v : Fin (n + 1) \u2192 M) :\n contract R M n \u03b7 (\u03b9Multi R (n + 1) v) =\n \u2211 j : Fin (n + 1),\n ((-1 : R) ^ (j + n : \u2115) * pairingDual R M n \u03b7 (\u03b9Multi R n (v \u2218 j.succAbove))) \u2022 v j := by\n apply (evalEquiv R M).injective\n ext \u03be\n simp only [evalEquiv_apply, Dual.eval_apply, map_sum, map_smul, LinearMap.sum_apply,\n LinearMap.smul_apply, smul_eq_mul]\n -- Both sides are linear in `\u03b7`, so it suffices to treat `\u03b7 = f\u2080 \u2227 \u22ef \u2227 f\u2099\u208b\u2081`.\n have h : \u03be \u2218\u2097 (contract R M n).flip (\u03b9Multi R (n + 1) v) =\n \u2211 j : Fin (n + 1), ((-1 : R) ^ (j + n : \u2115) * \u03be (v j)) \u2022\n (pairingDual R M n).flip (\u03b9Multi R n (v \u2218 j.succAbove)) := by\n refine linearMap_ext (AlternatingMap.ext fun f \u21a6 ?_)\n simp only [LinearMap.compAlternatingMap_apply, LinearMap.comp_apply, LinearMap.flip_apply,\n LinearMap.sum_apply, apply_contract_\u03b9Multi, pairingDual_\u03b9Multi_\u03b9Multi]\n rw [Matrix.det_succ_column _ (Fin.last n)]\n refine Finset.sum_congr rfl fun j _ \u21a6 ?_\n rw [LinearMap.smul_apply, LinearMap.flip_apply, pairingDual_\u03b9Multi_\u03b9Multi, smul_eq_mul]\n simp [Fin.succAbove_last, Matrix.submatrix]\n have h\u03b7 := LinearMap.congr_fun h \u03b7\n rw [LinearMap.sum_apply] at h\u03b7\n simp only [LinearMap.comp_apply, LinearMap.flip_apply, LinearMap.smul_apply, smul_eq_mul] at h\u03b7\n rw [h\u03b7]\n exact Finset.sum_congr rfl fun j _ \u21a6 by ring\n\n/-- Contracting `v\u2080 \u2227 \u22ef \u2227 v\u2099` by the exterior product of a dual family with its `p`-th member\nremoved recovers `v\u209a`, up to the sign `(-1) ^ (p + n)`. -/\ntheorem contract_\u03b9Multi_comp_succAbove_\u03b9Multi {g : Fin (n + 1) \u2192 Dual R M}\n {v : Fin (n + 1) \u2192 M} (hgv : \u2200 i j, g i (v j) = if i = j then 1 else 0) (p : Fin (n + 1)) :\n contract R M n (\u03b9Multi R n (g \u2218 p.succAbove)) (\u03b9Multi R (n + 1) v) =\n (-1 : R) ^ (p + n : \u2115) \u2022 v p := by\n rw [contract_\u03b9Multi, Finset.sum_eq_single p]\n \u00b7 have h1 : (Matrix.of fun i j \u21a6 (g \u2218 p.succAbove) j ((v \u2218 p.succAbove) i)) = 1 := by\n ext i j\n simp [hgv, Matrix.one_apply, eq_comm]\n rw [pairingDual_\u03b9Multi_\u03b9Multi, h1, Matrix.det_one, mul_one]\n \u00b7 intro j _ hjp\n obtain \u27e8k, hk\u27e9 := Fin.exists_succAbove_eq (Ne.symm hjp)\n rw [pairingDual_\u03b9Multi_\u03b9Multi, Matrix.det_eq_zero_of_row_eq_zero k fun i \u21a6 by\n simp [hk, hgv, Fin.succAbove_ne], mul_zero, zero_smul]\n \u00b7 simp\n\n/-- The contractions of `v\u2080 \u2227 \u22ef \u2227 v\u2099` lie in the span of the `v\u1d62`. -/\ntheorem contract_\u03b9Multi_mem_span (\u03b7 : \u22c0[R]^n (Dual R M)) (v : Fin (n + 1) \u2192 M) :\n contract R M n \u03b7 (\u03b9Multi R (n + 1) v) \u2208 span R (Set.range v) := by\n rw [contract_\u03b9Multi]\n exact sum_mem fun j _ \u21a6 smul_mem _ _ (subset_span \u27e8j, rfl\u27e9)\n\n/-- A decomposable vector satisfies the contraction equations: `(\u03b9_\u03b7 \u03b8) \u2227 \u03b8 = 0` for\n`\u03b8 = v\u2080 \u2227 \u22ef \u2227 v\u2099`. -/\ntheorem \u03b9_contract_mul_\u03b9Multi_eq_zero (\u03b7 : \u22c0[R]^n (Dual R M)) (v : Fin (n + 1) \u2192 M) :\n ExteriorAlgebra.\u03b9 R (contract R M n \u03b7 (\u03b9Multi R (n + 1) v)) *\n ExteriorAlgebra.\u03b9Multi R (n + 1) v = 0 := by\n rw [contract_\u03b9Multi, map_sum, Finset.sum_mul]\n refine Finset.sum_eq_zero fun j _ \u21a6 ?_\n have h := (ExteriorAlgebra.\u03b9Multi R (n + 2)).map_eq_zero_of_eq (Fin.cons (v j) v)\n (i := 0) (j := j.succ) (by simp) (Fin.succ_ne_zero j).symm\n rw [ExteriorAlgebra.\u03b9Multi_succ_apply] at h\n simp only [Matrix.vecTail, Fin.cons_zero, Fin.cons_comp_succ] at h\n rw [map_smul, smul_mul_assoc, h, smul_zero]\n\nend Contract\n\nsection Coordinates\n\nvariable {R M : Type*} [CommRing R] [AddCommGroup M] [Module R M] {n : \u2115}\n\nvariable {I : Type*} [LinearOrder I] (b : Basis I R M)\n\n/-- If `\u03b8 \u2227 b\u1d62 = 0`, then every coordinate of `\u03b8` in the basis `b.exteriorPower n` at an index set\nnot containing `i` vanishes. -/\ntheorem basis_repr_eq_zero_of_mul_\u03b9_eq_zero (\u03b8 : \u22c0[R]^n M) {i : I}\n (hi : (\u03b8 : ExteriorAlgebra R M) * ExteriorAlgebra.\u03b9 R (b i) = 0)\n {t : Set.powersetCard I n} (hit : i \u2209 t.val) : (b.exteriorPower n).repr \u03b8 t = 0 := by\n classical\n set f := b.coord \u2218 Set.powersetCard.ofFinEmbEquiv.symm t\n have hwedge : wedge R M n 1 \u03b8 ((oneEquiv R M).symm (b i)) = 0 := by\n ext1\n simpa [coe_wedge, oneEquiv_symm_apply, ExteriorAlgebra.\u03b9Multi_succ_apply] using hi\n have hf (k : Fin n) : f k (b i) = 0 := by\n have hk : Set.powersetCard.ofFinEmbEquiv.symm t k \u2260 i := fun hk \u21a6\n hit ((Set.powersetCard.mem_range_ofFinEmbEquiv_symm_iff_mem t i).mp \u27e8k, hk\u27e9)\n simp [f, Basis.coord_apply, hk]\n have h := pairingDual_\u03b9Multi_wedge (Fin.snoc f (b.coord i)) \u03b8 (b i)\n rw [hwedge, map_zero, Fin.sum_univ_castSucc] at h\n rw [basis_repr_apply, \u03b9MultiDual, \u03b9Multi_family]\n simpa [hf, Fin.succAbove_last, Fin.snoc_comp_castSucc] using h.symm\n\n/-- If the dual coordinate `b\u2c7c^*` kills every contraction of `\u03b8`, then every coordinate of `\u03b8` in\nthe basis `b.exteriorPower (n + 1)` at an index set containing `j` vanishes. -/\ntheorem basis_repr_eq_zero_of_coord_contract_eq_zero [IsReflexive R M] (\u03b8 : \u22c0[R]^(n + 1) M)\n {j : I} (hj : \u2200 \u03b7 : \u22c0[R]^n (Dual R M), b.coord j (contract R M n \u03b7 \u03b8) = 0)\n {t : Set.powersetCard I (n + 1)} (hjt : j \u2208 t.val) :\n (b.exteriorPower (n + 1)).repr \u03b8 t = 0 := by\n classical\n set f := b.coord \u2218 Set.powersetCard.ofFinEmbEquiv.symm t\n obtain \u27e8p, hp\u27e9 := (Set.powersetCard.mem_range_ofFinEmbEquiv_symm_iff_mem t j).mpr hjt\n set \u03c3 := Equiv.swap p (Fin.last n)\n have hlast : (f \u2218 \u03c3) (Fin.last n) = b.coord j := by simp [f, \u03c3, hp]\n -- Move the index `j` to the last place; the pairing changes by the sign of `\u03c3`.\n have h := hj (\u03b9Multi R n (Fin.init (f \u2218 \u03c3)))\n rw [apply_contract_\u03b9Multi, \u2190 hlast, Fin.snoc_init_self, AlternatingMap.map_perm,\n Units.smul_def, map_zsmul, LinearMap.smul_apply] at h\n rw [basis_repr_apply, \u03b9MultiDual, \u03b9Multi_family]\n rcases Int.units_eq_one_or (Equiv.Perm.sign \u03c3) with hs | hs <;> simpa [hs] using h\n\n/-- An element of `\u22c0\u207f\u207a\u00b9 M` with at most one nonzero coordinate in the basis `b.exteriorPower`\nis decomposable. -/\ntheorem mem_range_\u03b9Multi_of_subsingleton_support_repr (\u03b8 : \u22c0[R]^(n + 1) M)\n (h : (((b.exteriorPower (n + 1)).repr \u03b8).support :\n Set (Set.powersetCard I (n + 1))).Subsingleton) :\n \u03b8 \u2208 Set.range (\u03b9Multi R (n + 1)) := by\n classical\n by_cases h0 : \u2203 t, (b.exteriorPower (n + 1)).repr \u03b8 t \u2260 0\n \u00b7 obtain \u27e8t\u2080, ht\u2080\u27e9 := h0\n have h\u03b8 : \u03b8 = (b.exteriorPower (n + 1)).repr \u03b8 t\u2080 \u2022 b.exteriorPower (n + 1) t\u2080 := by\n have hs := Finsupp.support_subset_singleton.1\n ((Finset.coe_eq_singleton.1 (h.eq_singleton_of_mem (Finsupp.mem_support_iff.2 ht\u2080))).le)\n rw [\u2190 Basis.repr_symm_single, \u2190 hs, LinearEquiv.symm_apply_apply]\n rw [h\u03b8, basis_apply, \u03b9Multi_family]\n set w := b \u2218 Set.powersetCard.ofFinEmbEquiv.symm t\u2080\n refine \u27e8Function.update w 0 ((b.exteriorPower (n + 1)).repr \u03b8 t\u2080 \u2022 w 0), ?_\u27e9\n rw [AlternatingMap.map_update_smul, Function.update_eq_self]\n \u00b7 push Not at h0\n have h\u03b8 : \u03b8 = 0 := (b.exteriorPower (n + 1)).ext_elem (by simpa using h0)\n exact \u27e80, by rw [h\u03b8, (\u03b9Multi R (n + 1)).map_coord_zero 0 rfl]\u27e9\n\nend Coordinates\n\nsection Field\n\nvariable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] [FiniteDimensional K V] {r : \u2115}\n\n/-- **The contraction image of a nonzero decomposable vector.** For linearly independent\n`v\u2080, \u2026, v\u1d63`, the contractions `\u03b9_\u03b7 (v\u2080 \u2227 \u22ef \u2227 v\u1d63)`, `\u03b7 \u2208 \u22c0\u02b3 V*`, form the span of the `v\u1d62`. Its\nbasis `v\u1d62` is `exteriorPower.rangeContractBasis`. -/\ntheorem range_contract_flip_\u03b9Multi {v : Fin (r + 1) \u2192 V} (hv : LinearIndependent K v) :\n LinearMap.range ((contract K V r).flip (\u03b9Multi K (r + 1) v)) = span K (Set.range v) := by\n refine le_antisymm ?_ (span_le.mpr ?_)\n \u00b7 rintro _ \u27e8\u03b7, rfl\u27e9\n exact contract_\u03b9Multi_mem_span \u03b7 v\n \u00b7 rintro _ \u27e8p, rfl\u27e9\n classical\n choose g hg using fun i \u21a6 LinearMap.exists_extend ((Basis.span hv).coord i)\n have hgv (i j : Fin (r + 1)) : g i (v j) = if i = j then 1 else 0 := by\n have hvj : v j = (span K (Set.range v)).subtype (Basis.span hv j) := by\n simp [Basis.span_apply]\n rw [hvj, \u2190 LinearMap.comp_apply, hg, Basis.coord_apply, Basis.repr_self,\n Finsupp.single_apply]\n exact if_congr eq_comm rfl rfl\n refine \u27e8(-1 : K) ^ (p + r : \u2115) \u2022 \u03b9Multi K r (g \u2218 p.succAbove), ?_\u27e9\n rw [LinearMap.flip_apply, map_smul, LinearMap.smul_apply,\n contract_\u03b9Multi_comp_succAbove_\u03b9Multi hgv, smul_smul, \u2190 mul_pow]\n simp\n\n/-- The basis `v\u2080, \u2026, v\u1d63` of the contraction image of `v\u2080 \u2227 \u22ef \u2227 v\u1d63` for linearly independent\n`v\u1d62` (`exteriorPower.range_contract_flip_\u03b9Multi`). -/\nnoncomputable def rangeContractBasis {v : Fin (r + 1) \u2192 V} (hv : LinearIndependent K v) :\n Basis (Fin (r + 1)) K (LinearMap.range ((contract K V r).flip (\u03b9Multi K (r + 1) v))) :=\n (Basis.span hv).map (LinearEquiv.ofEq _ _ (range_contract_flip_\u03b9Multi hv).symm)\n\n@[simp]\ntheorem rangeContractBasis_apply {v : Fin (r + 1) \u2192 V} (hv : LinearIndependent K v)\n (i : Fin (r + 1)) : (rangeContractBasis hv i : V) = v i := by\n simp [rangeContractBasis, Basis.span_apply]\n\n/-- **The decomposability criterion.** Over a field, an element `\u03b8` of the `(r + 1)`-st exterior\npower of a finite-dimensional vector space is decomposable, `\u03b8 = v\u2080 \u2227 \u22ef \u2227 v\u1d63`, exactly when\n`(\u03b9_\u03b7 \u03b8) \u2227 \u03b8 = 0` for every `\u03b7 \u2208 \u22c0\u02b3 V*`. -/\ntheorem mem_range_\u03b9Multi_iff_forall_\u03b9_contract_mul_eq_zero (\u03b8 : \u22c0[K]^(r + 1) V) :\n \u03b8 \u2208 Set.range (\u03b9Multi K (r + 1)) \u2194\n \u2200 \u03b7 : \u22c0[K]^r (Dual K V),\n ExteriorAlgebra.\u03b9 K (contract K V r \u03b7 \u03b8) * (\u03b8 : ExteriorAlgebra K V) = 0 := by\n refine \u27e8fun \u27e8v, hv\u27e9 \u03b7 \u21a6 hv \u25b8 \u03b9_contract_mul_\u03b9Multi_eq_zero \u03b7 v, fun h \u21a6 ?_\u27e9\n classical\n -- `A` is the subspace of vectors `w` with `\u03b8 \u2227 w = 0`; it contains every contraction of `\u03b8`.\n set A : Submodule K V :=\n LinearMap.ker (LinearMap.mulLeft K (\u03b8 : ExteriorAlgebra K V) \u2218\u2097 ExteriorAlgebra.\u03b9 K)\n have hmemA (w : V) : w \u2208 A \u2194 (\u03b8 : ExteriorAlgebra K V) * ExteriorAlgebra.\u03b9 K w = 0 := by\n simp [A]\n have hcA (\u03b7 : \u22c0[K]^r (Dual K V)) : contract K V r \u03b7 \u03b8 \u2208 A := by\n have h\u03b7 := h \u03b7\n rw [ExteriorAlgebra.\u03b9_mul_eq_neg_one_pow_smul_mul \u03b8.property, smul_eq_zero] at h\u03b7\n exact (hmemA _).mpr (h\u03b7.resolve_left (pow_ne_zero _ (neg_ne_zero.mpr one_ne_zero)))\n -- Extend a basis `s` of `A` to a basis `e` of `V`.\n obtain \u27e8s, hsA, hspan, hs\u27e9 := exists_linearIndependent K (A : Set V)\n have hs' : LinearIndepOn K id s := linearIndependent_subtype_iff.mp hs\n let e := Basis.extend hs'\n let : LinearOrder (hs'.extend (Set.subset_univ s)) := linearOrderOfSTO WellOrderingRel\n -- The index set of a nonzero coordinate of `\u03b8` consists of exactly the basis vectors of `A`.\n have key (t : Set.powersetCard (hs'.extend (Set.subset_univ s)) (r + 1))\n (ht : (e.exteriorPower (r + 1)).repr \u03b8 t \u2260 0) (x : hs'.extend (Set.subset_univ s)) :\n x \u2208 t.val \u2194 (x : V) \u2208 s := by\n refine \u27e8fun hxt \u21a6 ?_, fun hxs \u21a6 ?_\u27e9\n \u00b7 by_contra hxs\n refine ht (basis_repr_eq_zero_of_coord_contract_eq_zero e \u03b8 (fun \u03b7 \u21a6 ?_) hxt)\n have hle : A \u2264 LinearMap.ker (e.coord x) := by\n rw [\u2190 span_eq A, \u2190 hspan, span_le]\n intro y hy\n have hyx : (\u27e8y, hs'.subset_extend _ hy\u27e9 : hs'.extend (Set.subset_univ s)) \u2260 x :=\n fun hyx \u21a6 hxs (hyx \u25b8 hy)\n have hey : e \u27e8y, hs'.subset_extend _ hy\u27e9 = y := Basis.extend_apply_self hs' _\n rw [SetLike.mem_coe, LinearMap.mem_ker, \u2190 hey, Basis.coord_apply, Basis.repr_self,\n Finsupp.single_apply]\n simp [hyx]\n exact hle (hcA \u03b7)\n \u00b7 by_contra hxt\n refine ht (basis_repr_eq_zero_of_mul_\u03b9_eq_zero e \u03b8 ?_ hxt)\n rw [\u2190 hmemA]\n simpa [e] using hsA hxs\n refine mem_range_\u03b9Multi_of_subsingleton_support_repr e \u03b8 fun t ht t' ht' \u21a6 ?_\n rw [Finset.mem_coe, Finsupp.mem_support_iff] at ht ht'\n exact Subtype.ext (Finset.ext fun x \u21a6 (key t ht x).trans (key t' ht' x).symm)\n\nend Field\n\nend exteriorPower\n", "public_theorems": ["exteriorPower.apply_contract", "exteriorPower.apply_contract_\u03b9Multi", "exteriorPower.contract_\u03b9Multi", "exteriorPower.contract_\u03b9Multi_comp_succAbove_\u03b9Multi", "exteriorPower.contract_\u03b9Multi_mem_span", "exteriorPower.\u03b9_contract_mul_\u03b9Multi_eq_zero", "exteriorPower.basis_repr_eq_zero_of_mul_\u03b9_eq_zero", "exteriorPower.basis_repr_eq_zero_of_coord_contract_eq_zero", "exteriorPower.mem_range_\u03b9Multi_of_subsingleton_support_repr", "exteriorPower.range_contract_flip_\u03b9Multi", "exteriorPower.rangeContractBasis_apply", "exteriorPower.mem_range_\u03b9Multi_iff_forall_\u03b9_contract_mul_eq_zero"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.LinearAlgebra.Dual.Lemmas\npublic import Mathlib.LinearAlgebra.ExteriorPower.Basis\npublic import TauCeti.LinearAlgebra.ExteriorPower.WedgePairing\nimport TauCeti.LinearAlgebra.ExteriorAlgebra.Contraction\n\n/-!\n# Decomposable exterior vectors\n\nAn element `\u03b8` of the exterior power `\u22c0\u02b3 V` is *decomposable* if it is an exterior product\n`v\u2081 \u2227 \u22ef \u2227 v\u1d63` of vectors, that is, if it lies in the range of `exteriorPower.\u03b9Multi`. Over a field,\nthe nonzero decomposable vectors are the affine cone over the Pl\u00fccker image of the Grassmannian of\n`r`-dimensional subspaces of `V`, and this file gives the classical basis-free equations cutting\nit out.\n\nFor `\u03b7 \u2208 \u22c0\u207f V*` and `\u03b8 \u2208 \u22c0\u207f\u207a\u00b9 V` the contraction `\u03b9_\u03b7 \u03b8 \u2208 V` (`exteriorPower.contract`) is\ncharacterized by `\u03be (\u03b9_\u03b7 \u03b8) = \u27e8\u03b7 \u2227 \u03be, \u03b8\u27e9` for `\u03be \u2208 V*`, where `\u27e8-, -\u27e9` is the natural pairing\n`exteriorPower.pairingDual` between `\u22c0\u207f\u207a\u00b9 V*` and `\u22c0\u207f\u207a\u00b9 V`. It is defined for every reflexive\nmodule over a commutative ring. On `\u03b8 = v\u2080 \u2227 \u22ef \u2227 v\u2099` it is an explicit combination of the `v\u1d62`\n(`exteriorPower.contract_\u03b9Multi`), so it takes values in the span of the `v\u1d62`, and\nfor linearly independent `v\u1d62` its values are exactly that span: contracting by the exterior\nproduct of a dual family with one member removed returns the corresponding `v\u209a` up to sign.\n\nThe main result is the decomposability criterion, in every characteristic: for `r + 1 \u2265 1` and\n`\u03b8 \u2208 \u22c0\u02b3\u207a\u00b9 V` with `V` finite-dimensional over a field,\n\n`\u03b8` is decomposable `\u2194 (\u03b9_\u03b7 \u03b8) \u2227 \u03b8 = 0` for every `\u03b7 \u2208 \u22c0\u02b3 V*`.\n\nDecomposable vectors satisfy the equations because each `\u03b9_\u03b7 \u03b8` lies in the span of the factors\nof `\u03b8`. Conversely, let `A` be the subspace of vectors `w` with `\u03b8 \u2227 w = 0`, and extend a basis of\n`A` to a basis `e` of `V`. A coordinate of `\u03b8` in the induced basis of `\u22c0\u02b3\u207a\u00b9 V` vanishes if its\nindex set misses a basis vector of `A` (Laplace expansion of the pairing,\n`exteriorPower.pairingDual_\u03b9Multi_wedge`), and it also vanishes if its index set contains a\nbasis vector outside `A`, because the dual coordinate of that vector kills every `\u03b9_\u03b7 \u03b8 \u2208 A`.\nSo `\u03b8` has at most one nonzero coordinate and is decomposable.\n\nThe zero vector is decomposable in every positive degree. The criterion is stated in positive\ndegree `r + 1`; in degree `0` the exterior power is `K` (`exteriorPower.zeroEquiv`) and every\nelement is a multiple of the empty product. When `r + 1 > dim V` the exterior power vanishes\n(`exteriorPower.eq_zero_of_finrank_lt`) and both sides of the criterion hold trivially.\n\n## Main definitions\n\n* `exteriorPower.contract`: the contraction `\u03b9_\u03b7 \u03b8` of `\u03b8 \u2208 \u22c0\u207f\u207a\u00b9 M` by `\u03b7 \u2208 \u22c0\u207f M*`.\n* `exteriorPower.rangeContractBasis`: the basis `v\u2080, \u2026, v\u1d63` of the contraction image of\n `v\u2080 \u2227 \u22ef \u2227 v\u1d63` for linearly independent `v\u1d62`.\n\n## Main results\n\n* `exteriorPower.mem_range_\u03b9Multi_iff_forall_\u03b9_contract_mul_eq_zero`: **the decomposability\n criterion** `\u03b8 \u2208 range \u03b9Multi \u2194 \u2200 \u03b7, (\u03b9_\u03b7 \u03b8) \u2227 \u03b8 = 0`.\n* `exteriorPower.range_contract_flip_\u03b9Multi`: for linearly independent `v`, the contractions of\n `v\u2080 \u2227 \u22ef \u2227 v\u1d63` form the span of the `v\u1d62`.\n* `exteriorPower.contract_\u03b9Multi`: the expansion of `\u03b9_\u03b7 (v\u2080 \u2227 \u22ef \u2227 v\u2099)` in the `v\u1d62`.\n* `exteriorPower.mem_range_\u03b9Multi_of_subsingleton_support_repr`: an element with at most one\n nonzero coordinate in the basis induced by a basis of `M` is decomposable.\n\n## References\n\n* P. Griffiths, J. Harris, *Principles of Algebraic Geometry*, Wiley (1978), Chapter 1, \u00a75\n (the Pl\u00fccker relations).\n* J. Harris, *Algebraic Geometry: A First Course*, GTM 133, Springer (1992), Lecture 6.\n-/\n\npublic section\n\nopen Module Submodule\n\nnamespace exteriorPower\n\nsection Contract\n\nvariable (R M : Type*) [CommRing R] [AddCommGroup M] [Module R M] [IsReflexive R M] (n : \u2115)\n\n/-- The contraction `\u03b9_\u03b7 \u03b8 \u2208 M` of `\u03b8 \u2208 \u22c0\u207f\u207a\u00b9 M` by `\u03b7 \u2208 \u22c0\u207f M*`, characterized by\n`\u03be (\u03b9_\u03b7 \u03b8) = \u27e8\u03b7 \u2227 \u03be, \u03b8\u27e9` for every `\u03be \u2208 M*` (`exteriorPower.apply_contract`), where `\u27e8-, -\u27e9` is\n`exteriorPower.pairingDual`. -/\nnoncomputable def contract : \u22c0[R]^n (Dual R M) \u2192\u2097[R] \u22c0[R]^(n + 1) M \u2192\u2097[R] M :=\n LinearMap.mk\u2082 R\n (fun \u03b7 \u03b8 \u21a6 (evalEquiv R M).symm\n ((pairingDual R M (n + 1)).flip \u03b8 \u2218\u2097 wedge R (Dual R M) n 1 \u03b7 \u2218\u2097\n (oneEquiv R (Dual R M)).symm.toLinearMap))\n (fun \u03b7\u2081 \u03b7\u2082 \u03b8 \u21a6 by apply (evalEquiv R M).injective; ext \u03be; simp)\n (fun c \u03b7 \u03b8 \u21a6 by apply (evalEquiv R M).injective; ext \u03be; simp)\n (fun \u03b7 \u03b8\u2081 \u03b8\u2082 \u21a6 by apply (evalEquiv R M).injective; ext \u03be; simp)\n (fun c \u03b7 \u03b8 \u21a6 by apply (evalEquiv R M).injective; ext \u03be; simp)\n\nvariable {R M n}", "/-- The defining property of the contraction: `\u03be (\u03b9_\u03b7 \u03b8) = \u27e8\u03b7 \u2227 \u03be, \u03b8\u27e9`. -/\ntheorem apply_contract (\u03b7 : \u22c0[R]^n (Dual R M)) (\u03b8 : \u22c0[R]^(n + 1) M) (\u03be : Dual R M) :\n \u03be (contract R M n \u03b7 \u03b8) =\n pairingDual R M (n + 1) (wedge R (Dual R M) n 1 \u03b7 ((oneEquiv R (Dual R M)).symm \u03be)) \u03b8 :=", "/-- The contraction by an exterior product `f\u2080 \u2227 \u22ef \u2227 f\u2099\u208b\u2081` of linear forms:\n`\u03be (\u03b9_\u03b7 \u03b8) = \u27e8f\u2080 \u2227 \u22ef \u2227 f\u2099\u208b\u2081 \u2227 \u03be, \u03b8\u27e9`. -/\n@[simp]\ntheorem apply_contract_\u03b9Multi (f : Fin n \u2192 Dual R M) (\u03b8 : \u22c0[R]^(n + 1) M) (\u03be : Dual R M) :\n \u03be (contract R M n (\u03b9Multi R n f) \u03b8) =\n pairingDual R M (n + 1) (\u03b9Multi R (n + 1) (Fin.snoc f \u03be)) \u03b8 :=", "/-- **Expansion of a contraction of a decomposable vector**:\n`\u03b9_\u03b7 (v\u2080 \u2227 \u22ef \u2227 v\u2099) = \u2211\u2c7c (-1) ^ (j + n) \u27e8\u03b7, v\u2080 \u2227 \u22ef \u2227 v\u0302\u2c7c \u2227 \u22ef \u2227 v\u2099\u27e9 v\u2c7c`. -/\ntheorem contract_\u03b9Multi (\u03b7 : \u22c0[R]^n (Dual R M)) (v : Fin (n + 1) \u2192 M) :\n contract R M n \u03b7 (\u03b9Multi R (n + 1) v) =\n \u2211 j : Fin (n + 1),\n ((-1 : R) ^ (j + n : \u2115) * pairingDual R M n \u03b7 (\u03b9Multi R n (v \u2218 j.succAbove))) \u2022 v j :=", "/-- Contracting `v\u2080 \u2227 \u22ef \u2227 v\u2099` by the exterior product of a dual family with its `p`-th member\nremoved recovers `v\u209a`, up to the sign `(-1) ^ (p + n)`. -/\ntheorem contract_\u03b9Multi_comp_succAbove_\u03b9Multi {g : Fin (n + 1) \u2192 Dual R M}\n {v : Fin (n + 1) \u2192 M} (hgv : \u2200 i j, g i (v j) = if i = j then 1 else 0) (p : Fin (n + 1)) :\n contract R M n (\u03b9Multi R n (g \u2218 p.succAbove)) (\u03b9Multi R (n + 1) v) =\n (-1 : R) ^ (p + n : \u2115) \u2022 v p :=", "/-- The contractions of `v\u2080 \u2227 \u22ef \u2227 v\u2099` lie in the span of the `v\u1d62`. -/\ntheorem contract_\u03b9Multi_mem_span (\u03b7 : \u22c0[R]^n (Dual R M)) (v : Fin (n + 1) \u2192 M) :\n contract R M n \u03b7 (\u03b9Multi R (n + 1) v) \u2208 span R (Set.range v) :=", "/-- A decomposable vector satisfies the contraction equations: `(\u03b9_\u03b7 \u03b8) \u2227 \u03b8 = 0` for\n`\u03b8 = v\u2080 \u2227 \u22ef \u2227 v\u2099`. -/\ntheorem \u03b9_contract_mul_\u03b9Multi_eq_zero (\u03b7 : \u22c0[R]^n (Dual R M)) (v : Fin (n + 1) \u2192 M) :\n ExteriorAlgebra.\u03b9 R (contract R M n \u03b7 (\u03b9Multi R (n + 1) v)) *\n ExteriorAlgebra.\u03b9Multi R (n + 1) v = 0 :=", "end Contract\n\nsection Coordinates\n\nvariable {R M : Type*} [CommRing R] [AddCommGroup M] [Module R M] {n : \u2115}\n\nvariable {I : Type*} [LinearOrder I] (b : Basis I R M)", "/-- If `\u03b8 \u2227 b\u1d62 = 0`, then every coordinate of `\u03b8` in the basis `b.exteriorPower n` at an index set\nnot containing `i` vanishes. -/\ntheorem basis_repr_eq_zero_of_mul_\u03b9_eq_zero (\u03b8 : \u22c0[R]^n M) {i : I}\n (hi : (\u03b8 : ExteriorAlgebra R M) * ExteriorAlgebra.\u03b9 R (b i) = 0)\n {t : Set.powersetCard I n} (hit : i \u2209 t.val) : (b.exteriorPower n).repr \u03b8 t = 0 :=", "/-- If the dual coordinate `b\u2c7c^*` kills every contraction of `\u03b8`, then every coordinate of `\u03b8` in\nthe basis `b.exteriorPower (n + 1)` at an index set containing `j` vanishes. -/\ntheorem basis_repr_eq_zero_of_coord_contract_eq_zero [IsReflexive R M] (\u03b8 : \u22c0[R]^(n + 1) M)\n {j : I} (hj : \u2200 \u03b7 : \u22c0[R]^n (Dual R M), b.coord j (contract R M n \u03b7 \u03b8) = 0)\n {t : Set.powersetCard I (n + 1)} (hjt : j \u2208 t.val) :\n (b.exteriorPower (n + 1)).repr \u03b8 t = 0 :=", "/-- An element of `\u22c0\u207f\u207a\u00b9 M` with at most one nonzero coordinate in the basis `b.exteriorPower`\nis decomposable. -/\ntheorem mem_range_\u03b9Multi_of_subsingleton_support_repr (\u03b8 : \u22c0[R]^(n + 1) M)\n (h : (((b.exteriorPower (n + 1)).repr \u03b8).support :\n Set (Set.powersetCard I (n + 1))).Subsingleton) :\n \u03b8 \u2208 Set.range (\u03b9Multi R (n + 1)) :=", "end Coordinates\n\nsection Field\n\nvariable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] [FiniteDimensional K V] {r : \u2115}", "/-- **The contraction image of a nonzero decomposable vector.** For linearly independent\n`v\u2080, \u2026, v\u1d63`, the contractions `\u03b9_\u03b7 (v\u2080 \u2227 \u22ef \u2227 v\u1d63)`, `\u03b7 \u2208 \u22c0\u02b3 V*`, form the span of the `v\u1d62`. Its\nbasis `v\u1d62` is `exteriorPower.rangeContractBasis`. -/\ntheorem range_contract_flip_\u03b9Multi {v : Fin (r + 1) \u2192 V} (hv : LinearIndependent K v) :\n LinearMap.range ((contract K V r).flip (\u03b9Multi K (r + 1) v)) = span K (Set.range v) :=", "/-- The basis `v\u2080, \u2026, v\u1d63` of the contraction image of `v\u2080 \u2227 \u22ef \u2227 v\u1d63` for linearly independent\n`v\u1d62` (`exteriorPower.range_contract_flip_\u03b9Multi`). -/\nnoncomputable def rangeContractBasis {v : Fin (r + 1) \u2192 V} (hv : LinearIndependent K v) :\n Basis (Fin (r + 1)) K (LinearMap.range ((contract K V r).flip (\u03b9Multi K (r + 1) v))) :=\n (Basis.span hv).map (LinearEquiv.ofEq _ _ (range_contract_flip_\u03b9Multi hv).symm)", "@[simp]\ntheorem rangeContractBasis_apply {v : Fin (r + 1) \u2192 V} (hv : LinearIndependent K v)\n (i : Fin (r + 1)) : (rangeContractBasis hv i : V) = v i :=", "/-- **The decomposability criterion.** Over a field, an element `\u03b8` of the `(r + 1)`-st exterior\npower of a finite-dimensional vector space is decomposable, `\u03b8 = v\u2080 \u2227 \u22ef \u2227 v\u1d63`, exactly when\n`(\u03b9_\u03b7 \u03b8) \u2227 \u03b8 = 0` for every `\u03b7 \u2208 \u22c0\u02b3 V*`. -/\ntheorem mem_range_\u03b9Multi_iff_forall_\u03b9_contract_mul_eq_zero (\u03b8 : \u22c0[K]^(r + 1) V) :\n \u03b8 \u2208 Set.range (\u03b9Multi K (r + 1)) \u2194\n \u2200 \u03b7 : \u22c0[K]^r (Dual K V),\n ExteriorAlgebra.\u03b9 K (contract K V r \u03b7 \u03b8) * (\u03b8 : ExteriorAlgebra K V) = 0 :=", "end Field\n\nend exteriorPower"], "free_length": 6592, "file_length": 10534, "heartbeats": 50733, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.NumberTheory.ClassFieldTheory.Global.PlacewiseCohomology", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/NumberTheory/ClassFieldTheory/Global/PlacewiseCohomology.lean", "module": "TauCeti.NumberTheory.ClassFieldTheory.Global.PlacewiseCohomology", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.NumberTheory.ClassFieldTheory.Global.SIdeles\npublic import TauCeti.NumberTheory.ClassFieldTheory.Global.SemilocalUnits\npublic import TauCeti.NumberTheory.NumberField.Discriminant.RamifiedSupport.Basic\npublic import TauCeti.RepresentationTheory.Homological.TateCohomology.DirectedUnion\npublic import TauCeti.RepresentationTheory.Homological.TateCohomology.Pi\nimport TauCeti.Data.DFinsupp.Basic\n\n/-!\n# The cohomology of the ideles, place by place\n\nLet `L/K` be a finite Galois extension of number fields with Galois group `G`. The ideles `I_L` of\n`L`, as a representation of `G`, map to the semi-local unit groups `(K_v \u2297[K] L)\u02e3 \u2243 \u220f_{w \u2223 v} L_w\u02e3`\nat every place `v` of `K`, finite (`idelesToSemilocalUnits`) or infinite\n(`idelesToInfiniteSemilocalUnits`). This file shows that in every positive degree `n` these maps\nidentify the cohomology of the ideles with the direct sum of the semi-local cohomology groups,\n\n```text\nH^n(G, I_L) \u2243 \u2a01_v H^n(G, (K_v \u2297[K] L)\u02e3)\n```\n\n(`idelesCohomologyLocalizationEquiv`), the sum running over the finite and the infinite places:\n\n* a class of `H^n(G, I_L)` whose images in all the groups `H^n(G, (K_v \u2297[K] L)\u02e3)` vanish is zero\n (`eq_zero_of_forall_map_semilocal_eq_zero`);\n* only finitely many of its images at the finite places are nonzero\n (`finite_setOf_map_idelesToSemilocalUnits_ne_zero`);\n* every finitely supported family of semi-local classes is the family of images of a class\n (`idelesCohomologyLocalization_surjective`);\n* its first cohomology vanishes (`isZero_tateCohomology_one_idelesRep`), by field Hilbert 90\n and Shapiro at every finite and infinite place, without a cyclicity hypothesis.\n\nBy positive-degree Shapiro (`HeightOneSpectrum.semilocalUnitsTateCohomologyIsoPos` at the finite\nplaces, `InfinitePlace.infiniteSemilocalUnitsTateCohomologyIsoPos` at the infinite places) the group\n`H^n(G, (K_v \u2297[K] L)\u02e3)` is the cohomology `H^n(G_w, L_w\u02e3)` of the completion at a place `w \u2223 v`,\nso the images of a degree-`2` cohomology class with coefficients in the ideles are its local Brauer\nclasses in `Br(L_w/K_v)`, and `H\u00b2(G, I_L)` is the direct sum of the local Brauer groups\n`Br(L_w/K_v)`. The first statement is the idelic half of the injectivity of\n`Br(L/K) \u2192 \u2a01_v Br(L_w/K_v)`; the other half is the vanishing of `H\u00b9(G, C_L)`.\n\nThe proof is Milne's (*Class Field Theory*, VII, Lemma 2.4 and Proposition 2.5). The ideles are the\nunion of the `S`-ideles over the finite sets `S` of finite places, so every class comes from the\n`S`-ideles for a finite `S` that may be taken to contain the places ramified in `L`\n(`TauCeti.TateCohomology.exists_tateCohomologyFunctor_map_eq`). The `S`-ideles split as\n`I_{L,S} = L_\u221e\u02e3 \u00d7 I_{L,S}^f` (`sIdeles_hom_decomp`), the infinite ideles are the product\nof the archimedean semi-local unit groups (`TauCeti.GlobalNumberFields.infiniteIdelesPiIso`), and\nthe finite `S`-ideles are the product of the semi-local unit groups at `S` and of the integral\nsemi-local unit groups away from `S` (`TauCeti.finiteSIdelesPiIso`). Tate cohomology commutes with\nproducts (`TauCeti.TateCohomology.linearEquivPi`), and the integral factors, at places unramified\nin `L`, have no cohomology in positive degrees\n(`isZero_tateCohomology_semilocalIntegralUnitsRep_of_neZero`). Read backwards, the same\ndecomposition prescribes the semi-local components: a family supported on such an `S` is the image\nof a class of the `S`-ideles, built factor by factor.\n\n## Main definitions\n\n* `TauCeti.ClassFieldTheory.idelesToSemilocalUnits L v`,\n `TauCeti.ClassFieldTheory.idelesToInfiniteSemilocalUnits L w`: the semi-local components of an\n idele at a finite place `v` and at an infinite place `w` of `K`.\n* `TauCeti.ClassFieldTheory.idelesCohomologyLocalization K L n`: the map\n `H^n(G, I_L) \u2192 \u2a01_v H^n(G, (K_v \u2297[K] L)\u02e3)` taking a class to its semi-local components.\n* `TauCeti.ClassFieldTheory.idelesCohomologyLocalizationEquiv K L n`: the same map, as an\n isomorphism for `n > 0`.\n\n## Main results\n\n* `TauCeti.ClassFieldTheory.eq_zero_of_forall_map_semilocal_eq_zero`: a class of\n `H^n(G, I_L)`, `n > 0`, with vanishing semi-local components is zero.\n* `TauCeti.ClassFieldTheory.finite_setOf_map_idelesToSemilocalUnits_ne_zero`: a class of\n `H^n(G, I_L)`, `n > 0`, has nonzero semi-local components at only finitely many finite places.\n* `TauCeti.ClassFieldTheory.idelesCohomologyLocalization_surjective`: for `n > 0`, every finitely\n supported family of semi-local classes is the family of semi-local components of a class.\n* `TauCeti.ClassFieldTheory.isZero_tateCohomology_one_idelesRep`: Hilbert 90 for ideles,\n on the Tate carrier.\n* `TauCeti.ClassFieldTheory.subsingleton_groupCohomology_one_idelesRep`: Hilbert 90 on ordinary\n cohomology, as an instance.\n\nIn the long exact cohomology sequence of `L\u02e3 \u2192 I_L \u2192 C_L`, idelic Hilbert 90 makes\n`H\u00b9(Gal(L/K), C_L) \u2192 H\u00b2(Gal(L/K), L\u02e3)` injective. Thus vanishing of idele-class `H\u00b9` is\nequivalent to injectivity of the map from relative Brauer classes to idelic cohomology.\n\n## References\n\n* J. S. Milne, *Class Field Theory*, v4.03, Chapter VII, Lemma 2.4, Proposition 2.5\n and Corollary 2.6.\n* J. Tate, *Global class field theory*, in J. W. S. Cassels and A. Fr\u00f6hlich (eds.),\n *Algebraic Number Theory*, Chapter VII, \u00a7\u00a76\u20137.\n-/\n\npublic section\nnoncomputable section\n\nopen CategoryTheory Limits IsDedekindDomain IsDedekindDomain.HeightOneSpectrum NumberField\nopen scoped AdeleGaloisAction TensorProduct\n\nnamespace TauCeti.ClassFieldTheory\n\nopen GlobalNumberFields\n\nvariable {K : Type} [Field K] [NumberField K] (L : Type) [Field L] [NumberField L] [Algebra K L]\n\n/-! ### The semi-local components of an idele -/\n\nsection Components\n\n/-- **The semi-local component of an idele at a finite place** `v` of `K`, its components at the\nplaces `w \u2223 v` of `L` as a unit of `K_v \u2297[K] L \u2243 \u220f_{w \u2223 v} L_w`, as a morphism of representations\nof `Aut(L/K)`. -/\ndef idelesToSemilocalUnits (v : HeightOneSpectrum (\ud835\udcde K)) :\n idelesRep K L \u27f6 semilocalUnitsRep L v :=\n Rep.ofHom <| LinearMap.intertwiningMap_of_isIntertwiningMap _ _\n ((finiteIdeleSemilocalHom L v).comp (IdeleGroup.toFiniteIdele (\ud835\udcde L) L)\n ).toAdditive.toIntLinearMap\n fun \u03c3 x \u21a6 congrArg Additive.ofMul <| (congrArg (finiteIdeleSemilocalHom L v)\n (toFiniteIdele_smul \u03c3 x.toMul)).trans\n (finiteIdeleSemilocalHom_map_finiteAdeleGaloisAction v \u03c3 _)\n\n/-- `idelesToSemilocalUnits L v` is the semi-local component at `v` of the finite part. -/\n-- Normalize the implicit restriction parameters so the simp rule matches after `Rep.res_obj_\u03c1`.\n@[simp]\ntheorem idelesToSemilocalUnits_hom_apply (v : HeightOneSpectrum (\ud835\udcde K))\n (x : Additive (IdeleGroup (\ud835\udcde L) L)) :\n dsimp% only [Rep.ofAlgebraAutOnUnits, Rep.res_obj_\u03c1]\n ((idelesToSemilocalUnits L v).hom x =\n Additive.ofMul (finiteIdeleSemilocalHom L v (IdeleGroup.toFiniteIdele (\ud835\udcde L) L x.toMul))) :=\n (rfl)\n\n/-- **The semi-local component of an idele at an infinite place** `w` of `K`, its components at\nthe places of `L` above `w` as a unit of `K_w \u2297[K] L`, as a morphism of representations of\n`Aut(L/K)`. -/\ndef idelesToInfiniteSemilocalUnits (w : InfinitePlace K) :\n idelesRep K L \u27f6 infiniteSemilocalUnitsRep L w :=\n idelesToInfiniteIdeles K L \u226b (infiniteIdelesPiIso K L).hom \u226b Rep.piProj _ w\n\n/-- `idelesToInfiniteSemilocalUnits L w` is the semi-local component at `w` of the infinite\npart. -/\n-- Normalize the implicit restriction parameters so the simp rule matches after `Rep.res_obj_\u03c1`.\n@[simp]\ntheorem coe_idelesToInfiniteSemilocalUnits_hom_apply (w : InfinitePlace K)\n (x : Additive (IdeleGroup (\ud835\udcde L) L)) :\n dsimp% only [Rep.ofAlgebraAutOnUnits, Rep.res_obj_\u03c1]\n ((Additive.toMul (\u03b1 := (w.Completion \u2297[K] L)\u02e3) ((idelesToInfiniteSemilocalUnits L w).hom x) :\n w.Completion \u2297[K] L) =\n infiniteAdeleSemilocalHom L w (x.toMul : AdeleRing (\ud835\udcde L) L).1) :=\n -- `idelesToInfiniteSemilocalUnits L w` is by definition the component at `w` of the image of\n -- the infinite part under `infiniteIdelesPiIso`, and the infinite part of `x` has underlying\n -- infinite adele the first component of `x`\n (congrArg (fun z \u21a6 ((Additive.toMul (\u03b1 := (w.Completion \u2297[K] L)\u02e3) z : _) : w.Completion \u2297[K] L))\n (Rep.piProj_hom_apply _ _)).trans <|\n (coe_infiniteIdelesPiIso_hom_apply ((idelesToInfiniteIdeles K L).hom x) w).trans <|\n congrArg (infiniteAdeleSemilocalHom L w) <|\n congrArg (fun z \u21a6 ((Additive.toMul z : (InfiniteAdeleRing L)\u02e3) : InfiniteAdeleRing L))\n (idelesToInfiniteIdeles_hom_apply L x)\n\nend Components\n\n/-! ### The `S`-ideles inside the ideles -/\n\nsection SIdeles\n\nvariable (S : Finset (HeightOneSpectrum (\ud835\udcde K)))\n\n/-- At a place `v \u2208 S`, the semi-local component of an `S`-idele is read off its finite part\nthrough `finiteSIdelesPiIso`. -/\nprivate theorem sIdelesToFiniteSIdeles_comp_piProj_inl (v : S) :\n sIdelesToFiniteSIdeles L S \u226b (finiteSIdelesPiIso L S).hom \u226b Rep.piProj _ (Sum.inl v) =\n sIdelesToIdeles (K := K) L S \u226b idelesToSemilocalUnits L v.val := by\n ext x\n -- both composites take the semi-local component at `v` of the finite part\n have h : (sIdelesToIdeles (K := K) L S \u226b idelesToSemilocalUnits L v.val).hom x =\n Additive.ofMul (finiteIdeleSemilocalHom L v.val\n (IdeleGroup.toFiniteIdele (\ud835\udcde L) L\n (Additive.toMul (\u03b1 := sIdeles L (S : Set (HeightOneSpectrum (\ud835\udcde K)))) x).val)) :=\n (congrArg (idelesToSemilocalUnits L v.val).hom\n (sIdelesToIdeles_hom_apply (K := K) L S x)).trans\n (idelesToSemilocalUnits_hom_apply L v.val _)\n exact ((Rep.piProj_hom_apply _ _).trans <|\n (congrArg (fun z \u21a6 (finiteSIdelesPiIso L S).hom.hom z (Sum.inl v))\n (sIdelesToFiniteSIdeles_hom_apply L S x)).trans\n (finiteSIdelesPiIso_hom_apply_inl L S _ v)).trans h.symm\n\n/-- At a place `v \u2209 S`, the semi-local component of an `S`-idele is integral; as a morphism of\nrepresentations. -/\nprivate def sIdelesToSemilocalIntegralUnits (v : HeightOneSpectrum (\ud835\udcde K)) (hv : v \u2209 S) :\n sIdelesRep (K := K) L S \u27f6 semilocalIntegralUnitsRep L v :=\n Rep.ofHom <| LinearMap.intertwiningMap_of_isIntertwiningMap _ _\n (((finiteIdeleSemilocalHom L v).comp ((IdeleGroup.toFiniteIdele (\ud835\udcde L) L).comp\n (sIdeles L (S : Set (HeightOneSpectrum (\ud835\udcde K)))).subtype)).codRestrict\n (semilocalIntegralUnits L v) fun x \u21a6\n mem_finiteSIdeles_iff.1 (toFiniteIdele_mem_finiteSIdeles_iff.2 x.property) v hv\n ).toAdditive.toIntLinearMap\n fun \u03c3 x \u21a6 congrArg Additive.ofMul <| Subtype.ext <| (congrArg (finiteIdeleSemilocalHom L v)\n (toFiniteIdele_smul \u03c3 x.toMul.val)).trans\n (finiteIdeleSemilocalHom_map_finiteAdeleGaloisAction v \u03c3 _)\n\n/-- At a place `v \u2209 S`, the semi-local component of an `S`-idele factors through the integral\nsemi-local units. -/\nprivate theorem sIdelesToSemilocalIntegralUnits_comp_incl (v : HeightOneSpectrum (\ud835\udcde K))\n (hv : v \u2209 S) :\n sIdelesToSemilocalIntegralUnits L S v hv \u226b semilocalIntegralUnitsIncl L v =\n sIdelesToIdeles (K := K) L S \u226b idelesToSemilocalUnits L v := by\n ext x\n -- both send an `S`-idele to the semi-local component at `v` of its finite part\n exact (semilocalIntegralUnitsIncl_apply v _).trans ((congrArg (idelesToSemilocalUnits L v).hom\n (sIdelesToIdeles_hom_apply (K := K) L S x)).trans\n (idelesToSemilocalUnits_hom_apply L v _)).symm\n\nend SIdeles\n\n/-! ### The cohomology of the ideles -/\n\nsection Cohomology\n\nvariable [IsGalois K L]\n\n/-- At a finite place of `K` outside a set containing the ramified places, the integral\nsemi-local units have no cohomology in positive degrees. -/\nprivate theorem isZero_tateCohomology_semilocalIntegralUnitsRep_of_notMem\n {S : Finset (HeightOneSpectrum (\ud835\udcde K))} (hS : NumberField.ramifiedSupport K L \u2286 S)\n {v : HeightOneSpectrum (\ud835\udcde K)} (hv : v \u2209 S) (n : \u2115) [NeZero n] :\n IsZero (tateCohomology (semilocalIntegralUnitsRep L v) n) := by\n obtain \u27e8w, rfl\u27e9 := under_surjective (\ud835\udcde K) (\ud835\udcde L) v\n have := NumberField.isUnramifiedAway_ramifiedSupport (w.under (\ud835\udcde K)) (fun h \u21a6 hv (hS h))\n w.asIdeal\n exact isZero_tateCohomology_semilocalIntegralUnitsRep_of_neZero (w.under (\ud835\udcde K)) w n\n\nomit [IsGalois K L] in\n/-- Every class of `H^n(G, I_L)` comes from the `S`-ideles for a finite set `S` of finite places\ncontaining the ramified ones. -/\nprivate theorem exists_map_sIdelesToIdeles_eq (n : \u2124) (x : tateCohomology (idelesRep K L) n) :\n \u2203 S : Finset (HeightOneSpectrum (\ud835\udcde K)), NumberField.ramifiedSupport K L \u2286 S \u2227\n \u2203 y, ((tateCohomologyFunctor n).map (sIdelesToIdeles (K := K) L S)).hom y = x := by\n classical\n -- a finite set of ideles lies in the `S`-ideles for the union of the sets that work for each\n have hcover (s : Finset (idelesRep K L)) : \u2203 S : {S : Finset (HeightOneSpectrum (\ud835\udcde K)) //\n NumberField.ramifiedSupport K L \u2286 S},\n \u2200 x \u2208 s, x \u2208 Set.range (sIdelesToIdeles (K := K) L S.val).hom := by\n choose S _ hS using fun x : idelesRep K L \u21a6 exists_finset_mem_sIdeles\n (NumberField.ramifiedSupport K L) (Additive.toMul x : IdeleGroup (\ud835\udcde L) L)\n let T := NumberField.ramifiedSupport K L \u222a s.sup S\n refine \u27e8\u27e8T, Finset.subset_union_left\u27e9, fun x hx \u21a6\n \u27e8Additive.ofMul \u27e8Additive.toMul x, sIdeles_mono ?_ (hS x)\u27e9,\n sIdelesToIdeles_hom_apply (K := K) L T _\u27e9\u27e9\n exact Finset.coe_subset.2 ((Finset.le_sup hx).trans Finset.subset_union_right)\n obtain \u27e8\u27e8S, hS\u27e9, y, hy\u27e9 := TateCohomology.exists_tateCohomologyFunctor_map_eq\n (fun S : {S : Finset (HeightOneSpectrum (\ud835\udcde K)) // NumberField.ramifiedSupport K L \u2286 S} \u21a6\n sIdelesToIdeles (K := K) L S.val) (fun S \u21a6 sIdelesToIdeles_hom_injective (K := K) L S.val)\n hcover n x\n exact \u27e8S, hS, y, hy\u27e9\n\nvariable (n : \u2115) [NeZero n]\n\n/-- **The cohomology of the ideles is detected place by place.** For a finite Galois extension\n`L/K` of number fields and `n > 0`, a class of `H^n(Gal(L/K), I_L)` whose images in\n`H^n(Gal(L/K), (K_v \u2297[K] L)\u02e3)` vanish at every finite and every infinite place `v` of `K` is\nzero. -/\ntheorem eq_zero_of_forall_map_semilocal_eq_zero\n {x : tateCohomology (idelesRep K L) n}\n (hfin : \u2200 v, ((tateCohomologyFunctor n).map (idelesToSemilocalUnits L v)).hom x = 0)\n (hinf : \u2200 w, ((tateCohomologyFunctor n).map (idelesToInfiniteSemilocalUnits L w)).hom x = 0) :\n x = 0 := by\n classical\n obtain \u27e8S, hS, y, rfl\u27e9 := exists_map_sIdelesToIdeles_eq L n x\n -- a component of `y` that factors through the ideles vanishes when that of `x` does\n have hy {Y Z : Rep \u2124 (L \u2243\u2090[K] L)} (f : sIdelesRep (K := K) L S \u27f6 Y) (g : Y \u27f6 Z)\n (g' : idelesRep K L \u27f6 Z) (hfg : f \u226b g = sIdelesToIdeles (K := K) L S \u226b g')\n (hg : ((tateCohomologyFunctor n).map g').hom\n (((tateCohomologyFunctor n).map (sIdelesToIdeles (K := K) L S)).hom y) = 0) :\n ((tateCohomologyFunctor n).map g).hom (((tateCohomologyFunctor n).map f).hom y) = 0 := by\n simpa only [Functor.map_comp, ModuleCat.hom_comp, LinearMap.comp_apply, hg] using\n congrArg (fun \u03c6 \u21a6 ((tateCohomologyFunctor n).map \u03c6).hom y) hfg\n -- a component of `y` vanishes when its image under an isomorphism does\n have hiso {Y Z : Rep \u2124 (L \u2243\u2090[K] L)} (f : sIdelesRep (K := K) L S \u27f6 Y) (e : Y \u2245 Z)\n (he : ((tateCohomologyFunctor n).map (f \u226b e.hom)).hom y = 0) :\n ((tateCohomologyFunctor n).map f).hom y = 0 := by\n rw [Functor.map_comp, ModuleCat.hom_comp, LinearMap.comp_apply] at he\n exact (map_eq_zero_iff _ ((ModuleCat.mono_iff_injective _).1 inferInstance)).1 he\n -- the finite part of `y` vanishes: its components at `S` are those of `x`, and the factors\n -- away from `S` have no cohomology\n have hfin' : ((tateCohomologyFunctor n).map (sIdelesToFiniteSIdeles L S)).hom y = 0 := by\n refine hiso _ (finiteSIdelesPiIso L S) <|\n (TateCohomology.linearEquivPi _ n).injective (funext fun i \u21a6 ?_)\n rw [TateCohomology.linearEquivPi_apply, map_zero, Pi.zero_apply]\n rcases i with v | v\n \u00b7 exact hy _ _ _ ((Category.assoc _ _ _).trans (sIdelesToFiniteSIdeles_comp_piProj_inl L S v))\n (hfin v)\n \u00b7 exact (ModuleCat.subsingleton_of_isZero\n (isZero_tateCohomology_semilocalIntegralUnitsRep_of_notMem L hS v.property n)).elim _ _\n -- the infinite part of `y` vanishes: its components are those of `x`\n have hinf' : ((tateCohomologyFunctor n).map\n (sIdelesToIdeles (K := K) L S \u226b idelesToInfiniteIdeles K L)).hom y = 0 := by\n refine hiso _ (infiniteIdelesPiIso K L) <|\n (TateCohomology.linearEquivPi _ n).injective (funext fun w \u21a6 ?_)\n rw [TateCohomology.linearEquivPi_apply, map_zero, Pi.zero_apply]\n exact hy _ _ _ (by simp only [idelesToInfiniteSemilocalUnits, Category.assoc]) (hinf w)\n -- an `S`-idele is the product of its infinite part and its finite part\n have hy0 : y = 0 := by\n simp only [Functor.map_comp, ModuleCat.hom_comp, LinearMap.comp_apply] at hinf'\n simpa only [CategoryTheory.Functor.map_id, ModuleCat.hom_id, LinearMap.id_apply,\n Functor.map_add, ModuleCat.hom_add, LinearMap.add_apply, Functor.map_comp,\n ModuleCat.hom_comp, LinearMap.comp_apply, hinf', hfin', map_zero, add_zero] using\n congrArg (fun \u03c6 \u21a6 ((tateCohomologyFunctor n).map \u03c6).hom y) (sIdeles_hom_decomp L S)\n rw [hy0, map_zero]\n\n/-- **The semi-local components of a cohomology class with coefficients in the ideles are finitely\nsupported.** For a finite Galois extension `L/K` of number fields and `n > 0`, a class of\n`H^n(Gal(L/K), I_L)` has nonzero image in `H^n(Gal(L/K), (K_v \u2297[K] L)\u02e3)` at only finitely many\nfinite places `v` of `K`. -/\ntheorem finite_setOf_map_idelesToSemilocalUnits_ne_zero (x : tateCohomology (idelesRep K L) n) :\n {v | ((tateCohomologyFunctor n).map (idelesToSemilocalUnits L v)).hom x \u2260 0}.Finite := by\n obtain \u27e8S, hS, y, rfl\u27e9 := exists_map_sIdelesToIdeles_eq L n x\n refine S.finite_toSet.subset fun v hv \u21a6 ?_\n by_contra hvS\n refine hv ?_\n -- the image factors through the integral semi-local units, which have no cohomology\n have := ModuleCat.subsingleton_of_isZero\n (isZero_tateCohomology_semilocalIntegralUnitsRep_of_notMem L hS hvS n)\n simpa only [Functor.map_comp, ModuleCat.hom_comp, LinearMap.comp_apply,\n Subsingleton.elim (((tateCohomologyFunctor n).map\n (sIdelesToSemilocalIntegralUnits L S v hvS)).hom y) 0, map_zero] using\n (congrArg (fun \u03c6 \u21a6 ((tateCohomologyFunctor n).map \u03c6).hom y)\n (sIdelesToSemilocalIntegralUnits_comp_incl L S v hvS)).symm\n\nend Cohomology\n\n/-! ### Prescribing the semi-local components -/\n\nsection Prescribe\n\nvariable [IsGalois K L] (n : \u2115) [NeZero n]\n\n/-- Every family of semi-local classes at the finite places, vanishing outside a finite set `S`,\ntogether with a family at the infinite places, is the family of semi-local components of a class\nwith coefficients in the ideles. -/\nprivate theorem exists_map_semilocal_eq (S : Finset (HeightOneSpectrum (\ud835\udcde K)))\n (y : \u2200 v, tateCohomology (semilocalUnitsRep L v) n) (hy : \u2200 v \u2209 S, y v = 0)\n (z : \u2200 w, tateCohomology (infiniteSemilocalUnitsRep L w) n) :\n \u2203 x : tateCohomology (idelesRep K L) n,\n (\u2200 v, ((tateCohomologyFunctor n).map (idelesToSemilocalUnits L v)).hom x = y v) \u2227\n \u2200 w, ((tateCohomologyFunctor n).map (idelesToInfiniteSemilocalUnits L w)).hom x = z w := by\n classical\n let F := tateCohomologyFunctor (R := \u2124) (G := L \u2243\u2090[K] L) n\n have hF {X Y Z : Rep \u2124 (L \u2243\u2090[K] L)} (f : X \u27f6 Y) (g : Y \u27f6 Z) (c : tateCohomology X n) :\n (F.map g).hom ((F.map f).hom c) = (F.map (f \u226b g)).hom c := by\n rw [Functor.map_comp, ModuleCat.hom_comp, LinearMap.comp_apply]\n set T := NumberField.ramifiedSupport K L \u222a S\n -- a class of the finite `T`-ideles with components `y` at the places of `T`\n obtain \u27e8a, ha\u27e9 : \u2203 a : tateCohomology (finiteSIdelesRep L T) n, \u2200 v : T,\n (F.map ((finiteSIdelesPiIso L T).hom \u226b Rep.piProj _ (Sum.inl v))).hom a = y v.val :=\n \u27e8(F.map (finiteSIdelesPiIso L T).inv).hom\n ((TateCohomology.linearEquivPi _ n).symm (Sum.rec (fun v \u21a6 y v.val) fun _ \u21a6 0)), fun v \u21a6 by\n rw [hF, Iso.inv_hom_id_assoc, \u2190 TateCohomology.linearEquivPi_apply,\n LinearEquiv.apply_symm_apply]\u27e9\n -- a class of the infinite ideles with components `z`\n obtain \u27e8b, hb\u27e9 : \u2203 b : tateCohomology (infiniteIdelesRep K L) n, \u2200 w,\n (F.map ((infiniteIdelesPiIso K L).hom \u226b Rep.piProj _ w)).hom b = z w :=\n \u27e8(F.map (infiniteIdelesPiIso K L).inv).hom ((TateCohomology.linearEquivPi _ n).symm z),\n fun w \u21a6 by\n rw [hF, Iso.inv_hom_id_assoc, \u2190 TateCohomology.linearEquivPi_apply,\n LinearEquiv.apply_symm_apply]\u27e9\n -- the class of the `T`-ideles with finite part `a` and infinite part `b`\n set c := (F.map (finiteSIdelesToSIdeles L T)).hom a + (F.map (infiniteIdelesToSIdeles L T)).hom b\n have hcf : (F.map (sIdelesToFiniteSIdeles L T)).hom c = a := by\n rw [map_add, hF, hF]\n simp\n have hci : (F.map (sIdelesToIdeles (K := K) L T \u226b idelesToInfiniteIdeles K L)).hom c = b := by\n rw [map_add, hF, hF]\n simp\n refine \u27e8(F.map (sIdelesToIdeles (K := K) L T)).hom c, fun v \u21a6 ?_, fun w \u21a6 ?_\u27e9\n \u00b7 rw [hF]\n by_cases hv : v \u2208 T\n \u00b7 -- at a place of `T`, the component is read off the finite part\n exact (congrArg (fun \u03c6 \u21a6 (F.map \u03c6).hom c)\n (sIdelesToFiniteSIdeles_comp_piProj_inl L T \u27e8v, hv\u27e9)).symm.trans\n ((hF _ _ c).symm.trans ((congrArg _ hcf).trans (ha \u27e8v, hv\u27e9)))\n \u00b7 -- away from `T`, the component factors through the integral semi-local units, which have no\n -- cohomology\n have := ModuleCat.subsingleton_of_isZero\n (isZero_tateCohomology_semilocalIntegralUnitsRep_of_notMem L Finset.subset_union_left hv n)\n rw [hy v fun h \u21a6 hv (Finset.mem_union_right _ h),\n \u2190 sIdelesToSemilocalIntegralUnits_comp_incl L T v hv, \u2190 hF,\n Subsingleton.elim ((F.map (sIdelesToSemilocalIntegralUnits L T v hv)).hom c) 0, map_zero]\n \u00b7 rw [\u2190 hb, \u2190 hci, hF, hF]\n simp only [idelesToInfiniteSemilocalUnits, Category.assoc]\n\nvariable (K) in\n/-- **The semi-local components of the cohomology of the ideles.** For a finite Galois extension\n`L/K` of number fields and `n > 0`, the map\n`H^n(Gal(L/K), I_L) \u2192 \u2a01_v H^n(Gal(L/K), (K_v \u2297[K] L)\u02e3)` taking a class to its semi-local\ncomponents, as a finitely supported family at the finite places\n(`finite_setOf_map_idelesToSemilocalUnits_ne_zero`) together with a family at the infinite places.\nIt is an isomorphism (`idelesCohomologyLocalizationEquiv`). -/\ndef idelesCohomologyLocalization : tateCohomology (idelesRep K L) n \u2192+\n (\u03a0\u2080 v : HeightOneSpectrum (\ud835\udcde K), tateCohomology (semilocalUnitsRep L v) n) \u00d7\n ((w : InfinitePlace K) \u2192 tateCohomology (infiniteSemilocalUnitsRep L w) n) where\n toFun x :=\n (DFinsupp.ofSupportFinite\n (fun v \u21a6 ((tateCohomologyFunctor n).map (idelesToSemilocalUnits L v)).hom x)\n (finite_setOf_map_idelesToSemilocalUnits_ne_zero L n x),\n fun w \u21a6 ((tateCohomologyFunctor n).map (idelesToInfiniteSemilocalUnits L w)).hom x)\n map_zero' := Prod.ext (DFinsupp.ext fun _ \u21a6 by simp) (funext fun _ \u21a6 map_zero _)\n map_add' x y := Prod.ext (DFinsupp.ext fun _ \u21a6 by simp) (funext fun _ \u21a6 map_add _ x y)\n\n/-- The component of `idelesCohomologyLocalization` at a finite place `v` is induced by the\nsemi-local component at `v`. -/\n@[simp]\ntheorem idelesCohomologyLocalization_fst_apply (x : tateCohomology (idelesRep K L) n)\n (v : HeightOneSpectrum (\ud835\udcde K)) :\n (idelesCohomologyLocalization K L n x).1 v =\n ((tateCohomologyFunctor n).map (idelesToSemilocalUnits L v)).hom x :=\n DFinsupp.ofSupportFinite_apply _ _ v\n\n/-- The component of `idelesCohomologyLocalization` at an infinite place `w` is induced by the\nsemi-local component at `w`. -/\n@[simp]\ntheorem idelesCohomologyLocalization_snd_apply (x : tateCohomology (idelesRep K L) n)\n (w : InfinitePlace K) :\n (idelesCohomologyLocalization K L n x).2 w =\n ((tateCohomologyFunctor n).map (idelesToInfiniteSemilocalUnits L w)).hom x :=\n (rfl)\n\nvariable (K) in\n/-- A class with coefficients in the ideles is determined by its semi-local components. -/\ntheorem idelesCohomologyLocalization_injective :\n Function.Injective (idelesCohomologyLocalization K L n) :=\n (injective_iff_map_eq_zero _).2 fun x hx \u21a6 eq_zero_of_forall_map_semilocal_eq_zero L n\n (fun v \u21a6 by simpa using congrArg (fun y \u21a6 y.1 v) hx)\n (fun w \u21a6 by simpa using congrArg (fun y \u21a6 y.2 w) hx)\n\nvariable (K) in\n/-- Every finitely supported family of semi-local classes is the family of semi-local components\nof a class with coefficients in the ideles. -/\ntheorem idelesCohomologyLocalization_surjective :\n Function.Surjective (idelesCohomologyLocalization K L n) := by\n classical\n rintro \u27e8y, z\u27e9\n obtain \u27e8x, hy, hz\u27e9 := exists_map_semilocal_eq L n y.support y\n (fun v hv \u21a6 DFinsupp.notMem_support_iff.1 hv) z\n exact \u27e8x, Prod.ext (DFinsupp.ext fun v \u21a6 by simp [hy]) (funext fun w \u21a6 by simp [hz])\u27e9\n\nvariable (K) in\n/-- **The cohomology of the ideles is the direct sum of the semi-local cohomology groups.** For a\nfinite Galois extension `L/K` of number fields and `n > 0`,\n`H^n(Gal(L/K), I_L) \u2243 \u2a01_v H^n(Gal(L/K), (K_v \u2297[K] L)\u02e3)`, the sum running over the finite and the\ninfinite places of `K`, by taking semi-local components. -/\ndef idelesCohomologyLocalizationEquiv : tateCohomology (idelesRep K L) n \u2243+\n (\u03a0\u2080 v : HeightOneSpectrum (\ud835\udcde K), tateCohomology (semilocalUnitsRep L v) n) \u00d7\n ((w : InfinitePlace K) \u2192 tateCohomology (infiniteSemilocalUnitsRep L w) n) :=\n AddEquiv.ofBijective (idelesCohomologyLocalization K L n)\n \u27e8idelesCohomologyLocalization_injective K L n, idelesCohomologyLocalization_surjective K L n\u27e9\n\n/-- `idelesCohomologyLocalizationEquiv` takes a class to its semi-local components. -/\n@[simp]\ntheorem coe_idelesCohomologyLocalizationEquiv :\n \u21d1(idelesCohomologyLocalizationEquiv K L n) = idelesCohomologyLocalization K L n :=\n (rfl)\n\nend Prescribe\n\nsection Hilbert90\n\nvariable {L} [IsGalois K L]\n\n/-- **Hilbert 90 for ideles.** The first Tate cohomology of the idele module of a finite Galois\nextension of number fields vanishes. -/\ntheorem isZero_tateCohomology_one_idelesRep : IsZero (tateCohomology (idelesRep K L) 1) := by\n have h (x : tateCohomology (idelesRep K L) 1) : x = 0 := by\n apply eq_zero_of_forall_map_semilocal_eq_zero L 1\n \u00b7 intro v\n exact (ModuleCat.subsingleton_of_isZero\n (v.isZero_tateCohomology_one_semilocalUnitsRep (L := L))).elim _ _\n \u00b7 intro v\n exact (ModuleCat.subsingleton_of_isZero\n (v.isZero_tateCohomology_one_infiniteSemilocalUnitsRep (L := L))).elim _ _\n have : Subsingleton (tateCohomology (idelesRep K L) 1) :=\n \u27e8fun x y => (h x).trans (h y).symm\u27e9\n exact ModuleCat.isZero_of_subsingleton _\n\n/-- **Hilbert 90 for ideles**, on ordinary group cohomology: `H\u00b9(Gal(L/K), I_L) = 0`. -/\ninstance subsingleton_groupCohomology_one_idelesRep :\n Subsingleton (groupCohomology (idelesRep K L) 1) :=\n ModuleCat.subsingleton_of_isZero <| isZero_tateCohomology_one_idelesRep.of_iso\n ((_root_.TateCohomology.isoGroupCohomology 1).app (idelesRep K L)).symm\n\nend Hilbert90\n\nend TauCeti.ClassFieldTheory\n", "public_theorems": ["TauCeti.ClassFieldTheory.idelesToSemilocalUnits_hom_apply", "TauCeti.ClassFieldTheory.coe_idelesToInfiniteSemilocalUnits_hom_apply", "TauCeti.ClassFieldTheory.eq_zero_of_forall_map_semilocal_eq_zero", "TauCeti.ClassFieldTheory.finite_setOf_map_idelesToSemilocalUnits_ne_zero", "TauCeti.ClassFieldTheory.idelesCohomologyLocalization_fst_apply", "TauCeti.ClassFieldTheory.idelesCohomologyLocalization_snd_apply", "TauCeti.ClassFieldTheory.idelesCohomologyLocalization_injective", "TauCeti.ClassFieldTheory.idelesCohomologyLocalization_surjective", "TauCeti.ClassFieldTheory.coe_idelesCohomologyLocalizationEquiv", "TauCeti.ClassFieldTheory.isZero_tateCohomology_one_idelesRep"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.NumberTheory.ClassFieldTheory.Global.SIdeles\npublic import TauCeti.NumberTheory.ClassFieldTheory.Global.SemilocalUnits\npublic import TauCeti.NumberTheory.NumberField.Discriminant.RamifiedSupport.Basic\npublic import TauCeti.RepresentationTheory.Homological.TateCohomology.DirectedUnion\npublic import TauCeti.RepresentationTheory.Homological.TateCohomology.Pi\nimport TauCeti.Data.DFinsupp.Basic\n\n/-!\n# The cohomology of the ideles, place by place\n\nLet `L/K` be a finite Galois extension of number fields with Galois group `G`. The ideles `I_L` of\n`L`, as a representation of `G`, map to the semi-local unit groups `(K_v \u2297[K] L)\u02e3 \u2243 \u220f_{w \u2223 v} L_w\u02e3`\nat every place `v` of `K`, finite (`idelesToSemilocalUnits`) or infinite\n(`idelesToInfiniteSemilocalUnits`). This file shows that in every positive degree `n` these maps\nidentify the cohomology of the ideles with the direct sum of the semi-local cohomology groups,\n\n```text\nH^n(G, I_L) \u2243 \u2a01_v H^n(G, (K_v \u2297[K] L)\u02e3)\n```\n\n(`idelesCohomologyLocalizationEquiv`), the sum running over the finite and the infinite places:\n\n* a class of `H^n(G, I_L)` whose images in all the groups `H^n(G, (K_v \u2297[K] L)\u02e3)` vanish is zero\n (`eq_zero_of_forall_map_semilocal_eq_zero`);\n* only finitely many of its images at the finite places are nonzero\n (`finite_setOf_map_idelesToSemilocalUnits_ne_zero`);\n* every finitely supported family of semi-local classes is the family of images of a class\n (`idelesCohomologyLocalization_surjective`);\n* its first cohomology vanishes (`isZero_tateCohomology_one_idelesRep`), by field Hilbert 90\n and Shapiro at every finite and infinite place, without a cyclicity hypothesis.\n\nBy positive-degree Shapiro (`HeightOneSpectrum.semilocalUnitsTateCohomologyIsoPos` at the finite\nplaces, `InfinitePlace.infiniteSemilocalUnitsTateCohomologyIsoPos` at the infinite places) the group\n`H^n(G, (K_v \u2297[K] L)\u02e3)` is the cohomology `H^n(G_w, L_w\u02e3)` of the completion at a place `w \u2223 v`,\nso the images of a degree-`2` cohomology class with coefficients in the ideles are its local Brauer\nclasses in `Br(L_w/K_v)`, and `H\u00b2(G, I_L)` is the direct sum of the local Brauer groups\n`Br(L_w/K_v)`. The first statement is the idelic half of the injectivity of\n`Br(L/K) \u2192 \u2a01_v Br(L_w/K_v)`; the other half is the vanishing of `H\u00b9(G, C_L)`.\n\nThe proof is Milne's (*Class Field Theory*, VII, Lemma 2.4 and Proposition 2.5). The ideles are the\nunion of the `S`-ideles over the finite sets `S` of finite places, so every class comes from the\n`S`-ideles for a finite `S` that may be taken to contain the places ramified in `L`\n(`TauCeti.TateCohomology.exists_tateCohomologyFunctor_map_eq`). The `S`-ideles split as\n`I_{L,S} = L_\u221e\u02e3 \u00d7 I_{L,S}^f` (`sIdeles_hom_decomp`), the infinite ideles are the product\nof the archimedean semi-local unit groups (`TauCeti.GlobalNumberFields.infiniteIdelesPiIso`), and\nthe finite `S`-ideles are the product of the semi-local unit groups at `S` and of the integral\nsemi-local unit groups away from `S` (`TauCeti.finiteSIdelesPiIso`). Tate cohomology commutes with\nproducts (`TauCeti.TateCohomology.linearEquivPi`), and the integral factors, at places unramified\nin `L`, have no cohomology in positive degrees\n(`isZero_tateCohomology_semilocalIntegralUnitsRep_of_neZero`). Read backwards, the same\ndecomposition prescribes the semi-local components: a family supported on such an `S` is the image\nof a class of the `S`-ideles, built factor by factor.\n\n## Main definitions\n\n* `TauCeti.ClassFieldTheory.idelesToSemilocalUnits L v`,\n `TauCeti.ClassFieldTheory.idelesToInfiniteSemilocalUnits L w`: the semi-local components of an\n idele at a finite place `v` and at an infinite place `w` of `K`.\n* `TauCeti.ClassFieldTheory.idelesCohomologyLocalization K L n`: the map\n `H^n(G, I_L) \u2192 \u2a01_v H^n(G, (K_v \u2297[K] L)\u02e3)` taking a class to its semi-local components.\n* `TauCeti.ClassFieldTheory.idelesCohomologyLocalizationEquiv K L n`: the same map, as an\n isomorphism for `n > 0`.\n\n## Main results\n\n* `TauCeti.ClassFieldTheory.eq_zero_of_forall_map_semilocal_eq_zero`: a class of\n `H^n(G, I_L)`, `n > 0`, with vanishing semi-local components is zero.\n* `TauCeti.ClassFieldTheory.finite_setOf_map_idelesToSemilocalUnits_ne_zero`: a class of\n `H^n(G, I_L)`, `n > 0`, has nonzero semi-local components at only finitely many finite places.\n* `TauCeti.ClassFieldTheory.idelesCohomologyLocalization_surjective`: for `n > 0`, every finitely\n supported family of semi-local classes is the family of semi-local components of a class.\n* `TauCeti.ClassFieldTheory.isZero_tateCohomology_one_idelesRep`: Hilbert 90 for ideles,\n on the Tate carrier.\n* `TauCeti.ClassFieldTheory.subsingleton_groupCohomology_one_idelesRep`: Hilbert 90 on ordinary\n cohomology, as an instance.\n\nIn the long exact cohomology sequence of `L\u02e3 \u2192 I_L \u2192 C_L`, idelic Hilbert 90 makes\n`H\u00b9(Gal(L/K), C_L) \u2192 H\u00b2(Gal(L/K), L\u02e3)` injective. Thus vanishing of idele-class `H\u00b9` is\nequivalent to injectivity of the map from relative Brauer classes to idelic cohomology.\n\n## References\n\n* J. S. Milne, *Class Field Theory*, v4.03, Chapter VII, Lemma 2.4, Proposition 2.5\n and Corollary 2.6.\n* J. Tate, *Global class field theory*, in J. W. S. Cassels and A. Fr\u00f6hlich (eds.),\n *Algebraic Number Theory*, Chapter VII, \u00a7\u00a76\u20137.\n-/\n\npublic section\nnoncomputable section\n\nopen CategoryTheory Limits IsDedekindDomain IsDedekindDomain.HeightOneSpectrum NumberField\nopen scoped AdeleGaloisAction TensorProduct\n\nnamespace TauCeti.ClassFieldTheory\n\nopen GlobalNumberFields\n\nvariable {K : Type} [Field K] [NumberField K] (L : Type) [Field L] [NumberField L] [Algebra K L]\n\n/-! ### The semi-local components of an idele -/\n\nsection Components\n\n/-- **The semi-local component of an idele at a finite place** `v` of `K`, its components at the\nplaces `w \u2223 v` of `L` as a unit of `K_v \u2297[K] L \u2243 \u220f_{w \u2223 v} L_w`, as a morphism of representations\nof `Aut(L/K)`. -/\ndef idelesToSemilocalUnits (v : HeightOneSpectrum (\ud835\udcde K)) :\n idelesRep K L \u27f6 semilocalUnitsRep L v :=\n Rep.ofHom <| LinearMap.intertwiningMap_of_isIntertwiningMap _ _\n ((finiteIdeleSemilocalHom L v).comp (IdeleGroup.toFiniteIdele (\ud835\udcde L) L)\n ).toAdditive.toIntLinearMap\n fun \u03c3 x \u21a6 congrArg Additive.ofMul <| (congrArg (finiteIdeleSemilocalHom L v)\n (toFiniteIdele_smul \u03c3 x.toMul)).trans\n (finiteIdeleSemilocalHom_map_finiteAdeleGaloisAction v \u03c3 _)", "/-- `idelesToSemilocalUnits L v` is the semi-local component at `v` of the finite part. -/\n-- Normalize the implicit restriction parameters so the simp rule matches after `Rep.res_obj_\u03c1`.\n@[simp]\ntheorem idelesToSemilocalUnits_hom_apply (v : HeightOneSpectrum (\ud835\udcde K))\n (x : Additive (IdeleGroup (\ud835\udcde L) L)) :\n dsimp% only [Rep.ofAlgebraAutOnUnits, Rep.res_obj_\u03c1]\n ((idelesToSemilocalUnits L v).hom x =\n Additive.ofMul (finiteIdeleSemilocalHom L v (IdeleGroup.toFiniteIdele (\ud835\udcde L) L x.toMul))) :=", "/-- **The semi-local component of an idele at an infinite place** `w` of `K`, its components at\nthe places of `L` above `w` as a unit of `K_w \u2297[K] L`, as a morphism of representations of\n`Aut(L/K)`. -/\ndef idelesToInfiniteSemilocalUnits (w : InfinitePlace K) :\n idelesRep K L \u27f6 infiniteSemilocalUnitsRep L w :=\n idelesToInfiniteIdeles K L \u226b (infiniteIdelesPiIso K L).hom \u226b Rep.piProj _ w", "/-- `idelesToInfiniteSemilocalUnits L w` is the semi-local component at `w` of the infinite\npart. -/\n-- Normalize the implicit restriction parameters so the simp rule matches after `Rep.res_obj_\u03c1`.\n@[simp]\ntheorem coe_idelesToInfiniteSemilocalUnits_hom_apply (w : InfinitePlace K)\n (x : Additive (IdeleGroup (\ud835\udcde L) L)) :\n dsimp% only [Rep.ofAlgebraAutOnUnits, Rep.res_obj_\u03c1]\n ((Additive.toMul (\u03b1 := (w.Completion \u2297[K] L)\u02e3) ((idelesToInfiniteSemilocalUnits L w).hom x) :\n w.Completion \u2297[K] L) =\n infiniteAdeleSemilocalHom L w (x.toMul : AdeleRing (\ud835\udcde L) L).1) :=", "end Components\n\n/-! ### The `S`-ideles inside the ideles -/\n\nsection SIdeles\n\nvariable (S : Finset (HeightOneSpectrum (\ud835\udcde K)))", "/-- At a place `v \u2209 S`, the semi-local component of an `S`-idele is integral; as a morphism of\nrepresentations. -/\nprivate def sIdelesToSemilocalIntegralUnits (v : HeightOneSpectrum (\ud835\udcde K)) (hv : v \u2209 S) :\n sIdelesRep (K := K) L S \u27f6 semilocalIntegralUnitsRep L v :=\n Rep.ofHom <| LinearMap.intertwiningMap_of_isIntertwiningMap _ _\n (((finiteIdeleSemilocalHom L v).comp ((IdeleGroup.toFiniteIdele (\ud835\udcde L) L).comp\n (sIdeles L (S : Set (HeightOneSpectrum (\ud835\udcde K)))).subtype)).codRestrict\n (semilocalIntegralUnits L v) fun x \u21a6\n mem_finiteSIdeles_iff.1 (toFiniteIdele_mem_finiteSIdeles_iff.2 x.property) v hv\n ).toAdditive.toIntLinearMap\n fun \u03c3 x \u21a6 congrArg Additive.ofMul <| Subtype.ext <| (congrArg (finiteIdeleSemilocalHom L v)\n (toFiniteIdele_smul \u03c3 x.toMul.val)).trans\n (finiteIdeleSemilocalHom_map_finiteAdeleGaloisAction v \u03c3 _)", "end SIdeles\n\n/-! ### The cohomology of the ideles -/\n\nsection Cohomology\n\nvariable [IsGalois K L]", "variable (n : \u2115) [NeZero n]", "/-- **The cohomology of the ideles is detected place by place.** For a finite Galois extension\n`L/K` of number fields and `n > 0`, a class of `H^n(Gal(L/K), I_L)` whose images in\n`H^n(Gal(L/K), (K_v \u2297[K] L)\u02e3)` vanish at every finite and every infinite place `v` of `K` is\nzero. -/\ntheorem eq_zero_of_forall_map_semilocal_eq_zero\n {x : tateCohomology (idelesRep K L) n}\n (hfin : \u2200 v, ((tateCohomologyFunctor n).map (idelesToSemilocalUnits L v)).hom x = 0)\n (hinf : \u2200 w, ((tateCohomologyFunctor n).map (idelesToInfiniteSemilocalUnits L w)).hom x = 0) :\n x = 0 :=", "/-- **The semi-local components of a cohomology class with coefficients in the ideles are finitely\nsupported.** For a finite Galois extension `L/K` of number fields and `n > 0`, a class of\n`H^n(Gal(L/K), I_L)` has nonzero image in `H^n(Gal(L/K), (K_v \u2297[K] L)\u02e3)` at only finitely many\nfinite places `v` of `K`. -/\ntheorem finite_setOf_map_idelesToSemilocalUnits_ne_zero (x : tateCohomology (idelesRep K L) n) :\n {v | ((tateCohomologyFunctor n).map (idelesToSemilocalUnits L v)).hom x \u2260 0}.Finite :=", "end Cohomology\n\n/-! ### Prescribing the semi-local components -/\n\nsection Prescribe\n\nvariable [IsGalois K L] (n : \u2115) [NeZero n]", "variable (K) in\n/-- **The semi-local components of the cohomology of the ideles.** For a finite Galois extension\n`L/K` of number fields and `n > 0`, the map\n`H^n(Gal(L/K), I_L) \u2192 \u2a01_v H^n(Gal(L/K), (K_v \u2297[K] L)\u02e3)` taking a class to its semi-local\ncomponents, as a finitely supported family at the finite places\n(`finite_setOf_map_idelesToSemilocalUnits_ne_zero`) together with a family at the infinite places.\nIt is an isomorphism (`idelesCohomologyLocalizationEquiv`). -/\ndef idelesCohomologyLocalization : tateCohomology (idelesRep K L) n \u2192+\n (\u03a0\u2080 v : HeightOneSpectrum (\ud835\udcde K), tateCohomology (semilocalUnitsRep L v) n) \u00d7\n ((w : InfinitePlace K) \u2192 tateCohomology (infiniteSemilocalUnitsRep L w) n) where\n toFun x :=\n (DFinsupp.ofSupportFinite\n (fun v \u21a6 ((tateCohomologyFunctor n).map (idelesToSemilocalUnits L v)).hom x)\n (finite_setOf_map_idelesToSemilocalUnits_ne_zero L n x),\n fun w \u21a6 ((tateCohomologyFunctor n).map (idelesToInfiniteSemilocalUnits L w)).hom x)\n map_zero' := Prod.ext (DFinsupp.ext fun _ \u21a6 by simp) (funext fun _ \u21a6 map_zero _)\n map_add' x y := Prod.ext (DFinsupp.ext fun _ \u21a6 by simp) (funext fun _ \u21a6 map_add _ x y)", "/-- The component of `idelesCohomologyLocalization` at a finite place `v` is induced by the\nsemi-local component at `v`. -/\n@[simp]\ntheorem idelesCohomologyLocalization_fst_apply (x : tateCohomology (idelesRep K L) n)\n (v : HeightOneSpectrum (\ud835\udcde K)) :\n (idelesCohomologyLocalization K L n x).1 v =\n ((tateCohomologyFunctor n).map (idelesToSemilocalUnits L v)).hom x :=", "/-- The component of `idelesCohomologyLocalization` at an infinite place `w` is induced by the\nsemi-local component at `w`. -/\n@[simp]\ntheorem idelesCohomologyLocalization_snd_apply (x : tateCohomology (idelesRep K L) n)\n (w : InfinitePlace K) :\n (idelesCohomologyLocalization K L n x).2 w =\n ((tateCohomologyFunctor n).map (idelesToInfiniteSemilocalUnits L w)).hom x :=", "variable (K) in", "/-- A class with coefficients in the ideles is determined by its semi-local components. -/\ntheorem idelesCohomologyLocalization_injective :\n Function.Injective (idelesCohomologyLocalization K L n) :=", "variable (K) in", "/-- Every finitely supported family of semi-local classes is the family of semi-local components\nof a class with coefficients in the ideles. -/\ntheorem idelesCohomologyLocalization_surjective :\n Function.Surjective (idelesCohomologyLocalization K L n) :=", "variable (K) in\n/-- **The cohomology of the ideles is the direct sum of the semi-local cohomology groups.** For a\nfinite Galois extension `L/K` of number fields and `n > 0`,\n`H^n(Gal(L/K), I_L) \u2243 \u2a01_v H^n(Gal(L/K), (K_v \u2297[K] L)\u02e3)`, the sum running over the finite and the\ninfinite places of `K`, by taking semi-local components. -/\ndef idelesCohomologyLocalizationEquiv : tateCohomology (idelesRep K L) n \u2243+\n (\u03a0\u2080 v : HeightOneSpectrum (\ud835\udcde K), tateCohomology (semilocalUnitsRep L v) n) \u00d7\n ((w : InfinitePlace K) \u2192 tateCohomology (infiniteSemilocalUnitsRep L w) n) :=\n AddEquiv.ofBijective (idelesCohomologyLocalization K L n)\n \u27e8idelesCohomologyLocalization_injective K L n, idelesCohomologyLocalization_surjective K L n\u27e9", "/-- `idelesCohomologyLocalizationEquiv` takes a class to its semi-local components. -/\n@[simp]\ntheorem coe_idelesCohomologyLocalizationEquiv :\n \u21d1(idelesCohomologyLocalizationEquiv K L n) = idelesCohomologyLocalization K L n :=", "end Prescribe\n\nsection Hilbert90\n\nvariable {L} [IsGalois K L]", "/-- **Hilbert 90 for ideles.** The first Tate cohomology of the idele module of a finite Galois\nextension of number fields vanishes. -/\ntheorem isZero_tateCohomology_one_idelesRep : IsZero (tateCohomology (idelesRep K L) 1) :=", "/-- **Hilbert 90 for ideles**, on ordinary group cohomology: `H\u00b9(Gal(L/K), I_L) = 0`. -/\ninstance subsingleton_groupCohomology_one_idelesRep :\n Subsingleton (groupCohomology (idelesRep K L) 1) :=\n ModuleCat.subsingleton_of_isZero <| isZero_tateCohomology_one_idelesRep.of_iso\n ((_root_.TateCohomology.isoGroupCohomology 1).app (idelesRep K L)).symm\n\nend Hilbert90\n\nend TauCeti.ClassFieldTheory"], "free_length": 9658, "file_length": 15505, "heartbeats": 76440, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.RepresentationTheory.Quiver.Zigzag.Componentwise.Corner.Basic", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/RepresentationTheory/Quiver/Zigzag/Componentwise/Corner/Basic.lean", "module": "TauCeti.RepresentationTheory.Quiver.Zigzag.Componentwise.Corner.Basic", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.RepresentationTheory.Quiver.Zigzag.Componentwise.Multiplication\npublic import TauCeti.RingTheory.Idempotents.Corner.Basic\n\n/-!\n# Corners of the componentwise zigzag algebra\n\nFor distinct nonadjacent vertices `i, j` of a finite simple graph, the corner\n`e_i Z e_j` of the componentwise zigzag algebra is zero, including when either\nvertex is isolated. These corners enter the calculation of tensor products\nof the vertex projective bimodules. The diagonal corner is spanned by\nthe vertex and its volume vector; its coordinates give the two middle\nsummands in the self-tensor calculation used for inverse braid complexes.\n\nSee Huerfano--Khovanov, *A category for the adjoint representation*.\n-/\n\npublic section\n\nnamespace TauCeti\n\nvariable (k : Type*) [CommRing k] {V : Type*} (G : SimpleGraph V) [Finite V]\n\nlocal notation \"e\" => fun i : V \u21a6 zigzagAlgebraBasis k G (Sum.inl i)\n\n/-- Distinct nonadjacent vertex idempotents cut out a zero corner of the public\nzigzag algebra, including its isolated-vertex dual-number factors. -/\ntheorem cornerSubmodule_zigzagAlgebra_eq_bot_of_ne_of_not_adj {i j : V}\n (hij : i \u2260 j) (hadj : \u00ac G.Adj i j) : cornerSubmodule k (e i) (e j) = \u22a5 := by\n classical\n have hzero : LinearMap.mulLeftRight k (e i, e j) = 0 := by\n apply (zigzagAlgebraBasis k G).ext\n intro b\n simp only [LinearMap.mulLeftRight_apply, LinearMap.zero_apply]\n rcases b with v | d | v\n \u00b7 by_cases h : i = v\n \u00b7 subst v\n simp [hij]\n \u00b7 simp [h]\n \u00b7 by_cases h : i = d.snd\n \u00b7 by_cases h' : d.fst = j\n \u00b7 have ha : G.Adj i j := by simpa only [h, \u2190 h'] using d.adj.symm\n exact (hadj ha).elim\n \u00b7 simp [h, Ne.symm h']\n \u00b7 simp [h]\n \u00b7 by_cases h : i = v\n \u00b7 subst v\n simp [hij]\n \u00b7 simp [h]\n rw [cornerSubmodule_def]\n exact LinearMap.range_eq_bot.mpr hzero\n\n/-- Distinct nonadjacent vertex idempotents kill every algebra element between them. -/\ntheorem zigzagAlgebraBasis_inl_mul_mul_eq_zero_of_ne_of_not_adj {i j : V}\n (hij : i \u2260 j) (hadj : \u00ac G.Adj i j) (x : zigzagAlgebra k G) :\n e i * x * e j = 0 := by\n have h := mul_mul_mem_cornerSubmodule k (e i) (e j) x\n simpa only [cornerSubmodule_zigzagAlgebra_eq_bot_of_ne_of_not_adj k G hij hadj,\n Submodule.mem_bot] using h\n\n/-- Cutting down at the same vertex keeps exactly the vertex and volume coordinates. -/\ntheorem zigzagAlgebraBasis_inl_mul_mul_self (i : V) (x : zigzagAlgebra k G) :\n e i * x * e i =\n (zigzagAlgebraBasis k G).repr x (.inl i) \u2022 e i +\n (zigzagAlgebraBasis k G).repr x (.inr (.inr i)) \u2022\n zigzagAlgebraBasis k G (.inr (.inr i)) := by\n classical\n have key : LinearMap.mulLeftRight k (e i, e i) =\n ((zigzagAlgebraBasis k G).coord (.inl i)).smulRight (e i) +\n ((zigzagAlgebraBasis k G).coord (.inr (.inr i))).smulRight\n (zigzagAlgebraBasis k G (.inr (.inr i))) := by\n apply (zigzagAlgebraBasis k G).ext\n intro b\n simp only [LinearMap.mulLeftRight_apply, LinearMap.add_apply,\n LinearMap.smulRight_apply, Module.Basis.coord_apply, Module.Basis.repr_self]\n rcases b with j | d | j\n \u00b7 by_cases h : i = j\n \u00b7 subst j\n simp\n \u00b7 simp [h]\n \u00b7 by_cases h : i = d.snd\n \u00b7 simp [h]\n \u00b7 simp [h]\n \u00b7 by_cases h : i = j\n \u00b7 subst j\n simp\n \u00b7 simp [h]\n exact LinearMap.congr_fun key x\n\n/-- The diagonal corner consists of the span of the vertex and volume basis vectors. -/\ntheorem cornerSubmodule_zigzagAlgebra_self_eq_span (i : V) :\n cornerSubmodule k (e i) (e i) =\n Submodule.span k {e i, zigzagAlgebraBasis k G (.inr (.inr i))} := by\n apply le_antisymm\n \u00b7 intro x hx\n have h := (mem_cornerSubmodule_iff k (isIdempotentElem_zigzagAlgebraBasis_inl k G i)\n (isIdempotentElem_zigzagAlgebraBasis_inl k G i)).mp hx\n rw [\u2190 h, zigzagAlgebraBasis_inl_mul_mul_self]\n exact Submodule.add_mem _\n (Submodule.smul_mem _ _ (Submodule.subset_span (by simp)))\n (Submodule.smul_mem _ _ (Submodule.subset_span (by simp)))\n \u00b7 rw [Submodule.span_le]\n intro x hx\n rcases Set.mem_insert_iff.mp hx with rfl | hx\n \u00b7 exact (mem_cornerSubmodule_iff k (isIdempotentElem_zigzagAlgebraBasis_inl k G i)\n (isIdempotentElem_zigzagAlgebraBasis_inl k G i)).mpr (by simp)\n \u00b7 have hx' : x = zigzagAlgebraBasis k G (.inr (.inr i)) := Set.mem_singleton_iff.mp hx\n subst x\n exact (mem_cornerSubmodule_iff k (isIdempotentElem_zigzagAlgebraBasis_inl k G i)\n (isIdempotentElem_zigzagAlgebraBasis_inl k G i)).mpr (by simp)\n\n/-- The vertex and volume coordinates identify the diagonal corner with two ground-ring copies. -/\nnoncomputable def zigzagAlgebraSelfCornerEquiv (i : V) :\n cornerSubmodule k (e i) (e i) \u2243\u2097[k] k \u00d7 k where\n toFun x := ((zigzagAlgebraBasis k G).repr x (.inl i),\n (zigzagAlgebraBasis k G).repr x (.inr (.inr i)))\n invFun a := \u27e8a.1 \u2022 e i + a.2 \u2022 zigzagAlgebraBasis k G (.inr (.inr i)), by\n rw [cornerSubmodule_zigzagAlgebra_self_eq_span]\n exact Submodule.add_mem _\n (Submodule.smul_mem _ _ (Submodule.subset_span (by simp)))\n (Submodule.smul_mem _ _ (Submodule.subset_span (by simp)))\u27e9\n map_add' x y := by simp\n map_smul' r x := by simp\n left_inv x := Subtype.ext <|\n (zigzagAlgebraBasis_inl_mul_mul_self k G i x).symm.trans\n ((mem_cornerSubmodule_iff k (isIdempotentElem_zigzagAlgebraBasis_inl k G i)\n (isIdempotentElem_zigzagAlgebraBasis_inl k G i)).mp x.property)\n right_inv a := by simp\n\n@[simp]\ntheorem zigzagAlgebraSelfCornerEquiv_apply (i : V)\n (x : cornerSubmodule k (e i) (e i)) :\n zigzagAlgebraSelfCornerEquiv k G i x =\n ((zigzagAlgebraBasis k G).repr x (.inl i),\n (zigzagAlgebraBasis k G).repr x (.inr (.inr i))) := (rfl)\n\n@[simp]\ntheorem coe_zigzagAlgebraSelfCornerEquiv_symm_apply (i : V) (a : k \u00d7 k) :\n ((zigzagAlgebraSelfCornerEquiv k G i).symm a : zigzagAlgebra k G) =\n a.1 \u2022 e i + a.2 \u2022 zigzagAlgebraBasis k G (.inr (.inr i)) := (rfl)\n\nend TauCeti\n", "public_theorems": ["TauCeti.cornerSubmodule_zigzagAlgebra_eq_bot_of_ne_of_not_adj", "TauCeti.zigzagAlgebraBasis_inl_mul_mul_eq_zero_of_ne_of_not_adj", "TauCeti.zigzagAlgebraBasis_inl_mul_mul_self", "TauCeti.cornerSubmodule_zigzagAlgebra_self_eq_span", "TauCeti.zigzagAlgebraSelfCornerEquiv_apply", "TauCeti.coe_zigzagAlgebraSelfCornerEquiv_symm_apply"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.RepresentationTheory.Quiver.Zigzag.Componentwise.Multiplication\npublic import TauCeti.RingTheory.Idempotents.Corner.Basic\n\n/-!\n# Corners of the componentwise zigzag algebra\n\nFor distinct nonadjacent vertices `i, j` of a finite simple graph, the corner\n`e_i Z e_j` of the componentwise zigzag algebra is zero, including when either\nvertex is isolated. These corners enter the calculation of tensor products\nof the vertex projective bimodules. The diagonal corner is spanned by\nthe vertex and its volume vector; its coordinates give the two middle\nsummands in the self-tensor calculation used for inverse braid complexes.\n\nSee Huerfano--Khovanov, *A category for the adjoint representation*.\n-/\n\npublic section\n\nnamespace TauCeti\n\nvariable (k : Type*) [CommRing k] {V : Type*} (G : SimpleGraph V) [Finite V]\n\nlocal notation \"e\" => fun i : V \u21a6 zigzagAlgebraBasis k G (Sum.inl i)", "/-- Distinct nonadjacent vertex idempotents cut out a zero corner of the public\nzigzag algebra, including its isolated-vertex dual-number factors. -/\ntheorem cornerSubmodule_zigzagAlgebra_eq_bot_of_ne_of_not_adj {i j : V}\n (hij : i \u2260 j) (hadj : \u00ac G.Adj i j) : cornerSubmodule k (e i) (e j) = \u22a5 :=", "/-- Distinct nonadjacent vertex idempotents kill every algebra element between them. -/\ntheorem zigzagAlgebraBasis_inl_mul_mul_eq_zero_of_ne_of_not_adj {i j : V}\n (hij : i \u2260 j) (hadj : \u00ac G.Adj i j) (x : zigzagAlgebra k G) :\n e i * x * e j = 0 :=", "/-- Cutting down at the same vertex keeps exactly the vertex and volume coordinates. -/\ntheorem zigzagAlgebraBasis_inl_mul_mul_self (i : V) (x : zigzagAlgebra k G) :\n e i * x * e i =\n (zigzagAlgebraBasis k G).repr x (.inl i) \u2022 e i +\n (zigzagAlgebraBasis k G).repr x (.inr (.inr i)) \u2022\n zigzagAlgebraBasis k G (.inr (.inr i)) :=", "/-- The diagonal corner consists of the span of the vertex and volume basis vectors. -/\ntheorem cornerSubmodule_zigzagAlgebra_self_eq_span (i : V) :\n cornerSubmodule k (e i) (e i) =\n Submodule.span k {e i, zigzagAlgebraBasis k G (.inr (.inr i))} :=", "/-- The vertex and volume coordinates identify the diagonal corner with two ground-ring copies. -/\nnoncomputable def zigzagAlgebraSelfCornerEquiv (i : V) :\n cornerSubmodule k (e i) (e i) \u2243\u2097[k] k \u00d7 k where\n toFun x := ((zigzagAlgebraBasis k G).repr x (.inl i),\n (zigzagAlgebraBasis k G).repr x (.inr (.inr i)))\n invFun a := \u27e8a.1 \u2022 e i + a.2 \u2022 zigzagAlgebraBasis k G (.inr (.inr i)), by\n rw [cornerSubmodule_zigzagAlgebra_self_eq_span]\n exact Submodule.add_mem _\n (Submodule.smul_mem _ _ (Submodule.subset_span (by simp)))\n (Submodule.smul_mem _ _ (Submodule.subset_span (by simp)))\u27e9\n map_add' x y := by simp\n map_smul' r x := by simp\n left_inv x := Subtype.ext <|\n (zigzagAlgebraBasis_inl_mul_mul_self k G i x).symm.trans\n ((mem_cornerSubmodule_iff k (isIdempotentElem_zigzagAlgebraBasis_inl k G i)\n (isIdempotentElem_zigzagAlgebraBasis_inl k G i)).mp x.property)\n right_inv a := by simp", "@[simp]\ntheorem zigzagAlgebraSelfCornerEquiv_apply (i : V)\n (x : cornerSubmodule k (e i) (e i)) :\n zigzagAlgebraSelfCornerEquiv k G i x =\n ((zigzagAlgebraBasis k G).repr x (.inl i),\n (zigzagAlgebraBasis k G).repr x (.inr (.inr i))) :=", "@[simp]\ntheorem coe_zigzagAlgebraSelfCornerEquiv_symm_apply (i : V) (a : k \u00d7 k) :\n ((zigzagAlgebraSelfCornerEquiv k G i).symm a : zigzagAlgebra k G) =\n a.1 \u2022 e i + a.2 \u2022 zigzagAlgebraBasis k G (.inr (.inr i)) :=", "end TauCeti"], "free_length": 2152, "file_length": 4409, "heartbeats": 9886, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Topology.Homotopy.Cube.Radius", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Topology/Homotopy/Cube/Radius.lean", "module": "TauCeti.Topology.Homotopy.Cube.Radius", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Topology.Homotopy.HomotopyGroup\npublic import TauCeti.Analysis.Normed.Module.Ball.Homeomorph\npublic import TauCeti.Topology.Homotopy.Cube.Basic\n\n/-!\n# Radial coordinates on the cube\n\nMathlib's generalized loops `\u03a9^ N X x` are continuous maps `I^N \u2192 X` that are constant on the\ncube boundary `Cube.boundary N = {y | \u2203 i, y i = 0 \u2228 y i = 1}`. Arguments that shrink a\ngeneralized loop into the middle of the cube and fill the resulting collar \u2014 the standard way\nto move the base point of a higher homotopy group along a path \u2014 need a numerical grip on how\nfar a cube point is from the boundary. This file supplies it, for a finite index type.\n\nThe `sup` distance to the centre is the right measure: on `I^N` with `N` finite, the product\nmetric *is* the `sup` metric, so\n\n* `TauCeti.cubeRadius z = 2 * dist z TauCeti.cubeCenter`\n\nis continuous for free, takes values in `[0, 1]`, vanishes at the centre, and equals `1`\nexactly on the boundary (`TauCeti.cubeRadius_eq_one_iff`). Radial rescaling by a factor `s` is\n`TauCeti.cubeScale`, defined with `Set.projIcc` so that it is total and jointly continuous, and\nit multiplies the radius by `s` as long as the result still fits in the cube\n(`TauCeti.cubeRadius_cubeScale`). In particular a point of radius `r > 0` is scaled by `1 / r`\nonto the boundary, which is what makes the collar constructions glue continuously. Pushing up\nand then rescaling also contracts the open box `{1} \u00d7 I^N \u222a I \u00d7 \u2202I^N` of `I \u00d7 I^N` onto the\ncentre of its top face (`TauCeti.openBoxContraction`), for any index type, and moving the top\nface along straight lines contracts it onto any point of its top face\n(`TauCeti.openBoxContractionTo`).\n\nThe radius is also the sup norm of the image of a cube point under the affine homeomorphism\n`TauCeti.cubeHomeomorphClosedBall` of the cube onto the closed unit ball of `N \u2192 \u211d`\n(`TauCeti.norm_cubeHomeomorphClosedBall`), so that homeomorphism carries the boundary of the cube\nonto the unit sphere (`TauCeti.norm_cubeHomeomorphClosedBall_eq_one_iff`). For `N = Fin (n + 1)`,\nsplitting off the first coordinate identifies the closed unit ball with the cube `I \u00d7 I^(Fin n)`\n(`TauCeti.closedBallHomeomorphProd`), and its unit sphere with `TauCeti.Cube.prodBoundary`.\n\n## Main declarations\n\n* `TauCeti.cubeCenter`, `TauCeti.cubeRadius`: the centre of `I^N` and the `sup` radius around\n it.\n* `TauCeti.cubeRadius_le_one` and `TauCeti.cubeRadius_eq_one_iff`: the radius is at most one,\n with equality exactly on `Cube.boundary N`; off the boundary `1 - r\u00b2` is positive\n (`TauCeti.one_sub_cubeRadius_sq_pos`).\n* `TauCeti.cubeScale`: radial rescaling of a cube point, and `TauCeti.cubeRadius_cubeScale`: it\n scales the radius. Rescaling by `s \u2265 1` maps the points of radius at most `1 / s` bijectively\n onto the cube (`TauCeti.cubeScale_injOn`, `TauCeti.exists_cubeScale_eq`).\n* `TauCeti.openBoxContraction`: the contraction of the open box of `I \u00d7 I^N` onto the centre of\n its top face, which keeps the open box inside itself (`TauCeti.openBoxContraction_mem_openBox`).\n* `TauCeti.openBoxContractionTo`: the contraction of the open box onto an arbitrary point `(1, c)`\n of its top face, which keeps each face `t j = c j` of the cube inside itself\n (`TauCeti.openBoxContractionTo_update`).\n* `TauCeti.norm_cubeHomeomorphClosedBall_eq_one_iff`: the cube homeomorphism onto the closed unit\n ball of the sup norm carries `Cube.boundary N` onto the unit sphere.\n* `TauCeti.closedBallHomeomorphProd`: the closed unit ball of the sup norm on `Fin (n + 1) \u2192 \u211d` is\n homeomorphic to `I \u00d7 I^(Fin n)`, carrying the unit sphere onto `Cube.prodBoundary (Fin n)`.\n* `TauCeti.squareHomeomorphClosedBall`, `TauCeti.coe_squareHomeomorphClosedBall_apply`, and\n `TauCeti.norm_squareHomeomorphClosedBall_eq_one_iff`:\n identification of `I \u00d7 I` with the closed unit ball of any two-dimensional real normed space,\n carrying `TauCeti.squareBoundary` onto the unit sphere, inducing\n `TauCeti.squareBoundaryHomeomorphSphere` and `TauCeti.coe_squareBoundaryHomeomorphSphere_apply`.\n-/\n\npublic section\nnoncomputable section\n\nnamespace TauCeti\n\nopen scoped unitInterval Topology Topology.Homotopy\n\nvariable {N : Type*}\n\n/-! ### The centre of the cube and radial rescaling -/\n\n/-- The centre of the cube `I^N`, all of whose coordinates are `1 / 2`. -/\ndef cubeCenter : I^N := fun _ => \u27e81 / 2, by norm_num, by norm_num\u27e9\n\n@[simp]\ntheorem cubeCenter_apply (i : N) : ((cubeCenter i : I) : \u211d) = 1 / 2 := by\n unfold cubeCenter\n rfl\n\n/-- Radial rescaling of a cube point about the centre by a factor `s`, clamped back into the\ncube so that it is total and jointly continuous. It agrees with the honest rescaling whenever\nthe rescaled point still lies in the cube; see `TauCeti.cubeScale_apply_coe`. -/\ndef cubeScale (s : \u211d) (z : I^N) : I^N :=\n fun i => Set.projIcc (0 : \u211d) 1 zero_le_one (1 / 2 + ((z i : \u211d) - 1 / 2) * s)\n\ntheorem continuous_cubeScale : Continuous fun p : \u211d \u00d7 (I^N) => cubeScale p.1 p.2 :=\n continuous_pi fun _ => continuous_projIcc.comp' (by fun_prop)\n\n@[simp]\ntheorem cubeScale_one (z : I^N) : cubeScale 1 z = z := by\n funext i\n apply Subtype.ext\n have h0 := (z i).property.1\n have h1 := (z i).property.2\n simp only [cubeScale]\n rw [Set.coe_projIcc, max_eq_right (by simp; linarith), min_eq_right (by linarith)]\n ring\n\n/-- Rescaling by `0` collapses the cube onto its centre. -/\n@[simp]\ntheorem cubeScale_zero (z : I^N) : cubeScale 0 z = cubeCenter := by\n funext i\n apply Subtype.ext\n simp only [cubeScale, cubeCenter, mul_zero, add_zero]\n rw [Set.coe_projIcc]\n norm_num\n\n/-! ### Contracting the open box -/\n\n/-- The contraction of the open box `{1} \u00d7 I^N \u222a I \u00d7 \u2202I^N` of the cube `I \u00d7 I^N` to the centre\n`(1, c)` of its top face: up to time `1 / 2` it pushes every point up to the top face, and after\nthat it shrinks the top face onto its centre. -/\ndef openBoxContraction (t : I) (z : I \u00d7 I^N) : I \u00d7 I^N :=\n (Set.projIcc 0 1 zero_le_one ((z.1 : \u211d) + 2 * t), cubeScale (min 1 (2 - 2 * (t : \u211d))) z.2)\n\n/-- The contraction of the open box is jointly continuous in time and space. -/\ntheorem continuous_openBoxContraction :\n Continuous fun q : I \u00d7 (I \u00d7 I^N) \u21a6 openBoxContraction q.1 q.2 :=\n (continuous_projIcc.comp' (by fun_prop)).prodMk (continuous_cubeScale.comp\n ((continuous_const.min (continuous_const.sub (continuous_const.mul\n (continuous_subtypeVal.comp continuous_fst)))).prodMk (continuous_snd.comp continuous_snd)))\n\n/-- At time `0` the contraction of the open box is the identity. -/\n@[simp]\ntheorem openBoxContraction_zero (z : I \u00d7 I^N) : openBoxContraction 0 z = z := by\n ext1\n \u00b7 simp [openBoxContraction]\n \u00b7 norm_num [openBoxContraction]\n\n/-- At time `1` the contraction of the open box is constant at the centre of the top face. -/\n@[simp]\ntheorem openBoxContraction_one (z : I \u00d7 I^N) :\n openBoxContraction 1 z = (1, cubeCenter) := by\n ext1\n \u00b7 exact projIcc_eq_one.2 (by simp; linarith [z.1.property.1])\n \u00b7 norm_num [openBoxContraction]\n\n/-- The contraction keeps the open box `{1} \u00d7 I^N \u222a I \u00d7 \u2202I^N` inside itself. -/\ntheorem openBoxContraction_mem_openBox {z : I \u00d7 I^N} (hz : z.1 = 1 \u2228 z.2 \u2208 Cube.boundary N)\n (t : I) : (openBoxContraction t z).1 = 1 \u2228 (openBoxContraction t z).2 \u2208 Cube.boundary N := by\n by_cases ht : (t : \u211d) \u2264 1 / 2\n \u00b7 rcases hz with hz | hz\n \u00b7 exact .inl (projIcc_eq_one.2 (by simp [hz]; linarith [t.property.1]))\n \u00b7 exact .inr (by rwa [openBoxContraction, min_eq_left (by linarith), cubeScale_one])\n \u00b7 exact .inl (projIcc_eq_one.2 (by linarith [z.1.property.1]))\n\n/-- The contraction keeps the open box `{1} \u00d7 I^N \u222a I \u00d7 \u2202I^N` inside the boundary of the cube. -/\ntheorem openBoxContraction_mem_prodBoundary {z : I \u00d7 I^N} (hz : z.1 = 1 \u2228 z.2 \u2208 Cube.boundary N)\n (t : I) : openBoxContraction t z \u2208 Cube.prodBoundary N :=\n Cube.mk_mem_prodBoundary (openBoxContraction_mem_openBox hz t)\n\n/-- The contraction of the open box `{1} \u00d7 I^N \u222a I \u00d7 \u2202I^N` of `I \u00d7 I^N` onto the point `(1, c)` of\nits top face: up to time `1 / 2` it pushes every point up to the top face, and after that it moves\nthe top face along straight lines onto `c`. Unlike `TauCeti.openBoxContraction`, which aims at the\ncentre of the top face, it keeps each face `t j = c j` of the cube through `(1, c)` inside\nitself (`TauCeti.openBoxContractionTo_update`), which is what lets the deformations of two maps\nsharing such a face be glued. -/\ndef openBoxContractionTo (c : I^N) (t : I) (w : I \u00d7 I^N) : I \u00d7 I^N :=\n (Set.projIcc 0 1 zero_le_one ((w.1 : \u211d) + 2 * t),\n fun i \u21a6 Set.projIcc 0 1 zero_le_one ((w.2 i : \u211d) + max 0 (2 * (t : \u211d) - 1) * (c i - w.2 i)))\n\n/-- The contraction of the open box onto `(1, c)` is jointly continuous in time and space. -/\ntheorem continuous_openBoxContractionTo (c : I^N) :\n Continuous fun q : I \u00d7 (I \u00d7 I^N) \u21a6 openBoxContractionTo c q.1 q.2 :=\n (continuous_projIcc.comp (by fun_prop)).prodMk\n (continuous_pi fun _ \u21a6 continuous_projIcc.comp (by fun_prop))\n\n/-- At time `0` the contraction of the open box onto `(1, c)` is the identity. -/\n@[simp]\ntheorem openBoxContractionTo_zero (c : I^N) (w : I \u00d7 I^N) :\n openBoxContractionTo c 0 w = w := by\n ext1\n \u00b7 simp [openBoxContractionTo]\n \u00b7 funext i\n simp [openBoxContractionTo]\n\n/-- At time `1` the contraction of the open box onto `(1, c)` is constant at `(1, c)`. -/\n@[simp]\ntheorem openBoxContractionTo_one (c : I^N) (w : I \u00d7 I^N) :\n openBoxContractionTo c 1 w = (1, c) := by\n ext1\n \u00b7 exact projIcc_eq_one.2 (by simp; linarith [w.1.property.1])\n \u00b7 funext i\n simp only [openBoxContractionTo, Set.Icc.coe_one]\n rw [show (w.2 i : \u211d) + max 0 (2 * 1 - 1) * (c i - w.2 i) = c i by norm_num, Set.projIcc_val]\n\n/-- The contraction onto `(1, c)` keeps the open box `{1} \u00d7 I^N \u222a I \u00d7 \u2202I^N` inside the boundary of\nthe cube. -/\ntheorem openBoxContractionTo_mem_prodBoundary (c : I^N) {w : I \u00d7 I^N}\n (hw : w.1 = 1 \u2228 w.2 \u2208 Cube.boundary N) (t : I) :\n openBoxContractionTo c t w \u2208 Cube.prodBoundary N := by\n refine Cube.mk_mem_prodBoundary ?_\n by_cases ht : (t : \u211d) \u2264 1 / 2\n \u00b7 rcases hw with hw | hw\n \u00b7 exact .inl (projIcc_eq_one.2 (by simp [hw]; linarith [t.property.1]))\n \u00b7 refine .inr ?_\n have : max (0 : \u211d) (2 * t - 1) = 0 := max_eq_left (by linarith)\n simpa [openBoxContractionTo, this] using hw\n \u00b7 exact .inl (projIcc_eq_one.2 (by linarith [w.1.property.1]))\n\n/-- The contraction onto `(1, c)` keeps the face `t j = c j` inside itself, acting there as the\ncontraction onto any point with the same coordinates outside `j`. -/\ntheorem openBoxContractionTo_update [DecidableEq N] (c : I^N) (j : N) (e : I) (t : I)\n (s : I) (z : I^N) :\n openBoxContractionTo (Function.update c j e) t (s, Function.update z j e) =\n ((openBoxContractionTo c t (s, z)).1,\n Function.update (openBoxContractionTo c t (s, z)).2 j e) := by\n ext1\n \u00b7 rfl\n \u00b7 funext i\n by_cases hij : i = j\n \u00b7 subst hij\n simp [openBoxContractionTo]\n \u00b7 simp [openBoxContractionTo, Function.update_of_ne hij]\n\n/-! ### The `sup` radius -/\n\nvariable [Fintype N]\n\n/-- The `sup` radius of a cube point around the centre of the cube, normalised so that the\nboundary has radius one. -/\ndef cubeRadius (z : I^N) : \u211d := 2 * dist z (cubeCenter : I^N)\n\ntheorem cubeRadius_def (z : I^N) : cubeRadius z = 2 * dist z (cubeCenter : I^N) := by\n unfold cubeRadius\n rfl\n\ntheorem continuous_cubeRadius : Continuous (cubeRadius : (I^N) \u2192 \u211d) := by\n unfold cubeRadius; fun_prop\n\ntheorem cubeRadius_nonneg (z : I^N) : 0 \u2264 cubeRadius z := by\n rw [cubeRadius_def]; positivity\n\nomit [Fintype N] in\ntheorem dist_apply_cubeCenter (z : I^N) (i : N) :\n dist (z i) ((cubeCenter : I^N) i) = |(z i : \u211d) - 1 / 2| := by\n rw [Subtype.dist_eq, Real.dist_eq]; rfl\n\ntheorem abs_sub_half_le_cubeRadius (z : I^N) (i : N) :\n |(z i : \u211d) - 1 / 2| \u2264 cubeRadius z / 2 := by\n rw [cubeRadius_def, \u2190 dist_apply_cubeCenter]\n have := dist_le_pi_dist z (cubeCenter : I^N) i\n linarith\n\ntheorem cubeRadius_le_one (z : I^N) : cubeRadius z \u2264 1 := by\n have h_one : (1 : \u211d) = 2 * (1 / 2) := by norm_num\n rw [cubeRadius_def, h_one]\n gcongr\n rw [dist_pi_le_iff (by norm_num)]\n intro i\n rw [dist_apply_cubeCenter, abs_le]\n have h0 := (z i).property.1\n have h1 := (z i).property.2\n constructor <;> linarith\n\n/-- A cube point has radius one exactly when it lies on the boundary of the cube. -/\ntheorem cubeRadius_eq_one_iff (z : I^N) : cubeRadius z = 1 \u2194 z \u2208 Cube.boundary N := by\n constructor\n \u00b7 intro h\n by_contra hz\n simp only [Cube.boundary, Set.mem_ofPred_eq, not_exists, not_or] at hz\n have hlt : dist z (cubeCenter : I^N) < 1 / 2 := by\n rw [dist_pi_lt_iff (by norm_num)]\n intro i\n rw [dist_apply_cubeCenter, abs_lt]\n have h0 := (z i).property.1\n have h1 := (z i).property.2\n have e0 : (z i : \u211d) \u2260 0 := fun hc => (hz i).1 (Subtype.ext hc)\n have e1 : (z i : \u211d) \u2260 1 := fun hc => (hz i).2 (Subtype.ext hc)\n constructor <;> [rcases h0.lt_or_eq with h | h; rcases h1.lt_or_eq with h | h] <;>\n first\n | linarith\n | exact absurd h.symm e0\n | exact absurd h e1\n rw [cubeRadius_def] at h\n linarith\n \u00b7 rintro \u27e8i, hi\u27e9\n refine le_antisymm (cubeRadius_le_one z) ?_\n have h_one : (1 : \u211d) = 2 * (1 / 2) := by norm_num\n rw [cubeRadius_def, h_one]\n gcongr\n refine le_trans ?_ (dist_le_pi_dist z (cubeCenter : I^N) i)\n rw [dist_apply_cubeCenter]\n rcases hi with hi | hi <;> rw [hi] <;> norm_num\n\n/-- Off the boundary of the cube, the radius is less than one, so `1 - r\u00b2` is positive. -/\ntheorem one_sub_cubeRadius_sq_pos {z : I^N} (hz : z \u2209 Cube.boundary N) :\n 0 < 1 - cubeRadius z ^ 2 := by\n have h := (cubeRadius_le_one z).lt_of_ne (mt (cubeRadius_eq_one_iff z).1 hz)\n nlinarith [cubeRadius_nonneg z]\n\n/-- Radial rescaling is honest, that is, the clamping in `TauCeti.cubeScale` is inactive, as\nsoon as the rescaled radius still fits inside the cube. -/\ntheorem cubeScale_apply_coe {s : \u211d} (hs : 0 \u2264 s) {z : I^N} (h : s * cubeRadius z \u2264 1) (i : N) :\n ((cubeScale s z i : I) : \u211d) = 1 / 2 + ((z i : \u211d) - 1 / 2) * s := by\n have hb := abs_sub_half_le_cubeRadius z i\n have habs : |((z i : \u211d) - 1 / 2) * s| \u2264 1 / 2 := by\n rw [abs_mul, abs_of_nonneg hs]\n nlinarith [abs_nonneg ((z i : \u211d) - 1 / 2)]\n rw [abs_le] at habs\n simp only [cubeScale]\n rw [Set.coe_projIcc, max_eq_right (by simp; linarith), min_eq_right (by linarith)]\n\n/-- Rescaling radially by `s` multiplies the radius by `s`, provided the rescaled point still\nfits in the cube. -/\ntheorem cubeRadius_cubeScale {s : \u211d} (hs : 0 \u2264 s) {z : I^N} (h : s * cubeRadius z \u2264 1) :\n cubeRadius (cubeScale s z) = s * cubeRadius z := by\n have key : \u2200 i : N, |((cubeScale s z i : I) : \u211d) - 1 / 2| = s * |(z i : \u211d) - 1 / 2| := by\n intro i\n have h_sub : (1 : \u211d) / 2 + ((z i : \u211d) - 1 / 2) * s - 1 / 2 =\n ((z i : \u211d) - 1 / 2) * s := by ring\n rw [cubeScale_apply_coe hs h i, h_sub, abs_mul, abs_of_nonneg hs, mul_comm]\n have hr := cubeRadius_nonneg z\n refine le_antisymm ?_ ?_\n \u00b7 have h_mul : s * cubeRadius z = 2 * (s * cubeRadius z / 2) := by ring\n rw [cubeRadius_def, h_mul]\n gcongr\n rw [dist_pi_le_iff (by positivity)]\n intro i\n rw [dist_apply_cubeCenter, key i]\n have := abs_sub_half_le_cubeRadius z i\n nlinarith\n \u00b7 rcases eq_or_lt_of_le hs with hs0 | hs0\n \u00b7 rw [\u2190 hs0, zero_mul]; exact cubeRadius_nonneg _\n have h_mul : s * (2 * dist z (cubeCenter : I^N)) =\n 2 * (s * dist z (cubeCenter : I^N)) := by ring\n rw [cubeRadius_def, cubeRadius_def, h_mul]\n gcongr 2 * ?_\n rw [\u2190 le_div_iff\u2080' hs0, dist_pi_le_iff (by positivity)]\n intro i\n rw [dist_apply_cubeCenter, le_div_iff\u2080' hs0, \u2190 key i, \u2190 dist_apply_cubeCenter]\n exact dist_le_pi_dist _ _ i\n\n/-- Rescaling radially by a positive factor `s` is injective on the points whose rescaled radius\nstill fits in the cube. -/\ntheorem cubeScale_injOn {s : \u211d} (hs : 0 < s) :\n Set.InjOn (cubeScale (N := N) s) {z | s * cubeRadius z \u2264 1} := fun z hz z' hz' h \u21a6\n funext fun i \u21a6 Subtype.ext <| by\n have h\u2081 := cubeScale_apply_coe hs.le hz i\n rw [h, cubeScale_apply_coe hs.le hz' i] at h\u2081\n exact (sub_left_inj.1 (mul_right_cancel\u2080 hs.ne' (add_left_cancel h\u2081))).symm\n\n/-- Rescaling radially by `s \u2265 1` maps the points whose rescaled radius fits in the cube onto the\ncube: `y` is the rescaling of `TauCeti.cubeScale s\u207b\u00b9 y`. -/\ntheorem exists_cubeScale_eq {s : \u211d} (hs : 1 \u2264 s) (y : I^N) :\n \u2203 z, s * cubeRadius z \u2264 1 \u2227 cubeScale s z = y := by\n have hs0 : 0 < s := zero_lt_one.trans_le hs\n have hy := cubeRadius_le_one y\n have hinv : s\u207b\u00b9 * cubeRadius y \u2264 1 := by\n nlinarith [inv_le_one_of_one_le\u2080 hs, cubeRadius_nonneg y]\n have hr : s * cubeRadius (cubeScale s\u207b\u00b9 y) = cubeRadius y := by\n rw [cubeRadius_cubeScale (inv_nonneg.2 hs0.le) hinv, \u2190 mul_assoc, mul_inv_cancel\u2080 hs0.ne',\n one_mul]\n refine \u27e8cubeScale s\u207b\u00b9 y, hr \u25b8 hy, funext fun i \u21a6 Subtype.ext ?_\u27e9\n rw [cubeScale_apply_coe hs0.le (hr \u25b8 hy), cubeScale_apply_coe (inv_nonneg.2 hs0.le) hinv]\n field_simp\n ring\n\n\n/-! ### The cube as the closed unit ball of the sup norm -/\n\n/-- The radius of a cube point is the sup norm of its image under the affine homeomorphism\n`TauCeti.cubeHomeomorphClosedBall` onto the closed unit ball: coordinatewise,\n`|2 * t - 1| = 2 * |t - 1 / 2|`. -/\ntheorem norm_cubeHomeomorphClosedBall (y : I^N) :\n \u2016(cubeHomeomorphClosedBall N y : N \u2192 \u211d)\u2016 = cubeRadius y := by\n have hcoord (i : N) :\n \u2016(cubeHomeomorphClosedBall N y : N \u2192 \u211d) i\u2016 = 2 * dist (y i) ((cubeCenter : I^N) i) := by\n rw [coe_cubeHomeomorphClosedBall_apply, dist_apply_cubeCenter, Real.norm_eq_abs,\n \u2190 abs_two, \u2190 abs_mul, abs_two]\n congr 1\n ring\n refine le_antisymm ((pi_norm_le_iff_of_nonneg (cubeRadius_nonneg y)).2 fun i \u21a6 ?_) ?_\n \u00b7 rw [hcoord, cubeRadius_def]\n gcongr\n exact dist_le_pi_dist y cubeCenter i\n \u00b7 rw [cubeRadius_def, \u2190 le_div_iff\u2080' two_pos, dist_pi_le_iff (by positivity)]\n intro i\n rw [le_div_iff\u2080' two_pos, \u2190 hcoord]\n exact norm_le_pi_norm _ i\n\n/-- The homeomorphism `TauCeti.cubeHomeomorphClosedBall` sends a cube point to the unit sphere of\nthe sup norm exactly when it lies on the boundary of the cube. -/\ntheorem norm_cubeHomeomorphClosedBall_eq_one_iff (y : I^N) :\n \u2016(cubeHomeomorphClosedBall N y : N \u2192 \u211d)\u2016 = 1 \u2194 y \u2208 Cube.boundary N := by\n rw [norm_cubeHomeomorphClosedBall, cubeRadius_eq_one_iff]\n\n/-- The closed unit ball of the sup norm on `Fin (n + 1) \u2192 \u211d` is the cube `I \u00d7 I^(Fin n)`, through\nthe affine homeomorphism `TauCeti.cubeHomeomorphClosedBall` followed by splitting off the first\ncoordinate. -/\ndef closedBallHomeomorphProd (n : \u2115) :\n Metric.closedBall (0 : Fin (n + 1) \u2192 \u211d) 1 \u2243\u209c I \u00d7 I^(Fin n) :=\n (cubeHomeomorphClosedBall (Fin (n + 1))).symm.trans (cubeSplitHomeomorph n)\n\n@[simp]\ntheorem closedBallHomeomorphProd_apply {n : \u2115} (x : Metric.closedBall (0 : Fin (n + 1) \u2192 \u211d) 1) :\n closedBallHomeomorphProd n x = ((cubeHomeomorphClosedBall (Fin (n + 1))).symm x 0,\n Fin.tail ((cubeHomeomorphClosedBall (Fin (n + 1))).symm x)) :=\n cubeSplitHomeomorph_apply _\n\n@[simp]\ntheorem closedBallHomeomorphProd_symm_apply {n : \u2115} (q : I \u00d7 I^(Fin n)) :\n (closedBallHomeomorphProd n).symm q =\n cubeHomeomorphClosedBall (Fin (n + 1)) (Fin.cons q.1 q.2) :=\n congrArg _ (cubeSplitHomeomorph_symm_apply q)\n\n/-- `TauCeti.closedBallHomeomorphProd` carries the unit sphere onto the boundary of\n`I \u00d7 I^(Fin n)`. -/\ntheorem closedBallHomeomorphProd_mem_prodBoundary_iff {n : \u2115}\n (x : Metric.closedBall (0 : Fin (n + 1) \u2192 \u211d) 1) :\n closedBallHomeomorphProd n x \u2208 Cube.prodBoundary (Fin n) \u2194\n (x : Fin (n + 1) \u2192 \u211d) \u2208 Metric.sphere 0 1 := by\n have hx : \u2016(x : Fin (n + 1) \u2192 \u211d)\u2016 = 1 \u2194\n (cubeHomeomorphClosedBall (Fin (n + 1))).symm x \u2208 Cube.boundary (Fin (n + 1)) := by\n rw [\u2190 norm_cubeHomeomorphClosedBall_eq_one_iff, Homeomorph.apply_symm_apply]\n rw [mem_sphere_zero_iff_norm, hx, closedBallHomeomorphProd, Homeomorph.trans_apply,\n cubeSplitHomeomorph_mem_prodBoundary_iff]\n\n/-- Identification of the unit square `I \u00d7 I` with the closed unit ball of any two-dimensional real\nnormed space, carrying the boundary of the square onto the unit sphere. -/\ndef squareHomeomorphClosedBall {F : Type*} [NormedAddCommGroup F] [NormedSpace \u211d F]\n (hF : Module.finrank \u211d F = 2) :\n (I \u00d7 I) \u2243\u209c Metric.closedBall (0 : F) 1 :=\n haveI : FiniteDimensional \u211d F := .of_finrank_pos (by omega)\n Homeomorph.finTwoArrow.symm.trans <|\n (cubeHomeomorphClosedBall (Fin 2)).trans <|\n closedBallHomeomorphOfFinrankEq (by simp [hF])\n\n/-- `TauCeti.squareHomeomorphClosedBall` acts as the composition of\n`Homeomorph.finTwoArrow.symm`, `TauCeti.cubeHomeomorphClosedBall`, and\n`TauCeti.closedBallHomeomorphOfFinrankEq`. -/\ntheorem coe_squareHomeomorphClosedBall_apply {F : Type*} [NormedAddCommGroup F]\n [NormedSpace \u211d F] (hF : Module.finrank \u211d F = 2) (p : I \u00d7 I) :\n (squareHomeomorphClosedBall hF p : F) =\n (haveI : FiniteDimensional \u211d F := .of_finrank_pos (by omega);\n closedBallHomeomorphOfFinrankEq (E := Fin 2 \u2192 \u211d) (F := F) (by simp [hF])\n (cubeHomeomorphClosedBall (Fin 2) (Homeomorph.finTwoArrow.symm p)) : F) := by\n rfl\n\n/-- `TauCeti.squareHomeomorphClosedBall` carries a point of the unit square onto the unit sphere\nexactly when it lies on `TauCeti.squareBoundary`. -/\n@[simp]\ntheorem norm_squareHomeomorphClosedBall_eq_one_iff {F : Type*} [NormedAddCommGroup F]\n [NormedSpace \u211d F] (hF : Module.finrank \u211d F = 2) (p : I \u00d7 I) :\n \u2016(squareHomeomorphClosedBall hF p : F)\u2016 = 1 \u2194 p \u2208 squareBoundary := by\n have : FiniteDimensional \u211d F := .of_finrank_pos (by omega)\n rw [coe_squareHomeomorphClosedBall_apply, norm_closedBallHomeomorphOfFinrankEq_eq_one_iff,\n norm_cubeHomeomorphClosedBall_eq_one_iff, \u2190 Set.mem_preimage,\n \u2190 squareBoundary_eq_preimage_cubeBoundary]\n\n/-- Restricting `TauCeti.squareHomeomorphClosedBall` to the boundary of the unit square gives a\nhomeomorphism `TauCeti.squareBoundary \u2243\u209c Metric.sphere (0 : F) 1`. -/\ndef squareBoundaryHomeomorphSphere {F : Type*} [NormedAddCommGroup F] [NormedSpace \u211d F]\n (hF : Module.finrank \u211d F = 2) : squareBoundary \u2243\u209c Metric.sphere (0 : F) 1 :=\n ((squareHomeomorphClosedBall hF).subtype fun p =>\n (norm_squareHomeomorphClosedBall_eq_one_iff hF p).symm.trans\n mem_sphere_zero_iff_norm.symm).trans\n (Topology.IsEmbedding.subtypeVal.homeomorphOfSubsetRange fun _ hx =>\n \u27e8\u27e8_, Metric.sphere_subset_closedBall hx\u27e9, rfl\u27e9)\n\n/-- Coercing the image of a boundary point under `TauCeti.squareBoundaryHomeomorphSphere` to the\nambient space gives the same point as `TauCeti.squareHomeomorphClosedBall`. -/\n@[simp]\ntheorem coe_squareBoundaryHomeomorphSphere_apply {F : Type*} [NormedAddCommGroup F]\n [NormedSpace \u211d F] (hF : Module.finrank \u211d F = 2) (p : squareBoundary) :\n (squareBoundaryHomeomorphSphere hF p : F) = squareHomeomorphClosedBall hF p := by\n dsimp [squareBoundaryHomeomorphSphere]\n exact Topology.IsEmbedding.homeomorphOfSubsetRange_apply_coe _ _ _\n\nend TauCeti\n", "public_theorems": ["TauCeti.cubeCenter_apply", "TauCeti.continuous_cubeScale", "TauCeti.cubeScale_one", "TauCeti.cubeScale_zero", "TauCeti.continuous_openBoxContraction", "TauCeti.openBoxContraction_zero", "TauCeti.openBoxContraction_one", "TauCeti.openBoxContraction_mem_openBox", "TauCeti.openBoxContraction_mem_prodBoundary", "TauCeti.continuous_openBoxContractionTo", "TauCeti.openBoxContractionTo_zero", "TauCeti.openBoxContractionTo_one", "TauCeti.openBoxContractionTo_mem_prodBoundary", "TauCeti.openBoxContractionTo_update", "TauCeti.cubeRadius_def", "TauCeti.continuous_cubeRadius", "TauCeti.cubeRadius_nonneg", "TauCeti.dist_apply_cubeCenter", "TauCeti.abs_sub_half_le_cubeRadius", "TauCeti.cubeRadius_le_one", "TauCeti.cubeRadius_eq_one_iff", "TauCeti.one_sub_cubeRadius_sq_pos", "TauCeti.cubeScale_apply_coe", "TauCeti.cubeRadius_cubeScale", "TauCeti.cubeScale_injOn", "TauCeti.exists_cubeScale_eq", "TauCeti.norm_cubeHomeomorphClosedBall", "TauCeti.norm_cubeHomeomorphClosedBall_eq_one_iff", "TauCeti.closedBallHomeomorphProd_apply", "TauCeti.closedBallHomeomorphProd_symm_apply", "TauCeti.closedBallHomeomorphProd_mem_prodBoundary_iff", "TauCeti.coe_squareHomeomorphClosedBall_apply", "TauCeti.norm_squareHomeomorphClosedBall_eq_one_iff", "TauCeti.coe_squareBoundaryHomeomorphSphere_apply"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Topology.Homotopy.HomotopyGroup\npublic import TauCeti.Analysis.Normed.Module.Ball.Homeomorph\npublic import TauCeti.Topology.Homotopy.Cube.Basic\n\n/-!\n# Radial coordinates on the cube\n\nMathlib's generalized loops `\u03a9^ N X x` are continuous maps `I^N \u2192 X` that are constant on the\ncube boundary `Cube.boundary N = {y | \u2203 i, y i = 0 \u2228 y i = 1}`. Arguments that shrink a\ngeneralized loop into the middle of the cube and fill the resulting collar \u2014 the standard way\nto move the base point of a higher homotopy group along a path \u2014 need a numerical grip on how\nfar a cube point is from the boundary. This file supplies it, for a finite index type.\n\nThe `sup` distance to the centre is the right measure: on `I^N` with `N` finite, the product\nmetric *is* the `sup` metric, so\n\n* `TauCeti.cubeRadius z = 2 * dist z TauCeti.cubeCenter`\n\nis continuous for free, takes values in `[0, 1]`, vanishes at the centre, and equals `1`\nexactly on the boundary (`TauCeti.cubeRadius_eq_one_iff`). Radial rescaling by a factor `s` is\n`TauCeti.cubeScale`, defined with `Set.projIcc` so that it is total and jointly continuous, and\nit multiplies the radius by `s` as long as the result still fits in the cube\n(`TauCeti.cubeRadius_cubeScale`). In particular a point of radius `r > 0` is scaled by `1 / r`\nonto the boundary, which is what makes the collar constructions glue continuously. Pushing up\nand then rescaling also contracts the open box `{1} \u00d7 I^N \u222a I \u00d7 \u2202I^N` of `I \u00d7 I^N` onto the\ncentre of its top face (`TauCeti.openBoxContraction`), for any index type, and moving the top\nface along straight lines contracts it onto any point of its top face\n(`TauCeti.openBoxContractionTo`).\n\nThe radius is also the sup norm of the image of a cube point under the affine homeomorphism\n`TauCeti.cubeHomeomorphClosedBall` of the cube onto the closed unit ball of `N \u2192 \u211d`\n(`TauCeti.norm_cubeHomeomorphClosedBall`), so that homeomorphism carries the boundary of the cube\nonto the unit sphere (`TauCeti.norm_cubeHomeomorphClosedBall_eq_one_iff`). For `N = Fin (n + 1)`,\nsplitting off the first coordinate identifies the closed unit ball with the cube `I \u00d7 I^(Fin n)`\n(`TauCeti.closedBallHomeomorphProd`), and its unit sphere with `TauCeti.Cube.prodBoundary`.\n\n## Main declarations\n\n* `TauCeti.cubeCenter`, `TauCeti.cubeRadius`: the centre of `I^N` and the `sup` radius around\n it.\n* `TauCeti.cubeRadius_le_one` and `TauCeti.cubeRadius_eq_one_iff`: the radius is at most one,\n with equality exactly on `Cube.boundary N`; off the boundary `1 - r\u00b2` is positive\n (`TauCeti.one_sub_cubeRadius_sq_pos`).\n* `TauCeti.cubeScale`: radial rescaling of a cube point, and `TauCeti.cubeRadius_cubeScale`: it\n scales the radius. Rescaling by `s \u2265 1` maps the points of radius at most `1 / s` bijectively\n onto the cube (`TauCeti.cubeScale_injOn`, `TauCeti.exists_cubeScale_eq`).\n* `TauCeti.openBoxContraction`: the contraction of the open box of `I \u00d7 I^N` onto the centre of\n its top face, which keeps the open box inside itself (`TauCeti.openBoxContraction_mem_openBox`).\n* `TauCeti.openBoxContractionTo`: the contraction of the open box onto an arbitrary point `(1, c)`\n of its top face, which keeps each face `t j = c j` of the cube inside itself\n (`TauCeti.openBoxContractionTo_update`).\n* `TauCeti.norm_cubeHomeomorphClosedBall_eq_one_iff`: the cube homeomorphism onto the closed unit\n ball of the sup norm carries `Cube.boundary N` onto the unit sphere.\n* `TauCeti.closedBallHomeomorphProd`: the closed unit ball of the sup norm on `Fin (n + 1) \u2192 \u211d` is\n homeomorphic to `I \u00d7 I^(Fin n)`, carrying the unit sphere onto `Cube.prodBoundary (Fin n)`.\n* `TauCeti.squareHomeomorphClosedBall`, `TauCeti.coe_squareHomeomorphClosedBall_apply`, and\n `TauCeti.norm_squareHomeomorphClosedBall_eq_one_iff`:\n identification of `I \u00d7 I` with the closed unit ball of any two-dimensional real normed space,\n carrying `TauCeti.squareBoundary` onto the unit sphere, inducing\n `TauCeti.squareBoundaryHomeomorphSphere` and `TauCeti.coe_squareBoundaryHomeomorphSphere_apply`.\n-/\n\npublic section\nnoncomputable section\n\nnamespace TauCeti\n\nopen scoped unitInterval Topology Topology.Homotopy\n\nvariable {N : Type*}\n\n/-! ### The centre of the cube and radial rescaling -/\n\n/-- The centre of the cube `I^N`, all of whose coordinates are `1 / 2`. -/\ndef cubeCenter : I^N := fun _ => \u27e81 / 2, by norm_num, by norm_num\u27e9", "@[simp]\ntheorem cubeCenter_apply (i : N) : ((cubeCenter i : I) : \u211d) = 1 / 2 :=", "/-- Radial rescaling of a cube point about the centre by a factor `s`, clamped back into the\ncube so that it is total and jointly continuous. It agrees with the honest rescaling whenever\nthe rescaled point still lies in the cube; see `TauCeti.cubeScale_apply_coe`. -/\ndef cubeScale (s : \u211d) (z : I^N) : I^N :=\n fun i => Set.projIcc (0 : \u211d) 1 zero_le_one (1 / 2 + ((z i : \u211d) - 1 / 2) * s)", "theorem continuous_cubeScale : Continuous fun p : \u211d \u00d7 (I^N) => cubeScale p.1 p.2 :=", "@[simp]\ntheorem cubeScale_one (z : I^N) : cubeScale 1 z = z :=", "/-- Rescaling by `0` collapses the cube onto its centre. -/\n@[simp]\ntheorem cubeScale_zero (z : I^N) : cubeScale 0 z = cubeCenter :=", "/-! ### Contracting the open box -/\n\n/-- The contraction of the open box `{1} \u00d7 I^N \u222a I \u00d7 \u2202I^N` of the cube `I \u00d7 I^N` to the centre\n`(1, c)` of its top face: up to time `1 / 2` it pushes every point up to the top face, and after\nthat it shrinks the top face onto its centre. -/\ndef openBoxContraction (t : I) (z : I \u00d7 I^N) : I \u00d7 I^N :=\n (Set.projIcc 0 1 zero_le_one ((z.1 : \u211d) + 2 * t), cubeScale (min 1 (2 - 2 * (t : \u211d))) z.2)", "/-- The contraction of the open box is jointly continuous in time and space. -/\ntheorem continuous_openBoxContraction :\n Continuous fun q : I \u00d7 (I \u00d7 I^N) \u21a6 openBoxContraction q.1 q.2 :=", "/-- At time `0` the contraction of the open box is the identity. -/\n@[simp]\ntheorem openBoxContraction_zero (z : I \u00d7 I^N) : openBoxContraction 0 z = z :=", "/-- At time `1` the contraction of the open box is constant at the centre of the top face. -/\n@[simp]\ntheorem openBoxContraction_one (z : I \u00d7 I^N) :\n openBoxContraction 1 z = (1, cubeCenter) :=", "/-- The contraction keeps the open box `{1} \u00d7 I^N \u222a I \u00d7 \u2202I^N` inside itself. -/\ntheorem openBoxContraction_mem_openBox {z : I \u00d7 I^N} (hz : z.1 = 1 \u2228 z.2 \u2208 Cube.boundary N)\n (t : I) : (openBoxContraction t z).1 = 1 \u2228 (openBoxContraction t z).2 \u2208 Cube.boundary N :=", "/-- The contraction keeps the open box `{1} \u00d7 I^N \u222a I \u00d7 \u2202I^N` inside the boundary of the cube. -/\ntheorem openBoxContraction_mem_prodBoundary {z : I \u00d7 I^N} (hz : z.1 = 1 \u2228 z.2 \u2208 Cube.boundary N)\n (t : I) : openBoxContraction t z \u2208 Cube.prodBoundary N :=", "/-- The contraction of the open box `{1} \u00d7 I^N \u222a I \u00d7 \u2202I^N` of `I \u00d7 I^N` onto the point `(1, c)` of\nits top face: up to time `1 / 2` it pushes every point up to the top face, and after that it moves\nthe top face along straight lines onto `c`. Unlike `TauCeti.openBoxContraction`, which aims at the\ncentre of the top face, it keeps each face `t j = c j` of the cube through `(1, c)` inside\nitself (`TauCeti.openBoxContractionTo_update`), which is what lets the deformations of two maps\nsharing such a face be glued. -/\ndef openBoxContractionTo (c : I^N) (t : I) (w : I \u00d7 I^N) : I \u00d7 I^N :=\n (Set.projIcc 0 1 zero_le_one ((w.1 : \u211d) + 2 * t),\n fun i \u21a6 Set.projIcc 0 1 zero_le_one ((w.2 i : \u211d) + max 0 (2 * (t : \u211d) - 1) * (c i - w.2 i)))", "/-- The contraction of the open box onto `(1, c)` is jointly continuous in time and space. -/\ntheorem continuous_openBoxContractionTo (c : I^N) :\n Continuous fun q : I \u00d7 (I \u00d7 I^N) \u21a6 openBoxContractionTo c q.1 q.2 :=", "/-- At time `0` the contraction of the open box onto `(1, c)` is the identity. -/\n@[simp]\ntheorem openBoxContractionTo_zero (c : I^N) (w : I \u00d7 I^N) :\n openBoxContractionTo c 0 w = w :=", "/-- At time `1` the contraction of the open box onto `(1, c)` is constant at `(1, c)`. -/\n@[simp]\ntheorem openBoxContractionTo_one (c : I^N) (w : I \u00d7 I^N) :\n openBoxContractionTo c 1 w = (1, c) :=", "/-- The contraction onto `(1, c)` keeps the open box `{1} \u00d7 I^N \u222a I \u00d7 \u2202I^N` inside the boundary of\nthe cube. -/\ntheorem openBoxContractionTo_mem_prodBoundary (c : I^N) {w : I \u00d7 I^N}\n (hw : w.1 = 1 \u2228 w.2 \u2208 Cube.boundary N) (t : I) :\n openBoxContractionTo c t w \u2208 Cube.prodBoundary N :=", "/-- The contraction onto `(1, c)` keeps the face `t j = c j` inside itself, acting there as the\ncontraction onto any point with the same coordinates outside `j`. -/\ntheorem openBoxContractionTo_update [DecidableEq N] (c : I^N) (j : N) (e : I) (t : I)\n (s : I) (z : I^N) :\n openBoxContractionTo (Function.update c j e) t (s, Function.update z j e) =\n ((openBoxContractionTo c t (s, z)).1,\n Function.update (openBoxContractionTo c t (s, z)).2 j e) :=", "/-! ### The `sup` radius -/\n\nvariable [Fintype N]\n\n/-- The `sup` radius of a cube point around the centre of the cube, normalised so that the\nboundary has radius one. -/\ndef cubeRadius (z : I^N) : \u211d := 2 * dist z (cubeCenter : I^N)", "theorem cubeRadius_def (z : I^N) : cubeRadius z = 2 * dist z (cubeCenter : I^N) :=", "theorem continuous_cubeRadius : Continuous (cubeRadius : (I^N) \u2192 \u211d) :=", "theorem cubeRadius_nonneg (z : I^N) : 0 \u2264 cubeRadius z :=", "omit [Fintype N] in\ntheorem dist_apply_cubeCenter (z : I^N) (i : N) :\n dist (z i) ((cubeCenter : I^N) i) = |(z i : \u211d) - 1 / 2| :=", "theorem abs_sub_half_le_cubeRadius (z : I^N) (i : N) :\n |(z i : \u211d) - 1 / 2| \u2264 cubeRadius z / 2 :=", "theorem cubeRadius_le_one (z : I^N) : cubeRadius z \u2264 1 :=", "/-- A cube point has radius one exactly when it lies on the boundary of the cube. -/\ntheorem cubeRadius_eq_one_iff (z : I^N) : cubeRadius z = 1 \u2194 z \u2208 Cube.boundary N :=", "/-- Off the boundary of the cube, the radius is less than one, so `1 - r\u00b2` is positive. -/\ntheorem one_sub_cubeRadius_sq_pos {z : I^N} (hz : z \u2209 Cube.boundary N) :\n 0 < 1 - cubeRadius z ^ 2 :=", "/-- Radial rescaling is honest, that is, the clamping in `TauCeti.cubeScale` is inactive, as\nsoon as the rescaled radius still fits inside the cube. -/\ntheorem cubeScale_apply_coe {s : \u211d} (hs : 0 \u2264 s) {z : I^N} (h : s * cubeRadius z \u2264 1) (i : N) :\n ((cubeScale s z i : I) : \u211d) = 1 / 2 + ((z i : \u211d) - 1 / 2) * s :=", "/-- Rescaling radially by `s` multiplies the radius by `s`, provided the rescaled point still\nfits in the cube. -/\ntheorem cubeRadius_cubeScale {s : \u211d} (hs : 0 \u2264 s) {z : I^N} (h : s * cubeRadius z \u2264 1) :\n cubeRadius (cubeScale s z) = s * cubeRadius z :=", "/-- Rescaling radially by a positive factor `s` is injective on the points whose rescaled radius\nstill fits in the cube. -/\ntheorem cubeScale_injOn {s : \u211d} (hs : 0 < s) :\n Set.InjOn (cubeScale (N := N) s) {z | s * cubeRadius z \u2264 1} :=", "/-- Rescaling radially by `s \u2265 1` maps the points whose rescaled radius fits in the cube onto the\ncube: `y` is the rescaling of `TauCeti.cubeScale s\u207b\u00b9 y`. -/\ntheorem exists_cubeScale_eq {s : \u211d} (hs : 1 \u2264 s) (y : I^N) :\n \u2203 z, s * cubeRadius z \u2264 1 \u2227 cubeScale s z = y :=", "/-! ### The cube as the closed unit ball of the sup norm -/", "/-- The radius of a cube point is the sup norm of its image under the affine homeomorphism\n`TauCeti.cubeHomeomorphClosedBall` onto the closed unit ball: coordinatewise,\n`|2 * t - 1| = 2 * |t - 1 / 2|`. -/\ntheorem norm_cubeHomeomorphClosedBall (y : I^N) :\n \u2016(cubeHomeomorphClosedBall N y : N \u2192 \u211d)\u2016 = cubeRadius y :=", "/-- The homeomorphism `TauCeti.cubeHomeomorphClosedBall` sends a cube point to the unit sphere of\nthe sup norm exactly when it lies on the boundary of the cube. -/\ntheorem norm_cubeHomeomorphClosedBall_eq_one_iff (y : I^N) :\n \u2016(cubeHomeomorphClosedBall N y : N \u2192 \u211d)\u2016 = 1 \u2194 y \u2208 Cube.boundary N :=", "/-- The closed unit ball of the sup norm on `Fin (n + 1) \u2192 \u211d` is the cube `I \u00d7 I^(Fin n)`, through\nthe affine homeomorphism `TauCeti.cubeHomeomorphClosedBall` followed by splitting off the first\ncoordinate. -/\ndef closedBallHomeomorphProd (n : \u2115) :\n Metric.closedBall (0 : Fin (n + 1) \u2192 \u211d) 1 \u2243\u209c I \u00d7 I^(Fin n) :=\n (cubeHomeomorphClosedBall (Fin (n + 1))).symm.trans (cubeSplitHomeomorph n)", "@[simp]\ntheorem closedBallHomeomorphProd_apply {n : \u2115} (x : Metric.closedBall (0 : Fin (n + 1) \u2192 \u211d) 1) :\n closedBallHomeomorphProd n x = ((cubeHomeomorphClosedBall (Fin (n + 1))).symm x 0,\n Fin.tail ((cubeHomeomorphClosedBall (Fin (n + 1))).symm x)) :=", "@[simp]\ntheorem closedBallHomeomorphProd_symm_apply {n : \u2115} (q : I \u00d7 I^(Fin n)) :\n (closedBallHomeomorphProd n).symm q =\n cubeHomeomorphClosedBall (Fin (n + 1)) (Fin.cons q.1 q.2) :=", "/-- `TauCeti.closedBallHomeomorphProd` carries the unit sphere onto the boundary of\n`I \u00d7 I^(Fin n)`. -/\ntheorem closedBallHomeomorphProd_mem_prodBoundary_iff {n : \u2115}\n (x : Metric.closedBall (0 : Fin (n + 1) \u2192 \u211d) 1) :\n closedBallHomeomorphProd n x \u2208 Cube.prodBoundary (Fin n) \u2194\n (x : Fin (n + 1) \u2192 \u211d) \u2208 Metric.sphere 0 1 :=", "/-- Identification of the unit square `I \u00d7 I` with the closed unit ball of any two-dimensional real\nnormed space, carrying the boundary of the square onto the unit sphere. -/\ndef squareHomeomorphClosedBall {F : Type*} [NormedAddCommGroup F] [NormedSpace \u211d F]\n (hF : Module.finrank \u211d F = 2) :\n (I \u00d7 I) \u2243\u209c Metric.closedBall (0 : F) 1 :=\n haveI : FiniteDimensional \u211d F := .of_finrank_pos (by omega)\n Homeomorph.finTwoArrow.symm.trans <|\n (cubeHomeomorphClosedBall (Fin 2)).trans <|\n closedBallHomeomorphOfFinrankEq (by simp [hF])", "/-- `TauCeti.squareHomeomorphClosedBall` acts as the composition of\n`Homeomorph.finTwoArrow.symm`, `TauCeti.cubeHomeomorphClosedBall`, and\n`TauCeti.closedBallHomeomorphOfFinrankEq`. -/\ntheorem coe_squareHomeomorphClosedBall_apply {F : Type*} [NormedAddCommGroup F]\n [NormedSpace \u211d F] (hF : Module.finrank \u211d F = 2) (p : I \u00d7 I) :\n (squareHomeomorphClosedBall hF p : F) =\n (haveI : FiniteDimensional \u211d F := .of_finrank_pos (by omega);\n closedBallHomeomorphOfFinrankEq (E := Fin 2 \u2192 \u211d) (F := F) (by simp [hF])\n (cubeHomeomorphClosedBall (Fin 2) (Homeomorph.finTwoArrow.symm p)) : F) :=", "/-- `TauCeti.squareHomeomorphClosedBall` carries a point of the unit square onto the unit sphere\nexactly when it lies on `TauCeti.squareBoundary`. -/\n@[simp]\ntheorem norm_squareHomeomorphClosedBall_eq_one_iff {F : Type*} [NormedAddCommGroup F]\n [NormedSpace \u211d F] (hF : Module.finrank \u211d F = 2) (p : I \u00d7 I) :\n \u2016(squareHomeomorphClosedBall hF p : F)\u2016 = 1 \u2194 p \u2208 squareBoundary :=", "/-- Restricting `TauCeti.squareHomeomorphClosedBall` to the boundary of the unit square gives a\nhomeomorphism `TauCeti.squareBoundary \u2243\u209c Metric.sphere (0 : F) 1`. -/\ndef squareBoundaryHomeomorphSphere {F : Type*} [NormedAddCommGroup F] [NormedSpace \u211d F]\n (hF : Module.finrank \u211d F = 2) : squareBoundary \u2243\u209c Metric.sphere (0 : F) 1 :=\n ((squareHomeomorphClosedBall hF).subtype fun p =>\n (norm_squareHomeomorphClosedBall_eq_one_iff hF p).symm.trans\n mem_sphere_zero_iff_norm.symm).trans\n (Topology.IsEmbedding.subtypeVal.homeomorphOfSubsetRange fun _ hx =>\n \u27e8\u27e8_, Metric.sphere_subset_closedBall hx\u27e9, rfl\u27e9)", "/-- Coercing the image of a boundary point under `TauCeti.squareBoundaryHomeomorphSphere` to the\nambient space gives the same point as `TauCeti.squareHomeomorphClosedBall`. -/\n@[simp]\ntheorem coe_squareBoundaryHomeomorphSphere_apply {F : Type*} [NormedAddCommGroup F]\n [NormedSpace \u211d F] (hF : Module.finrank \u211d F = 2) (p : squareBoundary) :\n (squareBoundaryHomeomorphSphere hF p : F) = squareHomeomorphClosedBall hF p :=", "end TauCeti"], "free_length": 6879, "file_length": 13461, "heartbeats": 37454, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Geometry.Manifold.Sobolev.LocalMap.Bordered.Morrey", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Geometry/Manifold/Sobolev/LocalMap/Bordered/Morrey.lean", "module": "TauCeti.Geometry.Manifold.Sobolev.LocalMap.Bordered.Morrey", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Geometry.Manifold.Sobolev.LocalMap.Bordered\nimport TauCeti.Analysis.Sobolev.Local.Morrey.HalfDisc\nimport TauCeti.Geometry.Manifold.Complex.BorderedHolomorphic.Basic\n\n/-!\n# Morrey's embedding up to the boundary for local Sobolev maps\n\nLet `X` be a Riemann surface with boundary, charted on the closed upper half-plane with chart\nchanges in `TauCeti.borderedHolomorphicGroupoid`, and `M` a smooth manifold modelled on a\nfinite-dimensional real normed space. For `2 < p`, a map in the local Sobolev class\n`W^{k+1,p}_loc` up to the boundary on an open set `s` (`TauCeti.MemWkpLocMapOnBordered`) is of\nclass `C\u1d4f` on `s` up to the boundary, for the smooth structure of `X` as a manifold with\nboundary: `ContMDiffOn closedUpperHalfPlaneModel I k u s`.\n\nThe class is tested in all bordered holomorphic charts of `X`, in particular in the preferred\ncharts, and `ContMDiffOn` is tested in the preferred charts (`contMDiffOn_iff`). In those charts\nthe coordinate expression is a continuous map in `MemWkpLoc p (\u03a9 \u2229 {0 \u2264 im}) (k + 1)` for an open\n`\u03a9 \u2286 \u2102`, so it is `C\u1d4f` on `\u03a9 \u2229 {0 \u2264 im}` by Morrey's embedding up to the real axis\n(`TauCeti.MemWkpLoc.contDiffOn_of_continuousOn_inter_setOf_im_nonneg`). The class contains the\ncontinuity of the map, so no choice of representative is involved.\n\n## Main results\n\n* `TauCeti.MemWkpLocMapOnBordered.contMDiffOn`, `TauCeti.MemWkpLocMapBordered.contMDiff`: for\n `2 < p`, `W^{k+1,p}_loc` up to the boundary implies `C\u1d4f` up to the boundary.\n* `TauCeti.MemWkpLocMapOnBordered.contMDiffOn_infty`,\n `TauCeti.MemWkpLocMapBordered.contMDiff_infty`: a map in the class of every order is smooth up to\n the boundary.\n\n## References\n\n* D. McDuff and D. Salamon, *J-holomorphic Curves and Symplectic Topology*, second edition,\n Appendix B.1 (Sobolev spaces on half-discs).\n-/\n\npublic section\n\nopen Set\nopen scoped Manifold ContDiff\n\nnoncomputable section\n\nnamespace TauCeti\n\nopen ClosedUpperHalfPlane\n\nvariable {X : Type*} [TopologicalSpace X] [ChartedSpace ClosedUpperHalfPlane X]\n [HasGroupoid X borderedHolomorphicGroupoid]\n {F : Type*} [NormedAddCommGroup F] [NormedSpace \u211d F] [FiniteDimensional \u211d F]\n {H : Type*} [TopologicalSpace H] {I : ModelWithCorners \u211d F H}\n {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [IsManifold I \u221e M]\n {p : ENNReal} {u : X \u2192 M} {s : Set X}\n\n/-- **Morrey's embedding up to the boundary.** For `2 < p`, a map from a Riemann surface with\nboundary in the local Sobolev class `W^{k+1,p}_loc` up to the boundary on an open set `s` is of\nclass `C\u1d4f` on `s`, up to the boundary of `X`. -/\ntheorem MemWkpLocMapOnBordered.contMDiffOn {k : \u2115} (hu : MemWkpLocMapOnBordered I p (k + 1) u s)\n (hp : 2 < p) (hs : IsOpen s) : ContMDiffOn closedUpperHalfPlaneModel I k u s := by\n have : IsManifold I k M := .of_le (n := \u221e) (by exact_mod_cast le_top)\n rw [contMDiffOn_iff]\n refine \u27e8hu.continuousOn, fun x y \u21a6 ?_\u27e9\n set \u03c6 := chartAt ClosedUpperHalfPlane x\n set \u03c8 := chartAt H y\n -- The coordinate domain is a half-disc `\u03a9 \u2229 {0 \u2264 im}` with `\u03a9` open.\n obtain \u27e8\u03a9, h\u03a9, hV\u27e9 := \u03c6.exists_isOpen_extend_target_inter_preimage\n (hu.continuousOn.isOpen_inter_preimage hs \u03c8.open_source)\n have hw := hu.memWkpLoc_chart (StructureGroupoid.chart_mem_maximalAtlas _ x)\n (IsManifold.chart_mem_maximalAtlas y)\n have hc : ContinuousOn (\u03c8.extend I \u2218 u \u2218 (\u03c6.extend closedUpperHalfPlaneModel).symm)\n ((\u03c6.extend closedUpperHalfPlaneModel).target \u2229\n (\u03c6.extend closedUpperHalfPlaneModel).symm \u207b\u00b9' (s \u2229 u \u207b\u00b9' \u03c8.source)) :=\n (\u03c8.continuousOn_extend (I := I)).comp (hu.continuousOn.comp\n (\u03c6.continuousOn_extend_symm.mono inter_subset_left) fun _ hz \u21a6 hz.2.1) fun _ hz \u21a6 by\n rw [OpenPartialHomeomorph.extend_source]; exact hz.2.2\n rw [hV] at hw hc\n have h := hw.contDiffOn_of_continuousOn_inter_setOf_im_nonneg (\u03a9 := \u27e8\u03a9, h\u03a9\u27e9) hp hc\n -- The preferred extended charts `extChartAt` are the extensions of the preferred charts.\n simp only [extChartAt, OpenPartialHomeomorph.extend_source]\n rwa [hV]\n\n/-- **Morrey's embedding up to the boundary on the whole surface.** For `2 < p`, a map from a\nRiemann surface with boundary in the local Sobolev class `W^{k+1,p}_loc` up to the boundary is\nof class `C\u1d4f` up to the boundary. -/\ntheorem MemWkpLocMapBordered.contMDiff {k : \u2115} (hu : MemWkpLocMapBordered I p (k + 1) u)\n (hp : 2 < p) : ContMDiff closedUpperHalfPlaneModel I k u :=\n contMDiffOn_univ.1\n (MemWkpLocMapOnBordered.contMDiffOn (memWkpLocMapOnGroupoid_univ.2 hu) hp isOpen_univ)\n\n/-- For `2 < p`, a map from a Riemann surface with boundary in the local Sobolev class\n`W^{k,p}_loc` up to the boundary on an open set `s` for every `k` is smooth on `s`, up to the\nboundary of `X`. -/\ntheorem MemWkpLocMapOnBordered.contMDiffOn_infty\n (hu : \u2200 k : \u2115, MemWkpLocMapOnBordered I p k u s) (hp : 2 < p) (hs : IsOpen s) :\n ContMDiffOn closedUpperHalfPlaneModel I \u221e u s :=\n _root_.contMDiffOn_infty.2 fun k \u21a6 (hu (k + 1)).contMDiffOn hp hs\n\n/-- For `2 < p`, a map from a Riemann surface with boundary in the local Sobolev class\n`W^{k,p}_loc` up to the boundary for every `k` is smooth up to the boundary. -/\ntheorem MemWkpLocMapBordered.contMDiff_infty (hu : \u2200 k : \u2115, MemWkpLocMapBordered I p k u)\n (hp : 2 < p) : ContMDiff closedUpperHalfPlaneModel I \u221e u :=\n _root_.contMDiff_infty.2 fun k \u21a6 (hu (k + 1)).contMDiff hp\n\nend TauCeti\n", "public_theorems": ["TauCeti.MemWkpLocMapOnBordered.contMDiffOn", "TauCeti.MemWkpLocMapBordered.contMDiff", "TauCeti.MemWkpLocMapOnBordered.contMDiffOn_infty", "TauCeti.MemWkpLocMapBordered.contMDiff_infty"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Geometry.Manifold.Sobolev.LocalMap.Bordered\nimport TauCeti.Analysis.Sobolev.Local.Morrey.HalfDisc\nimport TauCeti.Geometry.Manifold.Complex.BorderedHolomorphic.Basic\n\n/-!\n# Morrey's embedding up to the boundary for local Sobolev maps\n\nLet `X` be a Riemann surface with boundary, charted on the closed upper half-plane with chart\nchanges in `TauCeti.borderedHolomorphicGroupoid`, and `M` a smooth manifold modelled on a\nfinite-dimensional real normed space. For `2 < p`, a map in the local Sobolev class\n`W^{k+1,p}_loc` up to the boundary on an open set `s` (`TauCeti.MemWkpLocMapOnBordered`) is of\nclass `C\u1d4f` on `s` up to the boundary, for the smooth structure of `X` as a manifold with\nboundary: `ContMDiffOn closedUpperHalfPlaneModel I k u s`.\n\nThe class is tested in all bordered holomorphic charts of `X`, in particular in the preferred\ncharts, and `ContMDiffOn` is tested in the preferred charts (`contMDiffOn_iff`). In those charts\nthe coordinate expression is a continuous map in `MemWkpLoc p (\u03a9 \u2229 {0 \u2264 im}) (k + 1)` for an open\n`\u03a9 \u2286 \u2102`, so it is `C\u1d4f` on `\u03a9 \u2229 {0 \u2264 im}` by Morrey's embedding up to the real axis\n(`TauCeti.MemWkpLoc.contDiffOn_of_continuousOn_inter_setOf_im_nonneg`). The class contains the\ncontinuity of the map, so no choice of representative is involved.\n\n## Main results\n\n* `TauCeti.MemWkpLocMapOnBordered.contMDiffOn`, `TauCeti.MemWkpLocMapBordered.contMDiff`: for\n `2 < p`, `W^{k+1,p}_loc` up to the boundary implies `C\u1d4f` up to the boundary.\n* `TauCeti.MemWkpLocMapOnBordered.contMDiffOn_infty`,\n `TauCeti.MemWkpLocMapBordered.contMDiff_infty`: a map in the class of every order is smooth up to\n the boundary.\n\n## References\n\n* D. McDuff and D. Salamon, *J-holomorphic Curves and Symplectic Topology*, second edition,\n Appendix B.1 (Sobolev spaces on half-discs).\n-/\n\npublic section\n\nopen Set\nopen scoped Manifold ContDiff\n\nnoncomputable section\n\nnamespace TauCeti\n\nopen ClosedUpperHalfPlane\n\nvariable {X : Type*} [TopologicalSpace X] [ChartedSpace ClosedUpperHalfPlane X]\n [HasGroupoid X borderedHolomorphicGroupoid]\n {F : Type*} [NormedAddCommGroup F] [NormedSpace \u211d F] [FiniteDimensional \u211d F]\n {H : Type*} [TopologicalSpace H] {I : ModelWithCorners \u211d F H}\n {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [IsManifold I \u221e M]\n {p : ENNReal} {u : X \u2192 M} {s : Set X}", "/-- **Morrey's embedding up to the boundary.** For `2 < p`, a map from a Riemann surface with\nboundary in the local Sobolev class `W^{k+1,p}_loc` up to the boundary on an open set `s` is of\nclass `C\u1d4f` on `s`, up to the boundary of `X`. -/\ntheorem MemWkpLocMapOnBordered.contMDiffOn {k : \u2115} (hu : MemWkpLocMapOnBordered I p (k + 1) u s)\n (hp : 2 < p) (hs : IsOpen s) : ContMDiffOn closedUpperHalfPlaneModel I k u s :=", "/-- **Morrey's embedding up to the boundary on the whole surface.** For `2 < p`, a map from a\nRiemann surface with boundary in the local Sobolev class `W^{k+1,p}_loc` up to the boundary is\nof class `C\u1d4f` up to the boundary. -/\ntheorem MemWkpLocMapBordered.contMDiff {k : \u2115} (hu : MemWkpLocMapBordered I p (k + 1) u)\n (hp : 2 < p) : ContMDiff closedUpperHalfPlaneModel I k u :=", "/-- For `2 < p`, a map from a Riemann surface with boundary in the local Sobolev class\n`W^{k,p}_loc` up to the boundary on an open set `s` for every `k` is smooth on `s`, up to the\nboundary of `X`. -/\ntheorem MemWkpLocMapOnBordered.contMDiffOn_infty\n (hu : \u2200 k : \u2115, MemWkpLocMapOnBordered I p k u s) (hp : 2 < p) (hs : IsOpen s) :\n ContMDiffOn closedUpperHalfPlaneModel I \u221e u s :=", "/-- For `2 < p`, a map from a Riemann surface with boundary in the local Sobolev class\n`W^{k,p}_loc` up to the boundary for every `k` is smooth up to the boundary. -/\ntheorem MemWkpLocMapBordered.contMDiff_infty (hu : \u2200 k : \u2115, MemWkpLocMapBordered I p k u)\n (hp : 2 < p) : ContMDiff closedUpperHalfPlaneModel I \u221e u :=", "end TauCeti"], "free_length": 1231, "file_length": 2586, "heartbeats": 2560, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Algebra.Lie.NormTwoShell.FullCartan.BaseChange", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Algebra/Lie/NormTwoShell/FullCartan/BaseChange.lean", "module": "TauCeti.Algebra.Lie.NormTwoShell.FullCartan.BaseChange", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Algebra.Lie.NormTwoShell.FullCartan.Basic\npublic import Mathlib.Algebra.Lie.BaseChange\nimport Mathlib.LinearAlgebra.DirectSum.Finsupp\nimport Mathlib.LinearAlgebra.Dual.BaseChange\nimport Mathlib.LinearAlgebra.TensorProduct.Prod\n\n/-!\n# Full-Cartan shell brackets after scalar extension\n\nThe scalar extension of the full-Cartan shell algebra has coordinates\n`(A \u2297[\u2124] Y) \u00d7 (B.normTwoShell \u2192\u2080 A)`. The Cartan factor is the actual scalar extension of `Y`,\nnot a chosen central/coroot splitting. These coordinates work over every commutative ring,\nincluding nonflat coefficient rings. They give a bracket formula for arbitrary Cartan tensors\nand finite root combinations. In particular the formulas still apply to Cartan torsion and to\nsigned root-cycle torsion appearing after reduction.\n\n`baseChangeEquiv` uses Mathlib's tensor/product and tensor/finsupp equivalences. The bracket is\nMathlib's scalar-extended Lie bracket on `A \u2297[\u2124] FullShellLieAlgebra D`; the coordinate product\nis only a module product, not a product of Lie algebras. Opposite roots contribute to its\nCartan factor through the actual coroot map of `D`.\n\n## References\n\n* J. C. Jantzen, *Representations of Algebraic Groups*, second edition, Part II, Chapter 1.\n* V. G. Kac, *Infinite dimensional Lie algebras*, third edition, \u00a7\u00a77.8\u20137.9.\n-/\n\npublic section\n\nopen scoped TensorProduct\n\nnamespace Matrix.FullShellLieAlgebra\n\nnoncomputable section\n\nvariable {I : Type*} [Fintype I] {B : Matrix I I \u2124} {Y : Type*} [AddCommGroup Y]\n (D : ShellCartanDatum B Y) (A : Type*) [CommRing A]\n\n/-- Cartan tensors and finitely supported root coefficients of the scalar-extended algebra. -/\ndef baseChangeEquiv :\n A \u2297[\u2124] FullShellLieAlgebra D \u2243\u2097[A] (A \u2297[\u2124] Y) \u00d7 (B.normTwoShell \u2192\u2080 A) :=\n LinearEquiv.baseChange \u2124 A _ _ (equivProd D) \u226a\u226b\u2097\n TensorProduct.prodRight \u2124 A A Y (B.normTwoShell \u2192\u2080 \u2124) \u226a\u226b\u2097\n (LinearEquiv.refl A _).prodCongr (TensorProduct.finsuppScalarRight \u2124 A A B.normTwoShell)\n\n/-- The Cartan coordinate of a pure tensor. -/\n@[simp]\ntheorem baseChangeEquiv_tmul_fst (r : A) (x : FullShellLieAlgebra D) :\n (baseChangeEquiv D A (r \u2297\u209c[\u2124] x)).1 = r \u2297\u209c[\u2124] (equivProd D x).1 := by\n simp [baseChangeEquiv]\n\n/-- Each root coefficient of a pure tensor. -/\n@[simp]\ntheorem baseChangeEquiv_tmul_snd_apply (r : A) (x : FullShellLieAlgebra D)\n (a : B.normTwoShell) :\n (baseChangeEquiv D A (r \u2297\u209c[\u2124] x)).2 a = (equivProd D x).2 a \u2022 r := by\n simp [baseChangeEquiv]\n\n/-- Scalar extension of the Cartan inclusion has zero root coefficients. -/\n@[simp]\ntheorem baseChangeEquiv_cartan (y : A \u2297[\u2124] Y) :\n baseChangeEquiv D A ((cartan D).baseChange A y) = (y, 0) := by\n induction y using TensorProduct.inductionOn with\n | tmul r y =>\n apply Prod.ext\n \u00b7 simp\n \u00b7 ext a; simp\n | add y z hy hz => simp [hy, hz]\n\n/-- A scalar multiple of a root vector has a single nonzero root coordinate. -/\n@[simp]\ntheorem baseChangeEquiv_tmul_root (r : A) (a : B.normTwoShell) :\n baseChangeEquiv D A (r \u2297\u209c[\u2124] root D a) = (0, Finsupp.single a r) := by\n classical\n apply Prod.ext\n \u00b7 simp\n \u00b7 ext b\n simp only [baseChangeEquiv_tmul_snd_apply, equivProd_root]\n by_cases h : a = b <;> simp [h]\n\n/-- Reconstruction of a Cartan tensor. -/\n@[simp]\ntheorem baseChangeEquiv_symm_cartan (y : A \u2297[\u2124] Y) :\n (baseChangeEquiv D A).symm (y, 0) = (cartan D).baseChange A y := by\n rw [LinearEquiv.symm_apply_eq, baseChangeEquiv_cartan]\n\n/-- Reconstruction of one root coefficient. -/\n@[simp]\ntheorem baseChangeEquiv_symm_single (r : A) (a : B.normTwoShell) :\n (baseChangeEquiv D A).symm (0, Finsupp.single a r) = r \u2297\u209c[\u2124] root D a := by\n rw [LinearEquiv.symm_apply_eq, baseChangeEquiv_tmul_root]\n\n/-- Reconstruction of arbitrary Cartan and root coordinates. -/\ntheorem baseChangeEquiv_symm_apply (y : A \u2297[\u2124] Y) (f : B.normTwoShell \u2192\u2080 A) :\n (baseChangeEquiv D A).symm (y, f) =\n (cartan D).baseChange A y + f.sum (fun a r => r \u2297\u209c[\u2124] root D a) := by\n classical\n apply (baseChangeEquiv D A).injective\n simp only [LinearEquiv.apply_symm_apply, map_add, baseChangeEquiv_cartan, map_finsuppSum,\n baseChangeEquiv_tmul_root]\n apply Prod.ext\n \u00b7 simp [Finsupp.sum, Prod.fst_sum]\n \u00b7 simpa only [Finsupp.sum, Prod.snd_add, Prod.snd_sum, Prod.snd_zero, zero_add] using\n (Finsupp.sum_single f).symm\n\n/-- The scalar-extended root weight, evaluated on the full Cartan tensor module. -/\ndef baseChangeWeight (a : I \u2192 \u2124) : A \u2297[\u2124] Y \u2192\u2097[A] A :=\n Module.Dual.baseChange A (D.weight a)\n\n/-- Evaluation of a root weight on a pure Cartan tensor. -/\n@[simp]\ntheorem baseChangeWeight_tmul (a : I \u2192 \u2124) (r : A) (y : Y) :\n baseChangeWeight D A a (r \u2297\u209c[\u2124] y) = (D.weight a y : A) * r := by\n simpa only [baseChangeWeight, zsmul_eq_mul] using\n Module.Dual.baseChange_apply_tmul A (D.weight a) r y\n\nvariable [LinearOrder I] [hB : Fact B.PosDef] [hdiag : Fact (\u2200 i, Even (B i i))]\n\n/-- The integral full-Cartan bracket is a Lie bracket under the Gram hypotheses. -/\nlocal instance : LieRing (FullShellLieAlgebra D) := lieRing D hB.out hdiag.out\n\n/-- Arbitrary scalar-extended Cartan vectors commute. -/\n@[simp]\ntheorem baseChange_cartan_lie_cartan (y z : A \u2297[\u2124] Y) :\n \u2045(cartan D).baseChange A y, (cartan D).baseChange A z\u2046 = 0 := by\n induction y using TensorProduct.inductionOn with\n | tmul r y =>\n induction z using TensorProduct.inductionOn with\n | tmul s z => simp\n | add z w hz hw => rw [map_add, LieRing.lie_add, hz, hw, add_zero]\n | add y w hy hw => rw [map_add, LieRing.add_lie, hy, hw, add_zero]\n\n/-- The Cartan/root bracket evaluates the extended weight on an arbitrary Cartan tensor. -/\n@[simp]\ntheorem baseChange_cartan_lie_root (y : A \u2297[\u2124] Y) (r : A) (a : B.normTwoShell) :\n \u2045(cartan D).baseChange A y, r \u2297\u209c[\u2124] root D a\u2046 =\n (baseChangeWeight D A a y * r) \u2297\u209c[\u2124] root D a := by\n induction y using TensorProduct.inductionOn with\n | tmul s y =>\n simp [TensorProduct.tmul_smul, TensorProduct.smul_tmul', mul_assoc, mul_left_comm]\n | add y z hy hz => simp [hy, hz, add_mul, TensorProduct.add_tmul]\n\n/-- The root/Cartan bracket is the negative of the weight action. -/\n@[simp]\ntheorem baseChange_root_lie_cartan (r : A) (a : B.normTwoShell) (y : A \u2297[\u2124] Y) :\n \u2045r \u2297\u209c[\u2124] root D a, (cartan D).baseChange A y\u2046 =\n -((baseChangeWeight D A a y * r) \u2297\u209c[\u2124] root D a) := by\n rw [\u2190 lie_skew, baseChange_cartan_lie_root]\n\n/-- The bracket in Cartan/root coordinates. Root/root terms use the integral signed root\nbracket, so opposite roots land in the full Cartan module via their coroots. -/\ntheorem baseChangeEquiv_symm_lie_symm (y z : A \u2297[\u2124] Y)\n (f g : B.normTwoShell \u2192\u2080 A) :\n \u2045(baseChangeEquiv D A).symm (y, f), (baseChangeEquiv D A).symm (z, g)\u2046 =\n g.sum (fun a r => (baseChangeWeight D A a y * r) \u2297\u209c[\u2124] root D a) -\n f.sum (fun a r => (baseChangeWeight D A a z * r) \u2297\u209c[\u2124] root D a) +\n f.sum (fun a r => g.sum (fun b s => (r * s) \u2297\u209c[\u2124] rootBracket D a b)) := by\n classical\n have hcross : (\u2211 b \u2208 g.support, \u2211 a \u2208 f.support, (f a * g b) \u2297\u209c[\u2124] rootBracket D a b) =\n \u2211 a \u2208 f.support, \u2211 b \u2208 g.support, (f a * g b) \u2297\u209c[\u2124] rootBracket D a b :=\n Finset.sum_comm\n rw [baseChangeEquiv_symm_apply, baseChangeEquiv_symm_apply]\n simp only [LieRing.lie_add, LieRing.add_lie, baseChange_cartan_lie_cartan, zero_add,\n Finsupp.sum, _root_.lie_sum (L := A \u2297[\u2124] FullShellLieAlgebra D)\n (M := A \u2297[\u2124] FullShellLieAlgebra D), _root_.sum_lie,\n baseChange_cartan_lie_root, baseChange_root_lie_cartan,\n LieAlgebra.ExtendScalars.bracket_tmul, root_lie_root, Finset.sum_neg_distrib,\n sub_eq_add_neg, Finset.sum_add_distrib, hcross]\n -- The root/Cartan contribution precedes the Cartan/root contribution in bilinear expansion.\n ac_rfl\n\nend\n\nend Matrix.FullShellLieAlgebra\n", "public_theorems": ["Matrix.FullShellLieAlgebra.baseChangeEquiv_tmul_fst", "Matrix.FullShellLieAlgebra.baseChangeEquiv_tmul_snd_apply", "Matrix.FullShellLieAlgebra.baseChangeEquiv_cartan", "Matrix.FullShellLieAlgebra.baseChangeEquiv_tmul_root", "Matrix.FullShellLieAlgebra.baseChangeEquiv_symm_cartan", "Matrix.FullShellLieAlgebra.baseChangeEquiv_symm_single", "Matrix.FullShellLieAlgebra.baseChangeEquiv_symm_apply", "Matrix.FullShellLieAlgebra.baseChangeWeight_tmul", "Matrix.FullShellLieAlgebra.baseChange_cartan_lie_cartan", "Matrix.FullShellLieAlgebra.baseChange_cartan_lie_root", "Matrix.FullShellLieAlgebra.baseChange_root_lie_cartan", "Matrix.FullShellLieAlgebra.baseChangeEquiv_symm_lie_symm"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Algebra.Lie.NormTwoShell.FullCartan.Basic\npublic import Mathlib.Algebra.Lie.BaseChange\nimport Mathlib.LinearAlgebra.DirectSum.Finsupp\nimport Mathlib.LinearAlgebra.Dual.BaseChange\nimport Mathlib.LinearAlgebra.TensorProduct.Prod\n\n/-!\n# Full-Cartan shell brackets after scalar extension\n\nThe scalar extension of the full-Cartan shell algebra has coordinates\n`(A \u2297[\u2124] Y) \u00d7 (B.normTwoShell \u2192\u2080 A)`. The Cartan factor is the actual scalar extension of `Y`,\nnot a chosen central/coroot splitting. These coordinates work over every commutative ring,\nincluding nonflat coefficient rings. They give a bracket formula for arbitrary Cartan tensors\nand finite root combinations. In particular the formulas still apply to Cartan torsion and to\nsigned root-cycle torsion appearing after reduction.\n\n`baseChangeEquiv` uses Mathlib's tensor/product and tensor/finsupp equivalences. The bracket is\nMathlib's scalar-extended Lie bracket on `A \u2297[\u2124] FullShellLieAlgebra D`; the coordinate product\nis only a module product, not a product of Lie algebras. Opposite roots contribute to its\nCartan factor through the actual coroot map of `D`.\n\n## References\n\n* J. C. Jantzen, *Representations of Algebraic Groups*, second edition, Part II, Chapter 1.\n* V. G. Kac, *Infinite dimensional Lie algebras*, third edition, \u00a7\u00a77.8\u20137.9.\n-/\n\npublic section\n\nopen scoped TensorProduct\n\nnamespace Matrix.FullShellLieAlgebra\n\nnoncomputable section\n\nvariable {I : Type*} [Fintype I] {B : Matrix I I \u2124} {Y : Type*} [AddCommGroup Y]\n (D : ShellCartanDatum B Y) (A : Type*) [CommRing A]\n\n/-- Cartan tensors and finitely supported root coefficients of the scalar-extended algebra. -/\ndef baseChangeEquiv :\n A \u2297[\u2124] FullShellLieAlgebra D \u2243\u2097[A] (A \u2297[\u2124] Y) \u00d7 (B.normTwoShell \u2192\u2080 A) :=\n LinearEquiv.baseChange \u2124 A _ _ (equivProd D) \u226a\u226b\u2097\n TensorProduct.prodRight \u2124 A A Y (B.normTwoShell \u2192\u2080 \u2124) \u226a\u226b\u2097\n (LinearEquiv.refl A _).prodCongr (TensorProduct.finsuppScalarRight \u2124 A A B.normTwoShell)", "/-- The Cartan coordinate of a pure tensor. -/\n@[simp]\ntheorem baseChangeEquiv_tmul_fst (r : A) (x : FullShellLieAlgebra D) :\n (baseChangeEquiv D A (r \u2297\u209c[\u2124] x)).1 = r \u2297\u209c[\u2124] (equivProd D x).1 :=", "/-- Each root coefficient of a pure tensor. -/\n@[simp]\ntheorem baseChangeEquiv_tmul_snd_apply (r : A) (x : FullShellLieAlgebra D)\n (a : B.normTwoShell) :\n (baseChangeEquiv D A (r \u2297\u209c[\u2124] x)).2 a = (equivProd D x).2 a \u2022 r :=", "/-- Scalar extension of the Cartan inclusion has zero root coefficients. -/\n@[simp]\ntheorem baseChangeEquiv_cartan (y : A \u2297[\u2124] Y) :\n baseChangeEquiv D A ((cartan D).baseChange A y) = (y, 0) :=", "/-- A scalar multiple of a root vector has a single nonzero root coordinate. -/\n@[simp]\ntheorem baseChangeEquiv_tmul_root (r : A) (a : B.normTwoShell) :\n baseChangeEquiv D A (r \u2297\u209c[\u2124] root D a) = (0, Finsupp.single a r) :=", "/-- Reconstruction of a Cartan tensor. -/\n@[simp]\ntheorem baseChangeEquiv_symm_cartan (y : A \u2297[\u2124] Y) :\n (baseChangeEquiv D A).symm (y, 0) = (cartan D).baseChange A y :=", "/-- Reconstruction of one root coefficient. -/\n@[simp]\ntheorem baseChangeEquiv_symm_single (r : A) (a : B.normTwoShell) :\n (baseChangeEquiv D A).symm (0, Finsupp.single a r) = r \u2297\u209c[\u2124] root D a :=", "/-- Reconstruction of arbitrary Cartan and root coordinates. -/\ntheorem baseChangeEquiv_symm_apply (y : A \u2297[\u2124] Y) (f : B.normTwoShell \u2192\u2080 A) :\n (baseChangeEquiv D A).symm (y, f) =\n (cartan D).baseChange A y + f.sum (fun a r => r \u2297\u209c[\u2124] root D a) :=", "/-- The scalar-extended root weight, evaluated on the full Cartan tensor module. -/\ndef baseChangeWeight (a : I \u2192 \u2124) : A \u2297[\u2124] Y \u2192\u2097[A] A :=\n Module.Dual.baseChange A (D.weight a)", "/-- Evaluation of a root weight on a pure Cartan tensor. -/\n@[simp]\ntheorem baseChangeWeight_tmul (a : I \u2192 \u2124) (r : A) (y : Y) :\n baseChangeWeight D A a (r \u2297\u209c[\u2124] y) = (D.weight a y : A) * r :=", "variable [LinearOrder I] [hB : Fact B.PosDef] [hdiag : Fact (\u2200 i, Even (B i i))]\n\n/-- The integral full-Cartan bracket is a Lie bracket under the Gram hypotheses. -/\nlocal instance : LieRing (FullShellLieAlgebra D) := lieRing D hB.out hdiag.out", "/-- Arbitrary scalar-extended Cartan vectors commute. -/\n@[simp]\ntheorem baseChange_cartan_lie_cartan (y z : A \u2297[\u2124] Y) :\n \u2045(cartan D).baseChange A y, (cartan D).baseChange A z\u2046 = 0 :=", "/-- The Cartan/root bracket evaluates the extended weight on an arbitrary Cartan tensor. -/\n@[simp]\ntheorem baseChange_cartan_lie_root (y : A \u2297[\u2124] Y) (r : A) (a : B.normTwoShell) :\n \u2045(cartan D).baseChange A y, r \u2297\u209c[\u2124] root D a\u2046 =\n (baseChangeWeight D A a y * r) \u2297\u209c[\u2124] root D a :=", "/-- The root/Cartan bracket is the negative of the weight action. -/\n@[simp]\ntheorem baseChange_root_lie_cartan (r : A) (a : B.normTwoShell) (y : A \u2297[\u2124] Y) :\n \u2045r \u2297\u209c[\u2124] root D a, (cartan D).baseChange A y\u2046 =\n -((baseChangeWeight D A a y * r) \u2297\u209c[\u2124] root D a) :=", "/-- The bracket in Cartan/root coordinates. Root/root terms use the integral signed root\nbracket, so opposite roots land in the full Cartan module via their coroots. -/\ntheorem baseChangeEquiv_symm_lie_symm (y z : A \u2297[\u2124] Y)\n (f g : B.normTwoShell \u2192\u2080 A) :\n \u2045(baseChangeEquiv D A).symm (y, f), (baseChangeEquiv D A).symm (z, g)\u2046 =\n g.sum (fun a r => (baseChangeWeight D A a y * r) \u2297\u209c[\u2124] root D a) -\n f.sum (fun a r => (baseChangeWeight D A a z * r) \u2297\u209c[\u2124] root D a) +\n f.sum (fun a r => g.sum (fun b s => (r * s) \u2297\u209c[\u2124] rootBracket D a b)) :=", "end\n\nend Matrix.FullShellLieAlgebra"], "free_length": 2037, "file_length": 5144, "heartbeats": 16807, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.NumberTheory.ClassFieldTheory.Formation.GaloisMaps", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/NumberTheory/ClassFieldTheory/Formation/GaloisMaps.lean", "module": "TauCeti.NumberTheory.ClassFieldTheory.Formation.GaloisMaps", "file": "/-\nCopyright (c) 2026 Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Codex\n-/\nmodule\n\npublic import TauCeti.GroupTheory.Abelianization.Transfer\npublic import TauCeti.NumberTheory.ClassFieldTheory.Formation.Conjugation\npublic import TauCeti.NumberTheory.ClassFieldTheory.Formation.Refinement\npublic import TauCeti.NumberTheory.ClassFieldTheory.Formation.Restriction\n\n/-!\n# Maps between abelianized Galois groups of finite normal layers\n\nThe functoriality of the Artin map compares operations on formation levels with three canonical\nhomomorphisms between the abelianizations of finite-layer Galois groups, and with the equivalence\ninduced directly by conjugation. This file constructs the homomorphisms and proves coherence laws\nfor the conjugation equivalence obtained from Mathlib's `MulEquiv.abelianizationCongr`.\n\nFor a restriction of layers `K/E` inside `K/F`, the inclusion\n\n```text\nGal(K/E) \u21aa Gal(K/F)\n```\n\ninduces `LayerRestriction.inclusionHom` on abelianizations. In the other direction,\n`LayerRestriction.transferHom` is the group-theoretic transfer (Verlagerung)\n`Group.Abelianization.transferOfInjective` along `T.galHom_injective`. The index of the range of\n`T.galHom` is the relative degree `[E : F]`. Like the inclusion, the transfer is functorial along a\ntower of restrictions (`Group.Abelianization.transferOfInjective_comp`).\n\nFor a refinement `L/F` of `K/F`, the quotient map\n\n```text\nGal(L/F) \u2192 Gal(K/F)\n```\n\ninduces `LayerRefinement.quotientHom`. The inclusion and quotient maps inherit identity and tower\nlaws from `Group.Abelianization.map`; these laws make the maps usable without unfolding their\nbodies.\nConjugation of a layer similarly induces an equivalence on abelianizations from\n`NormalLayer.conjugateGalEquiv` and Mathlib's `MulEquiv.abelianizationCongr`.\n\n## Main definitions and results\n\n* `TauCeti.ClassFieldTheory.LayerRestriction.inclusionHom`: the map on abelianizations induced by\n inclusion of Galois groups.\n* `TauCeti.ClassFieldTheory.LayerRestriction.transferHom`: group-theoretic transfer between the\n same abelianizations, in the opposite direction.\n* `TauCeti.ClassFieldTheory.LayerRestriction.transferHom_trans`: the transfer is functorial along\n a tower of restrictions.\n* `TauCeti.ClassFieldTheory.LayerRefinement.quotientHom`: the map on abelianizations induced by a\n quotient of Galois groups.\n* `NormalLayer.conjugateGalEquiv_abelianizationCongr_one`: conjugation by one is the identity on\n abelianized Galois groups.\n* `NormalLayer.conjugateGalEquiv_abelianizationCongr_trans`: conjugation on abelianized Galois\n groups composes.\n\n## References\n\n* E. Artin and J. Tate, *Class Field Theory*, Chapter XIII and Chapter XIV, \u00a7\u00a74\u20135.\n* K. S. Brown, *Cohomology of Groups*, Chapter III, \u00a79.\n-/\n\npublic noncomputable section\n\nnamespace TauCeti.ClassFieldTheory\n\nvariable {G : Type} [Group G] [TopologicalSpace G] [IsTopologicalGroup G] [CompactSpace G]\n [TotallyDisconnectedSpace G]\n\nnamespace LayerRestriction\n\nvariable {small big : NormalLayer G}\n\n/-- The index of the image of `Gal(K/E)` in `Gal(K/F)` is the relative degree `[E : F]`. -/\ntheorem index_range_galHom (T : LayerRestriction small big) :\n T.galHom.range.index = T.relativeDegree := by\n apply Nat.eq_of_mul_eq_mul_left (Nat.card_pos (\u03b1 := small.Gal))\n calc\n Nat.card small.Gal * T.galHom.range.index =\n Nat.card T.galHom.range * T.galHom.range.index := by\n rw [Nat.card_congr (MonoidHom.ofInjective T.galHom_injective).toEquiv]\n _ = Nat.card big.Gal := T.galHom.range.card_mul_index\n _ = big.degree := big.degree_eq_natCard_gal.symm\n _ = small.degree * T.relativeDegree := T.degree_mul_relativeDegree.symm\n _ = Nat.card small.Gal * T.relativeDegree := by rw [small.degree_eq_natCard_gal]\n\n/-- The map `(U'/V)^ab \u2192 (U/V)^ab` induced by the inclusion `U'/V \u2192 U/V` attached to a\nrestriction of layers. The additive type tags match the additive convention of Tate cohomology. -/\ndef inclusionHom (T : LayerRestriction small big) :\n Additive (Group.Abelianization small.Gal) \u2192+ Additive (Group.Abelianization big.Gal) :=\n (Group.Abelianization.map T.galHom).toAdditive\n\n/-- Inclusion on abelianized Galois groups is induced by the layer's Galois-group homomorphism. -/\ntheorem inclusionHom_apply (T : LayerRestriction small big)\n (x : Additive (Group.Abelianization small.Gal)) :\n T.inclusionHom x = (Group.Abelianization.map T.galHom).toAdditive x :=\n (rfl)\n\n/-- The inclusion map sends the abelianization class of `x` to the class of its image in the\nlarger Galois group. -/\n@[simp]\ntheorem inclusionHom_of (T : LayerRestriction small big) (x : small.Gal) :\n T.inclusionHom (Additive.ofMul (Group.Abelianization.of x)) =\n Additive.ofMul (Group.Abelianization.of (T.galHom x)) :=\n (rfl)\n\n/-- Inclusion on abelianized Galois groups is the identity for the trivial restriction. -/\n@[simp]\ntheorem inclusionHom_self {L : NormalLayer G} (T : LayerRestriction L L) :\n T.inclusionHom = AddMonoidHom.id (Additive (Group.Abelianization L.Gal)) := by\n rw [inclusionHom, T.galHom_self, Group.Abelianization.map_id]\n rfl\n\nvariable {a b c : NormalLayer G}\n\n/-- Inclusion on abelianized Galois groups is functorial along a tower of restrictions. -/\ntheorem inclusionHom_trans (T : LayerRestriction a b) (T' : LayerRestriction b c) :\n (T.trans T').inclusionHom = T'.inclusionHom.comp T.inclusionHom := by\n rw [inclusionHom, inclusionHom, inclusionHom, galHom_trans, \u2190 Group.Abelianization.map_comp]\n rfl\n\nvariable {small big : NormalLayer G}\n\n/-- The group-theoretic transfer `(U/V)^ab \u2192 (U'/V)^ab` attached to a restriction of layers,\ndefined as `Group.Abelianization.transferOfInjective` along `T.galHom_injective`. -/\nnoncomputable def transferHom (T : LayerRestriction small big) :\n Additive (Group.Abelianization big.Gal) \u2192+ Additive (Group.Abelianization small.Gal) :=\n (Group.Abelianization.transferOfInjective T.galHom_injective).toAdditive\n\n/-- Transfer on abelianized Galois groups is `Group.Abelianization.transferOfInjective` along\n`T.galHom_injective`. -/\ntheorem transferHom_apply (T : LayerRestriction small big)\n (x : Additive (Group.Abelianization big.Gal)) :\n T.transferHom x =\n (Group.Abelianization.transferOfInjective T.galHom_injective).toAdditive x :=\n (rfl)\n\n/-- On the class of an element, `transferHom` is Mathlib's group-theoretic transfer to the image\nof the smaller Galois group, transported back along the equivalence induced by `galHom`. -/\n@[simp]\ntheorem transferHom_of (T : LayerRestriction small big) (x : big.Gal) :\n T.transferHom (Additive.ofMul (Group.Abelianization.of x)) =\n Additive.ofMul (MonoidHom.transfer\n (Group.Abelianization.of.comp\n (MonoidHom.ofInjective T.galHom_injective).symm.toMonoidHom) x) := by\n rw [transferHom_apply, MonoidHom.toAdditive_apply_apply, toMul_ofMul,\n Group.Abelianization.transferOfInjective_of]\n\n/-- Transfer on abelianized Galois groups is the identity for the trivial restriction. -/\n@[simp]\ntheorem transferHom_self {L : NormalLayer G} (T : LayerRestriction L L) :\n T.transferHom = AddMonoidHom.id (Additive (Group.Abelianization L.Gal)) := by\n have : (MonoidHom.id L.Gal).range.FiniteIndex :=\n (MonoidHom.range_eq_top (f := MonoidHom.id L.Gal) |>.mpr Function.surjective_id).symm \u25b8\n inferInstance\n rw [transferHom, Group.Abelianization.transferOfInjective_congr T.galHom_self\n T.galHom_injective Function.injective_id, Group.Abelianization.transferOfInjective_id,\n MonoidHom.toAdditive_id]\n\n/-- The transfer between the Galois groups of two layers is the transfer to the image subgroup,\nfollowed by transport back along the equivalence from the smaller Galois group to that image. -/\ntheorem transferHom_eq_map_comp_transfer (T : LayerRestriction small big) :\n T.transferHom =\n (Group.Abelianization.map (MonoidHom.ofInjective T.galHom_injective).symm).toAdditive.comp\n (Group.Abelianization.transfer T.galHom.range).toAdditive := by\n rw [transferHom, Group.Abelianization.transferOfInjective_eq_comp_transfer]\n refine AddMonoidHom.ext fun x \u21a6 ?_\n obtain \u27e8y, hy\u27e9 : \u2203 y, Group.Abelianization.of y =\n Group.Abelianization.transfer T.galHom.range x.toMul := QuotientGroup.mk_surjective _\n simp [\u2190 hy]\n\n/-- Transfer on abelianized Galois groups is functorial along a tower of restrictions: for\n`F \u2286 E \u2286 E' \u2286 K`, the transfer `Gal(K/F)^ab \u2192 Gal(K/E')^ab` is the transfer\n`Gal(K/F)^ab \u2192 Gal(K/E)^ab` followed by the transfer `Gal(K/E)^ab \u2192 Gal(K/E')^ab`. -/\ntheorem transferHom_trans (T : LayerRestriction a b) (T' : LayerRestriction b c) :\n (T.trans T').transferHom = T.transferHom.comp T'.transferHom := by\n have : (T'.galHom.comp T.galHom).range.FiniteIndex :=\n galHom_trans T T' \u25b8 inferInstance\n rw [transferHom, transferHom, transferHom,\n Group.Abelianization.transferOfInjective_congr (galHom_trans T T')\n (T.trans T').galHom_injective (T'.galHom_injective.comp T.galHom_injective),\n Group.Abelianization.transferOfInjective_comp T.galHom_injective T'.galHom_injective]\n ext x\n simp\n\nend LayerRestriction\n\nnamespace LayerRefinement\n\nvariable {old new : NormalLayer G}\n\n/-- The quotient map `(U/V')^ab \u2192 (U/V)^ab` induced by the quotient homomorphism `U/V' \u2192 U/V`\nattached to a refinement of layers. -/\ndef quotientHom (T : LayerRefinement old new) :\n Additive (Group.Abelianization new.Gal) \u2192+ Additive (Group.Abelianization old.Gal) :=\n (Group.Abelianization.map T.galHom).toAdditive\n\n/-- The quotient map sends the abelianization class of `x` to the class of its image in the\nquotient Galois group. -/\n@[simp]\ntheorem quotientHom_of (T : LayerRefinement old new) (x : new.Gal) :\n T.quotientHom (Additive.ofMul (Group.Abelianization.of x)) =\n Additive.ofMul (Group.Abelianization.of (T.galHom x)) :=\n (rfl)\n\n/-- The quotient map on abelianized Galois groups is surjective. -/\ntheorem quotientHom_surjective (T : LayerRefinement old new) :\n Function.Surjective T.quotientHom := by\n rintro \u27e8x\u27e9\n induction x using QuotientGroup.induction_on with\n | H x =>\n obtain \u27e8y, hy\u27e9 := T.galHom_surjective x\n refine \u27e8Additive.ofMul (Group.Abelianization.of y), ?_\u27e9\n rw [quotientHom_of, hy]\n rfl\n\n/-- The quotient map on abelianized Galois groups is the identity for the trivial refinement. -/\n@[simp]\ntheorem quotientHom_self {L : NormalLayer G} (T : LayerRefinement L L) :\n T.quotientHom = AddMonoidHom.id (Additive (Group.Abelianization L.Gal)) := by\n rw [quotientHom, T.galHom_self, Group.Abelianization.map_id]\n rfl\n\nvariable {a b c : NormalLayer G}\n\n/-- Quotient maps on abelianized Galois groups are functorial along a tower of refinements. -/\ntheorem quotientHom_trans (T : LayerRefinement a b) (T' : LayerRefinement b c) :\n (T.trans T').quotientHom = T.quotientHom.comp T'.quotientHom := by\n rw [quotientHom, quotientHom, quotientHom, galHom_trans, \u2190 Group.Abelianization.map_comp]\n rfl\n\nend LayerRefinement\n\nnamespace NormalLayer\n\nvariable (L : NormalLayer G) (g h : G)\n\n/-- Conjugation by `1` is the identity on abelianized Galois groups, after transporting along\n`conjugate_one`. -/\n@[simp]\ntheorem conjugateGalEquiv_abelianizationCongr_one :\n ((L.conjugateGalEquiv 1).abelianizationCongr.toAdditive).trans\n ((MulEquiv.abelianizationCongr\n (MulEquiv.cast (M := fun K : NormalLayer G \u21a6 K.Gal) L.conjugate_one)).toAdditive) =\n AddEquiv.refl (Additive (Group.Abelianization L.Gal)) := by\n apply AddEquiv.ext\n intro x\n have he :\n (L.conjugateGalEquiv 1).abelianizationCongr.trans\n (MulEquiv.cast (M := fun K : NormalLayer G \u21a6 K.Gal)\n L.conjugate_one).abelianizationCongr =\n MulEquiv.refl (Group.Abelianization L.Gal) := by\n rw [Group.abelianizationCongr_trans, L.conjugateGalEquiv_one, Group.abelianizationCongr_refl]\n simpa only [AddEquiv.trans_apply,\n MulEquiv.toAdditive_apply_apply, MonoidHom.toAdditive_apply_apply,\n MulEquiv.coe_toMonoidHom, MulEquiv.trans_apply, MulEquiv.refl_apply, AddEquiv.refl_apply,\n toMul_ofMul, ofMul_toMul] using\n congrArg Additive.ofMul (DFunLike.congr_fun he x.toMul)\n\n/-- Conjugation on abelianized Galois groups composes: conjugating by `h` and then by `g` is\nconjugating by `g * h`, up to transport along `conjugate_conjugate`. -/\ntheorem conjugateGalEquiv_abelianizationCongr_trans :\n ((L.conjugateGalEquiv h).abelianizationCongr.toAdditive).trans\n (((L.conjugate h).conjugateGalEquiv g).abelianizationCongr.toAdditive) =\n ((L.conjugateGalEquiv (g * h)).abelianizationCongr.toAdditive).trans\n ((MulEquiv.abelianizationCongr\n (MulEquiv.cast (M := fun K : NormalLayer G \u21a6 K.Gal)\n (L.conjugate_conjugate g h).symm)).toAdditive) := by\n apply AddEquiv.ext\n intro x\n have he :\n (L.conjugateGalEquiv h).abelianizationCongr.trans\n ((L.conjugate h).conjugateGalEquiv g).abelianizationCongr =\n (L.conjugateGalEquiv (g * h)).abelianizationCongr.trans\n (MulEquiv.cast (M := fun K : NormalLayer G \u21a6 K.Gal)\n (L.conjugate_conjugate g h).symm).abelianizationCongr := by\n simpa only [Group.abelianizationCongr_trans] using congrArg MulEquiv.abelianizationCongr\n (L.conjugateGalEquiv_trans_conjugateGalEquiv g h)\n simpa only [AddEquiv.trans_apply,\n MulEquiv.toAdditive_apply_apply, MonoidHom.toAdditive_apply_apply,\n MulEquiv.coe_toMonoidHom, MulEquiv.trans_apply, toMul_ofMul, ofMul_toMul] using\n congrArg Additive.ofMul (DFunLike.congr_fun he x.toMul)\n\nend NormalLayer\n\nend TauCeti.ClassFieldTheory\n", "public_theorems": ["TauCeti.ClassFieldTheory.LayerRestriction.index_range_galHom", "TauCeti.ClassFieldTheory.LayerRestriction.inclusionHom_apply", "TauCeti.ClassFieldTheory.LayerRestriction.inclusionHom_of", "TauCeti.ClassFieldTheory.LayerRestriction.inclusionHom_self", "TauCeti.ClassFieldTheory.LayerRestriction.inclusionHom_trans", "TauCeti.ClassFieldTheory.LayerRestriction.transferHom_apply", "TauCeti.ClassFieldTheory.LayerRestriction.transferHom_of", "TauCeti.ClassFieldTheory.LayerRestriction.transferHom_self", "TauCeti.ClassFieldTheory.LayerRestriction.transferHom_eq_map_comp_transfer", "TauCeti.ClassFieldTheory.LayerRestriction.transferHom_trans", "TauCeti.ClassFieldTheory.LayerRefinement.quotientHom_of", "TauCeti.ClassFieldTheory.LayerRefinement.quotientHom_surjective", "TauCeti.ClassFieldTheory.LayerRefinement.quotientHom_self", "TauCeti.ClassFieldTheory.LayerRefinement.quotientHom_trans", "TauCeti.ClassFieldTheory.NormalLayer.conjugateGalEquiv_abelianizationCongr_one", "TauCeti.ClassFieldTheory.NormalLayer.conjugateGalEquiv_abelianizationCongr_trans"], "frozen": ["/-\nCopyright (c) 2026 Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Codex\n-/\nmodule\n\npublic import TauCeti.GroupTheory.Abelianization.Transfer\npublic import TauCeti.NumberTheory.ClassFieldTheory.Formation.Conjugation\npublic import TauCeti.NumberTheory.ClassFieldTheory.Formation.Refinement\npublic import TauCeti.NumberTheory.ClassFieldTheory.Formation.Restriction\n\n/-!\n# Maps between abelianized Galois groups of finite normal layers\n\nThe functoriality of the Artin map compares operations on formation levels with three canonical\nhomomorphisms between the abelianizations of finite-layer Galois groups, and with the equivalence\ninduced directly by conjugation. This file constructs the homomorphisms and proves coherence laws\nfor the conjugation equivalence obtained from Mathlib's `MulEquiv.abelianizationCongr`.\n\nFor a restriction of layers `K/E` inside `K/F`, the inclusion\n\n```text\nGal(K/E) \u21aa Gal(K/F)\n```\n\ninduces `LayerRestriction.inclusionHom` on abelianizations. In the other direction,\n`LayerRestriction.transferHom` is the group-theoretic transfer (Verlagerung)\n`Group.Abelianization.transferOfInjective` along `T.galHom_injective`. The index of the range of\n`T.galHom` is the relative degree `[E : F]`. Like the inclusion, the transfer is functorial along a\ntower of restrictions (`Group.Abelianization.transferOfInjective_comp`).\n\nFor a refinement `L/F` of `K/F`, the quotient map\n\n```text\nGal(L/F) \u2192 Gal(K/F)\n```\n\ninduces `LayerRefinement.quotientHom`. The inclusion and quotient maps inherit identity and tower\nlaws from `Group.Abelianization.map`; these laws make the maps usable without unfolding their\nbodies.\nConjugation of a layer similarly induces an equivalence on abelianizations from\n`NormalLayer.conjugateGalEquiv` and Mathlib's `MulEquiv.abelianizationCongr`.\n\n## Main definitions and results\n\n* `TauCeti.ClassFieldTheory.LayerRestriction.inclusionHom`: the map on abelianizations induced by\n inclusion of Galois groups.\n* `TauCeti.ClassFieldTheory.LayerRestriction.transferHom`: group-theoretic transfer between the\n same abelianizations, in the opposite direction.\n* `TauCeti.ClassFieldTheory.LayerRestriction.transferHom_trans`: the transfer is functorial along\n a tower of restrictions.\n* `TauCeti.ClassFieldTheory.LayerRefinement.quotientHom`: the map on abelianizations induced by a\n quotient of Galois groups.\n* `NormalLayer.conjugateGalEquiv_abelianizationCongr_one`: conjugation by one is the identity on\n abelianized Galois groups.\n* `NormalLayer.conjugateGalEquiv_abelianizationCongr_trans`: conjugation on abelianized Galois\n groups composes.\n\n## References\n\n* E. Artin and J. Tate, *Class Field Theory*, Chapter XIII and Chapter XIV, \u00a7\u00a74\u20135.\n* K. S. Brown, *Cohomology of Groups*, Chapter III, \u00a79.\n-/\n\npublic noncomputable section\n\nnamespace TauCeti.ClassFieldTheory\n\nvariable {G : Type} [Group G] [TopologicalSpace G] [IsTopologicalGroup G] [CompactSpace G]\n [TotallyDisconnectedSpace G]\n\nnamespace LayerRestriction\n\nvariable {small big : NormalLayer G}", "/-- The index of the image of `Gal(K/E)` in `Gal(K/F)` is the relative degree `[E : F]`. -/\ntheorem index_range_galHom (T : LayerRestriction small big) :\n T.galHom.range.index = T.relativeDegree :=", "/-- The map `(U'/V)^ab \u2192 (U/V)^ab` induced by the inclusion `U'/V \u2192 U/V` attached to a\nrestriction of layers. The additive type tags match the additive convention of Tate cohomology. -/\ndef inclusionHom (T : LayerRestriction small big) :\n Additive (Group.Abelianization small.Gal) \u2192+ Additive (Group.Abelianization big.Gal) :=\n (Group.Abelianization.map T.galHom).toAdditive", "/-- Inclusion on abelianized Galois groups is induced by the layer's Galois-group homomorphism. -/\ntheorem inclusionHom_apply (T : LayerRestriction small big)\n (x : Additive (Group.Abelianization small.Gal)) :\n T.inclusionHom x = (Group.Abelianization.map T.galHom).toAdditive x :=", "/-- The inclusion map sends the abelianization class of `x` to the class of its image in the\nlarger Galois group. -/\n@[simp]\ntheorem inclusionHom_of (T : LayerRestriction small big) (x : small.Gal) :\n T.inclusionHom (Additive.ofMul (Group.Abelianization.of x)) =\n Additive.ofMul (Group.Abelianization.of (T.galHom x)) :=", "/-- Inclusion on abelianized Galois groups is the identity for the trivial restriction. -/\n@[simp]\ntheorem inclusionHom_self {L : NormalLayer G} (T : LayerRestriction L L) :\n T.inclusionHom = AddMonoidHom.id (Additive (Group.Abelianization L.Gal)) :=", "variable {a b c : NormalLayer G}", "/-- Inclusion on abelianized Galois groups is functorial along a tower of restrictions. -/\ntheorem inclusionHom_trans (T : LayerRestriction a b) (T' : LayerRestriction b c) :\n (T.trans T').inclusionHom = T'.inclusionHom.comp T.inclusionHom :=", "variable {small big : NormalLayer G}\n\n/-- The group-theoretic transfer `(U/V)^ab \u2192 (U'/V)^ab` attached to a restriction of layers,\ndefined as `Group.Abelianization.transferOfInjective` along `T.galHom_injective`. -/\nnoncomputable def transferHom (T : LayerRestriction small big) :\n Additive (Group.Abelianization big.Gal) \u2192+ Additive (Group.Abelianization small.Gal) :=\n (Group.Abelianization.transferOfInjective T.galHom_injective).toAdditive", "/-- Transfer on abelianized Galois groups is `Group.Abelianization.transferOfInjective` along\n`T.galHom_injective`. -/\ntheorem transferHom_apply (T : LayerRestriction small big)\n (x : Additive (Group.Abelianization big.Gal)) :\n T.transferHom x =\n (Group.Abelianization.transferOfInjective T.galHom_injective).toAdditive x :=", "/-- On the class of an element, `transferHom` is Mathlib's group-theoretic transfer to the image\nof the smaller Galois group, transported back along the equivalence induced by `galHom`. -/\n@[simp]\ntheorem transferHom_of (T : LayerRestriction small big) (x : big.Gal) :\n T.transferHom (Additive.ofMul (Group.Abelianization.of x)) =\n Additive.ofMul (MonoidHom.transfer\n (Group.Abelianization.of.comp\n (MonoidHom.ofInjective T.galHom_injective).symm.toMonoidHom) x) :=", "/-- Transfer on abelianized Galois groups is the identity for the trivial restriction. -/\n@[simp]\ntheorem transferHom_self {L : NormalLayer G} (T : LayerRestriction L L) :\n T.transferHom = AddMonoidHom.id (Additive (Group.Abelianization L.Gal)) :=", "/-- The transfer between the Galois groups of two layers is the transfer to the image subgroup,\nfollowed by transport back along the equivalence from the smaller Galois group to that image. -/\ntheorem transferHom_eq_map_comp_transfer (T : LayerRestriction small big) :\n T.transferHom =\n (Group.Abelianization.map (MonoidHom.ofInjective T.galHom_injective).symm).toAdditive.comp\n (Group.Abelianization.transfer T.galHom.range).toAdditive :=", "/-- Transfer on abelianized Galois groups is functorial along a tower of restrictions: for\n`F \u2286 E \u2286 E' \u2286 K`, the transfer `Gal(K/F)^ab \u2192 Gal(K/E')^ab` is the transfer\n`Gal(K/F)^ab \u2192 Gal(K/E)^ab` followed by the transfer `Gal(K/E)^ab \u2192 Gal(K/E')^ab`. -/\ntheorem transferHom_trans (T : LayerRestriction a b) (T' : LayerRestriction b c) :\n (T.trans T').transferHom = T.transferHom.comp T'.transferHom :=", "end LayerRestriction\n\nnamespace LayerRefinement\n\nvariable {old new : NormalLayer G}\n\n/-- The quotient map `(U/V')^ab \u2192 (U/V)^ab` induced by the quotient homomorphism `U/V' \u2192 U/V`\nattached to a refinement of layers. -/\ndef quotientHom (T : LayerRefinement old new) :\n Additive (Group.Abelianization new.Gal) \u2192+ Additive (Group.Abelianization old.Gal) :=\n (Group.Abelianization.map T.galHom).toAdditive", "/-- The quotient map sends the abelianization class of `x` to the class of its image in the\nquotient Galois group. -/\n@[simp]\ntheorem quotientHom_of (T : LayerRefinement old new) (x : new.Gal) :\n T.quotientHom (Additive.ofMul (Group.Abelianization.of x)) =\n Additive.ofMul (Group.Abelianization.of (T.galHom x)) :=", "/-- The quotient map on abelianized Galois groups is surjective. -/\ntheorem quotientHom_surjective (T : LayerRefinement old new) :\n Function.Surjective T.quotientHom :=", "/-- The quotient map on abelianized Galois groups is the identity for the trivial refinement. -/\n@[simp]\ntheorem quotientHom_self {L : NormalLayer G} (T : LayerRefinement L L) :\n T.quotientHom = AddMonoidHom.id (Additive (Group.Abelianization L.Gal)) :=", "variable {a b c : NormalLayer G}", "/-- Quotient maps on abelianized Galois groups are functorial along a tower of refinements. -/\ntheorem quotientHom_trans (T : LayerRefinement a b) (T' : LayerRefinement b c) :\n (T.trans T').quotientHom = T.quotientHom.comp T'.quotientHom :=", "end LayerRefinement\n\nnamespace NormalLayer\n\nvariable (L : NormalLayer G) (g h : G)", "/-- Conjugation by `1` is the identity on abelianized Galois groups, after transporting along\n`conjugate_one`. -/\n@[simp]\ntheorem conjugateGalEquiv_abelianizationCongr_one :\n ((L.conjugateGalEquiv 1).abelianizationCongr.toAdditive).trans\n ((MulEquiv.abelianizationCongr\n (MulEquiv.cast (M := fun K : NormalLayer G \u21a6 K.Gal) L.conjugate_one)).toAdditive) =\n AddEquiv.refl (Additive (Group.Abelianization L.Gal)) :=", "/-- Conjugation on abelianized Galois groups composes: conjugating by `h` and then by `g` is\nconjugating by `g * h`, up to transport along `conjugate_conjugate`. -/\ntheorem conjugateGalEquiv_abelianizationCongr_trans :\n ((L.conjugateGalEquiv h).abelianizationCongr.toAdditive).trans\n (((L.conjugate h).conjugateGalEquiv g).abelianizationCongr.toAdditive) =\n ((L.conjugateGalEquiv (g * h)).abelianizationCongr.toAdditive).trans\n ((MulEquiv.abelianizationCongr\n (MulEquiv.cast (M := fun K : NormalLayer G \u21a6 K.Gal)\n (L.conjugate_conjugate g h).symm)).toAdditive) :=", "end NormalLayer\n\nend TauCeti.ClassFieldTheory"], "free_length": 3431, "file_length": 7990, "heartbeats": 11638, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Algebra.AlgebraicGroup.Chevalley.Positive.Blocks", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Algebra/AlgebraicGroup/Chevalley/Positive/Blocks.lean", "module": "TauCeti.Algebra.AlgebraicGroup.Chevalley.Positive.Blocks", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Algebra.AlgebraicGroup.Chevalley.Opposite\npublic import TauCeti.Algebra.Lie.UniversalEnveloping.Kostant.Weight.Blocks\npublic import TauCeti.LinearAlgebra.RootSystem.SimplyConnectedRootDatum.WeightDegree\n\n/-!\n# Weight blocks of positive and negative Chevalley points\n\nEvery positive point of a Chevalley datum is upper unitriangular in the blocks of its\nactual weight spaces. In particular, its restriction to each weight block is the identity,\nincluding weight spaces of multiplicity greater than one. This is useful for separating\nthe positive subgroup from the torus centralizer, without assuming root coordinates or\nBruhat decomposition. Dually, every negative point is lower unitriangular for the same\nnumbering of the weight blocks, which places the big-cell factors `U\u207b`, `T` and `U` in the\nblock `LDU` shape.\n\nThe root-matrix calculations are `blockUnitriangular_kostantRootSubgroupMatrix` and\n`blockUnitriangular_toDual_kostantRootSubgroupMatrix`; closure under group operations extends\nthem to all positive and all negative points. The results hold over every commutative value\nring.\n\n## References\n\n* R. Steinberg, *Lectures on Chevalley Groups*, Chapter 3, Lemma 17.\n* J. C. Jantzen, *Representations of Algebraic Groups*, Part II, Chapter 1.\n-/\n\npublic section\n\nopen TauCeti.UniversalEnvelopingAlgebra\n\nnamespace TauCeti.DynkinType.ChevalleyDatum\n\nuniverse v\n\nvariable {t : DynkinType} {ht : t.Valid} (D : ChevalleyDatum t ht)\nvariable (A : Type v) [CommRing A]\n\nattribute [local instance high] Algebra.toModule\n\n/-- Positive Chevalley points are upper unitriangular in their weight-space blocks.\nThe blocks are indexed by distinct weights, not by individual basis vectors. -/\ntheorem blockUnitriangular_of_mem_positivePoints {g : D.points A}\n (hg : g \u2208 D.positivePoints A) :\n Matrix.BlockUnitriangular\n ((g : Matrix.GeneralLinearGroup (Fin D.dim) A) : Matrix (Fin D.dim) (Fin D.dim) A)\n (orderedWeightBlock (t.weightDegree ht) D.weight) := by\n rw [D.positivePoints_eq_closure] at hg\n induction hg using Subgroup.closure_induction with\n | mem g hg =>\n obtain \u27e8\u03b3, h\u03b3, u, rfl\u27e9 := hg\n rw [D.coe_rootSubgroupPoints,\n \u2190 kostantRootSubgroupParam_chevalleySystem D.representation D.lattice\n D.representation_mem_lattice D.isNilpotent_representation_rootGenerator,\n basisMatrix_kostantRootSubgroupParam]\n exact blockUnitriangular_kostantRootSubgroupMatrix (t.chevalleySystem ht)\n (t.lieBasis ht).h D.representation D.lattice\n (kostantForm_chevalleySystem_smul_mem D.representation D.lattice\n D.representation_mem_lattice D.isNilpotent_representation_rootGenerator)\n D.basis D.weight (t.weightDegree ht) \u03b3 _ D.isCartanWeightVector_basis\n (t.lie_lieBasis_h_chevalleySystem ht \u03b3) (t.weightDegree_root_pos ht h\u03b3) _\n -- The characterization also reconciles the order instances on the finite block index.\n | one => simpa only [Subgroup.coe_one, Units.val_one, Matrix.blockUnitriangular_iff] using\n (Matrix.blockUnitriangular_one\n (R := A) (b := orderedWeightBlock (t.weightDegree ht) D.weight))\n | mul g h _ _ hg hh =>\n simpa only [Subgroup.coe_mul, Units.val_mul, Matrix.blockUnitriangular_iff] using hg.mul hh\n | inv g _ hg =>\n simpa only [Subgroup.coe_inv, Matrix.coe_units_inv, Matrix.blockUnitriangular_iff] using hg.inv\n\n/-- On each entire weight space, a positive point has the identity matrix block. -/\ntheorem coe_apply_eq_one_apply_of_mem_positivePoints_of_weight_eq {g : D.points A}\n (hg : g \u2208 D.positivePoints A) {i j : Fin D.dim} (hij : D.weight i = D.weight j) :\n ((g : Matrix.GeneralLinearGroup (Fin D.dim) A) : Matrix (Fin D.dim) (Fin D.dim) A) i j =\n (1 : Matrix (Fin D.dim) (Fin D.dim) A) i j :=\n (D.blockUnitriangular_of_mem_positivePoints A hg).apply_of_eq\n ((orderedWeightBlock_eq_iff _ _).mpr hij)\n\n/-- Negative Chevalley points are lower unitriangular in their weight-space blocks, for the same\nnumbering of the blocks as the positive points. -/\ntheorem blockUnitriangular_toDual_of_mem_negativePoints {g : D.points A}\n (hg : g \u2208 D.negativePoints A) :\n Matrix.BlockUnitriangular\n ((g : Matrix.GeneralLinearGroup (Fin D.dim) A) : Matrix (Fin D.dim) (Fin D.dim) A)\n (OrderDual.toDual \u2218 orderedWeightBlock (t.weightDegree ht) D.weight) := by\n rw [D.negativePoints_eq_closure] at hg\n induction hg using Subgroup.closure_induction with\n | mem g hg =>\n obtain \u27e8\u03b3, h\u03b3, u, rfl\u27e9 := hg\n rw [D.coe_rootSubgroupPoints,\n \u2190 kostantRootSubgroupParam_chevalleySystem D.representation D.lattice\n D.representation_mem_lattice D.isNilpotent_representation_rootGenerator,\n basisMatrix_kostantRootSubgroupParam]\n exact blockUnitriangular_toDual_kostantRootSubgroupMatrix (t.chevalleySystem ht)\n (t.lieBasis ht).h D.representation D.lattice\n (kostantForm_chevalleySystem_smul_mem D.representation D.lattice\n D.representation_mem_lattice D.isNilpotent_representation_rootGenerator)\n D.basis D.weight (t.weightDegree ht) \u03b3 _ D.isCartanWeightVector_basis\n (t.lie_lieBasis_h_chevalleySystem ht \u03b3) (t.weightDegree_root_neg ht h\u03b3) _\n -- As for positive points, the characterization reconciles the order instances on the blocks.\n | one => simpa only [Subgroup.coe_one, Units.val_one, Matrix.blockUnitriangular_iff] using\n (Matrix.blockUnitriangular_one\n (R := A) (b := OrderDual.toDual \u2218 orderedWeightBlock (t.weightDegree ht) D.weight))\n | mul g h _ _ hg hh =>\n simpa only [Subgroup.coe_mul, Units.val_mul, Matrix.blockUnitriangular_iff] using hg.mul hh\n | inv g _ hg =>\n simpa only [Subgroup.coe_inv, Matrix.coe_units_inv, Matrix.blockUnitriangular_iff] using hg.inv\n\nend TauCeti.DynkinType.ChevalleyDatum\n", "public_theorems": ["TauCeti.DynkinType.ChevalleyDatum.blockUnitriangular_of_mem_positivePoints", "TauCeti.DynkinType.ChevalleyDatum.coe_apply_eq_one_apply_of_mem_positivePoints_of_weight_eq", "TauCeti.DynkinType.ChevalleyDatum.blockUnitriangular_toDual_of_mem_negativePoints"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Algebra.AlgebraicGroup.Chevalley.Opposite\npublic import TauCeti.Algebra.Lie.UniversalEnveloping.Kostant.Weight.Blocks\npublic import TauCeti.LinearAlgebra.RootSystem.SimplyConnectedRootDatum.WeightDegree\n\n/-!\n# Weight blocks of positive and negative Chevalley points\n\nEvery positive point of a Chevalley datum is upper unitriangular in the blocks of its\nactual weight spaces. In particular, its restriction to each weight block is the identity,\nincluding weight spaces of multiplicity greater than one. This is useful for separating\nthe positive subgroup from the torus centralizer, without assuming root coordinates or\nBruhat decomposition. Dually, every negative point is lower unitriangular for the same\nnumbering of the weight blocks, which places the big-cell factors `U\u207b`, `T` and `U` in the\nblock `LDU` shape.\n\nThe root-matrix calculations are `blockUnitriangular_kostantRootSubgroupMatrix` and\n`blockUnitriangular_toDual_kostantRootSubgroupMatrix`; closure under group operations extends\nthem to all positive and all negative points. The results hold over every commutative value\nring.\n\n## References\n\n* R. Steinberg, *Lectures on Chevalley Groups*, Chapter 3, Lemma 17.\n* J. C. Jantzen, *Representations of Algebraic Groups*, Part II, Chapter 1.\n-/\n\npublic section\n\nopen TauCeti.UniversalEnvelopingAlgebra\n\nnamespace TauCeti.DynkinType.ChevalleyDatum\n\nuniverse v\n\nvariable {t : DynkinType} {ht : t.Valid} (D : ChevalleyDatum t ht)\nvariable (A : Type v) [CommRing A]\n\nattribute [local instance high] Algebra.toModule", "/-- Positive Chevalley points are upper unitriangular in their weight-space blocks.\nThe blocks are indexed by distinct weights, not by individual basis vectors. -/\ntheorem blockUnitriangular_of_mem_positivePoints {g : D.points A}\n (hg : g \u2208 D.positivePoints A) :\n Matrix.BlockUnitriangular\n ((g : Matrix.GeneralLinearGroup (Fin D.dim) A) : Matrix (Fin D.dim) (Fin D.dim) A)\n (orderedWeightBlock (t.weightDegree ht) D.weight) :=", "/-- On each entire weight space, a positive point has the identity matrix block. -/\ntheorem coe_apply_eq_one_apply_of_mem_positivePoints_of_weight_eq {g : D.points A}\n (hg : g \u2208 D.positivePoints A) {i j : Fin D.dim} (hij : D.weight i = D.weight j) :\n ((g : Matrix.GeneralLinearGroup (Fin D.dim) A) : Matrix (Fin D.dim) (Fin D.dim) A) i j =\n (1 : Matrix (Fin D.dim) (Fin D.dim) A) i j :=", "/-- Negative Chevalley points are lower unitriangular in their weight-space blocks, for the same\nnumbering of the blocks as the positive points. -/\ntheorem blockUnitriangular_toDual_of_mem_negativePoints {g : D.points A}\n (hg : g \u2208 D.negativePoints A) :\n Matrix.BlockUnitriangular\n ((g : Matrix.GeneralLinearGroup (Fin D.dim) A) : Matrix (Fin D.dim) (Fin D.dim) A)\n (OrderDual.toDual \u2218 orderedWeightBlock (t.weightDegree ht) D.weight) :=", "end TauCeti.DynkinType.ChevalleyDatum"], "free_length": 2451, "file_length": 3830, "heartbeats": 3120, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Probability.Finance.SimpleStrategy.BoundedApproximation", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Probability/Finance/SimpleStrategy/BoundedApproximation.lean", "module": "TauCeti.Probability.Finance.SimpleStrategy.BoundedApproximation", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Probability.Finance.SimpleStrategy.Approximation\nimport Mathlib.Topology.MetricSpace.Lipschitz\n\n/-!\n# Bound-preserving predictable grid approximation\n\nA predictable square-integrable process bounded almost everywhere by `K` admits finite-grid\napproximations whose left-endpoint-measurable heights are all bounded by the same `K`.\nThe heights satisfy this bound everywhere, even if the original bound holds only almost\neverywhere. For `K \u2265 0` the holding processes are therefore bounded by `K` at every time.\nA negative bound forces the zero measure and is handled by an empty grid.\nThe grid may depend on the approximation accuracy.\n\nThis strengthens energy density by controlling the heights uniformly across approximations.\nFor exponential Brownian likelihoods this is essential: their second-moment estimate depends\nexponentially on the squared height bound, so a separate bound for each approximant does not\nsupply uniform integrability. No Brownian motion or usual filtration conditions are needed\nfor the approximation itself.\n\nThe construction clips the heights of the existing finite-grid energy approximations using\n`Set.projIcc`. Its native nonexpansiveness ensures that clipping cannot increase the error\nagainst a target already lying in the interval. No stochastic integral or density measure is\nconstructed here.\n\n## References\n\n* I. Karatzas and S. E. Shreve, *Brownian Motion and Stochastic Calculus*, second edition,\n Springer, 1991, \u00a7\u00a73.2 and 3.5.\n-/\n\npublic section\n\nnoncomputable section\n\nopen MeasureTheory Set Filter TauCeti.Finance\nopen scoped ENNReal NNReal Topology\n\nnamespace MeasureTheory.Filtration\n\nvariable {\u03a9 : Type*} {m\u03a9 : MeasurableSpace \u03a9} (\u2131 : Filtration \u211d\u22650 m\u03a9)\n\n/-- Finite-grid L\u00b2 density preserving a prescribed almost-everywhere bound on the target.\nThe heights satisfy the bound everywhere and are measurable at the left endpoints.\nThe measure need only be finite on predictable rectangles and have no mass at time zero. -/\ntheorem exists_simpleHolding_eLpNorm_sub_lt_of_bound\n (\u03bc : @Measure (\u211d\u22650 \u00d7 \u03a9) \u2131.predictable)\n (hfin : \u2200 s t A, MeasurableSet[\u2131 s] A \u2192 \u03bc (Ioc s t \u00d7\u02e2 A) \u2260 \u221e)\n (hzero : \u03bc ({0} \u00d7\u02e2 (univ : Set \u03a9)) = 0)\n {H : \u211d\u22650 \u2192 \u03a9 \u2192 \u211d} (hH\u2082 : MemLp (Function.uncurry H) 2 \u03bc)\n {K : \u211d} (hbound : \u2200\u1d50 p \u2202\u03bc, \u2016H p.1 p.2\u2016 \u2264 K)\n {\u03b5 : \u211d\u22650\u221e} (h\u03b5 : 0 < \u03b5) :\n \u2203 (n : \u2115) (\u03c4 : \u2115 \u2192 \u211d\u22650) (a : \u2115 \u2192 \u03a9 \u2192 \u211d),\n \u03c4 0 = 0 \u2227 StrictMonoOn \u03c4 (Iic n) \u2227\n (\u2200 j < n, StronglyMeasurable[\u2131 (\u03c4 j)] (a j)) \u2227\n (\u2200 j < n, \u2200 \u03c9, \u2016a j \u03c9\u2016 \u2264 K) \u2227\n eLpNorm (fun p \u21a6 simpleHolding \u03c4 n a p.1 p.2 - H p.1 p.2) 2 \u03bc < \u03b5 := by\n let : MeasurableSpace (\u211d\u22650 \u00d7 \u03a9) := \u2131.predictable\n by_cases hK : 0 \u2264 K\n swap\n \u00b7 -- A negative bound can occur only for the zero measure; use the empty grid.\n have h\u03bc : \u03bc = 0 := by\n by_contra hn\n have : NeZero \u03bc := \u27e8hn\u27e9\n obtain \u27e8p, hp\u27e9 := hbound.exists\n exact hK ((norm_nonneg _).trans hp)\n refine \u27e80, fun _ \u21a6 0, 0, rfl, ?_, by simp, by simp, ?_\u27e9\n \u00b7 intro i hi j hj hij\n simp only [mem_Iic, nonpos_iff_eq_zero] at hi hj\n omega\n \u00b7 simpa [h\u03bc] using h\u03b5\n obtain \u27e8n, \u03c4, a, C, h\u03c4\u2080, h\u03c4, ha, -, herr\u27e9 :=\n \u2131.exists_simpleHolding_eLpNorm_sub_lt \u03bc hfin hzero hH\u2082 h\u03b5\n let clip (x : \u211d) : \u211d := Set.projIcc (-K) K (neg_le_self hK) x\n have hclip : Continuous clip := continuous_subtypeVal.comp continuous_projIcc\n have hclip\u2080 : clip 0 = 0 := by simp [clip, Set.projIcc, hK, neg_nonpos.mpr hK]\n refine \u27e8n, \u03c4, fun j \u03c9 \u21a6 clip (a j \u03c9), h\u03c4\u2080, h\u03c4,\n fun j hj \u21a6 hclip.comp_stronglyMeasurable (ha j hj), ?_, ?_\u27e9\n \u00b7 intro j _ \u03c9\n exact Real.norm_eq_abs _ \u25b8 abs_le.mpr (Set.projIcc _ _ _ _).property\n \u00b7 have hm : AEStronglyMeasurable (fun p \u21a6\n simpleHolding \u03c4 n (fun j \u03c9 \u21a6 clip (a j \u03c9)) p.1 p.2 - H p.1 p.2) \u03bc :=\n (isStronglyPredictable_simpleHolding (\u2131 := \u2131)\n (fun j hj \u21a6 hclip.comp_stronglyMeasurable (ha j hj))).aestronglyMeasurable.sub\n hH\u2082.aestronglyMeasurable\n refine (eLpNorm_mono_ae hm ?_).trans_lt herr\n filter_upwards [hbound] with p hp\n rw [simpleHolding_comp hclip\u2080 h\u03c4.monotoneOn]\n have hp' : H p.1 p.2 \u2208 Icc (-K) K := abs_le.mp (by simpa using hp)\n have hdist := (LipschitzWith.projIcc (neg_le_self hK)).dist_le_mul\n (simpleHolding \u03c4 n a p.1 p.2) (H p.1 p.2)\n simpa only [Set.projIcc_of_mem _ hp', Subtype.dist_eq, Real.dist_eq, NNReal.coe_one,\n one_mul, Real.norm_eq_abs, clip] using hdist\n\n/-- Bound-preserving grid approximation for a finite ambient product-space measure without\ninitial-time mass. Predictability and boundedness supply square integrability internally. -/\ntheorem exists_simpleHolding_eLpNorm_sub_lt_of_isStronglyPredictable_of_bound\n (\u03bd : Measure (\u211d\u22650 \u00d7 \u03a9)) [IsFiniteMeasure \u03bd]\n (hzero : \u03bd ({0} \u00d7\u02e2 (univ : Set \u03a9)) = 0)\n {H : \u211d\u22650 \u2192 \u03a9 \u2192 \u211d} (hH : IsStronglyPredictable \u2131 H)\n {K : \u211d} (hbound : \u2200\u1d50 p \u2202\u03bd, \u2016H p.1 p.2\u2016 \u2264 K)\n {\u03b5 : \u211d\u22650\u221e} (h\u03b5 : 0 < \u03b5) :\n \u2203 (n : \u2115) (\u03c4 : \u2115 \u2192 \u211d\u22650) (a : \u2115 \u2192 \u03a9 \u2192 \u211d),\n \u03c4 0 = 0 \u2227 StrictMonoOn \u03c4 (Iic n) \u2227\n (\u2200 j < n, StronglyMeasurable[\u2131 (\u03c4 j)] (a j)) \u2227\n (\u2200 j < n, \u2200 \u03c9, \u2016a j \u03c9\u2016 \u2264 K) \u2227\n eLpNorm (fun p \u21a6 simpleHolding \u03c4 n a p.1 p.2 - H p.1 p.2) 2 \u03bd < \u03b5 := by\n have hset : MeasurableSet[\u2131.predictable] ({0} \u00d7\u02e2 (univ : Set \u03a9)) := by\n simpa only [NNReal.bot_eq_zero] using\n measurableSet_predictable_singleton_bot_prod (\ud835\udcd5 := \u2131) MeasurableSet.univ\n have hb := StronglyMeasurable.ae_le_trim_of_stronglyMeasurable\n \u2131.predictable_le_prod hH.norm stronglyMeasurable_const hbound\n obtain \u27e8n, \u03c4, a, h\u03c4\u2080, h\u03c4, ha, hbound', herr\u27e9 :=\n \u2131.exists_simpleHolding_eLpNorm_sub_lt_of_bound (\u03bd.trim \u2131.predictable_le_prod)\n (fun _ _ _ _ \u21a6 measure_ne_top _ _) ((trim_measurableSet_eq _ hset).trans hzero)\n (MemLp.of_bound hH.aestronglyMeasurable K hb) hb h\u03b5\n refine \u27e8n, \u03c4, a, h\u03c4\u2080, h\u03c4, ha, hbound', ?_\u27e9\n have hs : StronglyMeasurable[\u2131.predictable]\n (fun p \u21a6 simpleHolding \u03c4 n a p.1 p.2 - H p.1 p.2) :=\n (isStronglyPredictable_simpleHolding (\u2131 := \u2131) ha).sub hH\n rwa [eLpNorm_trim \u2131.predictable_le_prod hs] at herr\n\n/-- Finite-horizon time-product form of bound-preserving grid approximation.\nIn particular a bounded predictable Brownian drift has elementary approximations with a\ncommon height bound, rather than a bound growing with the accuracy. -/\ntheorem exists_simpleHolding_eLpNorm_sub_lt_timeMeasure_of_bound\n (P : Measure \u03a9) [IsFiniteMeasure P] (T : \u211d\u22650)\n {H : \u211d\u22650 \u2192 \u03a9 \u2192 \u211d} (hH : IsStronglyPredictable \u2131 H)\n {K : \u211d} (hbound : \u2200\u1d50 p \u2202(TauCeti.Probability.timeMeasure T).prod P, \u2016H p.1 p.2\u2016 \u2264 K)\n {\u03b5 : \u211d\u22650\u221e} (h\u03b5 : 0 < \u03b5) :\n \u2203 (n : \u2115) (\u03c4 : \u2115 \u2192 \u211d\u22650) (a : \u2115 \u2192 \u03a9 \u2192 \u211d),\n \u03c4 0 = 0 \u2227 StrictMonoOn \u03c4 (Iic n) \u2227\n (\u2200 j < n, StronglyMeasurable[\u2131 (\u03c4 j)] (a j)) \u2227\n (\u2200 j < n, \u2200 \u03c9, \u2016a j \u03c9\u2016 \u2264 K) \u2227\n eLpNorm (fun p \u21a6 simpleHolding \u03c4 n a p.1 p.2 - H p.1 p.2) 2\n ((TauCeti.Probability.timeMeasure T).prod P) < \u03b5 := by\n apply \u2131.exists_simpleHolding_eLpNorm_sub_lt_of_isStronglyPredictable_of_bound\n _ _ hH hbound h\u03b5\n simp [Measure.prod_prod]\n\n/-- A predictable square-integrable target has finite-grid L\u00b2 approximations with the same\nbound on every height, for any measure finite on predictable rectangles with no mass at zero. -/\ntheorem exists_seq_simpleHolding_tendsto_eLpNorm_of_bound\n (\u03bc : @Measure (\u211d\u22650 \u00d7 \u03a9) \u2131.predictable)\n (hfin : \u2200 s t A, MeasurableSet[\u2131 s] A \u2192 \u03bc (Ioc s t \u00d7\u02e2 A) \u2260 \u221e)\n (hzero : \u03bc ({0} \u00d7\u02e2 (univ : Set \u03a9)) = 0)\n {H : \u211d\u22650 \u2192 \u03a9 \u2192 \u211d} (hH\u2082 : MemLp (Function.uncurry H) 2 \u03bc)\n {K : \u211d} (hbound : \u2200\u1d50 p \u2202\u03bc, \u2016H p.1 p.2\u2016 \u2264 K) :\n \u2203 (n : \u2115 \u2192 \u2115) (\u03c4 : \u2115 \u2192 \u2115 \u2192 \u211d\u22650) (a : \u2115 \u2192 \u2115 \u2192 \u03a9 \u2192 \u211d),\n (\u2200 m, \u03c4 m 0 = 0) \u2227 (\u2200 m, StrictMonoOn (\u03c4 m) (Iic (n m))) \u2227\n (\u2200 m j, j < n m \u2192 StronglyMeasurable[\u2131 (\u03c4 m j)] (a m j)) \u2227\n (\u2200 m j, j < n m \u2192 \u2200 \u03c9, \u2016a m j \u03c9\u2016 \u2264 K) \u2227\n Tendsto (fun m \u21a6 eLpNorm\n (fun p \u21a6 simpleHolding (\u03c4 m) (n m) (a m) p.1 p.2 - H p.1 p.2) 2 \u03bc)\n atTop (\ud835\udcdd 0) := by\n have hex (m : \u2115) := \u2131.exists_simpleHolding_eLpNorm_sub_lt_of_bound \u03bc hfin hzero hH\u2082\n hbound (\u03b5 := (m : \u211d\u22650\u221e)\u207b\u00b9) (ENNReal.inv_pos.mpr (ENNReal.natCast_ne_top m))\n choose n \u03c4 a h\u03c4\u2080 h\u03c4 ha hb herr using hex\n refine \u27e8n, \u03c4, a, h\u03c4\u2080, h\u03c4, ha, hb, ?_\u27e9\n exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds\n ENNReal.tendsto_inv_nat_nhds_zero (fun _ \u21a6 bot_le) (fun m \u21a6 (herr m).le)\n\n/-- For a finite ambient measure without initial-time mass, a bounded strongly predictable\nprocess is an L\u00b2 limit of finite-grid holdings with the same bound on every height. -/\ntheorem exists_seq_simpleHolding_tendsto_eLpNorm_of_isStronglyPredictable_of_bound\n (\u03bd : Measure (\u211d\u22650 \u00d7 \u03a9)) [IsFiniteMeasure \u03bd]\n (hzero : \u03bd ({0} \u00d7\u02e2 (univ : Set \u03a9)) = 0)\n {H : \u211d\u22650 \u2192 \u03a9 \u2192 \u211d} (hH : IsStronglyPredictable \u2131 H)\n {K : \u211d} (hbound : \u2200\u1d50 p \u2202\u03bd, \u2016H p.1 p.2\u2016 \u2264 K) :\n \u2203 (n : \u2115 \u2192 \u2115) (\u03c4 : \u2115 \u2192 \u2115 \u2192 \u211d\u22650) (a : \u2115 \u2192 \u2115 \u2192 \u03a9 \u2192 \u211d),\n (\u2200 m, \u03c4 m 0 = 0) \u2227 (\u2200 m, StrictMonoOn (\u03c4 m) (Iic (n m))) \u2227\n (\u2200 m j, j < n m \u2192 StronglyMeasurable[\u2131 (\u03c4 m j)] (a m j)) \u2227\n (\u2200 m j, j < n m \u2192 \u2200 \u03c9, \u2016a m j \u03c9\u2016 \u2264 K) \u2227\n Tendsto (fun m \u21a6 eLpNorm\n (fun p \u21a6 simpleHolding (\u03c4 m) (n m) (a m) p.1 p.2 - H p.1 p.2) 2 \u03bd)\n atTop (\ud835\udcdd 0) := by\n have hset : MeasurableSet[\u2131.predictable] ({0} \u00d7\u02e2 (univ : Set \u03a9)) := by\n simpa only [NNReal.bot_eq_zero] using\n measurableSet_predictable_singleton_bot_prod (\ud835\udcd5 := \u2131) MeasurableSet.univ\n have hb := StronglyMeasurable.ae_le_trim_of_stronglyMeasurable\n \u2131.predictable_le_prod hH.norm stronglyMeasurable_const hbound\n obtain \u27e8n, \u03c4, a, h\u03c4\u2080, h\u03c4, ha, hb, hlim\u27e9 :=\n \u2131.exists_seq_simpleHolding_tendsto_eLpNorm_of_bound (\u03bd.trim \u2131.predictable_le_prod)\n (fun _ _ _ _ \u21a6 measure_ne_top _ _) ((trim_measurableSet_eq _ hset).trans hzero)\n (MemLp.of_bound hH.aestronglyMeasurable K hb) hb\n refine \u27e8n, \u03c4, a, h\u03c4\u2080, h\u03c4, ha, hb, hlim.congr fun m \u21a6 ?_\u27e9\n exact eLpNorm_trim \u2131.predictable_le_prod\n ((isStronglyPredictable_simpleHolding (\u2131 := \u2131) (ha m)).sub hH)\n\n/-- A bounded predictable process has a sequence of finite-grid energy approximations on a\nfixed finite horizon with the same bound on every height of every approximant. No moment\nhypothesis on the process is needed beyond its deterministic bound. -/\ntheorem exists_seq_simpleHolding_tendsto_eLpNorm_timeMeasure_of_bound\n (P : Measure \u03a9) [IsFiniteMeasure P] (T : \u211d\u22650)\n {H : \u211d\u22650 \u2192 \u03a9 \u2192 \u211d} (hH : IsStronglyPredictable \u2131 H)\n {K : \u211d} (hbound : \u2200\u1d50 p \u2202(TauCeti.Probability.timeMeasure T).prod P, \u2016H p.1 p.2\u2016 \u2264 K) :\n \u2203 (n : \u2115 \u2192 \u2115) (\u03c4 : \u2115 \u2192 \u2115 \u2192 \u211d\u22650) (a : \u2115 \u2192 \u2115 \u2192 \u03a9 \u2192 \u211d),\n (\u2200 m, \u03c4 m 0 = 0) \u2227 (\u2200 m, StrictMonoOn (\u03c4 m) (Iic (n m))) \u2227\n (\u2200 m j, j < n m \u2192 StronglyMeasurable[\u2131 (\u03c4 m j)] (a m j)) \u2227\n (\u2200 m j, j < n m \u2192 \u2200 \u03c9, \u2016a m j \u03c9\u2016 \u2264 K) \u2227\n Tendsto (fun m \u21a6 eLpNorm\n (fun p \u21a6 simpleHolding (\u03c4 m) (n m) (a m) p.1 p.2 - H p.1 p.2) 2\n ((TauCeti.Probability.timeMeasure T).prod P)) atTop (\ud835\udcdd 0) := by\n apply \u2131.exists_seq_simpleHolding_tendsto_eLpNorm_of_isStronglyPredictable_of_bound\n _ _ hH hbound\n simp [Measure.prod_prod]\n\nend MeasureTheory.Filtration\n", "public_theorems": ["MeasureTheory.Filtration.exists_simpleHolding_eLpNorm_sub_lt_of_bound", "MeasureTheory.Filtration.exists_simpleHolding_eLpNorm_sub_lt_of_isStronglyPredictable_of_bound", "MeasureTheory.Filtration.exists_simpleHolding_eLpNorm_sub_lt_timeMeasure_of_bound", "MeasureTheory.Filtration.exists_seq_simpleHolding_tendsto_eLpNorm_of_bound", "MeasureTheory.Filtration.exists_seq_simpleHolding_tendsto_eLpNorm_of_isStronglyPredictable_of_bound", "MeasureTheory.Filtration.exists_seq_simpleHolding_tendsto_eLpNorm_timeMeasure_of_bound"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Probability.Finance.SimpleStrategy.Approximation\nimport Mathlib.Topology.MetricSpace.Lipschitz\n\n/-!\n# Bound-preserving predictable grid approximation\n\nA predictable square-integrable process bounded almost everywhere by `K` admits finite-grid\napproximations whose left-endpoint-measurable heights are all bounded by the same `K`.\nThe heights satisfy this bound everywhere, even if the original bound holds only almost\neverywhere. For `K \u2265 0` the holding processes are therefore bounded by `K` at every time.\nA negative bound forces the zero measure and is handled by an empty grid.\nThe grid may depend on the approximation accuracy.\n\nThis strengthens energy density by controlling the heights uniformly across approximations.\nFor exponential Brownian likelihoods this is essential: their second-moment estimate depends\nexponentially on the squared height bound, so a separate bound for each approximant does not\nsupply uniform integrability. No Brownian motion or usual filtration conditions are needed\nfor the approximation itself.\n\nThe construction clips the heights of the existing finite-grid energy approximations using\n`Set.projIcc`. Its native nonexpansiveness ensures that clipping cannot increase the error\nagainst a target already lying in the interval. No stochastic integral or density measure is\nconstructed here.\n\n## References\n\n* I. Karatzas and S. E. Shreve, *Brownian Motion and Stochastic Calculus*, second edition,\n Springer, 1991, \u00a7\u00a73.2 and 3.5.\n-/\n\npublic section\n\nnoncomputable section\n\nopen MeasureTheory Set Filter TauCeti.Finance\nopen scoped ENNReal NNReal Topology\n\nnamespace MeasureTheory.Filtration\n\nvariable {\u03a9 : Type*} {m\u03a9 : MeasurableSpace \u03a9} (\u2131 : Filtration \u211d\u22650 m\u03a9)", "/-- Finite-grid L\u00b2 density preserving a prescribed almost-everywhere bound on the target.\nThe heights satisfy the bound everywhere and are measurable at the left endpoints.\nThe measure need only be finite on predictable rectangles and have no mass at time zero. -/\ntheorem exists_simpleHolding_eLpNorm_sub_lt_of_bound\n (\u03bc : @Measure (\u211d\u22650 \u00d7 \u03a9) \u2131.predictable)\n (hfin : \u2200 s t A, MeasurableSet[\u2131 s] A \u2192 \u03bc (Ioc s t \u00d7\u02e2 A) \u2260 \u221e)\n (hzero : \u03bc ({0} \u00d7\u02e2 (univ : Set \u03a9)) = 0)\n {H : \u211d\u22650 \u2192 \u03a9 \u2192 \u211d} (hH\u2082 : MemLp (Function.uncurry H) 2 \u03bc)\n {K : \u211d} (hbound : \u2200\u1d50 p \u2202\u03bc, \u2016H p.1 p.2\u2016 \u2264 K)\n {\u03b5 : \u211d\u22650\u221e} (h\u03b5 : 0 < \u03b5) :\n \u2203 (n : \u2115) (\u03c4 : \u2115 \u2192 \u211d\u22650) (a : \u2115 \u2192 \u03a9 \u2192 \u211d),\n \u03c4 0 = 0 \u2227 StrictMonoOn \u03c4 (Iic n) \u2227\n (\u2200 j < n, StronglyMeasurable[\u2131 (\u03c4 j)] (a j)) \u2227\n (\u2200 j < n, \u2200 \u03c9, \u2016a j \u03c9\u2016 \u2264 K) \u2227\n eLpNorm (fun p \u21a6 simpleHolding \u03c4 n a p.1 p.2 - H p.1 p.2) 2 \u03bc < \u03b5 :=", "/-- Bound-preserving grid approximation for a finite ambient product-space measure without\ninitial-time mass. Predictability and boundedness supply square integrability internally. -/\ntheorem exists_simpleHolding_eLpNorm_sub_lt_of_isStronglyPredictable_of_bound\n (\u03bd : Measure (\u211d\u22650 \u00d7 \u03a9)) [IsFiniteMeasure \u03bd]\n (hzero : \u03bd ({0} \u00d7\u02e2 (univ : Set \u03a9)) = 0)\n {H : \u211d\u22650 \u2192 \u03a9 \u2192 \u211d} (hH : IsStronglyPredictable \u2131 H)\n {K : \u211d} (hbound : \u2200\u1d50 p \u2202\u03bd, \u2016H p.1 p.2\u2016 \u2264 K)\n {\u03b5 : \u211d\u22650\u221e} (h\u03b5 : 0 < \u03b5) :\n \u2203 (n : \u2115) (\u03c4 : \u2115 \u2192 \u211d\u22650) (a : \u2115 \u2192 \u03a9 \u2192 \u211d),\n \u03c4 0 = 0 \u2227 StrictMonoOn \u03c4 (Iic n) \u2227\n (\u2200 j < n, StronglyMeasurable[\u2131 (\u03c4 j)] (a j)) \u2227\n (\u2200 j < n, \u2200 \u03c9, \u2016a j \u03c9\u2016 \u2264 K) \u2227\n eLpNorm (fun p \u21a6 simpleHolding \u03c4 n a p.1 p.2 - H p.1 p.2) 2 \u03bd < \u03b5 :=", "/-- Finite-horizon time-product form of bound-preserving grid approximation.\nIn particular a bounded predictable Brownian drift has elementary approximations with a\ncommon height bound, rather than a bound growing with the accuracy. -/\ntheorem exists_simpleHolding_eLpNorm_sub_lt_timeMeasure_of_bound\n (P : Measure \u03a9) [IsFiniteMeasure P] (T : \u211d\u22650)\n {H : \u211d\u22650 \u2192 \u03a9 \u2192 \u211d} (hH : IsStronglyPredictable \u2131 H)\n {K : \u211d} (hbound : \u2200\u1d50 p \u2202(TauCeti.Probability.timeMeasure T).prod P, \u2016H p.1 p.2\u2016 \u2264 K)\n {\u03b5 : \u211d\u22650\u221e} (h\u03b5 : 0 < \u03b5) :\n \u2203 (n : \u2115) (\u03c4 : \u2115 \u2192 \u211d\u22650) (a : \u2115 \u2192 \u03a9 \u2192 \u211d),\n \u03c4 0 = 0 \u2227 StrictMonoOn \u03c4 (Iic n) \u2227\n (\u2200 j < n, StronglyMeasurable[\u2131 (\u03c4 j)] (a j)) \u2227\n (\u2200 j < n, \u2200 \u03c9, \u2016a j \u03c9\u2016 \u2264 K) \u2227\n eLpNorm (fun p \u21a6 simpleHolding \u03c4 n a p.1 p.2 - H p.1 p.2) 2\n ((TauCeti.Probability.timeMeasure T).prod P) < \u03b5 :=", "/-- A predictable square-integrable target has finite-grid L\u00b2 approximations with the same\nbound on every height, for any measure finite on predictable rectangles with no mass at zero. -/\ntheorem exists_seq_simpleHolding_tendsto_eLpNorm_of_bound\n (\u03bc : @Measure (\u211d\u22650 \u00d7 \u03a9) \u2131.predictable)\n (hfin : \u2200 s t A, MeasurableSet[\u2131 s] A \u2192 \u03bc (Ioc s t \u00d7\u02e2 A) \u2260 \u221e)\n (hzero : \u03bc ({0} \u00d7\u02e2 (univ : Set \u03a9)) = 0)\n {H : \u211d\u22650 \u2192 \u03a9 \u2192 \u211d} (hH\u2082 : MemLp (Function.uncurry H) 2 \u03bc)\n {K : \u211d} (hbound : \u2200\u1d50 p \u2202\u03bc, \u2016H p.1 p.2\u2016 \u2264 K) :\n \u2203 (n : \u2115 \u2192 \u2115) (\u03c4 : \u2115 \u2192 \u2115 \u2192 \u211d\u22650) (a : \u2115 \u2192 \u2115 \u2192 \u03a9 \u2192 \u211d),\n (\u2200 m, \u03c4 m 0 = 0) \u2227 (\u2200 m, StrictMonoOn (\u03c4 m) (Iic (n m))) \u2227\n (\u2200 m j, j < n m \u2192 StronglyMeasurable[\u2131 (\u03c4 m j)] (a m j)) \u2227\n (\u2200 m j, j < n m \u2192 \u2200 \u03c9, \u2016a m j \u03c9\u2016 \u2264 K) \u2227\n Tendsto (fun m \u21a6 eLpNorm\n (fun p \u21a6 simpleHolding (\u03c4 m) (n m) (a m) p.1 p.2 - H p.1 p.2) 2 \u03bc)\n atTop (\ud835\udcdd 0) :=", "/-- For a finite ambient measure without initial-time mass, a bounded strongly predictable\nprocess is an L\u00b2 limit of finite-grid holdings with the same bound on every height. -/\ntheorem exists_seq_simpleHolding_tendsto_eLpNorm_of_isStronglyPredictable_of_bound\n (\u03bd : Measure (\u211d\u22650 \u00d7 \u03a9)) [IsFiniteMeasure \u03bd]\n (hzero : \u03bd ({0} \u00d7\u02e2 (univ : Set \u03a9)) = 0)\n {H : \u211d\u22650 \u2192 \u03a9 \u2192 \u211d} (hH : IsStronglyPredictable \u2131 H)\n {K : \u211d} (hbound : \u2200\u1d50 p \u2202\u03bd, \u2016H p.1 p.2\u2016 \u2264 K) :\n \u2203 (n : \u2115 \u2192 \u2115) (\u03c4 : \u2115 \u2192 \u2115 \u2192 \u211d\u22650) (a : \u2115 \u2192 \u2115 \u2192 \u03a9 \u2192 \u211d),\n (\u2200 m, \u03c4 m 0 = 0) \u2227 (\u2200 m, StrictMonoOn (\u03c4 m) (Iic (n m))) \u2227\n (\u2200 m j, j < n m \u2192 StronglyMeasurable[\u2131 (\u03c4 m j)] (a m j)) \u2227\n (\u2200 m j, j < n m \u2192 \u2200 \u03c9, \u2016a m j \u03c9\u2016 \u2264 K) \u2227\n Tendsto (fun m \u21a6 eLpNorm\n (fun p \u21a6 simpleHolding (\u03c4 m) (n m) (a m) p.1 p.2 - H p.1 p.2) 2 \u03bd)\n atTop (\ud835\udcdd 0) :=", "/-- A bounded predictable process has a sequence of finite-grid energy approximations on a\nfixed finite horizon with the same bound on every height of every approximant. No moment\nhypothesis on the process is needed beyond its deterministic bound. -/\ntheorem exists_seq_simpleHolding_tendsto_eLpNorm_timeMeasure_of_bound\n (P : Measure \u03a9) [IsFiniteMeasure P] (T : \u211d\u22650)\n {H : \u211d\u22650 \u2192 \u03a9 \u2192 \u211d} (hH : IsStronglyPredictable \u2131 H)\n {K : \u211d} (hbound : \u2200\u1d50 p \u2202(TauCeti.Probability.timeMeasure T).prod P, \u2016H p.1 p.2\u2016 \u2264 K) :\n \u2203 (n : \u2115 \u2192 \u2115) (\u03c4 : \u2115 \u2192 \u2115 \u2192 \u211d\u22650) (a : \u2115 \u2192 \u2115 \u2192 \u03a9 \u2192 \u211d),\n (\u2200 m, \u03c4 m 0 = 0) \u2227 (\u2200 m, StrictMonoOn (\u03c4 m) (Iic (n m))) \u2227\n (\u2200 m j, j < n m \u2192 StronglyMeasurable[\u2131 (\u03c4 m j)] (a m j)) \u2227\n (\u2200 m j, j < n m \u2192 \u2200 \u03c9, \u2016a m j \u03c9\u2016 \u2264 K) \u2227\n Tendsto (fun m \u21a6 eLpNorm\n (fun p \u21a6 simpleHolding (\u03c4 m) (n m) (a m) p.1 p.2 - H p.1 p.2) 2\n ((TauCeti.Probability.timeMeasure T).prod P)) atTop (\ud835\udcdd 0) :=", "end MeasureTheory.Filtration"], "free_length": 3731, "file_length": 7516, "heartbeats": 6065, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.RingTheory.Dagger.FaithfullyFlat", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/RingTheory/Dagger/FaithfullyFlat.lean", "module": "TauCeti.RingTheory.Dagger.FaithfullyFlat", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.RingTheory.Dagger.MaximalSpectrum\npublic import Mathlib.RingTheory.RingHom.FaithfullyFlat\n\nimport TauCeti.RingTheory.Affinoid.Polyradius\nimport TauCeti.RingTheory.Affinoid.PowerBounded\nimport TauCeti.RingTheory.Affinoid.Restricted\nimport TauCeti.RingTheory.Flat.QuotientPow\nimport TauCeti.RingTheory.MvPowerSeries.TateAlgebra.Groebner\n\n/-!\n# The Tate algebra is faithfully flat over the Monsky\u2013Washnitzer algebra\n\nLet `K` be a complete nontrivially normed ultrametric field, `T = K\u27e8X\u2081, \u2026, X\u2099\u27e9` the Tate algebra\nand `W = K\u27e8X\u2081, \u2026, X\u2099\u27e9\u2020` the Monsky\u2013Washnitzer algebra. This file shows that the inclusion\n`W \u2192 T` is faithfully flat.\n\nThe heart of the matter is that `W` and `T` have the same finite quotients: for every ideal `J`\nof `W` of finite codimension, `J T \u2229 W = J` and `W \u29f8 J \u2192 T \u29f8 J T` is bijective. Surjectivity was\nalready known from the density of `W` in `T`. For injectivity we construct a retraction\n`T \u2192 W \u29f8 J` of `W \u2192 W \u29f8 J`.\n\n* For every radius `\u03c1 > 1` the restricted series `K{X/\u03c1}` lie in `W`, and they surject onto\n `W \u29f8 J` because the polynomials already do. When some power `\u03c1 ^ m` lies in `|K\u00d7|`, for\n instance `\u03c1 = \u2016c\u2016 ^ (1 / m)` with `\u2016c\u2016 > 1`, the algebra `K{X/\u03c1}` is affinoid. So `W \u29f8 J` is a\n quotient of an affinoid algebra, and it inherits a complete ultrametric residue norm.\n* For each such affinoid radius `\u03c1`, the class of each variable `X\u1d62` in `W \u29f8 J` has supremum\n seminorm at most `\u03c1`, since homomorphisms of affinoid algebras contract the supremum seminorm.\n These radii come arbitrarily close to `1`, so the seminorm is at most `1`.\n It is therefore power-bounded, and the universal property of `T` gives a continuous\n homomorphism `T \u2192 W \u29f8 J` sending `X\u1d62` to its class.\n* Composed with `W \u2192 T`, this homomorphism agrees with the projection `W \u2192 W \u29f8 J` on the\n variables, so it is the projection: homomorphisms from `W` into a finite-dimensional algebra\n are determined by the variables (`washnitzerAlgebra.algHom_ext_of_isIntegral`).\n\nTaking `J = \ud835\udd2a ^ k` for the maximal ideals `\ud835\udd2a` of `W`, the infinitesimal neighbourhoods of `W` and\n`T` at every classical point agree, which gives flatness by\n`Module.Flat.of_bijective_quotientMap_pow`. Faithfulness holds because every maximal ideal of `W`\ngenerates a maximal ideal of `T`.\n\n## Main results\n\n* `TauCeti.Dagger.washnitzerAlgebra.quotientMap_map_toTate_bijective`: for every ideal `J` of\n finite codimension, the map `W \u29f8 J \u2192 T \u29f8 J T` is bijective.\n* `TauCeti.Dagger.washnitzerAlgebra.faithfullyFlat_toTate`: `W \u2192 T` is faithfully flat.\n* `Ideal.comap_map_toTate`: every ideal `J` of `W` satisfies `J T \u2229 W = J`.\n\n## References\n\n* E. Grosse-Kl\u00f6nne, *Rigid analytic spaces with overconvergent structure sheaf*,\n J. reine angew. Math. 519 (2000), \u00a71, Proposition 1.5 and its proof.\n* [Bosch, G\u00fcntzer, Remmert, *Non-Archimedean Analysis*][bosch-guntzer-remmert], \u00a7\u00a76.1.1 and\n 6.2.3, for the universal property of Tate algebras and power-bounded elements.\n-/\n\npublic section\n\nnamespace TauCeti.Dagger.washnitzerAlgebra\n\nopen _root_.MvPowerSeries\n\nvariable {K \u03c3 : Type*} [NontriviallyNormedField K] [IsUltrametricDist K] [CompleteSpace K]\n [Finite \u03c3]\n\nlocal notation \"W \" \u03c3:max => washnitzerAlgebra \u03c3 K\nlocal notation \"T \" \u03c3:max => IsRestricted.subring (R := K) (fun _ : \u03c3 \u21a6 (1 : \u211d))\nlocal notation \"T[\" \u03c1 \"] \" \u03c3:max => IsRestricted.subring (R := K) (fun _ : \u03c3 \u21a6 \u03c1)\n\n/-- For a radius `\u03c1 > 1`, every class of a finite quotient `W \u29f8 J` is represented by a series\nrestricted at `\u03c1`, since it is represented by a polynomial. -/\nprivate theorem surjective_mk\u2090_comp_ofRestricted (J : Ideal (W \u03c3))\n [Module.Finite K (W \u03c3 \u29f8 J)] {\u03c1 : \u211d} (h\u03c1 : 1 < \u03c1) :\n Function.Surjective\n ((Ideal.Quotient.mk\u2090 K J).comp (ofRestricted (\u03c3 := \u03c3) h\u03c1 fun _ \u21a6 le_rfl)) := by\n have : Algebra.IsIntegral K (W \u03c3 \u29f8 J) := Algebra.IsIntegral.of_finite K _\n intro x\n obtain \u27e8p, rfl\u27e9 := surjective_mk\u2090_comp_ofMvPolynomial J x\n refine \u27e8TauCeti.MvPowerSeries.polynomialToRestricted (fun _ \u21a6 \u03c1) p, ?_\u27e9\n simp only [AlgHom.comp_apply]\n congr 1\n exact Subtype.ext (by simp [TauCeti.MvPowerSeries.coe_polynomialToRestricted])\n\n/-- In an affinoid model `S` of a finite quotient `W \u29f8 J`, the class of every variable has\nsupremum seminorm at most `1`: it is the image of the variable of `K{X/r}` for radii `r > 1`\narbitrarily close to `1`. -/\nprivate theorem supSeminorm_le_one (J : Ideal (W \u03c3)) {S : Type*}\n [CommRing S] [Algebra K S] (hS : IsAffinoidAlgebra K S) (e : (W \u03c3 \u29f8 J) \u2243\u2090[K] S) (i : \u03c3) :\n supSeminorm K (e (Ideal.Quotient.mk J (X \u03c3 K i))) \u2264 1 := by\n obtain \u27e8c, hc\u27e9 := NormedField.exists_one_lt_norm K\n have h\u03c10 : 0 < \u2016c\u2016 := zero_lt_one.trans hc\n -- For `m \u2260 0`, the radius `r = \u2016c\u2016 ^ (1 / m)` is affinoid and bounds the seminorm.\n have key (m : \u2115) (hm : m \u2260 0) :\n supSeminorm K (e (Ideal.Quotient.mk J (X \u03c3 K i))) ^ m \u2264 \u2016c\u2016 := by\n have hr : 1 < \u2016c\u2016 ^ (m : \u211d)\u207b\u00b9 := Real.one_lt_rpow hc (by positivity)\n have : Fact (0 < \u2016c\u2016 ^ (m : \u211d)\u207b\u00b9) := \u27e8zero_lt_one.trans hr\u27e9\n have hT : IsAffinoidAlgebra K (T[\u2016c\u2016 ^ (m : \u211d)\u207b\u00b9] \u03c3) :=\n isAffinoidAlgebra_isRestricted_of_pow_eq_norm (r := fun _ : \u03c3 \u21a6 \u2016c\u2016 ^ (m : \u211d)\u207b\u00b9)\n fun _ \u21a6 \u27e8m, Nat.pos_of_ne_zero hm, Units.mk0 c (norm_pos_iff.mp h\u03c10),\n Real.rpow_inv_natCast_pow h\u03c10.le hm\u27e9\n let x : T[\u2016c\u2016 ^ (m : \u211d)\u207b\u00b9] \u03c3 := \u27e8_root_.MvPowerSeries.X i, isRestricted_X _ i\u27e9\n let \u03c6 : T[\u2016c\u2016 ^ (m : \u211d)\u207b\u00b9] \u03c3 \u2192\u2090[K] S :=\n e.toAlgHom.comp ((Ideal.Quotient.mk\u2090 K J).comp (ofRestricted hr fun _ \u21a6 le_rfl))\n have hx : ofRestricted hr (fun _ \u21a6 le_rfl) x = X \u03c3 K i :=\n Subtype.ext ((coe_ofRestricted hr _ x).trans (coe_X (R := K) i).symm)\n have h\u03c6 : \u03c6 x = e (Ideal.Quotient.mk J (X \u03c3 K i)) := by simp [\u03c6, hx]\n have h1 := hT.supSeminorm_map_le hS \u03c6 x\n have h2 := hT.supSeminorm_le_norm x\n rw [_root_.MvPowerSeries.norm_X] at h2\n rw [h\u03c6] at h1\n calc _ \u2264 (\u2016c\u2016 ^ (m : \u211d)\u207b\u00b9) ^ m := pow_le_pow_left\u2080 (supSeminorm_nonneg _) (h1.trans h2) m\n _ = \u2016c\u2016 := Real.rpow_inv_natCast_pow h\u03c10.le hm\n by_contra! h\n obtain \u27e8m, hm\u27e9 := pow_unbounded_of_one_lt \u2016c\u2016 h\n have hm0 : m \u2260 0 := by\n rintro rfl\n rw [pow_zero] at hm\n exact hm.not_gt hc\n exact (key m hm0).not_gt hm\n\n/-- Given a complete ultrametric normed affinoid model `S` of a finite quotient `W \u29f8 J`, the\nprojection `W \u2192 W \u29f8 J` extends along `W \u2192 T`, by the universal property of `T`. -/\nprivate theorem exists_algHom_comp_toTate_eq_of_algEquiv (J : Ideal (W \u03c3))\n [Module.Finite K (W \u03c3 \u29f8 J)] {S : Type*} [NormedCommRing S] [NormedAlgebra K S]\n [IsUltrametricDist S] [CompleteSpace S] (hS : IsAffinoidAlgebra K S)\n (e : (W \u03c3 \u29f8 J) \u2243\u2090[K] S) :\n \u2203 \u03c8 : T \u03c3 \u2192\u2090[K] W \u03c3 \u29f8 J, \u03c8.comp (toTate \u03c3 K) = Ideal.Quotient.mk\u2090 K J := by\n have : Algebra.IsIntegral K (W \u03c3 \u29f8 J) := Algebra.IsIntegral.of_finite K _\n -- Number the variables to apply the universal property of `K\u27e8X\u2081, \u2026, X\u2099\u27e9`.\n let e\u03c3 := Finite.equivFin \u03c3\n let b : Fin (Nat.card \u03c3) \u2192 S := fun j \u21a6 e (Ideal.Quotient.mk J (X \u03c3 K (e\u03c3.symm j)))\n have hb (j : Fin (Nat.card \u03c3)) : TauCeti.Huber.IsPowerBounded (b j) :=\n (hS.isPowerBounded_iff_supSeminorm_le_one).mpr (supSeminorm_le_one J hS e _)\n let \u03c8\u2080 := isAffinoidAlgebra_self.restrictedLift hS (Algebra.ofId K S) hb\n let ren : T \u03c3 \u2243\u2090[K] T (Fin (Nat.card \u03c3)) := IsRestricted.renameAlgEquiv e\u03c3 (fun _ \u21a6 1)\n refine \u27e8e.symm.toAlgHom.comp (\u03c8\u2080.comp ren.toAlgHom), algHom_ext_of_isIntegral fun i \u21a6 ?_\u27e9\n have hren : ren (toTate \u03c3 K (X \u03c3 K i)) =\n \u27e8_root_.MvPowerSeries.X (e\u03c3 i), isRestricted_X _ (e\u03c3 i)\u27e9 :=\n Subtype.ext <| (IsRestricted.coe_renameAlgEquiv e\u03c3 (fun _ \u21a6 (1 : \u211d)) _).trans <| by\n simp [rename_X]\n have h\u03c8\u2080 : \u03c8\u2080 (ren (toTate \u03c3 K (X \u03c3 K i))) = b (e\u03c3 i) := by\n rw [hren]\n exact IsAffinoidAlgebra.restrictedLift_X _ hS _ hb _\n simpa [b] using congrArg e.symm h\u03c8\u2080\n\n/-- **A retraction of the Tate algebra onto a finite quotient of `W`.** For an ideal `J` of `W` of\nfinite codimension, the projection `W \u2192 W \u29f8 J` extends along `W \u2192 T`. -/\nprivate theorem exists_algHom_comp_toTate_eq (J : Ideal (W \u03c3)) [Module.Finite K (W \u03c3 \u29f8 J)] :\n \u2203 \u03c8 : T \u03c3 \u2192\u2090[K] W \u03c3 \u29f8 J, \u03c8.comp (toTate \u03c3 K) = Ideal.Quotient.mk\u2090 K J := by\n -- `W \u29f8 J` is a quotient of the affinoid algebra `K{X/\u03c1}` for `\u03c1 = \u2016c\u2016 > 1`.\n obtain \u27e8c, hc\u27e9 := NormedField.exists_one_lt_norm K\n have h\u03c10 : 0 < \u2016c\u2016 := zero_lt_one.trans hc\n have : Fact (0 < \u2016c\u2016) := \u27e8h\u03c10\u27e9\n let \u03b8 := (Ideal.Quotient.mk\u2090 K J).comp (ofRestricted (\u03c3 := \u03c3) hc fun _ \u21a6 le_rfl)\n have hS : IsAffinoidAlgebra K (T[\u2016c\u2016] \u03c3 \u29f8 RingHom.ker \u03b8) :=\n (isAffinoidAlgebra_isRestricted_of_pow_eq_norm (r := fun _ : \u03c3 \u21a6 \u2016c\u2016) fun _ \u21a6\n \u27e81, one_pos, Units.mk0 c (norm_pos_iff.mp h\u03c10), pow_one _\u27e9).quotient _\n exact exists_algHom_comp_toTate_eq_of_algEquiv J hS\n (Ideal.quotientKerAlgEquivOfSurjective (surjective_mk\u2090_comp_ofRestricted J hc)).symm\n\n/-- **Finite quotients of the Monsky\u2013Washnitzer algebra and of the Tate algebra agree.** An ideal\n`J` of `W` whose quotient is finite-dimensional over `K` satisfies `J T \u2229 W = J`. -/\nprivate theorem comap_map_toTate_of_finite (J : Ideal (W \u03c3)) [Module.Finite K (W \u03c3 \u29f8 J)] :\n (J.map (toTate \u03c3 K)).comap (toTate \u03c3 K) = J := by\n refine le_antisymm (fun f hf \u21a6 ?_) Ideal.le_comap_map\n obtain \u27e8\u03c8, h\u03c8\u27e9 := exists_algHom_comp_toTate_eq J\n -- `\u03c8` kills `J T`, because it kills the image of `J`.\n have hker : J.map (toTate \u03c3 K) \u2264 RingHom.ker \u03c8 :=\n Ideal.map_le_iff_le_comap.mpr fun j hj \u21a6 by\n rw [Ideal.mem_comap, RingHom.mem_ker, \u2190 AlgHom.comp_apply, h\u03c8,\n Ideal.Quotient.mk\u2090_eq_mk, Ideal.Quotient.eq_zero_iff_mem]\n exact hj\n have := hker hf\n rwa [RingHom.mem_ker, \u2190 AlgHom.comp_apply, h\u03c8, Ideal.Quotient.mk\u2090_eq_mk,\n Ideal.Quotient.eq_zero_iff_mem] at this\n\n/-- **Finite quotients of the Monsky\u2013Washnitzer algebra are quotients of the Tate algebra.** For an\nideal `J` of `W` of finite codimension, the map `W \u29f8 J \u2192 T \u29f8 J T` is bijective. -/\ntheorem quotientMap_map_toTate_bijective (J : Ideal (W \u03c3)) [Module.Finite K (W \u03c3 \u29f8 J)] :\n Function.Bijective (Ideal.quotientMap\u2090 (J.map (toTate \u03c3 K)) (toTate \u03c3 K)\n Ideal.le_comap_map) := by\n refine \u27e8Ideal.quotientMap_injective' (H := Ideal.le_comap_map) (comap_map_toTate_of_finite J).le,\n fun y \u21a6 ?_\u27e9\n have : Module.Finite K (W \u03c3 \u29f8 (J.map (toTate \u03c3 K)).comap (toTate \u03c3 K)) := by\n rw [comap_map_toTate_of_finite]\n infer_instance\n obtain \u27e8x, hx\u27e9 := (quotientMap_toTate_bijective_of_finite (J.map (toTate \u03c3 K))).2 y\n obtain \u27e8f, rfl\u27e9 := Ideal.Quotient.mk_surjective x\n exact \u27e8Ideal.Quotient.mk J f, by simpa using hx\u27e9\n\n/-- The infinitesimal neighbourhoods of `W` and `T` at a maximal ideal `\ud835\udd2b` of `T` agree. -/\nprivate theorem quotientMap_map_pow_comap_toTate_bijective (\ud835\udd2b : Ideal (T \u03c3)) [\ud835\udd2b.IsMaximal]\n (k : \u2115) : Function.Bijective (Ideal.quotientMap ((\ud835\udd2b.comap (toTate \u03c3 K) ^ k).map (toTate \u03c3 K))\n (toTate \u03c3 K).toRingHom Ideal.le_comap_map) := by\n have : (\ud835\udd2b.comap (toTate \u03c3 K)).IsMaximal := isAffinoidAlgebra_tate.comap_isMaximal _ \ud835\udd2b\n have := finite_quotient_pow (\ud835\udd2b.comap (toTate \u03c3 K)) k\n exact quotientMap_map_toTate_bijective (\ud835\udd2b.comap (toTate \u03c3 K) ^ k)\n\n/-- **The Tate algebra is faithfully flat over the Monsky\u2013Washnitzer algebra.** -/\ntheorem faithfullyFlat_toTate : (toTate \u03c3 K).toRingHom.FaithfullyFlat := by\n have : IsNoetherianRing (T \u03c3) := TauCeti.MvPowerSeries.isNoetherianRing_isRestricted_subring\n -- After `algebraize`, `algebraMap (W \u03c3) (T \u03c3)` is `toTate \u03c3 K` by definition, so the statements\n -- about `toTate \u03c3 K` below are statements about the algebra structure.\n algebraize [(toTate \u03c3 K).toRingHom]\n have : Module.Flat (W \u03c3) (T \u03c3) := Module.Flat.of_bijective_quotientMap_pow fun \ud835\udd2b _ k \u21a6\n quotientMap_map_pow_comap_toTate_bijective \ud835\udd2b k\n refine (Module.FaithfullyFlat.iff_flat_and_proper_ideal _ _).mpr \u27e8this, fun I hI h \u21a6 ?_\u27e9\n -- A proper ideal lies in a maximal ideal `m`, and `m T` is a maximal ideal of `T`.\n obtain \u27e8m, hm, hIm\u27e9 := I.exists_le_maximal hI\n rw [Ideal.smul_top_eq_map, Submodule.restrictScalars_eq_top_iff] at h\n have h' : I.map (toTate \u03c3 K) = \u22a4 := h\n exact (isMaximal_map_toTate m).ne_top (top_le_iff.mp (h' \u25b8 Ideal.map_mono hIm))\n\n/-- Extension to the Tate algebra followed by contraction recovers every ideal of the\nMonsky\u2013Washnitzer algebra, by faithful flatness. -/\n@[simp]\ntheorem _root_.Ideal.comap_map_toTate (J : Ideal (W \u03c3)) :\n (J.map (toTate \u03c3 K)).comap (toTate \u03c3 K) = J := by\n let := (toTate \u03c3 K).toRingHom.toAlgebra\n have : Module.FaithfullyFlat (W \u03c3) (T \u03c3) := faithfullyFlat_toTate\n exact J.comap_map_eq_self_of_faithfullyFlat (B := T \u03c3)\n\nend TauCeti.Dagger.washnitzerAlgebra\n", "public_theorems": ["TauCeti.Dagger.washnitzerAlgebra.quotientMap_map_toTate_bijective", "TauCeti.Dagger.washnitzerAlgebra.faithfullyFlat_toTate", "Ideal.comap_map_toTate"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.RingTheory.Dagger.MaximalSpectrum\npublic import Mathlib.RingTheory.RingHom.FaithfullyFlat\n\nimport TauCeti.RingTheory.Affinoid.Polyradius\nimport TauCeti.RingTheory.Affinoid.PowerBounded\nimport TauCeti.RingTheory.Affinoid.Restricted\nimport TauCeti.RingTheory.Flat.QuotientPow\nimport TauCeti.RingTheory.MvPowerSeries.TateAlgebra.Groebner\n\n/-!\n# The Tate algebra is faithfully flat over the Monsky\u2013Washnitzer algebra\n\nLet `K` be a complete nontrivially normed ultrametric field, `T = K\u27e8X\u2081, \u2026, X\u2099\u27e9` the Tate algebra\nand `W = K\u27e8X\u2081, \u2026, X\u2099\u27e9\u2020` the Monsky\u2013Washnitzer algebra. This file shows that the inclusion\n`W \u2192 T` is faithfully flat.\n\nThe heart of the matter is that `W` and `T` have the same finite quotients: for every ideal `J`\nof `W` of finite codimension, `J T \u2229 W = J` and `W \u29f8 J \u2192 T \u29f8 J T` is bijective. Surjectivity was\nalready known from the density of `W` in `T`. For injectivity we construct a retraction\n`T \u2192 W \u29f8 J` of `W \u2192 W \u29f8 J`.\n\n* For every radius `\u03c1 > 1` the restricted series `K{X/\u03c1}` lie in `W`, and they surject onto\n `W \u29f8 J` because the polynomials already do. When some power `\u03c1 ^ m` lies in `|K\u00d7|`, for\n instance `\u03c1 = \u2016c\u2016 ^ (1 / m)` with `\u2016c\u2016 > 1`, the algebra `K{X/\u03c1}` is affinoid. So `W \u29f8 J` is a\n quotient of an affinoid algebra, and it inherits a complete ultrametric residue norm.\n* For each such affinoid radius `\u03c1`, the class of each variable `X\u1d62` in `W \u29f8 J` has supremum\n seminorm at most `\u03c1`, since homomorphisms of affinoid algebras contract the supremum seminorm.\n These radii come arbitrarily close to `1`, so the seminorm is at most `1`.\n It is therefore power-bounded, and the universal property of `T` gives a continuous\n homomorphism `T \u2192 W \u29f8 J` sending `X\u1d62` to its class.\n* Composed with `W \u2192 T`, this homomorphism agrees with the projection `W \u2192 W \u29f8 J` on the\n variables, so it is the projection: homomorphisms from `W` into a finite-dimensional algebra\n are determined by the variables (`washnitzerAlgebra.algHom_ext_of_isIntegral`).\n\nTaking `J = \ud835\udd2a ^ k` for the maximal ideals `\ud835\udd2a` of `W`, the infinitesimal neighbourhoods of `W` and\n`T` at every classical point agree, which gives flatness by\n`Module.Flat.of_bijective_quotientMap_pow`. Faithfulness holds because every maximal ideal of `W`\ngenerates a maximal ideal of `T`.\n\n## Main results\n\n* `TauCeti.Dagger.washnitzerAlgebra.quotientMap_map_toTate_bijective`: for every ideal `J` of\n finite codimension, the map `W \u29f8 J \u2192 T \u29f8 J T` is bijective.\n* `TauCeti.Dagger.washnitzerAlgebra.faithfullyFlat_toTate`: `W \u2192 T` is faithfully flat.\n* `Ideal.comap_map_toTate`: every ideal `J` of `W` satisfies `J T \u2229 W = J`.\n\n## References\n\n* E. Grosse-Kl\u00f6nne, *Rigid analytic spaces with overconvergent structure sheaf*,\n J. reine angew. Math. 519 (2000), \u00a71, Proposition 1.5 and its proof.\n* [Bosch, G\u00fcntzer, Remmert, *Non-Archimedean Analysis*][bosch-guntzer-remmert], \u00a7\u00a76.1.1 and\n 6.2.3, for the universal property of Tate algebras and power-bounded elements.\n-/\n\npublic section\n\nnamespace TauCeti.Dagger.washnitzerAlgebra\n\nopen _root_.MvPowerSeries\n\nvariable {K \u03c3 : Type*} [NontriviallyNormedField K] [IsUltrametricDist K] [CompleteSpace K]\n [Finite \u03c3]\n\nlocal notation \"W \" \u03c3:max => washnitzerAlgebra \u03c3 K\nlocal notation \"T \" \u03c3:max => IsRestricted.subring (R := K) (fun _ : \u03c3 \u21a6 (1 : \u211d))\nlocal notation \"T[\" \u03c1 \"] \" \u03c3:max => IsRestricted.subring (R := K) (fun _ : \u03c3 \u21a6 \u03c1)", "/-- **Finite quotients of the Monsky\u2013Washnitzer algebra are quotients of the Tate algebra.** For an\nideal `J` of `W` of finite codimension, the map `W \u29f8 J \u2192 T \u29f8 J T` is bijective. -/\ntheorem quotientMap_map_toTate_bijective (J : Ideal (W \u03c3)) [Module.Finite K (W \u03c3 \u29f8 J)] :\n Function.Bijective (Ideal.quotientMap\u2090 (J.map (toTate \u03c3 K)) (toTate \u03c3 K)\n Ideal.le_comap_map) :=", "/-- **The Tate algebra is faithfully flat over the Monsky\u2013Washnitzer algebra.** -/\ntheorem faithfullyFlat_toTate : (toTate \u03c3 K).toRingHom.FaithfullyFlat :=", "/-- Extension to the Tate algebra followed by contraction recovers every ideal of the\nMonsky\u2013Washnitzer algebra, by faithful flatness. -/\n@[simp]\ntheorem _root_.Ideal.comap_map_toTate (J : Ideal (W \u03c3)) :\n (J.map (toTate \u03c3 K)).comap (toTate \u03c3 K) = J :=", "end TauCeti.Dagger.washnitzerAlgebra"], "free_length": 6347, "file_length": 7521, "heartbeats": 112953, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.RingTheory.Grassmannian.Chart.Plucker", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/RingTheory/Grassmannian/Chart/Plucker.lean", "module": "TauCeti.RingTheory.Grassmannian.Chart.Plucker", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.RingTheory.Grassmannian.Chart.Basic\npublic import TauCeti.RingTheory.Grassmannian.Plucker\n\nimport TauCeti.LinearAlgebra.Determinant.Basic\n\n/-!\n# The Pl\u00fccker map on the standard charts\n\nLet `M` be a module over a commutative ring `R`, `k` a natural number and `x : Fin k \u2192 M`. This file\ndescribes the Pl\u00fccker map `G(k, M) \u2192 G(1, \u22c0\u1d4f M)` (`Module.Grassmannian.pluckerBaseChange`) on the\nstandard charts: it sends the chart at `x` into the chart at the wedge `x\u2081 \u2227 \u22ef \u2227 x\u2096`, through an\nexplicit map of coordinate rings.\n\nWrite `C_x` for `Module.Grassmannian.ChartAlgebra R x` and `u_x : M \u2192 C_x^k` for its universal point\n(`Module.Grassmannian.ChartAlgebra.universalLinearMap`). The **Pl\u00fccker form**\n`Module.Grassmannian.ChartAlgebra.pluckerForm R x : \u22c0\u1d4f M \u2192 C_x` sends `m\u2081 \u2227 \u22ef \u2227 m\u2096` to the\ndeterminant of the matrix with rows `u_x(m\u2081), \u2026, u_x(m\u2096)`\n(`Module.Grassmannian.ChartAlgebra.pluckerForm_\u03b9Multi`); it takes the value `1` at\n`x\u2081 \u2227 \u22ef \u2227 x\u2096`, so it classifies an `R`-algebra map\n`Module.Grassmannian.ChartAlgebra.pluckerChartHom R x : C_{x\u2081 \u2227 \u22ef \u2227 x\u2096} \u2192 C_x`.\n\n## Main definitions\n\n* `Module.Grassmannian.ChartAlgebra.pluckerForm R x`: the Pl\u00fccker form `\u22c0\u1d4f M \u2192 C_x`.\n* `Module.Grassmannian.ChartAlgebra.pluckerChartHom R x`: the Pl\u00fccker map on charts\n `C_{x\u2081 \u2227 \u22ef \u2227 x\u2096} \u2192 C_x`.\n\n## Main results\n\n* `Module.Grassmannian.ChartAlgebra.pluckerForm_update`: the coordinate `u_x(m)\u1d62` is the Pl\u00fccker\n form of `x` with `x\u1d62` replaced by `m`.\n* `Module.Grassmannian.ChartAlgebra.pluckerChartHom_surjective`: the Pl\u00fccker map on charts is\n surjective.\n* `Module.Grassmannian.pluckerBaseChange_chartHomEquiv_id`: the Pl\u00fccker point of the universal\n point of the chart at `x` is the point classified by `pluckerChartHom R x`.\n* `Module.Grassmannian.pluckerBaseChange_mem_chart_iff`: over a field, the Pl\u00fccker point of `N`\n lies in the chart at `x\u2081 \u2227 \u22ef \u2227 x\u2096` exactly when `N` lies in the chart at `x`.\n\n## References\n\n* A. Grothendieck, J. Dieudonn\u00e9, *\u00c9l\u00e9ments de g\u00e9om\u00e9trie alg\u00e9brique I* (Springer, 1971), 9.7, for\n the Grassmannian and its Pl\u00fccker embedding.\n* [The Stacks Project, Tag 089R](https://stacks.math.columbia.edu/tag/089R), for the Grassmannian\n functor.\n* U. G\u00f6rtz, T. Wedhorn, *Algebraic Geometry I* (Vieweg+Teubner, 2010), Chapter 8, for the\n standard charts of the Grassmannian and the Pl\u00fccker embedding.\n-/\n\npublic section\n\nuniverse u v\n\nopen TensorProduct\n\nnamespace Module.Grassmannian\n\nvariable (R : Type u) [CommRing R] {M : Type v} [AddCommGroup M] [Module R M] {k : \u2115}\n\nnamespace ChartAlgebra\n\n/-- **The Pl\u00fccker form** of the chart at `x`: the linear map `\u22c0\u1d4f M \u2192 C_x` sending\n`m\u2081 \u2227 \u22ef \u2227 m\u2096` to the determinant of the matrix with rows `u_x(m\u2081), \u2026, u_x(m\u2096)`, where `u_x` is the\nuniversal point of the chart. -/\nnoncomputable def pluckerForm (x : Fin k \u2192 M) : \u22c0[R]^k M \u2192\u2097[R] ChartAlgebra R x :=\n exteriorPower.alternatingMapLinearEquiv\n { toMultilinearMap :=\n ((Matrix.detRowAlternating (R := ChartAlgebra R x) (n := Fin k)).toMultilinearMap\n |>.restrictScalars R).compLinearMap fun _ \u21a6 universalLinearMap R x\n map_eq_zero_of_eq' := fun v i j hv hij \u21a6\n Matrix.detRowAlternating.map_eq_zero_of_eq (fun l \u21a6 universalLinearMap R x (v l))\n (by simp [hv]) hij }\n\n/-- The Pl\u00fccker form of `m\u2081 \u2227 \u22ef \u2227 m\u2096` is the determinant of the matrix with rows `u_x(m\u2c7c)`. -/\ntheorem pluckerForm_\u03b9Multi (x m : Fin k \u2192 M) :\n pluckerForm R x (exteriorPower.\u03b9Multi R k m) =\n (Matrix.of fun j i \u21a6 universalLinearMap R x (m j) i).det := by\n rw [pluckerForm, exteriorPower.alternatingMapLinearEquiv_apply_\u03b9Multi]\n exact Matrix.detRowAlternating_apply fun j \u21a6 universalLinearMap R x (m j)\n\n/-- The Pl\u00fccker form of the chart at `x` takes the value `1` at `x\u2081 \u2227 \u22ef \u2227 x\u2096`. -/\n@[simp]\ntheorem pluckerForm_self (x : Fin k \u2192 M) :\n pluckerForm R x (exteriorPower.\u03b9Multi R k x) = 1 := by\n rw [pluckerForm_\u03b9Multi, \u2190 Matrix.det_one (R := ChartAlgebra R x) (n := Fin k)]\n congr 1\n ext j i\n simp [Matrix.one_apply, Pi.single_apply, eq_comm]\n\n/-- **The Pl\u00fccker map on charts**: the `R`-algebra map from the coordinate ring of the chart of\n`G(1, \u22c0\u1d4f M)` at `x\u2081 \u2227 \u22ef \u2227 x\u2096` to the coordinate ring of the chart of `G(k, M)` at `x` classified by\nthe Pl\u00fccker form. -/\nnoncomputable def pluckerChartHom (x : Fin k \u2192 M) :\n ChartAlgebra R (fun _ : Fin 1 \u21a6 exteriorPower.\u03b9Multi R k x) \u2192\u2090[R] ChartAlgebra R x :=\n (homEquiv R _).symm \u27e8LinearMap.pi fun _ \u21a6 pluckerForm R x, fun i \u21a6 by\n ext j\n rw [Subsingleton.elim i 0, Subsingleton.elim j 0]\n simp\u27e9\n\n/-- `pluckerChartHom R x` sends the universal linear form of the rank-one chart to the Pl\u00fccker\nform. -/\n@[simp]\ntheorem pluckerChartHom_universalLinearMap (x : Fin k \u2192 M) (w : \u22c0[R]^k M) (j : Fin 1) :\n pluckerChartHom R x (universalLinearMap R (fun _ : Fin 1 \u21a6 exteriorPower.\u03b9Multi R k x) w j) =\n pluckerForm R x w := by\n simp [pluckerChartHom]\n\n/-- **Coordinates are Pl\u00fccker coordinates.** The coordinate `u_x(m)\u1d62` of the chart at `x` is the\nPl\u00fccker form of `x` with `x\u1d62` replaced by `m`. -/\n@[simp]\ntheorem pluckerForm_update (x : Fin k \u2192 M) (i : Fin k) (m : M) :\n pluckerForm R x (exteriorPower.\u03b9Multi R k (Function.update x i m)) =\n universalLinearMap R x m i := by\n have hrow : (Matrix.of fun j l \u21a6 universalLinearMap R x (Function.update x i m j) l) =\n (1 : Matrix (Fin k) (Fin k) (ChartAlgebra R x)).updateRow i (universalLinearMap R x m) := by\n ext j l\n rcases eq_or_ne j i with rfl | hj\n \u00b7 simp\n \u00b7 simp [Function.update_of_ne hj, Matrix.updateRow_ne hj, Matrix.one_apply, Pi.single_apply,\n eq_comm]\n have hsum : \u2211 l, universalLinearMap R x m l \u2022 (1 : Matrix (Fin k) (Fin k) (ChartAlgebra R x)) l =\n universalLinearMap R x m := by\n ext l\n simp [Finset.sum_apply, Matrix.one_apply]\n have := Matrix.det_updateRow_sum (1 : Matrix (Fin k) (Fin k) (ChartAlgebra R x)) i\n (universalLinearMap R x m)\n rw [hsum, Matrix.det_one, smul_eq_mul, mul_one] at this\n rw [pluckerForm_\u03b9Multi, hrow, this]\n\n/-- **The Pl\u00fccker map on charts is surjective**: every coordinate `u_x(m)\u1d62` is a Pl\u00fccker\ncoordinate (`Module.Grassmannian.ChartAlgebra.pluckerForm_update`). -/\ntheorem pluckerChartHom_surjective (x : Fin k \u2192 M) :\n Function.Surjective (pluckerChartHom R x) :=\n surjective_of_forall_mem_range R x fun m i \u21a6\n \u27e8universalLinearMap R _ (exteriorPower.\u03b9Multi R k (Function.update x i m)) 0,\n (pluckerChartHom_universalLinearMap R x _ 0).trans (pluckerForm_update R x i m)\u27e9\n\nend ChartAlgebra\n\nopen ChartAlgebra\n\n/-- The base change to `C_x` of the Pl\u00fccker form, read on `\u22c0\u1d4f (C_x \u2297 M)`, is the determinant of the\nuniversal surjection `C_x \u2297 M \u2192 C_x^k`. -/\nprivate theorem liftBaseChange_pluckerChartHom_comp_equivBaseChange (x : Fin k \u2192 M) :\n ((pluckerChartHom R x).toLinearMap.compLeft (Fin 1) \u2218\u2097\n universalLinearMap R (fun _ : Fin 1 \u21a6 exteriorPower.\u03b9Multi R k x)).liftBaseChange\n (ChartAlgebra R x) \u2218\u2097\n (TauCeti.exteriorPower.equivBaseChange (ChartAlgebra R x) k).toLinearMap =\n (LinearMap.pi fun _ \u21a6 exteriorPower.alternatingMapLinearEquiv Matrix.detRowAlternating) \u2218\u2097\n exteriorPower.map k\n (((AlgHom.id R _).toLinearMap.compLeft (Fin k) \u2218\u2097 universalLinearMap R x).liftBaseChange\n (ChartAlgebra R x)) := by\n have hspan : Submodule.span (ChartAlgebra R x)\n (Set.range (TensorProduct.mk R (ChartAlgebra R x) M 1)) = \u22a4 := by\n rw [\u2190 LinearMap.coe_range, LinearMap.range_eq_map, \u2190 Submodule.baseChange_eq_span,\n Submodule.baseChange_top]\n refine LinearMap.ext_on (exteriorPower.\u03b9Multi_span_of_span _ k _ hspan) ?_\n rintro _ \u27e8v, hv, rfl\u27e9\n choose m hm using fun i \u21a6 hv \u27e8i, rfl\u27e9\n obtain rfl : v = fun i \u21a6 (1 : ChartAlgebra R x) \u2297\u209c[R] m i := funext fun i \u21a6 (hm i).symm\n have hA := TauCeti.exteriorPower.equivBaseChange_\u03b9Multi_tmul (R := R) (ChartAlgebra R x)\n (fun _ \u21a6 1) m\n simp only [Finset.prod_const_one] at hA\n ext j\n have hid (y : Fin k \u2192 ChartAlgebra R x) : (LinearMap.id (R := R)).compLeft (Fin k) y = y := by\n ext; simp\n simp [hA, hid, pluckerForm_\u03b9Multi, exteriorPower.alternatingMapLinearEquiv_apply_\u03b9Multi,\n Matrix.detRowAlternating_apply, Function.comp_def]\n\n/-- **The Pl\u00fccker map on the universal point of a chart.** The Pl\u00fccker point of the universal point\nof the chart of `G(k, M)` at `x` is the point of the chart of `G(1, \u22c0\u1d4f M)` at `x\u2081 \u2227 \u22ef \u2227 x\u2096`\nclassified by `pluckerChartHom R x`. -/\ntheorem pluckerBaseChange_chartHomEquiv_id (x : Fin k \u2192 M) :\n pluckerBaseChange (chartHomEquiv R x (ChartAlgebra R x) (AlgHom.id R _)).val =\n (chartHomEquiv R (fun _ : Fin 1 \u21a6 exteriorPower.\u03b9Multi R k x) (ChartAlgebra R x)\n (pluckerChartHom R x)).val := by\n -- The map `\u22c0\u1d4f (C_x \u2297 M) \u2192 \u22c0\u1d4f (C_x^k) \u2192 C_x`, by the determinant, is the Pl\u00fccker form, so it\n -- kills the kernel of `\u22c0\u1d4f (C_x \u2297 M) \u2192 \u22c0\u1d4f (C_x^k)`; comparable points of a Grassmannian are equal.\n set A := ChartAlgebra R x\n let \u03c6 : A \u2297[R] M \u2192\u2097[A] Fin k \u2192 A :=\n ((AlgHom.id R A).toLinearMap.compLeft (Fin k) \u2218\u2097 universalLinearMap R x).liftBaseChange A\n have h\u03c6 : Function.Surjective \u03c6 :=\n (TauCeti.leftInverse_fintypeLinearCombination (x := fun i \u21a6 (1 : A) \u2297\u209c[R] x i)\n (\u03c6 := \u03c6) fun i \u21a6 by ext; simp [\u03c6, universalLinearMap_apply_self]).surjective\n -- the universal point of the chart at `x` is the kernel of `\u03c6`\n have hN : (chartHomEquiv R x A (AlgHom.id R A)).val = ofSurjective \u03c6 h\u03c6 (rankAtStalk_fin_fun k) :=\n Grassmannian.ext (by rw [toSubmodule_chartHomEquiv_apply, toSubmodule_ofSurjective])\n let \u03a8 : A \u2297[R] \u22c0[R]^k M \u2192\u2097[A] Fin 1 \u2192 A :=\n ((pluckerChartHom R x).toLinearMap.compLeft (Fin 1) \u2218\u2097\n universalLinearMap R (fun _ : Fin 1 \u21a6 exteriorPower.\u03b9Multi R k x)).liftBaseChange A\n let D : \u22c0[A]^k (Fin k \u2192 A) \u2192\u2097[A] Fin 1 \u2192 A :=\n LinearMap.pi fun _ \u21a6 exteriorPower.alternatingMapLinearEquiv Matrix.detRowAlternating\n have key : \u03a8 \u2218\u2097 (TauCeti.exteriorPower.equivBaseChange A k).toLinearMap =\n D \u2218\u2097 exteriorPower.map k \u03c6 :=\n liftBaseChange_pluckerChartHom_comp_equivBaseChange R x\n refine eq_of_le ?_\n rw [toSubmodule_pluckerBaseChange, \u2190 toSubmodule_plucker, hN,\n toSubmodule_plucker_ofSurjective \u03c6 h\u03c6 (rankAtStalk_fin_fun k)]\n rintro _ \u27e8y, hy, rfl\u27e9\n rw [SetLike.mem_coe, LinearMap.mem_ker] at hy\n rw [toSubmodule_chartHomEquiv_apply, LinearMap.mem_ker]\n exact (LinearMap.congr_fun key y).trans (by rw [LinearMap.comp_apply, hy, map_zero])\n\nend Module.Grassmannian\n\n/-! ### Charts of the Pl\u00fccker point over a field -/\n\nnamespace Module.Grassmannian\n\nvariable {R : Type u} [CommRing R] {M : Type v} [AddCommGroup M] [Module R M] {k : \u2115}\n {K : Type*} [Field K] [Algebra R K]\n\n/-- **The Pl\u00fccker point and the charts, over a field.** For a point `N` of `G(k, K \u2297[R] M; K)` over\na field `K` and `x : Fin k \u2192 M`, the Pl\u00fccker point of `N` lies in the chart of `G(1, \u22c0\u1d4f M)` at the\nwedge `x\u2081 \u2227 \u22ef \u2227 x\u2096` exactly when `N` lies in the chart at `x`: the images of the `x\u1d62` span the\nquotient exactly when their wedge spans its top exterior power. -/\ntheorem pluckerBaseChange_mem_chart_iff (N : G(k, K \u2297[R] M; K)) (x : Fin k \u2192 M) :\n pluckerBaseChange N \u2208\n chart K (fun _ : Fin 1 \u21a6 (1 : K) \u2297\u209c[R] _root_.exteriorPower.\u03b9Multi R k x) \u2194\n N \u2208 chart K (fun i \u21a6 (1 : K) \u2297\u209c[R] x i) := by\n set q := N.toSubmodule.mkQ\n set F := _root_.exteriorPower.map k q\n set e := TauCeti.exteriorPower.equivBaseChange (R := R) (M := M) K k\n set y : Fin k \u2192 K \u2297[R] M := fun i \u21a6 (1 : K) \u2297\u209c[R] x i\n set w := _root_.exteriorPower.\u03b9Multi K k y\n have hF : LinearMap.range F = \u22a4 :=\n LinearMap.range_eq_top.2 (_root_.exteriorPower.map_surjective N.toSubmodule.mkQ_surjective)\n have he : e.symm ((1 : K) \u2297\u209c[R] _root_.exteriorPower.\u03b9Multi R k x) = w := by\n rw [TauCeti.exteriorPower.equivBaseChange_symm_tmul_\u03b9Multi, one_smul]\n -- transport the chart condition on the Pl\u00fccker point along `e`\n have hsup : (pluckerBaseChange N).toSubmodule \u2294\n Submodule.span K (Set.range fun _ : Fin 1 \u21a6 (1 : K) \u2297\u209c[R]\n _root_.exteriorPower.\u03b9Multi R k x) =\n (LinearMap.ker F \u2294 Submodule.span K {w}).map e.toLinearMap := by\n rw [toSubmodule_pluckerBaseChange, Submodule.map_sup, Submodule.map_span, Set.image_singleton,\n \u2190 he, LinearEquiv.coe_coe, LinearEquiv.apply_symm_apply, Set.range_const]\n -- pass to the quotient by `ker F`, which is `\u22c0\u1d4f` of the universal quotient\n have hker : LinearMap.ker F \u2294 Submodule.span K {w} = \u22a4 \u2194 Submodule.span K {F w} = \u22a4 := by\n rw [sup_comm, \u2190 LinearMap.map_eq_top_iff hF, Submodule.map_span, Set.image_singleton]\n -- pass to the universal quotient on the side of `N`\n have hN : N.toSubmodule \u2294 Submodule.span K (Set.range y) = \u22a4 \u2194\n Submodule.span K (Set.range (q \u2218 y)) = \u22a4 := by\n rw [\u2190 Submodule.map_mkQ_eq_top, Submodule.map_span, \u2190 Set.range_comp]\n rw [mem_chart_iff_sup_eq_top, mem_chart_iff_sup_eq_top, hsup, Submodule.map_eq_top_iff, hker,\n hN, _root_.exteriorPower.map_apply_\u03b9Multi]\n exact TauCeti.exteriorPower.span_singleton_\u03b9Multi_eq_top_iff (finrank_quotient N) _\n\nend Module.Grassmannian\n", "public_theorems": ["Module.Grassmannian.ChartAlgebra.pluckerForm_\u03b9Multi", "Module.Grassmannian.ChartAlgebra.pluckerForm_self", "Module.Grassmannian.ChartAlgebra.pluckerChartHom_universalLinearMap", "Module.Grassmannian.ChartAlgebra.pluckerForm_update", "Module.Grassmannian.ChartAlgebra.pluckerChartHom_surjective", "Module.Grassmannian.pluckerBaseChange_chartHomEquiv_id", "Module.Grassmannian.pluckerBaseChange_mem_chart_iff"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.RingTheory.Grassmannian.Chart.Basic\npublic import TauCeti.RingTheory.Grassmannian.Plucker\n\nimport TauCeti.LinearAlgebra.Determinant.Basic\n\n/-!\n# The Pl\u00fccker map on the standard charts\n\nLet `M` be a module over a commutative ring `R`, `k` a natural number and `x : Fin k \u2192 M`. This file\ndescribes the Pl\u00fccker map `G(k, M) \u2192 G(1, \u22c0\u1d4f M)` (`Module.Grassmannian.pluckerBaseChange`) on the\nstandard charts: it sends the chart at `x` into the chart at the wedge `x\u2081 \u2227 \u22ef \u2227 x\u2096`, through an\nexplicit map of coordinate rings.\n\nWrite `C_x` for `Module.Grassmannian.ChartAlgebra R x` and `u_x : M \u2192 C_x^k` for its universal point\n(`Module.Grassmannian.ChartAlgebra.universalLinearMap`). The **Pl\u00fccker form**\n`Module.Grassmannian.ChartAlgebra.pluckerForm R x : \u22c0\u1d4f M \u2192 C_x` sends `m\u2081 \u2227 \u22ef \u2227 m\u2096` to the\ndeterminant of the matrix with rows `u_x(m\u2081), \u2026, u_x(m\u2096)`\n(`Module.Grassmannian.ChartAlgebra.pluckerForm_\u03b9Multi`); it takes the value `1` at\n`x\u2081 \u2227 \u22ef \u2227 x\u2096`, so it classifies an `R`-algebra map\n`Module.Grassmannian.ChartAlgebra.pluckerChartHom R x : C_{x\u2081 \u2227 \u22ef \u2227 x\u2096} \u2192 C_x`.\n\n## Main definitions\n\n* `Module.Grassmannian.ChartAlgebra.pluckerForm R x`: the Pl\u00fccker form `\u22c0\u1d4f M \u2192 C_x`.\n* `Module.Grassmannian.ChartAlgebra.pluckerChartHom R x`: the Pl\u00fccker map on charts\n `C_{x\u2081 \u2227 \u22ef \u2227 x\u2096} \u2192 C_x`.\n\n## Main results\n\n* `Module.Grassmannian.ChartAlgebra.pluckerForm_update`: the coordinate `u_x(m)\u1d62` is the Pl\u00fccker\n form of `x` with `x\u1d62` replaced by `m`.\n* `Module.Grassmannian.ChartAlgebra.pluckerChartHom_surjective`: the Pl\u00fccker map on charts is\n surjective.\n* `Module.Grassmannian.pluckerBaseChange_chartHomEquiv_id`: the Pl\u00fccker point of the universal\n point of the chart at `x` is the point classified by `pluckerChartHom R x`.\n* `Module.Grassmannian.pluckerBaseChange_mem_chart_iff`: over a field, the Pl\u00fccker point of `N`\n lies in the chart at `x\u2081 \u2227 \u22ef \u2227 x\u2096` exactly when `N` lies in the chart at `x`.\n\n## References\n\n* A. Grothendieck, J. Dieudonn\u00e9, *\u00c9l\u00e9ments de g\u00e9om\u00e9trie alg\u00e9brique I* (Springer, 1971), 9.7, for\n the Grassmannian and its Pl\u00fccker embedding.\n* [The Stacks Project, Tag 089R](https://stacks.math.columbia.edu/tag/089R), for the Grassmannian\n functor.\n* U. G\u00f6rtz, T. Wedhorn, *Algebraic Geometry I* (Vieweg+Teubner, 2010), Chapter 8, for the\n standard charts of the Grassmannian and the Pl\u00fccker embedding.\n-/\n\npublic section\n\nuniverse u v\n\nopen TensorProduct\n\nnamespace Module.Grassmannian\n\nvariable (R : Type u) [CommRing R] {M : Type v} [AddCommGroup M] [Module R M] {k : \u2115}\n\nnamespace ChartAlgebra\n\n/-- **The Pl\u00fccker form** of the chart at `x`: the linear map `\u22c0\u1d4f M \u2192 C_x` sending\n`m\u2081 \u2227 \u22ef \u2227 m\u2096` to the determinant of the matrix with rows `u_x(m\u2081), \u2026, u_x(m\u2096)`, where `u_x` is the\nuniversal point of the chart. -/\nnoncomputable def pluckerForm (x : Fin k \u2192 M) : \u22c0[R]^k M \u2192\u2097[R] ChartAlgebra R x :=\n exteriorPower.alternatingMapLinearEquiv\n { toMultilinearMap :=\n ((Matrix.detRowAlternating (R := ChartAlgebra R x) (n := Fin k)).toMultilinearMap\n |>.restrictScalars R).compLinearMap fun _ \u21a6 universalLinearMap R x\n map_eq_zero_of_eq' := fun v i j hv hij \u21a6\n Matrix.detRowAlternating.map_eq_zero_of_eq (fun l \u21a6 universalLinearMap R x (v l))\n (by simp [hv]) hij }", "/-- The Pl\u00fccker form of `m\u2081 \u2227 \u22ef \u2227 m\u2096` is the determinant of the matrix with rows `u_x(m\u2c7c)`. -/\ntheorem pluckerForm_\u03b9Multi (x m : Fin k \u2192 M) :\n pluckerForm R x (exteriorPower.\u03b9Multi R k m) =\n (Matrix.of fun j i \u21a6 universalLinearMap R x (m j) i).det :=", "/-- The Pl\u00fccker form of the chart at `x` takes the value `1` at `x\u2081 \u2227 \u22ef \u2227 x\u2096`. -/\n@[simp]\ntheorem pluckerForm_self (x : Fin k \u2192 M) :\n pluckerForm R x (exteriorPower.\u03b9Multi R k x) = 1 :=", "/-- **The Pl\u00fccker map on charts**: the `R`-algebra map from the coordinate ring of the chart of\n`G(1, \u22c0\u1d4f M)` at `x\u2081 \u2227 \u22ef \u2227 x\u2096` to the coordinate ring of the chart of `G(k, M)` at `x` classified by\nthe Pl\u00fccker form. -/\nnoncomputable def pluckerChartHom (x : Fin k \u2192 M) :\n ChartAlgebra R (fun _ : Fin 1 \u21a6 exteriorPower.\u03b9Multi R k x) \u2192\u2090[R] ChartAlgebra R x :=\n (homEquiv R _).symm \u27e8LinearMap.pi fun _ \u21a6 pluckerForm R x, fun i \u21a6 by\n ext j\n rw [Subsingleton.elim i 0, Subsingleton.elim j 0]\n simp\u27e9", "/-- `pluckerChartHom R x` sends the universal linear form of the rank-one chart to the Pl\u00fccker\nform. -/\n@[simp]\ntheorem pluckerChartHom_universalLinearMap (x : Fin k \u2192 M) (w : \u22c0[R]^k M) (j : Fin 1) :\n pluckerChartHom R x (universalLinearMap R (fun _ : Fin 1 \u21a6 exteriorPower.\u03b9Multi R k x) w j) =\n pluckerForm R x w :=", "/-- **Coordinates are Pl\u00fccker coordinates.** The coordinate `u_x(m)\u1d62` of the chart at `x` is the\nPl\u00fccker form of `x` with `x\u1d62` replaced by `m`. -/\n@[simp]\ntheorem pluckerForm_update (x : Fin k \u2192 M) (i : Fin k) (m : M) :\n pluckerForm R x (exteriorPower.\u03b9Multi R k (Function.update x i m)) =\n universalLinearMap R x m i :=", "/-- **The Pl\u00fccker map on charts is surjective**: every coordinate `u_x(m)\u1d62` is a Pl\u00fccker\ncoordinate (`Module.Grassmannian.ChartAlgebra.pluckerForm_update`). -/\ntheorem pluckerChartHom_surjective (x : Fin k \u2192 M) :\n Function.Surjective (pluckerChartHom R x) :=", "end ChartAlgebra\n\nopen ChartAlgebra", "/-- **The Pl\u00fccker map on the universal point of a chart.** The Pl\u00fccker point of the universal point\nof the chart of `G(k, M)` at `x` is the point of the chart of `G(1, \u22c0\u1d4f M)` at `x\u2081 \u2227 \u22ef \u2227 x\u2096`\nclassified by `pluckerChartHom R x`. -/\ntheorem pluckerBaseChange_chartHomEquiv_id (x : Fin k \u2192 M) :\n pluckerBaseChange (chartHomEquiv R x (ChartAlgebra R x) (AlgHom.id R _)).val =\n (chartHomEquiv R (fun _ : Fin 1 \u21a6 exteriorPower.\u03b9Multi R k x) (ChartAlgebra R x)\n (pluckerChartHom R x)).val :=", "end Module.Grassmannian\n\n/-! ### Charts of the Pl\u00fccker point over a field -/\n\nnamespace Module.Grassmannian\n\nvariable {R : Type u} [CommRing R] {M : Type v} [AddCommGroup M] [Module R M] {k : \u2115}\n {K : Type*} [Field K] [Algebra R K]", "/-- **The Pl\u00fccker point and the charts, over a field.** For a point `N` of `G(k, K \u2297[R] M; K)` over\na field `K` and `x : Fin k \u2192 M`, the Pl\u00fccker point of `N` lies in the chart of `G(1, \u22c0\u1d4f M)` at the\nwedge `x\u2081 \u2227 \u22ef \u2227 x\u2096` exactly when `N` lies in the chart at `x`: the images of the `x\u1d62` span the\nquotient exactly when their wedge spans its top exterior power. -/\ntheorem pluckerBaseChange_mem_chart_iff (N : G(k, K \u2297[R] M; K)) (x : Fin k \u2192 M) :\n pluckerBaseChange N \u2208\n chart K (fun _ : Fin 1 \u21a6 (1 : K) \u2297\u209c[R] _root_.exteriorPower.\u03b9Multi R k x) \u2194\n N \u2208 chart K (fun i \u21a6 (1 : K) \u2297\u209c[R] x i) :=", "end Module.Grassmannian"], "free_length": 5435, "file_length": 7949, "heartbeats": 58779, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Examples.NumberTheory.NewtonPolygon.Convergence", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Examples/NumberTheory/NewtonPolygon/Convergence.lean", "module": "TauCeti.Examples.NumberTheory.NewtonPolygon.Convergence", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.NumberTheory.NewtonPolygon.Convergence\npublic import TauCeti.NumberTheory.Padics.Complex.Valuation\npublic import TauCeti.NumberTheory.Padics.LogGauge\nimport TauCeti.NumberTheory.Padics.Complex.Basic\n\n/-!\n# Explicit radii and pointwise convergence of `p`-adic power series\n\nConcrete instances comparing the intrinsic coefficient radius `PowerSeries.radius` with the\npointwise convergence radius `PowerSeries.convergenceRadius` over `\u211a_[p]` and `\u2102_[p]`, with respect\nto `TauCeti.padicRealValuation p` (normalised by `v(p) = 1`):\n\n* **Strict inequality in a discretely normed base field.** The power series\n `halfSlopeSeries p = \u2211_{n \u2265 0} p ^ \u2308n / 2\u2309 X ^ n \u2208 \u211a_[p]\u27e6X\u27e7` has coefficient valuations\n `\u2308n / 2\u2309`, whose Newton polygon is the line `n \u21a6 n / 2` of constant unit slope `1 / 2` and\n whose lower linear growth `liminf_{n \u2192 \u221e} \u2308n / 2\u2309 / n` equals `1 / 2`. Its intrinsic\n radius is therefore `\u221ap`, and over the densely normed completion `\u2102_[p]` its pointwise\n convergence radius also equals `\u221ap` (with exact convergence set `Metric.ball 0 \u221ap`, including\n points of norm strictly between `1` and `\u221ap`, and diverging on the boundary sphere `\u2016x\u2016 = \u221ap`).\n Over `\u211a_[p]`, however, every nonzero norm is an integer power of `p` (with no element of norm\n strictly between `1` and `p`), so the pointwise convergence radius rounds down to\n `p ^ \u230a1 / 2\u230b = 1 < \u221ap`: the exact convergence set in `\u211a_[p]` is `Metric.closedBall 0 1`, while\n the series still converges at every `\u211a_[p]`-point of `{x : \u211a_[p] | \u2016x\u2016 \u2264 \u221ap}` despite failing\n `IsRestricted \u221ap`.\n* **Polynomials with finite root norms still have infinite radius.** The quadratic polynomial\n `1 - p X ^ 2 \u2208 \u211a_[p][X]` has roots in `\u2102_[p]`, every one of which has finite positive norm `\u221ap`;\n nevertheless, viewed in `\u211a_[p]\u27e6X\u27e7`, its intrinsic radius and its pointwise convergence radii in\n both `\u211a_[p]` and `\u2102_[p]` are `\u22a4`.\n\n## References\n\n* N. Koblitz, *p-adic Numbers, p-adic Analysis, and Zeta-Functions*, second edition,\n Graduate Texts in Mathematics 58, Springer, 1984, Chapter IV \u00a74.\n-/\n\npublic section\n\nopen Filter LinearGrowth _root_.PowerSeries TauCeti\nopen scoped NNReal ENNReal\n\nnamespace TauCeti.NewtonPolygonConvergenceExample\n\nprivate theorem one_lt_p {p : \u2115} [Fact p.Prime] : (1 : \u211d) < p :=\n Nat.one_lt_cast.mpr (Fact.out : p.Prime).one_lt\n\nprivate theorem p_pos {p : \u2115} [Fact p.Prime] : (0 : \u211d) < p :=\n Nat.cast_pos.mpr (Fact.out : p.Prime).pos\n\nsection HalfSlopeSeries\n\nprivate theorem ceil_two_mul_div_two (k : \u2115) : \u2308((2 * k : \u2115) : \u211a) / 2\u2309\u208a = k := by\n have h : (((2 * k : \u2115) : \u211a) / 2) = (k : \u211a) := by\n push_cast\n exact mul_div_cancel_left\u2080 (k : \u211a) two_ne_zero\n rw [h, Nat.ceil_natCast]\n\nvariable (p : \u2115) [Fact p.Prime]\n\n/-- The power series `\u2211_{n \u2265 0} p ^ \u2308n / 2\u2309 X ^ n` over `\u211a_[p]`. -/\nnoncomputable def halfSlopeSeries : \u211a_[p]\u27e6X\u27e7 :=\n PowerSeries.mk fun n \u21a6 (p : \u211a_[p]) ^ \u2308(n : \u211a) / 2\u2309\u208a\n\n/-- The `n`-th coefficient of `halfSlopeSeries p` is `p ^ \u2308n / 2\u2309`. -/\n@[simp]\ntheorem coeff_halfSlopeSeries (n : \u2115) :\n PowerSeries.coeff n (halfSlopeSeries p) = (p : \u211a_[p]) ^ \u2308(n : \u211a) / 2\u2309\u208a :=\n PowerSeries.coeff_mk n _\n\nvariable {p}\n\n/-- Under `padicRealValuation p`, the `n`-th coefficient of `halfSlopeSeries p` has valuation\n`\u2308n / 2\u2309`. -/\ntheorem padicRealValuation_coeff_halfSlopeSeries (n : \u2115) :\n padicRealValuation p (PowerSeries.coeff n (halfSlopeSeries p)) =\n ((\u2308(n : \u211a) / 2\u2309\u208a : \u211d) : WithTop \u211d) := by\n rw [coeff_halfSlopeSeries, (padicRealValuation p).map_pow, padicRealValuation_p, nsmul_one]\n exact (WithTop.coe_natCast _).symm\n\n/-- The real `p`-adic valuation of the `n`-th coefficient of `halfSlopeSeries p` is at least\n`n / 2`. -/\nprivate theorem half_le_padicRealValuation_coeff_halfSlopeSeries (n : \u2115) :\n (((n : \u211d) / 2 : \u211d) : WithTop \u211d) \u2264\n padicRealValuation p (PowerSeries.coeff n (halfSlopeSeries p)) := by\n rw [padicRealValuation_coeff_halfSlopeSeries, WithTop.coe_le_coe]\n have hq : (((n : \u211a) / 2 : \u211a) : \u211d) \u2264 (\u2308(n : \u211a) / 2\u2309\u208a : \u211d) := by\n exact_mod_cast Nat.le_ceil ((n : \u211a) / 2)\n simpa using hq\n\n/-- The coefficient heights of `halfSlopeSeries p` are admissible, being minorised by `n / 2`. -/\nprivate theorem isAdmissible_halfSlopeSeries :\n IsAdmissible fun n \u21a6 padicRealValuation p (PowerSeries.coeff n (halfSlopeSeries p)) := by\n refine isAdmissible_iff.mpr \u27e80, 1 / 2, fun n \u21a6 ?_\u27e9\n simpa [div_eq_inv_mul] using half_le_padicRealValuation_coeff_halfSlopeSeries (p := p) n\n\n/-- **Newton polygon of `\u2211 p^\u2308n/2\u2309 X\u207f`.** The Newton polygon of `halfSlopeSeries p` is the line\n`n \u21a6 n / 2`: the even-indexed coefficients sit directly on this line, while each odd-indexed\ncoefficient sits `1 / 2` above the midpoint of its two even neighbours. -/\n@[simp]\ntheorem newtonPolygon_halfSlopeSeries (n : \u2115) :\n (halfSlopeSeries p).newtonPolygon (padicRealValuation p) n =\n (((n : \u211d) / 2 : \u211d) : WithTop \u211d) := by\n set g := (halfSlopeSeries p).newtonPolygon (padicRealValuation p)\n have hminor : (fun k : \u2115 \u21a6 ((0 + (1 / 2 : \u211d) * k : \u211d) : WithTop \u211d)) \u2264 g :=\n le_newtonPolygon (isConvexSeq_affine 0 (1 / 2)) fun k \u21a6 by\n simpa [div_eq_inv_mul] using half_le_padicRealValuation_coeff_halfSlopeSeries (p := p) k\n have heven (k : \u2115) : g (2 * k) = ((0 + (1 / 2 : \u211d) * (2 * k : \u2115) : \u211d) : WithTop \u211d) := by\n refine le_antisymm ?_ (hminor (2 * k))\n refine ((halfSlopeSeries p).newtonPolygon_le isAdmissible_halfSlopeSeries (2 * k)).trans ?_\n rw [padicRealValuation_coeff_halfSlopeSeries, ceil_two_mul_div_two]\n simp [div_eq_inv_mul]\n have hconv := (halfSlopeSeries p).isConvexSeq_newtonPolygon (padicRealValuation p)\n have hline := hconv.eq_affine_of_affine_le (heven 0) (heven n) (Nat.zero_le n) (by omega)\n (hminor n)\n simpa [div_eq_inv_mul] using hline\n\n/-- Every unit edge of the Newton polygon of `halfSlopeSeries p` has slope `1 / 2`. -/\n@[simp]\ntheorem unitSlope_newtonPolygon_halfSlopeSeries (n : \u2115) :\n unitSlope ((halfSlopeSeries p).newtonPolygon (padicRealValuation p)) n = 1 / 2 := by\n rw [unitSlope_def, newtonPolygon_halfSlopeSeries, newtonPolygon_halfSlopeSeries,\n WithTop.untop\u2080_coe, WithTop.untop\u2080_coe]\n push_cast\n ring\n\n/-- The lower linear growth `liminf_{n \u2192 \u221e} v(a\u2099) / n` of `halfSlopeSeries p` equals `1 / 2`. -/\ntheorem linearGrowthInf_halfSlopeSeries :\n (linearGrowthInf fun n \u21a6\n (padicRealValuation p (PowerSeries.coeff n (halfSlopeSeries p))).toEReal) =\n ((1 / 2 : \u211d) : EReal) := by\n have hinf :\n {n | padicRealValuation p (PowerSeries.coeff n (halfSlopeSeries p)) \u2260 \u22a4}.Infinite := by\n simp_rw [padicRealValuation_coeff_halfSlopeSeries]\n simpa using Set.infinite_univ\n rw [linearGrowthInf_eq_iSup_unitSlope_lowerConvexEnvelope isAdmissible_halfSlopeSeries hinf,\n \u2190 newtonPolygon_def]\n simp only [unitSlope_newtonPolygon_halfSlopeSeries]\n have h0 : (0 : \u2115) \u2208 finiteEdges ((halfSlopeSeries p).newtonPolygon (padicRealValuation p)) :=\n mem_finiteEdges.mpr \u27e8by simp, by simp\u27e9\n have : Nonempty (finiteEdges ((halfSlopeSeries p).newtonPolygon (padicRealValuation p))) :=\n \u27e8\u27e80, h0\u27e9\u27e9\n exact iSup_const\n\n/-- The intrinsic coefficient radius of `\u2211_{n \u2265 0} p ^ \u2308n / 2\u2309 X ^ n` is `\u221ap`. -/\ntheorem radius_halfSlopeSeries :\n (halfSlopeSeries p).radius = ENNReal.ofReal (Real.sqrt p) := by\n rw [(halfSlopeSeries p).radius_eq_ofReal_rpow (padicRealValuation p) one_lt_p\n (fun _ hx \u21a6 norm_eq_rpow_neg_padicRealValuation hx) linearGrowthInf_halfSlopeSeries,\n Real.sqrt_eq_rpow]\n\n/-- Over `\u211a_[p]`, the pointwise convergence radius of `\u2211_{n \u2265 0} p ^ \u2308n / 2\u2309 X ^ n` is `1`. -/\ntheorem convergenceRadius_padic_halfSlopeSeries :\n (halfSlopeSeries p).convergenceRadius \u211a_[p] = 1 := by\n have hdisc : \u2200 y : \u211a_[p], \u2016y\u2016 \u2260 0 \u2192 \u2203 m : \u2124, \u2016y\u2016 = (p : \u211d) ^ m := fun y hy \u21a6\n \u27e8-y.valuation, Padic.norm_eq_zpow_neg_valuation (norm_ne_zero_iff.mp hy)\u27e9\n have hfl0 : \u230a(1 / 2 : \u211d)\u230b = 0 := Int.floor_eq_iff.mpr \u27e8by norm_num, by norm_num\u27e9\n have hfloor : (\u230a(1 / 2 : \u211d)\u230b : \u211d) < 1 / 2 := by\n rw [hfl0]\n norm_num\n have hatt : \u2203 x : \u211a_[p], \u2016x\u2016 = (p : \u211d) ^ \u230a(1 / 2 : \u211d)\u230b := \u27e81, by rw [hfl0, zpow_zero, norm_one]\u27e9\n have heq := (halfSlopeSeries p).convergenceRadius_eq_ofReal_zpow_floor\n (padicRealValuation p) one_lt_p (fun _ hx \u21a6 norm_eq_rpow_neg_padicRealValuation hx) \u211a_[p]\n hdisc linearGrowthInf_halfSlopeSeries hfloor hatt\n rwa [hfl0, zpow_zero, ENNReal.ofReal_one] at heq\n\n/-- Over `\u211a_[p]`, the pointwise convergence radius of `\u2211_{n \u2265 0} p ^ \u2308n / 2\u2309 X ^ n` is strictly\nsmaller than its intrinsic radius `\u221ap`. -/\ntheorem convergenceRadius_padic_lt_radius_halfSlopeSeries :\n (halfSlopeSeries p).convergenceRadius \u211a_[p] < (halfSlopeSeries p).radius := by\n have hsqrt : (1 : \u211d) < Real.sqrt p := by rw [Real.lt_sqrt zero_le_one, one_pow]; exact one_lt_p\n rw [convergenceRadius_padic_halfSlopeSeries, radius_halfSlopeSeries, \u2190 ENNReal.ofReal_one]\n exact ENNReal.ofReal_lt_ofReal_iff (zero_lt_one.trans hsqrt) |>.mpr hsqrt\n\n/-- Over `\u211a_[p]`, `\u2211_{n \u2265 0} p ^ \u2308n / 2\u2309 x ^ n` converges if and only if `\u2016x\u2016 \u2264 1` (i.e. on\n`Metric.closedBall (0 : \u211a_[p]) 1`). -/\ntheorem summable_halfSlopeSeries_padic_iff {x : \u211a_[p]} :\n (Summable fun n \u21a6 PowerSeries.coeff n (halfSlopeSeries p) \u2022 x ^ n) \u2194 \u2016x\u2016 \u2264 1 := by\n constructor\n \u00b7 intro hs\n have hle : \u2016x\u2016\u2091 \u2264 1 :=\n (le_convergenceRadius_of_summable hs).trans_eq convergenceRadius_padic_halfSlopeSeries\n simpa [\u2190 ofReal_norm] using hle\n \u00b7 intro hx\n have hx1 : \u2016x\u2016\u2091 \u2264 1 := by simpa [\u2190 ofReal_norm] using hx\n exact summable_of_lt_radius <|\n (hx1.trans_eq convergenceRadius_padic_halfSlopeSeries.symm).trans_lt\n convergenceRadius_padic_lt_radius_halfSlopeSeries\n\n/-- Every element `x : \u211a_[p]` with `\u2016x\u2016 \u2264 \u221ap` actually has `\u2016x\u2016 \u2264 1`, so `halfSlopeSeries p`\nconverges to `(halfSlopeSeries p).evalAt x` at every `\u211a_[p]`-point of `{x | \u2016x\u2016 \u2264 \u221ap}`, despite\nfailing `IsRestricted \u221ap`. -/\ntheorem hasSum_evalAt_halfSlopeSeries_of_norm_le_sqrt {x : \u211a_[p]} (hx : \u2016x\u2016 \u2264 Real.sqrt p) :\n HasSum (fun n \u21a6 PowerSeries.coeff n (halfSlopeSeries p) \u2022 x ^ n)\n ((halfSlopeSeries p).evalAt x) := by\n have hsqrt : Real.sqrt p < p := Real.sqrt_lt_self_iff.mpr one_lt_p\n have hx1 : \u2016x\u2016 \u2264 1 := by\n simpa using\n (Padic.norm_le_pow_iff_norm_lt_pow_add_one x 0).mpr (by simpa using hx.trans_lt hsqrt)\n simpa only [PowerSeries.evalAt_def] using (summable_halfSlopeSeries_padic_iff.mpr hx1).hasSum\n\n/-- Over `\u2102_[p]`, the pointwise convergence radius of `\u2211_{n \u2265 0} p ^ \u2308n / 2\u2309 X ^ n` equals its\nintrinsic radius `\u221ap`. -/\ntheorem convergenceRadius_padicComplex_halfSlopeSeries :\n (halfSlopeSeries p).convergenceRadius \u2102_[p] = ENNReal.ofReal (Real.sqrt p) := by\n rw [(halfSlopeSeries p).convergenceRadius_eq_radius \u2102_[p], radius_halfSlopeSeries]\n\n/-- At the boundary radius `\u221ap`, `halfSlopeSeries p` is not restricted, because its even-degree\nterms satisfy `\u2016p ^ k\u2016 * (\u221ap) ^ (2 k) = 1`. -/\ntheorem not_isRestricted_halfSlopeSeries_sqrt :\n \u00ac(halfSlopeSeries p).IsRestricted (Real.sqrt p) := by\n intro hres\n rw [_root_.PowerSeries.isRestricted_iff'] at hres\n have heven : Tendsto (fun k : \u2115 \u21a6 \u2016PowerSeries.coeff (2 * k) (halfSlopeSeries p)\u2016 *\n (Real.sqrt p) ^ (2 * k)) atTop (nhds 0) :=\n hres.comp (tendsto_id.const_mul_atTop' two_pos)\n have hconst : (fun k : \u2115 \u21a6 \u2016PowerSeries.coeff (2 * k) (halfSlopeSeries p)\u2016 *\n (Real.sqrt p) ^ (2 * k)) = fun _ \u21a6 (1 : \u211d) := by\n ext k\n simp [pow_mul, Real.sq_sqrt (p_pos (p := p)).le, (p_pos (p := p)).ne']\n rw [hconst] at heven\n exact one_ne_zero (tendsto_nhds_unique tendsto_const_nhds heven)\n\n/-- Over `\u2102_[p]`, `\u2211_{n \u2265 0} p ^ \u2308n / 2\u2309 x ^ n` converges if and only if `\u2016x\u2016 < \u221ap` (i.e. on\n`Metric.ball (0 : \u2102_[p]) \u221ap`). -/\ntheorem summable_halfSlopeSeries_padicComplex_iff {x : \u2102_[p]} :\n (Summable fun n \u21a6 PowerSeries.coeff n (halfSlopeSeries p) \u2022 x ^ n) \u2194 \u2016x\u2016 < Real.sqrt p := by\n constructor\n \u00b7 intro hs\n have hle : \u2016x\u2016 \u2264 Real.sqrt p := by\n have h := (le_convergenceRadius_of_summable hs).trans_eq\n convergenceRadius_padicComplex_halfSlopeSeries\n rw [\u2190 ofReal_norm, ENNReal.ofReal_le_ofReal_iff (Real.sqrt_nonneg p)] at h\n exact h\n exact hle.lt_of_ne fun heq \u21a6\n not_isRestricted_halfSlopeSeries_sqrt (heq \u25b8 isRestricted_norm_of_summable hs)\n \u00b7 intro hx\n refine summable_of_lt_convergenceRadius ?_\n rw [convergenceRadius_padicComplex_halfSlopeSeries, \u2190 ofReal_norm]\n exact ENNReal.ofReal_lt_ofReal_iff (Real.sqrt_pos.mpr p_pos) |>.mpr hx\n\n/-- There exist points in `\u2102_[p]` of norm strictly greater than `1` where `halfSlopeSeries p`\nconverges (for instance, any element of norm `p ^ (1 / 3)`). -/\ntheorem exists_one_lt_norm_and_summable_halfSlopeSeries :\n \u2203 x : \u2102_[p], 1 < \u2016x\u2016 \u2227\n Summable fun n \u21a6 PowerSeries.coeff n (halfSlopeSeries p) \u2022 x ^ n := by\n obtain \u27e8x, hx\u27e9 := PadicComplex.exists_norm_eq_rpow (p := p) (1 / 3 : \u211a)\n refine \u27e8x, ?_, summable_halfSlopeSeries_padicComplex_iff.mpr ?_\u27e9\n \u00b7 rw [hx]\n exact Real.one_lt_rpow one_lt_p (by norm_num)\n \u00b7 rw [hx, Real.sqrt_eq_rpow]\n exact Real.rpow_lt_rpow_left_iff one_lt_p |>.mpr (by norm_num)\n\nend HalfSlopeSeries\n\nsection PolynomialFiniteRootNorm\n\nvariable {p : \u2115} [Fact p.Prime]\n\n/-- Every root of `1 - p X ^ 2 \u2208 \u211a_[p][X]` in `\u2102_[p]` has finite positive norm `\u221ap`. -/\ntheorem norm_eq_sqrt_of_aeval_one_sub_C_mul_X_sq_eq_zero {\u03b1 : \u2102_[p]}\n (h\u03b1 : Polynomial.aeval \u03b1 (1 - Polynomial.C (p : \u211a_[p]) * Polynomial.X ^ 2) = 0) :\n \u2016\u03b1\u2016 = Real.sqrt p := by\n have h1 : 1 - (p : \u2102_[p]) * \u03b1 ^ 2 = 0 := by simpa using h\u03b1\n have hmul : \u2016(p : \u2102_[p]) * \u03b1 ^ 2\u2016 = 1 := by rw [\u2190 sub_eq_zero.mp h1, norm_one]\n rw [norm_mul, PadicComplex.norm_p, norm_pow] at hmul\n rw [(inv_mul_eq_one\u2080 (p_pos (p := p)).ne').mp hmul, Real.sqrt_sq (norm_nonneg \u03b1)]\n\n/-- The quadratic polynomial `1 - p X ^ 2 \u2208 \u211a_[p][X]` has a root in `\u2102_[p]` of norm `\u221ap`. -/\ntheorem exists_aeval_one_sub_C_mul_X_sq_eq_zero :\n \u2203 \u03b1 : \u2102_[p],\n Polynomial.aeval \u03b1 (1 - Polynomial.C (p : \u211a_[p]) * Polynomial.X ^ 2) = 0 \u2227\n \u2016\u03b1\u2016 = Real.sqrt p := by\n have hp_ne : (p : \u2102_[p]) \u2260 0 := Nat.cast_ne_zero.mpr (Fact.out : p.Prime).ne_zero\n obtain \u27e8\u03b1, h\u03b1\u27e9 := IsAlgClosed.exists_pow_nat_eq (p : \u2102_[p])\u207b\u00b9 two_pos\n have h\u03b1_root : Polynomial.aeval \u03b1 (1 - Polynomial.C (p : \u211a_[p]) * Polynomial.X ^ 2) = 0 := by\n simp [h\u03b1, mul_inv_cancel\u2080 hp_ne]\n exact \u27e8\u03b1, h\u03b1_root, norm_eq_sqrt_of_aeval_one_sub_C_mul_X_sq_eq_zero h\u03b1_root\u27e9\n\n-- Despite having roots of finite norm `\u221ap`, `1 - p X ^ 2` has infinite intrinsic and pointwise\n-- convergence radii over both `\u211a_[p]` and `\u2102_[p]`.\nexample :\n (((1 - Polynomial.C (p : \u211a_[p]) * Polynomial.X ^ 2 : Polynomial \u211a_[p]) : \u211a_[p]\u27e6X\u27e7)).radius =\n \u22a4 :=\n PowerSeries.radius_coe _\n\nexample :\n (((1 - Polynomial.C (p : \u211a_[p]) * Polynomial.X ^ 2 : Polynomial \u211a_[p]) :\n \u211a_[p]\u27e6X\u27e7)).convergenceRadius \u211a_[p] = \u22a4 :=\n PowerSeries.convergenceRadius_coe _ _\n\nexample :\n (((1 - Polynomial.C (p : \u211a_[p]) * Polynomial.X ^ 2 : Polynomial \u211a_[p]) :\n \u211a_[p]\u27e6X\u27e7)).convergenceRadius \u2102_[p] = \u22a4 :=\n PowerSeries.convergenceRadius_coe _ _\n\nend PolynomialFiniteRootNorm\n\nend TauCeti.NewtonPolygonConvergenceExample\n", "public_theorems": ["TauCeti.NewtonPolygonConvergenceExample.coeff_halfSlopeSeries", "TauCeti.NewtonPolygonConvergenceExample.padicRealValuation_coeff_halfSlopeSeries", "TauCeti.NewtonPolygonConvergenceExample.newtonPolygon_halfSlopeSeries", "TauCeti.NewtonPolygonConvergenceExample.unitSlope_newtonPolygon_halfSlopeSeries", "TauCeti.NewtonPolygonConvergenceExample.linearGrowthInf_halfSlopeSeries", "TauCeti.NewtonPolygonConvergenceExample.radius_halfSlopeSeries", "TauCeti.NewtonPolygonConvergenceExample.convergenceRadius_padic_halfSlopeSeries", "TauCeti.NewtonPolygonConvergenceExample.convergenceRadius_padic_lt_radius_halfSlopeSeries", "TauCeti.NewtonPolygonConvergenceExample.summable_halfSlopeSeries_padic_iff", "TauCeti.NewtonPolygonConvergenceExample.hasSum_evalAt_halfSlopeSeries_of_norm_le_sqrt", "TauCeti.NewtonPolygonConvergenceExample.convergenceRadius_padicComplex_halfSlopeSeries", "TauCeti.NewtonPolygonConvergenceExample.not_isRestricted_halfSlopeSeries_sqrt", "TauCeti.NewtonPolygonConvergenceExample.summable_halfSlopeSeries_padicComplex_iff", "TauCeti.NewtonPolygonConvergenceExample.exists_one_lt_norm_and_summable_halfSlopeSeries", "TauCeti.NewtonPolygonConvergenceExample.norm_eq_sqrt_of_aeval_one_sub_C_mul_X_sq_eq_zero", "TauCeti.NewtonPolygonConvergenceExample.exists_aeval_one_sub_C_mul_X_sq_eq_zero"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.NumberTheory.NewtonPolygon.Convergence\npublic import TauCeti.NumberTheory.Padics.Complex.Valuation\npublic import TauCeti.NumberTheory.Padics.LogGauge\nimport TauCeti.NumberTheory.Padics.Complex.Basic\n\n/-!\n# Explicit radii and pointwise convergence of `p`-adic power series\n\nConcrete instances comparing the intrinsic coefficient radius `PowerSeries.radius` with the\npointwise convergence radius `PowerSeries.convergenceRadius` over `\u211a_[p]` and `\u2102_[p]`, with respect\nto `TauCeti.padicRealValuation p` (normalised by `v(p) = 1`):\n\n* **Strict inequality in a discretely normed base field.** The power series\n `halfSlopeSeries p = \u2211_{n \u2265 0} p ^ \u2308n / 2\u2309 X ^ n \u2208 \u211a_[p]\u27e6X\u27e7` has coefficient valuations\n `\u2308n / 2\u2309`, whose Newton polygon is the line `n \u21a6 n / 2` of constant unit slope `1 / 2` and\n whose lower linear growth `liminf_{n \u2192 \u221e} \u2308n / 2\u2309 / n` equals `1 / 2`. Its intrinsic\n radius is therefore `\u221ap`, and over the densely normed completion `\u2102_[p]` its pointwise\n convergence radius also equals `\u221ap` (with exact convergence set `Metric.ball 0 \u221ap`, including\n points of norm strictly between `1` and `\u221ap`, and diverging on the boundary sphere `\u2016x\u2016 = \u221ap`).\n Over `\u211a_[p]`, however, every nonzero norm is an integer power of `p` (with no element of norm\n strictly between `1` and `p`), so the pointwise convergence radius rounds down to\n `p ^ \u230a1 / 2\u230b = 1 < \u221ap`: the exact convergence set in `\u211a_[p]` is `Metric.closedBall 0 1`, while\n the series still converges at every `\u211a_[p]`-point of `{x : \u211a_[p] | \u2016x\u2016 \u2264 \u221ap}` despite failing\n `IsRestricted \u221ap`.\n* **Polynomials with finite root norms still have infinite radius.** The quadratic polynomial\n `1 - p X ^ 2 \u2208 \u211a_[p][X]` has roots in `\u2102_[p]`, every one of which has finite positive norm `\u221ap`;\n nevertheless, viewed in `\u211a_[p]\u27e6X\u27e7`, its intrinsic radius and its pointwise convergence radii in\n both `\u211a_[p]` and `\u2102_[p]` are `\u22a4`.\n\n## References\n\n* N. Koblitz, *p-adic Numbers, p-adic Analysis, and Zeta-Functions*, second edition,\n Graduate Texts in Mathematics 58, Springer, 1984, Chapter IV \u00a74.\n-/\n\npublic section\n\nopen Filter LinearGrowth _root_.PowerSeries TauCeti\nopen scoped NNReal ENNReal\n\nnamespace TauCeti.NewtonPolygonConvergenceExample", "section HalfSlopeSeries", "variable (p : \u2115) [Fact p.Prime]\n\n/-- The power series `\u2211_{n \u2265 0} p ^ \u2308n / 2\u2309 X ^ n` over `\u211a_[p]`. -/\nnoncomputable def halfSlopeSeries : \u211a_[p]\u27e6X\u27e7 :=\n PowerSeries.mk fun n \u21a6 (p : \u211a_[p]) ^ \u2308(n : \u211a) / 2\u2309\u208a", "/-- The `n`-th coefficient of `halfSlopeSeries p` is `p ^ \u2308n / 2\u2309`. -/\n@[simp]\ntheorem coeff_halfSlopeSeries (n : \u2115) :\n PowerSeries.coeff n (halfSlopeSeries p) = (p : \u211a_[p]) ^ \u2308(n : \u211a) / 2\u2309\u208a :=", "variable {p}", "/-- Under `padicRealValuation p`, the `n`-th coefficient of `halfSlopeSeries p` has valuation\n`\u2308n / 2\u2309`. -/\ntheorem padicRealValuation_coeff_halfSlopeSeries (n : \u2115) :\n padicRealValuation p (PowerSeries.coeff n (halfSlopeSeries p)) =\n ((\u2308(n : \u211a) / 2\u2309\u208a : \u211d) : WithTop \u211d) :=", "/-- **Newton polygon of `\u2211 p^\u2308n/2\u2309 X\u207f`.** The Newton polygon of `halfSlopeSeries p` is the line\n`n \u21a6 n / 2`: the even-indexed coefficients sit directly on this line, while each odd-indexed\ncoefficient sits `1 / 2` above the midpoint of its two even neighbours. -/\n@[simp]\ntheorem newtonPolygon_halfSlopeSeries (n : \u2115) :\n (halfSlopeSeries p).newtonPolygon (padicRealValuation p) n =\n (((n : \u211d) / 2 : \u211d) : WithTop \u211d) :=", "/-- Every unit edge of the Newton polygon of `halfSlopeSeries p` has slope `1 / 2`. -/\n@[simp]\ntheorem unitSlope_newtonPolygon_halfSlopeSeries (n : \u2115) :\n unitSlope ((halfSlopeSeries p).newtonPolygon (padicRealValuation p)) n = 1 / 2 :=", "/-- The lower linear growth `liminf_{n \u2192 \u221e} v(a\u2099) / n` of `halfSlopeSeries p` equals `1 / 2`. -/\ntheorem linearGrowthInf_halfSlopeSeries :\n (linearGrowthInf fun n \u21a6\n (padicRealValuation p (PowerSeries.coeff n (halfSlopeSeries p))).toEReal) =\n ((1 / 2 : \u211d) : EReal) :=", "/-- The intrinsic coefficient radius of `\u2211_{n \u2265 0} p ^ \u2308n / 2\u2309 X ^ n` is `\u221ap`. -/\ntheorem radius_halfSlopeSeries :\n (halfSlopeSeries p).radius = ENNReal.ofReal (Real.sqrt p) :=", "/-- Over `\u211a_[p]`, the pointwise convergence radius of `\u2211_{n \u2265 0} p ^ \u2308n / 2\u2309 X ^ n` is `1`. -/\ntheorem convergenceRadius_padic_halfSlopeSeries :\n (halfSlopeSeries p).convergenceRadius \u211a_[p] = 1 :=", "/-- Over `\u211a_[p]`, the pointwise convergence radius of `\u2211_{n \u2265 0} p ^ \u2308n / 2\u2309 X ^ n` is strictly\nsmaller than its intrinsic radius `\u221ap`. -/\ntheorem convergenceRadius_padic_lt_radius_halfSlopeSeries :\n (halfSlopeSeries p).convergenceRadius \u211a_[p] < (halfSlopeSeries p).radius :=", "/-- Over `\u211a_[p]`, `\u2211_{n \u2265 0} p ^ \u2308n / 2\u2309 x ^ n` converges if and only if `\u2016x\u2016 \u2264 1` (i.e. on\n`Metric.closedBall (0 : \u211a_[p]) 1`). -/\ntheorem summable_halfSlopeSeries_padic_iff {x : \u211a_[p]} :\n (Summable fun n \u21a6 PowerSeries.coeff n (halfSlopeSeries p) \u2022 x ^ n) \u2194 \u2016x\u2016 \u2264 1 :=", "/-- Every element `x : \u211a_[p]` with `\u2016x\u2016 \u2264 \u221ap` actually has `\u2016x\u2016 \u2264 1`, so `halfSlopeSeries p`\nconverges to `(halfSlopeSeries p).evalAt x` at every `\u211a_[p]`-point of `{x | \u2016x\u2016 \u2264 \u221ap}`, despite\nfailing `IsRestricted \u221ap`. -/\ntheorem hasSum_evalAt_halfSlopeSeries_of_norm_le_sqrt {x : \u211a_[p]} (hx : \u2016x\u2016 \u2264 Real.sqrt p) :\n HasSum (fun n \u21a6 PowerSeries.coeff n (halfSlopeSeries p) \u2022 x ^ n)\n ((halfSlopeSeries p).evalAt x) :=", "/-- Over `\u2102_[p]`, the pointwise convergence radius of `\u2211_{n \u2265 0} p ^ \u2308n / 2\u2309 X ^ n` equals its\nintrinsic radius `\u221ap`. -/\ntheorem convergenceRadius_padicComplex_halfSlopeSeries :\n (halfSlopeSeries p).convergenceRadius \u2102_[p] = ENNReal.ofReal (Real.sqrt p) :=", "/-- At the boundary radius `\u221ap`, `halfSlopeSeries p` is not restricted, because its even-degree\nterms satisfy `\u2016p ^ k\u2016 * (\u221ap) ^ (2 k) = 1`. -/\ntheorem not_isRestricted_halfSlopeSeries_sqrt :\n \u00ac(halfSlopeSeries p).IsRestricted (Real.sqrt p) :=", "/-- Over `\u2102_[p]`, `\u2211_{n \u2265 0} p ^ \u2308n / 2\u2309 x ^ n` converges if and only if `\u2016x\u2016 < \u221ap` (i.e. on\n`Metric.ball (0 : \u2102_[p]) \u221ap`). -/\ntheorem summable_halfSlopeSeries_padicComplex_iff {x : \u2102_[p]} :\n (Summable fun n \u21a6 PowerSeries.coeff n (halfSlopeSeries p) \u2022 x ^ n) \u2194 \u2016x\u2016 < Real.sqrt p :=", "/-- There exist points in `\u2102_[p]` of norm strictly greater than `1` where `halfSlopeSeries p`\nconverges (for instance, any element of norm `p ^ (1 / 3)`). -/\ntheorem exists_one_lt_norm_and_summable_halfSlopeSeries :\n \u2203 x : \u2102_[p], 1 < \u2016x\u2016 \u2227\n Summable fun n \u21a6 PowerSeries.coeff n (halfSlopeSeries p) \u2022 x ^ n :=", "end HalfSlopeSeries\n\nsection PolynomialFiniteRootNorm\n\nvariable {p : \u2115} [Fact p.Prime]", "/-- Every root of `1 - p X ^ 2 \u2208 \u211a_[p][X]` in `\u2102_[p]` has finite positive norm `\u221ap`. -/\ntheorem norm_eq_sqrt_of_aeval_one_sub_C_mul_X_sq_eq_zero {\u03b1 : \u2102_[p]}\n (h\u03b1 : Polynomial.aeval \u03b1 (1 - Polynomial.C (p : \u211a_[p]) * Polynomial.X ^ 2) = 0) :\n \u2016\u03b1\u2016 = Real.sqrt p :=", "/-- The quadratic polynomial `1 - p X ^ 2 \u2208 \u211a_[p][X]` has a root in `\u2102_[p]` of norm `\u221ap`. -/\ntheorem exists_aeval_one_sub_C_mul_X_sq_eq_zero :\n \u2203 \u03b1 : \u2102_[p],\n Polynomial.aeval \u03b1 (1 - Polynomial.C (p : \u211a_[p]) * Polynomial.X ^ 2) = 0 \u2227\n \u2016\u03b1\u2016 = Real.sqrt p :=", "-- Despite having roots of finite norm `\u221ap`, `1 - p X ^ 2` has infinite intrinsic and pointwise\n-- convergence radii over both `\u211a_[p]` and `\u2102_[p]`.\nexample :\n (((1 - Polynomial.C (p : \u211a_[p]) * Polynomial.X ^ 2 : Polynomial \u211a_[p]) : \u211a_[p]\u27e6X\u27e7)).radius =\n \u22a4 :=\n PowerSeries.radius_coe _\n\nexample :\n (((1 - Polynomial.C (p : \u211a_[p]) * Polynomial.X ^ 2 : Polynomial \u211a_[p]) :\n \u211a_[p]\u27e6X\u27e7)).convergenceRadius \u211a_[p] = \u22a4 :=\n PowerSeries.convergenceRadius_coe _ _\n\nexample :\n (((1 - Polynomial.C (p : \u211a_[p]) * Polynomial.X ^ 2 : Polynomial \u211a_[p]) :\n \u211a_[p]\u27e6X\u27e7)).convergenceRadius \u2102_[p] = \u22a4 :=\n PowerSeries.convergenceRadius_coe _ _\n\nend PolynomialFiniteRootNorm\n\nend TauCeti.NewtonPolygonConvergenceExample"], "free_length": 6636, "file_length": 10091, "heartbeats": 13877, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.RepresentationTheory.Symmetric.Symmetrizer", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/RepresentationTheory/Symmetric/Symmetrizer.lean", "module": "TauCeti.RepresentationTheory.Symmetric.Symmetrizer", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Algebra.MonoidAlgebra.Basic\npublic import Mathlib.Algebra.Group.Subgroup.Finite\npublic import Mathlib.Combinatorics.Enumerative.Partition.YoungDiagram\npublic import Mathlib.GroupTheory.GroupAction.FixingSubgroup\npublic import Mathlib.GroupTheory.Perm.Sign\npublic import Mathlib.RepresentationTheory.Basic\npublic import Mathlib.RingTheory.HopfAlgebra.Convolution\npublic import TauCeti.Algebra.MonoidAlgebra.Antipode\npublic import TauCeti.Combinatorics.Young.StandardTableau.Reading\npublic import TauCeti.RepresentationTheory.SubgroupCharSum\npublic import TauCeti.RepresentationTheory.Symmetric.RowColumnSubgroup\npublic import TauCeti.RepresentationTheory.Symmetric.SignCharacter\n\n/-!\n# Young symmetrizers\n\nFor a Young tableau `t`, this file defines the row symmetrizer `a_t`, the column\nantisymmetrizer `b_t`, and the Young symmetrizer `c_t = a_t b_t` in the group algebra of the\nsymmetric group on the entries of `t` over any commutative ring.\n\nThe defining coefficient formulas are accompanied by the translation laws that characterize\nthe two factors: the row group fixes `a_t`, while the column group acts on `b_t` through the\nsign character. In particular, each factor squares to its subgroup order times itself.\nBoth factors are instances of a single construction: the character sum\n`\u2211_{h \u2208 H} \u03c7(h) h` of a multiplicative character over a finite subgroup,\n`TauCeti.subgroupCharSum`. The row symmetrizer is the trivial character over the row group and\nthe column antisymmetrizer is the sign character over the column group, so the coefficient\nformula, the two translation laws, the square, and the values on a trivial or full subgroup are\nread off from that shared API instead of being proved once for each factor.\nBoth factors are also fixed by the antipode `\u03c3 \u21a6 \u03c3\u207b\u00b9` of the group algebra, which therefore\nreverses the Young symmetrizer to `b_t a_t` (`TauCeti.YoungTableau.antipode_youngSymmetrizer`);\nthis is the element by which `c_t` acts on a module made a right module through `\u03c3 \u21a6 \u03c3\u207b\u00b9`.\nThese are the elementary inputs to the essential-idempotence theorem for `c_t` and the\nconstruction of Specht modules. The two extreme shapes are also evaluated here: a trivial row or\ncolumn group collapses the corresponding factor to `1`, so on a shape with at most one row the\nwhole group fixes `c_t`, and on a shape with at most one column it scales `c_t` by the sign. The\nsame two degeneracies evaluate the transported symmetrizer `youngSymmetrizerOver` outright, as the\nfull symmetrization `\u2211_\u03c3 \u03c3` and the full antisymmetrization `\u2211_\u03c3 sgn(\u03c3) \u03c3` of the group algebra.\nFinally, `b_t` acting on an arbitrary representation is unfolded into the signed sum over the\ncolumn group, which is how every downstream computation with the operator `b_t` begins.\n\nThe file closes with a third signed sum at the sign character,\n`TauCeti.antisymmetrizerOn R X`: the sum `\u2211 sgn(\u03c3) \u03c3`, over any commutative ring `R`, over the\npermutations of an arbitrary type fixing everything outside a finite set `X`. It is `b_t` with\nthe column group replaced by the pointwise fixing subgroup of the complement of `X`, so it shares\nthe coefficient formula, the translation law and the vanishing criterion with `b_t`, and it is the\nelement the Garnir relations of `TauCeti/RepresentationTheory/Symmetric/Specht/Garnir.lean` are\nstated for. Nothing about it refers to a tableau, only to the sign character\n`TauCeti.signLinearCharacter`.\n\nFor a partition `\u03bc` of `d`, `Nat.Partition.youngSymmetrizer` is the transported Young symmetrizer\nof the row-superstandard tableau of the diagram of `\u03bc`, with the labels of the diagram identified\nwith `Fin d`: the partition-indexed element `c_\u03bc \u2208 k[S_d]`.\n\nThe elementary symmetrizers and their coefficient, translation, and relabeling identities are\nvalid over any commutative ring. Their coefficients are integral sums of signs; nonvanishing of\n`c_t` needs only a nontrivial coefficient ring. The separate transport `youngSymmetrizerOver`\nretains the rational specialization as its source and also permits noncommutative target\n`\u211a`-algebras. The direct construction `youngSymmetrizer` needs no `\u211a`-algebra structure.\n\n## References\n\n* [G. D. James, *The Representation Theory of the Symmetric Groups*][james1978], Chapter 2.\n-/\n\npublic section\n\nnamespace TauCeti\n\nopen scoped BigOperators\n\nnamespace YoungTableau\n\nvariable {R : Type*} [CommRing R] {\u03bc : YoungDiagram}\n\nnoncomputable section\n\n/-- Classical decidability of membership in the row group, used to form its finite sum. -/\nlocal instance decidablePredMemRowSubgroup (t : YoungTableau \u03bc) :\n DecidablePred (\u00b7 \u2208 rowSubgroup t) :=\n Classical.decPred _\n\n/-- Classical decidability of membership in the column group, used to form its finite sum. -/\nlocal instance decidablePredMemColSubgroup (t : YoungTableau \u03bc) :\n DecidablePred (\u00b7 \u2208 colSubgroup t) :=\n Classical.decPred _\n\n/-- The **row symmetrizer** `a_t`, the sum of the permutations preserving the rows of `t`. -/\ndef rowSymmetrizer (t : YoungTableau \u03bc) :\n MonoidAlgebra R (Equiv.Perm (Fin \u03bc.card)) :=\n \u2211 p : rowSubgroup t, MonoidAlgebra.of R (Equiv.Perm (Fin \u03bc.card)) p\n\n/-- The **column antisymmetrizer** `b_t`, the signed sum of the permutations preserving the\ncolumns of `t`. -/\ndef columnAntisymmetrizer (t : YoungTableau \u03bc) :\n MonoidAlgebra R (Equiv.Perm (Fin \u03bc.card)) :=\n \u2211 q : colSubgroup t,\n ((Equiv.Perm.sign (q : Equiv.Perm (Fin \u03bc.card)) : \u2124) : R) \u2022\n MonoidAlgebra.of R (Equiv.Perm (Fin \u03bc.card)) q\n\n/-- The **Young symmetrizer** of `t`, with the convention `c_t = a_t b_t`. On a left module it\nacts by column-antisymmetrization followed by row-symmetrization. -/\ndef youngSymmetrizer (t : YoungTableau \u03bc) :\n MonoidAlgebra R (Equiv.Perm (Fin \u03bc.card)) :=\n rowSymmetrizer (R := R) t * columnAntisymmetrizer (R := R) t\n\n/-- The row symmetrizer is the sum of the basis elements indexed by the row group. -/\ntheorem rowSymmetrizer_def (t : YoungTableau \u03bc) :\n rowSymmetrizer (R := R) t =\n \u2211 p : rowSubgroup t, MonoidAlgebra.of R (Equiv.Perm (Fin \u03bc.card)) p :=\n (rfl)\n\n/-- The column antisymmetrizer is the sign-weighted sum of the basis elements indexed by the\ncolumn group. -/\ntheorem columnAntisymmetrizer_def (t : YoungTableau \u03bc) :\n columnAntisymmetrizer (R := R) t =\n \u2211 q : colSubgroup t,\n ((Equiv.Perm.sign (q : Equiv.Perm (Fin \u03bc.card)) : \u2124) : R) \u2022\n MonoidAlgebra.of R (Equiv.Perm (Fin \u03bc.card)) q :=\n (rfl)\n\n/-- The Young symmetrizer is the product `c_t = a_t b_t`. -/\ntheorem youngSymmetrizer_def (t : YoungTableau \u03bc) :\n youngSymmetrizer (R := R) t = rowSymmetrizer (R := R) t * columnAntisymmetrizer (R := R) t :=\n (rfl)\n\n/-- The row symmetrizer is the character sum of the trivial character over the row group. -/\ntheorem rowSymmetrizer_eq_subgroupCharSum (t : YoungTableau \u03bc) :\n rowSymmetrizer (R := R) t = subgroupCharSum 1 (rowSubgroup t) := by\n rw [rowSymmetrizer_def, subgroupCharSum_def]\n simp\n\n/-- The column antisymmetrizer is the character sum of the sign character over the column\ngroup. -/\ntheorem columnAntisymmetrizer_eq_subgroupCharSum (t : YoungTableau \u03bc) :\n columnAntisymmetrizer (R := R) t =\n subgroupCharSum ((Units.coeHom R).comp (signLinearCharacter R (Fin \u03bc.card)))\n (colSubgroup t) := by\n rw [columnAntisymmetrizer_def, subgroupCharSum_def]\n simp\n\n/-- The antipode `\u03c3 \u21a6 \u03c3\u207b\u00b9` of the group algebra fixes the row symmetrizer, since the row group is\nclosed under inversion. -/\n@[simp]\ntheorem antipode_rowSymmetrizer (t : YoungTableau \u03bc) :\n HopfAlgebra.antipode R (rowSymmetrizer (R := R) t) = rowSymmetrizer t := by\n rw [rowSymmetrizer_eq_subgroupCharSum]\n exact antipode_subgroupCharSum _ _ fun _ _ => by simp\n\n/-- The antipode `\u03c3 \u21a6 \u03c3\u207b\u00b9` of the group algebra fixes the column antisymmetrizer, since the\ncolumn group is closed under inversion and `sgn(\u03c3\u207b\u00b9) = sgn(\u03c3)`. -/\n@[simp]\ntheorem antipode_columnAntisymmetrizer (t : YoungTableau \u03bc) :\n HopfAlgebra.antipode R (columnAntisymmetrizer (R := R) t) = columnAntisymmetrizer t := by\n rw [columnAntisymmetrizer_eq_subgroupCharSum]\n exact antipode_subgroupCharSum _ _ fun _ _ => by\n simp only [MonoidHom.coe_comp, Function.comp_apply, Units.coeHom_apply,\n coe_signLinearCharacter_apply, Equiv.Perm.sign_inv]\n\n/-- **The antipode reverses the Young symmetrizer**: `S(a_t b_t) = b_t a_t`. -/\n@[simp]\ntheorem antipode_youngSymmetrizer (t : YoungTableau \u03bc) :\n HopfAlgebra.antipode R (youngSymmetrizer (R := R) t) =\n columnAntisymmetrizer t * rowSymmetrizer t := by\n rw [youngSymmetrizer_def, HopfAlgebra.antipode_mul_antidistrib, antipode_rowSymmetrizer,\n antipode_columnAntisymmetrizer]\n\n/-- The coefficient of a permutation in the row symmetrizer is its row-group indicator. -/\n@[simp]\ntheorem rowSymmetrizer_coeff (t : YoungTableau \u03bc) (\u03c3 : Equiv.Perm (Fin \u03bc.card)) :\n (rowSymmetrizer (R := R) t).coeff \u03c3 = if \u03c3 \u2208 rowSubgroup t then 1 else 0 := by\n rw [rowSymmetrizer_eq_subgroupCharSum, subgroupCharSum_coeff]\n simp\n\n/-- The coefficient of a permutation in the column antisymmetrizer is its sign on the column\ngroup and zero off that group. -/\n@[simp]\ntheorem columnAntisymmetrizer_coeff (t : YoungTableau \u03bc) (\u03c3 : Equiv.Perm (Fin \u03bc.card)) :\n (columnAntisymmetrizer (R := R) t).coeff \u03c3 =\n if \u03c3 \u2208 colSubgroup t then ((Equiv.Perm.sign \u03c3 : \u2124) : R) else 0 := by\n rw [columnAntisymmetrizer_eq_subgroupCharSum, subgroupCharSum_coeff]\n simp\n\n/-- Left multiplication by a member of the row group fixes the row symmetrizer. -/\n@[simp]\ntheorem mul_rowSymmetrizer_left (t : YoungTableau \u03bc) (p : rowSubgroup t) :\n MonoidAlgebra.single (p : Equiv.Perm (Fin \u03bc.card)) 1 * rowSymmetrizer (R := R) t =\n rowSymmetrizer (R := R) t := by\n rw [rowSymmetrizer_eq_subgroupCharSum, single_mul_subgroupCharSum]\n simp\n\n/-- Right multiplication by a member of the row group fixes the row symmetrizer. -/\n@[simp]\ntheorem mul_rowSymmetrizer_right (t : YoungTableau \u03bc) (p : rowSubgroup t) :\n rowSymmetrizer (R := R) t * MonoidAlgebra.single (p : Equiv.Perm (Fin \u03bc.card)) 1 =\n rowSymmetrizer (R := R) t := by\n rw [rowSymmetrizer_eq_subgroupCharSum, subgroupCharSum_mul_single]\n simp\n\n/-- Left multiplication by a member of the column group scales the column antisymmetrizer by\nthe sign of that member. -/\n@[simp]\ntheorem mul_columnAntisymmetrizer_left (t : YoungTableau \u03bc) (q : colSubgroup t) :\n MonoidAlgebra.single (q : Equiv.Perm (Fin \u03bc.card)) 1 * columnAntisymmetrizer (R := R) t =\n ((Equiv.Perm.sign (q : Equiv.Perm (Fin \u03bc.card)) : \u2124) : R) \u2022\n columnAntisymmetrizer (R := R) t := by\n rw [columnAntisymmetrizer_eq_subgroupCharSum, single_mul_subgroupCharSum]\n simp only [MonoidHom.coe_comp, Function.comp_apply, Units.coeHom_apply,\n coe_signLinearCharacter_apply, Equiv.Perm.sign_inv]\n\n/-- Right multiplication by a member of the column group scales the column antisymmetrizer by\nthe sign of that member. -/\n@[simp]\ntheorem mul_columnAntisymmetrizer_right (t : YoungTableau \u03bc) (q : colSubgroup t) :\n columnAntisymmetrizer (R := R) t * MonoidAlgebra.single (q : Equiv.Perm (Fin \u03bc.card)) 1 =\n ((Equiv.Perm.sign (q : Equiv.Perm (Fin \u03bc.card)) : \u2124) : R) \u2022\n columnAntisymmetrizer (R := R) t := by\n rw [columnAntisymmetrizer_eq_subgroupCharSum, subgroupCharSum_mul_single]\n simp only [MonoidHom.coe_comp, Function.comp_apply, Units.coeHom_apply,\n coe_signLinearCharacter_apply, Equiv.Perm.sign_inv]\n\n/-- The row symmetrizer squares to the order of the row group times itself. -/\n@[simp]\ntheorem rowSymmetrizer_sq (t : YoungTableau \u03bc) :\n rowSymmetrizer (R := R) t * rowSymmetrizer (R := R) t =\n Nat.card (rowSubgroup t) \u2022 rowSymmetrizer (R := R) t := by\n rw [rowSymmetrizer_eq_subgroupCharSum, subgroupCharSum_mul_self]\n\n/-- The column antisymmetrizer squares to the order of the column group times itself. -/\n@[simp]\ntheorem columnAntisymmetrizer_sq (t : YoungTableau \u03bc) :\n columnAntisymmetrizer (R := R) t * columnAntisymmetrizer (R := R) t =\n Nat.card (colSubgroup t) \u2022 columnAntisymmetrizer (R := R) t := by\n rw [columnAntisymmetrizer_eq_subgroupCharSum, subgroupCharSum_mul_self]\n\n/-- The row group fixes the Young symmetrizer on the left. -/\n@[simp]\ntheorem mul_youngSymmetrizer_left (t : YoungTableau \u03bc) (p : rowSubgroup t) :\n MonoidAlgebra.single (p : Equiv.Perm (Fin \u03bc.card)) 1 * youngSymmetrizer (R := R) t =\n youngSymmetrizer (R := R) t := by\n rw [youngSymmetrizer_def, \u2190 mul_assoc, mul_rowSymmetrizer_left]\n\n/-- The column group acts on the Young symmetrizer on the right through its sign character. -/\n@[simp]\ntheorem mul_youngSymmetrizer_right (t : YoungTableau \u03bc) (q : colSubgroup t) :\n youngSymmetrizer (R := R) t * MonoidAlgebra.single (q : Equiv.Perm (Fin \u03bc.card)) 1 =\n ((Equiv.Perm.sign (q : Equiv.Perm (Fin \u03bc.card)) : \u2124) : R) \u2022\n youngSymmetrizer (R := R) t := by\n rw [youngSymmetrizer_def, mul_assoc, mul_columnAntisymmetrizer_right, mul_smul_comm]\n\n/-- The coefficient of the identity permutation in a Young symmetrizer is one. -/\n@[simp]\ntheorem youngSymmetrizer_coeff_one (t : YoungTableau \u03bc) :\n (youngSymmetrizer (R := R) t).coeff 1 = 1 := by\n rw [youngSymmetrizer_def, rowSymmetrizer_def, columnAntisymmetrizer_def,\n Finset.sum_mul]\n simp only [Finset.mul_sum, MonoidAlgebra.coeff_sum, MonoidAlgebra.of_apply]\n simp only [Finsupp.finsetSum_apply, MonoidAlgebra.coeff_single_mul_apply,\n MonoidAlgebra.coeff_smul_apply, MonoidAlgebra.coeff_single,\n Finsupp.single_apply, one_mul]\n have heq (p : rowSubgroup t) (q : colSubgroup t) :\n (q : Equiv.Perm (Fin \u03bc.card)) =\n (p : Equiv.Perm (Fin \u03bc.card))\u207b\u00b9 * 1 \u2194 p = 1 \u2227 q = 1 := by\n refine \u27e8fun h \u21a6 ?_, ?_\u27e9\n \u00b7 have hpq := Subgroup.disjoint_iff_mul_eq_one.mp\n (disjoint_rowSubgroup_colSubgroup t) p.property q.property (by simp [h])\n exact \u27e8Subtype.ext hpq.1, Subtype.ext hpq.2\u27e9\n \u00b7 rintro \u27e8rfl, rfl\u27e9\n simp\n simp_rw [heq]\n rw [Finset.sum_eq_single (1 : rowSubgroup t)]\n \u00b7 rw [Finset.sum_eq_single (1 : colSubgroup t)]\n \u00b7 simp\n \u00b7 intro q _ hq\n simp [hq]\n \u00b7 simp\n \u00b7 exact fun p _ hp => by simp [hp]\n \u00b7 simp\n\n/-- The coefficient of a row-group permutation in a Young symmetrizer is one: the row group\ntranslates `c_t` to itself, so all of its coefficients on the row group agree with the\ncoefficient at the identity. -/\ntheorem youngSymmetrizer_coeff_eq_one_of_mem_rowSubgroup (t : YoungTableau \u03bc)\n {p : Equiv.Perm (Fin \u03bc.card)} (hp : p \u2208 rowSubgroup t) :\n (youngSymmetrizer (R := R) t).coeff p = 1 := by\n have h := congrArg (fun x => MonoidAlgebra.coeff x p) (mul_youngSymmetrizer_left (R := R) t\n \u27e8p, hp\u27e9)\n simpa using h.symm\n\n/-- A Young symmetrizer is nonzero. -/\n@[simp]\ntheorem youngSymmetrizer_ne_zero [Nontrivial R] (t : YoungTableau \u03bc) :\n youngSymmetrizer (R := R) t \u2260 0 := by\n intro h\n have := congrArg (fun x =>\n x.coeff (1 : Equiv.Perm (Fin \u03bc.card))) h\n simp at this\n\n/-! ### The symmetrizers of an extreme shape -/\n\n/-- A trivial row group leaves the row symmetrizer as the empty symmetrization, `1`. -/\ntheorem rowSymmetrizer_eq_one (t : YoungTableau \u03bc) (h : rowSubgroup t = \u22a5) :\n rowSymmetrizer (R := R) t = 1 := by\n rw [rowSymmetrizer_eq_subgroupCharSum, subgroupCharSum_eq_one _ _ h]\n\n/-- A trivial column group leaves the column antisymmetrizer as the empty antisymmetrization,\n`1`. -/\ntheorem columnAntisymmetrizer_eq_one (t : YoungTableau \u03bc) (h : colSubgroup t = \u22a5) :\n columnAntisymmetrizer (R := R) t = 1 := by\n rw [columnAntisymmetrizer_eq_subgroupCharSum, subgroupCharSum_eq_one _ _ h]\n\n/-- With a trivial column group the Young symmetrizer is the row symmetrizer. -/\ntheorem youngSymmetrizer_eq_rowSymmetrizer (t : YoungTableau \u03bc) (h : colSubgroup t = \u22a5) :\n youngSymmetrizer (R := R) t = rowSymmetrizer (R := R) t := by\n rw [youngSymmetrizer_def, columnAntisymmetrizer_eq_one t h, mul_one]\n\n/-- With a trivial row group the Young symmetrizer is the column antisymmetrizer. -/\ntheorem youngSymmetrizer_eq_columnAntisymmetrizer (t : YoungTableau \u03bc) (h : rowSubgroup t = \u22a5) :\n youngSymmetrizer (R := R) t = columnAntisymmetrizer (R := R) t := by\n rw [youngSymmetrizer_def, rowSymmetrizer_eq_one t h, one_mul]\n\n/-- On a shape with at most one row every group element fixes the Young symmetrizer. -/\ntheorem single_mul_youngSymmetrizer_of_rowSubgroup_eq_top (t : YoungTableau \u03bc)\n (h : rowSubgroup t = \u22a4) (g : Equiv.Perm (Fin \u03bc.card)) :\n MonoidAlgebra.single g (1 : R) * youngSymmetrizer (R := R) t = youngSymmetrizer (R := R) t :=\n mul_youngSymmetrizer_left t \u27e8g, by rw [h]; exact Subgroup.mem_top g\u27e9\n\n/-- On a shape with at most one column every group element scales the Young symmetrizer by its\nsign. -/\ntheorem single_mul_youngSymmetrizer_of_colSubgroup_eq_top (t : YoungTableau \u03bc)\n (h : colSubgroup t = \u22a4) (g : Equiv.Perm (Fin \u03bc.card)) :\n MonoidAlgebra.single g (1 : R) * youngSymmetrizer (R := R) t =\n ((Equiv.Perm.sign g : \u2124) : R) \u2022 youngSymmetrizer (R := R) t := by\n rw [youngSymmetrizer_eq_columnAntisymmetrizer t (rowSubgroup_eq_bot_of_colSubgroup_eq_top t h)]\n exact mul_columnAntisymmetrizer_left t \u27e8g, by rw [h]; exact Subgroup.mem_top g\u27e9\n\n/-! ### The column antisymmetrizer as an operator -/\n\n/-- The column antisymmetrizer of `t` acts on any representation as the signed sum of the\npermutations in the column group of `t`. -/\ntheorem asAlgebraHom_columnAntisymmetrizer_apply {V : Type*} [AddCommGroup V] [Module R V]\n (\u03c1 : Representation R (Equiv.Perm (Fin \u03bc.card)) V) (t : YoungTableau \u03bc) (v : V) :\n \u03c1.asAlgebraHom (columnAntisymmetrizer (R := R) t) v =\n \u2211 q : colSubgroup t,\n ((Equiv.Perm.sign (q : Equiv.Perm (Fin \u03bc.card)) : \u2124) : R) \u2022 \u03c1 q v := by\n rw [columnAntisymmetrizer_eq_subgroupCharSum, asAlgebraHom_subgroupCharSum_apply]\n simp\n\nsection Transport\n\nvariable (k : Type*) [Semiring k] [Algebra \u211a k]\n\n/-- The Young symmetrizer `c_t` with the coefficients of its rational form transported into a\n`\u211a`-algebra `k`, so that it can act on a `k`-module. The algebra `k` need not be commutative.\n\nThis transport uses the rational specialization as its source. The direct\n`youngSymmetrizer` construction is available over every commutative ring without an\n`\u211a`-algebra hypothesis. -/\ndef youngSymmetrizerOver (t : YoungTableau \u03bc) :\n MonoidAlgebra k (Equiv.Perm (Fin \u03bc.card)) :=\n MonoidAlgebra.mapAlgHom _ (Algebra.ofId \u211a k) (youngSymmetrizer t)\n\n/-- The transport of a Young symmetrizer applies the structure map of the algebra to every\ncoefficient. -/\ntheorem youngSymmetrizerOver_def (t : YoungTableau \u03bc) :\n youngSymmetrizerOver k t =\n MonoidAlgebra.mapAlgHom _ (Algebra.ofId \u211a k) (youngSymmetrizer t) :=\n (rfl)\n\n/-- The coefficients of the transported Young symmetrizer are the images of the rational\ncoefficients. -/\n@[simp]\ntheorem youngSymmetrizerOver_coeff (t : YoungTableau \u03bc) (\u03c3 : Equiv.Perm (Fin \u03bc.card)) :\n (youngSymmetrizerOver k t).coeff \u03c3 = algebraMap \u211a k ((youngSymmetrizer t).coeff \u03c3) := by\n rw [youngSymmetrizerOver_def, MonoidAlgebra.coeff_mapAlgHom, Algebra.ofId_apply]\n\n/-- **The column group acts on the transported Young symmetrizer through its sign character.**\nThe sign acts as a rational scalar, using the `\u211a`-algebra structure of `k`. -/\n@[simp]\ntheorem mul_youngSymmetrizerOver_right (t : YoungTableau \u03bc) (q : colSubgroup t) :\n youngSymmetrizerOver k t * MonoidAlgebra.single (q : Equiv.Perm (Fin \u03bc.card)) 1 =\n ((Equiv.Perm.sign (q : Equiv.Perm (Fin \u03bc.card)) : \u2124) : \u211a) \u2022 youngSymmetrizerOver k t := by\n have h := congrArg (MonoidAlgebra.mapAlgHom (Equiv.Perm (Fin \u03bc.card)) (Algebra.ofId \u211a k))\n (mul_youngSymmetrizer_right t q)\n rw [map_mul, MonoidAlgebra.mapAlgHom_single, map_one, map_smul] at h\n rwa [youngSymmetrizerOver_def]\n\n/-- **The Young symmetrizer of a shape with at most one row is the full symmetrization**\n`\u2211_\u03c3 \u03c3`: the row group is everything and the column group is trivial. -/\ntheorem youngSymmetrizerOver_eq_sum_of_rowSubgroup_eq_top (t : YoungTableau \u03bc)\n (h : rowSubgroup t = \u22a4) :\n youngSymmetrizerOver k t =\n \u2211 \u03c3 : Equiv.Perm (Fin \u03bc.card), MonoidAlgebra.of k (Equiv.Perm (Fin \u03bc.card)) \u03c3 := by\n rw [youngSymmetrizerOver_def,\n youngSymmetrizer_eq_rowSymmetrizer t (colSubgroup_eq_bot_of_rowSubgroup_eq_top t h),\n rowSymmetrizer_eq_subgroupCharSum, subgroupCharSum_eq_sum_of_eq_top _ _ h, map_sum]\n refine Finset.sum_congr rfl fun \u03c3 _ => ?_\n rw [MonoidHom.one_apply, one_smul, MonoidAlgebra.of_apply, MonoidAlgebra.mapAlgHom_single,\n map_one, MonoidAlgebra.of_apply]\n\nend Transport\n\nsection TransportRing\n\n-- The signed sum below uses the target ring's `\u2124`-action.\nvariable (k : Type*) [Ring k] [Algebra \u211a k]\n\n/-- **The Young symmetrizer of a shape with at most one column is the full antisymmetrization**\n`\u2211_\u03c3 sgn(\u03c3) \u03c3`: the column group is everything and the row group is trivial. -/\ntheorem youngSymmetrizerOver_eq_sum_of_colSubgroup_eq_top (t : YoungTableau \u03bc)\n (h : colSubgroup t = \u22a4) :\n youngSymmetrizerOver k t =\n \u2211 \u03c3 : Equiv.Perm (Fin \u03bc.card),\n (Equiv.Perm.sign \u03c3 : \u2124) \u2022 MonoidAlgebra.of k (Equiv.Perm (Fin \u03bc.card)) \u03c3 := by\n rw [youngSymmetrizerOver_def,\n youngSymmetrizer_eq_columnAntisymmetrizer t (rowSubgroup_eq_bot_of_colSubgroup_eq_top t h),\n columnAntisymmetrizer_eq_subgroupCharSum, subgroupCharSum_eq_sum_of_eq_top _ _ h, map_sum]\n refine Finset.sum_congr rfl fun \u03c3 _ => ?_\n simp only [MonoidHom.coe_comp, Function.comp_apply, Units.coeHom_apply,\n coe_signLinearCharacter_apply]\n rw [Int.cast_smul_eq_zsmul \u211a, map_zsmul, MonoidAlgebra.of_apply,\n MonoidAlgebra.mapAlgHom_single, map_one, MonoidAlgebra.of_apply]\n\nend TransportRing\n\nend\n\nend YoungTableau\n\n/-! ## The antisymmetrizer of a set of points\n\nThe signed sum over the permutations supported in a finite set is the character sum of the sign\ncharacter over the pointwise fixing subgroup of the complement. Nothing below refers to a\ntableau, only to `TauCeti.signLinearCharacter`. -/\n\nsection AntisymmetrizerOn\n\nvariable (R : Type*) [CommRing R] {\u03b1 : Type*} [DecidableEq \u03b1] [Fintype \u03b1]\n\n/-- Classical decidability of membership in the subgroup of permutations fixing everything outside\na finite set, used to form its finite sum. -/\nnoncomputable local instance decidablePredMemFixingSubgroupCompl (X : Finset \u03b1) :\n DecidablePred (\u00b7 \u2208 fixingSubgroup (Equiv.Perm \u03b1) ((X : Set \u03b1)\u1d9c)) :=\n Classical.decPred _\n\n/-- The **antisymmetrizer** of a finite set `X` of points: the signed sum `\u2211 sgn(\u03c3) \u03c3`, in the\ngroup algebra of `Equiv.Perm \u03b1` over a commutative ring `R`, over the permutations `\u03c3` fixing every\npoint outside `X`.\n\nFor `X` the labels lying in one column of a Young tableau this is the factor of that tableau's\ncolumn antisymmetrizer belonging to that column; the relations it satisfies on the polytabloids of\na tableau are the Garnir relations. -/\nnoncomputable def antisymmetrizerOn (X : Finset \u03b1) : MonoidAlgebra R (Equiv.Perm \u03b1) :=\n subgroupCharSum ((Units.coeHom R).comp (signLinearCharacter R \u03b1))\n (fixingSubgroup (Equiv.Perm \u03b1) ((X : Set \u03b1)\u1d9c))\n\n/-- Unfolding `TauCeti.antisymmetrizerOn X`: the signed sum over the subgroup of permutations\nfixing every point outside `X`. -/\ntheorem antisymmetrizerOn_def (X : Finset \u03b1) :\n antisymmetrizerOn R X =\n subgroupCharSum ((Units.coeHom R).comp (signLinearCharacter R \u03b1))\n (fixingSubgroup (Equiv.Perm \u03b1) ((X : Set \u03b1)\u1d9c)) :=\n (rfl)\n\nvariable {R}\n\nomit [DecidableEq \u03b1] [Fintype \u03b1] in\n/-- A permutation fixing every point outside `X` belongs to the subgroup the antisymmetrizer of\n`X` is summed over. -/\nprivate theorem mem_fixingSubgroup_compl_of_forall_notMem {X : Finset \u03b1} {\u03c3 : Equiv.Perm \u03b1}\n (h\u03c3 : \u2200 k \u2209 X, \u03c3 k = k) : \u03c3 \u2208 fixingSubgroup (Equiv.Perm \u03b1) ((X : Set \u03b1)\u1d9c) :=\n (mem_fixingSubgroup_iff _).mpr fun k hk => h\u03c3 k (by simpa using hk)\n\n/-- The coefficient of a permutation in `TauCeti.antisymmetrizerOn X` is its sign if it is\nsupported in `X`, and zero otherwise. -/\n@[simp]\ntheorem antisymmetrizerOn_coeff (X : Finset \u03b1) (\u03c3 : Equiv.Perm \u03b1) :\n (antisymmetrizerOn R X).coeff \u03c3 =\n if \u2200 k \u2209 X, \u03c3 k = k then ((Equiv.Perm.sign \u03c3 : \u2124) : R) else 0 := by\n classical\n rw [antisymmetrizerOn_def, subgroupCharSum_coeff]\n simp [mem_fixingSubgroup_iff]\n\n/-- A permutation lies in the `Finset` of those fixing every point outside `X` iff it lies in the\nsubgroup that `TauCeti.antisymmetrizerOn X` is summed over. -/\nprivate theorem mem_filter_forall_notMem_iff (X : Finset \u03b1)\n [DecidablePred fun \u03c3 : Equiv.Perm \u03b1 => \u2200 k \u2209 X, \u03c3 k = k] (\u03c3 : Equiv.Perm \u03b1) :\n \u03c3 \u2208 ({\u03c3 : Equiv.Perm \u03b1 | \u2200 k \u2209 X, \u03c3 k = k} : Finset (Equiv.Perm \u03b1)) \u2194\n \u03c3 \u2208 fixingSubgroup (Equiv.Perm \u03b1) ((X : Set \u03b1)\u1d9c) := by\n simp [mem_fixingSubgroup_iff]\n\n/-- The antisymmetrizer of a set, acting on a representation of the symmetric group, is the signed\nsum of the actions of the permutations fixing everything outside that set.\n\nThe decidability of the summation range is an instance argument rather than a synthesized one, so\nthat the equation rewrites a sum however its own filter was built. -/\ntheorem asAlgebraHom_antisymmetrizerOn_apply {M : Type*} [AddCommGroup M] [Module R M]\n (V : Representation R (Equiv.Perm \u03b1) M) (X : Finset \u03b1)\n [DecidablePred fun \u03c3 : Equiv.Perm \u03b1 => \u2200 k \u2209 X, \u03c3 k = k] (v : M) :\n V.asAlgebraHom (antisymmetrizerOn R X) v =\n \u2211 \u03c3 \u2208 {\u03c3 : Equiv.Perm \u03b1 | \u2200 k \u2209 X, \u03c3 k = k},\n ((Equiv.Perm.sign \u03c3 : \u2124) : R) \u2022 V \u03c3 v := by\n rw [antisymmetrizerOn_def, asAlgebraHom_subgroupCharSum_apply,\n \u2190 Finset.sum_subtype _ (mem_filter_forall_notMem_iff X)\n (fun \u03c3 => ((Units.coeHom R).comp (signLinearCharacter R \u03b1)) \u03c3 \u2022 V \u03c3 v)]\n simp\n\n/-- **Right multiplication by a permutation supported in `X` scales the antisymmetrizer of `X` by\nits sign**, since the antisymmetrizer absorbs it up to that sign. -/\n@[simp]\ntheorem antisymmetrizerOn_mul_single {X : Finset \u03b1} {p : Equiv.Perm \u03b1} (hp : \u2200 k \u2209 X, p k = k) :\n antisymmetrizerOn R X * MonoidAlgebra.single p (1 : R) =\n ((Equiv.Perm.sign p : \u2124) : R) \u2022 antisymmetrizerOn R X := by\n rw [antisymmetrizerOn_def,\n subgroupCharSum_mul_single _ _ \u27e8p, mem_fixingSubgroup_compl_of_forall_notMem hp\u27e9]\n simp only [MonoidHom.coe_comp, Function.comp_apply, Units.coeHom_apply,\n coe_signLinearCharacter_apply, Equiv.Perm.sign_inv]\n\n/-- **A signed sum annihilates whatever an odd permutation in it fixes.** If an odd permutation\nsupported in `X` fixes `v`, then the antisymmetrizer of `X` kills `v`: absorbing that permutation\nnegates the sum while leaving `v` alone, so twice the result vanishes, and doubling is assumed\ninjective on `M` (automatic over a `\u211a`-module). -/\ntheorem asAlgebraHom_antisymmetrizerOn_apply_eq_zero {M : Type*} [AddCommGroup M] [Module R M]\n (h2 : Function.Injective fun w : M => (2 : \u2115) \u2022 w)\n (V : Representation R (Equiv.Perm \u03b1) M) {X : Finset \u03b1} {p : Equiv.Perm \u03b1}\n (hp : \u2200 k \u2209 X, p k = k) (hsign : Equiv.Perm.sign p = -1) {v : M} (hv : V p v = v) :\n V.asAlgebraHom (antisymmetrizerOn R X) v = 0 := by\n rw [antisymmetrizerOn_def]\n refine asAlgebraHom_subgroupCharSum_apply_eq_zero _ _ h2 V\n (mem_fixingSubgroup_compl_of_forall_notMem hp) ?_ hv\n simp only [MonoidHom.coe_comp, Function.comp_apply, Units.coeHom_apply,\n coe_signLinearCharacter_apply, Equiv.Perm.sign_inv, hsign, Units.val_neg, Units.val_one,\n Int.cast_neg, Int.cast_one]\n\nend AntisymmetrizerOn\n\nend TauCeti\n\nnamespace Nat.Partition\n\nopen TauCeti\n\nvariable {d : \u2115} (\u03bc : d.Partition) (k : Type*) [CommSemiring k] [Algebra \u211a k]\n\n/-- **The Young symmetrizer of a partition** `\u03bc` of `d`, as an element of `k[S_d]`: the Young\nsymmetrizer `c_t = a_t b_t` of the row-superstandard tableau `t` of the diagram of `\u03bc`, transported\nto `k` and with the labels of the diagram identified with `Fin d` along\n`YoungDiagram.card_ofPartition`. This is the identification along which `TauCeti.spechtModule \u03bc`\nis a representation of `S_d`. -/\nnoncomputable def youngSymmetrizer : MonoidAlgebra k (Equiv.Perm (Fin d)) :=\n MonoidAlgebra.domCongr k k (finCongr (YoungDiagram.card_ofPartition \u03bc)).permCongrHom\n (YoungTableau.youngSymmetrizerOver k\n (StandardYoungTableau.rowSuperstandard (YoungDiagram.ofPartition \u03bc)).toTableau)\n\n/-- The Young symmetrizer of a partition is the transported Young symmetrizer of the\nrow-superstandard tableau of its diagram. -/\ntheorem youngSymmetrizer_def :\n \u03bc.youngSymmetrizer k =\n MonoidAlgebra.domCongr k k (finCongr (YoungDiagram.card_ofPartition \u03bc)).permCongrHom\n (YoungTableau.youngSymmetrizerOver k\n (StandardYoungTableau.rowSuperstandard (YoungDiagram.ofPartition \u03bc)).toTableau) :=\n (rfl)\n\n/-- The coefficient of the identity in the Young symmetrizer is `1`. -/\n@[simp]\ntheorem youngSymmetrizer_coeff_one : (\u03bc.youngSymmetrizer k).coeff 1 = 1 := by\n rw [youngSymmetrizer_def, MonoidAlgebra.coeff_domCongr, map_one,\n YoungTableau.youngSymmetrizerOver_coeff, YoungTableau.youngSymmetrizer_coeff_one, map_one]\n\nend Nat.Partition\n", "public_theorems": ["TauCeti.YoungTableau.rowSymmetrizer_def", "TauCeti.YoungTableau.columnAntisymmetrizer_def", "TauCeti.YoungTableau.youngSymmetrizer_def", "TauCeti.YoungTableau.rowSymmetrizer_eq_subgroupCharSum", "TauCeti.YoungTableau.columnAntisymmetrizer_eq_subgroupCharSum", "TauCeti.YoungTableau.antipode_rowSymmetrizer", "TauCeti.YoungTableau.antipode_columnAntisymmetrizer", "TauCeti.YoungTableau.antipode_youngSymmetrizer", "TauCeti.YoungTableau.rowSymmetrizer_coeff", "TauCeti.YoungTableau.columnAntisymmetrizer_coeff", "TauCeti.YoungTableau.mul_rowSymmetrizer_left", "TauCeti.YoungTableau.mul_rowSymmetrizer_right", "TauCeti.YoungTableau.mul_columnAntisymmetrizer_left", "TauCeti.YoungTableau.mul_columnAntisymmetrizer_right", "TauCeti.YoungTableau.rowSymmetrizer_sq", "TauCeti.YoungTableau.columnAntisymmetrizer_sq", "TauCeti.YoungTableau.mul_youngSymmetrizer_left", "TauCeti.YoungTableau.mul_youngSymmetrizer_right", "TauCeti.YoungTableau.youngSymmetrizer_coeff_one", "TauCeti.YoungTableau.youngSymmetrizer_coeff_eq_one_of_mem_rowSubgroup", "TauCeti.YoungTableau.youngSymmetrizer_ne_zero", "TauCeti.YoungTableau.rowSymmetrizer_eq_one", "TauCeti.YoungTableau.columnAntisymmetrizer_eq_one", "TauCeti.YoungTableau.youngSymmetrizer_eq_rowSymmetrizer", "TauCeti.YoungTableau.youngSymmetrizer_eq_columnAntisymmetrizer", "TauCeti.YoungTableau.single_mul_youngSymmetrizer_of_rowSubgroup_eq_top", "TauCeti.YoungTableau.single_mul_youngSymmetrizer_of_colSubgroup_eq_top", "TauCeti.YoungTableau.asAlgebraHom_columnAntisymmetrizer_apply", "TauCeti.YoungTableau.youngSymmetrizerOver_def", "TauCeti.YoungTableau.youngSymmetrizerOver_coeff", "TauCeti.YoungTableau.mul_youngSymmetrizerOver_right", "TauCeti.YoungTableau.youngSymmetrizerOver_eq_sum_of_rowSubgroup_eq_top", "TauCeti.YoungTableau.youngSymmetrizerOver_eq_sum_of_colSubgroup_eq_top", "TauCeti.antisymmetrizerOn_def", "TauCeti.antisymmetrizerOn_coeff", "TauCeti.asAlgebraHom_antisymmetrizerOn_apply", "TauCeti.antisymmetrizerOn_mul_single", "TauCeti.asAlgebraHom_antisymmetrizerOn_apply_eq_zero", "Nat.Partition.youngSymmetrizer_def", "Nat.Partition.youngSymmetrizer_coeff_one"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Algebra.MonoidAlgebra.Basic\npublic import Mathlib.Algebra.Group.Subgroup.Finite\npublic import Mathlib.Combinatorics.Enumerative.Partition.YoungDiagram\npublic import Mathlib.GroupTheory.GroupAction.FixingSubgroup\npublic import Mathlib.GroupTheory.Perm.Sign\npublic import Mathlib.RepresentationTheory.Basic\npublic import Mathlib.RingTheory.HopfAlgebra.Convolution\npublic import TauCeti.Algebra.MonoidAlgebra.Antipode\npublic import TauCeti.Combinatorics.Young.StandardTableau.Reading\npublic import TauCeti.RepresentationTheory.SubgroupCharSum\npublic import TauCeti.RepresentationTheory.Symmetric.RowColumnSubgroup\npublic import TauCeti.RepresentationTheory.Symmetric.SignCharacter\n\n/-!\n# Young symmetrizers\n\nFor a Young tableau `t`, this file defines the row symmetrizer `a_t`, the column\nantisymmetrizer `b_t`, and the Young symmetrizer `c_t = a_t b_t` in the group algebra of the\nsymmetric group on the entries of `t` over any commutative ring.\n\nThe defining coefficient formulas are accompanied by the translation laws that characterize\nthe two factors: the row group fixes `a_t`, while the column group acts on `b_t` through the\nsign character. In particular, each factor squares to its subgroup order times itself.\nBoth factors are instances of a single construction: the character sum\n`\u2211_{h \u2208 H} \u03c7(h) h` of a multiplicative character over a finite subgroup,\n`TauCeti.subgroupCharSum`. The row symmetrizer is the trivial character over the row group and\nthe column antisymmetrizer is the sign character over the column group, so the coefficient\nformula, the two translation laws, the square, and the values on a trivial or full subgroup are\nread off from that shared API instead of being proved once for each factor.\nBoth factors are also fixed by the antipode `\u03c3 \u21a6 \u03c3\u207b\u00b9` of the group algebra, which therefore\nreverses the Young symmetrizer to `b_t a_t` (`TauCeti.YoungTableau.antipode_youngSymmetrizer`);\nthis is the element by which `c_t` acts on a module made a right module through `\u03c3 \u21a6 \u03c3\u207b\u00b9`.\nThese are the elementary inputs to the essential-idempotence theorem for `c_t` and the\nconstruction of Specht modules. The two extreme shapes are also evaluated here: a trivial row or\ncolumn group collapses the corresponding factor to `1`, so on a shape with at most one row the\nwhole group fixes `c_t`, and on a shape with at most one column it scales `c_t` by the sign. The\nsame two degeneracies evaluate the transported symmetrizer `youngSymmetrizerOver` outright, as the\nfull symmetrization `\u2211_\u03c3 \u03c3` and the full antisymmetrization `\u2211_\u03c3 sgn(\u03c3) \u03c3` of the group algebra.\nFinally, `b_t` acting on an arbitrary representation is unfolded into the signed sum over the\ncolumn group, which is how every downstream computation with the operator `b_t` begins.\n\nThe file closes with a third signed sum at the sign character,\n`TauCeti.antisymmetrizerOn R X`: the sum `\u2211 sgn(\u03c3) \u03c3`, over any commutative ring `R`, over the\npermutations of an arbitrary type fixing everything outside a finite set `X`. It is `b_t` with\nthe column group replaced by the pointwise fixing subgroup of the complement of `X`, so it shares\nthe coefficient formula, the translation law and the vanishing criterion with `b_t`, and it is the\nelement the Garnir relations of `TauCeti/RepresentationTheory/Symmetric/Specht/Garnir.lean` are\nstated for. Nothing about it refers to a tableau, only to the sign character\n`TauCeti.signLinearCharacter`.\n\nFor a partition `\u03bc` of `d`, `Nat.Partition.youngSymmetrizer` is the transported Young symmetrizer\nof the row-superstandard tableau of the diagram of `\u03bc`, with the labels of the diagram identified\nwith `Fin d`: the partition-indexed element `c_\u03bc \u2208 k[S_d]`.\n\nThe elementary symmetrizers and their coefficient, translation, and relabeling identities are\nvalid over any commutative ring. Their coefficients are integral sums of signs; nonvanishing of\n`c_t` needs only a nontrivial coefficient ring. The separate transport `youngSymmetrizerOver`\nretains the rational specialization as its source and also permits noncommutative target\n`\u211a`-algebras. The direct construction `youngSymmetrizer` needs no `\u211a`-algebra structure.\n\n## References\n\n* [G. D. James, *The Representation Theory of the Symmetric Groups*][james1978], Chapter 2.\n-/\n\npublic section\n\nnamespace TauCeti\n\nopen scoped BigOperators\n\nnamespace YoungTableau\n\nvariable {R : Type*} [CommRing R] {\u03bc : YoungDiagram}\n\nnoncomputable section\n\n/-- Classical decidability of membership in the row group, used to form its finite sum. -/\nlocal instance decidablePredMemRowSubgroup (t : YoungTableau \u03bc) :\n DecidablePred (\u00b7 \u2208 rowSubgroup t) :=\n Classical.decPred _\n\n/-- Classical decidability of membership in the column group, used to form its finite sum. -/\nlocal instance decidablePredMemColSubgroup (t : YoungTableau \u03bc) :\n DecidablePred (\u00b7 \u2208 colSubgroup t) :=\n Classical.decPred _\n\n/-- The **row symmetrizer** `a_t`, the sum of the permutations preserving the rows of `t`. -/\ndef rowSymmetrizer (t : YoungTableau \u03bc) :\n MonoidAlgebra R (Equiv.Perm (Fin \u03bc.card)) :=\n \u2211 p : rowSubgroup t, MonoidAlgebra.of R (Equiv.Perm (Fin \u03bc.card)) p\n\n/-- The **column antisymmetrizer** `b_t`, the signed sum of the permutations preserving the\ncolumns of `t`. -/\ndef columnAntisymmetrizer (t : YoungTableau \u03bc) :\n MonoidAlgebra R (Equiv.Perm (Fin \u03bc.card)) :=\n \u2211 q : colSubgroup t,\n ((Equiv.Perm.sign (q : Equiv.Perm (Fin \u03bc.card)) : \u2124) : R) \u2022\n MonoidAlgebra.of R (Equiv.Perm (Fin \u03bc.card)) q\n\n/-- The **Young symmetrizer** of `t`, with the convention `c_t = a_t b_t`. On a left module it\nacts by column-antisymmetrization followed by row-symmetrization. -/\ndef youngSymmetrizer (t : YoungTableau \u03bc) :\n MonoidAlgebra R (Equiv.Perm (Fin \u03bc.card)) :=\n rowSymmetrizer (R := R) t * columnAntisymmetrizer (R := R) t", "/-- The row symmetrizer is the sum of the basis elements indexed by the row group. -/\ntheorem rowSymmetrizer_def (t : YoungTableau \u03bc) :\n rowSymmetrizer (R := R) t =\n \u2211 p : rowSubgroup t, MonoidAlgebra.of R (Equiv.Perm (Fin \u03bc.card)) p :=", "/-- The column antisymmetrizer is the sign-weighted sum of the basis elements indexed by the\ncolumn group. -/\ntheorem columnAntisymmetrizer_def (t : YoungTableau \u03bc) :\n columnAntisymmetrizer (R := R) t =\n \u2211 q : colSubgroup t,\n ((Equiv.Perm.sign (q : Equiv.Perm (Fin \u03bc.card)) : \u2124) : R) \u2022\n MonoidAlgebra.of R (Equiv.Perm (Fin \u03bc.card)) q :=", "/-- The Young symmetrizer is the product `c_t = a_t b_t`. -/\ntheorem youngSymmetrizer_def (t : YoungTableau \u03bc) :\n youngSymmetrizer (R := R) t = rowSymmetrizer (R := R) t * columnAntisymmetrizer (R := R) t :=", "/-- The row symmetrizer is the character sum of the trivial character over the row group. -/\ntheorem rowSymmetrizer_eq_subgroupCharSum (t : YoungTableau \u03bc) :\n rowSymmetrizer (R := R) t = subgroupCharSum 1 (rowSubgroup t) :=", "/-- The column antisymmetrizer is the character sum of the sign character over the column\ngroup. -/\ntheorem columnAntisymmetrizer_eq_subgroupCharSum (t : YoungTableau \u03bc) :\n columnAntisymmetrizer (R := R) t =\n subgroupCharSum ((Units.coeHom R).comp (signLinearCharacter R (Fin \u03bc.card)))\n (colSubgroup t) :=", "/-- The antipode `\u03c3 \u21a6 \u03c3\u207b\u00b9` of the group algebra fixes the row symmetrizer, since the row group is\nclosed under inversion. -/\n@[simp]\ntheorem antipode_rowSymmetrizer (t : YoungTableau \u03bc) :\n HopfAlgebra.antipode R (rowSymmetrizer (R := R) t) = rowSymmetrizer t :=", "/-- The antipode `\u03c3 \u21a6 \u03c3\u207b\u00b9` of the group algebra fixes the column antisymmetrizer, since the\ncolumn group is closed under inversion and `sgn(\u03c3\u207b\u00b9) = sgn(\u03c3)`. -/\n@[simp]\ntheorem antipode_columnAntisymmetrizer (t : YoungTableau \u03bc) :\n HopfAlgebra.antipode R (columnAntisymmetrizer (R := R) t) = columnAntisymmetrizer t :=", "/-- **The antipode reverses the Young symmetrizer**: `S(a_t b_t) = b_t a_t`. -/\n@[simp]\ntheorem antipode_youngSymmetrizer (t : YoungTableau \u03bc) :\n HopfAlgebra.antipode R (youngSymmetrizer (R := R) t) =\n columnAntisymmetrizer t * rowSymmetrizer t :=", "/-- The coefficient of a permutation in the row symmetrizer is its row-group indicator. -/\n@[simp]\ntheorem rowSymmetrizer_coeff (t : YoungTableau \u03bc) (\u03c3 : Equiv.Perm (Fin \u03bc.card)) :\n (rowSymmetrizer (R := R) t).coeff \u03c3 = if \u03c3 \u2208 rowSubgroup t then 1 else 0 :=", "/-- The coefficient of a permutation in the column antisymmetrizer is its sign on the column\ngroup and zero off that group. -/\n@[simp]\ntheorem columnAntisymmetrizer_coeff (t : YoungTableau \u03bc) (\u03c3 : Equiv.Perm (Fin \u03bc.card)) :\n (columnAntisymmetrizer (R := R) t).coeff \u03c3 =\n if \u03c3 \u2208 colSubgroup t then ((Equiv.Perm.sign \u03c3 : \u2124) : R) else 0 :=", "/-- Left multiplication by a member of the row group fixes the row symmetrizer. -/\n@[simp]\ntheorem mul_rowSymmetrizer_left (t : YoungTableau \u03bc) (p : rowSubgroup t) :\n MonoidAlgebra.single (p : Equiv.Perm (Fin \u03bc.card)) 1 * rowSymmetrizer (R := R) t =\n rowSymmetrizer (R := R) t :=", "/-- Right multiplication by a member of the row group fixes the row symmetrizer. -/\n@[simp]\ntheorem mul_rowSymmetrizer_right (t : YoungTableau \u03bc) (p : rowSubgroup t) :\n rowSymmetrizer (R := R) t * MonoidAlgebra.single (p : Equiv.Perm (Fin \u03bc.card)) 1 =\n rowSymmetrizer (R := R) t :=", "/-- Left multiplication by a member of the column group scales the column antisymmetrizer by\nthe sign of that member. -/\n@[simp]\ntheorem mul_columnAntisymmetrizer_left (t : YoungTableau \u03bc) (q : colSubgroup t) :\n MonoidAlgebra.single (q : Equiv.Perm (Fin \u03bc.card)) 1 * columnAntisymmetrizer (R := R) t =\n ((Equiv.Perm.sign (q : Equiv.Perm (Fin \u03bc.card)) : \u2124) : R) \u2022\n columnAntisymmetrizer (R := R) t :=", "/-- Right multiplication by a member of the column group scales the column antisymmetrizer by\nthe sign of that member. -/\n@[simp]\ntheorem mul_columnAntisymmetrizer_right (t : YoungTableau \u03bc) (q : colSubgroup t) :\n columnAntisymmetrizer (R := R) t * MonoidAlgebra.single (q : Equiv.Perm (Fin \u03bc.card)) 1 =\n ((Equiv.Perm.sign (q : Equiv.Perm (Fin \u03bc.card)) : \u2124) : R) \u2022\n columnAntisymmetrizer (R := R) t :=", "/-- The row symmetrizer squares to the order of the row group times itself. -/\n@[simp]\ntheorem rowSymmetrizer_sq (t : YoungTableau \u03bc) :\n rowSymmetrizer (R := R) t * rowSymmetrizer (R := R) t =\n Nat.card (rowSubgroup t) \u2022 rowSymmetrizer (R := R) t :=", "/-- The column antisymmetrizer squares to the order of the column group times itself. -/\n@[simp]\ntheorem columnAntisymmetrizer_sq (t : YoungTableau \u03bc) :\n columnAntisymmetrizer (R := R) t * columnAntisymmetrizer (R := R) t =\n Nat.card (colSubgroup t) \u2022 columnAntisymmetrizer (R := R) t :=", "/-- The row group fixes the Young symmetrizer on the left. -/\n@[simp]\ntheorem mul_youngSymmetrizer_left (t : YoungTableau \u03bc) (p : rowSubgroup t) :\n MonoidAlgebra.single (p : Equiv.Perm (Fin \u03bc.card)) 1 * youngSymmetrizer (R := R) t =\n youngSymmetrizer (R := R) t :=", "/-- The column group acts on the Young symmetrizer on the right through its sign character. -/\n@[simp]\ntheorem mul_youngSymmetrizer_right (t : YoungTableau \u03bc) (q : colSubgroup t) :\n youngSymmetrizer (R := R) t * MonoidAlgebra.single (q : Equiv.Perm (Fin \u03bc.card)) 1 =\n ((Equiv.Perm.sign (q : Equiv.Perm (Fin \u03bc.card)) : \u2124) : R) \u2022\n youngSymmetrizer (R := R) t :=", "/-- The coefficient of the identity permutation in a Young symmetrizer is one. -/\n@[simp]\ntheorem youngSymmetrizer_coeff_one (t : YoungTableau \u03bc) :\n (youngSymmetrizer (R := R) t).coeff 1 = 1 :=", "/-- The coefficient of a row-group permutation in a Young symmetrizer is one: the row group\ntranslates `c_t` to itself, so all of its coefficients on the row group agree with the\ncoefficient at the identity. -/\ntheorem youngSymmetrizer_coeff_eq_one_of_mem_rowSubgroup (t : YoungTableau \u03bc)\n {p : Equiv.Perm (Fin \u03bc.card)} (hp : p \u2208 rowSubgroup t) :\n (youngSymmetrizer (R := R) t).coeff p = 1 :=", "/-- A Young symmetrizer is nonzero. -/\n@[simp]\ntheorem youngSymmetrizer_ne_zero [Nontrivial R] (t : YoungTableau \u03bc) :\n youngSymmetrizer (R := R) t \u2260 0 :=", "/-! ### The symmetrizers of an extreme shape -/", "/-- A trivial row group leaves the row symmetrizer as the empty symmetrization, `1`. -/\ntheorem rowSymmetrizer_eq_one (t : YoungTableau \u03bc) (h : rowSubgroup t = \u22a5) :\n rowSymmetrizer (R := R) t = 1 :=", "/-- A trivial column group leaves the column antisymmetrizer as the empty antisymmetrization,\n`1`. -/\ntheorem columnAntisymmetrizer_eq_one (t : YoungTableau \u03bc) (h : colSubgroup t = \u22a5) :\n columnAntisymmetrizer (R := R) t = 1 :=", "/-- With a trivial column group the Young symmetrizer is the row symmetrizer. -/\ntheorem youngSymmetrizer_eq_rowSymmetrizer (t : YoungTableau \u03bc) (h : colSubgroup t = \u22a5) :\n youngSymmetrizer (R := R) t = rowSymmetrizer (R := R) t :=", "/-- With a trivial row group the Young symmetrizer is the column antisymmetrizer. -/\ntheorem youngSymmetrizer_eq_columnAntisymmetrizer (t : YoungTableau \u03bc) (h : rowSubgroup t = \u22a5) :\n youngSymmetrizer (R := R) t = columnAntisymmetrizer (R := R) t :=", "/-- On a shape with at most one row every group element fixes the Young symmetrizer. -/\ntheorem single_mul_youngSymmetrizer_of_rowSubgroup_eq_top (t : YoungTableau \u03bc)\n (h : rowSubgroup t = \u22a4) (g : Equiv.Perm (Fin \u03bc.card)) :\n MonoidAlgebra.single g (1 : R) * youngSymmetrizer (R := R) t = youngSymmetrizer (R := R) t :=", "/-- On a shape with at most one column every group element scales the Young symmetrizer by its\nsign. -/\ntheorem single_mul_youngSymmetrizer_of_colSubgroup_eq_top (t : YoungTableau \u03bc)\n (h : colSubgroup t = \u22a4) (g : Equiv.Perm (Fin \u03bc.card)) :\n MonoidAlgebra.single g (1 : R) * youngSymmetrizer (R := R) t =\n ((Equiv.Perm.sign g : \u2124) : R) \u2022 youngSymmetrizer (R := R) t :=", "/-! ### The column antisymmetrizer as an operator -/", "/-- The column antisymmetrizer of `t` acts on any representation as the signed sum of the\npermutations in the column group of `t`. -/\ntheorem asAlgebraHom_columnAntisymmetrizer_apply {V : Type*} [AddCommGroup V] [Module R V]\n (\u03c1 : Representation R (Equiv.Perm (Fin \u03bc.card)) V) (t : YoungTableau \u03bc) (v : V) :\n \u03c1.asAlgebraHom (columnAntisymmetrizer (R := R) t) v =\n \u2211 q : colSubgroup t,\n ((Equiv.Perm.sign (q : Equiv.Perm (Fin \u03bc.card)) : \u2124) : R) \u2022 \u03c1 q v :=", "section Transport\n\nvariable (k : Type*) [Semiring k] [Algebra \u211a k]\n\n/-- The Young symmetrizer `c_t` with the coefficients of its rational form transported into a\n`\u211a`-algebra `k`, so that it can act on a `k`-module. The algebra `k` need not be commutative.\n\nThis transport uses the rational specialization as its source. The direct\n`youngSymmetrizer` construction is available over every commutative ring without an\n`\u211a`-algebra hypothesis. -/\ndef youngSymmetrizerOver (t : YoungTableau \u03bc) :\n MonoidAlgebra k (Equiv.Perm (Fin \u03bc.card)) :=\n MonoidAlgebra.mapAlgHom _ (Algebra.ofId \u211a k) (youngSymmetrizer t)", "/-- The transport of a Young symmetrizer applies the structure map of the algebra to every\ncoefficient. -/\ntheorem youngSymmetrizerOver_def (t : YoungTableau \u03bc) :\n youngSymmetrizerOver k t =\n MonoidAlgebra.mapAlgHom _ (Algebra.ofId \u211a k) (youngSymmetrizer t) :=", "/-- The coefficients of the transported Young symmetrizer are the images of the rational\ncoefficients. -/\n@[simp]\ntheorem youngSymmetrizerOver_coeff (t : YoungTableau \u03bc) (\u03c3 : Equiv.Perm (Fin \u03bc.card)) :\n (youngSymmetrizerOver k t).coeff \u03c3 = algebraMap \u211a k ((youngSymmetrizer t).coeff \u03c3) :=", "/-- **The column group acts on the transported Young symmetrizer through its sign character.**\nThe sign acts as a rational scalar, using the `\u211a`-algebra structure of `k`. -/\n@[simp]\ntheorem mul_youngSymmetrizerOver_right (t : YoungTableau \u03bc) (q : colSubgroup t) :\n youngSymmetrizerOver k t * MonoidAlgebra.single (q : Equiv.Perm (Fin \u03bc.card)) 1 =\n ((Equiv.Perm.sign (q : Equiv.Perm (Fin \u03bc.card)) : \u2124) : \u211a) \u2022 youngSymmetrizerOver k t :=", "/-- **The Young symmetrizer of a shape with at most one row is the full symmetrization**\n`\u2211_\u03c3 \u03c3`: the row group is everything and the column group is trivial. -/\ntheorem youngSymmetrizerOver_eq_sum_of_rowSubgroup_eq_top (t : YoungTableau \u03bc)\n (h : rowSubgroup t = \u22a4) :\n youngSymmetrizerOver k t =\n \u2211 \u03c3 : Equiv.Perm (Fin \u03bc.card), MonoidAlgebra.of k (Equiv.Perm (Fin \u03bc.card)) \u03c3 :=", "end Transport\n\nsection TransportRing\n\n-- The signed sum below uses the target ring's `\u2124`-action.\nvariable (k : Type*) [Ring k] [Algebra \u211a k]", "/-- **The Young symmetrizer of a shape with at most one column is the full antisymmetrization**\n`\u2211_\u03c3 sgn(\u03c3) \u03c3`: the column group is everything and the row group is trivial. -/\ntheorem youngSymmetrizerOver_eq_sum_of_colSubgroup_eq_top (t : YoungTableau \u03bc)\n (h : colSubgroup t = \u22a4) :\n youngSymmetrizerOver k t =\n \u2211 \u03c3 : Equiv.Perm (Fin \u03bc.card),\n (Equiv.Perm.sign \u03c3 : \u2124) \u2022 MonoidAlgebra.of k (Equiv.Perm (Fin \u03bc.card)) \u03c3 :=", "end TransportRing\n\nend\n\nend YoungTableau\n\n/-! ## The antisymmetrizer of a set of points\n\nThe signed sum over the permutations supported in a finite set is the character sum of the sign\ncharacter over the pointwise fixing subgroup of the complement. Nothing below refers to a\ntableau, only to `TauCeti.signLinearCharacter`. -/\n\nsection AntisymmetrizerOn\n\nvariable (R : Type*) [CommRing R] {\u03b1 : Type*} [DecidableEq \u03b1] [Fintype \u03b1]\n\n/-- Classical decidability of membership in the subgroup of permutations fixing everything outside\na finite set, used to form its finite sum. -/\nnoncomputable local instance decidablePredMemFixingSubgroupCompl (X : Finset \u03b1) :\n DecidablePred (\u00b7 \u2208 fixingSubgroup (Equiv.Perm \u03b1) ((X : Set \u03b1)\u1d9c)) :=\n Classical.decPred _\n\n/-- The **antisymmetrizer** of a finite set `X` of points: the signed sum `\u2211 sgn(\u03c3) \u03c3`, in the\ngroup algebra of `Equiv.Perm \u03b1` over a commutative ring `R`, over the permutations `\u03c3` fixing every\npoint outside `X`.\n\nFor `X` the labels lying in one column of a Young tableau this is the factor of that tableau's\ncolumn antisymmetrizer belonging to that column; the relations it satisfies on the polytabloids of\na tableau are the Garnir relations. -/\nnoncomputable def antisymmetrizerOn (X : Finset \u03b1) : MonoidAlgebra R (Equiv.Perm \u03b1) :=\n subgroupCharSum ((Units.coeHom R).comp (signLinearCharacter R \u03b1))\n (fixingSubgroup (Equiv.Perm \u03b1) ((X : Set \u03b1)\u1d9c))", "/-- Unfolding `TauCeti.antisymmetrizerOn X`: the signed sum over the subgroup of permutations\nfixing every point outside `X`. -/\ntheorem antisymmetrizerOn_def (X : Finset \u03b1) :\n antisymmetrizerOn R X =\n subgroupCharSum ((Units.coeHom R).comp (signLinearCharacter R \u03b1))\n (fixingSubgroup (Equiv.Perm \u03b1) ((X : Set \u03b1)\u1d9c)) :=", "variable {R}", "/-- The coefficient of a permutation in `TauCeti.antisymmetrizerOn X` is its sign if it is\nsupported in `X`, and zero otherwise. -/\n@[simp]\ntheorem antisymmetrizerOn_coeff (X : Finset \u03b1) (\u03c3 : Equiv.Perm \u03b1) :\n (antisymmetrizerOn R X).coeff \u03c3 =\n if \u2200 k \u2209 X, \u03c3 k = k then ((Equiv.Perm.sign \u03c3 : \u2124) : R) else 0 :=", "/-- The antisymmetrizer of a set, acting on a representation of the symmetric group, is the signed\nsum of the actions of the permutations fixing everything outside that set.\n\nThe decidability of the summation range is an instance argument rather than a synthesized one, so\nthat the equation rewrites a sum however its own filter was built. -/\ntheorem asAlgebraHom_antisymmetrizerOn_apply {M : Type*} [AddCommGroup M] [Module R M]\n (V : Representation R (Equiv.Perm \u03b1) M) (X : Finset \u03b1)\n [DecidablePred fun \u03c3 : Equiv.Perm \u03b1 => \u2200 k \u2209 X, \u03c3 k = k] (v : M) :\n V.asAlgebraHom (antisymmetrizerOn R X) v =\n \u2211 \u03c3 \u2208 {\u03c3 : Equiv.Perm \u03b1 | \u2200 k \u2209 X, \u03c3 k = k},\n ((Equiv.Perm.sign \u03c3 : \u2124) : R) \u2022 V \u03c3 v :=", "/-- **Right multiplication by a permutation supported in `X` scales the antisymmetrizer of `X` by\nits sign**, since the antisymmetrizer absorbs it up to that sign. -/\n@[simp]\ntheorem antisymmetrizerOn_mul_single {X : Finset \u03b1} {p : Equiv.Perm \u03b1} (hp : \u2200 k \u2209 X, p k = k) :\n antisymmetrizerOn R X * MonoidAlgebra.single p (1 : R) =\n ((Equiv.Perm.sign p : \u2124) : R) \u2022 antisymmetrizerOn R X :=", "/-- **A signed sum annihilates whatever an odd permutation in it fixes.** If an odd permutation\nsupported in `X` fixes `v`, then the antisymmetrizer of `X` kills `v`: absorbing that permutation\nnegates the sum while leaving `v` alone, so twice the result vanishes, and doubling is assumed\ninjective on `M` (automatic over a `\u211a`-module). -/\ntheorem asAlgebraHom_antisymmetrizerOn_apply_eq_zero {M : Type*} [AddCommGroup M] [Module R M]\n (h2 : Function.Injective fun w : M => (2 : \u2115) \u2022 w)\n (V : Representation R (Equiv.Perm \u03b1) M) {X : Finset \u03b1} {p : Equiv.Perm \u03b1}\n (hp : \u2200 k \u2209 X, p k = k) (hsign : Equiv.Perm.sign p = -1) {v : M} (hv : V p v = v) :\n V.asAlgebraHom (antisymmetrizerOn R X) v = 0 :=", "end AntisymmetrizerOn\n\nend TauCeti\n\nnamespace Nat.Partition\n\nopen TauCeti\n\nvariable {d : \u2115} (\u03bc : d.Partition) (k : Type*) [CommSemiring k] [Algebra \u211a k]\n\n/-- **The Young symmetrizer of a partition** `\u03bc` of `d`, as an element of `k[S_d]`: the Young\nsymmetrizer `c_t = a_t b_t` of the row-superstandard tableau `t` of the diagram of `\u03bc`, transported\nto `k` and with the labels of the diagram identified with `Fin d` along\n`YoungDiagram.card_ofPartition`. This is the identification along which `TauCeti.spechtModule \u03bc`\nis a representation of `S_d`. -/\nnoncomputable def youngSymmetrizer : MonoidAlgebra k (Equiv.Perm (Fin d)) :=\n MonoidAlgebra.domCongr k k (finCongr (YoungDiagram.card_ofPartition \u03bc)).permCongrHom\n (YoungTableau.youngSymmetrizerOver k\n (StandardYoungTableau.rowSuperstandard (YoungDiagram.ofPartition \u03bc)).toTableau)", "/-- The Young symmetrizer of a partition is the transported Young symmetrizer of the\nrow-superstandard tableau of its diagram. -/\ntheorem youngSymmetrizer_def :\n \u03bc.youngSymmetrizer k =\n MonoidAlgebra.domCongr k k (finCongr (YoungDiagram.card_ofPartition \u03bc)).permCongrHom\n (YoungTableau.youngSymmetrizerOver k\n (StandardYoungTableau.rowSuperstandard (YoungDiagram.ofPartition \u03bc)).toTableau) :=", "/-- The coefficient of the identity in the Young symmetrizer is `1`. -/\n@[simp]\ntheorem youngSymmetrizer_coeff_one : (\u03bc.youngSymmetrizer k).coeff 1 = 1 :=", "end Nat.Partition"], "free_length": 6022, "file_length": 16845, "heartbeats": 17111, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Analysis.Convex.SimplicialComplex.Relative", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Analysis/Convex/SimplicialComplex/Relative.lean", "module": "TauCeti.Analysis.Convex.SimplicialComplex.Relative", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Analysis.Convex.SimplicialComplex.Subdivision\nimport TauCeti.Analysis.Convex.SimplicialComplex.Carrier\nimport TauCeti.Analysis.Convex.Extreme\n\n/-!\n# Extending a subdivision of a subcomplex\n\nFor a locally finite complex in a finite-dimensional real normed space, a locally finite\nsubdivision of a subcomplex extends to a locally finite subdivision of the whole complex,\nwithout changing the prescribed triangulation on the subcomplex.\nThis is the relative subdivision theorem used to make triangulations agree on overlaps.\n\nThe restriction of a subdivision to any original simplex triangulates that simplex.\nConsequently the prescribed triangulation meets each remaining simplex in a subcomplex\nof its boundary, and the cell-extension theorem applies to the remaining simplices.\n\nReference: Rourke--Sanderson, *Introduction to Piecewise-Linear Topology*, Chapter 2,\nrelative subdivisions of simplicial complexes. The construction uses the cell-coning\nextension in `TauCeti.Analysis.Convex.SimplicialComplex.Subdivision`.\n-/\n\npublic section\n\nopen Set\n\nnamespace Geometry.SimplicialComplex\n\nsection LinearOrderedField\n\nvariable {\ud835\udd5c E : Type*} [Field \ud835\udd5c] [LinearOrder \ud835\udd5c] [IsStrictOrderedRing \ud835\udd5c]\n [AddCommGroup E] [Module \ud835\udd5c E] {K L A : SimplicialComplex \ud835\udd5c E} {s : Finset E}\n\n/-- A subdivision of a subcomplex restricts to its intersection with every simplex of the\ncontaining complex. -/\ntheorem IsSubdivision.space_restrict_of_le (h : L.IsSubdivision A) (hAK : A \u2264 K)\n (hs : s \u2208 K.faces) :\n (L.restrict (convexHull \ud835\udd5c (s : Set E))).space = L.space \u2229 convexHull \ud835\udd5c (s : Set E) := by\n classical\n refine (space_restrict_subset (convex_convexHull \ud835\udd5c _)).antisymm ?_\n rintro x \u27e8hxL, hxs\u27e9\n obtain \u27e8t, ht, hxt\u27e9 := mem_space_iff.mp hxL\n obtain \u27e8u, hu, htu\u27e9 := h.exists_convexHull_subset ht\n have hext : IsExtreme \ud835\udd5c (convexHull \ud835\udd5c (u : Set E))\n (convexHull \ud835\udd5c ((u : Set E) \u2229 s)) := by\n have him : ((\u2191) : u \u2192 E) '' {v : u | (v : E) \u2208 s} = (u : Set E) \u2229 s := by\n ext v\n simp [and_comm]\n have hr : range ((\u2191) : u \u2192 E) = (u : Set E) := by\n ext v\n simp\n simpa only [hr, him] using\n (K.indep (hAK hu)).isExtreme_convexHull {v : u | (v : E) \u2208 s}\n have hxus := K.inter_subset_convexHull (hAK hu) hs \u27e8htu hxt, hxs\u27e9\n have hx' := hext.convexHull_inter_subset htu \u27e8hxt, hxus\u27e9\n have hsub : (t : Set E) \u2229 convexHull \ud835\udd5c ((u : Set E) \u2229 s) \u2286\n \u2191(t.filter fun v => v \u2208 convexHull \ud835\udd5c (s : Set E)) := by\n intro v hv\n exact Finset.mem_filter.mpr \u27e8hv.1, convexHull_mono inter_subset_right hv.2\u27e9\n have hxfilter := convexHull_mono hsub hx'\n have hne := convexHull_nonempty_iff.mp (Set.nonempty_of_mem hxfilter)\n exact mem_space_iff.mpr \u27e8_, mem_restrict_faces.mpr\n \u27e8L.down_closed ht (Finset.filter_subset _ _) hne,\n fun v hv => (Finset.mem_filter.mp hv).2\u27e9, hxfilter\u27e9\n\n/-- The restriction of a subdivision to an original simplex triangulates that simplex. -/\ntheorem IsSubdivision.space_restrict (h : L.IsSubdivision K) (hs : s \u2208 K.faces) :\n (L.restrict (convexHull \ud835\udd5c (s : Set E))).space = convexHull \ud835\udd5c (s : Set E) := by\n rw [h.space_restrict_of_le le_rfl hs, h.space_eq,\n inter_eq_right.mpr (convexHull_subset_space hs)]\n\nend LinearOrderedField\n\nvariable {E : Type*} [NormedAddCommGroup E] [NormedSpace \u211d E]\n {K L A : SimplicialComplex \u211d E}\n\nvariable [FiniteDimensional \u211d E]\n\nomit [FiniteDimensional \u211d E] in\n/-- The intrinsic frontier of a simplex of `K` outside the subcomplex `A` is covered by the\nsubcomplex together with the other simplices of `K` outside `A` that it contains. -/\nprivate lemma intrinsicFrontier_subset_space_union (s : {s : K.faces // s.val \u2209 A.faces}) :\n intrinsicFrontier \u211d (convexHull \u211d (s.val.val : Set E)) \u2286\n A.space \u222a \u22c3 (t : {s : K.faces // s.val \u2209 A.faces})\n (_ : t \u2260 s \u2227 convexHull \u211d (t.val.val : Set E) \u2286 convexHull \u211d (s.val.val : Set E)),\n convexHull \u211d (t.val.val : Set E) := by\n intro x hx\n obtain \u27e8t, ht, h\u27e9 := mem_iUnion\u2082.1 (intrinsicFrontier_convexHull_subset_iUnion s.val.property hx)\n obtain \u27e8\u27e8hne, hsub\u27e9, hxt\u27e9 := mem_iUnion.1 h\n by_cases htA : t \u2208 A.faces\n \u00b7 exact .inl (convexHull_subset_space htA hxt)\n \u00b7 exact .inr (mem_iUnion\u2082.mpr \u27e8\u27e8\u27e8t, ht\u27e9, htA\u27e9,\n \u27e8fun h => hne (congrArg (fun j : {s : K.faces // s.val \u2209 A.faces} => j.val.val) h), hsub\u27e9,\n hxt\u27e9)\n\n/-- In a finite-dimensional real normed space, a locally finite subdivision of a subcomplex\nof a locally finite complex extends to a locally finite subdivision of the whole complex.\nIts restriction to the original subcomplex is exactly the prescribed subdivision, so no new\nsimplex with all vertices there is introduced. -/\ntheorem IsSubdivision.exists_extension (h : L.IsSubdivision A) (hAK : A \u2264 K)\n (hK : LocallyFinite fun s : K.faces => convexHull \u211d (s : Set E))\n (hL : LocallyFinite fun s : L.faces => convexHull \u211d (s : Set E)) :\n \u2203 M : SimplicialComplex \u211d E, M.IsSubdivision K \u2227 M.restrict A.space = L \u2227\n LocallyFinite fun s : M.faces => convexHull \u211d (s : Set E) := by\n classical\n -- Attach exactly the original simplices which are outside the prescribed subcomplex.\n let J := {s : K.faces // s.val \u2209 A.faces}\n let P : J \u2192 Set E := fun s => convexHull \u211d (s.val.val : Set E)\n have hPc (s : J) : IsCompact (P s) := s.val.val.finite_toSet.isCompact_convexHull (\ud835\udd5c := \u211d)\n have hPv (s : J) : Convex \u211d (P s) := convex_convexHull \u211d _\n have hPne (s : J) : (P s).Nonempty :=\n convexHull_nonempty_iff.mpr (K.nonempty_of_mem_faces s.val.property)\n choose p hp using fun s \u21a6 (hPne s).intrinsicInterior (hPv s)\n have hP : LocallyFinite P := hK.comp_injective Subtype.val_injective\n have hri : Pairwise fun s t : J => Disjoint (intrinsicInterior \u211d (P s))\n (intrinsicInterior \u211d (P t)) :=\n K.pairwise_disjoint_intrinsicInterior.comp_of_injective Subtype.val_injective\n have hfr (s : J) : intrinsicFrontier \u211d (P s) \u2286\n L.space \u222a \u22c3 (t : J) (_ : t \u2260 s \u2227 P t \u2286 P s), P t := by\n rw [h.space_eq]\n exact intrinsicFrontier_subset_space_union s\n have hLi (s : J) : Disjoint (intrinsicInterior \u211d (P s)) L.space := by\n rw [h.space_eq]\n exact disjoint_intrinsicInterior_space_of_not_mem hAK s.val.property s.property\n -- Each attachment meets the prescribed subdivision in finitely many boundary simplices.\n obtain \u27e8M, hML, hMs, hMP, hMf\u27e9 := exists_subdivision_extending L P hPc hPv p hp hP hri hfr\n (fun s x \u27e8hxP, hxL\u27e9 => (h.space_restrict_of_le hAK s.val.property).symm \u25b8 \u27e8hxL, hxP\u27e9)\n hLi (fun s => finite_faces_restrict hL (hPc s))\n have hMf' : \u2200 s \u2208 M.faces, s \u2208 L.faces \u2228 \u2203 i, (s : Set E) \u2286 P i := by\n intro s hs\n exact (hMf s hs).imp id fun \u27e8i, _, hi\u27e9 \u21a6 \u27e8i, hi\u27e9\n -- The prescribed part and the remaining original simplices cover the whole complex.\n have hspace : M.space = K.space := by\n rw [hMs, h.space_eq]\n refine Subset.antisymm ?_ ?_\n \u00b7 rintro x (hxA | hxP)\n \u00b7 exact space_mono hAK hxA\n \u00b7 obtain \u27e8s, hxs\u27e9 := mem_iUnion.mp hxP\n exact convexHull_subset_space s.val.property hxs\n \u00b7 intro x hxK\n obtain \u27e8s, hs, hxs\u27e9 := mem_space_iff.mp hxK\n by_cases hsA : s \u2208 A.faces\n \u00b7 exact .inl (convexHull_subset_space hsA hxs)\n \u00b7 exact .inr (mem_iUnion.mpr \u27e8\u27e8\u27e8s, hs\u27e9, hsA\u27e9, hxs\u27e9)\n refine \u27e8M, \u27e8hspace, ?_\u27e9, h.space_eq \u25b8 hML,\n locallyFinite_convexHull_of_finite_restrict hPv hP hL (fun s => (hMP s).2) hMf'\u27e9\n intro s hs\n rcases hMf' s hs with hsL | \u27e8t, hst\u27e9\n \u00b7 obtain \u27e8t, ht, hst\u27e9 := h.exists_convexHull_subset hsL\n exact \u27e8t, hAK ht, hst\u27e9\n \u00b7 exact \u27e8t.val.val, t.val.property, convexHull_min hst (hPv t)\u27e9\n\n/-- A finite subdivision of a subcomplex of a finite complex extends to a finite subdivision\nof the whole complex, retaining the prescribed triangulation exactly. -/\ntheorem IsSubdivision.exists_finite_extension (h : L.IsSubdivision A) (hAK : A \u2264 K)\n (hK : K.faces.Finite) (hL : L.faces.Finite) :\n \u2203 M : SimplicialComplex \u211d E, M.IsSubdivision K \u2227 M.restrict A.space = L \u2227 M.faces.Finite := by\n let := hK.fintype\n let := hL.fintype\n obtain \u27e8M, hMK, hMA, hM\u27e9 := h.exists_extension hAK\n (locallyFinite_of_finite _) (locallyFinite_of_finite _)\n have hc : IsCompact K.space := hK.isCompact_biUnion fun s _ =>\n s.finite_toSet.isCompact_convexHull (\ud835\udd5c := \u211d)\n have hfin := finite_faces_restrict hM (hMK.space_eq.symm \u25b8 hc)\n rw [restrict_eq_self_of_space_subset Subset.rfl] at hfin\n exact \u27e8M, hMK, hMA, hfin\u27e9\n\nend Geometry.SimplicialComplex\n", "public_theorems": ["Geometry.SimplicialComplex.IsSubdivision.space_restrict_of_le", "Geometry.SimplicialComplex.IsSubdivision.space_restrict", "Geometry.SimplicialComplex.IsSubdivision.exists_extension", "Geometry.SimplicialComplex.IsSubdivision.exists_finite_extension"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Analysis.Convex.SimplicialComplex.Subdivision\nimport TauCeti.Analysis.Convex.SimplicialComplex.Carrier\nimport TauCeti.Analysis.Convex.Extreme\n\n/-!\n# Extending a subdivision of a subcomplex\n\nFor a locally finite complex in a finite-dimensional real normed space, a locally finite\nsubdivision of a subcomplex extends to a locally finite subdivision of the whole complex,\nwithout changing the prescribed triangulation on the subcomplex.\nThis is the relative subdivision theorem used to make triangulations agree on overlaps.\n\nThe restriction of a subdivision to any original simplex triangulates that simplex.\nConsequently the prescribed triangulation meets each remaining simplex in a subcomplex\nof its boundary, and the cell-extension theorem applies to the remaining simplices.\n\nReference: Rourke--Sanderson, *Introduction to Piecewise-Linear Topology*, Chapter 2,\nrelative subdivisions of simplicial complexes. The construction uses the cell-coning\nextension in `TauCeti.Analysis.Convex.SimplicialComplex.Subdivision`.\n-/\n\npublic section\n\nopen Set\n\nnamespace Geometry.SimplicialComplex\n\nsection LinearOrderedField\n\nvariable {\ud835\udd5c E : Type*} [Field \ud835\udd5c] [LinearOrder \ud835\udd5c] [IsStrictOrderedRing \ud835\udd5c]\n [AddCommGroup E] [Module \ud835\udd5c E] {K L A : SimplicialComplex \ud835\udd5c E} {s : Finset E}", "/-- A subdivision of a subcomplex restricts to its intersection with every simplex of the\ncontaining complex. -/\ntheorem IsSubdivision.space_restrict_of_le (h : L.IsSubdivision A) (hAK : A \u2264 K)\n (hs : s \u2208 K.faces) :\n (L.restrict (convexHull \ud835\udd5c (s : Set E))).space = L.space \u2229 convexHull \ud835\udd5c (s : Set E) :=", "/-- The restriction of a subdivision to an original simplex triangulates that simplex. -/\ntheorem IsSubdivision.space_restrict (h : L.IsSubdivision K) (hs : s \u2208 K.faces) :\n (L.restrict (convexHull \ud835\udd5c (s : Set E))).space = convexHull \ud835\udd5c (s : Set E) :=", "end LinearOrderedField\n\nvariable {E : Type*} [NormedAddCommGroup E] [NormedSpace \u211d E]\n {K L A : SimplicialComplex \u211d E}\n\nvariable [FiniteDimensional \u211d E]", "/-- In a finite-dimensional real normed space, a locally finite subdivision of a subcomplex\nof a locally finite complex extends to a locally finite subdivision of the whole complex.\nIts restriction to the original subcomplex is exactly the prescribed subdivision, so no new\nsimplex with all vertices there is introduced. -/\ntheorem IsSubdivision.exists_extension (h : L.IsSubdivision A) (hAK : A \u2264 K)\n (hK : LocallyFinite fun s : K.faces => convexHull \u211d (s : Set E))\n (hL : LocallyFinite fun s : L.faces => convexHull \u211d (s : Set E)) :\n \u2203 M : SimplicialComplex \u211d E, M.IsSubdivision K \u2227 M.restrict A.space = L \u2227\n LocallyFinite fun s : M.faces => convexHull \u211d (s : Set E) :=", "/-- A finite subdivision of a subcomplex of a finite complex extends to a finite subdivision\nof the whole complex, retaining the prescribed triangulation exactly. -/\ntheorem IsSubdivision.exists_finite_extension (h : L.IsSubdivision A) (hAK : A \u2264 K)\n (hK : K.faces.Finite) (hL : L.faces.Finite) :\n \u2203 M : SimplicialComplex \u211d E, M.IsSubdivision K \u2227 M.restrict A.space = L \u2227 M.faces.Finite :=", "end Geometry.SimplicialComplex"], "free_length": 4440, "file_length": 5946, "heartbeats": 6840, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.RepresentationTheory.ClassicalGroups.DualWeylModule.SchurMatrix", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/RepresentationTheory/ClassicalGroups/DualWeylModule/SchurMatrix.lean", "module": "TauCeti.RepresentationTheory.ClassicalGroups.DualWeylModule.SchurMatrix", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Topology.Instances.Matrix\npublic import TauCeti.RepresentationTheory.ClassicalGroups.DualWeylModule.FullColumns\npublic import TauCeti.RingTheory.MvPolynomial.Symmetric.Schur.Basic\nimport Mathlib.Topology.Algebra.MvPolynomial\nimport TauCeti.RingTheory.MvPolynomial.Symmetric.Schur.Bialternant\n\n/-!\n# Schur matrices\n\nLet `R` be a commutative ring, `\u03bc` a Young diagram and `z` an `N' \u00d7 N` matrix over `R`. Replacing\nthe `N' \u00d7 n` matrix of variables by the `N' \u00d7 n` matrix `z * y`, `y` the `N \u00d7 n` matrix of\nvariables (`Matrix.mvPolynomialMulLeft`), acts on the rows and commutes with the column operations,\nso it maps the dual Weyl module `\u2207_R(d)` in `N'` rows into the one in `N` rows\n(`TauCeti.DualWeylModule.mvPolynomialMulLeft_mem_dualWeylModule`).\nExpanding the image of a standard bideterminant in the standard basis gives the **Schur matrix**\n`TauCeti.DualWeylModule.schurMatrix \u03bc z`, with rows indexed by the semistandard tableaux of shape\n`\u03bc` in `N'` letters and columns by those in `N` letters:\n\n`b_T(z * y) = \u2211 U, schurMatrix \u03bc z T U \u2022 b_U(y)`,\n\n`b_T` the bideterminant of the tableau `T`\n(`TauCeti.DualWeylModule.mvPolynomialMulLeft_bideterminant`).\nThe coefficients are unique, since the standard bideterminants are linearly independent over every\nring, and they do not depend on the number `n \u2265 \u03bc.colLen 0` of columns of the matrix of variables.\nUniqueness gives everything else: base change, `S(g * z) = S(g) * S(z)` by substituting twice,\nand the action of diagonal matrices, under which the standard bideterminants are weight vectors\n(`TauCeti.DualWeylModule.mvPolynomialMulLeft_diagonal_bideterminant`).\n\nFor `N' = N` the Schur matrices form a representation of `GL_N(R)` on `R^{BoundedSSYT N \u03bc}`. Read\na vector `v` as the linear functional `\u03bb` on `\u2207_R(\u03bc)` with `\u03bb(b_U) = v U`. Then `S(g) *\u1d65 v` is the\nfunctional `f \u21a6 \u03bb(f(g * y))`: `S(g)` acts on the linear functionals by precomposition with the\nsubstitution `f \u21a6 f(g * y)`, a right action on `\u2207_R(\u03bc)`, so that `g \u21a6 S(g)` is a left action on\nthe functionals. For instance `S(g)` moves the evaluation at a matrix `y`, whose vector `ev_y`\nholds the values of the standard bideterminants at `y`, to the evaluation at `g * y`:\n`S(g) *\u1d65 ev_y = ev_{g * y}`. The character of the representation is the Schur polynomial.\n\nA shape may have columns of the full height `N`, and its tableaux in `N` letters hold\n`0, \u2026, N - 1` in these columns. Let `\u03bd` be a shape `\u03bc` with `d` columns of height `N` prepended,\nboth with at most `N` rows. Deleting these columns (`TauCeti.BoundedSSYT.fullColumnsEquiv`, written\n`e`) turns the bideterminant of a tableau of shape `\u03bd` into `\u0394(y) ^ d` times that of a tableau of\nshape `\u03bc`, `\u0394(y)` the minor of `y` on all rows and the first `N` columns\n(`TauCeti.DualWeylModule.bideterminant_ssytFilling_eq_pow_mul`). So the matrix\n`S(z) = (schurMatrix \u03bd z).submatrix id e.symm` is the unique matrix of the expansion\n`b_T(z * y) = \u0394(y) ^ d * \u2211 U, S(z) T U \u2022 b_U(y)` over the tableaux `U` of the shape `\u03bc` left after\ndeleting the first `d` full columns (`TauCeti.DualWeylModule.submatrix_schurMatrix_eq_iff`); `\u03bc`\nhas no full column only when `d` is the number of full columns of `\u03bd`. Evaluated at a matrix `y`\nwith leading `N \u00d7 N` block `y\u2080`, this reads `det y\u2080 ^ d \u2022 (S(z) *\u1d65 ev_y) = ev_{z * y}`, the two\nevaluation vectors being those of `\u03bc` and `\u03bd`. For square `g` the Schur matrix of `\u03bd` is\n`det g ^ d` times that of `\u03bc` (`TauCeti.DualWeylModule.schurMatrix_eq_det_pow_smul_submatrix`), so\nthat `S(z * g) = det g ^ d \u2022 (S(z) * schurMatrix \u03bc g)`\n(`TauCeti.DualWeylModule.submatrix_schurMatrix_mul_eq_det_pow_smul`). A shape with a column taller\nthan `N` has no tableau in `N` letters, and then `b_T(z * y) = 0`.\n\n## Main definitions\n\n* `TauCeti.DualWeylModule.schurMatrix \u03bc z`: the Schur matrix of `z`.\n* `TauCeti.DualWeylModule.evalVector \u03bc h\u03bc y`: the values of the standard bideterminants at a matrix\n `y`.\n* `TauCeti.DualWeylModule.schurMatrixHom \u03bc` and `TauCeti.DualWeylModule.schurRep \u03bc e`: the Schur\n matrices of square matrices as a monoid homomorphism, and the representation\n `g \u21a6 det g ^ e \u2022 schurMatrix \u03bc g` of `GL_N(R)`.\n\n## Main results\n\n* `TauCeti.DualWeylModule.schurMatrix_apply`: the entries are the coordinates in the standard\n basis.\n* `TauCeti.DualWeylModule.schurMatrix_eq_iff`: the Schur matrix is the unique matrix of\n coefficients of the expansion.\n* `TauCeti.DualWeylModule.schurMatrix_map` and\n `TauCeti.DualWeylModule.map_schurMatrix_mvPolynomialX`: base change; the entries are polynomials\n with integer coefficients in the entries of `z`, the same over every ring.\n* `TauCeti.DualWeylModule.continuous_schurMatrix`: continuity over a topological ring.\n* `TauCeti.DualWeylModule.schurMatrix_one`, `TauCeti.DualWeylModule.schurMatrix_mul` and\n `TauCeti.DualWeylModule.schurMatrix_smul`: `S(1) = 1`, `S(g * z) = S(g) * S(z)` for rectangular\n matrices, and `S(t \u2022 z) = t ^ |\u03bc| \u2022 S(z)`.\n* `TauCeti.DualWeylModule.schurMatrix_mulVec_evalVector`: `S(z) *\u1d65 ev_y = ev_{z * y}`.\n* `TauCeti.DualWeylModule.schurMatrix_diagonal`: a diagonal matrix acts diagonally, by the monomial\n of the content of each tableau.\n* `TauCeti.DualWeylModule.trace_schurMatrix_diagonal` and\n `TauCeti.DualWeylModule.trace_schurMatrix_diagonal_mul_det`: the character is the Schur\n polynomial, and Weyl's character formula in the cross-multiplied form: the character times the\n alternant `det (x_a ^ (N - 1 - b))` is the alternant `det (x_a ^ (\u03bc.rowLen b + N - 1 - b))`.\n* `TauCeti.DualWeylModule.schurMatrix_eq_det_pow_smul_submatrix`,\n `TauCeti.DualWeylModule.submatrix_schurMatrix_eq_iff`,\n `TauCeti.DualWeylModule.mvPolynomialMulLeft_bideterminant_eq_pow_mul`,\n `TauCeti.DualWeylModule.det_pow_smul_submatrix_schurMatrix_mulVec_evalVector` and\n `TauCeti.DualWeylModule.submatrix_schurMatrix_mul_eq_det_pow_smul`: full columns split off as\n powers of the determinant.\n\n## References\n\n* C. De Concini, D. Eisenbud, C. Procesi, *Young diagrams and determinantal varieties*,\n Invent. Math. **56** (1980), 129-165.\n* K. Akin, D. A. Buchsbaum, J. Weyman, *Schur functors and Schur complexes*, Adv. Math. **44**\n (1982), 207-278.\n\nThe definition of the Schur matrix as the unique coefficients of the expansion, and the proofs of\nits properties from that uniqueness, follow the method of grh-lean\n(https://github.com/lsernau/grh-lean, Apache 2.0, Copyright 2026 Anthropic PBC),\n`src/Lib/GLn/SchurModule/SchurMatrix.lean` (`New.schur`, `New.schur_map`, `New.schur_mul_left`,\n`New.schur_diagonal`, `New.weyl_character`), where it is set up for the semi-invariants of a Borel\nsubgroup and a basis that is not identified with the semistandard tableaux.\n-/\n\npublic section\n\nnamespace TauCeti\n\nopen MvPolynomial Matrix Finset\n\nnamespace DualWeylModule\n\n/-! ### The Schur matrix -/\n\nsection SchurMatrix\n\nvariable {R : Type*} [CommRing R] {N N' N'' n : \u2115} (\u03bc : YoungDiagram)\n\n/-- The **Schur matrix** of an `N' \u00d7 N` matrix `z` for the Young diagram `\u03bc`: the matrix of the\ncoefficients of the expansion `b_T(z * y) = \u2211 U, schurMatrix \u03bc z T U \u2022 b_U(y)` of the standard\nbideterminant of a tableau `T` in `N'` letters, at `z * y`, in the standard bideterminants of the\ntableaux `U` in `N` letters (`TauCeti.DualWeylModule.mvPolynomialMulLeft_bideterminant`). It is\nread off in the matrix of variables with `\u03bc.colLen 0` columns; by\n`TauCeti.DualWeylModule.schurMatrix_eq_iff` any number `n \u2265 \u03bc.colLen 0` of columns gives the same\nmatrix. -/\nnoncomputable def schurMatrix (z : Matrix (Fin N') (Fin N) R) :\n Matrix (BoundedSSYT N' \u03bc) (BoundedSSYT N \u03bc) R :=\n Matrix.of fun T U => (standardBasis R N (n := \u03bc.colLen 0) le_rfl).repr\n \u27e8mvPolynomialMulLeft z (bideterminant R \u03bc le_rfl (ssytFilling T)),\n mvPolynomialMulLeft_mem_dualWeylModule z (bideterminant_mem_dualWeylModule R \u03bc le_rfl _)\u27e9 U\n\n/-- **The entries of the Schur matrix are coordinates in the standard basis.** The entry of the\nSchur matrix of `z` at the tableaux `T` and `U` is the coordinate at `b_U` of `b_T(z * y)` in the\nstandard basis of the dual Weyl module of the `N \u00d7 \u03bc.colLen 0` matrix of variables `y`. -/\ntheorem schurMatrix_apply (z : Matrix (Fin N') (Fin N) R) (T : BoundedSSYT N' \u03bc)\n (U : BoundedSSYT N \u03bc) :\n schurMatrix \u03bc z T U = (standardBasis R N (n := \u03bc.colLen 0) le_rfl).repr\n \u27e8mvPolynomialMulLeft z (bideterminant R \u03bc le_rfl (ssytFilling T)),\n mvPolynomialMulLeft_mem_dualWeylModule z (bideterminant_mem_dualWeylModule R \u03bc le_rfl _)\u27e9\n U :=\n (rfl)\n\n/-- The expansion that defines the Schur matrix, in the matrix of variables with `\u03bc.colLen 0`\ncolumns. -/\nprivate theorem mvPolynomialMulLeft_bideterminant_colLen (z : Matrix (Fin N') (Fin N) R)\n (T : BoundedSSYT N' \u03bc) :\n mvPolynomialMulLeft z (bideterminant R \u03bc le_rfl (ssytFilling T)) =\n \u2211 U, schurMatrix \u03bc z T U \u2022 bideterminant R \u03bc (le_refl (\u03bc.colLen 0)) (ssytFilling U) := by\n have h := congrArg Subtype.val ((standardBasis R N (n := \u03bc.colLen 0) le_rfl).sum_repr\n \u27e8mvPolynomialMulLeft z (bideterminant R \u03bc le_rfl (ssytFilling T)),\n mvPolynomialMulLeft_mem_dualWeylModule z (bideterminant_mem_dualWeylModule R \u03bc le_rfl _)\u27e9)\n simp only [Submodule.coe_sum, Submodule.coe_smul, coe_standardBasis] at h\n simp only [schurMatrix_apply]\n exact h.symm\n\n/-- **The Schur matrix expands the substituted bideterminants.** For a tableau `T` of shape `\u03bc` in\n`N'` letters and the `N \u00d7 n` matrix of variables `y`, `n \u2265 \u03bc.colLen 0`:\n`b_T(z * y) = \u2211 U, schurMatrix \u03bc z T U \u2022 b_U(y)`, the sum running over the tableaux of shape `\u03bc`\nin `N` letters. -/\ntheorem mvPolynomialMulLeft_bideterminant (h\u03bc : \u03bc.colLen 0 \u2264 n) (z : Matrix (Fin N') (Fin N) R)\n (T : BoundedSSYT N' \u03bc) :\n mvPolynomialMulLeft z (bideterminant R \u03bc h\u03bc (ssytFilling T)) =\n \u2211 U, schurMatrix \u03bc z T U \u2022 bideterminant R \u03bc h\u03bc (ssytFilling U) := by\n rw [\u2190 rename_bideterminant R \u03bc le_rfl h\u03bc, mvPolynomialMulLeft_rename,\n mvPolynomialMulLeft_bideterminant_colLen, map_sum]\n simp only [map_smul, rename_bideterminant]\n\n/-- **Uniqueness of the Schur matrix.** For any number `n \u2265 \u03bc.colLen 0` of columns of the matrix of\nvariables, the Schur matrix of `z` is the only matrix `A` with `b_T(z * y) = \u2211 U, A T U \u2022 b_U(y)`\nfor every tableau `T`. -/\ntheorem schurMatrix_eq_iff (h\u03bc : \u03bc.colLen 0 \u2264 n) {z : Matrix (Fin N') (Fin N) R}\n {A : Matrix (BoundedSSYT N' \u03bc) (BoundedSSYT N \u03bc) R} :\n schurMatrix \u03bc z = A \u2194 \u2200 T, mvPolynomialMulLeft z (bideterminant R \u03bc h\u03bc (ssytFilling T)) =\n \u2211 U, A T U \u2022 bideterminant R \u03bc h\u03bc (ssytFilling U) := by\n refine \u27e8fun h T => h \u25b8 mvPolynomialMulLeft_bideterminant \u03bc h\u03bc z T, fun h => ?_\u27e9\n ext T U\n have h_sub : \u2211 V, (schurMatrix \u03bc z T V - A T V) \u2022 bideterminant R \u03bc h\u03bc (ssytFilling V) = 0 := by\n simp only [sub_smul, Finset.sum_sub_distrib, \u2190 mvPolynomialMulLeft_bideterminant \u03bc h\u03bc, \u2190 h T,\n sub_self]\n exact sub_eq_zero.mp (Fintype.linearIndependent_iff.mp\n (linearIndependent_bideterminant_ssytFilling R N \u03bc h\u03bc) _ h_sub U)\n\n/-! ### Base change and continuity -/\n\n/-- **Base change.** The Schur matrix commutes with every homomorphism of commutative rings\n`\u03c6 : R \u2192 S`, applied entrywise. -/\ntheorem schurMatrix_map {S : Type*} [CommRing S] (\u03c6 : R \u2192+* S) (z : Matrix (Fin N') (Fin N) R) :\n schurMatrix \u03bc (z.map \u03c6) = (schurMatrix \u03bc z).map \u03c6 := by\n rw [schurMatrix_eq_iff \u03bc le_rfl]\n intro T\n have h := congrArg (MvPolynomial.map \u03c6) (mvPolynomialMulLeft_bideterminant \u03bc le_rfl z T)\n rw [map_mvPolynomialMulLeft, map_bideterminant, map_sum] at h\n simpa only [smul_eq_C_mul, map_mul, map_C, map_bideterminant, Matrix.map_apply] using h\n\n/-- **The entries of a Schur matrix are integer polynomials in the entries of the matrix.** The\nSchur matrix of `z` is obtained from the Schur matrix of the generic `N' \u00d7 N` matrix over\n`\u2124[x_{b,a}]` by evaluating its entries at `x_{b,a} = z b a`. -/\ntheorem map_schurMatrix_mvPolynomialX (z : Matrix (Fin N') (Fin N) R) :\n (schurMatrix \u03bc (mvPolynomialX (Fin N') (Fin N) \u2124)).map (aeval fun p => z p.1 p.2) =\n schurMatrix \u03bc z := by\n have h := schurMatrix_map \u03bc (aeval (R := \u2124) fun p : Fin N' \u00d7 Fin N => z p.1 p.2).toRingHom\n (mvPolynomialX (Fin N') (Fin N) \u2124)\n rw [AlgHom.toRingHom_eq_coe, RingHom.coe_coe] at h\n rw [\u2190 h]\n congr 1\n ext b a\n simp\n\n/-- **Continuity.** Over a topological ring the Schur matrix depends continuously on the matrix:\nits entries are polynomials in the entries of `z`. -/\ntheorem continuous_schurMatrix [TopologicalSpace R] [IsTopologicalSemiring R] :\n Continuous (schurMatrix (R := R) (N := N) (N' := N') \u03bc) := by\n have h : schurMatrix (R := R) (N := N) (N' := N') \u03bc = fun z =>\n (schurMatrix \u03bc (mvPolynomialX (Fin N') (Fin N) \u2124)).map (aeval fun p => z p.1 p.2) :=\n funext fun z => (map_schurMatrix_mvPolynomialX \u03bc z).symm\n rw [h]\n refine continuous_pi fun T => continuous_pi fun U => ?_\n simp only [Matrix.map_apply, aeval_def, eval\u2082_eq_eval_map]\n exact (continuous_eval _).comp\n (continuous_pi fun p => continuous_id.matrix_elem p.1 p.2)\n\n/-! ### Multiplicativity -/\n\n/-- The Schur matrix of the identity matrix is the identity matrix. -/\n@[simp]\ntheorem schurMatrix_one [DecidableEq (BoundedSSYT N \u03bc)] :\n schurMatrix \u03bc (1 : Matrix (Fin N) (Fin N) R) = 1 := by\n rw [schurMatrix_eq_iff \u03bc le_rfl]\n intro T\n simp [Matrix.one_apply, ite_smul]\n\n/-- **Multiplicativity.** For rectangular matrices `g` (`N'' \u00d7 N'`) and `z` (`N' \u00d7 N`), the Schur\nmatrix of `g * z` is the product of the Schur matrices: substituting `z * y` into\n`b_T(g * y') = \u2211 U, S(g) T U \u2022 b_U(y')` gives `b_T(g * z * y)`. -/\n@[simp]\ntheorem schurMatrix_mul (g : Matrix (Fin N'') (Fin N') R) (z : Matrix (Fin N') (Fin N) R) :\n schurMatrix \u03bc (g * z) = schurMatrix \u03bc g * schurMatrix \u03bc z := by\n rw [schurMatrix_eq_iff \u03bc le_rfl]\n intro T\n rw [mvPolynomialMulLeft_mul, AlgHom.comp_apply, mvPolynomialMulLeft_bideterminant \u03bc le_rfl g,\n map_sum]\n simp only [map_smul, mvPolynomialMulLeft_bideterminant \u03bc le_rfl z, Finset.smul_sum, smul_smul]\n rw [Finset.sum_comm]\n simp only [Matrix.mul_apply, Finset.sum_smul]\n\n/-- The Schur matrices of square matrices, as a monoid homomorphism\n`Matrix (Fin N) (Fin N) R \u2192* Matrix (BoundedSSYT N \u03bc) (BoundedSSYT N \u03bc) R`. -/\nnoncomputable def schurMatrixHom [DecidableEq (BoundedSSYT N \u03bc)] :\n Matrix (Fin N) (Fin N) R \u2192* Matrix (BoundedSSYT N \u03bc) (BoundedSSYT N \u03bc) R where\n toFun := schurMatrix \u03bc\n map_one' := schurMatrix_one \u03bc\n map_mul' := schurMatrix_mul \u03bc\n\n@[simp]\ntheorem schurMatrixHom_apply [DecidableEq (BoundedSSYT N \u03bc)] (g : Matrix (Fin N) (Fin N) R) :\n schurMatrixHom \u03bc g = schurMatrix \u03bc g :=\n (rfl)\n\n/-- The **representation of weight `(\u03bc, e)`** of `GL_N(R)`, `e \u2208 \u2124`: the Schur matrices twisted\nby a power of the determinant, `g \u21a6 det g ^ e \u2022 schurMatrix \u03bc g`. -/\nnoncomputable def schurRep [DecidableEq (BoundedSSYT N \u03bc)] (e : \u2124) :\n GL (Fin N) R \u2192* GL (BoundedSSYT N \u03bc) R :=\n MonoidHom.toHomUnits\n { toFun g := ((GeneralLinearGroup.det g ^ e : R\u02e3) : R) \u2022 schurMatrix \u03bc (g : Matrix _ _ R)\n map_one' := by simp\n map_mul' g h := by\n simp only [map_mul, mul_zpow, Units.val_mul, schurMatrix_mul, smul_mul_smul_comm] }\n\n@[simp]\ntheorem coe_schurRep_apply [DecidableEq (BoundedSSYT N \u03bc)] (e : \u2124) (g : GL (Fin N) R) :\n (schurRep \u03bc e g : Matrix (BoundedSSYT N \u03bc) (BoundedSSYT N \u03bc) R) =\n ((GeneralLinearGroup.det g ^ e : R\u02e3) : R) \u2022 schurMatrix \u03bc (g : Matrix (Fin N) (Fin N) R) :=\n (rfl)\n\n/-! ### Evaluation vectors -/\n\n/-- The **evaluation vector** of a matrix `y` with `n \u2265 \u03bc.colLen 0` columns: the values at `y` of\nthe standard bideterminants of the tableaux of shape `\u03bc` in `N` letters. -/\nnoncomputable def evalVector (h\u03bc : \u03bc.colLen 0 \u2264 n) (y : Matrix (Fin N) (Fin n) R) :\n BoundedSSYT N \u03bc \u2192 R :=\n fun U => eval (fun p => y p.1 p.2) (bideterminant R \u03bc h\u03bc (ssytFilling U))\n\n@[simp]\ntheorem evalVector_apply (h\u03bc : \u03bc.colLen 0 \u2264 n) (y : Matrix (Fin N) (Fin n) R)\n (U : BoundedSSYT N \u03bc) :\n evalVector \u03bc h\u03bc y U = eval (fun p => y p.1 p.2) (bideterminant R \u03bc h\u03bc (ssytFilling U)) :=\n (rfl)\n\n/-- **The Schur matrix acts on evaluation vectors**: `S(z) *\u1d65 ev_y = ev_{z * y}`. -/\ntheorem schurMatrix_mulVec_evalVector (h\u03bc : \u03bc.colLen 0 \u2264 n) (z : Matrix (Fin N') (Fin N) R)\n (y : Matrix (Fin N) (Fin n) R) :\n schurMatrix \u03bc z *\u1d65 evalVector \u03bc h\u03bc y = evalVector \u03bc h\u03bc (z * y) := by\n ext T\n rw [evalVector_apply, \u2190 eval_mvPolynomialMulLeft, mvPolynomialMulLeft_bideterminant \u03bc h\u03bc,\n map_sum]\n simp [mulVec, dotProduct, smul_eval]\n\n/-! ### Diagonal matrices and the character -/\n\n/-- **Diagonal matrices act diagonally.** The Schur matrix of `diagonal x` is diagonal, with entry\n`\u220f a, x a ^ c_a` at the tableau `U`, `c_a` the number of entries of `U` equal to `a`. -/\ntheorem schurMatrix_diagonal [DecidableEq (BoundedSSYT N \u03bc)] (x : Fin N \u2192 R) :\n schurMatrix \u03bc (diagonal x) = diagonal fun U => \u220f a, x a ^ BoundedSSYT.weight U a := by\n rw [schurMatrix_eq_iff \u03bc le_rfl]\n intro T\n rw [mvPolynomialMulLeft_diagonal_bideterminant]\n simp [diagonal_apply, ite_smul, BoundedSSYT.weight_apply]\n\n/-- **Homogeneity.** The Schur matrix of `t \u2022 z` is `t ^ |\u03bc|` times that of `z`, `|\u03bc|` the number\nof cells of `\u03bc`. -/\n@[simp]\ntheorem schurMatrix_smul (t : R) (z : Matrix (Fin N') (Fin N) R) :\n schurMatrix \u03bc (t \u2022 z) = t ^ \u03bc.card \u2022 schurMatrix \u03bc z := by\n classical\n rw [smul_eq_diagonal_mul, schurMatrix_mul, schurMatrix_diagonal]\n ext T U\n simp only [diagonal_mul, Finset.prod_pow_eq_pow_sum, BoundedSSYT.sum_weight, Matrix.smul_apply,\n smul_eq_mul]\n\n/-- **The character is the Schur polynomial.** The trace of the Schur matrix of `diagonal x` is the\nSchur polynomial of `\u03bc` in `N` variables evaluated at `x`. -/\ntheorem trace_schurMatrix_diagonal (x : Fin N \u2192 R) :\n trace (schurMatrix \u03bc (diagonal x)) = eval x (diagramSchurPoly N R \u03bc) := by\n classical\n rw [schurMatrix_diagonal, trace_diagonal, eval_diagramSchurPoly]\n\n/-- **Weyl's character formula.** For a Young diagram `\u03bc` with at most `N` rows, the trace of the\nSchur matrix of `diagonal x` times the alternant `det (x a ^ (N - 1 - b))` is the alternant\n`det (x a ^ (\u03bc.rowLen b + N - 1 - b))`. -/\ntheorem trace_schurMatrix_diagonal_mul_det (h\u03bc : \u03bc.colLen 0 \u2264 N) (x : Fin N \u2192 R) :\n trace (schurMatrix \u03bc (diagonal x)) * det (of fun a b : Fin N => x a ^ (N - 1 - (b : \u2115))) =\n det (of fun a b : Fin N => x a ^ (\u03bc.rowLen b + (N - 1 - b))) := by\n have h := congrArg (eval x) (diagramSchurPoly_mul_alternant (R := R) N \u03bc h\u03bc)\n rw [map_mul, eval_alternant, eval_alternant] at h\n simp only [YoungDiagram.betaNumber_def] at h\n rw [trace_schurMatrix_diagonal, h]\n\nend SchurMatrix\n\n/-! ### Full columns -/\n\nsection FullColumns\n\nvariable {R : Type*} [CommRing R] {N N' n d : \u2115} {\u03bc \u03bd : YoungDiagram}\n\nvariable (h\u03bc : \u03bc.colLen 0 \u2264 N) (h\u03bd : \u03bd.colLen 0 \u2264 N) (h : \u2200 i < N, \u03bd.rowLen i = \u03bc.rowLen i + d)\ninclude h\u03bc h\u03bd h\n\n/-- **Uniqueness of the Schur matrix with the full columns split off.** Let `\u03bd` be `\u03bc` with `d`\ncolumns of the full height `N` prepended, both with at most `N` rows, `e` deleting the full\ncolumns, and `N \u2264 n`. For an `N' \u00d7 N` matrix `z`, `(schurMatrix \u03bd z).submatrix id e.symm` is the\nonly matrix `A` with `b_T(z * y) = \u0394(y) ^ d * \u2211 U, A T U \u2022 b_U(y)` for every tableau `T` of shape\n`\u03bd` in `N'` letters, the sum running over the tableaux `U` of shape `\u03bc` in `N` letters and `\u0394(y)`\nthe minor of `y` on all rows and the first `N` columns. -/\ntheorem submatrix_schurMatrix_eq_iff (hN : N \u2264 n) {z : Matrix (Fin N') (Fin N) R}\n {A : Matrix (BoundedSSYT N' \u03bd) (BoundedSSYT N \u03bc) R} :\n (schurMatrix \u03bd z).submatrix id (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h).symm = A \u2194\n \u2200 T, mvPolynomialMulLeft z (bideterminant R \u03bd (h\u03bd.trans hN) (ssytFilling T)) =\n mvPolynomialMinor R id (Fin.castLE hN) ^ d *\n \u2211 U, A T U \u2022 bideterminant R \u03bc (h\u03bc.trans hN) (ssytFilling U) := by\n -- Multiplied by `\u0394 ^ d`, the standard bideterminants of shape `\u03bc` are those of shape `\u03bd`, so the\n -- expansion is the defining expansion of the Schur matrix of `\u03bd`.\n have hA (T : BoundedSSYT N' \u03bd) : mvPolynomialMinor R id (Fin.castLE hN) ^ d *\n \u2211 U, A T U \u2022 bideterminant R \u03bc (h\u03bc.trans hN) (ssytFilling U) =\n \u2211 V, A.submatrix id (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h) T V \u2022\n bideterminant R \u03bd (h\u03bd.trans hN) (ssytFilling V) := by\n rw [Finset.mul_sum, \u2190 (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h).sum_comp]\n refine Finset.sum_congr rfl fun V _ => ?_\n rw [bideterminant_ssytFilling_eq_pow_mul h\u03bc h\u03bd h hN, submatrix_apply, id, mul_smul_comm]\n simp only [hA, \u2190 schurMatrix_eq_iff \u03bd (h\u03bd.trans hN)]\n constructor\n \u00b7 rintro rfl\n ext T V\n simp\n \u00b7 intro hS\n ext T U\n simp [hS]\n\n/-- **Schur matrices of rectangular matrices with the full columns split off.** Let `\u03bd` be `\u03bc` with\n`d` columns of the full height `N` prepended, both with at most `N` rows, and `N \u2264 n`. For an\n`N' \u00d7 N` matrix `z` and a tableau `T` of shape `\u03bd` in `N'` letters,\n`b_T(z * y) = \u0394(y) ^ d * \u2211 U, schurMatrix \u03bd z T (e\u207b\u00b9 U) \u2022 b_U(y)`, the sum running over the tableaux\n`U` of shape `\u03bc` in `N` letters, `e` deleting the full columns and `\u0394(y)` the minor of `y` on all\nrows and the first `N` columns. -/\ntheorem mvPolynomialMulLeft_bideterminant_eq_pow_mul (hN : N \u2264 n) (z : Matrix (Fin N') (Fin N) R)\n (T : BoundedSSYT N' \u03bd) :\n mvPolynomialMulLeft z (bideterminant R \u03bd (h\u03bd.trans hN) (ssytFilling T)) =\n mvPolynomialMinor R id (Fin.castLE hN) ^ d *\n \u2211 U, schurMatrix \u03bd z T ((BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h).symm U) \u2022\n bideterminant R \u03bc (h\u03bc.trans hN) (ssytFilling U) := by\n simpa only [submatrix_apply, id] using (submatrix_schurMatrix_eq_iff h\u03bc h\u03bd h hN).mp rfl T\n\n/-- **The full columns of a Schur matrix.** Let `\u03bd` be `\u03bc` with `d` columns of the full height `N`\nprepended, both with at most `N` rows. The Schur matrix of an `N \u00d7 N` matrix `g` for `\u03bd` is\n`det g ^ d` times its Schur matrix for `\u03bc`, the tableaux being matched by deleting the full columns\n(`TauCeti.BoundedSSYT.fullColumnsEquiv`). -/\ntheorem schurMatrix_eq_det_pow_smul_submatrix (g : Matrix (Fin N) (Fin N) R) :\n schurMatrix \u03bd g = g.det ^ d \u2022 (schurMatrix \u03bc g).submatrix\n (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h) (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h) := by\n -- Substituting `g * y` multiplies `\u0394(y)` by `det g`, so the expansion of `b_T(g * y)` along\n -- `\u0394(y) ^ d` has the coefficients `det g ^ d \u2022 schurMatrix \u03bc g`.\n have key := (submatrix_schurMatrix_eq_iff h\u03bc h\u03bd h le_rfl (z := g)\n (A := (g.det ^ d \u2022 schurMatrix \u03bc g).submatrix (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h) id)).mpr\n fun T => by\n rw [bideterminant_ssytFilling_eq_pow_mul h\u03bc h\u03bd h le_rfl, map_mul, map_pow,\n mvPolynomialMulLeft_mvPolynomialMinor, mvPolynomialMulLeft_bideterminant \u03bc]\n simp only [submatrix_apply, id, Matrix.smul_apply, smul_eq_mul, smul_eq_C_mul, map_mul,\n map_pow, Finset.mul_sum]\n exact Finset.sum_congr rfl fun U _ => by ring\n ext T V\n simpa using congrFun (congrFun key T) (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h V)\n\n/-- **Evaluation vectors with the full columns split off.** Let `\u03bd` be `\u03bc` with `d` columns of the\nfull height `N` prepended, both with at most `N` rows, `e` deleting the full columns, and\n`S(z) = (schurMatrix \u03bd z).submatrix id e.symm`. For `N \u2264 n`, an `N' \u00d7 N` matrix `z` and an\n`N \u00d7 n` matrix `y` with leading `N \u00d7 N` block `y\u2080`, `det y\u2080 ^ d \u2022 (S(z) *\u1d65 ev_\u03bc(y)) = ev_\u03bd(z * y)`,\n`ev_\u03bc` and `ev_\u03bd` the evaluation vectors of the shapes `\u03bc` and `\u03bd`. -/\ntheorem det_pow_smul_submatrix_schurMatrix_mulVec_evalVector (hN : N \u2264 n)\n (z : Matrix (Fin N') (Fin N) R) (y : Matrix (Fin N) (Fin n) R) :\n (y.submatrix id (Fin.castLE hN)).det ^ d \u2022\n ((schurMatrix \u03bd z).submatrix id (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h).symm *\u1d65\n evalVector \u03bc (h\u03bc.trans hN) y) =\n evalVector \u03bd (h\u03bd.trans hN) (z * y) := by\n have h\u0394 : eval (fun p => y p.1 p.2) (mvPolynomialMinor R id (Fin.castLE hN)) =\n (y.submatrix id (Fin.castLE hN)).det := by\n rw [\u2190 aeval_eq_eval, aeval_mvPolynomialMinor]\n ext T\n rw [evalVector_apply \u03bd, \u2190 eval_mvPolynomialMulLeft,\n mvPolynomialMulLeft_bideterminant_eq_pow_mul h\u03bc h\u03bd h hN, map_mul, map_pow, h\u0394, map_sum]\n simp [mulVec, dotProduct, smul_eval]\n\n/-- **Multiplicativity with the full columns split off.** Let `\u03bd` be `\u03bc` with `d` columns of the\nfull height `N` prepended, both with at most `N` rows, and normalise the Schur matrix of an\n`N' \u00d7 N` matrix `z` as `S(z) = (schurMatrix \u03bd z).submatrix id e.symm`, `e` deleting the full\ncolumns. Then `S(z * g) = det g ^ d \u2022 S(z) * schurMatrix \u03bc g` for every `N \u00d7 N` matrix `g`. -/\ntheorem submatrix_schurMatrix_mul_eq_det_pow_smul (z : Matrix (Fin N') (Fin N) R)\n (g : Matrix (Fin N) (Fin N) R) :\n (schurMatrix \u03bd (z * g)).submatrix id (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h).symm =\n g.det ^ d \u2022 ((schurMatrix \u03bd z).submatrix id (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h).symm *\n schurMatrix \u03bc g) := by\n rw [schurMatrix_mul, schurMatrix_eq_det_pow_smul_submatrix h\u03bc h\u03bd h g]\n ext T U\n simp only [submatrix_apply, Matrix.smul_apply, Matrix.mul_apply, id, smul_eq_mul,\n Finset.mul_sum, Equiv.apply_symm_apply]\n rw [\u2190 (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h).sum_comp]\n refine Finset.sum_congr rfl fun V _ => ?_\n simp only [Equiv.symm_apply_apply]\n ring\n\nend FullColumns\n\nend DualWeylModule\n\nend TauCeti\n", "public_theorems": ["TauCeti.DualWeylModule.schurMatrix_apply", "TauCeti.DualWeylModule.mvPolynomialMulLeft_bideterminant", "TauCeti.DualWeylModule.schurMatrix_eq_iff", "TauCeti.DualWeylModule.schurMatrix_map", "TauCeti.DualWeylModule.map_schurMatrix_mvPolynomialX", "TauCeti.DualWeylModule.continuous_schurMatrix", "TauCeti.DualWeylModule.schurMatrix_one", "TauCeti.DualWeylModule.schurMatrix_mul", "TauCeti.DualWeylModule.schurMatrixHom_apply", "TauCeti.DualWeylModule.coe_schurRep_apply", "TauCeti.DualWeylModule.evalVector_apply", "TauCeti.DualWeylModule.schurMatrix_mulVec_evalVector", "TauCeti.DualWeylModule.schurMatrix_diagonal", "TauCeti.DualWeylModule.schurMatrix_smul", "TauCeti.DualWeylModule.trace_schurMatrix_diagonal", "TauCeti.DualWeylModule.trace_schurMatrix_diagonal_mul_det", "TauCeti.DualWeylModule.submatrix_schurMatrix_eq_iff", "TauCeti.DualWeylModule.mvPolynomialMulLeft_bideterminant_eq_pow_mul", "TauCeti.DualWeylModule.schurMatrix_eq_det_pow_smul_submatrix", "TauCeti.DualWeylModule.det_pow_smul_submatrix_schurMatrix_mulVec_evalVector", "TauCeti.DualWeylModule.submatrix_schurMatrix_mul_eq_det_pow_smul"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Topology.Instances.Matrix\npublic import TauCeti.RepresentationTheory.ClassicalGroups.DualWeylModule.FullColumns\npublic import TauCeti.RingTheory.MvPolynomial.Symmetric.Schur.Basic\nimport Mathlib.Topology.Algebra.MvPolynomial\nimport TauCeti.RingTheory.MvPolynomial.Symmetric.Schur.Bialternant\n\n/-!\n# Schur matrices\n\nLet `R` be a commutative ring, `\u03bc` a Young diagram and `z` an `N' \u00d7 N` matrix over `R`. Replacing\nthe `N' \u00d7 n` matrix of variables by the `N' \u00d7 n` matrix `z * y`, `y` the `N \u00d7 n` matrix of\nvariables (`Matrix.mvPolynomialMulLeft`), acts on the rows and commutes with the column operations,\nso it maps the dual Weyl module `\u2207_R(d)` in `N'` rows into the one in `N` rows\n(`TauCeti.DualWeylModule.mvPolynomialMulLeft_mem_dualWeylModule`).\nExpanding the image of a standard bideterminant in the standard basis gives the **Schur matrix**\n`TauCeti.DualWeylModule.schurMatrix \u03bc z`, with rows indexed by the semistandard tableaux of shape\n`\u03bc` in `N'` letters and columns by those in `N` letters:\n\n`b_T(z * y) = \u2211 U, schurMatrix \u03bc z T U \u2022 b_U(y)`,\n\n`b_T` the bideterminant of the tableau `T`\n(`TauCeti.DualWeylModule.mvPolynomialMulLeft_bideterminant`).\nThe coefficients are unique, since the standard bideterminants are linearly independent over every\nring, and they do not depend on the number `n \u2265 \u03bc.colLen 0` of columns of the matrix of variables.\nUniqueness gives everything else: base change, `S(g * z) = S(g) * S(z)` by substituting twice,\nand the action of diagonal matrices, under which the standard bideterminants are weight vectors\n(`TauCeti.DualWeylModule.mvPolynomialMulLeft_diagonal_bideterminant`).\n\nFor `N' = N` the Schur matrices form a representation of `GL_N(R)` on `R^{BoundedSSYT N \u03bc}`. Read\na vector `v` as the linear functional `\u03bb` on `\u2207_R(\u03bc)` with `\u03bb(b_U) = v U`. Then `S(g) *\u1d65 v` is the\nfunctional `f \u21a6 \u03bb(f(g * y))`: `S(g)` acts on the linear functionals by precomposition with the\nsubstitution `f \u21a6 f(g * y)`, a right action on `\u2207_R(\u03bc)`, so that `g \u21a6 S(g)` is a left action on\nthe functionals. For instance `S(g)` moves the evaluation at a matrix `y`, whose vector `ev_y`\nholds the values of the standard bideterminants at `y`, to the evaluation at `g * y`:\n`S(g) *\u1d65 ev_y = ev_{g * y}`. The character of the representation is the Schur polynomial.\n\nA shape may have columns of the full height `N`, and its tableaux in `N` letters hold\n`0, \u2026, N - 1` in these columns. Let `\u03bd` be a shape `\u03bc` with `d` columns of height `N` prepended,\nboth with at most `N` rows. Deleting these columns (`TauCeti.BoundedSSYT.fullColumnsEquiv`, written\n`e`) turns the bideterminant of a tableau of shape `\u03bd` into `\u0394(y) ^ d` times that of a tableau of\nshape `\u03bc`, `\u0394(y)` the minor of `y` on all rows and the first `N` columns\n(`TauCeti.DualWeylModule.bideterminant_ssytFilling_eq_pow_mul`). So the matrix\n`S(z) = (schurMatrix \u03bd z).submatrix id e.symm` is the unique matrix of the expansion\n`b_T(z * y) = \u0394(y) ^ d * \u2211 U, S(z) T U \u2022 b_U(y)` over the tableaux `U` of the shape `\u03bc` left after\ndeleting the first `d` full columns (`TauCeti.DualWeylModule.submatrix_schurMatrix_eq_iff`); `\u03bc`\nhas no full column only when `d` is the number of full columns of `\u03bd`. Evaluated at a matrix `y`\nwith leading `N \u00d7 N` block `y\u2080`, this reads `det y\u2080 ^ d \u2022 (S(z) *\u1d65 ev_y) = ev_{z * y}`, the two\nevaluation vectors being those of `\u03bc` and `\u03bd`. For square `g` the Schur matrix of `\u03bd` is\n`det g ^ d` times that of `\u03bc` (`TauCeti.DualWeylModule.schurMatrix_eq_det_pow_smul_submatrix`), so\nthat `S(z * g) = det g ^ d \u2022 (S(z) * schurMatrix \u03bc g)`\n(`TauCeti.DualWeylModule.submatrix_schurMatrix_mul_eq_det_pow_smul`). A shape with a column taller\nthan `N` has no tableau in `N` letters, and then `b_T(z * y) = 0`.\n\n## Main definitions\n\n* `TauCeti.DualWeylModule.schurMatrix \u03bc z`: the Schur matrix of `z`.\n* `TauCeti.DualWeylModule.evalVector \u03bc h\u03bc y`: the values of the standard bideterminants at a matrix\n `y`.\n* `TauCeti.DualWeylModule.schurMatrixHom \u03bc` and `TauCeti.DualWeylModule.schurRep \u03bc e`: the Schur\n matrices of square matrices as a monoid homomorphism, and the representation\n `g \u21a6 det g ^ e \u2022 schurMatrix \u03bc g` of `GL_N(R)`.\n\n## Main results\n\n* `TauCeti.DualWeylModule.schurMatrix_apply`: the entries are the coordinates in the standard\n basis.\n* `TauCeti.DualWeylModule.schurMatrix_eq_iff`: the Schur matrix is the unique matrix of\n coefficients of the expansion.\n* `TauCeti.DualWeylModule.schurMatrix_map` and\n `TauCeti.DualWeylModule.map_schurMatrix_mvPolynomialX`: base change; the entries are polynomials\n with integer coefficients in the entries of `z`, the same over every ring.\n* `TauCeti.DualWeylModule.continuous_schurMatrix`: continuity over a topological ring.\n* `TauCeti.DualWeylModule.schurMatrix_one`, `TauCeti.DualWeylModule.schurMatrix_mul` and\n `TauCeti.DualWeylModule.schurMatrix_smul`: `S(1) = 1`, `S(g * z) = S(g) * S(z)` for rectangular\n matrices, and `S(t \u2022 z) = t ^ |\u03bc| \u2022 S(z)`.\n* `TauCeti.DualWeylModule.schurMatrix_mulVec_evalVector`: `S(z) *\u1d65 ev_y = ev_{z * y}`.\n* `TauCeti.DualWeylModule.schurMatrix_diagonal`: a diagonal matrix acts diagonally, by the monomial\n of the content of each tableau.\n* `TauCeti.DualWeylModule.trace_schurMatrix_diagonal` and\n `TauCeti.DualWeylModule.trace_schurMatrix_diagonal_mul_det`: the character is the Schur\n polynomial, and Weyl's character formula in the cross-multiplied form: the character times the\n alternant `det (x_a ^ (N - 1 - b))` is the alternant `det (x_a ^ (\u03bc.rowLen b + N - 1 - b))`.\n* `TauCeti.DualWeylModule.schurMatrix_eq_det_pow_smul_submatrix`,\n `TauCeti.DualWeylModule.submatrix_schurMatrix_eq_iff`,\n `TauCeti.DualWeylModule.mvPolynomialMulLeft_bideterminant_eq_pow_mul`,\n `TauCeti.DualWeylModule.det_pow_smul_submatrix_schurMatrix_mulVec_evalVector` and\n `TauCeti.DualWeylModule.submatrix_schurMatrix_mul_eq_det_pow_smul`: full columns split off as\n powers of the determinant.\n\n## References\n\n* C. De Concini, D. Eisenbud, C. Procesi, *Young diagrams and determinantal varieties*,\n Invent. Math. **56** (1980), 129-165.\n* K. Akin, D. A. Buchsbaum, J. Weyman, *Schur functors and Schur complexes*, Adv. Math. **44**\n (1982), 207-278.\n\nThe definition of the Schur matrix as the unique coefficients of the expansion, and the proofs of\nits properties from that uniqueness, follow the method of grh-lean\n(https://github.com/lsernau/grh-lean, Apache 2.0, Copyright 2026 Anthropic PBC),\n`src/Lib/GLn/SchurModule/SchurMatrix.lean` (`New.schur`, `New.schur_map`, `New.schur_mul_left`,\n`New.schur_diagonal`, `New.weyl_character`), where it is set up for the semi-invariants of a Borel\nsubgroup and a basis that is not identified with the semistandard tableaux.\n-/\n\npublic section\n\nnamespace TauCeti\n\nopen MvPolynomial Matrix Finset\n\nnamespace DualWeylModule\n\n/-! ### The Schur matrix -/\n\nsection SchurMatrix\n\nvariable {R : Type*} [CommRing R] {N N' N'' n : \u2115} (\u03bc : YoungDiagram)\n\n/-- The **Schur matrix** of an `N' \u00d7 N` matrix `z` for the Young diagram `\u03bc`: the matrix of the\ncoefficients of the expansion `b_T(z * y) = \u2211 U, schurMatrix \u03bc z T U \u2022 b_U(y)` of the standard\nbideterminant of a tableau `T` in `N'` letters, at `z * y`, in the standard bideterminants of the\ntableaux `U` in `N` letters (`TauCeti.DualWeylModule.mvPolynomialMulLeft_bideterminant`). It is\nread off in the matrix of variables with `\u03bc.colLen 0` columns; by\n`TauCeti.DualWeylModule.schurMatrix_eq_iff` any number `n \u2265 \u03bc.colLen 0` of columns gives the same\nmatrix. -/\nnoncomputable def schurMatrix (z : Matrix (Fin N') (Fin N) R) :\n Matrix (BoundedSSYT N' \u03bc) (BoundedSSYT N \u03bc) R :=\n Matrix.of fun T U => (standardBasis R N (n := \u03bc.colLen 0) le_rfl).repr\n \u27e8mvPolynomialMulLeft z (bideterminant R \u03bc le_rfl (ssytFilling T)),\n mvPolynomialMulLeft_mem_dualWeylModule z (bideterminant_mem_dualWeylModule R \u03bc le_rfl _)\u27e9 U", "/-- **The entries of the Schur matrix are coordinates in the standard basis.** The entry of the\nSchur matrix of `z` at the tableaux `T` and `U` is the coordinate at `b_U` of `b_T(z * y)` in the\nstandard basis of the dual Weyl module of the `N \u00d7 \u03bc.colLen 0` matrix of variables `y`. -/\ntheorem schurMatrix_apply (z : Matrix (Fin N') (Fin N) R) (T : BoundedSSYT N' \u03bc)\n (U : BoundedSSYT N \u03bc) :\n schurMatrix \u03bc z T U = (standardBasis R N (n := \u03bc.colLen 0) le_rfl).repr\n \u27e8mvPolynomialMulLeft z (bideterminant R \u03bc le_rfl (ssytFilling T)),\n mvPolynomialMulLeft_mem_dualWeylModule z (bideterminant_mem_dualWeylModule R \u03bc le_rfl _)\u27e9\n U :=", "/-- **The Schur matrix expands the substituted bideterminants.** For a tableau `T` of shape `\u03bc` in\n`N'` letters and the `N \u00d7 n` matrix of variables `y`, `n \u2265 \u03bc.colLen 0`:\n`b_T(z * y) = \u2211 U, schurMatrix \u03bc z T U \u2022 b_U(y)`, the sum running over the tableaux of shape `\u03bc`\nin `N` letters. -/\ntheorem mvPolynomialMulLeft_bideterminant (h\u03bc : \u03bc.colLen 0 \u2264 n) (z : Matrix (Fin N') (Fin N) R)\n (T : BoundedSSYT N' \u03bc) :\n mvPolynomialMulLeft z (bideterminant R \u03bc h\u03bc (ssytFilling T)) =\n \u2211 U, schurMatrix \u03bc z T U \u2022 bideterminant R \u03bc h\u03bc (ssytFilling U) :=", "/-- **Uniqueness of the Schur matrix.** For any number `n \u2265 \u03bc.colLen 0` of columns of the matrix of\nvariables, the Schur matrix of `z` is the only matrix `A` with `b_T(z * y) = \u2211 U, A T U \u2022 b_U(y)`\nfor every tableau `T`. -/\ntheorem schurMatrix_eq_iff (h\u03bc : \u03bc.colLen 0 \u2264 n) {z : Matrix (Fin N') (Fin N) R}\n {A : Matrix (BoundedSSYT N' \u03bc) (BoundedSSYT N \u03bc) R} :\n schurMatrix \u03bc z = A \u2194 \u2200 T, mvPolynomialMulLeft z (bideterminant R \u03bc h\u03bc (ssytFilling T)) =\n \u2211 U, A T U \u2022 bideterminant R \u03bc h\u03bc (ssytFilling U) :=", "/-! ### Base change and continuity -/", "/-- **Base change.** The Schur matrix commutes with every homomorphism of commutative rings\n`\u03c6 : R \u2192 S`, applied entrywise. -/\ntheorem schurMatrix_map {S : Type*} [CommRing S] (\u03c6 : R \u2192+* S) (z : Matrix (Fin N') (Fin N) R) :\n schurMatrix \u03bc (z.map \u03c6) = (schurMatrix \u03bc z).map \u03c6 :=", "/-- **The entries of a Schur matrix are integer polynomials in the entries of the matrix.** The\nSchur matrix of `z` is obtained from the Schur matrix of the generic `N' \u00d7 N` matrix over\n`\u2124[x_{b,a}]` by evaluating its entries at `x_{b,a} = z b a`. -/\ntheorem map_schurMatrix_mvPolynomialX (z : Matrix (Fin N') (Fin N) R) :\n (schurMatrix \u03bc (mvPolynomialX (Fin N') (Fin N) \u2124)).map (aeval fun p => z p.1 p.2) =\n schurMatrix \u03bc z :=", "/-- **Continuity.** Over a topological ring the Schur matrix depends continuously on the matrix:\nits entries are polynomials in the entries of `z`. -/\ntheorem continuous_schurMatrix [TopologicalSpace R] [IsTopologicalSemiring R] :\n Continuous (schurMatrix (R := R) (N := N) (N' := N') \u03bc) :=", "/-! ### Multiplicativity -/", "/-- The Schur matrix of the identity matrix is the identity matrix. -/\n@[simp]\ntheorem schurMatrix_one [DecidableEq (BoundedSSYT N \u03bc)] :\n schurMatrix \u03bc (1 : Matrix (Fin N) (Fin N) R) = 1 :=", "/-- **Multiplicativity.** For rectangular matrices `g` (`N'' \u00d7 N'`) and `z` (`N' \u00d7 N`), the Schur\nmatrix of `g * z` is the product of the Schur matrices: substituting `z * y` into\n`b_T(g * y') = \u2211 U, S(g) T U \u2022 b_U(y')` gives `b_T(g * z * y)`. -/\n@[simp]\ntheorem schurMatrix_mul (g : Matrix (Fin N'') (Fin N') R) (z : Matrix (Fin N') (Fin N) R) :\n schurMatrix \u03bc (g * z) = schurMatrix \u03bc g * schurMatrix \u03bc z :=", "/-- The Schur matrices of square matrices, as a monoid homomorphism\n`Matrix (Fin N) (Fin N) R \u2192* Matrix (BoundedSSYT N \u03bc) (BoundedSSYT N \u03bc) R`. -/\nnoncomputable def schurMatrixHom [DecidableEq (BoundedSSYT N \u03bc)] :\n Matrix (Fin N) (Fin N) R \u2192* Matrix (BoundedSSYT N \u03bc) (BoundedSSYT N \u03bc) R where\n toFun := schurMatrix \u03bc\n map_one' := schurMatrix_one \u03bc\n map_mul' := schurMatrix_mul \u03bc", "@[simp]\ntheorem schurMatrixHom_apply [DecidableEq (BoundedSSYT N \u03bc)] (g : Matrix (Fin N) (Fin N) R) :\n schurMatrixHom \u03bc g = schurMatrix \u03bc g :=", "/-- The **representation of weight `(\u03bc, e)`** of `GL_N(R)`, `e \u2208 \u2124`: the Schur matrices twisted\nby a power of the determinant, `g \u21a6 det g ^ e \u2022 schurMatrix \u03bc g`. -/\nnoncomputable def schurRep [DecidableEq (BoundedSSYT N \u03bc)] (e : \u2124) :\n GL (Fin N) R \u2192* GL (BoundedSSYT N \u03bc) R :=\n MonoidHom.toHomUnits\n { toFun g := ((GeneralLinearGroup.det g ^ e : R\u02e3) : R) \u2022 schurMatrix \u03bc (g : Matrix _ _ R)\n map_one' := by simp\n map_mul' g h := by\n simp only [map_mul, mul_zpow, Units.val_mul, schurMatrix_mul, smul_mul_smul_comm] }", "@[simp]\ntheorem coe_schurRep_apply [DecidableEq (BoundedSSYT N \u03bc)] (e : \u2124) (g : GL (Fin N) R) :\n (schurRep \u03bc e g : Matrix (BoundedSSYT N \u03bc) (BoundedSSYT N \u03bc) R) =\n ((GeneralLinearGroup.det g ^ e : R\u02e3) : R) \u2022 schurMatrix \u03bc (g : Matrix (Fin N) (Fin N) R) :=", "/-! ### Evaluation vectors -/\n\n/-- The **evaluation vector** of a matrix `y` with `n \u2265 \u03bc.colLen 0` columns: the values at `y` of\nthe standard bideterminants of the tableaux of shape `\u03bc` in `N` letters. -/\nnoncomputable def evalVector (h\u03bc : \u03bc.colLen 0 \u2264 n) (y : Matrix (Fin N) (Fin n) R) :\n BoundedSSYT N \u03bc \u2192 R :=\n fun U => eval (fun p => y p.1 p.2) (bideterminant R \u03bc h\u03bc (ssytFilling U))", "@[simp]\ntheorem evalVector_apply (h\u03bc : \u03bc.colLen 0 \u2264 n) (y : Matrix (Fin N) (Fin n) R)\n (U : BoundedSSYT N \u03bc) :\n evalVector \u03bc h\u03bc y U = eval (fun p => y p.1 p.2) (bideterminant R \u03bc h\u03bc (ssytFilling U)) :=", "/-- **The Schur matrix acts on evaluation vectors**: `S(z) *\u1d65 ev_y = ev_{z * y}`. -/\ntheorem schurMatrix_mulVec_evalVector (h\u03bc : \u03bc.colLen 0 \u2264 n) (z : Matrix (Fin N') (Fin N) R)\n (y : Matrix (Fin N) (Fin n) R) :\n schurMatrix \u03bc z *\u1d65 evalVector \u03bc h\u03bc y = evalVector \u03bc h\u03bc (z * y) :=", "/-! ### Diagonal matrices and the character -/", "/-- **Diagonal matrices act diagonally.** The Schur matrix of `diagonal x` is diagonal, with entry\n`\u220f a, x a ^ c_a` at the tableau `U`, `c_a` the number of entries of `U` equal to `a`. -/\ntheorem schurMatrix_diagonal [DecidableEq (BoundedSSYT N \u03bc)] (x : Fin N \u2192 R) :\n schurMatrix \u03bc (diagonal x) = diagonal fun U => \u220f a, x a ^ BoundedSSYT.weight U a :=", "/-- **Homogeneity.** The Schur matrix of `t \u2022 z` is `t ^ |\u03bc|` times that of `z`, `|\u03bc|` the number\nof cells of `\u03bc`. -/\n@[simp]\ntheorem schurMatrix_smul (t : R) (z : Matrix (Fin N') (Fin N) R) :\n schurMatrix \u03bc (t \u2022 z) = t ^ \u03bc.card \u2022 schurMatrix \u03bc z :=", "/-- **The character is the Schur polynomial.** The trace of the Schur matrix of `diagonal x` is the\nSchur polynomial of `\u03bc` in `N` variables evaluated at `x`. -/\ntheorem trace_schurMatrix_diagonal (x : Fin N \u2192 R) :\n trace (schurMatrix \u03bc (diagonal x)) = eval x (diagramSchurPoly N R \u03bc) :=", "/-- **Weyl's character formula.** For a Young diagram `\u03bc` with at most `N` rows, the trace of the\nSchur matrix of `diagonal x` times the alternant `det (x a ^ (N - 1 - b))` is the alternant\n`det (x a ^ (\u03bc.rowLen b + N - 1 - b))`. -/\ntheorem trace_schurMatrix_diagonal_mul_det (h\u03bc : \u03bc.colLen 0 \u2264 N) (x : Fin N \u2192 R) :\n trace (schurMatrix \u03bc (diagonal x)) * det (of fun a b : Fin N => x a ^ (N - 1 - (b : \u2115))) =\n det (of fun a b : Fin N => x a ^ (\u03bc.rowLen b + (N - 1 - b))) :=", "end SchurMatrix\n\n/-! ### Full columns -/\n\nsection FullColumns\n\nvariable {R : Type*} [CommRing R] {N N' n d : \u2115} {\u03bc \u03bd : YoungDiagram}\n\nvariable (h\u03bc : \u03bc.colLen 0 \u2264 N) (h\u03bd : \u03bd.colLen 0 \u2264 N) (h : \u2200 i < N, \u03bd.rowLen i = \u03bc.rowLen i + d)\ninclude h\u03bc h\u03bd h", "/-- **Uniqueness of the Schur matrix with the full columns split off.** Let `\u03bd` be `\u03bc` with `d`\ncolumns of the full height `N` prepended, both with at most `N` rows, `e` deleting the full\ncolumns, and `N \u2264 n`. For an `N' \u00d7 N` matrix `z`, `(schurMatrix \u03bd z).submatrix id e.symm` is the\nonly matrix `A` with `b_T(z * y) = \u0394(y) ^ d * \u2211 U, A T U \u2022 b_U(y)` for every tableau `T` of shape\n`\u03bd` in `N'` letters, the sum running over the tableaux `U` of shape `\u03bc` in `N` letters and `\u0394(y)`\nthe minor of `y` on all rows and the first `N` columns. -/\ntheorem submatrix_schurMatrix_eq_iff (hN : N \u2264 n) {z : Matrix (Fin N') (Fin N) R}\n {A : Matrix (BoundedSSYT N' \u03bd) (BoundedSSYT N \u03bc) R} :\n (schurMatrix \u03bd z).submatrix id (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h).symm = A \u2194\n \u2200 T, mvPolynomialMulLeft z (bideterminant R \u03bd (h\u03bd.trans hN) (ssytFilling T)) =\n mvPolynomialMinor R id (Fin.castLE hN) ^ d *\n \u2211 U, A T U \u2022 bideterminant R \u03bc (h\u03bc.trans hN) (ssytFilling U) :=", "/-- **Schur matrices of rectangular matrices with the full columns split off.** Let `\u03bd` be `\u03bc` with\n`d` columns of the full height `N` prepended, both with at most `N` rows, and `N \u2264 n`. For an\n`N' \u00d7 N` matrix `z` and a tableau `T` of shape `\u03bd` in `N'` letters,\n`b_T(z * y) = \u0394(y) ^ d * \u2211 U, schurMatrix \u03bd z T (e\u207b\u00b9 U) \u2022 b_U(y)`, the sum running over the tableaux\n`U` of shape `\u03bc` in `N` letters, `e` deleting the full columns and `\u0394(y)` the minor of `y` on all\nrows and the first `N` columns. -/\ntheorem mvPolynomialMulLeft_bideterminant_eq_pow_mul (hN : N \u2264 n) (z : Matrix (Fin N') (Fin N) R)\n (T : BoundedSSYT N' \u03bd) :\n mvPolynomialMulLeft z (bideterminant R \u03bd (h\u03bd.trans hN) (ssytFilling T)) =\n mvPolynomialMinor R id (Fin.castLE hN) ^ d *\n \u2211 U, schurMatrix \u03bd z T ((BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h).symm U) \u2022\n bideterminant R \u03bc (h\u03bc.trans hN) (ssytFilling U) :=", "/-- **The full columns of a Schur matrix.** Let `\u03bd` be `\u03bc` with `d` columns of the full height `N`\nprepended, both with at most `N` rows. The Schur matrix of an `N \u00d7 N` matrix `g` for `\u03bd` is\n`det g ^ d` times its Schur matrix for `\u03bc`, the tableaux being matched by deleting the full columns\n(`TauCeti.BoundedSSYT.fullColumnsEquiv`). -/\ntheorem schurMatrix_eq_det_pow_smul_submatrix (g : Matrix (Fin N) (Fin N) R) :\n schurMatrix \u03bd g = g.det ^ d \u2022 (schurMatrix \u03bc g).submatrix\n (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h) (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h) :=", "/-- **Evaluation vectors with the full columns split off.** Let `\u03bd` be `\u03bc` with `d` columns of the\nfull height `N` prepended, both with at most `N` rows, `e` deleting the full columns, and\n`S(z) = (schurMatrix \u03bd z).submatrix id e.symm`. For `N \u2264 n`, an `N' \u00d7 N` matrix `z` and an\n`N \u00d7 n` matrix `y` with leading `N \u00d7 N` block `y\u2080`, `det y\u2080 ^ d \u2022 (S(z) *\u1d65 ev_\u03bc(y)) = ev_\u03bd(z * y)`,\n`ev_\u03bc` and `ev_\u03bd` the evaluation vectors of the shapes `\u03bc` and `\u03bd`. -/\ntheorem det_pow_smul_submatrix_schurMatrix_mulVec_evalVector (hN : N \u2264 n)\n (z : Matrix (Fin N') (Fin N) R) (y : Matrix (Fin N) (Fin n) R) :\n (y.submatrix id (Fin.castLE hN)).det ^ d \u2022\n ((schurMatrix \u03bd z).submatrix id (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h).symm *\u1d65\n evalVector \u03bc (h\u03bc.trans hN) y) =\n evalVector \u03bd (h\u03bd.trans hN) (z * y) :=", "/-- **Multiplicativity with the full columns split off.** Let `\u03bd` be `\u03bc` with `d` columns of the\nfull height `N` prepended, both with at most `N` rows, and normalise the Schur matrix of an\n`N' \u00d7 N` matrix `z` as `S(z) = (schurMatrix \u03bd z).submatrix id e.symm`, `e` deleting the full\ncolumns. Then `S(z * g) = det g ^ d \u2022 S(z) * schurMatrix \u03bc g` for every `N \u00d7 N` matrix `g`. -/\ntheorem submatrix_schurMatrix_mul_eq_det_pow_smul (z : Matrix (Fin N') (Fin N) R)\n (g : Matrix (Fin N) (Fin N) R) :\n (schurMatrix \u03bd (z * g)).submatrix id (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h).symm =\n g.det ^ d \u2022 ((schurMatrix \u03bd z).submatrix id (BoundedSSYT.fullColumnsEquiv h\u03bc h\u03bd h).symm *\n schurMatrix \u03bc g) :=", "end FullColumns\n\nend DualWeylModule\n\nend TauCeti"], "free_length": 5237, "file_length": 11804, "heartbeats": 13736, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Algebra.Lie.NormTwoShell.Reindex", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Algebra/Lie/NormTwoShell/Reindex.lean", "module": "TauCeti.Algebra.Lie.NormTwoShell.Reindex", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Algebra.Lie.NormTwoShell.CoverLift\nimport TauCeti.LinearAlgebra.Matrix.DotProduct\n\n/-!\n# Relabelling the vertices of the signed shell Lie algebra\n\nThe bracket of `Matrix.ShellLieAlgebra B` uses the ordered sign `\u03b5` of the Gram matrix\n`B : Matrix I I \u2124`, which depends on the linear order of the vertex set `I`. Let `e : I \u2243 J` be a\nbijection onto a second linearly ordered finite set with `B.reindex e e = B'`, for instance a\nchange of the order of `I`, or a diagram automorphism (`J = I` and `B' = B`). The two ordered signs\ndiffer by the coboundary of the inversion sign `\u03c3` of `e` (`Matrix.inversionSign`), and the root\nvectors are rescaled accordingly: the linear equivalence `Matrix.ShellLieAlgebra.reindex`,\n\n`H_h \u21a6 H_(h \u2218 e.symm)`, `x_a \u21a6 \u03c3(a) x_(a \u2218 e.symm)`,\n\nfrom `ShellLieAlgebra B` to `ShellLieAlgebra B'` is the action\n`Matrix.ShellLieAlgebra.coverEquiv` of the relabelled ordered sign cover `Matrix.SignCover.reindex`\nlying over `a \u21a6 a \u2218 e.symm` (`Matrix.ShellLieAlgebra.reindex_eq_coverEquiv`), so it preserves the\nbracket as soon as `B` is symmetric (`Matrix.ShellLieAlgebra.reindex_lie`). It is therefore an\nisomorphism of Lie rings for positive definite `B` with even diagonal\n(`Matrix.ShellLieAlgebra.reindexLieEquiv`). Since a coordinate vector has inversion sign `1`, it\nsends `x_(\u03b1\u1d62)` and `x_(-\u03b1\u1d62)` to `x_(\u03b1_(e i))` and `x_(-\u03b1_(e i))` whenever these coordinate\nvectors lie in the shells. When `B` is a simply laced Cartan matrix they do, and together with\n`H_(\u03b1\u1d62) \u21a6 H_(\u03b1_(e i))` the relabelling sends the Chevalley generators of `B` to those of `B'` at\nthe vertex `e i`, so it respects the simple positive pinning. The relabellings are functorial\n(`Matrix.ShellLieAlgebra.reindex_refl`, `Matrix.ShellLieAlgebra.reindex_trans`).\n\n## Main definitions\n\n* `Matrix.ShellLieAlgebra.rootReindex`: the signed permutation on the root coefficients.\n* `Matrix.ShellLieAlgebra.reindex`: the relabelling `H_h \u21a6 H_(h \u2218 e.symm)`,\n `x_a \u21a6 \u03c3(a) x_(a \u2218 e.symm)`, as a linear equivalence.\n* `Matrix.ShellLieAlgebra.reindexLieEquiv`: the same map as an equivalence of Lie algebras over\n `\u2124`, for positive definite `B` with even diagonal.\n\n## Main results\n\n* `Matrix.ShellLieAlgebra.reindex_cartan`, `Matrix.ShellLieAlgebra.reindex_root`: the values on\n Cartan and root vectors.\n* `Matrix.ShellLieAlgebra.reindex_root_single`, `Matrix.ShellLieAlgebra.reindex_root_neg_single`:\n the relabelling preserves the simple root vectors.\n* `Matrix.ShellLieAlgebra.reindex_eq_coverEquiv`: the relabelling is the action of the relabelled\n sign cover.\n* `Matrix.ShellLieAlgebra.reindex_rootBracket`: the relabelling of a root bracket.\n* `Matrix.ShellLieAlgebra.reindex_lie`: the relabelling preserves the bracket, for symmetric `B`.\n* `Matrix.ShellLieAlgebra.reindex_refl`, `Matrix.ShellLieAlgebra.reindex_trans`: functoriality.\n\n## References\n\n* V. G. Kac, *Infinite dimensional Lie algebras*, third edition, Cambridge University Press (1990),\n \u00a77.8.\n-/\n\npublic section\n\nnamespace Matrix.ShellLieAlgebra\n\nopen TauCeti Module\n\nattribute [local instance] trivialMulDistribMulAction\n\nvariable {I J K : Type*} [Fintype I] [LinearOrder I] [Fintype J] [LinearOrder J] [Fintype K]\n [LinearOrder K] {B : Matrix I I \u2124} {B' : Matrix J J \u2124} (e : I \u2243 J) (he : B.reindex e e = B')\n\n/-- The action on the root coefficients: `\u03b4_a \u21a6 s_\u03c3(a) \u03b4_(\u03c3a)`.\nIt is independent of the full Cartan group and its automorphism. -/\nnoncomputable def rootReindex (\u03c3 : Equiv.Perm I) (h\u03c3 : B.reindex \u03c3 \u03c3 = B) :\n (B.normTwoShell \u2192\u2080 \u2124) \u2243\u2097[\u2124] (B.normTwoShell \u2192\u2080 \u2124) :=\n Finsupp.basisSingleOne.equiv\n (Finsupp.basisSingleOne.unitsSMul\n (fun a \u21a6 inversionSign B \u03c3 ((normTwoShellCongr h\u03c3).symm a)))\n (normTwoShellCongr h\u03c3)\n\n/-- A root coordinate vector is sent to the relabelled coordinate with its pinned sign. -/\n@[simp]\ntheorem rootReindex_single (\u03c3 : Equiv.Perm I) (h\u03c3 : B.reindex \u03c3 \u03c3 = B)\n (a : B.normTwoShell) (n : \u2124) :\n rootReindex \u03c3 h\u03c3 (Finsupp.single a n) =\n inversionSign B \u03c3 a \u2022 Finsupp.single (normTwoShellCongr h\u03c3 a) n := by\n have hone : rootReindex \u03c3 h\u03c3 (Finsupp.single a 1) =\n inversionSign B \u03c3 a \u2022 Finsupp.single (normTwoShellCongr h\u03c3 a) 1 := by\n rw [rootReindex, \u2190 congrFun Finsupp.coe_basisSingleOne a, Basis.equiv_apply,\n Basis.unitsSMul_apply, Equiv.symm_apply_apply, Finsupp.coe_basisSingleOne]\n rw [\u2190 Finsupp.smul_single_one a n, map_smul, hone, smul_comm,\n Finsupp.smul_single_one]\n\n/-- **Relabelling the signed shell Lie algebra.** For a relabelling `e : I \u2243 J` of the vertices of\n`B` with `B.reindex e e = B'`, the linear equivalence `ShellLieAlgebra B \u2243\u2097[\u2124] ShellLieAlgebra B'`\nsending the Cartan vector `H_h` to `H_(h \u2218 e.symm)` and the root vector `x_a` to\n`\u03c3(a) x_(a \u2218 e.symm)`, where `\u03c3` is the inversion sign `Matrix.inversionSign B e`. It preserves the\nbracket for symmetric `B` (`Matrix.ShellLieAlgebra.reindex_lie`). -/\nnoncomputable def reindex : ShellLieAlgebra B \u2243\u2097[\u2124] ShellLieAlgebra B' :=\n (basis B).equiv ((basis B').unitsSMul\n (Sum.elim 1 fun b => inversionSign B e ((normTwoShellCongr he).symm b)))\n (e.sumCongr (normTwoShellCongr he))\n\n/-- The relabelling rescales the root vector `x_a` by the inversion sign `\u03c3(a)` and moves it to the\nrelabelled root: `x_a \u21a6 \u03c3(a) x_(a \u2218 e.symm)`. -/\n@[simp]\ntheorem reindex_root (a : B.normTwoShell) :\n reindex e he (root B a) = inversionSign B e a \u2022 root B' (normTwoShellCongr he a) := by\n rw [\u2190 basis_inr, reindex, Basis.equiv_apply, Basis.unitsSMul_apply]\n simp [Function.comp_assoc]\n\n/-- The relabelling sends the Cartan vector `H_h` to the relabelled Cartan vector\n`H_(h \u2218 e.symm)`, with no sign. -/\n@[simp]\ntheorem reindex_cartan (h : I \u2192 \u2124) : reindex e he (cartan B h) = cartan B' (h \u2218 e.symm) := by\n classical\n have key : (reindex e he).toLinearMap \u2218\u2097 cartan B =\n cartan B' \u2218\u2097 LinearMap.funLeft \u2124 \u2124 e.symm :=\n (Pi.basisFun \u2124 I).ext fun i => by\n have hsingle : LinearMap.funLeft \u2124 \u2124 e.symm (Pi.single i 1) = Pi.single (e i) 1 := by\n ext j\n simp [LinearMap.funLeft_apply, Pi.single_apply, Equiv.symm_apply_eq]\n rw [Pi.basisFun_apply, LinearMap.comp_apply, LinearMap.comp_apply, hsingle, \u2190 basis_inl,\n \u2190 basis_inl, LinearEquiv.coe_coe, reindex, Basis.equiv_apply]\n simp [Basis.unitsSMul_apply]\n exact congr($key h)\n\n/-- The relabelling sends the simple root vector `x_(\u03b1\u1d62)` to `x_(\u03b1_(e i))`. -/\ntheorem reindex_root_single [DecidableEq I] [DecidableEq J] (i : I)\n (hi : Pi.single i 1 \u2208 B.normTwoShell) (hi' : Pi.single (e i) 1 \u2208 B'.normTwoShell) :\n reindex e he (root B \u27e8Pi.single i 1, hi\u27e9) = root B' \u27e8Pi.single (e i) 1, hi'\u27e9 := by\n rw [reindex_root, inversionSign_single, one_smul]\n congr 1\n exact Subtype.ext <| by rw [coe_normTwoShellCongr_apply, Pi.single_comp_equiv, Equiv.symm_symm]\n\n/-- The relabelling sends the simple root vector `x_(-\u03b1\u1d62)` to `x_(-\u03b1_(e i))`. -/\ntheorem reindex_root_neg_single [DecidableEq I] [DecidableEq J] (i : I)\n (hi : -Pi.single i 1 \u2208 B.normTwoShell) (hi' : -Pi.single (e i) 1 \u2208 B'.normTwoShell) :\n reindex e he (root B \u27e8-Pi.single i 1, hi\u27e9) = root B' \u27e8-Pi.single (e i) 1, hi'\u27e9 := by\n rw [reindex_root, inversionSign_neg, inversionSign_single, one_smul]\n congr 1\n exact Subtype.ext <| by\n rw [coe_normTwoShellCongr_apply, Pi.neg_comp, Pi.single_comp_equiv, Equiv.symm_symm]\n\n/-- **Relabelling is the action of the relabelled sign cover.** For a symmetric `B` and a\nrelabelling `e : I \u2243 J` of its vertices with `B.reindex e e = B'`, the relabelling\n`Matrix.ShellLieAlgebra.reindex e he` is the action `Matrix.ShellLieAlgebra.coverEquiv` of the\ncompatible pair formed by the relabelling `Matrix.SignCover.reindex` of the ordered sign covers and\nthe isometry `a \u21a6 a \u2218 e.symm`. -/\ntheorem reindex_eq_coverEquiv (hB : B.IsSymm) :\n reindex e he = coverEquiv (SignCover.reindex e hB he : SignCover B \u2192* SignCover B')\n (LinearEquiv.funCongrLeft \u2124 \u2124 e.symm)\n (fun a b => by subst he; exact comp_equiv_symm_dotProduct_reindex_mulVec e B a b) := by\n refine (basis B).ext' fun k => ?_\n rcases k with i | a\n \u00b7 classical\n rw [basis_inl, reindex_cartan, coverEquiv_cartan]\n exact congrArg (cartan B') (funext fun j => by simp [LinearMap.funLeft_apply])\n \u00b7 rw [basis_inr, reindex_root, coverEquiv_root, SignCover.sectionSign_reindex,\n normTwoShellEquivOfIsometry_funCongrLeft he]\n\n/-- **The relabelling of a root bracket**, for symmetric `B`: the ordered signs of the two\nlabellings differ by the coboundary of the inversion sign `\u03c3`, so\n`\u2045x_a, x_b\u2046 \u21a6 \u03c3(a) \u03c3(b) \u2045x_(a \u2218 e.symm), x_(b \u2218 e.symm)\u2046`. -/\ntheorem reindex_rootBracket (hB : B.IsSymm) (a b : B.normTwoShell) :\n reindex e he (rootBracket B a b) =\n (inversionSign B e a * inversionSign B e b) \u2022\n rootBracket B' (normTwoShellCongr he a) (normTwoShellCongr he b) := by\n rw [reindex_eq_coverEquiv e he hB,\n coverEquiv_rootBracket _ _ (fun u => by simp)\n (fun x => by simp [funext_iff, LinearMap.funLeft_apply]),\n SignCover.sectionSign_reindex, SignCover.sectionSign_reindex,\n normTwoShellEquivOfIsometry_funCongrLeft he, normTwoShellEquivOfIsometry_funCongrLeft he]\n\n/-- **The relabelling preserves the bracket**, for symmetric `B`. -/\ntheorem reindex_lie (hB : B.IsSymm) (x y : ShellLieAlgebra B) :\n reindex e he \u2045x, y\u2046 = \u2045reindex e he x, reindex e he y\u2046 := by\n rw [reindex_eq_coverEquiv e he hB]\n exact coverEquiv_lie _ _ (fun u => by simp)\n (fun x => by simp [funext_iff, LinearMap.funLeft_apply]) x y\n\n/-- **The identity relabels the signed shell Lie algebra by the identity.** -/\n@[simp]\ntheorem reindex_refl : reindex (Equiv.refl I) (B := B) (by simp) = LinearEquiv.refl \u2124 _ := by\n refine (basis B).ext' fun k => ?_\n rcases k with i | a\n \u00b7 classical\n simp\n \u00b7 simp only [basis_inr, reindex_root, inversionSign_refl, one_smul, LinearEquiv.refl_apply]\n congr 1\n exact Subtype.ext (by simp)\n\n/-- **Relabellings of the signed shell Lie algebra compose**, for symmetric `B`. -/\ntheorem reindex_trans {B'' : Matrix K K \u2124} (f : J \u2243 K) (hB : B.IsSymm) (hf : B'.reindex f f = B'') :\n (reindex e he).trans (reindex f hf) =\n reindex (e.trans f) (by rw [\u2190 hf, \u2190 he]; ext; simp) := by\n subst he hf\n refine (basis B).ext' fun k => ?_\n rcases k with i | a\n \u00b7 classical\n rw [basis_inl, LinearEquiv.trans_apply, reindex_cartan, reindex_cartan, reindex_cartan]\n rfl\n \u00b7 rw [basis_inr, LinearEquiv.trans_apply, reindex_root, map_zsmul_unit, reindex_root,\n reindex_root, smul_smul, coe_normTwoShellCongr_apply, inversionSign_trans B e hB f]\n congr 2\n apply Subtype.ext\n rw [coe_normTwoShellCongr_apply, coe_normTwoShellCongr_apply, coe_normTwoShellCongr_apply]\n rfl\n\n/-- **Relabelling as an isomorphism of Lie algebras.** For positive definite `B` with even\ndiagonal, the relabelling `Matrix.ShellLieAlgebra.reindex` is an isomorphism of the signed Lie\nrings of `B` and of `B' = B.reindex e e`, which is again positive definite with even diagonal. -/\nnoncomputable def reindexLieEquiv (hB : B.PosDef) (hdiag : \u2200 i, Even (B i i)) :\n letI := lieRing hB hdiag\n letI := lieRing (B := B') (he \u25b8 hB.submatrix e.symm.injective) fun j => by\n simpa [\u2190 he] using hdiag (e.symm j)\n ShellLieAlgebra B \u2243\u2097\u2045\u2124\u2046 ShellLieAlgebra B' :=\n letI := lieRing hB hdiag\n letI := lieRing (B := B') (he \u25b8 hB.submatrix e.symm.injective) fun j => by\n simpa [\u2190 he] using hdiag (e.symm j)\n { reindex e he with\n map_lie' := reindex_lie e he hB.isHermitian.isSymm _ _ }\n\n@[simp]\ntheorem reindexLieEquiv_apply (hB : B.PosDef) (hdiag : \u2200 i, Even (B i i))\n (x : ShellLieAlgebra B) : reindexLieEquiv e he hB hdiag x = reindex e he x :=\n (rfl)\n\nend Matrix.ShellLieAlgebra\n", "public_theorems": ["Matrix.ShellLieAlgebra.rootReindex_single", "Matrix.ShellLieAlgebra.reindex_root", "Matrix.ShellLieAlgebra.reindex_cartan", "Matrix.ShellLieAlgebra.reindex_root_single", "Matrix.ShellLieAlgebra.reindex_root_neg_single", "Matrix.ShellLieAlgebra.reindex_eq_coverEquiv", "Matrix.ShellLieAlgebra.reindex_rootBracket", "Matrix.ShellLieAlgebra.reindex_lie", "Matrix.ShellLieAlgebra.reindex_refl", "Matrix.ShellLieAlgebra.reindex_trans", "Matrix.ShellLieAlgebra.reindexLieEquiv_apply"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Algebra.Lie.NormTwoShell.CoverLift\nimport TauCeti.LinearAlgebra.Matrix.DotProduct\n\n/-!\n# Relabelling the vertices of the signed shell Lie algebra\n\nThe bracket of `Matrix.ShellLieAlgebra B` uses the ordered sign `\u03b5` of the Gram matrix\n`B : Matrix I I \u2124`, which depends on the linear order of the vertex set `I`. Let `e : I \u2243 J` be a\nbijection onto a second linearly ordered finite set with `B.reindex e e = B'`, for instance a\nchange of the order of `I`, or a diagram automorphism (`J = I` and `B' = B`). The two ordered signs\ndiffer by the coboundary of the inversion sign `\u03c3` of `e` (`Matrix.inversionSign`), and the root\nvectors are rescaled accordingly: the linear equivalence `Matrix.ShellLieAlgebra.reindex`,\n\n`H_h \u21a6 H_(h \u2218 e.symm)`, `x_a \u21a6 \u03c3(a) x_(a \u2218 e.symm)`,\n\nfrom `ShellLieAlgebra B` to `ShellLieAlgebra B'` is the action\n`Matrix.ShellLieAlgebra.coverEquiv` of the relabelled ordered sign cover `Matrix.SignCover.reindex`\nlying over `a \u21a6 a \u2218 e.symm` (`Matrix.ShellLieAlgebra.reindex_eq_coverEquiv`), so it preserves the\nbracket as soon as `B` is symmetric (`Matrix.ShellLieAlgebra.reindex_lie`). It is therefore an\nisomorphism of Lie rings for positive definite `B` with even diagonal\n(`Matrix.ShellLieAlgebra.reindexLieEquiv`). Since a coordinate vector has inversion sign `1`, it\nsends `x_(\u03b1\u1d62)` and `x_(-\u03b1\u1d62)` to `x_(\u03b1_(e i))` and `x_(-\u03b1_(e i))` whenever these coordinate\nvectors lie in the shells. When `B` is a simply laced Cartan matrix they do, and together with\n`H_(\u03b1\u1d62) \u21a6 H_(\u03b1_(e i))` the relabelling sends the Chevalley generators of `B` to those of `B'` at\nthe vertex `e i`, so it respects the simple positive pinning. The relabellings are functorial\n(`Matrix.ShellLieAlgebra.reindex_refl`, `Matrix.ShellLieAlgebra.reindex_trans`).\n\n## Main definitions\n\n* `Matrix.ShellLieAlgebra.rootReindex`: the signed permutation on the root coefficients.\n* `Matrix.ShellLieAlgebra.reindex`: the relabelling `H_h \u21a6 H_(h \u2218 e.symm)`,\n `x_a \u21a6 \u03c3(a) x_(a \u2218 e.symm)`, as a linear equivalence.\n* `Matrix.ShellLieAlgebra.reindexLieEquiv`: the same map as an equivalence of Lie algebras over\n `\u2124`, for positive definite `B` with even diagonal.\n\n## Main results\n\n* `Matrix.ShellLieAlgebra.reindex_cartan`, `Matrix.ShellLieAlgebra.reindex_root`: the values on\n Cartan and root vectors.\n* `Matrix.ShellLieAlgebra.reindex_root_single`, `Matrix.ShellLieAlgebra.reindex_root_neg_single`:\n the relabelling preserves the simple root vectors.\n* `Matrix.ShellLieAlgebra.reindex_eq_coverEquiv`: the relabelling is the action of the relabelled\n sign cover.\n* `Matrix.ShellLieAlgebra.reindex_rootBracket`: the relabelling of a root bracket.\n* `Matrix.ShellLieAlgebra.reindex_lie`: the relabelling preserves the bracket, for symmetric `B`.\n* `Matrix.ShellLieAlgebra.reindex_refl`, `Matrix.ShellLieAlgebra.reindex_trans`: functoriality.\n\n## References\n\n* V. G. Kac, *Infinite dimensional Lie algebras*, third edition, Cambridge University Press (1990),\n \u00a77.8.\n-/\n\npublic section\n\nnamespace Matrix.ShellLieAlgebra\n\nopen TauCeti Module\n\nattribute [local instance] trivialMulDistribMulAction\n\nvariable {I J K : Type*} [Fintype I] [LinearOrder I] [Fintype J] [LinearOrder J] [Fintype K]\n [LinearOrder K] {B : Matrix I I \u2124} {B' : Matrix J J \u2124} (e : I \u2243 J) (he : B.reindex e e = B')\n\n/-- The action on the root coefficients: `\u03b4_a \u21a6 s_\u03c3(a) \u03b4_(\u03c3a)`.\nIt is independent of the full Cartan group and its automorphism. -/\nnoncomputable def rootReindex (\u03c3 : Equiv.Perm I) (h\u03c3 : B.reindex \u03c3 \u03c3 = B) :\n (B.normTwoShell \u2192\u2080 \u2124) \u2243\u2097[\u2124] (B.normTwoShell \u2192\u2080 \u2124) :=\n Finsupp.basisSingleOne.equiv\n (Finsupp.basisSingleOne.unitsSMul\n (fun a \u21a6 inversionSign B \u03c3 ((normTwoShellCongr h\u03c3).symm a)))\n (normTwoShellCongr h\u03c3)", "/-- A root coordinate vector is sent to the relabelled coordinate with its pinned sign. -/\n@[simp]\ntheorem rootReindex_single (\u03c3 : Equiv.Perm I) (h\u03c3 : B.reindex \u03c3 \u03c3 = B)\n (a : B.normTwoShell) (n : \u2124) :\n rootReindex \u03c3 h\u03c3 (Finsupp.single a n) =\n inversionSign B \u03c3 a \u2022 Finsupp.single (normTwoShellCongr h\u03c3 a) n :=", "/-- **Relabelling the signed shell Lie algebra.** For a relabelling `e : I \u2243 J` of the vertices of\n`B` with `B.reindex e e = B'`, the linear equivalence `ShellLieAlgebra B \u2243\u2097[\u2124] ShellLieAlgebra B'`\nsending the Cartan vector `H_h` to `H_(h \u2218 e.symm)` and the root vector `x_a` to\n`\u03c3(a) x_(a \u2218 e.symm)`, where `\u03c3` is the inversion sign `Matrix.inversionSign B e`. It preserves the\nbracket for symmetric `B` (`Matrix.ShellLieAlgebra.reindex_lie`). -/\nnoncomputable def reindex : ShellLieAlgebra B \u2243\u2097[\u2124] ShellLieAlgebra B' :=\n (basis B).equiv ((basis B').unitsSMul\n (Sum.elim 1 fun b => inversionSign B e ((normTwoShellCongr he).symm b)))\n (e.sumCongr (normTwoShellCongr he))", "/-- The relabelling rescales the root vector `x_a` by the inversion sign `\u03c3(a)` and moves it to the\nrelabelled root: `x_a \u21a6 \u03c3(a) x_(a \u2218 e.symm)`. -/\n@[simp]\ntheorem reindex_root (a : B.normTwoShell) :\n reindex e he (root B a) = inversionSign B e a \u2022 root B' (normTwoShellCongr he a) :=", "/-- The relabelling sends the Cartan vector `H_h` to the relabelled Cartan vector\n`H_(h \u2218 e.symm)`, with no sign. -/\n@[simp]\ntheorem reindex_cartan (h : I \u2192 \u2124) : reindex e he (cartan B h) = cartan B' (h \u2218 e.symm) :=", "/-- The relabelling sends the simple root vector `x_(\u03b1\u1d62)` to `x_(\u03b1_(e i))`. -/\ntheorem reindex_root_single [DecidableEq I] [DecidableEq J] (i : I)\n (hi : Pi.single i 1 \u2208 B.normTwoShell) (hi' : Pi.single (e i) 1 \u2208 B'.normTwoShell) :\n reindex e he (root B \u27e8Pi.single i 1, hi\u27e9) = root B' \u27e8Pi.single (e i) 1, hi'\u27e9 :=", "/-- The relabelling sends the simple root vector `x_(-\u03b1\u1d62)` to `x_(-\u03b1_(e i))`. -/\ntheorem reindex_root_neg_single [DecidableEq I] [DecidableEq J] (i : I)\n (hi : -Pi.single i 1 \u2208 B.normTwoShell) (hi' : -Pi.single (e i) 1 \u2208 B'.normTwoShell) :\n reindex e he (root B \u27e8-Pi.single i 1, hi\u27e9) = root B' \u27e8-Pi.single (e i) 1, hi'\u27e9 :=", "/-- **Relabelling is the action of the relabelled sign cover.** For a symmetric `B` and a\nrelabelling `e : I \u2243 J` of its vertices with `B.reindex e e = B'`, the relabelling\n`Matrix.ShellLieAlgebra.reindex e he` is the action `Matrix.ShellLieAlgebra.coverEquiv` of the\ncompatible pair formed by the relabelling `Matrix.SignCover.reindex` of the ordered sign covers and\nthe isometry `a \u21a6 a \u2218 e.symm`. -/\ntheorem reindex_eq_coverEquiv (hB : B.IsSymm) :\n reindex e he = coverEquiv (SignCover.reindex e hB he : SignCover B \u2192* SignCover B')\n (LinearEquiv.funCongrLeft \u2124 \u2124 e.symm)\n (fun a b => by subst he; exact comp_equiv_symm_dotProduct_reindex_mulVec e B a b) :=", "/-- **The relabelling of a root bracket**, for symmetric `B`: the ordered signs of the two\nlabellings differ by the coboundary of the inversion sign `\u03c3`, so\n`\u2045x_a, x_b\u2046 \u21a6 \u03c3(a) \u03c3(b) \u2045x_(a \u2218 e.symm), x_(b \u2218 e.symm)\u2046`. -/\ntheorem reindex_rootBracket (hB : B.IsSymm) (a b : B.normTwoShell) :\n reindex e he (rootBracket B a b) =\n (inversionSign B e a * inversionSign B e b) \u2022\n rootBracket B' (normTwoShellCongr he a) (normTwoShellCongr he b) :=", "/-- **The relabelling preserves the bracket**, for symmetric `B`. -/\ntheorem reindex_lie (hB : B.IsSymm) (x y : ShellLieAlgebra B) :\n reindex e he \u2045x, y\u2046 = \u2045reindex e he x, reindex e he y\u2046 :=", "/-- **The identity relabels the signed shell Lie algebra by the identity.** -/\n@[simp]\ntheorem reindex_refl : reindex (Equiv.refl I) (B := B) (by simp) = LinearEquiv.refl \u2124 _ :=", "/-- **Relabellings of the signed shell Lie algebra compose**, for symmetric `B`. -/\ntheorem reindex_trans {B'' : Matrix K K \u2124} (f : J \u2243 K) (hB : B.IsSymm) (hf : B'.reindex f f = B'') :\n (reindex e he).trans (reindex f hf) =\n reindex (e.trans f) (by rw [\u2190 hf, \u2190 he]; ext; simp) :=", "/-- **Relabelling as an isomorphism of Lie algebras.** For positive definite `B` with even\ndiagonal, the relabelling `Matrix.ShellLieAlgebra.reindex` is an isomorphism of the signed Lie\nrings of `B` and of `B' = B.reindex e e`, which is again positive definite with even diagonal. -/\nnoncomputable def reindexLieEquiv (hB : B.PosDef) (hdiag : \u2200 i, Even (B i i)) :\n letI := lieRing hB hdiag\n letI := lieRing (B := B') (he \u25b8 hB.submatrix e.symm.injective) fun j => by\n simpa [\u2190 he] using hdiag (e.symm j)\n ShellLieAlgebra B \u2243\u2097\u2045\u2124\u2046 ShellLieAlgebra B' :=\n letI := lieRing hB hdiag\n letI := lieRing (B := B') (he \u25b8 hB.submatrix e.symm.injective) fun j => by\n simpa [\u2190 he] using hdiag (e.symm j)\n { reindex e he with\n map_lie' := reindex_lie e he hB.isHermitian.isSymm _ _ }", "@[simp]\ntheorem reindexLieEquiv_apply (hB : B.PosDef) (hdiag : \u2200 i, Even (B i i))\n (x : ShellLieAlgebra B) : reindexLieEquiv e he hB hdiag x = reindex e he x :=", "end Matrix.ShellLieAlgebra"], "free_length": 2733, "file_length": 6133, "heartbeats": 9565, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Analysis.Distribution.WaveFrontSet.ChangeOfVariables", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Analysis/Distribution/WaveFrontSet/ChangeOfVariables.lean", "module": "TauCeti.Analysis.Distribution.WaveFrontSet.ChangeOfVariables", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Analysis.Distribution.ChangeOfVariables\npublic import TauCeti.Analysis.Distribution.MicrolocalRegularity\npublic import TauCeti.Analysis.Distribution.WaveFrontSet.Localization\npublic import TauCeti.Analysis.Distribution.WaveFrontSet.Pullback.Cone\nimport TauCeti.Algebra.Module.ZLattice.Dual\nimport TauCeti.Algebra.Module.ZLattice.Summable\nimport TauCeti.Analysis.Calculus.BumpFunction.FiniteDimension\nimport TauCeti.Analysis.Calculus.FDeriv.Equiv\nimport TauCeti.Analysis.Distribution.TestFunction.ChangeOfVariables\nimport TauCeti.Analysis.Distribution.TestFunction.PartitionOfUnity\nimport TauCeti.Analysis.Fourier.FourierCharDeriv\nimport TauCeti.Analysis.Fourier.NonstationaryPhase.Directional\nimport TauCeti.Analysis.Normed.Module.Cone\n\n/-!\n# The wave front set under smooth changes of variables\n\nLet `e` be a smooth change of variables of a finite-dimensional real inner product space `E`: a\nsmooth open partial homeomorphism with smooth inverse. A complex distribution `T` on an open set\n`\u03a9` pulls back along `e` to the distribution `e^* T` on an open subset `U` of the source of `e`\nmapped into `\u03a9` (`Distribution.compCLMOfOpenPartialHomeomorph`). This file proves that the wave\nfront set transforms as a subset of the cotangent bundle: covectors pull back by the transpose of\nthe derivative,\n\n`(x, \u03be) \u2208 WF(e^* T) \u2194 (e x, (De\u207b\u00b9(e x))\u1d40 \u03be) \u2208 WF(T)` for `x \u2208 U`\n\n(`Distribution.waveFrontSet_compCLMOfOpenPartialHomeomorph`), that is,\n`WF(e^* T) = {(x, De(x)\u1d40 \u03b7) | x \u2208 U, (e x, \u03b7) \u2208 WF(T)}` (`TauCeti.covectorPullback`). This is the\ninvariance of the wave front set under diffeomorphisms (H\u00f6rmander I, Theorem 8.2.4), which makes\nit a well-defined closed conic subset of the cotangent bundle of a manifold. For linear `e` it is\n`Distribution.waveFrontSet_compCLMOfContinuousLinearEquiv`.\n\n## The argument\n\nLet `T` be microlocally smooth at `(y\u2080, \u03b7\u2080)` with `y\u2080 = e x\u2080` and `\u03b7\u2080 = B\u1d40 \u03be\u2080`, where\n`B = De\u207b\u00b9(y\u2080)`. For a cutoff `\u03c6` supported near `x\u2080`, the localized Fourier transform of `e^* T`\nat `\u03be` pairs `T` with `\u03c8(y) \ud835\udc1e(-\u27eae\u207b\u00b9 y, \u03be\u27eb)`, where `\u03c8` is the pushforward of `\u03c6`. Factoring out the\nlinear part of the phase, this is the localized Fourier transform of `T` at `\u03b7 = B\u1d40 \u03be` with the\ncutoff `G_\u03be(y) = \u03c8(y) \ud835\udc1e(\u27eay, B\u1d40 \u03be\u27eb - \u27eae\u207b\u00b9 y, \u03be\u27eb)`, which depends on `\u03be`. Expanding `G_\u03be` in a\nFourier series on a compact set meeting none of its nonzero lattice translates\n(`Distribution.hasSum_localFourier_ofSupportedIn`) gives\n\n`T (G_\u03be e_\u03b7) = \u2211 m, a_m(\u03be) T (\u03c7 e_(\u03b7 - m))`, `a_m(\u03be) = (covolume)\u207b\u00b9 \ud835\udcd5 G_\u03be (m)`.\n\nThe terms with `\u2016m\u2016 \u2264 c \u2016\u03b7\u2016` evaluate `T (\u03c7 e_\u03b6)` in the cone around `\u03b7\u2080` where it decays\nrapidly, and `|a_m(\u03be)|` is bounded. For the others, the phase of `\ud835\udcd5 G_\u03be (m)` has derivative\n`\u2016m\u2016 + \u27ea(B - De\u207b\u00b9(y)) w, \u03be\u27eb` in the direction `w = -m / \u2016m\u2016`, which is at least `\u2016m\u2016 / 2` once\n`De\u207b\u00b9` stays close to `B` on the support of `\u03c8`, so `\ud835\udcd5 G_\u03be (m)` decays faster than every power of\n`\u2016m\u2016` by non-stationary phase (`TauCeti.exists_norm_integral_mul_fourierChar_le`).\n\n## Main results\n\n* `Distribution.hasSum_localFourier_compCLMOfOpenPartialHomeomorph`: the localized Fourier\n transform of `e^* T` as a lattice series of localized Fourier transforms of `T`, with the\n Fourier coefficients of `e_* (\u03c6 e_\u03be)` as coefficients.\n* `Distribution.IsMicrolocallySmoothAt.compCLMOfOpenPartialHomeomorph`: if `T` is microlocally\n smooth at `(e x, (De\u207b\u00b9(e x))\u1d40 \u03be)`, then `e^* T` is microlocally smooth at `(x, \u03be)`.\n* `Distribution.isInvariantMicrolocalRegularity_isMicrolocallySmoothAt`: microlocal smoothness is\n an invariant notion of microlocal regularity (`Distribution.IsInvariantMicrolocalRegularity`).\n* `Distribution.isMicrolocallySmoothAt_compCLMOfOpenPartialHomeomorph_iff`: the converse, for\n `x \u2208 U`, by pulling back along `e\u207b\u00b9` from `e '' U`.\n* `Distribution.waveFrontSet_compCLMOfOpenPartialHomeomorph`: the wave front set of `e^* T` is\n the pullback `e^* WF(T)`.\n* `OpenPartialHomeomorph.mem_covectorPullback_iff`: for `U` in the source of `e`,\n `(x, \u03be) \u2208 e^* \u0393 \u2194 x \u2208 U \u2227 (e x, (De\u207b\u00b9(e x))\u1d40 \u03be) \u2208 \u0393`.\n* `Distribution.waveFrontSet_compCLMOfOpenPartialHomeomorph_subset`: the pullback\n `e^* \u0393 = {(x, De(x)\u1d40 \u03b7) | x \u2208 U, (e x, \u03b7) \u2208 \u0393}` (`TauCeti.covectorPullback`) of a set `\u0393` of\n covectors contains the wave front set of `e^* T` whenever `\u0393` contains that of `T`.\n* `OpenPartialHomeomorph.ne_zero_of_mem_covectorPullback`,\n `OpenPartialHomeomorph.isOpen_prod_compl_sdiff_covectorPullback`: like `\u0393`, the cone `e^* \u0393`\n contains no zero covectors, and it is closed in `U \u00d7 (E \\ {0})` when `\u0393` is closed in\n `\u03a9 \u00d7 (E \\ {0})`.\n\n## References\n\n* L. H\u00f6rmander, *The Analysis of Linear Partial Differential Operators I*, second edition,\n Springer, 1990, Theorem 8.2.4 and Theorem 7.7.1.\n-/\n\npublic section\n\nnoncomputable section\n\nopen Complex Filter Function Metric Set TopologicalSpace TestFunction MeasureTheory\nopen scoped Distributions Topology FourierTransform RealInnerProductSpace ContDiff InnerProduct\n\nnamespace Distribution\n\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace \u211d E] [FiniteDimensional \u211d E]\n\n/-! ### The wave front set of a pullback -/\n\nvariable {e : OpenPartialHomeomorph E E} {U \u03a9 : Opens E}\n {he : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e e.source} {he' : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e.symm e.target}\n {hU : (U : Set E) \u2286 e.source} {hU\u03a9 : MapsTo e U \u03a9}\n\n/-- **The localized Fourier transform of a pullback as a lattice series.** Let `\u03c7` be supported in\na compact set `K \u2286 \u03a9` which meets none of its translates by nonzero vectors of a full lattice `L`,\nand equal to one at `e x` for every `x` in the support of the cutoff `\u03c6`. Then the localized Fourier\ntransform of `e^* T` with cutoff `\u03c6` at `\u03be` is a superposition of the localized Fourier transforms\nof `T` with cutoff `\u03c7` at the frequencies `-m`, `m \u2208 L^\u2228`:\n\n`(e^* T)(\u03c6 e_\u03be) = \u2211 m, ((covolume L)\u207b\u00b9 \u222b \u03c6(x) \ud835\udc1e(\u27eae x, -m\u27eb - \u27eax, \u03be\u27eb) dx) T (\u03c7 e_(-m))`.\n\nThe coefficients are the Fourier coefficients of the pushed forward test function `e_* (\u03c6 e_\u03be)`,\ncomputed by changing variables. -/\ntheorem hasSum_localFourier_compCLMOfOpenPartialHomeomorph [MeasurableSpace E] [BorelSpace E]\n (T : \ud835\udcd3'(\u03a9, \u2102)) {K : Compacts E} (hK\u03a9 : (K : Set E) \u2286 \u03a9) (L : Submodule \u2124 E)\n [DiscreteTopology L] [IsZLattice \u211d L] (hL : \u2200 x \u2208 K, \u2200 \u2113 : L, x + \u2113 \u2208 K \u2192 \u2113 = 0)\n {\u03c7 : \ud835\udcd3_{K}(E, \u2102)} {\u03c6 : \ud835\udcd3(U, \u2102)} (h\u03c7 : \u2200 x \u2208 tsupport \u03c6, \u03c7 (e x) = 1) (\u03be : E) :\n HasSum (fun m : ZLattice.dual L \u21a6 ((ZLattice.covolume L : \u2102)\u207b\u00b9 *\n \u222b x, \u03c6 x * \ud835\udc1e (\u27eae x, -(m : E)\u27eb - \u27eax, \u03be\u27eb)) \u2022 T.localFourier (ofSupportedIn hK\u03a9 \u03c7) (-m))\n ((compCLMOfOpenPartialHomeomorph e he he' hU hU\u03a9 T).localFourier \u03c6 \u03be) := by\n -- The pushforward `g = e_* (\u03c6 e_\u03be)` of the modulated cutoff.\n set \u03c8 : \ud835\udcd3(U, \u2102) := bilinLeftCLM (ContinuousLinearMap.mul \u211d \u2102) (TauCeti.contDiff_fourierAtom \u03be) \u03c6\n set g := pushforwardCLM e he he' hU hU\u03a9 \u03c8\n have h\u03c8 (x : E) : \u03c8 x = \u03c6 x * \ud835\udc1e (-\u27eax, \u03be\u27eb) := by\n simp [\u03c8, bilinLeftCLM_apply, TauCeti.fourierAtom_eq_fourierChar, -TauCeti.fourierAtom_apply]\n have h\u03c8s : tsupport \u03c8 \u2286 tsupport \u03c6 :=\n closure_mono fun x hx \u21a6 left_ne_zero_of_mul (by rwa [\u2190 h\u03c8])\n -- `g` is supported in `e (supp \u03c6)`, where `\u03c7 = 1`.\n have hg1 : support g \u2286 {y | \u03c7 y = 1} := fun y hy \u21a6 by\n obtain \u27e8x, hx, rfl\u27e9 := (tsupport_pushforwardCLM_subset \u03c8).trans (image_mono h\u03c8s)\n (subset_tsupport _ hy)\n exact h\u03c7 x hx\n -- The pairing of `e^* T` with `\u03c6 e_\u03be` is the pairing of `T` with `g`.\n have h0 : T.complexPairing g =\n (compCLMOfOpenPartialHomeomorph e he he' hU hU\u03a9 T).localFourier \u03c6 \u03be := by\n rw [localFourier_def, complexPairing_compCLMOfOpenPartialHomeomorph]\n -- The Fourier coefficients of `g`, by changing variables `y = e x`.\n have hF (m : E) : \ud835\udcd5 (g : E \u2192 \u2102) m = \u222b x, \u03c6 x * \ud835\udc1e (\u27eae x, -m\u27eb - \u27eax, \u03be\u27eb) := by\n rw [Real.fourier_eq]\n calc \u222b v, \ud835\udc1e (-\u27eav, m\u27eb) \u2022 g v = \u222b v, g v \u2022 (\ud835\udc1e (-\u27eav, m\u27eb) : \u2102) := by\n refine integral_congr_ae (Eventually.of_forall fun v \u21a6 ?_)\n simp [Circle.smul_def, mul_comm]\n _ = \u222b x, \u03c8 x \u2022 (\ud835\udc1e (-\u27eae x, m\u27eb) : \u2102) := integral_pushforwardCLM_smul volume \u03c8 _\n _ = _ := by\n refine integral_congr_ae (Eventually.of_forall fun x \u21a6 ?_)\n simp only [h\u03c8, smul_eq_mul, inner_neg_right, sub_eq_add_neg, AddChar.map_add_eq_mul,\n Circle.coe_mul]\n ring\n have h := hasSum_fourier_mul_localFourier T (ofSupportedIn hK\u03a9 \u03c7) L\n (fun y hy \u2113 h\u2113 h \u21a6 congrArg Subtype.val\n (hL y (\u03c7.tsupport_subset hy) \u27e8\u2113, h\u2113\u27e9 (\u03c7.tsupport_subset h)))\n (\u03c6 := g) fun y hy \u21a6 by simpa using hg1 hy\n rw [\u2190 h0]\n simpa only [hF, smul_eq_mul] using h\n\n/-- The localized Fourier transform of the pullback `e^* T` with cutoff `\u03c6` at `\u03b6` is that of `T`\nat `B\u1d40 \u03b6` with the cutoff `G = (e_* \u03c6) \ud835\udc1e(\u27ea\u00b7, B\u1d40 \u03b6\u27eb - \u27ea\u03c3 \u00b7, \u03b6\u27eb)`, for any `\u03c3` agreeing with `e\u207b\u00b9` on\nthe support of the pushforward `e_* \u03c6`. -/\nprivate theorem localFourier_compCLMOfOpenPartialHomeomorph_eq (T : \ud835\udcd3'(\u03a9, \u2102)) (\u03c6 : \ud835\udcd3(U, \u2102))\n {\u03c3 : E \u2192 E} (h\u03c3 : \u2200 y \u2208 e.target, \u03c6 (e.symm y) \u2260 0 \u2192 \u03c3 y = e.symm y) {K : Compacts E}\n (hK\u03a9 : (K : Set E) \u2286 \u03a9) (G : \ud835\udcd3_{K}(E, \u2102)) (B : E \u2192L[\u211d] E) (\u03b6 : E)\n (hG : \u2200 y, G y = pushforwardCLM e he he' hU hU\u03a9 \u03c6 y * \ud835\udc1e (\u27eay, (B\u2020) \u03b6\u27eb - \u27ea\u03c3 y, \u03b6\u27eb)) :\n (compCLMOfOpenPartialHomeomorph e he he' hU hU\u03a9 T).localFourier \u03c6 \u03b6 =\n T.localFourier (ofSupportedIn hK\u03a9 G) ((B\u2020) \u03b6) := by\n rw [localFourier_def, complexPairing_compCLMOfOpenPartialHomeomorph]\n refine (localFourier_eq _ _ fun y \u21a6 ?_).symm\n by_cases hy : y \u2208 e.target\n \u00b7 rw [pushforwardCLM_apply_of_mem _ hy]\n by_cases h\u03c6y : \u03c6 (e.symm y) = 0\n \u00b7 simp [bilinLeftCLM_apply, hG, pushforwardCLM_apply_of_mem _ hy, h\u03c6y]\n \u00b7 simp only [bilinLeftCLM_apply, ContinuousLinearMap.mul_apply', coe_ofSupportedIn, hG,\n pushforwardCLM_apply_of_mem _ hy, h\u03c3 y hy h\u03c6y, TauCeti.fourierAtom_eq_fourierChar,\n real_smul, real_inner_comm \u03b6]\n rw [mul_assoc, \u2190 Circle.coe_mul, \u2190 AddChar.map_add_eq_mul, \u2190 mul_assoc]\n congr 3\n ring\n \u00b7 simp [pushforwardCLM_apply_of_notMem _ hy, hG]\n\nomit [FiniteDimensional \u211d E] in\n/-- **Decay of the localized Fourier transforms with phase-modulated cutoffs.** Let `T` have\nlocalized Fourier transforms decaying rapidly on a cone `\u0393` for all cutoffs supported in `W`, and\nlet `\u0393'` have conic neighbourhoods of relative size `c \u2264 1 / 2` inside `\u0393`. Let `\u03c8` be supported\nin a set `K\u2081` on which a smooth function `\u03c7` supported in a compact set `K \u2286 W \u2229 \u03a9` equals one,\n`K` meeting none of its nonzero translates by a lattice `L`. If `\u2016\u03b6\u2016 \u2264 a \u2016B\u1d40 \u03b6\u2016` and `D\u03c3` stays\nwithin `c / (2 a)` of `B` on the support of `\u03c8`, then `T` with the cutoffs\n`G \u03b6 = \u03c8 \ud835\udc1e(\u27ea\u00b7, B\u1d40 \u03b6\u27eb - \u27ea\u03c3 \u00b7, \u03b6\u27eb)` has localized Fourier transform at `B\u1d40 \u03b6` decaying rapidly in\n`B\u1d40 \u03b6 \u2208 \u0393'`. The Fourier series of `G \u03b6` on `K` is split into the frequencies `m` small\ncompared with `B\u1d40 \u03b6`, which stay in `\u0393`, and the large ones, where `\ud835\udcd5 (G \u03b6)` decays by\nnon-stationary phase. -/\nprivate theorem exists_one_add_norm_pow_mul_norm_localFourier_le [MeasurableSpace E]\n [BorelSpace E] [FiniteDimensional \u211d E] {T : \ud835\udcd3'(\u03a9, \u2102)} {W \u0393 \u0393' : Set E}\n (hdecay : \u2200 \u03c8 : \ud835\udcd3(\u03a9, \u2102), tsupport \u03c8 \u2286 W \u2192\n \u2200 N : \u2115, \u2203 C, \u2200 \u03b7 \u2208 \u0393, (1 + \u2016\u03b7\u2016) ^ N * \u2016T.localFourier \u03c8 \u03b7\u2016 \u2264 C)\n {c : \u211d} (hc : 0 < c) (hc1 : c \u2264 1 / 2) (h\u0393' : \u2200 \u03b7 \u2208 \u0393', closedBall \u03b7 (c * \u2016\u03b7\u2016) \u2286 \u0393)\n {K : Compacts E} (hK\u03a9 : (K : Set E) \u2286 \u03a9) (hKW : (K : Set E) \u2286 W) {K\u2081 : Set E}\n {\u03c7 : \ud835\udcd3_{K}(E, \u2102)} (h\u03c7 : \u2200 y \u2208 K\u2081, \u03c7 y = 1) (L : Submodule \u2124 E) [DiscreteTopology L]\n [IsZLattice \u211d L] (hL : \u2200 y \u2208 K, \u2200 \u2113 : L, y + \u2113 \u2208 K \u2192 \u2113 = 0) {\u03c8 : \ud835\udcd3(\u03a9, \u2102)}\n (h\u03c8K\u2081 : tsupport \u03c8 \u2286 K\u2081) {\u03c3 : E \u2192 E} (h\u03c3 : ContDiff \u211d \u221e \u03c3) (B : E \u2192L[\u211d] E) {a : \u211d}\n (ha : 0 < a) (hB : \u2200 \u03b6, \u2016\u03b6\u2016 \u2264 a * \u2016(B\u2020) \u03b6\u2016)\n (h\u03c3B : \u2200 y \u2208 tsupport (\u03c8 : E \u2192 \u2102), \u2016fderiv \u211d \u03c3 y - B\u2016 \u2264 c / (2 * a))\n (G : E \u2192 \ud835\udcd3_{K}(E, \u2102)) (hG : \u2200 \u03b6 y, G \u03b6 y = \u03c8 y * \ud835\udc1e (\u27eay, (B\u2020) \u03b6\u27eb - \u27ea\u03c3 y, \u03b6\u27eb)) (N : \u2115) :\n \u2203 C, \u2200 \u03b6, (B\u2020) \u03b6 \u2208 \u0393' \u2192\n (1 + \u2016(B\u2020) \u03b6\u2016) ^ N * \u2016T.localFourier (ofSupportedIn hK\u03a9 (G \u03b6)) ((B\u2020) \u03b6)\u2016 \u2264 C := by\n -- The Fourier series of `G \u03b6` in the modulations of `\u03c7`, and the growth and decay of the\n -- localized Fourier transform `F` of `T` with cutoff `\u03c7`.\n have h\u03c7G (\u03b6 : E) : EqOn \u03c7 1 (support (G \u03b6)) := fun y hy \u21a6 by\n refine h\u03c7 y (h\u03c8K\u2081 (subset_tsupport _ fun h0 \u21a6 hy ?_))\n rw [hG, h0, zero_mul]\n obtain \u27e8C\u2080, k, hF\u27e9 := exists_norm_localFourier_le T (ofSupportedIn hK\u03a9 \u03c7)\n set q := Module.finrank \u211d E + 1\n have hq : Summable fun m : ZLattice.dual L \u21a6 ((1 + \u2016(m : E)\u2016) ^ q)\u207b\u00b9 :=\n ZLattice.summable_one_add_norm_pow_inv _ (by rw [ZLattice.rank \u211d]; omega)\n obtain \u27e8C\u2081, hC\u2081\u27e9 := hdecay (ofSupportedIn hK\u03a9 \u03c7)\n (fun y hy \u21a6 hKW (\u03c7.tsupport_subset (by simpa using hy))) (N + q)\n -- The Fourier coefficients of `G \u03b6` are bounded, and decay at large frequencies.\n set \u03ba := \u2016((ZLattice.covolume L : \u2102))\u207b\u00b9\u2016\n set A\u2080 := \u03ba * \u222b y, \u2016\u03c8 y\u2016\n have ha\u2080 (\u03b6 m : E) : \u2016(ZLattice.covolume L : \u2102)\u207b\u00b9 * \ud835\udcd5 (G \u03b6 : E \u2192 \u2102) m\u2016 \u2264 A\u2080 := by\n rw [norm_mul]\n refine mul_le_mul_of_nonneg_left ((Real.norm_fourier_le_integral_norm _ _).trans_eq\n (integral_congr_ae (ae_of_all _ fun y \u21a6 ?_))) (norm_nonneg _)\n simp [hG]\n obtain \u27e8C\u2082, hC\u2082\u27e9 := TauCeti.exists_norm_pow_mul_norm_fourier_mul_fourierChar_le \u03c8.contDiff\n \u03c8.hasCompactSupport h\u03c3 B (by positivity) h\u03c3B (N + 2 * k + q)\n refine \u27e8_, fun \u03b6 h\u03b6 \u21a6 TauCeti.one_add_norm_pow_mul_norm_le_of_hasSum\n (fun m : ZLattice.dual L \u21a6 (m : E)) hq hF hC\u2081 hc hc1 (h\u0393' _ h\u03b6) (A\u2080 := A\u2080)\n (A\u2081 := \u03ba * max C\u2082 0) (by positivity) (by positivity) (fun m \u21a6 ha\u2080 \u03b6 m) (fun m hm \u21a6 ?_)\n (hasSum_localFourier_ofSupportedIn T hK\u03a9 L hL (h\u03c7G \u03b6) _)\u27e9\n -- Frequencies `m` with `\u2016m\u2016 > c \u2016B\u1d40 \u03b6\u2016 \u2265 (c / a) \u2016\u03b6\u2016` are non-stationary.\n have hm0 : (m : E) \u2260 0 := fun h0 \u21a6 by\n rw [h0, norm_zero] at hm; exact (lt_irrefl _ (hm.trans_le' (by positivity)))\n have h\u03b5m : 2 * (c / (2 * a)) * \u2016\u03b6\u2016 \u2264 \u2016(m : E)\u2016 := by\n have : 2 * (c / (2 * a)) * \u2016\u03b6\u2016 \u2264 c * \u2016(B\u2020) \u03b6\u2016 := by\n rw [show 2 * (c / (2 * a)) = c / a by field_simp, div_mul_eq_mul_div,\n div_le_iff\u2080 ha]\n nlinarith [hB \u03b6]\n linarith\n have hGf : (G \u03b6 : E \u2192 \u2102) = fun y \u21a6 \u03c8 y * \ud835\udc1e (\u27eay, (B\u2020) \u03b6\u27eb - \u27ea\u03c3 y, \u03b6\u27eb) := funext (hG \u03b6)\n rw [norm_mul, mul_left_comm, hGf]\n exact mul_le_mul_of_nonneg_left ((hC\u2082 \u03b6 m hm0 h\u03b5m).trans (le_max_left _ _)) (norm_nonneg _)\n\nvariable (e he he' hU hU\u03a9) in\n/-- **The wave front set of a pullback along a change of variables.** If `T` is microlocally\nsmooth at `(e x, (De\u207b\u00b9(e x))\u1d40 \u03be)`, then its pullback `e^* T` is microlocally smooth at `(x, \u03be)`\n(H\u00f6rmander I, Theorem 8.2.4). -/\ntheorem IsMicrolocallySmoothAt.compCLMOfOpenPartialHomeomorph {T : \ud835\udcd3'(\u03a9, \u2102)} {x \u03be : E}\n (hx : x \u2208 U) (h : T.IsMicrolocallySmoothAt (e x) (((fderiv \u211d e.symm (e x))\u2020) \u03be)) :\n (compCLMOfOpenPartialHomeomorph e he he' hU hU\u03a9 T).IsMicrolocallySmoothAt x \u03be := by\n borelize E\n set B : E \u2192L[\u211d] E := fderiv \u211d e.symm (e x)\n set a := \u2016fderiv \u211d e x\u2016 + 1\n have hxs : x \u2208 e.source := hU hx\n have hy\u2080 : e x \u2208 e.target := e.map_source hxs\n -- Frequencies are comparable through the transposes: `\u2016\u03b6\u2016 \u2264 (\u2016De(x)\u2016 + 1) \u2016B\u1d40 \u03b6\u2016`.\n have hB (\u03b6 : E) : \u2016\u03b6\u2016 \u2264 a * \u2016(B\u2020) \u03b6\u2016 :=\n calc \u2016\u03b6\u2016 = \u2016((fderiv \u211d e x)\u2020) ((B\u2020) \u03b6)\u2016 := by\n rw [e.adjoint_fderiv_apply_adjoint_fderiv_symm_apply_of_contDiffOn he he' (by simp) hxs]\n _ \u2264 \u2016(fderiv \u211d e x)\u2020\u2016 * \u2016(B\u2020) \u03b6\u2016 := ContinuousLinearMap.le_opNorm _ _\n _ \u2264 a * \u2016(B\u2020) \u03b6\u2016 := by rw [LinearIsometryEquiv.norm_map]; gcongr; linarith\n -- The decay of `T` near `(e x, B\u1d40 \u03be)`, uniform over the cutoffs supported in `W`, on the cone\n -- `\u0393`; the smaller cone `\u0393'` has conic neighbourhoods of relative size `c'` inside `\u0393`.\n obtain \u27e8W, hW, \u0393, h\u0393o, h\u0393\u03be, h\u0393c, hdecay\u27e9 := h.exists_nhds_cone\n obtain \u27e8\u0393', h\u0393'o, h\u0393'\u03be, h\u0393'c, c, hc, h\u0393'\u27e9 := h\u0393o.exists_cone_closedBall_subset h\u0393c h\u0393\u03be\n set c' := min c (1 / 2)\n have hc' : 0 < c' := lt_min hc (by norm_num)\n have h\u0393'' : \u2200 \u03b7 \u2208 \u0393', closedBall \u03b7 (c' * \u2016\u03b7\u2016) \u2286 \u0393 := fun \u03b7 h\u03b7 \u21a6\n (closedBall_subset_closedBall (by gcongr; exact min_le_left _ _)).trans (h\u0393' \u03b7 h\u03b7)\n -- A compact set `K \u2286 W \u2229 \u03a9` around `e x`, a lattice, and a cutoff `\u03c7` equal to one on `K\u2081 \u220b e x`.\n obtain \u27e8K, K\u2081, hKW, hK\u2081, hK\u2081K, \u27e8\u03c7, h\u03c7\u27e9, L, _, _, hL\u27e9 :=\n ContDiffMapSupportedIn.exists_compacts_cutoff_lattice\n (inter_mem hW (\u03a9.isOpen.mem_nhds (hU\u03a9 hx)))\n have hK\u03a9 : (K : Set E) \u2286 \u03a9 := hKW.trans inter_subset_right\n -- A smooth `\u03c3` equal to `e\u207b\u00b9` near `e x`; near `e x`, `D\u03c3` stays within `c' / (2 a)` of `B`.\n obtain \u27e8\u03c3, h\u03c3, -, h\u03c3e\u27e9 :=\n he'.exists_contDiff_eventuallyEq_of_finiteDimensional (e.open_target.mem_nhds hy\u2080)\n have h\u03b5 : 0 < c' / (2 * a) := by positivity\n set S : Set E := K\u2081 \u2229 {y | \u03c3 y = e.symm y} \u2229 {y | \u2016fderiv \u211d \u03c3 y - B\u2016 < c' / (2 * a)}\n have hS : S \u2208 \ud835\udcdd (e x) := by\n have h\u03c3c := ((h\u03c3.continuous_fderiv (by simp)).continuousAt (x := e x)).eventually\n (Metric.ball_mem_nhds _ h\u03b5)\n rw [h\u03c3e.fderiv_eq] at h\u03c3c\n exact inter_mem (inter_mem hK\u2081 h\u03c3e) (h\u03c3c.mono fun y hy \u21a6 by simpa [dist_eq_norm] using hy)\n -- A cutoff `\u03c6` at `x` whose pushforward `\u03c8` is supported in `S`.\n obtain \u27e8\u03c6, h\u03c6s, h\u03c6x\u27e9 := exists_tsupport_subset_apply_eq (\u03a9 := U)\n (inter_mem (U.isOpen.mem_nhds hx) ((e.continuousAt hxs).preimage_mem_nhds hS))\n inter_subset_left (1 : \u2102)\n set \u03c8 : \ud835\udcd3(\u03a9, \u2102) := pushforwardCLM e he he' hU hU\u03a9 \u03c6\n have h\u03c8S : tsupport \u03c8 \u2286 S :=\n (tsupport_pushforwardCLM_subset \u03c6).trans (image_subset_iff.2 (h\u03c6s.trans inter_subset_right))\n -- The cutoffs `G \u03b6 = \u03c8 \ud835\udc1e(\u27ea\u00b7, B\u1d40 \u03b6\u27eb - \u27ea\u03c3 \u00b7, \u03b6\u27eb)`, supported in `K`.\n have hGc (\u03b6 : E) : ContDiff \u211d \u221e fun y \u21a6 \u03c8 y * \ud835\udc1e (\u27eay, (B\u2020) \u03b6\u27eb - \u27ea\u03c3 y, \u03b6\u27eb) :=\n \u03c8.contDiff.mul\n ((contDiff_id.inner \u211d contDiff_const).sub (h\u03c3.inner \u211d contDiff_const)).fourierChar\n have hGs (\u03b6 : E) : support (fun y \u21a6 \u03c8 y * \ud835\udc1e (\u27eay, (B\u2020) \u03b6\u27eb - \u27ea\u03c3 y, \u03b6\u27eb)) \u2286 K := fun y hy \u21a6\n hK\u2081K (h\u03c8S (subset_tsupport _ (left_ne_zero_of_mul hy))).1.1\n let G (\u03b6 : E) : \ud835\udcd3_{K}(E, \u2102) := ContDiffMapSupportedIn.of_support_subset (hGc \u03b6) (hGs \u03b6)\n have hG (\u03b6 y : E) : G \u03b6 y = \u03c8 y * \ud835\udc1e (\u27eay, (B\u2020) \u03b6\u27eb - \u27ea\u03c3 y, \u03b6\u27eb) :=\n ContDiffMapSupportedIn.coe_of_support_subset _ _ y\n -- On the support of `\u03c6 \u2218 e\u207b\u00b9`, `\u03c3 = e\u207b\u00b9`.\n have h\u03c3\u03c6 : \u2200 y \u2208 e.target, \u03c6 (e.symm y) \u2260 0 \u2192 \u03c3 y = e.symm y := fun y hy h\u03c6y \u21a6 by\n simpa [e.right_inv hy] using ((h\u03c6s (subset_tsupport _ h\u03c6y)).2).1.2\n refine isMicrolocallySmoothAt_iff.2 \u27e8\u03c6, by simp [h\u03c6x], (B\u2020) \u207b\u00b9' \u0393',\n h\u0393'o.preimage (B\u2020).continuous, h\u0393'\u03be,\n fun t ht \u03b6 h\u03b6 \u21a6 by simpa [map_smul] using h\u0393'c t ht _ h\u03b6, fun N \u21a6 ?_\u27e9\n obtain \u27e8C, hC\u27e9 := exists_one_add_norm_pow_mul_norm_localFourier_le hdecay hc'\n (min_le_right _ _) h\u0393'' hK\u03a9 (fun y hy \u21a6 (hKW hy).1) h\u03c7 L hL (fun y hy \u21a6 (h\u03c8S hy).1.1) h\u03c3 B\n (by positivity) hB (fun y hy \u21a6 (h\u03c8S hy).2.le) G hG N\n refine \u27e8a ^ N * C, fun \u03b6 h\u03b6 \u21a6 ?_\u27e9\n rw [localFourier_compCLMOfOpenPartialHomeomorph_eq T \u03c6 h\u03c3\u03c6 hK\u03a9 (G \u03b6) B \u03b6 (hG \u03b6)]\n calc (1 + \u2016\u03b6\u2016) ^ N * \u2016T.localFourier (ofSupportedIn hK\u03a9 (G \u03b6)) ((B\u2020) \u03b6)\u2016\n \u2264 (a * (1 + \u2016(B\u2020) \u03b6\u2016)) ^ N * \u2016T.localFourier (ofSupportedIn hK\u03a9 (G \u03b6)) ((B\u2020) \u03b6)\u2016 := by\n gcongr\n nlinarith [hB \u03b6, norm_nonneg ((B\u2020) \u03b6), norm_nonneg (fderiv \u211d e x)]\n _ = a ^ N * ((1 + \u2016(B\u2020) \u03b6\u2016) ^ N *\n \u2016T.localFourier (ofSupportedIn hK\u03a9 (G \u03b6)) ((B\u2020) \u03b6)\u2016) := by rw [mul_pow]; ring\n _ \u2264 a ^ N * C := mul_le_mul_of_nonneg_left (hC \u03b6 h\u03b6) (by positivity)\n\n/-- Microlocal smoothness is an invariant notion of microlocal regularity: it is open, linear,\nconic, preserved by smooth multiples and pullback along smooth changes of variables, and unchanged\nby restriction to smaller open sets. -/\ntheorem isInvariantMicrolocalRegularity_isMicrolocallySmoothAt :\n IsInvariantMicrolocalRegularity\n fun (\u03a9 : Opens E) (T : \ud835\udcd3'(\u03a9, \u2102)) x \u03be \u21a6 T.IsMicrolocallySmoothAt x \u03be where\n isOpen_setOf _ T := isOpen_setOf_isMicrolocallySmoothAt T\n zero hx \u03be := isMicrolocallySmoothAt_zero hx \u03be\n add hS hT := hS.add hT\n smul c hT := hT.smul c\n smul_covector hr hT := (isMicrolocallySmoothAt_smul_iff hr).2 hT\n smulLeftCLM hg hT := hT.smulLeftCLM hg\n smulLeftCLM_iff hg hx := isMicrolocallySmoothAt_smulLeftCLM_iff hg hx\n restrictCLM_iff h _ _ hx _ := isMicrolocallySmoothAt_restrictCLM_iff h hx\n compCLMOfOpenPartialHomeomorph he he' hU hU\u03a9 _ _ _ hx hT :=\n hT.compCLMOfOpenPartialHomeomorph _ he he' hU hU\u03a9 hx\n\n/-- **The wave front set under a change of variables, pointwise.** For `x \u2208 U`, the pullback\n`e^* T` is microlocally smooth at `(x, \u03be)` exactly when `T` is microlocally smooth at\n`(e x, (De\u207b\u00b9(e x))\u1d40 \u03be)`. -/\ntheorem isMicrolocallySmoothAt_compCLMOfOpenPartialHomeomorph_iff {T : \ud835\udcd3'(\u03a9, \u2102)} {x \u03be : E}\n (hx : x \u2208 U) :\n (compCLMOfOpenPartialHomeomorph e he he' hU hU\u03a9 T).IsMicrolocallySmoothAt x \u03be \u2194\n T.IsMicrolocallySmoothAt (e x) (((fderiv \u211d e.symm (e x))\u2020) \u03be) :=\n isInvariantMicrolocalRegularity_isMicrolocallySmoothAt.compCLMOfOpenPartialHomeomorph_iff hx\n\nend Distribution\n\n/-! ### The pullback of a cone -/\n\nnamespace OpenPartialHomeomorph\n\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace \u211d E] [FiniteDimensional \u211d E]\n\n/-- Over a subset of the source of a change of variables `e`, the pullback `e^* \u0393` consists of\nthe `(x, \u03be)` with `x \u2208 U` and `(e x, (De\u207b\u00b9(e x))\u1d40 \u03be) \u2208 \u0393`: the covector `\u03b7` with `De(x)\u1d40 \u03b7 = \u03be` is\n`(De\u207b\u00b9(e x))\u1d40 \u03be`. -/\ntheorem mem_covectorPullback_iff (e : OpenPartialHomeomorph E E)\n (he : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e e.source) (he' : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e.symm e.target)\n {U : Set E} (hU : U \u2286 e.source) {\u0393 : Set (E \u00d7 E)} {p : E \u00d7 E} :\n p \u2208 TauCeti.covectorPullback e U \u0393 \u2194\n p.1 \u2208 U \u2227 (e p.1, ((fderiv \u211d e.symm (e p.1))\u2020) p.2) \u2208 \u0393 := by\n rw [TauCeti.mem_covectorPullback]\n refine \u27e8fun \u27e8hx, \u03b7, h\u03b7, h\u03b7p\u27e9 \u21a6 \u27e8hx, ?_\u27e9, fun \u27e8hx, hp\u27e9 \u21a6 \u27e8hx, _, hp,\n e.adjoint_fderiv_apply_adjoint_fderiv_symm_apply_of_contDiffOn he he' (by simp) (hU hx) p.2\u27e9\u27e9\n rwa [\u2190 h\u03b7p,\n e.adjoint_fderiv_symm_apply_adjoint_fderiv_apply_of_contDiffOn he he' (by simp) (hU hx) \u03b7]\n\n/-- The pullback `e^* \u0393` along a change of variables of a set `\u0393` of nonzero covectors contains no\nzero covectors, since the transposed derivative of `e` is injective. -/\ntheorem ne_zero_of_mem_covectorPullback (e : OpenPartialHomeomorph E E)\n (he : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e e.source) (he' : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e.symm e.target)\n {U : Set E} (hU : U \u2286 e.source) {\u0393 : Set (E \u00d7 E)} (h\u03930 : \u2200 p \u2208 \u0393, p.2 \u2260 0) {p : E \u00d7 E}\n (hp : p \u2208 TauCeti.covectorPullback e U \u0393) : p.2 \u2260 0 :=\n TauCeti.ne_zero_of_mem_covectorPullback (fun x hx \u21a6 LeftInverse.injective\n (e.adjoint_fderiv_symm_apply_adjoint_fderiv_apply_of_contDiffOn he he' (by simp) (hU hx)))\n h\u03930 hp\n\n/-- **The pullback of a closed cone is closed.** If `\u0393` is closed in `\u03a9 \u00d7 (E \\ {0})`, then the\npullback `e^* \u0393` along a change of variables is closed in `U \u00d7 (E \\ {0})`: over `U` it is the\npreimage of `\u0393` under the continuous map `(x, \u03be) \u21a6 (e x, De\u207b\u00b9(e x)\u1d40 \u03be)`. -/\ntheorem isOpen_prod_compl_sdiff_covectorPullback (e : OpenPartialHomeomorph E E)\n (he : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e e.source) (he' : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e.symm e.target)\n {U \u03a9 : Set E} (hUo : IsOpen U) (hU : U \u2286 e.source) (hU\u03a9 : MapsTo e U \u03a9) {\u0393 : Set (E \u00d7 E)}\n (h\u0393 : IsOpen ((\u03a9 \u00d7\u02e2 {0}\u1d9c) \\ \u0393)) :\n IsOpen ((U \u00d7\u02e2 {0}\u1d9c) \\ TauCeti.covectorPullback e U \u0393) :=\n TauCeti.isOpen_diff_covectorPullback_of_leftInverse hUo hU\u03a9 (e.continuousOn.mono hU)\n ((he.continuousOn_fderiv_of_isOpen e.open_source (by simp)).mono hU)\n (fun x \u21a6 (fderiv \u211d e.symm (e x))\u2020)\n ((ContinuousLinearMap.adjoint (\ud835\udd5c := \u211d) (E := E) (F := E)).continuous.comp_continuousOn\n ((he'.continuousOn_fderiv_of_isOpen e.open_target (by simp)).comp\n (e.continuousOn.mono hU) fun _ hx \u21a6 e.map_source (hU hx)))\n (fun x hx \u21a6 e.adjoint_fderiv_symm_apply_adjoint_fderiv_apply_of_contDiffOn he he' (by simp)\n (hU hx)) h\u0393\n\nend OpenPartialHomeomorph\n\nnamespace Distribution\n\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace \u211d E] [FiniteDimensional \u211d E]\n {e : OpenPartialHomeomorph E E} {U \u03a9 : Opens E}\n {he : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e e.source} {he' : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e.symm e.target}\n {hU : (U : Set E) \u2286 e.source} {hU\u03a9 : MapsTo e U \u03a9}\n\n/-- **The wave front set under a change of variables** (H\u00f6rmander I, Theorem 8.2.4). The wave\nfront set of the pullback `e^* T` is the pullback `e^* WF(T)` (`TauCeti.covectorPullback`): it\nconsists of the `(x, \u03be)` with `x \u2208 U` and `(e x, (De\u207b\u00b9(e x))\u1d40 \u03be) \u2208 WF(T)`\n(`OpenPartialHomeomorph.mem_covectorPullback_iff`), so covectors pull back by the transpose of\nthe derivative. -/\ntheorem waveFrontSet_compCLMOfOpenPartialHomeomorph (T : \ud835\udcd3'(\u03a9, \u2102)) :\n (compCLMOfOpenPartialHomeomorph e he he' hU hU\u03a9 T).waveFrontSet =\n TauCeti.covectorPullback e U T.waveFrontSet := by\n ext \u27e8x, \u03be\u27e9\n rw [e.mem_covectorPullback_iff he he' hU]\n simpa only [mem_waveFrontSet_iff, mem_ofPred_eq, SetLike.mem_coe] using Set.ext_iff.1\n (isInvariantMicrolocalRegularity_isMicrolocallySmoothAt.setOf_compCLMOfOpenPartialHomeomorph\n (hU\u03a9 := hU\u03a9) T) (x, \u03be)\n\n/-- If the wave front set of `T` lies in `\u0393`, that of its pullback `e^* T` along a change of\nvariables lies in `e^* \u0393 = {(x, De(x)\u1d40 \u03b7) | x \u2208 U, (e x, \u03b7) \u2208 \u0393}` (`TauCeti.covectorPullback`). -/\ntheorem waveFrontSet_compCLMOfOpenPartialHomeomorph_subset {T : \ud835\udcd3'(\u03a9, \u2102)} {\u0393 : Set (E \u00d7 E)}\n (hT : T.waveFrontSet \u2286 \u0393) :\n (compCLMOfOpenPartialHomeomorph e he he' hU hU\u03a9 T).waveFrontSet \u2286\n TauCeti.covectorPullback e U \u0393 :=\n (waveFrontSet_compCLMOfOpenPartialHomeomorph T).trans_subset (TauCeti.covectorPullback_mono hT)\n\nend Distribution\n", "public_theorems": ["Distribution.hasSum_localFourier_compCLMOfOpenPartialHomeomorph", "Distribution.IsMicrolocallySmoothAt.compCLMOfOpenPartialHomeomorph", "Distribution.isInvariantMicrolocalRegularity_isMicrolocallySmoothAt", "Distribution.isMicrolocallySmoothAt_compCLMOfOpenPartialHomeomorph_iff", "OpenPartialHomeomorph.mem_covectorPullback_iff", "OpenPartialHomeomorph.ne_zero_of_mem_covectorPullback", "OpenPartialHomeomorph.isOpen_prod_compl_sdiff_covectorPullback", "Distribution.waveFrontSet_compCLMOfOpenPartialHomeomorph", "Distribution.waveFrontSet_compCLMOfOpenPartialHomeomorph_subset"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Analysis.Distribution.ChangeOfVariables\npublic import TauCeti.Analysis.Distribution.MicrolocalRegularity\npublic import TauCeti.Analysis.Distribution.WaveFrontSet.Localization\npublic import TauCeti.Analysis.Distribution.WaveFrontSet.Pullback.Cone\nimport TauCeti.Algebra.Module.ZLattice.Dual\nimport TauCeti.Algebra.Module.ZLattice.Summable\nimport TauCeti.Analysis.Calculus.BumpFunction.FiniteDimension\nimport TauCeti.Analysis.Calculus.FDeriv.Equiv\nimport TauCeti.Analysis.Distribution.TestFunction.ChangeOfVariables\nimport TauCeti.Analysis.Distribution.TestFunction.PartitionOfUnity\nimport TauCeti.Analysis.Fourier.FourierCharDeriv\nimport TauCeti.Analysis.Fourier.NonstationaryPhase.Directional\nimport TauCeti.Analysis.Normed.Module.Cone\n\n/-!\n# The wave front set under smooth changes of variables\n\nLet `e` be a smooth change of variables of a finite-dimensional real inner product space `E`: a\nsmooth open partial homeomorphism with smooth inverse. A complex distribution `T` on an open set\n`\u03a9` pulls back along `e` to the distribution `e^* T` on an open subset `U` of the source of `e`\nmapped into `\u03a9` (`Distribution.compCLMOfOpenPartialHomeomorph`). This file proves that the wave\nfront set transforms as a subset of the cotangent bundle: covectors pull back by the transpose of\nthe derivative,\n\n`(x, \u03be) \u2208 WF(e^* T) \u2194 (e x, (De\u207b\u00b9(e x))\u1d40 \u03be) \u2208 WF(T)` for `x \u2208 U`\n\n(`Distribution.waveFrontSet_compCLMOfOpenPartialHomeomorph`), that is,\n`WF(e^* T) = {(x, De(x)\u1d40 \u03b7) | x \u2208 U, (e x, \u03b7) \u2208 WF(T)}` (`TauCeti.covectorPullback`). This is the\ninvariance of the wave front set under diffeomorphisms (H\u00f6rmander I, Theorem 8.2.4), which makes\nit a well-defined closed conic subset of the cotangent bundle of a manifold. For linear `e` it is\n`Distribution.waveFrontSet_compCLMOfContinuousLinearEquiv`.\n\n## The argument\n\nLet `T` be microlocally smooth at `(y\u2080, \u03b7\u2080)` with `y\u2080 = e x\u2080` and `\u03b7\u2080 = B\u1d40 \u03be\u2080`, where\n`B = De\u207b\u00b9(y\u2080)`. For a cutoff `\u03c6` supported near `x\u2080`, the localized Fourier transform of `e^* T`\nat `\u03be` pairs `T` with `\u03c8(y) \ud835\udc1e(-\u27eae\u207b\u00b9 y, \u03be\u27eb)`, where `\u03c8` is the pushforward of `\u03c6`. Factoring out the\nlinear part of the phase, this is the localized Fourier transform of `T` at `\u03b7 = B\u1d40 \u03be` with the\ncutoff `G_\u03be(y) = \u03c8(y) \ud835\udc1e(\u27eay, B\u1d40 \u03be\u27eb - \u27eae\u207b\u00b9 y, \u03be\u27eb)`, which depends on `\u03be`. Expanding `G_\u03be` in a\nFourier series on a compact set meeting none of its nonzero lattice translates\n(`Distribution.hasSum_localFourier_ofSupportedIn`) gives\n\n`T (G_\u03be e_\u03b7) = \u2211 m, a_m(\u03be) T (\u03c7 e_(\u03b7 - m))`, `a_m(\u03be) = (covolume)\u207b\u00b9 \ud835\udcd5 G_\u03be (m)`.\n\nThe terms with `\u2016m\u2016 \u2264 c \u2016\u03b7\u2016` evaluate `T (\u03c7 e_\u03b6)` in the cone around `\u03b7\u2080` where it decays\nrapidly, and `|a_m(\u03be)|` is bounded. For the others, the phase of `\ud835\udcd5 G_\u03be (m)` has derivative\n`\u2016m\u2016 + \u27ea(B - De\u207b\u00b9(y)) w, \u03be\u27eb` in the direction `w = -m / \u2016m\u2016`, which is at least `\u2016m\u2016 / 2` once\n`De\u207b\u00b9` stays close to `B` on the support of `\u03c8`, so `\ud835\udcd5 G_\u03be (m)` decays faster than every power of\n`\u2016m\u2016` by non-stationary phase (`TauCeti.exists_norm_integral_mul_fourierChar_le`).\n\n## Main results\n\n* `Distribution.hasSum_localFourier_compCLMOfOpenPartialHomeomorph`: the localized Fourier\n transform of `e^* T` as a lattice series of localized Fourier transforms of `T`, with the\n Fourier coefficients of `e_* (\u03c6 e_\u03be)` as coefficients.\n* `Distribution.IsMicrolocallySmoothAt.compCLMOfOpenPartialHomeomorph`: if `T` is microlocally\n smooth at `(e x, (De\u207b\u00b9(e x))\u1d40 \u03be)`, then `e^* T` is microlocally smooth at `(x, \u03be)`.\n* `Distribution.isInvariantMicrolocalRegularity_isMicrolocallySmoothAt`: microlocal smoothness is\n an invariant notion of microlocal regularity (`Distribution.IsInvariantMicrolocalRegularity`).\n* `Distribution.isMicrolocallySmoothAt_compCLMOfOpenPartialHomeomorph_iff`: the converse, for\n `x \u2208 U`, by pulling back along `e\u207b\u00b9` from `e '' U`.\n* `Distribution.waveFrontSet_compCLMOfOpenPartialHomeomorph`: the wave front set of `e^* T` is\n the pullback `e^* WF(T)`.\n* `OpenPartialHomeomorph.mem_covectorPullback_iff`: for `U` in the source of `e`,\n `(x, \u03be) \u2208 e^* \u0393 \u2194 x \u2208 U \u2227 (e x, (De\u207b\u00b9(e x))\u1d40 \u03be) \u2208 \u0393`.\n* `Distribution.waveFrontSet_compCLMOfOpenPartialHomeomorph_subset`: the pullback\n `e^* \u0393 = {(x, De(x)\u1d40 \u03b7) | x \u2208 U, (e x, \u03b7) \u2208 \u0393}` (`TauCeti.covectorPullback`) of a set `\u0393` of\n covectors contains the wave front set of `e^* T` whenever `\u0393` contains that of `T`.\n* `OpenPartialHomeomorph.ne_zero_of_mem_covectorPullback`,\n `OpenPartialHomeomorph.isOpen_prod_compl_sdiff_covectorPullback`: like `\u0393`, the cone `e^* \u0393`\n contains no zero covectors, and it is closed in `U \u00d7 (E \\ {0})` when `\u0393` is closed in\n `\u03a9 \u00d7 (E \\ {0})`.\n\n## References\n\n* L. H\u00f6rmander, *The Analysis of Linear Partial Differential Operators I*, second edition,\n Springer, 1990, Theorem 8.2.4 and Theorem 7.7.1.\n-/\n\npublic section\n\nnoncomputable section\n\nopen Complex Filter Function Metric Set TopologicalSpace TestFunction MeasureTheory\nopen scoped Distributions Topology FourierTransform RealInnerProductSpace ContDiff InnerProduct\n\nnamespace Distribution\n\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace \u211d E] [FiniteDimensional \u211d E]\n\n/-! ### The wave front set of a pullback -/\n\nvariable {e : OpenPartialHomeomorph E E} {U \u03a9 : Opens E}\n {he : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e e.source} {he' : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e.symm e.target}\n {hU : (U : Set E) \u2286 e.source} {hU\u03a9 : MapsTo e U \u03a9}", "/-- **The localized Fourier transform of a pullback as a lattice series.** Let `\u03c7` be supported in\na compact set `K \u2286 \u03a9` which meets none of its translates by nonzero vectors of a full lattice `L`,\nand equal to one at `e x` for every `x` in the support of the cutoff `\u03c6`. Then the localized Fourier\ntransform of `e^* T` with cutoff `\u03c6` at `\u03be` is a superposition of the localized Fourier transforms\nof `T` with cutoff `\u03c7` at the frequencies `-m`, `m \u2208 L^\u2228`:\n\n`(e^* T)(\u03c6 e_\u03be) = \u2211 m, ((covolume L)\u207b\u00b9 \u222b \u03c6(x) \ud835\udc1e(\u27eae x, -m\u27eb - \u27eax, \u03be\u27eb) dx) T (\u03c7 e_(-m))`.\n\nThe coefficients are the Fourier coefficients of the pushed forward test function `e_* (\u03c6 e_\u03be)`,\ncomputed by changing variables. -/\ntheorem hasSum_localFourier_compCLMOfOpenPartialHomeomorph [MeasurableSpace E] [BorelSpace E]\n (T : \ud835\udcd3'(\u03a9, \u2102)) {K : Compacts E} (hK\u03a9 : (K : Set E) \u2286 \u03a9) (L : Submodule \u2124 E)\n [DiscreteTopology L] [IsZLattice \u211d L] (hL : \u2200 x \u2208 K, \u2200 \u2113 : L, x + \u2113 \u2208 K \u2192 \u2113 = 0)\n {\u03c7 : \ud835\udcd3_{K}(E, \u2102)} {\u03c6 : \ud835\udcd3(U, \u2102)} (h\u03c7 : \u2200 x \u2208 tsupport \u03c6, \u03c7 (e x) = 1) (\u03be : E) :\n HasSum (fun m : ZLattice.dual L \u21a6 ((ZLattice.covolume L : \u2102)\u207b\u00b9 *\n \u222b x, \u03c6 x * \ud835\udc1e (\u27eae x, -(m : E)\u27eb - \u27eax, \u03be\u27eb)) \u2022 T.localFourier (ofSupportedIn hK\u03a9 \u03c7) (-m))\n ((compCLMOfOpenPartialHomeomorph e he he' hU hU\u03a9 T).localFourier \u03c6 \u03be) :=", "variable (e he he' hU hU\u03a9) in", "/-- **The wave front set of a pullback along a change of variables.** If `T` is microlocally\nsmooth at `(e x, (De\u207b\u00b9(e x))\u1d40 \u03be)`, then its pullback `e^* T` is microlocally smooth at `(x, \u03be)`\n(H\u00f6rmander I, Theorem 8.2.4). -/\ntheorem IsMicrolocallySmoothAt.compCLMOfOpenPartialHomeomorph {T : \ud835\udcd3'(\u03a9, \u2102)} {x \u03be : E}\n (hx : x \u2208 U) (h : T.IsMicrolocallySmoothAt (e x) (((fderiv \u211d e.symm (e x))\u2020) \u03be)) :\n (compCLMOfOpenPartialHomeomorph e he he' hU hU\u03a9 T).IsMicrolocallySmoothAt x \u03be :=", "/-- Microlocal smoothness is an invariant notion of microlocal regularity: it is open, linear,\nconic, preserved by smooth multiples and pullback along smooth changes of variables, and unchanged\nby restriction to smaller open sets. -/\ntheorem isInvariantMicrolocalRegularity_isMicrolocallySmoothAt :\n IsInvariantMicrolocalRegularity\n fun (\u03a9 : Opens E) (T : \ud835\udcd3'(\u03a9, \u2102)) x \u03be \u21a6 T.IsMicrolocallySmoothAt x \u03be where\n isOpen_setOf _ T :=", "/-- **The wave front set under a change of variables, pointwise.** For `x \u2208 U`, the pullback\n`e^* T` is microlocally smooth at `(x, \u03be)` exactly when `T` is microlocally smooth at\n`(e x, (De\u207b\u00b9(e x))\u1d40 \u03be)`. -/\ntheorem isMicrolocallySmoothAt_compCLMOfOpenPartialHomeomorph_iff {T : \ud835\udcd3'(\u03a9, \u2102)} {x \u03be : E}\n (hx : x \u2208 U) :\n (compCLMOfOpenPartialHomeomorph e he he' hU hU\u03a9 T).IsMicrolocallySmoothAt x \u03be \u2194\n T.IsMicrolocallySmoothAt (e x) (((fderiv \u211d e.symm (e x))\u2020) \u03be) :=", "end Distribution\n\n/-! ### The pullback of a cone -/\n\nnamespace OpenPartialHomeomorph\n\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace \u211d E] [FiniteDimensional \u211d E]", "/-- Over a subset of the source of a change of variables `e`, the pullback `e^* \u0393` consists of\nthe `(x, \u03be)` with `x \u2208 U` and `(e x, (De\u207b\u00b9(e x))\u1d40 \u03be) \u2208 \u0393`: the covector `\u03b7` with `De(x)\u1d40 \u03b7 = \u03be` is\n`(De\u207b\u00b9(e x))\u1d40 \u03be`. -/\ntheorem mem_covectorPullback_iff (e : OpenPartialHomeomorph E E)\n (he : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e e.source) (he' : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e.symm e.target)\n {U : Set E} (hU : U \u2286 e.source) {\u0393 : Set (E \u00d7 E)} {p : E \u00d7 E} :\n p \u2208 TauCeti.covectorPullback e U \u0393 \u2194\n p.1 \u2208 U \u2227 (e p.1, ((fderiv \u211d e.symm (e p.1))\u2020) p.2) \u2208 \u0393 :=", "/-- The pullback `e^* \u0393` along a change of variables of a set `\u0393` of nonzero covectors contains no\nzero covectors, since the transposed derivative of `e` is injective. -/\ntheorem ne_zero_of_mem_covectorPullback (e : OpenPartialHomeomorph E E)\n (he : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e e.source) (he' : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e.symm e.target)\n {U : Set E} (hU : U \u2286 e.source) {\u0393 : Set (E \u00d7 E)} (h\u03930 : \u2200 p \u2208 \u0393, p.2 \u2260 0) {p : E \u00d7 E}\n (hp : p \u2208 TauCeti.covectorPullback e U \u0393) : p.2 \u2260 0 :=", "/-- **The pullback of a closed cone is closed.** If `\u0393` is closed in `\u03a9 \u00d7 (E \\ {0})`, then the\npullback `e^* \u0393` along a change of variables is closed in `U \u00d7 (E \\ {0})`: over `U` it is the\npreimage of `\u0393` under the continuous map `(x, \u03be) \u21a6 (e x, De\u207b\u00b9(e x)\u1d40 \u03be)`. -/\ntheorem isOpen_prod_compl_sdiff_covectorPullback (e : OpenPartialHomeomorph E E)\n (he : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e e.source) (he' : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e.symm e.target)\n {U \u03a9 : Set E} (hUo : IsOpen U) (hU : U \u2286 e.source) (hU\u03a9 : MapsTo e U \u03a9) {\u0393 : Set (E \u00d7 E)}\n (h\u0393 : IsOpen ((\u03a9 \u00d7\u02e2 {0}\u1d9c) \\ \u0393)) :\n IsOpen ((U \u00d7\u02e2 {0}\u1d9c) \\ TauCeti.covectorPullback e U \u0393) :=", "end OpenPartialHomeomorph\n\nnamespace Distribution\n\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace \u211d E] [FiniteDimensional \u211d E]\n {e : OpenPartialHomeomorph E E} {U \u03a9 : Opens E}\n {he : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e e.source} {he' : ContDiffOn \u211d (\u22a4 : \u2115\u221e) e.symm e.target}\n {hU : (U : Set E) \u2286 e.source} {hU\u03a9 : MapsTo e U \u03a9}", "/-- **The wave front set under a change of variables** (H\u00f6rmander I, Theorem 8.2.4). The wave\nfront set of the pullback `e^* T` is the pullback `e^* WF(T)` (`TauCeti.covectorPullback`): it\nconsists of the `(x, \u03be)` with `x \u2208 U` and `(e x, (De\u207b\u00b9(e x))\u1d40 \u03be) \u2208 WF(T)`\n(`OpenPartialHomeomorph.mem_covectorPullback_iff`), so covectors pull back by the transpose of\nthe derivative. -/\ntheorem waveFrontSet_compCLMOfOpenPartialHomeomorph (T : \ud835\udcd3'(\u03a9, \u2102)) :\n (compCLMOfOpenPartialHomeomorph e he he' hU hU\u03a9 T).waveFrontSet =\n TauCeti.covectorPullback e U T.waveFrontSet :=", "/-- If the wave front set of `T` lies in `\u0393`, that of its pullback `e^* T` along a change of\nvariables lies in `e^* \u0393 = {(x, De(x)\u1d40 \u03b7) | x \u2208 U, (e x, \u03b7) \u2208 \u0393}` (`TauCeti.covectorPullback`). -/\ntheorem waveFrontSet_compCLMOfOpenPartialHomeomorph_subset {T : \ud835\udcd3'(\u03a9, \u2102)} {\u0393 : Set (E \u00d7 E)}\n (hT : T.waveFrontSet \u2286 \u0393) :\n (compCLMOfOpenPartialHomeomorph e he he' hU hU\u03a9 T).waveFrontSet \u2286\n TauCeti.covectorPullback e U \u0393 :=", "end Distribution"], "free_length": 10782, "file_length": 15203, "heartbeats": 53312, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.NumberTheory.NumberField.LocalDepthOrder.Basic", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/NumberTheory/NumberField/LocalDepthOrder/Basic.lean", "module": "TauCeti.NumberTheory.NumberField.LocalDepthOrder.Basic", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.NumberTheory.NumberField.Units.Basic\npublic import Mathlib.RingTheory.DedekindDomain.Ideal.Lemmas\npublic import Mathlib.RingTheory.RamificationInertia.Ramification\npublic import Mathlib.RingTheory.Ideal.Int\npublic import Mathlib.Algebra.Order.Floor.Ring\n\n/-!\n# The truncated local-depth order of a level in a number field\n\nLet `F` be a number field with `m = |\u03bc(F)|` roots of unity and let `I` be a nonzero ideal of\n`\ud835\udcde F`. For a prime `p`, the **truncated local-depth exponent** of `I` at `p` is\n\n`j(I, p) = min_{P \u2223 p} min(ord_p m, max(0, \u230aord_P(I) / e(P | p) - 1 / (p - 1)\u230b))`,\n\nthe minimum running over all primes `P` of `\ud835\udcde F` above `p`, including those not dividing `I`,\nwhere `e(P | p) = ord_P(p)` is the ramification index. The **local-depth order** of `I` is\n\n`r(I) = \u220f_{p \u2223 m} p ^ j(I, p)`,\n\na divisor of `m`. Bass, Milnor and Serre prove that for a totally imaginary `F` the universal\nMennicke group of level `I` is the cyclic group `\u03bc_{r(I)}` of `r(I)`-th roots of unity, the\n`r(I)`-th power residue symbol being the universal Mennicke symbol; it is trivial at the unit\nideal and equals `\u03bc(F)` at sufficiently deep levels. This file sets up the numerical invariant\nand its arithmetic.\n\nThe quantity `ord_P(I) / e(P | p) - 1 / (p - 1)` is the depth of the level `I` at `P`, measured\nin the normalization of the `p`-adic valuation and shifted by the depth `1 / (p - 1)` of the\n`p`-th roots of unity; the `p`-primary part of `\u03bc(F)` which survives at level `I` is cut out by\nthe shallowest prime above `p`.\n\n## Main definitions\n\n* `TauCeti.NumberField.localDepthExponent F I p`: the exponent `j(I, p)`.\n* `TauCeti.NumberField.localDepthOrder F I`: the order `r(I) = \u220f_{p \u2223 m} p ^ j(I, p)`.\n\n## Main results\n\n* `TauCeti.NumberField.le_localDepthExponent_iff`: `k \u2264 j(I, p)` exactly when `k \u2264 ord_p m` and\n `k` is at most the truncated depth at every prime above `p`.\n* `TauCeti.NumberField.localDepthExponent_eq_zero_of_not_le`: `j(I, p) = 0` as soon as some\n prime above `p` does not divide `I`.\n* `TauCeti.NumberField.factorization_localDepthOrder`: `j(I, p)` is the `p`-adic valuation of\n `r(I)`.\n* `TauCeti.NumberField.localDepthOrder_dvd_torsionOrder`: `r(I) \u2223 m`.\n* `TauCeti.NumberField.localDepthOrder_top`: `r(\ud835\udcde F) = 1`.\n* `TauCeti.NumberField.localDepthOrder_dvd_of_le`: `r(I) \u2223 r(J)` for nonzero `J \u2264 I`.\n* `TauCeti.NumberField.localDepthOrder_eq_torsionOrder`: the full-depth criterion, `r(I) = m`\n when `ord_P(I) \u2265 e(P | p) (ord_p m + 1 / (p - 1))` for every `p \u2223 m` and every `P` above `p`.\n\n## Implementation notes\n\nThe minimum over the primes above `p` is a fold of `min` over Mathlib's\n`IsDedekindDomain.primesOverFinset`, started at `ord_p m`; it does not depend on an enumeration\nof these primes, and `le_localDepthExponent_iff` characterizes it in terms of\n`Ideal.primesOver`. The order `ord_P(I)` is the multiplicity of `P` in the normalized\nfactorization of `I`. The definitions make sense for every ideal and every natural number `p`:\n`j(I, p) = 0` unless `p` is a prime dividing `m`, and the zero ideal, which has no factorization,\ngets the junk value `r(\u22a5) = 1`.\n\n## References\n\n* H. Bass, J. Milnor and J.-P. Serre, *Solution of the congruence subgroup problem for `SL\u2099`\n (`n \u2265 3`) and `Sp\u2082\u2099` (`n \u2265 2`)*, Publ. Math. IH\u00c9S 33 (1967), (3.3) and Theorem 3.6.\n-/\n\npublic section\n\nopen Ideal UniqueFactorizationMonoid IsDedekindDomain NumberField NumberField.Units\n\nnamespace TauCeti.NumberField\n\nvariable (F : Type*) [Field F] [NumberField F]\n\n/-- The **truncated local-depth exponent** `j(I, p)` of an ideal `I` of `\ud835\udcde F` at `p`: the\nminimum, over all primes `P` of `\ud835\udcde F` above `p`, of\n`min(ord_p m, max(0, \u230aord_P(I) / e(P | p) - 1 / (p - 1)\u230b))`, where `m` is the number of roots of\nunity of `F` and `e(P | p)` is the ramification index. It vanishes unless `p` is a prime dividing\n`m`. -/\nnoncomputable def localDepthExponent (I : Ideal (\ud835\udcde F)) (p : \u2115) : \u2115 :=\n (primesOverFinset (span {(p : \u2124)}) (\ud835\udcde F)).fold min ((torsionOrder F).factorization p)\n fun P \u21a6 \u230a((normalizedFactors I).count P : \u211a) / P.ramificationIdx \u2124 - 1 / ((p : \u211a) - 1)\u230b.toNat\n\n/-- The **local-depth order** `r(I) = \u220f_{p \u2223 m} p ^ j(I, p)` of an ideal `I` of `\ud835\udcde F`, where `m`\nis the number of roots of unity of `F` and `j(I, p)` is the truncated local-depth exponent. It is a\ndivisor of `m`, equal to `1` at the unit ideal and to `m` at sufficiently deep levels. -/\nnoncomputable def localDepthOrder (I : Ideal (\ud835\udcde F)) : \u2115 :=\n \u220f p \u2208 (torsionOrder F).primeFactors, p ^ localDepthExponent F I p\n\nvariable {F} {I J : Ideal (\ud835\udcde F)} {p : \u2115}\n\n/-- The truncated local-depth exponent at `p` is at most the `p`-adic valuation `ord_p m` of the\nnumber `m` of roots of unity. -/\ntheorem localDepthExponent_le_factorization (I : Ideal (\ud835\udcde F)) (p : \u2115) :\n localDepthExponent F I p \u2264 (torsionOrder F).factorization p :=\n (Finset.fold_min_le _).2 (.inl le_rfl)\n\n/-- The truncated local-depth exponent at `p` vanishes unless `p` is a prime dividing the number\n`m` of roots of unity. -/\ntheorem localDepthExponent_eq_zero_of_notMem_primeFactors (I : Ideal (\ud835\udcde F))\n (hp : p \u2209 (torsionOrder F).primeFactors) : localDepthExponent F I p = 0 :=\n Nat.le_zero.1 <| (localDepthExponent_le_factorization I p).trans_eq <| by\n rwa [\u2190 Finsupp.notMem_support_iff, Nat.support_factorization]\n\n/-- The truncated local-depth exponent at `p` is at most the truncated depth at any prime in the\nfinite set `IsDedekindDomain.primesOverFinset` of prime factors of `p`. -/\nprivate theorem localDepthExponent_le_of_mem_primesOverFinset {P : Ideal (\ud835\udcde F)}\n (hP : P \u2208 primesOverFinset (span {(p : \u2124)}) (\ud835\udcde F)) :\n localDepthExponent F I p \u2264\n \u230a((normalizedFactors I).count P : \u211a) / P.ramificationIdx \u2124 - 1 / ((p : \u211a) - 1)\u230b.toNat :=\n (Finset.fold_min_le _).2 (.inr \u27e8P, hP, le_rfl\u27e9)\n\n/-- **Characterization of the truncated local-depth exponent.** A natural number `k` is at most\n`j(I, p)` exactly when `k \u2264 ord_p m` and `k` is at most `\u230aord_P(I) / e(P | p) - 1 / (p - 1)\u230b` at\nevery prime `P` above `p`. -/\ntheorem le_localDepthExponent_iff {k : \u2115} :\n k \u2264 localDepthExponent F I p \u2194 k \u2264 (torsionOrder F).factorization p \u2227\n \u2200 P \u2208 (span {(p : \u2124)}).primesOver (\ud835\udcde F),\n k \u2264 \u230a((normalizedFactors I).count P : \u211a) / P.ramificationIdx \u2124 -\n 1 / ((p : \u211a) - 1)\u230b.toNat := by\n by_cases hp : p.Prime\n \u00b7 have : Fact p.Prime := \u27e8hp\u27e9\n have hp0 : span {(p : \u2124)} \u2260 \u22a5 := by simpa using hp.ne_zero\n simp only [localDepthExponent, Finset.le_fold_min, mem_primesOverFinset_iff hp0 (\ud835\udcde F)]\n \u00b7 -- both sides say `k = 0`, since `ord_p m = 0`\n have h0 := Nat.factorization_eq_zero_of_not_prime (torsionOrder F) hp\n rw [localDepthExponent_eq_zero_of_notMem_primeFactors I\n fun h \u21a6 hp (Nat.prime_of_mem_primeFactors h), h0]\n exact \u27e8fun hk \u21a6 \u27e8hk, fun _ _ \u21a6 (Nat.le_zero.1 hk).trans_le (Nat.zero_le _)\u27e9, And.left\u27e9\n\n/-- The truncated local-depth exponent at `p` is at most the truncated depth at every prime\nabove `p`. -/\ntheorem localDepthExponent_le {P : Ideal (\ud835\udcde F)} (hP : P \u2208 (span {(p : \u2124)}).primesOver (\ud835\udcde F)) :\n localDepthExponent F I p \u2264\n \u230a((normalizedFactors I).count P : \u211a) / P.ramificationIdx \u2124 - 1 / ((p : \u211a) - 1)\u230b.toNat :=\n (le_localDepthExponent_iff.1 le_rfl).2 P hP\n\n/-- The truncated local-depth exponent vanishes as soon as some prime above `p` does not divide\nthe level: the shallowest prime above `p` decides. -/\ntheorem localDepthExponent_eq_zero_of_not_le {P : Ideal (\ud835\udcde F)}\n (hP : P \u2208 (span {(p : \u2124)}).primesOver (\ud835\udcde F)) (hIP : \u00acI \u2264 P) :\n localDepthExponent F I p = 0 := by\n by_cases hp : p.Prime\n \u00b7 have hcount : (normalizedFactors I).count P = 0 :=\n Multiset.count_eq_zero.2 fun h \u21a6 hIP (dvd_iff_le.1 (dvd_of_mem_normalizedFactors h))\n have hp1 : (1 : \u211a) \u2264 p := mod_cast hp.one_lt.le\n refine Nat.le_zero.1 ((localDepthExponent_le hP).trans_eq ?_)\n rw [hcount, Int.toNat_eq_zero, Int.floor_le_iff, Nat.cast_zero, zero_div, zero_sub]\n have : 0 \u2264 1 / ((p : \u211a) - 1) := one_div_nonneg.2 (sub_nonneg.2 hp1)\n push_cast\n linarith\n \u00b7 exact localDepthExponent_eq_zero_of_notMem_primeFactors I\n fun h \u21a6 hp (Nat.prime_of_mem_primeFactors h)\n\n/-- The truncated local-depth exponent of the unit ideal vanishes. -/\n@[simp]\ntheorem localDepthExponent_top (p : \u2115) : localDepthExponent F \u22a4 p = 0 := by\n by_cases hp : p.Prime\n \u00b7 have : Fact p.Prime := \u27e8hp\u27e9\n obtain \u27e8P, hP\u27e9 := nonempty_primesOver (S := \ud835\udcde F) (span {(p : \u2124)})\n exact localDepthExponent_eq_zero_of_not_le hP fun h \u21a6 hP.1.ne_top (top_le_iff.1 h)\n \u00b7 exact localDepthExponent_eq_zero_of_notMem_primeFactors \u22a4\n fun h \u21a6 hp (Nat.prime_of_mem_primeFactors h)\n\n/-- The truncated local-depth exponent grows with the depth of the level: a nonzero ideal `J \u2264 I`\nhas `j(I, p) \u2264 j(J, p)`. -/\ntheorem localDepthExponent_le_of_le (hJ : J \u2260 \u22a5) (hJI : J \u2264 I) (p : \u2115) :\n localDepthExponent F I p \u2264 localDepthExponent F J p := by\n have hle : normalizedFactors I \u2264 normalizedFactors J :=\n (dvd_iff_normalizedFactors_le_normalizedFactors (ne_bot_of_le_ne_bot hJ hJI) hJ).1\n (dvd_iff_le.2 hJI)\n refine (Finset.le_fold_min _).2 \u27e8localDepthExponent_le_factorization I p, fun P hP \u21a6 ?_\u27e9\n refine (localDepthExponent_le_of_mem_primesOverFinset hP).trans\n (Int.toNat_le_toNat (Int.floor_mono ?_))\n gcongr\n\n/-- **The full-depth criterion at one prime.** If `ord_P(I) \u2265 e(P | p) (ord_p m + 1 / (p - 1))`\nat every prime `P` above `p`, then `j(I, p) = ord_p m`. -/\ntheorem localDepthExponent_eq_factorization\n (h : \u2200 P \u2208 (span {(p : \u2124)}).primesOver (\ud835\udcde F),\n (P.ramificationIdx \u2124 : \u211a) * ((torsionOrder F).factorization p + 1 / ((p : \u211a) - 1)) \u2264\n (normalizedFactors I).count P) :\n localDepthExponent F I p = (torsionOrder F).factorization p := by\n refine le_antisymm (localDepthExponent_le_factorization I p)\n (le_localDepthExponent_iff.2 \u27e8le_rfl, fun P hP \u21a6 ?_\u27e9)\n have : P.IsPrime := hP.1\n have he : (0 : \u211a) < P.ramificationIdx \u2124 := mod_cast ramificationIdx_pos \u2124 P\n have hle : ((torsionOrder F).factorization p : \u211a) \u2264\n (normalizedFactors I).count P / P.ramificationIdx \u2124 - 1 / ((p : \u211a) - 1) := by\n rw [le_sub_iff_add_le, le_div_iff\u2080 he, mul_comm]\n exact h P hP\n rw [\u2190 Int.toNat_natCast ((torsionOrder F).factorization p)]\n exact Int.toNat_le_toNat (Int.le_floor.2 (mod_cast hle))\n\n/-- The local-depth order is positive. -/\ntheorem localDepthOrder_pos (I : Ideal (\ud835\udcde F)) : 0 < localDepthOrder F I :=\n Finset.prod_pos fun _ hq \u21a6 pow_pos (Nat.pos_of_mem_primeFactors hq) _\n\n/-- The `p`-adic valuation of the local-depth order `r(I)` is the truncated local-depth exponent\n`j(I, p)`, for every `p`. -/\n@[simp]\ntheorem factorization_localDepthOrder (I : Ideal (\ud835\udcde F)) (p : \u2115) :\n (localDepthOrder F I).factorization p = localDepthExponent F I p := by\n rw [localDepthOrder, Nat.factorization_prod fun q hq \u21a6\n pow_ne_zero _ (Nat.pos_of_mem_primeFactors hq).ne', Finsupp.finsetSum_apply]\n by_cases hp : p \u2208 (torsionOrder F).primeFactors\n \u00b7 rw [Finset.sum_eq_single p (fun q hq hqp \u21a6 ?_) (absurd hp),\n (Nat.prime_of_mem_primeFactors hp).factorization_pow, Finsupp.single_eq_same]\n rw [(Nat.prime_of_mem_primeFactors hq).factorization_pow, Finsupp.single_eq_of_ne hqp.symm]\n \u00b7 refine (Finset.sum_eq_zero fun q hq \u21a6 ?_).trans\n (localDepthExponent_eq_zero_of_notMem_primeFactors I hp).symm\n rw [(Nat.prime_of_mem_primeFactors hq).factorization_pow,\n Finsupp.single_eq_of_ne (ne_of_mem_of_not_mem hq hp).symm]\n\n/-- The local-depth order `r(I)` divides the number `m` of roots of unity of `F`. -/\ntheorem localDepthOrder_dvd_torsionOrder (I : Ideal (\ud835\udcde F)) :\n localDepthOrder F I \u2223 torsionOrder F :=\n (Nat.factorization_le_iff_dvd (localDepthOrder_pos I).ne' (torsionOrder_ne_zero F)).1\n fun p \u21a6 by simpa using localDepthExponent_le_factorization I p\n\n/-- The local-depth order of the unit ideal is `1`. -/\n@[simp]\ntheorem localDepthOrder_top : localDepthOrder F \u22a4 = 1 :=\n Finset.prod_eq_one fun p _ \u21a6 by rw [localDepthExponent_top, pow_zero]\n\n/-- The local-depth order grows with the depth of the level: `r(I) \u2223 r(J)` for a nonzero ideal\n`J \u2264 I`. -/\ntheorem localDepthOrder_dvd_of_le (hJ : J \u2260 \u22a5) (hJI : J \u2264 I) :\n localDepthOrder F I \u2223 localDepthOrder F J :=\n Finset.prod_dvd_prod_of_dvd _ _ fun p _ \u21a6 pow_dvd_pow p (localDepthExponent_le_of_le hJ hJI p)\n\n/-- **The full-depth criterion.** If `ord_P(I) \u2265 e(P | p) (ord_p m + 1 / (p - 1))` for every prime\n`p` dividing the number `m` of roots of unity of `F` and every prime `P` above `p`, then the\nlocal-depth order of `I` is `m`. -/\ntheorem localDepthOrder_eq_torsionOrder\n (h : \u2200 p \u2208 (torsionOrder F).primeFactors, \u2200 P \u2208 (span {(p : \u2124)}).primesOver (\ud835\udcde F),\n (P.ramificationIdx \u2124 : \u211a) * ((torsionOrder F).factorization p + 1 / ((p : \u211a) - 1)) \u2264\n (normalizedFactors I).count P) :\n localDepthOrder F I = torsionOrder F := by\n rw [localDepthOrder, Finset.prod_congr rfl fun p hp \u21a6 by\n rw [localDepthExponent_eq_factorization (h p hp)],\n \u2190 Nat.prod_primeFactors_pow_factorization (torsionOrder_ne_zero F)]\n\nend TauCeti.NumberField\n", "public_theorems": ["TauCeti.NumberField.localDepthExponent_le_factorization", "TauCeti.NumberField.localDepthExponent_eq_zero_of_notMem_primeFactors", "TauCeti.NumberField.le_localDepthExponent_iff", "TauCeti.NumberField.localDepthExponent_le", "TauCeti.NumberField.localDepthExponent_eq_zero_of_not_le", "TauCeti.NumberField.localDepthExponent_top", "TauCeti.NumberField.localDepthExponent_le_of_le", "TauCeti.NumberField.localDepthExponent_eq_factorization", "TauCeti.NumberField.localDepthOrder_pos", "TauCeti.NumberField.factorization_localDepthOrder", "TauCeti.NumberField.localDepthOrder_dvd_torsionOrder", "TauCeti.NumberField.localDepthOrder_top", "TauCeti.NumberField.localDepthOrder_dvd_of_le", "TauCeti.NumberField.localDepthOrder_eq_torsionOrder"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.NumberTheory.NumberField.Units.Basic\npublic import Mathlib.RingTheory.DedekindDomain.Ideal.Lemmas\npublic import Mathlib.RingTheory.RamificationInertia.Ramification\npublic import Mathlib.RingTheory.Ideal.Int\npublic import Mathlib.Algebra.Order.Floor.Ring\n\n/-!\n# The truncated local-depth order of a level in a number field\n\nLet `F` be a number field with `m = |\u03bc(F)|` roots of unity and let `I` be a nonzero ideal of\n`\ud835\udcde F`. For a prime `p`, the **truncated local-depth exponent** of `I` at `p` is\n\n`j(I, p) = min_{P \u2223 p} min(ord_p m, max(0, \u230aord_P(I) / e(P | p) - 1 / (p - 1)\u230b))`,\n\nthe minimum running over all primes `P` of `\ud835\udcde F` above `p`, including those not dividing `I`,\nwhere `e(P | p) = ord_P(p)` is the ramification index. The **local-depth order** of `I` is\n\n`r(I) = \u220f_{p \u2223 m} p ^ j(I, p)`,\n\na divisor of `m`. Bass, Milnor and Serre prove that for a totally imaginary `F` the universal\nMennicke group of level `I` is the cyclic group `\u03bc_{r(I)}` of `r(I)`-th roots of unity, the\n`r(I)`-th power residue symbol being the universal Mennicke symbol; it is trivial at the unit\nideal and equals `\u03bc(F)` at sufficiently deep levels. This file sets up the numerical invariant\nand its arithmetic.\n\nThe quantity `ord_P(I) / e(P | p) - 1 / (p - 1)` is the depth of the level `I` at `P`, measured\nin the normalization of the `p`-adic valuation and shifted by the depth `1 / (p - 1)` of the\n`p`-th roots of unity; the `p`-primary part of `\u03bc(F)` which survives at level `I` is cut out by\nthe shallowest prime above `p`.\n\n## Main definitions\n\n* `TauCeti.NumberField.localDepthExponent F I p`: the exponent `j(I, p)`.\n* `TauCeti.NumberField.localDepthOrder F I`: the order `r(I) = \u220f_{p \u2223 m} p ^ j(I, p)`.\n\n## Main results\n\n* `TauCeti.NumberField.le_localDepthExponent_iff`: `k \u2264 j(I, p)` exactly when `k \u2264 ord_p m` and\n `k` is at most the truncated depth at every prime above `p`.\n* `TauCeti.NumberField.localDepthExponent_eq_zero_of_not_le`: `j(I, p) = 0` as soon as some\n prime above `p` does not divide `I`.\n* `TauCeti.NumberField.factorization_localDepthOrder`: `j(I, p)` is the `p`-adic valuation of\n `r(I)`.\n* `TauCeti.NumberField.localDepthOrder_dvd_torsionOrder`: `r(I) \u2223 m`.\n* `TauCeti.NumberField.localDepthOrder_top`: `r(\ud835\udcde F) = 1`.\n* `TauCeti.NumberField.localDepthOrder_dvd_of_le`: `r(I) \u2223 r(J)` for nonzero `J \u2264 I`.\n* `TauCeti.NumberField.localDepthOrder_eq_torsionOrder`: the full-depth criterion, `r(I) = m`\n when `ord_P(I) \u2265 e(P | p) (ord_p m + 1 / (p - 1))` for every `p \u2223 m` and every `P` above `p`.\n\n## Implementation notes\n\nThe minimum over the primes above `p` is a fold of `min` over Mathlib's\n`IsDedekindDomain.primesOverFinset`, started at `ord_p m`; it does not depend on an enumeration\nof these primes, and `le_localDepthExponent_iff` characterizes it in terms of\n`Ideal.primesOver`. The order `ord_P(I)` is the multiplicity of `P` in the normalized\nfactorization of `I`. The definitions make sense for every ideal and every natural number `p`:\n`j(I, p) = 0` unless `p` is a prime dividing `m`, and the zero ideal, which has no factorization,\ngets the junk value `r(\u22a5) = 1`.\n\n## References\n\n* H. Bass, J. Milnor and J.-P. Serre, *Solution of the congruence subgroup problem for `SL\u2099`\n (`n \u2265 3`) and `Sp\u2082\u2099` (`n \u2265 2`)*, Publ. Math. IH\u00c9S 33 (1967), (3.3) and Theorem 3.6.\n-/\n\npublic section\n\nopen Ideal UniqueFactorizationMonoid IsDedekindDomain NumberField NumberField.Units\n\nnamespace TauCeti.NumberField\n\nvariable (F : Type*) [Field F] [NumberField F]\n\n/-- The **truncated local-depth exponent** `j(I, p)` of an ideal `I` of `\ud835\udcde F` at `p`: the\nminimum, over all primes `P` of `\ud835\udcde F` above `p`, of\n`min(ord_p m, max(0, \u230aord_P(I) / e(P | p) - 1 / (p - 1)\u230b))`, where `m` is the number of roots of\nunity of `F` and `e(P | p)` is the ramification index. It vanishes unless `p` is a prime dividing\n`m`. -/\nnoncomputable def localDepthExponent (I : Ideal (\ud835\udcde F)) (p : \u2115) : \u2115 :=\n (primesOverFinset (span {(p : \u2124)}) (\ud835\udcde F)).fold min ((torsionOrder F).factorization p)\n fun P \u21a6 \u230a((normalizedFactors I).count P : \u211a) / P.ramificationIdx \u2124 - 1 / ((p : \u211a) - 1)\u230b.toNat\n\n/-- The **local-depth order** `r(I) = \u220f_{p \u2223 m} p ^ j(I, p)` of an ideal `I` of `\ud835\udcde F`, where `m`\nis the number of roots of unity of `F` and `j(I, p)` is the truncated local-depth exponent. It is a\ndivisor of `m`, equal to `1` at the unit ideal and to `m` at sufficiently deep levels. -/\nnoncomputable def localDepthOrder (I : Ideal (\ud835\udcde F)) : \u2115 :=\n \u220f p \u2208 (torsionOrder F).primeFactors, p ^ localDepthExponent F I p\n\nvariable {F} {I J : Ideal (\ud835\udcde F)} {p : \u2115}", "/-- The truncated local-depth exponent at `p` is at most the `p`-adic valuation `ord_p m` of the\nnumber `m` of roots of unity. -/\ntheorem localDepthExponent_le_factorization (I : Ideal (\ud835\udcde F)) (p : \u2115) :\n localDepthExponent F I p \u2264 (torsionOrder F).factorization p :=", "/-- The truncated local-depth exponent at `p` vanishes unless `p` is a prime dividing the number\n`m` of roots of unity. -/\ntheorem localDepthExponent_eq_zero_of_notMem_primeFactors (I : Ideal (\ud835\udcde F))\n (hp : p \u2209 (torsionOrder F).primeFactors) : localDepthExponent F I p = 0 :=", "/-- **Characterization of the truncated local-depth exponent.** A natural number `k` is at most\n`j(I, p)` exactly when `k \u2264 ord_p m` and `k` is at most `\u230aord_P(I) / e(P | p) - 1 / (p - 1)\u230b` at\nevery prime `P` above `p`. -/\ntheorem le_localDepthExponent_iff {k : \u2115} :\n k \u2264 localDepthExponent F I p \u2194 k \u2264 (torsionOrder F).factorization p \u2227\n \u2200 P \u2208 (span {(p : \u2124)}).primesOver (\ud835\udcde F),\n k \u2264 \u230a((normalizedFactors I).count P : \u211a) / P.ramificationIdx \u2124 -\n 1 / ((p : \u211a) - 1)\u230b.toNat :=", "/-- The truncated local-depth exponent at `p` is at most the truncated depth at every prime\nabove `p`. -/\ntheorem localDepthExponent_le {P : Ideal (\ud835\udcde F)} (hP : P \u2208 (span {(p : \u2124)}).primesOver (\ud835\udcde F)) :\n localDepthExponent F I p \u2264\n \u230a((normalizedFactors I).count P : \u211a) / P.ramificationIdx \u2124 - 1 / ((p : \u211a) - 1)\u230b.toNat :=", "/-- The truncated local-depth exponent vanishes as soon as some prime above `p` does not divide\nthe level: the shallowest prime above `p` decides. -/\ntheorem localDepthExponent_eq_zero_of_not_le {P : Ideal (\ud835\udcde F)}\n (hP : P \u2208 (span {(p : \u2124)}).primesOver (\ud835\udcde F)) (hIP : \u00acI \u2264 P) :\n localDepthExponent F I p = 0 :=", "/-- The truncated local-depth exponent of the unit ideal vanishes. -/\n@[simp]\ntheorem localDepthExponent_top (p : \u2115) : localDepthExponent F \u22a4 p = 0 :=", "/-- The truncated local-depth exponent grows with the depth of the level: a nonzero ideal `J \u2264 I`\nhas `j(I, p) \u2264 j(J, p)`. -/\ntheorem localDepthExponent_le_of_le (hJ : J \u2260 \u22a5) (hJI : J \u2264 I) (p : \u2115) :\n localDepthExponent F I p \u2264 localDepthExponent F J p :=", "/-- **The full-depth criterion at one prime.** If `ord_P(I) \u2265 e(P | p) (ord_p m + 1 / (p - 1))`\nat every prime `P` above `p`, then `j(I, p) = ord_p m`. -/\ntheorem localDepthExponent_eq_factorization\n (h : \u2200 P \u2208 (span {(p : \u2124)}).primesOver (\ud835\udcde F),\n (P.ramificationIdx \u2124 : \u211a) * ((torsionOrder F).factorization p + 1 / ((p : \u211a) - 1)) \u2264\n (normalizedFactors I).count P) :\n localDepthExponent F I p = (torsionOrder F).factorization p :=", "/-- The local-depth order is positive. -/\ntheorem localDepthOrder_pos (I : Ideal (\ud835\udcde F)) : 0 < localDepthOrder F I :=", "/-- The `p`-adic valuation of the local-depth order `r(I)` is the truncated local-depth exponent\n`j(I, p)`, for every `p`. -/\n@[simp]\ntheorem factorization_localDepthOrder (I : Ideal (\ud835\udcde F)) (p : \u2115) :\n (localDepthOrder F I).factorization p = localDepthExponent F I p :=", "/-- The local-depth order `r(I)` divides the number `m` of roots of unity of `F`. -/\ntheorem localDepthOrder_dvd_torsionOrder (I : Ideal (\ud835\udcde F)) :\n localDepthOrder F I \u2223 torsionOrder F :=", "/-- The local-depth order of the unit ideal is `1`. -/\n@[simp]\ntheorem localDepthOrder_top : localDepthOrder F \u22a4 = 1 :=", "/-- The local-depth order grows with the depth of the level: `r(I) \u2223 r(J)` for a nonzero ideal\n`J \u2264 I`. -/\ntheorem localDepthOrder_dvd_of_le (hJ : J \u2260 \u22a5) (hJI : J \u2264 I) :\n localDepthOrder F I \u2223 localDepthOrder F J :=", "/-- **The full-depth criterion.** If `ord_P(I) \u2265 e(P | p) (ord_p m + 1 / (p - 1))` for every prime\n`p` dividing the number `m` of roots of unity of `F` and every prime `P` above `p`, then the\nlocal-depth order of `I` is `m`. -/\ntheorem localDepthOrder_eq_torsionOrder\n (h : \u2200 p \u2208 (torsionOrder F).primeFactors, \u2200 P \u2208 (span {(p : \u2124)}).primesOver (\ud835\udcde F),\n (P.ramificationIdx \u2124 : \u211a) * ((torsionOrder F).factorization p + 1 / ((p : \u211a) - 1)) \u2264\n (normalizedFactors I).count P) :\n localDepthOrder F I = torsionOrder F :=", "end TauCeti.NumberField"], "free_length": 3923, "file_length": 6989, "heartbeats": 5690, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.RingTheory.DedekindDomain.SInteger.Unit", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/RingTheory/DedekindDomain/SInteger/Unit.lean", "module": "TauCeti.RingTheory.DedekindDomain.SInteger.Unit", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.RingTheory.DedekindDomain.SelmerGroup\npublic import Mathlib.RingTheory.DedekindDomain.SInteger\npublic import TauCeti.Algebra.Algebra.Subalgebra.Lattice\npublic import TauCeti.GroupTheory.Finiteness\n\n/-!\n# Finite generation of the `S`-units\n\nMathlib defines the group `Set.unit S K` of `S`-units \u2014 the `x : K\u02e3` with `v x = 1` for every\n`v \u2209 S` \u2014 and identifies it with the units of the ring of `S`-integers, but says nothing about its\nsize. Its own module docstring records the gap: `Mathlib/RingTheory/DedekindDomain/SInteger.lean`\nlists as future work *\"finite generation of `S`-units and Dirichlet's `S`-unit theorem\"*, and\n`Mathlib/RingTheory/DedekindDomain/SelmerGroup.lean` likewise carries *\"TODO: proofs of finiteness\nfor global fields\"*. This file supplies the finite-generation half.\n\n## Main results\n\n* `Set.unit_fg`: **if `S` is finite and the `\u2205`-units are finitely generated, so are the\n `S`-units.**\n* `Set.unit_fg_of_units`: the same with the hypothesis over the base ring, `[Monoid.FG R\u02e3]` \u2014\n the form the arithmetic actually applies, since a caller holds `R\u02e3` and not the `\u2205`-units. An\n `instance`; the hypothesis is the `Monoid` form because that is the one Mathlib registers for\n `\ud835\udcaa K`.\n* `Set.unitValuation_ker`: the kernel of the `S`-valuation map is the `\u2205`-units, which is the\n left-exactness `1 \u2192 R\u02e3 \u2192 (S.integer K)\u02e3 \u2192 \u220f_{v\u2208S} \u2124`. This is in the same spirit as the TODO\n `RingTheory/DedekindDomain/SInteger.lean` records \u2014 \"proof that `S`-units is the kernel of a map\n to a product\" \u2014 but is not that statement: the map here is defined *on* the `S`-units and its\n kernel is the `\u2205`-units.\n\nThe argument is one application of `Group.fg_of_fg_ker_of_fg_range`. Sending an `S`-unit to its\ntuple of valuations at the primes *in* `S` gives `Set.unitValuation`, a homomorphism to `\u2124^S`; its\nimage is a subgroup of a finitely generated commutative group and so is finitely generated, and its\nkernel is the group of `\u2205`-units (`Set.unitValuation_ker`), which is `R\u02e3`\n(`Set.unitEmptyEquivUnits`). An extension of finitely generated groups is finitely generated.\n\n`Set.unit_mono` \u2014 the `S`-units grow with `S` \u2014 is what lets `unit_fg` identify the kernel\nsubgroup with the `\u2205`-units along `Subgroup.subgroupOfEquivOfLe`; it is not in Mathlib.\n\nThe rank refinement \u2014 that the rank is exactly `rank R\u02e3 + |S|` when the class group is finite \u2014 is\na separate topic and is not here.\n\nThis is the second of the two finiteness inputs to the weak Mordell\u2013Weil theorem: `A(S, 2)` is\nfinite because the `S`-class group is finite and **the `S`-units are finitely generated**\n(AEC VIII.1).\n\nThroughout, `R` is an *arbitrary* Dedekind domain and `K` its fraction field; `R\u02e3` and\n`(S.integer K)\u02e3` are the unit groups in play. The motivating case is `R = \ud835\udcaa_K` for a number\nfield, but nothing here assumes it, so the ring-of-integers notation is deliberately avoided.\n\n## Relation to mathlib4#40791\n\n**The names, statements and proofs here are taken from the open Mathlib pull request\n[mathlib4#40791](https://github.com/leanprover-community/mathlib4/pull/40791), \"feat(RingTheory/\nDedekindDomain): dirichlet's s-unit theorem\", by `vvvv-ops`, open since 2026-06-19**, which adds\n`Mathlib/RingTheory/DedekindDomain/SUnit.lean` and proves exactly this (and more: the rank formula\nand its number-field specialisation). Following that PR rather than inventing a parallel API is\ndeliberate \u2014 when Mathlib bumps past it, almost all of this file is deleted outright instead of\nbeing reconciled name by name. **`unit_fg_of_units` and\n`algebraMap_unitEmptyEquivUnits_apply` are the exceptions: they have no #40791 analogue, so at\nbump time they must be re-homed onto Mathlib's `Set.unit_fg`, not dropped with the rest.**\n\n**Four declarations here are not that PR's**, and are marked as such where they occur:\n\n* `mem_unit_iff` is the membership lemma for `Set.unit`, which neither #40791 nor Mathlib states;\n it is the companion of `Set.mem_integer_iff` next door, and `@[simp]` for the same reason.\n* `unit_mono` is stated for an arbitrary `S \u2286 S'`, of which #40791's `unit_empty_le` is the\n `S = \u2205` case.\n* **`unit_fg_of_units` is new here**, with no counterpart in #40791: upstream gives\n `unitEmptyEquivUnits` its consumer in the rank formula, which is not ported, so without this\n form the theorem is awkward to apply \u2014 a caller holds `R\u02e3`, not the `\u2205`-units.\n* **`algebraMap_unitEmptyEquivUnits_apply` is new here**, with no counterpart in #40791: it is the\n element-level characterisation of the three-fold composite `unitEmptyEquivUnits`, so that a\n future user of that equiv need not unfold it.\n\nThe valuation lemma these proofs run on,\n`IsDedekindDomain.HeightOneSpectrum.valuationOfNeZero_eq_one_iff`, is not here: it mentions no\n`S` and no `Set.unit`, so it lives in `TauCeti/RingTheory/DedekindDomain/ValuationOfNeZero.lean`\nbeside the `valuationOfNeZero` API it belongs to.\n\nAdapted from Michael Stoll's elliptic-curves formalisation\n(`github.com/MichaelStollBayreuth/EllipticCurves`, `EllipticCurves/Mathlib/SelmerGroup.lean` at\ncommit `66889eada51a`, Apache 2.0, by Michael Stoll), and then restated to match\nmathlib4#40791 as described above. Following this repository's convention for adapted material, the\nupstream authorship is credited here rather than in the copyright header.\n-/\n\npublic section\n\nopen IsDedekindDomain IsDedekindDomain.HeightOneSpectrum\n\nnamespace Set\n\nvariable {R : Type*} [CommRing R] [IsDedekindDomain R]\n (S : Set (HeightOneSpectrum R)) (K : Type*) [Field K] [Algebra R K] [IsFractionRing R K]\n\n/-- The `S`-valuation map on `S`-units: `u \u21a6 (v(u))_{v \u2208 S}`, valued in `\u21a5S \u2192 Multiplicative \u2124`. -/\nnoncomputable def unitValuation : S.unit K \u2192* (\u21a5S \u2192 Multiplicative \u2124) :=\n MonoidHom.pi fun v \u21a6 (v : HeightOneSpectrum R).valuationOfNeZero.comp (S.unit K).subtype\n\n@[simp]\ntheorem unitValuation_apply (u : S.unit K) (v : \u21a5S) :\n unitValuation S K u v = (v : HeightOneSpectrum R).valuationOfNeZero ((u : K\u02e3)) := by\n rfl\n\n/-- Membership in the `S`-units is the valuation condition defining it. Mathlib defines\n`Set.unit` as a `Subgroup.copy` of exactly this set-builder but provides no membership lemma, so\nthis is `Iff.rfl`; naming it means the proofs below go through a characterisation rather than\nthat definitional unfolding. The companion of `Set.mem_integer_iff` for the other half of the\nsame API. -/\n@[simp] theorem mem_unit_iff {x : K\u02e3} :\n x \u2208 S.unit K \u2194 \u2200 v \u2209 S, (v : HeightOneSpectrum R).valuation K (x : K) = 1 := Iff.rfl\n\n/-- The `S`-units grow with `S`: enlarging the set of allowed primes only weakens the condition\n`v x = 1` for `v \u2209 S`. mathlib4#40791's `unit_empty_le` is the case `S = \u2205`. -/\ntheorem unit_mono {S S' : Set (HeightOneSpectrum R)} (h : S \u2286 S') : S.unit K \u2264 S'.unit K :=\n fun _ hx \u21a6 (mem_unit_iff ..).mpr fun v hv \u21a6 (mem_unit_iff ..).mp hx v fun hvS \u21a6 hv (h hvS)\n\n/-- **The kernel of the `S`-valuation map is the `\u2205`-units.** Equivalently, an `S`-unit lies in the\nkernel iff it has trivial valuation at every prime \u2014 i.e. it comes from a unit of `R`. This is the\nexact `1 \u2192 R\u02e3 \u2192 (S.integer K)\u02e3 \u2192 \u220f_{v\u2208S} \u2124` left-exactness. The codomain is the product `\u21a5S \u2192\nMultiplicative \u2124`; this theorem does not assume `S` finite, so it is not the direct sum. -/\ntheorem unitValuation_ker :\n (unitValuation S K).ker = ((\u2205 : Set (HeightOneSpectrum R)).unit K).subgroupOf (S.unit K) := by\n ext u\n rw [MonoidHom.mem_ker, Subgroup.mem_subgroupOf, funext_iff]\n constructor\n \u00b7 intro h\n refine (mem_unit_iff ..).mpr fun v _ \u21a6 ?_\n by_cases hvS : v \u2208 S\n \u00b7 have := h \u27e8v, hvS\u27e9\n rwa [unitValuation_apply, Pi.one_apply, valuationOfNeZero_eq_one_iff] at this\n \u00b7 exact Set.unit_valuation_eq_one _ _ u hvS\n \u00b7 intro h v\n rw [unitValuation_apply, Pi.one_apply, valuationOfNeZero_eq_one_iff]\n exact (mem_unit_iff ..).mp h v (Set.notMem_empty v)\n\n/-- **Finite generation of the `S`-units, relative to the `\u2205`-units.** If `S` is finite and the\n`\u2205`-units are finitely generated \u2014 for `R = \ud835\udcaa_K` a ring of integers that is Dirichlet's unit\ntheorem \u2014 then so are the `S`-units. `unit_fg_of_units` is the form stated over `R\u02e3`, which is\nwhat a caller normally has. -/\ntheorem unit_fg [Finite S] (hu : Group.FG ((\u2205 : Set (HeightOneSpectrum R)).unit K)) :\n Group.FG (S.unit K) := by\n -- `Group.FG (\u21a5S \u2192 Multiplicative \u2124)` is Mathlib's `Pi.instGroupFG` composed with\n -- `Group.fg_of_mul_group_fg` and `AddGroup.FG \u2124`; instance search finds it from `[Finite S]`\n -- and the range side from `Subgroup.fg_of_commGroup`, the only instance that can discharge it\n have : Group.FG (unitValuation S K).ker := by\n rw [unitValuation_ker]\n exact Group.fg_of_surjective\n (f := (Subgroup.subgroupOfEquivOfLe (unit_mono K S.empty_subset)).symm.toMonoidHom)\n (Subgroup.subgroupOfEquivOfLe (unit_mono K S.empty_subset)).symm.surjective\n exact Group.fg_of_fg_ker_of_fg_range (unitValuation S K)\n\n/-- The `\u2205`-units are exactly the units of the base ring: `Set.unit \u2205 K \u2243* R\u02e3`. The `\u2205`-integers\nare the base ring `R` (`IsDedekindDomain.integer_empty`), and `S`-units are the units of the\n`S`-integers (`Set.unitEquivUnitsInteger`).\n\nIt is a three-fold composite, so `algebraMap_unitEmptyEquivUnits_apply` below records what it\ndoes to the underlying element. -/\nnoncomputable def unitEmptyEquivUnits : (\u2205 : Set (HeightOneSpectrum R)).unit K \u2243* R\u02e3 :=\n (unitEquivUnitsInteger (\u2205 : Set (HeightOneSpectrum R)) K).trans\n (Units.mapEquiv\n ((Subalgebra.equivOfEq _ _ (IsDedekindDomain.integer_empty R K)).trans\n (Algebra.botEquivOfInjective (IsFractionRing.injective R K))).toRingEquiv.toMulEquiv)\n\n/-- **What `unitEmptyEquivUnits` does to the underlying element:** it sends an `\u2205`-unit to the\nunit of `R` with the same image in `K`.\n\n**New here**, with no counterpart in mathlib4#40791: `unitEmptyEquivUnits` is a three-fold\ncomposite whose value on an element is not readable off the definition, and this is that value,\nso a future user of the equiv need not unfold it. -/\n@[simp]\ntheorem algebraMap_unitEmptyEquivUnits_apply (u : (\u2205 : Set (HeightOneSpectrum R)).unit K) :\n algebraMap R K ((unitEmptyEquivUnits K u : R\u02e3) : R) = ((u : K\u02e3) : K) := by\n -- unfold the three-fold composite through its own equations rather than through defeq:\n -- `unitEquivUnitsInteger` and `Units.mapEquiv` down to the underlying element of `K`, then\n -- `Algebra.algebraMap_botEquivOfInjective` for the identification of `\u22a5` with `R`\n simp only [unitEmptyEquivUnits, RingEquiv.toMulEquiv_eq_coe, MulEquiv.trans_apply,\n Units.coe_mapEquiv, RingEquiv.coe_toMulEquiv, RingEquiv.coe_mk, AlgEquiv.toEquiv_eq_coe,\n EquivLike.coe_coe, AlgEquiv.trans_apply, Subalgebra.equivOfEq_apply,\n val_unitEquivUnitsInteger_apply_coe, Algebra.algebraMap_botEquivOfInjective]\n\n/-- The units outside the empty set of primes are exactly the images of base-ring units. -/\ntheorem mem_unit_empty_iff {x : K\u02e3} :\n x \u2208 (\u2205 : Set (HeightOneSpectrum R)).unit K \u2194\n \u2203 u : R\u02e3, algebraMap R K (u : R) = (x : K) := by\n constructor\n \u00b7 intro hx\n exact \u27e8unitEmptyEquivUnits K \u27e8x, hx\u27e9, algebraMap_unitEmptyEquivUnits_apply K \u27e8x, hx\u27e9\u27e9\n \u00b7 rintro \u27e8u, hu\u27e9\n refine (mem_unit_iff _ K).mpr fun v _ \u21a6 ?_\n rw [\u2190 hu]\n refine eq_one_of_one_le_mul_left (v.valuation_le_one (K := K) (u : R))\n (v.valuation_le_one (K := K) (\u2191u\u207b\u00b9 : R)) ?_\n rw [\u2190 map_mul, \u2190 map_mul, Units.mul_inv, map_one, map_one]\n\n/-- **Finite generation of the `S`-units, over the base ring.** If `R\u02e3` is finitely generated and\n`S` is finite, then so is the group of `S`-units. This is `unit_fg` with its hypothesis\ntransported along `unitEmptyEquivUnits`, and it is the form the arithmetic uses \u2014 the `\u2205`-units\nare not what a caller has in hand, `R\u02e3` is.\n\nThis is *not* Dirichlet's `S`-unit theorem: finite generation of `R\u02e3` is assumed, not proved (for\n`R = \ud835\udcaa_K` that assumption is Dirichlet's unit theorem itself), no rank is computed, and `R` is an\narbitrary Dedekind domain rather than the ring of integers of a global field.\n\nThe hypothesis is `[Monoid.FG R\u02e3]`, not `[Group.FG R\u02e3]`: they are equivalent\n(`Group.fg_iff_monoid_fg`), but the instance Mathlib actually registers for the motivating case is\n`Monoid.FG (\ud835\udcde K)\u02e3` (`NumberField/Units/DirichletTheorem.lean`), and the only bridge that is an\ninstance runs the other way, so taking `Group.FG` would leave this instance unable to fire where\nit is meant to.\n\n**New here**, with no counterpart in mathlib4#40791: upstream gives `unitEmptyEquivUnits` its\nconsumer in the rank formula, which is not ported. -/\ninstance unit_fg_of_units [Finite S] [Monoid.FG R\u02e3] : Group.FG (S.unit K) :=\n have : Group.FG R\u02e3 := Group.fg_iff_monoid_fg.mpr \u2039_\u203a\n unit_fg S K <| Group.fg_of_surjective (f := (unitEmptyEquivUnits K).symm.toMonoidHom)\n (unitEmptyEquivUnits K).symm.surjective\n\nend Set\n\nend\n", "public_theorems": ["Set.unitValuation_apply", "Set.mem_unit_iff", "Set.unit_mono", "Set.unitValuation_ker", "Set.unit_fg", "Set.algebraMap_unitEmptyEquivUnits_apply", "Set.mem_unit_empty_iff"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.RingTheory.DedekindDomain.SelmerGroup\npublic import Mathlib.RingTheory.DedekindDomain.SInteger\npublic import TauCeti.Algebra.Algebra.Subalgebra.Lattice\npublic import TauCeti.GroupTheory.Finiteness\n\n/-!\n# Finite generation of the `S`-units\n\nMathlib defines the group `Set.unit S K` of `S`-units \u2014 the `x : K\u02e3` with `v x = 1` for every\n`v \u2209 S` \u2014 and identifies it with the units of the ring of `S`-integers, but says nothing about its\nsize. Its own module docstring records the gap: `Mathlib/RingTheory/DedekindDomain/SInteger.lean`\nlists as future work *\"finite generation of `S`-units and Dirichlet's `S`-unit theorem\"*, and\n`Mathlib/RingTheory/DedekindDomain/SelmerGroup.lean` likewise carries *\"TODO: proofs of finiteness\nfor global fields\"*. This file supplies the finite-generation half.\n\n## Main results\n\n* `Set.unit_fg`: **if `S` is finite and the `\u2205`-units are finitely generated, so are the\n `S`-units.**\n* `Set.unit_fg_of_units`: the same with the hypothesis over the base ring, `[Monoid.FG R\u02e3]` \u2014\n the form the arithmetic actually applies, since a caller holds `R\u02e3` and not the `\u2205`-units. An\n `instance`; the hypothesis is the `Monoid` form because that is the one Mathlib registers for\n `\ud835\udcaa K`.\n* `Set.unitValuation_ker`: the kernel of the `S`-valuation map is the `\u2205`-units, which is the\n left-exactness `1 \u2192 R\u02e3 \u2192 (S.integer K)\u02e3 \u2192 \u220f_{v\u2208S} \u2124`. This is in the same spirit as the TODO\n `RingTheory/DedekindDomain/SInteger.lean` records \u2014 \"proof that `S`-units is the kernel of a map\n to a product\" \u2014 but is not that statement: the map here is defined *on* the `S`-units and its\n kernel is the `\u2205`-units.\n\nThe argument is one application of `Group.fg_of_fg_ker_of_fg_range`. Sending an `S`-unit to its\ntuple of valuations at the primes *in* `S` gives `Set.unitValuation`, a homomorphism to `\u2124^S`; its\nimage is a subgroup of a finitely generated commutative group and so is finitely generated, and its\nkernel is the group of `\u2205`-units (`Set.unitValuation_ker`), which is `R\u02e3`\n(`Set.unitEmptyEquivUnits`). An extension of finitely generated groups is finitely generated.\n\n`Set.unit_mono` \u2014 the `S`-units grow with `S` \u2014 is what lets `unit_fg` identify the kernel\nsubgroup with the `\u2205`-units along `Subgroup.subgroupOfEquivOfLe`; it is not in Mathlib.\n\nThe rank refinement \u2014 that the rank is exactly `rank R\u02e3 + |S|` when the class group is finite \u2014 is\na separate topic and is not here.\n\nThis is the second of the two finiteness inputs to the weak Mordell\u2013Weil theorem: `A(S, 2)` is\nfinite because the `S`-class group is finite and **the `S`-units are finitely generated**\n(AEC VIII.1).\n\nThroughout, `R` is an *arbitrary* Dedekind domain and `K` its fraction field; `R\u02e3` and\n`(S.integer K)\u02e3` are the unit groups in play. The motivating case is `R = \ud835\udcaa_K` for a number\nfield, but nothing here assumes it, so the ring-of-integers notation is deliberately avoided.\n\n## Relation to mathlib4#40791\n\n**The names, statements and proofs here are taken from the open Mathlib pull request\n[mathlib4#40791](https://github.com/leanprover-community/mathlib4/pull/40791), \"feat(RingTheory/\nDedekindDomain): dirichlet's s-unit theorem\", by `vvvv-ops`, open since 2026-06-19**, which adds\n`Mathlib/RingTheory/DedekindDomain/SUnit.lean` and proves exactly this (and more: the rank formula\nand its number-field specialisation). Following that PR rather than inventing a parallel API is\ndeliberate \u2014 when Mathlib bumps past it, almost all of this file is deleted outright instead of\nbeing reconciled name by name. **`unit_fg_of_units` and\n`algebraMap_unitEmptyEquivUnits_apply` are the exceptions: they have no #40791 analogue, so at\nbump time they must be re-homed onto Mathlib's `Set.unit_fg`, not dropped with the rest.**\n\n**Four declarations here are not that PR's**, and are marked as such where they occur:\n\n* `mem_unit_iff` is the membership lemma for `Set.unit`, which neither #40791 nor Mathlib states;\n it is the companion of `Set.mem_integer_iff` next door, and `@[simp]` for the same reason.\n* `unit_mono` is stated for an arbitrary `S \u2286 S'`, of which #40791's `unit_empty_le` is the\n `S = \u2205` case.\n* **`unit_fg_of_units` is new here**, with no counterpart in #40791: upstream gives\n `unitEmptyEquivUnits` its consumer in the rank formula, which is not ported, so without this\n form the theorem is awkward to apply \u2014 a caller holds `R\u02e3`, not the `\u2205`-units.\n* **`algebraMap_unitEmptyEquivUnits_apply` is new here**, with no counterpart in #40791: it is the\n element-level characterisation of the three-fold composite `unitEmptyEquivUnits`, so that a\n future user of that equiv need not unfold it.\n\nThe valuation lemma these proofs run on,\n`IsDedekindDomain.HeightOneSpectrum.valuationOfNeZero_eq_one_iff`, is not here: it mentions no\n`S` and no `Set.unit`, so it lives in `TauCeti/RingTheory/DedekindDomain/ValuationOfNeZero.lean`\nbeside the `valuationOfNeZero` API it belongs to.\n\nAdapted from Michael Stoll's elliptic-curves formalisation\n(`github.com/MichaelStollBayreuth/EllipticCurves`, `EllipticCurves/Mathlib/SelmerGroup.lean` at\ncommit `66889eada51a`, Apache 2.0, by Michael Stoll), and then restated to match\nmathlib4#40791 as described above. Following this repository's convention for adapted material, the\nupstream authorship is credited here rather than in the copyright header.\n-/\n\npublic section\n\nopen IsDedekindDomain IsDedekindDomain.HeightOneSpectrum\n\nnamespace Set\n\nvariable {R : Type*} [CommRing R] [IsDedekindDomain R]\n (S : Set (HeightOneSpectrum R)) (K : Type*) [Field K] [Algebra R K] [IsFractionRing R K]\n\n/-- The `S`-valuation map on `S`-units: `u \u21a6 (v(u))_{v \u2208 S}`, valued in `\u21a5S \u2192 Multiplicative \u2124`. -/\nnoncomputable def unitValuation : S.unit K \u2192* (\u21a5S \u2192 Multiplicative \u2124) :=\n MonoidHom.pi fun v \u21a6 (v : HeightOneSpectrum R).valuationOfNeZero.comp (S.unit K).subtype", "@[simp]\ntheorem unitValuation_apply (u : S.unit K) (v : \u21a5S) :\n unitValuation S K u v = (v : HeightOneSpectrum R).valuationOfNeZero ((u : K\u02e3)) :=", "/-- Membership in the `S`-units is the valuation condition defining it. Mathlib defines\n`Set.unit` as a `Subgroup.copy` of exactly this set-builder but provides no membership lemma, so\nthis is `Iff.rfl`; naming it means the proofs below go through a characterisation rather than\nthat definitional unfolding. The companion of `Set.mem_integer_iff` for the other half of the\nsame API. -/\n@[simp] theorem mem_unit_iff {x : K\u02e3} :\n x \u2208 S.unit K \u2194 \u2200 v \u2209 S, (v : HeightOneSpectrum R).valuation K (x : K) = 1 :=", "/-- The `S`-units grow with `S`: enlarging the set of allowed primes only weakens the condition\n`v x = 1` for `v \u2209 S`. mathlib4#40791's `unit_empty_le` is the case `S = \u2205`. -/\ntheorem unit_mono {S S' : Set (HeightOneSpectrum R)} (h : S \u2286 S') : S.unit K \u2264 S'.unit K :=", "/-- **The kernel of the `S`-valuation map is the `\u2205`-units.** Equivalently, an `S`-unit lies in the\nkernel iff it has trivial valuation at every prime \u2014 i.e. it comes from a unit of `R`. This is the\nexact `1 \u2192 R\u02e3 \u2192 (S.integer K)\u02e3 \u2192 \u220f_{v\u2208S} \u2124` left-exactness. The codomain is the product `\u21a5S \u2192\nMultiplicative \u2124`; this theorem does not assume `S` finite, so it is not the direct sum. -/\ntheorem unitValuation_ker :\n (unitValuation S K).ker = ((\u2205 : Set (HeightOneSpectrum R)).unit K).subgroupOf (S.unit K) :=", "/-- **Finite generation of the `S`-units, relative to the `\u2205`-units.** If `S` is finite and the\n`\u2205`-units are finitely generated \u2014 for `R = \ud835\udcaa_K` a ring of integers that is Dirichlet's unit\ntheorem \u2014 then so are the `S`-units. `unit_fg_of_units` is the form stated over `R\u02e3`, which is\nwhat a caller normally has. -/\ntheorem unit_fg [Finite S] (hu : Group.FG ((\u2205 : Set (HeightOneSpectrum R)).unit K)) :\n Group.FG (S.unit K) :=", "/-- The `\u2205`-units are exactly the units of the base ring: `Set.unit \u2205 K \u2243* R\u02e3`. The `\u2205`-integers\nare the base ring `R` (`IsDedekindDomain.integer_empty`), and `S`-units are the units of the\n`S`-integers (`Set.unitEquivUnitsInteger`).\n\nIt is a three-fold composite, so `algebraMap_unitEmptyEquivUnits_apply` below records what it\ndoes to the underlying element. -/\nnoncomputable def unitEmptyEquivUnits : (\u2205 : Set (HeightOneSpectrum R)).unit K \u2243* R\u02e3 :=\n (unitEquivUnitsInteger (\u2205 : Set (HeightOneSpectrum R)) K).trans\n (Units.mapEquiv\n ((Subalgebra.equivOfEq _ _ (IsDedekindDomain.integer_empty R K)).trans\n (Algebra.botEquivOfInjective (IsFractionRing.injective R K))).toRingEquiv.toMulEquiv)", "/-- **What `unitEmptyEquivUnits` does to the underlying element:** it sends an `\u2205`-unit to the\nunit of `R` with the same image in `K`.\n\n**New here**, with no counterpart in mathlib4#40791: `unitEmptyEquivUnits` is a three-fold\ncomposite whose value on an element is not readable off the definition, and this is that value,\nso a future user of the equiv need not unfold it. -/\n@[simp]\ntheorem algebraMap_unitEmptyEquivUnits_apply (u : (\u2205 : Set (HeightOneSpectrum R)).unit K) :\n algebraMap R K ((unitEmptyEquivUnits K u : R\u02e3) : R) = ((u : K\u02e3) : K) :=", "/-- The units outside the empty set of primes are exactly the images of base-ring units. -/\ntheorem mem_unit_empty_iff {x : K\u02e3} :\n x \u2208 (\u2205 : Set (HeightOneSpectrum R)).unit K \u2194\n \u2203 u : R\u02e3, algebraMap R K (u : R) = (x : K) :=", "/-- **Finite generation of the `S`-units, over the base ring.** If `R\u02e3` is finitely generated and\n`S` is finite, then so is the group of `S`-units. This is `unit_fg` with its hypothesis\ntransported along `unitEmptyEquivUnits`, and it is the form the arithmetic uses \u2014 the `\u2205`-units\nare not what a caller has in hand, `R\u02e3` is.\n\nThis is *not* Dirichlet's `S`-unit theorem: finite generation of `R\u02e3` is assumed, not proved (for\n`R = \ud835\udcaa_K` that assumption is Dirichlet's unit theorem itself), no rank is computed, and `R` is an\narbitrary Dedekind domain rather than the ring of integers of a global field.\n\nThe hypothesis is `[Monoid.FG R\u02e3]`, not `[Group.FG R\u02e3]`: they are equivalent\n(`Group.fg_iff_monoid_fg`), but the instance Mathlib actually registers for the motivating case is\n`Monoid.FG (\ud835\udcde K)\u02e3` (`NumberField/Units/DirichletTheorem.lean`), and the only bridge that is an\ninstance runs the other way, so taking `Group.FG` would leave this instance unable to fire where\nit is meant to.\n\n**New here**, with no counterpart in mathlib4#40791: upstream gives `unitEmptyEquivUnits` its\nconsumer in the rank formula, which is not ported. -/\ninstance unit_fg_of_units [Finite S] [Monoid.FG R\u02e3] : Group.FG (S.unit K) :=\n have : Group.FG R\u02e3 := Group.fg_iff_monoid_fg.mpr \u2039_\u203a\n unit_fg S K <| Group.fg_of_surjective (f := (unitEmptyEquivUnits K).symm.toMonoidHom)\n (unitEmptyEquivUnits K).symm.surjective\n\nend Set\n\nend"], "free_length": 1524, "file_length": 3624, "heartbeats": 4607, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.AlgebraicGeometry.FormalScheme.Spf.CompletedAtPrime.Basic", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/AlgebraicGeometry/FormalScheme/Spf/CompletedAtPrime/Basic.lean", "module": "TauCeti.AlgebraicGeometry.FormalScheme.Spf.CompletedAtPrime.Basic", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.RingTheory.RegularLocalRing.Defs\npublic import Mathlib.RingTheory.RingHom.FaithfullyFlat\npublic import TauCeti.AlgebraicGeometry.FormalScheme.Spf.CompletedNeighbourhood\n\nimport Mathlib.RingTheory.Flat.FaithfullyFlat.Basic\nimport Mathlib.RingTheory.Localization.LocalizationLocalization\nimport TauCeti.RingTheory.AdicCompletion.Localization\nimport TauCeti.RingTheory.AdicCompletion.LocalRing\nimport TauCeti.RingTheory.Flat.Colimit\nimport TauCeti.RingTheory.Ideal.Maps\n\n/-!\n# The completed localisations of an adic ring at its open primes\n\nLet `A` be an adic ring with ideal of definition `I`, and let `p` be an open prime of `A`,\ncorresponding to a prime ideal `\ud835\udd2d \u2287 I`. This file defines the completed localisation\n`\u00c2_\ud835\udd2d = lim_n (A \u29f8 I\u207f)_\ud835\udd2d`, the completion of the local ring `A_\ud835\udd2d` along `I A_\ud835\udd2d` (EGA I, Ch. 0,\n7.6.15), and compares it with the colimit `colim_{f \u2209 \ud835\udd2d} A_{f}` of the completed localisations of\n`A` over the basic open neighbourhoods `D(f)` of `p` in `Spf A`, the algebraic model of the stalk of\n`Spf A` at `p` (EGA I, Ch. I, 10.1.6).\n\n* For each `f \u2209 \ud835\udd2d`, the completion of the localisation map `A_f \u2192 A_\ud835\udd2d` is a map `A_{f} \u2192 \u00c2_\ud835\udd2d`.\n These maps are compatible with the restriction maps, so they induce a map from the colimit to\n `\u00c2_\ud835\udd2d`.\n* The residue map of the local ring `colim_{f \u2209 \ud835\udd2d} A_{f}` onto `Frac(A \u29f8 \ud835\udd2d)` factors through\n `\u00c2_\ud835\udd2d`, so this map is a local homomorphism.\n* For noetherian `A`, the completion `\u00c2_\ud835\udd2d` is flat over every `A_{f}`\n (`AdicCompletion.flat_map\u2090_of_isLocalization`), hence over the colimit, because every finite\n family of elements of the colimit comes from a single `A_{f}` (`RingHom.Flat.of_isColimit`).\n Its maximal ideal maps into the kernel of the residue map of `\u00c2_\ud835\udd2d`, so it is faithfully flat.\n* Since `I \u2286 \ud835\udd2d`, the ring `\u00c2_\ud835\udd2d` is local with maximal ideal `\ud835\udd2d \u00c2_\ud835\udd2d`, and for noetherian `A` it has\n the Krull dimension of `A_\ud835\udd2d` and is regular exactly when `A_\ud835\udd2d` is.\n\n## Main definitions\n\n* `TauCeti.FormalScheme.Spf.CompletedAtPrime p`: the completed localisation `\u00c2_\ud835\udd2d`, the completion\n of `A_\ud835\udd2d` along `I A_\ud835\udd2d`.\n* `TauCeti.FormalScheme.Spf.toCompletedAtPrime p f`: for `f \u2209 \ud835\udd2d`, the map `A_{f} \u2192 \u00c2_\ud835\udd2d`.\n* `TauCeti.FormalScheme.Spf.colimitToCompletedAtPrime p`: the induced map\n `colim_{f \u2209 \ud835\udd2d} A_{f} \u2192 \u00c2_\ud835\udd2d`.\n\n## Main results\n\n* `TauCeti.FormalScheme.Spf.isLocalHom_colimitToCompletedAtPrime`: the map\n `colim_{f \u2209 \ud835\udd2d} A_{f} \u2192 \u00c2_\ud835\udd2d` is a local homomorphism.\n* `TauCeti.FormalScheme.Spf.faithfullyFlat_colimitToCompletedAtPrime`: for noetherian `A`, the\n completed localisation `\u00c2_\ud835\udd2d` is faithfully flat over `colim_{f \u2209 \ud835\udd2d} A_{f}`.\n* `TauCeti.FormalScheme.Spf.maximalIdeal_completedAtPrime`: `\u00c2_\ud835\udd2d` is a local ring with maximal\n ideal `\ud835\udd2d \u00c2_\ud835\udd2d`.\n* `TauCeti.FormalScheme.Spf.ringKrullDim_completedAtPrime`,\n `TauCeti.FormalScheme.Spf.isRegularLocalRing_completedAtPrime_iff`: for noetherian `A`, the rings\n `\u00c2_\ud835\udd2d` and `A_\ud835\udd2d` have the same Krull dimension, and one is regular if and only if the other is.\n\n## References\n\n* A. Grothendieck and J. Dieudonn\u00e9, *\u00c9l\u00e9ments de g\u00e9om\u00e9trie alg\u00e9brique I*, Ch. 0, 7.6.15\u20137.6.17,\n and Ch. I, 10.1.6.\n* [Stacks Project, Lemma 15.44.1](https://stacks.math.columbia.edu/tag/07NV) and\n [Stacks Project, Lemma 15.44.4](https://stacks.math.columbia.edu/tag/07NY), the dimension and\n regularity of the completion of a noetherian local ring along an ideal.\n-/\n\npublic section\n\nuniverse u\n\nopen CategoryTheory Limits IsLocalRing\n\nnamespace TauCeti.FormalScheme.Spf\n\nopen AdicRing\n\nvariable {A : Type u} [CommRing A] [TopologicalSpace A] [IsTopologicalRing A] [IsAdicRing A]\n (p : carrier A)\n\n/-- The **completed localisation** `\u00c2_\ud835\udd2d = lim_n (A \u29f8 I\u207f)_\ud835\udd2d` of `A` at the open prime `\ud835\udd2d`\ncorresponding to `p`: the completion of the local ring `A_\ud835\udd2d` along the ideal of definition `I`. It\nis the completed localisation `A_{A \u2216 \ud835\udd2d}` of EGA I, Ch. 0, 7.6.15. -/\nabbrev CompletedAtPrime : Type u :=\n AdicCompletion\n ((IsAdicRing.ideal A).map (algebraMap A (Localization.AtPrime (p : PrimeSpectrum A).asIdeal)))\n (Localization.AtPrime (p : PrimeSpectrum A).asIdeal)\n\nomit [IsTopologicalRing A] [IsAdicRing A] in\n/-- For `f \u2209 \ud835\udd2d`, inverting `f` inverts only elements of `A \u2216 \ud835\udd2d`. -/\nprivate theorem powers_le_primeCompl (f : BasicNeighbourhood p) :\n Submonoid.powers f.elem \u2264 (p : PrimeSpectrum A).asIdeal.primeCompl :=\n Submonoid.powers_le.mpr f.notMem\n\n/-- For `f \u2209 \ud835\udd2d`, the local ring `A_\ud835\udd2d` is an algebra over `A_f`. -/\nprivate noncomputable abbrev awayAlgebra (f : BasicNeighbourhood p) :\n Algebra (Localization.Away f.elem) (Localization.AtPrime (p : PrimeSpectrum A).asIdeal) :=\n IsLocalization.localizationAlgebraOfSubmonoidLe _ _ _ _ (powers_le_primeCompl p f)\n\nomit [IsTopologicalRing A] [IsAdicRing A] in\nattribute [local instance] awayAlgebra in\n/-- The algebra structure of `A_\ud835\udd2d` over `A_f` is compatible with those over `A`. -/\nprivate theorem isScalarTower_away (f : BasicNeighbourhood p) :\n IsScalarTower A (Localization.Away f.elem)\n (Localization.AtPrime (p : PrimeSpectrum A).asIdeal) :=\n IsLocalization.localization_isScalarTower_of_submonoid_le _ _ _ _ (powers_le_primeCompl p f)\n\nattribute [local instance] awayAlgebra in\n/-- The ideal of definition of `A_\ud835\udd2d` is the extension of that of `A_f`. -/\nprivate theorem map_ideal_away (f : BasicNeighbourhood p) :\n ((IsAdicRing.ideal A).map (algebraMap A (Localization.Away f.elem))).map\n (algebraMap (Localization.Away f.elem)\n (Localization.AtPrime (p : PrimeSpectrum A).asIdeal)) =\n (IsAdicRing.ideal A).map\n (algebraMap A (Localization.AtPrime (p : PrimeSpectrum A).asIdeal)) := by\n have := isScalarTower_away p f\n rw [Ideal.map_map, \u2190 IsScalarTower.algebraMap_eq]\n\nattribute [local instance] awayAlgebra in\n/-- For `f \u2209 \ud835\udd2d`, the map `A_{f} \u2192 \u00c2_\ud835\udd2d`: the completion of the localisation map `A_f \u2192 A_\ud835\udd2d`. -/\nnoncomputable def toCompletedAtPrime (f : BasicNeighbourhood p) :\n CompletedAway A f.elem \u2192\u2090[A] CompletedAtPrime p :=\n haveI := isScalarTower_away p f\n ((AdicCompletion.map\u2090 (Algebra.ofId (Localization.Away f.elem) _)\n ((map_ideal_away p f) \u25b8 Ideal.le_comap_map)).comp\n (CompletedAway.equivAdicCompletion A f.elem).toAlgHom).restrictScalars A\n\nattribute [local instance] awayAlgebra in\n/-- For noetherian `A` and `f \u2209 \ud835\udd2d`, the completion `\u00c2_\ud835\udd2d` is flat over `A_{f}`. -/\nprivate theorem flat_toCompletedAtPrime [IsNoetherianRing A] (f : BasicNeighbourhood p) :\n (toCompletedAtPrime p f).toRingHom.Flat := by\n have := isScalarTower_away p f\n have : IsLocalization (Algebra.algebraMapSubmonoid (Localization.Away f.elem)\n (p : PrimeSpectrum A).asIdeal.primeCompl)\n (Localization.AtPrime (p : PrimeSpectrum A).asIdeal) :=\n IsLocalization.isLocalization_of_submonoid_le _ _ _ _ (powers_le_primeCompl p f)\n -- the completion of `A_f \u2192 A_\ud835\udd2d`, after the identification of `A_{f}` with that completion\n exact (RingHom.Flat.of_bijective (CompletedAway.equivAdicCompletion A f.elem).bijective).comp\n (AdicCompletion.flat_map\u2090_of_isLocalization _\n (Algebra.algebraMapSubmonoid (Localization.Away f.elem)\n (p : PrimeSpectrum A).asIdeal.primeCompl) (map_ideal_away p f))\n\n/-- The cocone of the maps `A_{f} \u2192 \u00c2_\ud835\udd2d` over the diagram of completed localisations. -/\nprivate noncomputable def completedAtPrimeCocone : Cocone (completedNeighbourhoodDiagram p) where\n pt := CommRingCat.of (CompletedAtPrime p)\n \u03b9.app f := CommRingCat.ofHom (toCompletedAtPrime p f).toRingHom\n \u03b9.naturality {f g} h := by\n -- both composites are `A`-algebra homomorphisms into the completion of `A_\ud835\udd2d`\n have := CompletedAway.algHom_ext_adicCompletion le_rfl ((toCompletedAtPrime p g).comp\n (CompletedAway.restrict ((BasicNeighbourhood.le_iff_mem_radical\n (IsAdicRing.ideal_spec A).2.1).mp h.le))) (toCompletedAtPrime p f)\n -- in `CommRingCat`, a composite of morphisms acts on elements as the composite of functions\n ext x\n exact congr($this x)\n\n/-- The map `colim_{f \u2209 \ud835\udd2d} A_{f} \u2192 \u00c2_\ud835\udd2d` induced by the maps `A_{f} \u2192 \u00c2_\ud835\udd2d`. -/\nnoncomputable def colimitToCompletedAtPrime :\n (colimit (completedNeighbourhoodDiagram p) : CommRingCat) \u2192+* CompletedAtPrime p :=\n (colimit.desc _ (completedAtPrimeCocone p)).hom\n\n/-- On `A_{f}`, the map `colim_{f \u2209 \ud835\udd2d} A_{f} \u2192 \u00c2_\ud835\udd2d` is the map `A_{f} \u2192 \u00c2_\ud835\udd2d`. -/\n@[simp]\ntheorem colimitToCompletedAtPrime_\u03b9 (f : BasicNeighbourhood p)\n (x : ToType ((completedNeighbourhoodDiagram p).obj f)) :\n colimitToCompletedAtPrime p (colimit.\u03b9 (completedNeighbourhoodDiagram p) f x) =\n toCompletedAtPrime p f x :=\n colimit.\u03b9_desc_apply (completedAtPrimeCocone p) f x\n\n/-- For noetherian `A`, the completion `\u00c2_\ud835\udd2d` is flat over `colim_{f \u2209 \ud835\udd2d} A_{f}`, being flat over\nevery `A_{f}`. -/\nprivate theorem flat_colimitToCompletedAtPrime [IsNoetherianRing A] :\n (colimitToCompletedAtPrime p).Flat :=\n RingHom.Flat.of_isColimit (colimit.isColimit _) (colimitToCompletedAtPrime p) fun f \u21a6\n (congrArg RingHom.Flat (RingHom.ext (colimitToCompletedAtPrime_\u03b9 p f))).mpr\n (flat_toCompletedAtPrime p f)\n\nomit [IsTopologicalRing A] [IsAdicRing A] in\n/-- The elements of `A \u2216 \ud835\udd2d` are units in `Frac(A \u29f8 \ud835\udd2d)`. -/\nprivate theorem isUnit_algebraMap_residue (s : (p : PrimeSpectrum A).asIdeal.primeCompl) :\n IsUnit (algebraMap A (FractionRing (A \u29f8 (p : PrimeSpectrum A).asIdeal)) s) := by\n rw [IsScalarTower.algebraMap_apply A (A \u29f8 (p : PrimeSpectrum A).asIdeal), isUnit_iff_ne_zero,\n ne_eq, IsFractionRing.to_map_eq_zero_iff, Ideal.Quotient.algebraMap_eq,\n Ideal.Quotient.eq_zero_iff_mem]\n exact s.property\n\n/-- The ideal of definition vanishes in `Frac(A \u29f8 \ud835\udd2d)`. -/\nprivate theorem map_ideal_residue :\n (IsAdicRing.ideal A).map (algebraMap A (FractionRing (A \u29f8 (p : PrimeSpectrum A).asIdeal))) =\n \u22a5 := by\n rw [Ideal.map_eq_bot_iff_le_ker]\n intro a ha\n rw [RingHom.mem_ker, IsScalarTower.algebraMap_apply A (A \u29f8 (p : PrimeSpectrum A).asIdeal),\n Ideal.Quotient.algebraMap_eq, Ideal.Quotient.eq_zero_iff_mem.mpr\n ((mem_carrier_iff_le (IsAdicRing.ideal_spec A).2.1).mp p.property ha), map_zero]\n\n/-- The value at `\ud835\udd2d` of an element of `A_\ud835\udd2d`, in `Frac(A \u29f8 \ud835\udd2d)`. -/\nprivate noncomputable def residueLocalization :\n Localization.AtPrime (p : PrimeSpectrum A).asIdeal \u2192\u2090[A]\n FractionRing (A \u29f8 (p : PrimeSpectrum A).asIdeal) :=\n IsLocalization.liftAlgHom (M := (p : PrimeSpectrum A).asIdeal.primeCompl)\n (f := Algebra.ofId A _) (isUnit_algebraMap_residue p)\n\n/-- The value at `\ud835\udd2d` of an element of `\u00c2_\ud835\udd2d`: its image under `\u00c2_\ud835\udd2d \u2192 A_\ud835\udd2d \u29f8 I A_\ud835\udd2d \u2192 Frac(A \u29f8 \ud835\udd2d)`,\nwhich is defined since `I \u2286 \ud835\udd2d`. -/\nprivate noncomputable def residueCompletedAtPrime :\n CompletedAtPrime p \u2192\u2090[A] FractionRing (A \u29f8 (p : PrimeSpectrum A).asIdeal) :=\n (Ideal.Quotient.lift\u2090 _ (residueLocalization p) fun _ hx \u21a6\n (Ideal.map_eq_bot_iff_le_ker (residueLocalization p)).mp\n ((Ideal.map_map_algebraMap _ _).trans (map_ideal_residue p)) hx).comp\n ((AdicCompletion.evalOne\u2090 _).restrictScalars A)\n\n/-- On the colimit, the value at `\ud835\udd2d` through `\u00c2_\ud835\udd2d` is the residue map of the local ring\n`colim_{f \u2209 \ud835\udd2d} A_{f}`, identified with `Frac(A \u29f8 \ud835\udd2d)` by `stalkResidueIso`. -/\nprivate theorem residueCompletedAtPrime_colimitToCompletedAtPrime\n (x : (colimit (completedNeighbourhoodDiagram p) : CommRingCat)) :\n residueCompletedAtPrime p (colimitToCompletedAtPrime p x) =\n stalkResidueIso p (IsLocalRing.residue _ x) := by\n obtain \u27e8f, y, rfl\u27e9 := Concrete.colimit_exists_rep _ x\n rw [colimitToCompletedAtPrime_\u03b9]\n -- both sides are `A`-algebra homomorphisms out of `A_{f}` into `Frac(A \u29f8 \ud835\udd2d)`\n let g : CompletedAway A f.elem \u2192\u2090[A] FractionRing (A \u29f8 (p : PrimeSpectrum A).asIdeal) :=\n { toRingHom := (stalkResidueIso p).toRingHom.comp\n ((IsLocalRing.residue _).comp (colimit.\u03b9 (completedNeighbourhoodDiagram p) f).hom)\n commutes' a := (stalkResidueIso_coeff p f a).trans\n (IsScalarTower.algebraMap_apply A (A \u29f8 (p : PrimeSpectrum A).asIdeal) _ a).symm }\n exact congr($(CompletedAway.algHom_ext_of_map_pow_eq_bot (n := 1)\n (by rw [pow_one, map_ideal_residue p]) ((residueCompletedAtPrime p).comp\n (toCompletedAtPrime p f)) g) y)\n\n/-- The map `colim_{f \u2209 \ud835\udd2d} A_{f} \u2192 \u00c2_\ud835\udd2d` is a local homomorphism: an element whose image is a unit\nhas a nonzero value at `\ud835\udd2d`, so it is a unit of the local ring `colim_{f \u2209 \ud835\udd2d} A_{f}`. -/\ninstance isLocalHom_colimitToCompletedAtPrime : IsLocalHom (colimitToCompletedAtPrime p) := by\n refine \u27e8fun x hx \u21a6 ?_\u27e9\n have h := hx.map (residueCompletedAtPrime p)\n rw [residueCompletedAtPrime_colimitToCompletedAtPrime, isUnit_map_iff] at h\n exact isUnit_of_map_unit (IsLocalRing.residue _) x h\n\n/-- For noetherian `A`, the completion `\u00c2_\ud835\udd2d` is faithfully flat over `colim_{f \u2209 \ud835\udd2d} A_{f}`: it is\nflat, and the maximal ideal of the colimit maps into the kernel of the value at `\ud835\udd2d`. -/\ntheorem faithfullyFlat_colimitToCompletedAtPrime [IsNoetherianRing A] :\n (colimitToCompletedAtPrime p).FaithfullyFlat := by\n algebraize [colimitToCompletedAtPrime p]\n have : Module.Flat _ (CompletedAtPrime p) := flat_colimitToCompletedAtPrime p\n refine \u27e8fun m hm hmtop \u21a6 ?_\u27e9\n rw [IsLocalRing.eq_maximalIdeal hm, Ideal.smul_top_eq_map, Submodule.restrictScalars_eq_top_iff,\n Ideal.eq_top_iff_one] at hmtop\n have hle : (IsLocalRing.maximalIdeal\n (colimit (completedNeighbourhoodDiagram p) : CommRingCat)).map\n (algebraMap _ (CompletedAtPrime p)) \u2264\n RingHom.ker (residueCompletedAtPrime p) := by\n refine Ideal.map_le_iff_le_comap.mpr fun x hx \u21a6 ?_\n rw [Ideal.mem_comap, RingHom.mem_ker, RingHom.algebraMap_toAlgebra,\n residueCompletedAtPrime_colimitToCompletedAtPrime, (IsLocalRing.residue_eq_zero_iff x).mpr hx,\n map_zero]\n exact one_ne_zero (\u03b1 := FractionRing (A \u29f8 (p : PrimeSpectrum A).asIdeal))\n (by simpa using hle hmtop)\n\n/-! ### The completed localisation as a local ring -/\n\n/-- The ideal of definition of `A_\ud835\udd2d` lies in its maximal ideal, since `I \u2286 \ud835\udd2d`. -/\nprivate theorem map_ideal_le_maximalIdeal :\n (IsAdicRing.ideal A).map (algebraMap A (Localization.AtPrime (p : PrimeSpectrum A).asIdeal)) \u2264\n maximalIdeal (Localization.AtPrime (p : PrimeSpectrum A).asIdeal) := by\n rw [\u2190 Localization.AtPrime.map_eq_maximalIdeal]\n exact Ideal.map_mono ((mem_carrier_iff_le (IsAdicRing.ideal_spec A).2.1).mp p.property)\n\n/-- The completed localisation `\u00c2_\ud835\udd2d` is a local ring. -/\ninstance isLocalRing_completedAtPrime : IsLocalRing (CompletedAtPrime p) :=\n TauCeti.AdicCompletion.isLocalRing_of_le (map_ideal_le_maximalIdeal p)\n ((IsAdicRing.ideal_spec A).1.map _)\n\n/-- The maximal ideal of the completed localisation `\u00c2_\ud835\udd2d` is generated by `\ud835\udd2d`. -/\ntheorem maximalIdeal_completedAtPrime :\n maximalIdeal (CompletedAtPrime p) =\n (p : PrimeSpectrum A).asIdeal.map (algebraMap A (CompletedAtPrime p)) := by\n rw [TauCeti.AdicCompletion.maximalIdeal_eq_map_of_le (map_ideal_le_maximalIdeal p)\n ((IsAdicRing.ideal_spec A).1.map _), \u2190 Localization.AtPrime.map_eq_maximalIdeal, Ideal.map_map,\n \u2190 IsScalarTower.algebraMap_eq]\n\n/-- For a noetherian adic ring `A`, the completed localisation `\u00c2_\ud835\udd2d` has the Krull dimension of\n`A_\ud835\udd2d`. -/\ntheorem ringKrullDim_completedAtPrime [IsNoetherianRing A] :\n ringKrullDim (CompletedAtPrime p) =\n ringKrullDim (Localization.AtPrime (p : PrimeSpectrum A).asIdeal) :=\n TauCeti.AdicCompletion.ringKrullDim_eq (map_ideal_le_maximalIdeal p)\n\n/-- For a noetherian adic ring `A`, the completed localisation `\u00c2_\ud835\udd2d` is a regular local ring if\nand only if `A_\ud835\udd2d` is. -/\ntheorem isRegularLocalRing_completedAtPrime_iff [IsNoetherianRing A] :\n IsRegularLocalRing (CompletedAtPrime p) \u2194\n IsRegularLocalRing (Localization.AtPrime (p : PrimeSpectrum A).asIdeal) :=\n TauCeti.AdicCompletion.isRegularLocalRing_iff (map_ideal_le_maximalIdeal p)\n\nend TauCeti.FormalScheme.Spf\n", "public_theorems": ["TauCeti.FormalScheme.Spf.colimitToCompletedAtPrime_\u03b9", "TauCeti.FormalScheme.Spf.faithfullyFlat_colimitToCompletedAtPrime", "TauCeti.FormalScheme.Spf.maximalIdeal_completedAtPrime", "TauCeti.FormalScheme.Spf.ringKrullDim_completedAtPrime", "TauCeti.FormalScheme.Spf.isRegularLocalRing_completedAtPrime_iff"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.RingTheory.RegularLocalRing.Defs\npublic import Mathlib.RingTheory.RingHom.FaithfullyFlat\npublic import TauCeti.AlgebraicGeometry.FormalScheme.Spf.CompletedNeighbourhood\n\nimport Mathlib.RingTheory.Flat.FaithfullyFlat.Basic\nimport Mathlib.RingTheory.Localization.LocalizationLocalization\nimport TauCeti.RingTheory.AdicCompletion.Localization\nimport TauCeti.RingTheory.AdicCompletion.LocalRing\nimport TauCeti.RingTheory.Flat.Colimit\nimport TauCeti.RingTheory.Ideal.Maps\n\n/-!\n# The completed localisations of an adic ring at its open primes\n\nLet `A` be an adic ring with ideal of definition `I`, and let `p` be an open prime of `A`,\ncorresponding to a prime ideal `\ud835\udd2d \u2287 I`. This file defines the completed localisation\n`\u00c2_\ud835\udd2d = lim_n (A \u29f8 I\u207f)_\ud835\udd2d`, the completion of the local ring `A_\ud835\udd2d` along `I A_\ud835\udd2d` (EGA I, Ch. 0,\n7.6.15), and compares it with the colimit `colim_{f \u2209 \ud835\udd2d} A_{f}` of the completed localisations of\n`A` over the basic open neighbourhoods `D(f)` of `p` in `Spf A`, the algebraic model of the stalk of\n`Spf A` at `p` (EGA I, Ch. I, 10.1.6).\n\n* For each `f \u2209 \ud835\udd2d`, the completion of the localisation map `A_f \u2192 A_\ud835\udd2d` is a map `A_{f} \u2192 \u00c2_\ud835\udd2d`.\n These maps are compatible with the restriction maps, so they induce a map from the colimit to\n `\u00c2_\ud835\udd2d`.\n* The residue map of the local ring `colim_{f \u2209 \ud835\udd2d} A_{f}` onto `Frac(A \u29f8 \ud835\udd2d)` factors through\n `\u00c2_\ud835\udd2d`, so this map is a local homomorphism.\n* For noetherian `A`, the completion `\u00c2_\ud835\udd2d` is flat over every `A_{f}`\n (`AdicCompletion.flat_map\u2090_of_isLocalization`), hence over the colimit, because every finite\n family of elements of the colimit comes from a single `A_{f}` (`RingHom.Flat.of_isColimit`).\n Its maximal ideal maps into the kernel of the residue map of `\u00c2_\ud835\udd2d`, so it is faithfully flat.\n* Since `I \u2286 \ud835\udd2d`, the ring `\u00c2_\ud835\udd2d` is local with maximal ideal `\ud835\udd2d \u00c2_\ud835\udd2d`, and for noetherian `A` it has\n the Krull dimension of `A_\ud835\udd2d` and is regular exactly when `A_\ud835\udd2d` is.\n\n## Main definitions\n\n* `TauCeti.FormalScheme.Spf.CompletedAtPrime p`: the completed localisation `\u00c2_\ud835\udd2d`, the completion\n of `A_\ud835\udd2d` along `I A_\ud835\udd2d`.\n* `TauCeti.FormalScheme.Spf.toCompletedAtPrime p f`: for `f \u2209 \ud835\udd2d`, the map `A_{f} \u2192 \u00c2_\ud835\udd2d`.\n* `TauCeti.FormalScheme.Spf.colimitToCompletedAtPrime p`: the induced map\n `colim_{f \u2209 \ud835\udd2d} A_{f} \u2192 \u00c2_\ud835\udd2d`.\n\n## Main results\n\n* `TauCeti.FormalScheme.Spf.isLocalHom_colimitToCompletedAtPrime`: the map\n `colim_{f \u2209 \ud835\udd2d} A_{f} \u2192 \u00c2_\ud835\udd2d` is a local homomorphism.\n* `TauCeti.FormalScheme.Spf.faithfullyFlat_colimitToCompletedAtPrime`: for noetherian `A`, the\n completed localisation `\u00c2_\ud835\udd2d` is faithfully flat over `colim_{f \u2209 \ud835\udd2d} A_{f}`.\n* `TauCeti.FormalScheme.Spf.maximalIdeal_completedAtPrime`: `\u00c2_\ud835\udd2d` is a local ring with maximal\n ideal `\ud835\udd2d \u00c2_\ud835\udd2d`.\n* `TauCeti.FormalScheme.Spf.ringKrullDim_completedAtPrime`,\n `TauCeti.FormalScheme.Spf.isRegularLocalRing_completedAtPrime_iff`: for noetherian `A`, the rings\n `\u00c2_\ud835\udd2d` and `A_\ud835\udd2d` have the same Krull dimension, and one is regular if and only if the other is.\n\n## References\n\n* A. Grothendieck and J. Dieudonn\u00e9, *\u00c9l\u00e9ments de g\u00e9om\u00e9trie alg\u00e9brique I*, Ch. 0, 7.6.15\u20137.6.17,\n and Ch. I, 10.1.6.\n* [Stacks Project, Lemma 15.44.1](https://stacks.math.columbia.edu/tag/07NV) and\n [Stacks Project, Lemma 15.44.4](https://stacks.math.columbia.edu/tag/07NY), the dimension and\n regularity of the completion of a noetherian local ring along an ideal.\n-/\n\npublic section\n\nuniverse u\n\nopen CategoryTheory Limits IsLocalRing\n\nnamespace TauCeti.FormalScheme.Spf\n\nopen AdicRing\n\nvariable {A : Type u} [CommRing A] [TopologicalSpace A] [IsTopologicalRing A] [IsAdicRing A]\n (p : carrier A)\n\n/-- The **completed localisation** `\u00c2_\ud835\udd2d = lim_n (A \u29f8 I\u207f)_\ud835\udd2d` of `A` at the open prime `\ud835\udd2d`\ncorresponding to `p`: the completion of the local ring `A_\ud835\udd2d` along the ideal of definition `I`. It\nis the completed localisation `A_{A \u2216 \ud835\udd2d}` of EGA I, Ch. 0, 7.6.15. -/\nabbrev CompletedAtPrime : Type u :=\n AdicCompletion\n ((IsAdicRing.ideal A).map (algebraMap A (Localization.AtPrime (p : PrimeSpectrum A).asIdeal)))\n (Localization.AtPrime (p : PrimeSpectrum A).asIdeal)", "/-- For `f \u2209 \ud835\udd2d`, the local ring `A_\ud835\udd2d` is an algebra over `A_f`. -/\nprivate noncomputable abbrev awayAlgebra (f : BasicNeighbourhood p) :\n Algebra (Localization.Away f.elem) (Localization.AtPrime (p : PrimeSpectrum A).asIdeal) :=\n IsLocalization.localizationAlgebraOfSubmonoidLe _ _ _ _ (powers_le_primeCompl p f)\n\nomit [IsTopologicalRing A] [IsAdicRing A] in\nattribute [local instance] awayAlgebra in", "attribute [local instance] awayAlgebra in", "attribute [local instance] awayAlgebra in\n/-- For `f \u2209 \ud835\udd2d`, the map `A_{f} \u2192 \u00c2_\ud835\udd2d`: the completion of the localisation map `A_f \u2192 A_\ud835\udd2d`. -/\nnoncomputable def toCompletedAtPrime (f : BasicNeighbourhood p) :\n CompletedAway A f.elem \u2192\u2090[A] CompletedAtPrime p :=\n haveI := isScalarTower_away p f\n ((AdicCompletion.map\u2090 (Algebra.ofId (Localization.Away f.elem) _)\n ((map_ideal_away p f) \u25b8 Ideal.le_comap_map)).comp\n (CompletedAway.equivAdicCompletion A f.elem).toAlgHom).restrictScalars A\n\nattribute [local instance] awayAlgebra in", "/-- The cocone of the maps `A_{f} \u2192 \u00c2_\ud835\udd2d` over the diagram of completed localisations. -/\nprivate noncomputable def completedAtPrimeCocone : Cocone (completedNeighbourhoodDiagram p) where\n pt := CommRingCat.of (CompletedAtPrime p)\n \u03b9.app f := CommRingCat.ofHom (toCompletedAtPrime p f).toRingHom\n \u03b9.naturality {f g} h := by\n -- both composites are `A`-algebra homomorphisms into the completion of `A_\ud835\udd2d`\n have := CompletedAway.algHom_ext_adicCompletion le_rfl ((toCompletedAtPrime p g).comp\n (CompletedAway.restrict ((BasicNeighbourhood.le_iff_mem_radical\n (IsAdicRing.ideal_spec A).2.1).mp h.le))) (toCompletedAtPrime p f)\n -- in `CommRingCat`, a composite of morphisms acts on elements as the composite of functions\n ext x\n exact congr($this x)\n\n/-- The map `colim_{f \u2209 \ud835\udd2d} A_{f} \u2192 \u00c2_\ud835\udd2d` induced by the maps `A_{f} \u2192 \u00c2_\ud835\udd2d`. -/\nnoncomputable def colimitToCompletedAtPrime :\n (colimit (completedNeighbourhoodDiagram p) : CommRingCat) \u2192+* CompletedAtPrime p :=\n (colimit.desc _ (completedAtPrimeCocone p)).hom", "/-- On `A_{f}`, the map `colim_{f \u2209 \ud835\udd2d} A_{f} \u2192 \u00c2_\ud835\udd2d` is the map `A_{f} \u2192 \u00c2_\ud835\udd2d`. -/\n@[simp]\ntheorem colimitToCompletedAtPrime_\u03b9 (f : BasicNeighbourhood p)\n (x : ToType ((completedNeighbourhoodDiagram p).obj f)) :\n colimitToCompletedAtPrime p (colimit.\u03b9 (completedNeighbourhoodDiagram p) f x) =\n toCompletedAtPrime p f x :=", "/-- The value at `\ud835\udd2d` of an element of `A_\ud835\udd2d`, in `Frac(A \u29f8 \ud835\udd2d)`. -/\nprivate noncomputable def residueLocalization :\n Localization.AtPrime (p : PrimeSpectrum A).asIdeal \u2192\u2090[A]\n FractionRing (A \u29f8 (p : PrimeSpectrum A).asIdeal) :=\n IsLocalization.liftAlgHom (M := (p : PrimeSpectrum A).asIdeal.primeCompl)\n (f := Algebra.ofId A _) (isUnit_algebraMap_residue p)\n\n/-- The value at `\ud835\udd2d` of an element of `\u00c2_\ud835\udd2d`: its image under `\u00c2_\ud835\udd2d \u2192 A_\ud835\udd2d \u29f8 I A_\ud835\udd2d \u2192 Frac(A \u29f8 \ud835\udd2d)`,\nwhich is defined since `I \u2286 \ud835\udd2d`. -/\nprivate noncomputable def residueCompletedAtPrime :\n CompletedAtPrime p \u2192\u2090[A] FractionRing (A \u29f8 (p : PrimeSpectrum A).asIdeal) :=\n (Ideal.Quotient.lift\u2090 _ (residueLocalization p) fun _ hx \u21a6\n (Ideal.map_eq_bot_iff_le_ker (residueLocalization p)).mp\n ((Ideal.map_map_algebraMap _ _).trans (map_ideal_residue p)) hx).comp\n ((AdicCompletion.evalOne\u2090 _).restrictScalars A)", "/-- The map `colim_{f \u2209 \ud835\udd2d} A_{f} \u2192 \u00c2_\ud835\udd2d` is a local homomorphism: an element whose image is a unit\nhas a nonzero value at `\ud835\udd2d`, so it is a unit of the local ring `colim_{f \u2209 \ud835\udd2d} A_{f}`. -/\ninstance isLocalHom_colimitToCompletedAtPrime : IsLocalHom (colimitToCompletedAtPrime p) := by\n refine \u27e8fun x hx \u21a6 ?_\u27e9\n have h := hx.map (residueCompletedAtPrime p)\n rw [residueCompletedAtPrime_colimitToCompletedAtPrime, isUnit_map_iff] at h\n exact isUnit_of_map_unit (IsLocalRing.residue _) x h", "/-- For noetherian `A`, the completion `\u00c2_\ud835\udd2d` is faithfully flat over `colim_{f \u2209 \ud835\udd2d} A_{f}`: it is\nflat, and the maximal ideal of the colimit maps into the kernel of the value at `\ud835\udd2d`. -/\ntheorem faithfullyFlat_colimitToCompletedAtPrime [IsNoetherianRing A] :\n (colimitToCompletedAtPrime p).FaithfullyFlat :=", "/-! ### The completed localisation as a local ring -/", "/-- The completed localisation `\u00c2_\ud835\udd2d` is a local ring. -/\ninstance isLocalRing_completedAtPrime : IsLocalRing (CompletedAtPrime p) :=\n TauCeti.AdicCompletion.isLocalRing_of_le (map_ideal_le_maximalIdeal p)\n ((IsAdicRing.ideal_spec A).1.map _)", "/-- The maximal ideal of the completed localisation `\u00c2_\ud835\udd2d` is generated by `\ud835\udd2d`. -/\ntheorem maximalIdeal_completedAtPrime :\n maximalIdeal (CompletedAtPrime p) =\n (p : PrimeSpectrum A).asIdeal.map (algebraMap A (CompletedAtPrime p)) :=", "/-- For a noetherian adic ring `A`, the completed localisation `\u00c2_\ud835\udd2d` has the Krull dimension of\n`A_\ud835\udd2d`. -/\ntheorem ringKrullDim_completedAtPrime [IsNoetherianRing A] :\n ringKrullDim (CompletedAtPrime p) =\n ringKrullDim (Localization.AtPrime (p : PrimeSpectrum A).asIdeal) :=", "/-- For a noetherian adic ring `A`, the completed localisation `\u00c2_\ud835\udd2d` is a regular local ring if\nand only if `A_\ud835\udd2d` is. -/\ntheorem isRegularLocalRing_completedAtPrime_iff [IsNoetherianRing A] :\n IsRegularLocalRing (CompletedAtPrime p) \u2194\n IsRegularLocalRing (Localization.AtPrime (p : PrimeSpectrum A).asIdeal) :=", "end TauCeti.FormalScheme.Spf"], "free_length": 5101, "file_length": 9487, "heartbeats": 27800, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Geometry.Symplectic.Lagrangian.CoisotropicModel.Equivariant", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Geometry/Symplectic/Lagrangian/CoisotropicModel/Equivariant.lean", "module": "TauCeti.Geometry.Symplectic.Lagrangian.CoisotropicModel.Equivariant", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Geometry.Symplectic.Invariants\npublic import TauCeti.Geometry.Symplectic.Lagrangian.CoisotropicModel\npublic import TauCeti.RepresentationTheory.InvariantForm\npublic import TauCeti.RepresentationTheory.Subrepresentation.Semisimple\n\n/-!\n# The equivariant linear coisotropic embedding model\n\nLet a group `G` act linearly on a finite-dimensional symplectic vector space `(V, \u03c9)` by a\nrepresentation `\u03c1` preserving `\u03c9`, and suppose `\u03c1` is semisimple: every invariant subspace has an\ninvariant complement. This holds for every continuous finite-dimensional representation of a\ncompact group (`Representation.isSemisimpleRepresentation_of_continuous`). Let `\u03c3` be a\nrepresentation of `G` on `W`, and `\u03b9 : W \u2192 V` an injective `G`-equivariant linear map with\ncoisotropic image, pulling `\u03c9` back to an alternating form `B` with kernel `K`. The coisotropic\nmodel `W \u00d7 K*` of `B` built from a projection `P : W \u2192 K`\n(`LinearMap.BilinForm.IsAlt.coisotropicModel`) carries the representation of `G` on `W` and the\ndual of its restriction to `K`. When `P` is `G`-equivariant, the extension of `\u03b9` to a\nsymplectomorphism from the model onto `V`\n(`LinearMap.BilinForm.IsAlt.exists_isSymplectomorphism_coisotropicModel`) can be chosen\n`G`-equivariant\n(`LinearMap.BilinForm.IsAlt.exists_equivariant_isSymplectomorphism_coisotropicModel`).\n\nConsequently two injective `G`-equivariant linear maps `\u03b9\u2081 : W \u2192 V\u2081` and `\u03b9\u2082 : W \u2192 V\u2082` into two\nsuch representations, with coisotropic images and pulling back the same form, differ by a\n`G`-equivariant linear symplectomorphism `V\u2081 \u2243 V\u2082`\n(`TauCeti.SymplecticForm.exists_equivariant_isSymplectomorphism_extend_of_isCoisotropic`). This is\nthe presymplectic Witt extension that compares the tangent representation of the isotropy group\n`H` at a point of a Hamiltonian `G`-manifold with that of the Marle\u2013Guillemin\u2013Sternberg local model\n`G \u00d7_H (\ud835\udd2a* \u00d7 V)`. Witt's extension theorem\n(`TauCeti.SymplecticForm.exists_isSymplectomorphism_extend`) has no equivariant analogue for\narbitrary subspaces, even for compact groups: for the zero subspace it would say that any two\nsymplectic representations of the same dimension are isomorphic, which fails already for the\ncircle acting on `\u2102` with weights `1` and `2`.\n\n## Construction\n\nLet `R = \u03b9(K)` be the symplectic orthogonal of the image of `\u03b9`, and `D = \u03b9(ker P)`, so that the\nimage of `\u03b9` is `D \u2295 R`. The subspace `E = D^\u03c9` is invariant and contains `R` as a subspace of half\nits dimension. Semisimplicity gives an invariant complement of `R` in `V`, whose intersection `Q`\nwith `E` is an invariant complement of `R` in `E`. Pairing with `\u03b9(K)` identifies `Q` with `K*`;\nwrite `q\u2081 : K* \u2192 Q` for the inverse. Correcting `q\u2081` by the map `c : K* \u2192 K` with\n`a' (c a) = -\u00bd \u03c9(q\u2081 a, q\u2081 a')` makes its image isotropic, and the extension is\n\n`(w, a) \u21a6 \u03b9 w + q\u2081 a + \u03b9 (c a)`.\n\nEvery choice is invariant or determined by an invariant condition, which makes the extension\nequivariant.\n\n## Main results\n\n* `LinearMap.BilinForm.IsAlt.exists_equivariant_isSymplectomorphism_coisotropicModel`:\n equivariant uniqueness of linear coisotropic embeddings.\n* `TauCeti.SymplecticForm.exists_equivariant_isSymplectomorphism_extend_of_isCoisotropic`: the\n equivariant Witt extension from coisotropic subspaces.\n* `LinearMap.BilinForm.IsAlt.isInvariantForm_coisotropicModel`: for an equivariant projection, the\n model form is invariant.\n\n## References\n\n* M. J. Gotay, *On coisotropic imbeddings of presymplectic manifolds*, Proceedings of the\n American Mathematical Society 84 (1982), 111\u2013114.\n* V. Guillemin and S. Sternberg, *A normal form for the moment map*, in *Differential Geometric\n Methods in Mathematical Physics* (Jerusalem, 1982), Math. Phys. Stud. 6, Reidel, 1984, 161\u2013175.\n* J.-P. Ortega, T. S. Ratiu, *Momentum Maps and Hamiltonian Reduction*, Progress in Mathematics\n 222, Birkh\u00e4user, 2004, Section 7.1 (the symplectic slice and the model space).\n-/\n\npublic section\n\nopen Module TauCeti TauCeti.Representation\n\nnamespace LinearMap.BilinForm.IsAlt\n\nvariable {W V G : Type*} [AddCommGroup W] [Module \u211d W] [AddCommGroup V] [Module \u211d V] [Group G]\n {B : LinearMap.BilinForm \u211d W} {\u03c3 : Representation \u211d G W} {\u03c1 : Representation \u211d G V}\n {\u03c9 : SymplecticForm V} {\u03b9 : W \u2192\u2097[\u211d] V} {P : W \u2192\u2097[\u211d] LinearMap.ker B}\n\nsection Construction\n\n/-! ### Invariant subspaces attached to an equivariant embedding -/\n\nvariable (h\u03c1 : IsInvariantForm \u03c1 \u03c9.toBilinForm) (h\u03b9\u03c3 : \u2200 g w, \u03b9 (\u03c3 g w) = \u03c1 g (\u03b9 w))\ninclude h\u03c1 h\u03b9\u03c3\n\n/-- The symplectic orthogonal of `\u03b9(ker P)`, for an equivariant `P`, is invariant. -/\nprivate theorem apply_mem_orthogonal_map_ker (hP\u03c3 : \u2200 g w, (P (\u03c3 g w) : W) = \u03c3 g (P w)) (g : G)\n {v : V} (hv : v \u2208 \u03c9.orthogonal ((LinearMap.ker P).map \u03b9)) :\n \u03c1 g v \u2208 \u03c9.orthogonal ((LinearMap.ker P).map \u03b9) := by\n refine SymplecticForm.apply_mem_orthogonal (fun g u v \u21a6 h\u03c1.apply g u v) ?_ g hv\n rintro g _ \u27e8w, hw, rfl\u27e9\n refine \u27e8\u03c3 g w, ?_, h\u03b9\u03c3 g w\u27e9\n simp only [SetLike.mem_coe, LinearMap.mem_ker] at hw \u22a2\n exact Subtype.ext ((hP\u03c3 g w).trans (by rw [hw, ZeroMemClass.coe_zero, map_zero]))\n\n/-- For semisimple `\u03c1`, the symplectic orthogonal of the image of `\u03b9` has an invariant\ncomplement. -/\nprivate theorem exists_isCompl_orthogonal_range [\u03c1.IsSemisimpleRepresentation] :\n \u2203 Y : Subrepresentation \u03c1, IsCompl (\u03c9.orthogonal (LinearMap.range \u03b9)) Y.toSubmodule := by\n obtain \u27e8Y, hY\u27e9 := exists_isCompl\n (\u27e8_, fun g _ hv \u21a6\n SymplecticForm.apply_mem_orthogonal_range (fun g u v \u21a6 h\u03c1.apply g u v) h\u03b9\u03c3 g hv\u27e9 :\n Subrepresentation \u03c1)\n exact \u27e8Y, Subrepresentation.isCompl_toSubmodule.2 hY\u27e9\n\nend Construction\n\n/-- A vector `\u03c9`-orthogonal to `\u03b9(ker P)` pairs with `\u03b9 w` as with `\u03b9 (P w)`. -/\nprivate theorem apply_eq_apply_projection (hP : \u2200 k : LinearMap.ker B, P k = k) {v : V}\n (hv : v \u2208 \u03c9.orthogonal ((LinearMap.ker P).map \u03b9)) (w : W) : \u03c9 (\u03b9 w) v = \u03c9 (\u03b9 (P w)) v := by\n have hw : w - P w \u2208 LinearMap.ker P := by\n rw [LinearMap.mem_ker, map_sub, sub_eq_zero]\n exact (hP (P w)).symm\n have h := (SymplecticForm.mem_orthogonal_iff.1 hv) _ \u27e8_, hw, rfl\u27e9\n simpa only [map_sub, LinearMap.sub_apply, sub_eq_zero] using h\n\nsection Model\n\nvariable [FiniteDimensional \u211d V] [\u03c1.IsSemisimpleRepresentation]\n (h\u03c1 : IsInvariantForm \u03c1 \u03c9.toBilinForm) (h\u03b9 : Function.Injective \u03b9)\n (h\u03c9 : \u2200 w w', \u03c9 (\u03b9 w) (\u03b9 w') = B w w') (hC : \u03c9.IsCoisotropic (LinearMap.range \u03b9))\n (h\u03b9\u03c3 : \u2200 g w, \u03b9 (\u03c3 g w) = \u03c1 g (\u03b9 w)) (hP : \u2200 k : LinearMap.ker B, P k = k)\n (hP\u03c3 : \u2200 g w, (P (\u03c3 g w) : W) = \u03c3 g (P w))\ninclude h\u03c1 h\u03b9 h\u03c9 hC h\u03b9\u03c3 hP hP\u03c3\n\n/-- An invariant complement `Q` of the radical `R = \u03b9(K)` in `E = \u03b9(ker P)^\u03c9`: it lies in `E`, is\ninvariant, pairs injectively with `\u03b9(K)`, and has the dimension of `K`. -/\nprivate theorem exists_complement :\n \u2203 Q : Submodule \u211d V, Q \u2264 \u03c9.orthogonal ((LinearMap.ker P).map \u03b9) \u2227\n (\u2200 g, \u2200 v \u2208 Q, \u03c1 g v \u2208 Q) \u2227 (\u2200 v \u2208 Q, (\u2200 k \u2208 LinearMap.ker B, \u03c9 (\u03b9 k) v = 0) \u2192 v = 0) \u2227\n finrank \u211d Q = finrank \u211d (LinearMap.ker B) := by\n have : FiniteDimensional \u211d W := .of_injective \u03b9 h\u03b9\n set R := \u03c9.orthogonal (LinearMap.range \u03b9)\n set E := \u03c9.orthogonal ((LinearMap.ker P).map \u03b9)\n have hRE : R \u2264 E := \u03c9.orthogonal_le (LinearMap.map_le_range)\n obtain \u27e8Q\u2080, hQ\u2080\u27e9 := exists_isCompl_orthogonal_range h\u03c1 h\u03b9\u03c3\n refine \u27e8Q\u2080.toSubmodule \u2293 E, inf_le_right, fun g v hv \u21a6\n \u27e8Q\u2080.apply_mem_toSubmodule g hv.1, apply_mem_orthogonal_map_ker h\u03c1 h\u03b9\u03c3 hP\u03c3 g hv.2\u27e9,\n fun v hv h \u21a6 ?_, ?_\u27e9\n \u00b7 -- A vector of `E` orthogonal to `\u03b9(K)` is orthogonal to the whole image, so lies in `R`.\n refine Submodule.disjoint_def.1 hQ\u2080.disjoint v ?_ hv.1\n rw [SymplecticForm.mem_orthogonal_iff]\n rintro _ \u27e8w, rfl\u27e9\n rw [apply_eq_apply_projection hP hv.2]\n exact h _ (P w).property\n \u00b7 -- `R \u2295 Q = E`, and `dim E = 2 dim K`, `dim R = dim K`.\n have h\u2081 : R \u2294 Q\u2080.toSubmodule \u2293 E = E := by\n rw [\u2190 sup_inf_assoc_of_le _ hRE, hQ\u2080.sup_eq_top, top_inf_eq]\n have h\u2082 : R \u2293 (Q\u2080.toSubmodule \u2293 E) = \u22a5 :=\n eq_bot_mono (inf_le_inf_left _ inf_le_left) hQ\u2080.inf_eq_bot\n have h\u2083 := Submodule.finrank_sup_add_finrank_inf_eq R (Q\u2080.toSubmodule \u2293 E)\n rw [h\u2081, h\u2082, finrank_bot] at h\u2083\n have h\u2084 : finrank \u211d ((LinearMap.ker P).map \u03b9) + finrank \u211d E = finrank \u211d V :=\n \u03c9.finrank_add_finrank_orthogonal _\n have h\u2085 := (Submodule.equivMapOfInjective \u03b9 h\u03b9 (LinearMap.ker P)).finrank_eq\n have hR : (LinearMap.ker B).map \u03b9 = R := SymplecticForm.map_ker_eq_orthogonal_range \u03c9 h\u03c9 hC\n have h\u2086 : finrank \u211d (LinearMap.ker B) = finrank \u211d R := by\n rw [\u2190 hR]\n exact (Submodule.equivMapOfInjective \u03b9 h\u03b9 (LinearMap.ker B)).finrank_eq\n have h\u2087 := LinearMap.finrank_range_add_finrank_ker P\n rw [LinearMap.range_eq_top (f := P) |>.2 fun k \u21a6 \u27e8k, hP k\u27e9, finrank_top] at h\u2087\n have h\u2088 := \u03c9.finrank_ker_add_finrank_of_isCoisotropic h\u03b9 h\u03c9 hC\n omega\n\n/-- An equivariant linear map `q : K* \u2192 V` with `\u03c9(\u03b9 w, q a) = a(P w)`. -/\nprivate theorem exists_dual_lift (h\u03c3 : IsInvariantForm \u03c3 B) :\n \u2203 q : Dual \u211d (LinearMap.ker B) \u2192\u2097[\u211d] V, (\u2200 w a, \u03c9 (\u03b9 w) (q a) = a (P w)) \u2227\n \u2200 g a, q (h\u03c3.kerRepresentation.dual g a) = \u03c1 g (q a) := by\n obtain \u27e8Q, hQE, hQ\u03c1, hQ, hQK\u27e9 := exists_complement h\u03c1 h\u03b9 h\u03c9 hC h\u03b9\u03c3 hP hP\u03c3\n have : FiniteDimensional \u211d W := .of_injective \u03b9 h\u03b9\n -- Pairing with `\u03b9(K)` identifies `Q` with `K*`.\n let \u03a6 : Q \u2192\u2097[\u211d] Dual \u211d (LinearMap.ker B) :=\n (\u03c9.toBilinForm.compl\u2081\u2082 (\u03b9 \u2218\u2097 (LinearMap.ker B).subtype) Q.subtype).flip\n have h\u03a6 (x : Q) (k : LinearMap.ker B) : \u03a6 x k = \u03c9 (\u03b9 k) x := (rfl)\n have hinj : Function.Injective \u03a6 := by\n rw [\u2190 LinearMap.ker_eq_bot, Submodule.eq_bot_iff]\n intro x hx\n refine Subtype.ext (hQ x x.property fun k hk \u21a6 ?_)\n simpa [h\u03a6] using LinearMap.congr_fun hx \u27e8k, hk\u27e9\n have hdim : finrank \u211d Q = finrank \u211d (Dual \u211d (LinearMap.ker B)) := by\n rw [hQK, Subspace.dual_finrank_eq]\n let e := \u03a6.linearEquivOfInjective hinj hdim\n have he (a : Dual \u211d (LinearMap.ker B)) (k : LinearMap.ker B) : \u03c9 (\u03b9 k) (e.symm a) = a k := by\n rw [\u2190 h\u03a6, \u2190 LinearMap.linearEquivOfInjective_apply hinj hdim, LinearEquiv.apply_symm_apply]\n refine \u27e8Q.subtype \u2218\u2097 e.symm.toLinearMap, fun w a \u21a6 ?_, fun g a \u21a6 ?_\u27e9\n \u00b7 exact (apply_eq_apply_projection hP (hQE (e.symm a).property) w).trans (he a (P w))\n \u00b7 -- Both sides lie in `Q` and pair with `\u03b9(K)` in the same way.\n simp only [LinearMap.comp_apply, LinearEquiv.coe_coe, Submodule.subtype_apply]\n have hx : \u03c1 g (e.symm a) \u2208 Q := hQ\u03c1 g _ (e.symm a).property\n suffices e.symm (h\u03c3.kerRepresentation.dual g a) = \u27e8_, hx\u27e9 from\n congrArg Subtype.val this\n rw [LinearEquiv.symm_apply_eq]\n ext k\n rw [LinearMap.linearEquivOfInjective_apply, h\u03a6]\n simp only [Representation.dual_apply, Dual.transpose_apply, LinearMap.comp_apply]\n rw [\u2190 he a, IsInvariantForm.coe_kerRepresentation_apply, h\u03b9\u03c3]\n beta_reduce\n rw [h\u03c1.apply_left, inv_inv]\n\n/-- An equivariant linear map `q : K* \u2192 V` with `\u03c9(\u03b9 w, q a) = a(P w)` and isotropic image. It\ncorrects the lift of `exists_dual_lift` by `\u03b9 \u2218 c`, where `a' (c a) = -\u00bd \u03c9(q\u2081 a, q\u2081 a')`. -/\nprivate theorem exists_isotropic_dual_lift (hB : B.IsAlt) (h\u03c3 : IsInvariantForm \u03c3 B) :\n \u2203 q : Dual \u211d (LinearMap.ker B) \u2192\u2097[\u211d] V, (\u2200 w a, \u03c9 (\u03b9 w) (q a) = a (P w)) \u2227\n (\u2200 a a', \u03c9 (q a) (q a') = 0) \u2227 \u2200 g a, q (h\u03c3.kerRepresentation.dual g a) = \u03c1 g (q a) := by\n obtain \u27e8q\u2081, hq\u2081, hq\u2081\u03c1\u27e9 := exists_dual_lift h\u03c1 h\u03b9 h\u03c9 hC h\u03b9\u03c3 hP hP\u03c3 h\u03c3\n -- Unfold the coercion of `\u03c9` to a function, so that this rewrites `\u03c9.toBilinForm`.\n beta_reduce at hq\u2081\n have : FiniteDimensional \u211d W := .of_injective \u03b9 h\u03b9\n let c : Dual \u211d (LinearMap.ker B) \u2192\u2097[\u211d] LinearMap.ker B :=\n (-(2 : \u211d)\u207b\u00b9) \u2022 ((evalEquiv \u211d (LinearMap.ker B)).symm.toLinearMap \u2218\u2097\n \u03c9.toBilinForm.compl\u2081\u2082 q\u2081 q\u2081)\n have hc (a a' : Dual \u211d (LinearMap.ker B)) :\n a' (c a) = -(2 : \u211d)\u207b\u00b9 * \u03c9.toBilinForm (q\u2081 a) (q\u2081 a') := by\n have h := LinearMap.congr_fun\n ((evalEquiv \u211d (LinearMap.ker B)).apply_symm_apply (\u03c9.toBilinForm.compl\u2081\u2082 q\u2081 q\u2081 a)) a'\n simp only [evalEquiv_apply, Dual.eval_apply] at h\n simp [c, h]\n -- `\u03b9 (c a)` pairs to zero with `\u03b9 w`, since `c a` lies in the kernel of `B`.\n have h\u03b9c (w : W) (a : Dual \u211d (LinearMap.ker B)) : \u03c9.toBilinForm (\u03b9 w) (\u03b9 (c a)) = 0 :=\n (h\u03c9 w (c a)).trans (hB.isRefl.apply_eq_zero_of_mem_ker w (c a).property)\n have hc\u03c1 (g : G) (a : Dual \u211d (LinearMap.ker B)) :\n c (h\u03c3.kerRepresentation.dual g a) = h\u03c3.kerRepresentation g (c a) := by\n refine (evalEquiv \u211d (LinearMap.ker B)).injective (LinearMap.ext fun a' \u21a6 ?_)\n simp only [evalEquiv_apply, Dual.eval_apply]\n rw [hc, hq\u2081\u03c1, h\u03c1.apply_left, \u2190 hq\u2081\u03c1, \u2190 hc]\n simp [Dual.transpose_apply]\n refine \u27e8q\u2081 + \u03b9 \u2218\u2097 (LinearMap.ker B).subtype \u2218\u2097 c, fun w a \u21a6 ?_, fun a a' \u21a6 ?_, fun g a \u21a6 ?_\u27e9\n \u00b7 simp only [LinearMap.add_apply, LinearMap.comp_apply, Submodule.subtype_apply, map_add,\n hq\u2081, h\u03b9c, add_zero]\n \u00b7 simp only [LinearMap.add_apply, LinearMap.comp_apply, Submodule.subtype_apply, map_add]\n have h\u2081 : \u03c9.toBilinForm (\u03b9 (c a)) (q\u2081 a') = a' (c a) := by rw [hq\u2081, hP]\n have h\u2082 : \u03c9.toBilinForm (q\u2081 a) (\u03b9 (c a')) = -a (c a') := by\n rw [\u2190 \u03c9.isAlt.neg_eq, hq\u2081, hP]\n have h\u2083 : \u03c9.toBilinForm (q\u2081 a') (q\u2081 a) = -\u03c9.toBilinForm (q\u2081 a) (q\u2081 a') :=\n (\u03c9.isAlt.neg_eq _ _).symm\n rw [h\u2081, h\u2082, h\u03b9c, hc, hc, h\u2083]\n ring\n \u00b7 simp only [LinearMap.add_apply, LinearMap.comp_apply, Submodule.subtype_apply, map_add, hq\u2081\u03c1,\n hc\u03c1, IsInvariantForm.coe_kerRepresentation_apply, h\u03b9\u03c3]\n\nend Model\n\n/-- **Equivariant uniqueness of the linear coisotropic embedding.** Let a group `G` act on a\nfinite-dimensional symplectic vector space `(V, \u03c9)` by a semisimple representation `\u03c1` preserving\n`\u03c9`, and on `W` by a representation `\u03c3`. Let `\u03b9 : W \u2192 V` be an injective `G`-equivariant linear\nmap with coisotropic image, pulling `\u03c9` back to `B`, and let the projection `P` of `W` onto the\nkernel `K` of `B` be `G`-equivariant. Then `\u03b9` extends to a `G`-equivariant linear\nsymplectomorphism from the coisotropic model `W \u00d7 K*` onto `V`, where `G` acts on `W \u00d7 K*` by `\u03c3`\non `W` and by the dual of its restriction to `K` on `K*`. An equivariant `P` exists when `\u03c3` is\nsemisimple (`Subrepresentation.exists_equivariant_projection`), for instance when `\u03c3` embeds in `\u03c1`\n(`Representation.IntertwiningMap.isSemisimpleRepresentation_of_injective`). -/\ntheorem exists_equivariant_isSymplectomorphism_coisotropicModel [FiniteDimensional \u211d V]\n [\u03c1.IsSemisimpleRepresentation] (hB : B.IsAlt) (hP : \u2200 k : LinearMap.ker B, P k = k)\n (h\u03c1 : IsInvariantForm \u03c1 \u03c9.toBilinForm) (h\u03c3 : IsInvariantForm \u03c3 B) (h\u03b9 : Function.Injective \u03b9)\n (h\u03c9 : \u2200 w w', \u03c9 (\u03b9 w) (\u03b9 w') = B w w') (hC : \u03c9.IsCoisotropic (LinearMap.range \u03b9))\n (h\u03b9\u03c3 : \u2200 g w, \u03b9 (\u03c3 g w) = \u03c1 g (\u03b9 w)) (hP\u03c3 : \u2200 g w, (P (\u03c3 g w) : W) = \u03c3 g (P w)) :\n \u2203 e : (W \u00d7 Dual \u211d (LinearMap.ker B)) \u2243\u2097[\u211d] V,\n SymplecticForm.IsSymplectomorphism (hB.coisotropicModel P hP) \u03c9 e \u2227\n (\u2200 w, e (w, 0) = \u03b9 w) \u2227 \u2200 g x, e (\u03c3.prod h\u03c3.kerRepresentation.dual g x) = \u03c1 g (e x) := by\n obtain \u27e8q, hq, hqq, hq\u03c1\u27e9 := exists_isotropic_dual_lift h\u03c1 h\u03b9 h\u03c9 hC h\u03b9\u03c3 hP hP\u03c3 hB h\u03c3\n have : FiniteDimensional \u211d W := .of_injective \u03b9 h\u03b9\n -- Unfold the coercion of `\u03c9` to a function, so that these rewrite `\u03c9.toBilinForm`.\n beta_reduce at h\u03c9 hq hqq\n have hF (x y : W \u00d7 Dual \u211d (LinearMap.ker B)) :\n \u03c9 (\u03b9.coprod q x) (\u03b9.coprod q y) = hB.coisotropicModel P hP x y := by\n obtain \u27e8w, a\u27e9 := x\n obtain \u27e8w', a'\u27e9 := y\n have h : \u03c9.toBilinForm (q a) (\u03b9 w') = -a (P w') := by rw [\u2190 \u03c9.isAlt.neg_eq, hq]\n simp only [LinearMap.coprod_apply, map_add, LinearMap.add_apply, coisotropicModel_apply]\n rw [h\u03c9, hq, h, hqq]\n ring\n have hinj : Function.Injective (\u03b9.coprod q) := by\n rw [\u2190 LinearMap.ker_eq_bot, Submodule.eq_bot_iff]\n intro x hx\n refine (hB.coisotropicModel P hP).separatingLeft x fun y \u21a6 ?_\n simpa [LinearMap.mem_ker.1 hx] using (hF x y).symm\n have hdim : finrank \u211d (W \u00d7 Dual \u211d (LinearMap.ker B)) = finrank \u211d V := by\n rw [finrank_prod, Subspace.dual_finrank_eq, add_comm,\n \u03c9.finrank_ker_add_finrank_of_isCoisotropic h\u03b9 h\u03c9 hC]\n refine \u27e8(\u03b9.coprod q).linearEquivOfInjective hinj hdim, ?_, fun w \u21a6 ?_, fun g x \u21a6 ?_\u27e9\n \u00b7 exact SymplecticForm.isSymplectomorphism_iff.2 hF\n \u00b7 simp\n \u00b7 obtain \u27e8w, a\u27e9 := x\n simp [h\u03b9\u03c3, hq\u03c1, -_root_.Representation.dual_apply]\n\n/-- For a projection `P` of `W` onto the kernel `K` of `B` which commutes with a representation `\u03c3`\npreserving `B`, the coisotropic model form on `W \u00d7 K*` is invariant under `\u03c3` on `W` and the dual\nof its restriction to `K` on `K*`. -/\ntheorem isInvariantForm_coisotropicModel (hB : B.IsAlt) (hP : \u2200 k : LinearMap.ker B, P k = k)\n (h\u03c3 : IsInvariantForm \u03c3 B) (hP\u03c3 : \u2200 g w, (P (\u03c3 g w) : W) = \u03c3 g (P w)) :\n IsInvariantForm (\u03c3.prod h\u03c3.kerRepresentation.dual) (hB.coisotropicModel P hP).toBilinForm := by\n have hP\u03c3' (g : G) (w : W) : P (\u03c3 g w) = h\u03c3.kerRepresentation g (P w) :=\n Subtype.ext ((hP\u03c3 g w).trans (h\u03c3.coe_kerRepresentation_apply g (P w)).symm)\n refine isInvariantForm_iff.2 fun g \u27e8w, a\u27e9 \u27e8w', a'\u27e9 \u21a6 ?_\n simp [hP\u03c3', h\u03c3.apply, Dual.transpose_apply]\n\nend LinearMap.BilinForm.IsAlt\n\nnamespace TauCeti.SymplecticForm\n\nvariable {W V\u2081 V\u2082 G : Type*} [AddCommGroup W] [Module \u211d W] [AddCommGroup V\u2081] [Module \u211d V\u2081]\n [AddCommGroup V\u2082] [Module \u211d V\u2082] [Group G]\n\n/-- **The equivariant Witt extension from coisotropic subspaces.** Let a group `G` act on\nfinite-dimensional symplectic vector spaces `(V\u2081, \u03c9\u2081)` and `(V\u2082, \u03c9\u2082)` by semisimple\nrepresentations preserving the forms, and on `W` by a representation `\u03c3`. Two injective\n`G`-equivariant linear maps `\u03b9\u2081 : W \u2192 V\u2081` and `\u03b9\u2082 : W \u2192 V\u2082` with coisotropic images, pulling back\nthe same form, `\u03c9\u2082(\u03b9\u2082 w, \u03b9\u2082 w') = \u03c9\u2081(\u03b9\u2081 w, \u03b9\u2081 w')`, differ by a `G`-equivariant linear\nsymplectomorphism `e : V\u2081 \u2243 V\u2082` with `e \u2218 \u03b9\u2081 = \u03b9\u2082`. -/\ntheorem exists_equivariant_isSymplectomorphism_extend_of_isCoisotropic [FiniteDimensional \u211d V\u2081]\n [FiniteDimensional \u211d V\u2082] {\u03c9\u2081 : SymplecticForm V\u2081} {\u03c9\u2082 : SymplecticForm V\u2082}\n {\u03c1\u2081 : Representation \u211d G V\u2081} {\u03c1\u2082 : Representation \u211d G V\u2082} [\u03c1\u2081.IsSemisimpleRepresentation]\n [\u03c1\u2082.IsSemisimpleRepresentation] (h\u03c1\u2081 : IsInvariantForm \u03c1\u2081 \u03c9\u2081.toBilinForm)\n (h\u03c1\u2082 : IsInvariantForm \u03c1\u2082 \u03c9\u2082.toBilinForm) {\u03c3 : Representation \u211d G W} {\u03b9\u2081 : W \u2192\u2097[\u211d] V\u2081}\n {\u03b9\u2082 : W \u2192\u2097[\u211d] V\u2082} (h\u03b9\u2081 : Function.Injective \u03b9\u2081) (h\u03b9\u2082 : Function.Injective \u03b9\u2082)\n (h\u03c9 : \u2200 w w', \u03c9\u2082 (\u03b9\u2082 w) (\u03b9\u2082 w') = \u03c9\u2081 (\u03b9\u2081 w) (\u03b9\u2081 w'))\n (hC\u2081 : \u03c9\u2081.IsCoisotropic (LinearMap.range \u03b9\u2081)) (hC\u2082 : \u03c9\u2082.IsCoisotropic (LinearMap.range \u03b9\u2082))\n (h\u03b9\u03c3\u2081 : \u2200 g w, \u03b9\u2081 (\u03c3 g w) = \u03c1\u2081 g (\u03b9\u2081 w)) (h\u03b9\u03c3\u2082 : \u2200 g w, \u03b9\u2082 (\u03c3 g w) = \u03c1\u2082 g (\u03b9\u2082 w)) :\n \u2203 e : V\u2081 \u2243\u2097[\u211d] V\u2082, IsSymplectomorphism \u03c9\u2081 \u03c9\u2082 e \u2227 (\u2200 w, e (\u03b9\u2081 w) = \u03b9\u2082 w) \u2227\n \u2200 g v, e (\u03c1\u2081 g v) = \u03c1\u2082 g (e v) := by\n let B : LinearMap.BilinForm \u211d W := \u03c9\u2081.toBilinForm.compl\u2081\u2082 \u03b9\u2081 \u03b9\u2081\n have hB : B.IsAlt := fun w \u21a6 \u03c9\u2081.self_eq_zero (\u03b9\u2081 w)\n have h\u03c9\u2081 (w w' : W) : \u03c9\u2081 (\u03b9\u2081 w) (\u03b9\u2081 w') = B w w' := (rfl)\n have h\u03c3 : IsInvariantForm \u03c3 B := isInvariantForm_iff.2 fun g w w' \u21a6 by\n simp only [B, LinearMap.compl\u2081\u2082_apply, h\u03b9\u03c3\u2081, h\u03c1\u2081.apply]\n -- `\u03c3` embeds in the semisimple `\u03c1\u2081`, so the kernel of `B` has an equivariant projection.\n have : \u03c3.IsSemisimpleRepresentation :=\n (\u03b9\u2081.intertwiningMap_of_isIntertwiningMap \u03c3 \u03c1\u2081 h\u03b9\u03c3\u2081).isSemisimpleRepresentation_of_injective h\u03b9\u2081\n obtain \u27e8P, hP, hP\u03c3\u27e9 := Subrepresentation.exists_equivariant_projection\n (\u27e8LinearMap.ker B, fun g _ hk \u21a6 h\u03c3.apply_mem_ker g hk\u27e9 : Subrepresentation \u03c3)\n obtain \u27e8e\u2081, he\u2081, he\u2081\u03b9, he\u2081\u03c1\u27e9 := hB.exists_equivariant_isSymplectomorphism_coisotropicModel hP\n h\u03c1\u2081 h\u03c3 h\u03b9\u2081 h\u03c9\u2081 hC\u2081 h\u03b9\u03c3\u2081 hP\u03c3\n obtain \u27e8e\u2082, he\u2082, he\u2082\u03b9, he\u2082\u03c1\u27e9 := hB.exists_equivariant_isSymplectomorphism_coisotropicModel hP\n h\u03c1\u2082 h\u03c3 h\u03b9\u2082 h\u03c9 hC\u2082 h\u03b9\u03c3\u2082 hP\u03c3\n refine \u27e8e\u2081.symm.trans e\u2082, he\u2081.symm.trans he\u2082, fun w \u21a6 ?_, fun g v \u21a6 ?_\u27e9\n \u00b7 rw [LinearEquiv.trans_apply, \u2190 he\u2081\u03b9, e\u2081.symm_apply_apply, he\u2082\u03b9]\n \u00b7 obtain \u27e8x, rfl\u27e9 := e\u2081.surjective v\n rw [\u2190 he\u2081\u03c1, LinearEquiv.trans_apply, e\u2081.symm_apply_apply, he\u2082\u03c1, LinearEquiv.trans_apply,\n e\u2081.symm_apply_apply]\n\nend TauCeti.SymplecticForm\n", "public_theorems": ["LinearMap.BilinForm.IsAlt.exists_equivariant_isSymplectomorphism_coisotropicModel", "LinearMap.BilinForm.IsAlt.isInvariantForm_coisotropicModel", "TauCeti.SymplecticForm.exists_equivariant_isSymplectomorphism_extend_of_isCoisotropic"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Geometry.Symplectic.Invariants\npublic import TauCeti.Geometry.Symplectic.Lagrangian.CoisotropicModel\npublic import TauCeti.RepresentationTheory.InvariantForm\npublic import TauCeti.RepresentationTheory.Subrepresentation.Semisimple\n\n/-!\n# The equivariant linear coisotropic embedding model\n\nLet a group `G` act linearly on a finite-dimensional symplectic vector space `(V, \u03c9)` by a\nrepresentation `\u03c1` preserving `\u03c9`, and suppose `\u03c1` is semisimple: every invariant subspace has an\ninvariant complement. This holds for every continuous finite-dimensional representation of a\ncompact group (`Representation.isSemisimpleRepresentation_of_continuous`). Let `\u03c3` be a\nrepresentation of `G` on `W`, and `\u03b9 : W \u2192 V` an injective `G`-equivariant linear map with\ncoisotropic image, pulling `\u03c9` back to an alternating form `B` with kernel `K`. The coisotropic\nmodel `W \u00d7 K*` of `B` built from a projection `P : W \u2192 K`\n(`LinearMap.BilinForm.IsAlt.coisotropicModel`) carries the representation of `G` on `W` and the\ndual of its restriction to `K`. When `P` is `G`-equivariant, the extension of `\u03b9` to a\nsymplectomorphism from the model onto `V`\n(`LinearMap.BilinForm.IsAlt.exists_isSymplectomorphism_coisotropicModel`) can be chosen\n`G`-equivariant\n(`LinearMap.BilinForm.IsAlt.exists_equivariant_isSymplectomorphism_coisotropicModel`).\n\nConsequently two injective `G`-equivariant linear maps `\u03b9\u2081 : W \u2192 V\u2081` and `\u03b9\u2082 : W \u2192 V\u2082` into two\nsuch representations, with coisotropic images and pulling back the same form, differ by a\n`G`-equivariant linear symplectomorphism `V\u2081 \u2243 V\u2082`\n(`TauCeti.SymplecticForm.exists_equivariant_isSymplectomorphism_extend_of_isCoisotropic`). This is\nthe presymplectic Witt extension that compares the tangent representation of the isotropy group\n`H` at a point of a Hamiltonian `G`-manifold with that of the Marle\u2013Guillemin\u2013Sternberg local model\n`G \u00d7_H (\ud835\udd2a* \u00d7 V)`. Witt's extension theorem\n(`TauCeti.SymplecticForm.exists_isSymplectomorphism_extend`) has no equivariant analogue for\narbitrary subspaces, even for compact groups: for the zero subspace it would say that any two\nsymplectic representations of the same dimension are isomorphic, which fails already for the\ncircle acting on `\u2102` with weights `1` and `2`.\n\n## Construction\n\nLet `R = \u03b9(K)` be the symplectic orthogonal of the image of `\u03b9`, and `D = \u03b9(ker P)`, so that the\nimage of `\u03b9` is `D \u2295 R`. The subspace `E = D^\u03c9` is invariant and contains `R` as a subspace of half\nits dimension. Semisimplicity gives an invariant complement of `R` in `V`, whose intersection `Q`\nwith `E` is an invariant complement of `R` in `E`. Pairing with `\u03b9(K)` identifies `Q` with `K*`;\nwrite `q\u2081 : K* \u2192 Q` for the inverse. Correcting `q\u2081` by the map `c : K* \u2192 K` with\n`a' (c a) = -\u00bd \u03c9(q\u2081 a, q\u2081 a')` makes its image isotropic, and the extension is\n\n`(w, a) \u21a6 \u03b9 w + q\u2081 a + \u03b9 (c a)`.\n\nEvery choice is invariant or determined by an invariant condition, which makes the extension\nequivariant.\n\n## Main results\n\n* `LinearMap.BilinForm.IsAlt.exists_equivariant_isSymplectomorphism_coisotropicModel`:\n equivariant uniqueness of linear coisotropic embeddings.\n* `TauCeti.SymplecticForm.exists_equivariant_isSymplectomorphism_extend_of_isCoisotropic`: the\n equivariant Witt extension from coisotropic subspaces.\n* `LinearMap.BilinForm.IsAlt.isInvariantForm_coisotropicModel`: for an equivariant projection, the\n model form is invariant.\n\n## References\n\n* M. J. Gotay, *On coisotropic imbeddings of presymplectic manifolds*, Proceedings of the\n American Mathematical Society 84 (1982), 111\u2013114.\n* V. Guillemin and S. Sternberg, *A normal form for the moment map*, in *Differential Geometric\n Methods in Mathematical Physics* (Jerusalem, 1982), Math. Phys. Stud. 6, Reidel, 1984, 161\u2013175.\n* J.-P. Ortega, T. S. Ratiu, *Momentum Maps and Hamiltonian Reduction*, Progress in Mathematics\n 222, Birkh\u00e4user, 2004, Section 7.1 (the symplectic slice and the model space).\n-/\n\npublic section\n\nopen Module TauCeti TauCeti.Representation\n\nnamespace LinearMap.BilinForm.IsAlt\n\nvariable {W V G : Type*} [AddCommGroup W] [Module \u211d W] [AddCommGroup V] [Module \u211d V] [Group G]\n {B : LinearMap.BilinForm \u211d W} {\u03c3 : Representation \u211d G W} {\u03c1 : Representation \u211d G V}\n {\u03c9 : SymplecticForm V} {\u03b9 : W \u2192\u2097[\u211d] V} {P : W \u2192\u2097[\u211d] LinearMap.ker B}\n\nsection Construction\n\n/-! ### Invariant subspaces attached to an equivariant embedding -/\n\nvariable (h\u03c1 : IsInvariantForm \u03c1 \u03c9.toBilinForm) (h\u03b9\u03c3 : \u2200 g w, \u03b9 (\u03c3 g w) = \u03c1 g (\u03b9 w))\ninclude h\u03c1 h\u03b9\u03c3", "end Construction", "section Model\n\nvariable [FiniteDimensional \u211d V] [\u03c1.IsSemisimpleRepresentation]\n (h\u03c1 : IsInvariantForm \u03c1 \u03c9.toBilinForm) (h\u03b9 : Function.Injective \u03b9)\n (h\u03c9 : \u2200 w w', \u03c9 (\u03b9 w) (\u03b9 w') = B w w') (hC : \u03c9.IsCoisotropic (LinearMap.range \u03b9))\n (h\u03b9\u03c3 : \u2200 g w, \u03b9 (\u03c3 g w) = \u03c1 g (\u03b9 w)) (hP : \u2200 k : LinearMap.ker B, P k = k)\n (hP\u03c3 : \u2200 g w, (P (\u03c3 g w) : W) = \u03c3 g (P w))\ninclude h\u03c1 h\u03b9 h\u03c9 hC h\u03b9\u03c3 hP hP\u03c3", "end Model", "/-- **Equivariant uniqueness of the linear coisotropic embedding.** Let a group `G` act on a\nfinite-dimensional symplectic vector space `(V, \u03c9)` by a semisimple representation `\u03c1` preserving\n`\u03c9`, and on `W` by a representation `\u03c3`. Let `\u03b9 : W \u2192 V` be an injective `G`-equivariant linear\nmap with coisotropic image, pulling `\u03c9` back to `B`, and let the projection `P` of `W` onto the\nkernel `K` of `B` be `G`-equivariant. Then `\u03b9` extends to a `G`-equivariant linear\nsymplectomorphism from the coisotropic model `W \u00d7 K*` onto `V`, where `G` acts on `W \u00d7 K*` by `\u03c3`\non `W` and by the dual of its restriction to `K` on `K*`. An equivariant `P` exists when `\u03c3` is\nsemisimple (`Subrepresentation.exists_equivariant_projection`), for instance when `\u03c3` embeds in `\u03c1`\n(`Representation.IntertwiningMap.isSemisimpleRepresentation_of_injective`). -/\ntheorem exists_equivariant_isSymplectomorphism_coisotropicModel [FiniteDimensional \u211d V]\n [\u03c1.IsSemisimpleRepresentation] (hB : B.IsAlt) (hP : \u2200 k : LinearMap.ker B, P k = k)\n (h\u03c1 : IsInvariantForm \u03c1 \u03c9.toBilinForm) (h\u03c3 : IsInvariantForm \u03c3 B) (h\u03b9 : Function.Injective \u03b9)\n (h\u03c9 : \u2200 w w', \u03c9 (\u03b9 w) (\u03b9 w') = B w w') (hC : \u03c9.IsCoisotropic (LinearMap.range \u03b9))\n (h\u03b9\u03c3 : \u2200 g w, \u03b9 (\u03c3 g w) = \u03c1 g (\u03b9 w)) (hP\u03c3 : \u2200 g w, (P (\u03c3 g w) : W) = \u03c3 g (P w)) :\n \u2203 e : (W \u00d7 Dual \u211d (LinearMap.ker B)) \u2243\u2097[\u211d] V,\n SymplecticForm.IsSymplectomorphism (hB.coisotropicModel P hP) \u03c9 e \u2227\n (\u2200 w, e (w, 0) = \u03b9 w) \u2227 \u2200 g x, e (\u03c3.prod h\u03c3.kerRepresentation.dual g x) = \u03c1 g (e x) :=", "/-- For a projection `P` of `W` onto the kernel `K` of `B` which commutes with a representation `\u03c3`\npreserving `B`, the coisotropic model form on `W \u00d7 K*` is invariant under `\u03c3` on `W` and the dual\nof its restriction to `K` on `K*`. -/\ntheorem isInvariantForm_coisotropicModel (hB : B.IsAlt) (hP : \u2200 k : LinearMap.ker B, P k = k)\n (h\u03c3 : IsInvariantForm \u03c3 B) (hP\u03c3 : \u2200 g w, (P (\u03c3 g w) : W) = \u03c3 g (P w)) :\n IsInvariantForm (\u03c3.prod h\u03c3.kerRepresentation.dual) (hB.coisotropicModel P hP).toBilinForm :=", "end LinearMap.BilinForm.IsAlt\n\nnamespace TauCeti.SymplecticForm\n\nvariable {W V\u2081 V\u2082 G : Type*} [AddCommGroup W] [Module \u211d W] [AddCommGroup V\u2081] [Module \u211d V\u2081]\n [AddCommGroup V\u2082] [Module \u211d V\u2082] [Group G]", "/-- **The equivariant Witt extension from coisotropic subspaces.** Let a group `G` act on\nfinite-dimensional symplectic vector spaces `(V\u2081, \u03c9\u2081)` and `(V\u2082, \u03c9\u2082)` by semisimple\nrepresentations preserving the forms, and on `W` by a representation `\u03c3`. Two injective\n`G`-equivariant linear maps `\u03b9\u2081 : W \u2192 V\u2081` and `\u03b9\u2082 : W \u2192 V\u2082` with coisotropic images, pulling back\nthe same form, `\u03c9\u2082(\u03b9\u2082 w, \u03b9\u2082 w') = \u03c9\u2081(\u03b9\u2081 w, \u03b9\u2081 w')`, differ by a `G`-equivariant linear\nsymplectomorphism `e : V\u2081 \u2243 V\u2082` with `e \u2218 \u03b9\u2081 = \u03b9\u2082`. -/\ntheorem exists_equivariant_isSymplectomorphism_extend_of_isCoisotropic [FiniteDimensional \u211d V\u2081]\n [FiniteDimensional \u211d V\u2082] {\u03c9\u2081 : SymplecticForm V\u2081} {\u03c9\u2082 : SymplecticForm V\u2082}\n {\u03c1\u2081 : Representation \u211d G V\u2081} {\u03c1\u2082 : Representation \u211d G V\u2082} [\u03c1\u2081.IsSemisimpleRepresentation]\n [\u03c1\u2082.IsSemisimpleRepresentation] (h\u03c1\u2081 : IsInvariantForm \u03c1\u2081 \u03c9\u2081.toBilinForm)\n (h\u03c1\u2082 : IsInvariantForm \u03c1\u2082 \u03c9\u2082.toBilinForm) {\u03c3 : Representation \u211d G W} {\u03b9\u2081 : W \u2192\u2097[\u211d] V\u2081}\n {\u03b9\u2082 : W \u2192\u2097[\u211d] V\u2082} (h\u03b9\u2081 : Function.Injective \u03b9\u2081) (h\u03b9\u2082 : Function.Injective \u03b9\u2082)\n (h\u03c9 : \u2200 w w', \u03c9\u2082 (\u03b9\u2082 w) (\u03b9\u2082 w') = \u03c9\u2081 (\u03b9\u2081 w) (\u03b9\u2081 w'))\n (hC\u2081 : \u03c9\u2081.IsCoisotropic (LinearMap.range \u03b9\u2081)) (hC\u2082 : \u03c9\u2082.IsCoisotropic (LinearMap.range \u03b9\u2082))\n (h\u03b9\u03c3\u2081 : \u2200 g w, \u03b9\u2081 (\u03c3 g w) = \u03c1\u2081 g (\u03b9\u2081 w)) (h\u03b9\u03c3\u2082 : \u2200 g w, \u03b9\u2082 (\u03c3 g w) = \u03c1\u2082 g (\u03b9\u2082 w)) :\n \u2203 e : V\u2081 \u2243\u2097[\u211d] V\u2082, IsSymplectomorphism \u03c9\u2081 \u03c9\u2082 e \u2227 (\u2200 w, e (\u03b9\u2081 w) = \u03b9\u2082 w) \u2227\n \u2200 g v, e (\u03c1\u2081 g v) = \u03c1\u2082 g (e v) :=", "end TauCeti.SymplecticForm"], "free_length": 9274, "file_length": 12354, "heartbeats": 30631, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.AlgebraicGeometry.EllipticCurve.GaloisCohomology.Unramified", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/AlgebraicGeometry/EllipticCurve/GaloisCohomology/Unramified.lean", "module": "TauCeti.AlgebraicGeometry.EllipticCurve.GaloisCohomology.Unramified", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.AlgebraicGeometry.EllipticCurve.GaloisCohomology.Selmer.Basic\npublic import TauCeti.AlgebraicGeometry.EllipticCurve.TateModule.Inertia\npublic import TauCeti.NumberTheory.LocalField.Unramified.Cohomology\npublic import TauCeti.RingTheory.DedekindDomain.AdicValuation.ValuativeRel\nimport TauCeti.AlgebraicGeometry.EllipticCurve.Affine.Point.Index.LocalField\nimport TauCeti.Data.Nat.Cast.IsUnit\n\n/-!\n# Unramified Kummer classes at integral elliptic models\n\nFor a Weierstrass curve over a nonarchimedean local field `K`, the unramified subgroup of\n`H\u00b9(K, E[m])` is the kernel of restriction to inertia (`TauCeti.unramifiedH1`). The\ncoefficient module uses the separable closure, so inertia is transported from the algebraic closure\nthrough `TauCeti.absoluteGaloisGroupRestrictEquiv`. When `W` is elliptic and `m \u2260 0`, this\nunramified subgroup is finite of order `#E(K)[m]`.\n\nWhen the chosen equation `W` is integral over `\ud835\udcaa[K]` with an elliptic integral model (unit\ndiscriminant), if `m` is prime to the residue characteristic, every Kummer class is unramified.\nIndeed inertia fixes every `m`-division point of a rational point, so the cocycle `\u03c3 \u21a6 \u03c3 Q - Q`\nvanishes on inertia. Over any nonarchimedean local field `K` where `(m : \ud835\udcc0[K]) \u2260 0` and the\nchosen equation `W` is integral over `\ud835\udcaa[K]` with unit discriminant, comparing orders with\n`[E(K) : m E(K)] = #E(K)[m]` upgrades this inclusion to equality: the kernel of\n`H\u00b9(G_K, E[m]) \u2192 H\u00b9(G_K, E)` equals `W.unramifiedTorsionCohomology m`, and hence\n`(W.kummerMap m hm).range = W.unramifiedTorsionCohomology m`.\n\nConsequently a Selmer class restricts to an unramified class at each nonarchimedean local\nfield in its defining family where the base-changed equation is integral with unit discriminant and\n`m` is a residue unit.\nUnramifiedness is also stable under restriction to any extension of nonarchimedean local fields,\nsince the inertia subgroup of the larger field maps into that of the smaller one. This carries the\nlocal conditions at the places of a number field to the places of a finite extension, such as the\n`m`-division field, as the proof of the finiteness of Selmer groups requires (Silverman X.4.2).\n\n## References\n\n* [J. Silverman, *The Arithmetic of Elliptic Curves*][silverman2009], VII.4.1, VIII.1.5 and X.4.\n* J. S. Milne, *Arithmetic Duality Theorems*, 2nd ed., I, Proposition 3.8.\n-/\n\npublic section\n\nnoncomputable section\n\nnamespace WeierstrassCurve\n\nopen TauCeti TauCeti.ContCohomology ValuativeRel\n\nvariable {K : Type*} [Field K] [ValuativeRel K] [TopologicalSpace K]\n [IsNonarchimedeanLocalField K] (W : WeierstrassCurve K) (m : \u2115)\n\n/-- The unramified classes in `H\u00b9(K, E[m])`: the kernel of restriction to inertia, transported\nto the automorphisms of the separable closure used by `W.TorsionCoeff m`. -/\ndef unramifiedTorsionCohomology : AddSubgroup (H1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m)) :=\n unramifiedH1 K (W.TorsionCoeff m)\n\n/-- `unramifiedTorsionCohomology` is `TauCeti.unramifiedH1` on `W.TorsionCoeff m`. -/\ntheorem unramifiedTorsionCohomology_eq_unramifiedH1 :\n W.unramifiedTorsionCohomology m = unramifiedH1 K (W.TorsionCoeff m) :=\n (rfl)\n\n/-- A class is unramified exactly when its restriction to inertia is zero. -/\n@[simp]\ntheorem mem_unramifiedTorsionCohomology_iff\n {c : H1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m)} :\n c \u2208 W.unramifiedTorsionCohomology m \u2194\n explicitRes1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m)\n (separableClosureInertiaSubgroup K) c = 0 := by\n rw [unramifiedTorsionCohomology_eq_unramifiedH1, mem_unramifiedH1_iff]\n\n/-- For an elliptic curve and `m \u2260 0`, `unramifiedTorsionCohomology` is finite. -/\ninstance finite_unramifiedTorsionCohomology [W.IsElliptic] [NeZero m] :\n Finite (W.unramifiedTorsionCohomology m) := by\n rw [unramifiedTorsionCohomology_eq_unramifiedH1]\n infer_instance\n\n/-- **Order of unramified `m`-torsion cohomology**: `#H\u00b9_ur(G_K, E[m]) = #E(K)[m]` for `m \u2260 0`. -/\ntheorem natCard_unramifiedTorsionCohomology [DecidableEq K] [W.IsElliptic] [NeZero m] :\n Nat.card (W.unramifiedTorsionCohomology m) =\n Nat.card (AddSubgroup.torsionBy W.toAffine.Point m) := by\n rw [unramifiedTorsionCohomology_eq_unramifiedH1,\n natCard_unramifiedH1_eq_natCard_H0]\n exact Nat.card_congr (W.baseTorsionEquivInvariants m).symm.toEquiv\n\n/-- **Unramified classes restrict to unramified classes.** For an extension `L/K` of\nnonarchimedean local fields and a `K`-embedding `\u03c4 : K\u02e2 \u2192 L\u02e2` of separable closures, restriction\n`H\u00b9(K, E[m]) \u2192 H\u00b9(L, E[m])` along `\u03c4` sends unramified classes to unramified classes, because the\ninertia subgroup of `L` maps into that of `K`. No reduction hypothesis on `W` is needed. -/\ntheorem torsionRes_mem_unramifiedTorsionCohomology {L : Type*} [Field L] [ValuativeRel L]\n [TopologicalSpace L] [IsNonarchimedeanLocalField L] [Algebra K L] [ValuativeExtension K L]\n (\u03c4 : SeparableClosure K \u2192\u2090[K] SeparableClosure L)\n {c : H1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m)}\n (hc : c \u2208 W.unramifiedTorsionCohomology m) :\n W.torsionRes \u03c4 m c \u2208 (W\u2044L).unramifiedTorsionCohomology m := by\n rw [unramifiedTorsionCohomology_eq_unramifiedH1] at hc \u22a2\n rw [torsionRes_eq_explicitMap1]\n exact \u03c4.explicitMap1_mem_unramifiedH1 (W.torsionCoeffBaseChange \u03c4 m)\n continuous_of_discreteTopology (W.torsionCoeffBaseChange_smul \u03c4 m) hc\n\nvariable [IsIntegral \ud835\udcaa[K] W] [(integralModel \ud835\udcaa[K] W).IsElliptic]\n\nlocal instance : W.IsElliptic := by\n rw [\u2190 baseChange_integralModel_eq \ud835\udcaa[K] W]\n infer_instance\n\nvariable {W m} in\n/-- When `W` is integral over `\ud835\udcaa[K]` with unit discriminant (an elliptic integral model), inertia\nfixes an `m`-division point of a `K`-rational point when `m` is prime to the residue\ncharacteristic. The action here is on the discrete coefficient module over the separable\nclosure. -/\ntheorem smul_pointCoeff_eq_self_of_mem_inertiaSubgroup [DecidableEq K]\n (hm : (m : \ud835\udcc0[K]) \u2260 0) {P : W.toAffine.Point} {Q : W.PointCoeff}\n (hQ : m \u2022 Q = W.basePointCoeff P) {\u03c3 : Gal(AlgebraicClosure K/K)}\n (h\u03c3 : \u03c3 \u2208 inertiaSubgroup K) : absoluteGaloisGroupRestrictEquiv K \u03c3 \u2022 Q = Q := by\n let := Classical.decEq (AlgebraicClosure K)\n let i : SeparableClosure K \u2192\u2090[K] AlgebraicClosure K :=\n (separableClosure K (AlgebraicClosure K)).val\n have hfix : Affine.Point.map \u03c3.toAlgHom\n (m \u2022 Affine.Point.map i (W.pointCoeffEquiv.symm Q)) =\n m \u2022 Affine.Point.map i (W.pointCoeffEquiv.symm Q) := by\n rw [\u2190 map_nsmul, \u2190 map_nsmul, hQ]\n rw [Affine.Point.map_map_separableClosure_val, \u2190 pointCoeffEquiv_symm_smul,\n smul_basePointCoeff]\n have h := Affine.Point.map_eq_self_of_mem_inertiaSubgroup_algebraicClosure hm h\u03c3 hfix\n apply W.pointCoeffEquiv.symm.injective\n rw [pointCoeffEquiv_symm_smul]\n apply Affine.Point.map_injective i\n rw [\u2190 Affine.Point.map_map_separableClosure_val]\n exact h\n\nvariable {W m} in\n/-- When `W` is integral over `\ud835\udcaa[K]` with unit discriminant (an elliptic integral model), the\nKummer cocycle of a division point of a rational point vanishes on inertia when its multiplier is\nprime to the residue characteristic. -/\ntheorem kummerCocycle_eq_zero_of_mem_inertiaSubgroup [DecidableEq K]\n (hm : (m : \ud835\udcc0[K]) \u2260 0) {P : W.toAffine.Point} {Q : W.PointCoeff}\n (hQ : m \u2022 Q = W.basePointCoeff P) {\u03c3 : Gal(AlgebraicClosure K/K)}\n (h\u03c3 : \u03c3 \u2208 inertiaSubgroup K) :\n kummerCocycle hQ (absoluteGaloisGroupRestrictEquiv K \u03c3) = 0 := by\n apply Subtype.ext\n rw [coe_kummerCocycle, smul_pointCoeff_eq_self_of_mem_inertiaSubgroup hm hQ h\u03c3, sub_self]\n rfl\n\n/-- When `W` is integral over `\ud835\udcaa[K]` with unit discriminant (an elliptic integral model), the\nKummer class of a rational point is unramified when the multiplier is prime to the residue\ncharacteristic. -/\ntheorem kummerMap_mem_unramifiedTorsionCohomology [DecidableEq K]\n (hmres : (m : \ud835\udcc0[K]) \u2260 0) (P : W.toAffine.Point) :\n W.kummerMap m (natCast_ne_zero_of_residueField_natCast_ne_zero hmres).isUnit P \u2208\n W.unramifiedTorsionCohomology m := by\n generalize_proofs\n rename_i hm\n obtain \u27e8Q, hQ\u27e9 := (W.kummerShortExact m hm).proj_surjective (W.basePointCoeff P)\n rw [kummerShortExact_proj, nsmulAddMonoidHom_apply] at hQ\n rw [unramifiedTorsionCohomology_eq_unramifiedH1, kummerMap_eq_H1pi hm hQ,\n QuotientAddGroup.mk'_apply]\n exact mk_mem_unramifiedH1_of_forall_mem_inertiaSubgroup\n (f := \u27e8kummerCocycle hQ, kummerCocycle_mem_Z1 hQ\u27e9)\n fun _ h\u03c3 \u21a6 kummerCocycle_eq_zero_of_mem_inertiaSubgroup hmres hQ h\u03c3\n\n/-- When `W` is integral over `\ud835\udcaa[K]` with unit discriminant (an elliptic integral model) and `m` is\nprime to the residue characteristic, the local Kummer condition is contained in the unramified\nlocal condition. -/\nprivate theorem range_kummerMap_le_unramifiedTorsionCohomology [DecidableEq K]\n (hmres : (m : \ud835\udcc0[K]) \u2260 0) :\n (W.kummerMap m (natCast_ne_zero_of_residueField_natCast_ne_zero hmres).isUnit).range \u2264\n W.unramifiedTorsionCohomology m := by\n rintro c \u27e8P, rfl\u27e9\n exact W.kummerMap_mem_unramifiedTorsionCohomology m hmres P\n\n/-- When `W` is integral over `\ud835\udcaa[K]` with unit discriminant (an elliptic integral model) and `m` is\nprime to the residue characteristic, the kernel of `H\u00b9(G_K, E[m]) \u2192 H\u00b9(G_K, E)` is contained in\n`W.unramifiedTorsionCohomology m`. Unlike `range_kummerMap_le_unramifiedTorsionCohomology`, this\nform needs no `DecidableEq K`. -/\nprivate theorem ker_explicitCoeff1_torsionCoeffIncl_le_unramifiedTorsionCohomology\n (hmres : (m : \ud835\udcc0[K]) \u2260 0) :\n (explicitCoeff1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m) (W.torsionCoeffIncl m)\n continuous_of_discreteTopology).ker \u2264 W.unramifiedTorsionCohomology m := by\n classical\n rw [\u2190 W.range_kummerMap m (natCast_ne_zero_of_residueField_natCast_ne_zero hmres).isUnit]\n exact W.range_kummerMap_le_unramifiedTorsionCohomology m hmres\n\n/-- **When `W` is integral over `\ud835\udcaa[K]` with unit discriminant and `m` is nonzero in the residue\nfield, the local Selmer condition equals unramified cohomology** (Milne, *ADT* I, Proposition 3.8):\nover a nonarchimedean local field `K`, if `W` is integral over `\ud835\udcaa[K]` with unit discriminant (an\nelliptic integral model) and `(m : \ud835\udcc0[K]) \u2260 0`, then\n`ker(H\u00b9(G_K, E[m]) \u2192 H\u00b9(G_K, E)) = W.unramifiedTorsionCohomology m`. Needs no `DecidableEq K`. -/\ntheorem ker_explicitCoeff1_torsionCoeffIncl_eq_unramifiedTorsionCohomology\n (hmres : (m : \ud835\udcc0[K]) \u2260 0) :\n (explicitCoeff1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m) (W.torsionCoeffIncl m)\n continuous_of_discreteTopology).ker = W.unramifiedTorsionCohomology m := by\n classical\n have hmU : IsUnit (m : K) := (natCast_ne_zero_of_residueField_natCast_ne_zero hmres).isUnit\n have : NeZero m := hmU.neZero_natCast\n -- Compare orders: `#(im \u03b4_m) = [E(K) : m E(K)] = #E(K)[m] = #H\u00b9_ur(K, E[m])`.\n have hcard : Nat.card (W.unramifiedTorsionCohomology m) \u2264\n Nat.card ((explicitCoeff1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m)\n (W.torsionCoeffIncl m) continuous_of_discreteTopology).ker) := by\n rw [W.natCard_unramifiedTorsionCohomology m, \u2190 W.range_kummerMap m hmU,\n \u2190 AddSubgroup.index_ker, W.ker_kummerMap m hmU,\n W.index_range_nsmul_eq_natCard_torsionBy_of_localField hmres]\n exact le_rfl\n exact AddSubgroup.eq_of_le_of_card_ge\n (W.ker_explicitCoeff1_torsionCoeffIncl_le_unramifiedTorsionCohomology m hmres) hcard\n\n/-- **When `W` is integral over `\ud835\udcaa[K]` with unit discriminant and `m` is nonzero in the residue\nfield, the local Kummer image equals unramified cohomology** over any nonarchimedean local field\n`K`: if `W` is integral over `\ud835\udcaa[K]` with unit discriminant (an elliptic integral model) and\n`(m : \ud835\udcc0[K]) \u2260 0`, then `(W.kummerMap m _).range = W.unramifiedTorsionCohomology m`. -/\ntheorem range_kummerMap_eq_unramifiedTorsionCohomology [DecidableEq K]\n (hmres : (m : \ud835\udcc0[K]) \u2260 0) :\n (W.kummerMap m (natCast_ne_zero_of_residueField_natCast_ne_zero hmres).isUnit).range =\n W.unramifiedTorsionCohomology m := by\n rw [W.range_kummerMap m (natCast_ne_zero_of_residueField_natCast_ne_zero hmres).isUnit]\n exact W.ker_explicitCoeff1_torsionCoeffIncl_eq_unramifiedTorsionCohomology m hmres\n\nend WeierstrassCurve\n\nnamespace WeierstrassCurve\n\nopen TauCeti TauCeti.ContCohomology ValuativeRel\n\nvariable {K : Type*} [Field K] (W : WeierstrassCurve K)\n {\u03b9 : Type*} {L : \u03b9 \u2192 Type*} [\u2200 i, Field (L i)] [\u2200 i, Algebra K (L i)]\n (\u03c4 : \u2200 i, SeparableClosure K \u2192\u2090[K] SeparableClosure (L i)) (i : \u03b9)\n [ValuativeRel (L i)] [TopologicalSpace (L i)] [IsNonarchimedeanLocalField (L i)]\n [IsIntegral \ud835\udcaa[L i] (W\u2044(L i))] [(integralModel \ud835\udcaa[L i] (W\u2044(L i))).IsElliptic]\n\n/-- **Local Selmer condition equals unramified cohomology**: at any nonarchimedean local field\n`L i` in the defining family where the base-changed equation `W\u2044(L i)` is integral over `\ud835\udcaa[L i]`\nwith unit discriminant (an elliptic integral model) and `(m : \ud835\udcc0[L i]) \u2260 0`, the local condition of\n`W.selmerStructure \u03c4 m` at `i` equals `(W\u2044(L i)).unramifiedTorsionCohomology m`. No valuation or\nintegral-model assumption is made at indices `j \u2260 i`. -/\ntheorem localCondition_selmerStructure_eq_unramifiedTorsionCohomology {m : \u2115}\n (hmres : (m : \ud835\udcc0[L i]) \u2260 0) :\n (W.selmerStructure \u03c4 m).localCondition i = (W\u2044(L i)).unramifiedTorsionCohomology m := by\n rw [selmerStructure_localCondition]\n exact (W\u2044(L i)).ker_explicitCoeff1_torsionCoeffIncl_eq_unramifiedTorsionCohomology m hmres\n\n/-- A Selmer class is unramified at each nonarchimedean local field in its defining family\nwhere the base-changed equation is integral with unit discriminant and the multiplier is prime to\nthe residue characteristic. No good-reduction assumption is made at the other fields in the\nfamily. -/\ntheorem torsionRes_mem_unramifiedTorsionCohomology_of_mem_selmerGroup {m : \u2115}\n (hmres : (m : \ud835\udcc0[L i]) \u2260 0)\n {c : H1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m)} (hc : c \u2208 W.selmerGroup \u03c4 m) :\n W.torsionRes (\u03c4 i) m c \u2208 (W\u2044(L i)).unramifiedTorsionCohomology m := by\n refine ((W\u2044(L i)).ker_explicitCoeff1_torsionCoeffIncl_eq_unramifiedTorsionCohomology\n m hmres).le ?_\n rw [AddMonoidHom.mem_ker, \u2190 pointRes_torsionCoeffIncl]\n exact (W.mem_shafarevichTateGroup_iff \u03c4).mp ((W.mem_selmerGroup_iff \u03c4 m).mp hc) i\n\n/-! ### Classes unramified outside `S` -/\n\nsection Dedekind\n\nopen IsDedekindDomain\n\nvariable {R : Type*} [CommRing R] [IsDedekindDomain R]\n {K : Type*} [Field K] [Algebra R K] [IsFractionRing R K] (W : WeierstrassCurve K)\n (\u03c4 : \u2200 v : HeightOneSpectrum R,\n SeparableClosure K \u2192\u2090[K] SeparableClosure (v.adicCompletion K))\n (S : Set (HeightOneSpectrum R)) (m : \u2115)\n\n/-- **The classes of `H\u00b9(G_K, E[m])` unramified outside `S`**: those whose restriction to the\ncompletion `K_v` along `\u03c4 v`, for every prime `v \u2209 S`, is unramified, that is, vanishes on the\ninertia subgroup of `K_v`. Here every height-one prime `v \u2209 S` is required by `hfinite` to have\nfinite residue field `R \u29f8 v.asIdeal` (so `K_v` is a nonarchimedean local field); no finiteness is\nrequired at primes in `S`. -/\ndef unramifiedOutsideTorsionCohomology (hfinite : \u2200 v \u2209 S, Finite (R \u29f8 v.asIdeal)) :\n AddSubgroup (H1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m)) :=\n \u2a05 (v : HeightOneSpectrum R) (hv : v \u2209 S),\n letI : Finite (R \u29f8 v.asIdeal) := hfinite v hv\n ((W\u2044(v.adicCompletion K)).unramifiedTorsionCohomology m).comap (W.torsionRes (\u03c4 v) m)\n\n/-- `unramifiedOutsideTorsionCohomology` is the infimum over `v \u2209 S` of the pullbacks along\n`W.torsionRes` of the local unramified torsion cohomology subgroups. -/\ntheorem unramifiedOutsideTorsionCohomology_def (hfinite : \u2200 v \u2209 S, Finite (R \u29f8 v.asIdeal)) :\n W.unramifiedOutsideTorsionCohomology \u03c4 S m hfinite =\n \u2a05 (v : HeightOneSpectrum R) (hv : v \u2209 S),\n letI : Finite (R \u29f8 v.asIdeal) := hfinite v hv\n ((W\u2044(v.adicCompletion K)).unramifiedTorsionCohomology m).comap (W.torsionRes (\u03c4 v) m) :=\n (rfl)\n\nvariable {W \u03c4 S m}\n\n/-- A class is unramified outside `S` exactly when its restriction to every `K_v` with `v \u2209 S`\nis unramified. -/\n@[simp]\ntheorem mem_unramifiedOutsideTorsionCohomology_iff\n {hfinite : \u2200 v \u2209 S, Finite (R \u29f8 v.asIdeal)}\n {c : H1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m)} :\n c \u2208 W.unramifiedOutsideTorsionCohomology \u03c4 S m hfinite \u2194\n \u2200 (v : HeightOneSpectrum R) (hv : v \u2209 S),\n letI : Finite (R \u29f8 v.asIdeal) := hfinite v hv\n W.torsionRes (\u03c4 v) m c \u2208 (W\u2044(v.adicCompletion K)).unramifiedTorsionCohomology m := by\n simp only [unramifiedOutsideTorsionCohomology, AddSubgroup.mem_iInf, AddSubgroup.mem_comap]\n\n/-- Enlarging the exceptional set `S` enlarges `unramifiedOutsideTorsionCohomology`. -/\ntheorem unramifiedOutsideTorsionCohomology_mono {T : Set (HeightOneSpectrum R)} (hST : S \u2286 T)\n (hfinite : \u2200 v \u2209 S, Finite (R \u29f8 v.asIdeal)) :\n W.unramifiedOutsideTorsionCohomology \u03c4 S m hfinite \u2264\n W.unramifiedOutsideTorsionCohomology \u03c4 T m (fun v hv \u21a6 hfinite v fun hvS \u21a6 hv (hST hvS)) :=\n fun _ hc \u21a6 mem_unramifiedOutsideTorsionCohomology_iff.2 fun v hv \u21a6\n mem_unramifiedOutsideTorsionCohomology_iff.1 hc v (fun hvS \u21a6 hv (hST hvS))\n\n/-- **Selmer classes are unramified outside `S` under the local hypotheses below.** If every\nheight-one prime `v \u2209 S` has finite residue field `R \u29f8 v.asIdeal` (no finiteness is required at\nprimes in `S`), the base-changed equation `W\u2044K_v` is integral over `\ud835\udcaa[K_v]` with an elliptic\nintegral model at every prime `v \u2209 S`, and no prime outside `S` divides `m`, then every class of\nthe `m`-Selmer group relative to the completions `K_v` is unramified outside `S`. -/\ntheorem selmerGroup_le_unramifiedOutsideTorsionCohomology\n (hfinite : \u2200 v \u2209 S, Finite (R \u29f8 v.asIdeal))\n (hgood : \u2200 v \u2209 S, \u2203 _ : IsIntegral \ud835\udcaa[v.adicCompletion K] (W\u2044(v.adicCompletion K)),\n (integralModel \ud835\udcaa[v.adicCompletion K] (W\u2044(v.adicCompletion K))).IsElliptic)\n (hS : \u2200 v \u2209 S, (m : R) \u2209 v.asIdeal) :\n W.selmerGroup \u03c4 m \u2264 W.unramifiedOutsideTorsionCohomology \u03c4 S m hfinite := by\n intro c hc\n rw [mem_unramifiedOutsideTorsionCohomology_iff]\n intro v hv\n have : Finite (R \u29f8 v.asIdeal) := hfinite v hv\n obtain \u27e8_, _\u27e9 := hgood v hv\n exact W.torsionRes_mem_unramifiedTorsionCohomology_of_mem_selmerGroup \u03c4 v\n (v.natCast_residueField_adicCompletion_eq_zero_iff.not.mpr (hS v hv)) hc\n\nend Dedekind\n\nend WeierstrassCurve\n", "public_theorems": ["WeierstrassCurve.unramifiedTorsionCohomology_eq_unramifiedH1", "WeierstrassCurve.mem_unramifiedTorsionCohomology_iff", "WeierstrassCurve.natCard_unramifiedTorsionCohomology", "WeierstrassCurve.torsionRes_mem_unramifiedTorsionCohomology", "WeierstrassCurve.smul_pointCoeff_eq_self_of_mem_inertiaSubgroup", "WeierstrassCurve.kummerCocycle_eq_zero_of_mem_inertiaSubgroup", "WeierstrassCurve.kummerMap_mem_unramifiedTorsionCohomology", "WeierstrassCurve.ker_explicitCoeff1_torsionCoeffIncl_eq_unramifiedTorsionCohomology", "WeierstrassCurve.range_kummerMap_eq_unramifiedTorsionCohomology", "WeierstrassCurve.localCondition_selmerStructure_eq_unramifiedTorsionCohomology", "WeierstrassCurve.torsionRes_mem_unramifiedTorsionCohomology_of_mem_selmerGroup", "WeierstrassCurve.unramifiedOutsideTorsionCohomology_def", "WeierstrassCurve.mem_unramifiedOutsideTorsionCohomology_iff", "WeierstrassCurve.unramifiedOutsideTorsionCohomology_mono", "WeierstrassCurve.selmerGroup_le_unramifiedOutsideTorsionCohomology"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.AlgebraicGeometry.EllipticCurve.GaloisCohomology.Selmer.Basic\npublic import TauCeti.AlgebraicGeometry.EllipticCurve.TateModule.Inertia\npublic import TauCeti.NumberTheory.LocalField.Unramified.Cohomology\npublic import TauCeti.RingTheory.DedekindDomain.AdicValuation.ValuativeRel\nimport TauCeti.AlgebraicGeometry.EllipticCurve.Affine.Point.Index.LocalField\nimport TauCeti.Data.Nat.Cast.IsUnit\n\n/-!\n# Unramified Kummer classes at integral elliptic models\n\nFor a Weierstrass curve over a nonarchimedean local field `K`, the unramified subgroup of\n`H\u00b9(K, E[m])` is the kernel of restriction to inertia (`TauCeti.unramifiedH1`). The\ncoefficient module uses the separable closure, so inertia is transported from the algebraic closure\nthrough `TauCeti.absoluteGaloisGroupRestrictEquiv`. When `W` is elliptic and `m \u2260 0`, this\nunramified subgroup is finite of order `#E(K)[m]`.\n\nWhen the chosen equation `W` is integral over `\ud835\udcaa[K]` with an elliptic integral model (unit\ndiscriminant), if `m` is prime to the residue characteristic, every Kummer class is unramified.\nIndeed inertia fixes every `m`-division point of a rational point, so the cocycle `\u03c3 \u21a6 \u03c3 Q - Q`\nvanishes on inertia. Over any nonarchimedean local field `K` where `(m : \ud835\udcc0[K]) \u2260 0` and the\nchosen equation `W` is integral over `\ud835\udcaa[K]` with unit discriminant, comparing orders with\n`[E(K) : m E(K)] = #E(K)[m]` upgrades this inclusion to equality: the kernel of\n`H\u00b9(G_K, E[m]) \u2192 H\u00b9(G_K, E)` equals `W.unramifiedTorsionCohomology m`, and hence\n`(W.kummerMap m hm).range = W.unramifiedTorsionCohomology m`.\n\nConsequently a Selmer class restricts to an unramified class at each nonarchimedean local\nfield in its defining family where the base-changed equation is integral with unit discriminant and\n`m` is a residue unit.\nUnramifiedness is also stable under restriction to any extension of nonarchimedean local fields,\nsince the inertia subgroup of the larger field maps into that of the smaller one. This carries the\nlocal conditions at the places of a number field to the places of a finite extension, such as the\n`m`-division field, as the proof of the finiteness of Selmer groups requires (Silverman X.4.2).\n\n## References\n\n* [J. Silverman, *The Arithmetic of Elliptic Curves*][silverman2009], VII.4.1, VIII.1.5 and X.4.\n* J. S. Milne, *Arithmetic Duality Theorems*, 2nd ed., I, Proposition 3.8.\n-/\n\npublic section\n\nnoncomputable section\n\nnamespace WeierstrassCurve\n\nopen TauCeti TauCeti.ContCohomology ValuativeRel\n\nvariable {K : Type*} [Field K] [ValuativeRel K] [TopologicalSpace K]\n [IsNonarchimedeanLocalField K] (W : WeierstrassCurve K) (m : \u2115)\n\n/-- The unramified classes in `H\u00b9(K, E[m])`: the kernel of restriction to inertia, transported\nto the automorphisms of the separable closure used by `W.TorsionCoeff m`. -/\ndef unramifiedTorsionCohomology : AddSubgroup (H1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m)) :=\n unramifiedH1 K (W.TorsionCoeff m)", "/-- `unramifiedTorsionCohomology` is `TauCeti.unramifiedH1` on `W.TorsionCoeff m`. -/\ntheorem unramifiedTorsionCohomology_eq_unramifiedH1 :\n W.unramifiedTorsionCohomology m = unramifiedH1 K (W.TorsionCoeff m) :=", "/-- A class is unramified exactly when its restriction to inertia is zero. -/\n@[simp]\ntheorem mem_unramifiedTorsionCohomology_iff\n {c : H1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m)} :\n c \u2208 W.unramifiedTorsionCohomology m \u2194\n explicitRes1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m)\n (separableClosureInertiaSubgroup K) c = 0 :=", "/-- For an elliptic curve and `m \u2260 0`, `unramifiedTorsionCohomology` is finite. -/\ninstance finite_unramifiedTorsionCohomology [W.IsElliptic] [NeZero m] :\n Finite (W.unramifiedTorsionCohomology m) := by\n rw [unramifiedTorsionCohomology_eq_unramifiedH1]\n infer_instance", "/-- **Order of unramified `m`-torsion cohomology**: `#H\u00b9_ur(G_K, E[m]) = #E(K)[m]` for `m \u2260 0`. -/\ntheorem natCard_unramifiedTorsionCohomology [DecidableEq K] [W.IsElliptic] [NeZero m] :\n Nat.card (W.unramifiedTorsionCohomology m) =\n Nat.card (AddSubgroup.torsionBy W.toAffine.Point m) :=", "/-- **Unramified classes restrict to unramified classes.** For an extension `L/K` of\nnonarchimedean local fields and a `K`-embedding `\u03c4 : K\u02e2 \u2192 L\u02e2` of separable closures, restriction\n`H\u00b9(K, E[m]) \u2192 H\u00b9(L, E[m])` along `\u03c4` sends unramified classes to unramified classes, because the\ninertia subgroup of `L` maps into that of `K`. No reduction hypothesis on `W` is needed. -/\ntheorem torsionRes_mem_unramifiedTorsionCohomology {L : Type*} [Field L] [ValuativeRel L]\n [TopologicalSpace L] [IsNonarchimedeanLocalField L] [Algebra K L] [ValuativeExtension K L]\n (\u03c4 : SeparableClosure K \u2192\u2090[K] SeparableClosure L)\n {c : H1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m)}\n (hc : c \u2208 W.unramifiedTorsionCohomology m) :\n W.torsionRes \u03c4 m c \u2208 (W\u2044L).unramifiedTorsionCohomology m :=", "variable [IsIntegral \ud835\udcaa[K] W] [(integralModel \ud835\udcaa[K] W).IsElliptic]\n\nlocal instance : W.IsElliptic := by\n rw [\u2190 baseChange_integralModel_eq \ud835\udcaa[K] W]\n infer_instance\n\nvariable {W m} in", "/-- When `W` is integral over `\ud835\udcaa[K]` with unit discriminant (an elliptic integral model), inertia\nfixes an `m`-division point of a `K`-rational point when `m` is prime to the residue\ncharacteristic. The action here is on the discrete coefficient module over the separable\nclosure. -/\ntheorem smul_pointCoeff_eq_self_of_mem_inertiaSubgroup [DecidableEq K]\n (hm : (m : \ud835\udcc0[K]) \u2260 0) {P : W.toAffine.Point} {Q : W.PointCoeff}\n (hQ : m \u2022 Q = W.basePointCoeff P) {\u03c3 : Gal(AlgebraicClosure K/K)}\n (h\u03c3 : \u03c3 \u2208 inertiaSubgroup K) : absoluteGaloisGroupRestrictEquiv K \u03c3 \u2022 Q = Q :=", "variable {W m} in", "/-- When `W` is integral over `\ud835\udcaa[K]` with unit discriminant (an elliptic integral model), the\nKummer cocycle of a division point of a rational point vanishes on inertia when its multiplier is\nprime to the residue characteristic. -/\ntheorem kummerCocycle_eq_zero_of_mem_inertiaSubgroup [DecidableEq K]\n (hm : (m : \ud835\udcc0[K]) \u2260 0) {P : W.toAffine.Point} {Q : W.PointCoeff}\n (hQ : m \u2022 Q = W.basePointCoeff P) {\u03c3 : Gal(AlgebraicClosure K/K)}\n (h\u03c3 : \u03c3 \u2208 inertiaSubgroup K) :\n kummerCocycle hQ (absoluteGaloisGroupRestrictEquiv K \u03c3) = 0 :=", "/-- When `W` is integral over `\ud835\udcaa[K]` with unit discriminant (an elliptic integral model), the\nKummer class of a rational point is unramified when the multiplier is prime to the residue\ncharacteristic. -/\ntheorem kummerMap_mem_unramifiedTorsionCohomology [DecidableEq K]\n (hmres : (m : \ud835\udcc0[K]) \u2260 0) (P : W.toAffine.Point) :\n W.kummerMap m (natCast_ne_zero_of_residueField_natCast_ne_zero hmres).isUnit P \u2208\n W.unramifiedTorsionCohomology m :=", "/-- **When `W` is integral over `\ud835\udcaa[K]` with unit discriminant and `m` is nonzero in the residue\nfield, the local Selmer condition equals unramified cohomology** (Milne, *ADT* I, Proposition 3.8):\nover a nonarchimedean local field `K`, if `W` is integral over `\ud835\udcaa[K]` with unit discriminant (an\nelliptic integral model) and `(m : \ud835\udcc0[K]) \u2260 0`, then\n`ker(H\u00b9(G_K, E[m]) \u2192 H\u00b9(G_K, E)) = W.unramifiedTorsionCohomology m`. Needs no `DecidableEq K`. -/\ntheorem ker_explicitCoeff1_torsionCoeffIncl_eq_unramifiedTorsionCohomology\n (hmres : (m : \ud835\udcc0[K]) \u2260 0) :\n (explicitCoeff1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m) (W.torsionCoeffIncl m)\n continuous_of_discreteTopology).ker = W.unramifiedTorsionCohomology m :=", "/-- **When `W` is integral over `\ud835\udcaa[K]` with unit discriminant and `m` is nonzero in the residue\nfield, the local Kummer image equals unramified cohomology** over any nonarchimedean local field\n`K`: if `W` is integral over `\ud835\udcaa[K]` with unit discriminant (an elliptic integral model) and\n`(m : \ud835\udcc0[K]) \u2260 0`, then `(W.kummerMap m _).range = W.unramifiedTorsionCohomology m`. -/\ntheorem range_kummerMap_eq_unramifiedTorsionCohomology [DecidableEq K]\n (hmres : (m : \ud835\udcc0[K]) \u2260 0) :\n (W.kummerMap m (natCast_ne_zero_of_residueField_natCast_ne_zero hmres).isUnit).range =\n W.unramifiedTorsionCohomology m :=", "end WeierstrassCurve\n\nnamespace WeierstrassCurve\n\nopen TauCeti TauCeti.ContCohomology ValuativeRel\n\nvariable {K : Type*} [Field K] (W : WeierstrassCurve K)\n {\u03b9 : Type*} {L : \u03b9 \u2192 Type*} [\u2200 i, Field (L i)] [\u2200 i, Algebra K (L i)]\n (\u03c4 : \u2200 i, SeparableClosure K \u2192\u2090[K] SeparableClosure (L i)) (i : \u03b9)\n [ValuativeRel (L i)] [TopologicalSpace (L i)] [IsNonarchimedeanLocalField (L i)]\n [IsIntegral \ud835\udcaa[L i] (W\u2044(L i))] [(integralModel \ud835\udcaa[L i] (W\u2044(L i))).IsElliptic]", "/-- **Local Selmer condition equals unramified cohomology**: at any nonarchimedean local field\n`L i` in the defining family where the base-changed equation `W\u2044(L i)` is integral over `\ud835\udcaa[L i]`\nwith unit discriminant (an elliptic integral model) and `(m : \ud835\udcc0[L i]) \u2260 0`, the local condition of\n`W.selmerStructure \u03c4 m` at `i` equals `(W\u2044(L i)).unramifiedTorsionCohomology m`. No valuation or\nintegral-model assumption is made at indices `j \u2260 i`. -/\ntheorem localCondition_selmerStructure_eq_unramifiedTorsionCohomology {m : \u2115}\n (hmres : (m : \ud835\udcc0[L i]) \u2260 0) :\n (W.selmerStructure \u03c4 m).localCondition i = (W\u2044(L i)).unramifiedTorsionCohomology m :=", "/-- A Selmer class is unramified at each nonarchimedean local field in its defining family\nwhere the base-changed equation is integral with unit discriminant and the multiplier is prime to\nthe residue characteristic. No good-reduction assumption is made at the other fields in the\nfamily. -/\ntheorem torsionRes_mem_unramifiedTorsionCohomology_of_mem_selmerGroup {m : \u2115}\n (hmres : (m : \ud835\udcc0[L i]) \u2260 0)\n {c : H1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m)} (hc : c \u2208 W.selmerGroup \u03c4 m) :\n W.torsionRes (\u03c4 i) m c \u2208 (W\u2044(L i)).unramifiedTorsionCohomology m :=", "/-! ### Classes unramified outside `S` -/\n\nsection Dedekind\n\nopen IsDedekindDomain\n\nvariable {R : Type*} [CommRing R] [IsDedekindDomain R]\n {K : Type*} [Field K] [Algebra R K] [IsFractionRing R K] (W : WeierstrassCurve K)\n (\u03c4 : \u2200 v : HeightOneSpectrum R,\n SeparableClosure K \u2192\u2090[K] SeparableClosure (v.adicCompletion K))\n (S : Set (HeightOneSpectrum R)) (m : \u2115)\n\n/-- **The classes of `H\u00b9(G_K, E[m])` unramified outside `S`**: those whose restriction to the\ncompletion `K_v` along `\u03c4 v`, for every prime `v \u2209 S`, is unramified, that is, vanishes on the\ninertia subgroup of `K_v`. Here every height-one prime `v \u2209 S` is required by `hfinite` to have\nfinite residue field `R \u29f8 v.asIdeal` (so `K_v` is a nonarchimedean local field); no finiteness is\nrequired at primes in `S`. -/\ndef unramifiedOutsideTorsionCohomology (hfinite : \u2200 v \u2209 S, Finite (R \u29f8 v.asIdeal)) :\n AddSubgroup (H1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m)) :=\n \u2a05 (v : HeightOneSpectrum R) (hv : v \u2209 S),\n letI : Finite (R \u29f8 v.asIdeal) := hfinite v hv\n ((W\u2044(v.adicCompletion K)).unramifiedTorsionCohomology m).comap (W.torsionRes (\u03c4 v) m)", "/-- `unramifiedOutsideTorsionCohomology` is the infimum over `v \u2209 S` of the pullbacks along\n`W.torsionRes` of the local unramified torsion cohomology subgroups. -/\ntheorem unramifiedOutsideTorsionCohomology_def (hfinite : \u2200 v \u2209 S, Finite (R \u29f8 v.asIdeal)) :\n W.unramifiedOutsideTorsionCohomology \u03c4 S m hfinite =\n \u2a05 (v : HeightOneSpectrum R) (hv : v \u2209 S),\n letI : Finite (R \u29f8 v.asIdeal) :=", "variable {W \u03c4 S m}", "/-- A class is unramified outside `S` exactly when its restriction to every `K_v` with `v \u2209 S`\nis unramified. -/\n@[simp]\ntheorem mem_unramifiedOutsideTorsionCohomology_iff\n {hfinite : \u2200 v \u2209 S, Finite (R \u29f8 v.asIdeal)}\n {c : H1 (AbsoluteGaloisGroup K) (W.TorsionCoeff m)} :\n c \u2208 W.unramifiedOutsideTorsionCohomology \u03c4 S m hfinite \u2194\n \u2200 (v : HeightOneSpectrum R) (hv : v \u2209 S),\n letI : Finite (R \u29f8 v.asIdeal) :=", "/-- Enlarging the exceptional set `S` enlarges `unramifiedOutsideTorsionCohomology`. -/\ntheorem unramifiedOutsideTorsionCohomology_mono {T : Set (HeightOneSpectrum R)} (hST : S \u2286 T)\n (hfinite : \u2200 v \u2209 S, Finite (R \u29f8 v.asIdeal)) :\n W.unramifiedOutsideTorsionCohomology \u03c4 S m hfinite \u2264\n W.unramifiedOutsideTorsionCohomology \u03c4 T m (fun v hv \u21a6 hfinite v fun hvS \u21a6 hv (hST hvS)) :=", "/-- **Selmer classes are unramified outside `S` under the local hypotheses below.** If every\nheight-one prime `v \u2209 S` has finite residue field `R \u29f8 v.asIdeal` (no finiteness is required at\nprimes in `S`), the base-changed equation `W\u2044K_v` is integral over `\ud835\udcaa[K_v]` with an elliptic\nintegral model at every prime `v \u2209 S`, and no prime outside `S` divides `m`, then every class of\nthe `m`-Selmer group relative to the completions `K_v` is unramified outside `S`. -/\ntheorem selmerGroup_le_unramifiedOutsideTorsionCohomology\n (hfinite : \u2200 v \u2209 S, Finite (R \u29f8 v.asIdeal))\n (hgood : \u2200 v \u2209 S, \u2203 _ : IsIntegral \ud835\udcaa[v.adicCompletion K] (W\u2044(v.adicCompletion K)),\n (integralModel \ud835\udcaa[v.adicCompletion K] (W\u2044(v.adicCompletion K))).IsElliptic)\n (hS : \u2200 v \u2209 S, (m : R) \u2209 v.asIdeal) :\n W.selmerGroup \u03c4 m \u2264 W.unramifiedOutsideTorsionCohomology \u03c4 S m hfinite :=", "end Dedekind\n\nend WeierstrassCurve"], "free_length": 4365, "file_length": 10531, "heartbeats": 40945, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Algebra.MonoidAlgebra.Torsion", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Algebra/MonoidAlgebra/Torsion.lean", "module": "TauCeti.Algebra.MonoidAlgebra.Torsion", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\nimport Mathlib.GroupTheory.FiniteAbelian.Basic\nimport Mathlib.GroupTheory.OrderOfElement\npublic import Mathlib.RingTheory.Bialgebra.MonoidAlgebra\nimport TauCeti.Algebra.MonoidAlgebra.Frobenius\npublic import TauCeti.Algebra.MonoidAlgebra.NotReduced\npublic import TauCeti.Algebra.MonoidAlgebra.SubgroupCharSum\npublic import TauCeti.RingTheory.Idempotents.Connected.Spectrum\n\n/-!\n# Torsion in a character group\n\nThe group algebra of a group with torsion cannot be both reduced and connected over a field.\nFor torsion of order equal to the characteristic, the group algebra contains the familiar\nnonzero nilpotent `g - 1`. For torsion of order prime to the characteristic, averaging over the\nfinite cyclic subgroup produces a nontrivial idempotent.\n\nConsequently, if the group algebra of a commutative group is reduced and has connected prime\nspectrum, then the group is torsion-free. This is the algebraic input that distinguishes tori\nfrom general groups of multiplicative type.\n\nBoth hypotheses are needed. In exponential characteristic `p` the `p`-th power map of a monoid\nalgebra indexed by a `p`-torsion monoid is the `p`-th power of its counit, so every element differs\nfrom a scalar by a `p`-nilpotent, and over a coefficient ring with connected prime spectrum the\nmonoid algebra again has connected prime spectrum, however much `p`-torsion the monoid carries.\nThe coordinate Hopf algebra of `\u03bc_p` in characteristic `p` is the standard instance: connected,\nnot reduced, and with a character of order `p`.\n\n## Main declarations\n\n* `TauCeti.groupAlgebraSubgroupAverage`: the normalized sum of a finite subgroup.\n* `TauCeti.isIdempotentElem_groupAlgebraSubgroupAverage`: the subgroup average is idempotent.\n* `TauCeti.isMulTorsionFree_of_isReduced_monoidAlgebra_of_connectedSpace`: reducedness and\n connectedness of a group algebra force its indexing group to be torsion-free.\n* `TauCeti.pow_expChar_monoidAlgebra_eq_algebraMap`: in exponential characteristic `p`, the\n `p`-th power map of a `p`-torsion monoid algebra is the `p`-th power of its counit.\n* `TauCeti.connectedSpace_primeSpectrum_monoidAlgebra_of_pow_eq_one`: over a coefficient ring with\n connected prime spectrum, a `p`-torsion monoid algebra in exponential characteristic `p` again\n has connected prime spectrum.\n\n## References\n\n* J. S. Milne, *Algebraic Groups* (2017), Definitions 12.14 and 12.17.\n* W. C. Waterhouse, *Introduction to Affine Group Schemes*, Chapter 2.\n-/\n\npublic section\n\nopen scoped MonoidAlgebra\n\nnamespace TauCeti\n\nvariable {G : Type*} [Group G]\n\nvariable (k : Type*) [Field k]\n\n/-- The normalized sum of a finite subgroup: the character sum of the trivial character,\nscaled by the inverse of the subgroup order. -/\nnoncomputable def groupAlgebraSubgroupAverage (P : Subgroup G) [Fintype P] : k[G] :=\n (Fintype.card P : k)\u207b\u00b9 \u2022 subgroupCharSum (1 : G \u2192* k) P\n\n/-- Left multiplication by a member of a finite subgroup fixes its normalized subgroup\naverage. -/\n@[simp]\ntheorem single_mul_groupAlgebraSubgroupAverage (P : Subgroup G) [Fintype P] (x : P) :\n MonoidAlgebra.single (x : G) (1 : k) * groupAlgebraSubgroupAverage k P =\n groupAlgebraSubgroupAverage k P := by\n rw [groupAlgebraSubgroupAverage, mul_smul_comm, single_mul_subgroupCharSum]\n simp\n\n/-- The normalized sum of a finite subgroup is idempotent. When its cardinality vanishes in the\nbase field the average is `0`, since `0\u207b\u00b9 = 0`. -/\ntheorem isIdempotentElem_groupAlgebraSubgroupAverage (P : Subgroup G) [Fintype P] :\n IsIdempotentElem (groupAlgebraSubgroupAverage k P) := by\n by_cases hP : (Fintype.card P : k) = 0\n \u00b7 rw [groupAlgebraSubgroupAverage, hP, inv_zero, zero_smul]\n exact IsIdempotentElem.zero\n rw [IsIdempotentElem, groupAlgebraSubgroupAverage, smul_mul_smul,\n subgroupCharSum_mul_self, Nat.card_eq_fintype_card, \u2190 Nat.cast_smul_eq_nsmul k, smul_smul]\n simp [hP]\n\n/-- A finite subgroup average is nonzero when the subgroup cardinality is nonzero in the base\nfield. -/\ntheorem groupAlgebraSubgroupAverage_ne_zero (P : Subgroup G) [Fintype P]\n (hP : (Fintype.card P : k) \u2260 0) :\n groupAlgebraSubgroupAverage k P \u2260 0 := by\n intro hzero\n have h := congrArg (Coalgebra.counit (R := k)) hzero\n simp [groupAlgebraSubgroupAverage, subgroupCharSum_def, hP] at h\n\n/-- The average over a nontrivial finite subgroup is not one. -/\ntheorem groupAlgebraSubgroupAverage_ne_one (P : Subgroup G) [Fintype P]\n (x : P) (hx : (x : G) \u2260 1) :\n groupAlgebraSubgroupAverage k P \u2260 1 := by\n intro hone\n have hinvariant := single_mul_groupAlgebraSubgroupAverage k P x\n rw [hone, mul_one, MonoidAlgebra.one_def] at hinvariant\n exact hx (MonoidAlgebra.single_left_injective one_ne_zero hinvariant)\n\n/-- If a group algebra over a field is reduced and has connected prime spectrum, then the\nindexing commutative group is torsion-free. -/\ntheorem isMulTorsionFree_of_isReduced_monoidAlgebra_of_connectedSpace\n (k : Type*) [Field k] (G : Type*) [CommGroup G]\n [IsReduced (MonoidAlgebra k G)] [ConnectedSpace (PrimeSpectrum (MonoidAlgebra k G))] :\n IsMulTorsionFree G := by\n rw [isMulTorsionFree_iff_not_isOfFinOrder]\n intro g hg hfinite\n have horder : orderOf g \u2260 0 := orderOf_ne_zero_iff.mpr hfinite\n have horder_one : orderOf g \u2260 1 := by\n exact fun h \u21a6 hg (orderOf_eq_one_iff.mp h)\n obtain \u27e8p, hp, hp_dvd\u27e9 := Nat.exists_prime_and_dvd horder_one\n let y := g ^ (orderOf g / p)\n have hy_order : orderOf y = p := orderOf_pow_orderOf_div horder hp_dvd\n have hy_ne_one : y \u2260 1 := by\n rw [ne_eq, \u2190 orderOf_eq_one_iff, hy_order]\n exact hp.ne_one\n have hy_pow : y ^ p = 1 := by\n rw [\u2190 orderOf_dvd_iff_pow_eq_one, hy_order]\n by_cases hchar : (p : k) = 0\n \u00b7 have _ : Fact p.Prime := \u27e8hp\u27e9\n have _ : CharP k p := (CharP.charP_iff_prime_eq_zero hp).mpr hchar\n exact not_isReduced_monoidAlgebra (R := k) (G := G) p (n := 1) hy_ne_one\n (by rw [pow_one]; exact hy_pow) inferInstance\n \u00b7 let P := Subgroup.zpowers y\n have hyfinite : IsOfFinOrder y := orderOf_ne_zero_iff.mp (hy_order \u25b8 hp.ne_zero)\n let _ : Fintype P := Fintype.ofEquiv (Fin (orderOf y)) (finEquivZPowers hyfinite)\n have hcard : Fintype.card P = p := by\n have hcard' : Fintype.card P = orderOf y := by\n simpa using (Fintype.card_congr (finEquivZPowers hyfinite)).symm\n exact hcard'.trans hy_order\n have havg := isIdempotentElem_groupAlgebraSubgroupAverage k P\n rcases havg.eq_zero_or_eq_one_of_preconnectedSpace with hzero | hone\n \u00b7 exact groupAlgebraSubgroupAverage_ne_zero k P\n (by simpa only [hcard] using hchar) hzero\n \u00b7 exact groupAlgebraSubgroupAverage_ne_one k P \u27e8y, Subgroup.mem_zpowers y\u27e9 hy_ne_one hone\n\n/-! ### Connectedness of a `p`-torsion group algebra in characteristic `p`\n\nThe two hypotheses of `isMulTorsionFree_of_isReduced_monoidAlgebra_of_connectedSpace` are\nindependent. Connectedness alone does not suffice: over a field of characteristic `p`, the group\nalgebra of a group killed by `p` is connected, while `not_isReduced_monoidAlgebra` shows it is not\nreduced as soon as the group is nontrivial. The coordinate Hopf algebra of `\u03bc_p` is the standard\ninstance. -/\n\nsection ExpChar\n\nsection Power\n\nvariable (k : Type*) [CommSemiring k] {M : Type*} [CommMonoid M] (p : \u2115) [ExpChar k p]\n\n/-- In a monoid algebra over a commutative semiring of exponential characteristic `p`, indexed by a\ncommutative monoid killed by `p`, the `p`-th power map is the `p`-th power of the counit. -/\n@[simp]\ntheorem pow_expChar_monoidAlgebra_eq_algebraMap (hM : \u2200 m : M, m ^ p = 1) (x : k[M]) :\n x ^ p = algebraMap k k[M] (Coalgebra.counit (R := k) x ^ p) := by\n -- The `p`-th power map of `M` is trivial, and pushing forward along the trivial map is the\n -- counit followed by the inclusion of scalars.\n have hpow : (powMonoidHom p : M \u2192* M) = 1 := MonoidHom.ext hM\n have hcounit : MonoidAlgebra.mapDomainRingHom k (1 : M \u2192* M) =\n (algebraMap k k[M]).comp (Bialgebra.counitAlgHom k k[M]) :=\n MonoidAlgebra.ringHom_ext (by simp [MonoidAlgebra.coe_algebraMap])\n (by simp [MonoidAlgebra.coe_algebraMap])\n rw [\u2190 MonoidAlgebra.mapRingHom_frobenius_mapDomainRingHom_powMonoidHom p x, hpow, hcounit]\n simp [MonoidAlgebra.coe_algebraMap, frobenius_def]\n\nend Power\n\nsection Connected\n\nvariable (k : Type*) [CommRing k] [ConnectedSpace (PrimeSpectrum k)]\n {M : Type*} [CommMonoid M] (p : \u2115) [ExpChar k p]\n\n/-- Over a connected commutative ring of exponential characteristic `p`, the monoid algebra of a\ncommutative monoid killed by `p` has connected prime spectrum: every element differs from its\ncounit by a `p`-nilpotent element, so the only idempotents are the two trivial ones. -/\ntheorem connectedSpace_primeSpectrum_monoidAlgebra_of_pow_eq_one (hM : \u2200 m : M, m ^ p = 1) :\n ConnectedSpace (PrimeSpectrum k[M]) := by\n let : Nontrivial k := PrimeSpectrum.nonempty_iff_nontrivial.mp inferInstance\n -- Every element differs from the image of its counit by an element killed by the `p`-th power.\n have hnil : \u2200 x : k[M], (x - algebraMap k k[M] (Coalgebra.counit (R := k) x)) ^ p = 0 := by\n intro x\n rw [sub_pow_expChar, \u2190 map_pow (algebraMap k k[M]),\n pow_expChar_monoidAlgebra_eq_algebraMap k p hM x, sub_self]\n rw [connectedSpace_primeSpectrum_iff_idempotent_eq_zero_or_one]\n intro e he\n have hcounit : IsIdempotentElem (Coalgebra.counit (R := k) e) :=\n he.map (Bialgebra.counitAlgHom k k[M])\n rcases hcounit.eq_zero_or_eq_one_of_preconnectedSpace with hc | hc\n \u00b7 exact Or.inl (he.eq_zero_of_isNilpotent \u27e8p, by simpa [hc] using hnil e\u27e9)\n \u00b7 refine Or.inr (sub_eq_zero.mp (he.one_sub.eq_zero_of_isNilpotent \u27e8p, ?_\u27e9)).symm\n have h := hnil e\n rw [hc, map_one] at h\n rw [\u2190 neg_sub e 1, neg_pow, h, mul_zero]\n\nend Connected\n\nend ExpChar\n\nend TauCeti\n", "public_theorems": ["TauCeti.single_mul_groupAlgebraSubgroupAverage", "TauCeti.isIdempotentElem_groupAlgebraSubgroupAverage", "TauCeti.groupAlgebraSubgroupAverage_ne_zero", "TauCeti.groupAlgebraSubgroupAverage_ne_one", "TauCeti.isMulTorsionFree_of_isReduced_monoidAlgebra_of_connectedSpace", "TauCeti.pow_expChar_monoidAlgebra_eq_algebraMap", "TauCeti.connectedSpace_primeSpectrum_monoidAlgebra_of_pow_eq_one"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\nimport Mathlib.GroupTheory.FiniteAbelian.Basic\nimport Mathlib.GroupTheory.OrderOfElement\npublic import Mathlib.RingTheory.Bialgebra.MonoidAlgebra\nimport TauCeti.Algebra.MonoidAlgebra.Frobenius\npublic import TauCeti.Algebra.MonoidAlgebra.NotReduced\npublic import TauCeti.Algebra.MonoidAlgebra.SubgroupCharSum\npublic import TauCeti.RingTheory.Idempotents.Connected.Spectrum\n\n/-!\n# Torsion in a character group\n\nThe group algebra of a group with torsion cannot be both reduced and connected over a field.\nFor torsion of order equal to the characteristic, the group algebra contains the familiar\nnonzero nilpotent `g - 1`. For torsion of order prime to the characteristic, averaging over the\nfinite cyclic subgroup produces a nontrivial idempotent.\n\nConsequently, if the group algebra of a commutative group is reduced and has connected prime\nspectrum, then the group is torsion-free. This is the algebraic input that distinguishes tori\nfrom general groups of multiplicative type.\n\nBoth hypotheses are needed. In exponential characteristic `p` the `p`-th power map of a monoid\nalgebra indexed by a `p`-torsion monoid is the `p`-th power of its counit, so every element differs\nfrom a scalar by a `p`-nilpotent, and over a coefficient ring with connected prime spectrum the\nmonoid algebra again has connected prime spectrum, however much `p`-torsion the monoid carries.\nThe coordinate Hopf algebra of `\u03bc_p` in characteristic `p` is the standard instance: connected,\nnot reduced, and with a character of order `p`.\n\n## Main declarations\n\n* `TauCeti.groupAlgebraSubgroupAverage`: the normalized sum of a finite subgroup.\n* `TauCeti.isIdempotentElem_groupAlgebraSubgroupAverage`: the subgroup average is idempotent.\n* `TauCeti.isMulTorsionFree_of_isReduced_monoidAlgebra_of_connectedSpace`: reducedness and\n connectedness of a group algebra force its indexing group to be torsion-free.\n* `TauCeti.pow_expChar_monoidAlgebra_eq_algebraMap`: in exponential characteristic `p`, the\n `p`-th power map of a `p`-torsion monoid algebra is the `p`-th power of its counit.\n* `TauCeti.connectedSpace_primeSpectrum_monoidAlgebra_of_pow_eq_one`: over a coefficient ring with\n connected prime spectrum, a `p`-torsion monoid algebra in exponential characteristic `p` again\n has connected prime spectrum.\n\n## References\n\n* J. S. Milne, *Algebraic Groups* (2017), Definitions 12.14 and 12.17.\n* W. C. Waterhouse, *Introduction to Affine Group Schemes*, Chapter 2.\n-/\n\npublic section\n\nopen scoped MonoidAlgebra\n\nnamespace TauCeti\n\nvariable {G : Type*} [Group G]\n\nvariable (k : Type*) [Field k]\n\n/-- The normalized sum of a finite subgroup: the character sum of the trivial character,\nscaled by the inverse of the subgroup order. -/\nnoncomputable def groupAlgebraSubgroupAverage (P : Subgroup G) [Fintype P] : k[G] :=\n (Fintype.card P : k)\u207b\u00b9 \u2022 subgroupCharSum (1 : G \u2192* k) P", "/-- Left multiplication by a member of a finite subgroup fixes its normalized subgroup\naverage. -/\n@[simp]\ntheorem single_mul_groupAlgebraSubgroupAverage (P : Subgroup G) [Fintype P] (x : P) :\n MonoidAlgebra.single (x : G) (1 : k) * groupAlgebraSubgroupAverage k P =\n groupAlgebraSubgroupAverage k P :=", "/-- The normalized sum of a finite subgroup is idempotent. When its cardinality vanishes in the\nbase field the average is `0`, since `0\u207b\u00b9 = 0`. -/\ntheorem isIdempotentElem_groupAlgebraSubgroupAverage (P : Subgroup G) [Fintype P] :\n IsIdempotentElem (groupAlgebraSubgroupAverage k P) :=", "/-- A finite subgroup average is nonzero when the subgroup cardinality is nonzero in the base\nfield. -/\ntheorem groupAlgebraSubgroupAverage_ne_zero (P : Subgroup G) [Fintype P]\n (hP : (Fintype.card P : k) \u2260 0) :\n groupAlgebraSubgroupAverage k P \u2260 0 :=", "/-- The average over a nontrivial finite subgroup is not one. -/\ntheorem groupAlgebraSubgroupAverage_ne_one (P : Subgroup G) [Fintype P]\n (x : P) (hx : (x : G) \u2260 1) :\n groupAlgebraSubgroupAverage k P \u2260 1 :=", "/-- If a group algebra over a field is reduced and has connected prime spectrum, then the\nindexing commutative group is torsion-free. -/\ntheorem isMulTorsionFree_of_isReduced_monoidAlgebra_of_connectedSpace\n (k : Type*) [Field k] (G : Type*) [CommGroup G]\n [IsReduced (MonoidAlgebra k G)] [ConnectedSpace (PrimeSpectrum (MonoidAlgebra k G))] :\n IsMulTorsionFree G :=", "/-! ### Connectedness of a `p`-torsion group algebra in characteristic `p`\n\nThe two hypotheses of `isMulTorsionFree_of_isReduced_monoidAlgebra_of_connectedSpace` are\nindependent. Connectedness alone does not suffice: over a field of characteristic `p`, the group\nalgebra of a group killed by `p` is connected, while `not_isReduced_monoidAlgebra` shows it is not\nreduced as soon as the group is nontrivial. The coordinate Hopf algebra of `\u03bc_p` is the standard\ninstance. -/\n\nsection ExpChar\n\nsection Power\n\nvariable (k : Type*) [CommSemiring k] {M : Type*} [CommMonoid M] (p : \u2115) [ExpChar k p]", "/-- In a monoid algebra over a commutative semiring of exponential characteristic `p`, indexed by a\ncommutative monoid killed by `p`, the `p`-th power map is the `p`-th power of the counit. -/\n@[simp]\ntheorem pow_expChar_monoidAlgebra_eq_algebraMap (hM : \u2200 m : M, m ^ p = 1) (x : k[M]) :\n x ^ p = algebraMap k k[M] (Coalgebra.counit (R := k) x ^ p) :=", "end Power\n\nsection Connected\n\nvariable (k : Type*) [CommRing k] [ConnectedSpace (PrimeSpectrum k)]\n {M : Type*} [CommMonoid M] (p : \u2115) [ExpChar k p]", "/-- Over a connected commutative ring of exponential characteristic `p`, the monoid algebra of a\ncommutative monoid killed by `p` has connected prime spectrum: every element differs from its\ncounit by a `p`-nilpotent element, so the only idempotents are the two trivial ones. -/\ntheorem connectedSpace_primeSpectrum_monoidAlgebra_of_pow_eq_one (hM : \u2200 m : M, m ^ p = 1) :\n ConnectedSpace (PrimeSpectrum k[M]) :=", "end Connected\n\nend ExpChar\n\nend TauCeti"], "free_length": 3386, "file_length": 5477, "heartbeats": 11093, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Combinatorics.Graph.Connectivity.Ear.Characterization", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Combinatorics/Graph/Connectivity/Ear/Characterization.lean", "module": "TauCeti.Combinatorics.Graph.Connectivity.Ear.Characterization", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Combinatorics.Graph.Connectivity.Ear.EdgeConnected\npublic import TauCeti.Combinatorics.Graph.Connectivity.Ear.Extension\npublic import TauCeti.Combinatorics.Graph.Connectivity.Ear.VertexStart\n\nimport Mathlib.Data.Set.Card\n\n/-!\n# Ear characterization of two-edge-connected multigraphs\n\nA multigraph with a nonempty actual vertex set and finitely many actual edges is\n`2`-edge-connected exactly when it admits an ear decomposition (equivalently, a vertex-started ear\ndecomposition). The forward direction iterates the finiteness-free single-ear extension theorem\nfrom `Ear.Extension`: as long as a partial ear decomposition covers only a proper subgraph `H < G`,\n`2`-edge-connectivity supplies an open or closed ear over `H` that strictly shrinks `E(G) \\ E(H)`.\nFiniteness of `E(G)` alone makes this iteration terminate (`Graph.EarDecomposition.extend`), while\npreserving the starting partial decomposition as a prefix (`Graph.EarDecomposition.prefix_extend`).\n\nIn particular, starting from a prescribed actual vertex\n(`Graph.IsEdgeConnected.earDecompositionOfVertex`) or cycle\n(`Graph.IsEdgeConnected.earDecompositionOfCycle`) constructs a full ear decomposition beginning\nthere. Combined with cycle-to-vertex start normalization in `Ear.VertexStart` and the\nfiniteness-free converse in `Ear.EdgeConnected`, this gives both the vertex-started and unrestricted\near characterizations for multigraphs and, via `Graph.ofSimpleGraph`, for simple graphs.\n\nThe theorem goes back to H. E. Robbins (1939), *A theorem on graphs, with an application to a\nproblem of traffic control*, Amer. Math. Monthly 46, 281\u2013283; the argument follows R. Diestel,\n*Graph Theory*, Chapter 3, with edge identities retained for parallel edges and loops.\n\n## Main results\n\n* `Graph.EarDecomposition.extend`, `Graph.EarDecomposition.prefix_extend`: with finitely many\n actual edges, complete any partial ear decomposition to the whole graph while preserving it as a\n prefix.\n* `Graph.IsEdgeConnected.earDecompositionOfVertex`,\n `Graph.IsEdgeConnected.earDecompositionOfCycle`: construct an ear decomposition starting at a\n chosen actual vertex or cycle.\n* `Graph.isEdgeConnected_two_iff_exists_isVertexStart_earDecomposition`,\n `Graph.isEdgeConnected_two_iff_nonempty_earDecomposition`,\n `Graph.connected_and_forall_not_isBridge_iff_nonempty_earDecomposition`: ear characterizations of\n `2`-edge-connected multigraphs.\n* `SimpleGraph.isEdgeConnected_two_iff_exists_isVertexStart_earDecomposition`,\n `SimpleGraph.isEdgeConnected_two_iff_nonempty_earDecomposition_ofSimpleGraph`: the corresponding\n simple-graph characterizations via `Graph.ofSimpleGraph`.\n-/\n\npublic section\n\nopen Set\n\nuniverse u v\n\nnamespace Graph\n\nvariable {\u03b1 : Type u} {\u03b2 : Type v} {G H : Graph \u03b1 \u03b2}\n\nnamespace EarDecomposition\n\nprivate theorem ncard_sdiff_add_lt [Finite E(G)] {H : Graph \u03b1 \u03b2} (ear : G.Ear H) :\n (E(G) \\ E(ear.add)).ncard < (E(G) \\ E(H)).ncard :=\n Set.ncard_lt_ncard ear.sdiff_edgeSet_add_ssubset (Set.toFinite E(G)).sdiff\n\nopen Classical in\n/-- Complete any partial ear decomposition in a `2`-edge-connected multigraph with finitely many\nactual edges to an ear decomposition of the whole multigraph. -/\nnoncomputable def extend [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) : G.EarDecomposition G :=\n if h : H = G then\n d.copy h\n else\n let ear : G.Ear H :=\n (d.vertexSet_nonempty.exists_ear_of_lt (lt_of_le_of_ne d.final_le h) hG).choose\n (d.snoc ear).extend hG\ntermination_by (E(G) \\ E(H)).ncard\ndecreasing_by exact ncard_sdiff_add_lt _\n\nprivate theorem extend_spec [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) :\n \u2203 hle : d.length \u2264 (d.extend hG).length,\n (\u2200 i : Fin (d.length + 1),\n (d.extend hG).graphAfter (Fin.castLE (Nat.succ_le_succ hle) i) = d.graphAfter i) \u2227\n (\u2200 i : Fin d.length,\n (d.extend hG).earAt (Fin.castLE hle i) = d.earAt i) \u2227\n HEq (d.extend hG).start d.start := by\n fun_induction d.extend hG with\n | case1 d =>\n refine \u27e8(d.length_copy rfl).ge, fun i \u21a6 ?_, fun i \u21a6 ?_, d.heq_start_copy rfl\u27e9\n \u00b7 rw [d.graphAfter_copy]\n exact congrArg d.graphAfter (Fin.ext rfl)\n \u00b7 rw [d.earAt_copy]\n exact congrArg d.earAt (Fin.ext rfl)\n | case2 _ d _ ear ih =>\n obtain \u27e8hle', hgraph', hear', hstart'\u27e9 := ih\n have hle\u2080 : d.length \u2264 (d.snoc ear).length :=\n (Nat.le_succ d.length).trans_eq (d.length_snoc ear).symm\n have hle : d.length \u2264 ((d.snoc ear).extend hG).length := hle\u2080.trans hle'\n refine \u27e8hle, fun i \u21a6 ?_, fun i \u21a6 ?_, hstart'.trans (d.heq_start_snoc ear)\u27e9\n \u00b7 let i' : Fin ((d.snoc ear).length + 1) :=\n (Fin.cast (d.length_snoc ear).symm i).castSucc\n have hi : Fin.castLE (Nat.succ_le_succ hle) i =\n Fin.castLE (Nat.succ_le_succ hle') i' := Fin.ext (by simp [i'])\n rw [hi, hgraph' i']\n dsimp only [i']\n exact d.graphAfter_snoc_castSucc ear i\n \u00b7 let i' : Fin (d.snoc ear).length :=\n Fin.cast (d.length_snoc ear).symm i.castSucc\n have hi : Fin.castLE hle i = Fin.castLE hle' i' := Fin.ext (by simp [i'])\n rw [hi, hear' i']\n dsimp only [i']\n exact d.earAt_snoc_castSucc ear i\n\n/-- Completing a partial ear decomposition does not decrease its length. -/\ntheorem length_le_length_extend [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) : d.length \u2264 (d.extend hG).length :=\n let \u27e8hle, _\u27e9 := d.extend_spec hG\n hle\n\n/-- Completing a partial ear decomposition preserves all of its stage graphs. -/\n@[simp]\ntheorem graphAfter_extend_castLE [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) (i : Fin (d.length + 1)) :\n (d.extend hG).graphAfter\n (Fin.castLE (Nat.succ_le_succ (d.length_le_length_extend hG)) i) = d.graphAfter i :=\n let \u27e8_, hgraph, _, _\u27e9 := d.extend_spec hG\n hgraph i\n\n/-- Completing a partial ear decomposition preserves its initial graph. -/\ntheorem initial_extend [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) : (d.extend hG).initial = d.initial := by\n simpa only [initial_eq_graphAfter, Fin.castLE_zero] using d.graphAfter_extend_castLE hG 0\n\n/-- Completing a partial ear decomposition preserves all of its displayed ears. -/\n@[simp]\ntheorem earAt_extend_castLE [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) (i : Fin d.length) :\n (d.extend hG).earAt (Fin.castLE (d.length_le_length_extend hG) i) = d.earAt i :=\n let \u27e8_, _, hear, _\u27e9 := d.extend_spec hG\n hear i\n\n/-- Completing a partial ear decomposition preserves its initial stage data. -/\ntheorem heq_start_extend [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) : HEq (d.extend hG).start d.start :=\n let \u27e8_, _, _, hstart\u27e9 := d.extend_spec hG\n hstart\n\n/-- Completing a partial ear decomposition preserves whether it starts from a cycle. -/\n@[simp]\ntheorem start_isCycle_extend [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) : (d.extend hG).start.IsCycle \u2194 d.start.IsCycle :=\n EarStart.isCycle_iff_of_heq (by simpa using d.graphAfter_extend_castLE hG 0)\n (d.heq_start_extend hG)\n\n/-- Completing a partial ear decomposition preserves whether it starts from a single vertex. -/\n@[simp]\ntheorem isVertexStart_extend [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) : (d.extend hG).IsVertexStart \u2194 d.IsVertexStart := by\n simp only [isVertexStart_iff, d.initial_extend hG]\n\n/-- Taking the prefix of `d.extend hG` of length `d.length` recovers `d`. -/\ntheorem prefix_extend [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) :\n ((d.extend hG).prefix\n (Fin.castLE (Nat.succ_le_succ (d.length_le_length_extend hG)) (Fin.last d.length))).copy\n ((d.graphAfter_extend_castLE hG (Fin.last d.length)).trans d.graphAfter_last) = d := by\n let i\u2080 : Fin ((d.extend hG).length + 1) :=\n Fin.castLE (Nat.succ_le_succ (d.length_le_length_extend hG)) (Fin.last d.length)\n let hH : (d.extend hG).graphAfter i\u2080 = H :=\n (d.graphAfter_extend_castLE hG (Fin.last d.length)).trans d.graphAfter_last\n let p := ((d.extend hG).prefix i\u2080).copy hH\n have hi\u2080 : i\u2080.val = d.length := by simp [i\u2080]\n have hlen : p.length = d.length := by simp [p, hi\u2080]\n refine (ext d p hlen.symm\n (((heq_start_copy _ hH).trans (heq_start_prefix (d.extend hG) i\u2080)).trans\n (d.heq_start_extend hG)).symm\n ((Fin.heq_fun_iff hlen.symm).mpr fun j \u21a6 ?_)).symm\n let j' : Fin i\u2080.val := Fin.cast hi\u2080.symm j\n have hj\u2081 : Fin.cast (length_copy _ hH) (\u27e8j, hlen.symm \u25b8 j.isLt\u27e9 : Fin p.length) =\n Fin.cast (length_prefix (d.extend hG) i\u2080).symm j' :=\n Fin.ext (by simp [j'])\n have hj\u2082 : Fin.castLE (Nat.le_of_lt_succ i\u2080.isLt) j' =\n Fin.castLE (d.length_le_length_extend hG) j :=\n Fin.ext (by simp [j'])\n dsimp only [p]\n rw [earAt_copy, hj\u2081, earAt_prefix, hj\u2082, d.earAt_extend_castLE]\n\nend EarDecomposition\n\n/-- An ear decomposition of a prefix subgraph of a `2`-edge-connected multigraph with finitely many\nactual edges extends to an ear decomposition of the whole graph with the same initial graph. -/\ntheorem IsEdgeConnected.exists_earDecomposition_of_earDecomposition [Finite E(G)]\n (hG : G.IsEdgeConnected 2) (d\u2080 : G.EarDecomposition H) :\n \u2203 d : G.EarDecomposition G, d.initial = d\u2080.initial :=\n \u27e8d\u2080.extend hG, d\u2080.initial_extend hG\u27e9\n\n/-- Build an ear decomposition of a `2`-edge-connected multigraph with finitely many actual edges\nstarting from a prescribed actual vertex. -/\nnoncomputable def IsEdgeConnected.earDecompositionOfVertex [Finite E(G)] (hG : G.IsEdgeConnected 2)\n (v : V(G)) : G.EarDecomposition G :=\n (EarDecomposition.vertex v).extend hG\n\n/-- The ear decomposition built from a prescribed actual vertex has that vertex as initial graph. -/\ntheorem IsEdgeConnected.initial_earDecompositionOfVertex [Finite E(G)] (hG : G.IsEdgeConnected 2)\n (v : V(G)) : (hG.earDecompositionOfVertex v).initial = Graph.noEdge {v.val} \u03b2 := by\n rw [earDecompositionOfVertex, EarDecomposition.initial_extend, EarDecomposition.initial_vertex]\n\n@[simp]\ntheorem IsEdgeConnected.isVertexStart_earDecompositionOfVertex [Finite E(G)]\n (hG : G.IsEdgeConnected 2) (v : V(G)) :\n (hG.earDecompositionOfVertex v).IsVertexStart := by\n rw [earDecompositionOfVertex, EarDecomposition.isVertexStart_extend]\n exact EarDecomposition.isVertexStart_vertex v\n\n@[simp]\ntheorem IsEdgeConnected.not_start_isCycle_earDecompositionOfVertex [Finite E(G)]\n (hG : G.IsEdgeConnected 2) (v : V(G)) :\n \u00ac (hG.earDecompositionOfVertex v).start.IsCycle := by\n rw [earDecompositionOfVertex, EarDecomposition.start_isCycle_extend]\n exact EarDecomposition.not_start_isCycle_vertex v\n\n/-- A `2`-edge-connected multigraph with finitely many actual edges has a vertex-starting ear\ndecomposition beginning at any chosen actual vertex. -/\ntheorem IsEdgeConnected.exists_earDecomposition [Finite E(G)] (hG : G.IsEdgeConnected 2)\n (v : V(G)) : \u2203 d : G.EarDecomposition G, d.initial = Graph.noEdge {v.val} \u03b2 :=\n \u27e8hG.earDecompositionOfVertex v, hG.initial_earDecompositionOfVertex v\u27e9\n\n/-- Build an ear decomposition of a `2`-edge-connected multigraph with finitely many actual edges\nstarting from a prescribed cycle. -/\nnoncomputable def IsEdgeConnected.earDecompositionOfCycle [Finite E(G)] (hG : G.IsEdgeConnected 2)\n {s : \u03b1} (walk : G.Walk s s) (isCycle : walk.IsCycle) : G.EarDecomposition G :=\n (EarDecomposition.cycle walk isCycle).extend hG\n\n/-- The ear decomposition built from a prescribed cycle has its traced graph as initial graph. -/\ntheorem IsEdgeConnected.initial_earDecompositionOfCycle [Finite E(G)] (hG : G.IsEdgeConnected 2)\n {s : \u03b1} (walk : G.Walk s s) (isCycle : walk.IsCycle) :\n (hG.earDecompositionOfCycle walk isCycle).initial = G.walkGraph walk := by\n rw [earDecompositionOfCycle, EarDecomposition.initial_extend, EarDecomposition.initial_cycle]\n\n@[simp]\ntheorem IsEdgeConnected.start_isCycle_earDecompositionOfCycle [Finite E(G)]\n (hG : G.IsEdgeConnected 2) {s : \u03b1} (walk : G.Walk s s) (isCycle : walk.IsCycle) :\n (hG.earDecompositionOfCycle walk isCycle).start.IsCycle := by\n rw [earDecompositionOfCycle, EarDecomposition.start_isCycle_extend]\n exact EarDecomposition.start_isCycle_cycle walk isCycle\n\n/-- **Ear characterization of two-edge-connectivity** (vertex-started form). A multigraph with a\nnonempty actual vertex set and finitely many actual edges is `2`-edge-connected exactly when it\nadmits an ear decomposition built from one vertex by adjoining open or closed ears. -/\ntheorem isEdgeConnected_two_iff_exists_isVertexStart_earDecomposition\n [Finite E(G)] [Nonempty V(G)] :\n G.IsEdgeConnected 2 \u2194 \u2203 d : G.EarDecomposition G, d.IsVertexStart :=\n \u27e8fun hG \u21a6\n let v := Classical.arbitrary V(G)\n \u27e8hG.earDecompositionOfVertex v, hG.isVertexStart_earDecompositionOfVertex v\u27e9,\n fun \u27e8d, _\u27e9 \u21a6 d.isEdgeConnected_two\u27e9\n\n/-- **Ear characterization of two-edge-connectivity**. A multigraph with a nonempty actual vertex\nset and finitely many actual edges is `2`-edge-connected if and only if it admits an ear\ndecomposition. -/\ntheorem isEdgeConnected_two_iff_nonempty_earDecomposition [Finite E(G)] [Nonempty V(G)] :\n G.IsEdgeConnected 2 \u2194 Nonempty (G.EarDecomposition G) := by\n rw [nonempty_earDecomposition_iff_exists_isVertexStart,\n isEdgeConnected_two_iff_exists_isVertexStart_earDecomposition]\n\n/-- A multigraph with finitely many actual edges is connected and bridgeless if and only if it\nadmits an ear decomposition. Unlike `isEdgeConnected_two_iff_nonempty_earDecomposition`, no separate\nvertex-nonemptiness assumption is needed because both sides imply `V(G).Nonempty`. -/\ntheorem connected_and_forall_not_isBridge_iff_nonempty_earDecomposition [Finite E(G)] :\n (G.Connected \u2227 \u2200 e, \u00ac G.IsBridge e) \u2194 Nonempty (G.EarDecomposition G) := by\n constructor\n \u00b7 rintro \u27e8hconn, hnb\u27e9\n have : Nonempty V(G) := hconn.nonempty.to_subtype\n exact isEdgeConnected_two_iff_nonempty_earDecomposition.mp\n ((isEdgeConnected_two_iff_connected_and_forall_not_isBridge hconn.nonempty).mpr \u27e8hconn, hnb\u27e9)\n \u00b7 rintro \u27e8d\u27e9\n exact (isEdgeConnected_two_iff_connected_and_forall_not_isBridge d.vertexSet_nonempty).mp\n d.isEdgeConnected_two\n\nend Graph\n\nnamespace SimpleGraph\n\nvariable {\u03b1 : Type u}\n\n/-- **Ear characterization of `2`-edge-connected simple graphs** (vertex-started form). A simple\ngraph on a nonempty vertex type with finitely many edges is `2`-edge-connected if and only if\n`Graph.ofSimpleGraph H` admits an ear decomposition starting from a single vertex. -/\ntheorem isEdgeConnected_two_iff_exists_isVertexStart_earDecomposition (H : SimpleGraph \u03b1)\n [Finite H.edgeSet] [Nonempty \u03b1] :\n H.IsEdgeConnected 2 \u2194\n \u2203 d : (Graph.ofSimpleGraph H).EarDecomposition (Graph.ofSimpleGraph H),\n d.IsVertexStart := by\n have : Finite (Graph.ofSimpleGraph H).edgeSet := by\n rw [Graph.edgeSet_ofSimpleGraph]; infer_instance\n have : Nonempty (Graph.ofSimpleGraph H).vertexSet := by\n rw [Graph.vertexSet_ofSimpleGraph]; infer_instance\n rw [\u2190 Nat.cast_ofNat, \u2190 Graph.isEdgeConnected_ofSimpleGraph_iff,\n Graph.isEdgeConnected_two_iff_exists_isVertexStart_earDecomposition]\n\n/-- **Ear characterization of `2`-edge-connected simple graphs**. A simple graph on a nonempty\nvertex type with finitely many edges is `2`-edge-connected if and only if `Graph.ofSimpleGraph H`\nadmits an ear decomposition. -/\ntheorem isEdgeConnected_two_iff_nonempty_earDecomposition_ofSimpleGraph (H : SimpleGraph \u03b1)\n [Finite H.edgeSet] [Nonempty \u03b1] :\n H.IsEdgeConnected 2 \u2194\n Nonempty ((Graph.ofSimpleGraph H).EarDecomposition (Graph.ofSimpleGraph H)) := by\n have : Finite (Graph.ofSimpleGraph H).edgeSet := by\n rw [Graph.edgeSet_ofSimpleGraph]; infer_instance\n have : Nonempty (Graph.ofSimpleGraph H).vertexSet := by\n rw [Graph.vertexSet_ofSimpleGraph]; infer_instance\n rw [\u2190 Nat.cast_ofNat, \u2190 Graph.isEdgeConnected_ofSimpleGraph_iff,\n Graph.isEdgeConnected_two_iff_nonempty_earDecomposition]\n\nend SimpleGraph\n", "public_theorems": ["Graph.EarDecomposition.length_le_length_extend", "Graph.EarDecomposition.graphAfter_extend_castLE", "Graph.EarDecomposition.initial_extend", "Graph.EarDecomposition.earAt_extend_castLE", "Graph.EarDecomposition.heq_start_extend", "Graph.EarDecomposition.start_isCycle_extend", "Graph.EarDecomposition.isVertexStart_extend", "Graph.EarDecomposition.prefix_extend", "Graph.IsEdgeConnected.exists_earDecomposition_of_earDecomposition", "Graph.IsEdgeConnected.initial_earDecompositionOfVertex", "Graph.IsEdgeConnected.isVertexStart_earDecompositionOfVertex", "Graph.IsEdgeConnected.not_start_isCycle_earDecompositionOfVertex", "Graph.IsEdgeConnected.exists_earDecomposition", "Graph.IsEdgeConnected.initial_earDecompositionOfCycle", "Graph.IsEdgeConnected.start_isCycle_earDecompositionOfCycle", "Graph.isEdgeConnected_two_iff_exists_isVertexStart_earDecomposition", "Graph.isEdgeConnected_two_iff_nonempty_earDecomposition", "Graph.connected_and_forall_not_isBridge_iff_nonempty_earDecomposition", "SimpleGraph.isEdgeConnected_two_iff_exists_isVertexStart_earDecomposition", "SimpleGraph.isEdgeConnected_two_iff_nonempty_earDecomposition_ofSimpleGraph"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Combinatorics.Graph.Connectivity.Ear.EdgeConnected\npublic import TauCeti.Combinatorics.Graph.Connectivity.Ear.Extension\npublic import TauCeti.Combinatorics.Graph.Connectivity.Ear.VertexStart\n\nimport Mathlib.Data.Set.Card\n\n/-!\n# Ear characterization of two-edge-connected multigraphs\n\nA multigraph with a nonempty actual vertex set and finitely many actual edges is\n`2`-edge-connected exactly when it admits an ear decomposition (equivalently, a vertex-started ear\ndecomposition). The forward direction iterates the finiteness-free single-ear extension theorem\nfrom `Ear.Extension`: as long as a partial ear decomposition covers only a proper subgraph `H < G`,\n`2`-edge-connectivity supplies an open or closed ear over `H` that strictly shrinks `E(G) \\ E(H)`.\nFiniteness of `E(G)` alone makes this iteration terminate (`Graph.EarDecomposition.extend`), while\npreserving the starting partial decomposition as a prefix (`Graph.EarDecomposition.prefix_extend`).\n\nIn particular, starting from a prescribed actual vertex\n(`Graph.IsEdgeConnected.earDecompositionOfVertex`) or cycle\n(`Graph.IsEdgeConnected.earDecompositionOfCycle`) constructs a full ear decomposition beginning\nthere. Combined with cycle-to-vertex start normalization in `Ear.VertexStart` and the\nfiniteness-free converse in `Ear.EdgeConnected`, this gives both the vertex-started and unrestricted\near characterizations for multigraphs and, via `Graph.ofSimpleGraph`, for simple graphs.\n\nThe theorem goes back to H. E. Robbins (1939), *A theorem on graphs, with an application to a\nproblem of traffic control*, Amer. Math. Monthly 46, 281\u2013283; the argument follows R. Diestel,\n*Graph Theory*, Chapter 3, with edge identities retained for parallel edges and loops.\n\n## Main results\n\n* `Graph.EarDecomposition.extend`, `Graph.EarDecomposition.prefix_extend`: with finitely many\n actual edges, complete any partial ear decomposition to the whole graph while preserving it as a\n prefix.\n* `Graph.IsEdgeConnected.earDecompositionOfVertex`,\n `Graph.IsEdgeConnected.earDecompositionOfCycle`: construct an ear decomposition starting at a\n chosen actual vertex or cycle.\n* `Graph.isEdgeConnected_two_iff_exists_isVertexStart_earDecomposition`,\n `Graph.isEdgeConnected_two_iff_nonempty_earDecomposition`,\n `Graph.connected_and_forall_not_isBridge_iff_nonempty_earDecomposition`: ear characterizations of\n `2`-edge-connected multigraphs.\n* `SimpleGraph.isEdgeConnected_two_iff_exists_isVertexStart_earDecomposition`,\n `SimpleGraph.isEdgeConnected_two_iff_nonempty_earDecomposition_ofSimpleGraph`: the corresponding\n simple-graph characterizations via `Graph.ofSimpleGraph`.\n-/\n\npublic section\n\nopen Set\n\nuniverse u v\n\nnamespace Graph\n\nvariable {\u03b1 : Type u} {\u03b2 : Type v} {G H : Graph \u03b1 \u03b2}\n\nnamespace EarDecomposition", "open Classical in\n/-- Complete any partial ear decomposition in a `2`-edge-connected multigraph with finitely many\nactual edges to an ear decomposition of the whole multigraph. -/\nnoncomputable def extend [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) : G.EarDecomposition G :=\n if h : H = G then\n d.copy h\n else\n let ear : G.Ear H :=\n (d.vertexSet_nonempty.exists_ear_of_lt (lt_of_le_of_ne d.final_le h) hG).choose\n (d.snoc ear).extend hG\ntermination_by (E(G) \\ E(H)).ncard\ndecreasing_by exact ncard_sdiff_add_lt _", "/-- Completing a partial ear decomposition does not decrease its length. -/\ntheorem length_le_length_extend [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) : d.length \u2264 (d.extend hG).length :=", "/-- Completing a partial ear decomposition preserves all of its stage graphs. -/\n@[simp]\ntheorem graphAfter_extend_castLE [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) (i : Fin (d.length + 1)) :\n (d.extend hG).graphAfter\n (Fin.castLE (Nat.succ_le_succ (d.length_le_length_extend hG)) i) = d.graphAfter i :=", "/-- Completing a partial ear decomposition preserves its initial graph. -/\ntheorem initial_extend [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) : (d.extend hG).initial = d.initial :=", "/-- Completing a partial ear decomposition preserves all of its displayed ears. -/\n@[simp]\ntheorem earAt_extend_castLE [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) (i : Fin d.length) :\n (d.extend hG).earAt (Fin.castLE (d.length_le_length_extend hG) i) = d.earAt i :=", "/-- Completing a partial ear decomposition preserves its initial stage data. -/\ntheorem heq_start_extend [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) : HEq (d.extend hG).start d.start :=", "/-- Completing a partial ear decomposition preserves whether it starts from a cycle. -/\n@[simp]\ntheorem start_isCycle_extend [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) : (d.extend hG).start.IsCycle \u2194 d.start.IsCycle :=", "/-- Completing a partial ear decomposition preserves whether it starts from a single vertex. -/\n@[simp]\ntheorem isVertexStart_extend [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) : (d.extend hG).IsVertexStart \u2194 d.IsVertexStart :=", "/-- Taking the prefix of `d.extend hG` of length `d.length` recovers `d`. -/\ntheorem prefix_extend [Finite E(G)] (hG : G.IsEdgeConnected 2) {H : Graph \u03b1 \u03b2}\n (d : G.EarDecomposition H) :\n ((d.extend hG).prefix\n (Fin.castLE (Nat.succ_le_succ (d.length_le_length_extend hG)) (Fin.last d.length))).copy\n ((d.graphAfter_extend_castLE hG (Fin.last d.length)).trans d.graphAfter_last) = d :=", "end EarDecomposition", "/-- An ear decomposition of a prefix subgraph of a `2`-edge-connected multigraph with finitely many\nactual edges extends to an ear decomposition of the whole graph with the same initial graph. -/\ntheorem IsEdgeConnected.exists_earDecomposition_of_earDecomposition [Finite E(G)]\n (hG : G.IsEdgeConnected 2) (d\u2080 : G.EarDecomposition H) :\n \u2203 d : G.EarDecomposition G, d.initial = d\u2080.initial :=", "/-- Build an ear decomposition of a `2`-edge-connected multigraph with finitely many actual edges\nstarting from a prescribed actual vertex. -/\nnoncomputable def IsEdgeConnected.earDecompositionOfVertex [Finite E(G)] (hG : G.IsEdgeConnected 2)\n (v : V(G)) : G.EarDecomposition G :=\n (EarDecomposition.vertex v).extend hG", "/-- The ear decomposition built from a prescribed actual vertex has that vertex as initial graph. -/\ntheorem IsEdgeConnected.initial_earDecompositionOfVertex [Finite E(G)] (hG : G.IsEdgeConnected 2)\n (v : V(G)) : (hG.earDecompositionOfVertex v).initial = Graph.noEdge {v.val} \u03b2 :=", "@[simp]\ntheorem IsEdgeConnected.isVertexStart_earDecompositionOfVertex [Finite E(G)]\n (hG : G.IsEdgeConnected 2) (v : V(G)) :\n (hG.earDecompositionOfVertex v).IsVertexStart :=", "@[simp]\ntheorem IsEdgeConnected.not_start_isCycle_earDecompositionOfVertex [Finite E(G)]\n (hG : G.IsEdgeConnected 2) (v : V(G)) :\n \u00ac (hG.earDecompositionOfVertex v).start.IsCycle :=", "/-- A `2`-edge-connected multigraph with finitely many actual edges has a vertex-starting ear\ndecomposition beginning at any chosen actual vertex. -/\ntheorem IsEdgeConnected.exists_earDecomposition [Finite E(G)] (hG : G.IsEdgeConnected 2)\n (v : V(G)) : \u2203 d : G.EarDecomposition G, d.initial = Graph.noEdge {v.val} \u03b2 :=", "/-- Build an ear decomposition of a `2`-edge-connected multigraph with finitely many actual edges\nstarting from a prescribed cycle. -/\nnoncomputable def IsEdgeConnected.earDecompositionOfCycle [Finite E(G)] (hG : G.IsEdgeConnected 2)\n {s : \u03b1} (walk : G.Walk s s) (isCycle : walk.IsCycle) : G.EarDecomposition G :=\n (EarDecomposition.cycle walk isCycle).extend hG", "/-- The ear decomposition built from a prescribed cycle has its traced graph as initial graph. -/\ntheorem IsEdgeConnected.initial_earDecompositionOfCycle [Finite E(G)] (hG : G.IsEdgeConnected 2)\n {s : \u03b1} (walk : G.Walk s s) (isCycle : walk.IsCycle) :\n (hG.earDecompositionOfCycle walk isCycle).initial = G.walkGraph walk :=", "@[simp]\ntheorem IsEdgeConnected.start_isCycle_earDecompositionOfCycle [Finite E(G)]\n (hG : G.IsEdgeConnected 2) {s : \u03b1} (walk : G.Walk s s) (isCycle : walk.IsCycle) :\n (hG.earDecompositionOfCycle walk isCycle).start.IsCycle :=", "/-- **Ear characterization of two-edge-connectivity** (vertex-started form). A multigraph with a\nnonempty actual vertex set and finitely many actual edges is `2`-edge-connected exactly when it\nadmits an ear decomposition built from one vertex by adjoining open or closed ears. -/\ntheorem isEdgeConnected_two_iff_exists_isVertexStart_earDecomposition\n [Finite E(G)] [Nonempty V(G)] :\n G.IsEdgeConnected 2 \u2194 \u2203 d : G.EarDecomposition G, d.IsVertexStart :=", "/-- **Ear characterization of two-edge-connectivity**. A multigraph with a nonempty actual vertex\nset and finitely many actual edges is `2`-edge-connected if and only if it admits an ear\ndecomposition. -/\ntheorem isEdgeConnected_two_iff_nonempty_earDecomposition [Finite E(G)] [Nonempty V(G)] :\n G.IsEdgeConnected 2 \u2194 Nonempty (G.EarDecomposition G) :=", "/-- A multigraph with finitely many actual edges is connected and bridgeless if and only if it\nadmits an ear decomposition. Unlike `isEdgeConnected_two_iff_nonempty_earDecomposition`, no separate\nvertex-nonemptiness assumption is needed because both sides imply `V(G).Nonempty`. -/\ntheorem connected_and_forall_not_isBridge_iff_nonempty_earDecomposition [Finite E(G)] :\n (G.Connected \u2227 \u2200 e, \u00ac G.IsBridge e) \u2194 Nonempty (G.EarDecomposition G) :=", "end Graph\n\nnamespace SimpleGraph\n\nvariable {\u03b1 : Type u}", "/-- **Ear characterization of `2`-edge-connected simple graphs** (vertex-started form). A simple\ngraph on a nonempty vertex type with finitely many edges is `2`-edge-connected if and only if\n`Graph.ofSimpleGraph H` admits an ear decomposition starting from a single vertex. -/\ntheorem isEdgeConnected_two_iff_exists_isVertexStart_earDecomposition (H : SimpleGraph \u03b1)\n [Finite H.edgeSet] [Nonempty \u03b1] :\n H.IsEdgeConnected 2 \u2194\n \u2203 d : (Graph.ofSimpleGraph H).EarDecomposition (Graph.ofSimpleGraph H),\n d.IsVertexStart :=", "/-- **Ear characterization of `2`-edge-connected simple graphs**. A simple graph on a nonempty\nvertex type with finitely many edges is `2`-edge-connected if and only if `Graph.ofSimpleGraph H`\nadmits an ear decomposition. -/\ntheorem isEdgeConnected_two_iff_nonempty_earDecomposition_ofSimpleGraph (H : SimpleGraph \u03b1)\n [Finite H.edgeSet] [Nonempty \u03b1] :\n H.IsEdgeConnected 2 \u2194\n Nonempty ((Graph.ofSimpleGraph H).EarDecomposition (Graph.ofSimpleGraph H)) :=", "end SimpleGraph"], "free_length": 5031, "file_length": 10174, "heartbeats": 3723, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.RepresentationTheory.Homological.GroupCohomology.Cocycle.SelmerModule", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/RepresentationTheory/Homological/GroupCohomology/Cocycle/SelmerModule.lean", "module": "TauCeti.RepresentationTheory.Homological.GroupCohomology.Cocycle.SelmerModule", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Algebra.Module.Torsion.Basic\npublic import Mathlib.LinearAlgebra.Finsupp.LinearCombination\npublic import Mathlib.RingTheory.Length\npublic import Mathlib.Topology.LocallyConstant.Basic\npublic import TauCeti.LinearAlgebra.Matrix.Module\npublic import TauCeti.RingTheory.MatlisDuality.PrincipalIdealRing\n\n/-!\n# Selmer modules of cocycles\n\nLet `G` be a topological group (a topological space with a multiplication suffices), `O` a\ncommutative ring, `A` an `O`-algebra and `\u03c1 : G \u2192 A` a map, typically a matrix representation\n`G \u2192 M\u2099(O)`. For an `A`-module `V`, a `\u03c1`-cocycle is a map\n`c : G \u2192 V` with `c (g * h) = c g + \u03c1 g \u2022 c h`. A *relation* is a finitely supported function\n`R : G \u2192\u2080 A`, and `c` *obeys* `R` when `\u2211_g R(g) \u2022 c(g) = 0`, that is when Mathlib's\n`Finsupp.linearCombination A c R` vanishes. For a set `X \u2286 G` and a set `L` of relations, the\n**Selmer module** `Sel(\u03c1, X, L; V)` (`TauCeti.cocycleSelmerModule O V \u03c1 X L`) is the `O`-module of\nthe locally constant `\u03c1`-cocycles `c : G \u2192 V` that vanish on `X` and obey every relation of `L`.\nThe cocycle identity is Mathlib's `groupCohomology.IsCocycle\u2081` for `G` acting on `V` through `\u03c1`;\nthat action is not an instance here, since `\u03c1` is an arbitrary map and the coefficients `V` vary\nwhile `\u03c1` and the relations stay fixed.\n\nIn the arithmetic application `G = Gal(\u03a9/E)` for a number field `E` inside a field `\u03a9`,\n`\u03c1 : G \u2192 M\u2099(O)`, `V = B\u207f` for an `O`-module `B`, with `M\u2099(O)` acting on `B\u207f` by Mathlib's\n`Matrix.Module.matrixModule`, and `X` is the union of the inertia groups at the places of `\u03a9` above\nthe finite places of `E` outside a set `S` (`TauCeti.GaloisRep.inertiaAbove`): the members are the\nlocally constant cocycles unramified outside `S`. The relations carry the remaining local\nconditions, for instance `c(\u03b3) = 0` at a single element, or linear conditions on the restriction\nof `c` to a decomposition group. The ring `O` and the relations are fixed while the coefficients\n`B` vary, typically between `O/a` and `K/O` for the fraction field `K` of `O`.\n\nThis is a module of cocycles, not of cohomology classes. A relation such as `c(\u03b3) = 0` is not\ninvariant under adding coboundaries, so the module is not the Selmer group of a Selmer structure\non `H\u00b9` (`TauCeti.ContCohomology.SelmerStructure`), whose local conditions are subgroups of local\ncohomology groups. In the module-theoretic language of `TauCeti.SelmerData` it is the Selmer\nmodule on the module of locally constant `\u03c1`-cocycles, with the evaluations at the elements of\n`X` and the maps `c \u21a6 \u2211_g R(g) \u2022 c(g)` for `R \u2208 L` as localisation maps to `V`, and zero local\nconditions. Classes and cocycles meet in the vanishing conditions: where `\u03c1` is trivial on a\nsubgroup `I`, a cocycle vanishing on `I` is the cocycle form of the unramified local condition at\n`I` (`TauCeti/RepresentationTheory/Homological/ContCohomology/Unramified.lean`).\n\nEvery defining condition is a condition on the values of `c`, so an injective `A`-linear map\n`f : V \u2192 W` of coefficients preserves and reflects membership\n(`TauCeti.comp_mem_cocycleSelmerModule_iff`). If moreover `f` maps onto the `a`-torsion of `W`,\ncomposition with `f` identifies `Sel(\u03c1, X, L; V)` with the `a`-torsion of `Sel(\u03c1, X, L; W)`. For a\ndomain `O` with fraction field `K` and `a \u2260 0`, division by `a` embeds `O/a` onto the `a`-torsion of\n`K/O`, so the Selmer module with coefficients `(O/a)\u207f` has the length of the `a`-torsion of the\none with coefficients `(K/O)\u207f`, and at most the length of the latter, the *divisible Selmer\nlength*.\n\n## Main definitions\n\n* `TauCeti.cocycleSelmerModule O V \u03c1 X L`: the Selmer module of cocycles.\n* `TauCeti.cocycleSelmerModuleMap O \u03c1 X L f`: composition with an `A`-linear map `f : V \u2192 W` of\n coefficients.\n\n## Main results\n\n* `TauCeti.mem_cocycleSelmerModule_iff`: the defining conditions.\n* `TauCeti.cocycleSelmerModule_anti`: fewer vanishing conditions and fewer relations give a larger\n module.\n* `TauCeti.smul_sub_mem_cocycleSelmerModule`: for multiplicative `\u03c1`, the coboundaries\n `g \u21a6 \u03c1 g \u2022 v - v` are cocycles.\n* `TauCeti.comp_mem_cocycleSelmerModule_iff`, `TauCeti.cocycleSelmerModule_eq_comap`: an injective\n map of coefficients preserves and reflects membership.\n* `TauCeti.range_cocycleSelmerModuleMap`: for `f` injective onto the `a`-torsion of `W`,\n composition with `f` maps `Sel(\u03c1, X, L; V)` onto the `a`-torsion of `Sel(\u03c1, X, L; W)`.\n* `TauCeti.length_cocycleSelmerModule_eq_length_torsionBy` and\n `TauCeti.length_cocycleSelmerModule_le_of_injective`: the corresponding statements on lengths.\n* `TauCeti.range_restrictScalars_mapMatrixModule`: if `f : M \u2192 N` has image the `a`-torsion of\n `N`, then `f` applied in each coordinate has image the `a`-torsion of `N\u207f`.\n* `TauCeti.range_cocycleSelmerModuleMap_mapMatrixModule`: for `\u03c1 : G \u2192 M\u2099(O)` and `f : M \u2192 N`\n injective onto the `a`-torsion of `N`, such as `O/a \u2192 B`, composition with `f` in each\n coordinate maps `Sel(\u03c1, X, L; M\u207f)` onto the `a`-torsion of `Sel(\u03c1, X, L; N\u207f)`.\n* `TauCeti.length_cocycleSelmerModule_quotient_eq_length_torsionBy` and\n `TauCeti.length_cocycleSelmerModule_quotient_le`: for `\u03c1 : G \u2192 M\u2099(O)` over a domain `O` with\n fraction field `K` and `a \u2260 0`, the length with coefficients `(O/a)\u207f` is that of the `a`-torsion\n with coefficients `(K/O)\u207f`, and at most the length with coefficients `(K/O)\u207f`.\n\n## References\n\n* K. Rubin, *Euler Systems*, Annals of Mathematics Studies 147, Princeton University Press,\n 2000, Chapter 1: the comparison of `H\u00b9` with coefficients `W[a]` and the `a`-torsion of\n `H\u00b9` with coefficients `W`, of which the comparison here is the cocycle form.\n\n## Provenance\n\nThe definition and the comparison of torsion and divisible coefficients follow the statements of\n`New.selmerModule` (`src/Lib/GaloisRep/Main/SelmerModules.lean`) and\n`New.Selmer.range_selmerModuleMapOfInjective`, `New.Selmer.length_selmerModule_le_divisibleQuot`\n(`src/Lib/GaloisRep/Main/DivisibleSelmerModules.lean`) in grh-lean\n(https://github.com/lsernau/grh-lean, Apache 2.0, Copyright 2026 Anthropic, PBC), which concern\n`Gal(\u03a9/E)`, matrix representations and a discrete valuation ring `O`. **Adapted, not copied**:\nhere `\u03c1` takes values in any `O`-algebra acting on the coefficients, `G` is any topological space\nwith a multiplication and the vanishing conditions are on an arbitrary subset of it, and the\ncomparison is stated for any injective map onto the `a`-torsion, and for `O/a \u2192 K/O` over any\ndomain `O`.\n-/\n\npublic section\n\nopen Function Submodule\n\nnamespace TauCeti\n\nsection Definition\n\nvariable {G : Type*} [Mul G] [TopologicalSpace G] (O : Type*) {A : Type*} [CommSemiring O]\n [Semiring A] [Algebra O A] (V : Type*) [AddCommMonoid V] [Module A V] [Module O V]\n [IsScalarTower O A V]\n\n/-- **The Selmer module of cocycles** `Sel(\u03c1, X, L; V)`: the `O`-module of locally constant maps\n`c : G \u2192 V` with `c (g * h) = c g + \u03c1 g \u2022 c h` (`\u03c1`-cocycles) that vanish on `X` and obey every\nrelation `R \u2208 L`, that is `\u2211_g R(g) \u2022 c(g) = 0`. For `G = Gal(\u03a9/E)`, `V = B\u207f` and `X` the union\nof the inertia groups above the places outside a set `S` (`TauCeti.GaloisRep.inertiaAbove`), it is\nthe Selmer module of the cocycles unramified outside `S` obeying `L`. -/\ndef cocycleSelmerModule (\u03c1 : G \u2192 A) (X : Set G) (L : Set (G \u2192\u2080 A)) : Submodule O (G \u2192 V) where\n carrier := {c | IsLocallyConstant c \u2227 (\u2200 g h, c (g * h) = c g + \u03c1 g \u2022 c h) \u2227\n (\u2200 g \u2208 X, c g = 0) \u2227 \u2200 R \u2208 L, Finsupp.linearCombination A c R = 0}\n add_mem' := by\n rintro c c' \u27e8hc, hcoc, hX, hL\u27e9 \u27e8hc', hcoc', hX', hL'\u27e9\n refine \u27e8hc.add hc', fun g h \u21a6 ?_, fun g hg \u21a6 ?_, fun R hR \u21a6 ?_\u27e9\n \u00b7 simp only [Pi.add_apply, hcoc, hcoc', smul_add]\n abel\n \u00b7 simp [hX g hg, hX' g hg]\n \u00b7 have h\u2081 := hL R hR\n have h\u2082 := hL' R hR\n rw [Finsupp.linearCombination_apply] at h\u2081 h\u2082 \u22a2\n simp only [Pi.add_apply, smul_add, Finsupp.sum_add, h\u2081, h\u2082, add_zero]\n zero_mem' := \u27e8IsLocallyConstant.const 0, by simp, by simp, by simp\u27e9\n smul_mem' := by\n rintro r c \u27e8hc, hcoc, hX, hL\u27e9\n refine \u27e8hc.comp (r \u2022 \u00b7), fun g h \u21a6 ?_, fun g hg \u21a6 ?_, fun R hR \u21a6 ?_\u27e9\n \u00b7 simp only [Pi.smul_apply, hcoc, smul_add, smul_comm r (\u03c1 g)]\n \u00b7 simp [hX g hg]\n \u00b7 have h := hL R hR\n rw [Finsupp.linearCombination_apply] at h \u22a2\n simp only [Pi.smul_apply, smul_comm _ r, \u2190 Finsupp.smul_sum, h, smul_zero]\n\nvariable {O V} {\u03c1 : G \u2192 A} {X : Set G} {L : Set (G \u2192\u2080 A)} {c : G \u2192 V}\n\n/-- Membership in the Selmer module: `c` is a locally constant `\u03c1`-cocycle vanishing on `X` and\nobeying every relation of `L`. -/\n@[simp]\ntheorem mem_cocycleSelmerModule_iff :\n c \u2208 cocycleSelmerModule O V \u03c1 X L \u2194 IsLocallyConstant c \u2227\n (\u2200 g h, c (g * h) = c g + \u03c1 g \u2022 c h) \u2227 (\u2200 g \u2208 X, c g = 0) \u2227\n \u2200 R \u2208 L, Finsupp.linearCombination A c R = 0 :=\n Iff.rfl\n\n/-- A member of the Selmer module is locally constant. -/\ntheorem isLocallyConstant_of_mem_cocycleSelmerModule (hc : c \u2208 cocycleSelmerModule O V \u03c1 X L) :\n IsLocallyConstant c :=\n hc.1\n\n/-- A member of the Selmer module is a `\u03c1`-cocycle. -/\ntheorem apply_mul_of_mem_cocycleSelmerModule (hc : c \u2208 cocycleSelmerModule O V \u03c1 X L) (g h : G) :\n c (g * h) = c g + \u03c1 g \u2022 c h :=\n hc.2.1 g h\n\n/-- A member of the Selmer module vanishes on `X`. -/\ntheorem apply_eq_zero_of_mem_cocycleSelmerModule (hc : c \u2208 cocycleSelmerModule O V \u03c1 X L) {g : G}\n (hg : g \u2208 X) : c g = 0 :=\n hc.2.2.1 g hg\n\n/-- A member of the Selmer module obeys every relation of `L`. -/\ntheorem linearCombination_eq_zero_of_mem_cocycleSelmerModule\n (hc : c \u2208 cocycleSelmerModule O V \u03c1 X L) {R : G \u2192\u2080 A} (hR : R \u2208 L) :\n Finsupp.linearCombination A c R = 0 :=\n hc.2.2.2 R hR\n\n/-- **The Selmer module is antitone in the conditions**: dropping vanishing conditions and\nrelations gives a larger module. -/\ntheorem cocycleSelmerModule_anti {X' : Set G} {L' : Set (G \u2192\u2080 A)} (hX : X' \u2286 X) (hL : L' \u2286 L) :\n cocycleSelmerModule O V \u03c1 X L \u2264 cocycleSelmerModule O V \u03c1 X' L' :=\n fun _ \u27e8hc, hcoc, hX\u2080, hL\u2080\u27e9 \u21a6 \u27e8hc, hcoc, fun g hg \u21a6 hX\u2080 g (hX hg), fun R hR \u21a6 hL\u2080 R (hL hR)\u27e9\n\nend Definition\n\nsection Coboundary\n\nvariable {G : Type*} [Mul G] [TopologicalSpace G] {O : Type*} {A : Type*} [CommSemiring O]\n [Semiring A] [Algebra O A] {V : Type*} [AddCommGroup V] [Module A V] [Module O V]\n [IsScalarTower O A V] {\u03c1 : G \u2192 A}\n\n/-- **Coboundaries are cocycles.** If `\u03c1` is multiplicative, then for `v : V` with\n`g \u21a6 \u03c1 g \u2022 v` locally constant, the coboundary `g \u21a6 \u03c1 g \u2022 v - v` lies in the Selmer module with\nno vanishing conditions and no relations. -/\ntheorem smul_sub_mem_cocycleSelmerModule (hmul : \u2200 g h, \u03c1 (g * h) = \u03c1 g * \u03c1 h) {v : V}\n (hv : IsLocallyConstant fun g \u21a6 \u03c1 g \u2022 v) :\n (fun g \u21a6 \u03c1 g \u2022 v - v) \u2208 cocycleSelmerModule O V \u03c1 \u2205 \u2205 := by\n refine \u27e8hv.sub (IsLocallyConstant.const v), fun g h \u21a6 ?_, by simp, by simp\u27e9\n simp only [hmul, mul_smul, smul_sub]\n abel\n\nend Coboundary\n\nsection Map\n\nvariable {G : Type*} [Mul G] [TopologicalSpace G] (O : Type*) {A : Type*} [CommSemiring O]\n [Semiring A] [Algebra O A] {V W U : Type*} [AddCommMonoid V] [Module A V] [Module O V]\n [IsScalarTower O A V] [AddCommMonoid W] [Module A W] [Module O W] [IsScalarTower O A W]\n [AddCommMonoid U] [Module A U] [Module O U] [IsScalarTower O A U]\n {\u03c1 : G \u2192 A} {X : Set G} {L : Set (G \u2192\u2080 A)} {c : G \u2192 V} {f : V \u2192\u2097[A] W}\n\nvariable {O} in\n/-- **Composition with an `A`-linear map of coefficients preserves the Selmer module.** -/\ntheorem comp_mem_cocycleSelmerModule (hc : c \u2208 cocycleSelmerModule O V \u03c1 X L) :\n f \u2218 c \u2208 cocycleSelmerModule O W \u03c1 X L := by\n obtain \u27e8hc, hcoc, hX, hL\u27e9 := hc\n refine \u27e8hc.comp f, fun g h \u21a6 ?_, fun g hg \u21a6 ?_, fun R hR \u21a6 ?_\u27e9\n \u00b7 simp [hcoc]\n \u00b7 simp [hX g hg]\n \u00b7 rw [\u2190 Finsupp.apply_linearCombination, hL R hR, map_zero]\n\nvariable {O} in\n/-- **An injective map of coefficients preserves and reflects the Selmer module**: for `f`\ninjective, `f \u2218 c` is a member exactly when `c` is. -/\ntheorem comp_mem_cocycleSelmerModule_iff (hf : Injective f) :\n f \u2218 c \u2208 cocycleSelmerModule O W \u03c1 X L \u2194 c \u2208 cocycleSelmerModule O V \u03c1 X L := by\n refine \u27e8fun \u27e8hc, hcoc, hX, hL\u27e9 \u21a6 \u27e8hc.desc _ _ hf, fun g h \u21a6 hf ?_, fun g hg \u21a6 hf ?_,\n fun R hR \u21a6 hf ?_\u27e9, comp_mem_cocycleSelmerModule\u27e9\n \u00b7 simpa using hcoc g h\n \u00b7 simpa using hX g hg\n \u00b7 rw [Finsupp.apply_linearCombination, hL R hR, map_zero]\n\n/-- For an injective map of coefficients `f : V \u2192 W`, the Selmer module with coefficients `V` is\nthe preimage of the one with coefficients `W` under composition with `f`. -/\ntheorem cocycleSelmerModule_eq_comap (hf : Injective f) :\n cocycleSelmerModule O V \u03c1 X L =\n (cocycleSelmerModule O W \u03c1 X L).comap ((f.restrictScalars O).compLeft G) :=\n Submodule.ext fun _ \u21a6 (comp_mem_cocycleSelmerModule_iff hf).symm\n\nvariable (\u03c1 X L) in\n/-- **Functoriality in the coefficients**: composition with an `A`-linear map `f : V \u2192 W`, as an\n`O`-linear map `Sel(\u03c1, X, L; V) \u2192 Sel(\u03c1, X, L; W)`. -/\ndef cocycleSelmerModuleMap (f : V \u2192\u2097[A] W) :\n cocycleSelmerModule O V \u03c1 X L \u2192\u2097[O] cocycleSelmerModule O W \u03c1 X L :=\n ((f.restrictScalars O).compLeft G).restrict fun _ \u21a6 comp_mem_cocycleSelmerModule\n\n/-- The image of a cocycle under `cocycleSelmerModuleMap` is its composition with `f`. -/\n@[simp]\ntheorem coe_cocycleSelmerModuleMap_apply (c : cocycleSelmerModule O V \u03c1 X L) :\n (cocycleSelmerModuleMap O \u03c1 X L f c : G \u2192 W) = f \u2218 c :=\n (rfl)\n\nvariable (\u03c1 X L V) in\n/-- Composition with the identity is the identity. -/\n@[simp]\ntheorem cocycleSelmerModuleMap_id :\n cocycleSelmerModuleMap O \u03c1 X L (LinearMap.id : V \u2192\u2097[A] V) = LinearMap.id :=\n (rfl)\n\n/-- Composition with `g \u2218 f` is composition with `f` followed by composition with `g`. -/\ntheorem cocycleSelmerModuleMap_comp (g : W \u2192\u2097[A] U) :\n cocycleSelmerModuleMap O \u03c1 X L (g \u2218\u2097 f) =\n cocycleSelmerModuleMap O \u03c1 X L g \u2218\u2097 cocycleSelmerModuleMap O \u03c1 X L f :=\n (rfl)\n\n/-- Composition with an injective map of coefficients is injective. -/\ntheorem cocycleSelmerModuleMap_injective (hf : Injective f) :\n Injective (cocycleSelmerModuleMap O \u03c1 X L f) :=\n fun _ _ h \u21a6 Subtype.ext <| hf.comp_left <| by simpa using congrArg Subtype.val h\n\n/-- **Torsion coefficients.** If `f : V \u2192 W` is injective with image the `a`-torsion of `W`,\ncomposition with `f` maps the Selmer module with coefficients `V` onto the `a`-torsion of the\nSelmer module with coefficients `W`. -/\ntheorem range_cocycleSelmerModuleMap (hf : Injective f) {a : O}\n (hrange : LinearMap.range (f.restrictScalars O) = torsionBy O W a) :\n LinearMap.range (cocycleSelmerModuleMap O \u03c1 X L f) =\n torsionBy O (cocycleSelmerModule O W \u03c1 X L) a := by\n have hmem (w : W) : w \u2208 torsionBy O W a \u2194 \u2203 v, f v = w := by\n rw [\u2190 hrange, LinearMap.mem_range, LinearMap.coe_restrictScalars]\n ext \u27e8c, hc\u27e9\n simp only [LinearMap.mem_range, Subtype.ext_iff, coe_cocycleSelmerModuleMap_apply,\n mem_torsionBy_iff, Submodule.coe_smul, ZeroMemClass.coe_zero, funext_iff, Pi.smul_apply,\n Pi.zero_apply, Function.comp_apply]\n refine \u27e8fun \u27e8c', hc'\u27e9 g \u21a6 ?_, fun h \u21a6 ?_\u27e9\n \u00b7 rw [\u2190 hc', \u2190 mem_torsionBy_iff, hmem]\n exact \u27e8_, rfl\u27e9\n \u00b7 choose c' hc' using fun g \u21a6 (hmem (c g)).mp ((mem_torsionBy_iff _ _).mpr (h g))\n have hfc : f \u2218 c' = c := funext hc'\n exact \u27e8\u27e8c', (comp_mem_cocycleSelmerModule_iff hf).mp (hfc \u25b8 hc)\u27e9, hc'\u27e9\n\nend Map\n\nsection Length\n\nvariable {G : Type*} [Mul G] [TopologicalSpace G] {O : Type*} {A : Type*} [CommRing O]\n [Semiring A] [Algebra O A] {V W : Type*} [AddCommGroup V] [Module A V] [Module O V]\n [IsScalarTower O A V] [AddCommGroup W] [Module A W] [Module O W] [IsScalarTower O A W]\n {\u03c1 : G \u2192 A} {X : Set G} {L : Set (G \u2192\u2080 A)} {f : V \u2192\u2097[A] W}\n\n/-- An injective map of coefficients does not decrease the length of the Selmer module. -/\ntheorem length_cocycleSelmerModule_le_of_injective (hf : Injective f) :\n Module.length O (cocycleSelmerModule O V \u03c1 X L) \u2264\n Module.length O (cocycleSelmerModule O W \u03c1 X L) :=\n Module.length_le_of_injective _ (cocycleSelmerModuleMap_injective O hf)\n\n/-- If `f : V \u2192 W` is injective with image the `a`-torsion of `W`, the Selmer module with\ncoefficients `V` has the length of the `a`-torsion of the Selmer module with coefficients `W`. -/\ntheorem length_cocycleSelmerModule_eq_length_torsionBy (hf : Injective f) {a : O}\n (hrange : LinearMap.range (f.restrictScalars O) = torsionBy O W a) :\n Module.length O (cocycleSelmerModule O V \u03c1 X L) =\n Module.length O (torsionBy O (cocycleSelmerModule O W \u03c1 X L) a) :=\n ((LinearEquiv.ofInjective _ (cocycleSelmerModuleMap_injective O hf)).trans\n (LinearEquiv.ofEq _ _ (range_cocycleSelmerModuleMap O hf hrange))).length_eq\n\nend Length\n\nsection Matrix\n\nopen Matrix.Module\n\nvariable {G : Type*} [Mul G] [TopologicalSpace G] {O : Type*} [CommRing O] {n : Type*}\n [Fintype n] [DecidableEq n] (\u03c1 : G \u2192 Matrix n n O) (X : Set G) (L : Set (G \u2192\u2080 Matrix n n O))\n {M N : Type*} [AddCommGroup M] [Module O M] [AddCommGroup N] [Module O N] {a : O}\n\n/-- If `f : M \u2192 N` has image the `a`-torsion of `N`, then `f` applied in each coordinate has\nimage the `a`-torsion of `N\u207f`. -/\ntheorem range_restrictScalars_mapMatrixModule {f : M \u2192\u2097[O] N}\n (hrange : LinearMap.range f = torsionBy O N a) :\n LinearMap.range ((f.mapMatrixModule n).restrictScalars O) = torsionBy O (n \u2192 N) a := by\n ext w\n simp [LinearMap.restrictScalars_mapMatrixModule, LinearMap.range_compLeft, hrange,\n Submodule.mem_pi, funext_iff]\n\n/-- **Torsion coefficients, for matrix representations.** If `f : M \u2192 N` is injective with image\nthe `a`-torsion of `N`, for instance `f : O/a \u2192 B`, then composition with `f` applied in each\ncoordinate maps the Selmer module with coefficients `M\u207f` onto the `a`-torsion of the Selmer\nmodule with coefficients `N\u207f`. -/\ntheorem range_cocycleSelmerModuleMap_mapMatrixModule {f : M \u2192\u2097[O] N} (hf : Injective f)\n (hrange : LinearMap.range f = torsionBy O N a) :\n LinearMap.range (cocycleSelmerModuleMap O \u03c1 X L (f.mapMatrixModule n)) =\n torsionBy O (cocycleSelmerModule O (n \u2192 N) \u03c1 X L) a :=\n range_cocycleSelmerModuleMap O (LinearMap.mapMatrixModule_injective hf)\n (range_restrictScalars_mapMatrixModule hrange)\n\nvariable (K : Type*) [Field K] [Algebra O K] [IsFractionRing O K]\n\n/-- **Torsion and divisible coefficients.** For `\u03c1 : G \u2192 M\u2099(O)` over a domain `O` with fraction\nfield `K` and `a \u2260 0`, the Selmer module with coefficients `(O/a)\u207f` has the length of the\n`a`-torsion of the Selmer module with coefficients `(K/O)\u207f`. -/\ntheorem length_cocycleSelmerModule_quotient_eq_length_torsionBy (ha : a \u2260 0) :\n Module.length O (cocycleSelmerModule O (n \u2192 O \u29f8 Ideal.span {a}) \u03c1 X L) =\n Module.length O (torsionBy O\n (cocycleSelmerModule O (n \u2192 K \u29f8 LinearMap.range (Algebra.linearMap O K)) \u03c1 X L) a) :=\n length_cocycleSelmerModule_eq_length_torsionBy\n (LinearMap.mapMatrixModule_injective (divQuotient_injective ha))\n (range_restrictScalars_mapMatrixModule (range_divQuotient ha))\n\n/-- **The divisible Selmer length bounds the torsion ones.** For `\u03c1 : G \u2192 M\u2099(O)` over a domain `O`\nwith fraction field `K` and `a \u2260 0`, the length of the Selmer module with coefficients `(O/a)\u207f` is\nat most the length of the Selmer module with coefficients `(K/O)\u207f`. -/\ntheorem length_cocycleSelmerModule_quotient_le (ha : a \u2260 0) :\n Module.length O (cocycleSelmerModule O (n \u2192 O \u29f8 Ideal.span {a}) \u03c1 X L) \u2264\n Module.length O\n (cocycleSelmerModule O (n \u2192 K \u29f8 LinearMap.range (Algebra.linearMap O K)) \u03c1 X L) :=\n length_cocycleSelmerModule_le_of_injective\n (LinearMap.mapMatrixModule_injective (divQuotient_injective (K := K) ha))\n\nend Matrix\n\nend TauCeti\n", "public_theorems": ["TauCeti.mem_cocycleSelmerModule_iff", "TauCeti.isLocallyConstant_of_mem_cocycleSelmerModule", "TauCeti.apply_mul_of_mem_cocycleSelmerModule", "TauCeti.apply_eq_zero_of_mem_cocycleSelmerModule", "TauCeti.linearCombination_eq_zero_of_mem_cocycleSelmerModule", "TauCeti.cocycleSelmerModule_anti", "TauCeti.smul_sub_mem_cocycleSelmerModule", "TauCeti.comp_mem_cocycleSelmerModule", "TauCeti.comp_mem_cocycleSelmerModule_iff", "TauCeti.cocycleSelmerModule_eq_comap", "TauCeti.coe_cocycleSelmerModuleMap_apply", "TauCeti.cocycleSelmerModuleMap_id", "TauCeti.cocycleSelmerModuleMap_comp", "TauCeti.cocycleSelmerModuleMap_injective", "TauCeti.range_cocycleSelmerModuleMap", "TauCeti.length_cocycleSelmerModule_le_of_injective", "TauCeti.length_cocycleSelmerModule_eq_length_torsionBy", "TauCeti.range_restrictScalars_mapMatrixModule", "TauCeti.range_cocycleSelmerModuleMap_mapMatrixModule", "TauCeti.length_cocycleSelmerModule_quotient_eq_length_torsionBy", "TauCeti.length_cocycleSelmerModule_quotient_le"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Algebra.Module.Torsion.Basic\npublic import Mathlib.LinearAlgebra.Finsupp.LinearCombination\npublic import Mathlib.RingTheory.Length\npublic import Mathlib.Topology.LocallyConstant.Basic\npublic import TauCeti.LinearAlgebra.Matrix.Module\npublic import TauCeti.RingTheory.MatlisDuality.PrincipalIdealRing\n\n/-!\n# Selmer modules of cocycles\n\nLet `G` be a topological group (a topological space with a multiplication suffices), `O` a\ncommutative ring, `A` an `O`-algebra and `\u03c1 : G \u2192 A` a map, typically a matrix representation\n`G \u2192 M\u2099(O)`. For an `A`-module `V`, a `\u03c1`-cocycle is a map\n`c : G \u2192 V` with `c (g * h) = c g + \u03c1 g \u2022 c h`. A *relation* is a finitely supported function\n`R : G \u2192\u2080 A`, and `c` *obeys* `R` when `\u2211_g R(g) \u2022 c(g) = 0`, that is when Mathlib's\n`Finsupp.linearCombination A c R` vanishes. For a set `X \u2286 G` and a set `L` of relations, the\n**Selmer module** `Sel(\u03c1, X, L; V)` (`TauCeti.cocycleSelmerModule O V \u03c1 X L`) is the `O`-module of\nthe locally constant `\u03c1`-cocycles `c : G \u2192 V` that vanish on `X` and obey every relation of `L`.\nThe cocycle identity is Mathlib's `groupCohomology.IsCocycle\u2081` for `G` acting on `V` through `\u03c1`;\nthat action is not an instance here, since `\u03c1` is an arbitrary map and the coefficients `V` vary\nwhile `\u03c1` and the relations stay fixed.\n\nIn the arithmetic application `G = Gal(\u03a9/E)` for a number field `E` inside a field `\u03a9`,\n`\u03c1 : G \u2192 M\u2099(O)`, `V = B\u207f` for an `O`-module `B`, with `M\u2099(O)` acting on `B\u207f` by Mathlib's\n`Matrix.Module.matrixModule`, and `X` is the union of the inertia groups at the places of `\u03a9` above\nthe finite places of `E` outside a set `S` (`TauCeti.GaloisRep.inertiaAbove`): the members are the\nlocally constant cocycles unramified outside `S`. The relations carry the remaining local\nconditions, for instance `c(\u03b3) = 0` at a single element, or linear conditions on the restriction\nof `c` to a decomposition group. The ring `O` and the relations are fixed while the coefficients\n`B` vary, typically between `O/a` and `K/O` for the fraction field `K` of `O`.\n\nThis is a module of cocycles, not of cohomology classes. A relation such as `c(\u03b3) = 0` is not\ninvariant under adding coboundaries, so the module is not the Selmer group of a Selmer structure\non `H\u00b9` (`TauCeti.ContCohomology.SelmerStructure`), whose local conditions are subgroups of local\ncohomology groups. In the module-theoretic language of `TauCeti.SelmerData` it is the Selmer\nmodule on the module of locally constant `\u03c1`-cocycles, with the evaluations at the elements of\n`X` and the maps `c \u21a6 \u2211_g R(g) \u2022 c(g)` for `R \u2208 L` as localisation maps to `V`, and zero local\nconditions. Classes and cocycles meet in the vanishing conditions: where `\u03c1` is trivial on a\nsubgroup `I`, a cocycle vanishing on `I` is the cocycle form of the unramified local condition at\n`I` (`TauCeti/RepresentationTheory/Homological/ContCohomology/Unramified.lean`).\n\nEvery defining condition is a condition on the values of `c`, so an injective `A`-linear map\n`f : V \u2192 W` of coefficients preserves and reflects membership\n(`TauCeti.comp_mem_cocycleSelmerModule_iff`). If moreover `f` maps onto the `a`-torsion of `W`,\ncomposition with `f` identifies `Sel(\u03c1, X, L; V)` with the `a`-torsion of `Sel(\u03c1, X, L; W)`. For a\ndomain `O` with fraction field `K` and `a \u2260 0`, division by `a` embeds `O/a` onto the `a`-torsion of\n`K/O`, so the Selmer module with coefficients `(O/a)\u207f` has the length of the `a`-torsion of the\none with coefficients `(K/O)\u207f`, and at most the length of the latter, the *divisible Selmer\nlength*.\n\n## Main definitions\n\n* `TauCeti.cocycleSelmerModule O V \u03c1 X L`: the Selmer module of cocycles.\n* `TauCeti.cocycleSelmerModuleMap O \u03c1 X L f`: composition with an `A`-linear map `f : V \u2192 W` of\n coefficients.\n\n## Main results\n\n* `TauCeti.mem_cocycleSelmerModule_iff`: the defining conditions.\n* `TauCeti.cocycleSelmerModule_anti`: fewer vanishing conditions and fewer relations give a larger\n module.\n* `TauCeti.smul_sub_mem_cocycleSelmerModule`: for multiplicative `\u03c1`, the coboundaries\n `g \u21a6 \u03c1 g \u2022 v - v` are cocycles.\n* `TauCeti.comp_mem_cocycleSelmerModule_iff`, `TauCeti.cocycleSelmerModule_eq_comap`: an injective\n map of coefficients preserves and reflects membership.\n* `TauCeti.range_cocycleSelmerModuleMap`: for `f` injective onto the `a`-torsion of `W`,\n composition with `f` maps `Sel(\u03c1, X, L; V)` onto the `a`-torsion of `Sel(\u03c1, X, L; W)`.\n* `TauCeti.length_cocycleSelmerModule_eq_length_torsionBy` and\n `TauCeti.length_cocycleSelmerModule_le_of_injective`: the corresponding statements on lengths.\n* `TauCeti.range_restrictScalars_mapMatrixModule`: if `f : M \u2192 N` has image the `a`-torsion of\n `N`, then `f` applied in each coordinate has image the `a`-torsion of `N\u207f`.\n* `TauCeti.range_cocycleSelmerModuleMap_mapMatrixModule`: for `\u03c1 : G \u2192 M\u2099(O)` and `f : M \u2192 N`\n injective onto the `a`-torsion of `N`, such as `O/a \u2192 B`, composition with `f` in each\n coordinate maps `Sel(\u03c1, X, L; M\u207f)` onto the `a`-torsion of `Sel(\u03c1, X, L; N\u207f)`.\n* `TauCeti.length_cocycleSelmerModule_quotient_eq_length_torsionBy` and\n `TauCeti.length_cocycleSelmerModule_quotient_le`: for `\u03c1 : G \u2192 M\u2099(O)` over a domain `O` with\n fraction field `K` and `a \u2260 0`, the length with coefficients `(O/a)\u207f` is that of the `a`-torsion\n with coefficients `(K/O)\u207f`, and at most the length with coefficients `(K/O)\u207f`.\n\n## References\n\n* K. Rubin, *Euler Systems*, Annals of Mathematics Studies 147, Princeton University Press,\n 2000, Chapter 1: the comparison of `H\u00b9` with coefficients `W[a]` and the `a`-torsion of\n `H\u00b9` with coefficients `W`, of which the comparison here is the cocycle form.\n\n## Provenance\n\nThe definition and the comparison of torsion and divisible coefficients follow the statements of\n`New.selmerModule` (`src/Lib/GaloisRep/Main/SelmerModules.lean`) and\n`New.Selmer.range_selmerModuleMapOfInjective`, `New.Selmer.length_selmerModule_le_divisibleQuot`\n(`src/Lib/GaloisRep/Main/DivisibleSelmerModules.lean`) in grh-lean\n(https://github.com/lsernau/grh-lean, Apache 2.0, Copyright 2026 Anthropic, PBC), which concern\n`Gal(\u03a9/E)`, matrix representations and a discrete valuation ring `O`. **Adapted, not copied**:\nhere `\u03c1` takes values in any `O`-algebra acting on the coefficients, `G` is any topological space\nwith a multiplication and the vanishing conditions are on an arbitrary subset of it, and the\ncomparison is stated for any injective map onto the `a`-torsion, and for `O/a \u2192 K/O` over any\ndomain `O`.\n-/\n\npublic section\n\nopen Function Submodule\n\nnamespace TauCeti\n\nsection Definition\n\nvariable {G : Type*} [Mul G] [TopologicalSpace G] (O : Type*) {A : Type*} [CommSemiring O]\n [Semiring A] [Algebra O A] (V : Type*) [AddCommMonoid V] [Module A V] [Module O V]\n [IsScalarTower O A V]\n\n/-- **The Selmer module of cocycles** `Sel(\u03c1, X, L; V)`: the `O`-module of locally constant maps\n`c : G \u2192 V` with `c (g * h) = c g + \u03c1 g \u2022 c h` (`\u03c1`-cocycles) that vanish on `X` and obey every\nrelation `R \u2208 L`, that is `\u2211_g R(g) \u2022 c(g) = 0`. For `G = Gal(\u03a9/E)`, `V = B\u207f` and `X` the union\nof the inertia groups above the places outside a set `S` (`TauCeti.GaloisRep.inertiaAbove`), it is\nthe Selmer module of the cocycles unramified outside `S` obeying `L`. -/\ndef cocycleSelmerModule (\u03c1 : G \u2192 A) (X : Set G) (L : Set (G \u2192\u2080 A)) : Submodule O (G \u2192 V) where\n carrier := {c | IsLocallyConstant c \u2227 (\u2200 g h, c (g * h) = c g + \u03c1 g \u2022 c h) \u2227\n (\u2200 g \u2208 X, c g = 0) \u2227 \u2200 R \u2208 L, Finsupp.linearCombination A c R = 0}\n add_mem' := by\n rintro c c' \u27e8hc, hcoc, hX, hL\u27e9 \u27e8hc', hcoc', hX', hL'\u27e9\n refine \u27e8hc.add hc', fun g h \u21a6 ?_, fun g hg \u21a6 ?_, fun R hR \u21a6 ?_\u27e9\n \u00b7 simp only [Pi.add_apply, hcoc, hcoc', smul_add]\n abel\n \u00b7 simp [hX g hg, hX' g hg]\n \u00b7 have h\u2081 := hL R hR\n have h\u2082 := hL' R hR\n rw [Finsupp.linearCombination_apply] at h\u2081 h\u2082 \u22a2\n simp only [Pi.add_apply, smul_add, Finsupp.sum_add, h\u2081, h\u2082, add_zero]\n zero_mem' := \u27e8IsLocallyConstant.const 0, by simp, by simp, by simp\u27e9\n smul_mem' := by\n rintro r c \u27e8hc, hcoc, hX, hL\u27e9\n refine \u27e8hc.comp (r \u2022 \u00b7), fun g h \u21a6 ?_, fun g hg \u21a6 ?_, fun R hR \u21a6 ?_\u27e9\n \u00b7 simp only [Pi.smul_apply, hcoc, smul_add, smul_comm r (\u03c1 g)]\n \u00b7 simp [hX g hg]\n \u00b7 have h := hL R hR\n rw [Finsupp.linearCombination_apply] at h \u22a2\n simp only [Pi.smul_apply, smul_comm _ r, \u2190 Finsupp.smul_sum, h, smul_zero]\n\nvariable {O V} {\u03c1 : G \u2192 A} {X : Set G} {L : Set (G \u2192\u2080 A)} {c : G \u2192 V}", "/-- Membership in the Selmer module: `c` is a locally constant `\u03c1`-cocycle vanishing on `X` and\nobeying every relation of `L`. -/\n@[simp]\ntheorem mem_cocycleSelmerModule_iff :\n c \u2208 cocycleSelmerModule O V \u03c1 X L \u2194 IsLocallyConstant c \u2227\n (\u2200 g h, c (g * h) = c g + \u03c1 g \u2022 c h) \u2227 (\u2200 g \u2208 X, c g = 0) \u2227\n \u2200 R \u2208 L, Finsupp.linearCombination A c R = 0 :=", "/-- A member of the Selmer module is locally constant. -/\ntheorem isLocallyConstant_of_mem_cocycleSelmerModule (hc : c \u2208 cocycleSelmerModule O V \u03c1 X L) :\n IsLocallyConstant c :=", "/-- A member of the Selmer module is a `\u03c1`-cocycle. -/\ntheorem apply_mul_of_mem_cocycleSelmerModule (hc : c \u2208 cocycleSelmerModule O V \u03c1 X L) (g h : G) :\n c (g * h) = c g + \u03c1 g \u2022 c h :=", "/-- A member of the Selmer module vanishes on `X`. -/\ntheorem apply_eq_zero_of_mem_cocycleSelmerModule (hc : c \u2208 cocycleSelmerModule O V \u03c1 X L) {g : G}\n (hg : g \u2208 X) : c g = 0 :=", "/-- A member of the Selmer module obeys every relation of `L`. -/\ntheorem linearCombination_eq_zero_of_mem_cocycleSelmerModule\n (hc : c \u2208 cocycleSelmerModule O V \u03c1 X L) {R : G \u2192\u2080 A} (hR : R \u2208 L) :\n Finsupp.linearCombination A c R = 0 :=", "/-- **The Selmer module is antitone in the conditions**: dropping vanishing conditions and\nrelations gives a larger module. -/\ntheorem cocycleSelmerModule_anti {X' : Set G} {L' : Set (G \u2192\u2080 A)} (hX : X' \u2286 X) (hL : L' \u2286 L) :\n cocycleSelmerModule O V \u03c1 X L \u2264 cocycleSelmerModule O V \u03c1 X' L' :=", "end Definition\n\nsection Coboundary\n\nvariable {G : Type*} [Mul G] [TopologicalSpace G] {O : Type*} {A : Type*} [CommSemiring O]\n [Semiring A] [Algebra O A] {V : Type*} [AddCommGroup V] [Module A V] [Module O V]\n [IsScalarTower O A V] {\u03c1 : G \u2192 A}", "/-- **Coboundaries are cocycles.** If `\u03c1` is multiplicative, then for `v : V` with\n`g \u21a6 \u03c1 g \u2022 v` locally constant, the coboundary `g \u21a6 \u03c1 g \u2022 v - v` lies in the Selmer module with\nno vanishing conditions and no relations. -/\ntheorem smul_sub_mem_cocycleSelmerModule (hmul : \u2200 g h, \u03c1 (g * h) = \u03c1 g * \u03c1 h) {v : V}\n (hv : IsLocallyConstant fun g \u21a6 \u03c1 g \u2022 v) :\n (fun g \u21a6 \u03c1 g \u2022 v - v) \u2208 cocycleSelmerModule O V \u03c1 \u2205 \u2205 :=", "end Coboundary\n\nsection Map\n\nvariable {G : Type*} [Mul G] [TopologicalSpace G] (O : Type*) {A : Type*} [CommSemiring O]\n [Semiring A] [Algebra O A] {V W U : Type*} [AddCommMonoid V] [Module A V] [Module O V]\n [IsScalarTower O A V] [AddCommMonoid W] [Module A W] [Module O W] [IsScalarTower O A W]\n [AddCommMonoid U] [Module A U] [Module O U] [IsScalarTower O A U]\n {\u03c1 : G \u2192 A} {X : Set G} {L : Set (G \u2192\u2080 A)} {c : G \u2192 V} {f : V \u2192\u2097[A] W}\n\nvariable {O} in", "/-- **Composition with an `A`-linear map of coefficients preserves the Selmer module.** -/\ntheorem comp_mem_cocycleSelmerModule (hc : c \u2208 cocycleSelmerModule O V \u03c1 X L) :\n f \u2218 c \u2208 cocycleSelmerModule O W \u03c1 X L :=", "variable {O} in", "/-- **An injective map of coefficients preserves and reflects the Selmer module**: for `f`\ninjective, `f \u2218 c` is a member exactly when `c` is. -/\ntheorem comp_mem_cocycleSelmerModule_iff (hf : Injective f) :\n f \u2218 c \u2208 cocycleSelmerModule O W \u03c1 X L \u2194 c \u2208 cocycleSelmerModule O V \u03c1 X L :=", "/-- For an injective map of coefficients `f : V \u2192 W`, the Selmer module with coefficients `V` is\nthe preimage of the one with coefficients `W` under composition with `f`. -/\ntheorem cocycleSelmerModule_eq_comap (hf : Injective f) :\n cocycleSelmerModule O V \u03c1 X L =\n (cocycleSelmerModule O W \u03c1 X L).comap ((f.restrictScalars O).compLeft G) :=", "variable (\u03c1 X L) in\n/-- **Functoriality in the coefficients**: composition with an `A`-linear map `f : V \u2192 W`, as an\n`O`-linear map `Sel(\u03c1, X, L; V) \u2192 Sel(\u03c1, X, L; W)`. -/\ndef cocycleSelmerModuleMap (f : V \u2192\u2097[A] W) :\n cocycleSelmerModule O V \u03c1 X L \u2192\u2097[O] cocycleSelmerModule O W \u03c1 X L :=\n ((f.restrictScalars O).compLeft G).restrict fun _ \u21a6 comp_mem_cocycleSelmerModule", "/-- The image of a cocycle under `cocycleSelmerModuleMap` is its composition with `f`. -/\n@[simp]\ntheorem coe_cocycleSelmerModuleMap_apply (c : cocycleSelmerModule O V \u03c1 X L) :\n (cocycleSelmerModuleMap O \u03c1 X L f c : G \u2192 W) = f \u2218 c :=", "variable (\u03c1 X L V) in", "/-- Composition with the identity is the identity. -/\n@[simp]\ntheorem cocycleSelmerModuleMap_id :\n cocycleSelmerModuleMap O \u03c1 X L (LinearMap.id : V \u2192\u2097[A] V) = LinearMap.id :=", "/-- Composition with `g \u2218 f` is composition with `f` followed by composition with `g`. -/\ntheorem cocycleSelmerModuleMap_comp (g : W \u2192\u2097[A] U) :\n cocycleSelmerModuleMap O \u03c1 X L (g \u2218\u2097 f) =\n cocycleSelmerModuleMap O \u03c1 X L g \u2218\u2097 cocycleSelmerModuleMap O \u03c1 X L f :=", "/-- Composition with an injective map of coefficients is injective. -/\ntheorem cocycleSelmerModuleMap_injective (hf : Injective f) :\n Injective (cocycleSelmerModuleMap O \u03c1 X L f) :=", "/-- **Torsion coefficients.** If `f : V \u2192 W` is injective with image the `a`-torsion of `W`,\ncomposition with `f` maps the Selmer module with coefficients `V` onto the `a`-torsion of the\nSelmer module with coefficients `W`. -/\ntheorem range_cocycleSelmerModuleMap (hf : Injective f) {a : O}\n (hrange : LinearMap.range (f.restrictScalars O) = torsionBy O W a) :\n LinearMap.range (cocycleSelmerModuleMap O \u03c1 X L f) =\n torsionBy O (cocycleSelmerModule O W \u03c1 X L) a :=", "end Map\n\nsection Length\n\nvariable {G : Type*} [Mul G] [TopologicalSpace G] {O : Type*} {A : Type*} [CommRing O]\n [Semiring A] [Algebra O A] {V W : Type*} [AddCommGroup V] [Module A V] [Module O V]\n [IsScalarTower O A V] [AddCommGroup W] [Module A W] [Module O W] [IsScalarTower O A W]\n {\u03c1 : G \u2192 A} {X : Set G} {L : Set (G \u2192\u2080 A)} {f : V \u2192\u2097[A] W}", "/-- An injective map of coefficients does not decrease the length of the Selmer module. -/\ntheorem length_cocycleSelmerModule_le_of_injective (hf : Injective f) :\n Module.length O (cocycleSelmerModule O V \u03c1 X L) \u2264\n Module.length O (cocycleSelmerModule O W \u03c1 X L) :=", "/-- If `f : V \u2192 W` is injective with image the `a`-torsion of `W`, the Selmer module with\ncoefficients `V` has the length of the `a`-torsion of the Selmer module with coefficients `W`. -/\ntheorem length_cocycleSelmerModule_eq_length_torsionBy (hf : Injective f) {a : O}\n (hrange : LinearMap.range (f.restrictScalars O) = torsionBy O W a) :\n Module.length O (cocycleSelmerModule O V \u03c1 X L) =\n Module.length O (torsionBy O (cocycleSelmerModule O W \u03c1 X L) a) :=", "end Length\n\nsection Matrix\n\nopen Matrix.Module\n\nvariable {G : Type*} [Mul G] [TopologicalSpace G] {O : Type*} [CommRing O] {n : Type*}\n [Fintype n] [DecidableEq n] (\u03c1 : G \u2192 Matrix n n O) (X : Set G) (L : Set (G \u2192\u2080 Matrix n n O))\n {M N : Type*} [AddCommGroup M] [Module O M] [AddCommGroup N] [Module O N] {a : O}", "/-- If `f : M \u2192 N` has image the `a`-torsion of `N`, then `f` applied in each coordinate has\nimage the `a`-torsion of `N\u207f`. -/\ntheorem range_restrictScalars_mapMatrixModule {f : M \u2192\u2097[O] N}\n (hrange : LinearMap.range f = torsionBy O N a) :\n LinearMap.range ((f.mapMatrixModule n).restrictScalars O) = torsionBy O (n \u2192 N) a :=", "/-- **Torsion coefficients, for matrix representations.** If `f : M \u2192 N` is injective with image\nthe `a`-torsion of `N`, for instance `f : O/a \u2192 B`, then composition with `f` applied in each\ncoordinate maps the Selmer module with coefficients `M\u207f` onto the `a`-torsion of the Selmer\nmodule with coefficients `N\u207f`. -/\ntheorem range_cocycleSelmerModuleMap_mapMatrixModule {f : M \u2192\u2097[O] N} (hf : Injective f)\n (hrange : LinearMap.range f = torsionBy O N a) :\n LinearMap.range (cocycleSelmerModuleMap O \u03c1 X L (f.mapMatrixModule n)) =\n torsionBy O (cocycleSelmerModule O (n \u2192 N) \u03c1 X L) a :=", "variable (K : Type*) [Field K] [Algebra O K] [IsFractionRing O K]", "/-- **Torsion and divisible coefficients.** For `\u03c1 : G \u2192 M\u2099(O)` over a domain `O` with fraction\nfield `K` and `a \u2260 0`, the Selmer module with coefficients `(O/a)\u207f` has the length of the\n`a`-torsion of the Selmer module with coefficients `(K/O)\u207f`. -/\ntheorem length_cocycleSelmerModule_quotient_eq_length_torsionBy (ha : a \u2260 0) :\n Module.length O (cocycleSelmerModule O (n \u2192 O \u29f8 Ideal.span {a}) \u03c1 X L) =\n Module.length O (torsionBy O\n (cocycleSelmerModule O (n \u2192 K \u29f8 LinearMap.range (Algebra.linearMap O K)) \u03c1 X L) a) :=", "/-- **The divisible Selmer length bounds the torsion ones.** For `\u03c1 : G \u2192 M\u2099(O)` over a domain `O`\nwith fraction field `K` and `a \u2260 0`, the length of the Selmer module with coefficients `(O/a)\u207f` is\nat most the length of the Selmer module with coefficients `(K/O)\u207f`. -/\ntheorem length_cocycleSelmerModule_quotient_le (ha : a \u2260 0) :\n Module.length O (cocycleSelmerModule O (n \u2192 O \u29f8 Ideal.span {a}) \u03c1 X L) \u2264\n Module.length O\n (cocycleSelmerModule O (n \u2192 K \u29f8 LinearMap.range (Algebra.linearMap O K)) \u03c1 X L) :=", "end Matrix\n\nend TauCeti"], "free_length": 2230, "file_length": 9320, "heartbeats": 26402, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.RingTheory.AdicRing.CompletedTensorProduct.Limit", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/RingTheory/AdicRing/CompletedTensorProduct/Limit.lean", "module": "TauCeti.RingTheory.AdicRing.CompletedTensorProduct.Limit", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.RingTheory.AdicRing.CompletedTensorProduct\npublic import TauCeti.RingTheory.AdicCompletion.CofinalLimit\npublic import TauCeti.RingTheory.TensorProduct.Quotient\n\n/-!\n# The completed tensor product as a limit of simultaneous thickenings\n\nFor ideals of definition `I_B` and `I_C`, the completed tensor product is the inverse limit of\n`(B / I_B ^ (n + 1)) \u2297[A] (C / I_C ^ (n + 1))`. The transition maps are the tensor products\nof the quotient maps. The cone constructed here has apex the existing completed tensor\nproduct, and its projections send a represented tensor to the tensor of its residue classes.\nThis describes the coordinate rings of simultaneous infinitesimal fibre products.\n\nThe proof compares the powers of `J = I_B \u2297 1 + 1 \u2297 I_C` with the sums of the separately\nextended powers, and then uses the cofinal quotient limit of an adic completion.\n\nReference: Grothendieck\u2013Dieudonn\u00e9, EGA I, Ch. 0, 7.7.1, and Ch. I, 10.7.\n-/\n\npublic section\n\nopen CategoryTheory Limits Opposite TensorProduct\n\nnamespace TauCeti.AdicRing.CompletedTensorProduct\n\nuniverse u\n\nvariable (A : Type*) (B C : Type u) [CommRing A]\n [CommRing B] [TopologicalSpace B] [IsTopologicalRing B] [IsAdicRing B] [Algebra A B]\n [CommRing C] [TopologicalSpace C] [IsTopologicalRing C] [IsAdicRing C] [Algebra A C]\n\n/-- The sum of the extensions of the `(n + 1)`-st powers of the factor ideals of definition. -/\nnoncomputable abbrev truncationIdeal (n : \u2115) : Ideal (B \u2297[A] C) :=\n (IsAdicRing.ideal B ^ (n + 1)).map (Algebra.TensorProduct.includeLeft : B \u2192\u2090[A] B \u2297[A] C) \u2294\n (IsAdicRing.ideal C ^ (n + 1)).map (Algebra.TensorProduct.includeRight : C \u2192\u2090[A] B \u2297[A] C)\n\n/-- The separate-power ideals decrease with the level. -/\ntheorem truncationIdeal_antitone : Antitone (truncationIdeal A B C) := by\n intro m n h\n exact sup_le_sup (Ideal.map_mono (Ideal.pow_le_pow_right (Nat.add_le_add_right h 1)))\n (Ideal.map_mono (Ideal.pow_le_pow_right (Nat.add_le_add_right h 1)))\n\n/-- Separate powers are contained in the corresponding power of the tensor ideal. -/\ntheorem truncationIdeal_le_pow (n : \u2115) :\n truncationIdeal A B C n \u2264 tensorIdeal A B C ^ (n + 1) := by\n simp only [truncationIdeal, Ideal.map_pow, tensorIdeal_def]\n exact sup_le (pow_le_pow_left' le_sup_left _) (pow_le_pow_left' le_sup_right _)\n\n/-- A sufficiently deep power of the tensor ideal lies in the separate-power ideal. -/\ntheorem pow_le_truncationIdeal (n : \u2115) :\n tensorIdeal A B C ^ ((n + 1) + (n + 1)) \u2264 truncationIdeal A B C n := by\n simpa only [truncationIdeal, tensorIdeal_def, Ideal.map_pow] using\n (Ideal.sup_pow_add_le_pow_sup_pow (I := (IsAdicRing.ideal B).map\n (Algebra.TensorProduct.includeLeft : B \u2192\u2090[A] B \u2297[A] C))\n (J := (IsAdicRing.ideal C).map\n (Algebra.TensorProduct.includeRight : C \u2192\u2090[A] B \u2297[A] C)) (n := n + 1) (m := n + 1))\n\n/-- The inverse system of tensor products of the two infinitesimal reductions. -/\nnoncomputable abbrev thickeningDiagram : \u2115\u1d52\u1d56 \u2964 CommRingCat.{u} where\n obj n := CommRingCat.of\n ((B \u29f8 IsAdicRing.ideal B ^ (n.unop + 1)) \u2297[A]\n (C \u29f8 IsAdicRing.ideal C ^ (n.unop + 1)))\n map f := CommRingCat.ofHom (Algebra.TensorProduct.map\n (Ideal.Quotient.factor\u2090 A (Ideal.pow_le_pow_right (Nat.succ_le_succ (leOfHom f.unop))))\n (Ideal.Quotient.factor\u2090 A\n (Ideal.pow_le_pow_right (Nat.succ_le_succ (leOfHom f.unop))))).toRingHom\n map_id _ := by ext b <;> rfl\n map_comp _ _ := by ext b <;> rfl\n\n/-- Levelwise, the tensor products of reductions are quotients by the separate-power ideals. -/\nnoncomputable def thickeningDiagramIso : thickeningDiagram A B C \u2245\n TauCeti.antitoneQuotientDiagram (truncationIdeal A B C) (truncationIdeal_antitone A B C) :=\n NatIso.ofComponents\n (fun n \u21a6 (Algebra.TensorProduct.quotientTensorQuotientEquiv (A := A)\n (IsAdicRing.ideal B ^ (n.unop + 1))\n (IsAdicRing.ideal C ^ (n.unop + 1))).toRingEquiv.toCommRingCatIso)\n (by\n intro n m f\n apply CommRingCat.hom_ext\n dsimp only [thickeningDiagram, TauCeti.antitoneQuotientDiagram,\n RingEquiv.toCommRingCatIso, CommRingCat.hom_comp, CommRingCat.hom_ofHom]\n ext b <;> simp)\n\n/-- The projection to the tensor product of the two `(n + 1)`-st reductions. -/\nnoncomputable def thickeningProjection (n : \u2115) : CompletedTensorProduct A B C \u2192+*\n (B \u29f8 IsAdicRing.ideal B ^ (n + 1)) \u2297[A] (C \u29f8 IsAdicRing.ideal C ^ (n + 1)) :=\n ((Algebra.TensorProduct.quotientTensorQuotientEquiv (A := A)\n (IsAdicRing.ideal B ^ (n + 1)) (IsAdicRing.ideal C ^ (n + 1))).symm : _ \u2192+* _).comp\n ((AdicCompletion.toQuotient (tensorIdeal A B C)\n \u27e8_, pow_le_truncationIdeal A B C n\u27e9).comp (adicCompletionEquiv A B C))\n\n/-- Projection is reduction to the separate-power quotient followed by the tensor comparison. -/\ntheorem thickeningProjection_eq (n : \u2115) :\n thickeningProjection A B C n =\n ((Algebra.TensorProduct.quotientTensorQuotientEquiv (A := A)\n (IsAdicRing.ideal B ^ (n + 1)) (IsAdicRing.ideal C ^ (n + 1))).symm : _ \u2192+* _).comp\n ((AdicCompletion.toQuotient (tensorIdeal A B C)\n \u27e8_, pow_le_truncationIdeal A B C n\u27e9).comp (adicCompletionEquiv A B C)) :=\n (rfl)\n\n/-- Reduction from a deeper simultaneous thickening commutes with projection. -/\n@[simp]\ntheorem thickeningProjection_comp_map {m n : \u2115} (h : m \u2264 n) :\n (Algebra.TensorProduct.map\n (Ideal.Quotient.factor\u2090 A\n (Ideal.pow_le_pow_right (I := IsAdicRing.ideal B) (Nat.succ_le_succ h)))\n (Ideal.Quotient.factor\u2090 A\n (Ideal.pow_le_pow_right (I := IsAdicRing.ideal C) (Nat.succ_le_succ h))) : _ \u2192+* _).comp\n (thickeningProjection A B C n) = thickeningProjection A B C m := by\n -- Transport quotient-cone naturality before assembling the cone of named projections.\n have hw := ((Cone.postcompose (thickeningDiagramIso A B C).inv).obj\n ((AdicCompletion.quotientCone (tensorIdeal A B C) (truncationIdeal A B C)\n (truncationIdeal_antitone A B C) (fun n \u21a6 \u27e8_, pow_le_truncationIdeal A B C n\u27e9)).extend\n (adicCompletionEquiv A B C).toRingEquiv.toCommRingCatIso.hom)).w (homOfLE h).op\n have hw' := congrArg CommRingCat.Hom.hom hw\n simp only [Nat.succ_eq_add_one] at hw'\n exact hw'\n\n/-- The cone from the completed tensor product to the simultaneous thickenings, with its\nnamed projections as components. -/\n@[expose] noncomputable def thickeningCone : Cone (thickeningDiagram A B C) where\n pt := CommRingCat.of (CompletedTensorProduct A B C)\n \u03c0.app n := CommRingCat.ofHom (thickeningProjection A B C n.unop)\n \u03c0.naturality _ _ f := by\n apply CommRingCat.hom_ext\n exact (thickeningProjection_comp_map A B C (leOfHom f.unop)).symm\n\n/-- The cone components are the named projections to simultaneous thickenings. -/\ntheorem thickeningCone_\u03c0 (n : \u2115) :\n (thickeningCone A B C).\u03c0.app (op n) = CommRingCat.ofHom (thickeningProjection A B C n) :=\n (rfl)\n\n/-- The completed tensor product is the limit of the tensor products of the simultaneous\ninfinitesimal reductions, with their actual quotient transition maps. -/\nnoncomputable def isLimitThickeningCone : IsLimit (thickeningCone A B C) := by\n apply IsLimit.ofIsoLimit\n ((IsLimit.postcomposeInvEquiv (thickeningDiagramIso A B C) _).symm\n (IsLimit.extendIso (adicCompletionEquiv A B C).toRingEquiv.toCommRingCatIso.hom\n (AdicCompletion.isLimitQuotientCone (tensorIdeal A B C)\n (truncationIdeal A B C) (truncationIdeal_antitone A B C)\n (fun n \u21a6 \u27e8_, pow_le_truncationIdeal A B C n\u27e9)\n (fun n \u21a6 (truncationIdeal_le_pow A B C n).trans\n (Ideal.pow_le_pow_right (Nat.le_succ n))))))\n -- Both cones have the displayed apex and the same projection formula.\n exact Cone.ext (Iso.refl _) (fun _ \u21a6 by ext x; rfl)\n\n/-- Maps into the completed tensor product are determined by their thickening projections. -/\ntheorem thickeningProjection_ext {D : Type*} [NonAssocSemiring D]\n {f g : D \u2192+* CompletedTensorProduct A B C}\n (h : \u2200 n, (thickeningProjection A B C n).comp f =\n (thickeningProjection A B C n).comp g) : f = g := by\n ext x\n apply Concrete.isLimit_ext _ (isLimitThickeningCone A B C)\n intro n\n exact RingHom.congr_fun (h n.unop) x\n\n/-- A compatible family of ring maps to the simultaneous thickenings induces a ring map\nto the completed tensor product, with no universe restriction on its source. -/\nnoncomputable def thickeningLift {D : Type*} [NonAssocSemiring D]\n (f : \u2200 n, D \u2192+* (B \u29f8 IsAdicRing.ideal B ^ (n + 1)) \u2297[A]\n (C \u29f8 IsAdicRing.ideal C ^ (n + 1)))\n (hf : \u2200 {m n} (h : m \u2264 n), (Algebra.TensorProduct.map\n (Ideal.Quotient.factor\u2090 A\n (Ideal.pow_le_pow_right (I := IsAdicRing.ideal B) (Nat.succ_le_succ h)))\n (Ideal.Quotient.factor\u2090 A\n (Ideal.pow_le_pow_right (I := IsAdicRing.ideal C) (Nat.succ_le_succ h))) : _ \u2192+* _).comp\n (f n) = f m) : D \u2192+* CompletedTensorProduct A B C :=\n ((adicCompletionEquiv A B C).symm : _ \u2192+* _).comp\n (AdicCompletion.liftQuotientRingHom (tensorIdeal A B C) (truncationIdeal A B C)\n (truncationIdeal_antitone A B C)\n (fun n \u21a6 (truncationIdeal_le_pow A B C n).trans\n (Ideal.pow_le_pow_right (Nat.le_succ n)))\n (fun n \u21a6 (Algebra.TensorProduct.quotientTensorQuotientEquiv (A := A)\n (IsAdicRing.ideal B ^ (n + 1)) (IsAdicRing.ideal C ^ (n + 1)) : _ \u2192+* _).comp (f n))\n (by\n intro m n h\n ext x\n have hn := congrArg CommRingCat.Hom.hom\n ((thickeningDiagramIso A B C).hom.naturality (homOfLE h).op)\n have hfn := RingHom.congr_fun (hf h) x\n simp only [RingHom.comp_apply, AlgHom.coe_toRingHom] at hfn\n simpa [thickeningDiagram, TauCeti.antitoneQuotientDiagram, thickeningDiagramIso,\n NatIso.ofComponents, RingEquiv.toCommRingCatIso, CommRingCat.hom_comp, hfn] using\n (RingHom.congr_fun hn (f n x)).symm))\n\n/-- Projection of the induced map recovers the given compatible map at each level. -/\n@[simp]\ntheorem thickeningProjection_comp_thickeningLift {D : Type*} [NonAssocSemiring D]\n (f : \u2200 n, D \u2192+* (B \u29f8 IsAdicRing.ideal B ^ (n + 1)) \u2297[A]\n (C \u29f8 IsAdicRing.ideal C ^ (n + 1)))\n (hf : \u2200 {m n} (h : m \u2264 n), (Algebra.TensorProduct.map\n (Ideal.Quotient.factor\u2090 A\n (Ideal.pow_le_pow_right (I := IsAdicRing.ideal B) (Nat.succ_le_succ h)))\n (Ideal.Quotient.factor\u2090 A\n (Ideal.pow_le_pow_right (I := IsAdicRing.ideal C) (Nat.succ_le_succ h))) : _ \u2192+* _).comp\n (f n) = f m) (n : \u2115) :\n (thickeningProjection A B C n).comp (thickeningLift A B C f hf) = f n := by\n apply RingHom.ext\n intro x\n simp only [thickeningProjection_eq, thickeningLift, RingHom.comp_apply,\n RingHom.coe_coe, AlgEquiv.apply_symm_apply]\n -- Reuse the transported family's compatibility proof when applying the cofinal lift law.\n generalize_proofs\n rw [\u2190 RingHom.comp_apply (AdicCompletion.toQuotient _ _) _ x,\n AdicCompletion.toQuotient_comp_liftQuotientRingHom (hf := by assumption) (hopen :=\n fun n \u21a6 \u27e8_, pow_le_truncationIdeal A B C n\u27e9)]\n simp\n\n/-- A represented ordinary tensor projects to the tensor of its two residue classes. -/\n@[simp]\ntheorem thickeningProjection_algebraMap_tmul (n : \u2115) (b : B) (c : C) :\n thickeningProjection A B C n\n (algebraMap (B \u2297[A] C) (CompletedTensorProduct A B C) (b \u2297\u209c[A] c)) =\n Ideal.Quotient.mk _ b \u2297\u209c[A] Ideal.Quotient.mk _ c := by\n simp [thickeningProjection_eq, AdicCompletion.algebraMap_apply]\n\nend TauCeti.AdicRing.CompletedTensorProduct\n", "public_theorems": ["TauCeti.AdicRing.CompletedTensorProduct.truncationIdeal_antitone", "TauCeti.AdicRing.CompletedTensorProduct.truncationIdeal_le_pow", "TauCeti.AdicRing.CompletedTensorProduct.pow_le_truncationIdeal", "TauCeti.AdicRing.CompletedTensorProduct.thickeningProjection_eq", "TauCeti.AdicRing.CompletedTensorProduct.thickeningProjection_comp_map", "TauCeti.AdicRing.CompletedTensorProduct.thickeningCone_\u03c0", "TauCeti.AdicRing.CompletedTensorProduct.thickeningProjection_ext", "TauCeti.AdicRing.CompletedTensorProduct.thickeningProjection_comp_thickeningLift", "TauCeti.AdicRing.CompletedTensorProduct.thickeningProjection_algebraMap_tmul"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.RingTheory.AdicRing.CompletedTensorProduct\npublic import TauCeti.RingTheory.AdicCompletion.CofinalLimit\npublic import TauCeti.RingTheory.TensorProduct.Quotient\n\n/-!\n# The completed tensor product as a limit of simultaneous thickenings\n\nFor ideals of definition `I_B` and `I_C`, the completed tensor product is the inverse limit of\n`(B / I_B ^ (n + 1)) \u2297[A] (C / I_C ^ (n + 1))`. The transition maps are the tensor products\nof the quotient maps. The cone constructed here has apex the existing completed tensor\nproduct, and its projections send a represented tensor to the tensor of its residue classes.\nThis describes the coordinate rings of simultaneous infinitesimal fibre products.\n\nThe proof compares the powers of `J = I_B \u2297 1 + 1 \u2297 I_C` with the sums of the separately\nextended powers, and then uses the cofinal quotient limit of an adic completion.\n\nReference: Grothendieck\u2013Dieudonn\u00e9, EGA I, Ch. 0, 7.7.1, and Ch. I, 10.7.\n-/\n\npublic section\n\nopen CategoryTheory Limits Opposite TensorProduct\n\nnamespace TauCeti.AdicRing.CompletedTensorProduct\n\nuniverse u\n\nvariable (A : Type*) (B C : Type u) [CommRing A]\n [CommRing B] [TopologicalSpace B] [IsTopologicalRing B] [IsAdicRing B] [Algebra A B]\n [CommRing C] [TopologicalSpace C] [IsTopologicalRing C] [IsAdicRing C] [Algebra A C]\n\n/-- The sum of the extensions of the `(n + 1)`-st powers of the factor ideals of definition. -/\nnoncomputable abbrev truncationIdeal (n : \u2115) : Ideal (B \u2297[A] C) :=\n (IsAdicRing.ideal B ^ (n + 1)).map (Algebra.TensorProduct.includeLeft : B \u2192\u2090[A] B \u2297[A] C) \u2294\n (IsAdicRing.ideal C ^ (n + 1)).map (Algebra.TensorProduct.includeRight : C \u2192\u2090[A] B \u2297[A] C)", "/-- The separate-power ideals decrease with the level. -/\ntheorem truncationIdeal_antitone : Antitone (truncationIdeal A B C) :=", "/-- Separate powers are contained in the corresponding power of the tensor ideal. -/\ntheorem truncationIdeal_le_pow (n : \u2115) :\n truncationIdeal A B C n \u2264 tensorIdeal A B C ^ (n + 1) :=", "/-- A sufficiently deep power of the tensor ideal lies in the separate-power ideal. -/\ntheorem pow_le_truncationIdeal (n : \u2115) :\n tensorIdeal A B C ^ ((n + 1) + (n + 1)) \u2264 truncationIdeal A B C n :=", "/-- The inverse system of tensor products of the two infinitesimal reductions. -/\nnoncomputable abbrev thickeningDiagram : \u2115\u1d52\u1d56 \u2964 CommRingCat.{u} where\n obj n := CommRingCat.of\n ((B \u29f8 IsAdicRing.ideal B ^ (n.unop + 1)) \u2297[A]\n (C \u29f8 IsAdicRing.ideal C ^ (n.unop + 1)))\n map f := CommRingCat.ofHom (Algebra.TensorProduct.map\n (Ideal.Quotient.factor\u2090 A (Ideal.pow_le_pow_right (Nat.succ_le_succ (leOfHom f.unop))))\n (Ideal.Quotient.factor\u2090 A\n (Ideal.pow_le_pow_right (Nat.succ_le_succ (leOfHom f.unop))))).toRingHom\n map_id _ := by ext b <;> rfl\n map_comp _ _ := by ext b <;> rfl\n\n/-- Levelwise, the tensor products of reductions are quotients by the separate-power ideals. -/\nnoncomputable def thickeningDiagramIso : thickeningDiagram A B C \u2245\n TauCeti.antitoneQuotientDiagram (truncationIdeal A B C) (truncationIdeal_antitone A B C) :=\n NatIso.ofComponents\n (fun n \u21a6 (Algebra.TensorProduct.quotientTensorQuotientEquiv (A := A)\n (IsAdicRing.ideal B ^ (n.unop + 1))\n (IsAdicRing.ideal C ^ (n.unop + 1))).toRingEquiv.toCommRingCatIso)\n (by\n intro n m f\n apply CommRingCat.hom_ext\n dsimp only [thickeningDiagram, TauCeti.antitoneQuotientDiagram,\n RingEquiv.toCommRingCatIso, CommRingCat.hom_comp, CommRingCat.hom_ofHom]\n ext b <;> simp)\n\n/-- The projection to the tensor product of the two `(n + 1)`-st reductions. -/\nnoncomputable def thickeningProjection (n : \u2115) : CompletedTensorProduct A B C \u2192+*\n (B \u29f8 IsAdicRing.ideal B ^ (n + 1)) \u2297[A] (C \u29f8 IsAdicRing.ideal C ^ (n + 1)) :=\n ((Algebra.TensorProduct.quotientTensorQuotientEquiv (A := A)\n (IsAdicRing.ideal B ^ (n + 1)) (IsAdicRing.ideal C ^ (n + 1))).symm : _ \u2192+* _).comp\n ((AdicCompletion.toQuotient (tensorIdeal A B C)\n \u27e8_, pow_le_truncationIdeal A B C n\u27e9).comp (adicCompletionEquiv A B C))", "/-- Projection is reduction to the separate-power quotient followed by the tensor comparison. -/\ntheorem thickeningProjection_eq (n : \u2115) :\n thickeningProjection A B C n =\n ((Algebra.TensorProduct.quotientTensorQuotientEquiv (A := A)\n (IsAdicRing.ideal B ^ (n + 1)) (IsAdicRing.ideal C ^ (n + 1))).symm : _ \u2192+* _).comp\n ((AdicCompletion.toQuotient (tensorIdeal A B C)\n \u27e8_, pow_le_truncationIdeal A B C n\u27e9).comp (adicCompletionEquiv A B C)) :=", "/-- Reduction from a deeper simultaneous thickening commutes with projection. -/\n@[simp]\ntheorem thickeningProjection_comp_map {m n : \u2115} (h : m \u2264 n) :\n (Algebra.TensorProduct.map\n (Ideal.Quotient.factor\u2090 A\n (Ideal.pow_le_pow_right (I := IsAdicRing.ideal B) (Nat.succ_le_succ h)))\n (Ideal.Quotient.factor\u2090 A\n (Ideal.pow_le_pow_right (I := IsAdicRing.ideal C) (Nat.succ_le_succ h))) : _ \u2192+* _).comp\n (thickeningProjection A B C n) = thickeningProjection A B C m :=", "/-- The cone from the completed tensor product to the simultaneous thickenings, with its\nnamed projections as components. -/\n@[expose] noncomputable def thickeningCone : Cone (thickeningDiagram A B C) where\n pt := CommRingCat.of (CompletedTensorProduct A B C)\n \u03c0.app n := CommRingCat.ofHom (thickeningProjection A B C n.unop)\n \u03c0.naturality _ _ f := by\n apply CommRingCat.hom_ext\n exact (thickeningProjection_comp_map A B C (leOfHom f.unop)).symm", "/-- The cone components are the named projections to simultaneous thickenings. -/\ntheorem thickeningCone_\u03c0 (n : \u2115) :\n (thickeningCone A B C).\u03c0.app (op n) = CommRingCat.ofHom (thickeningProjection A B C n) :=", "/-- The completed tensor product is the limit of the tensor products of the simultaneous\ninfinitesimal reductions, with their actual quotient transition maps. -/\nnoncomputable def isLimitThickeningCone : IsLimit (thickeningCone A B C) := by\n apply IsLimit.ofIsoLimit\n ((IsLimit.postcomposeInvEquiv (thickeningDiagramIso A B C) _).symm\n (IsLimit.extendIso (adicCompletionEquiv A B C).toRingEquiv.toCommRingCatIso.hom\n (AdicCompletion.isLimitQuotientCone (tensorIdeal A B C)\n (truncationIdeal A B C) (truncationIdeal_antitone A B C)\n (fun n \u21a6 \u27e8_, pow_le_truncationIdeal A B C n\u27e9)\n (fun n \u21a6 (truncationIdeal_le_pow A B C n).trans\n (Ideal.pow_le_pow_right (Nat.le_succ n))))))\n -- Both cones have the displayed apex and the same projection formula.\n exact Cone.ext (Iso.refl _) (fun _ \u21a6 by ext x; rfl)", "/-- Maps into the completed tensor product are determined by their thickening projections. -/\ntheorem thickeningProjection_ext {D : Type*} [NonAssocSemiring D]\n {f g : D \u2192+* CompletedTensorProduct A B C}\n (h : \u2200 n, (thickeningProjection A B C n).comp f =\n (thickeningProjection A B C n).comp g) : f = g :=", "/-- A compatible family of ring maps to the simultaneous thickenings induces a ring map\nto the completed tensor product, with no universe restriction on its source. -/\nnoncomputable def thickeningLift {D : Type*} [NonAssocSemiring D]\n (f : \u2200 n, D \u2192+* (B \u29f8 IsAdicRing.ideal B ^ (n + 1)) \u2297[A]\n (C \u29f8 IsAdicRing.ideal C ^ (n + 1)))\n (hf : \u2200 {m n} (h : m \u2264 n), (Algebra.TensorProduct.map\n (Ideal.Quotient.factor\u2090 A\n (Ideal.pow_le_pow_right (I := IsAdicRing.ideal B) (Nat.succ_le_succ h)))\n (Ideal.Quotient.factor\u2090 A\n (Ideal.pow_le_pow_right (I := IsAdicRing.ideal C) (Nat.succ_le_succ h))) : _ \u2192+* _).comp\n (f n) = f m) : D \u2192+* CompletedTensorProduct A B C :=\n ((adicCompletionEquiv A B C).symm : _ \u2192+* _).comp\n (AdicCompletion.liftQuotientRingHom (tensorIdeal A B C) (truncationIdeal A B C)\n (truncationIdeal_antitone A B C)\n (fun n \u21a6 (truncationIdeal_le_pow A B C n).trans\n (Ideal.pow_le_pow_right (Nat.le_succ n)))\n (fun n \u21a6 (Algebra.TensorProduct.quotientTensorQuotientEquiv (A := A)\n (IsAdicRing.ideal B ^ (n + 1)) (IsAdicRing.ideal C ^ (n + 1)) : _ \u2192+* _).comp (f n))\n (by\n intro m n h\n ext x\n have hn := congrArg CommRingCat.Hom.hom\n ((thickeningDiagramIso A B C).hom.naturality (homOfLE h).op)\n have hfn := RingHom.congr_fun (hf h) x\n simp only [RingHom.comp_apply, AlgHom.coe_toRingHom] at hfn\n simpa [thickeningDiagram, TauCeti.antitoneQuotientDiagram, thickeningDiagramIso,\n NatIso.ofComponents, RingEquiv.toCommRingCatIso, CommRingCat.hom_comp, hfn] using\n (RingHom.congr_fun hn (f n x)).symm))", "/-- Projection of the induced map recovers the given compatible map at each level. -/\n@[simp]\ntheorem thickeningProjection_comp_thickeningLift {D : Type*} [NonAssocSemiring D]\n (f : \u2200 n, D \u2192+* (B \u29f8 IsAdicRing.ideal B ^ (n + 1)) \u2297[A]\n (C \u29f8 IsAdicRing.ideal C ^ (n + 1)))\n (hf : \u2200 {m n} (h : m \u2264 n), (Algebra.TensorProduct.map\n (Ideal.Quotient.factor\u2090 A\n (Ideal.pow_le_pow_right (I := IsAdicRing.ideal B) (Nat.succ_le_succ h)))\n (Ideal.Quotient.factor\u2090 A\n (Ideal.pow_le_pow_right (I := IsAdicRing.ideal C) (Nat.succ_le_succ h))) : _ \u2192+* _).comp\n (f n) = f m) (n : \u2115) :\n (thickeningProjection A B C n).comp (thickeningLift A B C f hf) = f n :=", "/-- A represented ordinary tensor projects to the tensor of its two residue classes. -/\n@[simp]\ntheorem thickeningProjection_algebraMap_tmul (n : \u2115) (b : B) (c : C) :\n thickeningProjection A B C n\n (algebraMap (B \u2297[A] C) (CompletedTensorProduct A B C) (b \u2297\u209c[A] c)) =\n Ideal.Quotient.mk _ b \u2297\u209c[A] Ideal.Quotient.mk _ c :=", "end TauCeti.AdicRing.CompletedTensorProduct"], "free_length": 1566, "file_length": 8140, "heartbeats": 82808, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Analysis.Complex.Circle.PolarCurve", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Analysis/Complex/Circle/PolarCurve.lean", "module": "TauCeti.Analysis.Complex.Circle.PolarCurve", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Analysis.Calculus.ContDiff.Defs\npublic import Mathlib.Analysis.SpecialFunctions.Complex.CircleMap\nimport Mathlib.Analysis.SpecialFunctions.ExpDeriv\nimport TauCeti.Analysis.Complex.Circle.Basic\n\n/-!\n# Polar curves\n\nThe **polar curve** `r = \u03c1(\u03b8)` of a radius `\u03c1 : \u211d \u2192 \u211d` is the curve `\u03b8 \u21a6 \u03c1(\u03b8) e^(i\u03b8)` in `\u2102`\n(`TauCeti.polarCurve`). This file records its basic analysis: continuity and smoothness, its\nvelocity `(\u03c1'(\u03b8) + i \u03c1(\u03b8)) e^(i\u03b8)`, and the facts that the polar curve of a continuous, strictly\nincreasing, positive radius is a topological embedding, and that the polar curve of a radius\nincreasing from `0` to `\u221e` is closed in `\u2102 \u2216 {0}`.\n\n## Main definitions\n\n* `TauCeti.polarCurve`: the polar curve `\u03b8 \u21a6 \u03c1(\u03b8) e^(i\u03b8)`.\n\n## Main results\n\n* `TauCeti.hasDerivAt_polarCurve`, `TauCeti.fderiv_polarCurve_apply`: the velocity of a polar\n curve.\n* `TauCeti.differentiableAt_polarCurve_iff`: a polar curve is differentiable exactly where its\n radius is.\n* `TauCeti.isEmbedding_polarCurve`, `TauCeti.closure_range_polarCurve`: the polar curve of an\n increasing radius from `0` to `\u221e` is a closed embedded curve in `\u2102 \u2216 {0}`.\n-/\n\npublic section\n\nnoncomputable section\n\nopen Complex Filter Function Set Topology\n\nnamespace TauCeti\n\n/-- The **polar curve** `r = \u03c1(\u03b8)`: the curve `\u03b8 \u21a6 \u03c1(\u03b8) e^(i\u03b8)` in `\u2102`. -/\ndef polarCurve (\u03c1 : \u211d \u2192 \u211d) (\u03b8 : \u211d) : \u2102 :=\n circleMap 0 (\u03c1 \u03b8) \u03b8\n\n@[simp]\ntheorem polarCurve_apply (\u03c1 : \u211d \u2192 \u211d) (\u03b8 : \u211d) : polarCurve \u03c1 \u03b8 = circleMap 0 (\u03c1 \u03b8) \u03b8 :=\n (rfl)\n\nvariable {\u03c1 : \u211d \u2192 \u211d}\n\nprivate theorem polarCurve_eq_mul : polarCurve \u03c1 = fun \u03b8 \u21a6 (\u03c1 \u03b8 : \u2102) * exp ((\u03b8 : \u2102) * I) := by\n funext \u03b8\n rw [polarCurve_apply, circleMap_zero]\n\n/-- The polar curve of a continuous radius is continuous. -/\ntheorem continuous_polarCurve (h : Continuous \u03c1) : Continuous (polarCurve \u03c1) := by\n rw [polarCurve_eq_mul]\n fun_prop\n\n/-- The polar curve of a `C\u207f` radius is `C\u207f`. -/\ntheorem contDiff_polarCurve {n : WithTop \u2115\u221e} (h : ContDiff \u211d n \u03c1) :\n ContDiff \u211d n (polarCurve \u03c1) := by\n rw [polarCurve_eq_mul]\n exact (ofRealCLM.contDiff.comp h).mul ((ofRealCLM.contDiff.mul contDiff_const).cexp)\n\n/-- The velocity of the polar curve `r = \u03c1(\u03b8)` is `(\u03c1'(\u03b8) + i \u03c1(\u03b8)) e^(i\u03b8)`. -/\ntheorem hasDerivAt_polarCurve {\u03c1' \u03b8 : \u211d} (h : HasDerivAt \u03c1 \u03c1' \u03b8) :\n HasDerivAt (polarCurve \u03c1) ((\u03c1' + \u03c1 \u03b8 * I) * exp ((\u03b8 : \u2102) * I)) \u03b8 := by\n rw [hasDerivAt_iff_hasFDerivAt]\n convert hasFDerivAt_circleExp_mul_ofReal (hasFDerivAt_id \u03b8) h.hasFDerivAt using 1\n \u00b7 funext t\n simp [Circle.coe_exp, circleMap_zero, mul_comm]\n \u00b7 ext\n simp [Circle.coe_exp]\n ring\n\n/-- A polar curve is differentiable exactly where its radius is: one direction is\n`TauCeti.hasDerivAt_polarCurve`, the other recovers the radius as `\u03c1(\u03b8) = Re (\u03b3(\u03b8) e^(-i\u03b8))`. -/\ntheorem differentiableAt_polarCurve_iff {\u03b8 : \u211d} :\n DifferentiableAt \u211d (polarCurve \u03c1) \u03b8 \u2194 DifferentiableAt \u211d \u03c1 \u03b8 := by\n refine \u27e8fun h \u21a6 ?_, fun h \u21a6 (hasDerivAt_polarCurve h.hasDerivAt).differentiableAt\u27e9\n have h\u03c1 : \u03c1 = fun t : \u211d \u21a6 (polarCurve \u03c1 t * exp (-((t : \u2102) * I))).re := by\n funext t\n rw [polarCurve_eq_mul]\n simp [mul_assoc, \u2190 Complex.exp_add]\n rw [h\u03c1]\n exact reCLM.differentiableAt.comp \u03b8\n (h.mul ((ofRealCLM.differentiableAt.mul_const I).neg.cexp))\n\n/-- The differential of the polar curve sends `v` to `v (\u03c1'(\u03b8) + i \u03c1(\u03b8)) e^(i\u03b8)`. -/\ntheorem fderiv_polarCurve_apply {\u03b8 : \u211d} (h : DifferentiableAt \u211d \u03c1 \u03b8) (v : \u211d) :\n fderiv \u211d (polarCurve \u03c1) \u03b8 v =\n v \u2022 ((((deriv \u03c1 \u03b8 : \u211d) : \u2102) + ((\u03c1 \u03b8 : \u211d) : \u2102) * I) * exp ((\u03b8 : \u2102) * I)) := by\n rw [(hasDerivAt_polarCurve h.hasDerivAt).hasFDerivAt.fderiv]\n simp\n\n/-- **A polar curve with increasing positive radius is an embedding.** Its norm is the radius,\nwhich is a topological embedding of `\u211d` since it is continuous and strictly increasing. -/\ntheorem isEmbedding_polarCurve (hc : Continuous \u03c1) (hm : StrictMono \u03c1) (hpos : \u2200 \u03b8, 0 < \u03c1 \u03b8) :\n IsEmbedding (polarCurve \u03c1) := by\n have hnorm : (fun z : \u2102 \u21a6 \u2016z\u2016) \u2218 polarCurve \u03c1 = \u03c1 := by\n funext \u03b8\n simp [abs_of_pos (hpos \u03b8)]\n have h\u03c1 : IsEmbedding \u03c1 := hm.isEmbedding_of_ordConnected (isPreconnected_range hc).ordConnected\n refine \u27e8IsInducing.of_comp (continuous_polarCurve hc) continuous_norm\n (by rw [hnorm]; exact h\u03c1.isInducing), fun a b h \u21a6 hm.injective ?_\u27e9\n simpa [abs_of_pos (hpos a), abs_of_pos (hpos b)] using congrArg (fun z : \u2102 \u21a6 \u2016z\u2016) h\n\n/-- **A polar curve from the origin to infinity is closed in `\u2102 \u2216 {0}`.** If the radius `\u03c1` is\ncontinuous and monotone, tends to `0` at `-\u221e` and to `\u221e` at `\u221e`, then the closure of the polar\ncurve `r = \u03c1(\u03b8)` adds only the origin to it. -/\ntheorem closure_range_polarCurve (hc : Continuous \u03c1) (hm : Monotone \u03c1)\n (h0 : Tendsto \u03c1 atBot (\ud835\udcdd 0)) (htop : Tendsto \u03c1 atTop atTop) :\n closure (range (polarCurve \u03c1)) = insert 0 (range (polarCurve \u03c1)) := by\n have hcont := continuous_polarCurve hc\n have hnorm (\u03b8 : \u211d) : \u2016polarCurve \u03c1 \u03b8\u2016 = \u03c1 \u03b8 := by\n simp [abs_of_nonneg (hm.le_of_tendsto h0 \u03b8)]\n refine Subset.antisymm (fun z hz \u21a6 ?_) (insert_subset_iff.2 \u27e8?_, subset_closure\u27e9)\n \u00b7 rcases eq_or_ne z 0 with rfl | hz0\n \u00b7 exact mem_insert _ _\n refine mem_insert_of_mem _ ?_\n -- The part of the curve in the closed ball `B` of radius `r = \u2016z\u2016 / 2` about `z` is compact,\n -- since its parameters lie in an interval `[a, b]` on which `r \u2264 \u03c1 \u2264 3 r` can hold.\n set r := \u2016z\u2016 / 2 with hr\n have hr0 : 0 < r := by positivity\n obtain \u27e8a, ha\u27e9 : \u2203 a, \u03c1 a < r := (h0.eventually (gt_mem_nhds hr0)).exists\n obtain \u27e8b, hb\u27e9 : \u2203 b, 3 * r < \u03c1 b := (htop.eventually_gt_atTop _).exists\n have hsub : polarCurve \u03c1 \u207b\u00b9' Metric.closedBall z r \u2286 Icc a b := by\n intro \u03b8 h\u03b8\n rw [mem_preimage, Metric.mem_closedBall, dist_eq_norm] at h\u03b8\n have hd : |\u03c1 \u03b8 - \u2016z\u2016| \u2264 r := by\n rw [\u2190 hnorm]\n exact (abs_norm_sub_norm_le _ _).trans h\u03b8\n rw [abs_le] at hd\n exact \u27e8le_of_not_gt fun h \u21a6 by linarith [hm h.le],\n le_of_not_gt fun h \u21a6 by linarith [hm h.le]\u27e9\n have hK : IsCompact (polarCurve \u03c1 \u207b\u00b9' Metric.closedBall z r) :=\n isCompact_Icc.of_isClosed_subset (Metric.isClosed_closedBall.preimage hcont) hsub\n have hz' : z \u2208 closure (polarCurve \u03c1 '' (polarCurve \u03c1 \u207b\u00b9' Metric.closedBall z r)) := by\n rw [image_preimage_eq_range_inter, mem_closure_iff_nhds]\n intro U hU\n obtain \u27e8w, hwU, hw\u27e9 := mem_closure_iff_nhds.1 hz (U \u2229 Metric.closedBall z r)\n (inter_mem hU (Metric.closedBall_mem_nhds z hr0))\n exact \u27e8w, hwU.1, hw, hwU.2\u27e9\n obtain \u27e8\u03b8, -, rfl\u27e9 := (hK.image hcont).isClosed.closure_subset hz'\n exact mem_range_self \u03b8\n \u00b7 -- The curve tends to the origin as `\u03b8 \u2192 -\u221e`.\n have ht : Tendsto (polarCurve \u03c1) atBot (\ud835\udcdd 0) := by\n rw [tendsto_zero_iff_norm_tendsto_zero]\n simpa only [hnorm] using h0\n exact mem_closure_of_tendsto ht (Eventually.of_forall mem_range_self)\n\n\nend TauCeti\n", "public_theorems": ["TauCeti.polarCurve_apply", "TauCeti.continuous_polarCurve", "TauCeti.contDiff_polarCurve", "TauCeti.hasDerivAt_polarCurve", "TauCeti.differentiableAt_polarCurve_iff", "TauCeti.fderiv_polarCurve_apply", "TauCeti.isEmbedding_polarCurve", "TauCeti.closure_range_polarCurve"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Analysis.Calculus.ContDiff.Defs\npublic import Mathlib.Analysis.SpecialFunctions.Complex.CircleMap\nimport Mathlib.Analysis.SpecialFunctions.ExpDeriv\nimport TauCeti.Analysis.Complex.Circle.Basic\n\n/-!\n# Polar curves\n\nThe **polar curve** `r = \u03c1(\u03b8)` of a radius `\u03c1 : \u211d \u2192 \u211d` is the curve `\u03b8 \u21a6 \u03c1(\u03b8) e^(i\u03b8)` in `\u2102`\n(`TauCeti.polarCurve`). This file records its basic analysis: continuity and smoothness, its\nvelocity `(\u03c1'(\u03b8) + i \u03c1(\u03b8)) e^(i\u03b8)`, and the facts that the polar curve of a continuous, strictly\nincreasing, positive radius is a topological embedding, and that the polar curve of a radius\nincreasing from `0` to `\u221e` is closed in `\u2102 \u2216 {0}`.\n\n## Main definitions\n\n* `TauCeti.polarCurve`: the polar curve `\u03b8 \u21a6 \u03c1(\u03b8) e^(i\u03b8)`.\n\n## Main results\n\n* `TauCeti.hasDerivAt_polarCurve`, `TauCeti.fderiv_polarCurve_apply`: the velocity of a polar\n curve.\n* `TauCeti.differentiableAt_polarCurve_iff`: a polar curve is differentiable exactly where its\n radius is.\n* `TauCeti.isEmbedding_polarCurve`, `TauCeti.closure_range_polarCurve`: the polar curve of an\n increasing radius from `0` to `\u221e` is a closed embedded curve in `\u2102 \u2216 {0}`.\n-/\n\npublic section\n\nnoncomputable section\n\nopen Complex Filter Function Set Topology\n\nnamespace TauCeti\n\n/-- The **polar curve** `r = \u03c1(\u03b8)`: the curve `\u03b8 \u21a6 \u03c1(\u03b8) e^(i\u03b8)` in `\u2102`. -/\ndef polarCurve (\u03c1 : \u211d \u2192 \u211d) (\u03b8 : \u211d) : \u2102 :=\n circleMap 0 (\u03c1 \u03b8) \u03b8", "@[simp]\ntheorem polarCurve_apply (\u03c1 : \u211d \u2192 \u211d) (\u03b8 : \u211d) : polarCurve \u03c1 \u03b8 = circleMap 0 (\u03c1 \u03b8) \u03b8 :=", "variable {\u03c1 : \u211d \u2192 \u211d}", "/-- The polar curve of a continuous radius is continuous. -/\ntheorem continuous_polarCurve (h : Continuous \u03c1) : Continuous (polarCurve \u03c1) :=", "/-- The polar curve of a `C\u207f` radius is `C\u207f`. -/\ntheorem contDiff_polarCurve {n : WithTop \u2115\u221e} (h : ContDiff \u211d n \u03c1) :\n ContDiff \u211d n (polarCurve \u03c1) :=", "/-- The velocity of the polar curve `r = \u03c1(\u03b8)` is `(\u03c1'(\u03b8) + i \u03c1(\u03b8)) e^(i\u03b8)`. -/\ntheorem hasDerivAt_polarCurve {\u03c1' \u03b8 : \u211d} (h : HasDerivAt \u03c1 \u03c1' \u03b8) :\n HasDerivAt (polarCurve \u03c1) ((\u03c1' + \u03c1 \u03b8 * I) * exp ((\u03b8 : \u2102) * I)) \u03b8 :=", "/-- A polar curve is differentiable exactly where its radius is: one direction is\n`TauCeti.hasDerivAt_polarCurve`, the other recovers the radius as `\u03c1(\u03b8) = Re (\u03b3(\u03b8) e^(-i\u03b8))`. -/\ntheorem differentiableAt_polarCurve_iff {\u03b8 : \u211d} :\n DifferentiableAt \u211d (polarCurve \u03c1) \u03b8 \u2194 DifferentiableAt \u211d \u03c1 \u03b8 :=", "/-- The differential of the polar curve sends `v` to `v (\u03c1'(\u03b8) + i \u03c1(\u03b8)) e^(i\u03b8)`. -/\ntheorem fderiv_polarCurve_apply {\u03b8 : \u211d} (h : DifferentiableAt \u211d \u03c1 \u03b8) (v : \u211d) :\n fderiv \u211d (polarCurve \u03c1) \u03b8 v =\n v \u2022 ((((deriv \u03c1 \u03b8 : \u211d) : \u2102) + ((\u03c1 \u03b8 : \u211d) : \u2102) * I) * exp ((\u03b8 : \u2102) * I)) :=", "/-- **A polar curve with increasing positive radius is an embedding.** Its norm is the radius,\nwhich is a topological embedding of `\u211d` since it is continuous and strictly increasing. -/\ntheorem isEmbedding_polarCurve (hc : Continuous \u03c1) (hm : StrictMono \u03c1) (hpos : \u2200 \u03b8, 0 < \u03c1 \u03b8) :\n IsEmbedding (polarCurve \u03c1) :=", "/-- **A polar curve from the origin to infinity is closed in `\u2102 \u2216 {0}`.** If the radius `\u03c1` is\ncontinuous and monotone, tends to `0` at `-\u221e` and to `\u221e` at `\u221e`, then the closure of the polar\ncurve `r = \u03c1(\u03b8)` adds only the origin to it. -/\ntheorem closure_range_polarCurve (hc : Continuous \u03c1) (hm : Monotone \u03c1)\n (h0 : Tendsto \u03c1 atBot (\ud835\udcdd 0)) (htop : Tendsto \u03c1 atTop atTop) :\n closure (range (polarCurve \u03c1)) = insert 0 (range (polarCurve \u03c1)) :=", "end TauCeti"], "free_length": 2901, "file_length": 4356, "heartbeats": 5657, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.NumberTheory.NewtonPolygon.GaussNorm", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/NumberTheory/NewtonPolygon/GaussNorm.lean", "module": "TauCeti.NumberTheory.NewtonPolygon.GaussNorm", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Analysis.SpecialFunctions.Log.Base\npublic import TauCeti.Analysis.Convex.Sequence.Face\npublic import TauCeti.NumberTheory.NewtonPolygon.Slopes\npublic import TauCeti.RingTheory.PowerSeries.GaussNorm\n\n/-!\n# Gauss norms and Newton supporting values\n\nFix a real additive valuation `v` on a normed division ring and a base `b > 1` with\n`\u2016x\u2016 = b ^ (-(v x).untop\u2080)` for nonzero `x`. At the radius `b ^ \u03c3` the weighted coefficient\nnorm `\u2016a\u2099\u2016 (b ^ \u03c3) ^ n` is `b ^ (-(v a\u2099 - \u03c3 n))`, the exponential of the negated tilted\ncoefficient height. Consequently an upper bound `b ^ (-c)` on all weighted coefficient norms is\nexactly an affine line of slope `\u03c3` and intercept `c` supporting the coefficient heights, and\na weighted coefficient norm equals `b ^ (-c)` exactly when the coefficient lies on that line.\n\nThis identifies the analytic Gauss norm with the convex supporting-line description:\n\n* the weighted coefficient norms are bounded exactly when the supporting value at `\u03c3` is above\n negative infinity, and coefficient heights are admissible exactly when the series is\n restricted at some positive radius;\n* for a nonzero series with bounded weighted coefficient norms, the supporting value of its\n coefficient heights, and of its Newton polygon, is `-Real.logb b` of its Gauss norm;\n* the coefficients attaining the Gauss norm are exactly the contact points of the supporting\n line of slope `\u03c3`, so the last and the first of them, `TauCeti.PowerSeries.IsDistinguished`\n and `TauCeti.PowerSeries.IsLowestDominant`, are the greatest and least contact indices.\n\nNeither attainment nor restrictedness at the given radius is assumed: at the boundary of\nconvergence the Gauss norm is still the supporting value, while it need not be attained.\nFor polynomials the identities hold at every radius, and the purity criterion\n`Polynomial.forall_mem_newtonSlopes_eq_iff` becomes a statement about weighted norms: every\nfinite slope equals `m` exactly when, at the radius `b ^ m`, the weighted leading and trailing\nterms have equal norms and bound all other weighted terms. The norm and valuation are compared by\nan explicit hypothesis, so no normalisation is hidden in a typeclass instance.\n\n## Main results\n\n* `PowerSeries.isSupportingLine_addValuation_coeff_iff`: affine minorants of the coefficient\n heights are exponential bounds on the weighted coefficient norms.\n* `PowerSeries.hasGaussNorm_iff_supportingValue_ne_bot`: bounded weighted coefficient norms\n correspond to a supporting value above negative infinity.\n* `PowerSeries.isAdmissible_addValuation_coeff_iff_exists_isRestricted`: coefficient heights\n are admissible exactly when the series is restricted at some positive radius.\n* `PowerSeries.supportingValue_newtonPolygon_eq_neg_logb_gaussNorm`: the supporting value of\n the Newton polygon is the negative logarithm of the Gauss norm, with the polynomial case\n `Polynomial.supportingValue_newtonPolygon_eq_neg_logb_gaussNorm` at every radius.\n* `Polynomial.forall_mem_newtonSlopes_eq_iff_norm_coeff_mul_rpow_pow_le`: the purity criterion\n in terms of weighted coefficient norms at the radius `b ^ m`.\n* `PowerSeries.mem_supportingFace_addValuation_coeff_iff`: the contact indices of the\n supporting line are the indices attaining the Gauss norm.\n* `PowerSeries.isDistinguished_iff_isGreatest_supportingFace` and\n `PowerSeries.isLowestDominant_iff_isLeast_supportingFace`: the last and the first coefficient\n attaining the Gauss norm are the greatest and least contact indices.\n* `PowerSeries.exists_isSupportingLine_mem_supportingFace_of_isRestricted`: the coefficient\n heights of a nonzero series restricted at `b ^ \u03c3` touch a supporting line of slope `\u03c3`.\n\n## References\n\n* N. Koblitz, *p-adic Numbers, p-adic Analysis, and Zeta-Functions*, second edition,\n Graduate Texts in Mathematics 58, Springer, 1984, Chapter IV \u00a7\u00a73\u20134.\n* M. Lazard, *Les z\u00e9ros d'une fonction analytique d'une variable sur un corps valu\u00e9 complet*,\n Publications Math\u00e9matiques de l'IH\u00c9S 14 (1962), \u00a71. Lazard's variable is a valuation\n threshold, corresponding to `-\u03c3` here.\n-/\n\npublic section\n\nopen TauCeti\n\nnamespace PowerSeries\n\nvariable {K : Type*} [NormedDivisionRing K] (f : PowerSeries K)\n (v : AddValuation K (WithTop \u211d)) {b : \u211d} (hb : 1 < b)\n (hv : \u2200 x \u2260 0, \u2016x\u2016 = b ^ (-(v x).untop\u2080))\n\ninclude hb hv\n\n/-- At a nonzero coefficient, the weighted norm is the exponential of the negated tilted\ncoefficient height. -/\ntheorem norm_coeff_mul_rpow_pow_eq {n : \u2115} (hn : f.coeff n \u2260 0) (\u03c3 : \u211d) :\n \u2016f.coeff n\u2016 * (b ^ \u03c3) ^ n = b ^ (-((v (f.coeff n)).untop\u2080 - \u03c3 * n)) := by\n have hb0 : 0 < b := zero_lt_one.trans hb\n rw [hv _ hn, \u2190 Real.rpow_mul_natCast hb0.le, \u2190 Real.rpow_add hb0]\n ring_nf\n\n/-- An exponential upper bound on one weighted coefficient norm is an affine lower bound on\nthe height of that coefficient. A zero coefficient satisfies both bounds. -/\ntheorem norm_coeff_mul_rpow_pow_le_iff (n : \u2115) (\u03c3 c : \u211d) :\n \u2016f.coeff n\u2016 * (b ^ \u03c3) ^ n \u2264 b ^ (-c) \u2194\n ((c + \u03c3 * n : \u211d) : WithTop \u211d) \u2264 v (f.coeff n) := by\n by_cases hn : f.coeff n = 0\n \u00b7 simp [hn, (Real.rpow_pos_of_pos (zero_lt_one.trans hb) (-c)).le]\n rw [norm_coeff_mul_rpow_pow_eq f v hb hv hn, Real.rpow_le_rpow_left_iff hb,\n \u2190 WithTop.coe_untop\u2080_of_ne_top ((v.ne_top_iff).mpr hn), WithTop.coe_le_coe,\n WithTop.untop\u2080_coe]\n constructor <;> intro h <;> linarith\n\n/-- An upper bound `b ^ (-c)` on one coefficient norm is the lower bound `c` on the height of that\ncoefficient. A zero coefficient satisfies both bounds. -/\ntheorem norm_coeff_le_rpow_neg_iff (n : \u2115) (c : \u211d) :\n \u2016f.coeff n\u2016 \u2264 b ^ (-c) \u2194 (c : WithTop \u211d) \u2264 v (f.coeff n) := by\n simpa using norm_coeff_mul_rpow_pow_le_iff f v hb hv n 0 c\n\n/-- A weighted coefficient norm equals `b ^ (-c)` exactly when the coefficient lies on the line\nof slope `\u03c3` and intercept `c`. A zero coefficient satisfies neither condition. -/\ntheorem norm_coeff_mul_rpow_pow_eq_iff (n : \u2115) (\u03c3 c : \u211d) :\n \u2016f.coeff n\u2016 * (b ^ \u03c3) ^ n = b ^ (-c) \u2194\n v (f.coeff n) = ((c + \u03c3 * n : \u211d) : WithTop \u211d) := by\n by_cases hn : f.coeff n = 0\n \u00b7 simp only [hn, norm_zero, zero_mul, AddValuation.map_zero, WithTop.top_ne_coe, iff_false]\n exact (Real.rpow_pos_of_pos (zero_lt_one.trans hb) (-c)).ne\n rw [norm_coeff_mul_rpow_pow_eq f v hb hv hn,\n Real.rpow_right_inj (zero_lt_one.trans hb) hb.ne',\n \u2190 WithTop.coe_untop\u2080_of_ne_top ((v.ne_top_iff).mpr hn), WithTop.coe_eq_coe,\n WithTop.untop\u2080_coe]\n constructor <;> intro h <;> linarith\n\n/-- A line of slope `\u03c3` and intercept `c` supports the coefficient heights exactly when\n`b ^ (-c)` bounds every weighted coefficient norm at the radius `b ^ \u03c3`. No boundedness\nassumption is needed. -/\ntheorem isSupportingLine_addValuation_coeff_iff (\u03c3 c : \u211d) :\n IsSupportingLine (fun n => v (f.coeff n)) \u03c3 c \u2194\n \u2200 n, \u2016f.coeff n\u2016 * (b ^ \u03c3) ^ n \u2264 b ^ (-c) :=\n isSupportingLine_iff_forall.trans\n (forall_congr' fun n => (norm_coeff_mul_rpow_pow_le_iff f v hb hv n \u03c3 c).symm)\n\n/-- Bounded weighted coefficient norms are equivalent to a supporting value above negative\ninfinity, including for the zero series. This is weaker than restrictedness. -/\ntheorem hasGaussNorm_iff_supportingValue_ne_bot (\u03c3 : \u211d) :\n f.HasGaussNorm norm (b ^ \u03c3) \u2194 supportingValue (fun n => v (f.coeff n)) \u03c3 \u2260 \u22a5 := by\n constructor\n \u00b7 rintro \u27e8B, hB\u27e9\n have hB1 : 0 < max B 1 := zero_lt_one.trans_le (le_max_right _ _)\n refine ne_bot_of_le_ne_bot (EReal.coe_ne_bot (-Real.logb b (max B 1)))\n (isSupportingLine_iff.mp ((isSupportingLine_addValuation_coeff_iff f v hb hv \u03c3 _).mpr\n fun n => ?_))\n rw [neg_neg, Real.rpow_logb (zero_lt_one.trans hb) hb.ne' hB1]\n exact (hB \u27e8n, rfl\u27e9).trans (le_max_left _ _)\n \u00b7 intro h\n obtain \u27e8c, hc\u27e9 := supportingValue_ne_bot_iff.mp h\n exact \u27e8b ^ (-c), by\n rintro _ \u27e8n, rfl\u27e9\n exact (norm_coeff_mul_rpow_pow_le_iff f v hb hv n \u03c3 c).mpr (hc n)\u27e9\n\n/-- For bounded weighted coefficient norms, a line of slope `\u03c3` and intercept `c` supports the\ncoefficient heights exactly when `b ^ (-c)` bounds the Gauss norm at the radius `b ^ \u03c3`. -/\ntheorem isSupportingLine_addValuation_coeff_iff_gaussNorm_le {\u03c3 : \u211d}\n (hf : f.HasGaussNorm norm (b ^ \u03c3)) (c : \u211d) :\n IsSupportingLine (fun n => v (f.coeff n)) \u03c3 c \u2194 f.gaussNorm norm (b ^ \u03c3) \u2264 b ^ (-c) := by\n rw [isSupportingLine_addValuation_coeff_iff f v hb hv, gaussNorm_eq, ciSup_le_iff hf]\n\n/-- Coefficient heights are admissible exactly when the series is restricted at some positive\nradius. This includes the zero series, whose heights are all infinite. -/\ntheorem isAdmissible_addValuation_coeff_iff_exists_isRestricted :\n IsAdmissible (fun n => v (f.coeff n)) \u2194 \u2203 r : \u211d, 0 < r \u2227 f.IsRestricted r := by\n rw [isAdmissible_iff_exists_supportingValue_ne_bot]\n constructor\n \u00b7 rintro \u27e8\u03c3, h\u03c3\u27e9\n have hr : 0 < b ^ \u03c3 := Real.rpow_pos_of_pos (zero_lt_one.trans hb) \u03c3\n refine \u27e8b ^ \u03c3 / 2, half_pos hr,\n ((hasGaussNorm_iff_supportingValue_ne_bot f v hb hv \u03c3).mpr h\u03c3).isRestricted_of_abs_lt ?_\u27e9\n rw [abs_of_pos (half_pos hr)]\n exact half_lt_self hr\n \u00b7 rintro \u27e8r, hr, hf\u27e9\n refine \u27e8Real.logb b r, (hasGaussNorm_iff_supportingValue_ne_bot f v hb hv _).mp ?_\u27e9\n rw [Real.rpow_logb (zero_lt_one.trans hb) hb.ne' hr]\n exact TauCeti.PowerSeries.hasGaussNorm_of_isRestricted hf\n\n/-- For a nonzero series with bounded weighted coefficient norms, the supporting value of its\ncoefficient heights is the negative base-`b` logarithm of its Gauss norm. The Gauss norm need\nnot be attained. -/\ntheorem supportingValue_addValuation_coeff_eq_neg_logb_gaussNorm {\u03c3 : \u211d}\n (hf : f.HasGaussNorm norm (b ^ \u03c3)) (hf0 : f \u2260 0) :\n supportingValue (fun n => v (f.coeff n)) \u03c3 =\n ((-Real.logb b (f.gaussNorm norm (b ^ \u03c3)) : \u211d) : EReal) := by\n have hb0 : 0 < b := zero_lt_one.trans hb\n have hpow : b ^ (-(-Real.logb b (f.gaussNorm norm (b ^ \u03c3)))) = f.gaussNorm norm (b ^ \u03c3) := by\n rw [neg_neg, Real.rpow_logb hb0 hb.ne'\n (TauCeti.PowerSeries.gaussNorm_pos (Real.rpow_pos_of_pos hb0 \u03c3) hf hf0)]\n refine le_antisymm ?_ (isSupportingLine_iff.mp\n ((isSupportingLine_addValuation_coeff_iff_gaussNorm_le f v hb hv hf _).mpr hpow.ge))\n by_contra h\n obtain \u27e8c, hc, hc'\u27e9 := EReal.exists_between_coe_real (lt_of_not_ge h)\n have hle := (isSupportingLine_addValuation_coeff_iff_gaussNorm_le f v hb hv hf c).mp\n (isSupportingLine_iff.mpr hc'.le)\n rw [\u2190 hpow, Real.rpow_le_rpow_left_iff hb, neg_le_neg_iff] at hle\n exact (EReal.coe_lt_coe_iff.mp hc).not_ge hle\n\n/-- The Newton polygon of a nonzero series with bounded weighted coefficient norms has\nsupporting value equal to the negative base-`b` logarithm of the Gauss norm. Boundedness at\nthis radius already makes the coefficient heights admissible. -/\ntheorem supportingValue_newtonPolygon_eq_neg_logb_gaussNorm {\u03c3 : \u211d}\n (hf : f.HasGaussNorm norm (b ^ \u03c3)) (hf0 : f \u2260 0) :\n supportingValue (f.newtonPolygon v) \u03c3 =\n ((-Real.logb b (f.gaussNorm norm (b ^ \u03c3)) : \u211d) : EReal) := by\n rw [supportingValue_newtonPolygon (isAdmissible_iff_exists_supportingValue_ne_bot.mpr\n \u27e8\u03c3, (hasGaussNorm_iff_supportingValue_ne_bot f v hb hv \u03c3).mp hf\u27e9)]\n exact supportingValue_addValuation_coeff_eq_neg_logb_gaussNorm f v hb hv hf hf0\n\n/-- For a nonzero series with bounded weighted coefficient norms, the coefficients touching the\nsupporting line of slope `\u03c3` are exactly those attaining the Gauss norm at the radius\n`b ^ \u03c3`. The intercept of that line is the supporting value\n`-Real.logb b (f.gaussNorm norm (b ^ \u03c3))`. -/\ntheorem mem_supportingFace_addValuation_coeff_iff {\u03c3 : \u211d}\n (hf : f.HasGaussNorm norm (b ^ \u03c3)) (hf0 : f \u2260 0) (n : \u2115) :\n n \u2208 supportingFace (fun n => v (f.coeff n)) \u03c3 (-Real.logb b (f.gaussNorm norm (b ^ \u03c3))) \u2194\n \u2016f.coeff n\u2016 * (b ^ \u03c3) ^ n = f.gaussNorm norm (b ^ \u03c3) := by\n have hb0 : 0 < b := zero_lt_one.trans hb\n rw [mem_supportingFace, \u2190 norm_coeff_mul_rpow_pow_eq_iff f v hb hv, neg_neg,\n Real.rpow_logb hb0 hb.ne'\n (TauCeti.PowerSeries.gaussNorm_pos (Real.rpow_pos_of_pos hb0 \u03c3) hf hf0)]\n\n/-- The distinguished degree at the radius `b ^ \u03c3`, the last index attaining the Gauss norm, is\nthe greatest contact index of the supporting line of slope `\u03c3` with the coefficient heights. -/\ntheorem isDistinguished_iff_isGreatest_supportingFace {\u03c3 : \u211d}\n (hf : f.HasGaussNorm norm (b ^ \u03c3)) (s : \u2115) :\n TauCeti.PowerSeries.IsDistinguished (b ^ \u03c3) s f \u2194\n IsGreatest (supportingFace (fun n => v (f.coeff n)) \u03c3\n (-Real.logb b (f.gaussNorm norm (b ^ \u03c3)))) s := by\n by_cases hf0 : f = 0\n \u00b7 subst hf0\n exact iff_of_false (fun h => h.ne_zero rfl) fun h => by\n have := mem_supportingFace.mp h.1\n rw [map_zero, AddValuation.map_zero] at this\n exact WithTop.top_ne_coe this\n \u00b7 simp only [IsGreatest, mem_upperBounds,\n mem_supportingFace_addValuation_coeff_iff f v hb hv hf hf0]\n refine \u27e8fun hs => \u27e8hs.norm_coeff_mul_pow_eq, fun m hm => not_lt.mp fun hsm =>\n (hs.norm_coeff_mul_pow_lt m hsm).ne hm\u27e9, fun hs => \u27e8hs.1, fun m hsm => ?_\u27e9\u27e9\n exact (le_gaussNorm norm _ f hf m).lt_of_ne fun hm => (hs.2 m hm).not_gt hsm\n\n/-- The lowest dominant degree at the radius `b ^ \u03c3`, the first index attaining the Gauss norm,\nis the least contact index of the supporting line of slope `\u03c3` with the coefficient heights. -/\ntheorem isLowestDominant_iff_isLeast_supportingFace {\u03c3 : \u211d}\n (hf : f.HasGaussNorm norm (b ^ \u03c3)) (s : \u2115) :\n TauCeti.PowerSeries.IsLowestDominant (b ^ \u03c3) s f \u2194\n IsLeast (supportingFace (fun n => v (f.coeff n)) \u03c3\n (-Real.logb b (f.gaussNorm norm (b ^ \u03c3)))) s := by\n by_cases hf0 : f = 0\n \u00b7 subst hf0\n exact iff_of_false (fun h => h.ne_zero rfl) fun h => by\n have := mem_supportingFace.mp h.1\n rw [map_zero, AddValuation.map_zero] at this\n exact WithTop.top_ne_coe this\n \u00b7 simp only [IsLeast, mem_lowerBounds,\n mem_supportingFace_addValuation_coeff_iff f v hb hv hf hf0]\n refine \u27e8fun hs => \u27e8hs.norm_coeff_mul_pow_eq, fun m hm => not_lt.mp fun hms =>\n (hs.norm_coeff_mul_pow_lt m hms).ne hm\u27e9, fun hs => \u27e8?_, hs.1, fun m hms => ?_\u27e9\u27e9\n \u00b7 exact TauCeti.PowerSeries.gaussNorm_pos (Real.rpow_pos_of_pos (zero_lt_one.trans hb) \u03c3)\n hf hf0\n \u00b7 exact (le_gaussNorm norm _ f hf m).lt_of_ne fun hm => (hs.2 m hm).not_gt hms\n\n/-- The coefficient heights of a nonzero series restricted at the radius `b ^ \u03c3` touch a\nsupporting line of slope `\u03c3`. -/\ntheorem exists_isSupportingLine_mem_supportingFace_of_isRestricted {\u03c3 : \u211d}\n (hf : f.IsRestricted (b ^ \u03c3)) (hf0 : f \u2260 0) :\n \u2203 (c : \u211d) (i : \u2115), IsSupportingLine (fun n => v (coeff n f)) \u03c3 c \u2227\n i \u2208 supportingFace (fun n => v (coeff n f)) \u03c3 c := by\n have hfn := TauCeti.PowerSeries.hasGaussNorm_of_isRestricted hf\n obtain \u27e8s, hs\u27e9 := TauCeti.PowerSeries.exists_isDistinguished\n (Real.rpow_pos_of_pos (zero_lt_one.trans hb) \u03c3) hf hf0\n exact \u27e8_, s, isSupportingLine_iff.mpr\n (supportingValue_addValuation_coeff_eq_neg_logb_gaussNorm f v hb hv hfn hf0).ge,\n ((isDistinguished_iff_isGreatest_supportingFace f v hb hv hfn s).mp hs).1\u27e9\n\n/-- A series restricted at the radius `b ^ \u03c3` has a Newton polygon whose supporting value at `\u03c3`\nis above `\u22a5`. -/\ntheorem supportingValue_newtonPolygon_ne_bot_of_isRestricted {\u03c3 : \u211d}\n (hf : f.IsRestricted (b ^ \u03c3)) : supportingValue (f.newtonPolygon v) \u03c3 \u2260 \u22a5 := by\n have h := (hasGaussNorm_iff_supportingValue_ne_bot f v hb hv \u03c3).mp\n (TauCeti.PowerSeries.hasGaussNorm_of_isRestricted hf)\n rwa [supportingValue_newtonPolygon (isAdmissible_iff_exists_supportingValue_ne_bot.mpr \u27e8\u03c3, h\u27e9)]\n\nend PowerSeries\n\nnamespace Polynomial\n\nsection SupportingValue\n\nvariable {K : Type*} [NormedDivisionRing K] (p : Polynomial K)\n (v : AddValuation K (WithTop \u211d)) {b : \u211d} (hb : 1 < b)\n (hv : \u2200 x \u2260 0, \u2016x\u2016 = b ^ (-(v x).untop\u2080))\n\ninclude hb hv\n\n/-- At every slope `\u03c3`, the Newton polygon of a nonzero polynomial has supporting value equal\nto the negative base-`b` logarithm of its Gauss norm at the radius `b ^ \u03c3`. -/\ntheorem supportingValue_newtonPolygon_eq_neg_logb_gaussNorm (hp : p \u2260 0) (\u03c3 : \u211d) :\n supportingValue (p.newtonPolygon v) \u03c3 =\n ((-Real.logb b ((p : PowerSeries K).gaussNorm norm (b ^ \u03c3)) : \u211d) : EReal) := by\n rw [\u2190 newtonPolygon_coe]\n exact PowerSeries.supportingValue_newtonPolygon_eq_neg_logb_gaussNorm _ v hb hv\n (TauCeti.PowerSeries.hasGaussNorm_of_isRestricted\n (TauCeti.PowerSeries.isRestricted_polynomial p))\n (Polynomial.coe_eq_zero_iff.not.mpr hp)\n\nend SupportingValue\n\nsection Pure\n\nvariable {K : Type*} [NormedDivisionRing K] {v : AddValuation K (WithTop \u211d)} {b : \u211d}\n\n/-- **Purity criterion, Gauss form.** Let the norm be `\u2016x\u2016 = b ^ (-v x)` for `x \u2260 0`, with\n`1 < b`. Every finite slope of `f` equals `m` exactly when, at the radius `b ^ m`, the weighted\nleading and trailing terms have the same norm and every weighted term has norm at most that of\nthe trailing term. -/\ntheorem forall_mem_newtonSlopes_eq_iff_norm_coeff_mul_rpow_pow_le (hb : 1 < b)\n (hv : \u2200 x \u2260 0, \u2016x\u2016 = b ^ (-(v x).untop\u2080)) {f : K[X]} {m : \u211d} :\n (\u2200 s \u2208 f.newtonSlopes v, s = m) \u2194\n \u2016f.leadingCoeff\u2016 * (b ^ m) ^ f.natDegree =\n \u2016f.trailingCoeff\u2016 * (b ^ m) ^ f.natTrailingDegree \u2227\n \u2200 n, \u2016f.coeff n\u2016 * (b ^ m) ^ n \u2264 \u2016f.trailingCoeff\u2016 * (b ^ m) ^ f.natTrailingDegree := by\n rcases eq_or_ne f 0 with rfl | hf\n \u00b7 simp\n have hnorm {n : \u2115} (hn : f.coeff n \u2260 0) :\n \u2016f.coeff n\u2016 * (b ^ m) ^ n = b ^ (-((v (f.coeff n)).untop\u2080 - m * n)) := by\n simpa using (f : PowerSeries K).norm_coeff_mul_rpow_pow_eq v hb hv (by simpa using hn) m\n rw [forall_mem_newtonSlopes_eq_iff (mt v.top_iff.mp (Polynomial.trailingCoeff_ne_zero.mpr hf))\n (mt v.top_iff.mp (leadingCoeff_ne_zero.mpr hf)), \u2190 coeff_natDegree, trailingCoeff,\n hnorm (coeff_natTrailingDegree_ne_zero.mpr hf),\n hnorm (by rw [coeff_natDegree]; exact leadingCoeff_ne_zero.mpr hf),\n Real.rpow_right_inj (zero_lt_one.trans hb) hb.ne']\n refine and_congr \u27e8fun h => by rw [h]; ring, fun h => by linarith\u27e9 (forall_congr' fun n => ?_)\n have hle := PowerSeries.norm_coeff_mul_rpow_pow_le_iff (f : PowerSeries K) v hb hv n m\n ((v (f.coeff f.natTrailingDegree)).untop\u2080 - m * f.natTrailingDegree)\n rw [coeff_coe] at hle\n rw [hle]\n convert Iff.rfl using 3\n ring\n\nend Pure\n\nend Polynomial\n", "public_theorems": ["PowerSeries.norm_coeff_mul_rpow_pow_eq", "PowerSeries.norm_coeff_mul_rpow_pow_le_iff", "PowerSeries.norm_coeff_le_rpow_neg_iff", "PowerSeries.norm_coeff_mul_rpow_pow_eq_iff", "PowerSeries.isSupportingLine_addValuation_coeff_iff", "PowerSeries.hasGaussNorm_iff_supportingValue_ne_bot", "PowerSeries.isSupportingLine_addValuation_coeff_iff_gaussNorm_le", "PowerSeries.isAdmissible_addValuation_coeff_iff_exists_isRestricted", "PowerSeries.supportingValue_addValuation_coeff_eq_neg_logb_gaussNorm", "PowerSeries.supportingValue_newtonPolygon_eq_neg_logb_gaussNorm", "PowerSeries.mem_supportingFace_addValuation_coeff_iff", "PowerSeries.isDistinguished_iff_isGreatest_supportingFace", "PowerSeries.isLowestDominant_iff_isLeast_supportingFace", "PowerSeries.exists_isSupportingLine_mem_supportingFace_of_isRestricted", "PowerSeries.supportingValue_newtonPolygon_ne_bot_of_isRestricted", "Polynomial.supportingValue_newtonPolygon_eq_neg_logb_gaussNorm", "Polynomial.forall_mem_newtonSlopes_eq_iff_norm_coeff_mul_rpow_pow_le"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Analysis.SpecialFunctions.Log.Base\npublic import TauCeti.Analysis.Convex.Sequence.Face\npublic import TauCeti.NumberTheory.NewtonPolygon.Slopes\npublic import TauCeti.RingTheory.PowerSeries.GaussNorm\n\n/-!\n# Gauss norms and Newton supporting values\n\nFix a real additive valuation `v` on a normed division ring and a base `b > 1` with\n`\u2016x\u2016 = b ^ (-(v x).untop\u2080)` for nonzero `x`. At the radius `b ^ \u03c3` the weighted coefficient\nnorm `\u2016a\u2099\u2016 (b ^ \u03c3) ^ n` is `b ^ (-(v a\u2099 - \u03c3 n))`, the exponential of the negated tilted\ncoefficient height. Consequently an upper bound `b ^ (-c)` on all weighted coefficient norms is\nexactly an affine line of slope `\u03c3` and intercept `c` supporting the coefficient heights, and\na weighted coefficient norm equals `b ^ (-c)` exactly when the coefficient lies on that line.\n\nThis identifies the analytic Gauss norm with the convex supporting-line description:\n\n* the weighted coefficient norms are bounded exactly when the supporting value at `\u03c3` is above\n negative infinity, and coefficient heights are admissible exactly when the series is\n restricted at some positive radius;\n* for a nonzero series with bounded weighted coefficient norms, the supporting value of its\n coefficient heights, and of its Newton polygon, is `-Real.logb b` of its Gauss norm;\n* the coefficients attaining the Gauss norm are exactly the contact points of the supporting\n line of slope `\u03c3`, so the last and the first of them, `TauCeti.PowerSeries.IsDistinguished`\n and `TauCeti.PowerSeries.IsLowestDominant`, are the greatest and least contact indices.\n\nNeither attainment nor restrictedness at the given radius is assumed: at the boundary of\nconvergence the Gauss norm is still the supporting value, while it need not be attained.\nFor polynomials the identities hold at every radius, and the purity criterion\n`Polynomial.forall_mem_newtonSlopes_eq_iff` becomes a statement about weighted norms: every\nfinite slope equals `m` exactly when, at the radius `b ^ m`, the weighted leading and trailing\nterms have equal norms and bound all other weighted terms. The norm and valuation are compared by\nan explicit hypothesis, so no normalisation is hidden in a typeclass instance.\n\n## Main results\n\n* `PowerSeries.isSupportingLine_addValuation_coeff_iff`: affine minorants of the coefficient\n heights are exponential bounds on the weighted coefficient norms.\n* `PowerSeries.hasGaussNorm_iff_supportingValue_ne_bot`: bounded weighted coefficient norms\n correspond to a supporting value above negative infinity.\n* `PowerSeries.isAdmissible_addValuation_coeff_iff_exists_isRestricted`: coefficient heights\n are admissible exactly when the series is restricted at some positive radius.\n* `PowerSeries.supportingValue_newtonPolygon_eq_neg_logb_gaussNorm`: the supporting value of\n the Newton polygon is the negative logarithm of the Gauss norm, with the polynomial case\n `Polynomial.supportingValue_newtonPolygon_eq_neg_logb_gaussNorm` at every radius.\n* `Polynomial.forall_mem_newtonSlopes_eq_iff_norm_coeff_mul_rpow_pow_le`: the purity criterion\n in terms of weighted coefficient norms at the radius `b ^ m`.\n* `PowerSeries.mem_supportingFace_addValuation_coeff_iff`: the contact indices of the\n supporting line are the indices attaining the Gauss norm.\n* `PowerSeries.isDistinguished_iff_isGreatest_supportingFace` and\n `PowerSeries.isLowestDominant_iff_isLeast_supportingFace`: the last and the first coefficient\n attaining the Gauss norm are the greatest and least contact indices.\n* `PowerSeries.exists_isSupportingLine_mem_supportingFace_of_isRestricted`: the coefficient\n heights of a nonzero series restricted at `b ^ \u03c3` touch a supporting line of slope `\u03c3`.\n\n## References\n\n* N. Koblitz, *p-adic Numbers, p-adic Analysis, and Zeta-Functions*, second edition,\n Graduate Texts in Mathematics 58, Springer, 1984, Chapter IV \u00a7\u00a73\u20134.\n* M. Lazard, *Les z\u00e9ros d'une fonction analytique d'une variable sur un corps valu\u00e9 complet*,\n Publications Math\u00e9matiques de l'IH\u00c9S 14 (1962), \u00a71. Lazard's variable is a valuation\n threshold, corresponding to `-\u03c3` here.\n-/\n\npublic section\n\nopen TauCeti\n\nnamespace PowerSeries\n\nvariable {K : Type*} [NormedDivisionRing K] (f : PowerSeries K)\n (v : AddValuation K (WithTop \u211d)) {b : \u211d} (hb : 1 < b)\n (hv : \u2200 x \u2260 0, \u2016x\u2016 = b ^ (-(v x).untop\u2080))\n\ninclude hb hv", "/-- At a nonzero coefficient, the weighted norm is the exponential of the negated tilted\ncoefficient height. -/\ntheorem norm_coeff_mul_rpow_pow_eq {n : \u2115} (hn : f.coeff n \u2260 0) (\u03c3 : \u211d) :\n \u2016f.coeff n\u2016 * (b ^ \u03c3) ^ n = b ^ (-((v (f.coeff n)).untop\u2080 - \u03c3 * n)) :=", "/-- An exponential upper bound on one weighted coefficient norm is an affine lower bound on\nthe height of that coefficient. A zero coefficient satisfies both bounds. -/\ntheorem norm_coeff_mul_rpow_pow_le_iff (n : \u2115) (\u03c3 c : \u211d) :\n \u2016f.coeff n\u2016 * (b ^ \u03c3) ^ n \u2264 b ^ (-c) \u2194\n ((c + \u03c3 * n : \u211d) : WithTop \u211d) \u2264 v (f.coeff n) :=", "/-- An upper bound `b ^ (-c)` on one coefficient norm is the lower bound `c` on the height of that\ncoefficient. A zero coefficient satisfies both bounds. -/\ntheorem norm_coeff_le_rpow_neg_iff (n : \u2115) (c : \u211d) :\n \u2016f.coeff n\u2016 \u2264 b ^ (-c) \u2194 (c : WithTop \u211d) \u2264 v (f.coeff n) :=", "/-- A weighted coefficient norm equals `b ^ (-c)` exactly when the coefficient lies on the line\nof slope `\u03c3` and intercept `c`. A zero coefficient satisfies neither condition. -/\ntheorem norm_coeff_mul_rpow_pow_eq_iff (n : \u2115) (\u03c3 c : \u211d) :\n \u2016f.coeff n\u2016 * (b ^ \u03c3) ^ n = b ^ (-c) \u2194\n v (f.coeff n) = ((c + \u03c3 * n : \u211d) : WithTop \u211d) :=", "/-- A line of slope `\u03c3` and intercept `c` supports the coefficient heights exactly when\n`b ^ (-c)` bounds every weighted coefficient norm at the radius `b ^ \u03c3`. No boundedness\nassumption is needed. -/\ntheorem isSupportingLine_addValuation_coeff_iff (\u03c3 c : \u211d) :\n IsSupportingLine (fun n => v (f.coeff n)) \u03c3 c \u2194\n \u2200 n, \u2016f.coeff n\u2016 * (b ^ \u03c3) ^ n \u2264 b ^ (-c) :=", "/-- Bounded weighted coefficient norms are equivalent to a supporting value above negative\ninfinity, including for the zero series. This is weaker than restrictedness. -/\ntheorem hasGaussNorm_iff_supportingValue_ne_bot (\u03c3 : \u211d) :\n f.HasGaussNorm norm (b ^ \u03c3) \u2194 supportingValue (fun n => v (f.coeff n)) \u03c3 \u2260 \u22a5 :=", "/-- For bounded weighted coefficient norms, a line of slope `\u03c3` and intercept `c` supports the\ncoefficient heights exactly when `b ^ (-c)` bounds the Gauss norm at the radius `b ^ \u03c3`. -/\ntheorem isSupportingLine_addValuation_coeff_iff_gaussNorm_le {\u03c3 : \u211d}\n (hf : f.HasGaussNorm norm (b ^ \u03c3)) (c : \u211d) :\n IsSupportingLine (fun n => v (f.coeff n)) \u03c3 c \u2194 f.gaussNorm norm (b ^ \u03c3) \u2264 b ^ (-c) :=", "/-- Coefficient heights are admissible exactly when the series is restricted at some positive\nradius. This includes the zero series, whose heights are all infinite. -/\ntheorem isAdmissible_addValuation_coeff_iff_exists_isRestricted :\n IsAdmissible (fun n => v (f.coeff n)) \u2194 \u2203 r : \u211d, 0 < r \u2227 f.IsRestricted r :=", "/-- For a nonzero series with bounded weighted coefficient norms, the supporting value of its\ncoefficient heights is the negative base-`b` logarithm of its Gauss norm. The Gauss norm need\nnot be attained. -/\ntheorem supportingValue_addValuation_coeff_eq_neg_logb_gaussNorm {\u03c3 : \u211d}\n (hf : f.HasGaussNorm norm (b ^ \u03c3)) (hf0 : f \u2260 0) :\n supportingValue (fun n => v (f.coeff n)) \u03c3 =\n ((-Real.logb b (f.gaussNorm norm (b ^ \u03c3)) : \u211d) : EReal) :=", "/-- The Newton polygon of a nonzero series with bounded weighted coefficient norms has\nsupporting value equal to the negative base-`b` logarithm of the Gauss norm. Boundedness at\nthis radius already makes the coefficient heights admissible. -/\ntheorem supportingValue_newtonPolygon_eq_neg_logb_gaussNorm {\u03c3 : \u211d}\n (hf : f.HasGaussNorm norm (b ^ \u03c3)) (hf0 : f \u2260 0) :\n supportingValue (f.newtonPolygon v) \u03c3 =\n ((-Real.logb b (f.gaussNorm norm (b ^ \u03c3)) : \u211d) : EReal) :=", "/-- For a nonzero series with bounded weighted coefficient norms, the coefficients touching the\nsupporting line of slope `\u03c3` are exactly those attaining the Gauss norm at the radius\n`b ^ \u03c3`. The intercept of that line is the supporting value\n`-Real.logb b (f.gaussNorm norm (b ^ \u03c3))`. -/\ntheorem mem_supportingFace_addValuation_coeff_iff {\u03c3 : \u211d}\n (hf : f.HasGaussNorm norm (b ^ \u03c3)) (hf0 : f \u2260 0) (n : \u2115) :\n n \u2208 supportingFace (fun n => v (f.coeff n)) \u03c3 (-Real.logb b (f.gaussNorm norm (b ^ \u03c3))) \u2194\n \u2016f.coeff n\u2016 * (b ^ \u03c3) ^ n = f.gaussNorm norm (b ^ \u03c3) :=", "/-- The distinguished degree at the radius `b ^ \u03c3`, the last index attaining the Gauss norm, is\nthe greatest contact index of the supporting line of slope `\u03c3` with the coefficient heights. -/\ntheorem isDistinguished_iff_isGreatest_supportingFace {\u03c3 : \u211d}\n (hf : f.HasGaussNorm norm (b ^ \u03c3)) (s : \u2115) :\n TauCeti.PowerSeries.IsDistinguished (b ^ \u03c3) s f \u2194\n IsGreatest (supportingFace (fun n => v (f.coeff n)) \u03c3\n (-Real.logb b (f.gaussNorm norm (b ^ \u03c3)))) s :=", "/-- The lowest dominant degree at the radius `b ^ \u03c3`, the first index attaining the Gauss norm,\nis the least contact index of the supporting line of slope `\u03c3` with the coefficient heights. -/\ntheorem isLowestDominant_iff_isLeast_supportingFace {\u03c3 : \u211d}\n (hf : f.HasGaussNorm norm (b ^ \u03c3)) (s : \u2115) :\n TauCeti.PowerSeries.IsLowestDominant (b ^ \u03c3) s f \u2194\n IsLeast (supportingFace (fun n => v (f.coeff n)) \u03c3\n (-Real.logb b (f.gaussNorm norm (b ^ \u03c3)))) s :=", "/-- The coefficient heights of a nonzero series restricted at the radius `b ^ \u03c3` touch a\nsupporting line of slope `\u03c3`. -/\ntheorem exists_isSupportingLine_mem_supportingFace_of_isRestricted {\u03c3 : \u211d}\n (hf : f.IsRestricted (b ^ \u03c3)) (hf0 : f \u2260 0) :\n \u2203 (c : \u211d) (i : \u2115), IsSupportingLine (fun n => v (coeff n f)) \u03c3 c \u2227\n i \u2208 supportingFace (fun n => v (coeff n f)) \u03c3 c :=", "/-- A series restricted at the radius `b ^ \u03c3` has a Newton polygon whose supporting value at `\u03c3`\nis above `\u22a5`. -/\ntheorem supportingValue_newtonPolygon_ne_bot_of_isRestricted {\u03c3 : \u211d}\n (hf : f.IsRestricted (b ^ \u03c3)) : supportingValue (f.newtonPolygon v) \u03c3 \u2260 \u22a5 :=", "end PowerSeries\n\nnamespace Polynomial\n\nsection SupportingValue\n\nvariable {K : Type*} [NormedDivisionRing K] (p : Polynomial K)\n (v : AddValuation K (WithTop \u211d)) {b : \u211d} (hb : 1 < b)\n (hv : \u2200 x \u2260 0, \u2016x\u2016 = b ^ (-(v x).untop\u2080))\n\ninclude hb hv", "/-- At every slope `\u03c3`, the Newton polygon of a nonzero polynomial has supporting value equal\nto the negative base-`b` logarithm of its Gauss norm at the radius `b ^ \u03c3`. -/\ntheorem supportingValue_newtonPolygon_eq_neg_logb_gaussNorm (hp : p \u2260 0) (\u03c3 : \u211d) :\n supportingValue (p.newtonPolygon v) \u03c3 =\n ((-Real.logb b ((p : PowerSeries K).gaussNorm norm (b ^ \u03c3)) : \u211d) : EReal) :=", "end SupportingValue\n\nsection Pure\n\nvariable {K : Type*} [NormedDivisionRing K] {v : AddValuation K (WithTop \u211d)} {b : \u211d}", "/-- **Purity criterion, Gauss form.** Let the norm be `\u2016x\u2016 = b ^ (-v x)` for `x \u2260 0`, with\n`1 < b`. Every finite slope of `f` equals `m` exactly when, at the radius `b ^ m`, the weighted\nleading and trailing terms have the same norm and every weighted term has norm at most that of\nthe trailing term. -/\ntheorem forall_mem_newtonSlopes_eq_iff_norm_coeff_mul_rpow_pow_le (hb : 1 < b)\n (hv : \u2200 x \u2260 0, \u2016x\u2016 = b ^ (-(v x).untop\u2080)) {f : K[X]} {m : \u211d} :\n (\u2200 s \u2208 f.newtonSlopes v, s = m) \u2194\n \u2016f.leadingCoeff\u2016 * (b ^ m) ^ f.natDegree =\n \u2016f.trailingCoeff\u2016 * (b ^ m) ^ f.natTrailingDegree \u2227\n \u2200 n, \u2016f.coeff n\u2016 * (b ^ m) ^ n \u2264 \u2016f.trailingCoeff\u2016 * (b ^ m) ^ f.natTrailingDegree :=", "end Pure\n\nend Polynomial"], "free_length": 6235, "file_length": 10430, "heartbeats": 8845, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Algebra.Homology.EulerCharacteristic.ExtEuler.Graded.UniformBound", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Algebra/Homology/EulerCharacteristic/ExtEuler/Graded/UniformBound.lean", "module": "TauCeti.Algebra.Homology.EulerCharacteristic.ExtEuler.Graded.UniformBound", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Algebra.Homology.EulerCharacteristic.ExtEuler.Graded.FiniteLength\n\n/-!\n# Uniform graded Ext bounds from simple modules\n\nA cohomological bound on graded Ext can be uniform both in internal degree and in the pair of\nobjects. For finite modules it suffices to test such a bound on simple modules. For an exhaustive\nfamily of graded simples up to shift, it suffices to test the chosen representatives: arbitrary\ninternal shifts do not change a cohomological bound.\n\nIn particular, pointwise graded Euler-admissibility on a finite exhaustive family gives one\ncohomological bound for all finite graded modules. Finiteness of internal support remains a\nseparate condition; it is not asserted by the uniform-bound predicate.\n\n## References\n\n* Charles A. Weibel, *An Introduction to Homological Algebra*, Sections 2.4--2.7 and Chapter 4.\n* C. N\u0103st\u0103sescu and F. Van Oystaeyen, *Methods of Graded Rings*, Section 2.3.\n-/\n\npublic section\n\nnamespace TauCeti\n\nopen CategoryTheory CategoryTheory.Abelian CategoryTheory.Limits\n\nuniverse w v u uk uA\n\nvariable {k : Type uk} [Field k] {A : Type uA} [Ring A] [Algebra k A]\n {\ud835\udc9c : \u2124 \u2192 Submodule k A}\n\nsection Simple\n\nvariable [HasExt.{w} (GradedModuleCat.{v} \ud835\udc9c)]\n\n/-- A fixed bound against all finite-dimensional simple graded sources bounds every\nfinite-dimensional graded source, without increasing the bound. -/\ntheorem isGradedExtBoundedBy_of_finite_of_forall_simple\n (e : GradedModuleCat.{v} \ud835\udc9c \u224c GradedModuleCat.{v} \ud835\udc9c)\n (Y : GradedModuleCat.{v} \ud835\udc9c) (N : \u2115)\n (h : \u2200 S : GradedModuleCat.{v} \ud835\udc9c, Module.Finite k S \u2192 Simple S \u2192\n IsGradedExtBoundedBy.{w} e S Y N)\n (X : GradedModuleCat.{v} \ud835\udc9c) [Module.Finite k X] :\n IsGradedExtBoundedBy.{w} e X Y N := by\n refine X.finite_induction (fun M \u21a6 IsGradedExtBoundedBy.{w} e M Y N)\n (fun _ hM \u21a6 \u27e8fun n _ _ \u21a6 subsingleton_ext_of_isZero_left hM _ n\u27e9) h ?_\n intro S _ _ hS h\u2081 h\u2083\n simpa only [max_self] using h\u2081.of_shortExact\u2082' hS h\u2083\n\n/-- A fixed bound against all finite-dimensional simple graded targets bounds every\nfinite-dimensional graded target, without increasing the bound. -/\ntheorem isGradedExtBoundedBy_of_finite_of_forall_simple_right\n (e : GradedModuleCat.{v} \ud835\udc9c \u224c GradedModuleCat.{v} \ud835\udc9c)\n (X : GradedModuleCat.{v} \ud835\udc9c) (N : \u2115)\n (h : \u2200 T : GradedModuleCat.{v} \ud835\udc9c, Module.Finite k T \u2192 Simple T \u2192\n IsGradedExtBoundedBy.{w} e X T N)\n (Y : GradedModuleCat.{v} \ud835\udc9c) [Module.Finite k Y] :\n IsGradedExtBoundedBy.{w} e X Y N := by\n refine Y.finite_induction (fun M \u21a6 IsGradedExtBoundedBy.{w} e X M N)\n (fun _ hM \u21a6 \u27e8fun n _ j \u21a6 subsingleton_ext_of_isZero_right X\n ((e ^ j).functor.map_isZero hM) n\u27e9) h ?_\n intro S _ _ hS h\u2081 h\u2083\n simpa only [max_self] using h\u2081.of_shortExact\u2082 hS h\u2083\n\nend Simple\n\nsection Exhaustive\n\nvariable {I : Type*} [Module.Finite k A] [HasExt.{w} (GradedModuleCat.{uA} \ud835\udc9c)]\n\n/-- A uniform cohomological bound on finite graded modules is detected on any exhaustive\nfamily of graded simples up to shift, with the very same bound. -/\ntheorem isGradedExtBoundedOn_gradedFiniteModules_iff\n {S : I \u2192 (gradedFiniteModules \ud835\udc9c).FullSubcategory}\n (hS : IsExhaustiveGradedSimpleFamily S) (N : \u2115) :\n IsGradedExtBoundedOn.{w} (GradedModuleCat.shift \ud835\udc9c)\n (gradedFiniteModules \ud835\udc9c) (gradedFiniteModules \ud835\udc9c) N \u2194\n \u2200 i j, IsGradedExtBoundedBy.{w} (GradedModuleCat.shift \ud835\udc9c) (S i).obj (S j).obj N := by\n refine \u27e8fun h i j \u21a6 h.isGradedExtBoundedBy (S i).property (S j).property, fun h \u21a6 ?_\u27e9\n refine \u27e8fun X Y hX hY \u21a6 hS.prop_on_pairs\n (fun X Y \u21a6 IsGradedExtBoundedBy.{w} (GradedModuleCat.shift \ud835\udc9c) X Y N)\n (fun h i j \u21a6 h.of_iso i j) (fun h d \u21a6 h.shiftObj d)\n (fun h d \u21a6 h.shiftObjTarget d) ?_ ?_ h hX hY\u27e9\n \u00b7 intro Y h X hX\n have := hX\n exact isGradedExtBoundedBy_of_finite_of_forall_simple _ Y N h X\n \u00b7 intro X h Y hY\n have := hY\n exact isGradedExtBoundedBy_of_finite_of_forall_simple_right _ X N h Y\n\n/-- Pointwise eventual graded Ext-vanishing on a finite exhaustive family of simples supplies\none cohomological bound for every pair of finite graded modules and every internal degree. -/\ntheorem exists_isGradedExtBoundedOn_of_forall_simple [Finite I]\n {S : I \u2192 (gradedFiniteModules \ud835\udc9c).FullSubcategory}\n (hS : IsExhaustiveGradedSimpleFamily S)\n (h : \u2200 i j, IsGradedExtBounded.{w} (GradedModuleCat.shift \ud835\udc9c) (S i).obj (S j).obj) :\n \u2203 N, IsGradedExtBoundedOn.{w} (GradedModuleCat.shift \ud835\udc9c)\n (gradedFiniteModules \ud835\udc9c) (gradedFiniteModules \ud835\udc9c) N := by\n obtain \u27e8N, hN\u27e9 := exists_forall_isGradedExtBoundedBy\n (X := fun p : I \u00d7 I \u21a6 (S p.1).obj) (Y := fun p : I \u00d7 I \u21a6 (S p.2).obj)\n (fun p \u21a6 h p.1 p.2)\n exact \u27e8N, (isGradedExtBoundedOn_gradedFiniteModules_iff hS N).2 (fun i j \u21a6 hN (i, j))\u27e9\n\nend Exhaustive\n\nend TauCeti\n", "public_theorems": ["TauCeti.isGradedExtBoundedBy_of_finite_of_forall_simple", "TauCeti.isGradedExtBoundedBy_of_finite_of_forall_simple_right", "TauCeti.isGradedExtBoundedOn_gradedFiniteModules_iff", "TauCeti.exists_isGradedExtBoundedOn_of_forall_simple"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.Algebra.Homology.EulerCharacteristic.ExtEuler.Graded.FiniteLength\n\n/-!\n# Uniform graded Ext bounds from simple modules\n\nA cohomological bound on graded Ext can be uniform both in internal degree and in the pair of\nobjects. For finite modules it suffices to test such a bound on simple modules. For an exhaustive\nfamily of graded simples up to shift, it suffices to test the chosen representatives: arbitrary\ninternal shifts do not change a cohomological bound.\n\nIn particular, pointwise graded Euler-admissibility on a finite exhaustive family gives one\ncohomological bound for all finite graded modules. Finiteness of internal support remains a\nseparate condition; it is not asserted by the uniform-bound predicate.\n\n## References\n\n* Charles A. Weibel, *An Introduction to Homological Algebra*, Sections 2.4--2.7 and Chapter 4.\n* C. N\u0103st\u0103sescu and F. Van Oystaeyen, *Methods of Graded Rings*, Section 2.3.\n-/\n\npublic section\n\nnamespace TauCeti\n\nopen CategoryTheory CategoryTheory.Abelian CategoryTheory.Limits\n\nuniverse w v u uk uA\n\nvariable {k : Type uk} [Field k] {A : Type uA} [Ring A] [Algebra k A]\n {\ud835\udc9c : \u2124 \u2192 Submodule k A}\n\nsection Simple\n\nvariable [HasExt.{w} (GradedModuleCat.{v} \ud835\udc9c)]", "/-- A fixed bound against all finite-dimensional simple graded sources bounds every\nfinite-dimensional graded source, without increasing the bound. -/\ntheorem isGradedExtBoundedBy_of_finite_of_forall_simple\n (e : GradedModuleCat.{v} \ud835\udc9c \u224c GradedModuleCat.{v} \ud835\udc9c)\n (Y : GradedModuleCat.{v} \ud835\udc9c) (N : \u2115)\n (h : \u2200 S : GradedModuleCat.{v} \ud835\udc9c, Module.Finite k S \u2192 Simple S \u2192\n IsGradedExtBoundedBy.{w} e S Y N)\n (X : GradedModuleCat.{v} \ud835\udc9c) [Module.Finite k X] :\n IsGradedExtBoundedBy.{w} e X Y N :=", "/-- A fixed bound against all finite-dimensional simple graded targets bounds every\nfinite-dimensional graded target, without increasing the bound. -/\ntheorem isGradedExtBoundedBy_of_finite_of_forall_simple_right\n (e : GradedModuleCat.{v} \ud835\udc9c \u224c GradedModuleCat.{v} \ud835\udc9c)\n (X : GradedModuleCat.{v} \ud835\udc9c) (N : \u2115)\n (h : \u2200 T : GradedModuleCat.{v} \ud835\udc9c, Module.Finite k T \u2192 Simple T \u2192\n IsGradedExtBoundedBy.{w} e X T N)\n (Y : GradedModuleCat.{v} \ud835\udc9c) [Module.Finite k Y] :\n IsGradedExtBoundedBy.{w} e X Y N :=", "end Simple\n\nsection Exhaustive\n\nvariable {I : Type*} [Module.Finite k A] [HasExt.{w} (GradedModuleCat.{uA} \ud835\udc9c)]", "/-- A uniform cohomological bound on finite graded modules is detected on any exhaustive\nfamily of graded simples up to shift, with the very same bound. -/\ntheorem isGradedExtBoundedOn_gradedFiniteModules_iff\n {S : I \u2192 (gradedFiniteModules \ud835\udc9c).FullSubcategory}\n (hS : IsExhaustiveGradedSimpleFamily S) (N : \u2115) :\n IsGradedExtBoundedOn.{w} (GradedModuleCat.shift \ud835\udc9c)\n (gradedFiniteModules \ud835\udc9c) (gradedFiniteModules \ud835\udc9c) N \u2194\n \u2200 i j, IsGradedExtBoundedBy.{w} (GradedModuleCat.shift \ud835\udc9c) (S i).obj (S j).obj N :=", "/-- Pointwise eventual graded Ext-vanishing on a finite exhaustive family of simples supplies\none cohomological bound for every pair of finite graded modules and every internal degree. -/\ntheorem exists_isGradedExtBoundedOn_of_forall_simple [Finite I]\n {S : I \u2192 (gradedFiniteModules \ud835\udc9c).FullSubcategory}\n (hS : IsExhaustiveGradedSimpleFamily S)\n (h : \u2200 i j, IsGradedExtBounded.{w} (GradedModuleCat.shift \ud835\udc9c) (S i).obj (S j).obj) :\n \u2203 N, IsGradedExtBoundedOn.{w} (GradedModuleCat.shift \ud835\udc9c)\n (gradedFiniteModules \ud835\udc9c) (gradedFiniteModules \ud835\udc9c) N :=", "end Exhaustive\n\nend TauCeti"], "free_length": 1179, "file_length": 3037, "heartbeats": 8962, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.AlgebraicGeometry.ProjectiveBundle.Map", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/AlgebraicGeometry/ProjectiveBundle/Map.lean", "module": "TauCeti.AlgebraicGeometry.ProjectiveBundle.Map", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.AlgebraicGeometry.ProjectiveBundle.Basic\npublic import TauCeti.AlgebraicGeometry.RelativeProj.TwistingSheaf.Pullback\n\n/-!\n# Projective bundles of quotient modules\n\nAn epimorphism of quasi-coherent modules `F \u27f6 G` on a scheme induces the closed immersion\n`projectiveBundle.mapOfEpi : P(G) \u27f6 P(F)` over the base. It is contravariantly functorial and\npulls back every integer twist by the canonical isomorphism\n`projectiveBundle.mapOfEpiTwistingSheafIso`. The defining equation\n`projectiveBundle.mapOfEpiTwistingSheafHom_def` and chart formula\n`projectiveBundle.mapOfEpiTwistingSheafHom_comp_\u03c0` identify the comparison with the relative\nProj map and its affine chart components.\n\nThese constructions use `gradedSymmetricAlgebraDegreeOneIso` and the relative Proj results\n`CommMon.isClosedImmersion_relativeProjMap_of_epi_one` and\n`isIso_relativeProjTwistingSheafMap_gradedSymmetricAlgebra`.\n\n## References\n\n* [The Stacks Project, Section 27.21](https://stacks.math.columbia.edu/tag/01OA)\n* [The Stacks Project, Lemma 27.11.5](https://stacks.math.columbia.edu/tag/01N1)\n-/\n\npublic section\n\nnoncomputable section\n\nopen CategoryTheory\n\nnamespace TauCeti.AlgebraicGeometry.ProjectiveBundles.projectiveBundle\n\nopen _root_.AlgebraicGeometry\n\nuniverse u\n\nvariable {S : Scheme.{u}} {F G H : QuasicoherentSheaf S}\n\nsection\n\nvariable (q : F.obj \u27f6 G.obj) [Epi q]\n\n/-- For an epimorphism of quasi-coherent modules, the graded symmetric algebra map satisfies\nthe irrelevant-ideal containment for the induced morphism of projective bundles. -/\ntheorem irrelevant_le_map_of_epi :\n \u2200 U : S.Opens, IsAffineOpen U \u2192\n HomogeneousIdeal.irrelevant (((gradedSymmetricAlgebra S).obj G).obj.gradedSectionsGrading U) \u2264\n (HomogeneousIdeal.irrelevant\n (((gradedSymmetricAlgebra S).obj F).obj.gradedSectionsGrading U)).map\n (CommMon.gradedSectionsGradedHom\n ((gradedSymmetricAlgebra S).map (ObjectProperty.homMk q)).hom U) :=\n have := F.epi_gradedSymmetricAlgebra_map_one q\n CommMon.irrelevant_le_map_of_epi_one _ (isGeneratedInDegreeOne_gradedSymmetricAlgebra G)\n\n/-- An epimorphism `q : F \u27f6 G` induces the morphism `P(G) \u27f6 P(F)` on the relative Proj\nof the graded symmetric algebras. -/\n@[stacks 01OA]\ndef mapOfEpi : projectiveBundle S G.obj \u27f6 projectiveBundle S F.obj :=\n CommMon.relativeProjMap ((gradedSymmetricAlgebra S).map (ObjectProperty.homMk q)).hom\n (irrelevant_le_map_of_epi q)\n\n/-- The defining equation for `mapOfEpi` exposes its construction by relative Proj. -/\ntheorem mapOfEpi_def :\n mapOfEpi q = CommMon.relativeProjMap ((gradedSymmetricAlgebra S).map\n (ObjectProperty.homMk q)).hom (irrelevant_le_map_of_epi q) :=\n (rfl)\n\n/-- The map of projective bundles induced by an epimorphism lies over the base. -/\n@[reassoc (attr := simp)]\ntheorem mapOfEpi_projection : mapOfEpi q \u226b projection S F.obj = projection S G.obj :=\n CommMon.relativeProjMap_relativeProjToBase _ _\n\n/-- The map of projective bundles induced by an epimorphism is a closed immersion. -/\ninstance isClosedImmersion_mapOfEpi : IsClosedImmersion (mapOfEpi q) := by\n have := F.epi_gradedSymmetricAlgebra_map_one q\n exact CommMon.isClosedImmersion_relativeProjMap_of_epi_one _\n (isGeneratedInDegreeOne_gradedSymmetricAlgebra G)\n\n/-- The identity module map induces the identity on the projective bundle. -/\n@[simp]\ntheorem mapOfEpi_id (F : QuasicoherentSheaf S) :\n mapOfEpi (\ud835\udfd9 F.obj) = \ud835\udfd9 (projectiveBundle S F.obj) := by\n have h : ((gradedSymmetricAlgebra S).map (ObjectProperty.homMk (\ud835\udfd9 F.obj))).hom =\n \ud835\udfd9 ((gradedSymmetricAlgebra S).obj F).obj := by\n exact (ObjectProperty.\u03b9 _).congr_map ((gradedSymmetricAlgebra S).map_id F)\n refine (CommMon.relativeProjMap_congr h (irrelevant_le_map_of_epi (\ud835\udfd9 F.obj)) ?_).trans\n (CommMon.relativeProjMap_id _)\n exact fun U _ \u21a6 CommMon.irrelevant_le_map_of_isIso (\ud835\udfd9 _) U\n\n/-- A composite of epimorphisms induces the composite of the projective bundle maps in\nreverse order. -/\n@[simp]\ntheorem mapOfEpi_comp (r : G.obj \u27f6 H.obj) [Epi r] :\n mapOfEpi (q \u226b r) = mapOfEpi r \u226b mapOfEpi q := by\n have h : ((gradedSymmetricAlgebra S).map (ObjectProperty.homMk (q \u226b r))).hom =\n ((gradedSymmetricAlgebra S).map (ObjectProperty.homMk q)).hom \u226b\n ((gradedSymmetricAlgebra S).map (ObjectProperty.homMk r)).hom := by\n exact ((gradedSymmetricAlgebra S) \u22d9 ObjectProperty.\u03b9 _).map_comp\n (ObjectProperty.homMk q) (ObjectProperty.homMk r)\n have hcomp := h \u25b8 irrelevant_le_map_of_epi (q \u226b r)\n exact (CommMon.relativeProjMap_congr h (irrelevant_le_map_of_epi (q \u226b r)) hcomp).trans\n (CommMon.relativeProjMap_comp _ _ (irrelevant_le_map_of_epi q)\n (irrelevant_le_map_of_epi r) hcomp)\n\nend\n\n/-- A module isomorphism induces an isomorphism of projective bundles. -/\ninstance isIso_mapOfEpi (q : F.obj \u27f6 G.obj) [IsIso q] : IsIso (mapOfEpi q) :=\n \u27e8\u27e8mapOfEpi (inv q), by simp only [\u2190 mapOfEpi_comp, IsIso.inv_hom_id, mapOfEpi_id],\n by simp only [\u2190 mapOfEpi_comp, IsIso.hom_inv_id, mapOfEpi_id]\u27e9\u27e9\n\n/-- The inverse of the projective-bundle map of a module isomorphism is induced by its inverse. -/\n@[simp]\ntheorem inv_mapOfEpi (q : F.obj \u27f6 G.obj) [IsIso q] :\n inv (mapOfEpi q) = mapOfEpi (inv q) := by\n apply IsIso.inv_eq_of_hom_inv_id\n simp only [\u2190 mapOfEpi_comp, IsIso.inv_hom_id, mapOfEpi_id]\n\nvariable (q : F.obj \u27f6 G.obj) [Epi q]\n\n/-- The canonical map from the pullback of `\ud835\udcaa(m)` on `P(F)` to `\ud835\udcaa(m)` on `P(G)`,\ninduced by the symmetric algebra map of the epimorphism. -/\ndef mapOfEpiTwistingSheafHom (m : \u2124) :\n (Scheme.Modules.pullback (mapOfEpi q)).obj (twistingSheaf S F.obj m).obj \u27f6\n (twistingSheaf S G.obj m).obj :=\n CommMon.relativeProjTwistingSheafMap ((gradedSymmetricAlgebra S).map (ObjectProperty.homMk q)).hom\n (irrelevant_le_map_of_epi q) m\n\n/-- The twist comparison followed by identification with the relative Proj twist is the relative\nProj comparison, after identifying the two pullback sources. -/\ntheorem mapOfEpiTwistingSheafHom_def (m : \u2124) :\n mapOfEpiTwistingSheafHom q m \u226b eqToHom (twistingSheaf_obj S G.obj m) =\n (Scheme.Modules.pullbackCongr (mapOfEpi_def q)).hom.app _ \u226b\n (Scheme.Modules.pullback _).map (eqToHom (twistingSheaf_obj S F.obj m)) \u226b\n CommMon.relativeProjTwistingSheafMap\n ((gradedSymmetricAlgebra S).map (ObjectProperty.homMk q)).hom\n (irrelevant_le_map_of_epi q) m := by\n have hF : eqToHom (twistingSheaf_obj S F.obj m) = \ud835\udfd9 (twistingSheaf S F.obj m).obj :=\n eqToHom_refl _ _\n have hG : eqToHom (twistingSheaf_obj S G.obj m) = \ud835\udfd9 (twistingSheaf S G.obj m).obj :=\n eqToHom_refl _ _\n have hq : (Scheme.Modules.pullbackCongr (mapOfEpi_def q)).hom.app\n (twistingSheaf S F.obj m).obj =\n \ud835\udfd9 ((Scheme.Modules.pullback (mapOfEpi q)).obj (twistingSheaf S F.obj m).obj) := by\n simp only [Scheme.Modules.pullbackCongr, eqToIso.hom, eqToHom_app]\n exact eqToHom_refl _ _\n simp only [hF, hG, hq]\n -- Apply the category laws as terms so their object arguments can use definitional equality.\n refine (Category.comp_id _).trans ((Category.id_comp _).trans ?_).symm\n exact (congrArg (\u00b7 \u226b _) ((Scheme.Modules.pullback (mapOfEpi q)).map_id _)).trans\n (Category.id_comp _)\n\n/-- On an affine chart, the twist comparison is the relative Proj chart component. -/\ntheorem mapOfEpiTwistingSheafHom_comp_\u03c0 (m : \u2124) (U : S.AffineZariskiSite) :\n mapOfEpiTwistingSheafHom q m \u226b eqToHom (twistingSheaf_obj S G.obj m) \u226b\n (((gradedSymmetricAlgebra S).obj G).obj.relativeProjTwistingSheafGlueData m).\u03c0 U =\n (Scheme.Modules.pullbackCongr (mapOfEpi_def q)).hom.app _ \u226b\n (Scheme.Modules.pullback _).map (eqToHom (twistingSheaf_obj S F.obj m)) \u226b\n CommMon.relativeProjTwistingSheafMapComponent\n ((gradedSymmetricAlgebra S).map (ObjectProperty.homMk q)).hom (irrelevant_le_map_of_epi q)\n m U := by\n have h := (reassoc_of% (mapOfEpiTwistingSheafHom_def q m))\n ((((gradedSymmetricAlgebra S).obj G).obj.relativeProjTwistingSheafGlueData m).\u03c0 U)\n exact h.trans (congrArg (_ \u226b \u00b7) (congrArg (_ \u226b \u00b7)\n (CommMon.relativeProjTwistingSheafMap_comp_\u03c0 _ (irrelevant_le_map_of_epi q) m U)))\n\n/-- Pullback along the map induced by an epimorphism identifies the integer twists. -/\ninstance isIso_mapOfEpiTwistingSheafHom (m : \u2124) : IsIso (mapOfEpiTwistingSheafHom q m) :=\n isIso_relativeProjTwistingSheafMap_gradedSymmetricAlgebra F\n ((gradedSymmetricAlgebra S).map (ObjectProperty.homMk q)).hom (irrelevant_le_map_of_epi q) m\n\n/-- The canonical pullback isomorphism for the integer twists along the map induced by an\nepimorphism. -/\ndef mapOfEpiTwistingSheafIso (m : \u2124) :\n (Scheme.Modules.pullback (mapOfEpi q)).obj (twistingSheaf S F.obj m).obj \u2245\n (twistingSheaf S G.obj m).obj :=\n asIso (mapOfEpiTwistingSheafHom q m)\n\n/-- The forward map of the canonical pullback isomorphism is the twisting-sheaf map. -/\n@[simp]\ntheorem mapOfEpiTwistingSheafIso_hom (m : \u2124) :\n (mapOfEpiTwistingSheafIso q m).hom = mapOfEpiTwistingSheafHom q m :=\n (rfl)\n\nend TauCeti.AlgebraicGeometry.ProjectiveBundles.projectiveBundle\n", "public_theorems": ["TauCeti.AlgebraicGeometry.ProjectiveBundles.projectiveBundle.irrelevant_le_map_of_epi", "TauCeti.AlgebraicGeometry.ProjectiveBundles.projectiveBundle.mapOfEpi_def", "TauCeti.AlgebraicGeometry.ProjectiveBundles.projectiveBundle.mapOfEpi_projection", "TauCeti.AlgebraicGeometry.ProjectiveBundles.projectiveBundle.mapOfEpi_id", "TauCeti.AlgebraicGeometry.ProjectiveBundles.projectiveBundle.mapOfEpi_comp", "TauCeti.AlgebraicGeometry.ProjectiveBundles.projectiveBundle.inv_mapOfEpi", "TauCeti.AlgebraicGeometry.ProjectiveBundles.projectiveBundle.mapOfEpiTwistingSheafHom_def", "TauCeti.AlgebraicGeometry.ProjectiveBundles.projectiveBundle.mapOfEpiTwistingSheafHom_comp_\u03c0", "TauCeti.AlgebraicGeometry.ProjectiveBundles.projectiveBundle.mapOfEpiTwistingSheafIso_hom"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import TauCeti.AlgebraicGeometry.ProjectiveBundle.Basic\npublic import TauCeti.AlgebraicGeometry.RelativeProj.TwistingSheaf.Pullback\n\n/-!\n# Projective bundles of quotient modules\n\nAn epimorphism of quasi-coherent modules `F \u27f6 G` on a scheme induces the closed immersion\n`projectiveBundle.mapOfEpi : P(G) \u27f6 P(F)` over the base. It is contravariantly functorial and\npulls back every integer twist by the canonical isomorphism\n`projectiveBundle.mapOfEpiTwistingSheafIso`. The defining equation\n`projectiveBundle.mapOfEpiTwistingSheafHom_def` and chart formula\n`projectiveBundle.mapOfEpiTwistingSheafHom_comp_\u03c0` identify the comparison with the relative\nProj map and its affine chart components.\n\nThese constructions use `gradedSymmetricAlgebraDegreeOneIso` and the relative Proj results\n`CommMon.isClosedImmersion_relativeProjMap_of_epi_one` and\n`isIso_relativeProjTwistingSheafMap_gradedSymmetricAlgebra`.\n\n## References\n\n* [The Stacks Project, Section 27.21](https://stacks.math.columbia.edu/tag/01OA)\n* [The Stacks Project, Lemma 27.11.5](https://stacks.math.columbia.edu/tag/01N1)\n-/\n\npublic section\n\nnoncomputable section\n\nopen CategoryTheory\n\nnamespace TauCeti.AlgebraicGeometry.ProjectiveBundles.projectiveBundle\n\nopen _root_.AlgebraicGeometry\n\nuniverse u\n\nvariable {S : Scheme.{u}} {F G H : QuasicoherentSheaf S}\n\nsection\n\nvariable (q : F.obj \u27f6 G.obj) [Epi q]", "/-- For an epimorphism of quasi-coherent modules, the graded symmetric algebra map satisfies\nthe irrelevant-ideal containment for the induced morphism of projective bundles. -/\ntheorem irrelevant_le_map_of_epi :\n \u2200 U : S.Opens, IsAffineOpen U \u2192\n HomogeneousIdeal.irrelevant (((gradedSymmetricAlgebra S).obj G).obj.gradedSectionsGrading U) \u2264\n (HomogeneousIdeal.irrelevant\n (((gradedSymmetricAlgebra S).obj F).obj.gradedSectionsGrading U)).map\n (CommMon.gradedSectionsGradedHom\n ((gradedSymmetricAlgebra S).map (ObjectProperty.homMk q)).hom U) :=", "/-- An epimorphism `q : F \u27f6 G` induces the morphism `P(G) \u27f6 P(F)` on the relative Proj\nof the graded symmetric algebras. -/\n@[stacks 01OA]\ndef mapOfEpi : projectiveBundle S G.obj \u27f6 projectiveBundle S F.obj :=\n CommMon.relativeProjMap ((gradedSymmetricAlgebra S).map (ObjectProperty.homMk q)).hom\n (irrelevant_le_map_of_epi q)", "/-- The defining equation for `mapOfEpi` exposes its construction by relative Proj. -/\ntheorem mapOfEpi_def :\n mapOfEpi q = CommMon.relativeProjMap ((gradedSymmetricAlgebra S).map\n (ObjectProperty.homMk q)).hom (irrelevant_le_map_of_epi q) :=", "/-- The map of projective bundles induced by an epimorphism lies over the base. -/\n@[reassoc (attr := simp)]\ntheorem mapOfEpi_projection : mapOfEpi q \u226b projection S F.obj = projection S G.obj :=", "/-- The map of projective bundles induced by an epimorphism is a closed immersion. -/\ninstance isClosedImmersion_mapOfEpi : IsClosedImmersion (mapOfEpi q) := by\n have := F.epi_gradedSymmetricAlgebra_map_one q\n exact CommMon.isClosedImmersion_relativeProjMap_of_epi_one _\n (isGeneratedInDegreeOne_gradedSymmetricAlgebra G)", "/-- The identity module map induces the identity on the projective bundle. -/\n@[simp]\ntheorem mapOfEpi_id (F : QuasicoherentSheaf S) :\n mapOfEpi (\ud835\udfd9 F.obj) = \ud835\udfd9 (projectiveBundle S F.obj) :=", "/-- A composite of epimorphisms induces the composite of the projective bundle maps in\nreverse order. -/\n@[simp]\ntheorem mapOfEpi_comp (r : G.obj \u27f6 H.obj) [Epi r] :\n mapOfEpi (q \u226b r) = mapOfEpi r \u226b mapOfEpi q :=", "end\n\n/-- A module isomorphism induces an isomorphism of projective bundles. -/\ninstance isIso_mapOfEpi (q : F.obj \u27f6 G.obj) [IsIso q] : IsIso (mapOfEpi q) :=\n \u27e8\u27e8mapOfEpi (inv q), by simp only [\u2190 mapOfEpi_comp, IsIso.inv_hom_id, mapOfEpi_id],\n by simp only [\u2190 mapOfEpi_comp, IsIso.hom_inv_id, mapOfEpi_id]\u27e9\u27e9", "/-- The inverse of the projective-bundle map of a module isomorphism is induced by its inverse. -/\n@[simp]\ntheorem inv_mapOfEpi (q : F.obj \u27f6 G.obj) [IsIso q] :\n inv (mapOfEpi q) = mapOfEpi (inv q) :=", "variable (q : F.obj \u27f6 G.obj) [Epi q]\n\n/-- The canonical map from the pullback of `\ud835\udcaa(m)` on `P(F)` to `\ud835\udcaa(m)` on `P(G)`,\ninduced by the symmetric algebra map of the epimorphism. -/\ndef mapOfEpiTwistingSheafHom (m : \u2124) :\n (Scheme.Modules.pullback (mapOfEpi q)).obj (twistingSheaf S F.obj m).obj \u27f6\n (twistingSheaf S G.obj m).obj :=\n CommMon.relativeProjTwistingSheafMap ((gradedSymmetricAlgebra S).map (ObjectProperty.homMk q)).hom\n (irrelevant_le_map_of_epi q) m", "/-- The twist comparison followed by identification with the relative Proj twist is the relative\nProj comparison, after identifying the two pullback sources. -/\ntheorem mapOfEpiTwistingSheafHom_def (m : \u2124) :\n mapOfEpiTwistingSheafHom q m \u226b eqToHom (twistingSheaf_obj S G.obj m) =\n (Scheme.Modules.pullbackCongr (mapOfEpi_def q)).hom.app _ \u226b\n (Scheme.Modules.pullback _).map (eqToHom (twistingSheaf_obj S F.obj m)) \u226b\n CommMon.relativeProjTwistingSheafMap\n ((gradedSymmetricAlgebra S).map (ObjectProperty.homMk q)).hom\n (irrelevant_le_map_of_epi q) m :=", "/-- On an affine chart, the twist comparison is the relative Proj chart component. -/\ntheorem mapOfEpiTwistingSheafHom_comp_\u03c0 (m : \u2124) (U : S.AffineZariskiSite) :\n mapOfEpiTwistingSheafHom q m \u226b eqToHom (twistingSheaf_obj S G.obj m) \u226b\n (((gradedSymmetricAlgebra S).obj G).obj.relativeProjTwistingSheafGlueData m).\u03c0 U =\n (Scheme.Modules.pullbackCongr (mapOfEpi_def q)).hom.app _ \u226b\n (Scheme.Modules.pullback _).map (eqToHom (twistingSheaf_obj S F.obj m)) \u226b\n CommMon.relativeProjTwistingSheafMapComponent\n ((gradedSymmetricAlgebra S).map (ObjectProperty.homMk q)).hom (irrelevant_le_map_of_epi q)\n m U :=", "/-- Pullback along the map induced by an epimorphism identifies the integer twists. -/\ninstance isIso_mapOfEpiTwistingSheafHom (m : \u2124) : IsIso (mapOfEpiTwistingSheafHom q m) :=\n isIso_relativeProjTwistingSheafMap_gradedSymmetricAlgebra F\n ((gradedSymmetricAlgebra S).map (ObjectProperty.homMk q)).hom (irrelevant_le_map_of_epi q) m\n\n/-- The canonical pullback isomorphism for the integer twists along the map induced by an\nepimorphism. -/\ndef mapOfEpiTwistingSheafIso (m : \u2124) :\n (Scheme.Modules.pullback (mapOfEpi q)).obj (twistingSheaf S F.obj m).obj \u2245\n (twistingSheaf S G.obj m).obj :=\n asIso (mapOfEpiTwistingSheafHom q m)", "/-- The forward map of the canonical pullback isomorphism is the twisting-sheaf map. -/\n@[simp]\ntheorem mapOfEpiTwistingSheafIso_hom (m : \u2124) :\n (mapOfEpiTwistingSheafIso q m).hom = mapOfEpiTwistingSheafHom q m :=", "end TauCeti.AlgebraicGeometry.ProjectiveBundles.projectiveBundle"], "free_length": 2182, "file_length": 6036, "heartbeats": 32694, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Analysis.SpecialFunctions.Complex.Analytic", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Analysis/SpecialFunctions/Complex/Analytic.lean", "module": "TauCeti.Analysis.SpecialFunctions.Complex.Analytic", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Analysis.Analytic.Basic\npublic import Mathlib.Analysis.Analytic.OfScalars\npublic import Mathlib.Analysis.SpecialFunctions.Complex.Log\nimport Mathlib.Analysis.Analytic.Constructions\nimport Mathlib.Analysis.SpecialFunctions.Complex.LogBounds\n\n/-!\n# Unit-disk power series of complex and real logarithms\n\nMathlib's `Mathlib.Analysis.SpecialFunctions.Complex.Analytic` establishes local formal power\nseries germs (`HasFPowerSeriesAt`) for `Complex.log` and `Real.log` at `1` and for `1 + \u00b7` at `0`,\nwhile `Complex.hasSum_taylorSeries_neg_log` in\n`Mathlib.Analysis.SpecialFunctions.Complex.LogBounds` proves pointwise convergence throughout the\nopen unit disk `\u2016z\u2016 < 1`.\n\nCombining that pointwise Taylor sum with the coefficient bound `\u2016(n : \u2102)\u207b\u00b9\u2016 \u2264 1` upgrades the germ\nstatements to `HasFPowerSeriesOnBall` on the open unit disk of radius `1`:\n\n## Main declarations\n\n* `TauCeti.hasFPowerSeriesOnBall_neg_clog_one_sub`: `-Complex.log (1 - \u00b7)` on `eball 0 1`.\n* `TauCeti.hasFPowerSeriesOnBall_clog_one_add`: `Complex.log (1 + \u00b7)` on `eball 0 1`.\n* `TauCeti.hasFPowerSeriesOnBall_clog_one`: `Complex.log` on `eball 1 1`.\n* `TauCeti.hasFPowerSeriesOnBall_neg_log_one_sub`: `-Real.log (1 - \u00b7)` on `eball 0 1`.\n* `TauCeti.hasFPowerSeriesOnBall_log_one_add`: `Real.log (1 + \u00b7)` on `eball 0 1`.\n* `TauCeti.hasFPowerSeriesOnBall_log_one`: `Real.log` on `eball 1 1`.\n-/\n\npublic section\n\nopen scoped ENNReal\n\nnamespace TauCeti\n\n/-- **The formal power series `\u2211\u2099 z\u207f / n` represents `-Complex.log (1 - z)` on the unit disk.** -/\ntheorem hasFPowerSeriesOnBall_neg_clog_one_sub :\n HasFPowerSeriesOnBall (fun z : \u2102 \u21a6 -Complex.log (1 - z))\n (.ofScalars \u2102 fun n \u21a6 (n : \u2102)\u207b\u00b9) 0 1 := by\n refine \u27e8FormalMultilinearSeries.le_radius_of_bound _ 1 fun n \u21a6 ?_, one_pos, fun {z} hz \u21a6 ?_\u27e9\n \u00b7 simp only [NNReal.coe_one, one_pow, mul_one, FormalMultilinearSeries.ofScalars_norm, norm_inv,\n Complex.norm_natCast]\n rcases n.eq_zero_or_pos with rfl | hn\n \u00b7 simp\n \u00b7 exact inv_le_one_of_one_le\u2080 (by exact_mod_cast hn)\n \u00b7 have hz1 : \u2016z\u2016 < 1 := by\n simpa [Metric.mem_eball, edist_zero_right, \u2190 ofReal_norm] using hz\n simpa [FormalMultilinearSeries.ofScalars_apply_eq, div_eq_mul_inv] using\n Complex.hasSum_taylorSeries_neg_log hz1\n\n/-- Transforming a unit-disk power series of `z \u21a6 -f (1 - z)` into that of `z \u21a6 f (1 + z)`. -/\nprivate theorem hasFPowerSeriesOnBall_of_neg_sub {\ud835\udd5c : Type*} [NontriviallyNormedField \ud835\udd5c]\n {f : \ud835\udd5c \u2192 \ud835\udd5c} (hf : HasFPowerSeriesOnBall (fun z \u21a6 -f (1 - z))\n (.ofScalars \ud835\udd5c fun n \u21a6 (n : \ud835\udd5c)\u207b\u00b9) 0 1) :\n HasFPowerSeriesOnBall (fun z \u21a6 f (1 + z)) (.ofScalars \ud835\udd5c fun n \u21a6 -(-1 : \ud835\udd5c) ^ n / n) 0 1 := by\n have h0 : HasFPowerSeriesOnBall (fun z \u21a6 -f (1 - z))\n (.ofScalars \ud835\udd5c fun n \u21a6 (n : \ud835\udd5c)\u207b\u00b9) ((-ContinuousLinearMap.id \ud835\udd5c \ud835\udd5c) 0) 1 := by\n simpa using hf\n convert h0.compContinuousLinearMap.neg using 1\n \u00b7 ext z\n simp [sub_neg_eq_add]\n \u00b7 rw [FormalMultilinearSeries.ofScalars_comp_neg_id]\n ext n\n simp [FormalMultilinearSeries.ofScalars, div_eq_mul_inv]\n \u00b7 simp [\u2190 ofReal_norm, ContinuousLinearMap.norm_id]\n\n/-- **The formal power series `\u2211\u2099 -(-1)\u207f z\u207f / n` represents `Complex.log (1 + z)` on the unit\ndisk.** This upgrades Mathlib's `hasFPowerSeriesAt_clog_one_add` to radius `1`. -/\ntheorem hasFPowerSeriesOnBall_clog_one_add :\n HasFPowerSeriesOnBall (fun z : \u2102 \u21a6 Complex.log (1 + z))\n (.ofScalars \u2102 fun n \u21a6 -(-1 : \u2102) ^ n / n) 0 1 :=\n hasFPowerSeriesOnBall_of_neg_sub hasFPowerSeriesOnBall_neg_clog_one_sub\n\n/-- **The formal power series `\u2211\u2099 -(-1)\u207f (z - 1)\u207f / n` represents `Complex.log` on the unit disk\naround `1`.** This upgrades Mathlib's `hasFPowerSeriesAt_clog_one` to radius `1`. -/\ntheorem hasFPowerSeriesOnBall_clog_one :\n HasFPowerSeriesOnBall Complex.log (.ofScalars \u2102 fun n \u21a6 -(-1 : \u2102) ^ n / n) 1 1 := by\n convert hasFPowerSeriesOnBall_clog_one_add.comp_sub (1 : \u2102) using 3 <;> ring\n\n/-- **The formal power series `\u2211\u2099 x\u207f / n` represents `-Real.log (1 - x)` on `(-1, 1)`.** -/\ntheorem hasFPowerSeriesOnBall_neg_log_one_sub :\n HasFPowerSeriesOnBall (fun x : \u211d \u21a6 -Real.log (1 - x))\n (.ofScalars \u211d fun n \u21a6 (n : \u211d)\u207b\u00b9) 0 1 := by\n have h : HasFPowerSeriesOnBall (fun z : \u2102 \u21a6 -Complex.log (1 - z))\n ((FormalMultilinearSeries.ofScalars \u2102 fun n : \u2115 \u21a6 (n : \u2102)\u207b\u00b9).restrictScalars \u211d)\n (Complex.ofRealLI.toContinuousLinearMap 0) 1 := by\n simpa using hasFPowerSeriesOnBall_neg_clog_one_sub.restrictScalars (\ud835\udd5c := \u211d)\n have hre := Complex.reCLM.comp_hasFPowerSeriesOnBall h.compContinuousLinearMap\n have hrad : (1 : \u211d\u22650\u221e) / \u2016Complex.ofRealLI.toContinuousLinearMap\u2016\u2091 = 1 := by simp\n have hser :\n Complex.reCLM.compFormalMultilinearSeries\n (((FormalMultilinearSeries.ofScalars \u2102 fun n : \u2115 \u21a6 (n : \u2102)\u207b\u00b9).restrictScalars\n \u211d).compContinuousLinearMap Complex.ofRealLI.toContinuousLinearMap) =\n .ofScalars \u211d fun n \u21a6 (n : \u211d)\u207b\u00b9 := by\n ext n\n simp [-FormalMultilinearSeries.apply_eq_prod_smul_coeff,\n FormalMultilinearSeries.ofScalars, FormalMultilinearSeries.restrictScalars, List.prod_ofFn]\n rw [hrad, hser] at hre\n exact hre.congr fun x _ \u21a6 by simp [\u2190 Complex.ofReal_one, \u2190 Complex.ofReal_sub,\n Complex.log_ofReal_re]\n\n/-- **The formal power series `\u2211\u2099 -(-1)\u207f x\u207f / n` represents `Real.log (1 + x)` on `(-1, 1)`.**\nThis upgrades Mathlib's `hasFPowerSeriesAt_log_one_add` to radius `1`. -/\ntheorem hasFPowerSeriesOnBall_log_one_add :\n HasFPowerSeriesOnBall (fun x : \u211d \u21a6 Real.log (1 + x))\n (.ofScalars \u211d fun n \u21a6 -(-1 : \u211d) ^ n / n) 0 1 :=\n hasFPowerSeriesOnBall_of_neg_sub hasFPowerSeriesOnBall_neg_log_one_sub\n\n/-- **The formal power series `\u2211\u2099 -(-1)\u207f (x - 1)\u207f / n` represents `Real.log` on `(0, 2)`.**\nThis upgrades Mathlib's `hasFPowerSeriesAt_log_one` to radius `1`. -/\ntheorem hasFPowerSeriesOnBall_log_one :\n HasFPowerSeriesOnBall Real.log (.ofScalars \u211d fun n \u21a6 -(-1 : \u211d) ^ n / n) 1 1 := by\n convert hasFPowerSeriesOnBall_log_one_add.comp_sub (1 : \u211d) using 3 <;> ring\n\nend TauCeti\n", "public_theorems": ["TauCeti.hasFPowerSeriesOnBall_neg_clog_one_sub", "TauCeti.hasFPowerSeriesOnBall_clog_one_add", "TauCeti.hasFPowerSeriesOnBall_clog_one", "TauCeti.hasFPowerSeriesOnBall_neg_log_one_sub", "TauCeti.hasFPowerSeriesOnBall_log_one_add", "TauCeti.hasFPowerSeriesOnBall_log_one"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Analysis.Analytic.Basic\npublic import Mathlib.Analysis.Analytic.OfScalars\npublic import Mathlib.Analysis.SpecialFunctions.Complex.Log\nimport Mathlib.Analysis.Analytic.Constructions\nimport Mathlib.Analysis.SpecialFunctions.Complex.LogBounds\n\n/-!\n# Unit-disk power series of complex and real logarithms\n\nMathlib's `Mathlib.Analysis.SpecialFunctions.Complex.Analytic` establishes local formal power\nseries germs (`HasFPowerSeriesAt`) for `Complex.log` and `Real.log` at `1` and for `1 + \u00b7` at `0`,\nwhile `Complex.hasSum_taylorSeries_neg_log` in\n`Mathlib.Analysis.SpecialFunctions.Complex.LogBounds` proves pointwise convergence throughout the\nopen unit disk `\u2016z\u2016 < 1`.\n\nCombining that pointwise Taylor sum with the coefficient bound `\u2016(n : \u2102)\u207b\u00b9\u2016 \u2264 1` upgrades the germ\nstatements to `HasFPowerSeriesOnBall` on the open unit disk of radius `1`:\n\n## Main declarations\n\n* `TauCeti.hasFPowerSeriesOnBall_neg_clog_one_sub`: `-Complex.log (1 - \u00b7)` on `eball 0 1`.\n* `TauCeti.hasFPowerSeriesOnBall_clog_one_add`: `Complex.log (1 + \u00b7)` on `eball 0 1`.\n* `TauCeti.hasFPowerSeriesOnBall_clog_one`: `Complex.log` on `eball 1 1`.\n* `TauCeti.hasFPowerSeriesOnBall_neg_log_one_sub`: `-Real.log (1 - \u00b7)` on `eball 0 1`.\n* `TauCeti.hasFPowerSeriesOnBall_log_one_add`: `Real.log (1 + \u00b7)` on `eball 0 1`.\n* `TauCeti.hasFPowerSeriesOnBall_log_one`: `Real.log` on `eball 1 1`.\n-/\n\npublic section\n\nopen scoped ENNReal\n\nnamespace TauCeti", "/-- **The formal power series `\u2211\u2099 z\u207f / n` represents `-Complex.log (1 - z)` on the unit disk.** -/\ntheorem hasFPowerSeriesOnBall_neg_clog_one_sub :\n HasFPowerSeriesOnBall (fun z : \u2102 \u21a6 -Complex.log (1 - z))\n (.ofScalars \u2102 fun n \u21a6 (n : \u2102)\u207b\u00b9) 0 1 :=", "/-- **The formal power series `\u2211\u2099 -(-1)\u207f z\u207f / n` represents `Complex.log (1 + z)` on the unit\ndisk.** This upgrades Mathlib's `hasFPowerSeriesAt_clog_one_add` to radius `1`. -/\ntheorem hasFPowerSeriesOnBall_clog_one_add :\n HasFPowerSeriesOnBall (fun z : \u2102 \u21a6 Complex.log (1 + z))\n (.ofScalars \u2102 fun n \u21a6 -(-1 : \u2102) ^ n / n) 0 1 :=", "/-- **The formal power series `\u2211\u2099 -(-1)\u207f (z - 1)\u207f / n` represents `Complex.log` on the unit disk\naround `1`.** This upgrades Mathlib's `hasFPowerSeriesAt_clog_one` to radius `1`. -/\ntheorem hasFPowerSeriesOnBall_clog_one :\n HasFPowerSeriesOnBall Complex.log (.ofScalars \u2102 fun n \u21a6 -(-1 : \u2102) ^ n / n) 1 1 :=", "/-- **The formal power series `\u2211\u2099 x\u207f / n` represents `-Real.log (1 - x)` on `(-1, 1)`.** -/\ntheorem hasFPowerSeriesOnBall_neg_log_one_sub :\n HasFPowerSeriesOnBall (fun x : \u211d \u21a6 -Real.log (1 - x))\n (.ofScalars \u211d fun n \u21a6 (n : \u211d)\u207b\u00b9) 0 1 :=", "/-- **The formal power series `\u2211\u2099 -(-1)\u207f x\u207f / n` represents `Real.log (1 + x)` on `(-1, 1)`.**\nThis upgrades Mathlib's `hasFPowerSeriesAt_log_one_add` to radius `1`. -/\ntheorem hasFPowerSeriesOnBall_log_one_add :\n HasFPowerSeriesOnBall (fun x : \u211d \u21a6 Real.log (1 + x))\n (.ofScalars \u211d fun n \u21a6 -(-1 : \u211d) ^ n / n) 0 1 :=", "/-- **The formal power series `\u2211\u2099 -(-1)\u207f (x - 1)\u207f / n` represents `Real.log` on `(0, 2)`.**\nThis upgrades Mathlib's `hasFPowerSeriesAt_log_one` to radius `1`. -/\ntheorem hasFPowerSeriesOnBall_log_one :\n HasFPowerSeriesOnBall Real.log (.ofScalars \u211d fun n \u21a6 -(-1 : \u211d) ^ n / n) 1 1 :=", "end TauCeti"], "free_length": 2442, "file_length": 3605, "heartbeats": 12715, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"} {"id": "TauCeti.Dynamics.Ergodic.ToralEndomorphism", "repo": "TauCetiProject/TauCeti", "rev": "75c8aed5fea63047615a25a9763fd5b68a86e891", "path": "TauCeti/Dynamics/Ergodic/ToralEndomorphism.lean", "module": "TauCeti.Dynamics.Ergodic.ToralEndomorphism", "file": "/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Dynamics.Ergodic.MeasurePreserving\npublic import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic\npublic import Mathlib.MeasureTheory.Group.Measure\npublic import Mathlib.MeasureTheory.Integral.IntervalIntegral.Periodic\npublic import Mathlib.Topology.Algebra.ContinuousMonoidHom\npublic import TauCeti.Topology.Instances.AddCircle.Torus\nimport Mathlib.LinearAlgebra.Matrix.NonsingularInverse\nimport Mathlib.MeasureTheory.Measure.Haar.Unique\n\n/-!\n# Toral endomorphisms\n\nAn integer matrix `A : Matrix \u03b9 \u03b9 \u2124` acts on the unit torus `UnitAddTorus \u03b9 = (\u211d / \u2124)^\u03b9` by the\ncontinuous additive map `TauCeti.toralEndomorphism A = Matrix.smulVecHom A UnitAddCircle`, the map\ninduced by the linear map `A : \u211d^\u03b9 \u2192 \u211d^\u03b9` (`TauCeti.toralEndomorphism_coe_pi`, and\n`TauCeti.toralEndomorphism_iterate_coe_pi` for its iterates). It is functorial in\nthe matrix (`TauCeti.toralEndomorphism_one`, `TauCeti.toralEndomorphism_mul`).\n\nWhen `det A \u2260 0` the map is surjective (`TauCeti.toralEndomorphism_surjective`, from\n`Matrix.smulVecHom_addCircle_surjective`), since every `t : \u211d^\u03b9` is `A (A\u207b\u00b9 t)` over `\u211d`. A\ncontinuous surjective additive homomorphism of compact groups carries a Haar measure to the Haar\nmeasure of the same total mass (Mathlib's `AddMonoidHom.measurePreserving`), so the toral\nendomorphism preserves the volume (`TauCeti.measurePreserving_toralEndomorphism`). When\n`det A = \u00b11` the inverse matrix is again an integer matrix, and `TauCeti.toralAutomorphism A hA` is\nthe toral endomorphism as a continuous additive automorphism of the torus, hence a measurable one,\npreserving volume (`TauCeti.measurePreserving_toralAutomorphism`).\n\nThe matrix `!![2, 0; 0, 1]` gives a volume-preserving endomorphism of the two-torus that is not\ninjective (`TauCeti.not_injective_toralEndomorphism_two_zero_zero_one`).\n\n## Main definitions\n\n* `TauCeti.toralEndomorphism A`: the continuous additive endomorphism of `UnitAddTorus \u03b9` induced\n by the integer matrix `A`.\n* `TauCeti.toralAutomorphism A hA`: for `IsUnit A.det`, the toral endomorphism as a continuous\n additive automorphism, with inverse `toralEndomorphism A\u207b\u00b9`.\n\n## Main results\n\n* `TauCeti.toralEndomorphism_surjective`: for `det A \u2260 0`, the toral endomorphism is surjective.\n* `TauCeti.measurePreserving_toralEndomorphism`: for `det A \u2260 0`, the toral endomorphism preserves\n the volume.\n* `TauCeti.measurePreserving_toralAutomorphism`: the toral automorphism preserves the volume.\n-/\n\npublic section\n\nopen MeasureTheory Matrix\n\nnamespace TauCeti\n\nvariable {\u03b9 : Type*} [Fintype \u03b9]\n\n/-- The toral endomorphism of `UnitAddTorus \u03b9 = (\u211d / \u2124)^\u03b9` induced by an integer matrix `A`:\n`x \u21a6 (k \u21a6 \u2211 i, A k i \u2022 x i)`. -/\nnoncomputable def toralEndomorphism (A : Matrix \u03b9 \u03b9 \u2124) :\n UnitAddTorus \u03b9 \u2192\u209c+ UnitAddTorus \u03b9 :=\n A.smulVecHom UnitAddCircle\n\n/-- The toral endomorphism of `A` is the map `Matrix.smulVecHom A UnitAddCircle`, so the API of\n`Matrix.smulVecHom` (its kernel, for instance) applies to it. -/\ntheorem toralEndomorphism_def (A : Matrix \u03b9 \u03b9 \u2124) :\n toralEndomorphism A = A.smulVecHom UnitAddCircle :=\n (rfl)\n\n@[simp]\ntheorem toralEndomorphism_apply (A : Matrix \u03b9 \u03b9 \u2124) (x : UnitAddTorus \u03b9) (k : \u03b9) :\n toralEndomorphism A x k = \u2211 i, A k i \u2022 x i :=\n A.smulVecHom_apply _ x k\n\n/-- The toral endomorphism of `A` is induced by the linear map `A : \u211d^\u03b9 \u2192 \u211d^\u03b9`. -/\ntheorem toralEndomorphism_coe_pi (A : Matrix \u03b9 \u03b9 \u2124) (t : \u03b9 \u2192 \u211d) :\n toralEndomorphism A (fun i \u21a6 (t i : UnitAddCircle)) =\n fun k \u21a6 ((A.map ((\u2191) : \u2124 \u2192 \u211d) *\u1d65 t) k : UnitAddCircle) :=\n A.smulVecHom_coe_pi (1 : \u211d) t\n\n/-- The toral endomorphism of a product of matrices is the composite of their toral\nendomorphisms. -/\ntheorem toralEndomorphism_mul (A B : Matrix \u03b9 \u03b9 \u2124) :\n toralEndomorphism (A * B) = (toralEndomorphism A).comp (toralEndomorphism B) :=\n Matrix.smulVecHom_mul B _ A\n\nvariable [DecidableEq \u03b9]\n\n/-- The toral endomorphism of `A` intertwines the real matrix action with the quotient map, for\nall iterates. -/\ntheorem toralEndomorphism_iterate_coe_pi (A : Matrix \u03b9 \u03b9 \u2124) (n : \u2115) (t : \u03b9 \u2192 \u211d) :\n (toralEndomorphism A)^[n] (fun i \u21a6 (t i : UnitAddCircle)) =\n fun k \u21a6 ((((A.map ((\u2191) : \u2124 \u2192 \u211d)).toLin' ^ n) t k : \u211d) : UnitAddCircle) := by\n have hsemi : Function.Semiconj (fun t : \u03b9 \u2192 \u211d \u21a6 fun i \u21a6 (t i : UnitAddCircle))\n (A.map ((\u2191) : \u2124 \u2192 \u211d)).toLin' (toralEndomorphism A) := fun t \u21a6 by\n rw [toLin'_apply, toralEndomorphism_coe_pi]\n rw [\u2190 hsemi.iterate_right n t, FunLike.coe_pow_eq_iterate]\n\n/-- The identity matrix induces the identity of the torus. -/\n@[simp]\ntheorem toralEndomorphism_one : toralEndomorphism (1 : Matrix \u03b9 \u03b9 \u2124) = .id _ :=\n Matrix.smulVecHom_one _\n\n/-- A toral endomorphism of nonzero determinant is surjective. -/\ntheorem toralEndomorphism_surjective {A : Matrix \u03b9 \u03b9 \u2124} (hA : A.det \u2260 0) :\n Function.Surjective (toralEndomorphism A) :=\n Matrix.smulVecHom_addCircle_surjective (1 : \u211d) hA\n\n/-- **Toral endomorphisms preserve volume.** For an integer matrix of nonzero determinant, the\ntoral endomorphism preserves the volume (Haar probability) of the torus. -/\ntheorem measurePreserving_toralEndomorphism {A : Matrix \u03b9 \u03b9 \u2124} (hA : A.det \u2260 0) :\n MeasurePreserving (toralEndomorphism A) volume volume :=\n AddMonoidHom.measurePreserving (f := (toralEndomorphism A : UnitAddTorus \u03b9 \u2192+ UnitAddTorus \u03b9))\n (toralEndomorphism A).continuous (toralEndomorphism_surjective hA) rfl\n\n/-- The toral endomorphism of an integer matrix of determinant `\u00b11` (a unit of `\u2124`), as a\ncontinuous additive automorphism of the torus with inverse the toral endomorphism of `A\u207b\u00b9`. Its\nmeasurable automorphism is `(toralAutomorphism A hA).toHomeomorph.toMeasurableEquiv`. -/\nnoncomputable def toralAutomorphism (A : Matrix \u03b9 \u03b9 \u2124) (hA : IsUnit A.det) :\n UnitAddTorus \u03b9 \u2243\u209c+ UnitAddTorus \u03b9 where\n toFun := toralEndomorphism A\n invFun := toralEndomorphism A\u207b\u00b9\n left_inv x := by\n have h := DFunLike.congr_fun (toralEndomorphism_mul A\u207b\u00b9 A) x\n rw [Matrix.nonsing_inv_mul A hA, toralEndomorphism_one] at h\n simpa using h.symm\n right_inv x := by\n have h := DFunLike.congr_fun (toralEndomorphism_mul A A\u207b\u00b9) x\n rw [Matrix.mul_nonsing_inv A hA, toralEndomorphism_one] at h\n simpa using h.symm\n map_add' := map_add _\n continuous_toFun := (toralEndomorphism A).continuous\n continuous_invFun := (toralEndomorphism A\u207b\u00b9).continuous\n\n@[simp]\ntheorem coe_toralAutomorphism (A : Matrix \u03b9 \u03b9 \u2124) (hA : IsUnit A.det) :\n \u21d1(toralAutomorphism A hA) = toralEndomorphism A :=\n (rfl)\n\n@[simp]\ntheorem coe_toralAutomorphism_symm (A : Matrix \u03b9 \u03b9 \u2124) (hA : IsUnit A.det) :\n \u21d1(toralAutomorphism A hA).symm = toralEndomorphism A\u207b\u00b9 :=\n (rfl)\n\n/-- A toral automorphism preserves the volume of the torus. -/\ntheorem measurePreserving_toralAutomorphism (A : Matrix \u03b9 \u03b9 \u2124) (hA : IsUnit A.det) :\n MeasurePreserving (toralAutomorphism A hA) volume volume :=\n measurePreserving_toralEndomorphism hA.ne_zero\n\n/-- **Check.** The matrix `!![2, 0; 0, 1]` induces a volume-preserving endomorphism of the\ntwo-torus. -/\ntheorem measurePreserving_toralEndomorphism_two_zero_zero_one :\n MeasurePreserving (toralEndomorphism !![(2 : \u2124), 0; 0, 1]) volume volume :=\n measurePreserving_toralEndomorphism (by simp [Matrix.det_fin_two])\n\n/-- **Check.** The volume-preserving toral endomorphism of `!![2, 0; 0, 1]` is not injective: it\nsends `([1/2], 0)` and `0` to `0`. -/\ntheorem not_injective_toralEndomorphism_two_zero_zero_one :\n \u00ac Function.Injective (toralEndomorphism !![(2 : \u2124), 0; 0, 1]) := by\n intro h\n have hx : toralEndomorphism !![(2 : \u2124), 0; 0, 1] ![((1 / 2 : \u211d) : UnitAddCircle), 0] =\n toralEndomorphism !![(2 : \u2124), 0; 0, 1] 0 := by\n ext k\n fin_cases k <;> norm_num [Fin.sum_univ_two, \u2190 AddCircle.coe_zsmul]\n -- `[1/2] = 0` would give an integer `n` with `n = 1/2`, so `2 * n = 1`.\n obtain \u27e8n, hn\u27e9 := (AddCircle.coe_eq_zero_iff _).1 (congr_fun (h hx) 0)\n have h2 : 2 * n = 1 := by\n rw [zsmul_one] at hn\n exact_mod_cast show (2 * n : \u211d) = 1 by rw [hn]; norm_num\n omega\n\nend TauCeti\n", "public_theorems": ["TauCeti.toralEndomorphism_def", "TauCeti.toralEndomorphism_apply", "TauCeti.toralEndomorphism_coe_pi", "TauCeti.toralEndomorphism_mul", "TauCeti.toralEndomorphism_iterate_coe_pi", "TauCeti.toralEndomorphism_one", "TauCeti.toralEndomorphism_surjective", "TauCeti.measurePreserving_toralEndomorphism", "TauCeti.coe_toralAutomorphism", "TauCeti.coe_toralAutomorphism_symm", "TauCeti.measurePreserving_toralAutomorphism", "TauCeti.measurePreserving_toralEndomorphism_two_zero_zero_one", "TauCeti.not_injective_toralEndomorphism_two_zero_zero_one"], "frozen": ["/-\nCopyright (c) 2026 The Tau Ceti contributors. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: The Tau Ceti contributors\n-/\nmodule\n\npublic import Mathlib.Dynamics.Ergodic.MeasurePreserving\npublic import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic\npublic import Mathlib.MeasureTheory.Group.Measure\npublic import Mathlib.MeasureTheory.Integral.IntervalIntegral.Periodic\npublic import Mathlib.Topology.Algebra.ContinuousMonoidHom\npublic import TauCeti.Topology.Instances.AddCircle.Torus\nimport Mathlib.LinearAlgebra.Matrix.NonsingularInverse\nimport Mathlib.MeasureTheory.Measure.Haar.Unique\n\n/-!\n# Toral endomorphisms\n\nAn integer matrix `A : Matrix \u03b9 \u03b9 \u2124` acts on the unit torus `UnitAddTorus \u03b9 = (\u211d / \u2124)^\u03b9` by the\ncontinuous additive map `TauCeti.toralEndomorphism A = Matrix.smulVecHom A UnitAddCircle`, the map\ninduced by the linear map `A : \u211d^\u03b9 \u2192 \u211d^\u03b9` (`TauCeti.toralEndomorphism_coe_pi`, and\n`TauCeti.toralEndomorphism_iterate_coe_pi` for its iterates). It is functorial in\nthe matrix (`TauCeti.toralEndomorphism_one`, `TauCeti.toralEndomorphism_mul`).\n\nWhen `det A \u2260 0` the map is surjective (`TauCeti.toralEndomorphism_surjective`, from\n`Matrix.smulVecHom_addCircle_surjective`), since every `t : \u211d^\u03b9` is `A (A\u207b\u00b9 t)` over `\u211d`. A\ncontinuous surjective additive homomorphism of compact groups carries a Haar measure to the Haar\nmeasure of the same total mass (Mathlib's `AddMonoidHom.measurePreserving`), so the toral\nendomorphism preserves the volume (`TauCeti.measurePreserving_toralEndomorphism`). When\n`det A = \u00b11` the inverse matrix is again an integer matrix, and `TauCeti.toralAutomorphism A hA` is\nthe toral endomorphism as a continuous additive automorphism of the torus, hence a measurable one,\npreserving volume (`TauCeti.measurePreserving_toralAutomorphism`).\n\nThe matrix `!![2, 0; 0, 1]` gives a volume-preserving endomorphism of the two-torus that is not\ninjective (`TauCeti.not_injective_toralEndomorphism_two_zero_zero_one`).\n\n## Main definitions\n\n* `TauCeti.toralEndomorphism A`: the continuous additive endomorphism of `UnitAddTorus \u03b9` induced\n by the integer matrix `A`.\n* `TauCeti.toralAutomorphism A hA`: for `IsUnit A.det`, the toral endomorphism as a continuous\n additive automorphism, with inverse `toralEndomorphism A\u207b\u00b9`.\n\n## Main results\n\n* `TauCeti.toralEndomorphism_surjective`: for `det A \u2260 0`, the toral endomorphism is surjective.\n* `TauCeti.measurePreserving_toralEndomorphism`: for `det A \u2260 0`, the toral endomorphism preserves\n the volume.\n* `TauCeti.measurePreserving_toralAutomorphism`: the toral automorphism preserves the volume.\n-/\n\npublic section\n\nopen MeasureTheory Matrix\n\nnamespace TauCeti\n\nvariable {\u03b9 : Type*} [Fintype \u03b9]\n\n/-- The toral endomorphism of `UnitAddTorus \u03b9 = (\u211d / \u2124)^\u03b9` induced by an integer matrix `A`:\n`x \u21a6 (k \u21a6 \u2211 i, A k i \u2022 x i)`. -/\nnoncomputable def toralEndomorphism (A : Matrix \u03b9 \u03b9 \u2124) :\n UnitAddTorus \u03b9 \u2192\u209c+ UnitAddTorus \u03b9 :=\n A.smulVecHom UnitAddCircle", "/-- The toral endomorphism of `A` is the map `Matrix.smulVecHom A UnitAddCircle`, so the API of\n`Matrix.smulVecHom` (its kernel, for instance) applies to it. -/\ntheorem toralEndomorphism_def (A : Matrix \u03b9 \u03b9 \u2124) :\n toralEndomorphism A = A.smulVecHom UnitAddCircle :=", "@[simp]\ntheorem toralEndomorphism_apply (A : Matrix \u03b9 \u03b9 \u2124) (x : UnitAddTorus \u03b9) (k : \u03b9) :\n toralEndomorphism A x k = \u2211 i, A k i \u2022 x i :=", "/-- The toral endomorphism of `A` is induced by the linear map `A : \u211d^\u03b9 \u2192 \u211d^\u03b9`. -/\ntheorem toralEndomorphism_coe_pi (A : Matrix \u03b9 \u03b9 \u2124) (t : \u03b9 \u2192 \u211d) :\n toralEndomorphism A (fun i \u21a6 (t i : UnitAddCircle)) =\n fun k \u21a6 ((A.map ((\u2191) : \u2124 \u2192 \u211d) *\u1d65 t) k : UnitAddCircle) :=", "/-- The toral endomorphism of a product of matrices is the composite of their toral\nendomorphisms. -/\ntheorem toralEndomorphism_mul (A B : Matrix \u03b9 \u03b9 \u2124) :\n toralEndomorphism (A * B) = (toralEndomorphism A).comp (toralEndomorphism B) :=", "variable [DecidableEq \u03b9]", "/-- The toral endomorphism of `A` intertwines the real matrix action with the quotient map, for\nall iterates. -/\ntheorem toralEndomorphism_iterate_coe_pi (A : Matrix \u03b9 \u03b9 \u2124) (n : \u2115) (t : \u03b9 \u2192 \u211d) :\n (toralEndomorphism A)^[n] (fun i \u21a6 (t i : UnitAddCircle)) =\n fun k \u21a6 ((((A.map ((\u2191) : \u2124 \u2192 \u211d)).toLin' ^ n) t k : \u211d) : UnitAddCircle) :=", "/-- The identity matrix induces the identity of the torus. -/\n@[simp]\ntheorem toralEndomorphism_one : toralEndomorphism (1 : Matrix \u03b9 \u03b9 \u2124) = .id _ :=", "/-- A toral endomorphism of nonzero determinant is surjective. -/\ntheorem toralEndomorphism_surjective {A : Matrix \u03b9 \u03b9 \u2124} (hA : A.det \u2260 0) :\n Function.Surjective (toralEndomorphism A) :=", "/-- **Toral endomorphisms preserve volume.** For an integer matrix of nonzero determinant, the\ntoral endomorphism preserves the volume (Haar probability) of the torus. -/\ntheorem measurePreserving_toralEndomorphism {A : Matrix \u03b9 \u03b9 \u2124} (hA : A.det \u2260 0) :\n MeasurePreserving (toralEndomorphism A) volume volume :=", "/-- The toral endomorphism of an integer matrix of determinant `\u00b11` (a unit of `\u2124`), as a\ncontinuous additive automorphism of the torus with inverse the toral endomorphism of `A\u207b\u00b9`. Its\nmeasurable automorphism is `(toralAutomorphism A hA).toHomeomorph.toMeasurableEquiv`. -/\nnoncomputable def toralAutomorphism (A : Matrix \u03b9 \u03b9 \u2124) (hA : IsUnit A.det) :\n UnitAddTorus \u03b9 \u2243\u209c+ UnitAddTorus \u03b9 where\n toFun := toralEndomorphism A\n invFun := toralEndomorphism A\u207b\u00b9\n left_inv x := by\n have h := DFunLike.congr_fun (toralEndomorphism_mul A\u207b\u00b9 A) x\n rw [Matrix.nonsing_inv_mul A hA, toralEndomorphism_one] at h\n simpa using h.symm\n right_inv x := by\n have h := DFunLike.congr_fun (toralEndomorphism_mul A A\u207b\u00b9) x\n rw [Matrix.mul_nonsing_inv A hA, toralEndomorphism_one] at h\n simpa using h.symm\n map_add' := map_add _\n continuous_toFun := (toralEndomorphism A).continuous\n continuous_invFun := (toralEndomorphism A\u207b\u00b9).continuous", "@[simp]\ntheorem coe_toralAutomorphism (A : Matrix \u03b9 \u03b9 \u2124) (hA : IsUnit A.det) :\n \u21d1(toralAutomorphism A hA) = toralEndomorphism A :=", "@[simp]\ntheorem coe_toralAutomorphism_symm (A : Matrix \u03b9 \u03b9 \u2124) (hA : IsUnit A.det) :\n \u21d1(toralAutomorphism A hA).symm = toralEndomorphism A\u207b\u00b9 :=", "/-- A toral automorphism preserves the volume of the torus. -/\ntheorem measurePreserving_toralAutomorphism (A : Matrix \u03b9 \u03b9 \u2124) (hA : IsUnit A.det) :\n MeasurePreserving (toralAutomorphism A hA) volume volume :=", "/-- **Check.** The matrix `!![2, 0; 0, 1]` induces a volume-preserving endomorphism of the\ntwo-torus. -/\ntheorem measurePreserving_toralEndomorphism_two_zero_zero_one :\n MeasurePreserving (toralEndomorphism !![(2 : \u2124), 0; 0, 1]) volume volume :=", "/-- **Check.** The volume-preserving toral endomorphism of `!![2, 0; 0, 1]` is not injective: it\nsends `([1/2], 0)` and `0` to `0`. -/\ntheorem not_injective_toralEndomorphism_two_zero_zero_one :\n \u00ac Function.Injective (toralEndomorphism !![(2 : \u2124), 0; 0, 1]) :=", "end TauCeti"], "free_length": 1091, "file_length": 4246, "heartbeats": 7034, "image": "lean-compression:tauceti-75c8aed5fe-a608030cfc", "lean_toolchain": "leanprover/lean4:v4.37.0-rc1"}