ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: CategoryTheory.Limits.Cocones.cocone_iso_of_hom_iso
File: Mathlib/CategoryTheory/Limits/Cones.lean

Proof steps:
state_before: J : Type u₁
inst✝³ : Category.{v₁, u₁} J
K✝ : Type u₂
inst✝² : Category.{v₂, u₂} K✝
C : Type u₃
inst✝¹ : Category.{v₃, u₃} C
D : Type u₄
inst✝ : Category.{v₄, u₄} D
F K : J ⥤ C
c d : Cocone K
f : c ⟶ d
i : IsIso f.hom
⊢ f ≫ { hom := inv f.hom, w := ⋯ } = 𝟙 c ∧ { hom := inv f.hom, w := ⋯ } ≫ f = 𝟙 d
state_after: no goals
tactic: aesop_cat
Theorem: Nat.cast_factorial
File: Mathlib/Data/Nat/Factorial/Cast.lean

Proof steps:
state_before: S : Type u_1
inst✝ : Semiring S
a b : ℕ
⊢ ↑a ! = Polynomial.eval 1 (ascPochhammer S a)
state_after: no goals
tactic: rw [← one_ascFactorial, cast_ascFactorial, cast_one]
Theorem: MeasureTheory.eLpNorm_zero'
File: Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean

Proof steps:
state_before: α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
⊢ eLpNorm (fun x => 0) p μ = 0
state_after: no goals
tactic: convert eLpNorm_zero (F := F)
Theorem: PNat.Coprime.gcd_mul_right_cancel_right
File: Mathlib/Data/PNat/Prime.lean

Proof steps:
state_before: m n k : ℕ+
⊢ k.Coprime m → m.gcd (n * k) = m.gcd n
state_after: m n k : ℕ+
⊢ k.Coprime m → m.gcd (k * n) = m.gcd n
tactic: rw [mul_comm]
state_before: m n k : ℕ+
⊢ k.Coprime m → m.gcd (k * n) = m.gcd n
state_after: no goals
tactic: apply Coprime.gcd_mul_left_cancel_right
Theorem: List.getElem_permutations'Aux
File: Mathlib/Data/List/Perm.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a : α
s : List α
x : α
n : ℕ
hn : n < (permutations'Aux x s).length
⊢ (permutations'Aux x s)[n] = insertNth n x s
state_after: case nil
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a x : α
n : ℕ
hn : n < (permutations'Aux x []).length
⊢ (permutations'Aux x [])[n] = insertNth n x []

case cons
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a x y : α
s : List α
IH : ∀ (n : ℕ) (hn : n < (permutations'Aux x s).length), (permutations'Aux x s)[n] = insertNth n x s
n : ℕ
hn : n < (permutations'Aux x (y :: s)).length
⊢ (permutations'Aux x (y :: s))[n] = insertNth n x (y :: s)
tactic: induction' s with y s IH generalizing n
Theorem: ZFSet.eq_empty_or_nonempty
File: Mathlib/SetTheory/ZFC/Basic.lean

Proof steps:
state_before: u : ZFSet
⊢ u = ∅ ∨ u.Nonempty
state_after: u : ZFSet
⊢ (¬∃ x, x ∈ u) ∨ u.Nonempty
tactic: rw [eq_empty, ← not_exists]
state_before: u : ZFSet
⊢ (¬∃ x, x ∈ u) ∨ u.Nonempty
state_after: no goals
tactic: apply em'
Theorem: CoxeterSystem.isRightInversion_simple_iff_isRightDescent
File: Mathlib/GroupTheory/Coxeter/Inversion.lean

Proof steps:
state_before: B : Type u_1
W : Type u_2
inst✝ : Group W
M : CoxeterMatrix B
cs : CoxeterSystem M W
w : W
i : B
⊢ cs.IsRightInversion w (cs.simple i) ↔ cs.IsRightDescent w i
state_after: no goals
tactic: simp [IsRightInversion, IsRightDescent, cs.isReflection_simple i]
Theorem: Complex.normSq_eq_conj_mul_self
File: Mathlib/Data/Complex/Basic.lean

Proof steps:
state_before: z : ℂ
⊢ ↑(normSq z) = (starRingEnd ℂ) z * z
state_after: no goals
tactic: ext <;> simp [normSq, mul_comm, ofReal']
Theorem: Polynomial.map_dvd_map
File: Mathlib/Algebra/Polynomial/Div.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝¹ : Ring R
p q : R[X]
inst✝ : Ring S
f : R →+* S
hf : Function.Injective ⇑f
x y : R[X]
hx : x.Monic
⊢ map f x ∣ map f y ↔ x ∣ y
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝¹ : Ring R
p q : R[X]
inst✝ : Ring S
f : R →+* S
hf : Function.Injective ⇑f
x y : R[X]
hx : x.Monic
⊢ map f (y %ₘ x) = 0 ↔ y %ₘ x = 0
tactic: rw [← modByMonic_eq_zero_iff_dvd hx, ← modByMonic_eq_zero_iff_dvd (hx.map f), ←
    map_modByMonic f hx]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝¹ : Ring R
p q : R[X]
inst✝ : Ring S
f : R →+* S
hf : Function.Injective ⇑f
x y : R[X]
hx : x.Monic
⊢ map f (y %ₘ x) = 0 ↔ y %ₘ x = 0
state_after: no goals
tactic: exact
    ⟨fun H => map_injective f hf <| by rw [H, Polynomial.map_zero], fun H => by
      rw [H, Polynomial.map_zero]⟩
Theorem: Nat.ofDigits_eq_sum_mapIdx
File: Mathlib/Data/Nat/Digits.lean

Proof steps:
state_before: n b : ℕ
L : List ℕ
⊢ ofDigits b L = (List.mapIdx (fun i a => a * b ^ i) L).sum
state_after: n b : ℕ
L : List ℕ
⊢ List.foldr (fun x y => ↑x + b * y) 0 L = (List.zipWith (fun i a => a * b ^ i) (List.range L.length) L).sum
tactic: rw [List.mapIdx_eq_enum_map, List.enum_eq_zip_range, List.map_uncurry_zip_eq_zipWith,
    ofDigits_eq_foldr]
state_before: n b : ℕ
L : List ℕ
⊢ List.foldr (fun x y => ↑x + b * y) 0 L = (List.zipWith (fun i a => a * b ^ i) (List.range L.length) L).sum
state_after: case nil
n b : ℕ
⊢ List.foldr (fun x y => ↑x + b * y) 0 [] = (List.zipWith (fun i a => a * b ^ i) (List.range [].length) []).sum

case cons
n b hd : ℕ
tl : List ℕ
hl : List.foldr (fun x y => ↑x + b * y) 0 tl = (List.zipWith (fun i a => a * b ^ i) (List.range tl.length) tl).sum
⊢ List.foldr (fun x y => ↑x + b * y) 0 (hd :: tl) =
    (List.zipWith (fun i a => a * b ^ i) (List.range (hd :: tl).length) (hd :: tl)).sum
tactic: induction' L with hd tl hl
Theorem: IsCompl.symmDiff_eq_top
File: Mathlib/Order/SymmDiff.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : CoheytingAlgebra α
a✝ a b : α
h : IsCompl a b
⊢ a ∆ b = ⊤
state_after: no goals
tactic: rw [h.eq_hnot, hnot_symmDiff_self]
Theorem: CliffordAlgebraComplex.ofComplex_conj
File: Mathlib/LinearAlgebra/CliffordAlgebra/Equivs.lean

Proof steps:
state_before: c : ℂ
⊢ CliffordAlgebraComplex.equiv (ofComplex ((starRingEnd ℂ) c)) = CliffordAlgebraComplex.equiv (involute (ofComplex c))
state_after: no goals
tactic: rw [equiv_apply, equiv_apply, toComplex_involute, toComplex_ofComplex, toComplex_ofComplex]
Theorem: Nat.div_mul_div_comm
File: Mathlib/Data/Nat/Defs.lean

Proof steps:
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
⊢ b ∣ a → d ∣ c → a / b * (c / d) = a * c / (b * d)
state_after: case intro.intro
b d m n k : ℕ
p q : ℕ → Prop
x y : ℕ
⊢ b * x / b * (d * y / d) = b * x * (d * y) / (b * d)
tactic: rintro ⟨x, rfl⟩ ⟨y, rfl⟩
state_before: case intro.intro
b d m n k : ℕ
p q : ℕ → Prop
x y : ℕ
⊢ b * x / b * (d * y / d) = b * x * (d * y) / (b * d)
state_after: case intro.intro.inl
d m n k : ℕ
p q : ℕ → Prop
x y : ℕ
⊢ 0 * x / 0 * (d * y / d) = 0 * x * (d * y) / (0 * d)

case intro.intro.inr
b d m n k : ℕ
p q : ℕ → Prop
x y : ℕ
hb : b > 0
⊢ b * x / b * (d * y / d) = b * x * (d * y) / (b * d)
tactic: obtain rfl | hb := b.eq_zero_or_pos
state_before: case intro.intro.inr
b d m n k : ℕ
p q : ℕ → Prop
x y : ℕ
hb : b > 0
⊢ b * x / b * (d * y / d) = b * x * (d * y) / (b * d)
state_after: case intro.intro.inr.inl
b m n k : ℕ
p q : ℕ → Prop
x y : ℕ
hb : b > 0
⊢ b * x / b * (0 * y / 0) = b * x * (0 * y) / (b * 0)

case intro.intro.inr.inr
b d m n k : ℕ
p q : ℕ → Prop
x y : ℕ
hb : b > 0
hd : d > 0
⊢ b * x / b * (d * y / d) = b * x * (d * y) / (b * d)
tactic: obtain rfl | hd := d.eq_zero_or_pos
state_before: case intro.intro.inr.inr
b d m n k : ℕ
p q : ℕ → Prop
x y : ℕ
hb : b > 0
hd : d > 0
⊢ b * x / b * (d * y / d) = b * x * (d * y) / (b * d)
state_after: no goals
tactic: rw [Nat.mul_div_cancel_left _ hb, Nat.mul_div_cancel_left _ hd, Nat.mul_assoc b,
    Nat.mul_left_comm x, ← Nat.mul_assoc b, Nat.mul_div_cancel_left _ (Nat.mul_pos hb hd)]
Theorem: Real.Angle.cos_eq_real_cos_iff_eq_or_eq_neg
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

Proof steps:
state_before: θ : Angle
ψ : ℝ
⊢ θ.cos = Real.cos ψ ↔ θ = ↑ψ ∨ θ = -↑ψ
state_after: case h
ψ x✝ : ℝ
⊢ (↑x✝).cos = Real.cos ψ ↔ ↑x✝ = ↑ψ ∨ ↑x✝ = -↑ψ
tactic: induction θ using Real.Angle.induction_on
state_before: case h
ψ x✝ : ℝ
⊢ (↑x✝).cos = Real.cos ψ ↔ ↑x✝ = ↑ψ ∨ ↑x✝ = -↑ψ
state_after: no goals
tactic: exact cos_eq_iff_coe_eq_or_eq_neg
Theorem: ENNReal.hasSum_lt
File: Mathlib/Topology/Instances/ENNReal.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → ℝ≥0∞
sf sg : ℝ≥0∞
i : α
h : ∀ (a : α), f a ≤ g a
hi : f i < g i
hsf : sf ≠ ⊤
hf : HasSum f sf
hg : HasSum g sg
⊢ sf < sg
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → ℝ≥0∞
sf sg : ℝ≥0∞
i : α
h : ∀ (a : α), f a ≤ g a
hi : f i < g i
hsf : sf ≠ ⊤
hf : HasSum f sf
hg : HasSum g sg
hsg : sg = ⊤
⊢ sf < sg

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → ℝ≥0∞
sf sg : ℝ≥0∞
i : α
h : ∀ (a : α), f a ≤ g a
hi : f i < g i
hsf : sf ≠ ⊤
hf : HasSum f sf
hg : HasSum g sg
hsg : ¬sg = ⊤
⊢ sf < sg
tactic: by_cases hsg : sg = ∞
Theorem: Finsupp.counit_comp_lsingle
File: Mathlib/RingTheory/Coalgebra/Basic.lean

Proof steps:
state_before: R : Type u
ι : Type v
A : Type w
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid A
inst✝¹ : Module R A
inst✝ : Coalgebra R A
i : ι
⊢ counit ∘ₗ lsingle i = counit
state_after: case h
R : Type u
ι : Type v
A : Type w
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid A
inst✝¹ : Module R A
inst✝ : Coalgebra R A
i : ι
x✝ : A
⊢ (counit ∘ₗ lsingle i) x✝ = counit x✝
tactic: ext
state_before: case h
R : Type u
ι : Type v
A : Type w
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid A
inst✝¹ : Module R A
inst✝ : Coalgebra R A
i : ι
x✝ : A
⊢ (counit ∘ₗ lsingle i) x✝ = counit x✝
state_after: no goals
tactic: simp
Theorem: Finset.Ici_eq_cons_Ioi
File: Mathlib/Order/Interval/Finset/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrderTop α
a : α
⊢ Ici a = cons a (Ioi a) ⋯
state_after: no goals
tactic: classical rw [cons_eq_insert, Ioi_insert]
Theorem: CategoryTheory.ShiftedHom.neg_comp
File: Mathlib/CategoryTheory/Shift/ShiftedHom.lean

Proof steps:
state_before: C : Type u_1
inst✝⁷ : Category.{u_5, u_1} C
D : Type u_2
inst✝⁶ : Category.{?u.45870, u_2} D
E : Type u_3
inst✝⁵ : Category.{?u.45877, u_3} E
M : Type u_4
inst✝⁴ : AddMonoid M
inst✝³ : HasShift C M
inst✝² : HasShift D M
inst✝¹ : HasShift E M
X Y Z T : C
inst✝ : Preadditive C
a b c : M
α : ShiftedHom X Y a
β : ShiftedHom Y Z b
h : b + a = c
⊢ (-α).comp β h = -α.comp β h
state_after: no goals
tactic: rw [comp, comp, Preadditive.neg_comp]
Theorem: AddMonoidHom.toRatLinearMap_injective
File: Mathlib/Algebra/Module/LinearMap/Rat.lean

Proof steps:
state_before: M : Type u_1
M₂ : Type u_2
inst✝³ : AddCommGroup M
inst✝² : Module ℚ M
inst✝¹ : AddCommGroup M₂
inst✝ : Module ℚ M₂
⊢ Injective toRatLinearMap
state_after: M : Type u_1
M₂ : Type u_2
inst✝³ : AddCommGroup M
inst✝² : Module ℚ M
inst✝¹ : AddCommGroup M₂
inst✝ : Module ℚ M₂
f g : M →+ M₂
h : f.toRatLinearMap = g.toRatLinearMap
⊢ f = g
tactic: intro f g h
state_before: M : Type u_1
M₂ : Type u_2
inst✝³ : AddCommGroup M
inst✝² : Module ℚ M
inst✝¹ : AddCommGroup M₂
inst✝ : Module ℚ M₂
f g : M →+ M₂
h : f.toRatLinearMap = g.toRatLinearMap
⊢ f = g
state_after: case h
M : Type u_1
M₂ : Type u_2
inst✝³ : AddCommGroup M
inst✝² : Module ℚ M
inst✝¹ : AddCommGroup M₂
inst✝ : Module ℚ M₂
f g : M →+ M₂
h : f.toRatLinearMap = g.toRatLinearMap
x : M
⊢ f x = g x
tactic: ext x
state_before: case h
M : Type u_1
M₂ : Type u_2
inst✝³ : AddCommGroup M
inst✝² : Module ℚ M
inst✝¹ : AddCommGroup M₂
inst✝ : Module ℚ M₂
f g : M →+ M₂
h : f.toRatLinearMap = g.toRatLinearMap
x : M
⊢ f x = g x
state_after: no goals
tactic: exact LinearMap.congr_fun h x
Theorem: List.map_pure_sublist_sublists
File: Mathlib/Data/List/Sublists.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
l : List α
⊢ map pure l <+ l.sublists
state_after: case nil
α : Type u
β : Type v
γ : Type w
⊢ [] <+ [].sublists

case append_singleton
α : Type u
β : Type v
γ : Type w
l : List α
a : α
ih : map pure l <+ l.sublists
⊢ map pure l ++ [pure a] <+ l.sublists ++ map (fun x => x ++ [a]) l.sublists
tactic: induction' l using reverseRecOn with l a ih <;> simp only [map, map_append, sublists_concat]
state_before: case append_singleton
α : Type u
β : Type v
γ : Type w
l : List α
a : α
ih : map pure l <+ l.sublists
⊢ map pure l ++ [pure a] <+ l.sublists ++ map (fun x => x ++ [a]) l.sublists
state_after: no goals
tactic: exact ((append_sublist_append_left _).2 <|
              singleton_sublist.2 <| mem_map.2 ⟨[], mem_sublists.2 (nil_sublist _), by rfl⟩).trans
          ((append_sublist_append_right _).2 ih)
Theorem: Filter.mem_top
File: Mathlib/Order/Filter/Basic.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f g : Filter α
s✝ t s : Set α
⊢ s ∈ ⊤ ↔ s = univ
state_after: no goals
tactic: rw [mem_top_iff_forall, eq_univ_iff_forall]
Theorem: Order.Ideal.IsProper.not_mem_of_compl_mem
File: Mathlib/Order/Ideal.lean

Proof steps:
state_before: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
hxc : xᶜ ∈ I
⊢ x ∉ I
state_after: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
hxc : xᶜ ∈ I
hx : x ∈ I
⊢ False
tactic: intro hx
state_before: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
hxc : xᶜ ∈ I
hx : x ∈ I
⊢ False
state_after: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
hxc : xᶜ ∈ I
hx : x ∈ I
⊢ ⊤ ∈ I
tactic: apply hI.top_not_mem
state_before: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
hxc : xᶜ ∈ I
hx : x ∈ I
⊢ ⊤ ∈ I
state_after: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
hxc : xᶜ ∈ I
hx : x ∈ I
ht : x ⊔ xᶜ ∈ I
⊢ ⊤ ∈ I
tactic: have ht : x ⊔ xᶜ ∈ I := sup_mem ‹_› ‹_›
state_before: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
hxc : xᶜ ∈ I
hx : x ∈ I
ht : x ⊔ xᶜ ∈ I
⊢ ⊤ ∈ I
state_after: no goals
tactic: rwa [sup_compl_eq_top] at ht
Theorem: MvPolynomial.eq_C_of_isEmpty
File: Mathlib/Algebra/MvPolynomial/Basic.lean

Proof steps:
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S₁
p✝ q : MvPolynomial σ R
inst✝ : IsEmpty σ
p : MvPolynomial σ R
⊢ p = C (coeff 0 p)
state_after: case intro
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S₁
p q : MvPolynomial σ R
inst✝ : IsEmpty σ
x : R
⊢ C x = C (coeff 0 (C x))
tactic: obtain ⟨x, rfl⟩ := C_surjective σ p
state_before: case intro
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S₁
p q : MvPolynomial σ R
inst✝ : IsEmpty σ
x : R
⊢ C x = C (coeff 0 (C x))
state_after: no goals
tactic: simp
Theorem: Order.isSuccLimit_toDual_iff
File: Mathlib/Order/SuccPred/Limit.lean

Proof steps:
state_before: α : Type u_1
inst✝ : LT α
a : α
⊢ IsSuccLimit (toDual a) ↔ IsPredLimit a
state_after: no goals
tactic: simp [IsSuccLimit, IsPredLimit]
Theorem: Nat.sInf_eq_zero
File: Mathlib/Data/Nat/Lattice.lean

Proof steps:
state_before: s : Set ℕ
⊢ sInf s = 0 ↔ 0 ∈ s ∨ s = ∅
state_after: no goals
tactic: cases eq_empty_or_nonempty s with
  | inl h => subst h
             simp only [or_true_iff, eq_self_iff_true, iff_true_iff, iInf, InfSet.sInf,
                        mem_empty_iff_false, exists_false, dif_neg, not_false_iff]
  | inr h => simp only [h.ne_empty, or_false_iff, Nat.sInf_def, h, Nat.find_eq_zero]
Theorem: PowerSeries.derivative.ext
File: Mathlib/RingTheory/PowerSeries/Derivative.lean

Proof steps:
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : NoZeroSMulDivisors ℕ R
f g : R⟦X⟧
hD : (d⁄dX R) f = (d⁄dX R) g
hc : (constantCoeff R) f = (constantCoeff R) g
⊢ f = g
state_after: case h
R : Type u_1
inst✝¹ : CommRing R
inst✝ : NoZeroSMulDivisors ℕ R
f g : R⟦X⟧
hD : (d⁄dX R) f = (d⁄dX R) g
hc : (constantCoeff R) f = (constantCoeff R) g
n : ℕ
⊢ (coeff R n) f = (coeff R n) g
tactic: ext n
state_before: case h
R : Type u_1
inst✝¹ : CommRing R
inst✝ : NoZeroSMulDivisors ℕ R
f g : R⟦X⟧
hD : (d⁄dX R) f = (d⁄dX R) g
hc : (constantCoeff R) f = (constantCoeff R) g
n : ℕ
⊢ (coeff R n) f = (coeff R n) g
state_after: no goals
tactic: cases n with
  | zero =>
    rw [coeff_zero_eq_constantCoeff, hc]
  | succ n =>
    have equ : coeff R n (d⁄dX R f) = coeff R n (d⁄dX R g) := by rw [hD]
    rwa [coeff_derivative, coeff_derivative, ← cast_succ, mul_comm, ← nsmul_eq_mul,
      mul_comm, ← nsmul_eq_mul, smul_right_inj n.succ_ne_zero] at equ
Theorem: Set.prod_insert
File: Mathlib/Data/Set/Prod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
⊢ s ×ˢ insert b t = (fun a => (a, b)) '' s ∪ s ×ˢ t
state_after: case h.mk
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
x : α
y : β
⊢ (x, y) ∈ s ×ˢ insert b t ↔ (x, y) ∈ (fun a => (a, b)) '' s ∪ s ×ˢ t
tactic: ext ⟨x, y⟩
state_before: case h.mk
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
x : α
y : β
⊢ (x, y) ∈ s ×ˢ insert b t ↔ (x, y) ∈ (fun a => (a, b)) '' s ∪ s ×ˢ t
state_after: case h.mk
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
x : α
y : β
⊢ x ∈ s ∧ (y = b ∨ y ∈ t) ↔ (∃ a ∈ s, a = x ∧ b = y) ∨ x ∈ s ∧ y ∈ t
tactic: simp only [mem_prod, mem_insert_iff, image, mem_union, mem_setOf_eq, Prod.mk.injEq]
state_before: case h.mk
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
x : α
y : β
⊢ x ∈ s ∧ (y = b ∨ y ∈ t) ↔ (∃ a ∈ s, a = x ∧ b = y) ∨ x ∈ s ∧ y ∈ t
state_after: case h.mk.refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
x : α
y : β
h : x ∈ s ∧ (y = b ∨ y ∈ t)
⊢ (∃ a ∈ s, a = x ∧ b = y) ∨ x ∈ s ∧ y ∈ t

case h.mk.refine_2
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
x : α
y : β
h : (∃ a ∈ s, a = x ∧ b = y) ∨ x ∈ s ∧ y ∈ t
⊢ x ∈ s ∧ (y = b ∨ y ∈ t)
tactic: refine ⟨fun h => ?_, fun h => ?_⟩
Theorem: CategoryTheory.StructuredArrow.map_comp
File: Mathlib/CategoryTheory/Comma/StructuredArrow.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
S S' S'' : D
Y Y' Y'' : C
T T' : C ⥤ D
f : S ⟶ S'
f' : S' ⟶ S''
h : StructuredArrow S'' T
⊢ (map (f ≫ f')).obj h = (map f).obj ((map f').obj h)
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
S S' S'' : D
Y Y' Y'' : C
T T' : C ⥤ D
f : S ⟶ S'
f' : S' ⟶ S''
h : StructuredArrow S'' T
⊢ (map (f ≫ f')).obj (mk h.hom) = (map f).obj ((map f').obj (mk h.hom))
tactic: rw [eq_mk h]
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
S S' S'' : D
Y Y' Y'' : C
T T' : C ⥤ D
f : S ⟶ S'
f' : S' ⟶ S''
h : StructuredArrow S'' T
⊢ (map (f ≫ f')).obj (mk h.hom) = (map f).obj ((map f').obj (mk h.hom))
state_after: no goals
tactic: simp
Theorem: differentiableOn_add_const_iff
File: Mathlib/Analysis/Calculus/FDeriv/Add.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_4
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type u_5
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
c : F
h : DifferentiableOn 𝕜 (fun y => f y + c) s
⊢ DifferentiableOn 𝕜 f s
state_after: no goals
tactic: simpa using h.add_const (-c)
Theorem: IsUpperSet.image
File: Mathlib/Order/UpperLower/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝¹ : Preorder α
inst✝ : Preorder β
s : Set α
p : α → Prop
a : α
hs : IsUpperSet s
f : α ≃o β
⊢ IsUpperSet (⇑f '' s)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝¹ : Preorder α
inst✝ : Preorder β
s : Set α
p : α → Prop
a : α
hs : IsUpperSet s
f : α ≃o β
⊢ IsUpperSet (⇑↑f '' s)
tactic: change IsUpperSet ((f : α ≃ β) '' s)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝¹ : Preorder α
inst✝ : Preorder β
s : Set α
p : α → Prop
a : α
hs : IsUpperSet s
f : α ≃o β
⊢ IsUpperSet (⇑↑f '' s)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝¹ : Preorder α
inst✝ : Preorder β
s : Set α
p : α → Prop
a : α
hs : IsUpperSet s
f : α ≃o β
⊢ IsUpperSet (⇑(↑f).symm ⁻¹' s)
tactic: rw [Set.image_equiv_eq_preimage_symm]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝¹ : Preorder α
inst✝ : Preorder β
s : Set α
p : α → Prop
a : α
hs : IsUpperSet s
f : α ≃o β
⊢ IsUpperSet (⇑(↑f).symm ⁻¹' s)
state_after: no goals
tactic: exact hs.preimage f.symm.monotone
Theorem: FormalMultilinearSeries.radius_prod_eq_min
File: Mathlib/Analysis/Analytic/Constructions.lean

Proof steps:
state_before: α : Type u_1
𝕜 : Type u_2
inst✝¹² : NontriviallyNormedField 𝕜
E : Type u_3
F : Type u_4
G : Type u_5
H : Type u_6
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace 𝕜 E
inst✝⁹ : NormedAddCommGroup F
inst✝⁸ : NormedSpace 𝕜 F
inst✝⁷ : NormedAddCommGroup G
inst✝⁶ : NormedSpace 𝕜 G
inst✝⁵ : NormedAddCommGroup H
inst✝⁴ : NormedSpace 𝕜 H
𝕝 : Type u_7
inst✝³ : NontriviallyNormedField 𝕝
inst✝² : NormedAlgebra 𝕜 𝕝
A : Type u_8
inst✝¹ : NormedRing A
inst✝ : NormedAlgebra 𝕜 A
p : FormalMultilinearSeries 𝕜 E F
q : FormalMultilinearSeries 𝕜 E G
⊢ (p.prod q).radius = min p.radius q.radius
state_after: case a
α : Type u_1
𝕜 : Type u_2
inst✝¹² : NontriviallyNormedField 𝕜
E : Type u_3
F : Type u_4
G : Type u_5
H : Type u_6
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace 𝕜 E
inst✝⁹ : NormedAddCommGroup F
inst✝⁸ : NormedSpace 𝕜 F
inst✝⁷ : NormedAddCommGroup G
inst✝⁶ : NormedSpace 𝕜 G
inst✝⁵ : NormedAddCommGroup H
inst✝⁴ : NormedSpace 𝕜 H
𝕝 : Type u_7
inst✝³ : NontriviallyNormedField 𝕝
inst✝² : NormedAlgebra 𝕜 𝕝
A : Type u_8
inst✝¹ : NormedRing A
inst✝ : NormedAlgebra 𝕜 A
p : FormalMultilinearSeries 𝕜 E F
q : FormalMultilinearSeries 𝕜 E G
⊢ (p.prod q).radius ≤ min p.radius q.radius

case a
α : Type u_1
𝕜 : Type u_2
inst✝¹² : NontriviallyNormedField 𝕜
E : Type u_3
F : Type u_4
G : Type u_5
H : Type u_6
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace 𝕜 E
inst✝⁹ : NormedAddCommGroup F
inst✝⁸ : NormedSpace 𝕜 F
inst✝⁷ : NormedAddCommGroup G
inst✝⁶ : NormedSpace 𝕜 G
inst✝⁵ : NormedAddCommGroup H
inst✝⁴ : NormedSpace 𝕜 H
𝕝 : Type u_7
inst✝³ : NontriviallyNormedField 𝕝
inst✝² : NormedAlgebra 𝕜 𝕝
A : Type u_8
inst✝¹ : NormedRing A
inst✝ : NormedAlgebra 𝕜 A
p : FormalMultilinearSeries 𝕜 E F
q : FormalMultilinearSeries 𝕜 E G
⊢ min p.radius q.radius ≤ (p.prod q).radius
tactic: apply le_antisymm