1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Submodule.map_subtype_span_singleton
File: Mathlib/LinearAlgebra/Span.lean

tactic: simp [← span_image]
state_before: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : Module R M
x✝ : M
p✝ p' : Submodule R M
inst✝⁴ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝³ : AddCommMonoid M₂
inst✝² : Module R₂ M₂
F : Type u_8
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F σ₁₂ M M₂
s t : Set M
p : Submodule R M
x : ↥p
⊢ map p.subtype (span R {x}) = span R {↑x}
state_after: no goals
Theorem: Subalgebra.finite_sup
File: Mathlib/RingTheory/TensorProduct/Basic.lean

tactic: rw [← E1.range_val, ← E2.range_val, ← Algebra.TensorProduct.productMap_range]
state_before: K : Type u_1
L : Type u_2
inst✝⁴ : CommSemiring K
inst✝³ : CommSemiring L
inst✝² : Algebra K L
E1 E2 : Subalgebra K L
inst✝¹ : Module.Finite K ↥E1
inst✝ : Module.Finite K ↥E2
⊢ Module.Finite K ↥(E1 ⊔ E2)
state_after: K : Type u_1
L : Type u_2
inst✝⁴ : CommSemiring K
inst✝³ : CommSemiring L
inst✝² : Algebra K L
E1 E2 : Subalgebra K L
inst✝¹ : Module.Finite K ↥E1
inst✝ : Module.Finite K ↥E2
⊢ Module.Finite K ↥(Algebra.TensorProduct.productMap E1.val E2.val).range

tactic: exact Module.Finite.range (Algebra.TensorProduct.productMap E1.val E2.val).toLinearMap
state_before: K : Type u_1
L : Type u_2
inst✝⁴ : CommSemiring K
inst✝³ : CommSemiring L
inst✝² : Algebra K L
E1 E2 : Subalgebra K L
inst✝¹ : Module.Finite K ↥E1
inst✝ : Module.Finite K ↥E2
⊢ Module.Finite K ↥(Algebra.TensorProduct.productMap E1.val E2.val).range
state_after: no goals
Theorem: Complex.cosh_sq
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← cosh_sq_sub_sinh_sq x]
state_before: x y : ℂ
⊢ cosh x ^ 2 = sinh x ^ 2 + 1
state_after: x y : ℂ
⊢ cosh x ^ 2 = sinh x ^ 2 + (cosh x ^ 2 - sinh x ^ 2)

tactic: ring
state_before: x y : ℂ
⊢ cosh x ^ 2 = sinh x ^ 2 + (cosh x ^ 2 - sinh x ^ 2)
state_after: no goals
Theorem: Finset.insert_val_of_not_mem
File: Mathlib/Data/Finset/Basic.lean

tactic: rw [insert_val, ndinsert_of_not_mem h]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s✝ t u v : Finset α
a✝ b a : α
s : Finset α
h : a ∉ s
⊢ (insert a s).val = a ::ₘ s.val
state_after: no goals
Theorem: DirectSum.decompose_coe
File: Mathlib/Algebra/DirectSum/Decomposition.lean

tactic: rw [← decompose_symm_of _, Equiv.apply_symm_apply]
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
σ : Type u_4
inst✝⁴ : DecidableEq ι
inst✝³ : AddCommMonoid M
inst✝² : SetLike σ M
inst✝¹ : AddSubmonoidClass σ M
ℳ : ι → σ
inst✝ : Decomposition ℳ
i : ι
x : ↥(ℳ i)
⊢ (decompose ℳ) ↑x = (of (fun i => ↥(ℳ i)) i) x
state_after: no goals
Theorem: Complex.abs_exp_ofReal
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← ofReal_exp]
state_before: x : ℝ
⊢ abs (cexp ↑x) = Real.exp x
state_after: x : ℝ
⊢ abs ↑(Real.exp x) = Real.exp x

tactic: exact abs_of_nonneg (le_of_lt (Real.exp_pos _))
state_before: x : ℝ
⊢ abs ↑(Real.exp x) = Real.exp x
state_after: no goals
Theorem: Filter.lift_top
File: Mathlib/Order/Filter/Lift.lean

tactic: simp [Filter.lift]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
f f₁ f₂ : Filter α
g✝ g₁ g₂ g : Set α → Filter β
⊢ ⊤.lift g = g univ
state_after: no goals
Theorem: Finset.card_insert_le
File: Mathlib/Data/Finset/Card.lean

tactic: by_cases h : a ∈ s
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s✝ t : Finset α
a✝ b : α
inst✝ : DecidableEq α
a : α
s : Finset α
⊢ (insert a s).card ≤ s.card + 1
state_after: case pos
α : Type u_1
β : Type u_2
R : Type u_3
s✝ t : Finset α
a✝ b : α
inst✝ : DecidableEq α
a : α
s : Finset α
h : a ∈ s
⊢ (insert a s).card ≤ s.card + 1

case neg
α : Type u_1
β : Type u_2
R : Type u_3
s✝ t : Finset α
a✝ b : α
inst✝ : DecidableEq α
a : α
s : Finset α
h : a ∉ s
⊢ (insert a s).card ≤ s.card + 1

tactic: rw [insert_eq_of_mem h]
state_before: case pos
α : Type u_1
β : Type u_2
R : Type u_3
s✝ t : Finset α
a✝ b : α
inst✝ : DecidableEq α
a : α
s : Finset α
h : a ∈ s
⊢ (insert a s).card ≤ s.card + 1
state_after: case pos
α : Type u_1
β : Type u_2
R : Type u_3
s✝ t : Finset α
a✝ b : α
inst✝ : DecidableEq α
a : α
s : Finset α
h : a ∈ s
⊢ s.card ≤ s.card + 1

tactic: exact Nat.le_succ _
state_before: case pos
α : Type u_1
β : Type u_2
R : Type u_3
s✝ t : Finset α
a✝ b : α
inst✝ : DecidableEq α
a : α
s : Finset α
h : a ∈ s
⊢ s.card ≤ s.card + 1
state_after: no goals

tactic: rw [card_insert_of_not_mem h]
state_before: case neg
α : Type u_1
β : Type u_2
R : Type u_3
s✝ t : Finset α
a✝ b : α
inst✝ : DecidableEq α
a : α
s : Finset α
h : a ∉ s
⊢ (insert a s).card ≤ s.card + 1
state_after: no goals
Theorem: Submonoid.mem_closure_singleton
File: Mathlib/Algebra/Group/Submonoid/Membership.lean

tactic: rw [closure_singleton_eq, mem_mrange]
state_before: M : Type u_1
A : Type u_2
B : Type u_3
inst✝ : Monoid M
a x y : M
⊢ y ∈ closure {x} ↔ ∃ n, x ^ n = y
state_after: M : Type u_1
A : Type u_2
B : Type u_3
inst✝ : Monoid M
a x y : M
⊢ (∃ x_1, ((powersHom M) x) x_1 = y) ↔ ∃ n, x ^ n = y

tactic: rfl
state_before: M : Type u_1
A : Type u_2
B : Type u_3
inst✝ : Monoid M
a x y : M
⊢ (∃ x_1, ((powersHom M) x) x_1 = y) ↔ ∃ n, x ^ n = y
state_after: no goals
Theorem: SpectrumRestricts.of_spectrum_eq
File: Mathlib/Algebra/Algebra/Quasispectrum.lean

tactic: rw [quasispectrum_eq_spectrum_union_zero, ← h, ← quasispectrum_eq_spectrum_union_zero]
state_before: R✝ : Type u_1
A✝ : Type u_2
inst✝¹¹ : CommSemiring R✝
inst✝¹⁰ : NonUnitalRing A✝
inst✝⁹ : Module R✝ A✝
inst✝⁸ : IsScalarTower R✝ A✝ A✝
inst✝⁷ : SMulCommClass R✝ A✝ A✝
R : Type u_3
S : Type u_4
A : Type u_5
inst✝⁶ : Semifield R
inst✝⁵ : Semifield S
inst✝⁴ : Ring A
inst✝³ : Algebra R S
inst✝² : Algebra R A
inst✝¹ : Algebra S A
a✝ : A
f✝ : S → R
inst✝ : IsScalarTower R S A
h✝ : SpectrumRestricts a✝ f✝
a b : A
f : S → R
ha : SpectrumRestricts a f
h : spectrum S a = spectrum S b
⊢ Set.RightInvOn f (⇑(algebraMap R S)) (quasispectrum S b)
state_after: R✝ : Type u_1
A✝ : Type u_2
inst✝¹¹ : CommSemiring R✝
inst✝¹⁰ : NonUnitalRing A✝
inst✝⁹ : Module R✝ A✝
inst✝⁸ : IsScalarTower R✝ A✝ A✝
inst✝⁷ : SMulCommClass R✝ A✝ A✝
R : Type u_3
S : Type u_4
A : Type u_5
inst✝⁶ : Semifield R
inst✝⁵ : Semifield S
inst✝⁴ : Ring A
inst✝³ : Algebra R S
inst✝² : Algebra R A
inst✝¹ : Algebra S A
a✝ : A
f✝ : S → R
inst✝ : IsScalarTower R S A
h✝ : SpectrumRestricts a✝ f✝
a b : A
f : S → R
ha : SpectrumRestricts a f
h : spectrum S a = spectrum S b
⊢ Set.RightInvOn f (⇑(algebraMap R S)) (quasispectrum S a)

tactic: exact QuasispectrumRestricts.rightInvOn ha
state_before: R✝ : Type u_1
A✝ : Type u_2
inst✝¹¹ : CommSemiring R✝
inst✝¹⁰ : NonUnitalRing A✝
inst✝⁹ : Module R✝ A✝
inst✝⁸ : IsScalarTower R✝ A✝ A✝
inst✝⁷ : SMulCommClass R✝ A✝ A✝
R : Type u_3
S : Type u_4
A : Type u_5
inst✝⁶ : Semifield R
inst✝⁵ : Semifield S
inst✝⁴ : Ring A
inst✝³ : Algebra R S
inst✝² : Algebra R A
inst✝¹ : Algebra S A
a✝ : A
f✝ : S → R
inst✝ : IsScalarTower R S A
h✝ : SpectrumRestricts a✝ f✝
a b : A
f : S → R
ha : SpectrumRestricts a f
h : spectrum S a = spectrum S b
⊢ Set.RightInvOn f (⇑(algebraMap R S)) (quasispectrum S a)
state_after: no goals
Theorem: Pell.Solution₁.d_pos_of_one_lt_x
File: Mathlib/NumberTheory/Pell.lean

tactic: refine pos_of_mul_pos_left ?_ (sq_nonneg a.y)
state_before: d : ℤ
a : Solution₁ d
ha : 1 < a.x
⊢ 0 < d
state_after: d : ℤ
a : Solution₁ d
ha : 1 < a.x
⊢ 0 < d * a.y ^ 2

tactic: rw [a.prop_y, sub_pos]
state_before: d : ℤ
a : Solution₁ d
ha : 1 < a.x
⊢ 0 < d * a.y ^ 2
state_after: d : ℤ
a : Solution₁ d
ha : 1 < a.x
⊢ 1 < a.x ^ 2

tactic: exact one_lt_pow ha two_ne_zero
state_before: d : ℤ
a : Solution₁ d
ha : 1 < a.x
⊢ 1 < a.x ^ 2
state_after: no goals
Theorem: Equiv.Perm.toList_get_zero
File: Mathlib/GroupTheory/Perm/Cycle/Concrete.lean

tactic: simp [toList]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p : Perm α
x : α
h : x ∈ p.support
⊢ (p.toList x).get ⟨0, ⋯⟩ = x
state_after: no goals
Theorem: Function.Semiconj.injOn_range
File: Mathlib/Data/Set/Function.lean

tactic: rw [← image_univ] at *
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
fa : α → α
fb : β → β
f : α → β
g : β → γ
s t : Set α
h : Semiconj f fa fb
ha : Injective fa
hf : InjOn f (range fa)
⊢ InjOn fb (range f)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
fa : α → α
fb : β → β
f : α → β
g : β → γ
s t : Set α
h : Semiconj f fa fb
ha : Injective fa
hf : InjOn f (fa '' univ)
⊢ InjOn fb (f '' univ)

tactic: exact h.injOn_image ha.injOn hf
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
fa : α → α
fb : β → β
f : α → β
g : β → γ
s t : Set α
h : Semiconj f fa fb
ha : Injective fa
hf : InjOn f (fa '' univ)
⊢ InjOn fb (f '' univ)
state_after: no goals
Theorem: contDiffAt_of_subsingleton
File: Mathlib/Analysis/Calculus/ContDiff/Basic.lean

tactic: rw [Subsingleton.elim f fun _ => 0]
state_before: 𝕜 : Type u_1
inst✝¹¹ : NontriviallyNormedField 𝕜
D : Type uD
inst✝¹⁰ : NormedAddCommGroup D
inst✝⁹ : NormedSpace 𝕜 D
E : Type uE
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace 𝕜 E
F : Type uF
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace 𝕜 F
G : Type uG
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedSpace 𝕜 G
X : Type u_2
inst✝² : NormedAddCommGroup X
inst✝¹ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
inst✝ : Subsingleton F
⊢ ContDiffAt 𝕜 n f x
state_after: 𝕜 : Type u_1
inst✝¹¹ : NontriviallyNormedField 𝕜
D : Type uD
inst✝¹⁰ : NormedAddCommGroup D
inst✝⁹ : NormedSpace 𝕜 D
E : Type uE
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace 𝕜 E
F : Type uF
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace 𝕜 F
G : Type uG
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedSpace 𝕜 G
X : Type u_2
inst✝² : NormedAddCommGroup X
inst✝¹ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
inst✝ : Subsingleton F
⊢ ContDiffAt 𝕜 n (fun x => 0) x

tactic: exact contDiffAt_const
state_before: 𝕜 : Type u_1
inst✝¹¹ : NontriviallyNormedField 𝕜
D : Type uD
inst✝¹⁰ : NormedAddCommGroup D
inst✝⁹ : NormedSpace 𝕜 D
E : Type uE
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace 𝕜 E
F : Type uF
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace 𝕜 F
G : Type uG
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedSpace 𝕜 G
X : Type u_2
inst✝² : NormedAddCommGroup X
inst✝¹ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
inst✝ : Subsingleton F
⊢ ContDiffAt 𝕜 n (fun x => 0) x
state_after: no goals
Theorem: equivShrink_div
File: Mathlib/Logic/Small/Group.lean

tactic: rw [Equiv.div_def]
state_before: α : Type u_1
inst✝¹ : Div α
inst✝ : Small.{u_2, u_1} α
x y : α
⊢ (equivShrink α) (x / y) = (equivShrink α) x / (equivShrink α) y
state_after: α : Type u_1
inst✝¹ : Div α
inst✝ : Small.{u_2, u_1} α
x y : α
⊢ (equivShrink α) (x / y) =
    (equivShrink α).symm.symm ((equivShrink α).symm ((equivShrink α) x) / (equivShrink α).symm ((equivShrink α) y))

tactic: simp
state_before: α : Type u_1
inst✝¹ : Div α
inst✝ : Small.{u_2, u_1} α
x y : α
⊢ (equivShrink α) (x / y) =
    (equivShrink α).symm.symm ((equivShrink α).symm ((equivShrink α) x) / (equivShrink α).symm ((equivShrink α) y))
state_after: no goals
Theorem: monovary_iff_smul_rearrangement
File: Mathlib/Algebra/Order/Monovary.lean

tactic: simp only [Set.mem_univ, forall_true_left]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : LinearOrderedRing α
inst✝² : LinearOrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : OrderedSMul α β
f : ι → α
g : ι → β
s : Set ι
a a₁ a₂ : α
b b₁ b₂ : β
⊢ (∀ ⦃i : ι⦄, i ∈ Set.univ → ∀ ⦃j : ι⦄, j ∈ Set.univ → f i • g j + f j • g i ≤ f i • g i + f j • g j) ↔
    ∀ (i j : ι), f i • g j + f j • g i ≤ f i • g i + f j • g j
state_after: no goals
Theorem: MeasureTheory.Lp.simpleFunc.norm_toSimpleFunc
File: Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean

tactic: simpa [toLp_toSimpleFunc] using norm_toLp (toSimpleFunc f) (simpleFunc.memℒp f)
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
inst✝³ : NormedRing 𝕜
inst✝² : Module 𝕜 E
inst✝¹ : BoundedSMul 𝕜 E
inst✝ : Fact (1 ≤ p)
f : ↥(simpleFunc E p μ)
⊢ ‖f‖ = (snorm (↑(toSimpleFunc f)) p μ).toReal
state_after: no goals
Theorem: Polynomial.eq_prod_roots_of_splits
File: Mathlib/Algebra/Polynomial/Splits.lean

tactic: rw [← leadingCoeff_map]
state_before: R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i✝ : K →+* L
p : K[X]
i : K →+* L
hsplit : Splits i p
⊢ map i p = C (i p.leadingCoeff) * (Multiset.map (fun a => X - C a) (map i p).roots).prod
state_after: R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i✝ : K →+* L
p : K[X]
i : K →+* L
hsplit : Splits i p
⊢ map i p = C (map i p).leadingCoeff * (Multiset.map (fun a => X - C a) (map i p).roots).prod

tactic: symm
state_before: R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i✝ : K →+* L
p : K[X]
i : K →+* L
hsplit : Splits i p
⊢ map i p = C (map i p).leadingCoeff * (Multiset.map (fun a => X - C a) (map i p).roots).prod
state_after: R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i✝ : K →+* L
p : K[X]
i : K →+* L
hsplit : Splits i p
⊢ C (map i p).leadingCoeff * (Multiset.map (fun a => X - C a) (map i p).roots).prod = map i p

tactic: apply C_leadingCoeff_mul_prod_multiset_X_sub_C
state_before: R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i✝ : K →+* L
p : K[X]
i : K →+* L
hsplit : Splits i p
⊢ C (map i p).leadingCoeff * (Multiset.map (fun a => X - C a) (map i p).roots).prod = map i p
state_after: case hroots
R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i✝ : K →+* L
p : K[X]
i : K →+* L
hsplit : Splits i p
⊢ Multiset.card (map i p).roots = (map i p).natDegree

tactic: rw [natDegree_map]
state_before: case hroots
R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i✝ : K →+* L
p : K[X]
i : K →+* L
hsplit : Splits i p
⊢ Multiset.card (map i p).roots = (map i p).natDegree
state_after: case hroots
R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i✝ : K →+* L
p : K[X]
i : K →+* L
hsplit : Splits i p
⊢ Multiset.card (map i p).roots = p.natDegree

tactic: exact (natDegree_eq_card_roots hsplit).symm
state_before: case hroots
R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i✝ : K →+* L
p : K[X]
i : K →+* L
hsplit : Splits i p
⊢ Multiset.card (map i p).roots = p.natDegree
state_after: no goals
Theorem: Rat.abs_def
File: Mathlib/Algebra/Order/Ring/Rat.lean

tactic: rcases le_total q 0 with hq | hq
state_before: a b c p q✝ q : ℚ
⊢ |q| = ↑q.num.natAbs /. ↑q.den
state_after: case inl
a b c p q✝ q : ℚ
hq : q ≤ 0
⊢ |q| = ↑q.num.natAbs /. ↑q.den

case inr
a b c p q✝ q : ℚ
hq : 0 ≤ q
⊢ |q| = ↑q.num.natAbs /. ↑q.den

tactic: rw [abs_of_nonpos hq]
state_before: case inl
a b c p q✝ q : ℚ
hq : q ≤ 0
⊢ |q| = ↑q.num.natAbs /. ↑q.den
state_after: case inl
a b c p q✝ q : ℚ
hq : q ≤ 0
⊢ -q = ↑q.num.natAbs /. ↑q.den

tactic: rw [← num_divInt_den q, ← zero_divInt, Rat.divInt_le_divInt (mod_cast q.pos) zero_lt_one,
  mul_one, zero_mul] at hq
state_before: case inl
a b c p q✝ q : ℚ
hq : q ≤ 0
⊢ -q = ↑q.num.natAbs /. ↑q.den
state_after: case inl
a b c p q✝ q : ℚ
hq✝ : q.num /. ↑q.den ≤ 0
hq : q.num ≤ 0
⊢ -q = ↑q.num.natAbs /. ↑q.den

tactic: rw [Int.ofNat_natAbs_of_nonpos hq, ← neg_def]
state_before: case inl
a b c p q✝ q : ℚ
hq✝ : q.num /. ↑q.den ≤ 0
hq : q.num ≤ 0
⊢ -q = ↑q.num.natAbs /. ↑q.den
state_after: no goals

tactic: rw [abs_of_nonneg hq]
state_before: case inr
a b c p q✝ q : ℚ
hq : 0 ≤ q
⊢ |q| = ↑q.num.natAbs /. ↑q.den
state_after: case inr
a b c p q✝ q : ℚ
hq : 0 ≤ q
⊢ q = ↑q.num.natAbs /. ↑q.den

tactic: rw [← num_divInt_den q, ← zero_divInt, Rat.divInt_le_divInt zero_lt_one (mod_cast q.pos),
  mul_one, zero_mul] at hq
state_before: case inr
a b c p q✝ q : ℚ
hq : 0 ≤ q
⊢ q = ↑q.num.natAbs /. ↑q.den
state_after: case inr
a b c p q✝ q : ℚ
hq✝ : 0 ≤ q.num /. ↑q.den
hq : 0 ≤ q.num
⊢ q = ↑q.num.natAbs /. ↑q.den

tactic: rw [Int.natAbs_of_nonneg hq, num_divInt_den]
state_before: case inr
a b c p q✝ q : ℚ
hq✝ : 0 ≤ q.num /. ↑q.den
hq : 0 ≤ q.num
⊢ q = ↑q.num.natAbs /. ↑q.den
state_after: no goals
Theorem: Nat.eq_iff_prime_padicValNat_eq
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: constructor
state_before: a✝ b✝ m n p a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ a = b ↔ ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b
state_after: case mp
a✝ b✝ m n p a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ a = b → ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b

case mpr
a✝ b✝ m n p a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ (∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b) → a = b

tactic: rintro rfl
state_before: case mp
a✝ b✝ m n p a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ a = b → ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b
state_after: case mp
a✝ b m n p a : ℕ
ha hb : a ≠ 0
⊢ ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p a

tactic: simp
state_before: case mp
a✝ b m n p a : ℕ
ha hb : a ≠ 0
⊢ ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p a
state_after: no goals

tactic: intro h
state_before: case mpr
a✝ b✝ m n p a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ (∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b) → a = b
state_after: case mpr
a✝ b✝ m n p a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
h : ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b
⊢ a = b

tactic: refine eq_of_factorization_eq ha hb fun p => ?_
state_before: case mpr
a✝ b✝ m n p a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
h : ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b
⊢ a = b
state_after: case mpr
a✝ b✝ m n p✝ a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
h : ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b
p : ℕ
⊢ a.factorization p = b.factorization p

tactic: by_cases pp : p.Prime
state_before: case mpr
a✝ b✝ m n p✝ a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
h : ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b
p : ℕ
⊢ a.factorization p = b.factorization p
state_after: case pos
a✝ b✝ m n p✝ a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
h : ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b
p : ℕ
pp : Prime p
⊢ a.factorization p = b.factorization p

case neg
a✝ b✝ m n p✝ a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
h : ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b
p : ℕ
pp : ¬Prime p
⊢ a.factorization p = b.factorization p

tactic: simp [factorization_def, pp, h p pp]
state_before: case pos
a✝ b✝ m n p✝ a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
h : ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b
p : ℕ
pp : Prime p
⊢ a.factorization p = b.factorization p
state_after: no goals

tactic: simp [factorization_eq_zero_of_non_prime, pp]
state_before: case neg
a✝ b✝ m n p✝ a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
h : ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b
p : ℕ
pp : ¬Prime p
⊢ a.factorization p = b.factorization p
state_after: no goals
Theorem: Rat.mk'_pow
File: Mathlib/Data/Rat/Defs.lean

tactic: simp [Nat.pow_eq_zero, hd]
state_before: q : ℚ
num : ℤ
den : ℕ
hd : den ≠ 0
hdn : num.natAbs.Coprime den
n : ℕ
⊢ den ^ n ≠ 0
state_after: no goals

tactic: rw [Int.natAbs_pow]
state_before: q : ℚ
num : ℤ
den : ℕ
hd : den ≠ 0
hdn : num.natAbs.Coprime den
n : ℕ
⊢ (num ^ n).natAbs.Coprime (den ^ n)
state_after: q : ℚ
num : ℤ
den : ℕ
hd : den ≠ 0
hdn : num.natAbs.Coprime den
n : ℕ
⊢ (num.natAbs ^ n).Coprime (den ^ n)

tactic: exact hdn.pow _ _
state_before: q : ℚ
num : ℤ
den : ℕ
hd : den ≠ 0
hdn : num.natAbs.Coprime den
n : ℕ
⊢ (num.natAbs ^ n).Coprime (den ^ n)
state_after: no goals
Theorem: Filter.isBounded_principal
File: Mathlib/Order/LiminfLimsup.lean

tactic: simp [IsBounded, subset_def]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f g : Filter α
s : Set α
⊢ IsBounded r (𝓟 s) ↔ ∃ t, ∀ x ∈ s, r x t
state_after: no goals
Theorem: isDomain_iff_noZeroDivisors_and_nontrivial
File: Mathlib/Algebra/Ring/Basic.lean

tactic: rw [← isCancelMulZero_iff_noZeroDivisors, isDomain_iff_cancelMulZero_and_nontrivial]
state_before: R : Type u_1
α : Type u_2
inst✝ : Ring α
⊢ IsDomain α ↔ NoZeroDivisors α ∧ Nontrivial α
state_after: no goals
Theorem: sdiff_sup_self'
File: Mathlib/Order/BooleanAlgebra.lean

tactic: rw [sup_inf_self]
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ y \ x ⊔ x = y \ x ⊔ (x ⊔ x ⊓ y)
state_after: no goals

tactic: ac_rfl
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ y \ x ⊔ (x ⊔ x ⊓ y) = y ⊓ x ⊔ y \ x ⊔ x
state_after: no goals

tactic: rw [sup_inf_sdiff]
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ y ⊓ x ⊔ y \ x ⊔ x = y ⊔ x
state_after: no goals
Theorem: Filter.Tendsto.finset_sup_nhds_apply
File: Mathlib/Topology/Order/Lattice.lean

tactic: simpa only [← Finset.sup_apply] using finset_sup_nhds hs
state_before: L : Type u_1
X : Type u_2
inst✝⁴ : TopologicalSpace L
inst✝³ : TopologicalSpace X
ι : Type u_3
α : Type u_4
s : Finset ι
f : ι → α → L
l : Filter α
g : ι → L
inst✝² : SemilatticeSup L
inst✝¹ : OrderBot L
inst✝ : ContinuousSup L
hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))
⊢ Tendsto (fun a => s.sup fun x => f x a) l (𝓝 (s.sup g))
state_after: no goals
Theorem: Metric.comap_dist_left_atTop
File: Mathlib/Topology/MetricSpace/Bounded.lean

tactic: simpa only [dist_comm _ c] using comap_dist_right_atTop c
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x : α
s t : Set α
r : ℝ
c : α
⊢ comap (dist c) atTop = cobounded α
state_after: no goals
Theorem: Seminorm.continuousAt_zero_of_forall'
File: Mathlib/Analysis/Seminorm.lean

tactic: simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp
state_before: R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝⁵ : NontriviallyNormedField 𝕜
inst✝⁴ : SeminormedRing 𝕝
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕝 E
inst✝ : TopologicalSpace E
p : Seminorm 𝕝 E
hp : ∀ r > 0, p.closedBall 0 r ∈ 𝓝 0
⊢ ContinuousAt (⇑p) 0
state_after: R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝⁵ : NontriviallyNormedField 𝕜
inst✝⁴ : SeminormedRing 𝕝
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕝 E
inst✝ : TopologicalSpace E
p : Seminorm 𝕝 E
hp : ∀ r > 0, ⇑p ⁻¹' Metric.closedBall 0 r ∈ 𝓝 0
⊢ ContinuousAt (⇑p) 0

tactic: rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero]
state_before: R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝⁵ : NontriviallyNormedField 𝕜
inst✝⁴ : SeminormedRing 𝕝
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕝 E
inst✝ : TopologicalSpace E
p : Seminorm 𝕝 E
hp : ∀ r > 0, ⇑p ⁻¹' Metric.closedBall 0 r ∈ 𝓝 0
⊢ ContinuousAt (⇑p) 0
state_after: no goals
Theorem: Polynomial.mul_X_sub_intCast_comp
File: Mathlib/Algebra/Polynomial/Eval.lean

tactic: rw [mul_sub, sub_comp, mul_X_comp, ← Nat.cast_comm, natCast_mul_comp, Nat.cast_comm, mul_sub]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝ : Ring R
p q r : R[X]
n : ℕ
⊢ (p * (X - ↑n)).comp q = p.comp q * (q - ↑n)
state_after: no goals
Theorem: Polynomial.Monic.prime_of_degree_eq_one
File: Mathlib/Algebra/Polynomial/RingDivision.lean

tactic: simpa [hm.leadingCoeff] using eq_X_add_C_of_degree_eq_one hp1
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]
hp1 : p.degree = 1
hm : p.Monic
⊢ p = X - C (-p.coeff 0)
state_after: no goals