1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: jacobiTheta₂'_neg_left
File: Mathlib/NumberTheory/ModularForms/JacobiTheta/TwoVariable.lean

tactic: rw [jacobiTheta₂', jacobiTheta₂', ← tsum_neg, ← (Equiv.neg ℤ).tsum_eq]
state_before: z τ : ℂ
⊢ jacobiTheta₂' (-z) τ = -jacobiTheta₂' z τ
state_after: z τ : ℂ
⊢ ∑' (c : ℤ), jacobiTheta₂'_term ((Equiv.neg ℤ) c) (-z) τ = ∑' (b : ℤ), -jacobiTheta₂'_term b z τ

tactic: congr 1 with n
state_before: z τ : ℂ
⊢ ∑' (c : ℤ), jacobiTheta₂'_term ((Equiv.neg ℤ) c) (-z) τ = ∑' (b : ℤ), -jacobiTheta₂'_term b z τ
state_after: case e_f.h
z τ : ℂ
n : ℤ
⊢ jacobiTheta₂'_term ((Equiv.neg ℤ) n) (-z) τ = -jacobiTheta₂'_term n z τ

tactic: simp only [jacobiTheta₂'_term, jacobiTheta₂_term]
state_before: case e_f.h
z τ : ℂ
n : ℤ
⊢ jacobiTheta₂'_term ((Equiv.neg ℤ) n) (-z) τ = -jacobiTheta₂'_term n z τ
state_after: case e_f.h
z τ : ℂ
n : ℤ
⊢ 2 * ↑π * I * ↑((Equiv.neg ℤ) n) * cexp (2 * ↑π * I * ↑((Equiv.neg ℤ) n) * -z + ↑π * I * ↑((Equiv.neg ℤ) n) ^ 2 * τ) =
    -(2 * ↑π * I * ↑n * cexp (2 * ↑π * I * ↑n * z + ↑π * I * ↑n ^ 2 * τ))

tactic: rw [Equiv.neg_apply, ← neg_mul]
state_before: case e_f.h
z τ : ℂ
n : ℤ
⊢ 2 * ↑π * I * ↑((Equiv.neg ℤ) n) * cexp (2 * ↑π * I * ↑((Equiv.neg ℤ) n) * -z + ↑π * I * ↑((Equiv.neg ℤ) n) ^ 2 * τ) =
    -(2 * ↑π * I * ↑n * cexp (2 * ↑π * I * ↑n * z + ↑π * I * ↑n ^ 2 * τ))
state_after: case e_f.h
z τ : ℂ
n : ℤ
⊢ 2 * ↑π * I * ↑(-n) * cexp (2 * ↑π * I * ↑(-n) * -z + ↑π * I * ↑(-n) ^ 2 * τ) =
    -(2 * ↑π * I * ↑n) * cexp (2 * ↑π * I * ↑n * z + ↑π * I * ↑n ^ 2 * τ)

tactic: push_cast
state_before: case e_f.h
z τ : ℂ
n : ℤ
⊢ 2 * ↑π * I * ↑(-n) * cexp (2 * ↑π * I * ↑(-n) * -z + ↑π * I * ↑(-n) ^ 2 * τ) =
    -(2 * ↑π * I * ↑n) * cexp (2 * ↑π * I * ↑n * z + ↑π * I * ↑n ^ 2 * τ)
state_after: case e_f.h
z τ : ℂ
n : ℤ
⊢ 2 * ↑π * I * -↑n * cexp (2 * ↑π * I * -↑n * -z + ↑π * I * (-↑n) ^ 2 * τ) =
    -(2 * ↑π * I * ↑n) * cexp (2 * ↑π * I * ↑n * z + ↑π * I * ↑n ^ 2 * τ)

tactic: ring_nf
state_before: case e_f.h
z τ : ℂ
n : ℤ
⊢ 2 * ↑π * I * -↑n * cexp (2 * ↑π * I * -↑n * -z + ↑π * I * (-↑n) ^ 2 * τ) =
    -(2 * ↑π * I * ↑n) * cexp (2 * ↑π * I * ↑n * z + ↑π * I * ↑n ^ 2 * τ)
state_after: no goals
Theorem: Polynomial.Separable.mul
File: Mathlib/FieldTheory/Separable.lean

tactic: rw [separable_def, derivative_mul]
state_before: R : Type u
inst✝ : CommRing R
f g : R[X]
hf : f.Separable
hg : g.Separable
h : IsCoprime f g
⊢ (f * g).Separable
state_after: R : Type u
inst✝ : CommRing R
f g : R[X]
hf : f.Separable
hg : g.Separable
h : IsCoprime f g
⊢ IsCoprime (f * g) (derivative f * g + f * derivative g)

tactic: exact
  ((hf.mul_right h).add_mul_left_right _).mul_left ((h.symm.mul_right hg).mul_add_right_right _)
state_before: R : Type u
inst✝ : CommRing R
f g : R[X]
hf : f.Separable
hg : g.Separable
h : IsCoprime f g
⊢ IsCoprime (f * g) (derivative f * g + f * derivative g)
state_after: no goals
Theorem: PowerSeries.rescale_mul
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: ext
state_before: R : Type u_1
inst✝ : CommSemiring R
a b : R
⊢ rescale (a * b) = (rescale b).comp (rescale a)
state_after: case a.h
R : Type u_1
inst✝ : CommSemiring R
a b : R
x✝ : R⟦X⟧
n✝ : ℕ
⊢ (coeff R n✝) ((rescale (a * b)) x✝) = (coeff R n✝) (((rescale b).comp (rescale a)) x✝)

tactic: simp [← rescale_rescale]
state_before: case a.h
R : Type u_1
inst✝ : CommSemiring R
a b : R
x✝ : R⟦X⟧
n✝ : ℕ
⊢ (coeff R n✝) ((rescale (a * b)) x✝) = (coeff R n✝) (((rescale b).comp (rescale a)) x✝)
state_after: no goals
Theorem: CategoryTheory.IsPushout.IsVanKampen.mono_of_mono_left
File: Mathlib/CategoryTheory/Adhesive.lean

tactic: simp
state_before: J : Type v'
inst✝² : Category.{u', v'} J
C : Type u
inst✝¹ : Category.{v, u} C
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : Mono f
H : IsPushout f g h i
H' : H.IsVanKampen
⊢ g ≫ 𝟙 Y = 𝟙 W ≫ g
state_after: no goals

tactic: simp
state_before: J : Type v'
inst✝² : Category.{u', v'} J
C : Type u
inst✝¹ : Category.{v, u} C
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : Mono f
H : IsPushout f g h i
H' : H.IsVanKampen
⊢ 𝟙 W ≫ g = g ≫ 𝟙 Y
state_after: no goals
Theorem: Polynomial.aroots_smul_nonzero
File: Mathlib/Algebra/Polynomial/Roots.lean

tactic: rw [smul_eq_C_mul, aroots_C_mul _ ha]
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝⁶ : CommRing R
inst✝⁵ : IsDomain R
p✝ q : R[X]
inst✝⁴ : CommRing T
inst✝³ : CommRing S
inst✝² : IsDomain S
inst✝¹ : Algebra T S
inst✝ : NoZeroSMulDivisors T S
a : T
p : T[X]
ha : a ≠ 0
⊢ (a • p).aroots S = p.aroots S
state_after: no goals
Theorem: EReal.left_distrib_of_nonneg
File: Mathlib/Data/Real/EReal.lean

tactic: nth_rewrite 1 [EReal.mul_comm]
state_before: a b c : EReal
ha : 0 ≤ a
hb : 0 ≤ b
⊢ c * (a + b) = c * a + c * b
state_after: a b c : EReal
ha : 0 ≤ a
hb : 0 ≤ b
⊢ (a + b) * c = c * a + c * b

tactic: nth_rewrite 2 [EReal.mul_comm]
state_before: a b c : EReal
ha : 0 ≤ a
hb : 0 ≤ b
⊢ (a + b) * c = c * a + c * b
state_after: a b c : EReal
ha : 0 ≤ a
hb : 0 ≤ b
⊢ (a + b) * c = a * c + c * b

tactic: nth_rewrite 3 [EReal.mul_comm]
state_before: a b c : EReal
ha : 0 ≤ a
hb : 0 ≤ b
⊢ (a + b) * c = a * c + c * b
state_after: a b c : EReal
ha : 0 ≤ a
hb : 0 ≤ b
⊢ (a + b) * c = a * c + b * c

tactic: exact right_distrib_of_nonneg ha hb
state_before: a b c : EReal
ha : 0 ≤ a
hb : 0 ≤ b
⊢ (a + b) * c = a * c + b * c
state_after: no goals
Theorem: Algebra.right_comm
File: Mathlib/Algebra/Algebra/Defs.lean

tactic: rw [mul_assoc, commutes, ← mul_assoc]
state_before: R : Type u
S : Type v
A : Type w
B : Type u_1
inst✝⁵ : CommSemiring R
inst✝⁴ : CommSemiring S
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
x : A
r : R
y : A
⊢ x * (algebraMap R A) r * y = x * y * (algebraMap R A) r
state_after: no goals
Theorem: Polynomial.isUnit_leadingCoeff_mul_left_eq_zero_iff
File: Mathlib/Algebra/Polynomial/Monic.lean

tactic: constructor
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
q : R[X]
⊢ q * p = 0 ↔ q = 0
state_after: case mp
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
q : R[X]
⊢ q * p = 0 → q = 0

case mpr
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
q : R[X]
⊢ q = 0 → q * p = 0

tactic: intro hp
state_before: case mp
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
q : R[X]
⊢ q * p = 0 → q = 0
state_after: case mp
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
q : R[X]
hp : q * p = 0
⊢ q = 0

tactic: simp only [zero_mul] at hp
state_before: case mp
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
q : R[X]
hp : (fun x => x * C ↑h.unit⁻¹) (q * p) = (fun x => x * C ↑h.unit⁻¹) 0
⊢ q = 0
state_after: case mp
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
q : R[X]
hp : q * p * C ↑h.unit⁻¹ = 0
⊢ q = 0

tactic: rwa [mul_assoc, Monic.mul_left_eq_zero_iff] at hp
state_before: case mp
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
q : R[X]
hp : q * p * C ↑h.unit⁻¹ = 0
⊢ q = 0
state_after: case mp.h
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
q : R[X]
hp : q * (p * C ↑h.unit⁻¹) = 0
⊢ (p * C ↑h.unit⁻¹).Monic

tactic: refine monic_mul_C_of_leadingCoeff_mul_eq_one ?_
state_before: case mp.h
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
q : R[X]
hp : q * (p * C ↑h.unit⁻¹) = 0
⊢ (p * C ↑h.unit⁻¹).Monic
state_after: case mp.h
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
q : R[X]
hp : q * (p * C ↑h.unit⁻¹) = 0
⊢ p.leadingCoeff * ↑h.unit⁻¹ = 1

tactic: simp [Units.mul_inv_eq_iff_eq_mul, IsUnit.unit_spec]
state_before: case mp.h
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
q : R[X]
hp : q * (p * C ↑h.unit⁻¹) = 0
⊢ p.leadingCoeff * ↑h.unit⁻¹ = 1
state_after: no goals

tactic: rintro rfl
state_before: case mpr
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
q : R[X]
⊢ q = 0 → q * p = 0
state_after: case mpr
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
⊢ 0 * p = 0

tactic: rw [zero_mul]
state_before: case mpr
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
⊢ 0 * p = 0
state_after: no goals
Theorem: Batteries.AssocList.isEmpty_eq
File: .lake/packages/batteries/Batteries/Data/AssocList.lean

tactic: cases l <;> simp [*, isEmpty, List.isEmpty]
state_before: α : Type u_1
β : Type u_2
l : AssocList α β
⊢ l.isEmpty = l.toList.isEmpty
state_after: no goals
Theorem: exists_mem_or_left
File: Mathlib/Logic/Basic.lean

tactic: simp only [exists_prop]
state_before: α : Sort u_1
r p q : α → Prop
P Q : (x : α) → p x → Prop
b : Prop
⊢ (∃ x x_1, r x) ↔ (∃ x x_1, r x) ∨ ∃ x x_1, r x
state_after: α : Sort u_1
r p q : α → Prop
P Q : (x : α) → p x → Prop
b : Prop
⊢ (∃ x, (p x ∨ q x) ∧ r x) ↔ (∃ x, p x ∧ r x) ∨ ∃ x, q x ∧ r x

tactic: exact Iff.trans (exists_congr fun x ↦ or_and_right) exists_or
state_before: α : Sort u_1
r p q : α → Prop
P Q : (x : α) → p x → Prop
b : Prop
⊢ (∃ x, (p x ∨ q x) ∧ r x) ↔ (∃ x, p x ∧ r x) ∨ ∃ x, q x ∧ r x
state_after: no goals
Theorem: Computation.liftRel_pure
File: Mathlib/Data/Seq/Computation.lean

tactic: rw [liftRel_pure_left]
state_before: α : Type u
β : Type v
γ : Type w
R : α → β → Prop
a : α
b : β
⊢ LiftRel R (pure a) (pure b) ↔ R a b
state_after: α : Type u
β : Type v
γ : Type w
R : α → β → Prop
a : α
b : β
⊢ (∃ b_1, b_1 ∈ pure b ∧ R a b_1) ↔ R a b

tactic: exact ⟨fun ⟨b', mb', ab'⟩ => by rwa [eq_of_pure_mem mb'] at ab', fun ab => ⟨_, ret_mem _, ab⟩⟩
state_before: α : Type u
β : Type v
γ : Type w
R : α → β → Prop
a : α
b : β
⊢ (∃ b_1, b_1 ∈ pure b ∧ R a b_1) ↔ R a b
state_after: no goals

tactic: rwa [eq_of_pure_mem mb'] at ab'
state_before: α : Type u
β : Type v
γ : Type w
R : α → β → Prop
a : α
b : β
x✝ : ∃ b_1, b_1 ∈ pure b ∧ R a b_1
b' : β
mb' : b' ∈ pure b
ab' : R a b'
⊢ R a b
state_after: no goals
Theorem: Nat.frequently_mod_eq
File: Mathlib/Order/Filter/ModEq.lean

tactic: simpa only [Nat.ModEq, mod_eq_of_lt h] using frequently_modEq h.ne_bot d
state_before: d n : ℕ
h : d < n
⊢ ∃ᶠ (m : ℕ) in atTop, m % n = d
state_after: no goals
Theorem: FirstOrder.Language.ElementarySubstructure.theory_model_iff
File: Mathlib/ModelTheory/ElementarySubstructures.lean

tactic: simp only [Theory.model_iff, realize_sentence]
state_before: L : Language
M : Type u_1
N : Type u_2
P : Type u_3
Q : Type u_4
inst✝³ : L.Structure M
inst✝² : L.Structure N
inst✝¹ : L.Structure P
inst✝ : L.Structure Q
S : L.ElementarySubstructure M
T : L.Theory
⊢ ↥S ⊨ T ↔ M ⊨ T
state_after: no goals
Theorem: dist_vadd_right
File: Mathlib/Analysis/Normed/Group/AddTorsor.lean

tactic: rw [dist_comm, dist_vadd_left]
state_before: α : Type u_1
V : Type u_2
P : Type u_3
W : Type u_4
Q : Type u_5
inst✝⁵ : SeminormedAddCommGroup V
inst✝⁴ : PseudoMetricSpace P
inst✝³ : NormedAddTorsor V P
inst✝² : NormedAddCommGroup W
inst✝¹ : MetricSpace Q
inst✝ : NormedAddTorsor W Q
v : V
x : P
⊢ dist x (v +ᵥ x) = ‖v‖
state_after: no goals
Theorem: intervalIntegral.integral_comp_mul_add
File: Mathlib/MeasureTheory/Integral/IntervalIntegral.lean

tactic: rw [← integral_comp_add_right, ← integral_comp_mul_left _ hc]
state_before: ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a b c d✝ : ℝ
f : ℝ → E
hc : c ≠ 0
d : ℝ
⊢ ∫ (x : ℝ) in a..b, f (c * x + d) = c⁻¹ • ∫ (x : ℝ) in c * a + d..c * b + d, f x
state_after: no goals
Theorem: MeasureTheory.lintegral_rw₂
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: dsimp only
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f₁ f₁' : α → β
f₂ f₂' : α → γ
h₁✝ : f₁ =ᶠ[ae μ] f₁'
h₂✝ : f₂ =ᶠ[ae μ] f₂'
g : β → γ → ℝ≥0∞
x✝ : α
h₂ : f₂ x✝ = f₂' x✝
h₁ : f₁ x✝ = f₁' x✝
⊢ (fun a => g (f₁ a) (f₂ a)) x✝ = (fun a => g (f₁' a) (f₂' a)) x✝
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f₁ f₁' : α → β
f₂ f₂' : α → γ
h₁✝ : f₁ =ᶠ[ae μ] f₁'
h₂✝ : f₂ =ᶠ[ae μ] f₂'
g : β → γ → ℝ≥0∞
x✝ : α
h₂ : f₂ x✝ = f₂' x✝
h₁ : f₁ x✝ = f₁' x✝
⊢ g (f₁ x✝) (f₂ x✝) = g (f₁' x✝) (f₂' x✝)

tactic: rw [h₁, h₂]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f₁ f₁' : α → β
f₂ f₂' : α → γ
h₁✝ : f₁ =ᶠ[ae μ] f₁'
h₂✝ : f₂ =ᶠ[ae μ] f₂'
g : β → γ → ℝ≥0∞
x✝ : α
h₂ : f₂ x✝ = f₂' x✝
h₁ : f₁ x✝ = f₁' x✝
⊢ g (f₁ x✝) (f₂ x✝) = g (f₁' x✝) (f₂' x✝)
state_after: no goals
Theorem: RootPairing.reflection_dualMap_eq_coreflection
File: Mathlib/LinearAlgebra/RootSystem/Defs.lean

tactic: ext n m
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
N : Type u_4
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
P : RootPairing ι R M N
i j : ι
⊢ ↑(P.reflection i).dualMap ∘ₗ P.toLin.flip = P.toLin.flip ∘ₗ ↑(P.coreflection i)
state_after: case h.h
ι : Type u_1
R : Type u_2
M : Type u_3
N : Type u_4
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
P : RootPairing ι R M N
i j : ι
n : N
m : M
⊢ ((↑(P.reflection i).dualMap ∘ₗ P.toLin.flip) n) m = ((P.toLin.flip ∘ₗ ↑(P.coreflection i)) n) m

tactic: simp [coreflection_apply, reflection_apply, mul_comm (P.toLin m (P.coroot i))]
state_before: case h.h
ι : Type u_1
R : Type u_2
M : Type u_3
N : Type u_4
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
P : RootPairing ι R M N
i j : ι
n : N
m : M
⊢ ((↑(P.reflection i).dualMap ∘ₗ P.toLin.flip) n) m = ((P.toLin.flip ∘ₗ ↑(P.coreflection i)) n) m
state_after: no goals
Theorem: Units.exists_iff_ne_zero
File: Mathlib/Algebra/GroupWithZero/Units/Basic.lean

tactic: simp [exists0]
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a b : G₀
p : G₀ → Prop
⊢ (∃ u, p ↑u) ↔ ∃ x, x ≠ 0 ∧ p x
state_after: no goals
Theorem: ascPochhammer_nat_eq_descFactorial
File: Mathlib/RingTheory/Polynomial/Pochhammer.lean

tactic: rw [ascPochhammer_nat_eq_ascFactorial, Nat.add_descFactorial_eq_ascFactorial']
state_before: S : Type u
inst✝ : Semiring S
a b : ℕ
⊢ eval a (ascPochhammer ℕ b) = (a + b - 1).descFactorial b
state_after: no goals
Theorem: Pell.xy_coprime
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: let p := pell_eq a1 n
state_before: a : ℕ
a1 : 1 < a
n k : ℕ
x✝ : Nat.Prime k
kx : k ∣ xn a1 n
ky : k ∣ yn a1 n
⊢ k ∣ 1
state_after: a : ℕ
a1 : 1 < a
n k : ℕ
x✝ : Nat.Prime k
kx : k ∣ xn a1 n
ky : k ∣ yn a1 n
p : xn a1 n * xn a1 n - Pell.d a1 * yn a1 n * yn a1 n = 1 := pell_eq a1 n
⊢ k ∣ 1

tactic: rw [← p]
state_before: a : ℕ
a1 : 1 < a
n k : ℕ
x✝ : Nat.Prime k
kx : k ∣ xn a1 n
ky : k ∣ yn a1 n
p : xn a1 n * xn a1 n - Pell.d a1 * yn a1 n * yn a1 n = 1 := pell_eq a1 n
⊢ k ∣ 1
state_after: a : ℕ
a1 : 1 < a
n k : ℕ
x✝ : Nat.Prime k
kx : k ∣ xn a1 n
ky : k ∣ yn a1 n
p : xn a1 n * xn a1 n - Pell.d a1 * yn a1 n * yn a1 n = 1 := pell_eq a1 n
⊢ k ∣ xn a1 n * xn a1 n - Pell.d a1 * yn a1 n * yn a1 n

tactic: exact Nat.dvd_sub (le_of_lt <| Nat.lt_of_sub_eq_succ p) (kx.mul_left _) (ky.mul_left _)
state_before: a : ℕ
a1 : 1 < a
n k : ℕ
x✝ : Nat.Prime k
kx : k ∣ xn a1 n
ky : k ∣ yn a1 n
p : xn a1 n * xn a1 n - Pell.d a1 * yn a1 n * yn a1 n = 1 := pell_eq a1 n
⊢ k ∣ xn a1 n * xn a1 n - Pell.d a1 * yn a1 n * yn a1 n
state_after: no goals
Theorem: min_def_lt
File: Mathlib/Order/Basic.lean

tactic: rw [min_comm, min_def, ← ite_not]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : LinearOrder α
p : α → Prop
x✝ y✝ x y : α
⊢ min x y = if x < y then x else y
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : LinearOrder α
p : α → Prop
x✝ y✝ x y : α
⊢ (if ¬y ≤ x then x else y) = if x < y then x else y

tactic: simp only [not_le]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : LinearOrder α
p : α → Prop
x✝ y✝ x y : α
⊢ (if ¬y ≤ x then x else y) = if x < y then x else y
state_after: no goals
Theorem: EuclideanGeometry.angle_rev_eq_pi_div_two_of_oangle_eq_neg_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean

tactic: rw [angle_comm]
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : ∡ p₁ p₂ p₃ = ↑(-π / 2)
⊢ ∠ p₃ p₂ p₁ = π / 2
state_after: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : ∡ p₁ p₂ p₃ = ↑(-π / 2)
⊢ ∠ p₁ p₂ p₃ = π / 2

tactic: exact angle_eq_pi_div_two_of_oangle_eq_neg_pi_div_two h
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : ∡ p₁ p₂ p₃ = ↑(-π / 2)
⊢ ∠ p₁ p₂ p₃ = π / 2
state_after: no goals
Theorem: le_iff_reflTransGen_covBy
File: Mathlib/Order/Interval/Finset/Basic.lean

tactic: rw [le_iff_transGen_wcovBy, wcovBy_eq_reflGen_covBy, transGen_reflGen]
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
x y : α
⊢ x ≤ y ↔ ReflTransGen (fun x x_1 => x ⋖ x_1) x y
state_after: no goals
Theorem: Set.finite_image2
File: Mathlib/Data/Set/Finite.lean

tactic: rw [← not_infinite, infinite_image2 hfs hft]
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s✝ t✝ : Set α
f : α → β → γ
s : Set α
t : Set β
a : α
b : β
hfs : ∀ b ∈ t, InjOn (fun x => f x b) s
hft : ∀ a ∈ s, InjOn (f a) t
⊢ (image2 f s t).Finite ↔ s.Finite ∧ t.Finite ∨ s = ∅ ∨ t = ∅
state_after: α : Type u
β : Type v
ι : Sort w
γ : Type x
s✝ t✝ : Set α
f : α → β → γ
s : Set α
t : Set β
a : α
b : β
hfs : ∀ b ∈ t, InjOn (fun x => f x b) s
hft : ∀ a ∈ s, InjOn (f a) t
⊢ ¬(s.Infinite ∧ t.Nonempty ∨ t.Infinite ∧ s.Nonempty) ↔ s.Finite ∧ t.Finite ∨ s = ∅ ∨ t = ∅

tactic: simp [not_or, -not_and, not_and_or, not_nonempty_iff_eq_empty]
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s✝ t✝ : Set α
f : α → β → γ
s : Set α
t : Set β
a : α
b : β
hfs : ∀ b ∈ t, InjOn (fun x => f x b) s
hft : ∀ a ∈ s, InjOn (f a) t
⊢ ¬(s.Infinite ∧ t.Nonempty ∨ t.Infinite ∧ s.Nonempty) ↔ s.Finite ∧ t.Finite ∨ s = ∅ ∨ t = ∅
state_after: α : Type u
β : Type v
ι : Sort w
γ : Type x
s✝ t✝ : Set α
f : α → β → γ
s : Set α
t : Set β
a : α
b : β
hfs : ∀ b ∈ t, InjOn (fun x => f x b) s
hft : ∀ a ∈ s, InjOn (f a) t
⊢ (s.Finite ∨ t = ∅) ∧ (t.Finite ∨ s = ∅) ↔ s.Finite ∧ t.Finite ∨ s = ∅ ∨ t = ∅

tactic: aesop
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s✝ t✝ : Set α
f : α → β → γ
s : Set α
t : Set β
a : α
b : β
hfs : ∀ b ∈ t, InjOn (fun x => f x b) s
hft : ∀ a ∈ s, InjOn (f a) t
⊢ (s.Finite ∨ t = ∅) ∧ (t.Finite ∨ s = ∅) ↔ s.Finite ∧ t.Finite ∨ s = ∅ ∨ t = ∅
state_after: no goals
Theorem: MvPolynomial.totalDegree_X
File: Mathlib/Algebra/MvPolynomial/Degrees.lean

tactic: rw [totalDegree, support_X]
state_before: R✝ : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R✝
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝² : CommSemiring R✝
p q : MvPolynomial σ R✝
R : Type u_3
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
s : σ
⊢ (X s).totalDegree = 1
state_after: R✝ : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R✝
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝² : CommSemiring R✝
p q : MvPolynomial σ R✝
R : Type u_3
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
s : σ
⊢ ({Finsupp.single s 1}.sup fun s => s.sum fun x e => e) = 1

tactic: simp only [Finset.sup, Finsupp.sum_single_index, Finset.fold_singleton, sup_bot_eq]
state_before: R✝ : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R✝
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝² : CommSemiring R✝
p q : MvPolynomial σ R✝
R : Type u_3
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
s : σ
⊢ ({Finsupp.single s 1}.sup fun s => s.sum fun x e => e) = 1
state_after: no goals
Theorem: nsmul_eq_mul
File: Mathlib/Data/Nat/Cast/Basic.lean

tactic: induction n with
| zero => rw [zero_nsmul, Nat.cast_zero, zero_mul]
| succ n ih => rw [succ_nsmul, ih, Nat.cast_succ, add_mul, one_mul]
state_before: α : Type u_1
β : Type u_2
inst✝ : NonAssocSemiring α
n : ℕ
a : α
⊢ n • a = ↑n * a
state_after: no goals

tactic: rw [zero_nsmul, Nat.cast_zero, zero_mul]
state_before: case zero
α : Type u_1
β : Type u_2
inst✝ : NonAssocSemiring α
a : α
⊢ 0 • a = ↑0 * a
state_after: no goals

tactic: rw [succ_nsmul, ih, Nat.cast_succ, add_mul, one_mul]
state_before: case succ
α : Type u_1
β : Type u_2
inst✝ : NonAssocSemiring α
a : α
n : ℕ
ih : n • a = ↑n * a
⊢ (n + 1) • a = ↑(n + 1) * a
state_after: no goals
Theorem: Real.sinh_zero
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [sinh]
state_before: x y : ℝ
⊢ sinh 0 = 0
state_after: no goals
Theorem: closure_sUnion
File: Mathlib/Topology/AlexandrovDiscrete.lean

tactic: simp_rw [sUnion_eq_biUnion, closure_iUnion]
state_before: ι : Sort u_1
κ : ι → Sort u_2
α : Type u_3
β : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : AlexandrovDiscrete α
S✝ : Set (Set α)
f : ι → Set α
S : Set (Set α)
⊢ closure (⋃₀ S) = ⋃ s ∈ S, closure s
state_after: no goals
Theorem: lineMap_lt_right_iff_lt
File: Mathlib/LinearAlgebra/AffineSpace/Ordered.lean

tactic: rw [lineMap_apply_one]
state_before: k : Type u_1
E : Type u_2
PE : Type u_3
inst✝³ : OrderedRing k
inst✝² : OrderedAddCommGroup E
inst✝¹ : Module k E
inst✝ : OrderedSMul k E
a a' b b' : E
r r' : k
h : r < 1
⊢ (lineMap a b) r < b ↔ (lineMap a b) r < (lineMap a b) 1
state_after: no goals
Theorem: ClosedEmbedding.compactSpace
File: Mathlib/Topology/Compactness/Compact.lean

tactic: rw [hf.toInducing.isCompact_iff, image_univ]
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
h : CompactSpace Y
f : X → Y
hf : ClosedEmbedding f
⊢ IsCompact univ
state_after: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
h : CompactSpace Y
f : X → Y
hf : ClosedEmbedding f
⊢ IsCompact (range f)

tactic: exact hf.isClosed_range.isCompact
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
h : CompactSpace Y
f : X → Y
hf : ClosedEmbedding f
⊢ IsCompact (range f)
state_after: no goals
Theorem: tsub_add_eq_max
File: Mathlib/Algebra/Order/Sub/Canonical.lean

tactic: rcases le_total a b with h | h
state_before: α : Type u_1
inst✝² : CanonicallyLinearOrderedAddCommMonoid α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
⊢ a - b + b = max a b
state_after: case inl
α : Type u_1
inst✝² : CanonicallyLinearOrderedAddCommMonoid α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
h : a ≤ b
⊢ a - b + b = max a b

case inr
α : Type u_1
inst✝² : CanonicallyLinearOrderedAddCommMonoid α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
h : b ≤ a
⊢ a - b + b = max a b

tactic: rw [max_eq_right h, tsub_eq_zero_of_le h, zero_add]
state_before: case inl
α : Type u_1
inst✝² : CanonicallyLinearOrderedAddCommMonoid α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
h : a ≤ b
⊢ a - b + b = max a b
state_after: no goals

tactic: rw [max_eq_left h, tsub_add_cancel_of_le h]
state_before: case inr
α : Type u_1
inst✝² : CanonicallyLinearOrderedAddCommMonoid α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
h : b ≤ a
⊢ a - b + b = max a b
state_after: no goals