1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: ascPochhammer_succ_comp_X_add_one
File: Mathlib/RingTheory/Polynomial/Pochhammer.lean

tactic: suffices (ascPochhammer ℕ (n + 1)).comp (X + 1) =
    ascPochhammer ℕ (n + 1) + (n + 1) * (ascPochhammer ℕ n).comp (X + 1)
  by simpa [map_comp] using congr_arg (Polynomial.map (Nat.castRingHom S)) this
state_before: S : Type u
inst✝ : Semiring S
n : ℕ
⊢ (ascPochhammer S (n + 1)).comp (X + 1) = ascPochhammer S (n + 1) + (n + 1) • (ascPochhammer S n).comp (X + 1)
state_after: S : Type u
inst✝ : Semiring S
n : ℕ
⊢ (ascPochhammer ℕ (n + 1)).comp (X + 1) = ascPochhammer ℕ (n + 1) + (↑n + 1) * (ascPochhammer ℕ n).comp (X + 1)

tactic: nth_rw 2 [ascPochhammer_succ_left]
state_before: S : Type u
inst✝ : Semiring S
n : ℕ
⊢ (ascPochhammer ℕ (n + 1)).comp (X + 1) = ascPochhammer ℕ (n + 1) + (↑n + 1) * (ascPochhammer ℕ n).comp (X + 1)
state_after: S : Type u
inst✝ : Semiring S
n : ℕ
⊢ (ascPochhammer ℕ (n + 1)).comp (X + 1) =
    X * (ascPochhammer ℕ n).comp (X + 1) + (↑n + 1) * (ascPochhammer ℕ n).comp (X + 1)

tactic: rw [← add_mul, ascPochhammer_succ_right ℕ n, mul_comp, mul_comm, add_comp, X_comp, natCast_comp,
  add_comm, ← add_assoc]
state_before: S : Type u
inst✝ : Semiring S
n : ℕ
⊢ (ascPochhammer ℕ (n + 1)).comp (X + 1) =
    X * (ascPochhammer ℕ n).comp (X + 1) + (↑n + 1) * (ascPochhammer ℕ n).comp (X + 1)
state_after: S : Type u
inst✝ : Semiring S
n : ℕ
⊢ (↑n + X + 1) * (ascPochhammer ℕ n).comp (X + 1) = (X + (↑n + 1)) * (ascPochhammer ℕ n).comp (X + 1)

tactic: ring
state_before: S : Type u
inst✝ : Semiring S
n : ℕ
⊢ (↑n + X + 1) * (ascPochhammer ℕ n).comp (X + 1) = (X + (↑n + 1)) * (ascPochhammer ℕ n).comp (X + 1)
state_after: no goals

tactic: simpa [map_comp] using congr_arg (Polynomial.map (Nat.castRingHom S)) this
state_before: S : Type u
inst✝ : Semiring S
n : ℕ
this : (ascPochhammer ℕ (n + 1)).comp (X + 1) = ascPochhammer ℕ (n + 1) + (↑n + 1) * (ascPochhammer ℕ n).comp (X + 1)
⊢ (ascPochhammer S (n + 1)).comp (X + 1) = ascPochhammer S (n + 1) + (n + 1) • (ascPochhammer S n).comp (X + 1)
state_after: no goals
Theorem: ProbabilityTheory.mgf_zero
File: Mathlib/Probability/Moments.lean

tactic: simp only [mgf_zero', measure_univ, ENNReal.one_toReal]
state_before: Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsProbabilityMeasure μ
⊢ mgf X μ 0 = 1
state_after: no goals
Theorem: Set.preimage_eq_preimage'
File: Mathlib/Data/Set/Image.lean

tactic: constructor
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s✝ t✝ s t : Set α
f : β → α
hs : s ⊆ range f
ht : t ⊆ range f
⊢ f ⁻¹' s = f ⁻¹' t ↔ s = t
state_after: case mp
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s✝ t✝ s t : Set α
f : β → α
hs : s ⊆ range f
ht : t ⊆ range f
⊢ f ⁻¹' s = f ⁻¹' t → s = t

case mpr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s✝ t✝ s t : Set α
f : β → α
hs : s ⊆ range f
ht : t ⊆ range f
⊢ s = t → f ⁻¹' s = f ⁻¹' t

tactic: rintro rfl
state_before: case mpr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s✝ t✝ s t : Set α
f : β → α
hs : s ⊆ range f
ht : t ⊆ range f
⊢ s = t → f ⁻¹' s = f ⁻¹' t
state_after: case mpr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s✝ t s : Set α
f : β → α
hs ht : s ⊆ range f
⊢ f ⁻¹' s = f ⁻¹' s

tactic: rfl
state_before: case mpr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s✝ t s : Set α
f : β → α
hs ht : s ⊆ range f
⊢ f ⁻¹' s = f ⁻¹' s
state_after: no goals

tactic: intro h
state_before: case mp
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s✝ t✝ s t : Set α
f : β → α
hs : s ⊆ range f
ht : t ⊆ range f
⊢ f ⁻¹' s = f ⁻¹' t → s = t
state_after: case mp
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s✝ t✝ s t : Set α
f : β → α
hs : s ⊆ range f
ht : t ⊆ range f
h : f ⁻¹' s = f ⁻¹' t
⊢ s = t

tactic: apply Subset.antisymm
state_before: case mp
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s✝ t✝ s t : Set α
f : β → α
hs : s ⊆ range f
ht : t ⊆ range f
h : f ⁻¹' s = f ⁻¹' t
⊢ s = t
state_after: case mp.h₁
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s✝ t✝ s t : Set α
f : β → α
hs : s ⊆ range f
ht : t ⊆ range f
h : f ⁻¹' s = f ⁻¹' t
⊢ s ⊆ t

case mp.h₂
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s✝ t✝ s t : Set α
f : β → α
hs : s ⊆ range f
ht : t ⊆ range f
h : f ⁻¹' s = f ⁻¹' t
⊢ t ⊆ s

tactic: rw [← preimage_subset_preimage_iff hs, h]
state_before: case mp.h₁
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s✝ t✝ s t : Set α
f : β → α
hs : s ⊆ range f
ht : t ⊆ range f
h : f ⁻¹' s = f ⁻¹' t
⊢ s ⊆ t
state_after: no goals

tactic: rw [← preimage_subset_preimage_iff ht, h]
state_before: case mp.h₂
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s✝ t✝ s t : Set α
f : β → α
hs : s ⊆ range f
ht : t ⊆ range f
h : f ⁻¹' s = f ⁻¹' t
⊢ t ⊆ s
state_after: no goals
Theorem: IsOpen.isConnected_iff_isPathConnected
File: Mathlib/Topology/Connected/PathConnected.lean

tactic: rw [isConnected_iff_connectedSpace, isPathConnected_iff_pathConnectedSpace]
state_before: X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : LocPathConnectedSpace X
U : Set X
U_op : IsOpen U
⊢ IsPathConnected U ↔ IsConnected U
state_after: X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : LocPathConnectedSpace X
U : Set X
U_op : IsOpen U
⊢ PathConnectedSpace ↑U ↔ ConnectedSpace ↑U

tactic: haveI := locPathConnected_of_isOpen U_op
state_before: X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : LocPathConnectedSpace X
U : Set X
U_op : IsOpen U
⊢ PathConnectedSpace ↑U ↔ ConnectedSpace ↑U
state_after: X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : LocPathConnectedSpace X
U : Set X
U_op : IsOpen U
this : LocPathConnectedSpace ↑U
⊢ PathConnectedSpace ↑U ↔ ConnectedSpace ↑U

tactic: exact pathConnectedSpace_iff_connectedSpace
state_before: X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : LocPathConnectedSpace X
U : Set X
U_op : IsOpen U
this : LocPathConnectedSpace ↑U
⊢ PathConnectedSpace ↑U ↔ ConnectedSpace ↑U
state_after: no goals
Theorem: Fin.succ_le_or_le_castSucc
File: Mathlib/Data/Fin/Basic.lean

tactic: rw [le_castSucc_iff, ← castSucc_lt_iff_succ_le]
state_before: n m : ℕ
p : Fin (n + 1)
i : Fin n
⊢ i.succ ≤ p ∨ p ≤ i.castSucc
state_after: n m : ℕ
p : Fin (n + 1)
i : Fin n
⊢ i.castSucc < p ∨ p < i.succ

tactic: exact p.castSucc_lt_or_lt_succ i
state_before: n m : ℕ
p : Fin (n + 1)
i : Fin n
⊢ i.castSucc < p ∨ p < i.succ
state_after: no goals
Theorem: List.nthLe_cons_length
File: Mathlib/Data/List/Basic.lean

tactic: simp [h]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
x : α
xs : List α
n : ℕ
h : n = xs.length
⊢ n < (x :: xs).length
state_after: no goals
Theorem: IsPrimitiveRoot.totient_le_degree_minpoly
File: Mathlib/RingTheory/RootsOfUnity/Minpoly.lean

tactic: classical
let P : ℤ[X] := minpoly ℤ μ
let P_K : K[X] := map (Int.castRingHom K) P
calc
  n.totient = (primitiveRoots n K).card := h.card_primitiveRoots.symm
  _ ≤ P_K.roots.toFinset.card := Finset.card_le_card (is_roots_of_minpoly h)
  _ ≤ Multiset.card P_K.roots := Multiset.toFinset_card_le _
  _ ≤ P_K.natDegree := card_roots' _
  _ ≤ P.natDegree := natDegree_map_le _ _
state_before: n : ℕ
K : Type u_1
inst✝² : CommRing K
μ : K
h : IsPrimitiveRoot μ n
inst✝¹ : IsDomain K
inst✝ : CharZero K
⊢ n.totient ≤ (minpoly ℤ μ).natDegree
state_after: no goals

tactic: let P : ℤ[X] := minpoly ℤ μ
state_before: n : ℕ
K : Type u_1
inst✝² : CommRing K
μ : K
h : IsPrimitiveRoot μ n
inst✝¹ : IsDomain K
inst✝ : CharZero K
⊢ n.totient ≤ (minpoly ℤ μ).natDegree
state_after: n : ℕ
K : Type u_1
inst✝² : CommRing K
μ : K
h : IsPrimitiveRoot μ n
inst✝¹ : IsDomain K
inst✝ : CharZero K
P : ℤ[X] := minpoly ℤ μ
⊢ n.totient ≤ (minpoly ℤ μ).natDegree

tactic: let P_K : K[X] := map (Int.castRingHom K) P
state_before: n : ℕ
K : Type u_1
inst✝² : CommRing K
μ : K
h : IsPrimitiveRoot μ n
inst✝¹ : IsDomain K
inst✝ : CharZero K
P : ℤ[X] := minpoly ℤ μ
⊢ n.totient ≤ (minpoly ℤ μ).natDegree
state_after: n : ℕ
K : Type u_1
inst✝² : CommRing K
μ : K
h : IsPrimitiveRoot μ n
inst✝¹ : IsDomain K
inst✝ : CharZero K
P : ℤ[X] := minpoly ℤ μ
P_K : K[X] := map (Int.castRingHom K) P
⊢ n.totient ≤ (minpoly ℤ μ).natDegree

tactic: calc
  n.totient = (primitiveRoots n K).card := h.card_primitiveRoots.symm
  _ ≤ P_K.roots.toFinset.card := Finset.card_le_card (is_roots_of_minpoly h)
  _ ≤ Multiset.card P_K.roots := Multiset.toFinset_card_le _
  _ ≤ P_K.natDegree := card_roots' _
  _ ≤ P.natDegree := natDegree_map_le _ _
state_before: n : ℕ
K : Type u_1
inst✝² : CommRing K
μ : K
h : IsPrimitiveRoot μ n
inst✝¹ : IsDomain K
inst✝ : CharZero K
P : ℤ[X] := minpoly ℤ μ
P_K : K[X] := map (Int.castRingHom K) P
⊢ n.totient ≤ (minpoly ℤ μ).natDegree
state_after: no goals
Theorem: Int.floor_intCast
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [le_floor, Int.cast_le]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z✝ : ℤ
a✝ : α
z a : ℤ
⊢ a ≤ ⌊↑z⌋ ↔ a ≤ z
state_after: no goals
Theorem: Polynomial.pow_sub_one_dvd_derivative_of_pow_dvd
File: Mathlib/Algebra/Polynomial/Derivative.lean

tactic: obtain ⟨r, rfl⟩ := dvd
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : CommSemiring R
p q : R[X]
n : ℕ
dvd : q ^ n ∣ p
⊢ q ^ (n - 1) ∣ derivative p
state_after: case intro
R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : CommSemiring R
q : R[X]
n : ℕ
r : R[X]
⊢ q ^ (n - 1) ∣ derivative (q ^ n * r)

tactic: rw [derivative_mul, derivative_pow]
state_before: case intro
R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : CommSemiring R
q : R[X]
n : ℕ
r : R[X]
⊢ q ^ (n - 1) ∣ derivative (q ^ n * r)
state_after: case intro
R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : CommSemiring R
q : R[X]
n : ℕ
r : R[X]
⊢ q ^ (n - 1) ∣ C ↑n * q ^ (n - 1) * derivative q * r + q ^ n * derivative r

tactic: exact (((dvd_mul_left _ _).mul_right _).mul_right _).add ((pow_dvd_pow q n.pred_le).mul_right _)
state_before: case intro
R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : CommSemiring R
q : R[X]
n : ℕ
r : R[X]
⊢ q ^ (n - 1) ∣ C ↑n * q ^ (n - 1) * derivative q * r + q ^ n * derivative r
state_after: no goals
Theorem: Polynomial.coeff_C_mul
File: Mathlib/Algebra/Polynomial/Coeff.lean

tactic: rcases p with ⟨p⟩
state_before: R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
⊢ (C a * p).coeff n = a * p.coeff n
state_after: case ofFinsupp
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p✝ q r : R[X]
p : R[ℕ]
⊢ (C a * { toFinsupp := p }).coeff n = a * { toFinsupp := p }.coeff n

tactic: simp_rw [← monomial_zero_left, ← ofFinsupp_single, ← ofFinsupp_mul, coeff]
state_before: case ofFinsupp
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p✝ q r : R[X]
p : R[ℕ]
⊢ (C a * { toFinsupp := p }).coeff n = a * { toFinsupp := p }.coeff n
state_after: case ofFinsupp
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p✝ q r : R[X]
p : R[ℕ]
⊢ (Finsupp.single 0 a * p) n = a * p n

tactic: exact AddMonoidAlgebra.single_zero_mul_apply p a n
state_before: case ofFinsupp
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p✝ q r : R[X]
p : R[ℕ]
⊢ (Finsupp.single 0 a * p) n = a * p n
state_after: no goals
Theorem: birkhoffAverage_zero
File: Mathlib/Dynamics/BirkhoffSum/Average.lean

tactic: simp [birkhoffAverage]
state_before: R : Type u_1
α : Type u_2
M : Type u_3
inst✝² : DivisionSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f : α → α
g : α → M
x : α
⊢ birkhoffAverage R f g 0 x = 0
state_after: no goals
Theorem: Fintype.card_compl_set
File: Mathlib/Data/Fintype/Card.lean

tactic: classical rw [← Set.toFinset_card, ← Set.toFinset_card, ← Finset.card_compl, Set.toFinset_compl]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : Fintype α
s : Set α
inst✝¹ : Fintype ↑s
inst✝ : Fintype ↑sᶜ
⊢ card ↑sᶜ = card α - card ↑s
state_after: no goals

tactic: rw [← Set.toFinset_card, ← Set.toFinset_card, ← Finset.card_compl, Set.toFinset_compl]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : Fintype α
s : Set α
inst✝¹ : Fintype ↑s
inst✝ : Fintype ↑sᶜ
⊢ card ↑sᶜ = card α - card ↑s
state_after: no goals
Theorem: Finset.image_some_eraseNone
File: Mathlib/Data/Finset/Option.lean

tactic: ext (_ | x) <;> simp
state_before: α : Type u_1
β : Type u_2
inst✝ : DecidableEq (Option α)
s : Finset (Option α)
⊢ image some (eraseNone s) = s.erase none
state_after: no goals
Theorem: WType.elim_injective
File: Mathlib/Data/W/Basic.lean

tactic: obtain ⟨rfl, h⟩ := Sigma.mk.inj_iff.mp (fγ_injective h)
state_before: α : Type u_1
β : α → Type u_2
γ : Type u_3
fγ : (a : α) × (β a → γ) → γ
fγ_injective : Function.Injective fγ
a₁ : α
f₁ : β a₁ → WType β
a₂ : α
f₂ : β a₂ → WType β
h : elim γ fγ (mk a₁ f₁) = elim γ fγ (mk a₂ f₂)
⊢ mk a₁ f₁ = mk a₂ f₂
state_after: case intro
α : Type u_1
β : α → Type u_2
γ : Type u_3
fγ : (a : α) × (β a → γ) → γ
fγ_injective : Function.Injective fγ
a₁ : α
f₁ f₂ : β a₁ → WType β
h✝ : elim γ fγ (mk a₁ f₁) = elim γ fγ (mk a₁ f₂)
h : HEq (fun b => elim γ fγ (f₁ b)) fun b => elim γ fγ (f₂ b)
⊢ mk a₁ f₁ = mk a₁ f₂

tactic: congr with x
state_before: case intro
α : Type u_1
β : α → Type u_2
γ : Type u_3
fγ : (a : α) × (β a → γ) → γ
fγ_injective : Function.Injective fγ
a₁ : α
f₁ f₂ : β a₁ → WType β
h✝ : elim γ fγ (mk a₁ f₁) = elim γ fγ (mk a₁ f₂)
h : HEq (fun b => elim γ fγ (f₁ b)) fun b => elim γ fγ (f₂ b)
⊢ mk a₁ f₁ = mk a₁ f₂
state_after: case intro.e_f.h
α : Type u_1
β : α → Type u_2
γ : Type u_3
fγ : (a : α) × (β a → γ) → γ
fγ_injective : Function.Injective fγ
a₁ : α
f₁ f₂ : β a₁ → WType β
h✝ : elim γ fγ (mk a₁ f₁) = elim γ fγ (mk a₁ f₂)
h : HEq (fun b => elim γ fγ (f₁ b)) fun b => elim γ fγ (f₂ b)
x : β a₁
⊢ f₁ x = f₂ x

tactic: exact elim_injective γ fγ fγ_injective (congr_fun (eq_of_heq h) x : _)
state_before: case intro.e_f.h
α : Type u_1
β : α → Type u_2
γ : Type u_3
fγ : (a : α) × (β a → γ) → γ
fγ_injective : Function.Injective fγ
a₁ : α
f₁ f₂ : β a₁ → WType β
h✝ : elim γ fγ (mk a₁ f₁) = elim γ fγ (mk a₁ f₂)
h : HEq (fun b => elim γ fγ (f₁ b)) fun b => elim γ fγ (f₂ b)
x : β a₁
⊢ f₁ x = f₂ x
state_after: no goals
Theorem: MonotoneOn.integral_le_sum
File: Mathlib/Analysis/SumIntegralComparisons.lean

tactic: rw [← neg_le_neg_iff, ← Finset.sum_neg_distrib, ← intervalIntegral.integral_neg]
state_before: x₀ : ℝ
a b : ℕ
f : ℝ → ℝ
hf : MonotoneOn f (Icc x₀ (x₀ + ↑a))
⊢ ∫ (x : ℝ) in x₀..x₀ + ↑a, f x ≤ ∑ i ∈ Finset.range a, f (x₀ + ↑(i + 1))
state_after: x₀ : ℝ
a b : ℕ
f : ℝ → ℝ
hf : MonotoneOn f (Icc x₀ (x₀ + ↑a))
⊢ ∑ x ∈ Finset.range a, -f (x₀ + ↑(x + 1)) ≤ ∫ (x : ℝ) in x₀..x₀ + ↑a, -f x

tactic: exact hf.neg.sum_le_integral
state_before: x₀ : ℝ
a b : ℕ
f : ℝ → ℝ
hf : MonotoneOn f (Icc x₀ (x₀ + ↑a))
⊢ ∑ x ∈ Finset.range a, -f (x₀ + ↑(x + 1)) ≤ ∫ (x : ℝ) in x₀..x₀ + ↑a, -f x
state_after: no goals
Theorem: PowerSeries.trunc_derivativeFun
File: Mathlib/RingTheory/PowerSeries/Derivative.lean

tactic: ext d
state_before: R : Type u_1
inst✝ : CommSemiring R
f : R⟦X⟧
n : ℕ
⊢ trunc n f.derivativeFun = derivative (trunc (n + 1) f)
state_after: case a
R : Type u_1
inst✝ : CommSemiring R
f : R⟦X⟧
n d : ℕ
⊢ (trunc n f.derivativeFun).coeff d = (derivative (trunc (n + 1) f)).coeff d

tactic: rw [coeff_trunc]
state_before: case a
R : Type u_1
inst✝ : CommSemiring R
f : R⟦X⟧
n d : ℕ
⊢ (trunc n f.derivativeFun).coeff d = (derivative (trunc (n + 1) f)).coeff d
state_after: case a
R : Type u_1
inst✝ : CommSemiring R
f : R⟦X⟧
n d : ℕ
⊢ (if d < n then (coeff R d) f.derivativeFun else 0) = (derivative (trunc (n + 1) f)).coeff d

tactic: split_ifs with h
state_before: case a
R : Type u_1
inst✝ : CommSemiring R
f : R⟦X⟧
n d : ℕ
⊢ (if d < n then (coeff R d) f.derivativeFun else 0) = (derivative (trunc (n + 1) f)).coeff d
state_after: case pos
R : Type u_1
inst✝ : CommSemiring R
f : R⟦X⟧
n d : ℕ
h : d < n
⊢ (coeff R d) f.derivativeFun = (derivative (trunc (n + 1) f)).coeff d

case neg
R : Type u_1
inst✝ : CommSemiring R
f : R⟦X⟧
n d : ℕ
h : ¬d < n
⊢ 0 = (derivative (trunc (n + 1) f)).coeff d

tactic: have : d + 1 < n + 1 := succ_lt_succ_iff.2 h
state_before: case pos
R : Type u_1
inst✝ : CommSemiring R
f : R⟦X⟧
n d : ℕ
h : d < n
⊢ (coeff R d) f.derivativeFun = (derivative (trunc (n + 1) f)).coeff d
state_after: case pos
R : Type u_1
inst✝ : CommSemiring R
f : R⟦X⟧
n d : ℕ
h : d < n
this : d + 1 < n + 1
⊢ (coeff R d) f.derivativeFun = (derivative (trunc (n + 1) f)).coeff d

tactic: rw [coeff_derivativeFun, coeff_derivative, coeff_trunc, if_pos this]
state_before: case pos
R : Type u_1
inst✝ : CommSemiring R
f : R⟦X⟧
n d : ℕ
h : d < n
this : d + 1 < n + 1
⊢ (coeff R d) f.derivativeFun = (derivative (trunc (n + 1) f)).coeff d
state_after: no goals

tactic: have : ¬d + 1 < n + 1 := by rwa [succ_lt_succ_iff]
state_before: case neg
R : Type u_1
inst✝ : CommSemiring R
f : R⟦X⟧
n d : ℕ
h : ¬d < n
⊢ 0 = (derivative (trunc (n + 1) f)).coeff d
state_after: case neg
R : Type u_1
inst✝ : CommSemiring R
f : R⟦X⟧
n d : ℕ
h : ¬d < n
this : ¬d + 1 < n + 1
⊢ 0 = (derivative (trunc (n + 1) f)).coeff d

tactic: rw [coeff_derivative, coeff_trunc, if_neg this, zero_mul]
state_before: case neg
R : Type u_1
inst✝ : CommSemiring R
f : R⟦X⟧
n d : ℕ
h : ¬d < n
this : ¬d + 1 < n + 1
⊢ 0 = (derivative (trunc (n + 1) f)).coeff d
state_after: no goals

tactic: rwa [succ_lt_succ_iff]
state_before: R : Type u_1
inst✝ : CommSemiring R
f : R⟦X⟧
n d : ℕ
h : ¬d < n
⊢ ¬d + 1 < n + 1
state_after: no goals
Theorem: Multiset.prod_nonneg
File: Mathlib/Algebra/Order/BigOperators/Ring/Multiset.lean

tactic: revert h
state_before: R : Type u_1
inst✝ : OrderedCommSemiring R
s : Multiset R
h : ∀ a ∈ s, 0 ≤ a
⊢ 0 ≤ s.prod
state_after: R : Type u_1
inst✝ : OrderedCommSemiring R
s : Multiset R
⊢ (∀ a ∈ s, 0 ≤ a) → 0 ≤ s.prod

tactic: refine s.induction_on ?_ fun a s hs ih ↦ ?_
state_before: R : Type u_1
inst✝ : OrderedCommSemiring R
s : Multiset R
⊢ (∀ a ∈ s, 0 ≤ a) → 0 ≤ s.prod
state_after: case refine_1
R : Type u_1
inst✝ : OrderedCommSemiring R
s : Multiset R
⊢ (∀ a ∈ 0, 0 ≤ a) → 0 ≤ prod 0

case refine_2
R : Type u_1
inst✝ : OrderedCommSemiring R
s✝ : Multiset R
a : R
s : Multiset R
hs : (∀ a ∈ s, 0 ≤ a) → 0 ≤ s.prod
ih : ∀ a_1 ∈ a ::ₘ s, 0 ≤ a_1
⊢ 0 ≤ (a ::ₘ s).prod

tactic: simp
state_before: case refine_1
R : Type u_1
inst✝ : OrderedCommSemiring R
s : Multiset R
⊢ (∀ a ∈ 0, 0 ≤ a) → 0 ≤ prod 0
state_after: no goals

tactic: rw [prod_cons]
state_before: case refine_2
R : Type u_1
inst✝ : OrderedCommSemiring R
s✝ : Multiset R
a : R
s : Multiset R
hs : (∀ a ∈ s, 0 ≤ a) → 0 ≤ s.prod
ih : ∀ a_1 ∈ a ::ₘ s, 0 ≤ a_1
⊢ 0 ≤ (a ::ₘ s).prod
state_after: case refine_2
R : Type u_1
inst✝ : OrderedCommSemiring R
s✝ : Multiset R
a : R
s : Multiset R
hs : (∀ a ∈ s, 0 ≤ a) → 0 ≤ s.prod
ih : ∀ a_1 ∈ a ::ₘ s, 0 ≤ a_1
⊢ 0 ≤ a * s.prod

tactic: exact mul_nonneg (ih _ <| mem_cons_self _ _) (hs fun a ha ↦ ih _ <| mem_cons_of_mem ha)
state_before: case refine_2
R : Type u_1
inst✝ : OrderedCommSemiring R
s✝ : Multiset R
a : R
s : Multiset R
hs : (∀ a ∈ s, 0 ≤ a) → 0 ≤ s.prod
ih : ∀ a_1 ∈ a ::ₘ s, 0 ≤ a_1
⊢ 0 ≤ a * s.prod
state_after: no goals
Theorem: inner_eq_one_iff_of_norm_one
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: convert inner_eq_norm_mul_iff (𝕜 := 𝕜) (E := E) using 2 <;> simp [hx, hy]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : _root_.RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
x y : E
hx : ‖x‖ = 1
hy : ‖y‖ = 1
⊢ ⟪x, y⟫_𝕜 = 1 ↔ x = y
state_after: no goals
Theorem: LinearEquiv.toLinearEquiv_toContinuousLinearEquiv_symm
File: Mathlib/Topology/Algebra/Module/FiniteDimension.lean

tactic: ext x
state_before: 𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝¹⁸ : AddCommGroup E
inst✝¹⁷ : Module 𝕜 E
inst✝¹⁶ : TopologicalSpace E
inst✝¹⁵ : TopologicalAddGroup E
inst✝¹⁴ : ContinuousSMul 𝕜 E
F : Type w
inst✝¹³ : AddCommGroup F
inst✝¹² : Module 𝕜 F
inst✝¹¹ : TopologicalSpace F
inst✝¹⁰ : TopologicalAddGroup F
inst✝⁹ : ContinuousSMul 𝕜 F
F' : Type x
inst✝⁸ : AddCommGroup F'
inst✝⁷ : Module 𝕜 F'
inst✝⁶ : TopologicalSpace F'
inst✝⁵ : TopologicalAddGroup F'
inst✝⁴ : ContinuousSMul 𝕜 F'
inst✝³ : CompleteSpace 𝕜
inst✝² : T2Space E
inst✝¹ : T2Space F
inst✝ : FiniteDimensional 𝕜 E
e : E ≃ₗ[𝕜] F
⊢ e.toContinuousLinearEquiv.symm.toLinearEquiv = e.symm
state_after: case h
𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝¹⁸ : AddCommGroup E
inst✝¹⁷ : Module 𝕜 E
inst✝¹⁶ : TopologicalSpace E
inst✝¹⁵ : TopologicalAddGroup E
inst✝¹⁴ : ContinuousSMul 𝕜 E
F : Type w
inst✝¹³ : AddCommGroup F
inst✝¹² : Module 𝕜 F
inst✝¹¹ : TopologicalSpace F
inst✝¹⁰ : TopologicalAddGroup F
inst✝⁹ : ContinuousSMul 𝕜 F
F' : Type x
inst✝⁸ : AddCommGroup F'
inst✝⁷ : Module 𝕜 F'
inst✝⁶ : TopologicalSpace F'
inst✝⁵ : TopologicalAddGroup F'
inst✝⁴ : ContinuousSMul 𝕜 F'
inst✝³ : CompleteSpace 𝕜
inst✝² : T2Space E
inst✝¹ : T2Space F
inst✝ : FiniteDimensional 𝕜 E
e : E ≃ₗ[𝕜] F
x : F
⊢ e.toContinuousLinearEquiv.symm.toLinearEquiv x = e.symm x

tactic: rfl
state_before: case h
𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝¹⁸ : AddCommGroup E
inst✝¹⁷ : Module 𝕜 E
inst✝¹⁶ : TopologicalSpace E
inst✝¹⁵ : TopologicalAddGroup E
inst✝¹⁴ : ContinuousSMul 𝕜 E
F : Type w
inst✝¹³ : AddCommGroup F
inst✝¹² : Module 𝕜 F
inst✝¹¹ : TopologicalSpace F
inst✝¹⁰ : TopologicalAddGroup F
inst✝⁹ : ContinuousSMul 𝕜 F
F' : Type x
inst✝⁸ : AddCommGroup F'
inst✝⁷ : Module 𝕜 F'
inst✝⁶ : TopologicalSpace F'
inst✝⁵ : TopologicalAddGroup F'
inst✝⁴ : ContinuousSMul 𝕜 F'
inst✝³ : CompleteSpace 𝕜
inst✝² : T2Space E
inst✝¹ : T2Space F
inst✝ : FiniteDimensional 𝕜 E
e : E ≃ₗ[𝕜] F
x : F
⊢ e.toContinuousLinearEquiv.symm.toLinearEquiv x = e.symm x
state_after: no goals
Theorem: Set.multiset_prod_mem_multiset_prod
File: Mathlib/Data/Set/Pointwise/BigOperators.lean

tactic: induction t using Quotient.inductionOn
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
F : Type u_4
inst✝³ : FunLike F α β
inst✝² : CommMonoid α
inst✝¹ : CommMonoid β
inst✝ : MonoidHomClass F α β
t : Multiset ι
f : ι → Set α
g : ι → α
hg : ∀ i ∈ t, g i ∈ f i
⊢ (Multiset.map g t).prod ∈ (Multiset.map f t).prod
state_after: case h
ι : Type u_1
α : Type u_2
β : Type u_3
F : Type u_4
inst✝³ : FunLike F α β
inst✝² : CommMonoid α
inst✝¹ : CommMonoid β
inst✝ : MonoidHomClass F α β
f : ι → Set α
g : ι → α
a✝ : List ι
hg : ∀ i ∈ ⟦a✝⟧, g i ∈ f i
⊢ (Multiset.map g ⟦a✝⟧).prod ∈ (Multiset.map f ⟦a✝⟧).prod

tactic: simp_rw [Multiset.quot_mk_to_coe, Multiset.map_coe, Multiset.prod_coe]
state_before: case h
ι : Type u_1
α : Type u_2
β : Type u_3
F : Type u_4
inst✝³ : FunLike F α β
inst✝² : CommMonoid α
inst✝¹ : CommMonoid β
inst✝ : MonoidHomClass F α β
f : ι → Set α
g : ι → α
a✝ : List ι
hg : ∀ i ∈ ⟦a✝⟧, g i ∈ f i
⊢ (Multiset.map g ⟦a✝⟧).prod ∈ (Multiset.map f ⟦a✝⟧).prod
state_after: case h
ι : Type u_1
α : Type u_2
β : Type u_3
F : Type u_4
inst✝³ : FunLike F α β
inst✝² : CommMonoid α
inst✝¹ : CommMonoid β
inst✝ : MonoidHomClass F α β
f : ι → Set α
g : ι → α
a✝ : List ι
hg : ∀ i ∈ ⟦a✝⟧, g i ∈ f i
⊢ (List.map g a✝).prod ∈ (List.map f a✝).prod

tactic: exact list_prod_mem_list_prod _ _ _ hg
state_before: case h
ι : Type u_1
α : Type u_2
β : Type u_3
F : Type u_4
inst✝³ : FunLike F α β
inst✝² : CommMonoid α
inst✝¹ : CommMonoid β
inst✝ : MonoidHomClass F α β
f : ι → Set α
g : ι → α
a✝ : List ι
hg : ∀ i ∈ ⟦a✝⟧, g i ∈ f i
⊢ (List.map g a✝).prod ∈ (List.map f a✝).prod
state_after: no goals