1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Nat.cast_div
File: Mathlib/Data/Nat/Cast/Field.lean

tactic: rcases n_dvd with ⟨k, rfl⟩
state_before: α : Type u_1
inst✝ : DivisionSemiring α
m n : ℕ
n_dvd : n ∣ m
hn : ↑n ≠ 0
⊢ ↑(m / n) = ↑m / ↑n
state_after: case intro
α : Type u_1
inst✝ : DivisionSemiring α
n : ℕ
hn : ↑n ≠ 0
k : ℕ
⊢ ↑(n * k / n) = ↑(n * k) / ↑n

tactic: have : n ≠ 0 := by rintro rfl; simp at hn
state_before: case intro
α : Type u_1
inst✝ : DivisionSemiring α
n : ℕ
hn : ↑n ≠ 0
k : ℕ
⊢ ↑(n * k / n) = ↑(n * k) / ↑n
state_after: case intro
α : Type u_1
inst✝ : DivisionSemiring α
n : ℕ
hn : ↑n ≠ 0
k : ℕ
this : n ≠ 0
⊢ ↑(n * k / n) = ↑(n * k) / ↑n

tactic: rw [Nat.mul_div_cancel_left _ this.bot_lt, mul_comm n, cast_mul, mul_div_cancel_right₀ _ hn]
state_before: case intro
α : Type u_1
inst✝ : DivisionSemiring α
n : ℕ
hn : ↑n ≠ 0
k : ℕ
this : n ≠ 0
⊢ ↑(n * k / n) = ↑(n * k) / ↑n
state_after: no goals

tactic: rintro rfl
state_before: α : Type u_1
inst✝ : DivisionSemiring α
n : ℕ
hn : ↑n ≠ 0
k : ℕ
⊢ n ≠ 0
state_after: α : Type u_1
inst✝ : DivisionSemiring α
k : ℕ
hn : ↑0 ≠ 0
⊢ False

tactic: simp at hn
state_before: α : Type u_1
inst✝ : DivisionSemiring α
k : ℕ
hn : ↑0 ≠ 0
⊢ False
state_after: no goals
Theorem: LinearMap.toSpanSingleton_isIdempotentElem_iff
File: Mathlib/LinearAlgebra/Span.lean

tactic: simp_rw [IsIdempotentElem, ext_iff, mul_apply, toSpanSingleton_apply, smul_eq_mul, mul_assoc]
state_before: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
e : R
⊢ IsIdempotentElem (toSpanSingleton R R e) ↔ IsIdempotentElem e
state_after: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
e : R
⊢ (∀ (x : R), x * (e * e) = x * e) ↔ e * e = e

tactic: exact ⟨fun h ↦ by conv_rhs => rw [← one_mul e, ← h, one_mul], fun h _ ↦ by rw [h]⟩
state_before: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
e : R
⊢ (∀ (x : R), x * (e * e) = x * e) ↔ e * e = e
state_after: no goals

tactic: conv_rhs => rw [← one_mul e, ← h, one_mul]
state_before: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
e : R
h : ∀ (x : R), x * (e * e) = x * e
⊢ e * e = e
state_after: no goals

tactic: rw [h]
state_before: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
e : R
h : e * e = e
x✝ : R
⊢ x✝ * (e * e) = x✝ * e
state_after: no goals
Theorem: Ordinal.sup_succ_le_lsub
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: refine ⟨fun h => ?_, ?_⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal.{max u v}
⊢ succ (sup f) ≤ lsub f ↔ ∃ i, f i = sup f
state_after: case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal.{max u v}
h : succ (sup f) ≤ lsub f
⊢ ∃ i, f i = sup f

case refine_2
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal.{max u v}
⊢ (∃ i, f i = sup f) → succ (sup f) ≤ lsub f

tactic: rintro ⟨_, hf⟩
state_before: case refine_2
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal.{max u v}
⊢ (∃ i, f i = sup f) → succ (sup f) ≤ lsub f
state_after: case refine_2.intro
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal.{max u v}
w✝ : ι
hf : f w✝ = sup f
⊢ succ (sup f) ≤ lsub f

tactic: rw [succ_le_iff, ← hf]
state_before: case refine_2.intro
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal.{max u v}
w✝ : ι
hf : f w✝ = sup f
⊢ succ (sup f) ≤ lsub f
state_after: case refine_2.intro
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal.{max u v}
w✝ : ι
hf : f w✝ = sup f
⊢ f w✝ < lsub f

tactic: exact lt_lsub _ _
state_before: case refine_2.intro
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal.{max u v}
w✝ : ι
hf : f w✝ = sup f
⊢ f w✝ < lsub f
state_after: no goals

tactic: by_contra! hf
state_before: case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal.{max u v}
h : succ (sup f) ≤ lsub f
⊢ ∃ i, f i = sup f
state_after: case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal.{max u v}
h : succ (sup f) ≤ lsub f
hf : ∀ (i : ι), f i ≠ sup f
⊢ False

tactic: exact (succ_le_iff.1 h).ne ((sup_le_lsub f).antisymm (lsub_le (ne_sup_iff_lt_sup.1 hf)))
state_before: case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal.{max u v}
h : succ (sup f) ≤ lsub f
hf : ∀ (i : ι), f i ≠ sup f
⊢ False
state_after: no goals
Theorem: WittVector.truncateFun_sub
File: Mathlib/RingTheory/WittVector/Truncated.lean

tactic: witt_truncateFun_tac
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
R : Type u_1
inst✝ : CommRing R
x y : 𝕎 R
⊢ truncateFun n (x - y) = truncateFun n x - truncateFun n y
state_after: no goals
Theorem: SimpleGraph.map_symm
File: Mathlib/Combinatorics/SimpleGraph/Maps.lean

tactic: rw [← comap_symm, e.symm_symm]
state_before: V : Type u_1
W : Type u_2
X : Type u_3
G✝ : SimpleGraph V
G' : SimpleGraph W
u v : V
G : SimpleGraph W
e : V ≃ W
⊢ SimpleGraph.map e.symm.toEmbedding G = SimpleGraph.comap (⇑e.toEmbedding) G
state_after: no goals
Theorem: List.lookup_ext
File: Mathlib/Data/List/Sigma.lean

tactic: rw [← mem_dlookup_iff, ← mem_dlookup_iff, h] <;> assumption
state_before: α : Type u
β : α → Type v
l l₁✝ l₂ : List (Sigma β)
inst✝ : DecidableEq α
l₀ l₁ : List (Sigma β)
nd₀ : l₀.NodupKeys
nd₁ : l₁.NodupKeys
h : ∀ (x : α) (y : β x), y ∈ dlookup x l₀ ↔ y ∈ dlookup x l₁
x✝ : Sigma β
a : α
b : β a
⊢ ⟨a, b⟩ ∈ l₀ ↔ ⟨a, b⟩ ∈ l₁
state_after: no goals
Theorem: PNat.XgcdType.reduce_a
File: Mathlib/Data/PNat/Xgcd.lean

tactic: rw [reduce]
state_before: u✝ u : XgcdType
h : u.r = 0
⊢ u.reduce = u.finish
state_after: u✝ u : XgcdType
h : u.r = 0
⊢ (if x : u.r = 0 then u.finish else u.step.reduce.flip) = u.finish

tactic: exact if_pos h
state_before: u✝ u : XgcdType
h : u.r = 0
⊢ (if x : u.r = 0 then u.finish else u.step.reduce.flip) = u.finish
state_after: no goals
Theorem: CategoryTheory.CommSq.left_adjoint
File: Mathlib/CategoryTheory/LiftingProperties/Adjunction.lean

tactic: simp only [Adjunction.homEquiv_counit, assoc, ← G.map_comp_assoc, ← sq.w]
state_before: C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_4, u_1} C
inst✝ : Category.{u_3, u_2} D
G : C ⥤ D
F : D ⥤ C
A B : C
X Y : D
i : A ⟶ B
p : X ⟶ Y
u : A ⟶ F.obj X
v : B ⟶ F.obj Y
sq : CommSq u i (F.map p) v
adj : G ⊣ F
⊢ (adj.homEquiv A X).symm u ≫ p = G.map i ≫ (adj.homEquiv B Y).symm v
state_after: C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_4, u_1} C
inst✝ : Category.{u_3, u_2} D
G : C ⥤ D
F : D ⥤ C
A B : C
X Y : D
i : A ⟶ B
p : X ⟶ Y
u : A ⟶ F.obj X
v : B ⟶ F.obj Y
sq : CommSq u i (F.map p) v
adj : G ⊣ F
⊢ G.map u ≫ adj.counit.app X ≫ p = G.map (u ≫ F.map p) ≫ adj.counit.app Y

tactic: rw [G.map_comp, assoc, Adjunction.counit_naturality]
state_before: C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_4, u_1} C
inst✝ : Category.{u_3, u_2} D
G : C ⥤ D
F : D ⥤ C
A B : C
X Y : D
i : A ⟶ B
p : X ⟶ Y
u : A ⟶ F.obj X
v : B ⟶ F.obj Y
sq : CommSq u i (F.map p) v
adj : G ⊣ F
⊢ G.map u ≫ adj.counit.app X ≫ p = G.map (u ≫ F.map p) ≫ adj.counit.app Y
state_after: no goals
Theorem: Nat.coprime_self_add_left
File: Mathlib/Data/Nat/GCD/Basic.lean

tactic: rw [Coprime, Coprime, gcd_self_add_left]
state_before: m n : ℕ
⊢ (m + n).Coprime m ↔ n.Coprime m
state_after: no goals
Theorem: Equiv.Perm.nthLe_toList
File: Mathlib/GroupTheory/Perm/Cycle/Concrete.lean

tactic: simp [toList]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p : Perm α
x : α
n : ℕ
hn : n < (p.toList x).length
⊢ (p.toList x).nthLe n hn = (p ^ n) x
state_after: no goals
Theorem: measurableSet_region_between_oc
File: Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean

tactic: dsimp only [regionBetween, Ioc, mem_setOf_eq, setOf_and]
state_before: α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
f g : α → ℝ
s : Set α
hf : Measurable f
hg : Measurable g
hs : MeasurableSet s
⊢ MeasurableSet {p | p.1 ∈ s ∧ p.2 ∈ Ioc (f p.1) (g p.1)}
state_after: α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
f g : α → ℝ
s : Set α
hf : Measurable f
hg : Measurable g
hs : MeasurableSet s
⊢ MeasurableSet ({a | a.1 ∈ s} ∩ {a | a.2 ∈ {a_1 | f a.1 < a_1} ∩ {a_1 | a_1 ≤ g a.1}})

tactic: refine
  MeasurableSet.inter ?_
    ((measurableSet_lt (hf.comp measurable_fst) measurable_snd).inter
      (measurableSet_le measurable_snd (hg.comp measurable_fst)))
state_before: α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
f g : α → ℝ
s : Set α
hf : Measurable f
hg : Measurable g
hs : MeasurableSet s
⊢ MeasurableSet ({a | a.1 ∈ s} ∩ {a | a.2 ∈ {a_1 | f a.1 < a_1} ∩ {a_1 | a_1 ≤ g a.1}})
state_after: α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
f g : α → ℝ
s : Set α
hf : Measurable f
hg : Measurable g
hs : MeasurableSet s
⊢ MeasurableSet {a | a.1 ∈ s}

tactic: exact measurable_fst hs
state_before: α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
f g : α → ℝ
s : Set α
hf : Measurable f
hg : Measurable g
hs : MeasurableSet s
⊢ MeasurableSet {a | a.1 ∈ s}
state_after: no goals
Theorem: UniformOnFun.hasBasis_uniformity_of_basis_aux₁
File: Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean

tactic: simp_rw [UniformOnFun.gen_eq_preimage_restrict, uniformity_comap]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s✝ s' : Set α
x : α
p✝ : Filter ι
g : ι → α
inst✝ : UniformSpace β
𝔖 : Set (Set α)
p : ι → Prop
s : ι → Set (β × β)
hb : (𝓤 β).HasBasis p s
S : Set α
⊢ (𝓤 (α →ᵤ[𝔖] β)).HasBasis p fun i => UniformOnFun.gen 𝔖 S (s i)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s✝ s' : Set α
x : α
p✝ : Filter ι
g : ι → α
inst✝ : UniformSpace β
𝔖 : Set (Set α)
p : ι → Prop
s : ι → Set (β × β)
hb : (𝓤 β).HasBasis p s
S : Set α
⊢ (comap (Prod.map S.restrict S.restrict) (𝓤 (↑S → β))).HasBasis p fun i =>
    Prod.map (S.restrict ∘ ⇑UniformFun.toFun) (S.restrict ∘ ⇑UniformFun.toFun) ⁻¹' UniformFun.gen (↑S) β (s i)

tactic: exact (UniformFun.hasBasis_uniformity_of_basis S β hb).comap _
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s✝ s' : Set α
x : α
p✝ : Filter ι
g : ι → α
inst✝ : UniformSpace β
𝔖 : Set (Set α)
p : ι → Prop
s : ι → Set (β × β)
hb : (𝓤 β).HasBasis p s
S : Set α
⊢ (comap (Prod.map S.restrict S.restrict) (𝓤 (↑S → β))).HasBasis p fun i =>
    Prod.map (S.restrict ∘ ⇑UniformFun.toFun) (S.restrict ∘ ⇑UniformFun.toFun) ⁻¹' UniformFun.gen (↑S) β (s i)
state_after: no goals
Theorem: MeasureTheory.MeasurePreserving.exists_mem_iterate_mem
File: Mathlib/Dynamics/Ergodic/MeasurePreserving.lean

tactic: rcases ENNReal.exists_nat_mul_gt hs' (measure_ne_top μ (Set.univ : Set α)) with ⟨N, hN⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
μa : Measure α
μb : Measure β
μc : Measure γ
μd : Measure δ
μ : Measure α
f : α → α
s : Set α
inst✝ : IsFiniteMeasure μ
hf : MeasurePreserving f μ μ
hs : MeasurableSet s
hs' : μ s ≠ 0
⊢ ∃ x ∈ s, ∃ m, m ≠ 0 ∧ f^[m] x ∈ s
state_after: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
μa : Measure α
μb : Measure β
μc : Measure γ
μd : Measure δ
μ : Measure α
f : α → α
s : Set α
inst✝ : IsFiniteMeasure μ
hf : MeasurePreserving f μ μ
hs : MeasurableSet s
hs' : μ s ≠ 0
N : ℕ
hN : μ univ < ↑N * μ s
⊢ ∃ x ∈ s, ∃ m, m ≠ 0 ∧ f^[m] x ∈ s

tactic: rcases hf.exists_mem_iterate_mem_of_volume_lt_mul_volume hs hN with ⟨x, hx, m, hm, hmx⟩
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
μa : Measure α
μb : Measure β
μc : Measure γ
μd : Measure δ
μ : Measure α
f : α → α
s : Set α
inst✝ : IsFiniteMeasure μ
hf : MeasurePreserving f μ μ
hs : MeasurableSet s
hs' : μ s ≠ 0
N : ℕ
hN : μ univ < ↑N * μ s
⊢ ∃ x ∈ s, ∃ m, m ≠ 0 ∧ f^[m] x ∈ s
state_after: case intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
μa : Measure α
μb : Measure β
μc : Measure γ
μd : Measure δ
μ : Measure α
f : α → α
s : Set α
inst✝ : IsFiniteMeasure μ
hf : MeasurePreserving f μ μ
hs : MeasurableSet s
hs' : μ s ≠ 0
N : ℕ
hN : μ univ < ↑N * μ s
x : α
hx : x ∈ s
m : ℕ
hm : m ∈ Ioo 0 N
hmx : f^[m] x ∈ s
⊢ ∃ x ∈ s, ∃ m, m ≠ 0 ∧ f^[m] x ∈ s

tactic: exact ⟨x, hx, m, hm.1.ne', hmx⟩
state_before: case intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
μa : Measure α
μb : Measure β
μc : Measure γ
μd : Measure δ
μ : Measure α
f : α → α
s : Set α
inst✝ : IsFiniteMeasure μ
hf : MeasurePreserving f μ μ
hs : MeasurableSet s
hs' : μ s ≠ 0
N : ℕ
hN : μ univ < ↑N * μ s
x : α
hx : x ∈ s
m : ℕ
hm : m ∈ Ioo 0 N
hmx : f^[m] x ∈ s
⊢ ∃ x ∈ s, ∃ m, m ≠ 0 ∧ f^[m] x ∈ s
state_after: no goals
Theorem: Finset.singleton_subset_singleton
File: Mathlib/Data/Finset/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s : Finset α
a b : α
⊢ {a} ⊆ {b} ↔ a = b
state_after: no goals
Theorem: CharP.neg_one_pow_char
File: Mathlib/Algebra/CharP/Basic.lean

tactic: rw [eq_neg_iff_add_eq_zero]
state_before: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Fact (Nat.Prime p)
⊢ (-1) ^ p = -1
state_after: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Fact (Nat.Prime p)
⊢ (-1) ^ p + 1 = 0

tactic: nth_rw 2 [← one_pow p]
state_before: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Fact (Nat.Prime p)
⊢ (-1) ^ p + 1 = 0
state_after: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Fact (Nat.Prime p)
⊢ (-1) ^ p + 1 ^ p = 0

tactic: rw [← add_pow_char_of_commute R _ _ (Commute.one_right _), add_left_neg,
  zero_pow (Fact.out (p := Nat.Prime p)).ne_zero]
state_before: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Fact (Nat.Prime p)
⊢ (-1) ^ p + 1 ^ p = 0
state_after: no goals
Theorem: HasDerivWithinAt.limsup_slope_norm_le
File: Mathlib/Analysis/Calculus/Deriv/Slope.lean

tactic: apply (hf.limsup_norm_slope_le hr).mono
state_before: E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : ℝ → E
f' : E
s : Set ℝ
x r : ℝ
hf : HasDerivWithinAt f f' s x
hr : ‖f'‖ < r
⊢ ∀ᶠ (z : ℝ) in 𝓝[s] x, ‖z - x‖⁻¹ * (‖f z‖ - ‖f x‖) < r
state_after: E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : ℝ → E
f' : E
s : Set ℝ
x r : ℝ
hf : HasDerivWithinAt f f' s x
hr : ‖f'‖ < r
⊢ ∀ (x_1 : ℝ), ‖x_1 - x‖⁻¹ * ‖f x_1 - f x‖ < r → ‖x_1 - x‖⁻¹ * (‖f x_1‖ - ‖f x‖) < r

tactic: intro z hz
state_before: E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : ℝ → E
f' : E
s : Set ℝ
x r : ℝ
hf : HasDerivWithinAt f f' s x
hr : ‖f'‖ < r
⊢ ∀ (x_1 : ℝ), ‖x_1 - x‖⁻¹ * ‖f x_1 - f x‖ < r → ‖x_1 - x‖⁻¹ * (‖f x_1‖ - ‖f x‖) < r
state_after: E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : ℝ → E
f' : E
s : Set ℝ
x r : ℝ
hf : HasDerivWithinAt f f' s x
hr : ‖f'‖ < r
z : ℝ
hz : ‖z - x‖⁻¹ * ‖f z - f x‖ < r
⊢ ‖z - x‖⁻¹ * (‖f z‖ - ‖f x‖) < r

tactic: refine lt_of_le_of_lt (mul_le_mul_of_nonneg_left (norm_sub_norm_le _ _) ?_) hz
state_before: E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : ℝ → E
f' : E
s : Set ℝ
x r : ℝ
hf : HasDerivWithinAt f f' s x
hr : ‖f'‖ < r
z : ℝ
hz : ‖z - x‖⁻¹ * ‖f z - f x‖ < r
⊢ ‖z - x‖⁻¹ * (‖f z‖ - ‖f x‖) < r
state_after: E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : ℝ → E
f' : E
s : Set ℝ
x r : ℝ
hf : HasDerivWithinAt f f' s x
hr : ‖f'‖ < r
z : ℝ
hz : ‖z - x‖⁻¹ * ‖f z - f x‖ < r
⊢ 0 ≤ ‖z - x‖⁻¹

tactic: exact inv_nonneg.2 (norm_nonneg _)
state_before: E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : ℝ → E
f' : E
s : Set ℝ
x r : ℝ
hf : HasDerivWithinAt f f' s x
hr : ‖f'‖ < r
z : ℝ
hz : ‖z - x‖⁻¹ * ‖f z - f x‖ < r
⊢ 0 ≤ ‖z - x‖⁻¹
state_after: no goals
Theorem: Nat.dvd_two_of_totient_le_one
File: Mathlib/Data/Nat/Totient.lean

tactic: rcases totient_eq_one_iff.mp <| le_antisymm ha <| totient_pos.2 han with rfl | rfl <;> norm_num
state_before: a : ℕ
han : 0 < a
ha : φ a ≤ 1
⊢ a ∣ 2
state_after: no goals
Theorem: CategoryTheory.Meq.congr_apply
File: Mathlib/CategoryTheory/Sites/ConcreteSheafification.lean

tactic: simpa only [← h] using hf
state_before: C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category.{max v u, w} D
inst✝ : ConcreteCategory D
X : C
P : Cᵒᵖ ⥤ D
S : J.Cover X
x : Meq P S
Y : C
f g : Y ⟶ X
h : f = g
hf : S.sieve.arrows f
⊢ S.sieve.arrows g
state_after: no goals

tactic: subst h
state_before: C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category.{max v u, w} D
inst✝ : ConcreteCategory D
X : C
P : Cᵒᵖ ⥤ D
S : J.Cover X
x : Meq P S
Y : C
f g : Y ⟶ X
h : f = g
hf : S.sieve.arrows f
⊢ ↑x { Y := Y, f := f, hf := hf } = ↑x { Y := Y, f := g, hf := ⋯ }
state_after: C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category.{max v u, w} D
inst✝ : ConcreteCategory D
X : C
P : Cᵒᵖ ⥤ D
S : J.Cover X
x : Meq P S
Y : C
f : Y ⟶ X
hf : S.sieve.arrows f
⊢ ↑x { Y := Y, f := f, hf := hf } = ↑x { Y := Y, f := f, hf := ⋯ }

tactic: rfl
state_before: C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category.{max v u, w} D
inst✝ : ConcreteCategory D
X : C
P : Cᵒᵖ ⥤ D
S : J.Cover X
x : Meq P S
Y : C
f : Y ⟶ X
hf : S.sieve.arrows f
⊢ ↑x { Y := Y, f := f, hf := hf } = ↑x { Y := Y, f := f, hf := ⋯ }
state_after: no goals
Theorem: Matrix.cons_sub
File: Mathlib/Data/Fin/VecNotation.lean

tactic: ext i
state_before: α : Type u
m n o : ℕ
m' : Type u_1
n' : Type u_2
o' : Type u_3
inst✝ : Sub α
x : α
v : Fin n → α
w : Fin n.succ → α
⊢ vecCons x v - w = vecCons (x - vecHead w) (v - vecTail w)
state_after: case h
α : Type u
m n o : ℕ
m' : Type u_1
n' : Type u_2
o' : Type u_3
inst✝ : Sub α
x : α
v : Fin n → α
w : Fin n.succ → α
i : Fin n.succ
⊢ (vecCons x v - w) i = vecCons (x - vecHead w) (v - vecTail w) i

tactic: refine Fin.cases ?_ ?_ i <;> simp [vecHead, vecTail]
state_before: case h
α : Type u
m n o : ℕ
m' : Type u_1
n' : Type u_2
o' : Type u_3
inst✝ : Sub α
x : α
v : Fin n → α
w : Fin n.succ → α
i : Fin n.succ
⊢ (vecCons x v - w) i = vecCons (x - vecHead w) (v - vecTail w) i
state_after: no goals
Theorem: symmDiff_sup_inf
File: Mathlib/Order/SymmDiff.lean

tactic: refine le_antisymm (sup_le symmDiff_le_sup inf_le_sup) ?_
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a ∆ b ⊔ a ⊓ b = a ⊔ b
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a ⊔ b ≤ a ∆ b ⊔ a ⊓ b

tactic: rw [sup_inf_left, symmDiff]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a ⊔ b ≤ a ∆ b ⊔ a ⊓ b
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a ⊔ b ≤ (a \ b ⊔ b \ a ⊔ a) ⊓ (a \ b ⊔ b \ a ⊔ b)

tactic: refine sup_le (le_inf le_sup_right ?_) (le_inf ?_ le_sup_right)
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a ⊔ b ≤ (a \ b ⊔ b \ a ⊔ a) ⊓ (a \ b ⊔ b \ a ⊔ b)
state_after: case refine_1
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a ≤ a \ b ⊔ b \ a ⊔ b

case refine_2
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ b ≤ a \ b ⊔ b \ a ⊔ a

tactic: rw [sup_right_comm]
state_before: case refine_1
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a ≤ a \ b ⊔ b \ a ⊔ b
state_after: case refine_1
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a ≤ a \ b ⊔ b ⊔ b \ a

tactic: exact le_sup_of_le_left le_sdiff_sup
state_before: case refine_1
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a ≤ a \ b ⊔ b ⊔ b \ a
state_after: no goals

tactic: rw [sup_assoc]
state_before: case refine_2
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ b ≤ a \ b ⊔ b \ a ⊔ a
state_after: case refine_2
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ b ≤ a \ b ⊔ (b \ a ⊔ a)

tactic: exact le_sup_of_le_right le_sdiff_sup
state_before: case refine_2
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ b ≤ a \ b ⊔ (b \ a ⊔ a)
state_after: no goals
Theorem: ProbabilityTheory.variance_mul
File: Mathlib/Probability/Variance.lean

tactic: rw [variance, evariance_mul, ENNReal.toReal_mul, ENNReal.toReal_ofReal (sq_nonneg _)]
state_before: Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ✝ : Measure Ω
c : ℝ
X : Ω → ℝ
μ : Measure Ω
⊢ variance (fun ω => c * X ω) μ = c ^ 2 * variance X μ
state_after: Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ✝ : Measure Ω
c : ℝ
X : Ω → ℝ
μ : Measure Ω
⊢ c ^ 2 * (evariance X μ).toReal = c ^ 2 * variance X μ

tactic: rfl
state_before: Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ✝ : Measure Ω
c : ℝ
X : Ω → ℝ
μ : Measure Ω
⊢ c ^ 2 * (evariance X μ).toReal = c ^ 2 * variance X μ
state_after: no goals