1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: PrincipalIdealRing.mem_submonoid_of_factors_subset_of_units_subset
File: Mathlib/RingTheory/PrincipalIdealDomain.lean

tactic: rcases (factors_spec a ha).2 with ⟨c, hc⟩
state_before: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
s : Submonoid R
a : R
ha : a ≠ 0
hfac : ∀ b ∈ factors a, b ∈ s
hunit : ∀ (c : Rˣ), ↑c ∈ s
⊢ a ∈ s
state_after: case intro
R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
s : Submonoid R
a : R
ha : a ≠ 0
hfac : ∀ b ∈ factors a, b ∈ s
hunit : ∀ (c : Rˣ), ↑c ∈ s
c : Rˣ
hc : (factors a).prod * ↑c = a
⊢ a ∈ s

tactic: rw [← hc]
state_before: case intro
R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
s : Submonoid R
a : R
ha : a ≠ 0
hfac : ∀ b ∈ factors a, b ∈ s
hunit : ∀ (c : Rˣ), ↑c ∈ s
c : Rˣ
hc : (factors a).prod * ↑c = a
⊢ a ∈ s
state_after: case intro
R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
s : Submonoid R
a : R
ha : a ≠ 0
hfac : ∀ b ∈ factors a, b ∈ s
hunit : ∀ (c : Rˣ), ↑c ∈ s
c : Rˣ
hc : (factors a).prod * ↑c = a
⊢ (factors a).prod * ↑c ∈ s

tactic: exact mul_mem (multiset_prod_mem _ hfac) (hunit _)
state_before: case intro
R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
s : Submonoid R
a : R
ha : a ≠ 0
hfac : ∀ b ∈ factors a, b ∈ s
hunit : ∀ (c : Rˣ), ↑c ∈ s
c : Rˣ
hc : (factors a).prod * ↑c = a
⊢ (factors a).prod * ↑c ∈ s
state_after: no goals
Theorem: LinearMap.IsSymm.tmul
File: Mathlib/LinearAlgebra/BilinearForm/TensorProduct.lean

tactic: rw [LinearMap.isSymm_iff_eq_flip]
state_before: ι : Type uι
R : Type uR
A : Type uA
M₁ : Type uM₁
M₂ : Type uM₂
inst✝¹⁰ : CommSemiring R
inst✝⁹ : CommSemiring A
inst✝⁸ : AddCommMonoid M₁
inst✝⁷ : AddCommMonoid M₂
inst✝⁶ : Algebra R A
inst✝⁵ : Module R M₁
inst✝⁴ : Module A M₁
inst✝³ : SMulCommClass R A M₁
inst✝² : SMulCommClass A R M₁
inst✝¹ : IsScalarTower R A M₁
inst✝ : Module R M₂
B₁ : BilinForm A M₁
B₂ : BilinForm R M₂
hB₁ : IsSymm B₁
hB₂ : IsSymm B₂
⊢ IsSymm (B₁.tmul B₂)
state_after: ι : Type uι
R : Type uR
A : Type uA
M₁ : Type uM₁
M₂ : Type uM₂
inst✝¹⁰ : CommSemiring R
inst✝⁹ : CommSemiring A
inst✝⁸ : AddCommMonoid M₁
inst✝⁷ : AddCommMonoid M₂
inst✝⁶ : Algebra R A
inst✝⁵ : Module R M₁
inst✝⁴ : Module A M₁
inst✝³ : SMulCommClass R A M₁
inst✝² : SMulCommClass A R M₁
inst✝¹ : IsScalarTower R A M₁
inst✝ : Module R M₂
B₁ : BilinForm A M₁
B₂ : BilinForm R M₂
hB₁ : IsSymm B₁
hB₂ : IsSymm B₂
⊢ B₁.tmul B₂ = flip (B₁.tmul B₂)

tactic: ext x₁ x₂ y₁ y₂
state_before: ι : Type uι
R : Type uR
A : Type uA
M₁ : Type uM₁
M₂ : Type uM₂
inst✝¹⁰ : CommSemiring R
inst✝⁹ : CommSemiring A
inst✝⁸ : AddCommMonoid M₁
inst✝⁷ : AddCommMonoid M₂
inst✝⁶ : Algebra R A
inst✝⁵ : Module R M₁
inst✝⁴ : Module A M₁
inst✝³ : SMulCommClass R A M₁
inst✝² : SMulCommClass A R M₁
inst✝¹ : IsScalarTower R A M₁
inst✝ : Module R M₂
B₁ : BilinForm A M₁
B₂ : BilinForm R M₂
hB₁ : IsSymm B₁
hB₂ : IsSymm B₂
⊢ B₁.tmul B₂ = flip (B₁.tmul B₂)
state_after: case a.h.h.a.h.h
ι : Type uι
R : Type uR
A : Type uA
M₁ : Type uM₁
M₂ : Type uM₂
inst✝¹⁰ : CommSemiring R
inst✝⁹ : CommSemiring A
inst✝⁸ : AddCommMonoid M₁
inst✝⁷ : AddCommMonoid M₂
inst✝⁶ : Algebra R A
inst✝⁵ : Module R M₁
inst✝⁴ : Module A M₁
inst✝³ : SMulCommClass R A M₁
inst✝² : SMulCommClass A R M₁
inst✝¹ : IsScalarTower R A M₁
inst✝ : Module R M₂
B₁ : BilinForm A M₁
B₂ : BilinForm R M₂
hB₁ : IsSymm B₁
hB₂ : IsSymm B₂
x₁ : M₁
x₂ : M₂
y₁ : M₁
y₂ : M₂
⊢ ((AlgebraTensorModule.curry (((AlgebraTensorModule.curry (B₁.tmul B₂)) x₁) x₂)) y₁) y₂ =
    ((AlgebraTensorModule.curry (((AlgebraTensorModule.curry (flip (B₁.tmul B₂))) x₁) x₂)) y₁) y₂

tactic: exact congr_arg₂ (HSMul.hSMul) (hB₂ x₂ y₂) (hB₁ x₁ y₁)
state_before: case a.h.h.a.h.h
ι : Type uι
R : Type uR
A : Type uA
M₁ : Type uM₁
M₂ : Type uM₂
inst✝¹⁰ : CommSemiring R
inst✝⁹ : CommSemiring A
inst✝⁸ : AddCommMonoid M₁
inst✝⁷ : AddCommMonoid M₂
inst✝⁶ : Algebra R A
inst✝⁵ : Module R M₁
inst✝⁴ : Module A M₁
inst✝³ : SMulCommClass R A M₁
inst✝² : SMulCommClass A R M₁
inst✝¹ : IsScalarTower R A M₁
inst✝ : Module R M₂
B₁ : BilinForm A M₁
B₂ : BilinForm R M₂
hB₁ : IsSymm B₁
hB₂ : IsSymm B₂
x₁ : M₁
x₂ : M₂
y₁ : M₁
y₂ : M₂
⊢ ((AlgebraTensorModule.curry (((AlgebraTensorModule.curry (B₁.tmul B₂)) x₁) x₂)) y₁) y₂ =
    ((AlgebraTensorModule.curry (((AlgebraTensorModule.curry (flip (B₁.tmul B₂))) x₁) x₂)) y₁) y₂
state_after: no goals
Theorem: FractionalIdeal.mul_div_self_cancel_iff
File: Mathlib/RingTheory/FractionalIdeal/Operations.lean

tactic: rwa [← eq_one_div_of_mul_eq_one_right I J hJ]
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
frac : IsFractionRing R₁ K
inst✝ : IsDomain R₁
I✝ J✝ I : FractionalIdeal R₁⁰ K
x✝ : ∃ J, I * J = 1
J : FractionalIdeal R₁⁰ K
hJ : I * J = 1
⊢ I * (1 / I) = 1
state_after: no goals
Theorem: SemiNormedGrp.explicitCokernelπ_apply_dom_eq_zero
File: Mathlib/Analysis/Normed/Group/SemiNormedGrp/Kernels.lean

tactic: rw [comp_explicitCokernelπ]
state_before: X Y : SemiNormedGrp
f : X ⟶ Y
x : ↑X
⊢ (f ≫ explicitCokernelπ f) x = 0
state_after: X Y : SemiNormedGrp
f : X ⟶ Y
x : ↑X
⊢ 0 x = 0

tactic: rfl
state_before: X Y : SemiNormedGrp
f : X ⟶ Y
x : ↑X
⊢ 0 x = 0
state_after: no goals
Theorem: Rat.cast_ofNat
File: Mathlib/Data/Rat/Cast/Defs.lean

tactic: simp [cast_def]
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝¹ : DivisionRing α
p q : ℚ
n : ℕ
inst✝ : n.AtLeastTwo
⊢ ↑(OfNat.ofNat n) = OfNat.ofNat n
state_after: no goals
Theorem: quadraticChar_sq_one
File: Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/Basic.lean

tactic: rwa [pow_two, ← map_mul, ← pow_two, quadraticChar_sq_one']
state_before: F : Type u_1
inst✝² : Field F
inst✝¹ : Fintype F
inst✝ : DecidableEq F
a : F
ha : a ≠ 0
⊢ (quadraticChar F) a ^ 2 = 1
state_after: no goals
Theorem: Function.Involutive.iterate_two_mul
File: Mathlib/Algebra/Ring/Parity.lean

tactic: rw [iterate_mul, involutive_iff_iter_2_eq_id.1 hf, iterate_id]
state_before: F : Type u_1
α✝ : Type u_2
β : Type u_3
R : Type u_4
α : Type u_5
f : α → α
n✝ : ℕ
hf : Involutive f
n : ℕ
⊢ f^[2 * n] = id
state_after: no goals
Theorem: Nat.cast_eq_zero
File: Mathlib/Algebra/CharZero/Defs.lean

tactic: rw [← cast_zero, cast_inj]
state_before: R : Type u_1
inst✝¹ : AddMonoidWithOne R
inst✝ : CharZero R
n : ℕ
⊢ ↑n = 0 ↔ n = 0
state_after: no goals
Theorem: IsAdjoinRootMonic.modByMonicHom_root
File: Mathlib/RingTheory/IsAdjoinRoot.lean

tactic: simpa using modByMonicHom_root_pow h hdeg
state_before: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : Ring S
f : R[X]
inst✝ : Algebra R S
h : IsAdjoinRootMonic S f
hdeg : 1 < f.natDegree
⊢ h.modByMonicHom h.root = X
state_after: no goals
Theorem: Set.preimage_const_add_Ioc
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [← Ioi_inter_Iic]
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ (fun x => a + x) ⁻¹' Ioc b c = Ioc (b - a) (c - a)
state_after: no goals
Theorem: iteratedDerivWithin_succ'
File: Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean

tactic: rw [iteratedDerivWithin_eq_iterate hxs hx, iteratedDerivWithin_eq_iterate hxs hx]
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ x : 𝕜
hxs : UniqueDiffOn 𝕜 s
hx : x ∈ s
⊢ iteratedDerivWithin (n + 1) f s x = iteratedDerivWithin n (derivWithin f s) s x
state_after: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ x : 𝕜
hxs : UniqueDiffOn 𝕜 s
hx : x ∈ s
⊢ (fun g => derivWithin g s)^[n + 1] f x = (fun g => derivWithin g s)^[n] (derivWithin f s) x

tactic: rfl
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ x : 𝕜
hxs : UniqueDiffOn 𝕜 s
hx : x ∈ s
⊢ (fun g => derivWithin g s)^[n + 1] f x = (fun g => derivWithin g s)^[n] (derivWithin f s) x
state_after: no goals
Theorem: constantCoeff_wittPolynomial
File: Mathlib/RingTheory/WittVector/WittPolynomial.lean

tactic: simp only [wittPolynomial, map_sum, constantCoeff_monomial]
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type u_2
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n : ℕ
⊢ constantCoeff (W_ R n) = 0
state_after: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type u_2
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n : ℕ
⊢ (∑ x ∈ range (n + 1), if single x (p ^ (n - x)) = 0 then ↑p ^ x else 0) = 0

tactic: rw [sum_eq_zero]
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type u_2
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n : ℕ
⊢ (∑ x ∈ range (n + 1), if single x (p ^ (n - x)) = 0 then ↑p ^ x else 0) = 0
state_after: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type u_2
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n : ℕ
⊢ ∀ x ∈ range (n + 1), (if single x (p ^ (n - x)) = 0 then ↑p ^ x else 0) = 0

tactic: rintro i _
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type u_2
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n : ℕ
⊢ ∀ x ∈ range (n + 1), (if single x (p ^ (n - x)) = 0 then ↑p ^ x else 0) = 0
state_after: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type u_2
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n i : ℕ
a✝ : i ∈ range (n + 1)
⊢ (if single i (p ^ (n - i)) = 0 then ↑p ^ i else 0) = 0

tactic: rw [if_neg]
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type u_2
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n i : ℕ
a✝ : i ∈ range (n + 1)
⊢ (if single i (p ^ (n - i)) = 0 then ↑p ^ i else 0) = 0
state_after: case hnc
p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type u_2
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n i : ℕ
a✝ : i ∈ range (n + 1)
⊢ ¬single i (p ^ (n - i)) = 0

tactic: rw [Finsupp.single_eq_zero]
state_before: case hnc
p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type u_2
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n i : ℕ
a✝ : i ∈ range (n + 1)
⊢ ¬single i (p ^ (n - i)) = 0
state_after: case hnc
p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type u_2
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n i : ℕ
a✝ : i ∈ range (n + 1)
⊢ ¬p ^ (n - i) = 0

tactic: exact ne_of_gt (pow_pos hp.1.pos _)
state_before: case hnc
p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type u_2
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n i : ℕ
a✝ : i ∈ range (n + 1)
⊢ ¬p ^ (n - i) = 0
state_after: no goals
Theorem: MvPolynomial.bind₁_monomial
File: Mathlib/Algebra/MvPolynomial/Monad.lean

tactic: simp only [monomial_eq, AlgHom.map_mul, bind₁_C_right, Finsupp.prod, AlgHom.map_prod,
  AlgHom.map_pow, bind₁_X_right]
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ f : σ → MvPolynomial τ R
d : σ →₀ ℕ
r : R
⊢ (bind₁ f) ((monomial d) r) = C r * ∏ i ∈ d.support, f i ^ d i
state_after: no goals
Theorem: Associates.map_subtype_coe_factors'
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: simp [factors', Multiset.map_pmap, Multiset.pmap_eq_map]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a : α
⊢ Multiset.map Subtype.val (factors' a) = Multiset.map Associates.mk (factors a)
state_after: no goals
Theorem: MeasureTheory.Measure.restrict_iUnion_ae
File: Mathlib/MeasureTheory/Measure/Restrict.lean

tactic: simp only [sum_apply _ ht, restrict_iUnion_apply_ae hd hm ht]
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t✝ : Set α
inst✝ : Countable ι
s : ι → Set α
hd : Pairwise (AEDisjoint μ on s)
hm : ∀ (i : ι), NullMeasurableSet (s i) μ
t : Set α
ht : MeasurableSet t
⊢ (μ.restrict (⋃ i, s i)) t = (sum fun i => μ.restrict (s i)) t
state_after: no goals
Theorem: Orientation.tan_oangle_add_right_of_oangle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean

tactic: have hs : (o.oangle x (x + y)).sign = 1 := by
  rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
⊢ (o.oangle x (x + y)).tan = ‖y‖ / ‖x‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
hs : (o.oangle x (x + y)).sign = 1
⊢ (o.oangle x (x + y)).tan = ‖y‖ / ‖x‖

tactic: rw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.tan_coe,
  InnerProductGeometry.tan_angle_add_of_inner_eq_zero (o.inner_eq_zero_of_oangle_eq_pi_div_two h)]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
hs : (o.oangle x (x + y)).sign = 1
⊢ (o.oangle x (x + y)).tan = ‖y‖ / ‖x‖
state_after: no goals

tactic: rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
⊢ (o.oangle x (x + y)).sign = 1
state_after: no goals
Theorem: Set.mulSupport_mulIndicator
File: Mathlib/Algebra/Group/Indicator.lean

tactic: simp [Function.mem_mulSupport, mulIndicator_apply_eq_one]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
M : Type u_4
N : Type u_5
inst✝¹ : One M
inst✝ : One N
s t : Set α
f g : α → M
a x : α
⊢ x ∈ mulSupport (s.mulIndicator f) ↔ x ∈ s ∩ mulSupport f
state_after: no goals
Theorem: Computation.mem_of_get_eq
File: Mathlib/Data/Seq/Computation.lean

tactic: intro h
state_before: α : Type u
β : Type v
γ : Type w
s : Computation α
h : s.Terminates
a : α
⊢ s.get = a → a ∈ s
state_after: α : Type u
β : Type v
γ : Type w
s : Computation α
h✝ : s.Terminates
a : α
h : s.get = a
⊢ a ∈ s

tactic: rw [← h]
state_before: α : Type u
β : Type v
γ : Type w
s : Computation α
h✝ : s.Terminates
a : α
h : s.get = a
⊢ a ∈ s
state_after: α : Type u
β : Type v
γ : Type w
s : Computation α
h✝ : s.Terminates
a : α
h : s.get = a
⊢ s.get ∈ s

tactic: apply get_mem
state_before: α : Type u
β : Type v
γ : Type w
s : Computation α
h✝ : s.Terminates
a : α
h : s.get = a
⊢ s.get ∈ s
state_after: no goals
Theorem: Polynomial.multiset_prod_X_sub_C_nextCoeff
File: Mathlib/Algebra/Polynomial/BigOperators.lean

tactic: rw [nextCoeff_multiset_prod]
state_before: R : Type u
ι : Type w
s : Finset ι
inst✝ : CommRing R
t : Multiset R
⊢ (Multiset.map (fun x => X - C x) t).prod.nextCoeff = -t.sum
state_after: R : Type u
ι : Type w
s : Finset ι
inst✝ : CommRing R
t : Multiset R
⊢ (Multiset.map (fun i => (X - C i).nextCoeff) t).sum = -t.sum

case h
R : Type u
ι : Type w
s : Finset ι
inst✝ : CommRing R
t : Multiset R
⊢ ∀ i ∈ t, (X - C i).Monic

tactic: simp only [nextCoeff_X_sub_C]
state_before: R : Type u
ι : Type w
s : Finset ι
inst✝ : CommRing R
t : Multiset R
⊢ (Multiset.map (fun i => (X - C i).nextCoeff) t).sum = -t.sum
state_after: R : Type u
ι : Type w
s : Finset ι
inst✝ : CommRing R
t : Multiset R
⊢ (Multiset.map (fun x => -x) t).sum = -t.sum

tactic: exact t.sum_hom (-AddMonoidHom.id R)
state_before: R : Type u
ι : Type w
s : Finset ι
inst✝ : CommRing R
t : Multiset R
⊢ (Multiset.map (fun x => -x) t).sum = -t.sum
state_after: no goals

tactic: intros
state_before: case h
R : Type u
ι : Type w
s : Finset ι
inst✝ : CommRing R
t : Multiset R
⊢ ∀ i ∈ t, (X - C i).Monic
state_after: case h
R : Type u
ι : Type w
s : Finset ι
inst✝ : CommRing R
t : Multiset R
i✝ : R
a✝ : i✝ ∈ t
⊢ (X - C i✝).Monic

tactic: apply monic_X_sub_C
state_before: case h
R : Type u
ι : Type w
s : Finset ι
inst✝ : CommRing R
t : Multiset R
i✝ : R
a✝ : i✝ ∈ t
⊢ (X - C i✝).Monic
state_after: no goals
Theorem: AddConstMapClass.map_nsmul_add
File: Mathlib/Algebra/AddConstMap/Basic.lean

tactic: rw [add_comm, map_add_nsmul]
state_before: F : Type u_1
G : Type u_2
H : Type u_3
inst✝³ : FunLike F G H
a : G
b : H
inst✝² : AddCommMonoid G
inst✝¹ : AddMonoid H
inst✝ : AddConstMapClass F G H a b
f : F
n : ℕ
x : G
⊢ f (n • a + x) = f x + n • b
state_after: no goals
Theorem: Function.pred_update
File: Mathlib/Logic/Function/Basic.lean

tactic: rw [apply_update P, update_apply, ite_prop_iff_or]
state_before: α : Sort u
β : α → Sort v
α' : Sort w
inst✝¹ : DecidableEq α
inst✝ : DecidableEq α'
f✝ g : (a : α) → β a
a✝ : α
b : β a✝
P : ⦃a : α⦄ → β a → Prop
f : (a : α) → β a
a' : α
v : β a'
a : α
⊢ P (update f a' v a) ↔ a = a' ∧ P v ∨ a ≠ a' ∧ P (f a)
state_after: no goals
Theorem: fourier_norm
File: Mathlib/Analysis/Fourier/AddCircle.lean

tactic: rw [ContinuousMap.norm_eq_iSup_norm]
state_before: T : ℝ
inst✝ : Fact (0 < T)
n : ℤ
⊢ ‖fourier n‖ = 1
state_after: T : ℝ
inst✝ : Fact (0 < T)
n : ℤ
⊢ ⨆ x, ‖(fourier n) x‖ = 1

tactic: have : ∀ x : AddCircle T, ‖fourier n x‖ = 1 := fun x => abs_coe_circle _
state_before: T : ℝ
inst✝ : Fact (0 < T)
n : ℤ
⊢ ⨆ x, ‖(fourier n) x‖ = 1
state_after: T : ℝ
inst✝ : Fact (0 < T)
n : ℤ
this : ∀ (x : AddCircle T), ‖(fourier n) x‖ = 1
⊢ ⨆ x, ‖(fourier n) x‖ = 1

tactic: simp_rw [this]
state_before: T : ℝ
inst✝ : Fact (0 < T)
n : ℤ
this : ∀ (x : AddCircle T), ‖(fourier n) x‖ = 1
⊢ ⨆ x, ‖(fourier n) x‖ = 1
state_after: T : ℝ
inst✝ : Fact (0 < T)
n : ℤ
this : ∀ (x : AddCircle T), ‖(fourier n) x‖ = 1
⊢ ⨆ x, 1 = 1

tactic: exact @ciSup_const _ _ _ Zero.instNonempty _
state_before: T : ℝ
inst✝ : Fact (0 < T)
n : ℤ
this : ∀ (x : AddCircle T), ‖(fourier n) x‖ = 1
⊢ ⨆ x, 1 = 1
state_after: no goals
Theorem: Metric.exists_ball_subset_ball
File: Mathlib/Topology/MetricSpace/Pseudo/Defs.lean

tactic: rw [sub_sub_self]
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
h : y ∈ ball x ε
⊢ dist y x ≤ ε - (ε - dist y x)
state_after: no goals
Theorem: CategoryTheory.ComposableArrows.homMk₄_app_two
File: Mathlib/CategoryTheory/ComposableArrows.lean

tactic: valid
state_before: C : Type u_1
inst✝ : Category.{?u.314835, u_1} C
n m : ℕ
F G : ComposableArrows C n
f g : ComposableArrows C 4
app₀ : f.obj' 0 ⋯ ⟶ g.obj' 0 ⋯
app₁ : f.obj' 1 ⋯ ⟶ g.obj' 1 ⋯
app₂ : f.obj' 2 ⋯ ⟶ g.obj' 2 ⋯
app₃ : f.obj' 3 ⋯ ⟶ g.obj' 3 ⋯
app₄ : f.obj' 4 ⋯ ⟶ g.obj' 4 ⋯
w₀ : f.map' 0 1 ⋯ ⋯ ≫ app₁ = app₀ ≫ g.map' 0 1 ⋯ ⋯
w₁ : f.map' 1 2 ⋯ ⋯ ≫ app₂ = app₁ ≫ g.map' 1 2 ⋯ ⋯
w₂ : f.map' 2 3 ⋯ ⋯ ≫ app₃ = app₂ ≫ g.map' 2 3 ⋯ ⋯
w₃ : f.map' 3 4 ⋯ ⋯ ≫ app₄ = app₃ ≫ g.map' 3 4 ⋯ ⋯
⊢ 2 < 4 + 1
state_after: no goals
Theorem: irrational_sqrt_of_multiplicity_odd
File: Mathlib/Data/Real/Irrational.lean

tactic: rw [Hpv]
state_before: m : ℤ
hm : 0 < m
p : ℕ
hp : Fact (Nat.Prime p)
Hpv : (multiplicity (↑p) m).get ⋯ % 2 = 1
⊢ (multiplicity (↑p) m).get ⋯ % 2 ≠ 0
state_after: m : ℤ
hm : 0 < m
p : ℕ
hp : Fact (Nat.Prime p)
Hpv : (multiplicity (↑p) m).get ⋯ % 2 = 1
⊢ 1 ≠ 0

tactic: exact one_ne_zero
state_before: m : ℤ
hm : 0 < m
p : ℕ
hp : Fact (Nat.Prime p)
Hpv : (multiplicity (↑p) m).get ⋯ % 2 = 1
⊢ 1 ≠ 0
state_after: no goals
Theorem: MonCat.Colimits.cocone_naturality_components
File: Mathlib/Algebra/Category/MonCat/Colimits.lean

tactic: rw [← cocone_naturality F f]
state_before: J : Type v
inst✝ : SmallCategory J
F : J ⥤ MonCat
j j' : J
f : j ⟶ j'
x : ↑(F.obj j)
⊢ (coconeMorphism F j') ((F.map f) x) = (coconeMorphism F j) x
state_after: J : Type v
inst✝ : SmallCategory J
F : J ⥤ MonCat
j j' : J
f : j ⟶ j'
x : ↑(F.obj j)
⊢ (coconeMorphism F j') ((F.map f) x) = (F.map f ≫ coconeMorphism F j') x

tactic: rfl
state_before: J : Type v
inst✝ : SmallCategory J
F : J ⥤ MonCat
j j' : J
f : j ⟶ j'
x : ↑(F.obj j)
⊢ (coconeMorphism F j') ((F.map f) x) = (F.map f ≫ coconeMorphism F j') x
state_after: no goals
Theorem: HomologicalComplex₂.d₂_eq_zero'
File: Mathlib/Algebra/Homology/TotalComplex.lean

tactic: rw [totalAux.d₂_eq' K c₁₂ i₁ h i₁₂, K.toGradedObject.ιMapObjOrZero_eq_zero, comp_zero, smul_zero]
state_before: C : Type u_1
inst✝⁴ : Category.{u_5, u_1} C
inst✝³ : Preadditive C
I₁ : Type u_2
I₂ : Type u_3
I₁₂ : Type u_4
c₁ : ComplexShape I₁
c₂ : ComplexShape I₂
K L M : HomologicalComplex₂ C c₁ c₂
φ : K ⟶ L
e : K ≅ L
ψ : L ⟶ M
c₁₂ : ComplexShape I₁₂
inst✝² : DecidableEq I₁₂
inst✝¹ : TotalComplexShape c₁ c₂ c₁₂
inst✝ : K.HasTotal c₁₂
i₁ : I₁
i₂ i₂' : I₂
h : c₂.Rel i₂ i₂'
i₁₂ : I₁₂
h' : c₁.π c₂ c₁₂ (i₁, i₂') ≠ i₁₂
⊢ K.d₂ c₁₂ i₁ i₂ i₁₂ = 0
state_after: case h
C : Type u_1
inst✝⁴ : Category.{u_5, u_1} C
inst✝³ : Preadditive C
I₁ : Type u_2
I₂ : Type u_3
I₁₂ : Type u_4
c₁ : ComplexShape I₁
c₂ : ComplexShape I₂
K L M : HomologicalComplex₂ C c₁ c₂
φ : K ⟶ L
e : K ≅ L
ψ : L ⟶ M
c₁₂ : ComplexShape I₁₂
inst✝² : DecidableEq I₁₂
inst✝¹ : TotalComplexShape c₁ c₂ c₁₂
inst✝ : K.HasTotal c₁₂
i₁ : I₁
i₂ i₂' : I₂
h : c₂.Rel i₂ i₂'
i₁₂ : I₁₂
h' : c₁.π c₂ c₁₂ (i₁, i₂') ≠ i₁₂
⊢ c₁.π c₂ c₁₂ (i₁, i₂') ≠ i₁₂

tactic: exact h'
state_before: case h
C : Type u_1
inst✝⁴ : Category.{u_5, u_1} C
inst✝³ : Preadditive C
I₁ : Type u_2
I₂ : Type u_3
I₁₂ : Type u_4
c₁ : ComplexShape I₁
c₂ : ComplexShape I₂
K L M : HomologicalComplex₂ C c₁ c₂
φ : K ⟶ L
e : K ≅ L
ψ : L ⟶ M
c₁₂ : ComplexShape I₁₂
inst✝² : DecidableEq I₁₂
inst✝¹ : TotalComplexShape c₁ c₂ c₁₂
inst✝ : K.HasTotal c₁₂
i₁ : I₁
i₂ i₂' : I₂
h : c₂.Rel i₂ i₂'
i₁₂ : I₁₂
h' : c₁.π c₂ c₁₂ (i₁, i₂') ≠ i₁₂
⊢ c₁.π c₂ c₁₂ (i₁, i₂') ≠ i₁₂
state_after: no goals
Theorem: AddCommGroup.ModEq.add_iff_left
File: Mathlib/Algebra/ModEq.lean

tactic: simp [add_sub_add_comm, hm, add_smul, ModEq]
state_before: α : Type u_1
inst✝ : AddCommGroup α
p a a₁ a₂ b b₁ b₂ c : α
n : ℕ
z : ℤ
x✝ : a₁ ≡ b₁ [PMOD p]
m : ℤ
hm : b₁ - a₁ = m • p
⊢ (∃ b, b₁ + b₂ - (a₁ + a₂) = (Equiv.symm (Equiv.addLeft m)).symm b • p) ↔ a₂ ≡ b₂ [PMOD p]
state_after: no goals
Theorem: OreLocalization.subsingleton_iff
File: Mathlib/RingTheory/OreLocalization/Ring.lean

tactic: rw [← subsingleton_iff_zero_eq_one, OreLocalization.one_def,
  OreLocalization.zero_def, oreDiv_eq_iff]
state_before: R : Type u_1
inst✝¹ : Ring R
S : Submonoid R
inst✝ : OreSet S
⊢ Subsingleton (OreLocalization S R) ↔ 0 ∈ S
state_after: R : Type u_1
inst✝¹ : Ring R
S : Submonoid R
inst✝ : OreSet S
⊢ (∃ u v, u • 1 = v • 0 ∧ ↑u * ↑1 = v * ↑1) ↔ 0 ∈ S

tactic: simp
state_before: R : Type u_1
inst✝¹ : Ring R
S : Submonoid R
inst✝ : OreSet S
⊢ (∃ u v, u • 1 = v • 0 ∧ ↑u * ↑1 = v * ↑1) ↔ 0 ∈ S
state_after: no goals