1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: CategoryTheory.NatTrans.rightDerived_id
File: Mathlib/CategoryTheory/Abelian/RightDerived.lean

tactic: dsimp only [rightDerived]
state_before: C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{u_2, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
F : C ⥤ D
inst✝ : F.Additive
n : ℕ
⊢ rightDerived (𝟙 F) n = 𝟙 (F.rightDerived n)
state_after: C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{u_2, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
F : C ⥤ D
inst✝ : F.Additive
n : ℕ
⊢ whiskerRight (rightDerivedToHomotopyCategory (𝟙 F)) (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n) =
    𝟙 (F.rightDerived n)

tactic: simp only [rightDerivedToHomotopyCategory_id, whiskerRight_id']
state_before: C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{u_2, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
F : C ⥤ D
inst✝ : F.Additive
n : ℕ
⊢ whiskerRight (rightDerivedToHomotopyCategory (𝟙 F)) (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n) =
    𝟙 (F.rightDerived n)
state_after: C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{u_2, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
F : C ⥤ D
inst✝ : F.Additive
n : ℕ
⊢ 𝟙 (F.rightDerivedToHomotopyCategory ⋙ HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n) = 𝟙 (F.rightDerived n)

tactic: rfl
state_before: C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{u_2, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
F : C ⥤ D
inst✝ : F.Additive
n : ℕ
⊢ 𝟙 (F.rightDerivedToHomotopyCategory ⋙ HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n) = 𝟙 (F.rightDerived n)
state_after: no goals
Theorem: LinearMap.injOn_iff_surjOn
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: rw [Set.injOn_iff_injective, ← Set.MapsTo.restrict_surjective_iff h]
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
p : Submodule K V
inst✝ : FiniteDimensional K ↥p
f : V →ₗ[K] V
h : ∀ x ∈ p, f x ∈ p
⊢ Set.InjOn ⇑f ↑p ↔ Set.SurjOn ⇑f ↑p ↑p
state_after: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
p : Submodule K V
inst✝ : FiniteDimensional K ↥p
f : V →ₗ[K] V
h : ∀ x ∈ p, f x ∈ p
⊢ Injective ((↑p).restrict ⇑f) ↔ Surjective (Set.MapsTo.restrict (⇑f) (↑p) (↑p) h)

tactic: change Injective (f.domRestrict p) ↔ Surjective (f.restrict h)
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
p : Submodule K V
inst✝ : FiniteDimensional K ↥p
f : V →ₗ[K] V
h : ∀ x ∈ p, f x ∈ p
⊢ Injective ((↑p).restrict ⇑f) ↔ Surjective (Set.MapsTo.restrict (⇑f) (↑p) (↑p) h)
state_after: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
p : Submodule K V
inst✝ : FiniteDimensional K ↥p
f : V →ₗ[K] V
h : ∀ x ∈ p, f x ∈ p
⊢ Injective ⇑(f.domRestrict p) ↔ Surjective ⇑(f.restrict h)

tactic: simp [disjoint_iff, ← injective_iff_surjective]
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
p : Submodule K V
inst✝ : FiniteDimensional K ↥p
f : V →ₗ[K] V
h : ∀ x ∈ p, f x ∈ p
⊢ Injective ⇑(f.domRestrict p) ↔ Surjective ⇑(f.restrict h)
state_after: no goals
Theorem: CategoryTheory.finrank_hom_simple_simple
File: Mathlib/CategoryTheory/Preadditive/Schur.lean

tactic: split_ifs with h
state_before: C : Type u_1
inst✝⁸ : Category.{u_3, u_1} C
inst✝⁷ : Preadditive C
𝕜 : Type u_2
inst✝⁶ : Field 𝕜
inst✝⁵ : IsAlgClosed 𝕜
inst✝⁴ : Linear 𝕜 C
inst✝³ : HasKernels C
X Y : C
inst✝² : ∀ (X Y : C), FiniteDimensional 𝕜 (X ⟶ Y)
inst✝¹ : Simple X
inst✝ : Simple Y
⊢ finrank 𝕜 (X ⟶ Y) = if Nonempty (X ≅ Y) then 1 else 0
state_after: case pos
C : Type u_1
inst✝⁸ : Category.{u_3, u_1} C
inst✝⁷ : Preadditive C
𝕜 : Type u_2
inst✝⁶ : Field 𝕜
inst✝⁵ : IsAlgClosed 𝕜
inst✝⁴ : Linear 𝕜 C
inst✝³ : HasKernels C
X Y : C
inst✝² : ∀ (X Y : C), FiniteDimensional 𝕜 (X ⟶ Y)
inst✝¹ : Simple X
inst✝ : Simple Y
h : Nonempty (X ≅ Y)
⊢ finrank 𝕜 (X ⟶ Y) = 1

case neg
C : Type u_1
inst✝⁸ : Category.{u_3, u_1} C
inst✝⁷ : Preadditive C
𝕜 : Type u_2
inst✝⁶ : Field 𝕜
inst✝⁵ : IsAlgClosed 𝕜
inst✝⁴ : Linear 𝕜 C
inst✝³ : HasKernels C
X Y : C
inst✝² : ∀ (X Y : C), FiniteDimensional 𝕜 (X ⟶ Y)
inst✝¹ : Simple X
inst✝ : Simple Y
h : ¬Nonempty (X ≅ Y)
⊢ finrank 𝕜 (X ⟶ Y) = 0

tactic: exact (finrank_hom_simple_simple_eq_one_iff 𝕜 X Y).2 h
state_before: case pos
C : Type u_1
inst✝⁸ : Category.{u_3, u_1} C
inst✝⁷ : Preadditive C
𝕜 : Type u_2
inst✝⁶ : Field 𝕜
inst✝⁵ : IsAlgClosed 𝕜
inst✝⁴ : Linear 𝕜 C
inst✝³ : HasKernels C
X Y : C
inst✝² : ∀ (X Y : C), FiniteDimensional 𝕜 (X ⟶ Y)
inst✝¹ : Simple X
inst✝ : Simple Y
h : Nonempty (X ≅ Y)
⊢ finrank 𝕜 (X ⟶ Y) = 1
state_after: no goals

tactic: exact (finrank_hom_simple_simple_eq_zero_iff 𝕜 X Y).2 (not_nonempty_iff.mp h)
state_before: case neg
C : Type u_1
inst✝⁸ : Category.{u_3, u_1} C
inst✝⁷ : Preadditive C
𝕜 : Type u_2
inst✝⁶ : Field 𝕜
inst✝⁵ : IsAlgClosed 𝕜
inst✝⁴ : Linear 𝕜 C
inst✝³ : HasKernels C
X Y : C
inst✝² : ∀ (X Y : C), FiniteDimensional 𝕜 (X ⟶ Y)
inst✝¹ : Simple X
inst✝ : Simple Y
h : ¬Nonempty (X ≅ Y)
⊢ finrank 𝕜 (X ⟶ Y) = 0
state_after: no goals
Theorem: ENNReal.toNNReal_iInf
File: Mathlib/Data/ENNReal/Real.lean

tactic: cases isEmpty_or_nonempty ι
state_before: ι : Sort u_1
f g : ι → ℝ≥0∞
a b c d : ℝ≥0∞
r p q : ℝ≥0
hf : ∀ (i : ι), f i ≠ ⊤
⊢ (iInf f).toNNReal = ⨅ i, (f i).toNNReal
state_after: case inl
ι : Sort u_1
f g : ι → ℝ≥0∞
a b c d : ℝ≥0∞
r p q : ℝ≥0
hf : ∀ (i : ι), f i ≠ ⊤
h✝ : IsEmpty ι
⊢ (iInf f).toNNReal = ⨅ i, (f i).toNNReal

case inr
ι : Sort u_1
f g : ι → ℝ≥0∞
a b c d : ℝ≥0∞
r p q : ℝ≥0
hf : ∀ (i : ι), f i ≠ ⊤
h✝ : Nonempty ι
⊢ (iInf f).toNNReal = ⨅ i, (f i).toNNReal

tactic: rw [iInf_of_empty, top_toNNReal, NNReal.iInf_empty]
state_before: case inl
ι : Sort u_1
f g : ι → ℝ≥0∞
a b c d : ℝ≥0∞
r p q : ℝ≥0
hf : ∀ (i : ι), f i ≠ ⊤
h✝ : IsEmpty ι
⊢ (iInf f).toNNReal = ⨅ i, (f i).toNNReal
state_after: no goals

tactic: lift f to ι → ℝ≥0 using hf
state_before: case inr
ι : Sort u_1
f g : ι → ℝ≥0∞
a b c d : ℝ≥0∞
r p q : ℝ≥0
hf : ∀ (i : ι), f i ≠ ⊤
h✝ : Nonempty ι
⊢ (iInf f).toNNReal = ⨅ i, (f i).toNNReal
state_after: case inr.intro
ι : Sort u_1
g : ι → ℝ≥0∞
a b c d : ℝ≥0∞
r p q : ℝ≥0
h✝ : Nonempty ι
f : ι → ℝ≥0
⊢ (⨅ i, ↑(f i)).toNNReal = ⨅ i, ((fun i => ↑(f i)) i).toNNReal

tactic: simp_rw [← coe_iInf, toNNReal_coe]
state_before: case inr.intro
ι : Sort u_1
g : ι → ℝ≥0∞
a b c d : ℝ≥0∞
r p q : ℝ≥0
h✝ : Nonempty ι
f : ι → ℝ≥0
⊢ (⨅ i, ↑(f i)).toNNReal = ⨅ i, ((fun i => ↑(f i)) i).toNNReal
state_after: no goals
Theorem: CategoryTheory.CosimplicialObject.δ_comp_σ_succ
File: Mathlib/AlgebraicTopology/SimplicialObject.lean

tactic: dsimp [δ, σ]
state_before: C : Type u
inst✝ : Category.{v, u} C
X : CosimplicialObject C
n : ℕ
i : Fin (n + 1)
⊢ X.δ i.succ ≫ X.σ i = 𝟙 (X.obj [n])
state_after: C : Type u
inst✝ : Category.{v, u} C
X : CosimplicialObject C
n : ℕ
i : Fin (n + 1)
⊢ X.map (SimplexCategory.δ i.succ) ≫ X.map (SimplexCategory.σ i) = 𝟙 (X.obj [n])

tactic: simp only [← X.map_comp, SimplexCategory.δ_comp_σ_succ, X.map_id]
state_before: C : Type u
inst✝ : Category.{v, u} C
X : CosimplicialObject C
n : ℕ
i : Fin (n + 1)
⊢ X.map (SimplexCategory.δ i.succ) ≫ X.map (SimplexCategory.σ i) = 𝟙 (X.obj [n])
state_after: no goals
Theorem: EuclideanGeometry.circumradius_eq_of_cospherical_subset
File: Mathlib/Geometry/Euclidean/Circumcenter.lean

tactic: rcases exists_circumradius_eq_of_cospherical_subset h hd hc with ⟨r, hr⟩
state_before: V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
ps : Set P
h : ps ⊆ ↑s
inst✝¹ : Nonempty ↥s
n : ℕ
inst✝ : FiniteDimensional ℝ ↥s.direction
hd : finrank ℝ ↥s.direction = n
hc : Cospherical ps
sx₁ sx₂ : Simplex ℝ P n
hsx₁ : Set.range sx₁.points ⊆ ps
hsx₂ : Set.range sx₂.points ⊆ ps
⊢ sx₁.circumradius = sx₂.circumradius
state_after: case intro
V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
ps : Set P
h : ps ⊆ ↑s
inst✝¹ : Nonempty ↥s
n : ℕ
inst✝ : FiniteDimensional ℝ ↥s.direction
hd : finrank ℝ ↥s.direction = n
hc : Cospherical ps
sx₁ sx₂ : Simplex ℝ P n
hsx₁ : Set.range sx₁.points ⊆ ps
hsx₂ : Set.range sx₂.points ⊆ ps
r : ℝ
hr : ∀ (sx : Simplex ℝ P n), Set.range sx.points ⊆ ps → sx.circumradius = r
⊢ sx₁.circumradius = sx₂.circumradius

tactic: rw [hr sx₁ hsx₁, hr sx₂ hsx₂]
state_before: case intro
V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
ps : Set P
h : ps ⊆ ↑s
inst✝¹ : Nonempty ↥s
n : ℕ
inst✝ : FiniteDimensional ℝ ↥s.direction
hd : finrank ℝ ↥s.direction = n
hc : Cospherical ps
sx₁ sx₂ : Simplex ℝ P n
hsx₁ : Set.range sx₁.points ⊆ ps
hsx₂ : Set.range sx₂.points ⊆ ps
r : ℝ
hr : ∀ (sx : Simplex ℝ P n), Set.range sx.points ⊆ ps → sx.circumradius = r
⊢ sx₁.circumradius = sx₂.circumradius
state_after: no goals
Theorem: Num.natSize_to_nat
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [← size_eq_natSize, size_to_nat]
state_before: α : Type u_1
n : Num
⊢ n.natSize = (↑n).size
state_after: no goals
Theorem: not_nat_primrec_ack_self
File: Mathlib/Computability/Ackermann.lean

tactic: cases' exists_lt_ack_of_nat_primrec h with m hm
state_before: h : Nat.Primrec fun n => ack n n
⊢ False
state_after: case intro
h : Nat.Primrec fun n => ack n n
m : ℕ
hm : ∀ (n : ℕ), ack n n < ack m n
⊢ False

tactic: exact (hm m).false
state_before: case intro
h : Nat.Primrec fun n => ack n n
m : ℕ
hm : ∀ (n : ℕ), ack n n < ack m n
⊢ False
state_after: no goals
Theorem: List.dlookup_isSome
File: Mathlib/Data/List/Sigma.lean

tactic: simp
state_before: α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
⊢ (dlookup a []).isSome = true ↔ a ∈ [].keys
state_after: no goals

tactic: by_cases h : a = a'
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a a' : α
b : β a'
l : List (Sigma β)
⊢ (dlookup a (⟨a', b⟩ :: l)).isSome = true ↔ a ∈ (⟨a', b⟩ :: l).keys
state_after: case pos
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a a' : α
b : β a'
l : List (Sigma β)
h : a = a'
⊢ (dlookup a (⟨a', b⟩ :: l)).isSome = true ↔ a ∈ (⟨a', b⟩ :: l).keys

case neg
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a a' : α
b : β a'
l : List (Sigma β)
h : ¬a = a'
⊢ (dlookup a (⟨a', b⟩ :: l)).isSome = true ↔ a ∈ (⟨a', b⟩ :: l).keys

tactic: subst a'
state_before: case pos
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a a' : α
b : β a'
l : List (Sigma β)
h : a = a'
⊢ (dlookup a (⟨a', b⟩ :: l)).isSome = true ↔ a ∈ (⟨a', b⟩ :: l).keys
state_after: case pos
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
b : β a
⊢ (dlookup a (⟨a, b⟩ :: l)).isSome = true ↔ a ∈ (⟨a, b⟩ :: l).keys

tactic: simp
state_before: case pos
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
b : β a
⊢ (dlookup a (⟨a, b⟩ :: l)).isSome = true ↔ a ∈ (⟨a, b⟩ :: l).keys
state_after: no goals

tactic: simp [h, dlookup_isSome]
state_before: case neg
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a a' : α
b : β a'
l : List (Sigma β)
h : ¬a = a'
⊢ (dlookup a (⟨a', b⟩ :: l)).isSome = true ↔ a ∈ (⟨a', b⟩ :: l).keys
state_after: no goals
Theorem: Real.volume_Iic
File: Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean

tactic: rw [← measure_congr Iio_ae_eq_Iic]
state_before: ι : Type u_1
inst✝ : Fintype ι
a : ℝ
⊢ volume (Iic a) = ⊤
state_after: ι : Type u_1
inst✝ : Fintype ι
a : ℝ
⊢ volume (Iio a) = ⊤

tactic: simp
state_before: ι : Type u_1
inst✝ : Fintype ι
a : ℝ
⊢ volume (Iio a) = ⊤
state_after: no goals
Theorem: Subgroup.range_mem_leftTransversals
File: Mathlib/GroupTheory/Complement.lean

tactic: rintro ⟨-, q₁, rfl⟩ ⟨-, q₂, rfl⟩ h
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
f : G ⧸ H → G
hf : ∀ (q : G ⧸ H), ↑(f q) = q
⊢ Function.Injective ((range f).restrict Quotient.mk'')
state_after: case mk.intro.mk.intro
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
f : G ⧸ H → G
hf : ∀ (q : G ⧸ H), ↑(f q) = q
q₁ q₂ : G ⧸ H
h : (range f).restrict Quotient.mk'' ⟨f q₁, ⋯⟩ = (range f).restrict Quotient.mk'' ⟨f q₂, ⋯⟩
⊢ ⟨f q₁, ⋯⟩ = ⟨f q₂, ⋯⟩

tactic: exact Subtype.ext <| congr_arg f <| ((hf q₁).symm.trans h).trans (hf q₂)
state_before: case mk.intro.mk.intro
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
f : G ⧸ H → G
hf : ∀ (q : G ⧸ H), ↑(f q) = q
q₁ q₂ : G ⧸ H
h : (range f).restrict Quotient.mk'' ⟨f q₁, ⋯⟩ = (range f).restrict Quotient.mk'' ⟨f q₂, ⋯⟩
⊢ ⟨f q₁, ⋯⟩ = ⟨f q₂, ⋯⟩
state_after: no goals
Theorem: Prefunctor.costar_conj_star
File: Mathlib/Combinatorics/Quiver/Covering.lean

tactic: ext ⟨v, f⟩ <;> simp
state_before: U : Type u_1
inst✝⁵ : Quiver U
V : Type u_2
inst✝⁴ : Quiver V
φ : U ⥤q V
W : Type ?u.18720
inst✝³ : Quiver W
ψ : V ⥤q W
inst✝² : HasInvolutiveReverse U
inst✝¹ : HasInvolutiveReverse V
inst✝ : φ.MapReverse
u : U
⊢ φ.costar u = ⇑(starEquivCostar (φ.obj u)) ∘ φ.star u ∘ ⇑(starEquivCostar u).symm
state_after: no goals
Theorem: CategoryTheory.Pretriangulated.Triangle.yoneda_exact₂
File: Mathlib/CategoryTheory/Triangulated/Pretriangulated.lean

tactic: obtain ⟨g, ⟨hg₁, _⟩⟩ := complete_distinguished_triangle_morphism T _ hT
  (contractible_distinguished₁ X) 0 f (by aesop_cat)
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
hT : T ∈ distinguishedTriangles
X : C
f : T.obj₂ ⟶ X
hf : T.mor₁ ≫ f = 0
⊢ ∃ g, f = T.mor₂ ≫ g
state_after: case intro.intro
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
hT : T ∈ distinguishedTriangles
X : C
f : T.obj₂ ⟶ X
hf : T.mor₁ ≫ f = 0
g : T.obj₃ ⟶ (mk 0 (𝟙 X) 0).obj₃
hg₁ : T.mor₂ ≫ g = f ≫ (mk 0 (𝟙 X) 0).mor₂
right✝ : T.mor₃ ≫ (CategoryTheory.shiftFunctor C 1).map 0 = g ≫ (mk 0 (𝟙 X) 0).mor₃
⊢ ∃ g, f = T.mor₂ ≫ g

tactic: exact ⟨g, by simpa using hg₁.symm⟩
state_before: case intro.intro
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
hT : T ∈ distinguishedTriangles
X : C
f : T.obj₂ ⟶ X
hf : T.mor₁ ≫ f = 0
g : T.obj₃ ⟶ (mk 0 (𝟙 X) 0).obj₃
hg₁ : T.mor₂ ≫ g = f ≫ (mk 0 (𝟙 X) 0).mor₂
right✝ : T.mor₃ ≫ (CategoryTheory.shiftFunctor C 1).map 0 = g ≫ (mk 0 (𝟙 X) 0).mor₃
⊢ ∃ g, f = T.mor₂ ≫ g
state_after: no goals

tactic: aesop_cat
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
hT : T ∈ distinguishedTriangles
X : C
f : T.obj₂ ⟶ X
hf : T.mor₁ ≫ f = 0
⊢ T.mor₁ ≫ f = 0 ≫ (mk 0 (𝟙 X) 0).mor₁
state_after: no goals

tactic: simpa using hg₁.symm
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
hT : T ∈ distinguishedTriangles
X : C
f : T.obj₂ ⟶ X
hf : T.mor₁ ≫ f = 0
g : T.obj₃ ⟶ (mk 0 (𝟙 X) 0).obj₃
hg₁ : T.mor₂ ≫ g = f ≫ (mk 0 (𝟙 X) 0).mor₂
right✝ : T.mor₃ ≫ (CategoryTheory.shiftFunctor C 1).map 0 = g ≫ (mk 0 (𝟙 X) 0).mor₃
⊢ f = T.mor₂ ≫ g
state_after: no goals
Theorem: CliffordAlgebra.contractRight_mul_ι
File: Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean

tactic: rw [contractRight_eq, reverse.map_mul, reverse_ι, contractLeft_ι_mul, map_sub, map_smul,
  reverse_reverse, reverse.map_mul, reverse_ι, contractRight_eq]
state_before: R : Type u1
inst✝² : CommRing R
M : Type u2
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
d d' : Module.Dual R M
a : M
b : CliffordAlgebra Q
⊢ (contractRight (b * (ι Q) a)) d = d a • b - (contractRight b) d * (ι Q) a
state_after: no goals
Theorem: CategoryTheory.Localization.homEquiv_refl
File: Mathlib/CategoryTheory/Localization/HomEquiv.lean

tactic: apply LocalizerMorphism.id_homMap
state_before: C : Type u_1
C₁ : Type u_2
C₂ : Type u_3
C₃ : Type u_4
D₁ : Type u_5
D₂ : Type u_6
D₃ : Type u_7
inst✝⁹ : Category.{u_9, u_1} C
inst✝⁸ : Category.{?u.42747, u_2} C₁
inst✝⁷ : Category.{?u.42751, u_3} C₂
inst✝⁶ : Category.{?u.42755, u_4} C₃
inst✝⁵ : Category.{u_8, u_5} D₁
inst✝⁴ : Category.{?u.42763, u_6} D₂
inst✝³ : Category.{?u.42767, u_7} D₃
W : MorphismProperty C
L₁ : C ⥤ D₁
inst✝² : L₁.IsLocalization W
L₂ : C ⥤ D₂
inst✝¹ : L₂.IsLocalization W
L₃ : C ⥤ D₃
inst✝ : L₃.IsLocalization W
X Y Z : C
f : L₁.obj X ⟶ L₁.obj Y
⊢ (homEquiv W L₁ L₁) f = f
state_after: no goals
Theorem: Mathlib.Tactic.Abel.term_neg
File: Mathlib/Tactic/Abel.lean

tactic: simpa [h₂.symm, h₁.symm, termg] using add_comm _ _
state_before: α : Type u_1
inst✝ : AddCommGroup α
n : ℤ
x a : α
n' : ℤ
a' : α
h₁ : -n = n'
h₂ : -a = a'
⊢ -termg n x a = termg n' x a'
state_after: no goals
Theorem: WeierstrassCurve.expCoeff_cast
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Degree.lean

tactic: rcases n.even_or_odd' with ⟨n, rfl | rfl⟩ <;> simp [expCoeff, n.not_even_two_mul_add_one]
state_before: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
n : ℕ
⊢ ↑(WeierstrassCurve.expCoeff n) = if Even n then ↑n / 2 else ↑n
state_after: no goals
Theorem: Cardinal.cast_succ
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: change #(ULift.{u} (Fin (n+1))) = # (ULift.{u} (Fin n)) + 1
state_before: α β : Type u
n : ℕ
⊢ ↑(n + 1) = ↑n + 1
state_after: α β : Type u
n : ℕ
⊢ #(ULift.{u, 0} (Fin (n + 1))) = #(ULift.{u, 0} (Fin n)) + 1

tactic: rw [← mk_option, mk_fintype, mk_fintype]
state_before: α β : Type u
n : ℕ
⊢ #(ULift.{u, 0} (Fin (n + 1))) = #(ULift.{u, 0} (Fin n)) + 1
state_after: α β : Type u
n : ℕ
⊢ ↑(Fintype.card (ULift.{u, 0} (Fin (n + 1)))) = ↑(Fintype.card (Option (ULift.{u, 0} (Fin n))))

tactic: simp only [Fintype.card_ulift, Fintype.card_fin, Fintype.card_option]
state_before: α β : Type u
n : ℕ
⊢ ↑(Fintype.card (ULift.{u, 0} (Fin (n + 1)))) = ↑(Fintype.card (Option (ULift.{u, 0} (Fin n))))
state_after: no goals
Theorem: AddCircle.coe_real_preimage_closedBall_eq_iUnion
File: Mathlib/Analysis/Normed/Group/AddCircle.lean

tactic: rcases eq_or_ne p 0 with (rfl | hp)
state_before: p x ε : ℝ
⊢ QuotientAddGroup.mk ⁻¹' closedBall (↑x) ε = ⋃ z, closedBall (x + z • p) ε
state_after: case inl
x ε : ℝ
⊢ QuotientAddGroup.mk ⁻¹' closedBall (↑x) ε = ⋃ z, closedBall (x + z • 0) ε

case inr
p x ε : ℝ
hp : p ≠ 0
⊢ QuotientAddGroup.mk ⁻¹' closedBall (↑x) ε = ⋃ z, closedBall (x + z • p) ε

tactic: ext y
state_before: case inr
p x ε : ℝ
hp : p ≠ 0
⊢ QuotientAddGroup.mk ⁻¹' closedBall (↑x) ε = ⋃ z, closedBall (x + z • p) ε
state_after: case inr.h
p x ε : ℝ
hp : p ≠ 0
y : ℝ
⊢ y ∈ QuotientAddGroup.mk ⁻¹' closedBall (↑x) ε ↔ y ∈ ⋃ z, closedBall (x + z • p) ε

tactic: simp only [dist_eq_norm, mem_preimage, mem_closedBall, zsmul_eq_mul, mem_iUnion, Real.norm_eq_abs,
  ← QuotientAddGroup.mk_sub, norm_eq, ← sub_sub]
state_before: case inr.h
p x ε : ℝ
hp : p ≠ 0
y : ℝ
⊢ y ∈ QuotientAddGroup.mk ⁻¹' closedBall (↑x) ε ↔ y ∈ ⋃ z, closedBall (x + z • p) ε
state_after: case inr.h
p x ε : ℝ
hp : p ≠ 0
y : ℝ
⊢ |y - x - ↑(round (p⁻¹ * (y - x))) * p| ≤ ε ↔ ∃ i, |y - x - ↑i * p| ≤ ε

tactic: refine ⟨fun h => ⟨round (p⁻¹ * (y - x)), h⟩, ?_⟩
state_before: case inr.h
p x ε : ℝ
hp : p ≠ 0
y : ℝ
⊢ |y - x - ↑(round (p⁻¹ * (y - x))) * p| ≤ ε ↔ ∃ i, |y - x - ↑i * p| ≤ ε
state_after: case inr.h
p x ε : ℝ
hp : p ≠ 0
y : ℝ
⊢ (∃ i, |y - x - ↑i * p| ≤ ε) → |y - x - ↑(round (p⁻¹ * (y - x))) * p| ≤ ε

tactic: rintro ⟨n, hn⟩
state_before: case inr.h
p x ε : ℝ
hp : p ≠ 0
y : ℝ
⊢ (∃ i, |y - x - ↑i * p| ≤ ε) → |y - x - ↑(round (p⁻¹ * (y - x))) * p| ≤ ε
state_after: case inr.h.intro
p x ε : ℝ
hp : p ≠ 0
y : ℝ
n : ℤ
hn : |y - x - ↑n * p| ≤ ε
⊢ |y - x - ↑(round (p⁻¹ * (y - x))) * p| ≤ ε

tactic: rw [← mul_le_mul_left (abs_pos.mpr <| inv_ne_zero hp), ← abs_mul, mul_sub, mul_comm _ p,
  inv_mul_cancel_left₀ hp] at hn ⊢
state_before: case inr.h.intro
p x ε : ℝ
hp : p ≠ 0
y : ℝ
n : ℤ
hn : |y - x - ↑n * p| ≤ ε
⊢ |y - x - ↑(round (p⁻¹ * (y - x))) * p| ≤ ε
state_after: case inr.h.intro
p x ε : ℝ
hp : p ≠ 0
y : ℝ
n : ℤ
hn : |p⁻¹ * (y - x) - ↑n| ≤ |p⁻¹| * ε
⊢ |p⁻¹ * (y - x) - ↑(round (p⁻¹ * (y - x)))| ≤ |p⁻¹| * ε

tactic: exact (round_le (p⁻¹ * (y - x)) n).trans hn
state_before: case inr.h.intro
p x ε : ℝ
hp : p ≠ 0
y : ℝ
n : ℤ
hn : |p⁻¹ * (y - x) - ↑n| ≤ |p⁻¹| * ε
⊢ |p⁻¹ * (y - x) - ↑(round (p⁻¹ * (y - x)))| ≤ |p⁻¹| * ε
state_after: no goals

tactic: simp [iUnion_const]
state_before: case inl
x ε : ℝ
⊢ QuotientAddGroup.mk ⁻¹' closedBall (↑x) ε = ⋃ z, closedBall (x + z • 0) ε
state_after: no goals
Theorem: Complex.angle_le_mul_norm_sub
File: Mathlib/Analysis/Complex/Angle.lean

tactic: rw [← div_le_iff' <| by positivity, div_eq_inv_mul, inv_div]
state_before: a x y : ℂ
hx : ‖x‖ = 1
hy : ‖y‖ = 1
⊢ angle x y ≤ π / 2 * ‖x - y‖
state_after: a x y : ℂ
hx : ‖x‖ = 1
hy : ‖y‖ = 1
⊢ 2 / π * angle x y ≤ ‖x - y‖

tactic: exact mul_angle_le_norm_sub hx hy
state_before: a x y : ℂ
hx : ‖x‖ = 1
hy : ‖y‖ = 1
⊢ 2 / π * angle x y ≤ ‖x - y‖
state_after: no goals

tactic: positivity
state_before: a x y : ℂ
hx : ‖x‖ = 1
hy : ‖y‖ = 1
⊢ 0 < π / 2
state_after: no goals
Theorem: PrimeMultiset.prod_ofNatMultiset
File: Mathlib/Data/PNat/Factors.lean

tactic: rw [coe_prod, to_ofNatMultiset]
state_before: v : Multiset ℕ
h : ∀ p ∈ v, Nat.Prime p
⊢ ↑(ofNatMultiset v h).prod = v.prod
state_after: no goals
Theorem: Real.exists_continued_fraction_convergent_eq_rat
File: Mathlib/NumberTheory/DiophantineApproximation.lean

tactic: obtain ⟨n, hn⟩ := exists_rat_eq_convergent h
state_before: ξ : ℝ
u v : ℤ
hv : 2 ≤ v
h✝ : ContfracLegendre.Ass ξ u v
q : ℚ
h : |ξ - ↑q| < 1 / (2 * ↑q.den ^ 2)
⊢ ∃ n, (GeneralizedContinuedFraction.of ξ).convergents n = ↑q
state_after: case intro
ξ : ℝ
u v : ℤ
hv : 2 ≤ v
h✝ : ContfracLegendre.Ass ξ u v
q : ℚ
h : |ξ - ↑q| < 1 / (2 * ↑q.den ^ 2)
n : ℕ
hn : q = ξ.convergent n
⊢ ∃ n, (GeneralizedContinuedFraction.of ξ).convergents n = ↑q

tactic: exact ⟨n, hn.symm ▸ continued_fraction_convergent_eq_convergent ξ n⟩
state_before: case intro
ξ : ℝ
u v : ℤ
hv : 2 ≤ v
h✝ : ContfracLegendre.Ass ξ u v
q : ℚ
h : |ξ - ↑q| < 1 / (2 * ↑q.den ^ 2)
n : ℕ
hn : q = ξ.convergent n
⊢ ∃ n, (GeneralizedContinuedFraction.of ξ).convergents n = ↑q
state_after: no goals
Theorem: InnerProductGeometry.cos_eq_neg_one_iff_angle_eq_pi
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

tactic: rw [← cos_pi]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
⊢ cos (angle x y) = -1 ↔ angle x y = π
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
⊢ cos (angle x y) = cos π ↔ angle x y = π

tactic: exact injOn_cos.eq_iff ⟨angle_nonneg x y, angle_le_pi x y⟩ (right_mem_Icc.2 pi_pos.le)
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
⊢ cos (angle x y) = cos π ↔ angle x y = π
state_after: no goals