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

tactic: letI := Classical.decEq α
state_before: α : Type u_1
R : Type ?u.1472887
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : UniqueFactorizationMonoid α
β : Type ?u.1472914
inst✝ : CancelCommMonoidWithZero β
P : α → Prop
s : Finset α
i : α → ℕ
is_prime : ∀ (p : α), p ∈ s → Prime p
is_coprime : ∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q
h1 : ∀ {x : α}, IsUnit x → P x
hpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)
hcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)
⊢ P (∏ p in s, p ^ i p)

tactic: induction' s using Finset.induction_on with p f' hpf' ih
state_before: α : Type u_1
R : Type ?u.1472887
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : UniqueFactorizationMonoid α
β : Type ?u.1472914
inst✝ : CancelCommMonoidWithZero β
P : α → Prop
s : Finset α
i : α → ℕ
is_prime : ∀ (p : α), p ∈ s → Prime p
is_coprime : ∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q
h1 : ∀ {x : α}, IsUnit x → P x
hpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)
hcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)
this : DecidableEq α := Classical.decEq α
⊢ P (∏ p in s, p ^ i p)

tactic: rw [Finset.prod_insert hpf']
state_before: case insert
α : Type u_1
R : Type ?u.1472887
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : UniqueFactorizationMonoid α
β : Type ?u.1472914
inst✝ : CancelCommMonoidWithZero β
P : α → Prop
s : Finset α
i : α → ℕ
is_prime✝ : ∀ (p : α), p ∈ s → Prime p
is_coprime✝ : ∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q
h1 : ∀ {x : α}, IsUnit x → P x
hpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)
hcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)
this : DecidableEq α := Classical.decEq α
p : α
f' : Finset α
hpf' : ¬p ∈ f'
ih : (∀ (p : α), p ∈ f' → Prime p) → (∀ (p : α), p ∈ f' → ∀ (q : α), q ∈ f' → p ∣ q → p = q) → P (∏ p in f', p ^ i p)
is_prime : ∀ (p_1 : α), p_1 ∈ insert p f' → Prime p_1
is_coprime : ∀ (p_1 : α), p_1 ∈ insert p f' → ∀ (q : α), q ∈ insert p f' → p_1 ∣ q → p_1 = q
⊢ P (∏ p in insert p f', p ^ i p)

tactic: exact
  hcp (prime_pow_coprime_prod_of_coprime_insert i p hpf' is_prime is_coprime)
    (hpr (i p) (is_prime _ (Finset.mem_insert_self _ _)))
    (ih (fun q hq => is_prime _ (Finset.mem_insert_of_mem hq)) fun q hq q' hq' =>
      is_coprime _ (Finset.mem_insert_of_mem hq) _ (Finset.mem_insert_of_mem hq'))
state_before: case insert
α : Type u_1
R : Type ?u.1472887
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : UniqueFactorizationMonoid α
β : Type ?u.1472914
inst✝ : CancelCommMonoidWithZero β
P : α → Prop
s : Finset α
i : α → ℕ
is_prime✝ : ∀ (p : α), p ∈ s → Prime p
is_coprime✝ : ∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q
h1 : ∀ {x : α}, IsUnit x → P x
hpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)
hcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)
this : DecidableEq α := Classical.decEq α
p : α
f' : Finset α
hpf' : ¬p ∈ f'
ih : (∀ (p : α), p ∈ f' → Prime p) → (∀ (p : α), p ∈ f' → ∀ (q : α), q ∈ f' → p ∣ q → p = q) → P (∏ p in f', p ^ i p)
is_prime : ∀ (p_1 : α), p_1 ∈ insert p f' → Prime p_1
is_coprime : ∀ (p_1 : α), p_1 ∈ insert p f' → ∀ (q : α), q ∈ insert p f' → p_1 ∣ q → p_1 = q
⊢ P (p ^ i p * ∏ x in f', x ^ i x)

tactic: simpa using h1 isUnit_one
state_before: case empty
α : Type u_1
R : Type ?u.1472887
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : UniqueFactorizationMonoid α
β : Type ?u.1472914
inst✝ : CancelCommMonoidWithZero β
P : α → Prop
s : Finset α
i : α → ℕ
is_prime✝ : ∀ (p : α), p ∈ s → Prime p
is_coprime✝ : ∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q
h1 : ∀ {x : α}, IsUnit x → P x
hpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)
hcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)
this : DecidableEq α := Classical.decEq α
is_prime : ∀ (p : α), p ∈ ∅ → Prime p
is_coprime : ∀ (p : α), p ∈ ∅ → ∀ (q : α), q ∈ ∅ → p ∣ q → p = q
⊢ P (∏ p in ∅, p ^ i p)