1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Submodule.toSubalgebra_mk
File: Mathlib/Algebra/Algebra/Subalgebra/Basic.lean

tactic: intro r
state_before: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p s : Submodule R A
h1 : 1 ∈ s
hmul : ∀ (x y : A), x ∈ s → y ∈ s → x * y ∈ s
⊢ ∀ (r : R),
    (algebraMap R A) r ∈ { carrier := ↑s, mul_mem' := hmul, one_mem' := h1, add_mem' := ⋯, zero_mem' := ⋯ }.carrier
state_after: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p s : Submodule R A
h1 : 1 ∈ s
hmul : ∀ (x y : A), x ∈ s → y ∈ s → x * y ∈ s
r : R
⊢ (algebraMap R A) r ∈ { carrier := ↑s, mul_mem' := hmul, one_mem' := h1, add_mem' := ⋯, zero_mem' := ⋯ }.carrier

tactic: rw [Algebra.algebraMap_eq_smul_one]
state_before: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p s : Submodule R A
h1 : 1 ∈ s
hmul : ∀ (x y : A), x ∈ s → y ∈ s → x * y ∈ s
r : R
⊢ (algebraMap R A) r ∈ { carrier := ↑s, mul_mem' := hmul, one_mem' := h1, add_mem' := ⋯, zero_mem' := ⋯ }.carrier
state_after: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p s : Submodule R A
h1 : 1 ∈ s
hmul : ∀ (x y : A), x ∈ s → y ∈ s → x * y ∈ s
r : R
⊢ r • 1 ∈ { carrier := ↑s, mul_mem' := hmul, one_mem' := h1, add_mem' := ⋯, zero_mem' := ⋯ }.carrier

tactic: apply s.smul_mem _ h1
state_before: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p s : Submodule R A
h1 : 1 ∈ s
hmul : ∀ (x y : A), x ∈ s → y ∈ s → x * y ∈ s
r : R
⊢ r • 1 ∈ { carrier := ↑s, mul_mem' := hmul, one_mem' := h1, add_mem' := ⋯, zero_mem' := ⋯ }.carrier
state_after: no goals
Theorem: MeasureTheory.VectorMeasure.AbsolutelyContinuous.smul
File: Mathlib/MeasureTheory/Measure/VectorMeasure.lean

tactic: intro s hs
state_before: α : Type u_1
β : Type u_2
m : MeasurableSpace α
L : Type u_3
M : Type u_4
N : Type u_5
inst✝⁸ : AddCommMonoid L
inst✝⁷ : TopologicalSpace L
inst✝⁶ : AddCommMonoid M
inst✝⁵ : TopologicalSpace M
inst✝⁴ : AddCommMonoid N
inst✝³ : TopologicalSpace N
v✝ : VectorMeasure α M
w✝ : VectorMeasure α N
R : Type u_6
inst✝² : Semiring R
inst✝¹ : DistribMulAction R M
inst✝ : ContinuousConstSMul R M
r : R
v : VectorMeasure α M
w : VectorMeasure α N
h : v ≪ᵥ w
⊢ r • v ≪ᵥ w
state_after: α : Type u_1
β : Type u_2
m : MeasurableSpace α
L : Type u_3
M : Type u_4
N : Type u_5
inst✝⁸ : AddCommMonoid L
inst✝⁷ : TopologicalSpace L
inst✝⁶ : AddCommMonoid M
inst✝⁵ : TopologicalSpace M
inst✝⁴ : AddCommMonoid N
inst✝³ : TopologicalSpace N
v✝ : VectorMeasure α M
w✝ : VectorMeasure α N
R : Type u_6
inst✝² : Semiring R
inst✝¹ : DistribMulAction R M
inst✝ : ContinuousConstSMul R M
r : R
v : VectorMeasure α M
w : VectorMeasure α N
h : v ≪ᵥ w
s : Set α
hs : ↑w s = 0
⊢ ↑(r • v) s = 0

tactic: rw [smul_apply, h hs, smul_zero]
state_before: α : Type u_1
β : Type u_2
m : MeasurableSpace α
L : Type u_3
M : Type u_4
N : Type u_5
inst✝⁸ : AddCommMonoid L
inst✝⁷ : TopologicalSpace L
inst✝⁶ : AddCommMonoid M
inst✝⁵ : TopologicalSpace M
inst✝⁴ : AddCommMonoid N
inst✝³ : TopologicalSpace N
v✝ : VectorMeasure α M
w✝ : VectorMeasure α N
R : Type u_6
inst✝² : Semiring R
inst✝¹ : DistribMulAction R M
inst✝ : ContinuousConstSMul R M
r : R
v : VectorMeasure α M
w : VectorMeasure α N
h : v ≪ᵥ w
s : Set α
hs : ↑w s = 0
⊢ ↑(r • v) s = 0
state_after: no goals
Theorem: dense_compl_singleton
File: Mathlib/Topology/Basic.lean

tactic: intro y
state_before: X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x✝ : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝¹ : TopologicalSpace X
x : X
inst✝ : (𝓝[≠] x).NeBot
⊢ Dense {x}ᶜ
state_after: X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x✝ : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝¹ : TopologicalSpace X
x : X
inst✝ : (𝓝[≠] x).NeBot
y : X
⊢ y ∈ closure {x}ᶜ

tactic: rcases eq_or_ne y x with (rfl | hne)
state_before: X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x✝ : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝¹ : TopologicalSpace X
x : X
inst✝ : (𝓝[≠] x).NeBot
y : X
⊢ y ∈ closure {x}ᶜ
state_after: case inl
X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝¹ : TopologicalSpace X
y : X
inst✝ : (𝓝[≠] y).NeBot
⊢ y ∈ closure {y}ᶜ

case inr
X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x✝ : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝¹ : TopologicalSpace X
x : X
inst✝ : (𝓝[≠] x).NeBot
y : X
hne : y ≠ x
⊢ y ∈ closure {x}ᶜ

tactic: rwa [mem_closure_iff_nhdsWithin_neBot]
state_before: case inl
X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝¹ : TopologicalSpace X
y : X
inst✝ : (𝓝[≠] y).NeBot
⊢ y ∈ closure {y}ᶜ
state_after: no goals

tactic: exact subset_closure hne
state_before: case inr
X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x✝ : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝¹ : TopologicalSpace X
x : X
inst✝ : (𝓝[≠] x).NeBot
y : X
hne : y ≠ x
⊢ y ∈ closure {x}ᶜ
state_after: no goals
Theorem: LinearMap.iSup_range_stdBasis
File: Mathlib/LinearAlgebra/StdBasis.lean

tactic: cases nonempty_fintype ι
state_before: R : Type u_1
ι : Type u_2
inst✝⁴ : Semiring R
φ : ι → Type u_3
inst✝³ : (i : ι) → AddCommMonoid (φ i)
inst✝² : (i : ι) → Module R (φ i)
inst✝¹ : DecidableEq ι
inst✝ : Finite ι
⊢ ⨆ i, range (stdBasis R φ i) = ⊤
state_after: case intro
R : Type u_1
ι : Type u_2
inst✝⁴ : Semiring R
φ : ι → Type u_3
inst✝³ : (i : ι) → AddCommMonoid (φ i)
inst✝² : (i : ι) → Module R (φ i)
inst✝¹ : DecidableEq ι
inst✝ : Finite ι
val✝ : Fintype ι
⊢ ⨆ i, range (stdBasis R φ i) = ⊤

tactic: convert top_unique (iInf_emptyset.ge.trans <| iInf_ker_proj_le_iSup_range_stdBasis R φ _)
state_before: case intro
R : Type u_1
ι : Type u_2
inst✝⁴ : Semiring R
φ : ι → Type u_3
inst✝³ : (i : ι) → AddCommMonoid (φ i)
inst✝² : (i : ι) → Module R (φ i)
inst✝¹ : DecidableEq ι
inst✝ : Finite ι
val✝ : Fintype ι
⊢ ⨆ i, range (stdBasis R φ i) = ⊤
state_after: case h.e'_2.h.e'_4.h
R : Type u_1
ι : Type u_2
inst✝⁴ : Semiring R
φ : ι → Type u_3
inst✝³ : (i : ι) → AddCommMonoid (φ i)
inst✝² : (i : ι) → Module R (φ i)
inst✝¹ : DecidableEq ι
inst✝ : Finite ι
val✝ : Fintype ι
x✝ : ι
⊢ range (stdBasis R φ x✝) = ⨆ (_ : x✝ ∈ ?intro.convert_1), range (stdBasis R φ x✝)

case intro.convert_1
R : Type u_1
ι : Type u_2
inst✝⁴ : Semiring R
φ : ι → Type u_3
inst✝³ : (i : ι) → AddCommMonoid (φ i)
inst✝² : (i : ι) → Module R (φ i)
inst✝¹ : DecidableEq ι
inst✝ : Finite ι
val✝ : Fintype ι
⊢ Finset ι

case intro.convert_2
R : Type u_1
ι : Type u_2
inst✝⁴ : Semiring R
φ : ι → Type u_3
inst✝³ : (i : ι) → AddCommMonoid (φ i)
inst✝² : (i : ι) → Module R (φ i)
inst✝¹ : DecidableEq ι
inst✝ : Finite ι
val✝ : Fintype ι
⊢ univ ⊆ ↑?intro.convert_1 ∪ ∅

tactic: rename_i i
state_before: case h.e'_2.h.e'_4.h
R : Type u_1
ι : Type u_2
inst✝⁴ : Semiring R
φ : ι → Type u_3
inst✝³ : (i : ι) → AddCommMonoid (φ i)
inst✝² : (i : ι) → Module R (φ i)
inst✝¹ : DecidableEq ι
inst✝ : Finite ι
val✝ : Fintype ι
x✝ : ι
⊢ range (stdBasis R φ x✝) = ⨆ (_ : x✝ ∈ ?intro.convert_1), range (stdBasis R φ x✝)
state_after: case h.e'_2.h.e'_4.h
R : Type u_1
ι : Type u_2
inst✝⁴ : Semiring R
φ : ι → Type u_3
inst✝³ : (i : ι) → AddCommMonoid (φ i)
inst✝² : (i : ι) → Module R (φ i)
inst✝¹ : DecidableEq ι
inst✝ : Finite ι
val✝ : Fintype ι
i : ι
⊢ range (stdBasis R φ i) = ⨆ (_ : i ∈ ?intro.convert_1), range (stdBasis R φ i)

tactic: exact ((@iSup_pos _ _ _ fun _ => range <| stdBasis R φ i) <| Finset.mem_univ i).symm
state_before: case h.e'_2.h.e'_4.h
R : Type u_1
ι : Type u_2
inst✝⁴ : Semiring R
φ : ι → Type u_3
inst✝³ : (i : ι) → AddCommMonoid (φ i)
inst✝² : (i : ι) → Module R (φ i)
inst✝¹ : DecidableEq ι
inst✝ : Finite ι
val✝ : Fintype ι
i : ι
⊢ range (stdBasis R φ i) = ⨆ (_ : i ∈ ?intro.convert_1), range (stdBasis R φ i)
state_after: no goals

tactic: rw [Finset.coe_univ, Set.union_empty]
state_before: case intro.convert_2
R : Type u_1
ι : Type u_2
inst✝⁴ : Semiring R
φ : ι → Type u_3
inst✝³ : (i : ι) → AddCommMonoid (φ i)
inst✝² : (i : ι) → Module R (φ i)
inst✝¹ : DecidableEq ι
inst✝ : Finite ι
val✝ : Fintype ι
⊢ univ ⊆ ↑Finset.univ ∪ ∅
state_after: no goals
Theorem: pow_bit1'
File: Mathlib/Algebra/Group/Commute/Defs.lean

tactic: rw [bit1, pow_succ, pow_bit0']
state_before: G : Type u_1
M : Type u_2
S : Type u_3
inst✝ : Monoid M
a : M
n : ℕ
⊢ a ^ bit1 n = (a * a) ^ n * a
state_after: no goals
Theorem: Matrix.comp_equiv_dotProduct_comp_equiv
File: Mathlib/Data/Matrix/Basic.lean

tactic: rw [← dotProduct_comp_equiv_symm]
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝² : Fintype m
inst✝¹ : Fintype n
inst✝ : NonUnitalNonAssocSemiring α
u v w : m → α
x y : n → α
e : m ≃ n
⊢ x ∘ ⇑e ⬝ᵥ y ∘ ⇑e = x ⬝ᵥ y
state_after: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝² : Fintype m
inst✝¹ : Fintype n
inst✝ : NonUnitalNonAssocSemiring α
u v w : m → α
x y : n → α
e : m ≃ n
⊢ x ⬝ᵥ (y ∘ ⇑e) ∘ ⇑e.symm = x ⬝ᵥ y

tactic: simp only [Function.comp, Equiv.apply_symm_apply]
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝² : Fintype m
inst✝¹ : Fintype n
inst✝ : NonUnitalNonAssocSemiring α
u v w : m → α
x y : n → α
e : m ≃ n
⊢ x ⬝ᵥ (y ∘ ⇑e) ∘ ⇑e.symm = x ⬝ᵥ y
state_after: no goals
Theorem: Finset.prod_of_injOn
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: classical
exact (prod_nbij e (fun a ↦ mem_image_of_mem e) he (by simp [Set.surjOn_image]) h).trans <|
  prod_subset (image_subset_iff.2 hest) <| by simpa using h'
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 β
ι : Type u_6
κ : Type u_7
α : Type u_8
inst✝ : CommMonoid α
s : Finset ι
t : Finset κ
f : ι → α
g : κ → α
e : ι → κ
he : Set.InjOn e ↑s
hest : Set.MapsTo e ↑s ↑t
h' : ∀ i ∈ t, i ∉ e '' ↑s → g i = 1
h : ∀ i ∈ s, f i = g (e i)
⊢ ∏ i ∈ s, f i = ∏ j ∈ t, g j
state_after: no goals

tactic: exact (prod_nbij e (fun a ↦ mem_image_of_mem e) he (by simp [Set.surjOn_image]) h).trans <|
  prod_subset (image_subset_iff.2 hest) <| by simpa using h'
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 β
ι : Type u_6
κ : Type u_7
α : Type u_8
inst✝ : CommMonoid α
s : Finset ι
t : Finset κ
f : ι → α
g : κ → α
e : ι → κ
he : Set.InjOn e ↑s
hest : Set.MapsTo e ↑s ↑t
h' : ∀ i ∈ t, i ∉ e '' ↑s → g i = 1
h : ∀ i ∈ s, f i = g (e i)
⊢ ∏ i ∈ s, f i = ∏ j ∈ t, g j
state_after: no goals

tactic: simp [Set.surjOn_image]
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 β
ι : Type u_6
κ : Type u_7
α : Type u_8
inst✝ : CommMonoid α
s : Finset ι
t : Finset κ
f : ι → α
g : κ → α
e : ι → κ
he : Set.InjOn e ↑s
hest : Set.MapsTo e ↑s ↑t
h' : ∀ i ∈ t, i ∉ e '' ↑s → g i = 1
h : ∀ i ∈ s, f i = g (e i)
⊢ Set.SurjOn e ↑s ↑(image e s)
state_after: no goals

tactic: simpa using h'
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 β
ι : Type u_6
κ : Type u_7
α : Type u_8
inst✝ : CommMonoid α
s : Finset ι
t : Finset κ
f : ι → α
g : κ → α
e : ι → κ
he : Set.InjOn e ↑s
hest : Set.MapsTo e ↑s ↑t
h' : ∀ i ∈ t, i ∉ e '' ↑s → g i = 1
h : ∀ i ∈ s, f i = g (e i)
⊢ ∀ x ∈ t, x ∉ image e s → g x = 1
state_after: no goals
Theorem: Associates.out_mul
File: Mathlib/Algebra/GCDMonoid/Basic.lean

tactic: simp only [Associates.quotient_mk_eq_mk, out_mk, mk_mul_mk, normalize.map_mul]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizationMonoid α
a b : Associates α
x✝¹ x✝ : α
⊢ (⟦x✝¹⟧ * ⟦x✝⟧).out = Associates.out ⟦x✝¹⟧ * Associates.out ⟦x✝⟧
state_after: no goals
Theorem: Units.inv_mul_of_eq
File: Mathlib/Algebra/Group/Units.lean

tactic: rw [← h, u.inv_mul]
state_before: α : Type u
inst✝ : Monoid α
a✝ b c u : αˣ
a : α
h : ↑u = a
⊢ ↑u⁻¹ * a = 1
state_after: no goals
Theorem: map_extChartAt_nhdsWithin'
File: Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean

tactic: rwa [← extChartAt_source I]
state_before: 𝕜 : Type u_1
E : Type u_2
M : Type u_3
H : Type u_4
E' : Type u_5
M' : Type u_6
H' : Type u_7
inst✝¹⁰ : NontriviallyNormedField 𝕜
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : TopologicalSpace H
inst✝⁶ : TopologicalSpace M
f f' : PartialHomeomorph M H
I : ModelWithCorners 𝕜 E H
inst✝⁵ : NormedAddCommGroup E'
inst✝⁴ : NormedSpace 𝕜 E'
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
I' : ModelWithCorners 𝕜 E' H'
s t : Set M
inst✝¹ : ChartedSpace H M
inst✝ : ChartedSpace H' M'
x y : M
hy : y ∈ (extChartAt I x).source
⊢ y ∈ (chartAt H x).source
state_after: no goals
Theorem: CategoryTheory.Presieve.isSheafFor_top_sieve
File: Mathlib/CategoryTheory/Sites/IsSheafFor.lean

tactic: rw [← generate_of_singleton_isSplitEpi (𝟙 X)]
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
P : Cᵒᵖ ⥤ Type w
⊢ IsSheafFor P ⊤.arrows
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
P : Cᵒᵖ ⥤ Type w
⊢ IsSheafFor P (generate (singleton (𝟙 X))).arrows

tactic: rw [← isSheafFor_iff_generate]
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
P : Cᵒᵖ ⥤ Type w
⊢ IsSheafFor P (generate (singleton (𝟙 X))).arrows
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
P : Cᵒᵖ ⥤ Type w
⊢ IsSheafFor P (singleton (𝟙 X))

tactic: apply isSheafFor_singleton_iso
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
P : Cᵒᵖ ⥤ Type w
⊢ IsSheafFor P (singleton (𝟙 X))
state_after: no goals
Theorem: Real.sign_zero
File: Mathlib/Data/Real/Sign.lean

tactic: rw [sign, if_neg (lt_irrefl _), if_neg (lt_irrefl _)]
state_before: ⊢ sign 0 = 0
state_after: no goals
Theorem: MeasureTheory.withDensity_indicator
File: Mathlib/MeasureTheory/Measure/WithDensity.lean

tactic: ext1 t ht
state_before: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
s : Set α
hs : MeasurableSet s
f : α → ℝ≥0∞
⊢ μ.withDensity (s.indicator f) = (μ.restrict s).withDensity f
state_after: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
s : Set α
hs : MeasurableSet s
f : α → ℝ≥0∞
t : Set α
ht : MeasurableSet t
⊢ (μ.withDensity (s.indicator f)) t = ((μ.restrict s).withDensity f) t

tactic: rw [withDensity_apply _ ht, lintegral_indicator _ hs, restrict_comm hs, ←
  withDensity_apply _ ht]
state_before: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
s : Set α
hs : MeasurableSet s
f : α → ℝ≥0∞
t : Set α
ht : MeasurableSet t
⊢ (μ.withDensity (s.indicator f)) t = ((μ.restrict s).withDensity f) t
state_after: no goals
Theorem: Finset.inter_insert_of_mem
File: Mathlib/Data/Finset/Basic.lean

tactic: rw [inter_comm, insert_inter_of_mem h, inter_comm]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s s₁✝ s₂✝ t t₁ t₂ u v : Finset α
a✝ b : α
s₁ s₂ : Finset α
a : α
h : a ∈ s₁
⊢ s₁ ∩ insert a s₂ = insert a (s₁ ∩ s₂)
state_after: no goals
Theorem: Complex.hasSum_cos
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean

tactic: convert Complex.hasSum_cos' z using 1
state_before: z : ℂ
⊢ HasSum (fun n => (-1) ^ n * z ^ (2 * n) / ↑(2 * n)!) (cos z)
state_after: case h.e'_5
z : ℂ
⊢ (fun n => (-1) ^ n * z ^ (2 * n) / ↑(2 * n)!) = fun n => (z * I) ^ (2 * n) / ↑(2 * n)!

tactic: simp_rw [mul_pow, pow_mul, Complex.I_sq, mul_comm]
state_before: case h.e'_5
z : ℂ
⊢ (fun n => (-1) ^ n * z ^ (2 * n) / ↑(2 * n)!) = fun n => (z * I) ^ (2 * n) / ↑(2 * n)!
state_after: no goals
Theorem: ModuleCat.MonoidalCategory.triangle
File: Mathlib/Algebra/Category/ModuleCat/Monoidal/Basic.lean

tactic: apply TensorProduct.ext_threefold
state_before: R : Type u
inst✝ : CommRing R
M N : ModuleCat R
⊢ (associator M (of R R) N).hom ≫ tensorHom (𝟙 M) (leftUnitor N).hom = tensorHom (rightUnitor M).hom (𝟙 N)
state_after: case H
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
⊢ ∀ (x : ↑M) (y : ↑(of R R)) (z : ↑N),
    ((associator M (of R R) N).hom ≫ tensorHom (𝟙 M) (leftUnitor N).hom) ((x ⊗ₜ[R] y) ⊗ₜ[R] z) =
      (tensorHom (rightUnitor M).hom (𝟙 N)) ((x ⊗ₜ[R] y) ⊗ₜ[R] z)

tactic: intro x y z
state_before: case H
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
⊢ ∀ (x : ↑M) (y : ↑(of R R)) (z : ↑N),
    ((associator M (of R R) N).hom ≫ tensorHom (𝟙 M) (leftUnitor N).hom) ((x ⊗ₜ[R] y) ⊗ₜ[R] z) =
      (tensorHom (rightUnitor M).hom (𝟙 N)) ((x ⊗ₜ[R] y) ⊗ₜ[R] z)
state_after: case H
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
x : ↑M
y : ↑(of R R)
z : ↑N
⊢ ((associator M (of R R) N).hom ≫ tensorHom (𝟙 M) (leftUnitor N).hom) ((x ⊗ₜ[R] y) ⊗ₜ[R] z) =
    (tensorHom (rightUnitor M).hom (𝟙 N)) ((x ⊗ₜ[R] y) ⊗ₜ[R] z)

tactic: change R at y
state_before: case H
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
x : ↑M
y : ↑(of R R)
z : ↑N
⊢ ((associator M (of R R) N).hom ≫ tensorHom (𝟙 M) (leftUnitor N).hom) ((x ⊗ₜ[R] y) ⊗ₜ[R] z) =
    (tensorHom (rightUnitor M).hom (𝟙 N)) ((x ⊗ₜ[R] y) ⊗ₜ[R] z)
state_after: case H
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
x : ↑M
z : ↑N
y : R
⊢ ((associator M (of R R) N).hom ≫ tensorHom (𝟙 M) (leftUnitor N).hom) ((x ⊗ₜ[R] y) ⊗ₜ[R] z) =
    (tensorHom (rightUnitor M).hom (𝟙 N)) ((x ⊗ₜ[R] y) ⊗ₜ[R] z)

tactic: change x ⊗ₜ[R] ((leftUnitor N).hom) (y ⊗ₜ[R] z) = ((rightUnitor M).hom) (x ⊗ₜ[R] y) ⊗ₜ[R] z
state_before: case H
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
x : ↑M
z : ↑N
y : R
⊢ ((associator M (of R R) N).hom ≫ tensorHom (𝟙 M) (leftUnitor N).hom) ((x ⊗ₜ[R] y) ⊗ₜ[R] z) =
    (tensorHom (rightUnitor M).hom (𝟙 N)) ((x ⊗ₜ[R] y) ⊗ₜ[R] z)
state_after: case H
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
x : ↑M
z : ↑N
y : R
⊢ x ⊗ₜ[R] (leftUnitor N).hom (y ⊗ₜ[R] z) = (rightUnitor M).hom (x ⊗ₜ[R] y) ⊗ₜ[R] z

tactic: erw [TensorProduct.lid_tmul, TensorProduct.rid_tmul]
state_before: case H
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
x : ↑M
z : ↑N
y : R
⊢ x ⊗ₜ[R] (leftUnitor N).hom (y ⊗ₜ[R] z) = (rightUnitor M).hom (x ⊗ₜ[R] y) ⊗ₜ[R] z
state_after: case H
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
x : ↑M
z : ↑N
y : R
⊢ x ⊗ₜ[R] (y • z) = (y • x) ⊗ₜ[R] z

tactic: exact (TensorProduct.smul_tmul _ _ _).symm
state_before: case H
R : Type u
inst✝ : CommRing R
M N : ModuleCat R
x : ↑M
z : ↑N
y : R
⊢ x ⊗ₜ[R] (y • z) = (y • x) ⊗ₜ[R] z
state_after: no goals
Theorem: NormedCommGroup.tendsto_nhds_one
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: simp only [dist_one_right]
state_before: 𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
f : α → E
l : Filter α
⊢ (∀ ε > 0, ∀ᶠ (x : α) in l, dist (f x) 1 < ε) ↔ ∀ ε > 0, ∀ᶠ (x : α) in l, ‖f x‖ < ε
state_after: no goals
Theorem: Subgroup.card_mul_index
File: Mathlib/GroupTheory/Index.lean

tactic: rw [← relindex_bot_left, ← index_bot]
state_before: G : Type u_1
inst✝ : Group G
H K L : Subgroup G
⊢ Nat.card ↥H * H.index = Nat.card G
state_after: G : Type u_1
inst✝ : Group G
H K L : Subgroup G
⊢ ⊥.relindex H * H.index = ⊥.index

tactic: exact relindex_mul_index bot_le
state_before: G : Type u_1
inst✝ : Group G
H K L : Subgroup G
⊢ ⊥.relindex H * H.index = ⊥.index
state_after: no goals
Theorem: Cardinal.is_prime_iff
File: Mathlib/SetTheory/Cardinal/Divisibility.lean

tactic: rcases le_or_lt ℵ₀ a with h | h
state_before: a✝ b : Cardinal.{u}
n m : ℕ
a : Cardinal.{u_1}
⊢ Prime a ↔ ℵ₀ ≤ a ∨ ∃ p, a = ↑p ∧ Nat.Prime p
state_after: case inl
a✝ b : Cardinal.{u}
n m : ℕ
a : Cardinal.{u_1}
h : ℵ₀ ≤ a
⊢ Prime a ↔ ℵ₀ ≤ a ∨ ∃ p, a = ↑p ∧ Nat.Prime p

case inr
a✝ b : Cardinal.{u}
n m : ℕ
a : Cardinal.{u_1}
h : a < ℵ₀
⊢ Prime a ↔ ℵ₀ ≤ a ∨ ∃ p, a = ↑p ∧ Nat.Prime p

tactic: lift a to ℕ using id h
state_before: case inr
a✝ b : Cardinal.{u}
n m : ℕ
a : Cardinal.{u_1}
h : a < ℵ₀
⊢ Prime a ↔ ℵ₀ ≤ a ∨ ∃ p, a = ↑p ∧ Nat.Prime p
state_after: case inr.intro
a✝ b : Cardinal.{u}
n m a : ℕ
h : ↑a < ℵ₀
⊢ Prime ↑a ↔ ℵ₀ ≤ ↑a ∨ ∃ p, ↑a = ↑p ∧ Nat.Prime p

tactic: simp [not_le.mpr h]
state_before: case inr.intro
a✝ b : Cardinal.{u}
n m a : ℕ
h : ↑a < ℵ₀
⊢ Prime ↑a ↔ ℵ₀ ≤ ↑a ∨ ∃ p, ↑a = ↑p ∧ Nat.Prime p
state_after: no goals

tactic: simp [h]
state_before: case inl
a✝ b : Cardinal.{u}
n m : ℕ
a : Cardinal.{u_1}
h : ℵ₀ ≤ a
⊢ Prime a ↔ ℵ₀ ≤ a ∨ ∃ p, a = ↑p ∧ Nat.Prime p
state_after: no goals
Theorem: EuclideanGeometry.dist_div_tan_angle_of_angle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean

tactic: rw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ←
  inner_neg_left, neg_vsub_eq_vsub_rev] at h
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : ∠ p₁ p₂ p₃ = π / 2
h0 : p₁ ≠ p₂ ∨ p₃ = p₂
⊢ dist p₁ p₂ / Real.tan (∠ p₂ p₃ p₁) = dist p₃ p₂
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : ⟪p₂ -ᵥ p₃, p₁ -ᵥ p₂⟫_ℝ = 0
h0 : p₁ ≠ p₂ ∨ p₃ = p₂
⊢ dist p₁ p₂ / Real.tan (∠ p₂ p₃ p₁) = dist p₃ p₂

tactic: rw [eq_comm, ← @vsub_ne_zero V, ← @vsub_eq_zero_iff_eq V, or_comm] at h0
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : ⟪p₂ -ᵥ p₃, p₁ -ᵥ p₂⟫_ℝ = 0
h0 : p₁ ≠ p₂ ∨ p₃ = p₂
⊢ dist p₁ p₂ / Real.tan (∠ p₂ p₃ p₁) = dist p₃ p₂
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : ⟪p₂ -ᵥ p₃, p₁ -ᵥ p₂⟫_ℝ = 0
h0 : p₂ -ᵥ p₃ = 0 ∨ p₁ -ᵥ p₂ ≠ 0
⊢ dist p₁ p₂ / Real.tan (∠ p₂ p₃ p₁) = dist p₃ p₂

tactic: rw [angle, dist_eq_norm_vsub V p₁ p₂, dist_eq_norm_vsub' V p₃ p₂, ← vsub_add_vsub_cancel p₁ p₂ p₃,
  add_comm, norm_div_tan_angle_add_of_inner_eq_zero h h0]
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : ⟪p₂ -ᵥ p₃, p₁ -ᵥ p₂⟫_ℝ = 0
h0 : p₂ -ᵥ p₃ = 0 ∨ p₁ -ᵥ p₂ ≠ 0
⊢ dist p₁ p₂ / Real.tan (∠ p₂ p₃ p₁) = dist p₃ p₂
state_after: no goals
Theorem: MeasureTheory.OuterMeasure.le_add_caratheodory
File: Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean

tactic: simp [hs₁ t, hs₂ t, add_left_comm, add_assoc]
state_before: α : Type u_1
m₁ m₂ : OuterMeasure α
s : Set α
x✝ : MeasurableSet s
t : Set α
hs₁ : s ∈ (fun m => {t | MeasurableSet t}) m₁.caratheodory
hs₂ : s ∈ (fun m => {t | MeasurableSet t}) m₂.caratheodory
⊢ (m₁ + m₂) t = (m₁ + m₂) (t ∩ s) + (m₁ + m₂) (t \ s)
state_after: no goals
Theorem: Finset.prod_lt_prod_of_nonempty'
File: Mathlib/Algebra/Order/BigOperators/Group/Finset.lean

tactic: aesop
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
G : Type u_6
k : Type u_7
R : Type u_8
inst✝ : OrderedCancelCommMonoid M
f g : ι → M
s t : Finset ι
hs : s.Nonempty
hlt : ∀ i ∈ s, f i < g i
⊢ s.val ≠ ∅
state_after: no goals