ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Finset.injOn_of_card_image_eq
File: Mathlib/Data/Finset/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq β
H : (image f s).card = s.card
⊢ Set.InjOn f ↑s
state_after: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq β
H : Multiset.card { val := (Multiset.map f s.val).dedup, nodup := ⋯ }.val = Multiset.card s.val
⊢ Set.InjOn f ↑s
tactic: rw [card_def, card_def, image, toFinset] at H
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq β
H : Multiset.card { val := (Multiset.map f s.val).dedup, nodup := ⋯ }.val = Multiset.card s.val
⊢ Set.InjOn f ↑s
state_after: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq β
H : Multiset.card (Multiset.map f s.val).dedup = Multiset.card s.val
⊢ Set.InjOn f ↑s
tactic: dsimp only at H
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq β
H : Multiset.card (Multiset.map f s.val).dedup = Multiset.card s.val
⊢ Set.InjOn f ↑s
state_after: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq β
H : Multiset.card (Multiset.map f s.val).dedup = Multiset.card s.val
this : (Multiset.map f s.val).dedup = Multiset.map f s.val
⊢ Set.InjOn f ↑s
tactic: have : (s.1.map f).dedup = s.1.map f := by
    refine Multiset.eq_of_le_of_card_le (Multiset.dedup_le _) ?_
    simp only [H, Multiset.card_map, le_rfl]
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq β
H : Multiset.card (Multiset.map f s.val).dedup = Multiset.card s.val
this : (Multiset.map f s.val).dedup = Multiset.map f s.val
⊢ Set.InjOn f ↑s
state_after: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq β
H : Multiset.card (Multiset.map f s.val).dedup = Multiset.card s.val
this : (Multiset.map f s.val).Nodup
⊢ Set.InjOn f ↑s
tactic: rw [Multiset.dedup_eq_self] at this
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq β
H : Multiset.card (Multiset.map f s.val).dedup = Multiset.card s.val
this : (Multiset.map f s.val).Nodup
⊢ Set.InjOn f ↑s
state_after: no goals
tactic: exact inj_on_of_nodup_map this
Theorem: Function.isPeriodicPt_minimalPeriod
File: Mathlib/Dynamics/PeriodicPts.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
f : α → α
x : α
⊢ IsPeriodicPt f (minimalPeriod f x) x
state_after: α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
f : α → α
x : α
⊢ IsPeriodicPt f (if h : x ∈ periodicPts f then Nat.find h else 0) x
tactic: delta minimalPeriod
state_before: α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
f : α → α
x : α
⊢ IsPeriodicPt f (if h : x ∈ periodicPts f then Nat.find h else 0) x
state_after: case pos
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
f : α → α
x : α
hx : x ∈ periodicPts f
⊢ IsPeriodicPt f (Nat.find hx) x

case neg
α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
f : α → α
x : α
hx : x ∉ periodicPts f
⊢ IsPeriodicPt f 0 x
tactic: split_ifs with hx
Theorem: MvPolynomial.support_esymm
File: Mathlib/RingTheory/MvPolynomial/Symmetric.lean

Proof steps:
state_before: σ : Type u_1
R : Type u_2
τ : Type u_3
S : Type u_4
inst✝⁵ : CommSemiring R
inst✝⁴ : CommSemiring S
inst✝³ : Fintype σ
inst✝² : Fintype τ
n : ℕ
inst✝¹ : DecidableEq σ
inst✝ : Nontrivial R
⊢ (esymm σ R n).support = image (fun t => ∑ i ∈ t, Finsupp.single i 1) (powersetCard n univ)
state_after: σ : Type u_1
R : Type u_2
τ : Type u_3
S : Type u_4
inst✝⁵ : CommSemiring R
inst✝⁴ : CommSemiring S
inst✝³ : Fintype σ
inst✝² : Fintype τ
n : ℕ
inst✝¹ : DecidableEq σ
inst✝ : Nontrivial R
⊢ ((powersetCard n univ).biUnion fun t => {∑ i ∈ t, Finsupp.single i 1}) =
    image (fun t => ∑ i ∈ t, Finsupp.single i 1) (powersetCard n univ)
tactic: rw [support_esymm']
state_before: σ : Type u_1
R : Type u_2
τ : Type u_3
S : Type u_4
inst✝⁵ : CommSemiring R
inst✝⁴ : CommSemiring S
inst✝³ : Fintype σ
inst✝² : Fintype τ
n : ℕ
inst✝¹ : DecidableEq σ
inst✝ : Nontrivial R
⊢ ((powersetCard n univ).biUnion fun t => {∑ i ∈ t, Finsupp.single i 1}) =
    image (fun t => ∑ i ∈ t, Finsupp.single i 1) (powersetCard n univ)
state_after: no goals
tactic: exact biUnion_singleton
Theorem: ENNReal.div_eq_div_iff
File: Mathlib/Data/ENNReal/Inv.lean

Proof steps:
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ 0
ha' : a ≠ ⊤
hb : b ≠ 0
hb' : b ≠ ⊤
⊢ c / b = d / a ↔ a * c = b * d
state_after: a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ 0
ha' : a ≠ ⊤
hb : b ≠ 0
hb' : b ≠ ⊤
⊢ a * (c / b) = d ↔ a * c = b * d
tactic: rw [eq_div_iff ha ha']
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ 0
ha' : a ≠ ⊤
hb : b ≠ 0
hb' : b ≠ ⊤
⊢ a * (c / b) = d ↔ a * c = b * d
state_after: a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ 0
ha' : a ≠ ⊤
hb : b ≠ 0
hb' : b ≠ ⊤
⊢ a * (c / b) = d ↔ b * d = a * c
tactic: conv_rhs => rw [eq_comm]
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ 0
ha' : a ≠ ⊤
hb : b ≠ 0
hb' : b ≠ ⊤
⊢ a * (c / b) = d ↔ b * d = a * c
state_after: no goals
tactic: rw [← eq_div_iff hb hb', mul_div_assoc, eq_comm]
Theorem: List.indexOf_le_length
File: Mathlib/Data/List/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : DecidableEq α
a : α
l : List α
⊢ indexOf a l ≤ l.length
state_after: case nil
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : DecidableEq α
a : α
⊢ indexOf a [] ≤ [].length

case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : DecidableEq α
a b : α
l : List α
ih : indexOf a l ≤ l.length
⊢ indexOf a (b :: l) ≤ (b :: l).length
tactic: induction' l with b l ih
state_before: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : DecidableEq α
a b : α
l : List α
ih : indexOf a l ≤ l.length
⊢ indexOf a (b :: l) ≤ (b :: l).length
state_after: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : DecidableEq α
a b : α
l : List α
ih : indexOf a l ≤ l.length
⊢ (if b = a then 0 else indexOf a l + 1) ≤ l.length + 1
tactic: simp only [length, indexOf_cons, cond_eq_if, beq_iff_eq]
state_before: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : DecidableEq α
a b : α
l : List α
ih : indexOf a l ≤ l.length
⊢ (if b = a then 0 else indexOf a l + 1) ≤ l.length + 1
state_after: case pos
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : DecidableEq α
a b : α
l : List α
ih : indexOf a l ≤ l.length
h : b = a
⊢ (if b = a then 0 else indexOf a l + 1) ≤ l.length + 1

case neg
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : DecidableEq α
a b : α
l : List α
ih : indexOf a l ≤ l.length
h : ¬b = a
⊢ (if b = a then 0 else indexOf a l + 1) ≤ l.length + 1
tactic: by_cases h : b = a
Theorem: Polynomial.support_update_ne_zero
File: Mathlib/Algebra/Polynomial/Basic.lean

Proof steps:
state_before: R : Type u
a✝ b : R
m n✝ : ℕ
inst✝ : Semiring R
p✝ q p : R[X]
n : ℕ
a : R
ha : a ≠ 0
⊢ (p.update n a).support = insert n p.support
state_after: no goals
tactic: classical rw [support_update, if_neg ha]
Theorem: Polynomial.support_X
File: Mathlib/Algebra/Polynomial/Basic.lean

Proof steps:
state_before: R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
p q : R[X]
H : ¬1 = 0
⊢ X.support = {1}
state_after: no goals
tactic: rw [← pow_one X, support_X_pow H 1]
Theorem: MeasureTheory.integral_Ioi_mul_deriv_eq_deriv_mul
File: Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean

Proof steps:
state_before: A : Type u_1
inst✝² : NormedRing A
inst✝¹ : NormedAlgebra ℝ A
a b : ℝ
a' b' : A
u v u' v' : ℝ → A
inst✝ : CompleteSpace A
hu : ∀ x ∈ Ioi a, HasDerivAt u (u' x) x
hv : ∀ x ∈ Ioi a, HasDerivAt v (v' x) x
huv' : IntegrableOn (u * v') (Ioi a) volume
hu'v : IntegrableOn (u' * v) (Ioi a) volume
h_zero : Tendsto (u * v) (𝓝[>] a) (𝓝 a')
h_infty : Tendsto (u * v) atTop (𝓝 b')
⊢ ∫ (x : ℝ) in Ioi a, u x * v' x = b' - a' - ∫ (x : ℝ) in Ioi a, u' x * v x
state_after: A : Type u_1
inst✝² : NormedRing A
inst✝¹ : NormedAlgebra ℝ A
a b : ℝ
a' b' : A
u v u' v' : ℝ → A
inst✝ : CompleteSpace A
hu : ∀ x ∈ Ioi a, HasDerivAt u (u' x) x
hv : ∀ x ∈ Ioi a, HasDerivAt v (v' x) x
huv' : IntegrableOn (fun i => u i * v' i) (Ioi a) volume
hu'v : IntegrableOn (fun i => u' i * v i) (Ioi a) volume
h_zero : Tendsto (u * v) (𝓝[>] a) (𝓝 a')
h_infty : Tendsto (u * v) atTop (𝓝 b')
⊢ ∫ (x : ℝ) in Ioi a, u x * v' x = b' - a' - ∫ (x : ℝ) in Ioi a, u' x * v x
tactic: rw [Pi.mul_def] at huv' hu'v
state_before: A : Type u_1
inst✝² : NormedRing A
inst✝¹ : NormedAlgebra ℝ A
a b : ℝ
a' b' : A
u v u' v' : ℝ → A
inst✝ : CompleteSpace A
hu : ∀ x ∈ Ioi a, HasDerivAt u (u' x) x
hv : ∀ x ∈ Ioi a, HasDerivAt v (v' x) x
huv' : IntegrableOn (fun i => u i * v' i) (Ioi a) volume
hu'v : IntegrableOn (fun i => u' i * v i) (Ioi a) volume
h_zero : Tendsto (u * v) (𝓝[>] a) (𝓝 a')
h_infty : Tendsto (u * v) atTop (𝓝 b')
⊢ ∫ (x : ℝ) in Ioi a, u x * v' x = b' - a' - ∫ (x : ℝ) in Ioi a, u' x * v x
state_after: A : Type u_1
inst✝² : NormedRing A
inst✝¹ : NormedAlgebra ℝ A
a b : ℝ
a' b' : A
u v u' v' : ℝ → A
inst✝ : CompleteSpace A
hu : ∀ x ∈ Ioi a, HasDerivAt u (u' x) x
hv : ∀ x ∈ Ioi a, HasDerivAt v (v' x) x
huv' : IntegrableOn (fun i => u i * v' i) (Ioi a) volume
hu'v : IntegrableOn (fun i => u' i * v i) (Ioi a) volume
h_zero : Tendsto (u * v) (𝓝[>] a) (𝓝 a')
h_infty : Tendsto (u * v) atTop (𝓝 b')
⊢ ∫ (a : ℝ) in Ioi a, u a * v' a + u' a * v a ∂volume = b' - a'
tactic: rw [eq_sub_iff_add_eq, ← integral_add huv' hu'v]
state_before: A : Type u_1
inst✝² : NormedRing A
inst✝¹ : NormedAlgebra ℝ A
a b : ℝ
a' b' : A
u v u' v' : ℝ → A
inst✝ : CompleteSpace A
hu : ∀ x ∈ Ioi a, HasDerivAt u (u' x) x
hv : ∀ x ∈ Ioi a, HasDerivAt v (v' x) x
huv' : IntegrableOn (fun i => u i * v' i) (Ioi a) volume
hu'v : IntegrableOn (fun i => u' i * v i) (Ioi a) volume
h_zero : Tendsto (u * v) (𝓝[>] a) (𝓝 a')
h_infty : Tendsto (u * v) atTop (𝓝 b')
⊢ ∫ (a : ℝ) in Ioi a, u a * v' a + u' a * v a ∂volume = b' - a'
state_after: no goals
tactic: simpa only [add_comm] using integral_Ioi_deriv_mul_eq_sub hu hv (hu'v.add huv') h_zero h_infty
Theorem: CategoryTheory.SimplicialObject.augment_hom_app
File: Mathlib/AlgebraicTopology/SimplicialObject.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
X✝ X : SimplicialObject C
X₀ : C
f : X _[0] ⟶ X₀
w : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), X.map g₁.op ≫ f = X.map g₂.op ≫ f
⊢ ∀ ⦃X_1 Y : SimplexCategoryᵒᵖ⦄ (f_1 : X_1 ⟶ Y),
    ((𝟭 (SimplicialObject C)).obj X).map f_1 ≫ (fun i => X.map ([0].const (unop i) 0).op ≫ f) Y =
      (fun i => X.map ([0].const (unop i) 0).op ≫ f) X_1 ≫ ((const C).obj X₀).map f_1
state_after: C : Type u
inst✝ : Category.{v, u} C
X✝ X : SimplicialObject C
X₀ : C
f : X _[0] ⟶ X₀
w : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), X.map g₁.op ≫ f = X.map g₂.op ≫ f
i j : SimplexCategoryᵒᵖ
g : i ⟶ j
⊢ ((𝟭 (SimplicialObject C)).obj X).map g ≫ (fun i => X.map ([0].const (unop i) 0).op ≫ f) j =
    (fun i => X.map ([0].const (unop i) 0).op ≫ f) i ≫ ((const C).obj X₀).map g
tactic: intro i j g
state_before: C : Type u
inst✝ : Category.{v, u} C
X✝ X : SimplicialObject C
X₀ : C
f : X _[0] ⟶ X₀
w : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), X.map g₁.op ≫ f = X.map g₂.op ≫ f
i j : SimplexCategoryᵒᵖ
g : i ⟶ j
⊢ ((𝟭 (SimplicialObject C)).obj X).map g ≫ (fun i => X.map ([0].const (unop i) 0).op ≫ f) j =
    (fun i => X.map ([0].const (unop i) 0).op ≫ f) i ≫ ((const C).obj X₀).map g
state_after: C : Type u
inst✝ : Category.{v, u} C
X✝ X : SimplicialObject C
X₀ : C
f : X _[0] ⟶ X₀
w : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), X.map g₁.op ≫ f = X.map g₂.op ≫ f
i j : SimplexCategoryᵒᵖ
g : i ⟶ j
⊢ X.map g ≫ X.map ([0].const (unop j) 0).op ≫ f = (X.map ([0].const (unop i) 0).op ≫ f) ≫ 𝟙 X₀
tactic: dsimp
state_before: C : Type u
inst✝ : Category.{v, u} C
X✝ X : SimplicialObject C
X₀ : C
f : X _[0] ⟶ X₀
w : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), X.map g₁.op ≫ f = X.map g₂.op ≫ f
i j : SimplexCategoryᵒᵖ
g : i ⟶ j
⊢ X.map g ≫ X.map ([0].const (unop j) 0).op ≫ f = (X.map ([0].const (unop i) 0).op ≫ f) ≫ 𝟙 X₀
state_after: C : Type u
inst✝ : Category.{v, u} C
X✝ X : SimplicialObject C
X₀ : C
f : X _[0] ⟶ X₀
w : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), X.map g₁.op ≫ f = X.map g₂.op ≫ f
i j : SimplexCategoryᵒᵖ
g : i ⟶ j
⊢ X.map g.unop.op ≫ X.map ([0].const (unop j) 0).op ≫ f = (X.map ([0].const (unop i) 0).op ≫ f) ≫ 𝟙 X₀
tactic: rw [← g.op_unop]
state_before: C : Type u
inst✝ : Category.{v, u} C
X✝ X : SimplicialObject C
X₀ : C
f : X _[0] ⟶ X₀
w : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), X.map g₁.op ≫ f = X.map g₂.op ≫ f
i j : SimplexCategoryᵒᵖ
g : i ⟶ j
⊢ X.map g.unop.op ≫ X.map ([0].const (unop j) 0).op ≫ f = (X.map ([0].const (unop i) 0).op ≫ f) ≫ 𝟙 X₀
state_after: no goals
tactic: simpa only [← X.map_comp, ← Category.assoc, Category.comp_id, ← op_comp] using w _ _ _
Theorem: CategoryTheory.GrothendieckTopology.imagePresheaf_obj
File: Mathlib/CategoryTheory/Sites/Subsheaf.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
f : F' ⟶ F
⊢ ∀ {U V : Cᵒᵖ} (i : U ⟶ V), (fun U => Set.range (f.app U)) U ⊆ F.map i ⁻¹' (fun U => Set.range (f.app U)) V
state_after: case intro
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
f : F' ⟶ F
U V : Cᵒᵖ
i : U ⟶ V
x : F'.obj U
⊢ f.app U x ∈ F.map i ⁻¹' (fun U => Set.range (f.app U)) V
tactic: rintro U V i _ ⟨x, rfl⟩
state_before: case intro
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
f : F' ⟶ F
U V : Cᵒᵖ
i : U ⟶ V
x : F'.obj U
⊢ f.app U x ∈ F.map i ⁻¹' (fun U => Set.range (f.app U)) V
state_after: case intro
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
f : F' ⟶ F
U V : Cᵒᵖ
i : U ⟶ V
x : F'.obj U
this : ∀ ⦃X Y : Cᵒᵖ⦄ (f_1 : X ⟶ Y) (x : F'.obj X), f.app Y (F'.map f_1 x) = F.map f_1 (f.app X x)
⊢ f.app U x ∈ F.map i ⁻¹' (fun U => Set.range (f.app U)) V
tactic: have := elementwise_of% f.naturality
state_before: case intro
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
f : F' ⟶ F
U V : Cᵒᵖ
i : U ⟶ V
x : F'.obj U
this : ∀ ⦃X Y : Cᵒᵖ⦄ (f_1 : X ⟶ Y) (x : F'.obj X), f.app Y (F'.map f_1 x) = F.map f_1 (f.app X x)
⊢ f.app U x ∈ F.map i ⁻¹' (fun U => Set.range (f.app U)) V
state_after: no goals
tactic: exact ⟨_, this i x⟩
Theorem: MulAction.period_dvd_orderOf
File: Mathlib/GroupTheory/GroupAction/Period.lean

Proof steps:
state_before: α : Type v
G : Type u
inst✝³ : Group G
inst✝² : MulAction G α
M : Type u
inst✝¹ : Monoid M
inst✝ : MulAction M α
m : M
a : α
⊢ period m a ∣ orderOf m
state_after: no goals
tactic: rw [← pow_smul_eq_iff_period_dvd, pow_orderOf_eq_one, one_smul]
Theorem: CategoryTheory.GrothendieckTopology.overEquiv_symm_mem_over
File: Mathlib/CategoryTheory/Sites/Over.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
X : C
Y : Over X
S : Sieve Y.left
hS : S ∈ J.sieves Y.left
⊢ (Sieve.overEquiv Y).symm S ∈ (J.over X).sieves Y
state_after: no goals
tactic: simpa only [mem_over_iff, Equiv.apply_symm_apply] using hS
Theorem: WeierstrassCurve.Affine.addY_sub_negY_addY
File: Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean

Proof steps:
state_before: R : Type u
inst✝¹ : CommRing R
W✝ : Affine R
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
hx : x₁ ≠ x₂
⊢ W.addY x₁ x₂ y₁ (W.slope x₁ x₂ y₁ y₂) -
      W.negY (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂)) (W.addY x₁ x₂ y₁ (W.slope x₁ x₂ y₁ y₂)) =
    ((y₂ - W.negY x₂ y₂) * (x₁ - W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂)) -
        (y₁ - W.negY x₁ y₁) * (x₂ - W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))) /
      (x₂ - x₁)
state_after: R : Type u
inst✝¹ : CommRing R
W✝ : Affine R
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
hx : x₁ ≠ x₂
⊢ (-W.negAddY x₁ x₂ y₁ (W.slope x₁ x₂ y₁ y₂) - W.a₁ * W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂) - W.a₃ -
        (-(-W.negAddY x₁ x₂ y₁ (W.slope x₁ x₂ y₁ y₂) - W.a₁ * W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂) - W.a₃) -
            W.a₁ * W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂) -
          W.a₃)) *
      (x₂ - x₁) =
    (y₂ - (-y₂ - W.a₁ * x₂ - W.a₃)) * (x₁ - W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂)) -
      (y₁ - (-y₁ - W.a₁ * x₁ - W.a₃)) * (x₂ - W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))
tactic: simp_rw [addY, negY, eq_div_iff (sub_ne_zero.mpr hx.symm)]
state_before: R : Type u
inst✝¹ : CommRing R
W✝ : Affine R
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
hx : x₁ ≠ x₂
⊢ (-W.negAddY x₁ x₂ y₁ (W.slope x₁ x₂ y₁ y₂) - W.a₁ * W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂) - W.a₃ -
        (-(-W.negAddY x₁ x₂ y₁ (W.slope x₁ x₂ y₁ y₂) - W.a₁ * W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂) - W.a₃) -
            W.a₁ * W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂) -
          W.a₃)) *
      (x₂ - x₁) =
    (y₂ - (-y₂ - W.a₁ * x₂ - W.a₃)) * (x₁ - W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂)) -
      (y₁ - (-y₁ - W.a₁ * x₁ - W.a₃)) * (x₂ - W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))
state_after: no goals
tactic: linear_combination 2 * cyclic_sum_Y_mul_X_sub_X y₁ y₂ hx
Theorem: ProbabilityTheory.cgf_const
File: Mathlib/Probability/Moments.lean

Proof steps:
state_before: Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsProbabilityMeasure μ
c : ℝ
⊢ cgf (fun x => c) μ t = t * c
state_after: no goals
tactic: simp only [cgf, mgf_const, log_exp]
Theorem: OrthogonalIdempotents.equiv
File: Mathlib/RingTheory/Idempotents.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
inst✝¹ : Ring R
inst✝ : Ring S
f : R →+* S
I : Type u_3
e : I → R
he : OrthogonalIdempotents e
J : Type u_4
i : J ≃ I
⊢ OrthogonalIdempotents (e ∘ ⇑i) ↔ OrthogonalIdempotents e
state_after: no goals
tactic: classical
  simp [iff_mul_eq, i.forall_congr_left]
Theorem: CategoryTheory.Cat.leftUnitor_hom_app
File: Mathlib/CategoryTheory/Category/Cat.lean

Proof steps:
state_before: B C : Cat
F : B ⟶ C
X : ↑B
⊢ (𝟙 B ≫ F).obj X = F.obj X
state_after: no goals
tactic: simp
Theorem: AddSubmonoid.leftNegEquiv_symm_eq_neg
File: Mathlib/GroupTheory/Submonoid/Inverses.lean

Proof steps:
state_before: M : Type u_1
inst✝ : CommGroup M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ ↑((S.leftInvEquiv hS).symm x) = (↑x)⁻¹
state_after: no goals
tactic: rw [← mul_right_inj (x : M), mul_right_inv, mul_leftInvEquiv_symm]
Theorem: Mathlib.Meta.NormNum.isRat_zpow_neg
File: Mathlib/Tactic/NormNum/Pow.lean

Proof steps:
state_before: a✝ b✝ c : ℕ
α : Type u_1
inst✝ : DivisionRing α
a : α
b : ℤ
nb : ℕ
num : ℤ
den : ℕ
pb : IsInt b (Int.negOfNat nb)
pe' : IsRat (a ^ nb)⁻¹ num den
⊢ IsRat (a ^ b) num den
state_after: no goals
tactic: rwa [pb.out, Int.cast_negOfNat, zpow_neg, zpow_natCast]
Theorem: CategoryTheory.IsPullback.of_bot'
File: Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean

Proof steps:
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P X Y Z : C
fst : P ⟶ X
snd : P ⟶ Y
f : X ⟶ Z
g : Y ⟶ Z
X₁₁ X₁₂ X₂₁ X₂₂ X₃₁ X₃₂ : C
h₁₁ : X₁₁ ⟶ X₁₂
h₂₁ : X₂₁ ⟶ X₂₂
h₃₁ : X₃₁ ⟶ X₃₂
v₃₁ : X₁₁ ⟶ X₃₁
v₁₂ : X₁₂ ⟶ X₂₂
v₂₁ : X₂₁ ⟶ X₃₁
v₂₂ : X₂₂ ⟶ X₃₂
s : IsPullback h₁₁ v₃₁ (v₁₂ ≫ v₂₂) h₃₁
t : IsPullback h₂₁ v₂₁ v₂₂ h₃₁
⊢ (h₁₁ ≫ v₁₂) ≫ v₂₂ = v₃₁ ≫ h₃₁
state_after: no goals
tactic: rw [Category.assoc, s.w]
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P X Y Z : C
fst : P ⟶ X
snd : P ⟶ Y
f : X ⟶ Z
g : Y ⟶ Z
X₁₁ X₁₂ X₂₁ X₂₂ X₃₁ X₃₂ : C
h₁₁ : X₁₁ ⟶ X₁₂
h₂₁ : X₂₁ ⟶ X₂₂
h₃₁ : X₃₁ ⟶ X₃₂
v₃₁ : X₁₁ ⟶ X₃₁
v₁₂ : X₁₂ ⟶ X₂₂
v₂₁ : X₂₁ ⟶ X₃₁
v₂₂ : X₂₂ ⟶ X₃₂
s : IsPullback h₁₁ v₃₁ (v₁₂ ≫ v₂₂) h₃₁
t : IsPullback h₂₁ v₂₁ v₂₂ h₃₁
⊢ h₁₁ ≫ v₁₂ = t.lift (h₁₁ ≫ v₁₂) v₃₁ ⋯ ≫ h₂₁
state_after: no goals
tactic: simp only [lift_fst]
Theorem: AddMonoidHom.range_eq_map
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

Proof steps:
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
N : Type u_5
P : Type u_6
inst✝¹ : Group N
inst✝ : Group P
K : Subgroup G
f : G →* N
⊢ f.range = map f ⊤
state_after: case h
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
N : Type u_5
P : Type u_6
inst✝¹ : Group N
inst✝ : Group P
K : Subgroup G
f : G →* N
x✝ : N
⊢ x✝ ∈ f.range ↔ x✝ ∈ map f ⊤
tactic: ext
state_before: case h
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
N : Type u_5
P : Type u_6
inst✝¹ : Group N
inst✝ : Group P
K : Subgroup G
f : G →* N
x✝ : N
⊢ x✝ ∈ f.range ↔ x✝ ∈ map f ⊤
state_after: no goals
tactic: simp
Theorem: List.getLast_reverse
File: Mathlib/Data/List/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ l : List α
hl : l.reverse ≠ []
⊢ 0 < l.length
state_after: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ l : List α
hl : l.length ≤ 0
⊢ l.reverse = []
tactic: contrapose! hl
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ l : List α
hl : l.length ≤ 0
⊢ l.reverse = []
state_after: no goals
tactic: simpa [length_eq_zero] using hl
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ l : List α
hl : l.reverse ≠ []
hl' : optParam (0 < l.length) ⋯
⊢ l.reverse.getLast hl = l.get ⟨0, hl'⟩
state_after: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ l : List α
hl : l.reverse ≠ []
hl' : optParam (0 < l.length) ⋯
⊢ l.get ⟨l.length - 1 - ↑⟨l.reverse.length - 1, ⋯⟩, ?hn'⟩ = l.get ⟨0, hl'⟩

case hn'
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ l : List α
hl : l.reverse ≠ []
hl' : optParam (0 < l.length) ⋯
⊢ l.length - 1 - ↑⟨l.reverse.length - 1, ⋯⟩ < l.length
tactic: rw [getLast_eq_get, get_reverse']
Theorem: Complex.sin_eq_zero_iff_cos_eq
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

Proof steps:
state_before: z : ℂ
⊢ sin z = 0 ↔ cos z = 1 ∨ cos z = -1
state_after: z : ℂ
⊢ sin z = 0 ↔ 0 = sin z * sin z
tactic: rw [← mul_self_eq_one_iff, ← sin_sq_add_cos_sq, sq, sq, ← sub_eq_iff_eq_add, sub_self]
state_before: z : ℂ
⊢ sin z = 0 ↔ 0 = sin z * sin z
state_after: no goals
tactic: exact ⟨fun h => by rw [h, mul_zero], eq_zero_of_mul_self_eq_zero ∘ Eq.symm⟩
Theorem: aemeasurable_const'
File: Mathlib/MeasureTheory/Measure/AEMeasurable.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
R : Type u_6
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
f g : α → β
μ ν : Measure α
h : ∀ᵐ (x : α) (y : α) ∂μ, f x = f y
⊢ AEMeasurable f μ
state_after: case inl
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
R : Type u_6
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
f g : α → β
ν : Measure α
h : ∀ᵐ (x : α) (y : α) ∂0, f x = f y
⊢ AEMeasurable f 0

case inr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
R : Type u_6
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
f g : α → β
μ ν : Measure α
h : ∀ᵐ (x : α) (y : α) ∂μ, f x = f y
hμ : μ ≠ 0
⊢ AEMeasurable f μ
tactic: rcases eq_or_ne μ 0 with (rfl | hμ)
Theorem: Metric.hausdorffDist_empty'
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

Proof steps:
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
⊢ hausdorffDist ∅ s = 0
state_after: no goals
tactic: simp [hausdorffDist_comm]
Theorem: Associates.mk_pow
File: Mathlib/Algebra/Associated/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
a : α
n : ℕ
⊢ Associates.mk (a ^ n) = Associates.mk a ^ n
state_after: no goals
tactic: induction n <;> simp [*, pow_succ, Associates.mk_mul_mk.symm]