tasksource/leandojo huggingface dataset:
Theorem: Finset.prod_ite_of_false
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: rw [prod_ite, filter_false_of_mem, filter_true_of_mem]
state_before: ι : Type ?u.403432
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝ : CommMonoid β
p : α → Prop
hp : DecidablePred p
f g : α → β
h : ∀ (x : α), x ∈ s → ¬p x
⊢ (∏ x in s, if p x then f x else g x) = ∏ x in s, g x

tactic: all_goals intros; simp; apply h; assumption
state_before: ι : Type ?u.403432
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝ : CommMonoid β
p : α → Prop
hp : DecidablePred p
f g : α → β
h : ∀ (x : α), x ∈ s → ¬p x
⊢ ∀ (x : α), x ∈ s → ¬p x

ι : Type ?u.403432
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝ : CommMonoid β
p : α → Prop
hp : DecidablePred p
f g : α → β
h : ∀ (x : α), x ∈ s → ¬p x
⊢ ∀ (x : α), x ∈ s → ¬p x

tactic: simp only [prod_empty, one_mul]
state_before: ι : Type ?u.403432
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝ : CommMonoid β
p : α → Prop
hp : DecidablePred p
f g : α → β
h : ∀ (x : α), x ∈ s → ¬p x
⊢ (∏ x in ∅, f x) * ∏ x in s, g x = ∏ x in s, g x

tactic: intros
state_before: ι : Type ?u.403432
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝ : CommMonoid β
p : α → Prop
hp : DecidablePred p
f g : α → β
h : ∀ (x : α), x ∈ s → ¬p x
⊢ ∀ (x : α), x ∈ s → ¬p x

tactic: simp
state_before: ι : Type ?u.403432
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝ : CommMonoid β
p : α → Prop
hp : DecidablePred p
f g : α → β
h : ∀ (x : α), x ∈ s → ¬p x
x✝ : α
a✝ : x✝ ∈ s
⊢ ¬p x✝

tactic: apply h
state_before: ι : Type ?u.403432
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝ : CommMonoid β
p : α → Prop
hp : DecidablePred p
f g : α → β
h : ∀ (x : α), x ∈ s → ¬p x
x✝ : α
a✝ : x✝ ∈ s
⊢ ¬p x✝

tactic: assumption
state_before: case a
ι : Type ?u.403432
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝ : CommMonoid β
p : α → Prop
hp : DecidablePred p
f g : α → β
h : ∀ (x : α), x ∈ s → ¬p x
x✝ : α
a✝ : x✝ ∈ s
⊢ x✝ ∈ s
Theorem: MeasurableEmbedding.essSup_map_measure
File: Mathlib/MeasureTheory/Function/EssSup.lean

tactic: refine' le_antisymm _ (essSup_comp_le_essSup_map_measure hf.measurable.aemeasurable)
state_before: α : Type u_1
β : Type u_3
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝ : CompleteLattice β
γ : Type u_2
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : MeasurableEmbedding f
⊢ essSup g (Measure.map f μ) = essSup (g ∘ f) μ

tactic: refine' limsSup_le_limsSup (by isBoundedDefault) (by isBoundedDefault) (fun c h_le => _)
state_before: α : Type u_1
β : Type u_3
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝ : CompleteLattice β
γ : Type u_2
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : MeasurableEmbedding f
⊢ essSup g (Measure.map f μ) ≤ essSup (g ∘ f) μ

tactic: rw [eventually_map] at h_le ⊢
state_before: α : Type u_1
β : Type u_3
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝ : CompleteLattice β
γ : Type u_2
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : MeasurableEmbedding f
c : β
h_le : ∀ᶠ (n : β) in map (g ∘ f) (Measure.ae μ), n ≤ c
⊢ ∀ᶠ (n : β) in map g (Measure.ae (Measure.map f μ)), n ≤ c

tactic: exact hf.ae_map_iff.mpr h_le
state_before: α : Type u_1
β : Type u_3
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝ : CompleteLattice β
γ : Type u_2
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : MeasurableEmbedding f
c : β
h_le : ∀ᵐ (a : α) ∂μ, (g ∘ f) a ≤ c
⊢ ∀ᵐ (a : γ) ∂Measure.map f μ, g a ≤ c

tactic: isBoundedDefault
state_before: α : Type u_1
β : Type u_3
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝ : CompleteLattice β
γ : Type u_2
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : MeasurableEmbedding f
⊢ IsCobounded (fun x x_1 => x ≤ x_1) (map g (Measure.ae (Measure.map f μ)))

tactic: isBoundedDefault
state_before: α : Type u_1
β : Type u_3
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝ : CompleteLattice β
γ : Type u_2
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : MeasurableEmbedding f
⊢ IsBounded (fun x x_1 => x ≤ x_1) (map (g ∘ f) (Measure.ae μ))
Theorem: Equiv.subset_image'
File: Mathlib/Logic/Equiv/Set.lean

tactic: rw [e.symm.subset_image]
state_before: α✝ : Sort u
β✝ : Sort v
γ : Sort w
α : Type u_1
β : Type u_2
e : α ≃ β
s : Set α
t : Set β
⊢ s ⊆ ↑e.symm '' t ↔ ↑e.symm.symm '' s ⊆ t

tactic: rw [e.symm_symm]
state_before: α✝ : Sort u
β✝ : Sort v
γ : Sort w
α : Type u_1
β : Type u_2
e : α ≃ β
s : Set α
t : Set β
⊢ ↑e.symm.symm '' s ⊆ t ↔ ↑e '' s ⊆ t
Theorem: Nat.dvd_ofDigits_sub_ofDigits
File: Mathlib/Data/Nat/Digits.lean

tactic: induction' L with d L ih
state_before: n : ℕ
α : Type u_1
inst✝ : CommRing α
a b k : α
h : k ∣ a - b
L : List ℕ
⊢ k ∣ ofDigits a L - ofDigits b L

tactic: change k ∣ 0 - 0
state_before: case nil
n : ℕ
α : Type u_1
inst✝ : CommRing α
a b k : α
h : k ∣ a - b
⊢ k ∣ ofDigits a [] - ofDigits b []

tactic: simp
state_before: case nil
n : ℕ
α : Type u_1
inst✝ : CommRing α
a b k : α
h : k ∣ a - b
⊢ k ∣ 0 - 0

tactic: simp only [ofDigits, add_sub_add_left_eq_sub]
state_before: case cons
n : ℕ
α : Type u_1
inst✝ : CommRing α
a b k : α
h : k ∣ a - b
d : ℕ
L : List ℕ
ih : k ∣ ofDigits a L - ofDigits b L
⊢ k ∣ ofDigits a (d :: L) - ofDigits b (d :: L)

tactic: exact dvd_mul_sub_mul h ih
state_before: case cons
n : ℕ
α : Type u_1
inst✝ : CommRing α
a b k : α
h : k ∣ a - b
d : ℕ
L : List ℕ
ih : k ∣ ofDigits a L - ofDigits b L
⊢ k ∣ a * ofDigits a L - b * ofDigits b L
Theorem: upperBounds_insert
File: Mathlib/Order/Bounds/Basic.lean

tactic: rw [insert_eq, upperBounds_union, upperBounds_singleton]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝¹ : Preorder α
inst✝ : Preorder β
s✝ t : Set α
a✝ b a : α
s : Set α
⊢ upperBounds (insert a s) = Ici a ∩ upperBounds s
Theorem: BoundedContinuousFunction.dist_zero_of_empty
File: Mathlib/Topology/ContinuousFunction/Bounded.lean

tactic: rw [(ext isEmptyElim : f = g), dist_self]
state_before: F : Type ?u.306222
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : PseudoMetricSpace γ
f g : α →ᵇ β
x : α
C : ℝ
inst✝ : IsEmpty α
⊢ dist f g = 0
Theorem: Lists'.subset_def
File: Mathlib/SetTheory/Lists.lean

tactic: rw [← of_toList l₁]
state_before: α : Type u_1
l₁ l₂ : Lists' α true
H : ∀ (a : Lists α), a ∈ toList l₁ → a ∈ l₂
⊢ l₁ ⊆ l₂

tactic: revert H
state_before: α : Type u_1
l₁ l₂ : Lists' α true
H : ∀ (a : Lists α), a ∈ toList l₁ → a ∈ l₂
⊢ ofList (toList l₁) ⊆ l₂

tactic: induction' toList l₁ with h t t_ih <;> intro H
state_before: α : Type u_1
l₁ l₂ : Lists' α true
⊢ (∀ (a : Lists α), a ∈ toList l₁ → a ∈ l₂) → ofList (toList l₁) ⊆ l₂

tactic: exact Subset.nil
state_before: case nil
α : Type u_1
l₁ l₂ : Lists' α true
H : ∀ (a : Lists α), a ∈ [] → a ∈ l₂
⊢ ofList [] ⊆ l₂

tactic: simp only [ofList, List.find?, List.mem_cons, forall_eq_or_imp] at *
state_before: case cons
α : Type u_1
l₁ l₂ : Lists' α true
h : Lists α
t : List (Lists α)
t_ih : (∀ (a : Lists α), a ∈ t → a ∈ l₂) → ofList t ⊆ l₂
H : ∀ (a : Lists α), a ∈ h :: t → a ∈ l₂
⊢ ofList (h :: t) ⊆ l₂

tactic: exact cons_subset.2 ⟨H.1, t_ih H.2⟩
state_before: case cons
α : Type u_1
l₁ l₂ : Lists' α true
h : Lists α
t : List (Lists α)
t_ih : (∀ (a : Lists α), a ∈ t → a ∈ l₂) → ofList t ⊆ l₂
H : h ∈ l₂ ∧ ∀ (a : Lists α), a ∈ t → a ∈ l₂
⊢ cons h (ofList t) ⊆ l₂
Theorem: Equiv.Perm.decomposeFin_symm_apply_one
File: Mathlib/GroupTheory/Perm/Fin.lean

tactic: rw [← Fin.succ_zero_eq_one, Equiv.Perm.decomposeFin_symm_apply_succ e p 0]
state_before: n : ℕ
e : Perm (Fin (n + 1))
p : Fin (n + 2)
⊢ ↑(↑decomposeFin.symm (p, e)) 1 = ↑(swap 0 p) (Fin.succ (↑e 0))
Theorem: EMetric.hausdorffEdist_comm
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: simp only [hausdorffEdist_def]
state_before: ι : Sort ?u.35598
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
⊢ hausdorffEdist s t = hausdorffEdist t s

tactic: apply sup_comm
state_before: ι : Sort ?u.35598
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
⊢ ((⨆ (x : α) (_ : x ∈ s), infEdist x t) ⊔ ⨆ (y : α) (_ : y ∈ t), infEdist y s) =
    (⨆ (y : α) (_ : y ∈ t), infEdist y s) ⊔ ⨆ (x : α) (_ : x ∈ s), infEdist x t
Theorem: Set.image2_distrib_subset_right
File: Mathlib/Data/Set/NAry.lean

tactic: rintro _ ⟨_, c, ⟨a, b, ha, hb, rfl⟩, hc, rfl⟩
state_before: α : Type u_4
α' : Type u_6
β : Type u_5
β' : Type u_7
γ : Type u_3
γ' : Type ?u.46897
δ : Type u_2
δ' : Type ?u.46903
ε : Type u_1
ε' : Type ?u.46909
ζ : Type ?u.46912
ζ' : Type ?u.46915
ν : Type ?u.46918
f✝ f' : α → β → γ
g✝ g'✝ : α → β → γ → δ
s s' : Set α
t t' : Set β
u u' : Set γ
v : Set δ
a a' : α
b b' : β
c c' : γ
d d' : δ
f : δ → γ → ε
g : α → β → δ
f₁ : α → γ → α'
f₂ : β → γ → β'
g' : α' → β' → ε
h_distrib : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f₁ a c) (f₂ b c)
⊢ image2 f (image2 g s t) u ⊆ image2 g' (image2 f₁ s u) (image2 f₂ t u)

tactic: rw [h_distrib]
state_before: case intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_4
α' : Type u_6
β : Type u_5
β' : Type u_7
γ : Type u_3
γ' : Type ?u.46897
δ : Type u_2
δ' : Type ?u.46903
ε : Type u_1
ε' : Type ?u.46909
ζ : Type ?u.46912
ζ' : Type ?u.46915
ν : Type ?u.46918
f✝ f' : α → β → γ
g✝ g'✝ : α → β → γ → δ
s s' : Set α
t t' : Set β
u u' : Set γ
v : Set δ
a✝ a' : α
b✝ b' : β
c✝ c' : γ
d d' : δ
f : δ → γ → ε
g : α → β → δ
f₁ : α → γ → α'
f₂ : β → γ → β'
g' : α' → β' → ε
h_distrib : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f₁ a c) (f₂ b c)
c : γ
a : α
b : β
ha : a ∈ s
hb : b ∈ t
hc : c ∈ u
⊢ f (g a b) c ∈ image2 g' (image2 f₁ s u) (image2 f₂ t u)

tactic: exact mem_image2_of_mem (mem_image2_of_mem ha hc) (mem_image2_of_mem hb hc)
state_before: case intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_4
α' : Type u_6
β : Type u_5
β' : Type u_7
γ : Type u_3
γ' : Type ?u.46897
δ : Type u_2
δ' : Type ?u.46903
ε : Type u_1
ε' : Type ?u.46909
ζ : Type ?u.46912
ζ' : Type ?u.46915
ν : Type ?u.46918
f✝ f' : α → β → γ
g✝ g'✝ : α → β → γ → δ
s s' : Set α
t t' : Set β
u u' : Set γ
v : Set δ
a✝ a' : α
b✝ b' : β
c✝ c' : γ
d d' : δ
f : δ → γ → ε
g : α → β → δ
f₁ : α → γ → α'
f₂ : β → γ → β'
g' : α' → β' → ε
h_distrib : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f₁ a c) (f₂ b c)
c : γ
a : α
b : β
ha : a ∈ s
hb : b ∈ t
hc : c ∈ u
⊢ g' (f₁ a c) (f₂ b c) ∈ image2 g' (image2 f₁ s u) (image2 f₂ t u)
Theorem: Bool.xor_iff_ne
File: Mathlib/Data/Bool/Basic.lean

tactic: decide
state_before: ⊢ ∀ {x y : Bool}, xor x y = true ↔ x ≠ y
Theorem: Finset.ofDual_max'
File: Mathlib/Data/Finset/Lattice.lean

tactic: rw [← WithTop.coe_eq_coe]
state_before: F : Type ?u.352825
α : Type u_1
β : Type ?u.352831
γ : Type ?u.352834
ι : Type ?u.352837
κ : Type ?u.352840
inst✝ : LinearOrder α
s✝ : Finset α
H : Finset.Nonempty s✝
x : α
s : Finset αᵒᵈ
hs : Finset.Nonempty s
⊢ ↑ofDual (max' s hs) = min' (image (↑ofDual) s) (_ : Finset.Nonempty (image (↑ofDual) s))

tactic: simp only [max'_eq_sup', id_eq, ofDual_sup', Function.comp_apply, coe_inf', min'_eq_inf',
  inf_image]
state_before: F : Type ?u.352825
α : Type u_1
β : Type ?u.352831
γ : Type ?u.352834
ι : Type ?u.352837
κ : Type ?u.352840
inst✝ : LinearOrder α
s✝ : Finset α
H : Finset.Nonempty s✝
x : α
s : Finset αᵒᵈ
hs : Finset.Nonempty s
⊢ ↑(↑ofDual (max' s hs)) = ↑(min' (image (↑ofDual) s) (_ : Finset.Nonempty (image (↑ofDual) s)))

tactic: rfl
state_before: F : Type ?u.352825
α : Type u_1
β : Type ?u.352831
γ : Type ?u.352834
ι : Type ?u.352837
κ : Type ?u.352840
inst✝ : LinearOrder α
s✝ : Finset α
H : Finset.Nonempty s✝
x : α
s : Finset αᵒᵈ
hs : Finset.Nonempty s
⊢ inf s (WithTop.some ∘ fun x => ↑ofDual x) = inf s ((WithTop.some ∘ fun x => x) ∘ ↑ofDual)
Theorem: generateFrom_eq_prod
File: Mathlib/MeasureTheory/Constructions/Prod/Basic.lean

tactic: rw [← hC, ← hD, generateFrom_prod_eq h2C h2D]
state_before: α : Type u_1
α' : Type ?u.808243
β : Type u_2
β' : Type ?u.808249
γ : Type ?u.808252
E : Type ?u.808255
inst✝⁵ : MeasurableSpace α
inst✝⁴ : MeasurableSpace α'
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace β'
inst✝¹ : MeasurableSpace γ
μ μ' : MeasureTheory.Measure α
ν ν' : MeasureTheory.Measure β
τ : MeasureTheory.Measure γ
inst✝ : NormedAddCommGroup E
C : Set (Set α)
D : Set (Set β)
hC : generateFrom C = inst✝⁵
hD : generateFrom D = inst✝³
h2C : IsCountablySpanning C
h2D : IsCountablySpanning D
⊢ generateFrom (image2 (fun x x_1 => x ×ˢ x_1) C D) = Prod.instMeasurableSpace
Theorem: MeasureTheory.SimpleFunc.edist_approxOn_mono
File: Mathlib/MeasureTheory/Function/SimpleFuncDense.lean

tactic: dsimp only [approxOn, coe_comp, Function.comp]
state_before: α : Type u_2
β : Type u_1
ι : Type ?u.64039
E : Type ?u.64042
F : Type ?u.64045
𝕜 : Type ?u.64048
inst✝⁴ : MeasurableSpace α
inst✝³ : PseudoEMetricSpace α
inst✝² : OpensMeasurableSpace α
inst✝¹ : MeasurableSpace β
f✝ f : β → α
hf : Measurable f
s : Set α
y₀ : α
h₀ : y₀ ∈ s
inst✝ : SeparableSpace ↑s
x : β
m n : ℕ
h : m ≤ n
⊢ edist (↑(approxOn f hf s y₀ h₀ n) x) (f x) ≤ edist (↑(approxOn f hf s y₀ h₀ m) x) (f x)

tactic: exact edist_nearestPt_le _ _ ((nearestPtInd_le _ _ _).trans h)
state_before: α : Type u_2
β : Type u_1
ι : Type ?u.64039
E : Type ?u.64042
F : Type ?u.64045
𝕜 : Type ?u.64048
inst✝⁴ : MeasurableSpace α
inst✝³ : PseudoEMetricSpace α
inst✝² : OpensMeasurableSpace α
inst✝¹ : MeasurableSpace β
f✝ f : β → α
hf : Measurable f
s : Set α
y₀ : α
h₀ : y₀ ∈ s
inst✝ : SeparableSpace ↑s
x : β
m n : ℕ
h : m ≤ n
⊢ edist (↑(nearestPt (fun k => Nat.rec y₀ (fun n n_ih => ↑(denseSeq (↑s) n)) k) n) (f x)) (f x) ≤
    edist (↑(nearestPt (fun k => Nat.rec y₀ (fun n n_ih => ↑(denseSeq (↑s) n)) k) m) (f x)) (f x)
Theorem: ContinuousLinearEquiv.comp_right_hasFDerivAt_iff'
File: Mathlib/Analysis/Calculus/FDeriv/Equiv.lean

tactic: simp only [← hasFDerivWithinAt_univ, ← iso.comp_right_hasFDerivWithinAt_iff', preimage_univ]
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_4
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_3
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.225072
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f✝ f₀ f₁ g : E → F
f'✝ f₀' f₁' g' e : E →L[𝕜] F
x✝ : E
s t : Set E
L L₁ L₂ : Filter E
iso : E ≃L[𝕜] F
f : F → G
x : E
f' : E →L[𝕜] G
⊢ HasFDerivAt (f ∘ ↑iso) f' x ↔ HasFDerivAt f (comp f' ↑(ContinuousLinearEquiv.symm iso)) (↑iso x)
Theorem: Real.sinh_nonpos_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean

tactic: simpa only [sinh_zero] using @sinh_le_sinh x 0
state_before: x y z : ℝ
⊢ sinh x ≤ 0 ↔ x ≤ 0
Theorem: Polynomial.Monic.degree_mul_comm
File: Mathlib/Data/Polynomial/Monic.lean

tactic: by_cases h : q = 0
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hp : Monic p
q : R[X]
⊢ degree (p * q) = degree (q * p)

tactic: rw [degree_mul', hp.degree_mul]
state_before: case neg
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hp : Monic p
q : R[X]
h : ¬q = 0
⊢ degree (p * q) = degree (q * p)

tactic: simp [h]
state_before: case pos
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hp : Monic p
q : R[X]
h : q = 0
⊢ degree (p * q) = degree (q * p)

tactic: exact add_comm _ _
state_before: case neg
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hp : Monic p
q : R[X]
h : ¬q = 0
⊢ degree p + degree q = degree q + degree p

tactic: rwa [hp.leadingCoeff, one_mul, leadingCoeff_ne_zero]
state_before: case neg
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hp : Monic p
q : R[X]
h : ¬q = 0
⊢ Polynomial.leadingCoeff p * Polynomial.leadingCoeff q ≠ 0
Theorem: EReal.tendsto_nhds_top_iff_real
File: Mathlib/Topology/Instances/EReal.lean

tactic: simp only [true_implies, mem_Ioi]
state_before: α✝ : Type ?u.12287
inst✝ : TopologicalSpace α✝
α : Type u_1
m : α → EReal
f : Filter α
⊢ (∀ (i : ℝ), True → ∀ᶠ (x : α) in f, m x ∈ Ioi ↑i) ↔ ∀ (x : ℝ), ∀ᶠ (a : α) in f, ↑x < m a
Theorem: ContinuousLinearMap.dslope_comp
File: Mathlib/Analysis/Calculus/Dslope.lean

tactic: rcases eq_or_ne b a with (rfl | hne)
state_before: 𝕜 : Type u_2
E : Type u_3
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f✝ : 𝕜 → E
a✝ b✝ : 𝕜
s : Set 𝕜
F : Type u_1
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
f : E →L[𝕜] F
g : 𝕜 → E
a b : 𝕜
H : a = b → DifferentiableAt 𝕜 g a
⊢ dslope (↑f ∘ g) a b = ↑f (dslope g a b)

tactic: simp only [dslope_same]
state_before: case inl
𝕜 : Type u_2
E : Type u_3
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f✝ : 𝕜 → E
a b✝ : 𝕜
s : Set 𝕜
F : Type u_1
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
f : E →L[𝕜] F
g : 𝕜 → E
b : 𝕜
H : b = b → DifferentiableAt 𝕜 g b
⊢ dslope (↑f ∘ g) b b = ↑f (dslope g b b)

tactic: exact (f.hasFDerivAt.comp_hasDerivAt b (H rfl).hasDerivAt).deriv
state_before: case inl
𝕜 : Type u_2
E : Type u_3
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f✝ : 𝕜 → E
a b✝ : 𝕜
s : Set 𝕜
F : Type u_1
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
f : E →L[𝕜] F
g : 𝕜 → E
b : 𝕜
H : b = b → DifferentiableAt 𝕜 g b
⊢ deriv (↑f ∘ g) b = ↑f (deriv g b)

tactic: simpa only [dslope_of_ne _ hne] using f.toLinearMap.slope_comp g a b
state_before: case inr
𝕜 : Type u_2
E : Type u_3
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f✝ : 𝕜 → E
a✝ b✝ : 𝕜
s : Set 𝕜
F : Type u_1
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
f : E →L[𝕜] F
g : 𝕜 → E
a b : 𝕜
H : a = b → DifferentiableAt 𝕜 g a
hne : b ≠ a
⊢ dslope (↑f ∘ g) a b = ↑f (dslope g a b)
Theorem: TrivSqZeroExt.exp_inr
File: Mathlib/Analysis/NormedSpace/TrivSqZeroExt.lean

tactic: rw [exp_def_of_smul_comm, snd_inr, fst_inr, exp_zero, one_smul, inl_one]
state_before: 𝕜 : Type u_3
R : Type u_1
M : Type u_2
inst✝¹⁷ : IsROrC 𝕜
inst✝¹⁶ : NormedRing R
inst✝¹⁵ : AddCommGroup M
inst✝¹⁴ : NormedAlgebra 𝕜 R
inst✝¹³ : Module R M
inst✝¹² : Module Rᵐᵒᵖ M
inst✝¹¹ : SMulCommClass R Rᵐᵒᵖ M
inst✝¹⁰ : Module 𝕜 M
inst✝⁹ : IsScalarTower 𝕜 R M
inst✝⁸ : IsScalarTower 𝕜 Rᵐᵒᵖ M
inst✝⁷ : TopologicalSpace M
inst✝⁶ : TopologicalRing R
inst✝⁵ : TopologicalAddGroup M
inst✝⁴ : ContinuousSMul R M
inst✝³ : ContinuousSMul Rᵐᵒᵖ M
inst✝² : CompleteSpace R
inst✝¹ : T2Space R
inst✝ : T2Space M
m : M
⊢ exp 𝕜 (inr m) = 1 + inr m

tactic: rw [snd_inr, fst_inr, MulOpposite.op_zero, zero_smul, zero_smul]
state_before: case hx
𝕜 : Type u_3
R : Type u_1
M : Type u_2
inst✝¹⁷ : IsROrC 𝕜
inst✝¹⁶ : NormedRing R
inst✝¹⁵ : AddCommGroup M
inst✝¹⁴ : NormedAlgebra 𝕜 R
inst✝¹³ : Module R M
inst✝¹² : Module Rᵐᵒᵖ M
inst✝¹¹ : SMulCommClass R Rᵐᵒᵖ M
inst✝¹⁰ : Module 𝕜 M
inst✝⁹ : IsScalarTower 𝕜 R M
inst✝⁸ : IsScalarTower 𝕜 Rᵐᵒᵖ M
inst✝⁷ : TopologicalSpace M
inst✝⁶ : TopologicalRing R
inst✝⁵ : TopologicalAddGroup M
inst✝⁴ : ContinuousSMul R M
inst✝³ : ContinuousSMul Rᵐᵒᵖ M
inst✝² : CompleteSpace R
inst✝¹ : T2Space R
inst✝ : T2Space M
m : M
⊢ MulOpposite.op (fst (inr m)) • snd (inr m) = fst (inr m) • snd (inr m)
Theorem: Polynomial.leadingCoeff_X
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: simpa only [pow_one] using @leadingCoeff_X_pow R _ 1
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.644630
⊢ leadingCoeff X = 1
Theorem: List.Perm.foldl_eq'
File: Mathlib/Data/List/Perm.lean

tactic: simp only [foldl]
state_before: α : Type uu
β : Type vv
l₁✝ l₂✝ : List α
f : β → α → β
l₁ l₂ : List α
p : l₁ ~ l₂
x y : α
t₁ t₂ : List α
_p : t₁ ~ t₂
r :
  (∀ (x : α), x ∈ t₁ → ∀ (y : α), y ∈ t₁ → ∀ (z : β), f (f z x) y = f (f z y) x) →
    ∀ (b : β), foldl f b t₁ = foldl f b t₂
H : ∀ (x_1 : α), x_1 ∈ y :: x :: t₁ → ∀ (y_1 : α), y_1 ∈ y :: x :: t₁ → ∀ (z : β), f (f z x_1) y_1 = f (f z y_1) x_1
b : β
⊢ foldl f b (y :: x :: t₁) = foldl f b (x :: y :: t₂)

tactic: rw [H x (.tail _ <| .head _) y (.head _)]
state_before: α : Type uu
β : Type vv
l₁✝ l₂✝ : List α
f : β → α → β
l₁ l₂ : List α
p : l₁ ~ l₂
x y : α
t₁ t₂ : List α
_p : t₁ ~ t₂
r :
  (∀ (x : α), x ∈ t₁ → ∀ (y : α), y ∈ t₁ → ∀ (z : β), f (f z x) y = f (f z y) x) →
    ∀ (b : β), foldl f b t₁ = foldl f b t₂
H : ∀ (x_1 : α), x_1 ∈ y :: x :: t₁ → ∀ (y_1 : α), y_1 ∈ y :: x :: t₁ → ∀ (z : β), f (f z x_1) y_1 = f (f z y_1) x_1
b : β
⊢ foldl f (f (f b y) x) t₁ = foldl f (f (f b x) y) t₂

tactic: exact r (fun x hx y hy => H _ (.tail _ <| .tail _ hx) _ (.tail _ <| .tail _ hy)) _
state_before: α : Type uu
β : Type vv
l₁✝ l₂✝ : List α
f : β → α → β
l₁ l₂ : List α
p : l₁ ~ l₂
x y : α
t₁ t₂ : List α
_p : t₁ ~ t₂
r :
  (∀ (x : α), x ∈ t₁ → ∀ (y : α), y ∈ t₁ → ∀ (z : β), f (f z x) y = f (f z y) x) →
    ∀ (b : β), foldl f b t₁ = foldl f b t₂
H : ∀ (x_1 : α), x_1 ∈ y :: x :: t₁ → ∀ (y_1 : α), y_1 ∈ y :: x :: t₁ → ∀ (z : β), f (f z x_1) y_1 = f (f z y_1) x_1
b : β
⊢ foldl f (f (f b y) x) t₁ = foldl f (f (f b y) x) t₂
Theorem: absorbs_zero_iff
File: Mathlib/Analysis/LocallyConvex/Basic.lean

tactic: refine' ⟨_, fun h => ⟨1, zero_lt_one, fun a _ => zero_subset.2 <| zero_mem_smul_set h⟩⟩
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.204287
E : Type u_2
ι : Sort ?u.204293
κ : ι → Sort ?u.204298
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
s : Set E
⊢ Absorbs 𝕜 s 0 ↔ 0 ∈ s

tactic: rintro ⟨r, hr, h⟩
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.204287
E : Type u_2
ι : Sort ?u.204293
κ : ι → Sort ?u.204298
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
s : Set E
⊢ Absorbs 𝕜 s 0 → 0 ∈ s

tactic: obtain ⟨a, ha⟩ := NormedSpace.exists_lt_norm 𝕜 𝕜 r
state_before: case intro.intro
𝕜 : Type u_1
𝕝 : Type ?u.204287
E : Type u_2
ι : Sort ?u.204293
κ : ι → Sort ?u.204298
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
s : Set E
r : ℝ
hr : 0 < r
h : ∀ (a : 𝕜), r ≤ ‖a‖ → 0 ⊆ a • s
⊢ 0 ∈ s

tactic: have := h _ ha.le
state_before: case intro.intro.intro
𝕜 : Type u_1
𝕝 : Type ?u.204287
E : Type u_2
ι : Sort ?u.204293
κ : ι → Sort ?u.204298
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
s : Set E
r : ℝ
hr : 0 < r
h : ∀ (a : 𝕜), r ≤ ‖a‖ → 0 ⊆ a • s
a : 𝕜
ha : r < ‖a‖
⊢ 0 ∈ s

tactic: rwa [zero_subset, zero_mem_smul_set_iff] at this
state_before: case intro.intro.intro
𝕜 : Type u_1
𝕝 : Type ?u.204287
E : Type u_2
ι : Sort ?u.204293
κ : ι → Sort ?u.204298
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
s : Set E
r : ℝ
hr : 0 < r
h : ∀ (a : 𝕜), r ≤ ‖a‖ → 0 ⊆ a • s
a : 𝕜
ha : r < ‖a‖
this : 0 ⊆ a • s
⊢ 0 ∈ s

tactic: exact norm_ne_zero_iff.1 (hr.trans ha).ne'
state_before: case intro.intro.intro
𝕜 : Type u_1
𝕝 : Type ?u.204287
E : Type u_2
ι : Sort ?u.204293
κ : ι → Sort ?u.204298
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
s : Set E
r : ℝ
hr : 0 < r
h : ∀ (a : 𝕜), r ≤ ‖a‖ → 0 ⊆ a • s
a : 𝕜
ha : r < ‖a‖
this : 0 ∈ a • s
⊢ a ≠ 0
Theorem: Asymptotics.IsEquivalent.neg
File: Mathlib/Analysis/Asymptotics/AsymptoticEquivalent.lean

tactic: rw [IsEquivalent]
state_before: α : Type u_1
β : Type u_2
inst✝ : NormedAddCommGroup β
u v w : α → β
l : Filter α
huv : u ~[l] v
⊢ (fun x => -u x) ~[l] fun x => -v x

tactic: convert huv.isLittleO.neg_left.neg_right
state_before: α : Type u_1
β : Type u_2
inst✝ : NormedAddCommGroup β
u v w : α → β
l : Filter α
huv : u ~[l] v
⊢ ((fun x => -u x) - fun x => -v x) =o[l] fun x => -v x

tactic: simp [neg_add_eq_sub]
state_before: case h.e'_7.h
α : Type u_1
β : Type u_2
inst✝ : NormedAddCommGroup β
u v w : α → β
l : Filter α
huv : u ~[l] v
x✝ : α
⊢ ((fun x => -u x) - fun x => -v x) x✝ = -(u - v) x✝