tasksource/leandojo huggingface dataset:
Theorem: CategoryTheory.Limits.kernel.lift_map
File: Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean

tactic: apply equalizer.hom_ext
state_before: C : Type u
inst✝⁴ : Category C
inst✝³ : HasZeroMorphisms C
X✝ Y✝ : C
f✝ : X✝ ⟶ Y✝
inst✝² : HasKernel f✝
X Y Z X' Y' Z' : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝¹ : HasKernel g
w : f ≫ g = 0
f' : X' ⟶ Y'
g' : Y' ⟶ Z'
inst✝ : HasKernel g'
w' : f' ≫ g' = 0
p : X ⟶ X'
q : Y ⟶ Y'
r : Z ⟶ Z'
h₁ : f ≫ q = p ≫ f'
h₂ : g ≫ r = q ≫ g'
⊢ lift g f w ≫ map g g' q r h₂ = p ≫ lift g' f' w'

tactic: simp [h₁]
state_before: case h
C : Type u
inst✝⁴ : Category C
inst✝³ : HasZeroMorphisms C
X✝ Y✝ : C
f✝ : X✝ ⟶ Y✝
inst✝² : HasKernel f✝
X Y Z X' Y' Z' : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝¹ : HasKernel g
w : f ≫ g = 0
f' : X' ⟶ Y'
g' : Y' ⟶ Z'
inst✝ : HasKernel g'
w' : f' ≫ g' = 0
p : X ⟶ X'
q : Y ⟶ Y'
r : Z ⟶ Z'
h₁ : f ≫ q = p ≫ f'
h₂ : g ≫ r = q ≫ g'
⊢ (lift g f w ≫ map g g' q r h₂) ≫ equalizer.ι g' 0 = (p ≫ lift g' f' w') ≫ equalizer.ι g' 0
Theorem: Bool.not_beq_true
File: src/lean/Init/SimpLemmas.lean

tactic: cases b <;> rfl
state_before: b : Bool
⊢ (!b == true) = (b == false)
Theorem: Cardinal.sum_const'
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: simp
state_before: α β ι : Type u
a : Cardinal
⊢ (sum fun x => a) = (#ι) * a
Theorem: Mathlib.Tactic.Abel.term_smul
File: Mathlib/Tactic/Abel.lean

tactic: simp [h₂.symm, h₁.symm, term, smul, nsmul_add, mul_nsmul']
state_before: α : Type u_1
inst✝ : AddCommMonoid α
c n : ℕ
x a : α
n' : ℕ
a' : α
h₁ : c * n = n'
h₂ : smul c a = a'
⊢ smul c (term n x a) = term n' x a'
Theorem: Finset.smul_finset_univ₀
File: Mathlib/Data/Finset/Pointwise.lean

tactic: push_cast
state_before: F : Type ?u.901234
α : Type u_2
β : Type u_1
γ : Type ?u.901243
inst✝³ : DecidableEq β
inst✝² : GroupWithZero α
inst✝¹ : MulAction α β
s t : Finset β
a : α
b : β
inst✝ : Fintype β
ha : a ≠ 0
⊢ ↑(a • univ) = ↑univ

tactic: exact Set.smul_set_univ₀ ha
state_before: F : Type ?u.901234
α : Type u_2
β : Type u_1
γ : Type ?u.901243
inst✝³ : DecidableEq β
inst✝² : GroupWithZero α
inst✝¹ : MulAction α β
s t : Finset β
a : α
b : β
inst✝ : Fintype β
ha : a ≠ 0
⊢ a • Set.univ = Set.univ
Theorem: measurable_biInf
File: Mathlib/MeasureTheory/Constructions/BorelSpace/Basic.lean

tactic: haveI : Encodable s := hs.toEncodable
state_before: α : Type u_3
β : Type ?u.1580479
γ : Type ?u.1580482
γ₂ : Type ?u.1580485
δ : Type u_2
ι✝ : Sort y
s✝ t u : Set α
inst✝¹² : TopologicalSpace α
inst✝¹¹ : MeasurableSpace α
inst✝¹⁰ : BorelSpace α
inst✝⁹ : TopologicalSpace β
inst✝⁸ : MeasurableSpace β
inst✝⁷ : BorelSpace β
inst✝⁶ : TopologicalSpace γ
inst✝⁵ : MeasurableSpace γ
inst✝⁴ : BorelSpace γ
inst✝³ : MeasurableSpace δ
inst✝² : CompleteLinearOrder α
inst✝¹ : OrderTopology α
inst✝ : SecondCountableTopology α
ι : Type u_1
s : Set ι
f : ι → δ → α
hs : Set.Countable s
hf : ∀ (i : ι), Measurable (f i)
⊢ Measurable fun b => ⨅ (i : ι) (_ : i ∈ s), f i b

tactic: simp only [iInf_subtype']
state_before: α : Type u_3
β : Type ?u.1580479
γ : Type ?u.1580482
γ₂ : Type ?u.1580485
δ : Type u_2
ι✝ : Sort y
s✝ t u : Set α
inst✝¹² : TopologicalSpace α
inst✝¹¹ : MeasurableSpace α
inst✝¹⁰ : BorelSpace α
inst✝⁹ : TopologicalSpace β
inst✝⁸ : MeasurableSpace β
inst✝⁷ : BorelSpace β
inst✝⁶ : TopologicalSpace γ
inst✝⁵ : MeasurableSpace γ
inst✝⁴ : BorelSpace γ
inst✝³ : MeasurableSpace δ
inst✝² : CompleteLinearOrder α
inst✝¹ : OrderTopology α
inst✝ : SecondCountableTopology α
ι : Type u_1
s : Set ι
f : ι → δ → α
hs : Set.Countable s
hf : ∀ (i : ι), Measurable (f i)
this : Encodable ↑s
⊢ Measurable fun b => ⨅ (i : ι) (_ : i ∈ s), f i b

tactic: exact measurable_iInf fun i => hf i
state_before: α : Type u_3
β : Type ?u.1580479
γ : Type ?u.1580482
γ₂ : Type ?u.1580485
δ : Type u_2
ι✝ : Sort y
s✝ t u : Set α
inst✝¹² : TopologicalSpace α
inst✝¹¹ : MeasurableSpace α
inst✝¹⁰ : BorelSpace α
inst✝⁹ : TopologicalSpace β
inst✝⁸ : MeasurableSpace β
inst✝⁷ : BorelSpace β
inst✝⁶ : TopologicalSpace γ
inst✝⁵ : MeasurableSpace γ
inst✝⁴ : BorelSpace γ
inst✝³ : MeasurableSpace δ
inst✝² : CompleteLinearOrder α
inst✝¹ : OrderTopology α
inst✝ : SecondCountableTopology α
ι : Type u_1
s : Set ι
f : ι → δ → α
hs : Set.Countable s
hf : ∀ (i : ι), Measurable (f i)
this : Encodable ↑s
⊢ Measurable fun b => ⨅ (x : { i // i ∈ s }), f (↑x) b
Theorem: Set.injective_codRestrict
File: Mathlib/Data/Set/Function.lean

tactic: simp only [Injective, Subtype.ext_iff, val_codRestrict_apply]
state_before: α : Type u_1
β : Type ?u.5932
γ : Type ?u.5935
ι : Sort u_2
π : α → Type ?u.5943
f : ι → α
s : Set α
h : ∀ (x : ι), f x ∈ s
⊢ Injective (codRestrict f s h) ↔ Injective f
Theorem: Polynomial.roots_prod_X_sub_C
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: apply (roots_prod (fun a => X - C a) s ?_).trans
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
s : Finset R
⊢ roots (Finset.prod s fun a => X - ↑C a) = s.val

tactic: simp_rw [roots_X_sub_C]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
s : Finset R
⊢ (Multiset.bind s.val fun i => roots (X - ↑C i)) = s.val

tactic: rw [Multiset.bind_singleton, Multiset.map_id']
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
s : Finset R
⊢ (Multiset.bind s.val fun i => {i}) = s.val

tactic: refine prod_ne_zero_iff.mpr (fun a _ => X_sub_C_ne_zero a)
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
s : Finset R
⊢ (Finset.prod s fun a => X - ↑C a) ≠ 0
Theorem: Nat.Primrec'.tail
File: Mathlib/Computability/Primrec.lean

tactic: rw [← ofFn_get v.tail]
state_before: n : ℕ
f : Vector ℕ n → ℕ
hf : Primrec' f
v : Vector ℕ (Nat.succ n)
⊢ f (ofFn fun i => Vector.get v (Fin.succ i)) = f (Vector.tail v)

tactic: congr
state_before: n : ℕ
f : Vector ℕ n → ℕ
hf : Primrec' f
v : Vector ℕ (Nat.succ n)
⊢ f (ofFn fun i => Vector.get v (Fin.succ i)) = f (ofFn (Vector.get (Vector.tail v)))

tactic: funext i
state_before: case e_a.e_a
n : ℕ
f : Vector ℕ n → ℕ
hf : Primrec' f
v : Vector ℕ (Nat.succ n)
⊢ (fun i => Vector.get v (Fin.succ i)) = Vector.get (Vector.tail v)

tactic: simp
state_before: case e_a.e_a.h
n : ℕ
f : Vector ℕ n → ℕ
hf : Primrec' f
v : Vector ℕ (Nat.succ n)
i : Fin n
⊢ Vector.get v (Fin.succ i) = Vector.get (Vector.tail v) i
Theorem: Sym2.congr_right
File: Mathlib/Data/Sym/Sym2.lean

tactic: constructor <;> intro h
state_before: α : Type u_1
β : Type ?u.4292
γ : Type ?u.4295
a b c : α
⊢ Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (a, c) ↔ b = c

tactic: rw [h]
state_before: case mpr
α : Type u_1
β : Type ?u.4292
γ : Type ?u.4295
a b c : α
h : b = c
⊢ Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (a, c)

tactic: rw [Quotient.eq] at h
state_before: case mp
α : Type u_1
β : Type ?u.4292
γ : Type ?u.4295
a b c : α
h : Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (a, c)
⊢ b = c

tactic: cases h <;> rfl
state_before: case mp
α : Type u_1
β : Type ?u.4292
γ : Type ?u.4295
a b c : α
h : (a, b) ≈ (a, c)
⊢ b = c
Theorem: Asymptotics.isEquivalent_const_iff_tendsto
File: Mathlib/Analysis/Asymptotics/AsymptoticEquivalent.lean

tactic: simp_rw [IsEquivalent, const, isLittleO_const_iff h]
state_before: α : Type u_2
β : Type u_1
inst✝ : NormedAddCommGroup β
u v w : α → β
l : Filter α
c : β
h : c ≠ 0
⊢ u ~[l] const α c ↔ Tendsto u l (𝓝 c)

tactic: constructor <;> intro h
state_before: α : Type u_2
β : Type u_1
inst✝ : NormedAddCommGroup β
u v w : α → β
l : Filter α
c : β
h : c ≠ 0
⊢ Tendsto (u - fun x => c) l (𝓝 0) ↔ Tendsto u l (𝓝 c)

tactic: have := h.sub (tendsto_const_nhds (a := -c))
state_before: case mp
α : Type u_2
β : Type u_1
inst✝ : NormedAddCommGroup β
u v w : α → β
l : Filter α
c : β
h✝ : c ≠ 0
h : Tendsto (u - fun x => c) l (𝓝 0)
⊢ Tendsto u l (𝓝 c)

tactic: simp only [Pi.sub_apply, sub_neg_eq_add, sub_add_cancel, zero_add] at this
state_before: case mp
α : Type u_2
β : Type u_1
inst✝ : NormedAddCommGroup β
u v w : α → β
l : Filter α
c : β
h✝ : c ≠ 0
h : Tendsto (u - fun x => c) l (𝓝 0)
this : Tendsto (fun x => (u - fun x => c) x - -c) l (𝓝 (0 - -c))
⊢ Tendsto u l (𝓝 c)

tactic: exact this
state_before: case mp
α : Type u_2
β : Type u_1
inst✝ : NormedAddCommGroup β
u v w : α → β
l : Filter α
c : β
h✝ : c ≠ 0
h : Tendsto (u - fun x => c) l (𝓝 0)
this : Tendsto (fun x => u x) l (𝓝 c)
⊢ Tendsto u l (𝓝 c)

tactic: have := h.sub (tendsto_const_nhds (a := c))
state_before: case mpr
α : Type u_2
β : Type u_1
inst✝ : NormedAddCommGroup β
u v w : α → β
l : Filter α
c : β
h✝ : c ≠ 0
h : Tendsto u l (𝓝 c)
⊢ Tendsto (u - fun x => c) l (𝓝 0)

tactic: rwa [sub_self] at this
state_before: case mpr
α : Type u_2
β : Type u_1
inst✝ : NormedAddCommGroup β
u v w : α → β
l : Filter α
c : β
h✝ : c ≠ 0
h : Tendsto u l (𝓝 c)
this : Tendsto (fun x => u x - c) l (𝓝 (c - c))
⊢ Tendsto (u - fun x => c) l (𝓝 0)
Theorem: LieModuleHom.ext_iff
File: Mathlib/Algebra/Lie/Basic.lean

tactic: rintro rfl m
state_before: R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
f g : M →ₗ⁅R,L⁆ N
⊢ f = g → ∀ (m : M), ↑f m = ↑g m

tactic: rfl
state_before: R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
f : M →ₗ⁅R,L⁆ N
m : M
⊢ ↑f m = ↑f m
Theorem: SimplexCategory.epi_iff_surjective
File: Mathlib/AlgebraicTopology/SimplexCategory.lean

tactic: rw [← Functor.epi_map_iff_epi skeletalEquivalence.functor.{0}]
state_before: n m : SimplexCategory
f : n ⟶ m
⊢ Epi f ↔ Function.Surjective ↑(Hom.toOrderHom f)

tactic: dsimp only [skeletalEquivalence, Functor.asEquivalence_functor]
state_before: n m : SimplexCategory
f : n ⟶ m
⊢ Epi (skeletalEquivalence.functor.map f) ↔ Function.Surjective ↑(Hom.toOrderHom f)

tactic: rw [NonemptyFinLinOrdCat.epi_iff_surjective, skeletalFunctor.coe_map,
  Function.Surjective.of_comp_iff' ULift.up_bijective,
  Function.Surjective.of_comp_iff _ ULift.down_surjective]
state_before: n m : SimplexCategory
f : n ⟶ m
⊢ Epi (skeletalFunctor.map f) ↔ Function.Surjective ↑(Hom.toOrderHom f)
Theorem: Set.piecewise_singleton
File: Mathlib/Data/Set/Function.lean

tactic: ext y
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.78565
ι : Sort ?u.78568
π : α → Type ?u.78573
δ : α → Sort ?u.78578
s : Set α
f✝ g✝ : (i : α) → δ i
inst✝² : (j : α) → Decidable (j ∈ s)
x : α
inst✝¹ : (y : α) → Decidable (y ∈ {x})
inst✝ : DecidableEq α
f g : α → β
⊢ piecewise {x} f g = update g x (f x)

tactic: by_cases hy : y = x
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.78565
ι : Sort ?u.78568
π : α → Type ?u.78573
δ : α → Sort ?u.78578
s : Set α
f✝ g✝ : (i : α) → δ i
inst✝² : (j : α) → Decidable (j ∈ s)
x : α
inst✝¹ : (y : α) → Decidable (y ∈ {x})
inst✝ : DecidableEq α
f g : α → β
y : α
⊢ piecewise {x} f g y = update g x (f x) y

tactic: subst y
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type ?u.78565
ι : Sort ?u.78568
π : α → Type ?u.78573
δ : α → Sort ?u.78578
s : Set α
f✝ g✝ : (i : α) → δ i
inst✝² : (j : α) → Decidable (j ∈ s)
x : α
inst✝¹ : (y : α) → Decidable (y ∈ {x})
inst✝ : DecidableEq α
f g : α → β
y : α
hy : y = x
⊢ piecewise {x} f g y = update g x (f x) y

tactic: simp
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type ?u.78565
ι : Sort ?u.78568
π : α → Type ?u.78573
δ : α → Sort ?u.78578
s : Set α
f✝ g✝ : (i : α) → δ i
inst✝² : (j : α) → Decidable (j ∈ s)
x : α
inst✝¹ : (y : α) → Decidable (y ∈ {x})
inst✝ : DecidableEq α
f g : α → β
⊢ piecewise {x} f g x = update g x (f x) x

tactic: simp [hy]
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type ?u.78565
ι : Sort ?u.78568
π : α → Type ?u.78573
δ : α → Sort ?u.78578
s : Set α
f✝ g✝ : (i : α) → δ i
inst✝² : (j : α) → Decidable (j ∈ s)
x : α
inst✝¹ : (y : α) → Decidable (y ∈ {x})
inst✝ : DecidableEq α
f g : α → β
y : α
hy : ¬y = x
⊢ piecewise {x} f g y = update g x (f x) y
Theorem: Set.eq_preimage_subtype_val_iff
File: Mathlib/Data/Set/Image.lean

tactic: rw [s_eq]
state_before: α : Type u_1
β : Type ?u.11858
γ : Type ?u.11861
ι : Sort ?u.11864
ι' : Sort ?u.11867
f : α → β
g : β → γ
p : α → Prop
s : Set (Subtype p)
t : Set α
s_eq : s = Subtype.val ⁻¹' t
x : α
h : p x
⊢ { val := x, property := h } ∈ s ↔ x ∈ t

tactic: simp
state_before: α : Type u_1
β : Type ?u.11858
γ : Type ?u.11861
ι : Sort ?u.11864
ι' : Sort ?u.11867
f : α → β
g : β → γ
p : α → Prop
s : Set (Subtype p)
t : Set α
s_eq : s = Subtype.val ⁻¹' t
x : α
h : p x
⊢ { val := x, property := h } ∈ Subtype.val ⁻¹' t ↔ x ∈ t

tactic: simp [h]
state_before: α : Type u_1
β : Type ?u.11858
γ : Type ?u.11861
ι : Sort ?u.11864
ι' : Sort ?u.11867
f : α → β
g : β → γ
p : α → Prop
s : Set (Subtype p)
t : Set α
h : ∀ (x : α) (h : p x), { val := x, property := h } ∈ s ↔ x ∈ t
x✝ : Subtype p
x : α
hx : p x
⊢ { val := x, property := hx } ∈ s ↔ { val := x, property := hx } ∈ Subtype.val ⁻¹' t
Theorem: Derivation.leibniz_pow
File: Mathlib/RingTheory/Derivation/Basic.lean

tactic: induction' n with n ihn
state_before: R : Type u_3
inst✝⁵ : CommSemiring R
A : Type u_2
inst✝⁴ : CommSemiring A
inst✝³ : Algebra R A
M : Type u_1
inst✝² : AddCommMonoid M
inst✝¹ : Module A M
inst✝ : Module R M
D D1 D2 : Derivation R A M
r : R
a b : A
n : ℕ
⊢ ↑D (a ^ n) = n • a ^ (n - 1) • ↑D a

tactic: rw [Nat.zero_eq, pow_zero, map_one_eq_zero, zero_smul]
state_before: case zero
R : Type u_3
inst✝⁵ : CommSemiring R
A : Type u_2
inst✝⁴ : CommSemiring A
inst✝³ : Algebra R A
M : Type u_1
inst✝² : AddCommMonoid M
inst✝¹ : Module A M
inst✝ : Module R M
D D1 D2 : Derivation R A M
r : R
a b : A
⊢ ↑D (a ^ Nat.zero) = Nat.zero • a ^ (Nat.zero - 1) • ↑D a

tactic: rcases (zero_le n).eq_or_lt with (rfl | hpos)
state_before: case succ
R : Type u_3
inst✝⁵ : CommSemiring R
A : Type u_2
inst✝⁴ : CommSemiring A
inst✝³ : Algebra R A
M : Type u_1
inst✝² : AddCommMonoid M
inst✝¹ : Module A M
inst✝ : Module R M
D D1 D2 : Derivation R A M
r : R
a b : A
n : ℕ
ihn : ↑D (a ^ n) = n • a ^ (n - 1) • ↑D a
⊢ ↑D (a ^ Nat.succ n) = Nat.succ n • a ^ (Nat.succ n - 1) • ↑D a

tactic: erw [pow_one, one_smul, pow_zero, one_smul]
state_before: case succ.inl
R : Type u_3
inst✝⁵ : CommSemiring R
A : Type u_2
inst✝⁴ : CommSemiring A
inst✝³ : Algebra R A
M : Type u_1
inst✝² : AddCommMonoid M
inst✝¹ : Module A M
inst✝ : Module R M
D D1 D2 : Derivation R A M
r : R
a b : A
ihn : ↑D (a ^ 0) = 0 • a ^ (0 - 1) • ↑D a
⊢ ↑D (a ^ Nat.succ 0) = Nat.succ 0 • a ^ (Nat.succ 0 - 1) • ↑D a

tactic: have : a * a ^ (n - 1) = a ^ n := by rw [← pow_succ, Nat.sub_add_cancel hpos]
state_before: case succ.inr
R : Type u_3
inst✝⁵ : CommSemiring R
A : Type u_2
inst✝⁴ : CommSemiring A
inst✝³ : Algebra R A
M : Type u_1
inst✝² : AddCommMonoid M
inst✝¹ : Module A M
inst✝ : Module R M
D D1 D2 : Derivation R A M
r : R
a b : A
n : ℕ
ihn : ↑D (a ^ n) = n • a ^ (n - 1) • ↑D a
hpos : 0 < n
⊢ ↑D (a ^ Nat.succ n) = Nat.succ n • a ^ (Nat.succ n - 1) • ↑D a

tactic: simp only [pow_succ, leibniz, ihn, smul_comm a n (_ : M), smul_smul a, add_smul, this,
  Nat.succ_eq_add_one, Nat.add_succ_sub_one, add_zero, one_nsmul]
state_before: case succ.inr
R : Type u_3
inst✝⁵ : CommSemiring R
A : Type u_2
inst✝⁴ : CommSemiring A
inst✝³ : Algebra R A
M : Type u_1
inst✝² : AddCommMonoid M
inst✝¹ : Module A M
inst✝ : Module R M
D D1 D2 : Derivation R A M
r : R
a b : A
n : ℕ
ihn : ↑D (a ^ n) = n • a ^ (n - 1) • ↑D a
hpos : 0 < n
this : a * a ^ (n - 1) = a ^ n
⊢ ↑D (a ^ Nat.succ n) = Nat.succ n • a ^ (Nat.succ n - 1) • ↑D a

tactic: rw [← pow_succ, Nat.sub_add_cancel hpos]
state_before: R : Type u_3
inst✝⁵ : CommSemiring R
A : Type u_2
inst✝⁴ : CommSemiring A
inst✝³ : Algebra R A
M : Type u_1
inst✝² : AddCommMonoid M
inst✝¹ : Module A M
inst✝ : Module R M
D D1 D2 : Derivation R A M
r : R
a b : A
n : ℕ
ihn : ↑D (a ^ n) = n • a ^ (n - 1) • ↑D a
hpos : 0 < n
⊢ a * a ^ (n - 1) = a ^ n
Theorem: Filter.map_atTop_eq_of_gc
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: refine'
  le_antisymm
    (hf.tendsto_atTop_atTop fun b => ⟨g (b ⊔ b'), le_sup_left.trans <| hgi _ le_sup_right⟩) _
state_before: ι : Type ?u.308510
ι' : Type ?u.308513
α : Type u_1
β : Type u_2
γ : Type ?u.308522
inst✝¹ : SemilatticeSup α
inst✝ : SemilatticeSup β
f : α → β
g : β → α
b' : β
hf : Monotone f
gc : ∀ (a : α) (b : β), b ≥ b' → (f a ≤ b ↔ a ≤ g b)
hgi : ∀ (b : β), b ≥ b' → b ≤ f (g b)
⊢ map f atTop = atTop

tactic: rw [@map_atTop_eq _ _ ⟨g b'⟩]
state_before: ι : Type ?u.308510
ι' : Type ?u.308513
α : Type u_1
β : Type u_2
γ : Type ?u.308522
inst✝¹ : SemilatticeSup α
inst✝ : SemilatticeSup β
f : α → β
g : β → α
b' : β
hf : Monotone f
gc : ∀ (a : α) (b : β), b ≥ b' → (f a ≤ b ↔ a ≤ g b)
hgi : ∀ (b : β), b ≥ b' → b ≤ f (g b)
⊢ atTop ≤ map f atTop

tactic: refine' le_iInf fun a => iInf_le_of_le (f a ⊔ b') <| principal_mono.2 fun b hb => _
state_before: ι : Type ?u.308510
ι' : Type ?u.308513
α : Type u_1
β : Type u_2
γ : Type ?u.308522
inst✝¹ : SemilatticeSup α
inst✝ : SemilatticeSup β
f : α → β
g : β → α
b' : β
hf : Monotone f
gc : ∀ (a : α) (b : β), b ≥ b' → (f a ≤ b ↔ a ≤ g b)
hgi : ∀ (b : β), b ≥ b' → b ≤ f (g b)
⊢ atTop ≤ ⨅ (a : α), 𝓟 (f '' {a' | a ≤ a'})

tactic: rw [mem_Ici, sup_le_iff] at hb
state_before: ι : Type ?u.308510
ι' : Type ?u.308513
α : Type u_1
β : Type u_2
γ : Type ?u.308522
inst✝¹ : SemilatticeSup α
inst✝ : SemilatticeSup β
f : α → β
g : β → α
b' : β
hf : Monotone f
gc : ∀ (a : α) (b : β), b ≥ b' → (f a ≤ b ↔ a ≤ g b)
hgi : ∀ (b : β), b ≥ b' → b ≤ f (g b)
a : α
b : β
hb : b ∈ Ici (f a ⊔ b')
⊢ b ∈ f '' {a' | a ≤ a'}

tactic: exact ⟨g b, (gc _ _ hb.2).1 hb.1, le_antisymm ((gc _ _ hb.2).2 le_rfl) (hgi _ hb.2)⟩
state_before: ι : Type ?u.308510
ι' : Type ?u.308513
α : Type u_1
β : Type u_2
γ : Type ?u.308522
inst✝¹ : SemilatticeSup α
inst✝ : SemilatticeSup β
f : α → β
g : β → α
b' : β
hf : Monotone f
gc : ∀ (a : α) (b : β), b ≥ b' → (f a ≤ b ↔ a ≤ g b)
hgi : ∀ (b : β), b ≥ b' → b ≤ f (g b)
a : α
b : β
hb : f a ≤ b ∧ b' ≤ b
⊢ b ∈ f '' {a' | a ≤ a'}
Theorem: uniformEmbedding_inl
File: Mathlib/Topology/UniformSpace/UniformEmbedding.lean

tactic: simpa using h
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
s : Set (α × α)
hs : s ∈ 𝓤 α
x : α × α
h : x ∈ Prod.map Sum.inl Sum.inl ⁻¹' (Prod.map Sum.inl Sum.inl '' s ∪ range (Prod.map Sum.inr Sum.inr))
⊢ x ∈ s
Theorem: IsAlgClosed.exists_eval₂_eq_zero_of_injective
File: Mathlib/FieldTheory/IsAlgClosed/Basic.lean

tactic: rwa [degree_map_eq_of_injective hf]
state_before: k : Type u
inst✝² : Field k
R : Type u_1
inst✝¹ : Ring R
inst✝ : IsAlgClosed k
f : R →+* k
hf : Function.Injective ↑f
p : R[X]
hp : degree p ≠ 0
⊢ degree (map f p) ≠ 0

tactic: rwa [eval₂_eq_eval_map, ← IsRoot]
state_before: k : Type u
inst✝² : Field k
R : Type u_1
inst✝¹ : Ring R
inst✝ : IsAlgClosed k
f : R →+* k
hf : Function.Injective ↑f
p : R[X]
hp : degree p ≠ 0
x : k
hx : IsRoot (map f p) x
⊢ eval₂ f x p = 0
Theorem: LieSubalgebra.mem_inf
File: Mathlib/Algebra/Lie/Subalgebra.lean

tactic: rw [← mem_coe_submodule, ← mem_coe_submodule, ← mem_coe_submodule, inf_coe_to_submodule,
  Submodule.mem_inf]
state_before: R : Type u
L : Type v
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
L₂ : Type w
inst✝¹ : LieRing L₂
inst✝ : LieAlgebra R L₂
f : L →ₗ⁅R⁆ L₂
K K' : LieSubalgebra R L
K₂ : LieSubalgebra R L₂
x : L
⊢ x ∈ K ⊓ K' ↔ x ∈ K ∧ x ∈ K'
Theorem: Pmf.support_bindOnSupport
File: Mathlib/Probability/ProbabilityMassFunction/Monad.lean

tactic: refine' Set.ext fun b => _
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.86439
p : Pmf α
f : (a : α) → a ∈ support p → Pmf β
⊢ support (bindOnSupport p f) = ⋃ (a : α) (h : a ∈ support p), support (f a h)

tactic: simp only [ENNReal.tsum_eq_zero, not_or, mem_support_iff, bindOnSupport_apply, Ne.def, not_forall,
  mul_eq_zero, Set.mem_iUnion]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.86439
p : Pmf α
f : (a : α) → a ∈ support p → Pmf β
b : β
⊢ b ∈ support (bindOnSupport p f) ↔ b ∈ ⋃ (a : α) (h : a ∈ support p), support (f a h)

tactic: exact
  ⟨fun hb =>
    let ⟨a, ⟨ha, ha'⟩⟩ := hb
    ⟨a, ha, by simpa [ha] using ha'⟩,
    fun hb =>
    let ⟨a, ha, ha'⟩ := hb
    ⟨a, ⟨ha, by simpa [(mem_support_iff _ a).1 ha] using ha'⟩⟩⟩
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.86439
p : Pmf α
f : (a : α) → a ∈ support p → Pmf β
b : β
⊢ (∃ x, ¬↑p x = 0 ∧ ¬(if h : ↑p x = 0 then 0 else ↑(f x (_ : ¬↑p x = 0)) b) = 0) ↔
    ∃ i h, ¬↑(f i (_ : i ∈ support p)) b = 0

tactic: simpa [ha] using ha'
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.86439
p : Pmf α
f : (a : α) → a ∈ support p → Pmf β
b : β
hb : ∃ x, ¬↑p x = 0 ∧ ¬(if h : ↑p x = 0 then 0 else ↑(f x (_ : ¬↑p x = 0)) b) = 0
a : α
ha : ¬↑p a = 0
ha' : ¬(if h : ↑p a = 0 then 0 else ↑(f a (_ : ¬↑p a = 0)) b) = 0
⊢ ¬↑(f a (_ : a ∈ support p)) b = 0

tactic: simpa [(mem_support_iff _ a).1 ha] using ha'
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.86439
p : Pmf α
f : (a : α) → a ∈ support p → Pmf β
b : β
hb : ∃ i h, ¬↑(f i (_ : i ∈ support p)) b = 0
a : α
ha : ¬↑p a = 0
ha' : ¬↑(f a (_ : a ∈ support p)) b = 0
⊢ ¬(if h : ↑p a = 0 then 0 else ↑(f a (_ : ¬↑p a = 0)) b) = 0
Theorem: Nat.eq_prime_pow_of_unique_prime_dvd
File: Mathlib/Data/Nat/Factors.lean

tactic: set k := n.factors.length
state_before: n p : ℕ
hpos : n ≠ 0
h : ∀ {d : ℕ}, Prime d → d ∣ n → d = p
⊢ n = p ^ length (factors n)

tactic: rw [← prod_factors hpos, ← prod_replicate k p,
  eq_replicate_of_mem fun d hd => h (prime_of_mem_factors hd) (dvd_of_mem_factors hd)]
state_before: n p : ℕ
hpos : n ≠ 0
h : ∀ {d : ℕ}, Prime d → d ∣ n → d = p
k : ℕ := length (factors n)
⊢ n = p ^ k
Theorem: intervalIntegral.integral_comp_mul_deriv'
File: Mathlib/MeasureTheory/Integral/FundThmCalculus.lean

tactic: simpa [mul_comm] using integral_comp_smul_deriv' h h' hg
state_before: ι : Type ?u.1946471
𝕜 : Type ?u.1946474
E : Type ?u.1946477
F : Type ?u.1946480
A : Type ?u.1946483
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f✝¹ : ℝ → E
g' g✝ φ : ℝ → ℝ
f✝ f'✝ : ℝ → E
a b : ℝ
f f' g : ℝ → ℝ
h : ∀ (x : ℝ), x ∈ [[a, b]] → HasDerivAt f (f' x) x
h' : ContinuousOn f' [[a, b]]
hg : ContinuousOn g (f '' [[a, b]])
⊢ (∫ (x : ℝ) in a..b, (g ∘ f) x * f' x) = ∫ (x : ℝ) in f a..f b, g x
Theorem: ContinuousMap.continuous_comp
File: Mathlib/Topology/CompactOpen.lean

tactic: rw [hm, preimage_gen g hs hu]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
g : C(β, γ)
m : Set C(α, γ)
x✝ : m ∈ {m | ∃ s x u x, m = CompactOpen.gen s u}
s : Set α
hs : IsCompact s
u : Set γ
hu : IsOpen u
hm : m = CompactOpen.gen s u
⊢ IsOpen (comp g ⁻¹' m)

tactic: exact ContinuousMap.isOpen_gen hs (hu.preimage g.2)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
g : C(β, γ)
m : Set C(α, γ)
x✝ : m ∈ {m | ∃ s x u x, m = CompactOpen.gen s u}
s : Set α
hs : IsCompact s
u : Set γ
hu : IsOpen u
hm : m = CompactOpen.gen s u
⊢ IsOpen (CompactOpen.gen s (↑g ⁻¹' u))
Theorem: symmetrize_mem_uniformity
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: apply (𝓤 α).inter_sets h
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.49944
inst✝ : UniformSpace α
V : Set (α × α)
h : V ∈ 𝓤 α
⊢ symmetrizeRel V ∈ 𝓤 α

tactic: rw [← image_swap_eq_preimage_swap, uniformity_eq_symm]
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.49944
inst✝ : UniformSpace α
V : Set (α × α)
h : V ∈ 𝓤 α
⊢ Prod.swap ⁻¹' V ∈ (𝓤 α).sets

tactic: exact image_mem_map h
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.49944
inst✝ : UniformSpace α
V : Set (α × α)
h : V ∈ 𝓤 α
⊢ Prod.swap '' V ∈ (Prod.swap <$> 𝓤 α).sets