1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Function.Periodic.comp
File: Mathlib/Algebra/Periodic.lean

tactic: simp_all
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f g✝ : α → β
c c₁ c₂ x : α
inst✝ : Add α
h : Periodic f c
g : β → γ
⊢ Periodic (g ∘ f) c
state_after: no goals
Theorem: CategoryTheory.MorphismProperty.LeftFraction.Localization.homMk_comp_homMk
File: Mathlib/CategoryTheory/Localization/CalculusOfFractions.lean

tactic: change Hom.comp _ _ = _
state_before: C : Type u_1
D : Type u_2
inst✝² : Category.{u_3, u_1} C
inst✝¹ : Category.{?u.63063, u_2} D
W : MorphismProperty C
inst✝ : W.HasLeftCalculusOfFractions
X Y Z : C
z₁ : W.LeftFraction X Y
z₂ : W.LeftFraction Y Z
z₃ : W.LeftFraction z₁.Y' z₂.Y'
h₃ : z₂.f ≫ z₃.s = z₁.s ≫ z₃.f
⊢ homMk z₁ ≫ homMk z₂ = homMk (z₁.comp₀ z₂ z₃)
state_after: C : Type u_1
D : Type u_2
inst✝² : Category.{u_3, u_1} C
inst✝¹ : Category.{?u.63063, u_2} D
W : MorphismProperty C
inst✝ : W.HasLeftCalculusOfFractions
X Y Z : C
z₁ : W.LeftFraction X Y
z₂ : W.LeftFraction Y Z
z₃ : W.LeftFraction z₁.Y' z₂.Y'
h₃ : z₂.f ≫ z₃.s = z₁.s ≫ z₃.f
⊢ Hom.comp (homMk z₁) (homMk z₂) = homMk (z₁.comp₀ z₂ z₃)

tactic: erw [Hom.comp_eq, comp_eq z₁ z₂ z₃ h₃]
state_before: C : Type u_1
D : Type u_2
inst✝² : Category.{u_3, u_1} C
inst✝¹ : Category.{?u.63063, u_2} D
W : MorphismProperty C
inst✝ : W.HasLeftCalculusOfFractions
X Y Z : C
z₁ : W.LeftFraction X Y
z₂ : W.LeftFraction Y Z
z₃ : W.LeftFraction z₁.Y' z₂.Y'
h₃ : z₂.f ≫ z₃.s = z₁.s ≫ z₃.f
⊢ Hom.comp (homMk z₁) (homMk z₂) = homMk (z₁.comp₀ z₂ z₃)
state_after: no goals
Theorem: CochainComplex.HomComplex.Cochain.ofHom_injective
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean

tactic: ext1
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m : ℤ
f₁ f₂ : F ⟶ G
h : ofHom f₁ = ofHom f₂
⊢ (Cocycle.equivHom F G) f₁ = (Cocycle.equivHom F G) f₂
state_after: case h
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m : ℤ
f₁ f₂ : F ⟶ G
h : ofHom f₁ = ofHom f₂
⊢ ↑((Cocycle.equivHom F G) f₁) = ↑((Cocycle.equivHom F G) f₂)

tactic: exact h
state_before: case h
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m : ℤ
f₁ f₂ : F ⟶ G
h : ofHom f₁ = ofHom f₂
⊢ ↑((Cocycle.equivHom F G) f₁) = ↑((Cocycle.equivHom F G) f₂)
state_after: no goals
Theorem: ProbabilityTheory.kernel.withDensity_of_not_measurable
File: Mathlib/Probability/Kernel/WithDensity.lean

tactic: classical exact dif_neg hf
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : ↥(kernel α β)
f : α → β → ℝ≥0∞
κ : ↥(kernel α β)
inst✝ : IsSFiniteKernel κ
hf : ¬Measurable (Function.uncurry f)
⊢ withDensity κ f = 0
state_after: no goals

tactic: exact dif_neg hf
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : ↥(kernel α β)
f : α → β → ℝ≥0∞
κ : ↥(kernel α β)
inst✝ : IsSFiniteKernel κ
hf : ¬Measurable (Function.uncurry f)
⊢ withDensity κ f = 0
state_after: no goals
Theorem: MvPolynomial.eq_zero_iff
File: Mathlib/Algebra/MvPolynomial/Basic.lean

tactic: rw [ext_iff]
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p✝ q p : MvPolynomial σ R
⊢ p = 0 ↔ ∀ (d : σ →₀ ℕ), coeff d p = 0
state_after: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p✝ q p : MvPolynomial σ R
⊢ (∀ (m : σ →₀ ℕ), coeff m p = coeff m 0) ↔ ∀ (d : σ →₀ ℕ), coeff d p = 0

tactic: simp only [coeff_zero]
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p✝ q p : MvPolynomial σ R
⊢ (∀ (m : σ →₀ ℕ), coeff m p = coeff m 0) ↔ ∀ (d : σ →₀ ℕ), coeff d p = 0
state_after: no goals
Theorem: AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.inv_naturality
File: Mathlib/Geometry/RingedSpace/OpenImmersion.lean

tactic: simp only [invApp, ← Category.assoc]
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑X)ᵒᵖ
i : U ⟶ V
⊢ X.presheaf.map i ≫ invApp f V.unop = invApp f U.unop ≫ Y.presheaf.map ((opensFunctor f).op.map i)
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑X)ᵒᵖ
i : U ⟶ V
⊢ (X.presheaf.map i ≫ X.presheaf.map (eqToHom ⋯)) ≫ inv (f.c.app { unop := (opensFunctor f).obj V.unop }) =
    (X.presheaf.map (eqToHom ⋯) ≫ inv (f.c.app { unop := (opensFunctor f).obj U.unop })) ≫
      Y.presheaf.map ((opensFunctor f).op.map i)

tactic: rw [IsIso.comp_inv_eq]
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑X)ᵒᵖ
i : U ⟶ V
⊢ (X.presheaf.map i ≫ X.presheaf.map (eqToHom ⋯)) ≫ inv (f.c.app { unop := (opensFunctor f).obj V.unop }) =
    (X.presheaf.map (eqToHom ⋯) ≫ inv (f.c.app { unop := (opensFunctor f).obj U.unop })) ≫
      Y.presheaf.map ((opensFunctor f).op.map i)
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑X)ᵒᵖ
i : U ⟶ V
⊢ X.presheaf.map i ≫ X.presheaf.map (eqToHom ⋯) =
    ((X.presheaf.map (eqToHom ⋯) ≫ inv (f.c.app { unop := (opensFunctor f).obj U.unop })) ≫
        Y.presheaf.map ((opensFunctor f).op.map i)) ≫
      f.c.app { unop := (opensFunctor f).obj V.unop }

tactic: simp only [Functor.op_obj, op_unop, ← X.presheaf.map_comp, Functor.op_map, Category.assoc,
  NatTrans.naturality, TopCat.Presheaf.pushforwardObj_obj, TopCat.Presheaf.pushforwardObj_map,
  Quiver.Hom.unop_op, IsIso.inv_hom_id_assoc]
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑X)ᵒᵖ
i : U ⟶ V
⊢ X.presheaf.map i ≫ X.presheaf.map (eqToHom ⋯) =
    ((X.presheaf.map (eqToHom ⋯) ≫ inv (f.c.app { unop := (opensFunctor f).obj U.unop })) ≫
        Y.presheaf.map ((opensFunctor f).op.map i)) ≫
      f.c.app { unop := (opensFunctor f).obj V.unop }
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑X)ᵒᵖ
i : U ⟶ V
⊢ X.presheaf.map (i ≫ eqToHom ⋯) =
    X.presheaf.map (eqToHom ⋯ ≫ ((Opens.map f.base).map ((opensFunctor f).map i.unop)).op)

tactic: congr 1
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑X)ᵒᵖ
i : U ⟶ V
⊢ X.presheaf.map (i ≫ eqToHom ⋯) =
    X.presheaf.map (eqToHom ⋯ ≫ ((Opens.map f.base).map ((opensFunctor f).map i.unop)).op)
state_after: no goals
Theorem: inv_div_left
File: Mathlib/Algebra/Group/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : DivisionMonoid α
a b c d : α
⊢ a⁻¹ / b = (b * a)⁻¹
state_after: no goals
Theorem: CategoryTheory.Presieve.factorsThru_of_le
File: Mathlib/CategoryTheory/Sites/Coverage.lean

tactic: simp
state_before: C : Type u_2
D : Type ?u.22523
inst✝¹ : Category.{u_1, u_2} C
inst✝ : Category.{?u.22531, ?u.22523} D
X : C
S T : Presieve X
h : S ≤ T
Y : C
g : Y ⟶ X
hg : S g
⊢ 𝟙 Y ≫ g = g
state_after: no goals
Theorem: measurableSet_of_differentiableWithinAt_Ioi
File: Mathlib/Analysis/Calculus/FDeriv/Measurable.lean

tactic: simpa [differentiableWithinAt_Ioi_iff_Ici] using measurableSet_of_differentiableWithinAt_Ici f
state_before: F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝ : CompleteSpace F
⊢ MeasurableSet {x | DifferentiableWithinAt ℝ f (Ioi x) x}
state_after: no goals
Theorem: Vector.map₂_comm
File: Mathlib/Data/Vector/MapLemmas.lean

tactic: induction xs, ys using Vector.inductionOn₂ <;> simp_all
state_before: α : Type u_2
n : ℕ
xs ys : Vector α n
β : Type u_1
f : α → α → β
comm : ∀ (a₁ a₂ : α), f a₁ a₂ = f a₂ a₁
⊢ map₂ f xs ys = map₂ f ys xs
state_after: no goals
Theorem: FreeMonoid.hom_eq
File: Mathlib/Algebra/FreeMonoid/Basic.lean

tactic: simp only [h, hxs, MonoidHom.map_mul]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
M : Type u_4
inst✝¹ : Monoid M
N : Type u_5
inst✝ : Monoid N
f g : FreeMonoid α →* M
h : ∀ (x : α), f (of x) = g (of x)
l : FreeMonoid α
x : α
xs : FreeMonoid α
hxs : f xs = g xs
⊢ f (of x * xs) = g (of x * xs)
state_after: no goals
Theorem: Set.preimage_iUnion₂
File: Mathlib/Data/Set/Lattice.lean

tactic: simp_rw [preimage_iUnion]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
f : α → β
s : (i : ι) → κ i → Set β
⊢ f ⁻¹' ⋃ i, ⋃ j, s i j = ⋃ i, ⋃ j, f ⁻¹' s i j
state_after: no goals
Theorem: NNRat.divNat_inj
File: Mathlib/Data/NNRat/Defs.lean

tactic: rw [← coe_inj]
state_before: p q : ℚ≥0
n₁ n₂ d₁ d₂ d : ℕ
h₁ : d₁ ≠ 0
h₂ : d₂ ≠ 0
⊢ divNat n₁ d₁ = divNat n₂ d₂ ↔ n₁ * d₂ = n₂ * d₁
state_after: p q : ℚ≥0
n₁ n₂ d₁ d₂ d : ℕ
h₁ : d₁ ≠ 0
h₂ : d₂ ≠ 0
⊢ ↑(divNat n₁ d₁) = ↑(divNat n₂ d₂) ↔ n₁ * d₂ = n₂ * d₁

tactic: simp [Rat.mkRat_eq_iff, h₁, h₂]
state_before: p q : ℚ≥0
n₁ n₂ d₁ d₂ d : ℕ
h₁ : d₁ ≠ 0
h₂ : d₂ ≠ 0
⊢ ↑(divNat n₁ d₁) = ↑(divNat n₂ d₂) ↔ n₁ * d₂ = n₂ * d₁
state_after: p q : ℚ≥0
n₁ n₂ d₁ d₂ d : ℕ
h₁ : d₁ ≠ 0
h₂ : d₂ ≠ 0
⊢ ↑n₁ * ↑d₂ = ↑n₂ * ↑d₁ ↔ n₁ * d₂ = n₂ * d₁

tactic: norm_cast
state_before: p q : ℚ≥0
n₁ n₂ d₁ d₂ d : ℕ
h₁ : d₁ ≠ 0
h₂ : d₂ ≠ 0
⊢ ↑n₁ * ↑d₂ = ↑n₂ * ↑d₁ ↔ n₁ * d₂ = n₂ * d₁
state_after: no goals
Theorem: Finset.sum_smul_vsub_eq_affineCombination_vsub
File: Mathlib/LinearAlgebra/AffineSpace/Combination.lean

tactic: simp_rw [affineCombination_apply, vadd_vsub_vadd_cancel_right]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
w : ι → k
p₁ p₂ : ι → P
⊢ ∑ i ∈ s, w i • (p₁ i -ᵥ p₂ i) = (affineCombination k s p₁) w -ᵥ (affineCombination k s p₂) w
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
w : ι → k
p₁ p₂ : ι → P
⊢ ∑ i ∈ s, w i • (p₁ i -ᵥ p₂ i) =
    (s.weightedVSubOfPoint p₁ (Classical.choice ⋯)) w - (s.weightedVSubOfPoint p₂ (Classical.choice ⋯)) w

tactic: exact s.sum_smul_vsub_eq_weightedVSubOfPoint_sub _ _ _ _
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
w : ι → k
p₁ p₂ : ι → P
⊢ ∑ i ∈ s, w i • (p₁ i -ᵥ p₂ i) =
    (s.weightedVSubOfPoint p₁ (Classical.choice ⋯)) w - (s.weightedVSubOfPoint p₂ (Classical.choice ⋯)) w
state_after: no goals
Theorem: Matrix.mul_fromColumns
File: Mathlib/Data/Matrix/ColumnRowPartitioned.lean

tactic: ext _ (_ | _) <;> simp [mul_apply]
state_before: R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
A : Matrix m n R
B₁ : Matrix n n₁ R
B₂ : Matrix n n₂ R
⊢ A * B₁.fromColumns B₂ = (A * B₁).fromColumns (A * B₂)
state_after: no goals
Theorem: ENNReal.tsum_eq_iSup_sum'
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: rw [ENNReal.tsum_eq_iSup_sum]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s✝ : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_4
s : ι → Finset α
hs : ∀ (t : Finset α), ∃ i, t ⊆ s i
⊢ ∑' (a : α), f a = ⨆ i, ∑ a ∈ s i, f a
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s✝ : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_4
s : ι → Finset α
hs : ∀ (t : Finset α), ∃ i, t ⊆ s i
⊢ ⨆ s, ∑ a ∈ s, f a = ⨆ i, ∑ a ∈ s i, f a

tactic: symm
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s✝ : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_4
s : ι → Finset α
hs : ∀ (t : Finset α), ∃ i, t ⊆ s i
⊢ ⨆ s, ∑ a ∈ s, f a = ⨆ i, ∑ a ∈ s i, f a
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s✝ : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_4
s : ι → Finset α
hs : ∀ (t : Finset α), ∃ i, t ⊆ s i
⊢ ⨆ i, ∑ a ∈ s i, f a = ⨆ s, ∑ a ∈ s, f a

tactic: change ⨆ i : ι, (fun t : Finset α => ∑ a ∈ t, f a) (s i) = ⨆ s : Finset α, ∑ a ∈ s, f a
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s✝ : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_4
s : ι → Finset α
hs : ∀ (t : Finset α), ∃ i, t ⊆ s i
⊢ ⨆ i, ∑ a ∈ s i, f a = ⨆ s, ∑ a ∈ s, f a
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s✝ : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_4
s : ι → Finset α
hs : ∀ (t : Finset α), ∃ i, t ⊆ s i
⊢ ⨆ i, (fun t => ∑ a ∈ t, f a) (s i) = ⨆ s, ∑ a ∈ s, f a

tactic: exact (Finset.sum_mono_set f).iSup_comp_eq hs
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s✝ : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_4
s : ι → Finset α
hs : ∀ (t : Finset α), ∃ i, t ⊆ s i
⊢ ⨆ i, (fun t => ∑ a ∈ t, f a) (s i) = ⨆ s, ∑ a ∈ s, f a
state_after: no goals
Theorem: CategoryTheory.ShortComplex.isIso_homologyπ
File: Mathlib/Algebra/Homology/ShortComplex/Homology.lean

tactic: have := S.isIso_leftHomologyπ hf
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
hf : S.f = 0
inst✝ : S.HasHomology
⊢ IsIso S.homologyπ
state_after: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
hf : S.f = 0
inst✝ : S.HasHomology
this : IsIso S.leftHomologyπ
⊢ IsIso S.homologyπ

tactic: dsimp only [homologyπ]
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
hf : S.f = 0
inst✝ : S.HasHomology
this : IsIso S.leftHomologyπ
⊢ IsIso S.homologyπ
state_after: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
hf : S.f = 0
inst✝ : S.HasHomology
this : IsIso S.leftHomologyπ
⊢ IsIso (S.leftHomologyπ ≫ S.leftHomologyIso.hom)

tactic: infer_instance
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
hf : S.f = 0
inst✝ : S.HasHomology
this : IsIso S.leftHomologyπ
⊢ IsIso (S.leftHomologyπ ≫ S.leftHomologyIso.hom)
state_after: no goals
Theorem: Complex.ofReal_log
File: Mathlib/Analysis/SpecialFunctions/Complex/Log.lean

tactic: rw [log_re, ofReal_re, abs_of_nonneg hx]
state_before: x : ℝ
hx : 0 ≤ x
⊢ (↑(Real.log x)).re = (log ↑x).re
state_after: no goals

tactic: rw [ofReal_im, log_im, arg_ofReal_of_nonneg hx]
state_before: x : ℝ
hx : 0 ≤ x
⊢ (↑(Real.log x)).im = (log ↑x).im
state_after: no goals
Theorem: ENNReal.pow_rpow_inv_natCast
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: rw [← rpow_natCast, ← rpow_mul, mul_inv_cancel (by positivity), rpow_one]
state_before: n : ℕ
hn : n ≠ 0
x : ℝ≥0∞
⊢ (x ^ n) ^ (↑n)⁻¹ = x
state_after: no goals

tactic: positivity
state_before: n : ℕ
hn : n ≠ 0
x : ℝ≥0∞
⊢ ↑n ≠ 0
state_after: no goals
Theorem: Set.preimage_image_preimage
File: Mathlib/Data/Set/Image.lean

tactic: rw [image_preimage_eq_range_inter, preimage_range_inter]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s✝ t : Set α
f : α → β
s : Set β
⊢ f ⁻¹' (f '' (f ⁻¹' s)) = f ⁻¹' s
state_after: no goals
Theorem: Set.exists_min_image
File: Mathlib/Data/Set/Finite.lean

tactic: simpa only [exists_prop, Finite.mem_toFinset] using
  h1.toFinset.exists_min_image f ⟨x, h1.mem_toFinset.2 hx⟩
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s✝ t : Set α
inst✝ : LinearOrder β
s : Set α
f : α → β
h1 : s.Finite
x : α
hx : x ∈ s
⊢ ∃ a ∈ s, ∀ b ∈ s, f a ≤ f b
state_after: no goals
Theorem: CategoryTheory.Limits.MonoCoprod.mono_inj
File: Mathlib/CategoryTheory/Limits/MonoCoprod.lean

tactic: let ι : Unit → I := fun _ ↦ i
state_before: C : Type u_1
inst✝² : Category.{u_3, u_1} C
inst✝¹ : MonoCoprod C
I : Type u_2
X : I → C
c : Cofan X
h : IsColimit c
i : I
inst✝ : HasCoproduct fun k => X ↑k
⊢ Mono (c.inj i)
state_after: C : Type u_1
inst✝² : Category.{u_3, u_1} C
inst✝¹ : MonoCoprod C
I : Type u_2
X : I → C
c : Cofan X
h : IsColimit c
i : I
inst✝ : HasCoproduct fun k => X ↑k
ι : Unit → I := fun x => i
⊢ Mono (c.inj i)

tactic: have hι : Function.Injective ι := fun _ _ _ ↦ rfl
state_before: C : Type u_1
inst✝² : Category.{u_3, u_1} C
inst✝¹ : MonoCoprod C
I : Type u_2
X : I → C
c : Cofan X
h : IsColimit c
i : I
inst✝ : HasCoproduct fun k => X ↑k
ι : Unit → I := fun x => i
⊢ Mono (c.inj i)
state_after: C : Type u_1
inst✝² : Category.{u_3, u_1} C
inst✝¹ : MonoCoprod C
I : Type u_2
X : I → C
c : Cofan X
h : IsColimit c
i : I
inst✝ : HasCoproduct fun k => X ↑k
ι : Unit → I := fun x => i
hι : Function.Injective ι
⊢ Mono (c.inj i)

tactic: exact mono_of_injective X ι hι c (Cofan.mk (X i) (fun _ ↦ 𝟙 _)) h
  (mkCofanColimit _ (fun s => s.inj ()))
state_before: C : Type u_1
inst✝² : Category.{u_3, u_1} C
inst✝¹ : MonoCoprod C
I : Type u_2
X : I → C
c : Cofan X
h : IsColimit c
i : I
inst✝ : HasCoproduct fun k => X ↑k
ι : Unit → I := fun x => i
hι : Function.Injective ι
⊢ Mono (c.inj i)
state_after: no goals
Theorem: GeneralizedContinuedFraction.of_terminates_iff_of_rat_terminates
File: Mathlib/Algebra/ContinuedFractions/Computation/TerminatesIffRat.lean

tactic: constructor <;> intro h <;> cases' h with n h <;> use n <;>
  simp only [Stream'.Seq.TerminatedAt, (coe_of_s_get?_rat_eq v_eq_q n).symm] at h ⊢ <;>
  cases h' : (of q).s.get? n <;>
  simp only [h'] at h <;> trivial
state_before: K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v✝ : K
q✝ : ℚ
v_eq_q✝ : v✝ = ↑q✝
n : ℕ
v : K
q : ℚ
v_eq_q : v = ↑q
⊢ (of v).Terminates ↔ (of q).Terminates
state_after: no goals
Theorem: Nat.count_succ_eq_count_iff
File: Mathlib/Data/Nat/Count.lean

tactic: by_cases h : p n <;> simp [h, count_succ]
state_before: p : ℕ → Prop
inst✝ : DecidablePred p
n : ℕ
⊢ count p (n + 1) = count p n ↔ ¬p n
state_after: no goals
Theorem: Nat.pred_eq_ppred
File: Mathlib/Data/Nat/PSub.lean

tactic: cases n <;> rfl
state_before: n : ℕ
⊢ n.pred = n.ppred.getD 0
state_after: no goals
Theorem: AlgebraicTopology.inclusionOfMooreComplexMap_f
File: Mathlib/AlgebraicTopology/AlternatingFaceMapComplex.lean

tactic: dsimp only [inclusionOfMooreComplexMap]
state_before: C : Type u_1
inst✝³ : Category.{?u.71437, u_1} C
inst✝² : Preadditive C
A : Type u_2
inst✝¹ : Category.{u_3, u_2} A
inst✝ : Abelian A
X : SimplicialObject A
n : ℕ
⊢ (inclusionOfMooreComplexMap X).f n = (NormalizedMooreComplex.objX X n).arrow
state_after: C : Type u_1
inst✝³ : Category.{?u.71437, u_1} C
inst✝² : Preadditive C
A : Type u_2
inst✝¹ : Category.{u_3, u_2} A
inst✝ : Abelian A
X : SimplicialObject A
n : ℕ
⊢ (id
          (ChainComplex.ofHom (fun n => underlying.obj (NormalizedMooreComplex.objX X n))
            (NormalizedMooreComplex.objD X) ⋯ (fun n => X _[n]) (AlternatingFaceMapComplex.objD X) ⋯
            (fun n => (NormalizedMooreComplex.objX X n).arrow) ⋯)).f
      n =
    (NormalizedMooreComplex.objX X n).arrow

tactic: exact ChainComplex.ofHom_f _ _ _ _ _ _ _ _ n
state_before: C : Type u_1
inst✝³ : Category.{?u.71437, u_1} C
inst✝² : Preadditive C
A : Type u_2
inst✝¹ : Category.{u_3, u_2} A
inst✝ : Abelian A
X : SimplicialObject A
n : ℕ
⊢ (id
          (ChainComplex.ofHom (fun n => underlying.obj (NormalizedMooreComplex.objX X n))
            (NormalizedMooreComplex.objD X) ⋯ (fun n => X _[n]) (AlternatingFaceMapComplex.objD X) ⋯
            (fun n => (NormalizedMooreComplex.objX X n).arrow) ⋯)).f
      n =
    (NormalizedMooreComplex.objX X n).arrow
state_after: no goals
Theorem: Int.cast_neg
File: Mathlib/Data/Int/Cast/Basic.lean

tactic: erw [cast_zero, neg_zero]
state_before: R : Type u
inst✝ : AddGroupWithOne R
⊢ ↑(-↑0) = -↑↑0
state_after: no goals

tactic: erw [cast_natCast, cast_negSucc]
state_before: R : Type u
inst✝ : AddGroupWithOne R
n : ℕ
⊢ ↑(-↑(n + 1)) = -↑↑(n + 1)
state_after: no goals

tactic: erw [cast_natCast, cast_negSucc, neg_neg]
state_before: R : Type u
inst✝ : AddGroupWithOne R
n : ℕ
⊢ ↑(- -[n+1]) = -↑-[n+1]
state_after: no goals
Theorem: Units.mul_inv_cancel_right
File: Mathlib/Algebra/Group/Units.lean

tactic: rw [mul_assoc, mul_inv, mul_one]
state_before: α : Type u
inst✝ : Monoid α
a✝ b✝ c u : αˣ
a : α
b : αˣ
⊢ a * ↑b * ↑b⁻¹ = a
state_after: no goals
Theorem: Ideal.isRadical_iff_quotient_reduced
File: Mathlib/RingTheory/QuotientNilpotent.lean

tactic: conv_lhs => rw [← @Ideal.mk_ker R _ I]
state_before: R : Type u_1
inst✝ : CommRing R
I : Ideal R
⊢ I.IsRadical ↔ IsReduced (R ⧸ I)
state_after: R : Type u_1
inst✝ : CommRing R
I : Ideal R
⊢ (RingHom.ker (Quotient.mk I)).IsRadical ↔ IsReduced (R ⧸ I)

tactic: exact RingHom.ker_isRadical_iff_reduced_of_surjective (@Ideal.Quotient.mk_surjective R _ I)
state_before: R : Type u_1
inst✝ : CommRing R
I : Ideal R
⊢ (RingHom.ker (Quotient.mk I)).IsRadical ↔ IsReduced (R ⧸ I)
state_after: no goals
Theorem: RatFunc.toFractionRing_injective
File: Mathlib/FieldTheory/RatFunc/Defs.lean

tactic: subst xy
state_before: K : Type u
inst✝ : CommRing K
x y : FractionRing K[X]
xy : { toFractionRing := x }.toFractionRing = { toFractionRing := y }.toFractionRing
⊢ { toFractionRing := x } = { toFractionRing := y }
state_after: K : Type u
inst✝ : CommRing K
x : FractionRing K[X]
⊢ { toFractionRing := x } = { toFractionRing := { toFractionRing := x }.toFractionRing }

tactic: rfl
state_before: K : Type u
inst✝ : CommRing K
x : FractionRing K[X]
⊢ { toFractionRing := x } = { toFractionRing := { toFractionRing := x }.toFractionRing }
state_after: no goals
Theorem: Set.image_update_uIcc_right
File: Mathlib/Order/Interval/Set/Pi.lean

tactic: simpa using image_update_uIcc f i (f i) b
state_before: ι : Type u_1
α : ι → Type u_2
inst✝¹ : (i : ι) → Lattice (α i)
inst✝ : DecidableEq ι
f : (i : ι) → α i
i : ι
b : α i
⊢ update f i '' uIcc (f i) b = uIcc f (update f i b)
state_after: no goals
Theorem: map_sub_le_max
File: Mathlib/Analysis/Normed/Group/Seminorm.lean

tactic: rw [sub_eq_add_neg, ← NonarchAddGroupSeminormClass.map_neg_eq_map' f y]
state_before: ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝² : AddGroup E
inst✝¹ : FunLike F E ℝ
inst✝ : NonarchAddGroupSeminormClass F E
f : F
x y : E
⊢ f (x - y) ≤ max (f x) (f y)
state_after: ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝² : AddGroup E
inst✝¹ : FunLike F E ℝ
inst✝ : NonarchAddGroupSeminormClass F E
f : F
x y : E
⊢ f (x + -y) ≤ max (f x) (f (-y))

tactic: exact map_add_le_max _ _ _
state_before: ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝² : AddGroup E
inst✝¹ : FunLike F E ℝ
inst✝ : NonarchAddGroupSeminormClass F E
f : F
x y : E
⊢ f (x + -y) ≤ max (f x) (f (-y))
state_after: no goals