# Morse functions, sublevel topology and Morse–Bott attachments Develop the finite-dimensional topology of Morse and Morse–Bott functions: intrinsic Hessians and indices, normal forms, genericity, deformation of sublevels, handles and cells, proper exhaustions, strong inequalities and critical-submanifold attachments and compact-trapped gradient convergence. The resulting library supplies geodesic Morse theory, [AffineMorseLefschetz](../AffineMorseLefschetz/README.md) and Hamiltonian moment-map topology. ## Scope, conventions and dependencies Use finite-dimensional real smooth Hausdorff second-countable manifolds with boundaryless models. Compactness, properness, a lower bound, and compactness of a particular level band are separate hypotheses. A Morse function means smooth with nondegenerate critical points; do not incorporate properness or Palais–Smale into that predicate. Cobordisms here are the compact bands f⁻¹([a,b]) inside a boundaryless manifold, with regular boundary levels; they use native Tau Ceti `Geometry/Manifold/Boundary/{Model,Charts}` for the boundary manifold, DifferentialGeometry 5.1 for its orientation interface, and GeometricTopology Layer 1 for collars. The general boundary-critical-point and infinite-dimensional theories are separate from these regular-level cobordisms. Use actual Tau Ceti `IsManifoldNondegenerateCriticalPoint`, `IsMorse`, `IsMorseOn` and `manifoldMorseIndex`, from `Geometry/Manifold/Morse/{Basic,Index}`. The vector-space suppliers are `Analysis/Calculus/Morse/{Basic,NormalForm,Generic}`, including `IsNondegenerateCriticalPoint.exists_morse_chart` and the small linear- perturbation theorem. Consume `MDifferentiableAt.mvfderiv_eq_fderiv_comp_extChartAt_symm`, `manifoldMorseIndex_le_finrank`, the complementary-index theorem, `manifoldMorseIndex_comp_fst_add_comp_snd`, and `Morse/Sphere/{Basic,Prod}`. Consume the manifold `TauCeti.MorseChart` and `IsManifoldNondegenerateCriticalPoint.nonempty_morseChart` from [Geometry/Manifold/Morse/Lemma](https://github.com/TauCetiProject/TauCeti/blob/e8375e4fdc90df4033f28291a72d5f64234a301a/TauCeti/Geometry/Manifold/Morse/Lemma.lean); its quadratic equation carries a factor 1/2 and an unordered list of ±1 weights. M1 supplies arbitrary-model transport, ordering/scaling and intrinsic-Hessian comparisons. The linked upstream manifold-chart and compact-finiteness APIs supply those construction targets; Suggested.lean uses the pinned Morse Basic/Index and vector-space NormalForm interfaces for its signatures. Own the single boundaryless-model transport on a named `def` type synonym M′ carrying M's topology, with an explicitly supplied E-charted structure and a constructed `IsManifold 𝓘(ℝ,E) ∞ M′` instance; do not install a second global atlas on M. Mathlib's `[I.Boundaryless]` gives `range I=univ` and `I.toHomeomorph:H≃ₜE`. For an H-valued chart c use `c′=c.trans I.toHomeomorph.toOpenPartialHomeomorph`; its extended coordinates are exactly I∘c. Construct the identity `Diffeomorph I 𝓘(ℝ,E) M M′ ∞`, the preferred-chart/extend/source/target and maximal-atlas correspondences, and source- and target-side `ContMDiff`/`mfderiv` comparisons. If φ is an E-valued maximal chart on M′, its corresponding H-valued chart on M is `φ.trans I.toHomeomorph.symm.toOpenPartialHomeomorph`, with the same extended chart and target. Transfer `IsImmersionOfComplement` across this model change by equality of these normal-form charts, with the same complement and linear normal-form map. Also construct the charted-source transport along the scalar zero-subtype/level homeomorphism used in M2. These are narrow chart-form comparisons, with no general immersion-composition theorem as an input. Include critical/index and `IsAdaptedPseudoGradient` comparisons. All arbitrary-model consumers use this transport. Use Mathlib `PartialDiffeomorph`, `IsProperMap`, `CWComplex`, `RelCWComplex`, `ContinuousMap.HomotopyEquiv` and native singular (co)homology. [DG Layers 3,5,10,12](../DifferentialGeometry/README.md) supply flows, boundary-orientation interfaces, partitions of unity, sharp finite-dimensional Sard, metrics and Hessians. [AlgebraicTopology Stages 2–8](../AlgebraicTopology/README.md) supply relative chains, cofibrations, cellular/singular comparison, products, integral duality and relative homotopy. M4’s arbitrary-function LS bound consumes the categorical-cover/cup-length supplement after AT6.2; that supplement uses only foundational products and native homotopies, not Morse theory or manifold duality. [GT Layer 1](../GeometricTopology/README.md) supplies normal/tubular geometry, collars, handle gluing and disc bundles; [CharacteristicClasses C2](../CharacteristicClasses/README.md) supplies ordinary Thom classes and their local orientation coefficients. This roadmap owns ordinary finite Morse deformation/attachment and their abstract Morse–Bott extension. RiemannianGeometry R3 owns the broken-geodesic vertex carrier, Jacobi/index comparison and path-space limit, consuming this core. The symmetric-space and Bott applications use the same broken-path carrier and the attachments here, following [HomotopySpheres §4B](https://github.com/TauCetiProject/TauCetiRoadmap/pull/284). [HeegaardFloer Lane M](../HeegaardFloer/README.md) owns stable/unstable manifolds, Morse–Smale trajectory spaces, compactification/gluing, Morse homology and its singular comparison. It consumes the finite Morse core here; this roadmap does not construct a second trajectory complex. At a critical point the Hessian is d²f, with no factor 1/2. A normalized Morse chart has `f=f(p)−Σ_(i<λ)y_i²+Σ_(i≥λ)y_i²`, hence Hessian diagonal ±2. λ is the negative inertia index. Gradient descent uses −grad f. Set `M_a={x | f(x)≤a}`; regular-level deformation fixes M_a pointwise. Different metrics change gradients and flow parametrizations but not the Hessian/index at a critical point or the sublevel homotopy conclusions. ## M1. Critical Hessians, indices and usable normal forms Define the critical set as `{x | mvfderiv I f x = 0}` and consume its native preferred-chart comparison. Define the critical Hessian as a symmetric continuous bilinear form on `TangentSpace I x`, transported from d²f in the preferred extended chart under the hypothesis df_x=0. Prove it is independent of coordinates and connection, and identify it with DG's Hessian for every chosen smooth metric. Prove symmetry, change of coordinates by congruence, inertia invariance, λ≤dim M, complementary index under f↦−f, and direct-sum/product additivity. Keep the noncritical Hessian's connection dependence explicit. Give the tangent-quadratic-form and matrix comparisons, restrictions to subspaces and positivity/negativity tests. Extend the native manifold Morse chart to an actual partial diffeomorphism for every boundaryless model, with a Euclidean target and center 0. Compose its linear coordinate map with an index-ordering permutation and division by √2, using `exists_hessianQuadraticForm_equivalent_weightedSumSquares`; prove both smooth maps and the normalized sum-of-squares equation on the whole source. Derive isolation, strict local minima/maxima, the two-dimensional saddle model and finite critical sets on compact subsets for a global Morse function. Consume native `IsMorse.finite_setOf_mfderiv_eq_zero` and `MorseChart.mfderiv_eq_zero_iff` from [PseudoGradient/Existence](https://github.com/TauCetiProject/TauCeti/blob/e8375e4fdc90df4033f28291a72d5f64234a301a/TauCeti/Geometry/Manifold/Morse/PseudoGradient/Existence.lean). The compact finiteness theorem uses the standard model `𝓘(ℝ,E)`; consume it directly. Extend the local chart argument to compact subsets and apply the shared arbitrary-model transport, retaining the native `mfderiv` zero locus and its comparison with the critical set’s vector-valued `mvfderiv`. Define chartwise C^k seminorm neighborhoods on fixed compact coordinate sets before using them. Prove persistence of nondegenerate critical points under small C² perturbations on fixed compact neighborhoods, with the implicit-function critical-point continuation, index and value dependence. Construct critical counts with extended natural/cardinal values first; use finite natural counts only after the relevant compactness proof, avoiding junk values on infinite critical sets. ## M2. Compact-band deformation, handles and cells Construct the regular levels of real-valued functions on the actual subtype `Level(f,c):={x:M // f x=c}` with its subspace topology. The scope here is scalar levels and their sublevel/band faces; regular fibers of maps into other manifolds and fiber products are separate constructions. Consume the following declarations in namespace `TauCeti` from [Section/Chart and Manifold](https://github.com/TauCetiProject/TauCeti/blob/a91d3aafa8cd3e6bc33dfde0d7677ed0f1625039/TauCeti/Geometry/Manifold/VectorBundle/Section/Manifold.lean) and [SmoothZero/Linearization](https://github.com/TauCetiProject/TauCeti/blob/a91d3aafa8cd3e6bc33dfde0d7677ed0f1625039/TauCeti/Geometry/Manifold/VectorBundle/Section/SmoothZero.lean): `sectionZeroChartedSpace`, `isManifold_sectionZero`, `hasMFDerivAt_coe_sectionZero`, `isImmersionOfComplement_coe_sectionZero`, `sectionZeroChartedSpace_chartAt`, `sectionZeroChartedSpace_atlas`, `sectionZeroChartAt_apply`, `sectionZeroChartAt_source`, `mem_sectionZeroChartAt_target_iff`, `coe_sectionZeroChartAt_symm_apply` and `sectionLinearization_trivial`. Use M1's self-modelled synonym M′ with preferred E-chart c′_z, the base B:=ℝ, constant b:=0 and the trivial line bundle `Bundle.Trivial ℝ ℝ`. For f′ on M′ and s:=f′−c choose `e_z=trivializationAt ℝ (Bundle.Trivial ℝ ℝ) (b z)` and set `g_z(y)=f′((c′_z).symm y)−c`, `D_z=fderiv ℝ g_z (c′_z z)`. Derive every input of `sectionZeroChartedSpace`: the strict derivative `hf` of g_z from smoothness and nonzero order; `hFred` from `TauCeti.isFredholm_of_finiteDimensional`; `hsurj` from regularity using the preferred-source derivative comparison; and `hindex` from `ContinuousLinearMap.index_eq_of_finiteDimensional`, with natural index n=dim(E)−1. Surjectivity at a zero gives dim(E)≥1, so the integer and natural index expressions agree there. Supply `hb` by continuity of the constant base, `he` by `mem_baseSet_trivializationAt`, and the two-zero-point smoothness input `hs` by smooth preferred source expressions on their implicit-chart domains, following SmoothZero's construction. The trivialization coordinate is literally s. Directly identify D_z with the preferred-source derivative of f by constant subtraction, `range I=univ` and M1's `mfderiv` comparison; this supplies `hsurj`. `sectionLinearization_trivial` is a cross-check of that identification, not an input to the explicit constructor. Construct the actual zero-subtype/level homeomorphism induced by s(x)=0 iff f(x)=c and transfer these specific charts along it as `scalarRegularLevelChartedSpace`. The existential `exists_isManifold_sectionZero_of_contMDiff` is a cross-check of the result. Export the chartAt/atlas, source/target, extend and inverse formulas for this named structure. In particular use the SAME native projection `π_z=Classical.choose (hFred z).closedComplemented_ker` and kernel equivalence K_z supplied by `D_z.kerModelEquiv`: the preferred level chart is `w ↦ K_z(π_z(c′_z w−c′_z z))` on the native section-zero chart source. Consume `sectionZeroChartAt_apply` for this equation and transfer its actual source and target through the subtype homeomorphism. Prove changed complements/charts give the identity diffeomorphism between the named atlases, including their derivative comparison laws. Use the native inclusion derivative and M1's target-model chart comparison to construct the native `Manifold.IsSmoothEmbedding` of Level(f,c) into M, with tangent range `ker (mfderiv I 𝓘(ℝ) f x)`. Its topological embedding is `Topology.IsEmbedding.subtypeVal`; transport the immersion by its actual normal-form chart equation, preserving the complement ℝ, and not by a model-changing use of `IsImmersionOfComplement.comp_diffeomorph`. For the scalar normal form at x use the SAME `π_x` and `hker=(hFred x).closedComplemented_ker`. Let `hD:D_x.range=⊤` be the actual surjectivity proof above and fix `L:=D_x.implicitCoordEquiv hD hker : E≃L[ℝ](ℝ×ker D_x)` from [TauCeti Analysis/Calculus/ImplicitFunctionTheorem](https://github.com/TauCetiProject/TauCeti/blob/a91d3aafa8cd3e6bc33dfde0d7677ed0f1625039/TauCeti/Analysis/Calculus/ImplicitFunctionTheorem.lean). Its public `coe_implicitCoordEquiv` law gives `L(v)=(D_x v,π_x v)`, hence `L.symm(0,k)=k` for k in the kernel. Construct `Φ(y)=(g_x(y),π_x(y−c′_x x))` using the public `HasStrictFDerivAt.implicitToOpenPartialHomeomorphOfComplemented`. Restrict its source to the intersection of its own source, the preferred chart target and the native `hf.implicitCoordSource hD hker`; use the public openness, base-point membership and inverse-smoothness laws there. This is an actual open neighborhood with the prescribed smooth inverse, not an unrestricted implicit-coordinate formula. The H-valued domain chart for `Manifold.IsSubmersionAtOfComplement.mk_of_charts` is c′ composed with this restricted Φ, L.symm and I.toHomeomorph.symm. Its target chart is t↦t−c, so the extended map is exactly `Prod.fst ∘ L`. Construct `Manifold.IsSubmersionAtOfComplement (ker D_x) I 𝓘(ℝ) ∞ f x` and prove the zero-slice agrees with the SAME `π_x`, `K_x` and scalar-level chart above. For every regular endpoint a construct the sublevel M_a={f≤a} as a manifold with boundary, and for regular ar. Its whole image has coordinate0>0, also at interior critical points, with no df≠0 assumption there. Consume the actual `TauCeti.boundaryChartedSpace` and `TauCeti.isManifold_boundary` from [native Boundary/Model and Charts](https://github.com/TauCetiProject/TauCeti/blob/a91d3aafa8cd3e6bc33dfde0d7677ed0f1625039/TauCeti/Geometry/Manifold/Boundary/Charts.lean), supplying the nonzero differentiability order ∞. Use its public `boundaryChartedSpace_atlas`, `boundaryChartedSpace_chartAt_source`, `boundaryChartedSpace_chartAt_target`, `boundaryChartedSpace_chartAt_apply` and `boundaryChartedSpace_chartAt_symm_apply` laws. The preferred face chart has coordinate0=0 exactly on the level; interior preferred charts have it positive. Construct the boundary/level homeomorphism h and prove on the actual common chart source `β_n (chartAt (EuclideanSpace ℝ (Fin n)) p q)=χ_(h p)^n(h q)`. This equality is AFTER β_n and the explicit Fin.cast reindexing, not an identification of differently typed atlases. Equip the level with that reindexed named atlas and promote h to the typed `Diffeomorph 𝓘(ℝ,EuclideanSpace ℝ (Fin n)) 𝓘(ℝ,Fin n→ℝ) ↥((𝓡∂ (n+1)).boundary M_a) Level(f,a) ∞`. For a band, give the corresponding typed diffeomorphism to the disjoint union of its reindexed lower/upper levels. Prove both smooth directions from these public source/target/apply/inverse laws; no private chartAt lemma or equality of differently typed `IsManifold` statements is an input. Consume [DifferentialGeometry 5.1's orientation interface](https://github.com/TauCetiProject/TauCetiRoadmap/blob/6e6a8ebc5fccd49a207365df0f9e74923f6bcae2/TauCetiRoadmap/DifferentialGeometry/README.md#layer-5-integration-and-stokes-theorem) for `boundaryOrientation_spec`, on this native boundary manifold. Pin the metric-free outward co-orientation: df(v)>0 on ∂M_a and the upper band face, df(v)<0 on the lower band face. Mathlib's inward slot0 has outward vector −∂₀; compute the outward-first orientation using that sign, when M is oriented. Gradients ±grad f represent the co-orientations after choosing a metric; no orientation is needed for the carriers or atlas construction. The scalar-level model remains uniformly `Fin (dim(E)−1)→ℝ` before the explicit reindexing, also for empty levels. Dimension0 regular levels are empty and sublevels clopen boundaryless0-manifolds, with no half-space model; dimension1 levels use Fin0. Dimension0 regular-endpoint bands are clopen; a critical-free such band is empty. For aε₁ use b:M_(c−ε₁)→M_(c−ε₀) and prove b∘α₁≃α₀∘h_∂, using the symmetric smaller-level construction. Simultaneous critical points use ⊔_p h_p on ⊔_p D^(λ_p), with labels fixed by the actual critical points. As acceptance tests, for f(x)=(x²−1)² on ℝ use c=1, ε=1/2 and the charts ±x√(2−x²) on (−1,1). For s∈S⁰={−1,1}, the attaching maps are α_±(s)=±s√(1−1/√2)∈{f≤1/2}. The two values at s=1 lie in different components, so α_+ and α_- are not homotopic with their labelled source fixed; α_-=α_+∘r is strict for r=−id on D¹, giving the adjunction homeomorphism rel {f≤1/2}. For RP² use f[x:y:z]=(y²+2z²)/(x²+y²+z²), top point [0:0:1] and 0<ε<1. The lower sublevel {f≤2−ε} is a Möbius band. Fix its H₁ (equivalently π₁) core generator by θ↦[cosθ:sinθ:0], 0≤θ≤π, and orient ∂D² counterclockwise in the normalized negative coordinates (√2x/z,y/z)/√(1+(x/z)²+(y/z)²). This chart's α_+ has degree +2; reflecting the first negative coordinate gives the strict α_-=α_+∘r of degree −2. Prove those maps are not homotopic with the source fixed and the attachment pairs are homeomorphic rel the lower sublevel. Iterate finite critical levels to construct compatible relative CW models for sublevel pairs. For a proper bounded-below Morse function, choose an exhausting sequence of regular levels with finite critical sets at each stage, prove the cofibration/compatibility statements and pass to a genuine CW complex homotopy equivalent to M with one λ-cell per critical point. Consume Mathlib TopCat pushouts and AT4.5's `relativeCWPushout`, `relativeCWPushoutCWModel`, `homotopyPushoutGluingComparison`, `cofibrationTowerHomotopyEquivalence` and `cwSubcomplexTowerUnion`. These supply finite cell/weak-topology induction, cellular approximation, dimension reindexing and the categorical/classical CW comparison. Own the Morse-specific negative-handle attaching maps and their relative comparison to those adjunctions, the regular-level sequence and the resulting cell index labeling. At stage k+1 use `relativeCWPushoutCWModel` with Z=M_(a_k), Z_c=W_k and h=φ_k, followed by the negative-handle/cell comparison that is identity on M_(a_k). The resulting φ_(k+1) restricts exactly to φ_k; this constructs strict comparison-map compatibility. Use AT's telescope/colimit comparison for strictly commuting levelwise equivalences and prove its comparison with the exhausted manifold, retaining the proper-function control and actual level inclusions. Regular-level collars make those inclusions closed cofibrations. Start at a regular a₀ below a global lower bound for f, where the sublevel is empty; use AT4.4's `diskBoundaryRelCW` and coproduct cells at each handle stage. Specialize AT4.5's compact-subset finite-stage factorization to this sublevel tower. The W_k inclusions retain compatible cell labels and characteristic maps; `cwSubcomplexTowerUnion` builds the CW structure on their critical-level union even when later stages add cells of lower dimension. Compact M gives a finite CW model. For regular-level compact cobordisms build the relative version from the incoming boundary, with outgoing boundary identified by the opposite function and complementary indices. ## M3. Approximation and proper Morse exhaustions On native smooth maps `C^∞⟮I,M;ℝ⟯`, define strong C^k neighborhoods by a locally finite compact chart family and a positive tolerance on each member, bounding every coordinate derivative of order≤k. Define the strong smooth topology as generated by these neighborhoods for all finite k, without unbounded derivative orders varying per chart. Prove chart-family independence and agreement with compact C^k seminorm neighborhoods when M is compact. Prove every smooth function can be approximated by Morse functions in this topology. Use native local linear perturbations and DG Sard, multiply them by cutoffs, and run a compact exhaustion construction. Choose perturbations with summable C^k bounds on each fixed compact set and with tails preserving earlier C² nondegeneracy. Prove smooth convergence, persistence on every exhaustion interior, and the prescribed fine error bounds for every prescribed finite-order neighborhood. This gives the global theorem without an unstated Baire space or transversality theorem on a function space. For a proper bounded-below input preserve those properties by a global C⁰ error less than 1. Prove existence of a smooth proper bounded-below exhaustion on every manifold here using a compact exhaustion and a locally finite smooth partition of unity, then its Morse approximation. Give relative approximation which fixes a neighborhood of a prescribed closed set where the function is already Morse, with compact-support control for local perturbations. Include M1's continuous/smooth finite parameter dependence of nondegenerate critical branches; do not claim every parameter value of a generic family is Morse through birth-death events. General exhaustion existence here is separate from GeometricTopology Layer1's squared-distance exhaustion for a given closed embedding. ## M4. Strong inequalities and topology tests For compact M and a field k let c_j be the finite count of index-j critical points and b_j=dim_k H_j(M;k), using actual singular homology. From the cellular complex of M2 prove `Σ c_j t^j = Σ b_j t^j + (1+t)Q(t)`, with Q∈ℕ[t]. Identify Q's coefficients with the ranks of adjacent boundary maps; derive all strong alternating inequalities, the weak inequalities, Euler equality and total-critical-point lower bounds. Weak inequalities plus Euler equality alone do not prove nonnegative coefficients of Q. Extend the statements to regular sublevel/cobordism pairs and finite critical-band intervals, with the relative homology maps visible. Prove subgroups of free abelian groups of arbitrary rank are free, using a well-order filtration and compatible basis extension over successive rank-one quotients; apply it to the top cellular kernel, including countably many cells. Thus top cellular homology of a d-dimensional CW model is free abelian and cohomology above d vanishes by AT Stage 6.1's integral UCT. Do not infer that degree-d integral cohomology is torsion-free. Apply the proper-index≤d version of M2 to obtain those conclusions for noncompact M. **Arbitrary-function Lusternik–Schnirelmann inequality.** Consume AlgebraicTopology's categorical-cover supplement after Stage 6.2, with its same `LSCategoricalCover`, `lsCategoryCount`, `normalizedLSCategory` and `lsCupLength` carriers. Here construct `lsCriticalPointBound` for **every smooth real-valued f on a compact boundaryless finite-dimensional smooth Hausdorff second-countable manifold M**, allowing arbitrary critical point degeneracy. Use the native manifold derivative zero locus; compare `mfderiv I 𝓘(ℝ) f` with the vector-valued `mvfderiv I f` used by `criticalPoints`. Both give the same critical set for these smooth data. Set `totalCriticalCount f=(criticalPoints f).encard : ℕ∞`. Prove `lsCategoryCount M M≤totalCriticalCount f`. For nonempty connected M this gives `#Crit(f)≥cat(M)+1≥cupLength(M;R)+1`, with cat(point)=0 and R any commutative coefficient ring. Counts are distinct points, not critical values. Infinite critical sets have count ∞ and satisfy every finite lower bound; do not use `Nat.card`, whose infinite-set value is 0. Empty M has both unnormalized counts 0. Prove the main inequality directly on M, connected or disconnected, by the critical-level induction below. As a **separate corollary and consistency check**, prove the component sum formula. For an arbitrary boundaryless model, first transport its local open comparison with the finite-dimensional vector space to prove `LocallyConnectedSpace H`; then apply native `ChartedSpace.locallyConnectedSpace` and compact locally connected `ConnectedComponents` finiteness. Its components are clopen and carry the restricted smooth structures. Prove the restriction/derivative comparison and actual finite-component Sigma homeomorphism, then use AT's finite-coproduct formula and the disjoint critical-set count. This corollary is not a prerequisite for the main inequality. Dimension 0 is a finite discrete calculation. For the main bound, transport the native normed-space Fermat theorem through boundaryless charts to `mfderiv=0` and combine it with the compact extreme-value theorem. This proves the critical locus nonempty when M is nonempty and does not assume a nondegenerate Hessian. The finite-critical-set proof owns a **degenerate critical-level neighborhood deformation**, independently of the nondegenerate Morse normal form. Given one critical value c isolated from the other critical values and an open neighborhood U of its finitely many critical points, construct ε>0 and an ambient continuous deformation from the identity, nonincreasing f, sending {f≤c+ε} into {f