internlm/Lean-Github huggingface dataset:
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case pos.h₁
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∈ d.primeFactors
⊢ ⟨p, hp⟩ ∉ d.primeFactors.attach → (↑⟨p, hp⟩ ^ a ↑⟨p, hp⟩ ⋯).factorization p = 0
Tactic:
intro h
Proof state after:
case pos.h₁
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∈ d.primeFactors
h : ⟨p, hp⟩ ∉ d.primeFactors.attach
⊢ (↑⟨p, hp⟩ ^ a ↑⟨p, hp⟩ ⋯).factorization p = 0
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case pos.h₁
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∈ d.primeFactors
h : ⟨p, hp⟩ ∉ d.primeFactors.attach
⊢ (↑⟨p, hp⟩ ^ a ↑⟨p, hp⟩ ⋯).factorization p = 0
Tactic:
exfalso
Proof state after:
case pos.h₁
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∈ d.primeFactors
h : ⟨p, hp⟩ ∉ d.primeFactors.attach
⊢ False
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case pos.h₁
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∈ d.primeFactors
h : ⟨p, hp⟩ ∉ d.primeFactors.attach
⊢ False
Tactic:
exact h (Finset.mem_attach _ _)
Proof state after:
no goals
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case pos
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∈ d.primeFactors
⊢ ∀ x ∈ d.primeFactors.attach, ↑x ^ a ↑x ⋯ ≠ 0
Tactic:
exact fun q _ => pow_ne_zero _ (ne_of_gt (Nat.pos_of_mem_factors (List.mem_toFinset.mp q.2)))
Proof state after:
no goals
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case neg
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
⊢ (i a ha).factorization p = if hp : p ∈ d.primeFactors then a p hp else 0
Tactic:
rw [dif_neg hp]
Proof state after:
case neg
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
⊢ (i a ha).factorization p = 0
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case neg
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
⊢ (i a ha).factorization p = 0
Tactic:
by_cases hpp : p.Prime
Proof state after:
case pos
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
⊢ (i a ha).factorization p = 0

case neg
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : ¬p.Prime
⊢ (i a ha).factorization p = 0
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case pos
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
⊢ (i a ha).factorization p = 0

case neg
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : ¬p.Prime
⊢ (i a ha).factorization p = 0
Tactic:
swap
Proof state after:
case neg
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : ¬p.Prime
⊢ (i a ha).factorization p = 0

case pos
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
⊢ (i a ha).factorization p = 0
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case pos
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
⊢ (i a ha).factorization p = 0
Tactic:
apply Nat.factorization_eq_zero_of_not_dvd
Proof state after:
case pos.h
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
⊢ ¬p ∣ i a ha
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case pos.h
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
⊢ ¬p ∣ i a ha
Tactic:
intro hp_dvd
Proof state after:
case pos.h
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
⊢ False
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case pos.h
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
⊢ False
Tactic:
obtain ⟨⟨q, hq⟩, _, hp_dvd_pow⟩ := Prime.exists_mem_finset_dvd hpp.prime hp_dvd
Proof state after:
case pos.h.intro.mk.intro
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
q : ℕ
hq : q ∈ d.primeFactors
left✝ : ⟨q, hq⟩ ∈ d.primeFactors.attach
hp_dvd_pow : p ∣ ↑⟨q, hq⟩ ^ a ↑⟨q, hq⟩ ⋯
⊢ False
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case pos.h.intro.mk.intro
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
q : ℕ
hq : q ∈ d.primeFactors
left✝ : ⟨q, hq⟩ ∈ d.primeFactors.attach
hp_dvd_pow : p ∣ ↑⟨q, hq⟩ ^ a ↑⟨q, hq⟩ ⋯
⊢ False
Tactic:
apply hp
Proof state after:
case pos.h.intro.mk.intro
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
q : ℕ
hq : q ∈ d.primeFactors
left✝ : ⟨q, hq⟩ ∈ d.primeFactors.attach
hp_dvd_pow : p ∣ ↑⟨q, hq⟩ ^ a ↑⟨q, hq⟩ ⋯
⊢ p ∈ d.primeFactors
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case pos.h.intro.mk.intro
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
q : ℕ
hq : q ∈ d.primeFactors
left✝ : ⟨q, hq⟩ ∈ d.primeFactors.attach
hp_dvd_pow : p ∣ ↑⟨q, hq⟩ ^ a ↑⟨q, hq⟩ ⋯
⊢ p ∈ d.primeFactors
Tactic:
rw [Nat.mem_primeFactors]
Proof state after:
case pos.h.intro.mk.intro
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
q : ℕ
hq : q ∈ d.primeFactors
left✝ : ⟨q, hq⟩ ∈ d.primeFactors.attach
hp_dvd_pow : p ∣ ↑⟨q, hq⟩ ^ a ↑⟨q, hq⟩ ⋯
⊢ p.Prime ∧ p ∣ d ∧ d ≠ 0
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case pos.h.intro.mk.intro
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
q : ℕ
hq : q ∈ d.primeFactors
left✝ : ⟨q, hq⟩ ∈ d.primeFactors.attach
hp_dvd_pow : p ∣ ↑⟨q, hq⟩ ^ a ↑⟨q, hq⟩ ⋯
⊢ p.Prime ∧ p ∣ d ∧ d ≠ 0
Tactic:
constructor
Proof state after:
case pos.h.intro.mk.intro.left
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
q : ℕ
hq : q ∈ d.primeFactors
left✝ : ⟨q, hq⟩ ∈ d.primeFactors.attach
hp_dvd_pow : p ∣ ↑⟨q, hq⟩ ^ a ↑⟨q, hq⟩ ⋯
⊢ p.Prime

case pos.h.intro.mk.intro.right
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
q : ℕ
hq : q ∈ d.primeFactors
left✝ : ⟨q, hq⟩ ∈ d.primeFactors.attach
hp_dvd_pow : p ∣ ↑⟨q, hq⟩ ^ a ↑⟨q, hq⟩ ⋯
⊢ p ∣ d ∧ d ≠ 0
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case pos.h.intro.mk.intro.right
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
q : ℕ
hq : q ∈ d.primeFactors
left✝ : ⟨q, hq⟩ ∈ d.primeFactors.attach
hp_dvd_pow : p ∣ ↑⟨q, hq⟩ ^ a ↑⟨q, hq⟩ ⋯
⊢ p ∣ d ∧ d ≠ 0
Tactic:
refine ⟨?_, hd.ne_zero⟩
Proof state after:
case pos.h.intro.mk.intro.right
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
q : ℕ
hq : q ∈ d.primeFactors
left✝ : ⟨q, hq⟩ ∈ d.primeFactors.attach
hp_dvd_pow : p ∣ ↑⟨q, hq⟩ ^ a ↑⟨q, hq⟩ ⋯
⊢ p ∣ d
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case pos.h.intro.mk.intro.right
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
q : ℕ
hq : q ∈ d.primeFactors
left✝ : ⟨q, hq⟩ ∈ d.primeFactors.attach
hp_dvd_pow : p ∣ ↑⟨q, hq⟩ ^ a ↑⟨q, hq⟩ ⋯
⊢ p ∣ d
Tactic:
trans q
Proof state after:
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
q : ℕ
hq : q ∈ d.primeFactors
left✝ : ⟨q, hq⟩ ∈ d.primeFactors.attach
hp_dvd_pow : p ∣ ↑⟨q, hq⟩ ^ a ↑⟨q, hq⟩ ⋯
⊢ p ∣ q

M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
q : ℕ
hq : q ∈ d.primeFactors
left✝ : ⟨q, hq⟩ ∈ d.primeFactors.attach
hp_dvd_pow : p ∣ ↑⟨q, hq⟩ ^ a ↑⟨q, hq⟩ ⋯
⊢ q ∣ d
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case neg
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : ¬p.Prime
⊢ (i a ha).factorization p = 0
Tactic:
apply Nat.factorization_eq_zero_of_non_prime _ hpp
Proof state after:
no goals
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
case pos.h.intro.mk.intro.left
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
q : ℕ
hq : q ∈ d.primeFactors
left✝ : ⟨q, hq⟩ ∈ d.primeFactors.attach
hp_dvd_pow : p ∣ ↑⟨q, hq⟩ ^ a ↑⟨q, hq⟩ ⋯
⊢ p.Prime
Tactic:
exact hpp
Proof state after:
no goals
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
q : ℕ
hq : q ∈ d.primeFactors
left✝ : ⟨q, hq⟩ ∈ d.primeFactors.attach
hp_dvd_pow : p ∣ ↑⟨q, hq⟩ ^ a ↑⟨q, hq⟩ ⋯
⊢ p ∣ q
Tactic:
apply Nat.Prime.dvd_of_dvd_pow hpp hp_dvd_pow
Proof state after:
no goals
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M
p : ℕ
hp : p ∉ d.primeFactors
hpp : p.Prime
hp_dvd : p ∣ i a ha
q : ℕ
hq : q ∈ d.primeFactors
left✝ : ⟨q, hq⟩ ∈ d.primeFactors.attach
hp_dvd_pow : p ∣ ↑⟨q, hq⟩ ^ a ↑⟨q, hq⟩ ⋯
⊢ q ∣ d
Tactic:
apply Nat.dvd_of_mem_factors $ List.mem_toFinset.mp hq
Proof state after:
no goals
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
hfact_i :
  ∀ (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) (ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) (p : ℕ),
    (i a ha).factorization p = if hp : p ∈ d.primeFactors then a p hp else 0
⊢ ∀ (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) (ha : a ∈ d.primeFactors.pi fun _p => Finset.Icc 1 M), i a ha ≠ 0
Tactic:
intro a ha
Proof state after:
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
hfact_i :
  ∀ (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) (ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) (p : ℕ),
    (i a ha).factorization p = if hp : p ∈ d.primeFactors then a p hp else 0
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun _p => Finset.Icc 1 M
⊢ i a ha ≠ 0
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
hfact_i :
  ∀ (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) (ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) (p : ℕ),
    (i a ha).factorization p = if hp : p ∈ d.primeFactors then a p hp else 0
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun _p => Finset.Icc 1 M
⊢ i a ha ≠ 0
Tactic:
erw [Finset.prod_ne_zero_iff]
Proof state after:
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
hfact_i :
  ∀ (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) (ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) (p : ℕ),
    (i a ha).factorization p = if hp : p ∈ d.primeFactors then a p hp else 0
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun _p => Finset.Icc 1 M
⊢ ∀ a_1 ∈ d.primeFactors.attach, ↑a_1 ^ a ↑a_1 ⋯ ≠ 0
Theorem: Sieve.prod_factors_sum_pow_compMult
Proof state before:
M : ℕ
hM : M ≠ 0
f : ArithmeticFunction ℝ
hf : CompletelyMultiplicative f
d : ℕ
hd : Squarefree d
i : (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) → (a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) → ℕ :=
  fun a x => ∏ p ∈ d.primeFactors.attach, ↑p ^ a ↑p ⋯
hfact_i :
  ∀ (a : (a : ℕ) → a ∈ d.primeFactors → ℕ) (ha : a ∈ d.primeFactors.pi fun p => Finset.Icc 1 M) (p : ℕ),
    (i a ha).factorization p = if hp : p ∈ d.primeFactors then a p hp else 0
a : (a : ℕ) → a ∈ d.primeFactors → ℕ
ha : a ∈ d.primeFactors.pi fun _p => Finset.Icc 1 M
⊢ ∀ a_1 ∈ d.primeFactors.attach, ↑a_1 ^ a ↑a_1 ⋯ ≠ 0
Tactic:
exact fun p _ => pow_ne_zero _ (ne_of_gt (Nat.pos_of_mem_factors (List.mem_toFinset.mp p.property)))
Proof state after:
no goals