tasksource/leandojo huggingface dataset:
Theorem: LocalHomeomorph.eventually_nhdsWithin
File: Mathlib/Topology/LocalHomeomorph.lean

tactic: refine' Iff.trans _ eventually_map
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.34147
δ : Type ?u.34150
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
e✝ : LocalHomeomorph α β
e' : LocalHomeomorph β γ
e : LocalHomeomorph α β
x : α
p : β → Prop
s : Set α
hx : x ∈ e.source
⊢ (∀ᶠ (y : β) in 𝓝[↑(LocalHomeomorph.symm e) ⁻¹' s] ↑e x, p y) ↔ ∀ᶠ (x : α) in 𝓝[s] x, p (↑e x)

tactic: rw [e.map_nhdsWithin_eq hx, e.image_source_inter_eq', e.nhdsWithin_target_inter (e.mapsTo hx)]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.34147
δ : Type ?u.34150
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
e✝ : LocalHomeomorph α β
e' : LocalHomeomorph β γ
e : LocalHomeomorph α β
x : α
p : β → Prop
s : Set α
hx : x ∈ e.source
⊢ (∀ᶠ (y : β) in 𝓝[↑(LocalHomeomorph.symm e) ⁻¹' s] ↑e x, p y) ↔ ∀ᶠ (b : β) in map (fun x => ↑e x) (𝓝[s] x), p b
Theorem: Polynomial.smul_eq_C_mul
File: Mathlib/Data/Polynomial/Coeff.lean

tactic: simp [ext_iff]
state_before: R : Type u
S : Type v
a✝ b : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
a : R
⊢ a • p = ↑C a * p
Theorem: MeasureTheory.Measure.restrict_union₀
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: simp [← restrict_union_add_inter₀ s ht, restrict_zero_set h]
state_before: α : Type u_1
β : Type ?u.296515
γ : Type ?u.296518
δ : Type ?u.296521
ι : Type ?u.296524
R : Type ?u.296527
R' : Type ?u.296530
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
h : AEDisjoint μ s t
ht : NullMeasurableSet t
⊢ restrict μ (s ∪ t) = restrict μ s + restrict μ t
Theorem: IsCompact.binary_compact_cover
File: Mathlib/Topology/Separation.lean

tactic: obtain ⟨O₁, O₂, h1O₁, h1O₂, h2O₁, h2O₂, hO⟩ :=
  isCompact_isCompact_separated (hK.diff hU) (hK.diff hV)
    (by rwa [disjoint_iff_inter_eq_empty, diff_inter_diff, diff_eq_empty])
state_before: α : Type u
β : Type v
inst✝³ : TopologicalSpace α
γ : Type ?u.133233
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : T2Space α
K U V : Set α
hK : IsCompact K
hU : IsOpen U
hV : IsOpen V
h2K : K ⊆ U ∪ V
⊢ ∃ K₁ K₂, IsCompact K₁ ∧ IsCompact K₂ ∧ K₁ ⊆ U ∧ K₂ ⊆ V ∧ K = K₁ ∪ K₂

tactic: exact
  ⟨_, _, hK.diff h1O₁, hK.diff h1O₂, by rwa [diff_subset_comm], by rwa [diff_subset_comm], by
    rw [← diff_inter, hO.inter_eq, diff_empty]⟩
state_before: case intro.intro.intro.intro.intro.intro
α : Type u
β : Type v
inst✝³ : TopologicalSpace α
γ : Type ?u.133233
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : T2Space α
K U V : Set α
hK : IsCompact K
hU : IsOpen U
hV : IsOpen V
h2K : K ⊆ U ∪ V
O₁ O₂ : Set α
h1O₁ : IsOpen O₁
h1O₂ : IsOpen O₂
h2O₁ : K \ U ⊆ O₁
h2O₂ : K \ V ⊆ O₂
hO : Disjoint O₁ O₂
⊢ ∃ K₁ K₂, IsCompact K₁ ∧ IsCompact K₂ ∧ K₁ ⊆ U ∧ K₂ ⊆ V ∧ K = K₁ ∪ K₂

tactic: rwa [disjoint_iff_inter_eq_empty, diff_inter_diff, diff_eq_empty]
state_before: α : Type u
β : Type v
inst✝³ : TopologicalSpace α
γ : Type ?u.133233
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : T2Space α
K U V : Set α
hK : IsCompact K
hU : IsOpen U
hV : IsOpen V
h2K : K ⊆ U ∪ V
⊢ Disjoint (K \ U) (K \ V)

tactic: rwa [diff_subset_comm]
state_before: α : Type u
β : Type v
inst✝³ : TopologicalSpace α
γ : Type ?u.133233
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : T2Space α
K U V : Set α
hK : IsCompact K
hU : IsOpen U
hV : IsOpen V
h2K : K ⊆ U ∪ V
O₁ O₂ : Set α
h1O₁ : IsOpen O₁
h1O₂ : IsOpen O₂
h2O₁ : K \ U ⊆ O₁
h2O₂ : K \ V ⊆ O₂
hO : Disjoint O₁ O₂
⊢ K \ O₁ ⊆ U

tactic: rwa [diff_subset_comm]
state_before: α : Type u
β : Type v
inst✝³ : TopologicalSpace α
γ : Type ?u.133233
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : T2Space α
K U V : Set α
hK : IsCompact K
hU : IsOpen U
hV : IsOpen V
h2K : K ⊆ U ∪ V
O₁ O₂ : Set α
h1O₁ : IsOpen O₁
h1O₂ : IsOpen O₂
h2O₁ : K \ U ⊆ O₁
h2O₂ : K \ V ⊆ O₂
hO : Disjoint O₁ O₂
⊢ K \ O₂ ⊆ V

tactic: rw [← diff_inter, hO.inter_eq, diff_empty]
state_before: α : Type u
β : Type v
inst✝³ : TopologicalSpace α
γ : Type ?u.133233
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : T2Space α
K U V : Set α
hK : IsCompact K
hU : IsOpen U
hV : IsOpen V
h2K : K ⊆ U ∪ V
O₁ O₂ : Set α
h1O₁ : IsOpen O₁
h1O₂ : IsOpen O₂
h2O₁ : K \ U ⊆ O₁
h2O₂ : K \ V ⊆ O₂
hO : Disjoint O₁ O₂
⊢ K = K \ O₁ ∪ K \ O₂
Theorem: padicValRat.padicValRat_le_padicValRat_iff
File: Mathlib/NumberTheory/Padics/PadicVal.lean

tactic: have hf1 : Finite (p : ℤ) (n₁ * d₂) := finite_int_prime_iff.2 (mul_ne_zero hn₁ hd₂)
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n₁ n₂ d₁ d₂ : ℤ
hn₁ : n₁ ≠ 0
hn₂ : n₂ ≠ 0
hd₁ : d₁ ≠ 0
hd₂ : d₂ ≠ 0
⊢ padicValRat p (n₁ /. d₁) ≤ padicValRat p (n₂ /. d₂) ↔ ∀ (n : ℕ), ↑p ^ n ∣ n₁ * d₂ → ↑p ^ n ∣ n₂ * d₁

tactic: have hf2 : Finite (p : ℤ) (n₂ * d₁) := finite_int_prime_iff.2 (mul_ne_zero hn₂ hd₁)
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n₁ n₂ d₁ d₂ : ℤ
hn₁ : n₁ ≠ 0
hn₂ : n₂ ≠ 0
hd₁ : d₁ ≠ 0
hd₂ : d₂ ≠ 0
hf1 : multiplicity.Finite (↑p) (n₁ * d₂)
⊢ padicValRat p (n₁ /. d₁) ≤ padicValRat p (n₂ /. d₂) ↔ ∀ (n : ℕ), ↑p ^ n ∣ n₁ * d₂ → ↑p ^ n ∣ n₂ * d₁

tactic: conv =>
  lhs
  rw [padicValRat.defn p (Rat.divInt_ne_zero_of_ne_zero hn₁ hd₁) rfl,
    padicValRat.defn p (Rat.divInt_ne_zero_of_ne_zero hn₂ hd₂) rfl, sub_le_iff_le_add', ←
    add_sub_assoc, _root_.le_sub_iff_add_le]
  norm_cast
  rw [← multiplicity.mul' (Nat.prime_iff_prime_int.1 hp.1) hf1, add_comm, ←
    multiplicity.mul' (Nat.prime_iff_prime_int.1 hp.1) hf2, PartENat.get_le_get,
    multiplicity_le_multiplicity_iff]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n₁ n₂ d₁ d₂ : ℤ
hn₁ : n₁ ≠ 0
hn₂ : n₂ ≠ 0
hd₁ : d₁ ≠ 0
hd₂ : d₂ ≠ 0
hf1 : multiplicity.Finite (↑p) (n₁ * d₂)
hf2 : multiplicity.Finite (↑p) (n₂ * d₁)
⊢ padicValRat p (n₁ /. d₁) ≤ padicValRat p (n₂ /. d₂) ↔ ∀ (n : ℕ), ↑p ^ n ∣ n₁ * d₂ → ↑p ^ n ∣ n₂ * d₁
Theorem: FirstOrder.Language.ElementaryEmbedding.theory_model_iff
File: Mathlib/ModelTheory/ElementaryMaps.lean

tactic: simp only [Theory.model_iff, f.map_sentence]
state_before: L : Language
M : Type u_3
N : Type u_4
P : Type ?u.262800
Q : Type ?u.262803
inst✝³ : Structure L M
inst✝² : Structure L N
inst✝¹ : Structure L P
inst✝ : Structure L Q
f : M ↪ₑ[L] N
T : Theory L
⊢ M ⊨ T ↔ N ⊨ T
Theorem: CategoryTheory.Sieve.functorPushforward_top
File: Mathlib/CategoryTheory/Sites/Sieves.lean

tactic: refine' (generate_sieve _).symm.trans _
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
F✝ : C ⥤ D
X✝ Y Z : C
f : Y ⟶ X✝
S R : Sieve X✝
E : Type u₃
inst✝ : Category E
G : D ⥤ E
F : C ⥤ D
X : C
⊢ functorPushforward F ⊤ = ⊤

tactic: apply generate_of_contains_isSplitEpi (𝟙 (F.obj X))
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
F✝ : C ⥤ D
X✝ Y Z : C
f : Y ⟶ X✝
S R : Sieve X✝
E : Type u₃
inst✝ : Category E
G : D ⥤ E
F : C ⥤ D
X : C
⊢ generate (functorPushforward F ⊤).arrows = ⊤

tactic: refine' ⟨X, 𝟙 _, 𝟙 _, trivial, by simp⟩
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
F✝ : C ⥤ D
X✝ Y Z : C
f : Y ⟶ X✝
S R : Sieve X✝
E : Type u₃
inst✝ : Category E
G : D ⥤ E
F : C ⥤ D
X : C
⊢ (functorPushforward F ⊤).arrows (𝟙 (F.obj X))

tactic: simp
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
F✝ : C ⥤ D
X✝ Y Z : C
f : Y ⟶ X✝
S R : Sieve X✝
E : Type u₃
inst✝ : Category E
G : D ⥤ E
F : C ⥤ D
X : C
⊢ 𝟙 (F.obj X) = 𝟙 (F.obj X) ≫ F.map (𝟙 X)
Theorem: Real.log_lt_log
File: Mathlib/Analysis/SpecialFunctions/Log/Basic.lean

tactic: intro h
state_before: x y : ℝ
hx : 0 < x
⊢ x < y → log x < log y

tactic: rwa [← exp_lt_exp, exp_log hx, exp_log (lt_trans hx h)]
state_before: x y : ℝ
hx : 0 < x
h : x < y
⊢ log x < log y
Theorem: Set.not_subset_iff_exists_mem_not_mem
File: Mathlib/Data/Set/Basic.lean

tactic: simp [subset_def]
state_before: α✝ : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α✝
s✝ s₁ s₂ t✝ t₁ t₂ u : Set α✝
α : Type u_1
s t : Set α
⊢ ¬s ⊆ t ↔ ∃ x, x ∈ s ∧ ¬x ∈ t
Theorem: CategoryTheory.Limits.HasZeroObject.zeroIsoInitial_hom
File: Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean

tactic: ext
state_before: C : Type u
inst✝⁴ : Category C
D : Type u'
inst✝³ : Category D
inst✝² : HasZeroObject C
inst✝¹ : HasZeroMorphisms C
inst✝ : HasInitial C
⊢ zeroIsoInitial.hom = 0
Theorem: Int.odd_iff_not_even
File: Mathlib/Data/Int/Parity.lean

tactic: rw [not_even_iff, odd_iff]
state_before: m n : ℤ
⊢ Odd n ↔ ¬Even n
Theorem: CategoryTheory.Limits.Multiequalizer.ιPi_π
File: Mathlib/CategoryTheory/Limits/Shapes/Multiequalizer.lean

tactic: rw [ιPi, Category.assoc, ← Iso.eq_inv_comp, isoEqualizer]
state_before: C : Type u
inst✝³ : Category C
I : MulticospanIndex C
inst✝² : HasMultiequalizer I
inst✝¹ : HasProduct I.left
inst✝ : HasProduct I.right
a : I.L
⊢ ιPi I ≫ Pi.π I.left a = ι I a

tactic: simp
state_before: C : Type u
inst✝³ : Category C
I : MulticospanIndex C
inst✝² : HasMultiequalizer I
inst✝¹ : HasProduct I.left
inst✝ : HasProduct I.right
a : I.L
⊢ equalizer.ι (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I) ≫ Pi.π I.left a =
    (limit.isoLimitCone
          {
            cone :=
              (MulticospanIndex.multiforkEquivPiFork I).inverse.obj
                (limit.cone (parallelPair (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I))),
            isLimit :=
              IsLimit.ofPreservesConeTerminal (MulticospanIndex.multiforkEquivPiFork I).inverse
                (limit.isLimit (parallelPair (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I))) }).inv ≫
      ι I a
Theorem: EuclideanGeometry.orthogonalProjection_eq_self_iff
File: Mathlib/Geometry/Euclidean/Basic.lean

tactic: constructor
state_before: V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty { x // x ∈ s }
inst✝ : CompleteSpace { x // x ∈ direction s }
p : P
⊢ ↑(↑(orthogonalProjection s) p) = p ↔ p ∈ s

tactic: exact fun h => h ▸ orthogonalProjection_mem p
state_before: case mp
V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty { x // x ∈ s }
inst✝ : CompleteSpace { x // x ∈ direction s }
p : P
⊢ ↑(↑(orthogonalProjection s) p) = p → p ∈ s

tactic: intro h
state_before: case mpr
V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty { x // x ∈ s }
inst✝ : CompleteSpace { x // x ∈ direction s }
p : P
⊢ p ∈ s → ↑(↑(orthogonalProjection s) p) = p

tactic: have hp : p ∈ (s : Set P) ∩ mk' p s.directionᗮ := ⟨h, self_mem_mk' p _⟩
state_before: case mpr
V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty { x // x ∈ s }
inst✝ : CompleteSpace { x // x ∈ direction s }
p : P
h : p ∈ s
⊢ ↑(↑(orthogonalProjection s) p) = p

tactic: rw [inter_eq_singleton_orthogonalProjection p] at hp
state_before: case mpr
V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty { x // x ∈ s }
inst✝ : CompleteSpace { x // x ∈ direction s }
p : P
h : p ∈ s
hp : p ∈ ↑s ∩ ↑(mk' p (direction s)ᗮ)
⊢ ↑(↑(orthogonalProjection s) p) = p

tactic: symm
state_before: case mpr
V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty { x // x ∈ s }
inst✝ : CompleteSpace { x // x ∈ direction s }
p : P
h : p ∈ s
hp✝ : p ∈ ↑s ∩ ↑(mk' p (direction s)ᗮ)
hp : p ∈ {↑(↑(orthogonalProjection s) p)}
⊢ ↑(↑(orthogonalProjection s) p) = p

tactic: exact hp
state_before: case mpr
V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty { x // x ∈ s }
inst✝ : CompleteSpace { x // x ∈ direction s }
p : P
h : p ∈ s
hp✝ : p ∈ ↑s ∩ ↑(mk' p (direction s)ᗮ)
hp : p ∈ {↑(↑(orthogonalProjection s) p)}
⊢ p = ↑(↑(orthogonalProjection s) p)
Theorem: MonoidHomClass.bound_of_antilipschitz
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: simpa only [dist_one_right, map_one] using h.le_mul_dist x 1
state_before: 𝓕 : Type u_1
𝕜 : Type ?u.408704
α : Type ?u.408707
ι : Type ?u.408710
κ : Type ?u.408713
E : Type u_2
F : Type u_3
G : Type ?u.408722
inst✝³ : SeminormedGroup E
inst✝² : SeminormedGroup F
inst✝¹ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
inst✝ : MonoidHomClass 𝓕 E F
f : 𝓕
K : ℝ≥0
h : AntilipschitzWith K ↑f
x : E
⊢ ‖x‖ ≤ ↑K * ‖↑f x‖
Theorem: MeasureTheory.FiniteMeasure.integrable_of_boundedContinuous_to_nnreal
File: Mathlib/MeasureTheory/Measure/FiniteMeasure.lean

tactic: refine' ⟨(NNReal.continuous_coe.comp f.continuous).measurable.aestronglyMeasurable, _⟩
state_before: Ω : Type u_1
inst✝³ : MeasurableSpace Ω
inst✝² : TopologicalSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
f : Ω →ᵇ ℝ≥0
⊢ Integrable (NNReal.toReal ∘ ↑f)

tactic: simp only [HasFiniteIntegral, Function.comp_apply, NNReal.nnnorm_eq]
state_before: Ω : Type u_1
inst✝³ : MeasurableSpace Ω
inst✝² : TopologicalSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
f : Ω →ᵇ ℝ≥0
⊢ HasFiniteIntegral (NNReal.toReal ∘ ↑f)

tactic: exact lintegral_lt_top_of_boundedContinuous_to_nnreal _ f
state_before: Ω : Type u_1
inst✝³ : MeasurableSpace Ω
inst✝² : TopologicalSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
f : Ω →ᵇ ℝ≥0
⊢ (∫⁻ (a : Ω), ↑(↑f a) ∂μ) < ⊤
Theorem: Sylow.card_quotient_normalizer_modEq_card_quotient
File: Mathlib/GroupTheory/Sylow.lean

tactic: rw [← Fintype.card_congr (fixedPointsMulLeftCosetsEquivQuotient H)]
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p n : ℕ
hp : Fact (Nat.Prime p)
H : Subgroup G
hH : Fintype.card { x // x ∈ H } = p ^ n
⊢ Fintype.card ({ x // x ∈ normalizer H } ⧸ Subgroup.comap (Subgroup.subtype (normalizer H)) H) ≡
    Fintype.card (G ⧸ H) [MOD p]

tactic: exact ((IsPGroup.of_card hH).card_modEq_card_fixedPoints _).symm
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p n : ℕ
hp : Fact (Nat.Prime p)
H : Subgroup G
hH : Fintype.card { x // x ∈ H } = p ^ n
⊢ Fintype.card ↑(MulAction.fixedPoints { x // x ∈ H } (G ⧸ H)) ≡ Fintype.card (G ⧸ H) [MOD p]
Theorem: Real.tan_int_mul_pi_div_two
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean

tactic: use n
state_before: n : ℤ
⊢ ∃ k, ↑n * π / 2 = ↑k * π / 2
Theorem: Int.bodd_bit
File: Mathlib/Data/Int/Bitwise.lean

tactic: rw [bit_val]
state_before: b : Bool
n : ℤ
⊢ bodd (bit b n) = b

tactic: cases b <;> cases bodd n <;> simp
state_before: b : Bool
n : ℤ
⊢ bodd (2 * n + bif b then 1 else 0) = b
Theorem: IsLocalization.coeSubmodule_top
File: Mathlib/RingTheory/Localization/Submodule.lean

tactic: rw [coeSubmodule, Submodule.map_top, Submodule.one_eq_range]
state_before: R : Type u_2
inst✝³ : CommRing R
M : Submonoid R
S : Type u_1
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Type ?u.30644
inst✝ : CommRing P
⊢ coeSubmodule S ⊤ = 1
Theorem: Real.nnabs_coe
File: Mathlib/Data/Real/NNReal.lean

tactic: simp
state_before: x : ℝ≥0
⊢ ↑nnabs ↑x = x
Theorem: convexOn_rpow
File: Mathlib/Analysis/Convex/SpecificFunctions/Basic.lean

tactic: rcases eq_or_lt_of_le hp with (rfl | hp)
state_before: p : ℝ
hp : 1 ≤ p
⊢ ConvexOn ℝ (Ici 0) fun x => x ^ p

tactic: exact (strictConvexOn_rpow hp).convexOn
state_before: case inr
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
⊢ ConvexOn ℝ (Ici 0) fun x => x ^ p

tactic: simpa using convexOn_id (convex_Ici _)
state_before: case inl
hp : 1 ≤ 1
⊢ ConvexOn ℝ (Ici 0) fun x => x ^ 1
Theorem: dist_midpoint_midpoint_le
File: Mathlib/Analysis/NormedSpace/AddTorsor.lean

tactic: have := dist_midpoint_midpoint_le' (𝕜 := ℝ) p₁ p₂ p₃ p₄
state_before: α : Type ?u.99524
V : Type u_1
P : Type ?u.99530
W : Type ?u.99533
Q : Type ?u.99536
inst✝⁷ : SeminormedAddCommGroup V
inst✝⁶ : PseudoMetricSpace P
inst✝⁵ : NormedAddTorsor V P
inst✝⁴ : NormedAddCommGroup W
inst✝³ : MetricSpace Q
inst✝² : NormedAddTorsor W Q
inst✝¹ : NormedSpace ℝ V
inst✝ : NormedSpace ℝ W
p₁ p₂ p₃ p₄ : V
⊢ dist (midpoint ℝ p₁ p₂) (midpoint ℝ p₃ p₄) ≤ (dist p₁ p₃ + dist p₂ p₄) / 2

tactic: rw [Real.norm_eq_abs, abs_two] at this
state_before: α : Type ?u.99524
V : Type u_1
P : Type ?u.99530
W : Type ?u.99533
Q : Type ?u.99536
inst✝⁷ : SeminormedAddCommGroup V
inst✝⁶ : PseudoMetricSpace P
inst✝⁵ : NormedAddTorsor V P
inst✝⁴ : NormedAddCommGroup W
inst✝³ : MetricSpace Q
inst✝² : NormedAddTorsor W Q
inst✝¹ : NormedSpace ℝ V
inst✝ : NormedSpace ℝ W
p₁ p₂ p₃ p₄ : V
this : dist (midpoint ℝ p₁ p₂) (midpoint ℝ p₃ p₄) ≤ (dist p₁ p₃ + dist p₂ p₄) / ‖2‖
⊢ dist (midpoint ℝ p₁ p₂) (midpoint ℝ p₃ p₄) ≤ (dist p₁ p₃ + dist p₂ p₄) / 2

tactic: exact this
state_before: α : Type ?u.99524
V : Type u_1
P : Type ?u.99530
W : Type ?u.99533
Q : Type ?u.99536
inst✝⁷ : SeminormedAddCommGroup V
inst✝⁶ : PseudoMetricSpace P
inst✝⁵ : NormedAddTorsor V P
inst✝⁴ : NormedAddCommGroup W
inst✝³ : MetricSpace Q
inst✝² : NormedAddTorsor W Q
inst✝¹ : NormedSpace ℝ V
inst✝ : NormedSpace ℝ W
p₁ p₂ p₃ p₄ : V
this : dist (midpoint ℝ p₁ p₂) (midpoint ℝ p₃ p₄) ≤ (dist p₁ p₃ + dist p₂ p₄) / 2
⊢ dist (midpoint ℝ p₁ p₂) (midpoint ℝ p₃ p₄) ≤ (dist p₁ p₃ + dist p₂ p₄) / 2
Theorem: MeasureTheory.integral_div
File: Mathlib/MeasureTheory/Integral/Bochner.lean

tactic: simpa only [← div_eq_mul_inv] using integral_mul_right r⁻¹ f
state_before: α : Type u_2
E : Type ?u.940098
F : Type ?u.940101
𝕜 : Type ?u.940104
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℝ E
inst✝⁷ : CompleteSpace E
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedSpace 𝕜 E
inst✝⁴ : SMulCommClass ℝ 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
L : Type u_1
inst✝ : IsROrC L
r : L
f : α → L
⊢ (∫ (a : α), f a / r ∂μ) = (∫ (a : α), f a ∂μ) / r
Theorem: Polynomial.expand_eq_C
File: Mathlib/Data/Polynomial/Expand.lean

tactic: rw [← expand_C, expand_inj hp, expand_C]
state_before: R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p✝ q p : ℕ
hp : 0 < p
f : R[X]
r : R
⊢ ↑(expand R p) f = ↑C r ↔ f = ↑C r
Theorem: IsScalarTower.of_algebraMap_eq
File: Mathlib/Algebra/Algebra/Tower.lean

tactic: simp_rw [Algebra.smul_def, RingHom.map_mul, mul_assoc, h]
state_before: R : Type u
S : Type v
A : Type w
B : Type u₁
M : Type v₁
inst✝⁷ : CommSemiring R
inst✝⁶ : CommSemiring S
inst✝⁵ : Semiring A
inst✝⁴ : Semiring B
inst✝³ : Algebra R S
inst✝² : Algebra S A
inst✝¹ : Algebra S B
inst✝ : Algebra R A
h : ∀ (x : R), ↑(algebraMap R A) x = ↑(algebraMap S A) (↑(algebraMap R S) x)
x : R
y : S
z : A
⊢ (x • y) • z = x • y • z
Theorem: CategoryTheory.Limits.biproduct.lift_desc
File: Mathlib/CategoryTheory/Preadditive/Biproducts.lean

tactic: simp [biproduct.lift_eq, biproduct.desc_eq, comp_sum, sum_comp, biproduct.ι_π_assoc, comp_dite,
  dite_comp]
state_before: C : Type u
inst✝³ : Category C
inst✝² : Preadditive C
J : Type
inst✝¹ : Fintype J
f : J → C
inst✝ : HasBiproduct f
T U : C
g : (j : J) → T ⟶ f j
h : (j : J) → f j ⟶ U
⊢ lift g ≫ desc h = ∑ j : J, g j ≫ h j
Theorem: deriv2_sqrt_mul_log
File: Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean

tactic: simp only [Nat.iterate, deriv_sqrt_mul_log']
state_before: x : ℝ
⊢ (deriv^[2]) (fun x => sqrt x * log x) x = -log x / (↑4 * sqrt x ^ 3)

tactic: cases' le_or_lt x 0 with hx hx
state_before: x : ℝ
⊢ deriv (fun x => (2 + log x) / (2 * sqrt x)) x = -log x / (↑4 * sqrt x ^ 3)

tactic: rw [sqrt_eq_zero_of_nonpos hx, zero_pow zero_lt_three, MulZeroClass.mul_zero, div_zero]
state_before: case inl
x : ℝ
hx : x ≤ 0
⊢ deriv (fun x => (2 + log x) / (2 * sqrt x)) x = -log x / (↑4 * sqrt x ^ 3)

tactic: refine' HasDerivWithinAt.deriv_eq_zero _ (uniqueDiffOn_Iic 0 x hx)
state_before: case inl
x : ℝ
hx : x ≤ 0
⊢ deriv (fun x => (2 + log x) / (2 * sqrt x)) x = 0

tactic: refine' (hasDerivWithinAt_const _ _ 0).congr_of_mem (fun x hx => _) hx
state_before: case inl
x : ℝ
hx : x ≤ 0
⊢ HasDerivWithinAt (fun x => (2 + log x) / (2 * sqrt x)) 0 (Iic 0) x

tactic: rw [sqrt_eq_zero_of_nonpos hx, MulZeroClass.mul_zero, div_zero]
state_before: case inl
x✝ : ℝ
hx✝ : x✝ ≤ 0
x : ℝ
hx : x ∈ Iic 0
⊢ (2 + log x) / (2 * sqrt x) = 0

tactic: have h₀ : sqrt x ≠ 0 := sqrt_ne_zero'.2 hx
state_before: case inr
x : ℝ
hx : 0 < x
⊢ deriv (fun x => (2 + log x) / (2 * sqrt x)) x = -log x / (↑4 * sqrt x ^ 3)

tactic: convert (((hasDerivAt_log hx.ne').const_add 2).div ((hasDerivAt_sqrt hx.ne').const_mul 2) <|
  mul_ne_zero two_ne_zero h₀).deriv using 1
state_before: case inr
x : ℝ
hx : 0 < x
h₀ : sqrt x ≠ 0
⊢ deriv (fun x => (2 + log x) / (2 * sqrt x)) x = -log x / (↑4 * sqrt x ^ 3)

tactic: nth_rw 3 [← mul_self_sqrt hx.le]
state_before: case h.e'_3
x : ℝ
hx : 0 < x
h₀ : sqrt x ≠ 0
⊢ -log x / (↑4 * sqrt x ^ 3) = (x⁻¹ * (2 * sqrt x) - (2 + log x) * (2 * (1 / (2 * sqrt x)))) / (2 * sqrt x) ^ 2

tactic: field_simp
state_before: case h.e'_3
x : ℝ
hx : 0 < x
h₀ : sqrt x ≠ 0
⊢ -log x / (↑4 * sqrt x ^ 3) =
    ((sqrt x * sqrt x)⁻¹ * (2 * sqrt x) - (2 + log x) * (2 * (1 / (2 * sqrt x)))) / (2 * sqrt x) ^ 2

tactic: ring
state_before: case h.e'_3
x : ℝ
hx : 0 < x
h₀ : sqrt x ≠ 0
⊢ -(log x * (sqrt x * sqrt x * (2 * sqrt x) * (2 * sqrt x) ^ 2)) =
    (2 * sqrt x * (2 * sqrt x) - sqrt x * sqrt x * ((2 + log x) * 2)) * (4 * sqrt x ^ 3)
Theorem: isClopen_iff_frontier_eq_empty
File: Mathlib/Topology/SubsetProperties.lean

tactic: rw [IsClopen, ← closure_eq_iff_isClosed, ← interior_eq_iff_isOpen, frontier, diff_eq_empty]
state_before: α : Type u
β : Type v
ι : Type ?u.171474
π : ι → Type ?u.171479
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s✝ t s : Set α
⊢ IsClopen s ↔ frontier s = ∅

tactic: refine' ⟨fun h => (h.2.trans h.1.symm).subset, fun h => _⟩
state_before: α : Type u
β : Type v
ι : Type ?u.171474
π : ι → Type ?u.171479
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s✝ t s : Set α
⊢ interior s = s ∧ closure s = s ↔ closure s ⊆ interior s

tactic: exact ⟨interior_subset.antisymm (subset_closure.trans h),
  (h.trans interior_subset).antisymm subset_closure⟩
state_before: α : Type u
β : Type v
ι : Type ?u.171474
π : ι → Type ?u.171479
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s✝ t s : Set α
h : closure s ⊆ interior s
⊢ interior s = s ∧ closure s = s