1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: MultilinearMap.curryFinFinset_apply_const_aux
File: Mathlib/LinearAlgebra/Multilinear/Basic.lean

tactic: rw [← curryFinFinset_apply]
state_before: R : Type uR
S : Type uS
ι : Type uι
n✝ : ℕ
M : Fin n✝.succ → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁶ : CommSemiring R
inst✝⁵ : (i : Fin n✝.succ) → AddCommMonoid (M i)
inst✝⁴ : AddCommMonoid M'
inst✝³ : AddCommMonoid M₂
inst✝² : (i : Fin n✝.succ) → Module R (M i)
inst✝¹ : Module R M'
inst✝ : Module R M₂
ι' : Type u_1
k l n : ℕ
s : Finset (Fin n)
hk : s.card = k
hl : sᶜ.card = l
f : MultilinearMap R (fun x => M') M₂
x y : M'
⊢ (f fun i => Sum.elim (fun x_1 => x) (fun x => y) ((finSumEquivOfFinset hk hl).symm i)) =
    f (s.piecewise (fun x_1 => x) fun x => y)
state_after: R : Type uR
S : Type uS
ι : Type uι
n✝ : ℕ
M : Fin n✝.succ → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁶ : CommSemiring R
inst✝⁵ : (i : Fin n✝.succ) → AddCommMonoid (M i)
inst✝⁴ : AddCommMonoid M'
inst✝³ : AddCommMonoid M₂
inst✝² : (i : Fin n✝.succ) → Module R (M i)
inst✝¹ : Module R M'
inst✝ : Module R M₂
ι' : Type u_1
k l n : ℕ
s : Finset (Fin n)
hk : s.card = k
hl : sᶜ.card = l
f : MultilinearMap R (fun x => M') M₂
x y : M'
⊢ ((((curryFinFinset R M₂ M' hk hl) f) fun x_1 => x) fun x => y) = f (s.piecewise (fun x_1 => x) fun x => y)

tactic: apply curryFinFinset_apply_const
state_before: R : Type uR
S : Type uS
ι : Type uι
n✝ : ℕ
M : Fin n✝.succ → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁶ : CommSemiring R
inst✝⁵ : (i : Fin n✝.succ) → AddCommMonoid (M i)
inst✝⁴ : AddCommMonoid M'
inst✝³ : AddCommMonoid M₂
inst✝² : (i : Fin n✝.succ) → Module R (M i)
inst✝¹ : Module R M'
inst✝ : Module R M₂
ι' : Type u_1
k l n : ℕ
s : Finset (Fin n)
hk : s.card = k
hl : sᶜ.card = l
f : MultilinearMap R (fun x => M') M₂
x y : M'
⊢ ((((curryFinFinset R M₂ M' hk hl) f) fun x_1 => x) fun x => y) = f (s.piecewise (fun x_1 => x) fun x => y)
state_after: no goals
Theorem: Matrix.blockDiagonal_mul
File: Mathlib/Data/Matrix/Block.lean

tactic: ext ⟨i, k⟩ ⟨j, k'⟩
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
p : Type u_5
q : Type u_6
m' : o → Type u_7
n' : o → Type u_8
p' : o → Type u_9
R : Type u_10
S : Type u_11
α : Type u_12
β : Type u_13
inst✝³ : DecidableEq o
inst✝² : Fintype n
inst✝¹ : Fintype o
inst✝ : NonUnitalNonAssocSemiring α
M : o → Matrix m n α
N : o → Matrix n p α
⊢ (blockDiagonal fun k => M k * N k) = blockDiagonal M * blockDiagonal N
state_after: case a.mk.mk
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
p : Type u_5
q : Type u_6
m' : o → Type u_7
n' : o → Type u_8
p' : o → Type u_9
R : Type u_10
S : Type u_11
α : Type u_12
β : Type u_13
inst✝³ : DecidableEq o
inst✝² : Fintype n
inst✝¹ : Fintype o
inst✝ : NonUnitalNonAssocSemiring α
M : o → Matrix m n α
N : o → Matrix n p α
i : m
k : o
j : p
k' : o
⊢ blockDiagonal (fun k => M k * N k) (i, k) (j, k') = (blockDiagonal M * blockDiagonal N) (i, k) (j, k')

tactic: simp only [blockDiagonal_apply, mul_apply, ← Finset.univ_product_univ, Finset.sum_product]
state_before: case a.mk.mk
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
p : Type u_5
q : Type u_6
m' : o → Type u_7
n' : o → Type u_8
p' : o → Type u_9
R : Type u_10
S : Type u_11
α : Type u_12
β : Type u_13
inst✝³ : DecidableEq o
inst✝² : Fintype n
inst✝¹ : Fintype o
inst✝ : NonUnitalNonAssocSemiring α
M : o → Matrix m n α
N : o → Matrix n p α
i : m
k : o
j : p
k' : o
⊢ blockDiagonal (fun k => M k * N k) (i, k) (j, k') = (blockDiagonal M * blockDiagonal N) (i, k) (j, k')
state_after: case a.mk.mk
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
p : Type u_5
q : Type u_6
m' : o → Type u_7
n' : o → Type u_8
p' : o → Type u_9
R : Type u_10
S : Type u_11
α : Type u_12
β : Type u_13
inst✝³ : DecidableEq o
inst✝² : Fintype n
inst✝¹ : Fintype o
inst✝ : NonUnitalNonAssocSemiring α
M : o → Matrix m n α
N : o → Matrix n p α
i : m
k : o
j : p
k' : o
⊢ (if k = k' then ∑ j_1 : n, M k i j_1 * N k j_1 j else 0) =
    ∑ x : n, ∑ x_1 : o, (if k = x_1 then M k i x else 0) * if x_1 = k' then N x_1 x j else 0

tactic: split_ifs with h <;> simp [h]
state_before: case a.mk.mk
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
p : Type u_5
q : Type u_6
m' : o → Type u_7
n' : o → Type u_8
p' : o → Type u_9
R : Type u_10
S : Type u_11
α : Type u_12
β : Type u_13
inst✝³ : DecidableEq o
inst✝² : Fintype n
inst✝¹ : Fintype o
inst✝ : NonUnitalNonAssocSemiring α
M : o → Matrix m n α
N : o → Matrix n p α
i : m
k : o
j : p
k' : o
⊢ (if k = k' then ∑ j_1 : n, M k i j_1 * N k j_1 j else 0) =
    ∑ x : n, ∑ x_1 : o, (if k = x_1 then M k i x else 0) * if x_1 = k' then N x_1 x j else 0
state_after: no goals
Theorem: Even.neg_pow
File: Mathlib/Algebra/Ring/Parity.lean

tactic: rintro ⟨c, rfl⟩ a
state_before: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
inst✝¹ : Monoid α
inst✝ : HasDistribNeg α
n : ℕ
a : α
⊢ Even n → ∀ (a : α), (-a) ^ n = a ^ n
state_after: case intro
F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
inst✝¹ : Monoid α
inst✝ : HasDistribNeg α
a✝ : α
c : ℕ
a : α
⊢ (-a) ^ (c + c) = a ^ (c + c)

tactic: simp_rw [← two_mul, pow_mul, neg_sq]
state_before: case intro
F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
inst✝¹ : Monoid α
inst✝ : HasDistribNeg α
a✝ : α
c : ℕ
a : α
⊢ (-a) ^ (c + c) = a ^ (c + c)
state_after: no goals
Theorem: Localization.AtPrime.map_eq_maximalIdeal
File: Mathlib/RingTheory/Localization/AtPrime.lean

tactic: convert congr_arg (Ideal.map (algebraMap R (Localization.AtPrime I)))
(AtPrime.comap_maximalIdeal (hI := hI)).symm
state_before: R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
P : Type u_3
inst✝ : CommSemiring P
I : Ideal R
hI : I.IsPrime
⊢ Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization I.primeCompl)
state_after: case h.e'_3
R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
P : Type u_3
inst✝ : CommSemiring P
I : Ideal R
hI : I.IsPrime
⊢ LocalRing.maximalIdeal (Localization I.primeCompl) =
    Ideal.map (algebraMap R (Localization.AtPrime I))
      (Ideal.comap (algebraMap R (Localization.AtPrime I)) (LocalRing.maximalIdeal (Localization I.primeCompl)))

tactic: rw [map_comap I.primeCompl]
state_before: case h.e'_3
R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
P : Type u_3
inst✝ : CommSemiring P
I : Ideal R
hI : I.IsPrime
⊢ LocalRing.maximalIdeal (Localization I.primeCompl) =
    Ideal.map (algebraMap R (Localization.AtPrime I))
      (Ideal.comap (algebraMap R (Localization.AtPrime I)) (LocalRing.maximalIdeal (Localization I.primeCompl)))
state_after: no goals
Theorem: Submodule.ker_inr
File: Mathlib/LinearAlgebra/Prod.lean

tactic: rw [ker, ← prod_bot, prod_comap_inr]
state_before: R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
M₅ : Type u_1
M₆ : Type u_2
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : AddCommMonoid M₂
inst✝¹ : Module R M
inst✝ : Module R M₂
p : Submodule R M
q : Submodule R M₂
⊢ ker (inr R M M₂) = ⊥
state_after: no goals
Theorem: MeasureTheory.ae_eq_set_compl_compl
File: Mathlib/MeasureTheory/OuterMeasure/AE.lean

tactic: simp only [← measure_symmDiff_eq_zero_iff, compl_symmDiff_compl]
state_before: α : Type u_1
β : Type u_2
F : Type u_3
inst✝¹ : FunLike F (Set α) ℝ≥0∞
inst✝ : OuterMeasureClass F α
μ : F
s✝ t✝ s t : Set α
⊢ sᶜ =ᶠ[ae μ] tᶜ ↔ s =ᶠ[ae μ] t
state_after: no goals
Theorem: CompHaus.Sigma.ι_comp_toFiniteCoproduct
File: Mathlib/Topology/Category/CompHaus/Limits.lean

tactic: simp [coproductIsoCoproduct]
state_before: α : Type w
inst✝ : Finite α
X : α → CompHaus
a : α
⊢ Sigma.ι X a ≫ (coproductIsoCoproduct X).inv = finiteCoproduct.ι X a
state_after: no goals
Theorem: LucasLehmer.X.left_distrib
File: Mathlib/NumberTheory/LucasLehmer.lean

tactic: ext <;> dsimp <;> ring
state_before: q : ℕ+
x y z : X q
⊢ x * (y + z) = x * y + x * z
state_after: no goals
Theorem: MulHom.comp_mul
File: Mathlib/Algebra/Group/Hom/Basic.lean

tactic: ext
state_before: α : Type u_1
β : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
G : Type u_6
H : Type u_7
F : Type u_8
inst✝² : Mul M
inst✝¹ : CommSemigroup N
inst✝ : CommSemigroup P
g : N →ₙ* P
f₁ f₂ : M →ₙ* N
⊢ g.comp (f₁ * f₂) = g.comp f₁ * g.comp f₂
state_after: case h
α : Type u_1
β : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
G : Type u_6
H : Type u_7
F : Type u_8
inst✝² : Mul M
inst✝¹ : CommSemigroup N
inst✝ : CommSemigroup P
g : N →ₙ* P
f₁ f₂ : M →ₙ* N
x✝ : M
⊢ (g.comp (f₁ * f₂)) x✝ = (g.comp f₁ * g.comp f₂) x✝

tactic: simp only [mul_apply, Function.comp_apply, map_mul, coe_comp]
state_before: case h
α : Type u_1
β : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
G : Type u_6
H : Type u_7
F : Type u_8
inst✝² : Mul M
inst✝¹ : CommSemigroup N
inst✝ : CommSemigroup P
g : N →ₙ* P
f₁ f₂ : M →ₙ* N
x✝ : M
⊢ (g.comp (f₁ * f₂)) x✝ = (g.comp f₁ * g.comp f₂) x✝
state_after: no goals
Theorem: Polynomial.monic_restriction
File: Mathlib/RingTheory/Polynomial/Basic.lean

tactic: simp only [Monic, leadingCoeff, natDegree_restriction]
state_before: R : Type u
S : Type u_1
inst✝ : Ring R
p : R[X]
⊢ p.restriction.Monic ↔ p.Monic
state_after: R : Type u
S : Type u_1
inst✝ : Ring R
p : R[X]
⊢ p.restriction.coeff p.natDegree = 1 ↔ p.coeff p.natDegree = 1

tactic: rw [← @coeff_restriction _ _ p]
state_before: R : Type u
S : Type u_1
inst✝ : Ring R
p : R[X]
⊢ p.restriction.coeff p.natDegree = 1 ↔ p.coeff p.natDegree = 1
state_after: R : Type u
S : Type u_1
inst✝ : Ring R
p : R[X]
⊢ p.restriction.coeff p.natDegree = 1 ↔ ↑(p.restriction.coeff p.natDegree) = 1

tactic: exact ⟨fun H => by rw [H, OneMemClass.coe_one], fun H => Subtype.coe_injective H⟩
state_before: R : Type u
S : Type u_1
inst✝ : Ring R
p : R[X]
⊢ p.restriction.coeff p.natDegree = 1 ↔ ↑(p.restriction.coeff p.natDegree) = 1
state_after: no goals

tactic: rw [H, OneMemClass.coe_one]
state_before: R : Type u
S : Type u_1
inst✝ : Ring R
p : R[X]
H : p.restriction.coeff p.natDegree = 1
⊢ ↑(p.restriction.coeff p.natDegree) = 1
state_after: no goals
Theorem: FirstOrder.Language.realize_iff_of_model_completeTheory
File: Mathlib/ModelTheory/Semantics.lean

tactic: refine ⟨fun h => ?_, (L.completeTheory M).realize_sentence_of_mem⟩
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝³ : L.Structure M
inst✝² : L.Structure N
inst✝¹ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
T : L.Theory
inst✝ : N ⊨ L.completeTheory M
φ : L.Sentence
⊢ N ⊨ φ ↔ M ⊨ φ
state_after: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝³ : L.Structure M
inst✝² : L.Structure N
inst✝¹ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
T : L.Theory
inst✝ : N ⊨ L.completeTheory M
φ : L.Sentence
h : N ⊨ φ
⊢ M ⊨ φ

tactic: contrapose! h
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝³ : L.Structure M
inst✝² : L.Structure N
inst✝¹ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
T : L.Theory
inst✝ : N ⊨ L.completeTheory M
φ : L.Sentence
h : N ⊨ φ
⊢ M ⊨ φ
state_after: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝³ : L.Structure M
inst✝² : L.Structure N
inst✝¹ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
T : L.Theory
inst✝ : N ⊨ L.completeTheory M
φ : L.Sentence
h : ¬M ⊨ φ
⊢ ¬N ⊨ φ

tactic: rw [← Sentence.realize_not] at *
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝³ : L.Structure M
inst✝² : L.Structure N
inst✝¹ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
T : L.Theory
inst✝ : N ⊨ L.completeTheory M
φ : L.Sentence
h : ¬M ⊨ φ
⊢ ¬N ⊨ φ
state_after: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝³ : L.Structure M
inst✝² : L.Structure N
inst✝¹ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
T : L.Theory
inst✝ : N ⊨ L.completeTheory M
φ : L.Sentence
h : M ⊨ Formula.not φ
⊢ N ⊨ Formula.not φ

tactic: exact (L.completeTheory M).realize_sentence_of_mem (mem_completeTheory.2 h)
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝³ : L.Structure M
inst✝² : L.Structure N
inst✝¹ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
T : L.Theory
inst✝ : N ⊨ L.completeTheory M
φ : L.Sentence
h : M ⊨ Formula.not φ
⊢ N ⊨ Formula.not φ
state_after: no goals
Theorem: Fintype.card_eq_card_units_add_one
File: Mathlib/Data/Fintype/Units.lean

tactic: rw [eq_comm, Fintype.card_congr unitsEquivNeZero]
state_before: α : Type u_1
inst✝² : GroupWithZero α
inst✝¹ : Fintype α
inst✝ : DecidableEq α
⊢ card α = card αˣ + 1
state_after: α : Type u_1
inst✝² : GroupWithZero α
inst✝¹ : Fintype α
inst✝ : DecidableEq α
⊢ card { a // a ≠ 0 } + 1 = card α

tactic: rwa [Fintype.card_sum, add_comm, Fintype.card_subtype_eq] at this
state_before: α : Type u_1
inst✝² : GroupWithZero α
inst✝¹ : Fintype α
inst✝ : DecidableEq α
this : card ({ a // a = 0 } ⊕ { a // ¬a = 0 }) = card α
⊢ card { a // a ≠ 0 } + 1 = card α
state_after: no goals
Theorem: mem_skewAdjointMatricesLieSubalgebra_unit_smul
File: Mathlib/Algebra/Lie/SkewAdjoint.lean

tactic: change A ∈ skewAdjointMatricesSubmodule (u • J) ↔ A ∈ skewAdjointMatricesSubmodule J
state_before: R : Type u
n : Type w
inst✝² : CommRing R
inst✝¹ : DecidableEq n
inst✝ : Fintype n
J✝ : Matrix n n R
u : Rˣ
J A : Matrix n n R
⊢ A ∈ skewAdjointMatricesLieSubalgebra (u • J) ↔ A ∈ skewAdjointMatricesLieSubalgebra J
state_after: R : Type u
n : Type w
inst✝² : CommRing R
inst✝¹ : DecidableEq n
inst✝ : Fintype n
J✝ : Matrix n n R
u : Rˣ
J A : Matrix n n R
⊢ A ∈ skewAdjointMatricesSubmodule (u • J) ↔ A ∈ skewAdjointMatricesSubmodule J

tactic: simp only [mem_skewAdjointMatricesSubmodule, Matrix.IsSkewAdjoint, Matrix.IsAdjointPair]
state_before: R : Type u
n : Type w
inst✝² : CommRing R
inst✝¹ : DecidableEq n
inst✝ : Fintype n
J✝ : Matrix n n R
u : Rˣ
J A : Matrix n n R
⊢ A ∈ skewAdjointMatricesSubmodule (u • J) ↔ A ∈ skewAdjointMatricesSubmodule J
state_after: R : Type u
n : Type w
inst✝² : CommRing R
inst✝¹ : DecidableEq n
inst✝ : Fintype n
J✝ : Matrix n n R
u : Rˣ
J A : Matrix n n R
⊢ Aᵀ * u • J = u • J * -A ↔ Aᵀ * J = J * -A

tactic: constructor <;> intro h
state_before: R : Type u
n : Type w
inst✝² : CommRing R
inst✝¹ : DecidableEq n
inst✝ : Fintype n
J✝ : Matrix n n R
u : Rˣ
J A : Matrix n n R
⊢ Aᵀ * u • J = u • J * -A ↔ Aᵀ * J = J * -A
state_after: case mp
R : Type u
n : Type w
inst✝² : CommRing R
inst✝¹ : DecidableEq n
inst✝ : Fintype n
J✝ : Matrix n n R
u : Rˣ
J A : Matrix n n R
h : Aᵀ * u • J = u • J * -A
⊢ Aᵀ * J = J * -A

case mpr
R : Type u
n : Type w
inst✝² : CommRing R
inst✝¹ : DecidableEq n
inst✝ : Fintype n
J✝ : Matrix n n R
u : Rˣ
J A : Matrix n n R
h : Aᵀ * J = J * -A
⊢ Aᵀ * u • J = u • J * -A

tactic: simpa using congr_arg (fun B => u⁻¹ • B) h
state_before: case mp
R : Type u
n : Type w
inst✝² : CommRing R
inst✝¹ : DecidableEq n
inst✝ : Fintype n
J✝ : Matrix n n R
u : Rˣ
J A : Matrix n n R
h : Aᵀ * u • J = u • J * -A
⊢ Aᵀ * J = J * -A
state_after: no goals

tactic: simp [h]
state_before: case mpr
R : Type u
n : Type w
inst✝² : CommRing R
inst✝¹ : DecidableEq n
inst✝ : Fintype n
J✝ : Matrix n n R
u : Rˣ
J A : Matrix n n R
h : Aᵀ * J = J * -A
⊢ Aᵀ * u • J = u • J * -A
state_after: no goals
Theorem: Finsupp.prod_subtypeDomain_index
File: Mathlib/Data/Finsupp/Basic.lean

tactic: refine Finset.prod_bij (fun p _ ↦ p) ?_ ?_ ?_ ?_ <;> aesop
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝¹ : Zero M
p : α → Prop
inst✝ : CommMonoid N
v : α →₀ M
h : α → M → N
hp : ∀ x ∈ v.support, p x
⊢ ((subtypeDomain p v).prod fun a b => h (↑a) b) = v.prod h
state_after: no goals
Theorem: AlgebraicGeometry.StructureSheaf.comap_comp
File: Mathlib/AlgebraicGeometry/StructureSheaf.lean

tactic: rw [comap_apply]
state_before: R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
g : S →+* P
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
W : Opens ↑(PrimeSpectrum.Top P)
hUV : ∀ p ∈ V, (PrimeSpectrum.comap f) p ∈ U
hVW : ∀ p ∈ W, (PrimeSpectrum.comap g) p ∈ V
s : ↑((structureSheaf R).val.obj { unop := U })
p : ↥{ unop := W }.unop
⊢ ↑((comap (g.comp f) U W ⋯) s) p = ↑(((comap g V W hVW).comp (comap f U V hUV)) s) p
state_after: R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
g : S →+* P
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
W : Opens ↑(PrimeSpectrum.Top P)
hUV : ∀ p ∈ V, (PrimeSpectrum.comap f) p ∈ U
hVW : ∀ p ∈ W, (PrimeSpectrum.comap g) p ∈ V
s : ↑((structureSheaf R).val.obj { unop := U })
p : ↥{ unop := W }.unop
⊢ (Localization.localRingHom ((PrimeSpectrum.comap (g.comp f)) ↑p).asIdeal (↑p).asIdeal (g.comp f) ⋯)
      (↑s ⟨(PrimeSpectrum.comap (g.comp f)) ↑p, ⋯⟩) =
    ↑(((comap g V W hVW).comp (comap f U V hUV)) s) p

tactic: erw [Localization.localRingHom_comp _ (PrimeSpectrum.comap g p.1).asIdeal] <;>
rfl
state_before: R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
g : S →+* P
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
W : Opens ↑(PrimeSpectrum.Top P)
hUV : ∀ p ∈ V, (PrimeSpectrum.comap f) p ∈ U
hVW : ∀ p ∈ W, (PrimeSpectrum.comap g) p ∈ V
s : ↑((structureSheaf R).val.obj { unop := U })
p : ↥{ unop := W }.unop
⊢ (Localization.localRingHom ((PrimeSpectrum.comap (g.comp f)) ↑p).asIdeal (↑p).asIdeal (g.comp f) ⋯)
      (↑s ⟨(PrimeSpectrum.comap (g.comp f)) ↑p, ⋯⟩) =
    ↑(((comap g V W hVW).comp (comap f U V hUV)) s) p
state_after: no goals
Theorem: Real.cosh_two_mul
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← ofReal_inj]
state_before: x y : ℝ
⊢ cosh (2 * x) = cosh x ^ 2 + sinh x ^ 2
state_after: x y : ℝ
⊢ ↑(cosh (2 * x)) = ↑(cosh x ^ 2 + sinh x ^ 2)

tactic: simp [cosh_two_mul]
state_before: x y : ℝ
⊢ ↑(cosh (2 * x)) = ↑(cosh x ^ 2 + sinh x ^ 2)
state_after: no goals
Theorem: FreeGroup.Red.Step.append_left_iff
File: Mathlib/GroupTheory/FreeGroup/Basic.lean

tactic: simp
state_before: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
⊢ Step ([] ++ L₁) ([] ++ L₂) ↔ Step L₁ L₂
state_after: no goals

tactic: simp [Step.append_left_iff l, Step.cons_cons_iff]
state_before: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
p : α × Bool
l : List (α × Bool)
⊢ Step (p :: l ++ L₁) (p :: l ++ L₂) ↔ Step L₁ L₂
state_after: no goals
Theorem: Polynomial.iterate_comp_eval₂
File: Mathlib/Algebra/Polynomial/Eval.lean

tactic: induction' k with k IH
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q : R[X]
x : R
inst✝ : CommSemiring S
f : R →+* S
k : ℕ
t : S
⊢ eval₂ f t (p.comp^[k] q) = (fun x => eval₂ f x p)^[k] (eval₂ f t q)
state_after: case zero
R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q : R[X]
x : R
inst✝ : CommSemiring S
f : R →+* S
t : S
⊢ eval₂ f t (p.comp^[0] q) = (fun x => eval₂ f x p)^[0] (eval₂ f t q)

case succ
R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q : R[X]
x : R
inst✝ : CommSemiring S
f : R →+* S
t : S
k : ℕ
IH : eval₂ f t (p.comp^[k] q) = (fun x => eval₂ f x p)^[k] (eval₂ f t q)
⊢ eval₂ f t (p.comp^[k + 1] q) = (fun x => eval₂ f x p)^[k + 1] (eval₂ f t q)

tactic: simp
state_before: case zero
R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q : R[X]
x : R
inst✝ : CommSemiring S
f : R →+* S
t : S
⊢ eval₂ f t (p.comp^[0] q) = (fun x => eval₂ f x p)^[0] (eval₂ f t q)
state_after: no goals

tactic: rw [Function.iterate_succ_apply', Function.iterate_succ_apply', eval₂_comp, IH]
state_before: case succ
R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q : R[X]
x : R
inst✝ : CommSemiring S
f : R →+* S
t : S
k : ℕ
IH : eval₂ f t (p.comp^[k] q) = (fun x => eval₂ f x p)^[k] (eval₂ f t q)
⊢ eval₂ f t (p.comp^[k + 1] q) = (fun x => eval₂ f x p)^[k + 1] (eval₂ f t q)
state_after: no goals
Theorem: convexJoin_left_comm
File: Mathlib/Analysis/Convex/Join.lean

tactic: simp_rw [← convexJoin_assoc, convexJoin_comm]
state_before: ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
inst✝² : LinearOrderedField 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
s✝ t✝ u✝ : Set E
x y : E
s t u : Set E
⊢ convexJoin 𝕜 s (convexJoin 𝕜 t u) = convexJoin 𝕜 t (convexJoin 𝕜 s u)
state_after: no goals
Theorem: composition_card
File: Mathlib/Combinatorics/Enumerative/Composition.lean

tactic: rw [← compositionAsSet_card n]
state_before: n✝ n : ℕ
⊢ Fintype.card (Composition n) = 2 ^ (n - 1)
state_after: n✝ n : ℕ
⊢ Fintype.card (Composition n) = Fintype.card (CompositionAsSet n)

tactic: exact Fintype.card_congr (compositionEquiv n)
state_before: n✝ n : ℕ
⊢ Fintype.card (Composition n) = Fintype.card (CompositionAsSet n)
state_after: no goals
Theorem: ENNReal.rpow_mul_natCast
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: rw [rpow_mul, rpow_natCast]
state_before: x : ℝ≥0∞
y : ℝ
n : ℕ
⊢ x ^ (y * ↑n) = (x ^ y) ^ n
state_after: no goals
Theorem: HurwitzZeta.completedHurwitzZetaEven_eq
File: Mathlib/NumberTheory/LSeries/HurwitzZetaEven.lean

tactic: rw [completedHurwitzZetaEven, WeakFEPair.Λ, sub_div, sub_div]
state_before: a : UnitAddCircle
s : ℂ
⊢ completedHurwitzZetaEven a s = completedHurwitzZetaEven₀ a s - (if a = 0 then 1 else 0) / s - 1 / (1 - s)
state_after: a : UnitAddCircle
s : ℂ
⊢ (hurwitzEvenFEPair a).Λ₀ (s / 2) / 2 - (1 / (s / 2)) • (hurwitzEvenFEPair a).f₀ / 2 -
      ((hurwitzEvenFEPair a).ε / (↑(hurwitzEvenFEPair a).k - s / 2)) • (hurwitzEvenFEPair a).g₀ / 2 =
    completedHurwitzZetaEven₀ a s - (if a = 0 then 1 else 0) / s - 1 / (1 - s)

tactic: congr 1
state_before: a : UnitAddCircle
s : ℂ
⊢ (hurwitzEvenFEPair a).Λ₀ (s / 2) / 2 - (1 / (s / 2)) • (hurwitzEvenFEPair a).f₀ / 2 -
      ((hurwitzEvenFEPair a).ε / (↑(hurwitzEvenFEPair a).k - s / 2)) • (hurwitzEvenFEPair a).g₀ / 2 =
    completedHurwitzZetaEven₀ a s - (if a = 0 then 1 else 0) / s - 1 / (1 - s)
state_after: case e_a
a : UnitAddCircle
s : ℂ
⊢ (hurwitzEvenFEPair a).Λ₀ (s / 2) / 2 - (1 / (s / 2)) • (hurwitzEvenFEPair a).f₀ / 2 =
    completedHurwitzZetaEven₀ a s - (if a = 0 then 1 else 0) / s

case e_a
a : UnitAddCircle
s : ℂ
⊢ ((hurwitzEvenFEPair a).ε / (↑(hurwitzEvenFEPair a).k - s / 2)) • (hurwitzEvenFEPair a).g₀ / 2 = 1 / (1 - s)

tactic: change completedHurwitzZetaEven₀ a s - (1 / (s / 2)) • (if a = 0 then 1 else 0) / 2 =
  completedHurwitzZetaEven₀ a s - (if a = 0 then 1 else 0) / s
state_before: case e_a
a : UnitAddCircle
s : ℂ
⊢ (hurwitzEvenFEPair a).Λ₀ (s / 2) / 2 - (1 / (s / 2)) • (hurwitzEvenFEPair a).f₀ / 2 =
    completedHurwitzZetaEven₀ a s - (if a = 0 then 1 else 0) / s
state_after: case e_a
a : UnitAddCircle
s : ℂ
⊢ completedHurwitzZetaEven₀ a s - ((1 / (s / 2)) • if a = 0 then 1 else 0) / 2 =
    completedHurwitzZetaEven₀ a s - (if a = 0 then 1 else 0) / s

tactic: rw [smul_eq_mul, mul_comm, mul_div_assoc, div_div, div_mul_cancel₀ _ two_ne_zero, mul_one_div]
state_before: case e_a
a : UnitAddCircle
s : ℂ
⊢ completedHurwitzZetaEven₀ a s - ((1 / (s / 2)) • if a = 0 then 1 else 0) / 2 =
    completedHurwitzZetaEven₀ a s - (if a = 0 then 1 else 0) / s
state_after: no goals

tactic: change (1 / (↑(1 / 2 : ℝ) - s / 2)) • 1 / 2 = 1 / (1 - s)
state_before: case e_a
a : UnitAddCircle
s : ℂ
⊢ ((hurwitzEvenFEPair a).ε / (↑(hurwitzEvenFEPair a).k - s / 2)) • (hurwitzEvenFEPair a).g₀ / 2 = 1 / (1 - s)
state_after: case e_a
a : UnitAddCircle
s : ℂ
⊢ (1 / (↑(1 / 2) - s / 2)) • 1 / 2 = 1 / (1 - s)

tactic: push_cast
state_before: case e_a
a : UnitAddCircle
s : ℂ
⊢ (1 / (↑(1 / 2) - s / 2)) • 1 / 2 = 1 / (1 - s)
state_after: case e_a
a : UnitAddCircle
s : ℂ
⊢ (1 / (1 / 2 - s / 2)) • 1 / 2 = 1 / (1 - s)

tactic: rw [smul_eq_mul, mul_one, ← sub_div, div_div, div_mul_cancel₀ _ two_ne_zero]
state_before: case e_a
a : UnitAddCircle
s : ℂ
⊢ (1 / (1 / 2 - s / 2)) • 1 / 2 = 1 / (1 - s)
state_after: no goals