import OAI.AlgebraicGeometry.Resolution.Blowups.EulerOrderCriterion import OAI.AlgebraicGeometry.Resolution.Blowups.Etale.Derivation /-! # Mapped Euler Order Criterion -/ namespace OAI.AlgebraicGeometry.Resolution.Blowups.MappedEulerOrderCriterion.Construction noncomputable section /-! Detecting order after formally étale extension using differential ideals on the source ring. -/ variable {A B ι : Type*} [CommRing A] [CommRing B] [Algebra A B] [Algebra.FormallyEtale A B] [Algebra ℚ B] [Fintype ι] [DecidableEq ι] /-- Differential ideals on the source detect the order of the extended ideal along the extended coordinate ideal. The ideal itself need not be generated by polynomials in the coordinates. -/ theorem mapped_coordinate_order_iff_differentialIdeal (z : ι → A) (D : ι → Derivation ℤ A A) (hD : ∀ i j, D i (z j) = if i = j then 1 else 0) (J : Ideal A) (b : ℕ) : J.map (algebraMap A B) ≤ Ideal.span (Set.range (fun i => algebraMap A B (z i))) ^ (b + 1) ↔ (DifferentialIdealTransform.Construction.iteratedDifferentialIdeal J b).map (algebraMap A B) ≤ Ideal.span (Set.range (fun i => algebraMap A B (z i))) := by let w : ι → B := fun i => algebraMap A B (z i) let δ : ι → Derivation ℤ B B := fun i => Etale.Derivation.Construction.extendEtaleRingDerivation (S := B) (D i) have hδ : ∀ i j, δ i (w j) = if i = j then 1 else 0 := by intro i j rw [Etale.Derivation.Construction.extendEtaleRingDerivation_algebraMap, hD] split_ifs <;> simp let M : Ideal B := Ideal.span (Set.range w) let E := EulerOrderCriterion.Construction.coordinateEulerDerivation w δ have hE : ∀ p, E p ∈ M := EulerOrderCriterion.Construction.coordinateEulerDerivation_mem_span w δ have hM : ∀ p ∈ M, E p - p ∈ M ^ 2 := by intro p hp apply EulerOrderCriterion.Construction.euler_span_mod_square E (Set.range w) _ hE hp rintro x ⟨i, rfl⟩ exact EulerOrderCriterion.Construction.coordinateEulerDerivation_coordinate w δ hδ i change J.map (algebraMap A B) ≤ M ^ (b + 1) ↔ (DifferentialIdealTransform.Construction.iteratedDifferentialIdeal J b).map (algebraMap A B) ≤ M constructor · intro h apply (Etale.Derivation.Construction.iteratedDifferentialIdeal_map_le_of_etale (S := B) J b).trans simpa only [pow_one] using DifferentialIdealTransform.Construction.iteratedDifferentialIdeal_le_pow M (J.map (algebraMap A B)) 1 b (by simpa only [Nat.add_comm 1 b] using h) · induction b generalizing J with | zero => intro h simpa only [DifferentialIdealTransform.Construction.iteratedDifferentialIdeal, zero_add, pow_one] using h | succ b ih => intro h have hfirst : (DifferentialIdealTransform.Construction.firstDifferentialIdeal J).map (algebraMap A B) ≤ M ^ (b + 1) := ih (DifferentialIdealTransform.Construction.firstDifferentialIdeal J) h rw [Ideal.map_le_iff_le_comap] intro p hp change algebraMap A B p ∈ M ^ (b + 1 + 1) have hpM : algebraMap A B p ∈ M ^ (b + 1) := hfirst (Ideal.mem_map_of_mem _ (DifferentialIdealTransform.Construction.le_firstDifferentialIdeal J hp)) have hEp : E (algebraMap A B p) ∈ M ^ (b + 1 + 1) := by rw [EulerOrderCriterion.Construction.coordinateEulerDerivation_apply] apply Ideal.sum_mem intro i _ have hdp : δ i (algebraMap A B p) ∈ M ^ (b + 1) := by rw [Etale.Derivation.Construction.extendEtaleRingDerivation_algebraMap] exact hfirst (Ideal.mem_map_of_mem _ (DifferentialIdealTransform.Construction.derivation_mem_firstDifferentialIdeal J (D i) hp)) rw [pow_succ'] exact Ideal.mul_mem_mul (Ideal.subset_span ⟨i, rfl⟩) hdp have hcong := EulerOrderCriterion.Construction.euler_ideal_power_congruence E M hE hM (b + 1) hpM have hnp : (b + 1) • algebraMap A B p ∈ M ^ (b + 1 + 1) := by simpa only [sub_sub_cancel] using (M ^ (b + 1 + 1)).sub_mem hEp hcong obtain ⟨u, hu⟩ := DifferentialCoefficientOrder.Construction.natCast_isUnit_of_rationalAlgebra (A := B) (b + 1) (by omega) rw [nsmul_eq_mul, ← hu] at hnp have hmul := (M ^ (b + 1 + 1)).mul_mem_left (u⁻¹ : Bˣ) hnp simpa only [← mul_assoc, Units.inv_mul, one_mul] using hmul end end OAI.AlgebraicGeometry.Resolution.Blowups.MappedEulerOrderCriterion.Construction