Theorem: multiplicity_prime_eq_multiplicity_image_by_factor_orderIso
File: Mathlib/RingTheory/ChainOfDivisors.lean

tactic: refine' le_antisymm (multiplicity_prime_le_multiplicity_image_by_factor_orderIso hp d) _
state_before: M : Type u_1
inst✝⁶ : CancelCommMonoidWithZero M
N : Type u_2
inst✝⁵ : CancelCommMonoidWithZero N
inst✝⁴ : UniqueFactorizationMonoid N
inst✝³ : UniqueFactorizationMonoid M
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableEq (Associates M)
m p : Associates M
n : Associates N
hn : n ≠ 0
hp : p ∈ normalizedFactors m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
⊢ multiplicity p m = multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n

tactic: suffices multiplicity (↑(d ⟨p, dvd_of_mem_normalizedFactors hp⟩)) n ≤
    multiplicity (↑(d.symm (d ⟨p, dvd_of_mem_normalizedFactors hp⟩))) m by
  rw [d.symm_apply_apply ⟨p, dvd_of_mem_normalizedFactors hp⟩, Subtype.coe_mk] at this
  exact this
state_before: M : Type u_1
inst✝⁶ : CancelCommMonoidWithZero M
N : Type u_2
inst✝⁵ : CancelCommMonoidWithZero N
inst✝⁴ : UniqueFactorizationMonoid N
inst✝³ : UniqueFactorizationMonoid M
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableEq (Associates M)
m p : Associates M
n : Associates N
hn : n ≠ 0
hp : p ∈ normalizedFactors m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
⊢ multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n ≤ multiplicity p m

tactic: letI := Classical.decEq (Associates N)
state_before: M : Type u_1
inst✝⁶ : CancelCommMonoidWithZero M
N : Type u_2
inst✝⁵ : CancelCommMonoidWithZero N
inst✝⁴ : UniqueFactorizationMonoid N
inst✝³ : UniqueFactorizationMonoid M
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableEq (Associates M)
m p : Associates M
n : Associates N
hn : n ≠ 0
hp : p ∈ normalizedFactors m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
⊢ multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n ≤
    multiplicity (↑(↑(OrderIso.symm d) (↑d { val := p, property := (_ : p ∣ m) }))) m

tactic: simpa only [Subtype.coe_eta] using
  multiplicity_prime_le_multiplicity_image_by_factor_orderIso
    (mem_normalizedFactors_factor_orderIso_of_mem_normalizedFactors hn hp d) d.symm
state_before: M : Type u_1
inst✝⁶ : CancelCommMonoidWithZero M
N : Type u_2
inst✝⁵ : CancelCommMonoidWithZero N
inst✝⁴ : UniqueFactorizationMonoid N
inst✝³ : UniqueFactorizationMonoid M
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableEq (Associates M)
m p : Associates M
n : Associates N
hn : n ≠ 0
hp : p ∈ normalizedFactors m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
this : DecidableEq (Associates N) := Classical.decEq (Associates N)
⊢ multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n ≤
    multiplicity (↑(↑(OrderIso.symm d) (↑d { val := p, property := (_ : p ∣ m) }))) m

tactic: rw [d.symm_apply_apply ⟨p, dvd_of_mem_normalizedFactors hp⟩, Subtype.coe_mk] at this
state_before: M : Type u_1
inst✝⁶ : CancelCommMonoidWithZero M
N : Type u_2
inst✝⁵ : CancelCommMonoidWithZero N
inst✝⁴ : UniqueFactorizationMonoid N
inst✝³ : UniqueFactorizationMonoid M
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableEq (Associates M)
m p : Associates M
n : Associates N
hn : n ≠ 0
hp : p ∈ normalizedFactors m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
this :
  multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n ≤
    multiplicity (↑(↑(OrderIso.symm d) (↑d { val := p, property := (_ : p ∣ m) }))) m
⊢ multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n ≤ multiplicity p m

tactic: exact this
state_before: M : Type u_1
inst✝⁶ : CancelCommMonoidWithZero M
N : Type u_2
inst✝⁵ : CancelCommMonoidWithZero N
inst✝⁴ : UniqueFactorizationMonoid N
inst✝³ : UniqueFactorizationMonoid M
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableEq (Associates M)
m p : Associates M
n : Associates N
hn : n ≠ 0
hp : p ∈ normalizedFactors m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
this :
  multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n ≤ multiplicity (↑{ val := p, property := (_ : p ∣ m) }) m
⊢ multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n ≤ multiplicity p m