1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Real.Angle.toReal_coe_eq_self_sub_two_mul_int_mul_pi_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: rw [← sub_zero (θ : Angle), ← zsmul_zero k, ← coe_two_pi, ← coe_zsmul, ← coe_sub, zsmul_eq_mul, ←
  mul_assoc, mul_comm (k : ℝ), toReal_coe_eq_self_iff, Set.mem_Ioc]
state_before: θ : ℝ
k : ℤ
⊢ (↑θ).toReal = θ - 2 * ↑k * π ↔ θ ∈ Set.Ioc ((2 * ↑k - 1) * π) ((2 * ↑k + 1) * π)
state_after: θ : ℝ
k : ℤ
⊢ -π < θ - 2 * ↑k * π ∧ θ - 2 * ↑k * π ≤ π ↔ (2 * ↑k - 1) * π < θ ∧ θ ≤ (2 * ↑k + 1) * π

tactic: exact ⟨fun h => ⟨by linarith, by linarith⟩, fun h => ⟨by linarith, by linarith⟩⟩
state_before: θ : ℝ
k : ℤ
⊢ -π < θ - 2 * ↑k * π ∧ θ - 2 * ↑k * π ≤ π ↔ (2 * ↑k - 1) * π < θ ∧ θ ≤ (2 * ↑k + 1) * π
state_after: no goals

tactic: linarith
state_before: θ : ℝ
k : ℤ
h : -π < θ - 2 * ↑k * π ∧ θ - 2 * ↑k * π ≤ π
⊢ (2 * ↑k - 1) * π < θ
state_after: no goals

tactic: linarith
state_before: θ : ℝ
k : ℤ
h : -π < θ - 2 * ↑k * π ∧ θ - 2 * ↑k * π ≤ π
⊢ θ ≤ (2 * ↑k + 1) * π
state_after: no goals

tactic: linarith
state_before: θ : ℝ
k : ℤ
h : (2 * ↑k - 1) * π < θ ∧ θ ≤ (2 * ↑k + 1) * π
⊢ -π < θ - 2 * ↑k * π
state_after: no goals

tactic: linarith
state_before: θ : ℝ
k : ℤ
h : (2 * ↑k - 1) * π < θ ∧ θ ≤ (2 * ↑k + 1) * π
⊢ θ - 2 * ↑k * π ≤ π
state_after: no goals
Theorem: CategoryTheory.Limits.HasZeroMorphisms.ext
File: Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean

tactic: apply ext_aux
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
I J : HasZeroMorphisms C
⊢ I = J
state_after: case w
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
I J : HasZeroMorphisms C
⊢ ∀ (X Y : C), Zero.zero = Zero.zero

tactic: intro X Y
state_before: case w
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
I J : HasZeroMorphisms C
⊢ ∀ (X Y : C), Zero.zero = Zero.zero
state_after: case w
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
I J : HasZeroMorphisms C
X Y : C
⊢ Zero.zero = Zero.zero

tactic: have : (I.zero X Y).zero ≫ (J.zero Y Y).zero = (I.zero X Y).zero := by
  apply I.zero_comp X (J.zero Y Y).zero
state_before: case w
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
I J : HasZeroMorphisms C
X Y : C
⊢ Zero.zero = Zero.zero
state_after: case w
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
I J : HasZeroMorphisms C
X Y : C
this : Zero.zero ≫ Zero.zero = Zero.zero
⊢ Zero.zero = Zero.zero

tactic: have that : (I.zero X Y).zero ≫ (J.zero Y Y).zero = (J.zero X Y).zero := by
  apply J.comp_zero (I.zero X Y).zero Y
state_before: case w
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
I J : HasZeroMorphisms C
X Y : C
this : Zero.zero ≫ Zero.zero = Zero.zero
⊢ Zero.zero = Zero.zero
state_after: case w
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
I J : HasZeroMorphisms C
X Y : C
this : Zero.zero ≫ Zero.zero = Zero.zero
that : Zero.zero ≫ Zero.zero = Zero.zero
⊢ Zero.zero = Zero.zero

tactic: rw [← this, ← that]
state_before: case w
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
I J : HasZeroMorphisms C
X Y : C
this : Zero.zero ≫ Zero.zero = Zero.zero
that : Zero.zero ≫ Zero.zero = Zero.zero
⊢ Zero.zero = Zero.zero
state_after: no goals

tactic: apply I.zero_comp X (J.zero Y Y).zero
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
I J : HasZeroMorphisms C
X Y : C
⊢ Zero.zero ≫ Zero.zero = Zero.zero
state_after: no goals

tactic: apply J.comp_zero (I.zero X Y).zero Y
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
I J : HasZeroMorphisms C
X Y : C
this : Zero.zero ≫ Zero.zero = Zero.zero
⊢ Zero.zero ≫ Zero.zero = Zero.zero
state_after: no goals
Theorem: Matroid.loopyOn_base_iff
File: Mathlib/Data/Matroid/Constructions.lean

tactic: simp only [base_iff_maximal_indep, loopyOn_indep_iff, forall_eq, and_iff_left_iff_imp]
state_before: α : Type u_1
M : Matroid α
E B I X R J : Set α
⊢ (loopyOn E).Base B ↔ B = ∅
state_after: α : Type u_1
M : Matroid α
E B I X R J : Set α
⊢ B = ∅ → B ⊆ ∅ → B = ∅

tactic: exact fun h _ ↦ h
state_before: α : Type u_1
M : Matroid α
E B I X R J : Set α
⊢ B = ∅ → B ⊆ ∅ → B = ∅
state_after: no goals
Theorem: Finset.sup_singleton''
File: Mathlib/Data/Finset/Lattice.lean

tactic: ext a
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : DecidableEq α
s : Finset β
f : β → α
⊢ (s.sup fun b => {f b}) = image f s
state_after: case a
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : DecidableEq α
s : Finset β
f : β → α
a : α
⊢ (a ∈ s.sup fun b => {f b}) ↔ a ∈ image f s

tactic: rw [mem_sup, mem_image]
state_before: case a
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : DecidableEq α
s : Finset β
f : β → α
a : α
⊢ (a ∈ s.sup fun b => {f b}) ↔ a ∈ image f s
state_after: case a
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : DecidableEq α
s : Finset β
f : β → α
a : α
⊢ (∃ v ∈ s, a ∈ {f v}) ↔ ∃ a_1 ∈ s, f a_1 = a

tactic: simp only [mem_singleton, eq_comm]
state_before: case a
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : DecidableEq α
s : Finset β
f : β → α
a : α
⊢ (∃ v ∈ s, a ∈ {f v}) ↔ ∃ a_1 ∈ s, f a_1 = a
state_after: no goals
Theorem: UpperHalfPlane.dist_comm
File: Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean

tactic: simp only [dist_eq, dist_comm (z : ℂ), mul_comm]
state_before: z✝ w✝ : ℍ
r R : ℝ
z w : ℍ
⊢ dist z w = dist w z
state_after: no goals
Theorem: CategoryTheory.Iso.cancel_iso_inv_right_assoc
File: Mathlib/CategoryTheory/Iso.lean

tactic: simp only [← Category.assoc, cancel_mono]
state_before: C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ Z✝ W X X' Y Z : C
f : W ⟶ X
g : X ⟶ Y
f' : W ⟶ X'
g' : X' ⟶ Y
h : Z ≅ Y
⊢ f ≫ g ≫ h.inv = f' ≫ g' ≫ h.inv ↔ f ≫ g = f' ≫ g'
state_after: no goals
Theorem: Order.Ideal.IsProper.not_mem_of_compl_mem
File: Mathlib/Order/Ideal.lean

tactic: intro hx
state_before: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
hxc : xᶜ ∈ I
⊢ x ∉ I
state_after: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
hxc : xᶜ ∈ I
hx : x ∈ I
⊢ False

tactic: apply hI.top_not_mem
state_before: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
hxc : xᶜ ∈ I
hx : x ∈ I
⊢ False
state_after: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
hxc : xᶜ ∈ I
hx : x ∈ I
⊢ ⊤ ∈ I

tactic: have ht : x ⊔ xᶜ ∈ I := sup_mem ‹_› ‹_›
state_before: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
hxc : xᶜ ∈ I
hx : x ∈ I
⊢ ⊤ ∈ I
state_after: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
hxc : xᶜ ∈ I
hx : x ∈ I
ht : x ⊔ xᶜ ∈ I
⊢ ⊤ ∈ I

tactic: rwa [sup_compl_eq_top] at ht
state_before: P : Type u_1
inst✝ : BooleanAlgebra P
x : P
I : Ideal P
hI : I.IsProper
hxc : xᶜ ∈ I
hx : x ∈ I
ht : x ⊔ xᶜ ∈ I
⊢ ⊤ ∈ I
state_after: no goals
Theorem: Associates.out_dvd_iff
File: Mathlib/Algebra/GCDMonoid/Basic.lean

tactic: simp [Associates.out_mk, Associates.quotient_mk_eq_mk, mk_le_mk_iff_dvd]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizationMonoid α
a : α
b : Associates α
⊢ ∀ (a_1 : α), Associates.out ⟦a_1⟧ ∣ a ↔ ⟦a_1⟧ ≤ Associates.mk a
state_after: no goals
Theorem: Rat.den_mul_eq_num
File: Mathlib/Algebra/Ring/Rat.lean

tactic: rw [mul_comm, mul_den_eq_num]
state_before: q : ℚ
⊢ ↑q.den * q = ↑q.num
state_after: no goals
Theorem: symmDiff_eq_sup
File: Mathlib/Order/SymmDiff.lean

tactic: refine ⟨fun h => ?_, Disjoint.symmDiff_eq_sup⟩
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedBooleanAlgebra α
a b c d : α
⊢ a ∆ b = a ⊔ b ↔ Disjoint a b
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedBooleanAlgebra α
a b c d : α
h : a ∆ b = a ⊔ b
⊢ Disjoint a b

tactic: rw [symmDiff_eq_sup_sdiff_inf, sdiff_eq_self_iff_disjoint] at h
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedBooleanAlgebra α
a b c d : α
h : a ∆ b = a ⊔ b
⊢ Disjoint a b
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedBooleanAlgebra α
a b c d : α
h : Disjoint (a ⊓ b) (a ⊔ b)
⊢ Disjoint a b

tactic: exact h.of_disjoint_inf_of_le le_sup_left
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedBooleanAlgebra α
a b c d : α
h : Disjoint (a ⊓ b) (a ⊔ b)
⊢ Disjoint a b
state_after: no goals
Theorem: Polynomial.mkDerivation_apply
File: Mathlib/Algebra/Polynomial/Derivation.lean

tactic: rfl
state_before: R : Type u_1
A : Type u_2
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid A
inst✝² : Module R A
inst✝¹ : Module R[X] A
inst✝ : IsScalarTower R R[X] A
a : A
f : R[X]
⊢ ((mkDerivation R) a) f = derivative f • a
state_after: no goals
Theorem: CategoryTheory.ShortComplex.SnakeInput.naturality_φ₂
File: Mathlib/Algebra/Homology/ShortComplex/SnakeLemma.lean

tactic: dsimp [φ₂]
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
S S₁ S₂ S₃ : SnakeInput C
f : S₁ ⟶ S₂
⊢ S₁.φ₂ ≫ f.f₂.τ₂ = functorP.map f ≫ S₂.φ₂
state_after: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
S S₁ S₂ S₃ : SnakeInput C
f : S₁ ⟶ S₂
⊢ (pullback.fst ≫ S₁.v₁₂.τ₂) ≫ f.f₂.τ₂ =
    pullback.map S₁.L₁.g S₁.v₀₁.τ₃ S₂.L₁.g S₂.v₀₁.τ₃ f.f₁.τ₂ f.f₀.τ₃ f.f₁.τ₃ ⋯ ⋯ ≫ pullback.fst ≫ S₂.v₁₂.τ₂

tactic: simp only [assoc, pullback.lift_fst_assoc, ← comp_τ₂, f.comm₁₂]
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
S S₁ S₂ S₃ : SnakeInput C
f : S₁ ⟶ S₂
⊢ (pullback.fst ≫ S₁.v₁₂.τ₂) ≫ f.f₂.τ₂ =
    pullback.map S₁.L₁.g S₁.v₀₁.τ₃ S₂.L₁.g S₂.v₀₁.τ₃ f.f₁.τ₂ f.f₀.τ₃ f.f₁.τ₃ ⋯ ⋯ ≫ pullback.fst ≫ S₂.v₁₂.τ₂
state_after: no goals
Theorem: Ordinal.enum_zero_eq_bot
File: Mathlib/SetTheory/Ordinal/Basic.lean

tactic: rwa [type_lt]
state_before: α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal.{?u.113300}
ho : 0 < o
⊢ 0 < type fun x x_1 => x < x_1
state_after: no goals
Theorem: Behrend.map_zero
File: Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean

tactic: simp [map]
state_before: α : Type u_1
β : Type u_2
n d✝ k N : ℕ
x : Fin n → ℕ
d : ℕ
a : Fin 0 → ℕ
⊢ (map d) a = 0
state_after: no goals
Theorem: FiniteDimensional.nontrivial_of_finrank_eq_succ
File: Mathlib/LinearAlgebra/Dimension/Finite.lean

tactic: rw [hn]
state_before: R : Type u
M M₁ : Type v
M' : Type v'
ι : Type w
inst✝⁸ : Ring R
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup M'
inst✝⁵ : AddCommGroup M₁
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M₁
inst✝¹ : Nontrivial R
inst✝ : NoZeroSMulDivisors R M
n : ℕ
hn : finrank R M = n.succ
⊢ 0 < finrank ?m.346883 M
state_after: R : Type u
M M₁ : Type v
M' : Type v'
ι : Type w
inst✝⁸ : Ring R
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup M'
inst✝⁵ : AddCommGroup M₁
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M₁
inst✝¹ : Nontrivial R
inst✝ : NoZeroSMulDivisors R M
n : ℕ
hn : finrank R M = n.succ
⊢ 0 < n.succ

tactic: exact n.succ_pos
state_before: R : Type u
M M₁ : Type v
M' : Type v'
ι : Type w
inst✝⁸ : Ring R
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup M'
inst✝⁵ : AddCommGroup M₁
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M₁
inst✝¹ : Nontrivial R
inst✝ : NoZeroSMulDivisors R M
n : ℕ
hn : finrank R M = n.succ
⊢ 0 < n.succ
state_after: no goals
Theorem: CategoryTheory.Functor.essImageDistTriang_mem_of_iso
File: Mathlib/CategoryTheory/Localization/Triangulated.lean

tactic: obtain ⟨T', e', hT'⟩ := h
state_before: C : Type u_1
D : Type u_2
inst✝⁸ : Category.{u_4, u_1} C
inst✝⁷ : Category.{u_3, u_2} D
L : C ⥤ D
inst✝⁶ : HasShift C ℤ
inst✝⁵ : Preadditive C
inst✝⁴ : HasZeroObject C
inst✝³ : ∀ (n : ℤ), (shiftFunctor C n).Additive
inst✝² : Pretriangulated C
inst✝¹ : HasShift D ℤ
inst✝ : L.CommShift ℤ
T₁ T₂ : Triangle D
e : T₂ ≅ T₁
h : T₁ ∈ L.essImageDistTriang
⊢ T₂ ∈ L.essImageDistTriang
state_after: case intro.intro
C : Type u_1
D : Type u_2
inst✝⁸ : Category.{u_4, u_1} C
inst✝⁷ : Category.{u_3, u_2} D
L : C ⥤ D
inst✝⁶ : HasShift C ℤ
inst✝⁵ : Preadditive C
inst✝⁴ : HasZeroObject C
inst✝³ : ∀ (n : ℤ), (shiftFunctor C n).Additive
inst✝² : Pretriangulated C
inst✝¹ : HasShift D ℤ
inst✝ : L.CommShift ℤ
T₁ T₂ : Triangle D
e : T₂ ≅ T₁
T' : Triangle C
e' : T₁ ≅ L.mapTriangle.obj T'
hT' : T' ∈ distinguishedTriangles
⊢ T₂ ∈ L.essImageDistTriang

tactic: exact ⟨T', e ≪≫ e', hT'⟩
state_before: case intro.intro
C : Type u_1
D : Type u_2
inst✝⁸ : Category.{u_4, u_1} C
inst✝⁷ : Category.{u_3, u_2} D
L : C ⥤ D
inst✝⁶ : HasShift C ℤ
inst✝⁵ : Preadditive C
inst✝⁴ : HasZeroObject C
inst✝³ : ∀ (n : ℤ), (shiftFunctor C n).Additive
inst✝² : Pretriangulated C
inst✝¹ : HasShift D ℤ
inst✝ : L.CommShift ℤ
T₁ T₂ : Triangle D
e : T₂ ≅ T₁
T' : Triangle C
e' : T₁ ≅ L.mapTriangle.obj T'
hT' : T' ∈ distinguishedTriangles
⊢ T₂ ∈ L.essImageDistTriang
state_after: no goals
Theorem: NNReal.ball_zero_eq_Ico
File: Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean

tactic: by_cases c_pos : 0 < c
state_before: α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
c : ℝ
⊢ ball 0 c = Ico 0 c.toNNReal
state_after: case pos
α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
c : ℝ
c_pos : 0 < c
⊢ ball 0 c = Ico 0 c.toNNReal

case neg
α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
c : ℝ
c_pos : ¬0 < c
⊢ ball 0 c = Ico 0 c.toNNReal

tactic: simp [not_lt.mp c_pos]
state_before: case neg
α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
c : ℝ
c_pos : ¬0 < c
⊢ ball 0 c = Ico 0 c.toNNReal
state_after: no goals

tactic: convert NNReal.ball_zero_eq_Ico' ⟨c, c_pos.le⟩
state_before: case pos
α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
c : ℝ
c_pos : 0 < c
⊢ ball 0 c = Ico 0 c.toNNReal
state_after: case h.e'_3.h.e'_4
α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
c : ℝ
c_pos : 0 < c
⊢ c.toNNReal = ⟨c, ⋯⟩

tactic: simp [Real.toNNReal, c_pos.le]
state_before: case h.e'_3.h.e'_4
α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
c : ℝ
c_pos : 0 < c
⊢ c.toNNReal = ⟨c, ⋯⟩
state_after: no goals
Theorem: Polynomial.leadingCoeff_eraseLead_eq_nextCoeff
File: Mathlib/Algebra/Polynomial/EraseLead.lean

tactic: have := natDegree_pos_of_nextCoeff_ne_zero h
state_before: R : Type u_1
inst✝ : Semiring R
f : R[X]
h : f.nextCoeff ≠ 0
⊢ f.eraseLead.leadingCoeff = f.nextCoeff
state_after: R : Type u_1
inst✝ : Semiring R
f : R[X]
h : f.nextCoeff ≠ 0
this : 0 < f.natDegree
⊢ f.eraseLead.leadingCoeff = f.nextCoeff

tactic: rw [leadingCoeff, nextCoeff, natDegree_eraseLead h, if_neg,
  eraseLead_coeff_of_ne _ (tsub_lt_self _ _).ne]
state_before: R : Type u_1
inst✝ : Semiring R
f : R[X]
h : f.nextCoeff ≠ 0
this : 0 < f.natDegree
⊢ f.eraseLead.leadingCoeff = f.nextCoeff
state_after: R : Type u_1
inst✝ : Semiring R
f : R[X]
h : f.nextCoeff ≠ 0
this : 0 < f.natDegree
⊢ 0 < f.natDegree

R : Type u_1
inst✝ : Semiring R
f : R[X]
h : f.nextCoeff ≠ 0
this : 0 < f.natDegree
⊢ 0 < 1

case hnc
R : Type u_1
inst✝ : Semiring R
f : R[X]
h : f.nextCoeff ≠ 0
this : 0 < f.natDegree
⊢ ¬f.natDegree = 0

tactic: all_goals positivity
state_before: R : Type u_1
inst✝ : Semiring R
f : R[X]
h : f.nextCoeff ≠ 0
this : 0 < f.natDegree
⊢ 0 < f.natDegree

R : Type u_1
inst✝ : Semiring R
f : R[X]
h : f.nextCoeff ≠ 0
this : 0 < f.natDegree
⊢ 0 < 1

case hnc
R : Type u_1
inst✝ : Semiring R
f : R[X]
h : f.nextCoeff ≠ 0
this : 0 < f.natDegree
⊢ ¬f.natDegree = 0
state_after: no goals

tactic: positivity
state_before: case hnc
R : Type u_1
inst✝ : Semiring R
f : R[X]
h : f.nextCoeff ≠ 0
this : 0 < f.natDegree
⊢ ¬f.natDegree = 0
state_after: no goals
Theorem: padicValNat.one
File: Mathlib/NumberTheory/Padics/PadicVal.lean

tactic: unfold padicValNat
state_before: p : ℕ
⊢ padicValNat p 1 = 0
state_after: p : ℕ
⊢ (if h : p ≠ 1 ∧ 0 < 1 then (multiplicity p 1).get ⋯ else 0) = 0

tactic: split_ifs
state_before: p : ℕ
⊢ (if h : p ≠ 1 ∧ 0 < 1 then (multiplicity p 1).get ⋯ else 0) = 0
state_after: case pos
p : ℕ
h✝ : p ≠ 1 ∧ 0 < 1
⊢ (multiplicity p 1).get ⋯ = 0

case neg
p : ℕ
h✝ : ¬(p ≠ 1 ∧ 0 < 1)
⊢ 0 = 0

tactic: simp
state_before: case pos
p : ℕ
h✝ : p ≠ 1 ∧ 0 < 1
⊢ (multiplicity p 1).get ⋯ = 0
state_after: no goals

tactic: rfl
state_before: case neg
p : ℕ
h✝ : ¬(p ≠ 1 ∧ 0 < 1)
⊢ 0 = 0
state_after: no goals
Theorem: right_div_gcd_ne_zero
File: Mathlib/RingTheory/EuclideanDomain.lean

tactic: obtain ⟨r, hr⟩ := GCDMonoid.gcd_dvd_right p q
state_before: R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hq : q ≠ 0
⊢ q / GCDMonoid.gcd p q ≠ 0
state_after: case intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hq : q ≠ 0
r : R
hr : q = GCDMonoid.gcd p q * r
⊢ q / GCDMonoid.gcd p q ≠ 0

tactic: obtain ⟨pq0, r0⟩ : GCDMonoid.gcd p q ≠ 0 ∧ r ≠ 0 := mul_ne_zero_iff.mp (hr ▸ hq)
state_before: case intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hq : q ≠ 0
r : R
hr : q = GCDMonoid.gcd p q * r
⊢ q / GCDMonoid.gcd p q ≠ 0
state_after: case intro.intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hq : q ≠ 0
r : R
hr : q = GCDMonoid.gcd p q * r
pq0 : GCDMonoid.gcd p q ≠ 0
r0 : r ≠ 0
⊢ q / GCDMonoid.gcd p q ≠ 0

tactic: nth_rw 1 [hr]
state_before: case intro.intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hq : q ≠ 0
r : R
hr : q = GCDMonoid.gcd p q * r
pq0 : GCDMonoid.gcd p q ≠ 0
r0 : r ≠ 0
⊢ q / GCDMonoid.gcd p q ≠ 0
state_after: case intro.intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hq : q ≠ 0
r : R
hr : q = GCDMonoid.gcd p q * r
pq0 : GCDMonoid.gcd p q ≠ 0
r0 : r ≠ 0
⊢ GCDMonoid.gcd p q * r / GCDMonoid.gcd p q ≠ 0

tactic: rw [mul_comm, mul_div_cancel_right₀ _ pq0]
state_before: case intro.intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hq : q ≠ 0
r : R
hr : q = GCDMonoid.gcd p q * r
pq0 : GCDMonoid.gcd p q ≠ 0
r0 : r ≠ 0
⊢ GCDMonoid.gcd p q * r / GCDMonoid.gcd p q ≠ 0
state_after: case intro.intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hq : q ≠ 0
r : R
hr : q = GCDMonoid.gcd p q * r
pq0 : GCDMonoid.gcd p q ≠ 0
r0 : r ≠ 0
⊢ r ≠ 0

tactic: exact r0
state_before: case intro.intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hq : q ≠ 0
r : R
hr : q = GCDMonoid.gcd p q * r
pq0 : GCDMonoid.gcd p q ≠ 0
r0 : r ≠ 0
⊢ r ≠ 0
state_after: no goals
Theorem: midpoint_add_self
File: Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean

tactic: rw [midpoint_comm]
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁷ : Ring R
inst✝⁶ : Invertible 2
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x✝ y✝ z : P
x y : V
⊢ midpoint R x y +ᵥ midpoint R x y = midpoint R x y +ᵥ midpoint R y x
state_after: no goals

tactic: rw [midpoint_vadd_midpoint, vadd_eq_add, vadd_eq_add, add_comm, midpoint_self]
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁷ : Ring R
inst✝⁶ : Invertible 2
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x✝ y✝ z : P
x y : V
⊢ midpoint R x y +ᵥ midpoint R y x = x + y
state_after: no goals
Theorem: Ordnode.dual_balanceR
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: rw [← dual_dual (balanceL _ _ _), dual_balanceL, dual_dual, dual_dual]
state_before: α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
⊢ (l.balanceR x r).dual = r.dual.balanceL x l.dual
state_after: no goals
Theorem: Ideal.radical_eq_iff
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: rw [le_antisymm_iff, and_iff_left le_radical, IsRadical]
state_before: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
⊢ I.radical = I ↔ I.IsRadical
state_after: no goals
Theorem: CategoryTheory.monadToFunctor_mapIso_monad_iso_mk
File: Mathlib/CategoryTheory/Monad/Basic.lean

tactic: ext
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
T : Monad C
G : Comonad C
M N : Monad C
f : M.toFunctor ≅ N.toFunctor
f_η : ∀ (X : C), M.η.app X ≫ f.hom.app X = N.η.app X
f_μ : ∀ (X : C), M.μ.app X ≫ f.hom.app X = (M.map (f.hom.app X) ≫ f.hom.app (N.obj X)) ≫ N.μ.app X
⊢ (monadToFunctor C).mapIso (MonadIso.mk f f_η f_μ) = f
state_after: case w.w.h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
T : Monad C
G : Comonad C
M N : Monad C
f : M.toFunctor ≅ N.toFunctor
f_η : ∀ (X : C), M.η.app X ≫ f.hom.app X = N.η.app X
f_μ : ∀ (X : C), M.μ.app X ≫ f.hom.app X = (M.map (f.hom.app X) ≫ f.hom.app (N.obj X)) ≫ N.μ.app X
x✝ : C
⊢ ((monadToFunctor C).mapIso (MonadIso.mk f f_η f_μ)).hom.app x✝ = f.hom.app x✝

tactic: rfl
state_before: case w.w.h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
T : Monad C
G : Comonad C
M N : Monad C
f : M.toFunctor ≅ N.toFunctor
f_η : ∀ (X : C), M.η.app X ≫ f.hom.app X = N.η.app X
f_μ : ∀ (X : C), M.μ.app X ≫ f.hom.app X = (M.map (f.hom.app X) ≫ f.hom.app (N.obj X)) ≫ N.μ.app X
x✝ : C
⊢ ((monadToFunctor C).mapIso (MonadIso.mk f f_η f_μ)).hom.app x✝ = f.hom.app x✝
state_after: no goals
Theorem: Ordering.ite_eq_lt_distrib
File: Mathlib/Init/Data/Ordering/Lemmas.lean

tactic: by_cases c <;> simp [*]
state_before: c : Prop
inst✝ : Decidable c
a b : Ordering
⊢ ((if c then a else b) = lt) = if c then a = lt else b = lt
state_after: no goals
Theorem: surjOn_Ioi_of_monotone_surjective
File: Mathlib/Order/Interval/Set/SurjOn.lean

tactic: rw [← compl_Iic, ← compl_compl (Ioi (f a))]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a : α
⊢ SurjOn f (Ioi a) (Ioi (f a))
state_after: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a : α
⊢ SurjOn f (Iic a)ᶜ (Ioi (f a))ᶜᶜ

tactic: refine MapsTo.surjOn_compl ?_ h_surj
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a : α
⊢ SurjOn f (Iic a)ᶜ (Ioi (f a))ᶜᶜ
state_after: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a : α
⊢ MapsTo f (Iic a) (Ioi (f a))ᶜ

tactic: exact fun x hx => (h_mono hx).not_lt
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a : α
⊢ MapsTo f (Iic a) (Ioi (f a))ᶜ
state_after: no goals
Theorem: Asymptotics.IsBigOWith.weaken
File: Mathlib/Analysis/Asymptotics/Asymptotics.lean

tactic: gcongr
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
E' : Type u_6
F' : Type u_7
G' : Type u_8
E'' : Type u_9
F'' : Type u_10
G'' : Type u_11
E''' : Type u_12
R : Type u_13
R' : Type u_14
𝕜 : Type u_15
𝕜' : Type u_16
inst✝¹³ : Norm E
inst✝¹² : Norm F
inst✝¹¹ : Norm G
inst✝¹⁰ : SeminormedAddCommGroup E'
inst✝⁹ : SeminormedAddCommGroup F'
inst✝⁸ : SeminormedAddCommGroup G'
inst✝⁷ : NormedAddCommGroup E''
inst✝⁶ : NormedAddCommGroup F''
inst✝⁵ : NormedAddCommGroup G''
inst✝⁴ : SeminormedRing R
inst✝³ : SeminormedAddGroup E'''
inst✝² : SeminormedRing R'
inst✝¹ : NormedDivisionRing 𝕜
inst✝ : NormedDivisionRing 𝕜'
c c' c₁ c₂ : ℝ
f : α → E
g : α → F
k : α → G
f' : α → E'
g' : α → F'
k' : α → G'
f'' : α → E''
g'' : α → F''
k'' : α → G''
l l' : Filter α
h : IsBigOWith c l f g'
hc : c ≤ c'
x : α
hx : x ∈ {x | (fun x => ‖f x‖ ≤ c * ‖g' x‖) x}
⊢ c * ‖g' x‖ ≤ c' * ‖g' x‖
state_after: no goals
Theorem: sign_mul
File: Mathlib/Data/Sign.lean

tactic: rcases lt_trichotomy x 0 with (hx | hx | hx) <;> rcases lt_trichotomy y 0 with (hy | hy | hy) <;>
  simp [hx, hy, mul_pos_of_neg_of_neg, mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]
state_before: α : Type u_1
inst✝ : LinearOrderedRing α
a b x y : α
⊢ sign (x * y) = sign x * sign y
state_after: no goals