tasksource/leandojo huggingface dataset:
Theorem: StarConvex.add
File: Mathlib/Analysis/Convex/Star.lean

tactic: rw [← add_image_prod]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.48935
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x y z : E
s t : Set E
hs : StarConvex 𝕜 x s
ht : StarConvex 𝕜 y t
⊢ StarConvex 𝕜 (x + y) (s + t)

tactic: exact (hs.prod ht).is_linear_image IsLinearMap.isLinearMap_add
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.48935
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x y z : E
s t : Set E
hs : StarConvex 𝕜 x s
ht : StarConvex 𝕜 y t
⊢ StarConvex 𝕜 (x + y) ((fun x => x.fst + x.snd) '' s ×ˢ t)
Theorem: DvdNotUnit.isUnit_of_irreducible_right
File: Mathlib/Algebra/Associated.lean

tactic: obtain ⟨_, x, hx, hx'⟩ := h
state_before: α : Type u_1
β : Type ?u.347413
γ : Type ?u.347416
δ : Type ?u.347419
inst✝ : CommMonoidWithZero α
p q : α
h : DvdNotUnit p q
hq : Irreducible q
⊢ IsUnit p

tactic: exact Or.resolve_right ((irreducible_iff.1 hq).right p x hx') hx
state_before: case intro.intro.intro
α : Type u_1
β : Type ?u.347413
γ : Type ?u.347416
δ : Type ?u.347419
inst✝ : CommMonoidWithZero α
p q : α
hq : Irreducible q
left✝ : p ≠ 0
x : α
hx : ¬IsUnit x
hx' : q = p * x
⊢ IsUnit p
Theorem: Option.getD_default_eq_iget
File: Mathlib/Data/Option/Basic.lean

tactic: cases o <;> rfl
state_before: α : Type u_1
β : Type ?u.16610
γ : Type ?u.16613
δ : Type ?u.16616
inst✝ : Inhabited α
o : Option α
⊢ getD o default = iget o
Theorem: Real.Wallis.tendsto_W_nhds_pi_div_two
File: Mathlib/Data/Real/Pi/Wallis.lean

tactic: refine' tendsto_of_tendsto_of_tendsto_of_le_of_le _ tendsto_const_nhds le_W W_le
state_before: ⊢ Tendsto W atTop (𝓝 (π / 2))

tactic: have : 𝓝 (π / 2) = 𝓝 ((1 - 0) * (π / 2)) := by rw [sub_zero, one_mul]
state_before: ⊢ Tendsto (fun i => (2 * ↑i + 1) / (2 * ↑i + 2) * (π / 2)) atTop (𝓝 (π / 2))

tactic: rw [this]
state_before: this : 𝓝 (π / 2) = 𝓝 ((1 - 0) * (π / 2))
⊢ Tendsto (fun i => (2 * ↑i + 1) / (2 * ↑i + 2) * (π / 2)) atTop (𝓝 (π / 2))

tactic: refine' Tendsto.mul _ tendsto_const_nhds
state_before: this : 𝓝 (π / 2) = 𝓝 ((1 - 0) * (π / 2))
⊢ Tendsto (fun i => (2 * ↑i + 1) / (2 * ↑i + 2) * (π / 2)) atTop (𝓝 ((1 - 0) * (π / 2)))

tactic: have h : ∀ n : ℕ, ((2 : ℝ) * n + 1) / (2 * n + 2) = 1 - 1 / (2 * n + 2) := by
  intro n
  rw [sub_div' _ _ _ (ne_of_gt (add_pos_of_nonneg_of_pos (mul_nonneg
    (two_pos : 0 < (2 : ℝ)).le (Nat.cast_nonneg _)) two_pos)), one_mul]
  congr 1; ring
state_before: this : 𝓝 (π / 2) = 𝓝 ((1 - 0) * (π / 2))
⊢ Tendsto (fun i => (2 * ↑i + 1) / (2 * ↑i + 2)) atTop (𝓝 (1 - 0))

tactic: simp_rw [h]
state_before: this : 𝓝 (π / 2) = 𝓝 ((1 - 0) * (π / 2))
h : ∀ (n : ℕ), (2 * ↑n + 1) / (2 * ↑n + 2) = 1 - 1 / (2 * ↑n + 2)
⊢ Tendsto (fun i => (2 * ↑i + 1) / (2 * ↑i + 2)) atTop (𝓝 (1 - 0))

tactic: refine' (tendsto_const_nhds.div_atTop _).const_sub _
state_before: this : 𝓝 (π / 2) = 𝓝 ((1 - 0) * (π / 2))
h : ∀ (n : ℕ), (2 * ↑n + 1) / (2 * ↑n + 2) = 1 - 1 / (2 * ↑n + 2)
⊢ Tendsto (fun i => 1 - 1 / (2 * ↑i + 2)) atTop (𝓝 (1 - 0))

tactic: refine' Tendsto.atTop_add _ tendsto_const_nhds
state_before: this : 𝓝 (π / 2) = 𝓝 ((1 - 0) * (π / 2))
h : ∀ (n : ℕ), (2 * ↑n + 1) / (2 * ↑n + 2) = 1 - 1 / (2 * ↑n + 2)
⊢ Tendsto (fun i => 2 * ↑i + 2) atTop atTop

tactic: exact tendsto_nat_cast_atTop_atTop.const_mul_atTop two_pos
state_before: this : 𝓝 (π / 2) = 𝓝 ((1 - 0) * (π / 2))
h : ∀ (n : ℕ), (2 * ↑n + 1) / (2 * ↑n + 2) = 1 - 1 / (2 * ↑n + 2)
⊢ Tendsto (fun i => 2 * ↑i) atTop atTop

tactic: rw [sub_zero, one_mul]
state_before: ⊢ 𝓝 (π / 2) = 𝓝 ((1 - 0) * (π / 2))

tactic: intro n
state_before: this : 𝓝 (π / 2) = 𝓝 ((1 - 0) * (π / 2))
⊢ ∀ (n : ℕ), (2 * ↑n + 1) / (2 * ↑n + 2) = 1 - 1 / (2 * ↑n + 2)

tactic: rw [sub_div' _ _ _ (ne_of_gt (add_pos_of_nonneg_of_pos (mul_nonneg
  (two_pos : 0 < (2 : ℝ)).le (Nat.cast_nonneg _)) two_pos)), one_mul]
state_before: this : 𝓝 (π / 2) = 𝓝 ((1 - 0) * (π / 2))
n : ℕ
⊢ (2 * ↑n + 1) / (2 * ↑n + 2) = 1 - 1 / (2 * ↑n + 2)

tactic: congr 1
state_before: this : 𝓝 (π / 2) = 𝓝 ((1 - 0) * (π / 2))
n : ℕ
⊢ (2 * ↑n + 1) / (2 * ↑n + 2) = (2 * ↑n + 2 - 1) / (2 * ↑n + 2)

tactic: ring
state_before: case e_a
this : 𝓝 (π / 2) = 𝓝 ((1 - 0) * (π / 2))
n : ℕ
⊢ 2 * ↑n + 1 = 2 * ↑n + 2 - 1
Theorem: Real.volume_Icc_pi
File: Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean

tactic: rw [← pi_univ_Icc, volume_pi_pi]
state_before: ι : Type u_1
inst✝ : Fintype ι
a b : ι → ℝ
⊢ ↑↑volume (Icc a b) = ∏ i : ι, ofReal (b i - a i)

tactic: simp only [Real.volume_Icc]
state_before: ι : Type u_1
inst✝ : Fintype ι
a b : ι → ℝ
⊢ ∏ i : ι, ↑↑volume (Icc (a i) (b i)) = ∏ i : ι, ofReal (b i - a i)
Theorem: LinearMap.disjoint_ker
File: Mathlib/LinearAlgebra/Basic.lean

tactic: simp [disjoint_def]
state_before: R : Type u_1
R₁ : Type ?u.1183168
R₂ : Type u_3
R₃ : Type ?u.1183174
R₄ : Type ?u.1183177
S : Type ?u.1183180
K : Type ?u.1183183
K₂ : Type ?u.1183186
M : Type u_2
M' : Type ?u.1183192
M₁ : Type ?u.1183195
M₂ : Type u_4
M₃ : Type ?u.1183201
M₄ : Type ?u.1183204
N : Type ?u.1183207
N₂ : Type ?u.1183210
ι : Type ?u.1183213
V : Type ?u.1183216
V₂ : Type ?u.1183219
inst✝¹⁰ : Semiring R
inst✝⁹ : Semiring R₂
inst✝⁸ : Semiring R₃
inst✝⁷ : AddCommMonoid M
inst✝⁶ : AddCommMonoid M₂
inst✝⁵ : AddCommMonoid M₃
σ₁₂ : R →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R →+* R₃
inst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝³ : Module R M
inst✝² : Module R₂ M₂
inst✝¹ : Module R₃ M₃
σ₂₁ : R₂ →+* R
τ₁₂ : R →+* R₂
τ₂₃ : R₂ →+* R₃
τ₁₃ : R →+* R₃
inst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃
F : Type u_5
sc : SemilinearMapClass F τ₁₂ M M₂
f : F
p : Submodule R M
⊢ Disjoint p (ker f) ↔ ∀ (x : M), x ∈ p → ↑f x = 0 → x = 0
Theorem: neg_mul_comm
File: Mathlib/Algebra/Ring/Defs.lean

tactic: simp
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝¹ : Mul α
inst✝ : HasDistribNeg α
a b : α
⊢ -a * b = a * -b
Theorem: preimage_nhds_coinduced
File: Mathlib/Topology/Order.lean

tactic: letI := TopologicalSpace.coinduced π ‹_›
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.20836
inst✝ : TopologicalSpace α
π : α → β
s : Set β
a : α
hs : s ∈ 𝓝 (π a)
⊢ π ⁻¹' s ∈ 𝓝 a

tactic: rcases mem_nhds_iff.mp hs with ⟨V, hVs, V_op, mem_V⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.20836
inst✝ : TopologicalSpace α
π : α → β
s : Set β
a : α
hs : s ∈ 𝓝 (π a)
this : TopologicalSpace β := TopologicalSpace.coinduced π inst✝
⊢ π ⁻¹' s ∈ 𝓝 a

tactic: exact mem_nhds_iff.mpr ⟨π ⁻¹' V, Set.preimage_mono hVs, V_op, mem_V⟩
state_before: case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type ?u.20836
inst✝ : TopologicalSpace α
π : α → β
s : Set β
a : α
hs : s ∈ 𝓝 (π a)
this : TopologicalSpace β := TopologicalSpace.coinduced π inst✝
V : Set β
hVs : V ⊆ s
V_op : IsOpen V
mem_V : π a ∈ V
⊢ π ⁻¹' s ∈ 𝓝 a
Theorem: GeneralizedContinuedFraction.convergents'_of_int
File: Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean

tactic: induction' n with n
state_before: K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
a : ℤ
⊢ convergents' (of ↑a) n = ↑a

tactic: simp only [zeroth_convergent'_eq_h, of_h_eq_floor, floor_intCast, Nat.zero_eq]
state_before: case zero
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
a : ℤ
⊢ convergents' (of ↑a) Nat.zero = ↑a

tactic: rw [convergents', of_h_eq_floor, floor_intCast, add_right_eq_self]
state_before: case succ
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n✝ : ℕ
a : ℤ
n : ℕ
n_ih✝ : convergents' (of ↑a) n = ↑a
⊢ convergents' (of ↑a) (Nat.succ n) = ↑a

tactic: exact convergents'Aux_succ_none ((of_s_of_int K a).symm ▸ Stream'.Seq.get?_nil 0) _
state_before: case succ
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n✝ : ℕ
a : ℤ
n : ℕ
n_ih✝ : convergents' (of ↑a) n = ↑a
⊢ convergents'Aux (of ↑a).s (Nat.succ n) = 0
Theorem: Nat.max_succ_succ
File: Mathlib/Data/Nat/Basic.lean

tactic: by_cases h1 : m ≤ n
state_before: m✝ n✝ k m n : ℕ
⊢ max (succ m) (succ n) = succ (max m n)

tactic: rw [max_eq_right h1, max_eq_right (succ_le_succ h1)]
state_before: case pos
m✝ n✝ k m n : ℕ
h1 : m ≤ n
⊢ max (succ m) (succ n) = succ (max m n)

case neg
m✝ n✝ k m n : ℕ
h1 : ¬m ≤ n
⊢ max (succ m) (succ n) = succ (max m n)

tactic: rw [not_le] at h1
state_before: case neg
m✝ n✝ k m n : ℕ
h1 : ¬m ≤ n
⊢ max (succ m) (succ n) = succ (max m n)

tactic: have h2 := le_of_lt h1
state_before: case neg
m✝ n✝ k m n : ℕ
h1 : n < m
⊢ max (succ m) (succ n) = succ (max m n)

tactic: rw [max_eq_left h2, max_eq_left (succ_le_succ h2)]
state_before: case neg
m✝ n✝ k m n : ℕ
h1 : n < m
h2 : n ≤ m
⊢ max (succ m) (succ n) = succ (max m n)
Theorem: CategoryTheory.Limits.eq_zero_of_epi_kernel
File: Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean

tactic: simp
state_before: C : Type u
inst✝³ : Category C
inst✝² : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝¹ : HasKernel f
inst✝ : Epi (kernel.ι f)
⊢ kernel.ι f ≫ f = kernel.ι f ≫ 0
Theorem: padicValRat.neg
File: Mathlib/NumberTheory/Padics/PadicVal.lean

tactic: simp [padicValRat, padicValInt]
state_before: p : ℕ
q : ℚ
⊢ padicValRat p (-q) = padicValRat p q
Theorem: Int.mul_one
File: Std/Data/Int/Lemmas.lean

tactic: rw [Int.mul_comm, Int.one_mul]
state_before: a : Int
⊢ a * 1 = a
Theorem: spectrum.add_mem_iff
File: Mathlib/Algebra/Algebra/Spectrum.lean

tactic: simp only [mem_iff, sub_neg_eq_add, ← sub_sub, map_add]
state_before: R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
r s : R
⊢ r + s ∈ σ a ↔ r ∈ σ (-↑↑ₐ s + a)
Theorem: integral_exp
File: Mathlib/Analysis/SpecialFunctions/Integrals.lean

tactic: rw [integral_deriv_eq_sub']
state_before: a b : ℝ
n : ℕ
⊢ (∫ (x : ℝ) in a..b, exp x) = exp b - exp a

tactic: norm_num
state_before: case hderiv
a b : ℝ
n : ℕ
⊢ deriv exp = fun x => exp x

tactic: exact fun _ _ => differentiableAt_exp
state_before: case hdiff
a b : ℝ
n : ℕ
⊢ ∀ (x : ℝ), x ∈ [[a, b]] → DifferentiableAt ℝ exp x

tactic: exact continuousOn_exp
state_before: case hcont
a b : ℝ
n : ℕ
⊢ ContinuousOn (fun x => exp x) [[a, b]]
Theorem: Set.insert_subset_insert_iff
File: Mathlib/Data/Set/Basic.lean

tactic: refine' ⟨fun h x hx => _, insert_subset_insert⟩
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
ha : ¬a ∈ s
⊢ insert a s ⊆ insert a t ↔ s ⊆ t

tactic: rcases h (subset_insert _ _ hx) with (rfl | hxt)
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
ha : ¬a ∈ s
h : insert a s ⊆ insert a t
x : α
hx : x ∈ s
⊢ x ∈ t

tactic: exacts [(ha hx).elim, hxt]
state_before: case inl
α : Type u
β : Type v
γ : Type w
ι : Sort x
b : α
s s₁ s₂ t t₁ t₂ u : Set α
x : α
hx : x ∈ s
ha : ¬x ∈ s
h : insert x s ⊆ insert x t
⊢ x ∈ t

case inr
α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
ha : ¬a ∈ s
h : insert a s ⊆ insert a t
x : α
hx : x ∈ s
hxt : x ∈ t
⊢ x ∈ t
Theorem: prime_dvd_prime_iff_eq
File: Mathlib/Algebra/Associated.lean

tactic: rw [pp.dvd_prime_iff_associated qp, ← associated_eq_eq]
state_before: α : Type ?u.249636
β : Type ?u.249639
γ : Type ?u.249642
δ : Type ?u.249645
inst✝³ : Monoid α
inst✝² : Unique αˣ
M : Type u_1
inst✝¹ : CancelCommMonoidWithZero M
inst✝ : Unique Mˣ
p q : M
pp : Prime p
qp : Prime q
⊢ p ∣ q ↔ p = q
Theorem: Module.Ray.neg_units_smul
File: Mathlib/LinearAlgebra/Ray.lean

tactic: induction v using Module.Ray.ind
state_before: R : Type u_1
inst✝⁴ : StrictOrderedCommRing R
M : Type u_2
N : Type ?u.184783
inst✝³ : AddCommGroup M
inst✝² : AddCommGroup N
inst✝¹ : Module R M
inst✝ : Module R N
x y : M
u : Rˣ
v : Ray R M
⊢ -u • v = -(u • v)

tactic: simp only [smul_rayOfNeZero, Units.smul_def, Units.val_neg, neg_smul, neg_rayOfNeZero]
state_before: case h
R : Type u_1
inst✝⁴ : StrictOrderedCommRing R
M : Type u_2
N : Type ?u.184783
inst✝³ : AddCommGroup M
inst✝² : AddCommGroup N
inst✝¹ : Module R M
inst✝ : Module R N
x y : M
u : Rˣ
v✝ : M
hv✝ : v✝ ≠ 0
⊢ -u • rayOfNeZero R v✝ hv✝ = -(u • rayOfNeZero R v✝ hv✝)
Theorem: contDiffWithinAt_prod
File: Mathlib/Analysis/Calculus/ContDiff.lean

tactic: simpa only [← Finset.prod_apply] using contDiffWithinAt_prod' h
state_before: 𝕜 : Type u_2
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.1931259
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
𝔸 : Type ?u.1934737
𝔸' : Type u_3
ι : Type u_1
𝕜' : Type ?u.1934746
inst✝⁵ : NormedRing 𝔸
inst✝⁴ : NormedAlgebra 𝕜 𝔸
inst✝³ : NormedCommRing 𝔸'
inst✝² : NormedAlgebra 𝕜 𝔸'
inst✝¹ : NormedField 𝕜'
inst✝ : NormedAlgebra 𝕜 𝕜'
t : Finset ι
f : ι → E → 𝔸'
h : ∀ (i : ι), i ∈ t → ContDiffWithinAt 𝕜 n (f i) s x
⊢ ContDiffWithinAt 𝕜 n (fun y => ∏ i in t, f i y) s x
Theorem: Subgroup.quotientEquivSigmaZMod_apply
File: Mathlib/GroupTheory/Complement.lean

tactic: rw [apply_eq_iff_eq_symm_apply, quotientEquivSigmaZMod_symm_apply, ZMod.coe_int_cast,
  zpow_smul_mod_minimalPeriod]
state_before: G : Type u
inst✝ : Group G
H : Subgroup G
g : G
q : orbitRel.Quotient { x // x ∈ zpowers g } (G ⧸ H)
k : ℤ
⊢ ↑(quotientEquivSigmaZMod H g) (g ^ k • Quotient.out' q) = { fst := q, snd := ↑k }
Theorem: charmatrix_apply_ne
File: Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean

tactic: simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply_ne _ _ _ h, map_apply,
  sub_eq_neg_self]
state_before: R : Type u
inst✝² : CommRing R
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
M : Matrix n n R
i j : n
h : i ≠ j
⊢ charmatrix M i j = -↑C (M i j)
Theorem: exists_ord_compl_eq_one_iff_isPrimePow
File: Mathlib/Data/Nat/Factorization/PrimePow.lean

tactic: refine' ⟨fun h => IsPrimePow.exists_ord_compl_eq_one h, fun h => _⟩
state_before: R : Type ?u.6665
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
hn : n ≠ 1
⊢ IsPrimePow n ↔ ∃ p, Nat.Prime p ∧ n / p ^ ↑(Nat.factorization n) p = 1

tactic: rcases h with ⟨p, pp, h⟩
state_before: R : Type ?u.6665
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
hn : n ≠ 1
h : ∃ p, Nat.Prime p ∧ n / p ^ ↑(Nat.factorization n) p = 1
⊢ IsPrimePow n

tactic: rw [isPrimePow_nat_iff]
state_before: case intro.intro
R : Type ?u.6665
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n : ℕ
hn : n ≠ 1
p : ℕ
pp : Nat.Prime p
h : n / p ^ ↑(Nat.factorization n) p = 1
⊢ IsPrimePow n

tactic: rw [← Nat.eq_of_dvd_of_div_eq_one (Nat.ord_proj_dvd n p) h] at hn⊢
state_before: case intro.intro
R : Type ?u.6665
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n : ℕ
hn : n ≠ 1
p : ℕ
pp : Nat.Prime p
h : n / p ^ ↑(Nat.factorization n) p = 1
⊢ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n

tactic: refine' ⟨p, n.factorization p, pp, _, by simp⟩
state_before: case intro.intro
R : Type ?u.6665
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n p : ℕ
hn : p ^ ↑(Nat.factorization n) p ≠ 1
pp : Nat.Prime p
h : n / p ^ ↑(Nat.factorization n) p = 1
⊢ ∃ p_1 k, Nat.Prime p_1 ∧ 0 < k ∧ p_1 ^ k = p ^ ↑(Nat.factorization n) p

tactic: contrapose! hn
state_before: case intro.intro
R : Type ?u.6665
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n p : ℕ
hn : p ^ ↑(Nat.factorization n) p ≠ 1
pp : Nat.Prime p
h : n / p ^ ↑(Nat.factorization n) p = 1
⊢ 0 < ↑(Nat.factorization n) p

tactic: simp [le_zero_iff.1 hn]
state_before: case intro.intro
R : Type ?u.6665
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n p : ℕ
pp : Nat.Prime p
h : n / p ^ ↑(Nat.factorization n) p = 1
hn : ↑(Nat.factorization n) p ≤ 0
⊢ p ^ ↑(Nat.factorization n) p = 1

tactic: simp
state_before: R : Type ?u.6665
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n p : ℕ
hn : p ^ ↑(Nat.factorization n) p ≠ 1
pp : Nat.Prime p
h : n / p ^ ↑(Nat.factorization n) p = 1
⊢ p ^ ↑(Nat.factorization n) p = p ^ ↑(Nat.factorization n) p
Theorem: RingHom.toMonoidWithZeroHom_eq_coe
File: Mathlib/Algebra/Hom/Ring.lean

tactic: rfl
state_before: F : Type ?u.59550
α : Type u_1
β : Type u_2
γ : Type ?u.59559
x✝¹ : NonAssocSemiring α
x✝ : NonAssocSemiring β
f : α →+* β
⊢ ↑(toMonoidWithZeroHom f) = ↑f
Theorem: Nat.gcd_self_add_right
File: Mathlib/Data/Nat/GCD/Basic.lean

tactic: rw [add_comm, gcd_add_self_right]
state_before: m n : ℕ
⊢ gcd m (m + n) = gcd m n
Theorem: Multiset.map_count_True_eq_filter_card
File: Mathlib/Data/Multiset/Basic.lean

tactic: simp only [count_eq_card_filter_eq, map_filter, card_map, Function.comp.left_id,
  eq_true_eq_id, Function.comp]
state_before: α : Type u_1
β : Type ?u.434603
γ : Type ?u.434606
s : Multiset α
p : α → Prop
inst✝ : DecidablePred p
⊢ count True (map p s) = ↑card (filter p s)

tactic: congr
state_before: α : Type u_1
β : Type ?u.434603
γ : Type ?u.434606
s : Multiset α
p : α → Prop
inst✝ : DecidablePred p
⊢ ↑card (filter (fun x => True = p x) s) = ↑card (filter p s)

tactic: funext _
state_before: case h.e_6.h.e_p
α : Type u_1
β : Type ?u.434603
γ : Type ?u.434606
s : Multiset α
p : α → Prop
inst✝ : DecidablePred p
⊢ (fun x => True = p x) = p

tactic: simp only [eq_iff_iff, true_iff]
state_before: case h.e_6.h.e_p.h
α : Type u_1
β : Type ?u.434603
γ : Type ?u.434606
s : Multiset α
p : α → Prop
inst✝ : DecidablePred p
x✝ : α
⊢ (True = p x✝) = p x✝
Theorem: Finset.map_toDual_min
File: Mathlib/Data/Finset/Lattice.lean

tactic: rw [max_eq_sup_withBot, sup_image]
state_before: F : Type ?u.348581
α : Type u_1
β : Type ?u.348587
γ : Type ?u.348590
ι : Type ?u.348593
κ : Type ?u.348596
inst✝ : LinearOrder α
s✝ : Finset α
H : Finset.Nonempty s✝
x : α
s : Finset α
⊢ WithTop.map (↑toDual) (Finset.min s) = Finset.max (image (↑toDual) s)

tactic: exact congr_fun Option.map_id _
state_before: F : Type ?u.348581
α : Type u_1
β : Type ?u.348587
γ : Type ?u.348590
ι : Type ?u.348593
κ : Type ?u.348596
inst✝ : LinearOrder α
s✝ : Finset α
H : Finset.Nonempty s✝
x : α
s : Finset α
⊢ WithTop.map (↑toDual) (Finset.min s) = sup s (WithBot.some ∘ ↑toDual)
Theorem: MvPolynomial.vars_rename
File: Mathlib/Data/MvPolynomial/Variables.lean

tactic: classical
intro i hi
simp only [vars_def, exists_prop, Multiset.mem_toFinset, Finset.mem_image] at hi⊢
simpa only [Multiset.mem_map] using degrees_rename _ _ hi
state_before: R : Type u
S : Type v
σ : Type u_2
τ : Type u_1
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
p q : MvPolynomial σ R
inst✝¹ : CommSemiring S
inst✝ : DecidableEq τ
f : σ → τ
φ : MvPolynomial σ R
⊢ vars (↑(rename f) φ) ⊆ Finset.image f (vars φ)

tactic: intro i hi
state_before: R : Type u
S : Type v
σ : Type u_2
τ : Type u_1
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
p q : MvPolynomial σ R
inst✝¹ : CommSemiring S
inst✝ : DecidableEq τ
f : σ → τ
φ : MvPolynomial σ R
⊢ vars (↑(rename f) φ) ⊆ Finset.image f (vars φ)

tactic: simp only [vars_def, exists_prop, Multiset.mem_toFinset, Finset.mem_image] at hi⊢
state_before: R : Type u
S : Type v
σ : Type u_2
τ : Type u_1
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
p q : MvPolynomial σ R
inst✝¹ : CommSemiring S
inst✝ : DecidableEq τ
f : σ → τ
φ : MvPolynomial σ R
i : τ
hi : i ∈ vars (↑(rename f) φ)
⊢ i ∈ Finset.image f (vars φ)

tactic: simpa only [Multiset.mem_map] using degrees_rename _ _ hi
state_before: R : Type u
S : Type v
σ : Type u_2
τ : Type u_1
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
p q : MvPolynomial σ R
inst✝¹ : CommSemiring S
inst✝ : DecidableEq τ
f : σ → τ
φ : MvPolynomial σ R
i : τ
hi : i ∈ degrees (↑(rename f) φ)
⊢ ∃ a, a ∈ degrees φ ∧ f a = i
Theorem: HasDerivAt.iterate
File: Mathlib/Analysis/Calculus/Deriv/Comp.lean

tactic: rwa [hx] at this
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
E : Type w
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
f✝ f₀ f₁ g : 𝕜 → F
f'✝ f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
𝕜' : Type ?u.184944
inst✝³ : NontriviallyNormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' F
inst✝ : IsScalarTower 𝕜 𝕜' F
s' t' : Set 𝕜'
h : 𝕜 → 𝕜'
h₁ : 𝕜 → 𝕜
h₂ : 𝕜' → 𝕜'
h' h₂' : 𝕜'
h₁' : 𝕜
g₁ : 𝕜' → F
g₁' : F
L' : Filter 𝕜'
f : 𝕜 → 𝕜
f' : 𝕜
hf : HasDerivAt f f' x
hx : f x = x
n : ℕ
this : Tendsto f (𝓝 x) (𝓝 (f x))
⊢ Tendsto f (𝓝 x) (𝓝 x)
Theorem: Multiset.dedup_bind_dedup
File: Mathlib/Data/Multiset/Dedup.lean

tactic: ext x
state_before: α : Type u_2
β : Type u_1
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
m : Multiset α
f : α → Multiset β
⊢ dedup (bind (dedup m) f) = dedup (bind m f)

tactic: simp_rw [count_dedup]
state_before: case a
α : Type u_2
β : Type u_1
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
m : Multiset α
f : α → Multiset β
x : β
⊢ count x (dedup (bind (dedup m) f)) = count x (dedup (bind m f))

tactic: refine if_congr ?_ rfl rfl
state_before: case a
α : Type u_2
β : Type u_1
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
m : Multiset α
f : α → Multiset β
x : β
⊢ (if x ∈ bind (dedup m) f then 1 else 0) = if x ∈ bind m f then 1 else 0

tactic: simp
state_before: case a
α : Type u_2
β : Type u_1
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
m : Multiset α
f : α → Multiset β
x : β
⊢ x ∈ bind (dedup m) f ↔ x ∈ bind m f
Theorem: Finset.filter_le_eq_Ici
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: ext
state_before: ι : Type ?u.64267
α : Type u_1
inst✝³ : Preorder α
inst✝² : LocallyFiniteOrderTop α
a : α
inst✝¹ : Fintype α
inst✝ : DecidablePred ((fun x x_1 => x ≤ x_1) a)
⊢ filter ((fun x x_1 => x ≤ x_1) a) univ = Ici a

tactic: simp
state_before: case a
ι : Type ?u.64267
α : Type u_1
inst✝³ : Preorder α
inst✝² : LocallyFiniteOrderTop α
a : α
inst✝¹ : Fintype α
inst✝ : DecidablePred ((fun x x_1 => x ≤ x_1) a)
a✝ : α
⊢ a✝ ∈ filter ((fun x x_1 => x ≤ x_1) a) univ ↔ a✝ ∈ Ici a
Theorem: CategoryTheory.Abelian.Pseudoelement.zero_apply
File: Mathlib/CategoryTheory/Abelian/Pseudoelements.lean

tactic: rw [pseudoZero_def, pseudoApply_mk']
state_before: C : Type u
inst✝¹ : Category C
inst✝ : Abelian C
P Q : C
a : Pseudoelement P
a' : Over P
⊢ pseudoApply 0 (Quotient.mk (setoid P) a') = 0

tactic: simp
state_before: C : Type u
inst✝¹ : Category C
inst✝ : Abelian C
P Q : C
a : Pseudoelement P
a' : Over P
⊢ Quotient.mk (setoid Q) (Over.mk (a'.hom ≫ 0)) = Quotient.mk (setoid Q) (Over.mk 0)
Theorem: orderOf_injective
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: simp_rw [orderOf_eq_orderOf_iff, ← f.map_pow, ← f.map_one, hf.eq_iff, forall_const]
state_before: G : Type u
A : Type v
x✝ y : G
a b : A
n m : ℕ
inst✝² : Monoid G
inst✝¹ : AddMonoid A
H : Type u_1
inst✝ : Monoid H
f : G →* H
hf : Injective ↑f
x : G
⊢ orderOf (↑f x) = orderOf x
Theorem: Filter.map_inf'
File: Mathlib/Order/Filter/Basic.lean

tactic: lift f to Filter t using htf
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.282207
ι : Sort x
f g : Filter α
m : α → β
t : Set α
htf : t ∈ f
htg : t ∈ g
h : InjOn m t
⊢ map m (f ⊓ g) = map m f ⊓ map m g

tactic: lift g to Filter t using htg
state_before: case intro
α : Type u
β : Type v
γ : Type w
δ : Type ?u.282207
ι : Sort x
g : Filter α
m : α → β
t : Set α
htg : t ∈ g
h : InjOn m t
f : Filter ↑t
⊢ map m (map Subtype.val f ⊓ g) = map m (map Subtype.val f) ⊓ map m g

tactic: replace h : Injective (m ∘ ((↑) : t → α)) := h.injective
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type ?u.282207
ι : Sort x
m : α → β
t : Set α
h : InjOn m t
f g : Filter ↑t
⊢ map m (map Subtype.val f ⊓ map Subtype.val g) = map m (map Subtype.val f) ⊓ map m (map Subtype.val g)

tactic: simp only [map_map, ← map_inf Subtype.coe_injective, map_inf h]
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type ?u.282207
ι : Sort x
m : α → β
t : Set α
f g : Filter ↑t
h : Injective (m ∘ Subtype.val)
⊢ map m (map Subtype.val f ⊓ map Subtype.val g) = map m (map Subtype.val f) ⊓ map m (map Subtype.val g)
Theorem: Polynomial.degree_mul_leadingCoeff_inv
File: Mathlib/Data/Polynomial/FieldDivision.lean

tactic: have h₁ : (leadingCoeff q)⁻¹ ≠ 0 := inv_ne_zero (mt leadingCoeff_eq_zero.1 h)
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : DivisionRing R
p✝ q p : R[X]
h : q ≠ 0
⊢ degree (p * ↑C (leadingCoeff q)⁻¹) = degree p

tactic: rw [degree_mul, degree_C h₁, add_zero]
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : DivisionRing R
p✝ q p : R[X]
h : q ≠ 0
h₁ : (leadingCoeff q)⁻¹ ≠ 0
⊢ degree (p * ↑C (leadingCoeff q)⁻¹) = degree p