-- The fibre is affine three-space: D = ℂ[h, u, v, w] ⧸ (F) is isomorphic -- to ℂ[3] as a ℂ-algebra, by elimination to L, the lifting lemma over B, -- the plane presentation B ≅ ℂ[2] applied to coefficients, and the -- flattening ℂ[2][1] ≅ ℂ[3]. -- Part of Cumulus, the Grace17 mathematics library. -- Copyright (c) 2026 Grant Passmore. -- Released under the Apache License 2.0. See LICENSE in the repository root. -- Authors: Grant Passmore module Grace.Cumulus.AlgebraicGeometry.Coordinates.Fibre import Grace.Cumulus.AlgebraicGeometry.Coordinates.Elimination -- The base algebra B = ℂ[h, x, y, s] ⧸ (relH, relCusp) over ℂ is the plane -- presentation at K = ℂ: a polynomial algebra in two variables, whose ring -- carries the cusp relation and the Bézout certificate among h, x, y, s. theorem baseAlgebra.equivalence shows planeForward(complexRing) : baseAlgebra ≃ₐ polynomialAlgebra(complexRing, 2) proof have complexes := complexRing.comm_ring have quotient := planeAlgebra.comm_ring at complexRing with complexes have plane := polynomialRing.comm_ring at complexRing, 2 with complexes unfold baseAlgebra exact plane_equivalence at complexRing with complexes, quotient, plane theorem baseRing.cusp shows baseX^2 + baseY^3 = baseH * baseS proof have complexes := complexRing.comm_ring have quotient := planeAlgebra.comm_ring at complexRing with complexes have plane := polynomialRing.comm_ring at complexRing, 2 with complexes unfold baseX unfold baseY unfold baseH unfold baseS unfold baseRing unfold baseAlgebra exact planeAlgebra.relation_cusp at complexRing with complexes, quotient, plane theorem baseRing.bezout shows bezoutAlpha(baseRing, baseX, baseS) * baseH + bezoutBeta(baseRing, baseX, baseY, baseS) * baseY = Ring.one(baseRing) proof have complexes := complexRing.comm_ring have quotient := planeAlgebra.comm_ring at complexRing with complexes have plane := polynomialRing.comm_ring at complexRing, 2 with complexes unfold baseX unfold baseY unfold baseH unfold baseS unfold baseRing unfold baseAlgebra exact planeAlgebra.bezout at complexRing with complexes, quotient, plane -- The lifting lemma over B, with the Bézout coefficients: the presented -- algebra L over B is B[T]. theorem baseRing.lifting shows liftingForward(baseRing, baseH, baseX, baseY, baseS, bezoutAlpha(baseRing, baseX, baseS), bezoutBeta(baseRing, baseX, baseY, baseS)) : liftingAlgebra(baseRing, baseH, baseX, baseY, baseS) ≃ₐ polynomialAlgebra(baseRing, 1) proof have base := baseRing.comm_ring have hIn := baseH.mem have xIn := baseX.mem have yIn := baseY.mem have sIn := baseS.mem have αIn := bezoutAlpha.mem at baseRing, baseX, baseS with * have βIn := bezoutBeta.mem at baseRing, baseX, baseY, baseS with * have cusp := baseRing.cusp have bezout := baseRing.bezout have quotient := liftingAlgebra.comm_ring at baseRing, baseH, baseX, baseY, baseS with * exact lifting_equivalence at baseRing, baseH, baseX, baseY, baseS, bezoutAlpha(baseRing, baseX, baseS), bezoutBeta(baseRing, baseX, baseY, baseS) with * -- The chain of isomorphisms over ℂ: D ≅ L ≅ B[T] ≅ ℂ[2][T] ≅ ℂ[3]. -- L over B is B[T], as algebras over ℂ. theorem lifted_equivalence shows ∃ e, e : liftedAlgebra ≃ₐ restrictScalars(polynomialAlgebra(baseRing, 1), complexRing, Algebra.map(baseAlgebra)) proof have complexes := complexRing.comm_ring have lifting := baseRing.lifting have scalars := baseAlgebra.structure_map rw ← liftingAlgebra.base_of at scalars witness liftingForward(baseRing, baseH, baseX, baseY, baseS, bezoutAlpha(baseRing, baseX, baseS), bezoutBeta(baseRing, baseX, baseY, baseS)) unfold liftedAlgebra exact AlgebraIso.restrict with lifting, complexes, scalars -- B[T] is ℂ[2][T], as algebras over ℂ, by transport along B ≅ ℂ[2]. theorem plane_extension_equivalence shows ∃ e, e : restrictScalars(polynomialAlgebra(baseRing, 1), complexRing, Algebra.map(baseAlgebra)) ≃ₐ iteratedPolynomialAlgebra(complexRing, 2, 1) proof have iso := baseAlgebra.equivalence have transport := polynomialAlgebra.map_iso at baseAlgebra, polynomialAlgebra(complexRing, 2), planeForward(complexRing), 1 with iso obtain ⟨e, equivalence, _, _⟩ := transport have target : restrictScalars( polynomialAlgebra(Algebra.ring(polynomialAlgebra(complexRing, 2)), 1), Algebra.base(polynomialAlgebra(complexRing, 2)), Algebra.map(polynomialAlgebra(complexRing, 2))) = iteratedPolynomialAlgebra(complexRing, 2, 1) rw [polynomialAlgebra.ring, polynomialAlgebra.base, polynomialAlgebra.map] unfold restrictScalars unfold iteratedPolynomialAlgebra unfold algebraCarrier rw [polynomialAlgebra.ring, polynomialAlgebra.base, polynomialAlgebra.map] rw target at equivalence rw baseAlgebra.base at equivalence witness e unfold baseRing exact equivalence -- ℂ[2][1] is ℂ[3], by flattening. theorem flatten_three shows ∃ e, e : iteratedPolynomialAlgebra(complexRing, 2, 1) ≃ₐ polynomialAlgebra(complexRing, 3) proof have flatten := polynomialRing.flatten at complexRing, 2, 1 with * have three : 2 + 1 = 3 arith rw three at flatten obtain ⟨e, equivalence, _, _⟩ := flatten witness e exact equivalence -- The fibre D is ℂ[3]. theorem fibre_equivalence shows ∃ e, e : fibreAlgebra ≃ₐ polynomialAlgebra(complexRing, 3) proof have elimination : ∃ e, e : fibreAlgebra ≃ₐ liftedAlgebra witness converse(toOriginal, algebraCarrier(liftedAlgebra), algebraCarrier(fibreAlgebra)) exact AlgebraIso.inverse with elimination_equivalence have lifted := AlgebraIso.exists_compose with elimination, lifted_equivalence have extended := AlgebraIso.exists_compose with lifted, plane_extension_equivalence exact AlgebraIso.exists_compose with extended, flatten_three