ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: LinearMap.finrank_range_dualMap_eq_finrank_range
File: Mathlib/LinearAlgebra/Dual.lean

Proof steps:
state_before: K : Type uK
inst✝⁴ : Field K
V₁ : Type uV₁
V₂ : Type uV₂
inst✝³ : AddCommGroup V₁
inst✝² : Module K V₁
inst✝¹ : AddCommGroup V₂
inst✝ : Module K V₂
f : V₁ →ₗ[K] V₂
⊢ finrank K ↥(range f.dualMap) = finrank K ↥(range f)
state_after: K : Type uK
inst✝⁴ : Field K
V₁ : Type uV₁
V₂ : Type uV₂
inst✝³ : AddCommGroup V₁
inst✝² : Module K V₁
inst✝¹ : AddCommGroup V₂
inst✝ : Module K V₂
f : V₁ →ₗ[K] V₂
⊢ Function.Injective ⇑f.rangeRestrict.dualMap
tactic: rw [congr_arg dualMap (show f = (range f).subtype.comp f.rangeRestrict by rfl),
    ← dualMap_comp_dualMap, range_comp,
    range_eq_top.mpr (dualMap_surjective_of_injective (range f).injective_subtype),
    Submodule.map_top, finrank_range_of_inj, Subspace.dual_finrank_eq]
state_before: K : Type uK
inst✝⁴ : Field K
V₁ : Type uV₁
V₂ : Type uV₂
inst✝³ : AddCommGroup V₁
inst✝² : Module K V₁
inst✝¹ : AddCommGroup V₂
inst✝ : Module K V₂
f : V₁ →ₗ[K] V₂
⊢ Function.Injective ⇑f.rangeRestrict.dualMap
state_after: no goals
tactic: exact dualMap_injective_of_surjective (range_eq_top.mp f.range_rangeRestrict)
Theorem: FrameHom.cancel_left
File: Mathlib/Order/Hom/CompleteLattice.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ι : Sort u_6
κ : ι → Sort u_7
inst✝⁴ : FunLike F α β
inst✝³ : CompleteLattice α
inst✝² : CompleteLattice β
inst✝¹ : CompleteLattice γ
inst✝ : CompleteLattice δ
g : FrameHom β γ
f₁ f₂ : FrameHom α β
hg : Injective ⇑g
h : g.comp f₁ = g.comp f₂
a : α
⊢ g (f₁ a) = g (f₂ a)
state_after: no goals
tactic: rw [← comp_apply, h, comp_apply]
Theorem: exists_countable_dense_bot_top
File: Mathlib/Topology/Bases.lean

Proof steps:
state_before: α : Type u_1
inst✝² : TopologicalSpace α
inst✝¹ : SeparableSpace α
inst✝ : PartialOrder α
⊢ ∃ s, s.Countable ∧ Dense s ∧ (∀ (x : α), IsBot x → x ∈ s) ∧ ∀ (x : α), IsTop x → x ∈ s
state_after: no goals
tactic: simpa using dense_univ.exists_countable_dense_subset_bot_top
Theorem: Finset.erase_union_of_mem
File: Mathlib/Data/Finset/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s✝ t u v : Finset α
a b : α
ha : a ∈ t
s : Finset α
⊢ s.erase a ∪ t = s ∪ t
state_after: no goals
tactic: rw [← insert_erase (mem_union_right s ha), erase_union_distrib, ← union_insert, insert_erase ha]
Theorem: CategoryTheory.DifferentialObject.shiftZero_hom_app_f
File: Mathlib/CategoryTheory/DifferentialObject.lean

Proof steps:
state_before: S : Type u_1
inst✝³ : AddCommGroupWithOne S
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
inst✝ : HasShift C S
⊢ shiftFunctor C 0 ≅ 𝟭 (DifferentialObject S C)
state_after: case refine_1
S : Type u_1
inst✝³ : AddCommGroupWithOne S
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
inst✝ : HasShift C S
X : DifferentialObject S C
⊢ ((shiftFunctor C 0).obj X).d ≫ (CategoryTheory.shiftFunctor C 1).map ((shiftFunctorZero C S).app X.obj).hom =
    ((shiftFunctorZero C S).app X.obj).hom ≫ ((𝟭 (DifferentialObject S C)).obj X).d

case refine_2
S : Type u_1
inst✝³ : AddCommGroupWithOne S
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
inst✝ : HasShift C S
X✝ Y✝ : DifferentialObject S C
f : X✝ ⟶ Y✝
⊢ (shiftFunctor C 0).map f ≫ ((fun X => mkIso ((shiftFunctorZero C S).app X.obj) ⋯) Y✝).hom =
    ((fun X => mkIso ((shiftFunctorZero C S).app X.obj) ⋯) X✝).hom ≫ (𝟭 (DifferentialObject S C)).map f
tactic: refine NatIso.ofComponents (fun X => mkIso ((shiftFunctorZero C S).app X.obj) ?_) (fun f => ?_)
Theorem: CategoryTheory.Limits.limit.pre_pre
File: Mathlib/CategoryTheory/Limits/HasLimits.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
F : J ⥤ C
inst✝² : HasLimit F
E : K ⥤ J
inst✝¹ : HasLimit (E ⋙ F)
L : Type u₃
inst✝ : Category.{v₃, u₃} L
D : L ⥤ K
h : HasLimit (D ⋙ E ⋙ F)
⊢ pre F E ≫ pre (E ⋙ F) D = pre F (D ⋙ E)
state_after: J : Type u₁
inst✝⁵ : Category.{v₁, u₁} J
K : Type u₂
inst✝⁴ : Category.{v₂, u₂} K
C : Type u
inst✝³ : Category.{v, u} C
F : J ⥤ C
inst✝² : HasLimit F
E : K ⥤ J
inst✝¹ : HasLimit (E ⋙ F)
L : Type u₃
inst✝ : Category.{v₃, u₃} L
D : L ⥤ K
h : HasLimit (D ⋙ E ⋙ F)
this : HasLimit ((D ⋙ E) ⋙ F)
⊢ pre F E ≫ pre (E ⋙ F) D = pre F (D ⋙ E)
tactic: haveI : HasLimit ((D ⋙ E) ⋙ F) := h
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
F : J ⥤ C
inst✝² : HasLimit F
E : K ⥤ J
inst✝¹ : HasLimit (E ⋙ F)
L : Type u₃
inst✝ : Category.{v₃, u₃} L
D : L ⥤ K
h : HasLimit (D ⋙ E ⋙ F)
this : HasLimit ((D ⋙ E) ⋙ F)
⊢ pre F E ≫ pre (E ⋙ F) D = pre F (D ⋙ E)
state_after: case w
J : Type u₁
inst✝⁵ : Category.{v₁, u₁} J
K : Type u₂
inst✝⁴ : Category.{v₂, u₂} K
C : Type u
inst✝³ : Category.{v, u} C
F : J ⥤ C
inst✝² : HasLimit F
E : K ⥤ J
inst✝¹ : HasLimit (E ⋙ F)
L : Type u₃
inst✝ : Category.{v₃, u₃} L
D : L ⥤ K
h : HasLimit (D ⋙ E ⋙ F)
this : HasLimit ((D ⋙ E) ⋙ F)
j : L
⊢ (pre F E ≫ pre (E ⋙ F) D) ≫ π (D ⋙ E ⋙ F) j = pre F (D ⋙ E) ≫ π (D ⋙ E ⋙ F) j
tactic: ext j
state_before: case w
J : Type u₁
inst✝⁵ : Category.{v₁, u₁} J
K : Type u₂
inst✝⁴ : Category.{v₂, u₂} K
C : Type u
inst✝³ : Category.{v, u} C
F : J ⥤ C
inst✝² : HasLimit F
E : K ⥤ J
inst✝¹ : HasLimit (E ⋙ F)
L : Type u₃
inst✝ : Category.{v₃, u₃} L
D : L ⥤ K
h : HasLimit (D ⋙ E ⋙ F)
this : HasLimit ((D ⋙ E) ⋙ F)
j : L
⊢ (pre F E ≫ pre (E ⋙ F) D) ≫ π (D ⋙ E ⋙ F) j = pre F (D ⋙ E) ≫ π (D ⋙ E ⋙ F) j
state_after: case w
J : Type u₁
inst✝⁵ : Category.{v₁, u₁} J
K : Type u₂
inst✝⁴ : Category.{v₂, u₂} K
C : Type u
inst✝³ : Category.{v, u} C
F : J ⥤ C
inst✝² : HasLimit F
E : K ⥤ J
inst✝¹ : HasLimit (E ⋙ F)
L : Type u₃
inst✝ : Category.{v₃, u₃} L
D : L ⥤ K
h : HasLimit (D ⋙ E ⋙ F)
this : HasLimit ((D ⋙ E) ⋙ F)
j : L
⊢ π F (E.obj (D.obj j)) = π F ((D ⋙ E).obj j)
tactic: erw [assoc, limit.pre_π, limit.pre_π, limit.pre_π]
state_before: case w
J : Type u₁
inst✝⁵ : Category.{v₁, u₁} J
K : Type u₂
inst✝⁴ : Category.{v₂, u₂} K
C : Type u
inst✝³ : Category.{v, u} C
F : J ⥤ C
inst✝² : HasLimit F
E : K ⥤ J
inst✝¹ : HasLimit (E ⋙ F)
L : Type u₃
inst✝ : Category.{v₃, u₃} L
D : L ⥤ K
h : HasLimit (D ⋙ E ⋙ F)
this : HasLimit ((D ⋙ E) ⋙ F)
j : L
⊢ π F (E.obj (D.obj j)) = π F ((D ⋙ E).obj j)
state_after: no goals
tactic: rfl
Theorem: intervalIntegral.continuousOn_primitive
File: Mathlib/MeasureTheory/Integral/DominatedConvergence.lean

Proof steps:
state_before: E : Type u_1
X : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : TopologicalSpace X
a b b₀ b₁ b₂ : ℝ
μ : Measure ℝ
f : ℝ → E
inst✝ : NoAtoms μ
h_int : IntegrableOn f (Icc a b) μ
⊢ ContinuousOn (fun x => ∫ (t : ℝ) in Ioc a x, f t ∂μ) (Icc a b)
state_after: case pos
E : Type u_1
X : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : TopologicalSpace X
a b b₀ b₁ b₂ : ℝ
μ : Measure ℝ
f : ℝ → E
inst✝ : NoAtoms μ
h_int : IntegrableOn f (Icc a b) μ
h : a ≤ b
⊢ ContinuousOn (fun x => ∫ (t : ℝ) in Ioc a x, f t ∂μ) (Icc a b)

case neg
E : Type u_1
X : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : TopologicalSpace X
a b b₀ b₁ b₂ : ℝ
μ : Measure ℝ
f : ℝ → E
inst✝ : NoAtoms μ
h_int : IntegrableOn f (Icc a b) μ
h : ¬a ≤ b
⊢ ContinuousOn (fun x => ∫ (t : ℝ) in Ioc a x, f t ∂μ) (Icc a b)
tactic: by_cases h : a ≤ b
Theorem: Finset.sum_sdiff
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

Proof steps:
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
h : s₁ ⊆ s₂
⊢ (∏ x ∈ s₂ \ s₁, f x) * ∏ x ∈ s₁, f x = ∏ x ∈ s₂, f x
state_after: no goals
tactic: rw [← prod_union sdiff_disjoint, sdiff_union_of_subset h]
Theorem: Set.union_iInter₂
File: Mathlib/Data/Set/Lattice.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
s : Set α
t : (i : ι) → κ i → Set α
⊢ s ∪ ⋂ i, ⋂ j, t i j = ⋂ i, ⋂ j, s ∪ t i j
state_after: no goals
tactic: simp_rw [union_iInter]
Theorem: EuclideanSpace.inner_single_right
File: Mathlib/Analysis/InnerProductSpace/PiL2.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
𝕜 : Type u_3
inst✝¹⁰ : _root_.RCLike 𝕜
E : Type u_4
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : InnerProductSpace 𝕜 E
E' : Type u_5
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
F : Type u_6
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace ℝ F
F' : Type u_7
inst✝³ : NormedAddCommGroup F'
inst✝² : InnerProductSpace ℝ F'
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
i : ι
a : 𝕜
v : EuclideanSpace 𝕜 ι
⊢ ⟪v, single i a⟫_𝕜 = a * (starRingEnd ((fun x => 𝕜) i)) (v i)
state_after: no goals
tactic: simp [apply_ite conj, mul_comm]
Theorem: Mathlib.Meta.NormNum.isInt_ediv_zero
File: Mathlib/Tactic/NormNum/DivMod.lean

Proof steps:
state_before: n✝ : ℤ
⊢ ↑n✝ / ↑0 = ↑0
state_after: no goals
tactic: simp [Int.ediv_zero]
Theorem: finrank_top
File: Mathlib/LinearAlgebra/Dimension/Finrank.lean

Proof steps:
state_before: R : Type u
M : Type v
N : Type w
inst✝⁴ : Ring R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
⊢ finrank R ↥⊤ = finrank R M
state_after: R : Type u
M : Type v
N : Type w
inst✝⁴ : Ring R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
⊢ toNat (Module.rank R ↥⊤) = toNat (Module.rank R M)
tactic: unfold finrank
state_before: R : Type u
M : Type v
N : Type w
inst✝⁴ : Ring R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
⊢ toNat (Module.rank R ↥⊤) = toNat (Module.rank R M)
state_after: no goals
tactic: simp [rank_top]
Theorem: mem_omegaLimit_iff_frequently₂
File: Mathlib/Dynamics/OmegaLimit.lean

Proof steps:
state_before: τ : Type u_1
α : Type u_2
β : Type u_3
ι : Type u_4
inst✝ : TopologicalSpace β
f : Filter τ
ϕ : τ → α → β
s s₁ s₂ : Set α
y : β
⊢ y ∈ ω f ϕ s ↔ ∀ n ∈ 𝓝 y, ∃ᶠ (t : τ) in f, (ϕ t '' s ∩ n).Nonempty
state_after: no goals
tactic: simp_rw [mem_omegaLimit_iff_frequently, image_inter_nonempty_iff]
Theorem: smul_floorDiv
File: Mathlib/Algebra/Order/Floor/Div.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝⁵ : OrderedSemiring α
inst✝⁴ : OrderedAddCommMonoid β
inst✝³ : MulActionWithZero α β
inst✝² : FloorDiv α β
a : α
inst✝¹ : PosSMulMono α β
inst✝ : PosSMulReflectLE α β
ha : 0 < a
b : β
⊢ ∀ (c : β), c ≤ a • b ⌊/⌋ a ↔ c ≤ b
state_after: no goals
tactic: simp [smul_le_smul_iff_of_pos_left, ha]
Theorem: Polynomial.aroots_X_sub_C
File: Mathlib/Algebra/Polynomial/Roots.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
p q : R[X]
inst✝³ : CommRing T
inst✝² : CommRing S
inst✝¹ : IsDomain S
inst✝ : Algebra T S
r : T
⊢ (X - C r).aroots S = {(algebraMap T S) r}
state_after: no goals
tactic: rw [aroots_def, Polynomial.map_sub, map_X, map_C, roots_X_sub_C]
Theorem: NonUnitalStarAlgHom.prodEquiv_apply
File: Mathlib/Algebra/Star/StarAlgHom.lean

Proof steps:
state_before: R : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
inst✝⁹ : Monoid R
inst✝⁸ : NonUnitalNonAssocSemiring A
inst✝⁷ : DistribMulAction R A
inst✝⁶ : Star A
inst✝⁵ : NonUnitalNonAssocSemiring B
inst✝⁴ : DistribMulAction R B
inst✝³ : Star B
inst✝² : NonUnitalNonAssocSemiring C
inst✝¹ : DistribMulAction R C
inst✝ : Star C
f : (A →⋆ₙₐ[R] B) × (A →⋆ₙₐ[R] C)
⊢ (fun f => ((fst R B C).comp f, (snd R B C).comp f)) ((fun f => f.1.prod f.2) f) = f
state_after: no goals
tactic: ext <;> rfl
state_before: R : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
inst✝⁹ : Monoid R
inst✝⁸ : NonUnitalNonAssocSemiring A
inst✝⁷ : DistribMulAction R A
inst✝⁶ : Star A
inst✝⁵ : NonUnitalNonAssocSemiring B
inst✝⁴ : DistribMulAction R B
inst✝³ : Star B
inst✝² : NonUnitalNonAssocSemiring C
inst✝¹ : DistribMulAction R C
inst✝ : Star C
f : A →⋆ₙₐ[R] B × C
⊢ (fun f => f.1.prod f.2) ((fun f => ((fst R B C).comp f, (snd R B C).comp f)) f) = f
state_after: no goals
tactic: ext <;> rfl
Theorem: dist_vadd_left
File: Mathlib/Analysis/Normed/Group/AddTorsor.lean

Proof steps:
state_before: α : Type u_1
V : Type u_2
P : Type u_3
W : Type u_4
Q : Type u_5
inst✝⁵ : SeminormedAddCommGroup V
inst✝⁴ : PseudoMetricSpace P
inst✝³ : NormedAddTorsor V P
inst✝² : NormedAddCommGroup W
inst✝¹ : MetricSpace Q
inst✝ : NormedAddTorsor W Q
v : V
x : P
⊢ dist (v +ᵥ x) x = ‖v‖
state_after: no goals
tactic: rw [dist_eq_norm_vsub V _ x, vadd_vsub]
Theorem: List.prod_range_div'
File: Mathlib/Algebra/BigOperators/Group/List.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
inst✝ : Group G
n : ℕ
f : ℕ → G
⊢ (map (fun k => f k / f (k + 1)) (range n)).prod = f 0 / f n
state_after: case zero
ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
inst✝ : Group G
f : ℕ → G
⊢ (map (fun k => f k / f (k + 1)) (range 0)).prod = f 0 / f 0

case succ
ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
inst✝ : Group G
f : ℕ → G
n : ℕ
h : (map (fun k => f k / f (k + 1)) (range n)).prod = f 0 / f n
⊢ (map (fun k => f k / f (k + 1)) (range (n + 1))).prod = f 0 / f (n + 1)
tactic: induction' n with n h
Theorem: Ideal.span_eq_top_iff_finite
File: Mathlib/RingTheory/Ideal/Basic.lean

Proof steps:
state_before: α : Type u
β : Type v
inst✝ : Semiring α
I : Ideal α
a b : α
s : Set α
⊢ span s = ⊤ ↔ ∃ s', ↑s' ⊆ s ∧ span ↑s' = ⊤
state_after: α : Type u
β : Type v
inst✝ : Semiring α
I : Ideal α
a b : α
s : Set α
⊢ 1 ∈ span s ↔ ∃ s', ↑s' ⊆ s ∧ 1 ∈ span ↑s'
tactic: simp_rw [eq_top_iff_one]
state_before: α : Type u
β : Type v
inst✝ : Semiring α
I : Ideal α
a b : α
s : Set α
⊢ 1 ∈ span s ↔ ∃ s', ↑s' ⊆ s ∧ 1 ∈ span ↑s'
state_after: no goals
tactic: exact ⟨Submodule.mem_span_finite_of_mem_span, fun ⟨s', h₁, h₂⟩ => span_mono h₁ h₂⟩
Theorem: CategoryTheory.Sieve.bind_apply
File: Mathlib/CategoryTheory/Sites/Sieves.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : Y ⟶ X
S✝ R✝ : Sieve X
S : Presieve X
R : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S f → Sieve Y
⊢ ∀ {Y Z : C} {f : Y ⟶ X},
    S.bind (fun Y f h => (R h).arrows) f → ∀ (g : Z ⟶ Y), S.bind (fun Y f h => (R h).arrows) (g ≫ f)
state_after: case intro.intro.intro.intro.intro
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y✝ Z✝ : C
f✝ : Y✝ ⟶ X
S✝ R✝ : Sieve X
S : Presieve X
R : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S f → Sieve Y
Y Z W : C
f : Y ⟶ W
h : W ⟶ X
hh : S h
hf : (R hh).arrows f
g : Z ⟶ Y
⊢ S.bind (fun Y f h => (R h).arrows) (g ≫ f ≫ h)
tactic: rintro Y Z f ⟨W, f, h, hh, hf, rfl⟩ g
state_before: case intro.intro.intro.intro.intro
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y✝ Z✝ : C
f✝ : Y✝ ⟶ X
S✝ R✝ : Sieve X
S : Presieve X
R : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S f → Sieve Y
Y Z W : C
f : Y ⟶ W
h : W ⟶ X
hh : S h
hf : (R hh).arrows f
g : Z ⟶ Y
⊢ S.bind (fun Y f h => (R h).arrows) (g ≫ f ≫ h)
state_after: no goals
tactic: exact ⟨_, g ≫ f, _, hh, by simp [hf]⟩
Theorem: Mathlib.Meta.List.range_zero'
File: Mathlib/Tactic/NormNum/BigOperators.lean

Proof steps:
state_before: u v : Level
n : ℕ
pn : NormNum.IsNat n 0
⊢ List.range n = []
state_after: no goals
tactic: rw [pn.out, Nat.cast_zero, List.range_zero]
Theorem: Mathlib.Meta.NormNum.jacobiSymNat.even_odd₁
File: Mathlib/Tactic/NormNum/LegendreSymbol.lean

Proof steps:
state_before: a b c : ℕ
r : ℤ
ha : a % 2 = 0
hb : b % 8 = 1
hc : a / 2 = c
hr : jacobiSymNat c b = r
⊢ jacobiSymNat a b = r
state_after: a b c : ℕ
r : ℤ
ha : a % 2 = 0
hb : b % 8 = 1
hc : a / 2 = c
hr : jacobiSymNat c b = r
⊢ jacobiSym (↑a) b = jacobiSym (↑a / 2) b
tactic: simp only [jacobiSymNat, ← hr, ← hc, Int.ofNat_ediv, Nat.cast_ofNat]
state_before: a b c : ℕ
r : ℤ
ha : a % 2 = 0
hb : b % 8 = 1
hc : a / 2 = c
hr : jacobiSymNat c b = r
⊢ jacobiSym (↑a) b = jacobiSym (↑a / 2) b
state_after: a b c : ℕ
r : ℤ
ha : a % 2 = 0
hb : b % 8 = 1
hc : a / 2 = c
hr : jacobiSymNat c b = r
⊢ b % 2 = 1
tactic: rw [← jacobiSym.even_odd (mod_cast ha), if_neg (by simp [hb])]
state_before: a b c : ℕ
r : ℤ
ha : a % 2 = 0
hb : b % 8 = 1
hc : a / 2 = c
hr : jacobiSymNat c b = r
⊢ b % 2 = 1
state_after: case h
a b c : ℕ
r : ℤ
ha : a % 2 = 0
hb : b % 8 = 1
hc : a / 2 = c
hr : jacobiSymNat c b = r
⊢ 2 ∣ 8
tactic: rw [← Nat.mod_mod_of_dvd, hb]
state_before: case h
a b c : ℕ
r : ℤ
ha : a % 2 = 0
hb : b % 8 = 1
hc : a / 2 = c
hr : jacobiSymNat c b = r
⊢ 2 ∣ 8
state_after: no goals
tactic: norm_num
Theorem: Polynomial.monomial_sub
File: Mathlib/Algebra/Polynomial/Basic.lean

Proof steps:
state_before: R : Type u
a b : R
m n✝ : ℕ
inst✝ : Ring R
n : ℕ
⊢ (monomial n) (a - b) = (monomial n) a - (monomial n) b
state_after: R : Type u
a b : R
m n✝ : ℕ
inst✝ : Ring R
n : ℕ
⊢ (monomial n) a + -(monomial n) b = (monomial n) a - (monomial n) b
tactic: rw [sub_eq_add_neg, monomial_add, monomial_neg]
state_before: R : Type u
a b : R
m n✝ : ℕ
inst✝ : Ring R
n : ℕ
⊢ (monomial n) a + -(monomial n) b = (monomial n) a - (monomial n) b
state_after: no goals
tactic: rfl
Theorem: Set.Finite.summable
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g : β → α
a b : α
s✝ : Finset β
s : Set β
hs : s.Finite
f : β → α
⊢ Multipliable (f ∘ Subtype.val)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g : β → α
a b : α
s✝ : Finset β
s : Set β
hs : s.Finite
f : β → α
this : Multipliable (f ∘ Subtype.val)
⊢ Multipliable (f ∘ Subtype.val)
tactic: have := hs.toFinset.multipliable f
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g : β → α
a b : α
s✝ : Finset β
s : Set β
hs : s.Finite
f : β → α
this : Multipliable (f ∘ Subtype.val)
⊢ Multipliable (f ∘ Subtype.val)
state_after: no goals
tactic: rwa [hs.coe_toFinset] at this
Theorem: CategoryTheory.NonPreadditiveAbelian.add_assoc
File: Mathlib/CategoryTheory/Abelian/NonPreadditive.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b c : X ⟶ Y
⊢ a + b + c = a + (b + c)
state_after: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b c : X ⟶ Y
⊢ a - -b + c = a + (b + c)
tactic: conv_lhs =>
    congr; rw [add_def]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b c : X ⟶ Y
⊢ a - -b + c = a + (b + c)
state_after: no goals
tactic: rw [sub_add, ← add_neg, neg_sub', neg_neg]
Theorem: NeZero.nat_of_neZero
File: Mathlib/Data/Nat/Cast/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
R✝ : Type u_3
S✝ : Type u_4
F✝ : Type u_5
inst✝⁵ : NonAssocSemiring R✝
inst✝⁴ : NonAssocSemiring S✝
R : Type u_6
S : Type u_7
inst✝³ : Semiring R
inst✝² : Semiring S
F : Type u_8
inst✝¹ : FunLike F R S
inst✝ : RingHomClass F R S
f : F
n : ℕ
hn : NeZero ↑n
⊢ NeZero (f ↑n)
state_after: no goals
tactic: simp only [map_natCast, hn]
Theorem: Fin.partialSum_right_neg
File: Mathlib/Algebra/BigOperators/Fin.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
n : ℕ
G : Type u_3
inst✝ : Group G
f : Fin n → G
i : Fin n
⊢ (partialProd f i.castSucc)⁻¹ * partialProd f i.succ = f i
state_after: case mk
α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
n : ℕ
G : Type u_3
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : i < n
⊢ (partialProd f ⟨i, hn⟩.castSucc)⁻¹ * partialProd f ⟨i, hn⟩.succ = f ⟨i, hn⟩
tactic: cases' i with i hn
state_before: case mk
α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
n : ℕ
G : Type u_3
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : i < n
⊢ (partialProd f ⟨i, hn⟩.castSucc)⁻¹ * partialProd f ⟨i, hn⟩.succ = f ⟨i, hn⟩
state_after: no goals
tactic: induction i with
  | zero => simp [-Fin.succ_mk, partialProd_succ]
  | succ i hi =>
    specialize hi (lt_trans (Nat.lt_succ_self i) hn)
    simp only [Fin.coe_eq_castSucc, Fin.succ_mk, Fin.castSucc_mk] at hi ⊢
    rw [← Fin.succ_mk _ _ (lt_trans (Nat.lt_succ_self _) hn), ← Fin.succ_mk _ _ hn]
    simp only [partialProd_succ, mul_inv_rev, Fin.castSucc_mk]
    -- Porting note: was
    -- assoc_rw [hi, inv_mul_cancel_left]
    rw [← mul_assoc, mul_left_eq_self, mul_assoc, hi, mul_left_inv]
Theorem: le_iff_exists_sup
File: Mathlib/Order/Lattice.lean

Proof steps:
state_before: α : Type u
β : Type v
inst✝ : SemilatticeSup α
a b c d : α
⊢ a ≤ b ↔ ∃ c, b = a ⊔ c
state_after: case mp
α : Type u
β : Type v
inst✝ : SemilatticeSup α
a b c d : α
⊢ a ≤ b → ∃ c, b = a ⊔ c

case mpr
α : Type u
β : Type v
inst✝ : SemilatticeSup α
a b c d : α
⊢ (∃ c, b = a ⊔ c) → a ≤ b
tactic: constructor
Theorem: right_eq_mul₀
File: Mathlib/Algebra/GroupWithZero/Basic.lean

Proof steps:
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝ : CancelMonoidWithZero M₀
a b c : M₀
hb : b ≠ 0
⊢ b = a * b ↔ a = 1
state_after: no goals
tactic: rw [eq_comm, mul_eq_right₀ hb]
Theorem: Option.map₂_coe_right
File: Mathlib/Data/Option/NAry.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
f✝ : α → β → γ
a✝ : Option α
b✝ : Option β
c : Option γ
f : α → β → γ
a : Option α
b : β
⊢ map₂ f a (some b) = Option.map (fun a => f a b) a
state_after: no goals
tactic: cases a <;> rfl
Theorem: div_mul_le_div_mul_of_div_le_div
File: Mathlib/Algebra/Order/Field/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
h : a / b ≤ c / d
he : 0 ≤ e
⊢ a / (b * e) ≤ c / (d * e)
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
h : a / b ≤ c / d
he : 0 ≤ e
⊢ a / b * (1 / e) ≤ c / d * (1 / e)
tactic: rw [div_mul_eq_div_mul_one_div, div_mul_eq_div_mul_one_div]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
h : a / b ≤ c / d
he : 0 ≤ e
⊢ a / b * (1 / e) ≤ c / d * (1 / e)
state_after: no goals
tactic: exact mul_le_mul_of_nonneg_right h (one_div_nonneg (α := α) |>.2 he)
Theorem: Real.tan_div_sqrt_one_add_tan_sq
File: Mathlib/Data/Complex/Exponential.lean

Proof steps:
state_before: x✝ y x : ℝ
hx : 0 < cos x
⊢ tan x / √(1 + tan x ^ 2) = sin x
state_after: no goals
tactic: rw [← tan_mul_cos hx.ne', ← inv_sqrt_one_add_tan_sq hx, div_eq_mul_inv]
Theorem: mul_eq_mul_prime_prod
File: Mathlib/RingTheory/Prime.lean

Proof steps:
state_before: R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
α : Type u_2
inst✝ : DecidableEq α
x y a : R
s : Finset α
p : α → R
hp : ∀ i ∈ s, Prime (p i)
hx : x * y = a * ∏ i ∈ s, p i
⊢ ∃ t u b c, t ∪ u = s ∧ Disjoint t u ∧ a = b * c ∧ x = b * ∏ i ∈ t, p i ∧ y = c * ∏ i ∈ u, p i
state_after: case empty
R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
α : Type u_2
inst✝ : DecidableEq α
p : α → R
x y a : R
hp : ∀ i ∈ ∅, Prime (p i)
hx : x * y = a * ∏ i ∈ ∅, p i
⊢ ∃ t u b c, t ∪ u = ∅ ∧ Disjoint t u ∧ a = b * c ∧ x = b * ∏ i ∈ t, p i ∧ y = c * ∏ i ∈ u, p i

case insert
R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
α : Type u_2
inst✝ : DecidableEq α
p : α → R
i : α
s : Finset α
his : i ∉ s
ih :
  ∀ {x y a : R},
    (∀ i ∈ s, Prime (p i)) →
      x * y = a * ∏ i ∈ s, p i →
        ∃ t u b c, t ∪ u = s ∧ Disjoint t u ∧ a = b * c ∧ x = b * ∏ i ∈ t, p i ∧ y = c * ∏ i ∈ u, p i
x y a : R
hp : ∀ i_1 ∈ insert i s, Prime (p i_1)
hx : x * y = a * ∏ i ∈ insert i s, p i
⊢ ∃ t u b c, t ∪ u = insert i s ∧ Disjoint t u ∧ a = b * c ∧ x = b * ∏ i ∈ t, p i ∧ y = c * ∏ i ∈ u, p i
tactic: induction' s using Finset.induction with i s his ih generalizing x y a