Theorem: Ideal.finprod_count
File: Mathlib/RingTheory/DedekindDomain/Factorization.lean

tactic: have h_ne_zero := Associates.finprod_ne_zero I
state_before: R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type ?u.245587
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
I : Ideal R
hI : I ≠ 0
⊢ Associates.count (Associates.mk v.asIdeal)
      (Associates.factors (Associates.mk (∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I))) =
    Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))

tactic: have hv : Irreducible (Associates.mk v.asIdeal) := v.associates_irreducible
state_before: R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type ?u.245587
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
I : Ideal R
hI : I ≠ 0
h_ne_zero : Associates.mk (∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I) ≠ 0
⊢ Associates.count (Associates.mk v.asIdeal)
      (Associates.factors (Associates.mk (∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I))) =
    Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))

tactic: have h_dvd := finprod_mem_dvd v (Ideal.finite_mulSupport hI)
state_before: R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type ?u.245587
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
I : Ideal R
hI : I ≠ 0
h_ne_zero : Associates.mk (∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I) ≠ 0
hv : Irreducible (Associates.mk v.asIdeal)
⊢ Associates.count (Associates.mk v.asIdeal)
      (Associates.factors (Associates.mk (∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I))) =
    Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))

tactic: have h_not_dvd := Ideal.finprod_not_dvd v I hI
state_before: R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type ?u.245587
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
I : Ideal R
hI : I ≠ 0
h_ne_zero : Associates.mk (∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I) ≠ 0
hv : Irreducible (Associates.mk v.asIdeal)
h_dvd : maxPowDividing v I ∣ ∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I
⊢ Associates.count (Associates.mk v.asIdeal)
      (Associates.factors (Associates.mk (∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I))) =
    Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))

tactic: simp only [IsDedekindDomain.HeightOneSpectrum.maxPowDividing] at h_dvd h_ne_zero h_not_dvd
state_before: R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type ?u.245587
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
I : Ideal R
hI : I ≠ 0
h_ne_zero : Associates.mk (∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I) ≠ 0
hv : Irreducible (Associates.mk v.asIdeal)
h_dvd : maxPowDividing v I ∣ ∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I
h_not_dvd :
  ¬v.asIdeal ^ (Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I)) + 1) ∣
      ∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I
⊢ Associates.count (Associates.mk v.asIdeal)
      (Associates.factors (Associates.mk (∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I))) =
    Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))

tactic: rw [← Associates.mk_dvd_mk] at h_dvd h_not_dvd
state_before: R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type ?u.245587
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
I : Ideal R
hI : I ≠ 0
h_ne_zero :
  Associates.mk
      (∏ᶠ (v : HeightOneSpectrum R),
        v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))) ≠
    0
hv : Irreducible (Associates.mk v.asIdeal)
h_dvd :
  v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I)) ∣
    ∏ᶠ (v : HeightOneSpectrum R),
      v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))
h_not_dvd :
  ¬v.asIdeal ^ (Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I)) + 1) ∣
      ∏ᶠ (v : HeightOneSpectrum R),
        v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))
⊢ Associates.count (Associates.mk v.asIdeal)
      (Associates.factors (Associates.mk (∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I))) =
    Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))

tactic: simp only [Associates.dvd_eq_le] at h_dvd h_not_dvd
state_before: R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type ?u.245587
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
I : Ideal R
hI : I ≠ 0
h_ne_zero :
  Associates.mk
      (∏ᶠ (v : HeightOneSpectrum R),
        v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))) ≠
    0
hv : Irreducible (Associates.mk v.asIdeal)
h_dvd :
  Associates.mk (v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))) ∣
    Associates.mk
      (∏ᶠ (v : HeightOneSpectrum R),
        v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I)))
h_not_dvd :
  ¬Associates.mk (v.asIdeal ^ (Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I)) + 1)) ∣
      Associates.mk
        (∏ᶠ (v : HeightOneSpectrum R),
          v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I)))
⊢ Associates.count (Associates.mk v.asIdeal)
      (Associates.factors (Associates.mk (∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I))) =
    Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))

tactic: rw [Associates.mk_pow, Associates.prime_pow_dvd_iff_le h_ne_zero hv] at h_dvd h_not_dvd
state_before: R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type ?u.245587
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
I : Ideal R
hI : I ≠ 0
h_ne_zero :
  Associates.mk
      (∏ᶠ (v : HeightOneSpectrum R),
        v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))) ≠
    0
hv : Irreducible (Associates.mk v.asIdeal)
h_dvd :
  Associates.mk (v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))) ≤
    Associates.mk
      (∏ᶠ (v : HeightOneSpectrum R),
        v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I)))
h_not_dvd :
  ¬Associates.mk (v.asIdeal ^ (Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I)) + 1)) ≤
      Associates.mk
        (∏ᶠ (v : HeightOneSpectrum R),
          v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I)))
⊢ Associates.count (Associates.mk v.asIdeal)
      (Associates.factors (Associates.mk (∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I))) =
    Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))

tactic: rw [not_le] at h_not_dvd
state_before: R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type ?u.245587
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
I : Ideal R
hI : I ≠ 0
h_ne_zero :
  Associates.mk
      (∏ᶠ (v : HeightOneSpectrum R),
        v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))) ≠
    0
hv : Irreducible (Associates.mk v.asIdeal)
h_dvd :
  Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I)) ≤
    Associates.count (Associates.mk v.asIdeal)
      (Associates.factors
        (Associates.mk
          (∏ᶠ (v : HeightOneSpectrum R),
            v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I)))))
h_not_dvd :
  ¬Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I)) + 1 ≤
      Associates.count (Associates.mk v.asIdeal)
        (Associates.factors
          (Associates.mk
            (∏ᶠ (v : HeightOneSpectrum R),
              v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I)))))
⊢ Associates.count (Associates.mk v.asIdeal)
      (Associates.factors (Associates.mk (∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I))) =
    Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))

tactic: apply Nat.eq_of_le_of_lt_succ h_dvd h_not_dvd
state_before: R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type ?u.245587
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
I : Ideal R
hI : I ≠ 0
h_ne_zero :
  Associates.mk
      (∏ᶠ (v : HeightOneSpectrum R),
        v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))) ≠
    0
hv : Irreducible (Associates.mk v.asIdeal)
h_dvd :
  Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I)) ≤
    Associates.count (Associates.mk v.asIdeal)
      (Associates.factors
        (Associates.mk
          (∏ᶠ (v : HeightOneSpectrum R),
            v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I)))))
h_not_dvd :
  Associates.count (Associates.mk v.asIdeal)
      (Associates.factors
        (Associates.mk
          (∏ᶠ (v : HeightOneSpectrum R),
            v.asIdeal ^ Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))))) <
    Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I)) + 1
⊢ Associates.count (Associates.mk v.asIdeal)
      (Associates.factors (Associates.mk (∏ᶠ (v : HeightOneSpectrum R), maxPowDividing v I))) =
    Associates.count (Associates.mk v.asIdeal) (Associates.factors (Associates.mk I))