tasksource/leandojo huggingface dataset:
Theorem: Polynomial.X_pow_sub_one_eq_prod
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean

tactic: rw [nthRootsFinset, ← Multiset.toFinset_eq (IsPrimitiveRoot.nthRoots_nodup h)]
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
ζ : R
n : ℕ
hpos : 0 < n
h : IsPrimitiveRoot ζ n
⊢ X ^ n - 1 = ∏ ζ in nthRootsFinset n R, (X - ↑C ζ)

tactic: simp only [Finset.prod_mk, RingHom.map_one]
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
ζ : R
n : ℕ
hpos : 0 < n
h : IsPrimitiveRoot ζ n
⊢ X ^ n - 1 = ∏ ζ in { val := nthRoots n 1, nodup := (_ : Multiset.Nodup (nthRoots n 1)) }, (X - ↑C ζ)

tactic: rw [nthRoots]
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
ζ : R
n : ℕ
hpos : 0 < n
h : IsPrimitiveRoot ζ n
⊢ X ^ n - 1 = Multiset.prod (Multiset.map (fun x => X - ↑C x) (nthRoots n 1))

tactic: have hmonic : (X ^ n - C (1 : R)).Monic := monic_X_pow_sub_C (1 : R) (ne_of_lt hpos).symm
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
ζ : R
n : ℕ
hpos : 0 < n
h : IsPrimitiveRoot ζ n
⊢ X ^ n - 1 = Multiset.prod (Multiset.map (fun x => X - ↑C x) (roots (X ^ n - ↑C 1)))

tactic: symm
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
ζ : R
n : ℕ
hpos : 0 < n
h : IsPrimitiveRoot ζ n
hmonic : Monic (X ^ n - ↑C 1)
⊢ X ^ n - 1 = Multiset.prod (Multiset.map (fun x => X - ↑C x) (roots (X ^ n - ↑C 1)))

tactic: apply prod_multiset_X_sub_C_of_monic_of_roots_card_eq hmonic
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
ζ : R
n : ℕ
hpos : 0 < n
h : IsPrimitiveRoot ζ n
hmonic : Monic (X ^ n - ↑C 1)
⊢ Multiset.prod (Multiset.map (fun x => X - ↑C x) (roots (X ^ n - ↑C 1))) = X ^ n - 1

tactic: rw [@natDegree_X_pow_sub_C R _ _ n 1, ← nthRoots]
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
ζ : R
n : ℕ
hpos : 0 < n
h : IsPrimitiveRoot ζ n
hmonic : Monic (X ^ n - ↑C 1)
⊢ ↑Multiset.card (roots (X ^ n - ↑C 1)) = natDegree (X ^ n - ↑C 1)

tactic: exact IsPrimitiveRoot.card_nthRoots h
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
ζ : R
n : ℕ
hpos : 0 < n
h : IsPrimitiveRoot ζ n
hmonic : Monic (X ^ n - ↑C 1)
⊢ ↑Multiset.card (nthRoots n 1) = n
Theorem: Submodule.torsionBySet_univ
File: Mathlib/Algebra/Module/Torsion.lean

tactic: rw [eq_bot_iff, ← torsionBy_one, ← torsionBySet_singleton_eq]
state_before: R : Type u_2
M : Type u_1
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
s : Set R
a : R
⊢ torsionBySet R M Set.univ = ⊥

tactic: exact torsionBySet_le_torsionBySet_of_subset fun _ _ => trivial
state_before: R : Type u_2
M : Type u_1
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
s : Set R
a : R
⊢ torsionBySet R M Set.univ ≤ torsionBySet R M {1}
Theorem: mem_nhdsSet_iff_forall
File: Mathlib/Topology/NhdsSet.lean

tactic: simp_rw [nhdsSet, Filter.mem_sSup, ball_image_iff]
state_before: α : Type u_1
β : Type ?u.6768
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t s₁ s₂ t₁ t₂ : Set α
x : α
⊢ s ∈ 𝓝ˢ t ↔ ∀ (x : α), x ∈ t → s ∈ 𝓝 x
Theorem: Submodule.fg_restrictScalars
File: Mathlib/RingTheory/Finiteness.lean

tactic: obtain ⟨X, rfl⟩ := hfin
state_before: R✝ : Type ?u.286765
M✝ : Type ?u.286768
inst✝¹¹ : Semiring R✝
inst✝¹⁰ : AddCommMonoid M✝
inst✝⁹ : Module R✝ M✝
P : Type ?u.286804
inst✝⁸ : AddCommMonoid P
inst✝⁷ : Module R✝ P
f : M✝ →ₗ[R✝] P
R : Type u_1
S : Type u_2
M : Type u_3
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring S
inst✝⁴ : Algebra R S
inst✝³ : AddCommGroup M
inst✝² : Module S M
inst✝¹ : Module R M
inst✝ : IsScalarTower R S M
N : Submodule S M
hfin : FG N
h : Surjective ↑(algebraMap R S)
⊢ FG (restrictScalars R N)

tactic: use X
state_before: case intro
R✝ : Type ?u.286765
M✝ : Type ?u.286768
inst✝¹¹ : Semiring R✝
inst✝¹⁰ : AddCommMonoid M✝
inst✝⁹ : Module R✝ M✝
P : Type ?u.286804
inst✝⁸ : AddCommMonoid P
inst✝⁷ : Module R✝ P
f : M✝ →ₗ[R✝] P
R : Type u_1
S : Type u_2
M : Type u_3
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring S
inst✝⁴ : Algebra R S
inst✝³ : AddCommGroup M
inst✝² : Module S M
inst✝¹ : Module R M
inst✝ : IsScalarTower R S M
h : Surjective ↑(algebraMap R S)
X : Finset M
⊢ FG (restrictScalars R (span S ↑X))

tactic: exact (Submodule.restrictScalars_span R S h (X : Set M)).symm
state_before: case intro
R✝ : Type ?u.286765
M✝ : Type ?u.286768
inst✝¹¹ : Semiring R✝
inst✝¹⁰ : AddCommMonoid M✝
inst✝⁹ : Module R✝ M✝
P : Type ?u.286804
inst✝⁸ : AddCommMonoid P
inst✝⁷ : Module R✝ P
f : M✝ →ₗ[R✝] P
R : Type u_1
S : Type u_2
M : Type u_3
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring S
inst✝⁴ : Algebra R S
inst✝³ : AddCommGroup M
inst✝² : Module S M
inst✝¹ : Module R M
inst✝ : IsScalarTower R S M
h : Surjective ↑(algebraMap R S)
X : Finset M
⊢ span R ↑X = restrictScalars R (span S ↑X)
Theorem: Finset.range_orderEmbOfFin
File: Mathlib/Data/Finset/Sort.lean

tactic: simp only [orderEmbOfFin, Set.range_comp ((↑) : _ → α) (s.orderIsoOfFin h),
RelEmbedding.coe_trans, Set.image_univ, Finset.orderEmbOfFin, RelIso.range_eq,
  OrderEmbedding.subtype_apply, OrderIso.coe_toOrderEmbedding, eq_self_iff_true,
  Subtype.range_coe_subtype, Finset.setOf_mem, Finset.coe_inj]
state_before: α : Type u_1
β : Type ?u.39891
inst✝ : LinearOrder α
s : Finset α
k : ℕ
h : card s = k
⊢ Set.range ↑(orderEmbOfFin s h) = ↑s
Theorem: Set.preimage_const_add_uIcc
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp only [← Icc_min_max, preimage_const_add_Icc, min_sub_sub_right, max_sub_sub_right]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
⊢ (fun x => a + x) ⁻¹' [[b, c]] = [[b - a, c - a]]
Theorem: discreteTopology_of_open_singleton_one
File: Mathlib/Topology/Algebra/Group/Basic.lean

tactic: rw [← singletons_open_iff_discrete]
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : ContinuousMul G
h : IsOpen {1}
⊢ DiscreteTopology G

tactic: intro g
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : ContinuousMul G
h : IsOpen {1}
⊢ ∀ (a : G), IsOpen {a}

tactic: suffices {g} = (fun x : G => g⁻¹ * x) ⁻¹' {1} by
  rw [this]
  exact (continuous_mul_left g⁻¹).isOpen_preimage _ h
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : ContinuousMul G
h : IsOpen {1}
g : G
⊢ IsOpen {g}

tactic: simp only [mul_one, Set.preimage_mul_left_singleton, eq_self_iff_true, inv_inv,
  Set.singleton_eq_singleton_iff]
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : ContinuousMul G
h : IsOpen {1}
g : G
⊢ {g} = (fun x => g⁻¹ * x) ⁻¹' {1}

tactic: rw [this]
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : ContinuousMul G
h : IsOpen {1}
g : G
this : {g} = (fun x => g⁻¹ * x) ⁻¹' {1}
⊢ IsOpen {g}

tactic: exact (continuous_mul_left g⁻¹).isOpen_preimage _ h
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : ContinuousMul G
h : IsOpen {1}
g : G
this : {g} = (fun x => g⁻¹ * x) ⁻¹' {1}
⊢ IsOpen ((fun x => g⁻¹ * x) ⁻¹' {1})
Theorem: Finset.insert_inter_distrib
File: Mathlib/Data/Finset/Basic.lean

tactic: simp_rw [insert_eq, union_distrib_left]
state_before: α : Type u_1
β : Type ?u.263829
γ : Type ?u.263832
inst✝ : DecidableEq α
s✝ t✝ u v : Finset α
a✝ b : α
s t : Finset α
a : α
⊢ insert a (s ∩ t) = insert a s ∩ insert a t
Theorem: Metric.secondCountable_of_almost_dense_set
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: refine' EMetric.secondCountable_of_almost_dense_set fun ε ε0 => _
state_before: α : Type u
β : Type v
X : Type ?u.439085
ι : Type ?u.439088
inst✝ : PseudoMetricSpace α
H : ∀ (ε : ℝ), ε > 0 → ∃ s, Set.Countable s ∧ ∀ (x : α), ∃ y, y ∈ s ∧ dist x y ≤ ε
⊢ SecondCountableTopology α

tactic: rcases ENNReal.lt_iff_exists_nnreal_btwn.1 ε0 with ⟨ε', ε'0, ε'ε⟩
state_before: α : Type u
β : Type v
X : Type ?u.439085
ι : Type ?u.439088
inst✝ : PseudoMetricSpace α
H : ∀ (ε : ℝ), ε > 0 → ∃ s, Set.Countable s ∧ ∀ (x : α), ∃ y, y ∈ s ∧ dist x y ≤ ε
ε : ℝ≥0∞
ε0 : ε > 0
⊢ ∃ t, Set.Countable t ∧ (⋃ (x : α) (_ : x ∈ t), EMetric.closedBall x ε) = univ

tactic: choose s hsc y hys hyx using H ε' (by exact_mod_cast ε'0)
state_before: case intro.intro
α : Type u
β : Type v
X : Type ?u.439085
ι : Type ?u.439088
inst✝ : PseudoMetricSpace α
H : ∀ (ε : ℝ), ε > 0 → ∃ s, Set.Countable s ∧ ∀ (x : α), ∃ y, y ∈ s ∧ dist x y ≤ ε
ε : ℝ≥0∞
ε0 : ε > 0
ε' : ℝ≥0
ε'0 : 0 < ↑ε'
ε'ε : ↑ε' < ε
⊢ ∃ t, Set.Countable t ∧ (⋃ (x : α) (_ : x ∈ t), EMetric.closedBall x ε) = univ

tactic: refine' ⟨s, hsc, iUnion₂_eq_univ_iff.2 fun x => ⟨y x, hys _, le_trans _ ε'ε.le⟩⟩
state_before: case intro.intro
α : Type u
β : Type v
X : Type ?u.439085
ι : Type ?u.439088
inst✝ : PseudoMetricSpace α
H : ∀ (ε : ℝ), ε > 0 → ∃ s, Set.Countable s ∧ ∀ (x : α), ∃ y, y ∈ s ∧ dist x y ≤ ε
ε : ℝ≥0∞
ε0 : ε > 0
ε' : ℝ≥0
ε'0 : 0 < ↑ε'
ε'ε : ↑ε' < ε
s : Set α
hsc : Set.Countable s
y : α → α
hys : ∀ (x : α), y x ∈ s
hyx : ∀ (x : α), dist x (y x) ≤ ↑ε'
⊢ ∃ t, Set.Countable t ∧ (⋃ (x : α) (_ : x ∈ t), EMetric.closedBall x ε) = univ

tactic: exact_mod_cast hyx x
state_before: case intro.intro
α : Type u
β : Type v
X : Type ?u.439085
ι : Type ?u.439088
inst✝ : PseudoMetricSpace α
H : ∀ (ε : ℝ), ε > 0 → ∃ s, Set.Countable s ∧ ∀ (x : α), ∃ y, y ∈ s ∧ dist x y ≤ ε
ε : ℝ≥0∞
ε0 : ε > 0
ε' : ℝ≥0
ε'0 : 0 < ↑ε'
ε'ε : ↑ε' < ε
s : Set α
hsc : Set.Countable s
y : α → α
hys : ∀ (x : α), y x ∈ s
hyx : ∀ (x : α), dist x (y x) ≤ ↑ε'
x : α
⊢ edist x (y x) ≤ ↑ε'

tactic: exact_mod_cast ε'0
state_before: α : Type u
β : Type v
X : Type ?u.439085
ι : Type ?u.439088
inst✝ : PseudoMetricSpace α
H : ∀ (ε : ℝ), ε > 0 → ∃ s, Set.Countable s ∧ ∀ (x : α), ∃ y, y ∈ s ∧ dist x y ≤ ε
ε : ℝ≥0∞
ε0 : ε > 0
ε' : ℝ≥0
ε'0 : 0 < ↑ε'
ε'ε : ↑ε' < ε
⊢ ↑ε' > 0
Theorem: Filter.disjoint_map
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [disjoint_iff, ← map_inf hm, map_eq_bot_iff]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.283383
ι : Sort x
m : α → β
hm : Injective m
f₁ f₂ : Filter α
⊢ Disjoint (map m f₁) (map m f₂) ↔ Disjoint f₁ f₂
Theorem: ENNReal.lintegral_Lp_add_le_of_le_one
File: Mathlib/MeasureTheory/Integral/MeanInequalities.lean

tactic: rcases eq_or_lt_of_le hp0 with (rfl | hp)
state_before: α : Type u_1
inst✝ : MeasurableSpace α
μ : MeasureTheory.Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f
hp0 : 0 ≤ p
hp1 : p ≤ 1
⊢ (∫⁻ (a : α), (f + g) a ^ p ∂μ) ^ (1 / p) ≤
    2 ^ (1 / p - 1) * ((∫⁻ (a : α), f a ^ p ∂μ) ^ (1 / p) + (∫⁻ (a : α), g a ^ p ∂μ) ^ (1 / p))

tactic: calc
  (∫⁻ a, (f + g) a ^ p ∂μ) ^ (1 / p) ≤ ((∫⁻ a, f a ^ p ∂μ) + ∫⁻ a, g a ^ p ∂μ) ^ (1 / p) := by
    apply rpow_le_rpow _ (div_nonneg zero_le_one hp0)
    rw [← lintegral_add_left' (hf.pow_const p)]
    exact lintegral_mono fun a => rpow_add_le_add_rpow _ _ hp0 hp1
  _ ≤ (2 : ℝ≥0∞) ^ (1 / p - 1) * ((∫⁻ a, f a ^ p ∂μ) ^ (1 / p) + (∫⁻ a, g a ^ p ∂μ) ^ (1 / p)) :=
    rpow_add_le_mul_rpow_add_rpow _ _ ((one_le_div hp).2 hp1)
state_before: case inr
α : Type u_1
inst✝ : MeasurableSpace α
μ : MeasureTheory.Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f
hp0 : 0 ≤ p
hp1 : p ≤ 1
hp : 0 < p
⊢ (∫⁻ (a : α), (f + g) a ^ p ∂μ) ^ (1 / p) ≤
    2 ^ (1 / p - 1) * ((∫⁻ (a : α), f a ^ p ∂μ) ^ (1 / p) + (∫⁻ (a : α), g a ^ p ∂μ) ^ (1 / p))

tactic: simp only [Pi.add_apply, rpow_zero, lintegral_one, _root_.div_zero, zero_sub]
state_before: case inl
α : Type u_1
inst✝ : MeasurableSpace α
μ : MeasureTheory.Measure α
f g : α → ℝ≥0∞
hf : AEMeasurable f
hp0 : 0 ≤ 0
hp1 : 0 ≤ 1
⊢ (∫⁻ (a : α), (f + g) a ^ 0 ∂μ) ^ (1 / 0) ≤
    2 ^ (1 / 0 - 1) * ((∫⁻ (a : α), f a ^ 0 ∂μ) ^ (1 / 0) + (∫⁻ (a : α), g a ^ 0 ∂μ) ^ (1 / 0))

tactic: norm_num
state_before: case inl
α : Type u_1
inst✝ : MeasurableSpace α
μ : MeasureTheory.Measure α
f g : α → ℝ≥0∞
hf : AEMeasurable f
hp0 : 0 ≤ 0
hp1 : 0 ≤ 1
⊢ 1 ≤ 2 ^ (-1) * (1 + 1)

tactic: rw [rpow_neg, rpow_one, ENNReal.inv_mul_cancel two_ne_zero two_ne_top]
state_before: case inl
α : Type u_1
inst✝ : MeasurableSpace α
μ : MeasureTheory.Measure α
f g : α → ℝ≥0∞
hf : AEMeasurable f
hp0 : 0 ≤ 0
hp1 : 0 ≤ 1
⊢ 1 ≤ 2 ^ (-1) * 2

tactic: apply rpow_le_rpow _ (div_nonneg zero_le_one hp0)
state_before: α : Type u_1
inst✝ : MeasurableSpace α
μ : MeasureTheory.Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f
hp0 : 0 ≤ p
hp1 : p ≤ 1
hp : 0 < p
⊢ (∫⁻ (a : α), (f + g) a ^ p ∂μ) ^ (1 / p) ≤ ((∫⁻ (a : α), f a ^ p ∂μ) + ∫⁻ (a : α), g a ^ p ∂μ) ^ (1 / p)

tactic: rw [← lintegral_add_left' (hf.pow_const p)]
state_before: α : Type u_1
inst✝ : MeasurableSpace α
μ : MeasureTheory.Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f
hp0 : 0 ≤ p
hp1 : p ≤ 1
hp : 0 < p
⊢ (∫⁻ (a : α), (f + g) a ^ p ∂μ) ≤ (∫⁻ (a : α), f a ^ p ∂μ) + ∫⁻ (a : α), g a ^ p ∂μ

tactic: exact lintegral_mono fun a => rpow_add_le_add_rpow _ _ hp0 hp1
state_before: α : Type u_1
inst✝ : MeasurableSpace α
μ : MeasureTheory.Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f
hp0 : 0 ≤ p
hp1 : p ≤ 1
hp : 0 < p
⊢ (∫⁻ (a : α), (f + g) a ^ p ∂μ) ≤ ∫⁻ (a : α), f a ^ p + g a ^ p ∂μ
Theorem: Homeomorph.toContinuousMap_comp_symm
File: Mathlib/Topology/ContinuousFunction/Basic.lean

tactic: rw [← coe_trans, symm_trans_self, coe_refl]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.70207
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : α ≃ₜ β
g : β ≃ₜ γ
⊢ ContinuousMap.comp (toContinuousMap f) (toContinuousMap (Homeomorph.symm f)) = ContinuousMap.id β
Theorem: Filter.EventuallyLE.mul_nonneg
File: Mathlib/Order/Filter/Basic.lean

tactic: filter_upwards [hf, hg] with x using _root_.mul_nonneg
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.214045
ι : Sort x
inst✝ : OrderedSemiring β
l : Filter α
f g : α → β
hf : 0 ≤ᶠ[l] f
hg : 0 ≤ᶠ[l] g
⊢ 0 ≤ᶠ[l] f * g
Theorem: Lagrange.nodal_eq_mul_nodal_erase
File: Mathlib/LinearAlgebra/Lagrange.lean

tactic: simp_rw [nodal, mul_prod_erase _ _ hi, Finset.mul_prod_erase _ (fun x => X - C (v x)) hi]
state_before: F : Type u_2
inst✝¹ : Field F
ι : Type u_1
s : Finset ι
v : ι → F
i : ι
r : ι → F
x : F
inst✝ : DecidableEq ι
hi : i ∈ s
⊢ nodal s v = (X - ↑C (v i)) * nodal (Finset.erase s i) v
Theorem: Set.injOn_insert
File: Mathlib/Data/Set/Function.lean

tactic: have : Disjoint s {a} := disjoint_iff_inf_le.mpr fun x ⟨hxs, (hxa : x = a)⟩ => has (hxa ▸ hxs)
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.28991
ι : Sort ?u.28994
π : α → Type ?u.28999
s✝ s₁ s₂ : Set α
t t₁ t₂ : Set β
p : Set γ
f✝ f₁ f₂ f₃ : α → β
g g₁ g₂ : β → γ
f' f₁' f₂' : β → α
g' : γ → β
a✝ : α
b : β
f : α → β
s : Set α
a : α
has : ¬a ∈ s
⊢ InjOn f (insert a s) ↔ InjOn f s ∧ ¬f a ∈ f '' s

tactic: rw [← union_singleton, injOn_union this]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.28991
ι : Sort ?u.28994
π : α → Type ?u.28999
s✝ s₁ s₂ : Set α
t t₁ t₂ : Set β
p : Set γ
f✝ f₁ f₂ f₃ : α → β
g g₁ g₂ : β → γ
f' f₁' f₂' : β → α
g' : γ → β
a✝ : α
b : β
f : α → β
s : Set α
a : α
has : ¬a ∈ s
this : Disjoint s {a}
⊢ InjOn f (insert a s) ↔ InjOn f s ∧ ¬f a ∈ f '' s

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.28991
ι : Sort ?u.28994
π : α → Type ?u.28999
s✝ s₁ s₂ : Set α
t t₁ t₂ : Set β
p : Set γ
f✝ f₁ f₂ f₃ : α → β
g g₁ g₂ : β → γ
f' f₁' f₂' : β → α
g' : γ → β
a✝ : α
b : β
f : α → β
s : Set α
a : α
has : ¬a ∈ s
this : Disjoint s {a}
⊢ (InjOn f s ∧ InjOn f {a} ∧ ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ {a} → f x ≠ f y) ↔ InjOn f s ∧ ¬f a ∈ f '' s
Theorem: Polynomial.dvd_iff_isRoot
File: Mathlib/Data/Polynomial/Div.lean

tactic: rwa [← dvd_iff_modByMonic_eq_zero (monic_X_sub_C _), modByMonic_X_sub_C_eq_C_eval, ← C_0,
  C_inj] at h
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : CommRing R
p q : R[X]
h : X - ↑C a ∣ p
⊢ IsRoot p a

tactic: rw [mul_divByMonic_eq_iff_isRoot.2 h]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : CommRing R
p q : R[X]
h : IsRoot p a
⊢ p = (X - ↑C a) * (p /ₘ (X - ↑C a))
Theorem: Metric.cthickening_union
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: simp_rw [cthickening, infEdist_union, inf_eq_min, min_le_iff, setOf_or]
state_before: ι : Sort ?u.114986
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ✝ ε : ℝ
s✝ t✝ : Set α
x : α
δ : ℝ
s t : Set α
⊢ cthickening δ (s ∪ t) = cthickening δ s ∪ cthickening δ t
Theorem: FormalMultilinearSeries.nnnorm_changeOriginSeriesTerm
File: Mathlib/Analysis/Analytic/Basic.lean

tactic: simp only [changeOriginSeriesTerm, LinearIsometryEquiv.nnnorm_map]
state_before: 𝕜 : Type u_3
E : Type u_1
F : Type u_2
G : Type ?u.1210777
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
p : FormalMultilinearSeries 𝕜 E F
x y : E
r R : ℝ≥0
k l : ℕ
s : Finset (Fin (k + l))
hs : Finset.card s = l
⊢ ‖changeOriginSeriesTerm p k l s hs‖₊ = ‖p (k + l)‖₊
Theorem: Set.Ioo_insert_left
File: Mathlib/Data/Set/Intervals/Basic.lean

tactic: rw [insert_eq, union_comm, Ioo_union_left h]
state_before: α : Type u_1
β : Type ?u.48423
inst✝ : PartialOrder α
a b c : α
h : a < b
⊢ insert a (Ioo a b) = Ico a b
Theorem: List.Perm.kerase
File: Mathlib/Data/List/Sigma.lean

tactic: rintro x y h rfl
state_before: α : Type u
β : α → Type v
l l₁✝ l₂✝ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l₁ l₂ : List (Sigma β)
nd : NodupKeys l₁
⊢ ∀ {a_1 b : Sigma β}, a_1.fst ≠ b.fst → a = a_1.fst → a = b.fst → False

tactic: exact h
state_before: α : Type u
β : α → Type v
l l₁✝ l₂✝ : List (Sigma β)
inst✝ : DecidableEq α
l₁ l₂ : List (Sigma β)
nd : NodupKeys l₁
x y : Sigma β
h : x.fst ≠ y.fst
⊢ x.fst = y.fst → False
Theorem: homTensorHomEquiv_apply
File: Mathlib/LinearAlgebra/Contraction.lean

tactic: rw [← LinearEquiv.coe_toLinearMap, homTensorHomEquiv_toLinearMap]
state_before: ι : Type w
R : Type u
M : Type v₁
N : Type v₂
P : Type v₃
Q : Type v₄
inst✝¹³ : CommRing R
inst✝¹² : AddCommGroup M
inst✝¹¹ : AddCommGroup N
inst✝¹⁰ : AddCommGroup P
inst✝⁹ : AddCommGroup Q
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : Module R Q
inst✝⁴ : Free R M
inst✝³ : Module.Finite R M
inst✝² : Free R N
inst✝¹ : Module.Finite R N
inst✝ : Nontrivial R
x : (M →ₗ[R] P) ⊗[R] (N →ₗ[R] Q)
⊢ ↑(homTensorHomEquiv R M N P Q) x = ↑(homTensorHomMap R M N P Q) x
Theorem: Equiv.Perm.nodup_toCycle
File: Mathlib/GroupTheory/Perm/Cycle/Concrete.lean

tactic: obtain ⟨x, hx, -⟩ := id hf
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p : Perm α
x : α
f : Perm α
hf : IsCycle f
⊢ Cycle.Nodup (toCycle f hf)

tactic: simpa [toCycle_eq_toList f hf x hx] using nodup_toList _ _
state_before: case intro.intro
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p : Perm α
x✝ : α
f : Perm α
hf : IsCycle f
x : α
hx : ↑f x ≠ x
⊢ Cycle.Nodup (toCycle f hf)
Theorem: EReal.abs_neg
File: Mathlib/Data/Real/EReal.lean

tactic: rw [abs_def, ← coe_neg, abs_def, abs_neg]
state_before: x : ℝ
⊢ EReal.abs (-↑x) = EReal.abs ↑x
Theorem: Set.biInter_pair
File: Mathlib/Data/Set/Lattice.lean

tactic: rw [biInter_insert, biInter_singleton]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.102529
ι : Sort ?u.102532
ι' : Sort ?u.102535
ι₂ : Sort ?u.102538
κ : ι → Sort ?u.102543
κ₁ : ι → Sort ?u.102548
κ₂ : ι → Sort ?u.102553
κ' : ι' → Sort ?u.102558
a b : α
s : α → Set β
⊢ (⋂ (x : α) (_ : x ∈ {a, b}), s x) = s a ∩ s b
Theorem: SModEq.zero
File: Mathlib/LinearAlgebra/SModEq.lean

tactic: rw [SModEq.def, Submodule.Quotient.eq, sub_zero]
state_before: R : Type u_1
inst✝⁴ : Ring R
M : Type u_2
inst✝³ : AddCommGroup M
inst✝² : Module R M
U U₁ U₂ : Submodule R M
x x₁ x₂ y y₁ y₂ z z₁ z₂ : M
N : Type ?u.67581
inst✝¹ : AddCommGroup N
inst✝ : Module R N
V V₁ V₂ : Submodule R N
⊢ x ≡ 0 [SMOD U] ↔ x ∈ U
Theorem: Submodule.finrank_le
File: Mathlib/LinearAlgebra/FreeModule/Finite/Rank.lean

tactic: simpa only [Cardinal.toNat_lift] using
  toNat_le_of_le_of_lt_aleph0 (rank_lt_aleph0 _ _) (rank_submodule_le s)
state_before: R : Type u
M : Type v
N : Type w
inst✝⁶ : Ring R
inst✝⁵ : StrongRankCondition R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : Module.Finite R M
s : Submodule R M
⊢ finrank R { x // x ∈ s } ≤ finrank R M
Theorem: AddSubmonoid.closure_singleton_zero
File: Mathlib/GroupTheory/Submonoid/Membership.lean

tactic: simp [eq_bot_iff_forall, mem_closure_singleton, nsmul_zero]
state_before: M : Type ?u.251546
A : Type u_1
B : Type ?u.251552
inst✝ : AddMonoid A
⊢ closure {0} = ⊥
Theorem: Int.dvd_add
File: Std/Data/Int/DivMod.lean

tactic: rw [Int.mul_add]
state_before: a✝ d e : Int
⊢ a✝ * d + a✝ * e = a✝ * (d + e)
Theorem: padicValNat.div
File: Mathlib/NumberTheory/Padics/PadicVal.lean

tactic: rw [padicValNat.div_of_dvd dvd, padicValNat_self]
state_before: p a b : ℕ
hp : Fact (Nat.Prime p)
dvd : p ∣ b
⊢ padicValNat p (b / p) = padicValNat p b - 1
Theorem: SimpleGraph.Walk.edges_subset_edgeSet
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: cases h
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v✝ : V
h' : Adj G u v✝
p' : Walk G v✝ v
e : Sym2 V
h : e ∈ edges (cons h' p')
⊢ e ∈ edgeSet G

tactic: next h' => exact edges_subset_edgeSet p' h'
state_before: case tail
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v✝ : V
h' : Adj G u v✝
p' : Walk G v✝ v
e : Sym2 V
a✝ : List.Mem e (List.map Dart.edge (darts p'))
⊢ e ∈ edgeSet G

tactic: exact h'
state_before: case head
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v✝ : V
h' : Adj G u v✝
p' : Walk G v✝ v
⊢ Dart.edge { toProd := (u, v✝), is_adj := h' } ∈ edgeSet G

tactic: exact edges_subset_edgeSet p' h'
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v✝ : V
h'✝ : Adj G u v✝
p' : Walk G v✝ v
e : Sym2 V
h' : List.Mem e (List.map Dart.edge (darts p'))
⊢ e ∈ edgeSet G
Theorem: Finsupp.support_nonempty_iff
File: Mathlib/Data/Finsupp/Defs.lean

tactic: simp only [Finsupp.support_eq_empty, Finset.nonempty_iff_ne_empty, Ne.def]
state_before: α : Type u_1
β : Type ?u.16657
γ : Type ?u.16660
ι : Type ?u.16663
M : Type u_2
M' : Type ?u.16669
N : Type ?u.16672
P : Type ?u.16675
G : Type ?u.16678
H : Type ?u.16681
R : Type ?u.16684
S : Type ?u.16687
inst✝ : Zero M
f : α →₀ M
⊢ Finset.Nonempty f.support ↔ f ≠ 0
Theorem: Set.Nontrivial.einfsep_ne_top
File: Mathlib/Topology/MetricSpace/Infsep.lean

tactic: contrapose! hs
state_before: α : Type u_1
β : Type ?u.50084
inst✝ : PseudoMetricSpace α
s : Set α
hs : Set.Nontrivial s
⊢ einfsep s ≠ ⊤

tactic: rw [not_nontrivial_iff]
state_before: α : Type u_1
β : Type ?u.50084
inst✝ : PseudoMetricSpace α
s : Set α
hs : einfsep s = ⊤
⊢ ¬Set.Nontrivial s

tactic: exact subsingleton_of_einfsep_eq_top hs
state_before: α : Type u_1
β : Type ?u.50084
inst✝ : PseudoMetricSpace α
s : Set α
hs : einfsep s = ⊤
⊢ Set.Subsingleton s
Theorem: lipschitz_with_lipschitz_const_mul
File: Mathlib/Topology/MetricSpace/Algebra.lean

tactic: rw [← lipschitzWith_iff_dist_le_mul]
state_before: α : Type ?u.2804
β : Type u_1
inst✝³ : PseudoMetricSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : Monoid β
inst✝ : LipschitzMul β
⊢ ∀ (p q : β × β), dist (p.fst * p.snd) (q.fst * q.snd) ≤ ↑(LipschitzMul.C β) * dist p q

tactic: exact lipschitzWith_lipschitz_const_mul_edist
state_before: α : Type ?u.2804
β : Type u_1
inst✝³ : PseudoMetricSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : Monoid β
inst✝ : LipschitzMul β
⊢ LipschitzWith (LipschitzMul.C β) fun p => p.fst * p.snd
Theorem: MeasureTheory.extend_eq
File: Mathlib/MeasureTheory/Measure/OuterMeasure.lean

tactic: simp [extend, h]
state_before: α : Type u_1
P : α → Prop
m : (s : α) → P s → ℝ≥0∞
s : α
h : P s
⊢ extend m s = m s h