tasksource/leandojo huggingface dataset:
Theorem: List.count_erase
File: Mathlib/Data/List/Count.lean

tactic: simp
state_before: α : Type u_1
l : List α
inst✝ : DecidableEq α
a b : α
⊢ count a (List.erase [] b) = count a [] - if a = b then 1 else 0

tactic: rw [erase_cons]
state_before: α : Type u_1
l✝ : List α
inst✝ : DecidableEq α
a b c : α
l : List α
⊢ count a (List.erase (c :: l) b) = count a (c :: l) - if a = b then 1 else 0

tactic: by_cases hc : c = b
state_before: α : Type u_1
l✝ : List α
inst✝ : DecidableEq α
a b c : α
l : List α
⊢ count a (if c = b then l else c :: List.erase l b) = count a (c :: l) - if a = b then 1 else 0

tactic: rw [if_pos hc, hc, count_cons', Nat.add_sub_cancel]
state_before: case pos
α : Type u_1
l✝ : List α
inst✝ : DecidableEq α
a b c : α
l : List α
hc : c = b
⊢ count a (if c = b then l else c :: List.erase l b) = count a (c :: l) - if a = b then 1 else 0

tactic: rw [if_neg hc, count_cons', count_cons', count_erase a b l]
state_before: case neg
α : Type u_1
l✝ : List α
inst✝ : DecidableEq α
a b c : α
l : List α
hc : ¬c = b
⊢ count a (if c = b then l else c :: List.erase l b) = count a (c :: l) - if a = b then 1 else 0

tactic: by_cases ha : a = b
state_before: case neg
α : Type u_1
l✝ : List α
inst✝ : DecidableEq α
a b c : α
l : List α
hc : ¬c = b
⊢ ((count a l - if a = b then 1 else 0) + if a = c then 1 else 0) =
    (count a l + if a = c then 1 else 0) - if a = b then 1 else 0

tactic: rw [← ha, eq_comm] at hc
state_before: case pos
α : Type u_1
l✝ : List α
inst✝ : DecidableEq α
a b c : α
l : List α
hc : ¬c = b
ha : a = b
⊢ ((count a l - if a = b then 1 else 0) + if a = c then 1 else 0) =
    (count a l + if a = c then 1 else 0) - if a = b then 1 else 0

tactic: rw [if_pos ha, if_neg hc, add_zero, add_zero]
state_before: case pos
α : Type u_1
l✝ : List α
inst✝ : DecidableEq α
a b c : α
l : List α
hc : ¬a = c
ha : a = b
⊢ ((count a l - if a = b then 1 else 0) + if a = c then 1 else 0) =
    (count a l + if a = c then 1 else 0) - if a = b then 1 else 0

tactic: rw [if_neg ha, tsub_zero, tsub_zero]
state_before: case neg
α : Type u_1
l✝ : List α
inst✝ : DecidableEq α
a b c : α
l : List α
hc : ¬c = b
ha : ¬a = b
⊢ ((count a l - if a = b then 1 else 0) + if a = c then 1 else 0) =
    (count a l + if a = c then 1 else 0) - if a = b then 1 else 0
Theorem: Int.emod_emod
File: Std/Data/Int/DivMod.lean

tactic: conv => rhs; rw [← emod_add_ediv a b, add_mul_emod_self_left]
state_before: a b : Int
⊢ a % b % b = a % b
Theorem: Fin.left_distrib_aux
File: Mathlib/Data/ZMod/Defs.lean

tactic: rw [mul_add]
state_before: n : ℕ
x✝² x✝¹ x✝ : Fin n
a : ℕ
ha : a < n
b : ℕ
hb : b < n
c : ℕ
hc : c < n
⊢ a * (b + c) ≡ a * b + a * c [MOD n]
Theorem: contDiffOn_all_iff_nat
File: Mathlib/Analysis/Calculus/ContDiffDef.lean

tactic: refine' ⟨fun H n => H n, _⟩
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
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 uX
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
⊢ (∀ (n : ℕ∞), ContDiffOn 𝕜 n f s) ↔ ∀ (n : ℕ), ContDiffOn 𝕜 (↑n) f s

tactic: rintro H (_ | n)
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
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 uX
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
⊢ (∀ (n : ℕ), ContDiffOn 𝕜 (↑n) f s) → ∀ (n : ℕ∞), ContDiffOn 𝕜 n f s

tactic: exacts [contDiffOn_top.2 H, H n]
state_before: case none
𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
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 uX
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
H : ∀ (n : ℕ), ContDiffOn 𝕜 (↑n) f s
⊢ ContDiffOn 𝕜 none f s

case some
𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
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 uX
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
m n✝ : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
H : ∀ (n : ℕ), ContDiffOn 𝕜 (↑n) f s
n : ℕ
⊢ ContDiffOn 𝕜 (some n) f s
Theorem: derivWithin.neg
File: Mathlib/Analysis/Calculus/Deriv/Add.lean

tactic: simp only [derivWithin, fderivWithin_neg hxs, ContinuousLinearMap.neg_apply]
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 : Filter 𝕜
hxs : UniqueDiffWithinAt 𝕜 s x
⊢ derivWithin (fun y => -f y) s x = -derivWithin f s x
Theorem: Submodule.mem_span_pair
File: Mathlib/LinearAlgebra/Span.lean

tactic: simp_rw [mem_span_insert, mem_span_singleton, exists_exists_eq_and, eq_comm]
state_before: R : Type u_2
R₂ : Type ?u.166899
K : Type ?u.166902
M : Type u_1
M₂ : Type ?u.166908
V : Type ?u.166911
S : Type ?u.166914
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
x✝ : M
p p' : Submodule R M
inst✝² : Semiring R₂
σ₁₂ : R →+* R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
s t : Set M
x y z : M
⊢ z ∈ span R {x, y} ↔ ∃ a b, a • x + b • y = z
Theorem: DiscreteValuationRing.addVal_uniformizer
File: Mathlib/RingTheory/DiscreteValuationRing/Basic.lean

tactic: simpa only [one_mul, eq_self_iff_true, Units.val_one, pow_one, forall_true_left, Nat.cast_one]
  using addVal_def ϖ 1 hϖ 1
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : DiscreteValuationRing R
ϖ : R
hϖ : Irreducible ϖ
⊢ ↑(addVal R) ϖ = 1
Theorem: Nat.cast_ceil_eq_int_ceil
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [← Int.ceil_toNat, Int.toNat_of_nonneg (Int.ceil_nonneg ha)]
state_before: F : Type ?u.311143
α : Type u_1
β : Type ?u.311149
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
a : α
ha : 0 ≤ a
⊢ ↑⌈a⌉₊ = ⌈a⌉
Theorem: Cardinal.mk_diff_add_mk
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: refine (mk_union_of_disjoint <| ?_).symm.trans <| by rw [diff_union_of_subset h]
state_before: α β : Type u
S T : Set α
h : T ⊆ S
⊢ (#↑(S \ T)) + (#↑T) = (#↑S)

tactic: exact disjoint_sdiff_self_left
state_before: α β : Type u
S T : Set α
h : T ⊆ S
⊢ Disjoint (S \ T) T

tactic: rw [diff_union_of_subset h]
state_before: α β : Type u
S T : Set α
h : T ⊆ S
⊢ (#↑(S \ T ∪ T)) = (#↑S)
Theorem: CategoryTheory.Arrow.hom.congr_right
File: Mathlib/CategoryTheory/Arrow.lean

tactic: rw [h]
state_before: T : Type u
inst✝ : Category T
f g : Arrow T
φ₁ φ₂ : f ⟶ g
h : φ₁ = φ₂
⊢ φ₁.right = φ₂.right
Theorem: Real.sqrt_le_iff
File: Mathlib/Data/Real/Sqrt.lean

tactic: rw [← and_iff_right_of_imp fun h => (sqrt_nonneg x).trans h, and_congr_right_iff]
state_before: x y : ℝ
⊢ sqrt x ≤ y ↔ 0 ≤ y ∧ x ≤ y ^ 2

tactic: exact sqrt_le_left
state_before: x y : ℝ
⊢ 0 ≤ y → (sqrt x ≤ y ↔ x ≤ y ^ 2)
Theorem: Stream'.WSeq.toList_ofList
File: Mathlib/Data/Seq/WSeq.lean

tactic: induction' l with a l IH <;> simp [ret_mem]
state_before: α : Type u
β : Type v
γ : Type w
l : List α
⊢ l ∈ toList ↑l

tactic: exact think_mem (Computation.mem_map _ IH)
state_before: case cons
α : Type u
β : Type v
γ : Type w
a : α
l : List α
IH : l ∈ toList ↑l
⊢ a :: l ∈ Computation.think (List.cons a <$> toList ↑l)
Theorem: MeasurableSet.sUnion
File: Mathlib/MeasureTheory/MeasurableSpaceDef.lean

tactic: rw [sUnion_eq_biUnion]
state_before: α : Type u_1
β : Type ?u.6742
γ : Type ?u.6745
δ : Type ?u.6748
δ' : Type ?u.6751
ι : Sort ?u.6754
s✝ t u : Set α
m : MeasurableSpace α
s : Set (Set α)
hs : Set.Countable s
h : ∀ (t : Set α), t ∈ s → MeasurableSet t
⊢ MeasurableSet (⋃₀ s)

tactic: exact .biUnion hs h
state_before: α : Type u_1
β : Type ?u.6742
γ : Type ?u.6745
δ : Type ?u.6748
δ' : Type ?u.6751
ι : Sort ?u.6754
s✝ t u : Set α
m : MeasurableSpace α
s : Set (Set α)
hs : Set.Countable s
h : ∀ (t : Set α), t ∈ s → MeasurableSet t
⊢ MeasurableSet (⋃ (i : Set α) (_ : i ∈ s), i)
Theorem: Function.const_lt_const
File: Mathlib/Order/Basic.lean

tactic: simpa [Pi.lt_def] using le_of_lt
state_before: ι : Type ?u.73668
α : Type u
β : Type v
γ : Type w
π : ι → Type ?u.73679
r : α → α → Prop
inst✝¹ : Preorder α
inst✝ : Nonempty β
a b : α
⊢ const β a < const β b ↔ a < b
Theorem: Equiv.Perm.isCycle_cycleOf_iff
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: refine' ⟨fun hx => _, f.isCycle_cycleOf⟩
state_before: ι : Type ?u.2582968
α : Type u_1
β : Type ?u.2582974
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g : Perm α
x y : α
f : Perm α
⊢ IsCycle (cycleOf f x) ↔ ↑f x ≠ x

tactic: rw [Ne.def, ← cycleOf_eq_one_iff f]
state_before: ι : Type ?u.2582968
α : Type u_1
β : Type ?u.2582974
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g : Perm α
x y : α
f : Perm α
hx : IsCycle (cycleOf f x)
⊢ ↑f x ≠ x

tactic: exact hx.ne_one
state_before: ι : Type ?u.2582968
α : Type u_1
β : Type ?u.2582974
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g : Perm α
x y : α
f : Perm α
hx : IsCycle (cycleOf f x)
⊢ ¬cycleOf f x = 1
Theorem: CategoryTheory.Limits.WidePushout.hom_ext
File: Mathlib/CategoryTheory/Limits/Shapes/WidePullbacks.lean

tactic: intro h1 h2
state_before: J : Type w
C : Type u
inst✝² : Category C
D : Type u_1
inst✝¹ : Category D
B : D
objs : J → D
arrows : (j : J) → B ⟶ objs j
inst✝ : HasWidePushout B objs arrows
X : D
f : B ⟶ X
fs : (j : J) → objs j ⟶ X
w : ∀ (j : J), arrows j ≫ fs j = f
g1 g2 : widePushout B (fun j => objs j) arrows ⟶ X
⊢ (∀ (j : J), ι arrows j ≫ g1 = ι arrows j ≫ g2) → head arrows ≫ g1 = head arrows ≫ g2 → g1 = g2

tactic: apply colimit.hom_ext
state_before: J : Type w
C : Type u
inst✝² : Category C
D : Type u_1
inst✝¹ : Category D
B : D
objs : J → D
arrows : (j : J) → B ⟶ objs j
inst✝ : HasWidePushout B objs arrows
X : D
f : B ⟶ X
fs : (j : J) → objs j ⟶ X
w : ∀ (j : J), arrows j ≫ fs j = f
g1 g2 : widePushout B (fun j => objs j) arrows ⟶ X
h1 : ∀ (j : J), ι arrows j ≫ g1 = ι arrows j ≫ g2
h2 : head arrows ≫ g1 = head arrows ≫ g2
⊢ g1 = g2

tactic: rintro (_ | _)
state_before: case w
J : Type w
C : Type u
inst✝² : Category C
D : Type u_1
inst✝¹ : Category D
B : D
objs : J → D
arrows : (j : J) → B ⟶ objs j
inst✝ : HasWidePushout B objs arrows
X : D
f : B ⟶ X
fs : (j : J) → objs j ⟶ X
w : ∀ (j : J), arrows j ≫ fs j = f
g1 g2 : widePushout B (fun j => objs j) arrows ⟶ X
h1 : ∀ (j : J), ι arrows j ≫ g1 = ι arrows j ≫ g2
h2 : head arrows ≫ g1 = head arrows ≫ g2
⊢ ∀ (j : WidePushoutShape J),
    colimit.ι (WidePushoutShape.wideSpan B (fun j => objs j) arrows) j ≫ g1 =
      colimit.ι (WidePushoutShape.wideSpan B (fun j => objs j) arrows) j ≫ g2

tactic: apply h2
state_before: case w.none
J : Type w
C : Type u
inst✝² : Category C
D : Type u_1
inst✝¹ : Category D
B : D
objs : J → D
arrows : (j : J) → B ⟶ objs j
inst✝ : HasWidePushout B objs arrows
X : D
f : B ⟶ X
fs : (j : J) → objs j ⟶ X
w : ∀ (j : J), arrows j ≫ fs j = f
g1 g2 : widePushout B (fun j => objs j) arrows ⟶ X
h1 : ∀ (j : J), ι arrows j ≫ g1 = ι arrows j ≫ g2
h2 : head arrows ≫ g1 = head arrows ≫ g2
⊢ colimit.ι (WidePushoutShape.wideSpan B (fun j => objs j) arrows) none ≫ g1 =
    colimit.ι (WidePushoutShape.wideSpan B (fun j => objs j) arrows) none ≫ g2

tactic: apply h1
state_before: case w.some
J : Type w
C : Type u
inst✝² : Category C
D : Type u_1
inst✝¹ : Category D
B : D
objs : J → D
arrows : (j : J) → B ⟶ objs j
inst✝ : HasWidePushout B objs arrows
X : D
f : B ⟶ X
fs : (j : J) → objs j ⟶ X
w : ∀ (j : J), arrows j ≫ fs j = f
g1 g2 : widePushout B (fun j => objs j) arrows ⟶ X
h1 : ∀ (j : J), ι arrows j ≫ g1 = ι arrows j ≫ g2
h2 : head arrows ≫ g1 = head arrows ≫ g2
val✝ : J
⊢ colimit.ι (WidePushoutShape.wideSpan B (fun j => objs j) arrows) (some val✝) ≫ g1 =
    colimit.ι (WidePushoutShape.wideSpan B (fun j => objs j) arrows) (some val✝) ≫ g2
Theorem: star_ne_zero
File: Mathlib/Algebra/Star/Basic.lean

tactic: simp only [ne_eq, star_eq_zero]
state_before: R : Type u
inst✝¹ : AddMonoid R
inst✝ : StarAddMonoid R
x : R
⊢ star x ≠ 0 ↔ x ≠ 0
Theorem: CategoryTheory.Limits.PushoutCocone.op_snd
File: Mathlib/CategoryTheory/Limits/Opposites.lean

tactic: aesop_cat
state_before: C : Type u₁
inst✝¹ : Category C
J : Type u₂
inst✝ : Category J
X✝ : Type v₂
X Y Z : C
f : X ⟶ Y
g : X ⟶ Z
c : PushoutCocone f g
⊢ PullbackCone.snd (op c) = (inr c).op
Theorem: contravariant_flip_mul_iff
File: Mathlib/Algebra/CovariantAndContravariant.lean

tactic: rw [flip_mul]
state_before: M : Type ?u.7068
N : Type u_1
μ : M → N → N
r : N → N → Prop
inst✝ : CommSemigroup N
⊢ Contravariant N N (flip fun x x_1 => x * x_1) r ↔ Contravariant N N (fun x x_1 => x * x_1) r
Theorem: Finset.Ioi_insert
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: ext
state_before: ι : Type ?u.114646
α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : LocallyFiniteOrderTop α
inst✝ : DecidableEq α
a : α
⊢ insert a (Ioi a) = Ici a

tactic: simp_rw [Finset.mem_insert, mem_Ici, mem_Ioi, le_iff_lt_or_eq, or_comm, eq_comm]
state_before: case a
ι : Type ?u.114646
α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : LocallyFiniteOrderTop α
inst✝ : DecidableEq α
a a✝ : α
⊢ a✝ ∈ insert a (Ioi a) ↔ a✝ ∈ Ici a
Theorem: LocalizedModule.algebraMap_mk
File: Mathlib/Algebra/Module/LocalizedModule.lean

tactic: rw [Algebra.algebraMap_eq_smul_one]
state_before: R : Type u
inst✝⁴ : CommSemiring R
S : Submonoid R
M : Type v
inst✝³ : AddCommMonoid M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
a : R
s : { x // x ∈ S }
⊢ ↑(algebraMap (Localization S) (LocalizedModule S ((fun x => A) a))) (Localization.mk a s) = mk (↑(algebraMap R A) a) s

tactic: change _ • mk _ _ = _
state_before: R : Type u
inst✝⁴ : CommSemiring R
S : Submonoid R
M : Type v
inst✝³ : AddCommMonoid M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
a : R
s : { x // x ∈ S }
⊢ Localization.mk a s • 1 = mk (↑(algebraMap R A) a) s

tactic: rw [mk_smul_mk, Algebra.algebraMap_eq_smul_one, mul_one]
state_before: R : Type u
inst✝⁴ : CommSemiring R
S : Submonoid R
M : Type v
inst✝³ : AddCommMonoid M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
a : R
s : { x // x ∈ S }
⊢ Localization.mk a s • mk 1 1 = mk (↑(algebraMap R A) a) s
Theorem: mem_closedBall_iff_norm''
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: rw [mem_closedBall, dist_eq_norm_div]
state_before: 𝓕 : Type ?u.94329
𝕜 : Type ?u.94332
α : Type ?u.94335
ι : Type ?u.94338
κ : Type ?u.94341
E : Type u_1
F : Type ?u.94347
G : Type ?u.94350
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
⊢ b ∈ closedBall a r ↔ ‖b / a‖ ≤ r
Theorem: CancelDenoms.cancel_factors_eq_div
File: Mathlib/Tactic/CancelDenoms.lean

tactic: rwa [mul_comm] at h
state_before: α : Type u_1
inst✝ : Field α
n e e' : α
h : n * e = e'
h2 : n ≠ 0
⊢ e * n = e'
Theorem: MeasureTheory.Integrable.exists_boundedContinuous_integral_sub_le
File: Mathlib/MeasureTheory/Function/ContinuousMapDense.lean

tactic: simp only [← memℒp_one_iff_integrable, ← snorm_one_eq_lintegral_nnnorm, ← ENNReal.ofReal_one]
  at hf ⊢
state_before: α : Type u_1
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : NormalSpace α
inst✝³ : BorelSpace α
E : Type u_2
inst✝² : NormedAddCommGroup E
μ : Measure α
p : ℝ≥0∞
inst✝¹ : NormedSpace ℝ E
inst✝ : Measure.WeaklyRegular μ
f : α → E
hf : Integrable f
ε : ℝ
hε : 0 < ε
⊢ ∃ g, (∫ (x : α), ‖f x - ↑g x‖ ∂μ) ≤ ε ∧ Integrable ↑g

tactic: simpa using hf.exists_boundedContinuous_integral_rpow_sub_le zero_lt_one hε
state_before: α : Type u_1
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : NormalSpace α
inst✝³ : BorelSpace α
E : Type u_2
inst✝² : NormedAddCommGroup E
μ : Measure α
p : ℝ≥0∞
inst✝¹ : NormedSpace ℝ E
inst✝ : Measure.WeaklyRegular μ
f : α → E
ε : ℝ
hε : 0 < ε
hf : Memℒp f (ENNReal.ofReal 1)
⊢ ∃ g, (∫ (x : α), ‖f x - ↑g x‖ ∂μ) ≤ ε ∧ Memℒp (↑g) (ENNReal.ofReal 1)
Theorem: LinearMap.proj_comp_stdBasis
File: Mathlib/LinearAlgebra/StdBasis.lean

tactic: rw [stdBasis_eq_pi_diag, proj_pi]
state_before: R : Type u_2
ι : Type u_3
inst✝³ : Semiring R
φ : ι → Type u_1
inst✝² : (i : ι) → AddCommMonoid (φ i)
inst✝¹ : (i : ι) → Module R (φ i)
inst✝ : DecidableEq ι
i j : ι
⊢ comp (proj i) (stdBasis R φ j) = diag j i
Theorem: Int.cast_div_charZero
File: Mathlib/Data/Int/CharZero.lean

tactic: rcases eq_or_ne n 0 with (rfl | hn)
state_before: α : Type ?u.3615
k : Type u_1
inst✝¹ : DivisionRing k
inst✝ : CharZero k
m n : ℤ
n_dvd : n ∣ m
⊢ ↑(m / n) = ↑m / ↑n

tactic: simp [Int.ediv_zero]
state_before: case inl
α : Type ?u.3615
k : Type u_1
inst✝¹ : DivisionRing k
inst✝ : CharZero k
m : ℤ
n_dvd : 0 ∣ m
⊢ ↑(m / 0) = ↑m / ↑0

tactic: exact cast_div n_dvd (cast_ne_zero.mpr hn)
state_before: case inr
α : Type ?u.3615
k : Type u_1
inst✝¹ : DivisionRing k
inst✝ : CharZero k
m n : ℤ
n_dvd : n ∣ m
hn : n ≠ 0
⊢ ↑(m / n) = ↑m / ↑n
Theorem: FreeAbelianGroup.toFinsupp_of
File: Mathlib/GroupTheory/FreeAbelianGroupFinsupp.lean

tactic: simp only [toFinsupp, lift.of]
state_before: X : Type u_1
x : X
⊢ ↑toFinsupp (of x) = single x 1
Theorem: CategoryTheory.Subobject.factors_self
File: Mathlib/CategoryTheory/Subobject/FactorThru.lean

tactic: simp
state_before: C : Type u₁
inst✝¹ : Category C
X✝ Y Z : C
D : Type u₂
inst✝ : Category D
X : C
P : Subobject X
⊢ 𝟙 (underlying.obj P) ≫ MonoOver.arrow (representative.obj P) = arrow P
Theorem: Polynomial.rootMultiplicity_C
File: Mathlib/Data/Polynomial/Div.lean

tactic: simp only [rootMultiplicity_eq_zero_iff, IsRoot, eval_C, C_eq_zero, imp_self]
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]
r a : R
⊢ rootMultiplicity a (↑C r) = 0
Theorem: neg_one_lt_goldConj
File: Mathlib/Data/Real/GoldenRatio.lean

tactic: rw [neg_lt, ← inv_gold]
state_before: ⊢ -1 < ψ

tactic: exact inv_lt_one one_lt_gold
state_before: ⊢ φ⁻¹ < 1
Theorem: Int.two_mul_ediv_two_add_one_of_odd
File: Mathlib/Data/Int/Parity.lean

tactic: rintro ⟨c, rfl⟩
state_before: m n : ℤ
⊢ Odd n → 2 * (n / 2) + 1 = n

tactic: rw [mul_comm]
state_before: case intro
m c : ℤ
⊢ 2 * ((2 * c + 1) / 2) + 1 = 2 * c + 1

tactic: convert Int.ediv_add_emod' (2 * c + 1) 2
state_before: case intro
m c : ℤ
⊢ (2 * c + 1) / 2 * 2 + 1 = 2 * c + 1

tactic: simp [Int.add_emod]
state_before: case h.e'_2.h.e'_6
m c : ℤ
⊢ 1 = (2 * c + 1) % 2
Theorem: CategoryTheory.Limits.hasFiniteColimits_of_hasFiniteColimits_of_size
File: Mathlib/CategoryTheory/Limits/Shapes/FiniteLimits.lean

tactic: haveI := h (ULiftHom.{w} (ULift.{w} J)) <| @CategoryTheory.finCategoryUlift J hJ hhJ
state_before: C : Type u
inst✝ : Category C
h : ∀ (J : Type w) {𝒥 : SmallCategory J}, FinCategory J → HasColimitsOfShape J C
J : Type
hJ : SmallCategory J
hhJ : FinCategory J
⊢ HasColimitsOfShape J C

tactic: have l :
  @Equivalence J (ULiftHom (ULift J)) hJ (@ULiftHom.category (ULift J) (@uliftCategory J hJ))
  := @ULiftHomULiftCategory.equiv J hJ
state_before: C : Type u
inst✝ : Category C
h : ∀ (J : Type w) {𝒥 : SmallCategory J}, FinCategory J → HasColimitsOfShape J C
J : Type
hJ : SmallCategory J
hhJ : FinCategory J
this : HasColimitsOfShape (ULiftHom (ULift J)) C
⊢ HasColimitsOfShape J C

tactic: apply @hasColimitsOfShape_of_equivalence (ULiftHom (ULift J))
  (@ULiftHom.category (ULift J) (@uliftCategory J hJ)) C _ J hJ
  (@Equivalence.symm J hJ (ULiftHom (ULift J))
  (@ULiftHom.category (ULift J) (@uliftCategory J hJ)) l) _
state_before: C : Type u
inst✝ : Category C
h : ∀ (J : Type w) {𝒥 : SmallCategory J}, FinCategory J → HasColimitsOfShape J C
J : Type
hJ : SmallCategory J
hhJ : FinCategory J
this : HasColimitsOfShape (ULiftHom (ULift J)) C
l : J ≌ ULiftHom (ULift J)
⊢ HasColimitsOfShape J C
Theorem: Complex.exp_re
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [exp_eq_exp_re_mul_sin_add_cos]
state_before: x y : ℂ
⊢ (exp x).re = Real.exp x.re * Real.cos x.im

tactic: simp [exp_ofReal_re, cos_ofReal_re]
state_before: x y : ℂ
⊢ (exp ↑x.re * (cos ↑x.im + sin ↑x.im * I)).re = Real.exp x.re * Real.cos x.im
Theorem: Equiv.Perm.IsCycle.of_pow
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: have key : ∀ x : α, (f ^ n) x ≠ x ↔ f x ≠ x := by
  simp_rw [← mem_support, ← Finset.ext_iff]
  exact (support_pow_le _ n).antisymm h2
state_before: ι : Type ?u.1024464
α : Type u_1
β : Type ?u.1024470
f g : Perm α
x y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h1 : IsCycle (f ^ n)
h2 : support f ⊆ support (f ^ n)
⊢ IsCycle f

tactic: obtain ⟨x, hx1, hx2⟩ := h1
state_before: ι : Type ?u.1024464
α : Type u_1
β : Type ?u.1024470
f g : Perm α
x y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h1 : IsCycle (f ^ n)
h2 : support f ⊆ support (f ^ n)
key : ∀ (x : α), ↑(f ^ n) x ≠ x ↔ ↑f x ≠ x
⊢ IsCycle f

tactic: refine' ⟨x, (key x).mp hx1, fun y hy => _⟩
state_before: case intro.intro
ι : Type ?u.1024464
α : Type u_1
β : Type ?u.1024470
f g : Perm α
x✝ y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h2 : support f ⊆ support (f ^ n)
key : ∀ (x : α), ↑(f ^ n) x ≠ x ↔ ↑f x ≠ x
x : α
hx1 : ↑(f ^ n) x ≠ x
hx2 : ∀ ⦃y : α⦄, ↑(f ^ n) y ≠ y → SameCycle (f ^ n) x y
⊢ IsCycle f

tactic: cases' hx2 ((key y).mpr hy) with i _
state_before: case intro.intro
ι : Type ?u.1024464
α : Type u_1
β : Type ?u.1024470
f g : Perm α
x✝ y✝ : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h2 : support f ⊆ support (f ^ n)
key : ∀ (x : α), ↑(f ^ n) x ≠ x ↔ ↑f x ≠ x
x : α
hx1 : ↑(f ^ n) x ≠ x
hx2 : ∀ ⦃y : α⦄, ↑(f ^ n) y ≠ y → SameCycle (f ^ n) x y
y : α
hy : ↑f y ≠ y
⊢ SameCycle f x y

tactic: exact ⟨n * i, by rwa [zpow_mul]⟩
state_before: case intro.intro.intro
ι : Type ?u.1024464
α : Type u_1
β : Type ?u.1024470
f g : Perm α
x✝ y✝ : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h2 : support f ⊆ support (f ^ n)
key : ∀ (x : α), ↑(f ^ n) x ≠ x ↔ ↑f x ≠ x
x : α
hx1 : ↑(f ^ n) x ≠ x
hx2 : ∀ ⦃y : α⦄, ↑(f ^ n) y ≠ y → SameCycle (f ^ n) x y
y : α
hy : ↑f y ≠ y
i : ℤ
h✝ : ↑((f ^ n) ^ i) x = y
⊢ SameCycle f x y

tactic: simp_rw [← mem_support, ← Finset.ext_iff]
state_before: ι : Type ?u.1024464
α : Type u_1
β : Type ?u.1024470
f g : Perm α
x y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h1 : IsCycle (f ^ n)
h2 : support f ⊆ support (f ^ n)
⊢ ∀ (x : α), ↑(f ^ n) x ≠ x ↔ ↑f x ≠ x

tactic: exact (support_pow_le _ n).antisymm h2
state_before: ι : Type ?u.1024464
α : Type u_1
β : Type ?u.1024470
f g : Perm α
x y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h1 : IsCycle (f ^ n)
h2 : support f ⊆ support (f ^ n)
⊢ support (f ^ n) = support f

tactic: rwa [zpow_mul]
state_before: ι : Type ?u.1024464
α : Type u_1
β : Type ?u.1024470
f g : Perm α
x✝ y✝ : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h2 : support f ⊆ support (f ^ n)
key : ∀ (x : α), ↑(f ^ n) x ≠ x ↔ ↑f x ≠ x
x : α
hx1 : ↑(f ^ n) x ≠ x
hx2 : ∀ ⦃y : α⦄, ↑(f ^ n) y ≠ y → SameCycle (f ^ n) x y
y : α
hy : ↑f y ≠ y
i : ℤ
h✝ : ↑((f ^ n) ^ i) x = y
⊢ ↑(f ^ (↑n * i)) x = y
Theorem: HasFDerivAt.lim_real
File: Mathlib/Analysis/Calculus/FDeriv/Equiv.lean

tactic: apply hf.lim v
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : E → F
f' : E →L[ℝ] F
x : E
hf : HasFDerivAt f f' x
v : E
⊢ Tendsto (fun c => c • (f (x + c⁻¹ • v) - f x)) atTop (𝓝 (↑f' v))

tactic: rw [tendsto_atTop_atTop]
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : E → F
f' : E →L[ℝ] F
x : E
hf : HasFDerivAt f f' x
v : E
⊢ Tendsto (fun n => ‖n‖) atTop atTop

tactic: exact fun b => ⟨b, fun a ha => le_trans ha (le_abs_self _)⟩
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : E → F
f' : E →L[ℝ] F
x : E
hf : HasFDerivAt f f' x
v : E
⊢ ∀ (b : ℝ), ∃ i, ∀ (a : ℝ), i ≤ a → b ≤ ‖a‖