tasksource/leandojo huggingface dataset:
Theorem: SemiconjBy.inv_right₀
File: Mathlib/Algebra/GroupWithZero/Semiconj.lean

tactic: by_cases ha : a = 0
state_before: α : Type ?u.1223
M₀ : Type ?u.1226
G₀ : Type u_1
M₀' : Type ?u.1232
G₀' : Type ?u.1235
F : Type ?u.1238
F' : Type ?u.1241
inst✝ : GroupWithZero G₀
a x y x' y' : G₀
h : SemiconjBy a x y
⊢ SemiconjBy a x⁻¹ y⁻¹

tactic: by_cases hx : x = 0
state_before: case neg
α : Type ?u.1223
M₀ : Type ?u.1226
G₀ : Type u_1
M₀' : Type ?u.1232
G₀' : Type ?u.1235
F : Type ?u.1238
F' : Type ?u.1241
inst✝ : GroupWithZero G₀
a x y x' y' : G₀
h : SemiconjBy a x y
ha : ¬a = 0
⊢ SemiconjBy a x⁻¹ y⁻¹

tactic: simp only [ha, zero_left]
state_before: case pos
α : Type ?u.1223
M₀ : Type ?u.1226
G₀ : Type u_1
M₀' : Type ?u.1232
G₀' : Type ?u.1235
F : Type ?u.1238
F' : Type ?u.1241
inst✝ : GroupWithZero G₀
a x y x' y' : G₀
h : SemiconjBy a x y
ha : a = 0
⊢ SemiconjBy a x⁻¹ y⁻¹

tactic: subst x
state_before: case pos
α : Type ?u.1223
M₀ : Type ?u.1226
G₀ : Type u_1
M₀' : Type ?u.1232
G₀' : Type ?u.1235
F : Type ?u.1238
F' : Type ?u.1241
inst✝ : GroupWithZero G₀
a x y x' y' : G₀
h : SemiconjBy a x y
ha : ¬a = 0
hx : x = 0
⊢ SemiconjBy a x⁻¹ y⁻¹

tactic: simp only [SemiconjBy, mul_zero, @eq_comm _ _ (y * a), mul_eq_zero] at h
state_before: case pos
α : Type ?u.1223
M₀ : Type ?u.1226
G₀ : Type u_1
M₀' : Type ?u.1232
G₀' : Type ?u.1235
F : Type ?u.1238
F' : Type ?u.1241
inst✝ : GroupWithZero G₀
a y x' y' : G₀
ha : ¬a = 0
h : SemiconjBy a 0 y
⊢ SemiconjBy a 0⁻¹ y⁻¹

tactic: simp [h.resolve_right ha]
state_before: case pos
α : Type ?u.1223
M₀ : Type ?u.1226
G₀ : Type u_1
M₀' : Type ?u.1232
G₀' : Type ?u.1235
F : Type ?u.1238
F' : Type ?u.1241
inst✝ : GroupWithZero G₀
a y x' y' : G₀
ha : ¬a = 0
h : y = 0 ∨ a = 0
⊢ SemiconjBy a 0⁻¹ y⁻¹

tactic: have := mul_ne_zero ha hx
state_before: case neg
α : Type ?u.1223
M₀ : Type ?u.1226
G₀ : Type u_1
M₀' : Type ?u.1232
G₀' : Type ?u.1235
F : Type ?u.1238
F' : Type ?u.1241
inst✝ : GroupWithZero G₀
a x y x' y' : G₀
h : SemiconjBy a x y
ha : ¬a = 0
hx : ¬x = 0
⊢ SemiconjBy a x⁻¹ y⁻¹

tactic: rw [h.eq, mul_ne_zero_iff] at this
state_before: case neg
α : Type ?u.1223
M₀ : Type ?u.1226
G₀ : Type u_1
M₀' : Type ?u.1232
G₀' : Type ?u.1235
F : Type ?u.1238
F' : Type ?u.1241
inst✝ : GroupWithZero G₀
a x y x' y' : G₀
h : SemiconjBy a x y
ha : ¬a = 0
hx : ¬x = 0
this : a * x ≠ 0
⊢ SemiconjBy a x⁻¹ y⁻¹

tactic: exact @units_inv_right _ _ _ (Units.mk0 x hx) (Units.mk0 y this.1) h
state_before: case neg
α : Type ?u.1223
M₀ : Type ?u.1226
G₀ : Type u_1
M₀' : Type ?u.1232
G₀' : Type ?u.1235
F : Type ?u.1238
F' : Type ?u.1241
inst✝ : GroupWithZero G₀
a x y x' y' : G₀
h : SemiconjBy a x y
ha : ¬a = 0
hx : ¬x = 0
this : y ≠ 0 ∧ a ≠ 0
⊢ SemiconjBy a x⁻¹ y⁻¹
Theorem: CategoryTheory.Subobject.ofLE_refl
File: Mathlib/CategoryTheory/Subobject/Basic.lean

tactic: apply (cancel_mono X.arrow).mp
state_before: C : Type u₁
inst✝¹ : Category C
X✝ Y Z : C
D : Type u₂
inst✝ : Category D
B : C
X : Subobject B
⊢ ofLE X X (_ : X ≤ X) = 𝟙 (underlying.obj X)

tactic: simp
state_before: C : Type u₁
inst✝¹ : Category C
X✝ Y Z : C
D : Type u₂
inst✝ : Category D
B : C
X : Subobject B
⊢ ofLE X X (_ : X ≤ X) ≫ arrow X = 𝟙 (underlying.obj X) ≫ arrow X
Theorem: Polynomial.modByMonic_eq_of_dvd_sub
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: nontriviality R
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p q : R[X]
inst✝ : Semiring S
hq : Monic q
p₁ p₂ : R[X]
h : q ∣ p₁ - p₂
⊢ p₁ %ₘ q = p₂ %ₘ q

tactic: obtain ⟨f, sub_eq⟩ := h
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p q : R[X]
inst✝ : Semiring S
hq : Monic q
p₁ p₂ : R[X]
h : q ∣ p₁ - p₂
✝ : Nontrivial R
⊢ p₁ %ₘ q = p₂ %ₘ q

tactic: refine' (div_modByMonic_unique (p₂ /ₘ q + f) _ hq ⟨_, degree_modByMonic_lt _ hq⟩).2
state_before: case intro
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p q : R[X]
inst✝ : Semiring S
hq : Monic q
p₁ p₂ : R[X]
✝ : Nontrivial R
f : R[X]
sub_eq : p₁ - p₂ = q * f
⊢ p₁ %ₘ q = p₂ %ₘ q

tactic: rw [sub_eq_iff_eq_add.mp sub_eq, mul_add, ← add_assoc, modByMonic_add_div _ hq, add_comm]
state_before: case intro
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p q : R[X]
inst✝ : Semiring S
hq : Monic q
p₁ p₂ : R[X]
✝ : Nontrivial R
f : R[X]
sub_eq : p₁ - p₂ = q * f
⊢ p₂ %ₘ q + q * (p₂ /ₘ q + f) = p₁
Theorem: Mathlib.Tactic.Ring.of_eq
File: Mathlib/Tactic/Ring/Basic.lean

tactic: subst_vars
state_before: u : Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
a c b : R
x✝¹ : a = c
x✝ : b = c
⊢ a = b

tactic: rfl
state_before: u : Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
b : R
⊢ b = b
Theorem: SimpleGraph.Walk.isTrail_copy
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: subst_vars
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u' v' : V
p : Walk G u v
hu : u = u'
hv : v = v'
⊢ IsTrail (Walk.copy p hu hv) ↔ IsTrail p

tactic: rfl
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u' v' : V
p : Walk G u' v'
⊢ IsTrail (Walk.copy p (_ : u' = u') (_ : v' = v')) ↔ IsTrail p
Theorem: Dfinsupp.erase_single_same
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: rw [erase_single, if_pos rfl]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s : Finset ι
x✝ : (i : ↑↑s) → β ↑i
i✝ i : ι
x : β i
⊢ erase i (single i x) = 0
Theorem: Pi.toLex_update_le_self_iff
File: Mathlib/Data/Pi/Lex.lean

tactic: simp_rw [le_iff_lt_or_eq, toLex_update_lt_self_iff, toLex_inj, update_eq_self_iff]
state_before: ι : Type u_1
β : ι → Type u_2
r : ι → ι → Prop
s : {i : ι} → β i → β i → Prop
inst✝² : LinearOrder ι
inst✝¹ : IsWellOrder ι fun x x_1 => x < x_1
inst✝ : (i : ι) → PartialOrder (β i)
x y : (i : ι) → β i
i : ι
a : β i
⊢ ↑toLex (update x i a) ≤ ↑toLex x ↔ a ≤ x i
Theorem: MonovaryOn.sum_mul_sum_le_card_mul_sum
File: Mathlib/Algebra/Order/Chebyshev.lean

tactic: rw [← nsmul_eq_mul]
state_before: ι : Type u_1
α : Type u_2
β : Type ?u.17209
inst✝ : LinearOrderedRing α
s : Finset ι
σ : Perm ι
f g : ι → α
hfg : MonovaryOn f g ↑s
⊢ (∑ i in s, f i) * ∑ i in s, g i ≤ ↑(card s) * ∑ i in s, f i * g i

tactic: exact hfg.sum_smul_sum_le_card_smul_sum
state_before: ι : Type u_1
α : Type u_2
β : Type ?u.17209
inst✝ : LinearOrderedRing α
s : Finset ι
σ : Perm ι
f g : ι → α
hfg : MonovaryOn f g ↑s
⊢ (∑ i in s, f i) * ∑ i in s, g i ≤ card s • ∑ i in s, f i * g i
Theorem: Finsupp.total_comp_lmapDomain
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: ext
state_before: α : Type u_1
M : Type ?u.346247
N : Type ?u.346250
P : Type ?u.346253
R : Type u_2
S : Type ?u.346259
inst✝¹² : Semiring R
inst✝¹¹ : Semiring S
inst✝¹⁰ : AddCommMonoid M
inst✝⁹ : Module R M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : Module R N
inst✝⁶ : AddCommMonoid P
inst✝⁵ : Module R P
α' : Type u_4
M' : Type u_3
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M
inst✝¹ : Module R M'
inst✝ : Module R M
v : α → M
v' : α' → M'
f : α → α'
⊢ comp (Finsupp.total α' M' R v') (lmapDomain R R f) = Finsupp.total α M' R (v' ∘ f)

tactic: simp
state_before: case h.h
α : Type u_1
M : Type ?u.346247
N : Type ?u.346250
P : Type ?u.346253
R : Type u_2
S : Type ?u.346259
inst✝¹² : Semiring R
inst✝¹¹ : Semiring S
inst✝¹⁰ : AddCommMonoid M
inst✝⁹ : Module R M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : Module R N
inst✝⁶ : AddCommMonoid P
inst✝⁵ : Module R P
α' : Type u_4
M' : Type u_3
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M
inst✝¹ : Module R M'
inst✝ : Module R M
v : α → M
v' : α' → M'
f : α → α'
a✝ : α
⊢ ↑(comp (comp (Finsupp.total α' M' R v') (lmapDomain R R f)) (lsingle a✝)) 1 =
    ↑(comp (Finsupp.total α M' R (v' ∘ f)) (lsingle a✝)) 1
Theorem: odd_iff_exists_bit1
File: Mathlib/Algebra/Parity.lean

tactic: rw [two_mul]
state_before: F : Type ?u.75707
α : Type u_1
β : Type ?u.75713
R : Type ?u.75716
inst✝¹ : Semiring α
inst✝ : Semiring β
m n a b : α
⊢ a = 2 * b + 1 ↔ a = bit1 b

tactic: rfl
state_before: F : Type ?u.75707
α : Type u_1
β : Type ?u.75713
R : Type ?u.75716
inst✝¹ : Semiring α
inst✝ : Semiring β
m n a b : α
⊢ a = b + b + 1 ↔ a = bit1 b
Theorem: Option.map_eq_bind
File: Std/Data/Option/Lemmas.lean

tactic: cases x <;> simp [Option.bind]
state_before: α : Type u_1
α✝ : Type u_2
f : α → α✝
x : Option α
⊢ Option.map f x = Option.bind x (some ∘ f)
Theorem: MeasureTheory.lintegral_rpow_nnnorm_lt_top_of_snorm_lt_top
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: apply lintegral_rpow_nnnorm_lt_top_of_snorm'_lt_top
state_before: α : Type u_1
E : Type ?u.755518
F : Type u_2
G : Type ?u.755524
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
hfp : snorm f p μ < ⊤
⊢ (∫⁻ (a : α), ↑‖f a‖₊ ^ ENNReal.toReal p ∂μ) < ⊤

tactic: exact ENNReal.toReal_pos hp_ne_zero hp_ne_top
state_before: case hq0_lt
α : Type u_1
E : Type ?u.755518
F : Type u_2
G : Type ?u.755524
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
hfp : snorm f p μ < ⊤
⊢ 0 < ENNReal.toReal p

tactic: simpa [snorm_eq_snorm' hp_ne_zero hp_ne_top] using hfp
state_before: case hfq
α : Type u_1
E : Type ?u.755518
F : Type u_2
G : Type ?u.755524
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
hfp : snorm f p μ < ⊤
⊢ snorm' (fun a => f a) (ENNReal.toReal p) μ < ⊤
Theorem: PNat.card_Icc
File: Mathlib/Data/PNat/Interval.lean

tactic: rw [← Nat.card_Icc]
state_before: a b : ℕ+
⊢ card (Icc a b) = ↑b + 1 - ↑a

tactic: erw [← Finset.map_subtype_embedding_Icc _ a b (fun c x _ hx _ hc _ => hc.trans_le hx)]
state_before: a b : ℕ+
⊢ card (Icc a b) = card (Icc ↑a ↑b)

tactic: rw [card_map]
state_before: a b : ℕ+
⊢ card (Icc a b) = card (map (Function.Embedding.subtype fun n => 0 < n) (Icc a b))
Theorem: SimpleGraph.Walk.IsCycle.transfer
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: cases q with
| nil => simp at qc
| cons _ q =>
  simp only [edges_cons, List.find?, List.mem_cons, forall_eq_or_imp, mem_edgeSet] at hq
  simp only [Walk.transfer, cons_isCycle_iff, edges_transfer q hq.2] at qc ⊢
  exact ⟨qc.1.transfer hq.2, qc.2⟩
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : Walk G u v
H : SimpleGraph V
q : Walk G u u
qc : IsCycle q
hq : ∀ (e : Sym2 V), e ∈ edges q → e ∈ edgeSet H
⊢ IsCycle (Walk.transfer q H hq)

tactic: simp at qc
state_before: case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : Walk G u v
H : SimpleGraph V
qc : IsCycle nil
hq : ∀ (e : Sym2 V), e ∈ edges nil → e ∈ edgeSet H
⊢ IsCycle (Walk.transfer nil H hq)

tactic: simp only [edges_cons, List.find?, List.mem_cons, forall_eq_or_imp, mem_edgeSet] at hq
state_before: case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : Walk G u v
H : SimpleGraph V
v✝ : V
h✝ : Adj G u v✝
q : Walk G v✝ u
qc : IsCycle (cons h✝ q)
hq : ∀ (e : Sym2 V), e ∈ edges (cons h✝ q) → e ∈ edgeSet H
⊢ IsCycle (Walk.transfer (cons h✝ q) H hq)

tactic: simp only [Walk.transfer, cons_isCycle_iff, edges_transfer q hq.2] at qc ⊢
state_before: case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : Walk G u v
H : SimpleGraph V
v✝ : V
h✝ : Adj G u v✝
q : Walk G v✝ u
qc : IsCycle (cons h✝ q)
hq✝ : ∀ (e : Sym2 V), e ∈ edges (cons h✝ q) → e ∈ edgeSet H
hq : Adj H u v✝ ∧ ∀ (a : Sym2 V), a ∈ edges q → a ∈ edgeSet H
⊢ IsCycle (Walk.transfer (cons h✝ q) H hq✝)

tactic: exact ⟨qc.1.transfer hq.2, qc.2⟩
state_before: case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : Walk G u v
H : SimpleGraph V
v✝ : V
h✝ : Adj G u v✝
q : Walk G v✝ u
hq✝ : ∀ (e : Sym2 V), e ∈ edges (cons h✝ q) → e ∈ edgeSet H
hq : Adj H u v✝ ∧ ∀ (a : Sym2 V), a ∈ edges q → a ∈ edgeSet H
qc : IsPath q ∧ ¬Quotient.mk (Sym2.Rel.setoid V) (u, v✝) ∈ edges q
⊢ IsPath (Walk.transfer q H (_ : ∀ (e : Sym2 V), e ∈ edges q → e ∈ edgeSet H)) ∧
    ¬Quotient.mk (Sym2.Rel.setoid V) (u, v✝) ∈ edges q
Theorem: TopCat.fst_openEmbedding_of_right_openEmbedding
File: Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean

tactic: convert (homeoOfIso (asIso (pullback.fst : pullback f (𝟙 S) ⟶ _))).openEmbedding.comp
    (pullback_map_openEmbedding_of_open_embeddings (i₁ := 𝟙 X) f g f (𝟙 _)
      (homeoOfIso (Iso.refl _)).openEmbedding H (𝟙 _) rfl (by simp))
state_before: J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
H : OpenEmbedding ((forget TopCat).map g)
⊢ OpenEmbedding ((forget TopCat).map pullback.fst)

tactic: erw [← coe_comp]
state_before: case h.e'_5.h
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
H : OpenEmbedding ((forget TopCat).map g)
e_2✝ : (forget TopCat).obj X = ↑X
⊢ (forget TopCat).map pullback.fst =
    ↑(homeoOfIso (asIso pullback.fst)) ∘
      (forget TopCat).map (pullback.map f g f (𝟙 S) (𝟙 X) g (𝟙 S) (_ : f ≫ 𝟙 S = f ≫ 𝟙 S) (_ : g ≫ 𝟙 S = g ≫ 𝟙 S))

tactic: simp
state_before: case h.e'_5.h
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
H : OpenEmbedding ((forget TopCat).map g)
e_2✝ : (forget TopCat).obj X = ↑X
⊢ (forget TopCat).map pullback.fst =
    (forget TopCat).map
      (pullback.map f g f (𝟙 S) (𝟙 X) g (𝟙 S) (_ : f ≫ 𝟙 S = f ≫ 𝟙 S) (_ : g ≫ 𝟙 S = g ≫ 𝟙 S) ≫
        (asIso pullback.fst).hom)

tactic: simp
state_before: J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
H : OpenEmbedding ((forget TopCat).map g)
⊢ g ≫ 𝟙 S = g ≫ 𝟙 S
Theorem: Nat.cast_div_le
File: Mathlib/Data/Nat/Cast/Field.lean

tactic: cases n
state_before: α : Type u_1
inst✝ : LinearOrderedSemifield α
m n : ℕ
⊢ ↑(m / n) ≤ ↑m / ↑n

tactic: rw [le_div_iff, ← Nat.cast_mul, @Nat.cast_le]
state_before: case succ
α : Type u_1
inst✝ : LinearOrderedSemifield α
m n✝ : ℕ
⊢ ↑(m / succ n✝) ≤ ↑m / ↑(succ n✝)

tactic: exact (Nat.div_mul_le_self m _)
state_before: case succ
α : Type u_1
inst✝ : LinearOrderedSemifield α
m n✝ : ℕ
⊢ m / succ n✝ * succ n✝ ≤ m

case succ
α : Type u_1
inst✝ : LinearOrderedSemifield α
m n✝ : ℕ
⊢ 0 < ↑(succ n✝)

tactic: rw [cast_zero, div_zero, Nat.div_zero, cast_zero]
state_before: case zero
α : Type u_1
inst✝ : LinearOrderedSemifield α
m : ℕ
⊢ ↑(m / zero) ≤ ↑m / ↑zero

tactic: exact Nat.cast_pos.2 (Nat.succ_pos _)
state_before: case succ
α : Type u_1
inst✝ : LinearOrderedSemifield α
m n✝ : ℕ
⊢ 0 < ↑(succ n✝)
Theorem: IsCoprime.add_mul_right_left
File: Mathlib/RingTheory/Coprime/Basic.lean

tactic: rw [mul_comm]
state_before: R : Type u
inst✝ : CommRing R
x y : R
h : IsCoprime x y
z : R
⊢ IsCoprime (x + z * y) y

tactic: exact h.add_mul_left_left z
state_before: R : Type u
inst✝ : CommRing R
x y : R
h : IsCoprime x y
z : R
⊢ IsCoprime (x + y * z) y
Theorem: HasDerivAt.ofReal_comp
File: Mathlib/Analysis/Complex/RealDeriv.lean

tactic: simpa only [ofRealClm_apply, ofReal_one, real_smul, mul_one] using
  ofRealClm.hasDerivAt.scomp z hf
state_before: e : ℂ → ℂ
e' : ℂ
z : ℝ
E : Type ?u.149374
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
f : ℝ → ℝ
u : ℝ
hf : HasDerivAt f u z
⊢ HasDerivAt (fun y => ↑(f y)) (↑u) z
Theorem: Composition.ones_sizeUpTo
File: Mathlib/Combinatorics/Composition.lean

tactic: simp [sizeUpTo, ones_blocks, take_replicate]
state_before: n✝ : ℕ
c : Composition n✝
n i : ℕ
⊢ sizeUpTo (ones n) i = min i n
Theorem: Ordinal.div_opow_log_pos
File: Mathlib/SetTheory/Ordinal/Exponential.lean

tactic: rcases eq_zero_or_pos b with (rfl | hb)
state_before: b o : Ordinal
ho : o ≠ 0
⊢ 0 < o / b ^ log b o

tactic: simpa using Ordinal.pos_iff_ne_zero.2 ho
state_before: case inl
o : Ordinal
ho : o ≠ 0
⊢ 0 < o / 0 ^ log 0 o

tactic: rw [div_pos (opow_ne_zero _ hb.ne')]
state_before: case inr
b o : Ordinal
ho : o ≠ 0
hb : 0 < b
⊢ 0 < o / b ^ log b o

tactic: exact opow_log_le_self b ho
state_before: case inr
b o : Ordinal
ho : o ≠ 0
hb : 0 < b
⊢ b ^ log b o ≤ o
Theorem: Equiv.sigmaEquivProd_sigmaCongrRight
File: Mathlib/Logic/Equiv/Basic.lean

tactic: ext ⟨a, b⟩ : 1
state_before: α₁ : Type u_2
β₁ : Type u_1
β₂ : Type u_3
e : α₁ → β₁ ≃ β₂
⊢ (sigmaEquivProd α₁ β₁).symm.trans (sigmaCongrRight e) = (prodCongrRight e).trans (sigmaEquivProd α₁ β₂).symm

tactic: simp only [trans_apply, sigmaCongrRight_apply, prodCongrRight_apply]
state_before: case H.mk
α₁ : Type u_2
β₁ : Type u_1
β₂ : Type u_3
e : α₁ → β₁ ≃ β₂
a : α₁
b : β₁
⊢ ↑((sigmaEquivProd α₁ β₁).symm.trans (sigmaCongrRight e)) (a, b) =
    ↑((prodCongrRight e).trans (sigmaEquivProd α₁ β₂).symm) (a, b)

tactic: rfl
state_before: case H.mk
α₁ : Type u_2
β₁ : Type u_1
β₂ : Type u_3
e : α₁ → β₁ ≃ β₂
a : α₁
b : β₁
⊢ { fst := (↑(sigmaEquivProd α₁ β₁).symm (a, b)).fst,
      snd := ↑(e (↑(sigmaEquivProd α₁ β₁).symm (a, b)).fst) (↑(sigmaEquivProd α₁ β₁).symm (a, b)).snd } =
    ↑(sigmaEquivProd α₁ β₂).symm (a, ↑(e a) b)
Theorem: List.head!_mem_self
File: Mathlib/Data/List/Basic.lean

tactic: have h' := mem_cons_self l.head! l.tail
state_before: ι : Type ?u.44810
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : Inhabited α
l : List α
h : l ≠ []
⊢ head! l ∈ l

tactic: rwa [cons_head!_tail h] at h'
state_before: ι : Type ?u.44810
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : Inhabited α
l : List α
h : l ≠ []
h' : head! l ∈ head! l :: tail l
⊢ head! l ∈ l
Theorem: ENNReal.continuousAt_rpow_const_of_pos
File: Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean

tactic: by_cases hx : x = ⊤
state_before: x : ℝ≥0∞
y : ℝ
h : 0 < y
⊢ ContinuousAt (fun a => a ^ y) x

tactic: lift x to ℝ≥0 using hx
state_before: case neg
x : ℝ≥0∞
y : ℝ
h : 0 < y
hx : ¬x = ⊤
⊢ ContinuousAt (fun a => a ^ y) x

tactic: rw [continuousAt_coe_iff]
state_before: case neg.intro
y : ℝ
h : 0 < y
x : ℝ≥0
⊢ ContinuousAt (fun a => a ^ y) ↑x

tactic: convert continuous_coe.continuousAt.comp (NNReal.continuousAt_rpow_const (Or.inr h.le)) using 1
state_before: case neg.intro
y : ℝ
h : 0 < y
x : ℝ≥0
⊢ ContinuousAt ((fun a => a ^ y) ∘ some) x

tactic: ext1 x
state_before: case h.e'_5
y : ℝ
h : 0 < y
x : ℝ≥0
⊢ (fun a => a ^ y) ∘ some = some ∘ fun z => z ^ y

tactic: simp [coe_rpow_of_nonneg _ h.le]
state_before: case h.e'_5.h
y : ℝ
h : 0 < y
x✝ x : ℝ≥0
⊢ ((fun a => a ^ y) ∘ some) x = (some ∘ fun z => z ^ y) x

tactic: rw [hx, ContinuousAt]
state_before: case pos
x : ℝ≥0∞
y : ℝ
h : 0 < y
hx : x = ⊤
⊢ ContinuousAt (fun a => a ^ y) x

tactic: convert ENNReal.tendsto_rpow_at_top h
state_before: case pos
x : ℝ≥0∞
y : ℝ
h : 0 < y
hx : x = ⊤
⊢ Tendsto (fun a => a ^ y) (𝓝 ⊤) (𝓝 (⊤ ^ y))

tactic: simp [h]
state_before: case h.e'_5.h.e'_3
x : ℝ≥0∞
y : ℝ
h : 0 < y
hx : x = ⊤
⊢ ⊤ ^ y = ⊤
Theorem: mem_nhdsWithin
File: Mathlib/Topology/ContinuousOn.lean

tactic: simpa only [and_assoc, and_left_comm] using (nhdsWithin_basis_open a s).mem_iff
state_before: α : Type u_1
β : Type ?u.4968
γ : Type ?u.4971
δ : Type ?u.4974
inst✝ : TopologicalSpace α
t : Set α
a : α
s : Set α
⊢ t ∈ 𝓝[s] a ↔ ∃ u, IsOpen u ∧ a ∈ u ∧ u ∩ s ⊆ t
Theorem: Filter.biInf_sets_eq
File: Mathlib/Order/Filter/Basic.lean

tactic: simp [mem_biInf_of_directed h ne]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.97618
ι : Sort x
f✝ g : Filter α
s✝ t✝ : Set α
f : β → Filter α
s : Set β
h : DirectedOn (f ⁻¹'o fun x x_1 => x ≥ x_1) s
ne : Set.Nonempty s
t : Set α
⊢ t ∈ (⨅ (i : β) (_ : i ∈ s), f i).sets ↔ t ∈ ⋃ (i : β) (_ : i ∈ s), (f i).sets
Theorem: Mathlib.Tactic.Ring.natCast_nat
File: Mathlib/Tactic/Ring/Basic.lean

tactic: simp
state_before: u : Lean.Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
n : ℕ
⊢ ↑(Nat.rawCast n) = Nat.rawCast n
Theorem: Int.add_emod_self_left
File: Std/Data/Int/DivMod.lean

tactic: rw [Int.add_comm, Int.add_emod_self]
state_before: a b : Int
⊢ (a + b) % a = b % a
Theorem: intervalIntegral.integral_mono_ae
File: Mathlib/MeasureTheory/Integral/IntervalIntegral.lean

tactic: simpa only [integral_of_le hab] using set_integral_mono_ae hf.1 hg.1 h
state_before: ι : Type ?u.21095160
𝕜 : Type ?u.21095163
E : Type ?u.21095166
F : Type ?u.21095169
A : Type ?u.21095172
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f g : ℝ → ℝ
a b : ℝ
μ : MeasureTheory.Measure ℝ
hab : a ≤ b
hf : IntervalIntegrable f μ a b
hg : IntervalIntegrable g μ a b
h : f ≤ᵐ[μ] g
⊢ (∫ (u : ℝ) in a..b, f u ∂μ) ≤ ∫ (u : ℝ) in a..b, g u ∂μ
Theorem: Nat.ofDigits_one_cons
File: Mathlib/Data/Nat/Digits.lean

tactic: simp [ofDigits]
state_before: n : ℕ
α : Type u_1
inst✝ : Semiring α
h : ℕ
L : List ℕ
⊢ ofDigits 1 (h :: L) = ↑h + ofDigits 1 L
Theorem: Int.dvd_iff_dvd_of_dvd_add
File: Std/Data/Int/DivMod.lean

tactic: rw [← Int.sub_neg] at H
state_before: a b c : Int
H : a ∣ b + c
⊢ a ∣ b ↔ a ∣ c

tactic: rw [Int.dvd_iff_dvd_of_dvd_sub H, Int.dvd_neg]
state_before: a b c : Int
H : a ∣ b - -c
⊢ a ∣ b ↔ a ∣ c
Theorem: DirectSum.lie_of_of_ne
File: Mathlib/Algebra/Lie/DirectSum.lean

tactic: apply lieAlgebra_ext R ι L
state_before: R : Type u
ι : Type v
inst✝³ : CommRing R
L : ι → Type w
inst✝² : (i : ι) → LieRing (L i)
inst✝¹ : (i : ι) → LieAlgebra R (L i)
inst✝ : DecidableEq ι
i j : ι
hij : j ≠ i
x : L i
y : L j
⊢ ⁅↑(of L i) x, ↑(of L j) y⁆ = 0

tactic: intro k
state_before: R : Type u
ι : Type v
inst✝³ : CommRing R
L : ι → Type w
inst✝² : (i : ι) → LieRing (L i)
inst✝¹ : (i : ι) → LieAlgebra R (L i)
inst✝ : DecidableEq ι
i j : ι
hij : j ≠ i
x : L i
y : L j
⊢ ∀ (i_1 : ι), ↑(lieAlgebraComponent R ι L i_1) ⁅↑(of L i) x, ↑(of L j) y⁆ = ↑(lieAlgebraComponent R ι L i_1) 0

tactic: rw [LieHom.map_lie]
state_before: R : Type u
ι : Type v
inst✝³ : CommRing R
L : ι → Type w
inst✝² : (i : ι) → LieRing (L i)
inst✝¹ : (i : ι) → LieAlgebra R (L i)
inst✝ : DecidableEq ι
i j : ι
hij : j ≠ i
x : L i
y : L j
k : ι
⊢ ↑(lieAlgebraComponent R ι L k) ⁅↑(of L i) x, ↑(of L j) y⁆ = ↑(lieAlgebraComponent R ι L k) 0

tactic: simp only [of, singleAddHom, AddMonoidHom.coe_mk, ZeroHom.coe_mk, lieAlgebraComponent_apply,
  component, lapply, LinearMap.coe_mk, AddHom.coe_mk, single_apply, LieHom.map_zero]
state_before: R : Type u
ι : Type v
inst✝³ : CommRing R
L : ι → Type w
inst✝² : (i : ι) → LieRing (L i)
inst✝¹ : (i : ι) → LieAlgebra R (L i)
inst✝ : DecidableEq ι
i j : ι
hij : j ≠ i
x : L i
y : L j
k : ι
⊢ ⁅↑(lieAlgebraComponent R ι L k) (↑(of L i) x), ↑(lieAlgebraComponent R ι L k) (↑(of L j) y)⁆ =
    ↑(lieAlgebraComponent R ι L k) 0

tactic: by_cases hik : i = k
state_before: R : Type u
ι : Type v
inst✝³ : CommRing R
L : ι → Type w
inst✝² : (i : ι) → LieRing (L i)
inst✝¹ : (i : ι) → LieAlgebra R (L i)
inst✝ : DecidableEq ι
i j : ι
hij : j ≠ i
x : L i
y : L j
k : ι
⊢ ⁅if h : i = k then (_ : i = k) ▸ x else 0, if h : j = k then (_ : j = k) ▸ y else 0⁆ = 0

tactic: simp only [dif_neg, not_false_iff, lie_zero, hik.symm, hij]
state_before: case pos
R : Type u
ι : Type v
inst✝³ : CommRing R
L : ι → Type w
inst✝² : (i : ι) → LieRing (L i)
inst✝¹ : (i : ι) → LieAlgebra R (L i)
inst✝ : DecidableEq ι
i j : ι
hij : j ≠ i
x : L i
y : L j
k : ι
hik : i = k
⊢ ⁅if h : i = k then (_ : i = k) ▸ x else 0, if h : j = k then (_ : j = k) ▸ y else 0⁆ = 0

tactic: simp only [dif_neg, not_false_iff, zero_lie, hik]
state_before: case neg
R : Type u
ι : Type v
inst✝³ : CommRing R
L : ι → Type w
inst✝² : (i : ι) → LieRing (L i)
inst✝¹ : (i : ι) → LieAlgebra R (L i)
inst✝ : DecidableEq ι
i j : ι
hij : j ≠ i
x : L i
y : L j
k : ι
hik : ¬i = k
⊢ ⁅if h : i = k then (_ : i = k) ▸ x else 0, if h : j = k then (_ : j = k) ▸ y else 0⁆ = 0
Theorem: List.length_filterMap_le
File: Std/Data/List/Lemmas.lean

tactic: rw [← length_map _ some, map_filterMap_some_eq_filter_map_is_some, ← length_map _ f]
state_before: α : Type u_1
β : Type u_2
f : α → Option β
l : List α
⊢ length (filterMap f l) ≤ length l

tactic: apply length_filter_le
state_before: α : Type u_1
β : Type u_2
f : α → Option β
l : List α
⊢ length (filter (fun b => Option.isSome b) (map f l)) ≤ length (map f l)