Theorem: padicValNat.pow_add_pow
File: Mathlib/NumberTheory/Multiplicity.lean

tactic: cases' y with y
state_before: R : Type u_1
n✝ x y p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hxy : p ∣ x + y
hx : ¬p ∣ x
n : ℕ
hn : Odd n
⊢ padicValNat p (x ^ n + y ^ n) = padicValNat p (x + y) + padicValNat p n
state_after: case zero
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
hxy : p ∣ x + 0
⊢ padicValNat p (x ^ n + 0 ^ n) = padicValNat p (x + 0) + padicValNat p n

case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ padicValNat p (x ^ n + (y + 1) ^ n) = padicValNat p (x + (y + 1)) + padicValNat p n

tactic: rw [← PartENat.natCast_inj, Nat.cast_add]
state_before: case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ padicValNat p (x ^ n + (y + 1) ^ n) = padicValNat p (x + (y + 1)) + padicValNat p n
state_after: case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ ↑(padicValNat p (x ^ n + (y + 1) ^ n)) = ↑(padicValNat p (x + (y + 1))) + ↑(padicValNat p n)

tactic: iterate 3 rw [padicValNat_def, PartENat.natCast_get]
state_before: case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ ↑(padicValNat p (x ^ n + (y + 1) ^ n)) = ↑(padicValNat p (x + (y + 1))) + ↑(padicValNat p n)
state_after: case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ multiplicity p (x ^ n + (y + 1) ^ n) = multiplicity p (x + (y + 1)) + multiplicity p n

case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ 0 < n

case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ 0 < x + (y + 1)

case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ 0 < x ^ n + (y + 1) ^ n

tactic: contradiction
state_before: case zero
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
hxy : p ∣ x + 0
⊢ padicValNat p (x ^ n + 0 ^ n) = padicValNat p (x + 0) + padicValNat p n
state_after: no goals

tactic: rw [padicValNat_def, PartENat.natCast_get]
state_before: case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ multiplicity p (x ^ n + (y + 1) ^ n) = multiplicity p (x + (y + 1)) + ↑(padicValNat p n)

case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ 0 < x + (y + 1)

case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ 0 < x ^ n + (y + 1) ^ n
state_after: case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ multiplicity p (x ^ n + (y + 1) ^ n) = multiplicity p (x + (y + 1)) + multiplicity p n

case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ 0 < n

case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ 0 < x + (y + 1)

case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ 0 < x ^ n + (y + 1) ^ n

tactic: exact multiplicity.Nat.pow_add_pow hp.out hp1 hxy hx hn
state_before: case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ multiplicity p (x ^ n + (y + 1) ^ n) = multiplicity p (x + (y + 1)) + multiplicity p n
state_after: no goals

tactic: exact Odd.pos hn
state_before: case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ 0 < n
state_after: no goals

tactic: simp only [add_pos_iff, Nat.succ_pos', or_true_iff]
state_before: case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ 0 < x + (y + 1)
state_after: no goals

tactic: exact Nat.lt_add_left _ (pow_pos y.succ_pos _)
state_before: case succ
R : Type u_1
n✝ x p : ℕ
hp : Fact (Nat.Prime p)
hp1 : Odd p
hx : ¬p ∣ x
n : ℕ
hn : Odd n
y : ℕ
hxy : p ∣ x + (y + 1)
⊢ 0 < x ^ n + (y + 1) ^ n
state_after: no goals