1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: CategoryTheory.NatTrans.epi_of_epi_app
File: Mathlib/CategoryTheory/Functor/Category.lean

tactic: ext X
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
E : Type u₃
inst✝¹ : Category.{v₃, u₃} E
F G H I : C ⥤ D
α : F ⟶ G
inst✝ : ∀ (X : C), Epi (α.app X)
Z✝ : C ⥤ D
g h : G ⟶ Z✝
eq : α ≫ g = α ≫ h
⊢ g = h
state_after: case w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
E : Type u₃
inst✝¹ : Category.{v₃, u₃} E
F G H I : C ⥤ D
α : F ⟶ G
inst✝ : ∀ (X : C), Epi (α.app X)
Z✝ : C ⥤ D
g h : G ⟶ Z✝
eq : α ≫ g = α ≫ h
X : C
⊢ g.app X = h.app X

tactic: rw [← cancel_epi (α.app X), ← comp_app, eq, comp_app]
state_before: case w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
E : Type u₃
inst✝¹ : Category.{v₃, u₃} E
F G H I : C ⥤ D
α : F ⟶ G
inst✝ : ∀ (X : C), Epi (α.app X)
Z✝ : C ⥤ D
g h : G ⟶ Z✝
eq : α ≫ g = α ≫ h
X : C
⊢ g.app X = h.app X
state_after: no goals
Theorem: Orientation.eq_rotation_self_iff_angle_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean

tactic: rw [← o.rotation_eq_self_iff_angle_eq_zero hx, eq_comm]
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x : V
hx : x ≠ 0
θ : Real.Angle
⊢ x = (o.rotation θ) x ↔ θ = 0
state_after: no goals
Theorem: Asymptotics.isLittleO_iff
File: Mathlib/Analysis/Asymptotics/Asymptotics.lean

tactic: simp only [IsLittleO_def, IsBigOWith_def]
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
E' : Type u_6
F' : Type u_7
G' : Type u_8
E'' : Type u_9
F'' : Type u_10
G'' : Type u_11
E''' : Type u_12
R : Type u_13
R' : Type u_14
𝕜 : Type u_15
𝕜' : Type u_16
inst✝¹³ : Norm E
inst✝¹² : Norm F
inst✝¹¹ : Norm G
inst✝¹⁰ : SeminormedAddCommGroup E'
inst✝⁹ : SeminormedAddCommGroup F'
inst✝⁸ : SeminormedAddCommGroup G'
inst✝⁷ : NormedAddCommGroup E''
inst✝⁶ : NormedAddCommGroup F''
inst✝⁵ : NormedAddCommGroup G''
inst✝⁴ : SeminormedRing R
inst✝³ : SeminormedAddGroup E'''
inst✝² : SeminormedRing R'
inst✝¹ : NormedDivisionRing 𝕜
inst✝ : NormedDivisionRing 𝕜'
c c' c₁ c₂ : ℝ
f : α → E
g : α → F
k : α → G
f' : α → E'
g' : α → F'
k' : α → G'
f'' : α → E''
g'' : α → F''
k'' : α → G''
l l' : Filter α
⊢ f =o[l] g ↔ ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x : α) in l, ‖f x‖ ≤ c * ‖g x‖
state_after: no goals
Theorem: Batteries.OrientedOrd.instLexOrd
File: .lake/packages/batteries/Batteries/Classes/Order.lean

tactic: rw [OrientedOrd, lexOrd_def]
state_before: α : Type u_1
β : Type u_2
inst✝³ : Ord α
inst✝² : Ord β
inst✝¹ : OrientedOrd α
inst✝ : OrientedOrd β
⊢ OrientedOrd (α × β)
state_after: α : Type u_1
β : Type u_2
inst✝³ : Ord α
inst✝² : Ord β
inst✝¹ : OrientedOrd α
inst✝ : OrientedOrd β
⊢ OrientedCmp (compareLex (compareOn fun x => x.fst) (compareOn fun x => x.snd))

tactic: infer_instance
state_before: α : Type u_1
β : Type u_2
inst✝³ : Ord α
inst✝² : Ord β
inst✝¹ : OrientedOrd α
inst✝ : OrientedOrd β
⊢ OrientedCmp (compareLex (compareOn fun x => x.fst) (compareOn fun x => x.snd))
state_after: no goals
Theorem: ModularForm.gradedMonoid_eq_of_cast
File: Mathlib/NumberTheory/ModularForms/Basic.lean

tactic: obtain ⟨i, a⟩ := a
state_before: Γ : Subgroup SL(2, ℤ)
a b : GradedMonoid (ModularForm Γ)
h : a.fst = b.fst
h2 : mcast h a.snd = b.snd
⊢ a = b
state_after: case mk
Γ : Subgroup SL(2, ℤ)
b : GradedMonoid (ModularForm Γ)
i : ℤ
a : ModularForm Γ i
h : ⟨i, a⟩.fst = b.fst
h2 : mcast h ⟨i, a⟩.snd = b.snd
⊢ ⟨i, a⟩ = b

tactic: obtain ⟨j, b⟩ := b
state_before: case mk
Γ : Subgroup SL(2, ℤ)
b : GradedMonoid (ModularForm Γ)
i : ℤ
a : ModularForm Γ i
h : ⟨i, a⟩.fst = b.fst
h2 : mcast h ⟨i, a⟩.snd = b.snd
⊢ ⟨i, a⟩ = b
state_after: case mk.mk
Γ : Subgroup SL(2, ℤ)
i : ℤ
a : ModularForm Γ i
j : ℤ
b : ModularForm Γ j
h : ⟨i, a⟩.fst = ⟨j, b⟩.fst
h2 : mcast h ⟨i, a⟩.snd = ⟨j, b⟩.snd
⊢ ⟨i, a⟩ = ⟨j, b⟩

tactic: cases h
state_before: case mk.mk
Γ : Subgroup SL(2, ℤ)
i : ℤ
a : ModularForm Γ i
j : ℤ
b : ModularForm Γ j
h : ⟨i, a⟩.fst = ⟨j, b⟩.fst
h2 : mcast h ⟨i, a⟩.snd = ⟨j, b⟩.snd
⊢ ⟨i, a⟩ = ⟨j, b⟩
state_after: case mk.mk.refl
Γ : Subgroup SL(2, ℤ)
i : ℤ
a b : ModularForm Γ i
h2 : mcast ⋯ ⟨i, a⟩.snd = ⟨i, b⟩.snd
⊢ ⟨i, a⟩ = ⟨i, b⟩

tactic: exact congr_arg _ h2
state_before: case mk.mk.refl
Γ : Subgroup SL(2, ℤ)
i : ℤ
a b : ModularForm Γ i
h2 : mcast ⋯ ⟨i, a⟩.snd = ⟨i, b⟩.snd
⊢ ⟨i, a⟩ = ⟨i, b⟩
state_after: no goals
Theorem: LinearMap.disjoint_ker'
File: Mathlib/Algebra/Module/Submodule/Ker.lean

tactic: simp [h]
state_before: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
K : Type u_5
M : Type u_6
M₁ : Type u_7
M₂ : Type u_8
M₃ : Type u_9
V : Type u_10
V₂ : Type u_11
inst✝¹¹ : Ring R
inst✝¹⁰ : Ring R₂
inst✝⁹ : Ring R₃
inst✝⁸ : AddCommGroup M
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : Module R M
inst✝⁴ : Module R₂ M₂
inst✝³ : Module R₃ M₃
τ₁₂ : R →+* R₂
τ₂₃ : R₂ →+* R₃
τ₁₃ : R →+* R₃
inst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃
F : Type u_12
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F τ₁₂ M M₂
f : F
p : Submodule R M
H : ∀ x ∈ p, f x = 0 → x = 0
x : M
hx : x ∈ p
y : M
hy : y ∈ p
h : f x = f y
⊢ f (x - y) = 0
state_after: no goals

tactic: simpa using h₂
state_before: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
K : Type u_5
M : Type u_6
M₁ : Type u_7
M₂ : Type u_8
M₃ : Type u_9
V : Type u_10
V₂ : Type u_11
inst✝¹¹ : Ring R
inst✝¹⁰ : Ring R₂
inst✝⁹ : Ring R₃
inst✝⁸ : AddCommGroup M
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : Module R M
inst✝⁴ : Module R₂ M₂
inst✝³ : Module R₃ M₃
τ₁₂ : R →+* R₂
τ₂₃ : R₂ →+* R₃
τ₁₃ : R →+* R₃
inst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃
F : Type u_12
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F τ₁₂ M M₂
f : F
p : Submodule R M
H : ∀ x ∈ p, ∀ y ∈ p, f x = f y → x = y
x : M
h₁ : x ∈ p
h₂ : f x = 0
⊢ f x = f 0
state_after: no goals
Theorem: FractionalIdeal.num_le
File: Mathlib/RingTheory/FractionalIdeal/Operations.lean

tactic: rw [← I.den_mul_self_eq_num', spanSingleton_mul_le_iff]
state_before: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
P : Type u_2
inst✝⁶ : CommRing P
inst✝⁵ : Algebra R P
loc : IsLocalization S P
R₁ : Type u_3
inst✝⁴ : CommRing R₁
K : Type u_4
inst✝³ : Field K
inst✝² : Algebra R₁ K
inst✝¹ : IsFractionRing R₁ K
inst✝ : IsDomain R₁
I : FractionalIdeal S P
⊢ ↑I.num ≤ I
state_after: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
P : Type u_2
inst✝⁶ : CommRing P
inst✝⁵ : Algebra R P
loc : IsLocalization S P
R₁ : Type u_3
inst✝⁴ : CommRing R₁
K : Type u_4
inst✝³ : Field K
inst✝² : Algebra R₁ K
inst✝¹ : IsFractionRing R₁ K
inst✝ : IsDomain R₁
I : FractionalIdeal S P
⊢ ∀ z ∈ I, (algebraMap R P) ↑I.den * z ∈ I

tactic: intro _ h
state_before: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
P : Type u_2
inst✝⁶ : CommRing P
inst✝⁵ : Algebra R P
loc : IsLocalization S P
R₁ : Type u_3
inst✝⁴ : CommRing R₁
K : Type u_4
inst✝³ : Field K
inst✝² : Algebra R₁ K
inst✝¹ : IsFractionRing R₁ K
inst✝ : IsDomain R₁
I : FractionalIdeal S P
⊢ ∀ z ∈ I, (algebraMap R P) ↑I.den * z ∈ I
state_after: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
P : Type u_2
inst✝⁶ : CommRing P
inst✝⁵ : Algebra R P
loc : IsLocalization S P
R₁ : Type u_3
inst✝⁴ : CommRing R₁
K : Type u_4
inst✝³ : Field K
inst✝² : Algebra R₁ K
inst✝¹ : IsFractionRing R₁ K
inst✝ : IsDomain R₁
I : FractionalIdeal S P
z✝ : P
h : z✝ ∈ I
⊢ (algebraMap R P) ↑I.den * z✝ ∈ I

tactic: rw [← Algebra.smul_def]
state_before: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
P : Type u_2
inst✝⁶ : CommRing P
inst✝⁵ : Algebra R P
loc : IsLocalization S P
R₁ : Type u_3
inst✝⁴ : CommRing R₁
K : Type u_4
inst✝³ : Field K
inst✝² : Algebra R₁ K
inst✝¹ : IsFractionRing R₁ K
inst✝ : IsDomain R₁
I : FractionalIdeal S P
z✝ : P
h : z✝ ∈ I
⊢ (algebraMap R P) ↑I.den * z✝ ∈ I
state_after: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
P : Type u_2
inst✝⁶ : CommRing P
inst✝⁵ : Algebra R P
loc : IsLocalization S P
R₁ : Type u_3
inst✝⁴ : CommRing R₁
K : Type u_4
inst✝³ : Field K
inst✝² : Algebra R₁ K
inst✝¹ : IsFractionRing R₁ K
inst✝ : IsDomain R₁
I : FractionalIdeal S P
z✝ : P
h : z✝ ∈ I
⊢ ↑I.den • z✝ ∈ I

tactic: exact Submodule.smul_mem _ _ h
state_before: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
P : Type u_2
inst✝⁶ : CommRing P
inst✝⁵ : Algebra R P
loc : IsLocalization S P
R₁ : Type u_3
inst✝⁴ : CommRing R₁
K : Type u_4
inst✝³ : Field K
inst✝² : Algebra R₁ K
inst✝¹ : IsFractionRing R₁ K
inst✝ : IsDomain R₁
I : FractionalIdeal S P
z✝ : P
h : z✝ ∈ I
⊢ ↑I.den • z✝ ∈ I
state_after: no goals
Theorem: ContinuousLinearMap.map_neg
File: Mathlib/Topology/Algebra/Module/Basic.lean

tactic: exact map_neg f x
state_before: R : Type u_1
inst✝¹³ : Ring R
R₂ : Type u_2
inst✝¹² : Ring R₂
R₃ : Type u_3
inst✝¹¹ : Ring R₃
M : Type u_4
inst✝¹⁰ : TopologicalSpace M
inst✝⁹ : AddCommGroup M
M₂ : Type u_5
inst✝⁸ : TopologicalSpace M₂
inst✝⁷ : AddCommGroup M₂
M₃ : Type u_6
inst✝⁶ : TopologicalSpace M₃
inst✝⁵ : AddCommGroup M₃
M₄ : Type u_7
inst✝⁴ : TopologicalSpace M₄
inst✝³ : AddCommGroup M₄
inst✝² : Module R M
inst✝¹ : Module R₂ M₂
inst✝ : Module R₃ M₃
σ₁₂ : R →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R →+* R₃
f : M →SL[σ₁₂] M₂
x : M
⊢ f (-x) = -f x
state_after: no goals
Theorem: Finset.image_mul_right
File: Mathlib/Data/Finset/Pointwise.lean

tactic: simp
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝⁵ : DecidableEq α
inst✝⁴ : DecidableEq β
inst✝³ : Group α
inst✝² : DivisionMonoid β
inst✝¹ : FunLike F α β
inst✝ : MonoidHomClass F α β
f : F
s t : Finset α
a b : α
⊢ ↑(image (fun x => x * b) t) = ↑(t.preimage (fun x => x * b⁻¹) ⋯)
state_after: no goals
Theorem: CategoryTheory.SemiadditiveOfBinaryBiproducts.add_comp
File: Mathlib/CategoryTheory/Preadditive/OfBiproducts.lean

tactic: simp only [add_eq_right_addition, Category.assoc]
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
inst✝ : HasBinaryBiproducts C
X Y Z : C
f g : X ⟶ Y
h : Y ⟶ Z
⊢ (f + g) ≫ h = f ≫ h + g ≫ h
state_after: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
inst✝ : HasBinaryBiproducts C
X Y Z : C
f g : X ⟶ Y
h : Y ⟶ Z
⊢ biprod.lift (𝟙 X) (𝟙 X) ≫ biprod.desc f g ≫ h = biprod.lift (𝟙 X) (𝟙 X) ≫ biprod.desc (f ≫ h) (g ≫ h)

tactic: congr
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
inst✝ : HasBinaryBiproducts C
X Y Z : C
f g : X ⟶ Y
h : Y ⟶ Z
⊢ biprod.lift (𝟙 X) (𝟙 X) ≫ biprod.desc f g ≫ h = biprod.lift (𝟙 X) (𝟙 X) ≫ biprod.desc (f ≫ h) (g ≫ h)
state_after: case e_a
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
inst✝ : HasBinaryBiproducts C
X Y Z : C
f g : X ⟶ Y
h : Y ⟶ Z
⊢ biprod.desc f g ≫ h = biprod.desc (f ≫ h) (g ≫ h)

tactic: ext <;> simp
state_before: case e_a
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
inst✝ : HasBinaryBiproducts C
X Y Z : C
f g : X ⟶ Y
h : Y ⟶ Z
⊢ biprod.desc f g ≫ h = biprod.desc (f ≫ h) (g ≫ h)
state_after: no goals
Theorem: Finsupp.neLocus_eq_empty
File: Mathlib/Data/Finsupp/NeLocus.lean

tactic: simp only [neLocus, Ne, eq_self_iff_true, not_true, Finset.filter_False]
state_before: α : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
inst✝² : DecidableEq α
inst✝¹ : DecidableEq N
inst✝ : Zero N
f✝ g✝ f g : α →₀ N
h : f = g
⊢ f.neLocus f = ∅
state_after: no goals
Theorem: Ordinal.nfpBFamily_fp
File: Mathlib/SetTheory/Ordinal/FixedPoint.lean

tactic: rw [← familyOfBFamily_enum o f]
state_before: o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
i : Ordinal.{u}
hi : i < o
H : IsNormal (f i hi)
a : Ordinal.{max v u}
⊢ f i hi (o.nfpBFamily f a) = o.nfpBFamily f a
state_after: o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
i : Ordinal.{u}
hi : i < o
H : IsNormal (f i hi)
a : Ordinal.{max v u}
⊢ o.familyOfBFamily f (enum (fun x x_1 => x < x_1) i ⋯) (o.nfpBFamily f a) = o.nfpBFamily f a

tactic: apply nfpFamily_fp
state_before: o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
i : Ordinal.{u}
hi : i < o
H : IsNormal (f i hi)
a : Ordinal.{max v u}
⊢ o.familyOfBFamily f (enum (fun x x_1 => x < x_1) i ⋯) (o.nfpBFamily f a) = o.nfpBFamily f a
state_after: case H
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
i : Ordinal.{u}
hi : i < o
H : IsNormal (f i hi)
a : Ordinal.{max v u}
⊢ IsNormal (o.familyOfBFamily f (enum (fun x x_1 => x < x_1) i ⋯))

tactic: rw [familyOfBFamily_enum]
state_before: case H
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
i : Ordinal.{u}
hi : i < o
H : IsNormal (f i hi)
a : Ordinal.{max v u}
⊢ IsNormal (o.familyOfBFamily f (enum (fun x x_1 => x < x_1) i ⋯))
state_after: case H
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
i : Ordinal.{u}
hi : i < o
H : IsNormal (f i hi)
a : Ordinal.{max v u}
⊢ IsNormal (f i ?H.hi)

case H.hi
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
i : Ordinal.{u}
hi : i < o
H : IsNormal (f i hi)
a : Ordinal.{max v u}
⊢ i < o

tactic: exact H
state_before: case H
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
i : Ordinal.{u}
hi : i < o
H : IsNormal (f i hi)
a : Ordinal.{max v u}
⊢ IsNormal (f i ?H.hi)

case H.hi
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
i : Ordinal.{u}
hi : i < o
H : IsNormal (f i hi)
a : Ordinal.{max v u}
⊢ i < o
state_after: no goals
Theorem: IsCoatom.isMaximal
File: Mathlib/Order/Ideal.lean

tactic: simp [hI.2 _ hJ]
state_before: P : Type u_1
inst✝² : LE P
inst✝¹ : IsDirected P fun x x_1 => x ≤ x_1
inst✝ : Nonempty P
I : Ideal P
hI : IsCoatom I
x✝ : Ideal P
hJ : I < x✝
⊢ ↑x✝ = univ
state_after: no goals
Theorem: Orientation.tan_oangle_add_left_smul_rotation_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean

tactic: rw [o.oangle_add_left_smul_rotation_pi_div_two h, Real.Angle.tan_coe, Real.tan_arctan]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x : V
h : x ≠ 0
r : ℝ
⊢ (o.oangle (x + r • (o.rotation ↑(π / 2)) x) (r • (o.rotation ↑(π / 2)) x)).tan = r⁻¹
state_after: no goals
Theorem: IsLocalization.span_invSubmonoid
File: Mathlib/RingTheory/Localization/InvSubmonoid.lean

tactic: rw [eq_top_iff]
state_before: R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommRing P
inst✝ : IsLocalization M S
⊢ Submodule.span R ↑(invSubmonoid M S) = ⊤
state_after: R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommRing P
inst✝ : IsLocalization M S
⊢ ⊤ ≤ Submodule.span R ↑(invSubmonoid M S)

tactic: rintro x -
state_before: R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommRing P
inst✝ : IsLocalization M S
⊢ ⊤ ≤ Submodule.span R ↑(invSubmonoid M S)
state_after: R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommRing P
inst✝ : IsLocalization M S
x : S
⊢ x ∈ Submodule.span R ↑(invSubmonoid M S)

tactic: rcases IsLocalization.surj'' M x with ⟨r, m, rfl⟩
state_before: R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommRing P
inst✝ : IsLocalization M S
x : S
⊢ x ∈ Submodule.span R ↑(invSubmonoid M S)
state_after: case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommRing P
inst✝ : IsLocalization M S
r : R
m : ↥M
⊢ r • ↑((toInvSubmonoid M S) m) ∈ Submodule.span R ↑(invSubmonoid M S)

tactic: exact Submodule.smul_mem _ _ (Submodule.subset_span (toInvSubmonoid M S m).prop)
state_before: case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommRing P
inst✝ : IsLocalization M S
r : R
m : ↥M
⊢ r • ↑((toInvSubmonoid M S) m) ∈ Submodule.span R ↑(invSubmonoid M S)
state_after: no goals
Theorem: TypeVec.snd_diag
File: Mathlib/Data/TypeVec.lean

tactic: funext i
state_before: n : ℕ
α : TypeVec.{u_1} n
⊢ prod.snd ⊚ prod.diag = id
state_after: case h
n : ℕ
α : TypeVec.{u_1} n
i : Fin2 n
⊢ (prod.snd ⊚ prod.diag) i = id i

tactic: induction i with
| fz => rfl
| fs _ i_ih => apply i_ih
state_before: case h
n : ℕ
α : TypeVec.{u_1} n
i : Fin2 n
⊢ (prod.snd ⊚ prod.diag) i = id i
state_after: no goals

tactic: rfl
state_before: case h.fz
n n✝ : ℕ
α : TypeVec.{u_1} (n✝ + 1)
⊢ (prod.snd ⊚ prod.diag) Fin2.fz = id Fin2.fz
state_after: no goals

tactic: apply i_ih
state_before: case h.fs
n n✝ : ℕ
a✝ : Fin2 n✝
i_ih : ∀ {α : TypeVec.{u_1} n✝}, (prod.snd ⊚ prod.diag) a✝ = id a✝
α : TypeVec.{u_1} (n✝ + 1)
⊢ (prod.snd ⊚ prod.diag) a✝.fs = id a✝.fs
state_after: no goals
Theorem: List.splitOnP_first
File: Mathlib/Data/List/Basic.lean

tactic: induction xs with
| nil => simp [hsep]
| cons hd tl ih => simp [h hd _, ih <| forall_mem_of_forall_mem_cons h]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p : α → Bool
xs ys : List α
ls : List (List α)
f : List α → List α
h : ∀ (x : α), x ∈ xs → ¬p x = true
sep : α
hsep : p sep = true
as : List α
⊢ splitOnP p (xs ++ sep :: as) = xs :: splitOnP p as
state_after: no goals

tactic: simp [hsep]
state_before: case nil
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p : α → Bool
xs ys : List α
ls : List (List α)
f : List α → List α
sep : α
hsep : p sep = true
as : List α
h : ∀ (x : α), x ∈ [] → ¬p x = true
⊢ splitOnP p ([] ++ sep :: as) = [] :: splitOnP p as
state_after: no goals

tactic: simp [h hd _, ih <| forall_mem_of_forall_mem_cons h]
state_before: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p : α → Bool
xs ys : List α
ls : List (List α)
f : List α → List α
sep : α
hsep : p sep = true
as : List α
hd : α
tl : List α
ih : (∀ (x : α), x ∈ tl → ¬p x = true) → splitOnP p (tl ++ sep :: as) = tl :: splitOnP p as
h : ∀ (x : α), x ∈ hd :: tl → ¬p x = true
⊢ splitOnP p (hd :: tl ++ sep :: as) = (hd :: tl) :: splitOnP p as
state_after: no goals
Theorem: finite_powers
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: refine ⟨fun h ↦ ?_, IsOfFinOrder.finite_powers⟩
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LeftCancelMonoid G
x y a : G
m n : ℕ
⊢ (↑(powers a)).Finite ↔ IsOfFinOrder a
state_after: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LeftCancelMonoid G
x y a : G
m n : ℕ
h : (↑(powers a)).Finite
⊢ IsOfFinOrder a

tactic: obtain ⟨m, n, hmn, ha⟩ := h.exists_lt_map_eq_of_forall_mem (f := fun n : ℕ ↦ a ^ n)
  (fun n ↦ by simp [mem_powers_iff])
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LeftCancelMonoid G
x y a : G
m n : ℕ
h : (↑(powers a)).Finite
⊢ IsOfFinOrder a
state_after: case intro.intro.intro
G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LeftCancelMonoid G
x y a : G
m✝ n✝ : ℕ
h : (↑(powers a)).Finite
m n : ℕ
hmn : m < n
ha : a ^ m = a ^ n
⊢ IsOfFinOrder a

tactic: refine isOfFinOrder_iff_pow_eq_one.2 ⟨n - m, tsub_pos_iff_lt.2 hmn, ?_⟩
state_before: case intro.intro.intro
G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LeftCancelMonoid G
x y a : G
m✝ n✝ : ℕ
h : (↑(powers a)).Finite
m n : ℕ
hmn : m < n
ha : a ^ m = a ^ n
⊢ IsOfFinOrder a
state_after: case intro.intro.intro
G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LeftCancelMonoid G
x y a : G
m✝ n✝ : ℕ
h : (↑(powers a)).Finite
m n : ℕ
hmn : m < n
ha : a ^ m = a ^ n
⊢ a ^ (n - m) = 1

tactic: rw [← mul_left_cancel_iff (a := a ^ m), ← pow_add, add_tsub_cancel_of_le hmn.le, ha, mul_one]
state_before: case intro.intro.intro
G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LeftCancelMonoid G
x y a : G
m✝ n✝ : ℕ
h : (↑(powers a)).Finite
m n : ℕ
hmn : m < n
ha : a ^ m = a ^ n
⊢ a ^ (n - m) = 1
state_after: no goals

tactic: simp [mem_powers_iff]
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LeftCancelMonoid G
x y a : G
m n✝ : ℕ
h : (↑(powers a)).Finite
n : ℕ
⊢ (fun n => a ^ n) n ∈ ↑(powers a)
state_after: no goals
Theorem: Nat.ofDigits_append
File: Mathlib/Data/Nat/Digits.lean

tactic: induction' l1 with hd tl IH
state_before: n b : ℕ
l1 l2 : List ℕ
⊢ ofDigits b (l1 ++ l2) = ofDigits b l1 + b ^ l1.length * ofDigits b l2
state_after: case nil
n b : ℕ
l2 : List ℕ
⊢ ofDigits b ([] ++ l2) = ofDigits b [] + b ^ [].length * ofDigits b l2

case cons
n b : ℕ
l2 : List ℕ
hd : ℕ
tl : List ℕ
IH : ofDigits b (tl ++ l2) = ofDigits b tl + b ^ tl.length * ofDigits b l2
⊢ ofDigits b (hd :: tl ++ l2) = ofDigits b (hd :: tl) + b ^ (hd :: tl).length * ofDigits b l2

tactic: simp [ofDigits]
state_before: case nil
n b : ℕ
l2 : List ℕ
⊢ ofDigits b ([] ++ l2) = ofDigits b [] + b ^ [].length * ofDigits b l2
state_after: no goals

tactic: rw [ofDigits, List.cons_append, ofDigits, IH, List.length_cons, pow_succ']
state_before: case cons
n b : ℕ
l2 : List ℕ
hd : ℕ
tl : List ℕ
IH : ofDigits b (tl ++ l2) = ofDigits b tl + b ^ tl.length * ofDigits b l2
⊢ ofDigits b (hd :: tl ++ l2) = ofDigits b (hd :: tl) + b ^ (hd :: tl).length * ofDigits b l2
state_after: case cons
n b : ℕ
l2 : List ℕ
hd : ℕ
tl : List ℕ
IH : ofDigits b (tl ++ l2) = ofDigits b tl + b ^ tl.length * ofDigits b l2
⊢ ↑hd + b * (ofDigits b tl + b ^ tl.length * ofDigits b l2) =
    ↑hd + b * ofDigits b tl + b * b ^ tl.length * ofDigits b l2

tactic: ring
state_before: case cons
n b : ℕ
l2 : List ℕ
hd : ℕ
tl : List ℕ
IH : ofDigits b (tl ++ l2) = ofDigits b tl + b ^ tl.length * ofDigits b l2
⊢ ↑hd + b * (ofDigits b tl + b ^ tl.length * ofDigits b l2) =
    ↑hd + b * ofDigits b tl + b * b ^ tl.length * ofDigits b l2
state_after: no goals
Theorem: MvPowerSeries.coeff_invOfUnit
File: Mathlib/RingTheory/MvPowerSeries/Inverse.lean

tactic: convert coeff_inv_aux n (↑u⁻¹) φ
state_before: σ : Type u_1
R : Type u_2
inst✝¹ : Ring R
inst✝ : DecidableEq σ
n : σ →₀ ℕ
φ : MvPowerSeries σ R
u : Rˣ
⊢ (coeff R n) (φ.invOfUnit u) =
    if n = 0 then ↑u⁻¹
    else -↑u⁻¹ * ∑ x ∈ antidiagonal n, if x.2 < n then (coeff R x.1) φ * (coeff R x.2) (φ.invOfUnit u) else 0
state_after: no goals