tasksource/leandojo huggingface dataset:
Theorem: NormedCommGroup.nhds_one_basis_norm_lt
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: convert NormedCommGroup.nhds_basis_norm_lt (1 : E)
state_before: 𝓕 : Type ?u.129849
𝕜 : Type ?u.129852
α : Type ?u.129855
ι : Type ?u.129858
κ : Type ?u.129861
E : Type u_1
F : Type ?u.129867
G : Type ?u.129870
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
⊢ HasBasis (𝓝 1) (fun ε => 0 < ε) fun ε => {y | ‖y‖ < ε}

tactic: simp
state_before: case h.e'_5.h.h.e'_2.h.h.e'_3.h.e'_3
𝓕 : Type ?u.129849
𝕜 : Type ?u.129852
α : Type ?u.129855
ι : Type ?u.129858
κ : Type ?u.129861
E : Type u_1
F : Type ?u.129867
G : Type ?u.129870
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ x✝¹ : ℝ
x✝ : E
⊢ x✝ = x✝ / 1
Theorem: Set.star_mem_star
File: Mathlib/Algebra/Star/Pointwise.lean

tactic: simp only [mem_star, star_star]
state_before: α : Type u_1
s t : Set α
a : α
inst✝ : InvolutiveStar α
⊢ a⋆ ∈ s⋆ ↔ a ∈ s
Theorem: LocalHomeomorph.extend_symm_continuousWithinAt_comp_right_iff
File: Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean

tactic: rw [← I.symm_continuousWithinAt_comp_right_iff]
state_before: 𝕜 : Type u_4
E : Type u_3
M : Type u_2
H : Type u_5
E' : Type ?u.146554
M' : Type ?u.146557
H' : Type ?u.146560
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
f f' : LocalHomeomorph M H
I : ModelWithCorners 𝕜 E H
inst✝⁴ : NormedAddCommGroup E'
inst✝³ : NormedSpace 𝕜 E'
inst✝² : TopologicalSpace H'
inst✝¹ : TopologicalSpace M'
I' : ModelWithCorners 𝕜 E' H'
x✝ : M
s✝ t : Set M
X : Type u_1
inst✝ : TopologicalSpace X
g : M → X
s : Set M
x : M
⊢ ContinuousWithinAt (g ∘ ↑(LocalEquiv.symm (extend f I))) (↑(LocalEquiv.symm (extend f I)) ⁻¹' s ∩ range ↑I)
      (↑(extend f I) x) ↔
    ContinuousWithinAt (g ∘ ↑(LocalHomeomorph.symm f)) (↑(LocalHomeomorph.symm f) ⁻¹' s) (↑f x)

tactic: rfl
state_before: 𝕜 : Type u_4
E : Type u_3
M : Type u_2
H : Type u_5
E' : Type ?u.146554
M' : Type ?u.146557
H' : Type ?u.146560
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
f f' : LocalHomeomorph M H
I : ModelWithCorners 𝕜 E H
inst✝⁴ : NormedAddCommGroup E'
inst✝³ : NormedSpace 𝕜 E'
inst✝² : TopologicalSpace H'
inst✝¹ : TopologicalSpace M'
I' : ModelWithCorners 𝕜 E' H'
x✝ : M
s✝ t : Set M
X : Type u_1
inst✝ : TopologicalSpace X
g : M → X
s : Set M
x : M
⊢ ContinuousWithinAt (g ∘ ↑(LocalEquiv.symm (extend f I))) (↑(LocalEquiv.symm (extend f I)) ⁻¹' s ∩ range ↑I)
      (↑(extend f I) x) ↔
    ContinuousWithinAt ((g ∘ ↑(LocalHomeomorph.symm f)) ∘ ↑(ModelWithCorners.symm I))
      (↑(ModelWithCorners.symm I) ⁻¹' (↑(LocalHomeomorph.symm f) ⁻¹' s) ∩ range ↑I) (↑I (↑f x))
Theorem: HomologicalComplex.single_map_f_self
File: Mathlib/Algebra/Homology/Single.lean

tactic: simp
state_before: V : Type u
inst✝³ : Category V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A B : V
f : A ⟶ B
⊢ Hom.f ((single V c j).map f) j = (singleObjXSelf V c j A).hom ≫ f ≫ (singleObjXSelf V c j B).inv
Theorem: TopCat.Presheaf.pushforward_eq'_hom_app
File: Mathlib/Topology/Sheaves/Presheaf.lean

tactic: rw [h]
state_before: C : Type u
inst✝ : Category C
X Y : TopCat
f g : X ⟶ Y
h : f = g
ℱ : Presheaf C X
U : (Opens ↑Y)ᵒᵖ
⊢ (Functor.op (Opens.map f)).obj U = (Functor.op (Opens.map g)).obj U

tactic: rw [eqToHom_app, eqToHom_map]
state_before: C : Type u
inst✝ : Category C
X Y : TopCat
f g : X ⟶ Y
h : f = g
ℱ : Presheaf C X
U : (Opens ↑Y)ᵒᵖ
⊢ (eqToHom (_ : f _* ℱ = g _* ℱ)).app U =
    ℱ.map (eqToHom (_ : (Functor.op (Opens.map f)).obj U = (Functor.op (Opens.map g)).obj U))
Theorem: Set.Icc_prod_eq
File: Mathlib/Data/Set/Intervals/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
a b : α × β
⊢ Icc a b = Icc a.fst b.fst ×ˢ Icc a.snd b.snd
Theorem: Sym2.rel_iff
File: Mathlib/Data/Sym/Sym2.lean

tactic: aesop (rule_sets [Sym2])
state_before: α : Type u_1
β : Type ?u.1901
γ : Type ?u.1904
x y z w : α
⊢ Rel α (x, y) (z, w) ↔ x = z ∧ y = w ∨ x = w ∧ y = z
Theorem: Nat.modEq_digits_sum
File: Mathlib/Data/Nat/Digits.lean

tactic: rw [← ofDigits_one]
state_before: n✝ b b' : ℕ
h : b' % b = 1
n : ℕ
⊢ n ≡ List.sum (digits b' n) [MOD b]

tactic: convert ofDigits_modEq b' b (digits b' n)
state_before: n✝ b b' : ℕ
h : b' % b = 1
n : ℕ
⊢ ofDigits b' (digits b' n) ≡ ofDigits 1 (digits b' n) [MOD b]

tactic: exact h.symm
state_before: case h.e'_3.h.e'_3
n✝ b b' : ℕ
h : b' % b = 1
n : ℕ
⊢ 1 = b' % b
Theorem: Std.RBNode.Ordered.setRed
File: Std/Data/RBMap/WF.lean

tactic: unfold setRed
state_before: α : Type u_1
cmp : α → α → Ordering
t : RBNode α
⊢ Ordered cmp (setRed t) ↔ Ordered cmp t

tactic: split <;> simp [Ordered]
state_before: α : Type u_1
cmp : α → α → Ordering
t : RBNode α
⊢ Ordered cmp
      (match t with
      | node c a v b => node red a v b
      | nil => nil) ↔
    Ordered cmp t
Theorem: Ordinal.add_log_le_log_mul
File: Mathlib/SetTheory/Ordinal/Exponential.lean

tactic: by_cases hb : 1 < b
state_before: x y b : Ordinal
hx : x ≠ 0
hy : y ≠ 0
⊢ log b x + log b y ≤ log b (x * y)

tactic: simp only [log_of_not_one_lt_left hb, zero_add, le_refl]
state_before: case neg
x y b : Ordinal
hx : x ≠ 0
hy : y ≠ 0
hb : ¬1 < b
⊢ log b x + log b y ≤ log b (x * y)

tactic: rw [← opow_le_iff_le_log hb (mul_ne_zero hx hy), opow_add]
state_before: case pos
x y b : Ordinal
hx : x ≠ 0
hy : y ≠ 0
hb : 1 < b
⊢ log b x + log b y ≤ log b (x * y)

tactic: exact mul_le_mul' (opow_log_le_self b hx) (opow_log_le_self b hy)
state_before: case pos
x y b : Ordinal
hx : x ≠ 0
hy : y ≠ 0
hb : 1 < b
⊢ b ^ log b x * b ^ log b y ≤ x * y
Theorem: Associated.of_mul_right
File: Mathlib/Algebra/Associated.lean

tactic: rw [mul_comm a, mul_comm c]
state_before: α : Type u_1
β : Type ?u.231684
γ : Type ?u.231687
δ : Type ?u.231690
inst✝ : CancelCommMonoidWithZero α
a b c d : α
⊢ a * b ~ᵤ c * d → b ~ᵤ d → b ≠ 0 → a ~ᵤ c

tactic: exact Associated.of_mul_left
state_before: α : Type u_1
β : Type ?u.231684
γ : Type ?u.231687
δ : Type ?u.231690
inst✝ : CancelCommMonoidWithZero α
a b c d : α
⊢ b * a ~ᵤ d * c → b ~ᵤ d → b ≠ 0 → a ~ᵤ c
Theorem: Rat.mkRat_mul_left
File: Std/Data/Rat/Lemmas.lean

tactic: if d0 : d = 0 then simp [d0] else
rw [← normalize_eq_mkRat d0, ← normalize_mul_left d0 a0, normalize_eq_mkRat]
state_before: n : Int
d a : Nat
a0 : a ≠ 0
⊢ mkRat (↑a * n) (a * d) = mkRat n d

tactic: simp [d0]
state_before: n : Int
d a : Nat
a0 : a ≠ 0
d0 : d = 0
⊢ mkRat (↑a * n) (a * d) = mkRat n d

tactic: rw [← normalize_eq_mkRat d0, ← normalize_mul_left d0 a0, normalize_eq_mkRat]
state_before: n : Int
d a : Nat
a0 : a ≠ 0
d0 : ¬d = 0
⊢ mkRat (↑a * n) (a * d) = mkRat n d
Theorem: ExceptT.seqRight_eq
File: src/lean/Init/Control/Lawful.lean

tactic: show (x >>= fun _ => y) = (const α id <$> x) >>= fun f => f <$> y
state_before: m : Type u_1 → Type u_2
ε α β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x : ExceptT ε m α
y : ExceptT ε m β
⊢ (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y

tactic: rw [← ExceptT.bind_pure_comp]
state_before: m : Type u_1 → Type u_2
ε α β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x : ExceptT ε m α
y : ExceptT ε m β
⊢ (do
      let _ ← x
      y) =
    do
    let f ← const α id <$> x
    f <$> y

tactic: apply ext
state_before: m : Type u_1 → Type u_2
ε α β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x : ExceptT ε m α
y : ExceptT ε m β
⊢ (do
      let _ ← x
      y) =
    do
    let f ← x >>= pure ∘ const α id
    f <$> y

tactic: simp [run_bind]
state_before: case h
m : Type u_1 → Type u_2
ε α β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x : ExceptT ε m α
y : ExceptT ε m β
⊢ (run do
      let _ ← x
      y) =
    run do
      let f ← x >>= pure ∘ const α id
      f <$> y

tactic: apply bind_congr
state_before: case h
m : Type u_1 → Type u_2
ε α β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x : ExceptT ε m α
y : ExceptT ε m β
⊢ (do
      let x ← run x
      match x with
        | Except.ok x => run y
        | Except.error e => pure (Except.error e)) =
    do
    let x ← run x
    let x ←
      match x with
        | Except.ok x => pure (Except.ok id)
        | Except.error e => pure (Except.error e)
    match x with
      | Except.ok x => Except.map x <$> run y
      | Except.error e => pure (Except.error e)

tactic: intro a
state_before: case h.h
m : Type u_1 → Type u_2
ε α β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x : ExceptT ε m α
y : ExceptT ε m β
⊢ ∀ (a : Except ε α),
    (match a with
      | Except.ok x => run y
      | Except.error e => pure (Except.error e)) =
      do
      let x ←
        match a with
          | Except.ok x => pure (Except.ok id)
          | Except.error e => pure (Except.error e)
      match x with
        | Except.ok x => Except.map x <$> run y
        | Except.error e => pure (Except.error e)

tactic: cases a <;> simp
state_before: case h.h
m : Type u_1 → Type u_2
ε α β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x : ExceptT ε m α
y : ExceptT ε m β
a : Except ε α
⊢ (match a with
    | Except.ok x => run y
    | Except.error e => pure (Except.error e)) =
    do
    let x ←
      match a with
        | Except.ok x => pure (Except.ok id)
        | Except.error e => pure (Except.error e)
    match x with
      | Except.ok x => Except.map x <$> run y
      | Except.error e => pure (Except.error e)
Theorem: MeasureTheory.set_integral_le_nonneg
File: Mathlib/MeasureTheory/Integral/SetIntegral.lean

tactic: rw [← integral_indicator hs, ←
  integral_indicator (stronglyMeasurable_const.measurableSet_le hf)]
state_before: α : Type u_1
β : Type ?u.293768
E : Type ?u.293771
F : Type ?u.293774
inst✝ : MeasurableSpace α
μ : Measure α
f : α → ℝ
s✝ s : Set α
hs : MeasurableSet s
hf : StronglyMeasurable f
hfi : Integrable f
⊢ (∫ (x : α) in s, f x ∂μ) ≤ ∫ (x : α) in {y | 0 ≤ f y}, f x ∂μ

tactic: exact
  integral_mono (hfi.indicator hs)
    (hfi.indicator (stronglyMeasurable_const.measurableSet_le hf))
    (indicator_le_indicator_nonneg s f)
state_before: α : Type u_1
β : Type ?u.293768
E : Type ?u.293771
F : Type ?u.293774
inst✝ : MeasurableSpace α
μ : Measure α
f : α → ℝ
s✝ s : Set α
hs : MeasurableSet s
hf : StronglyMeasurable f
hfi : Integrable f
⊢ (∫ (x : α), indicator s (fun x => f x) x ∂μ) ≤ ∫ (x : α), indicator {a | 0 ≤ f a} (fun x => f x) x ∂μ
Theorem: Asymptotics.isBigOWith_top
File: Mathlib/Analysis/Asymptotics/Asymptotics.lean

tactic: rw [IsBigOWith_def]
state_before: α : Type u_1
β : Type ?u.284830
E : Type u_2
F : Type u_3
G : Type ?u.284839
E' : Type ?u.284842
F' : Type ?u.284845
G' : Type ?u.284848
E'' : Type ?u.284851
F'' : Type ?u.284854
G'' : Type ?u.284857
R : Type ?u.284860
R' : Type ?u.284863
𝕜 : Type ?u.284866
𝕜' : Type ?u.284869
inst✝¹² : Norm E
inst✝¹¹ : Norm F
inst✝¹⁰ : Norm G
inst✝⁹ : SeminormedAddCommGroup E'
inst✝⁸ : SeminormedAddCommGroup F'
inst✝⁷ : SeminormedAddCommGroup G'
inst✝⁶ : NormedAddCommGroup E''
inst✝⁵ : NormedAddCommGroup F''
inst✝⁴ : NormedAddCommGroup G''
inst✝³ : SeminormedRing R
inst✝² : SeminormedRing R'
inst✝¹ : NormedField 𝕜
inst✝ : NormedField 𝕜'
c c' c₁ c₂ : ℝ
f : α → E
g : α → F
k : α → G
f' : α → E'
g' : α → F'
k' : α → G'
f'' : α → E''
g'' : α → F''
k'' : α → G''
l l' : Filter α
⊢ IsBigOWith c ⊤ f g ↔ ∀ (x : α), ‖f x‖ ≤ c * ‖g x‖

tactic: rfl
state_before: α : Type u_1
β : Type ?u.284830
E : Type u_2
F : Type u_3
G : Type ?u.284839
E' : Type ?u.284842
F' : Type ?u.284845
G' : Type ?u.284848
E'' : Type ?u.284851
F'' : Type ?u.284854
G'' : Type ?u.284857
R : Type ?u.284860
R' : Type ?u.284863
𝕜 : Type ?u.284866
𝕜' : Type ?u.284869
inst✝¹² : Norm E
inst✝¹¹ : Norm F
inst✝¹⁰ : Norm G
inst✝⁹ : SeminormedAddCommGroup E'
inst✝⁸ : SeminormedAddCommGroup F'
inst✝⁷ : SeminormedAddCommGroup G'
inst✝⁶ : NormedAddCommGroup E''
inst✝⁵ : NormedAddCommGroup F''
inst✝⁴ : NormedAddCommGroup G''
inst✝³ : SeminormedRing R
inst✝² : SeminormedRing R'
inst✝¹ : NormedField 𝕜
inst✝ : NormedField 𝕜'
c c' c₁ c₂ : ℝ
f : α → E
g : α → F
k : α → G
f' : α → E'
g' : α → F'
k' : α → G'
f'' : α → E''
g'' : α → F''
k'' : α → G''
l l' : Filter α
⊢ (∀ᶠ (x : α) in ⊤, ‖f x‖ ≤ c * ‖g x‖) ↔ ∀ (x : α), ‖f x‖ ≤ c * ‖g x‖
Theorem: List.mapIdxM_eq_mmap_enum
File: Mathlib/Data/List/Indexes.lean

tactic: simp only [mapIdxM, mapIdxMGo_eq_mapIdxMAuxSpec, Array.toList_eq, Array.data_toArray,
  nil_append, mapIdxMAuxSpec, Array.size_toArray, length_nil, id_map', enum]
state_before: α✝ : Type u
β✝ : Type v
m : Type u → Type v
inst✝¹ : Monad m
inst✝ : LawfulMonad m
α : Type u_1
β : Type u
f : ℕ → α → m β
as : List α
⊢ mapIdxM as f = List.traverse (uncurry f) (enum as)
Theorem: Primrec.vector_get
File: Mathlib/Computability/Primrec.lean

tactic: rw [Vector.get_eq_get, ← List.get?_eq_get]
state_before: α : Type u_1
β : Type ?u.364270
γ : Type ?u.364273
σ : Type ?u.364276
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
n : ℕ
a : Vector α n × Fin n
⊢ List.get? (Vector.toList a.fst) ↑a.snd = some (Vector.get a.fst a.snd)

tactic: rfl
state_before: α : Type u_1
β : Type ?u.364270
γ : Type ?u.364273
σ : Type ?u.364276
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
n : ℕ
a : Vector α n × Fin n
⊢ List.get? (Vector.toList a.fst) ↑a.snd =
    List.get? (Vector.toList a.fst) ↑(↑(Fin.cast (_ : n = List.length (Vector.toList a.fst))) a.snd)
Theorem: List.indexOf_cons_eq
File: Mathlib/Data/List/Basic.lean

tactic: rw [e]
state_before: ι : Type ?u.77884
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : DecidableEq α
a b : α
l : List α
x✝ : a = b
e : a = b := x✝
⊢ indexOf a (b :: l) = 0

tactic: exact indexOf_cons_self b l
state_before: ι : Type ?u.77884
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : DecidableEq α
a b : α
l : List α
x✝ : a = b
e : a = b := x✝
⊢ indexOf b (b :: l) = 0
Theorem: Wbtw.map
File: Mathlib/Analysis/Convex/Between.lean

tactic: rw [Wbtw, ← affineSegment_image]
state_before: R : Type u_1
V : Type u_2
V' : Type u_4
P : Type u_3
P' : Type u_5
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x y z : P
h : Wbtw R x y z
f : P →ᵃ[R] P'
⊢ Wbtw R (↑f x) (↑f y) (↑f z)

tactic: exact Set.mem_image_of_mem _ h
state_before: R : Type u_1
V : Type u_2
V' : Type u_4
P : Type u_3
P' : Type u_5
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x y z : P
h : Wbtw R x y z
f : P →ᵃ[R] P'
⊢ ↑f y ∈ ↑f '' affineSegment R x z
Theorem: Submodule.toSubalgebra_mk
File: Mathlib/Algebra/Algebra/Subalgebra/Basic.lean

tactic: intro r
state_before: R : Type ?u.480281
A : Type ?u.480284
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p s : Submodule R A
h1 : 1 ∈ s
hmul : ∀ (x y : A), x ∈ s → y ∈ s → x * y ∈ s
⊢ ∀ (r : R),
    ↑(algebraMap R A) r ∈
      { toSubmonoid := { toSubsemigroup := { carrier := ↑s, mul_mem' := hmul }, one_mem' := h1 },
              add_mem' := (_ : ∀ {a b : A}, a ∈ s → b ∈ s → a + b ∈ s),
              zero_mem' := (_ : 0 ∈ s) }.toSubmonoid.toSubsemigroup.carrier

tactic: rw [Algebra.algebraMap_eq_smul_one]
state_before: R : Type ?u.480281
A : Type ?u.480284
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p s : Submodule R A
h1 : 1 ∈ s
hmul : ∀ (x y : A), x ∈ s → y ∈ s → x * y ∈ s
r : R
⊢ ↑(algebraMap R A) r ∈
    { toSubmonoid := { toSubsemigroup := { carrier := ↑s, mul_mem' := hmul }, one_mem' := h1 },
            add_mem' := (_ : ∀ {a b : A}, a ∈ s → b ∈ s → a + b ∈ s),
            zero_mem' := (_ : 0 ∈ s) }.toSubmonoid.toSubsemigroup.carrier

tactic: apply s.smul_mem _ h1
state_before: R : Type ?u.480281
A : Type ?u.480284
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p s : Submodule R A
h1 : 1 ∈ s
hmul : ∀ (x y : A), x ∈ s → y ∈ s → x * y ∈ s
r : R
⊢ r • 1 ∈
    { toSubmonoid := { toSubsemigroup := { carrier := ↑s, mul_mem' := hmul }, one_mem' := h1 },
            add_mem' := (_ : ∀ {a b : A}, a ∈ s → b ∈ s → a + b ∈ s),
            zero_mem' := (_ : 0 ∈ s) }.toSubmonoid.toSubsemigroup.carrier
Theorem: ZNum.cast_bitm1
File: Mathlib/Data/Num/Lemmas.lean

tactic: conv =>
  lhs
  rw [← zneg_zneg n]
state_before: α : Type u_1
inst✝ : AddGroupWithOne α
n : ZNum
⊢ ↑(ZNum.bitm1 n) = _root_.bit0 ↑n - 1

tactic: rw [← zneg_bit1, cast_zneg, cast_bit1]
state_before: α : Type u_1
inst✝ : AddGroupWithOne α
n : ZNum
⊢ ↑(ZNum.bitm1 (- -n)) = _root_.bit0 ↑n - 1

tactic: have : ((-1 + n + n : ℤ) : α) = (n + n + -1 : ℤ) := by simp [add_comm, add_left_comm]
state_before: α : Type u_1
inst✝ : AddGroupWithOne α
n : ZNum
⊢ -_root_.bit1 ↑(-n) = _root_.bit0 ↑n - 1

tactic: simpa [_root_.bit1, _root_.bit0, sub_eq_add_neg] using this
state_before: α : Type u_1
inst✝ : AddGroupWithOne α
n : ZNum
this : ↑(-1 + ↑n + ↑n) = ↑(↑n + ↑n + -1)
⊢ -_root_.bit1 ↑(-n) = _root_.bit0 ↑n - 1

tactic: simp [add_comm, add_left_comm]
state_before: α : Type u_1
inst✝ : AddGroupWithOne α
n : ZNum
⊢ ↑(-1 + ↑n + ↑n) = ↑(↑n + ↑n + -1)
Theorem: Finset.filter_True
File: Mathlib/Data/Finset/Basic.lean

tactic: ext
state_before: α : Type u_1
β : Type ?u.320628
γ : Type ?u.320631
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s : Finset α
⊢ filter (fun x => True) s = s

tactic: simp
state_before: case a
α : Type u_1
β : Type ?u.320628
γ : Type ?u.320631
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s : Finset α
a✝ : α
⊢ a✝ ∈ filter (fun x => True) s ↔ a✝ ∈ s
Theorem: Int.tendsto_zmultiplesHom_cofinite
File: Mathlib/Topology/Instances/Real.lean

tactic: convert (tendsto_cocompact_mul_right₀ ha).comp Int.tendsto_coe_cofinite
state_before: α : Type u
β : Type v
γ : Type w
a : ℝ
ha : a ≠ 0
⊢ Tendsto (↑(↑(zmultiplesHom ℝ) a)) cofinite (cocompact ℝ)

tactic: ext n
state_before: case h.e'_3
α : Type u
β : Type v
γ : Type w
a : ℝ
ha : a ≠ 0
⊢ ↑(↑(zmultiplesHom ℝ) a) = (fun x => x * a) ∘ Int.cast

tactic: simp
state_before: case h.e'_3.h
α : Type u
β : Type v
γ : Type w
a : ℝ
ha : a ≠ 0
n : ℤ
⊢ ↑(↑(zmultiplesHom ℝ) a) n = ((fun x => x * a) ∘ Int.cast) n
Theorem: Polynomial.natDegree_prod_of_monic
File: Mathlib/Algebra/Polynomial/BigOperators.lean

tactic: simpa using natDegree_multiset_prod_of_monic (s.1.map f) (by simpa using h)
state_before: R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t : Multiset R[X]
h : ∀ (i : ι), i ∈ s → Monic (f i)
⊢ natDegree (∏ i in s, f i) = ∑ i in s, natDegree (f i)

tactic: simpa using h
state_before: R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t : Multiset R[X]
h : ∀ (i : ι), i ∈ s → Monic (f i)
⊢ ∀ (f_1 : R[X]), f_1 ∈ Multiset.map f s.val → Monic f_1
Theorem: integral_cos
File: Mathlib/Analysis/SpecialFunctions/Integrals.lean

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

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

tactic: simp only [differentiableAt_sin, implies_true]
state_before: case hdiff
a b : ℝ
n : ℕ
⊢ ∀ (x : ℝ), x ∈ [[a, b]] → DifferentiableAt ℝ sin x

tactic: exact continuousOn_cos
state_before: case hcont
a b : ℝ
n : ℕ
⊢ ContinuousOn (fun x => cos x) [[a, b]]
Theorem: Array.getElem?_eq_data_get?
File: Std/Data/Array/Lemmas.lean

tactic: by_cases i < a.size <;> simp_all [getElem?_pos, getElem?_neg, List.get?_eq_get, eq_comm]
state_before: α : Type u_1
a : Array α
i : Nat
⊢ a[i]? = List.get? a.data i

tactic: rfl
state_before: case pos
α : Type u_1
a : Array α
i : Nat
h✝¹ h✝ : i < size a
⊢ List.get a.data { val := i, isLt := (_ : i < size a) } = a[i]
Theorem: String.firstDiffPos_eq
File: Std/Data/String/Lemmas.lean

tactic: simpa [firstDiffPos] using
  firstDiffPos_loop_eq [] [] a.1 b.1 ((utf8Len a.1).min (utf8Len b.1)) 0 rfl rfl (by simp)
state_before: a b : String
⊢ firstDiffPos a b = { byteIdx := utf8Len (List.takeWhile₂ (fun x x_1 => decide (x = x_1)) a.data b.data).fst }

tactic: simp
state_before: a b : String
⊢ Nat.min (utf8Len a.data) (utf8Len b.data) = min (utf8Len [] + utf8Len a.data) (utf8Len [] + utf8Len b.data)
Theorem: PGame.Subsequent.moveRight_mk_left
File: Mathlib/SetTheory/Game/PGame.lean

tactic: pgame_wf_tac
state_before: xl : Type u_1
i : xl
xr : Type u_1
xR : xr → PGame
xL : xl → PGame
j : RightMoves (xL i)
⊢ Subsequent (PGame.moveRight (xL i) j) (mk xl xr xL xR)
Theorem: OmegaCompletePartialOrder.ContinuousHom.map_continuous'
File: Mathlib/Order/OmegaCompletePartialOrder.lean

tactic: simp only [map_eq_bind_pure_comp]
state_before: α : Type u
α' : Type ?u.60176
β✝ : Type v
β' : Type ?u.60181
γ✝ : Type ?u.60184
φ : Type ?u.60187
inst✝⁵ : OmegaCompletePartialOrder α
inst✝⁴ : OmegaCompletePartialOrder β✝
inst✝³ : OmegaCompletePartialOrder γ✝
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
β γ : Type v
f : β → γ
g : α → Part β
hg : Continuous' g
⊢ Continuous' fun x => f <$> g x

tactic: apply bind_continuous' _ _ hg
state_before: α : Type u
α' : Type ?u.60176
β✝ : Type v
β' : Type ?u.60181
γ✝ : Type ?u.60184
φ : Type ?u.60187
inst✝⁵ : OmegaCompletePartialOrder α
inst✝⁴ : OmegaCompletePartialOrder β✝
inst✝³ : OmegaCompletePartialOrder γ✝
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
β γ : Type v
f : β → γ
g : α → Part β
hg : Continuous' g
⊢ Continuous' fun x => g x >>= pure ∘ f

tactic: apply const_continuous'
state_before: α : Type u
α' : Type ?u.60176
β✝ : Type v
β' : Type ?u.60181
γ✝ : Type ?u.60184
φ : Type ?u.60187
inst✝⁵ : OmegaCompletePartialOrder α
inst✝⁴ : OmegaCompletePartialOrder β✝
inst✝³ : OmegaCompletePartialOrder γ✝
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
β γ : Type v
f : β → γ
g : α → Part β
hg : Continuous' g
⊢ Continuous' fun x => pure ∘ f
Theorem: Set.sigma_inter_sigma
File: Mathlib/Data/Set/Sigma.lean

tactic: ext ⟨x, y⟩
state_before: ι : Type u_1
ι' : Type ?u.8988
α : ι → Type u_2
β : ι → Type ?u.8998
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
u : Set ((i : ι) × α i)
x : (i : ι) × α i
i j : ι
a : α i
⊢ Set.Sigma s₁ t₁ ∩ Set.Sigma s₂ t₂ = Set.Sigma (s₁ ∩ s₂) fun i => t₁ i ∩ t₂ i

tactic: simp [and_assoc, and_left_comm]
state_before: case h.mk
ι : Type u_1
ι' : Type ?u.8988
α : ι → Type u_2
β : ι → Type ?u.8998
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
u : Set ((i : ι) × α i)
x✝ : (i : ι) × α i
i j : ι
a : α i
x : ι
y : α x
⊢ { fst := x, snd := y } ∈ Set.Sigma s₁ t₁ ∩ Set.Sigma s₂ t₂ ↔
    { fst := x, snd := y } ∈ Set.Sigma (s₁ ∩ s₂) fun i => t₁ i ∩ t₂ i
Theorem: Polynomial.eq_of_monic_of_associated
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: obtain ⟨u, hu⟩ := hpq
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
hp : Monic p
hq : Monic q
hpq : Associated p q
⊢ p = q

tactic: unfold Monic at hp hq
state_before: case intro
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
hp : Monic p
hq : Monic q
u : R[X]ˣ
hu : p * ↑u = q
⊢ p = q

tactic: rw [eq_C_of_degree_le_zero (degree_coe_units _).le] at hu
state_before: case intro
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
hp : leadingCoeff p = 1
hq : leadingCoeff q = 1
u : R[X]ˣ
hu : p * ↑u = q
⊢ p = q

tactic: rw [← hu, leadingCoeff_mul, hp, one_mul, leadingCoeff_C] at hq
state_before: case intro
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
hp : leadingCoeff p = 1
hq : leadingCoeff q = 1
u : R[X]ˣ
hu : p * ↑C (coeff (↑u) 0) = q
⊢ p = q

tactic: rwa [hq, C_1, mul_one] at hu
state_before: case intro
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
hp : leadingCoeff p = 1
u : R[X]ˣ
hq : coeff (↑u) 0 = 1
hu : p * ↑C (coeff (↑u) 0) = q
⊢ p = q