Theorem: Finset.prod_antidiagonal_pow_choose_succ
File: Mathlib/Data/Nat/Choose/Sum.lean

tactic: simp only [Nat.prod_antidiagonal_eq_prod_range_succ_mk, prod_pow_choose_succ]
state_before: R✝ : Type ?u.321125
M✝ : Type ?u.321128
R : Type ?u.321131
inst✝² : CommMonoid M✝
inst✝¹ : NonAssocSemiring R
M : Type u_1
inst✝ : CommMonoid M
f : ℕ → ℕ → M
n : ℕ
⊢ ∏ ij in Nat.antidiagonal (n + 1), f ij.fst ij.snd ^ Nat.choose (n + 1) ij.fst =
    (∏ ij in Nat.antidiagonal n, f ij.fst (ij.snd + 1) ^ Nat.choose n ij.fst) *
      ∏ ij in Nat.antidiagonal n, f (ij.fst + 1) ij.snd ^ Nat.choose n ij.snd

tactic: have : ∀ i ∈ range (n + 1), i ≤ n := fun i hi ↦ by simpa [Nat.lt_succ_iff] using hi
state_before: R✝ : Type ?u.321125
M✝ : Type ?u.321128
R : Type ?u.321131
inst✝² : CommMonoid M✝
inst✝¹ : NonAssocSemiring R
M : Type u_1
inst✝ : CommMonoid M
f : ℕ → ℕ → M
n : ℕ
⊢ (∏ i in range (n + 1), f i (n + 1 - i) ^ Nat.choose n i) * ∏ i in range (n + 1), f (i + 1) (n - i) ^ Nat.choose n i =
    (∏ x in range (succ n), f x (n - x + 1) ^ Nat.choose n x) *
      ∏ x in range (succ n), f (x + 1) (n - x) ^ Nat.choose n (n - x)

tactic: congr 1
state_before: R✝ : Type ?u.321125
M✝ : Type ?u.321128
R : Type ?u.321131
inst✝² : CommMonoid M✝
inst✝¹ : NonAssocSemiring R
M : Type u_1
inst✝ : CommMonoid M
f : ℕ → ℕ → M
n : ℕ
this : ∀ (i : ℕ), i ∈ range (n + 1) → i ≤ n
⊢ (∏ i in range (n + 1), f i (n + 1 - i) ^ Nat.choose n i) * ∏ i in range (n + 1), f (i + 1) (n - i) ^ Nat.choose n i =
    (∏ x in range (succ n), f x (n - x + 1) ^ Nat.choose n x) *
      ∏ x in range (succ n), f (x + 1) (n - x) ^ Nat.choose n (n - x)

tactic: simpa [Nat.lt_succ_iff] using hi
state_before: R✝ : Type ?u.321125
M✝ : Type ?u.321128
R : Type ?u.321131
inst✝² : CommMonoid M✝
inst✝¹ : NonAssocSemiring R
M : Type u_1
inst✝ : CommMonoid M
f : ℕ → ℕ → M
n i : ℕ
hi : i ∈ range (n + 1)
⊢ i ≤ n

tactic: refine prod_congr rfl fun i hi ↦ ?_
state_before: case e_a
R✝ : Type ?u.321125
M✝ : Type ?u.321128
R : Type ?u.321131
inst✝² : CommMonoid M✝
inst✝¹ : NonAssocSemiring R
M : Type u_1
inst✝ : CommMonoid M
f : ℕ → ℕ → M
n : ℕ
this : ∀ (i : ℕ), i ∈ range (n + 1) → i ≤ n
⊢ ∏ i in range (n + 1), f i (n + 1 - i) ^ Nat.choose n i = ∏ x in range (succ n), f x (n - x + 1) ^ Nat.choose n x

tactic: rw [tsub_add_eq_add_tsub (this _ hi)]
state_before: case e_a
R✝ : Type ?u.321125
M✝ : Type ?u.321128
R : Type ?u.321131
inst✝² : CommMonoid M✝
inst✝¹ : NonAssocSemiring R
M : Type u_1
inst✝ : CommMonoid M
f : ℕ → ℕ → M
n : ℕ
this : ∀ (i : ℕ), i ∈ range (n + 1) → i ≤ n
i : ℕ
hi : i ∈ range (succ n)
⊢ f i (n + 1 - i) ^ Nat.choose n i = f i (n - i + 1) ^ Nat.choose n i

tactic: refine prod_congr rfl fun i hi ↦ ?_
state_before: case e_a
R✝ : Type ?u.321125
M✝ : Type ?u.321128
R : Type ?u.321131
inst✝² : CommMonoid M✝
inst✝¹ : NonAssocSemiring R
M : Type u_1
inst✝ : CommMonoid M
f : ℕ → ℕ → M
n : ℕ
this : ∀ (i : ℕ), i ∈ range (n + 1) → i ≤ n
⊢ ∏ i in range (n + 1), f (i + 1) (n - i) ^ Nat.choose n i =
    ∏ x in range (succ n), f (x + 1) (n - x) ^ Nat.choose n (n - x)

tactic: rw [Nat.choose_symm (this _ hi)]
state_before: case e_a
R✝ : Type ?u.321125
M✝ : Type ?u.321128
R : Type ?u.321131
inst✝² : CommMonoid M✝
inst✝¹ : NonAssocSemiring R
M : Type u_1
inst✝ : CommMonoid M
f : ℕ → ℕ → M
n : ℕ
this : ∀ (i : ℕ), i ∈ range (n + 1) → i ≤ n
i : ℕ
hi : i ∈ range (succ n)
⊢ f (i + 1) (n - i) ^ Nat.choose n i = f (i + 1) (n - i) ^ Nat.choose n (n - i)