1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Polynomial.eval₂_primPart_eq_zero
File: Mathlib/RingTheory/Polynomial/Content.lean

tactic: rw [eq_C_content_mul_primPart p, eval₂_mul, eval₂_C] at hp
state_before: R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : NormalizedGCDMonoid R
S : Type u_2
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hinj : Function.Injective ⇑f
p : R[X]
s : S
hpzero : p ≠ 0
hp : eval₂ f s p = 0
⊢ eval₂ f s p.primPart = 0
state_after: R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : NormalizedGCDMonoid R
S : Type u_2
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hinj : Function.Injective ⇑f
p : R[X]
s : S
hpzero : p ≠ 0
hp : f p.content * eval₂ f s p.primPart = 0
⊢ eval₂ f s p.primPart = 0

tactic: have hcont : p.content ≠ 0 := fun h => hpzero (content_eq_zero_iff.1 h)
state_before: R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : NormalizedGCDMonoid R
S : Type u_2
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hinj : Function.Injective ⇑f
p : R[X]
s : S
hpzero : p ≠ 0
hp : f p.content * eval₂ f s p.primPart = 0
⊢ eval₂ f s p.primPart = 0
state_after: R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : NormalizedGCDMonoid R
S : Type u_2
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hinj : Function.Injective ⇑f
p : R[X]
s : S
hpzero : p ≠ 0
hp : f p.content * eval₂ f s p.primPart = 0
hcont : p.content ≠ 0
⊢ eval₂ f s p.primPart = 0

tactic: replace hcont := Function.Injective.ne hinj hcont
state_before: R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : NormalizedGCDMonoid R
S : Type u_2
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hinj : Function.Injective ⇑f
p : R[X]
s : S
hpzero : p ≠ 0
hp : f p.content * eval₂ f s p.primPart = 0
hcont : p.content ≠ 0
⊢ eval₂ f s p.primPart = 0
state_after: R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : NormalizedGCDMonoid R
S : Type u_2
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hinj : Function.Injective ⇑f
p : R[X]
s : S
hpzero : p ≠ 0
hp : f p.content * eval₂ f s p.primPart = 0
hcont : f p.content ≠ f 0
⊢ eval₂ f s p.primPart = 0

tactic: rw [map_zero] at hcont
state_before: R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : NormalizedGCDMonoid R
S : Type u_2
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hinj : Function.Injective ⇑f
p : R[X]
s : S
hpzero : p ≠ 0
hp : f p.content * eval₂ f s p.primPart = 0
hcont : f p.content ≠ f 0
⊢ eval₂ f s p.primPart = 0
state_after: R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : NormalizedGCDMonoid R
S : Type u_2
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hinj : Function.Injective ⇑f
p : R[X]
s : S
hpzero : p ≠ 0
hp : f p.content * eval₂ f s p.primPart = 0
hcont : f p.content ≠ 0
⊢ eval₂ f s p.primPart = 0

tactic: exact eq_zero_of_ne_zero_of_mul_left_eq_zero hcont hp
state_before: R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : NormalizedGCDMonoid R
S : Type u_2
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hinj : Function.Injective ⇑f
p : R[X]
s : S
hpzero : p ≠ 0
hp : f p.content * eval₂ f s p.primPart = 0
hcont : f p.content ≠ 0
⊢ eval₂ f s p.primPart = 0
state_after: no goals
Theorem: List.Perm.mem_iff
File: .lake/packages/batteries/Batteries/Data/List/Perm.lean

tactic: induction p with
| nil => rfl
| cons _ _ ih => simp only [mem_cons, ih]
| swap => simp only [mem_cons, or_left_comm]
| trans _ _ ih₁ ih₂ => simp only [ih₁, ih₂]
state_before: α : Type u_1
a : α
l₁ l₂ : List α
p : l₁ ~ l₂
⊢ a ∈ l₁ ↔ a ∈ l₂
state_after: no goals

tactic: rfl
state_before: case nil
α : Type u_1
a : α
l₁ l₂ : List α
⊢ a ∈ [] ↔ a ∈ []
state_after: no goals

tactic: simp only [mem_cons, ih]
state_before: case cons
α : Type u_1
a : α
l₁ l₂ : List α
x✝ : α
l₁✝ l₂✝ : List α
a✝ : l₁✝ ~ l₂✝
ih : a ∈ l₁✝ ↔ a ∈ l₂✝
⊢ a ∈ x✝ :: l₁✝ ↔ a ∈ x✝ :: l₂✝
state_after: no goals

tactic: simp only [mem_cons, or_left_comm]
state_before: case swap
α : Type u_1
a : α
l₁ l₂ : List α
x✝ y✝ : α
l✝ : List α
⊢ a ∈ y✝ :: x✝ :: l✝ ↔ a ∈ x✝ :: y✝ :: l✝
state_after: no goals

tactic: simp only [ih₁, ih₂]
state_before: case trans
α : Type u_1
a : α
l₁ l₂ l₁✝ l₂✝ l₃✝ : List α
a✝¹ : l₁✝ ~ l₂✝
a✝ : l₂✝ ~ l₃✝
ih₁ : a ∈ l₁✝ ↔ a ∈ l₂✝
ih₂ : a ∈ l₂✝ ↔ a ∈ l₃✝
⊢ a ∈ l₁✝ ↔ a ∈ l₃✝
state_after: no goals
Theorem: Set.Intersecting.card_le
File: Mathlib/Combinatorics/SetFamily/Intersecting.lean

tactic: classical
  refine (s.disjUnion _ hs.disjoint_map_compl).card_le_univ.trans_eq' ?_
  rw [Nat.two_mul, card_disjUnion, card_map]
state_before: α : Type u_1
inst✝¹ : BooleanAlgebra α
inst✝ : Fintype α
s : Finset α
hs : (↑s).Intersecting
⊢ 2 * s.card ≤ Fintype.card α
state_after: no goals

tactic: refine (s.disjUnion _ hs.disjoint_map_compl).card_le_univ.trans_eq' ?_
state_before: α : Type u_1
inst✝¹ : BooleanAlgebra α
inst✝ : Fintype α
s : Finset α
hs : (↑s).Intersecting
⊢ 2 * s.card ≤ Fintype.card α
state_after: α : Type u_1
inst✝¹ : BooleanAlgebra α
inst✝ : Fintype α
s : Finset α
hs : (↑s).Intersecting
⊢ 2 * s.card = (s.disjUnion (map { toFun := compl, inj' := ⋯ } s) ⋯).card

tactic: rw [Nat.two_mul, card_disjUnion, card_map]
state_before: α : Type u_1
inst✝¹ : BooleanAlgebra α
inst✝ : Fintype α
s : Finset α
hs : (↑s).Intersecting
⊢ 2 * s.card = (s.disjUnion (map { toFun := compl, inj' := ⋯ } s) ⋯).card
state_after: no goals
Theorem: Memℓp.all
File: Mathlib/Analysis/NormedSpace/LpEquiv.lean

tactic: rcases p.trichotomy with (rfl | rfl | _h)
state_before: α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
p : ℝ≥0∞
inst✝ : Finite α
f : (i : α) → E i
⊢ Memℓp f p
state_after: case inl
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
inst✝ : Finite α
f : (i : α) → E i
⊢ Memℓp f 0

case inr.inl
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
inst✝ : Finite α
f : (i : α) → E i
⊢ Memℓp f ⊤

case inr.inr
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
p : ℝ≥0∞
inst✝ : Finite α
f : (i : α) → E i
_h : 0 < p.toReal
⊢ Memℓp f p

tactic: exact memℓp_zero_iff.mpr { i : α | f i ≠ 0 }.toFinite
state_before: case inl
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
inst✝ : Finite α
f : (i : α) → E i
⊢ Memℓp f 0
state_after: no goals

tactic: exact memℓp_infty_iff.mpr (Set.Finite.bddAbove (Set.range fun i : α ↦ ‖f i‖).toFinite)
state_before: case inr.inl
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
inst✝ : Finite α
f : (i : α) → E i
⊢ Memℓp f ⊤
state_after: no goals

tactic: cases nonempty_fintype α
state_before: case inr.inr
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
p : ℝ≥0∞
inst✝ : Finite α
f : (i : α) → E i
_h : 0 < p.toReal
⊢ Memℓp f p
state_after: case inr.inr.intro
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
p : ℝ≥0∞
inst✝ : Finite α
f : (i : α) → E i
_h : 0 < p.toReal
val✝ : Fintype α
⊢ Memℓp f p

tactic: exact memℓp_gen ⟨Finset.univ.sum _, hasSum_fintype _⟩
state_before: case inr.inr.intro
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
p : ℝ≥0∞
inst✝ : Finite α
f : (i : α) → E i
_h : 0 < p.toReal
val✝ : Fintype α
⊢ Memℓp f p
state_after: no goals
Theorem: RingSeminorm.ne_zero_iff
File: Mathlib/Analysis/Normed/Ring/Seminorm.lean

tactic: simp [eq_zero_iff]
state_before: F : Type u_1
R : Type u_2
S : Type u_3
x y : R
r : ℝ
inst✝ : NonUnitalRing R
p : RingSeminorm R
⊢ p ≠ 0 ↔ ∃ x, p x ≠ 0
state_after: no goals
Theorem: MeasureTheory.continuous_diracProbaEquivSymm
File: Mathlib/MeasureTheory/Measure/DiracProba.lean

tactic: apply continuous_iff_continuousAt.mpr
state_before: X : Type u_1
inst✝⁴ : MeasurableSpace X
inst✝³ : TopologicalSpace X
inst✝² : OpensMeasurableSpace X
inst✝¹ : T0Space X
inst✝ : CompletelyRegularSpace X
⊢ Continuous ⇑diracProbaEquiv.symm
state_after: X : Type u_1
inst✝⁴ : MeasurableSpace X
inst✝³ : TopologicalSpace X
inst✝² : OpensMeasurableSpace X
inst✝¹ : T0Space X
inst✝ : CompletelyRegularSpace X
⊢ ∀ (x : ↑(range diracProba)), ContinuousAt (⇑diracProbaEquiv.symm) x

tactic: intro μ
state_before: X : Type u_1
inst✝⁴ : MeasurableSpace X
inst✝³ : TopologicalSpace X
inst✝² : OpensMeasurableSpace X
inst✝¹ : T0Space X
inst✝ : CompletelyRegularSpace X
⊢ ∀ (x : ↑(range diracProba)), ContinuousAt (⇑diracProbaEquiv.symm) x
state_after: X : Type u_1
inst✝⁴ : MeasurableSpace X
inst✝³ : TopologicalSpace X
inst✝² : OpensMeasurableSpace X
inst✝¹ : T0Space X
inst✝ : CompletelyRegularSpace X
μ : ↑(range diracProba)
⊢ ContinuousAt (⇑diracProbaEquiv.symm) μ

tactic: apply continuousAt_of_tendsto_nhds (y := diracProbaInverse μ)
state_before: X : Type u_1
inst✝⁴ : MeasurableSpace X
inst✝³ : TopologicalSpace X
inst✝² : OpensMeasurableSpace X
inst✝¹ : T0Space X
inst✝ : CompletelyRegularSpace X
μ : ↑(range diracProba)
⊢ ContinuousAt (⇑diracProbaEquiv.symm) μ
state_after: X : Type u_1
inst✝⁴ : MeasurableSpace X
inst✝³ : TopologicalSpace X
inst✝² : OpensMeasurableSpace X
inst✝¹ : T0Space X
inst✝ : CompletelyRegularSpace X
μ : ↑(range diracProba)
⊢ Tendsto (⇑diracProbaEquiv.symm) (𝓝 μ) (𝓝 (diracProbaInverse μ))

tactic: exact (tendsto_diracProbaEquivSymm_iff_tendsto _).mpr fun _ mem_nhd ↦ mem_nhd
state_before: X : Type u_1
inst✝⁴ : MeasurableSpace X
inst✝³ : TopologicalSpace X
inst✝² : OpensMeasurableSpace X
inst✝¹ : T0Space X
inst✝ : CompletelyRegularSpace X
μ : ↑(range diracProba)
⊢ Tendsto (⇑diracProbaEquiv.symm) (𝓝 μ) (𝓝 (diracProbaInverse μ))
state_after: no goals
Theorem: QuadraticForm.associated_left_inverse
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

tactic: rw [associated_toQuadraticForm, ← h.eq, RingHom.id_apply, ← two_mul, ← mul_assoc,
  invOf_mul_self, one_mul]
state_before: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : CommSemiring S
inst✝¹ : Algebra S R
inst✝ : Invertible 2
B₁ : BilinForm R M
Q : QuadraticForm R M
h : LinearMap.IsSymm B₁
x y : M
⊢ (((associatedHom S) B₁.toQuadraticForm) x) y = (B₁ x) y
state_after: no goals
Theorem: sign_intCast
File: Mathlib/Data/Sign.lean

tactic: simp only [sign_apply, Int.cast_pos, Int.cast_lt_zero]
state_before: α✝ : Type u_1
α : Type u_2
inst✝² : OrderedRing α
inst✝¹ : Nontrivial α
inst✝ : DecidableRel fun x x_1 => x < x_1
n : ℤ
⊢ sign ↑n = sign n
state_after: no goals
Theorem: Subgroup.smul_apply_eq_smul_apply_inv_smul
File: Mathlib/GroupTheory/Complement.lean

tactic: rw [smul_toEquiv, smul_inv_smul]
state_before: G : Type u_1
inst✝³ : Group G
H K : Subgroup G
S T✝ : Set G
F : Type u_2
inst✝² : Group F
inst✝¹ : MulAction F G
inst✝ : QuotientAction F H
f : F
T : ↑(leftTransversals ↑H)
q : G ⧸ H
⊢ ↑((toEquiv ⋯) q) = f • ↑((toEquiv ⋯) (f⁻¹ • q))
state_after: no goals
Theorem: MeasureTheory.hausdorffMeasure_real
File: Mathlib/MeasureTheory/Measure/Hausdorff.lean

tactic: rw [← (volume_preserving_funUnique Unit ℝ).map_eq,
  ← (hausdorffMeasure_measurePreserving_funUnique Unit ℝ 1).map_eq,
  ← hausdorffMeasure_pi_real, Fintype.card_unit, Nat.cast_one]
state_before: ι : Type u_1
X : Type u_2
Y : Type u_3
inst✝⁵ : EMetricSpace X
inst✝⁴ : EMetricSpace Y
inst✝³ : MeasurableSpace X
inst✝² : BorelSpace X
inst✝¹ : MeasurableSpace Y
inst✝ : BorelSpace Y
⊢ μH[1] = volume
state_after: no goals
Theorem: Function.Involutive.ite_not
File: Mathlib/Logic/Function/Basic.lean

tactic: rw [apply_ite f, h, ite_not]
state_before: α : Sort u
f : α → α
h : Involutive f
P : Prop
inst✝ : Decidable P
x : α
⊢ f (if P then x else f x) = if ¬P then x else f x
state_after: no goals
Theorem: OpenEmbedding.open_iff_preimage_open
File: Mathlib/Topology/Maps.lean

tactic: rw [hf.open_iff_image_open, image_preimage_eq_inter_range, inter_eq_self_of_subset_left hs]
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
ι : Type u_4
f : X → Y
g : Y → Z
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
hf : OpenEmbedding f
s : Set Y
hs : s ⊆ range f
⊢ IsOpen s ↔ IsOpen (f ⁻¹' s)
state_after: no goals
Theorem: ENNReal.biSup_add'
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: haveI : Nonempty { i // p i } := nonempty_subtype.2 h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p✝ q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
p : ι → Prop
h : ∃ i, p i
f : ι → ℝ≥0∞
⊢ (⨆ i, ⨆ (_ : p i), f i) + a = ⨆ i, ⨆ (_ : p i), f i + a
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p✝ q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
p : ι → Prop
h : ∃ i, p i
f : ι → ℝ≥0∞
this : Nonempty { i // p i }
⊢ (⨆ i, ⨆ (_ : p i), f i) + a = ⨆ i, ⨆ (_ : p i), f i + a

tactic: simp only [iSup_subtype', iSup_add]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p✝ q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
p : ι → Prop
h : ∃ i, p i
f : ι → ℝ≥0∞
this : Nonempty { i // p i }
⊢ (⨆ i, ⨆ (_ : p i), f i) + a = ⨆ i, ⨆ (_ : p i), f i + a
state_after: no goals
Theorem: cfcₙ_smul_id
File: Mathlib/Topology/ContinuousFunction/NonUnitalFunctionalCalculus.lean

tactic: rw [cfcₙ_smul s _ a, cfcₙ_id' R a]
state_before: R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁷ : CommSemiring R
inst✝¹⁶ : Nontrivial R
inst✝¹⁵ : StarRing R
inst✝¹⁴ : MetricSpace R
inst✝¹³ : TopologicalSemiring R
inst✝¹² : ContinuousStar R
inst✝¹¹ : NonUnitalRing A
inst✝¹⁰ : StarRing A
inst✝⁹ : TopologicalSpace A
inst✝⁸ : Module R A
inst✝⁷ : IsScalarTower R A A
inst✝⁶ : SMulCommClass R A A
inst✝⁵ : NonUnitalContinuousFunctionalCalculus R p
f g : R → R
a✝ : A
hf : autoParam (ContinuousOn f (σₙ R a✝)) _auto✝
hf0 : autoParam (f 0 = 0) _auto✝
hg : autoParam (ContinuousOn g (σₙ R a✝)) _auto✝
hg0 : autoParam (g 0 = 0) _auto✝
ha✝ : autoParam (p a✝) _auto✝
S : Type u_3
inst✝⁴ : SMulZeroClass S R
inst✝³ : ContinuousConstSMul S R
inst✝² : SMulZeroClass S A
inst✝¹ : IsScalarTower S R A
inst✝ : IsScalarTower S R (R → R)
s : S
a : A
ha : autoParam (p a) _auto✝
⊢ cfcₙ (fun x => s • x) a = s • a
state_after: no goals
Theorem: CategoryTheory.Iso.map_inv_hom_id_eval_app
File: Mathlib/CategoryTheory/GradedObject.lean

tactic: rw [← NatTrans.comp_app, ← F.map_comp, inv_hom_id_eval,
  Functor.map_id, NatTrans.id_app]
state_before: C : Type u_1
D : Type u_2
E : Type u_3
J : Type u_4
inst✝² : Category.{u_5, u_1} C
inst✝¹ : Category.{u_7, u_2} D
inst✝ : Category.{u_6, u_3} E
X Y✝ : GradedObject J C
e : X ≅ Y✝
F : C ⥤ D ⥤ E
j : J
Y : D
⊢ (F.map (e.inv j)).app Y ≫ (F.map (e.hom j)).app Y = 𝟙 ((F.obj (Y✝ j)).obj Y)
state_after: no goals
Theorem: UniformFun.uniformContinuous_toFun
File: Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean

tactic: rw [uniformContinuous_pi]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
inst✝ : UniformSpace β
⊢ UniformContinuous ⇑toFun
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
inst✝ : UniformSpace β
⊢ ∀ (i : α), UniformContinuous fun x => toFun x i

tactic: intro x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
inst✝ : UniformSpace β
⊢ ∀ (i : α), UniformContinuous fun x => toFun x i
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x✝ : α
p : Filter ι
g : ι → α
inst✝ : UniformSpace β
x : α
⊢ UniformContinuous fun x_1 => toFun x_1 x

tactic: exact uniformContinuous_eval β x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x✝ : α
p : Filter ι
g : ι → α
inst✝ : UniformSpace β
x : α
⊢ UniformContinuous fun x_1 => toFun x_1 x
state_after: no goals
Theorem: PNat.Coprime.mul
File: Mathlib/Data/PNat/Prime.lean

tactic: repeat rw [← coprime_coe]
state_before: k m n : ℕ+
⊢ m.Coprime k → n.Coprime k → (m * n).Coprime k
state_after: k m n : ℕ+
⊢ (↑m).Coprime ↑k → (↑n).Coprime ↑k → (↑(m * n)).Coprime ↑k

tactic: rw [mul_coe]
state_before: k m n : ℕ+
⊢ (↑m).Coprime ↑k → (↑n).Coprime ↑k → (↑(m * n)).Coprime ↑k
state_after: k m n : ℕ+
⊢ (↑m).Coprime ↑k → (↑n).Coprime ↑k → (↑m * ↑n).Coprime ↑k

tactic: apply Nat.Coprime.mul
state_before: k m n : ℕ+
⊢ (↑m).Coprime ↑k → (↑n).Coprime ↑k → (↑m * ↑n).Coprime ↑k
state_after: no goals

tactic: rw [← coprime_coe]
state_before: k m n : ℕ+
⊢ (↑m).Coprime ↑k → (↑n).Coprime ↑k → (m * n).Coprime k
state_after: k m n : ℕ+
⊢ (↑m).Coprime ↑k → (↑n).Coprime ↑k → (↑(m * n)).Coprime ↑k
Theorem: Nat.Primrec'.sub
File: Mathlib/Computability/Primrec.lean

tactic: have : @Primrec' 2 fun v ↦ (fun a b ↦ b - a) v.head v.tail.head := by
  refine (prec head (pred.comp₁ _ (tail head))).of_eq fun v => ?_
  simp; induction v.head <;> simp [*, Nat.sub_add_eq]
state_before: ⊢ Primrec' fun v => v.head - v.tail.head
state_after: this : Primrec' fun v => (fun a b => b - a) v.head v.tail.head
⊢ Primrec' fun v => v.head - v.tail.head

tactic: simpa using comp₂ (fun a b => b - a) this (tail head) head
state_before: this : Primrec' fun v => (fun a b => b - a) v.head v.tail.head
⊢ Primrec' fun v => v.head - v.tail.head
state_after: no goals

tactic: refine (prec head (pred.comp₁ _ (tail head))).of_eq fun v => ?_
state_before: ⊢ Primrec' fun v => (fun a b => b - a) v.head v.tail.head
state_after: v : Vector ℕ (Nat.succ 0 + 1)
⊢ Nat.rec v.tail.head (fun y IH => (y ::ᵥ IH ::ᵥ v.tail).tail.head.pred) v.head = (fun a b => b - a) v.head v.tail.head

tactic: simp
state_before: v : Vector ℕ (Nat.succ 0 + 1)
⊢ Nat.rec v.tail.head (fun y IH => (y ::ᵥ IH ::ᵥ v.tail).tail.head.pred) v.head = (fun a b => b - a) v.head v.tail.head
state_after: v : Vector ℕ (Nat.succ 0 + 1)
⊢ Nat.rec v.tail.head (fun y IH => IH - 1) v.head = v.tail.head - v.head

tactic: induction v.head <;> simp [*, Nat.sub_add_eq]
state_before: v : Vector ℕ (Nat.succ 0 + 1)
⊢ Nat.rec v.tail.head (fun y IH => IH - 1) v.head = v.tail.head - v.head
state_after: no goals
Theorem: CategoryTheory.ComposableArrows.mk₂_surjective
File: Mathlib/CategoryTheory/ComposableArrows.lean

tactic: simp
state_before: C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X : ComposableArrows C 2
⊢ X.map' 0 1 ⋯ ⋯ = eqToHom ⋯ ≫ (mk₂ (X.map' 0 1 ⋯ ⋯) (X.map' 1 2 ⋯ ⋯)).map' 0 1 ⋯ ⋯ ≫ eqToHom ⋯
state_after: no goals

tactic: simp
state_before: C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X : ComposableArrows C 2
⊢ X.map' 1 2 ⋯ ⋯ = eqToHom ⋯ ≫ (mk₂ (X.map' 0 1 ⋯ ⋯) (X.map' 1 2 ⋯ ⋯)).map' 1 2 ⋯ ⋯ ≫ eqToHom ⋯
state_after: no goals
Theorem: Finset.inter_nonempty_of_card_lt_card_add_card
File: Mathlib/Data/Finset/Card.lean

tactic: contrapose! hstu
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
hts : t ⊆ s
hus : u ⊆ s
hstu : s.card < t.card + u.card
⊢ (t ∩ u).Nonempty
state_after: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
hts : t ⊆ s
hus : u ⊆ s
hstu : ¬(t ∩ u).Nonempty
⊢ t.card + u.card ≤ s.card

tactic: calc
  _ = (t ∪ u).card := by simp [← card_union_add_card_inter, not_nonempty_iff_eq_empty.1 hstu]
  _ ≤ s.card := by gcongr; exact union_subset hts hus
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
hts : t ⊆ s
hus : u ⊆ s
hstu : ¬(t ∩ u).Nonempty
⊢ t.card + u.card ≤ s.card
state_after: no goals

tactic: simp [← card_union_add_card_inter, not_nonempty_iff_eq_empty.1 hstu]
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
hts : t ⊆ s
hus : u ⊆ s
hstu : ¬(t ∩ u).Nonempty
⊢ t.card + u.card = (t ∪ u).card
state_after: no goals

tactic: gcongr
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
hts : t ⊆ s
hus : u ⊆ s
hstu : ¬(t ∩ u).Nonempty
⊢ (t ∪ u).card ≤ s.card
state_after: case a
α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
hts : t ⊆ s
hus : u ⊆ s
hstu : ¬(t ∩ u).Nonempty
⊢ t ∪ u ⊆ s

tactic: exact union_subset hts hus
state_before: case a
α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
hts : t ⊆ s
hus : u ⊆ s
hstu : ¬(t ∩ u).Nonempty
⊢ t ∪ u ⊆ s
state_after: no goals
Theorem: Polynomial.natSepDegree_smul_nonzero
File: Mathlib/FieldTheory/SeparableDegree.lean

tactic: simp only [natSepDegree_eq_of_isAlgClosed (AlgebraicClosure F), aroots_smul_nonzero _ hx]
state_before: F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
f : F[X]
x : F
hx : x ≠ 0
⊢ (x • f).natSepDegree = f.natSepDegree
state_after: no goals
Theorem: Int.isUnit_ne_iff_eq_neg
File: Mathlib/Algebra/Group/Int.lean

tactic: obtain rfl | rfl := isUnit_eq_one_or hu <;> obtain rfl | rfl := isUnit_eq_one_or hv <;> decide
state_before: u v : ℤ
hu : IsUnit u
hv : IsUnit v
⊢ u ≠ v ↔ u = -v
state_after: no goals
Theorem: Irreducible.separable
File: Mathlib/FieldTheory/Separable.lean

tactic: rw [separable_iff_derivative_ne_zero hf, Ne, ← degree_eq_bot, degree_derivative_eq]
state_before: F : Type u
inst✝² : Field F
K : Type v
inst✝¹ : Field K
inst✝ : CharZero F
f : F[X]
hf : Irreducible f
⊢ f.Separable
state_after: F : Type u
inst✝² : Field F
K : Type v
inst✝¹ : Field K
inst✝ : CharZero F
f : F[X]
hf : Irreducible f
⊢ ¬↑(f.natDegree - 1) = ⊥

case hp
F : Type u
inst✝² : Field F
K : Type v
inst✝¹ : Field K
inst✝ : CharZero F
f : F[X]
hf : Irreducible f
⊢ 0 < f.natDegree

tactic: rw [pos_iff_ne_zero, Ne, natDegree_eq_zero_iff_degree_le_zero, degree_le_zero_iff]
state_before: case hp
F : Type u
inst✝² : Field F
K : Type v
inst✝¹ : Field K
inst✝ : CharZero F
f : F[X]
hf : Irreducible f
⊢ 0 < f.natDegree
state_after: case hp
F : Type u
inst✝² : Field F
K : Type v
inst✝¹ : Field K
inst✝ : CharZero F
f : F[X]
hf : Irreducible f
⊢ ¬f = C (f.coeff 0)

tactic: refine fun hf1 => hf.not_unit ?_
state_before: case hp
F : Type u
inst✝² : Field F
K : Type v
inst✝¹ : Field K
inst✝ : CharZero F
f : F[X]
hf : Irreducible f
⊢ ¬f = C (f.coeff 0)
state_after: case hp
F : Type u
inst✝² : Field F
K : Type v
inst✝¹ : Field K
inst✝ : CharZero F
f : F[X]
hf : Irreducible f
hf1 : f = C (f.coeff 0)
⊢ IsUnit f

tactic: rw [hf1, isUnit_C, isUnit_iff_ne_zero]
state_before: case hp
F : Type u
inst✝² : Field F
K : Type v
inst✝¹ : Field K
inst✝ : CharZero F
f : F[X]
hf : Irreducible f
hf1 : f = C (f.coeff 0)
⊢ IsUnit f
state_after: case hp
F : Type u
inst✝² : Field F
K : Type v
inst✝¹ : Field K
inst✝ : CharZero F
f : F[X]
hf : Irreducible f
hf1 : f = C (f.coeff 0)
⊢ f.coeff 0 ≠ 0

tactic: intro hf2
state_before: case hp
F : Type u
inst✝² : Field F
K : Type v
inst✝¹ : Field K
inst✝ : CharZero F
f : F[X]
hf : Irreducible f
hf1 : f = C (f.coeff 0)
⊢ f.coeff 0 ≠ 0
state_after: case hp
F : Type u
inst✝² : Field F
K : Type v
inst✝¹ : Field K
inst✝ : CharZero F
f : F[X]
hf : Irreducible f
hf1 : f = C (f.coeff 0)
hf2 : f.coeff 0 = 0
⊢ False

tactic: rw [hf2, C_0] at hf1
state_before: case hp
F : Type u
inst✝² : Field F
K : Type v
inst✝¹ : Field K
inst✝ : CharZero F
f : F[X]
hf : Irreducible f
hf1 : f = C (f.coeff 0)
hf2 : f.coeff 0 = 0
⊢ False
state_after: case hp
F : Type u
inst✝² : Field F
K : Type v
inst✝¹ : Field K
inst✝ : CharZero F
f : F[X]
hf : Irreducible f
hf1 : f = 0
hf2 : f.coeff 0 = 0
⊢ False

tactic: exact absurd hf1 hf.ne_zero
state_before: case hp
F : Type u
inst✝² : Field F
K : Type v
inst✝¹ : Field K
inst✝ : CharZero F
f : F[X]
hf : Irreducible f
hf1 : f = 0
hf2 : f.coeff 0 = 0
⊢ False
state_after: no goals

tactic: rintro ⟨⟩
state_before: F : Type u
inst✝² : Field F
K : Type v
inst✝¹ : Field K
inst✝ : CharZero F
f : F[X]
hf : Irreducible f
⊢ ¬↑(f.natDegree - 1) = ⊥
state_after: no goals
Theorem: IsLocalization.integerNormalization_coeff
File: Mathlib/RingTheory/Localization/Integral.lean

tactic: simp (config := { contextual := true }) [integerNormalization, coeff_monomial,
  coeffIntegerNormalization_of_not_mem_support]
state_before: R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommRing P
inst✝ : IsLocalization M S
p : S[X]
i : ℕ
⊢ (integerNormalization M p).coeff i = coeffIntegerNormalization M p i
state_after: no goals