tasksource/leandojo huggingface dataset:
Theorem: Filter.EventuallyEq.derivWithin_eq
File: Mathlib/Analysis/Calculus/Deriv/Basic.lean

tactic: unfold derivWithin
state_before: 𝕜 : Type u
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type v
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type w
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
hs : f₁ =ᶠ[𝓝[s] x] f
hx : f₁ x = f x
⊢ derivWithin f₁ s x = derivWithin f s x

tactic: rw [hs.fderivWithin_eq hx]
state_before: 𝕜 : Type u
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type v
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type w
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
hs : f₁ =ᶠ[𝓝[s] x] f
hx : f₁ x = f x
⊢ ↑(fderivWithin 𝕜 f₁ s x) 1 = ↑(fderivWithin 𝕜 f s x) 1
Theorem: nat_smul_eq_nsmul
File: Mathlib/Algebra/Module/Basic.lean

tactic: rw [nsmul_eq_smul_cast ℕ n x, Nat.cast_id]
state_before: α : Type ?u.134610
R : Type ?u.134613
k : Type ?u.134616
S : Type ?u.134619
M : Type u_1
M₂ : Type ?u.134625
M₃ : Type ?u.134628
ι : Type ?u.134631
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
h : Module ℕ M
n : ℕ
x : M
⊢ SMul.smul n x = n • x

tactic: rfl
state_before: α : Type ?u.134610
R : Type ?u.134613
k : Type ?u.134616
S : Type ?u.134619
M : Type u_1
M₂ : Type ?u.134625
M₃ : Type ?u.134628
ι : Type ?u.134631
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
h : Module ℕ M
n : ℕ
x : M
⊢ SMul.smul n x = n • x
Theorem: NNReal.sqrt_pos
File: Mathlib/Data/Real/Sqrt.lean

tactic: simp [pos_iff_ne_zero]
state_before: x y : ℝ≥0
⊢ 0 < ↑sqrt x ↔ 0 < x
Theorem: Polynomial.mem_degreeLT
File: Mathlib/RingTheory/Polynomial/Basic.lean

tactic: rw [degreeLT, Submodule.mem_iInf]
state_before: R : Type u
S : Type ?u.11734
inst✝ : Semiring R
n : ℕ
f : R[X]
⊢ f ∈ degreeLT R n ↔ degree f < ↑n

tactic: conv_lhs => intro i; rw [Submodule.mem_iInf]
state_before: R : Type u
S : Type ?u.11734
inst✝ : Semiring R
n : ℕ
f : R[X]
⊢ (∀ (i : ℕ), f ∈ ⨅ (_ : i ≥ n), LinearMap.ker (lcoeff R i)) ↔ degree f < ↑n

tactic: rw [degree, Finset.max_eq_sup_coe]
state_before: R : Type u
S : Type ?u.11734
inst✝ : Semiring R
n : ℕ
f : R[X]
⊢ (∀ (i : ℕ), i ≥ n → f ∈ LinearMap.ker (lcoeff R i)) ↔ degree f < ↑n

tactic: rw [Finset.sup_lt_iff ?_]
state_before: R : Type u
S : Type ?u.11734
inst✝ : Semiring R
n : ℕ
f : R[X]
⊢ (∀ (i : ℕ), i ≥ n → f ∈ LinearMap.ker (lcoeff R i)) ↔ sup (support f) WithBot.some < ↑n

tactic: rotate_left
state_before: R : Type u
S : Type ?u.11734
inst✝ : Semiring R
n : ℕ
f : R[X]
⊢ (∀ (i : ℕ), i ≥ n → f ∈ LinearMap.ker (lcoeff R i)) ↔ ∀ (b : ℕ), b ∈ support f → ↑b < ↑n

R : Type u
S : Type ?u.11734
inst✝ : Semiring R
n : ℕ
f : R[X]
⊢ ⊥ < ↑n

tactic: apply WithBot.bot_lt_coe
state_before: R : Type u
S : Type ?u.11734
inst✝ : Semiring R
n : ℕ
f : R[X]
⊢ ⊥ < ↑n

R : Type u
S : Type ?u.11734
inst✝ : Semiring R
n : ℕ
f : R[X]
⊢ (∀ (i : ℕ), i ≥ n → f ∈ LinearMap.ker (lcoeff R i)) ↔ ∀ (b : ℕ), b ∈ support f → ↑b < ↑n

tactic: conv_rhs =>
  simp only [mem_support_iff]
  intro b
  rw [Nat.cast_withBot, WithBot.coe_lt_coe, lt_iff_not_le, Ne, not_imp_not]
state_before: R : Type u
S : Type ?u.11734
inst✝ : Semiring R
n : ℕ
f : R[X]
⊢ (∀ (i : ℕ), i ≥ n → f ∈ LinearMap.ker (lcoeff R i)) ↔ ∀ (b : ℕ), b ∈ support f → ↑b < ↑n
Theorem: Option.pbind_eq_none
File: Mathlib/Data/Option/Basic.lean

tactic: cases x
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.11082
δ : Type ?u.11085
p : α → Prop
f✝ : (a : α) → p a → β
x : Option α
f : (a : α) → a ∈ x → Option β
h' : ∀ (a : α) (H : a ∈ x), f a H = none → x = none
⊢ pbind x f = none ↔ x = none

tactic: simp
state_before: case none
α : Type u_1
β : Type u_2
γ : Type ?u.11082
δ : Type ?u.11085
p : α → Prop
f✝ : (a : α) → p a → β
f : (a : α) → a ∈ none → Option β
h' : ∀ (a : α) (H : a ∈ none), f a H = none → none = none
⊢ pbind none f = none ↔ none = none

tactic: simp only [pbind, iff_false]
state_before: case some
α : Type u_1
β : Type u_2
γ : Type ?u.11082
δ : Type ?u.11085
p : α → Prop
f✝ : (a : α) → p a → β
val✝ : α
f : (a : α) → a ∈ some val✝ → Option β
h' : ∀ (a : α) (H : a ∈ some val✝), f a H = none → some val✝ = none
⊢ pbind (some val✝) f = none ↔ some val✝ = none

tactic: intro h
state_before: case some
α : Type u_1
β : Type u_2
γ : Type ?u.11082
δ : Type ?u.11085
p : α → Prop
f✝ : (a : α) → p a → β
val✝ : α
f : (a : α) → a ∈ some val✝ → Option β
h' : ∀ (a : α) (H : a ∈ some val✝), f a H = none → some val✝ = none
⊢ ¬f val✝ (_ : some val✝ = some val✝) = none

tactic: cases h' _ rfl h
state_before: case some
α : Type u_1
β : Type u_2
γ : Type ?u.11082
δ : Type ?u.11085
p : α → Prop
f✝ : (a : α) → p a → β
val✝ : α
f : (a : α) → a ∈ some val✝ → Option β
h' : ∀ (a : α) (H : a ∈ some val✝), f a H = none → some val✝ = none
h : f val✝ (_ : some val✝ = some val✝) = none
⊢ False
Theorem: RatFunc.ofFractionRing_sub
File: Mathlib/FieldTheory/RatFunc.lean

tactic: simp only [Sub.sub, HSub.hSub, RatFunc.sub]
state_before: K : Type u
inst✝ : CommRing K
p q : FractionRing K[X]
⊢ { toFractionRing := p - q } = { toFractionRing := p } - { toFractionRing := q }
Theorem: Partrec.dom_re
File: Mathlib/Computability/Halting.lean

tactic: simp [Part.dom_iff_mem]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Primcodable α
inst✝ : Primcodable β
f : α →. β
h : Partrec f
n : α
x✝ : Unit
⊢ x✝ ∈ Part.map (fun b => ()) (f n) ↔ x✝ ∈ Part.assert ((fun a => (f a).Dom) n) fun x => Part.some ()
Theorem: Set.definable_finset_biUnion
File: Mathlib/ModelTheory/Definability.lean

tactic: rw [← Finset.sup_set_eq_biUnion]
state_before: M : Type w
A : Set M
L : Language
inst✝ : Structure L M
α : Type u₁
β : Type ?u.15580
B : Set M
s✝ : Set (α → M)
ι : Type u_1
f : ι → Set (α → M)
hf : ∀ (i : ι), Definable A L (f i)
s : Finset ι
⊢ Definable A L (⋃ (i : ι) (_ : i ∈ s), f i)

tactic: exact definable_finset_sup hf s
state_before: M : Type w
A : Set M
L : Language
inst✝ : Structure L M
α : Type u₁
β : Type ?u.15580
B : Set M
s✝ : Set (α → M)
ι : Type u_1
f : ι → Set (α → M)
hf : ∀ (i : ι), Definable A L (f i)
s : Finset ι
⊢ Definable A L (Finset.sup s fun i => f i)
Theorem: Function.Antiperiodic.const_smul
File: Mathlib/Algebra/Periodic.lean

tactic: simpa only [smul_add, smul_inv_smul] using h (a • x)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → β
c c₁ c₂ x✝ : α
inst✝³ : AddMonoid α
inst✝² : Neg β
inst✝¹ : Group γ
inst✝ : DistribMulAction γ α
h : Antiperiodic f c
a : γ
x : α
⊢ (fun x => f (a • x)) (x + a⁻¹ • c) = -(fun x => f (a • x)) x
Theorem: IsLocalizedModule.mk'_neg
File: Mathlib/Algebra/Module/LocalizedModule.lean

tactic: delta mk'
state_before: R : Type u_3
inst✝¹² : CommRing R
S : Submonoid R
M✝ : Type ?u.858600
M'✝ : Type ?u.858603
M'' : Type ?u.858606
inst✝¹¹ : AddCommMonoid M✝
inst✝¹⁰ : AddCommMonoid M'✝
inst✝⁹ : AddCommMonoid M''
inst✝⁸ : Module R M✝
inst✝⁷ : Module R M'✝
inst✝⁶ : Module R M''
f✝ : M✝ →ₗ[R] M'✝
g : M✝ →ₗ[R] M''
inst✝⁵ : IsLocalizedModule S f✝
M : Type u_1
M' : Type u_2
inst✝⁴ : AddCommGroup M
inst✝³ : AddCommGroup M'
inst✝² : Module R M
inst✝¹ : Module R M'
f : M →ₗ[R] M'
inst✝ : IsLocalizedModule S f
m : M
s : { x // x ∈ S }
⊢ mk' f (-m) s = -mk' f m s

tactic: rw [LocalizedModule.mk_neg, map_neg]
state_before: R : Type u_3
inst✝¹² : CommRing R
S : Submonoid R
M✝ : Type ?u.858600
M'✝ : Type ?u.858603
M'' : Type ?u.858606
inst✝¹¹ : AddCommMonoid M✝
inst✝¹⁰ : AddCommMonoid M'✝
inst✝⁹ : AddCommMonoid M''
inst✝⁸ : Module R M✝
inst✝⁷ : Module R M'✝
inst✝⁶ : Module R M''
f✝ : M✝ →ₗ[R] M'✝
g : M✝ →ₗ[R] M''
inst✝⁵ : IsLocalizedModule S f✝
M : Type u_1
M' : Type u_2
inst✝⁴ : AddCommGroup M
inst✝³ : AddCommGroup M'
inst✝² : Module R M
inst✝¹ : Module R M'
f : M →ₗ[R] M'
inst✝ : IsLocalizedModule S f
m : M
s : { x // x ∈ S }
⊢ ↑(fromLocalizedModule S f) (LocalizedModule.mk (-m) s) = -↑(fromLocalizedModule S f) (LocalizedModule.mk m s)
Theorem: Int.modEq_add_fac
File: Mathlib/Data/Int/ModEq.lean

tactic: rw [add_zero]
state_before: m n✝ a✝ b✝ c✝ d a b n c : ℤ
ha : a ≡ b [ZMOD n]
⊢ b + 0 ≡ b [ZMOD n]
Theorem: MetricSpace.replaceUniformity_eq
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: ext
state_before: α : Type u
β : Type v
X : Type ?u.562313
ι : Type ?u.562316
inst✝¹ : PseudoMetricSpace α
γ✝ : Type w
inst✝ : MetricSpace γ✝
γ : Type u_1
U : UniformSpace γ
m : MetricSpace γ
H : 𝓤 γ = 𝓤 γ
⊢ replaceUniformity m H = m

tactic: rfl
state_before: case h.dist.h.h
α : Type u
β : Type v
X : Type ?u.562313
ι : Type ?u.562316
inst✝¹ : PseudoMetricSpace α
γ✝ : Type w
inst✝ : MetricSpace γ✝
γ : Type u_1
U : UniformSpace γ
m : MetricSpace γ
H : 𝓤 γ = 𝓤 γ
x✝¹ x✝ : γ
⊢ dist x✝¹ x✝ = dist x✝¹ x✝
Theorem: Basis.equivFun_ofEquivFun
File: Mathlib/LinearAlgebra/Basis.lean

tactic: ext j
state_before: ι : Type u_3
ι' : Type ?u.700635
R : Type u_1
R₂ : Type ?u.700641
K : Type ?u.700644
M : Type u_2
M' : Type ?u.700650
M'' : Type ?u.700653
V : Type u
V' : Type ?u.700658
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : AddCommMonoid M'
inst✝¹ : Module R M'
inst✝ : Fintype ι
b : Basis ι R M
e : M ≃ₗ[R] ι → R
⊢ equivFun (ofEquivFun e) = e

tactic: simp_rw [Basis.equivFun_apply, Basis.ofEquivFun_repr_apply]
state_before: case h.h
ι : Type u_3
ι' : Type ?u.700635
R : Type u_1
R₂ : Type ?u.700641
K : Type ?u.700644
M : Type u_2
M' : Type ?u.700650
M'' : Type ?u.700653
V : Type u
V' : Type ?u.700658
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : AddCommMonoid M'
inst✝¹ : Module R M'
inst✝ : Fintype ι
b : Basis ι R M
e : M ≃ₗ[R] ι → R
j : M
x✝ : ι
⊢ ↑(equivFun (ofEquivFun e)) j x✝ = ↑e j x✝
Theorem: Sum.comp_traverse
File: Mathlib/Control/Traversable/Instances.lean

tactic: cases x <;> simp! [Sum.traverse, map_id, functor_norm] <;> rfl
state_before: σ : Type u
F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : Applicative G
inst✝¹ : LawfulApplicative F
inst✝ : LawfulApplicative G
α β γ : Type u
f : β → F γ
g : α → G β
x : σ ⊕ α
⊢ Sum.traverse (Comp.mk ∘ (fun x x_1 => x <$> x_1) f ∘ g) x = Comp.mk (Sum.traverse f <$> Sum.traverse g x)
Theorem: uniformContinuous_of_tendsto_one
File: Mathlib/Topology/Algebra/UniformGroup.lean

tactic: have :
  ((fun x : β × β => x.2 / x.1) ∘ fun x : α × α => (f x.1, f x.2)) = fun x : α × α =>
    f (x.2 / x.1) := by ext; simp only [Function.comp_apply, map_div]
state_before: α : Type u_3
β : Type u_2
inst✝⁶ : UniformSpace α
inst✝⁵ : Group α
inst✝⁴ : UniformGroup α
hom : Type u_1
inst✝³ : UniformSpace β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
h : Tendsto (↑f) (𝓝 1) (𝓝 1)
⊢ UniformContinuous ↑f

tactic: rw [UniformContinuous, uniformity_eq_comap_nhds_one α, uniformity_eq_comap_nhds_one β,
  tendsto_comap_iff, this]
state_before: α : Type u_3
β : Type u_2
inst✝⁶ : UniformSpace α
inst✝⁵ : Group α
inst✝⁴ : UniformGroup α
hom : Type u_1
inst✝³ : UniformSpace β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
h : Tendsto (↑f) (𝓝 1) (𝓝 1)
this : ((fun x => x.snd / x.fst) ∘ fun x => (↑f x.fst, ↑f x.snd)) = fun x => ↑f (x.snd / x.fst)
⊢ UniformContinuous ↑f

tactic: exact Tendsto.comp h tendsto_comap
state_before: α : Type u_3
β : Type u_2
inst✝⁶ : UniformSpace α
inst✝⁵ : Group α
inst✝⁴ : UniformGroup α
hom : Type u_1
inst✝³ : UniformSpace β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
h : Tendsto (↑f) (𝓝 1) (𝓝 1)
this : ((fun x => x.snd / x.fst) ∘ fun x => (↑f x.fst, ↑f x.snd)) = fun x => ↑f (x.snd / x.fst)
⊢ Tendsto (fun x => ↑f (x.snd / x.fst)) (comap (fun x => x.snd / x.fst) (𝓝 1)) (𝓝 1)

tactic: ext
state_before: α : Type u_3
β : Type u_2
inst✝⁶ : UniformSpace α
inst✝⁵ : Group α
inst✝⁴ : UniformGroup α
hom : Type u_1
inst✝³ : UniformSpace β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
h : Tendsto (↑f) (𝓝 1) (𝓝 1)
⊢ ((fun x => x.snd / x.fst) ∘ fun x => (↑f x.fst, ↑f x.snd)) = fun x => ↑f (x.snd / x.fst)

tactic: simp only [Function.comp_apply, map_div]
state_before: case h
α : Type u_3
β : Type u_2
inst✝⁶ : UniformSpace α
inst✝⁵ : Group α
inst✝⁴ : UniformGroup α
hom : Type u_1
inst✝³ : UniformSpace β
inst✝² : Group β
inst✝¹ : UniformGroup β
inst✝ : MonoidHomClass hom α β
f : hom
h : Tendsto (↑f) (𝓝 1) (𝓝 1)
x✝ : α × α
⊢ ((fun x => x.snd / x.fst) ∘ fun x => (↑f x.fst, ↑f x.snd)) x✝ = ↑f (x✝.snd / x✝.fst)
Theorem: SNum.bit_zero
File: Mathlib/Data/Num/Bitwise.lean

tactic: cases b <;> rfl
state_before: b : Bool
⊢ (b::zero b) = zero b
Theorem: MeasureTheory.nonempty_inter_of_measure_lt_add
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [← Set.not_disjoint_iff_nonempty_inter]
state_before: α : Type u_1
β : Type ?u.43834
γ : Type ?u.43837
δ : Type ?u.43840
ι : Type ?u.43843
R : Type ?u.43846
R' : Type ?u.43849
m✝ : MeasurableSpace α
μ✝ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t✝ : Set α
m : MeasurableSpace α
μ : Measure α
s t u : Set α
ht : MeasurableSet t
h's : s ⊆ u
h't : t ⊆ u
h : ↑↑μ u < ↑↑μ s + ↑↑μ t
⊢ Set.Nonempty (s ∩ t)

tactic: contrapose! h
state_before: α : Type u_1
β : Type ?u.43834
γ : Type ?u.43837
δ : Type ?u.43840
ι : Type ?u.43843
R : Type ?u.43846
R' : Type ?u.43849
m✝ : MeasurableSpace α
μ✝ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t✝ : Set α
m : MeasurableSpace α
μ : Measure α
s t u : Set α
ht : MeasurableSet t
h's : s ⊆ u
h't : t ⊆ u
h : ↑↑μ u < ↑↑μ s + ↑↑μ t
⊢ ¬Disjoint s t

tactic: calc
  μ s + μ t = μ (s ∪ t) := (measure_union h ht).symm
  _ ≤ μ u := measure_mono (union_subset h's h't)
state_before: α : Type u_1
β : Type ?u.43834
γ : Type ?u.43837
δ : Type ?u.43840
ι : Type ?u.43843
R : Type ?u.43846
R' : Type ?u.43849
m✝ : MeasurableSpace α
μ✝ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t✝ : Set α
m : MeasurableSpace α
μ : Measure α
s t u : Set α
ht : MeasurableSet t
h's : s ⊆ u
h't : t ⊆ u
h : Disjoint s t
⊢ ↑↑μ s + ↑↑μ t ≤ ↑↑μ u
Theorem: Bool.or_le
File: Mathlib/Data/Bool/Basic.lean

tactic: decide
state_before: ⊢ ∀ {x y z : Bool}, x ≤ z → y ≤ z → (x || y) ≤ z
Theorem: lift_nhds_right
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: rw [nhds_eq_comap_uniformity', comap_lift_eq2 hg]
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.77892
inst✝ : UniformSpace α
x : α
g : Set α → Filter β
hg : Monotone g
⊢ Filter.lift (𝓝 x) g = Filter.lift (𝓤 α) fun s => g {y | (y, x) ∈ s}

tactic: rfl
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.77892
inst✝ : UniformSpace α
x : α
g : Set α → Filter β
hg : Monotone g
⊢ Filter.lift (𝓤 α) (g ∘ preimage fun y => (y, x)) = Filter.lift (𝓤 α) fun s => g {y | (y, x) ∈ s}
Theorem: Polynomial.isRoot_prod
File: Mathlib/Data/Polynomial/Eval.lean

tactic: simp only [IsRoot, eval_prod, Finset.prod_eq_zero_iff]
state_before: R✝ : Type u
S : Type v
T : Type w
ι✝ : Type y
a b : R✝
m n : ℕ
inst✝³ : CommSemiring R✝
p✝ q : R✝[X]
x✝ : R✝
inst✝² : CommSemiring S
f : R✝ →+* S
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
ι : Type u_2
s : Finset ι
p : ι → R[X]
x : R
⊢ IsRoot (∏ j in s, p j) x ↔ ∃ i, i ∈ s ∧ IsRoot (p i) x
Theorem: QuaternionAlgebra.self_add_star
File: Mathlib/Algebra/Quaternion.lean

tactic: simp only [self_add_star', two_mul, coe_add]
state_before: S : Type ?u.309689
T : Type ?u.309692
R : Type u_1
inst✝ : CommRing R
c₁ c₂ r x y z : R
a b c : ℍ[R,c₁,c₂]
⊢ a + star a = 2 * ↑a.re
Theorem: Multiset.Rel.countp_eq
File: Mathlib/Data/Multiset/Basic.lean

tactic: induction' s using Multiset.induction_on with y s ih generalizing t
state_before: α : Type u_1
β : Type ?u.476873
γ : Type ?u.476876
δ : Type ?u.476879
r✝ : α → β → Prop
p : γ → δ → Prop
r : α → α → Prop
inst✝² : IsTrans α r
inst✝¹ : IsSymm α r
s t : Multiset α
x : α
inst✝ : DecidablePred (r x)
h : Rel r s t
⊢ countp (r x) s = countp (r x) t

tactic: rw [rel_zero_left.mp h]
state_before: case empty
α : Type u_1
β : Type ?u.476873
γ : Type ?u.476876
δ : Type ?u.476879
r✝ : α → β → Prop
p : γ → δ → Prop
r : α → α → Prop
inst✝² : IsTrans α r
inst✝¹ : IsSymm α r
s t✝ : Multiset α
x : α
inst✝ : DecidablePred (r x)
h✝ : Rel r s t✝
t : Multiset α
h : Rel r 0 t
⊢ countp (r x) 0 = countp (r x) t

tactic: obtain ⟨b, bs, hb1, hb2, rfl⟩ := rel_cons_left.mp h
state_before: case cons
α : Type u_1
β : Type ?u.476873
γ : Type ?u.476876
δ : Type ?u.476879
r✝ : α → β → Prop
p : γ → δ → Prop
r : α → α → Prop
inst✝² : IsTrans α r
inst✝¹ : IsSymm α r
s✝ t✝ : Multiset α
x : α
inst✝ : DecidablePred (r x)
h✝ : Rel r s✝ t✝
y : α
s : Multiset α
ih : ∀ {t : Multiset α}, Rel r s t → countp (r x) s = countp (r x) t
t : Multiset α
h : Rel r (y ::ₘ s) t
⊢ countp (r x) (y ::ₘ s) = countp (r x) t

tactic: rw [countp_cons, countp_cons, ih hb2]
state_before: case cons.intro.intro.intro.intro
α : Type u_1
β : Type ?u.476873
γ : Type ?u.476876
δ : Type ?u.476879
r✝ : α → β → Prop
p : γ → δ → Prop
r : α → α → Prop
inst✝² : IsTrans α r
inst✝¹ : IsSymm α r
s✝ t : Multiset α
x : α
inst✝ : DecidablePred (r x)
h✝ : Rel r s✝ t
y : α
s : Multiset α
ih : ∀ {t : Multiset α}, Rel r s t → countp (r x) s = countp (r x) t
b : α
bs : Multiset α
hb1 : r y b
hb2 : Rel r s bs
h : Rel r (y ::ₘ s) (b ::ₘ bs)
⊢ countp (r x) (y ::ₘ s) = countp (r x) (b ::ₘ bs)

tactic: simp only [decide_eq_true_eq, add_right_inj]
state_before: case cons.intro.intro.intro.intro
α : Type u_1
β : Type ?u.476873
γ : Type ?u.476876
δ : Type ?u.476879
r✝ : α → β → Prop
p : γ → δ → Prop
r : α → α → Prop
inst✝² : IsTrans α r
inst✝¹ : IsSymm α r
s✝ t : Multiset α
x : α
inst✝ : DecidablePred (r x)
h✝ : Rel r s✝ t
y : α
s : Multiset α
ih : ∀ {t : Multiset α}, Rel r s t → countp (r x) s = countp (r x) t
b : α
bs : Multiset α
hb1 : r y b
hb2 : Rel r s bs
h : Rel r (y ::ₘ s) (b ::ₘ bs)
⊢ (countp (r x) bs + if r x y then 1 else 0) = countp (r x) bs + if r x b then 1 else 0

tactic: refine' (if_congr ⟨fun h => _root_.trans h hb1, fun h => _root_.trans h (symm hb1)⟩ rfl rfl)
state_before: case cons.intro.intro.intro.intro
α : Type u_1
β : Type ?u.476873
γ : Type ?u.476876
δ : Type ?u.476879
r✝ : α → β → Prop
p : γ → δ → Prop
r : α → α → Prop
inst✝² : IsTrans α r
inst✝¹ : IsSymm α r
s✝ t : Multiset α
x : α
inst✝ : DecidablePred (r x)
h✝ : Rel r s✝ t
y : α
s : Multiset α
ih : ∀ {t : Multiset α}, Rel r s t → countp (r x) s = countp (r x) t
b : α
bs : Multiset α
hb1 : r y b
hb2 : Rel r s bs
h : Rel r (y ::ₘ s) (b ::ₘ bs)
⊢ (if r x y then 1 else 0) = if r x b then 1 else 0
Theorem: MulHom.cancel_left
File: Mathlib/Algebra/Hom/Group.lean

tactic: rw [← MulHom.comp_apply, h, MulHom.comp_apply]
state_before: α : Type ?u.168920
β : Type ?u.168923
M : Type u_1
N : Type u_2
P : Type u_3
G : Type ?u.168935
H : Type ?u.168938
F : Type ?u.168941
inst✝² : Mul M
inst✝¹ : Mul N
inst✝ : Mul P
g : N →ₙ* P
f₁ f₂ : M →ₙ* N
hg : Function.Injective ↑g
h : comp g f₁ = comp g f₂
x : M
⊢ ↑g (↑f₁ x) = ↑g (↑f₂ x)
Theorem: mul_add_mul_lt_mul_add_mul'
File: Mathlib/Algebra/Order/Ring/Canonical.lean

tactic: rw [add_comm (a • d), add_comm (a • c)]
state_before: α : Type u
β : Type ?u.13770
inst✝¹ : StrictOrderedSemiring α
a b c d : α
inst✝ : ExistsAddOfLE α
hba : b < a
hdc : d < c
⊢ a • d + b • c < a • c + b • d

tactic: exact mul_add_mul_lt_mul_add_mul hba hdc
state_before: α : Type u
β : Type ?u.13770
inst✝¹ : StrictOrderedSemiring α
a b c d : α
inst✝ : ExistsAddOfLE α
hba : b < a
hdc : d < c
⊢ b • c + a • d < b • d + a • c
Theorem: Computation.bind_pure
File: Mathlib/Data/Seq/Computation.lean

tactic: apply eq_of_bisim fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
s : Computation α
⊢ bind s (pure ∘ f) = map f s

tactic: intro c₁ c₂ h
state_before: case bisim
α : Type u
β : Type v
γ : Type w
f : α → β
s : Computation α
⊢ IsBisimulation fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s

tactic: exact
  match c₁, c₂, h with
  | _, c₂, Or.inl (Eq.refl _) => by cases' destruct c₂ with b cb <;> simp
  | _, _, Or.inr ⟨s, rfl, rfl⟩ => by
    apply recOn s <;> intro s <;> simp
    exact Or.inr ⟨s, rfl, rfl⟩
state_before: case bisim
α : Type u
β : Type v
γ : Type w
f : α → β
s : Computation α
c₁ c₂ : Computation β
h : c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s
⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s) (destruct c₁) (destruct c₂)

tactic: cases' destruct c₂ with b cb <;> simp
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
s : Computation α
c₁ c₂✝ : Computation β
h : c₁ = c₂✝ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂✝ = map f s
c₂ : Computation β
⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s) (destruct c₂) (destruct c₂)

tactic: apply recOn s <;> intro s <;> simp
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
s✝ : Computation α
c₁ c₂ : Computation β
h : c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s
s : Computation α
⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s) (destruct (bind s (pure ∘ f)))
    (destruct (map f s))

tactic: exact Or.inr ⟨s, rfl, rfl⟩
state_before: case h2
α : Type u
β : Type v
γ : Type w
f : α → β
s✝¹ : Computation α
c₁ c₂ : Computation β
h : c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s
s✝ s : Computation α
⊢ bind s (pure ∘ f) = map f s ∨ ∃ s_1, bind s (pure ∘ f) = bind s_1 (pure ∘ f) ∧ map f s = map f s_1

tactic: exact Or.inr ⟨s, rfl, rfl⟩
state_before: case r
α : Type u
β : Type v
γ : Type w
f : α → β
s : Computation α
⊢ bind s (pure ∘ f) = map f s ∨ ∃ s_1, bind s (pure ∘ f) = bind s_1 (pure ∘ f) ∧ map f s = map f s_1
Theorem: BoxIntegral.hasIntegral_zero
File: Mathlib/Analysis/BoxIntegral/Basic.lean

tactic: simpa only [← (vol I).map_zero] using hasIntegral_const (0 : E)
state_before: ι : Type u
E : Type v
F : Type w
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
I J : Box ι
π : TaggedPrepartition I
inst✝ : Fintype ι
l : IntegrationParams
f g : (ι → ℝ) → E
vol : ι →ᵇᵃ[⊤] E →L[ℝ] F
y y' : F
⊢ HasIntegral I l (fun x => 0) vol 0
Theorem: Pmf.bindOnSupport_pure
File: Mathlib/Probability/ProbabilityMassFunction/Monad.lean

tactic: simp only [Pmf.bind_pure, Pmf.bindOnSupport_eq_bind]
state_before: α : Type u_1
β : Type ?u.116357
γ : Type ?u.116360
p✝ : Pmf α
f : (a : α) → a ∈ support p✝ → Pmf β
p : Pmf α
⊢ (bindOnSupport p fun a x => pure a) = p
Theorem: MvPolynomial.totalDegree_monomial
File: Mathlib/Data/MvPolynomial/Variables.lean

tactic: classical simp [totalDegree, support_monomial, if_neg hc]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.460088
r : R
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
s : σ →₀ ℕ
c : R
hc : c ≠ 0
⊢ totalDegree (↑(monomial s) c) = sum s fun x e => e

tactic: simp [totalDegree, support_monomial, if_neg hc]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.460088
r : R
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
s : σ →₀ ℕ
c : R
hc : c ≠ 0
⊢ totalDegree (↑(monomial s) c) = sum s fun x e => e
Theorem: Real.cos_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: rw [← mul_div_cancel_left π (two_ne_zero' ℝ), mul_div_assoc, cos_two_mul, cos_pi_div_two]
state_before: ⊢ cos π = -1

tactic: norm_num
state_before: ⊢ 2 * 0 ^ 2 - 1 = -1