Theorem: UniqueFactorizationMonoid.pow_right_injective
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

Proof steps:
state_before: α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
⊢ Function.Injective fun x => a ^ x
state_after: α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
this : DecidableEq R := Classical.decEq R
⊢ Function.Injective fun x => a ^ x
tactic: letI := Classical.decEq R
state_before: α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
this : DecidableEq R := Classical.decEq R
⊢ Function.Injective fun x => a ^ x
state_after: α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
this : DecidableEq R := Classical.decEq R
i j : ℕ
hij : (fun x => a ^ x) i = (fun x => a ^ x) j
⊢ i = j
tactic: intro i j hij
state_before: α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
this : DecidableEq R := Classical.decEq R
i j : ℕ
hij : (fun x => a ^ x) i = (fun x => a ^ x) j
⊢ i = j
state_after: α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
this✝ : DecidableEq R := Classical.decEq R
i j : ℕ
hij : (fun x => a ^ x) i = (fun x => a ^ x) j
this : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }
⊢ i = j
tactic: letI : Nontrivial R := ⟨⟨a, 0, ha0⟩⟩
state_before: α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
this✝ : DecidableEq R := Classical.decEq R
i j : ℕ
hij : (fun x => a ^ x) i = (fun x => a ^ x) j
this : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }
⊢ i = j
state_after: α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
this✝¹ : DecidableEq R := Classical.decEq R
i j : ℕ
hij : (fun x => a ^ x) i = (fun x => a ^ x) j
this✝ : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }
this : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid
⊢ i = j
tactic: letI : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid
state_before: α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
this✝¹ : DecidableEq R := Classical.decEq R
i j : ℕ
hij : (fun x => a ^ x) i = (fun x => a ^ x) j
this✝ : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }
this : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid
⊢ i = j
state_after: case intro.intro
α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
this✝¹ : DecidableEq R := Classical.decEq R
i j : ℕ
hij : (fun x => a ^ x) i = (fun x => a ^ x) j
this✝ : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }
this : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid
p' : R
hp' : Irreducible p'
dvd' : p' ∣ a
⊢ i = j
tactic: obtain ⟨p', hp', dvd'⟩ := WfDvdMonoid.exists_irreducible_factor ha1 ha0
state_before: case intro.intro
α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
this✝¹ : DecidableEq R := Classical.decEq R
i j : ℕ
hij : (fun x => a ^ x) i = (fun x => a ^ x) j
this✝ : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }
this : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid
p' : R
hp' : Irreducible p'
dvd' : p' ∣ a
⊢ i = j
state_after: case intro.intro.intro.intro
α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
this✝¹ : DecidableEq R := Classical.decEq R
i j : ℕ
hij : (fun x => a ^ x) i = (fun x => a ^ x) j
this✝ : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }
this : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid
p' : R
hp' : Irreducible p'
dvd' : p' ∣ a
p : R
mem : p ∈ normalizedFactors a
right✝ : p' ~ᵤ p
⊢ i = j
tactic: obtain ⟨p, mem, _⟩ := exists_mem_normalizedFactors_of_dvd ha0 hp' dvd'
state_before: case intro.intro.intro.intro
α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
this✝¹ : DecidableEq R := Classical.decEq R
i j : ℕ
hij : (fun x => a ^ x) i = (fun x => a ^ x) j
this✝ : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }
this : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid
p' : R
hp' : Irreducible p'
dvd' : p' ∣ a
p : R
mem : p ∈ normalizedFactors a
right✝ : p' ~ᵤ p
⊢ i = j
state_after: case intro.intro.intro.intro
α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
this✝² : DecidableEq R := Classical.decEq R
i j : ℕ
hij : (fun x => a ^ x) i = (fun x => a ^ x) j
this✝¹ : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }
this✝ : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid
p' : R
hp' : Irreducible p'
dvd' : p' ∣ a
p : R
mem : p ∈ normalizedFactors a
right✝ : p' ~ᵤ p
this :
  (fun x => Multiset.count p (normalizedFactors x)) ((fun x => a ^ x) i) =
    (fun x => Multiset.count p (normalizedFactors x)) ((fun x => a ^ x) j)
⊢ i = j
tactic: have := congr_arg (fun x => Multiset.count p (normalizedFactors x)) hij
state_before: case intro.intro.intro.intro
α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
this✝² : DecidableEq R := Classical.decEq R
i j : ℕ
hij : (fun x => a ^ x) i = (fun x => a ^ x) j
this✝¹ : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }
this✝ : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid
p' : R
hp' : Irreducible p'
dvd' : p' ∣ a
p : R
mem : p ∈ normalizedFactors a
right✝ : p' ~ᵤ p
this :
  (fun x => Multiset.count p (normalizedFactors x)) ((fun x => a ^ x) i) =
    (fun x => Multiset.count p (normalizedFactors x)) ((fun x => a ^ x) j)
⊢ i = j
state_after: case intro.intro.intro.intro
α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
this✝² : DecidableEq R := Classical.decEq R
i j : ℕ
hij : (fun x => a ^ x) i = (fun x => a ^ x) j
this✝¹ : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }
this✝ : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid
p' : R
hp' : Irreducible p'
dvd' : p' ∣ a
p : R
mem : p ∈ normalizedFactors a
right✝ : p' ~ᵤ p
this : i * Multiset.count p (normalizedFactors a) = j * Multiset.count p (normalizedFactors a)
⊢ i = j
tactic: simp only [normalizedFactors_pow, Multiset.count_nsmul] at this
state_before: case intro.intro.intro.intro
α : Type u_1
R : Type u_2
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : UniqueFactorizationMonoid R
a : R
ha0 : a ≠ 0
ha1 : ¬IsUnit a
this✝² : DecidableEq R := Classical.decEq R
i j : ℕ
hij : (fun x => a ^ x) i = (fun x => a ^ x) j
this✝¹ : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }
this✝ : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid
p' : R
hp' : Irreducible p'
dvd' : p' ∣ a
p : R
mem : p ∈ normalizedFactors a
right✝ : p' ~ᵤ p
this : i * Multiset.count p (normalizedFactors a) = j * Multiset.count p (normalizedFactors a)
⊢ i = j
state_after: no goals
tactic: exact mul_right_cancel₀ (Multiset.count_ne_zero.mpr mem) this