Skip to content

Commit

Permalink
Partially implement fiber products of closed embeddings.
Browse files Browse the repository at this point in the history
  • Loading branch information
HechtiDerLachs committed Sep 26, 2023
1 parent 863e1b4 commit 4abd1b7
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
47 changes: 47 additions & 0 deletions src/AlgebraicGeometry/Schemes/CoveredSchemes/Morphisms/Methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,50 @@ function Base.show(io::IO, ::MIME"text/plain", f::AbsCoveredSchemeMorphism)
Oscar._show_semi_compact(io, covering_morphism(f))
end
end

function fiber_product(
i1::CoveredClosedEmbedding,
i2::CoveredClosedEmbedding
)
X1 = domain(i1)
X2 = domain(i2)
Y = codomain(i1)
Y === codomain(i2) || error("codomains do not coincide")
i1_cov = covering_morphism(i1)
i2_cov = covering_morphism(i2)
codomain(i1_cov) === codomain(i2_cov) || error("case of different coverings in codomain not implemented")
cod_cov = codomain(i1_cov)
#=
cod_ref, ref1, ref2 = common_refinement(codomain(i1_cov), codomain(i2_cov))
dom_ref1, i1_res = fiber_product(i1, ref1)
dom_ref2, i2_res = fiber_product(i1, ref2)
# etc. etc.... This is roughly the generic code to come.
=#
I1 = image_ideal(i1)
pb_I1 = pullback(i2, I1)
I2 = image_ideal(i2)
pb_I2 = pullback(i1, I2)

j1 = Oscar.CoveredClosedEmbedding(domain(i2), pb_I1)
Z = domain(j1)
morphism_dict = IdDict{AbsSpec, ClosedEmbedding}()
for U in affine_charts(Z)
V2 = codomain(j1[U])
W = codomain(i2[V2])
V1_candidates = maps_with_given_codomain(i1, W)
@assert length(V1_candidates) == 1 "not the correct number of patches found"
V1 = domain(first(V1_candidates))
x = gens(OO(V1))
@show x
lift_x = [preimage(pullback(i1[V1]), f) for f in x]
@show lift_x
pb_x = pullback(i2[V2]).(lift_x)
@show pb_x
pb_x = pullback(j1[U]).(pb_x)
@show pb_x
morphism_dict[U] = ClosedEmbedding(SpecMor(U, V1, pb_x, check=false), pb_I2(V1), check=false)
end
j2_cov = CoveringMorphism(default_covering(Z), domain(i1_cov), morphism_dict, check=false)
j2 = Oscar.CoveredClosedEmbedding(Z, X1, j2_cov)
return j1, j2
end
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ end
)
Y = codomain(f)
SY = homogeneous_coordinate_ring(Y)
ambient_coordinate_ring(Y) === ambient_coordinate_ring(domain(f)) || error("ambient coordinate rings are not compatible")
base_ring(I) === SY || error("ideal does not belong to the correct ring")
@check begin
pbf = pullback(f)
Expand Down
8 changes: 8 additions & 0 deletions test/AlgebraicGeometry/Schemes/ProjectiveSchemes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,14 @@ end
I = ideal(S, [x^2 + y^2 + z^2])
X, inc = sub(IP2, I)
X, inc = sub(IP2, gens(I))

J = ideal(S, [x+y+z])
X2, inc2 = sub(IP2, J)
inc_cov = covered_scheme_morphism(inc)
inc2_cov = covered_scheme_morphism(inc2)
j1, j2 = fiber_product(inc_cov, inc2_cov)
@test pushforward(inc_cov)(image_ideal(j2)) == pushforward(inc2_cov)(image_ideal(j1))

@test X === domain(inc)
@test IP2 === codomain(inc)
T = homogeneous_coordinate_ring(X)
Expand Down

0 comments on commit 4abd1b7

Please sign in to comment.