tasksource/leandojo huggingface dataset:
Theorem: uniformContinuous_iInf_dom
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: delta UniformContinuous
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
f : α → β
u₁ : ι → UniformSpace α
u₂ : UniformSpace β
i : ι
hf : UniformContinuous f
⊢ UniformContinuous f

tactic: rw [iInf_uniformity]
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
f : α → β
u₁ : ι → UniformSpace α
u₂ : UniformSpace β
i : ι
hf : UniformContinuous f
⊢ Tendsto (fun x => (f x.fst, f x.snd)) (𝓤 α) (𝓤 β)

tactic: exact tendsto_iInf' i hf
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
f : α → β
u₁ : ι → UniformSpace α
u₂ : UniformSpace β
i : ι
hf : UniformContinuous f
⊢ Tendsto (fun x => (f x.fst, f x.snd)) (⨅ (i : ι), 𝓤 α) (𝓤 β)
Theorem: Function.LeftInverse.cast_eq
File: Mathlib/Logic/Function/Basic.lean

tactic: rw [cast_eq_iff_heq, h]
state_before: α : Sort u_1
β : Sort u_2
γ : β → Sort v
f : α → β
g : β → α
h : LeftInverse g f
C : (a : α) → γ (f a)
a : α
⊢ cast (_ : γ (f (g (f a))) = γ (f a)) (C (g (f a))) = C a
Theorem: Nat.le_add_pred_of_pos
File: Mathlib/Data/Nat/Order/Basic.lean

tactic: refine le_trans ?_ add_tsub_le_assoc
state_before: m n✝ k l n i : ℕ
hi : i ≠ 0
⊢ n ≤ i + (n - 1)

tactic: simp [add_comm, Nat.add_sub_assoc, one_le_iff_ne_zero.2 hi]
state_before: m n✝ k l n i : ℕ
hi : i ≠ 0
⊢ n ≤ i + n - 1
Theorem: AffineMap.lineMap_apply_one_sub
File: Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean

tactic: rw [lineMap_symm p₀, comp_apply]
state_before: k : Type u_2
V1 : Type u_3
P1 : Type u_1
V2 : Type ?u.538087
P2 : Type ?u.538090
V3 : Type ?u.538093
P3 : Type ?u.538096
V4 : Type ?u.538099
P4 : Type ?u.538102
inst✝¹² : Ring k
inst✝¹¹ : AddCommGroup V1
inst✝¹⁰ : Module k V1
inst✝⁹ : AffineSpace V1 P1
inst✝⁸ : AddCommGroup V2
inst✝⁷ : Module k V2
inst✝⁶ : AffineSpace V2 P2
inst✝⁵ : AddCommGroup V3
inst✝⁴ : Module k V3
inst✝³ : AffineSpace V3 P3
inst✝² : AddCommGroup V4
inst✝¹ : Module k V4
inst✝ : AffineSpace V4 P4
p₀ p₁ : P1
c : k
⊢ ↑(lineMap p₀ p₁) (1 - c) = ↑(lineMap p₁ p₀) c

tactic: congr
state_before: k : Type u_2
V1 : Type u_3
P1 : Type u_1
V2 : Type ?u.538087
P2 : Type ?u.538090
V3 : Type ?u.538093
P3 : Type ?u.538096
V4 : Type ?u.538099
P4 : Type ?u.538102
inst✝¹² : Ring k
inst✝¹¹ : AddCommGroup V1
inst✝¹⁰ : Module k V1
inst✝⁹ : AffineSpace V1 P1
inst✝⁸ : AddCommGroup V2
inst✝⁷ : Module k V2
inst✝⁶ : AffineSpace V2 P2
inst✝⁵ : AddCommGroup V3
inst✝⁴ : Module k V3
inst✝³ : AffineSpace V3 P3
inst✝² : AddCommGroup V4
inst✝¹ : Module k V4
inst✝ : AffineSpace V4 P4
p₀ p₁ : P1
c : k
⊢ ↑(lineMap p₁ p₀) (↑(lineMap 1 0) (1 - c)) = ↑(lineMap p₁ p₀) c

tactic: simp [lineMap_apply]
state_before: case h.e_6.h
k : Type u_2
V1 : Type u_3
P1 : Type u_1
V2 : Type ?u.538087
P2 : Type ?u.538090
V3 : Type ?u.538093
P3 : Type ?u.538096
V4 : Type ?u.538099
P4 : Type ?u.538102
inst✝¹² : Ring k
inst✝¹¹ : AddCommGroup V1
inst✝¹⁰ : Module k V1
inst✝⁹ : AffineSpace V1 P1
inst✝⁸ : AddCommGroup V2
inst✝⁷ : Module k V2
inst✝⁶ : AffineSpace V2 P2
inst✝⁵ : AddCommGroup V3
inst✝⁴ : Module k V3
inst✝³ : AffineSpace V3 P3
inst✝² : AddCommGroup V4
inst✝¹ : Module k V4
inst✝ : AffineSpace V4 P4
p₀ p₁ : P1
c : k
⊢ ↑(lineMap 1 0) (1 - c) = c
Theorem: IsLocalization.isNoetherianRing
File: Mathlib/RingTheory/Localization/Submodule.lean

tactic: rw [isNoetherianRing_iff, isNoetherian_iff_wellFounded] at h⊢
state_before: R : Type u_1
inst✝⁷ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : Algebra R S
P : Type ?u.117121
inst✝⁴ : CommRing P
g : R →+* P
T : Submonoid P
hy : M ≤ Submonoid.comap g T
Q : Type ?u.117953
inst✝³ : CommRing Q
inst✝² : Algebra P Q
inst✝¹ : IsLocalization T Q
inst✝ : IsLocalization M S
h : IsNoetherianRing R
⊢ IsNoetherianRing S

tactic: exact OrderEmbedding.wellFounded (IsLocalization.orderEmbedding M S).dual h
state_before: R : Type u_1
inst✝⁷ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : Algebra R S
P : Type ?u.117121
inst✝⁴ : CommRing P
g : R →+* P
T : Submonoid P
hy : M ≤ Submonoid.comap g T
Q : Type ?u.117953
inst✝³ : CommRing Q
inst✝² : Algebra P Q
inst✝¹ : IsLocalization T Q
inst✝ : IsLocalization M S
h : WellFounded fun x x_1 => x > x_1
⊢ WellFounded fun x x_1 => x > x_1
Theorem: Int.exists_mul_self
File: Mathlib/Data/Int/Sqrt.lean

tactic: rw [← hn, sqrt_eq, ← Int.ofNat_mul, natAbs_mul_self]
state_before: x : ℤ
x✝ : ∃ n, n * n = x
n : ℤ
hn : n * n = x
⊢ sqrt x * sqrt x = x
Theorem: CategoryTheory.epi_of_nonzero_to_simple
File: Mathlib/CategoryTheory/Simple.lean

tactic: rw [← image.fac f]
state_before: C : Type u
inst✝⁴ : Category C
inst✝³ : HasZeroMorphisms C
inst✝² : HasEqualizers C
X Y : C
inst✝¹ : Simple Y
f : X ⟶ Y
inst✝ : HasImage f
w : f ≠ 0
⊢ Epi f

tactic: haveI : IsIso (image.ι f) := isIso_of_mono_of_nonzero fun h => w (eq_zero_of_image_eq_zero h)
state_before: C : Type u
inst✝⁴ : Category C
inst✝³ : HasZeroMorphisms C
inst✝² : HasEqualizers C
X Y : C
inst✝¹ : Simple Y
f : X ⟶ Y
inst✝ : HasImage f
w : f ≠ 0
⊢ Epi (factorThruImage f ≫ image.ι f)

tactic: apply epi_comp
state_before: C : Type u
inst✝⁴ : Category C
inst✝³ : HasZeroMorphisms C
inst✝² : HasEqualizers C
X Y : C
inst✝¹ : Simple Y
f : X ⟶ Y
inst✝ : HasImage f
w : f ≠ 0
this : IsIso (image.ι f)
⊢ Epi (factorThruImage f ≫ image.ι f)
Theorem: Int.toNat_of_nonneg
File: Std/Data/Int/Lemmas.lean

tactic: rw [toNat_eq_max, Int.max_eq_left h]
state_before: a : Int
h : 0 ≤ a
⊢ ↑(toNat a) = a
Theorem: nhds_basis_closed_balanced
File: Mathlib/Analysis/LocallyConvex/BalancedCoreHull.lean

tactic: refine'
  (closed_nhds_basis 0).to_hasBasis (fun s hs => _) fun s hs => ⟨s, ⟨hs.1, hs.2.1⟩, rfl.subset⟩
state_before: 𝕜 : Type u_2
E : Type u_1
ι : Type ?u.126319
inst✝⁵ : NontriviallyNormedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousSMul 𝕜 E
U : Set E
inst✝ : RegularSpace E
⊢ HasBasis (𝓝 0) (fun s => s ∈ 𝓝 0 ∧ IsClosed s ∧ Balanced 𝕜 s) id

tactic: refine' ⟨balancedCore 𝕜 s, ⟨balancedCore_mem_nhds_zero hs.1, _⟩, balancedCore_subset s⟩
state_before: 𝕜 : Type u_2
E : Type u_1
ι : Type ?u.126319
inst✝⁵ : NontriviallyNormedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousSMul 𝕜 E
U : Set E
inst✝ : RegularSpace E
s : Set E
hs : s ∈ 𝓝 0 ∧ IsClosed s
⊢ ∃ i', (i' ∈ 𝓝 0 ∧ IsClosed i' ∧ Balanced 𝕜 i') ∧ id i' ⊆ id s

tactic: exact ⟨hs.2.balancedCore, balancedCore_balanced s⟩
state_before: 𝕜 : Type u_2
E : Type u_1
ι : Type ?u.126319
inst✝⁵ : NontriviallyNormedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousSMul 𝕜 E
U : Set E
inst✝ : RegularSpace E
s : Set E
hs : s ∈ 𝓝 0 ∧ IsClosed s
⊢ IsClosed (balancedCore 𝕜 s) ∧ Balanced 𝕜 (balancedCore 𝕜 s)
Theorem: CauSeq.inf_eq_right
File: Mathlib/Data/Real/CauSeq.lean

tactic: obtain ⟨ε, ε0 : _ < _, i, h⟩ | h := h
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a b : CauSeq α abs
h : b ≤ a
⊢ a ⊓ b ≈ b

tactic: intro _ _
state_before: case inl.intro.intro.intro
α : Type u_1
inst✝ : LinearOrderedField α
a b : CauSeq α abs
ε : α
ε0 : 0 < ε
i : ℕ
h : ∀ (j : ℕ), j ≥ i → ε ≤ ↑(a - b) j
⊢ a ⊓ b ≈ b

tactic: refine' ⟨i, fun j hj => _⟩
state_before: case inl.intro.intro.intro
α : Type u_1
inst✝ : LinearOrderedField α
a b : CauSeq α abs
ε : α
ε0 : 0 < ε
i : ℕ
h : ∀ (j : ℕ), j ≥ i → ε ≤ ↑(a - b) j
ε✝ : α
a✝ : ε✝ > 0
⊢ ∃ i, ∀ (j : ℕ), j ≥ i → abs (↑(a ⊓ b - b) j) < ε✝

tactic: dsimp
state_before: case inl.intro.intro.intro
α : Type u_1
inst✝ : LinearOrderedField α
a b : CauSeq α abs
ε : α
ε0 : 0 < ε
i : ℕ
h : ∀ (j : ℕ), j ≥ i → ε ≤ ↑(a - b) j
ε✝ : α
a✝ : ε✝ > 0
j : ℕ
hj : j ≥ i
⊢ abs (↑(a ⊓ b - b) j) < ε✝

tactic: erw [← min_sub_sub_right]
state_before: case inl.intro.intro.intro
α : Type u_1
inst✝ : LinearOrderedField α
a b : CauSeq α abs
ε : α
ε0 : 0 < ε
i : ℕ
h : ∀ (j : ℕ), j ≥ i → ε ≤ ↑(a - b) j
ε✝ : α
a✝ : ε✝ > 0
j : ℕ
hj : j ≥ i
⊢ abs (↑a j ⊓ ↑b j - ↑b j) < ε✝

tactic: rwa [sub_self, min_eq_right, abs_zero]
state_before: case inl.intro.intro.intro
α : Type u_1
inst✝ : LinearOrderedField α
a b : CauSeq α abs
ε : α
ε0 : 0 < ε
i : ℕ
h : ∀ (j : ℕ), j ≥ i → ε ≤ ↑(a - b) j
ε✝ : α
a✝ : ε✝ > 0
j : ℕ
hj : j ≥ i
⊢ abs (min (↑a j - ↑b j) (↑b j - ↑b j)) < ε✝

tactic: exact ε0.le.trans (h _ hj)
state_before: case inl.intro.intro.intro
α : Type u_1
inst✝ : LinearOrderedField α
a b : CauSeq α abs
ε : α
ε0 : 0 < ε
i : ℕ
h : ∀ (j : ℕ), j ≥ i → ε ≤ ↑(a - b) j
ε✝ : α
a✝ : ε✝ > 0
j : ℕ
hj : j ≥ i
⊢ 0 ≤ ↑a j - ↑b j

tactic: refine' Setoid.trans (inf_equiv_inf (Setoid.symm h) (Setoid.refl _)) _
state_before: case inr
α : Type u_1
inst✝ : LinearOrderedField α
a b : CauSeq α abs
h : b ≈ a
⊢ a ⊓ b ≈ b

tactic: rw [CauSeq.inf_idem]
state_before: case inr
α : Type u_1
inst✝ : LinearOrderedField α
a b : CauSeq α abs
h : b ≈ a
⊢ b ⊓ b ≈ b
Theorem: fderivWithin.comp₃
File: Mathlib/Analysis/Calculus/FDeriv/Comp.lean

tactic: substs h3g h3f
state_before: 𝕜 : Type u_3
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_5
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_1
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_2
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type u_4
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
g' : G → G'
g : F → G
t : Set F
u : Set G
y : F
y' : G
hg' : DifferentiableWithinAt 𝕜 g' u y'
hg : DifferentiableWithinAt 𝕜 g t y
hf : DifferentiableWithinAt 𝕜 f s x
h2g : MapsTo g t u
h2f : MapsTo f s t
h3g : g y = y'
h3f : f x = y
hxs : UniqueDiffWithinAt 𝕜 s x
⊢ fderivWithin 𝕜 (g' ∘ g ∘ f) s x =
    ContinuousLinearMap.comp (fderivWithin 𝕜 g' u y')
      (ContinuousLinearMap.comp (fderivWithin 𝕜 g t y) (fderivWithin 𝕜 f s x))

tactic: exact (hg'.hasFDerivWithinAt.comp x (hg.hasFDerivWithinAt.comp x hf.hasFDerivWithinAt h2f) <|
  h2g.comp h2f).fderivWithin hxs
state_before: 𝕜 : Type u_3
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_5
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_1
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_2
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type u_4
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
g' : G → G'
g : F → G
t : Set F
u : Set G
hf : DifferentiableWithinAt 𝕜 f s x
h2g : MapsTo g t u
h2f : MapsTo f s t
hxs : UniqueDiffWithinAt 𝕜 s x
hg : DifferentiableWithinAt 𝕜 g t (f x)
hg' : DifferentiableWithinAt 𝕜 g' u (g (f x))
⊢ fderivWithin 𝕜 (g' ∘ g ∘ f) s x =
    ContinuousLinearMap.comp (fderivWithin 𝕜 g' u (g (f x)))
      (ContinuousLinearMap.comp (fderivWithin 𝕜 g t (f x)) (fderivWithin 𝕜 f s x))
Theorem: Int.ofNat_dvd
File: Std/Data/Int/DivMod.lean

tactic: refine ⟨fun ⟨a, ae⟩ => ?_, fun ⟨k, e⟩ => ⟨k, by rw [e, Int.ofNat_mul]⟩⟩
state_before: m n : Nat
⊢ ↑m ∣ ↑n ↔ m ∣ n

tactic: match Int.le_total a 0 with
| .inl h =>
  have := ae.symm ▸ Int.mul_nonpos_of_nonneg_of_nonpos (ofNat_zero_le _) h
  rw [Nat.le_antisymm (ofNat_le.1 this) (Nat.zero_le _)]
  apply Nat.dvd_zero
| .inr h => match a, eq_ofNat_of_zero_le h with
  | _, ⟨k, rfl⟩ => exact ⟨k, Int.ofNat.inj ae⟩
state_before: m n : Nat
x✝ : ↑m ∣ ↑n
a : Int
ae : ↑n = ↑m * a
⊢ m ∣ n

tactic: rw [e, Int.ofNat_mul]
state_before: m n : Nat
x✝ : m ∣ n
k : Nat
e : n = m * k
⊢ ↑n = ↑m * ↑k

tactic: have := ae.symm ▸ Int.mul_nonpos_of_nonneg_of_nonpos (ofNat_zero_le _) h
state_before: m n : Nat
x✝ : ↑m ∣ ↑n
a : Int
ae : ↑n = ↑m * a
h : a ≤ 0
⊢ m ∣ n

tactic: rw [Nat.le_antisymm (ofNat_le.1 this) (Nat.zero_le _)]
state_before: m n : Nat
x✝ : ↑m ∣ ↑n
a : Int
ae : ↑n = ↑m * a
h : a ≤ 0
this : ↑n ≤ 0
⊢ m ∣ n

tactic: apply Nat.dvd_zero
state_before: m n : Nat
x✝ : ↑m ∣ ↑n
a : Int
ae : ↑n = ↑m * a
h : a ≤ 0
this : ↑n ≤ 0
⊢ m ∣ 0

tactic: match a, eq_ofNat_of_zero_le h with
| _, ⟨k, rfl⟩ => exact ⟨k, Int.ofNat.inj ae⟩
state_before: m n : Nat
x✝ : ↑m ∣ ↑n
a : Int
ae : ↑n = ↑m * a
h : 0 ≤ a
⊢ m ∣ n

tactic: exact ⟨k, Int.ofNat.inj ae⟩
state_before: m n : Nat
x✝ : ↑m ∣ ↑n
a : Int
k : Nat
ae : ↑n = ↑m * ↑k
h : 0 ≤ ↑k
⊢ m ∣ n
Theorem: eq_of_vsub_eq_zero
File: Mathlib/Algebra/AddTorsor.lean

tactic: rw [← vsub_vadd p1 p2, h, zero_vadd]
state_before: G : Type u_1
P : Type u_2
inst✝ : AddGroup G
T : AddTorsor G P
p1 p2 : P
h : p1 -ᵥ p2 = 0
⊢ p1 = p2
Theorem: EuclideanDomain.gcdB_zero_left
File: Mathlib/Algebra/EuclideanDomain/Defs.lean

tactic: unfold gcdB
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
s : R
⊢ gcdB 0 s = 1

tactic: rw [xgcd, xgcd_zero_left]
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
s : R
⊢ (xgcd 0 s).snd = 1
Theorem: Ordinal.zero_nadd
File: Mathlib/SetTheory/Ordinal/NaturalOps.lean

tactic: rw [nadd_comm, nadd_zero]
state_before: a b c : Ordinal
⊢ 0 ♯ a = a
Theorem: Polynomial.units_coeff_zero_smul
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: rw [← Polynomial.C_mul', ← Polynomial.eq_C_of_degree_eq_zero (degree_coe_units 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]
c : R[X]ˣ
p : R[X]
⊢ coeff (↑c) 0 • p = ↑c * p
Theorem: Finset.prod_subtype_of_mem
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: rw [prod_subtype_eq_prod_filter, filter_true_of_mem]
state_before: ι : Type ?u.380694
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝¹ : CommMonoid β
f : α → β
p : α → Prop
inst✝ : DecidablePred p
h : ∀ (x : α), x ∈ s → p x
⊢ ∏ x in Finset.subtype p s, f ↑x = ∏ x in s, f x

tactic: simpa using h
state_before: ι : Type ?u.380694
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝¹ : CommMonoid β
f : α → β
p : α → Prop
inst✝ : DecidablePred p
h : ∀ (x : α), x ∈ s → p x
⊢ ∀ (x : α), x ∈ s → p x
Theorem: Finset.sum_mul_sum
File: Mathlib/Algebra/BigOperators/Ring.lean

tactic: rw [sum_product, sum_mul, sum_congr rfl]
state_before: α : Type u
β : Type v
γ : Type w
s s₁✝ s₂✝ : Finset α
a : α
b : β
f g : α → β
inst✝ : NonUnitalNonAssocSemiring β
ι₁ : Type u_1
ι₂ : Type u_2
s₁ : Finset ι₁
s₂ : Finset ι₂
f₁ : ι₁ → β
f₂ : ι₂ → β
⊢ (∑ x₁ in s₁, f₁ x₁) * ∑ x₂ in s₂, f₂ x₂ = ∑ p in s₁ ×ˢ s₂, f₁ p.fst * f₂ p.snd

tactic: intros
state_before: α : Type u
β : Type v
γ : Type w
s s₁✝ s₂✝ : Finset α
a : α
b : β
f g : α → β
inst✝ : NonUnitalNonAssocSemiring β
ι₁ : Type u_1
ι₂ : Type u_2
s₁ : Finset ι₁
s₂ : Finset ι₂
f₁ : ι₁ → β
f₂ : ι₂ → β
⊢ ∀ (x : ι₁), x ∈ s₁ → f₁ x * ∑ x₂ in s₂, f₂ x₂ = ∑ y in s₂, f₁ (x, y).fst * f₂ (x, y).snd

tactic: rw [mul_sum]
state_before: α : Type u
β : Type v
γ : Type w
s s₁✝ s₂✝ : Finset α
a : α
b : β
f g : α → β
inst✝ : NonUnitalNonAssocSemiring β
ι₁ : Type u_1
ι₂ : Type u_2
s₁ : Finset ι₁
s₂ : Finset ι₂
f₁ : ι₁ → β
f₂ : ι₂ → β
x✝ : ι₁
a✝ : x✝ ∈ s₁
⊢ f₁ x✝ * ∑ x₂ in s₂, f₂ x₂ = ∑ y in s₂, f₁ (x✝, y).fst * f₂ (x✝, y).snd
Theorem: List.drop_left'
File: Mathlib/Data/List/Basic.lean

tactic: rw [← h]
state_before: ι : Type ?u.202919
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂✝ l₁ l₂ : List α
n : ℕ
h : length l₁ = n
⊢ drop n (l₁ ++ l₂) = l₂

tactic: apply drop_left
state_before: ι : Type ?u.202919
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂✝ l₁ l₂ : List α
n : ℕ
h : length l₁ = n
⊢ drop (length l₁) (l₁ ++ l₂) = l₂
Theorem: LucasLehmer.X.coe_mul
File: Mathlib/NumberTheory/LucasLehmer.lean

tactic: ext <;> simp
state_before: q : ℕ+
n m : ℤ
⊢ ↑(n * m) = ↑n * ↑m
Theorem: Finsupp.sum_inner
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: convert _root_.sum_inner (𝕜 := 𝕜) l.support (fun a => l a • v a) x
state_before: 𝕜 : Type u_2
E : Type u_3
F : Type ?u.1418390
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
ι : Type u_1
l : ι →₀ 𝕜
v : ι → E
x : E
⊢ inner (sum l fun i a => a • v i) x = sum l fun i a => ↑(starRingEnd 𝕜) a • inner (v i) x

tactic: simp only [inner_smul_left, Finsupp.sum, smul_eq_mul]
state_before: case h.e'_3
𝕜 : Type u_2
E : Type u_3
F : Type ?u.1418390
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
ι : Type u_1
l : ι →₀ 𝕜
v : ι → E
x : E
⊢ (sum l fun i a => ↑(starRingEnd 𝕜) a • inner (v i) x) = ∑ i in l.support, inner (↑l i • v i) x
Theorem: CategoryTheory.natIsoOfCompFullyFaithful_inv
File: Mathlib/CategoryTheory/Functor/FullyFaithful.lean

tactic: ext
state_before: C : Type u₁
inst✝⁴ : Category C
D : Type u₂
inst✝³ : Category D
E : Type u_2
inst✝² : Category E
F G : C ⥤ D
H : D ⥤ E
inst✝¹ : Full H
inst✝ : Faithful H
i : F ⋙ H ≅ G ⋙ H
⊢ (natIsoOfCompFullyFaithful H i).inv = natTransOfCompFullyFaithful H i.inv

tactic: simp [← preimage_comp]
state_before: case w.h
C : Type u₁
inst✝⁴ : Category C
D : Type u₂
inst✝³ : Category D
E : Type u_2
inst✝² : Category E
F G : C ⥤ D
H : D ⥤ E
inst✝¹ : Full H
inst✝ : Faithful H
i : F ⋙ H ≅ G ⋙ H
x✝ : C
⊢ (natIsoOfCompFullyFaithful H i).inv.app x✝ = (natTransOfCompFullyFaithful H i.inv).app x✝
Theorem: ciSup_const
File: Mathlib/Order/ConditionallyCompleteLattice/Basic.lean

tactic: rw [iSup, range_const, csSup_singleton]
state_before: α : Type u_2
β : Type ?u.58776
γ : Type ?u.58779
ι : Sort u_1
inst✝ : ConditionallyCompleteLattice α
s t : Set α
a✝ b : α
hι : Nonempty ι
a : α
⊢ (⨆ (x : ι), a) = a
Theorem: Matrix.det_eq_sign_charpoly_coeff
File: Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean

tactic: rw [coeff_zero_eq_eval_zero, charpoly, eval_det, matPolyEquiv_charmatrix, ← det_smul]
state_before: R : Type u
inst✝³ : CommRing R
n G : Type v
inst✝² : DecidableEq n
inst✝¹ : Fintype n
α β : Type v
inst✝ : DecidableEq α
M✝ M : Matrix n n R
⊢ det M = (-1) ^ Fintype.card n * coeff (charpoly M) 0

tactic: simp
state_before: R : Type u
inst✝³ : CommRing R
n G : Type v
inst✝² : DecidableEq n
inst✝¹ : Fintype n
α β : Type v
inst✝ : DecidableEq α
M✝ M : Matrix n n R
⊢ det M = det (-1 • eval (↑(scalar n) 0) (X - ↑C M))
Theorem: List.Perm.take_inter
File: Mathlib/Data/List/Perm.lean

tactic: simp only [List.inter]
state_before: α✝ : Type uu
β : Type vv
l₁ l₂ : List α✝
α : Type u_1
inst✝ : DecidableEq α
xs ys : List α
n : ℕ
h : xs ~ ys
h' : Nodup ys
⊢ take n xs ~ List.inter ys (take n xs)

tactic: exact Perm.trans (show xs.take n ~ xs.filter (. ∈ xs.take n) by
    conv_lhs => rw [Nodup.take_eq_filter_mem ((Perm.nodup_iff h).2 h')])
  (Perm.filter _ h)
state_before: α✝ : Type uu
β : Type vv
l₁ l₂ : List α✝
α : Type u_1
inst✝ : DecidableEq α
xs ys : List α
n : ℕ
h : xs ~ ys
h' : Nodup ys
⊢ take n xs ~ List.filter (fun x => decide (x ∈ take n xs)) ys

tactic: conv_lhs => rw [Nodup.take_eq_filter_mem ((Perm.nodup_iff h).2 h')]
state_before: α✝ : Type uu
β : Type vv
l₁ l₂ : List α✝
α : Type u_1
inst✝ : DecidableEq α
xs ys : List α
n : ℕ
h : xs ~ ys
h' : Nodup ys
⊢ take n xs ~ List.filter (fun x => decide (x ∈ take n xs)) xs
Theorem: Polynomial.coeff_X_mul
File: Mathlib/Data/Polynomial/Coeff.lean

tactic: rw [(commute_X p).eq, coeff_mul_X]
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
n : ℕ
⊢ coeff (X * p) (n + 1) = coeff p n
Theorem: Subgroup.saturated_iff_zpow
File: Mathlib/GroupTheory/Subgroup/Saturated.lean

tactic: constructor
state_before: G : Type u_1
inst✝ : Group G
H : Subgroup G
⊢ Saturated H ↔ ∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H

tactic: intros hH n g hgn
state_before: case mp
G : Type u_1
inst✝ : Group G
H : Subgroup G
⊢ Saturated H → ∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H

tactic: induction' n with n n
state_before: case mp
G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : Saturated H
n : ℤ
g : G
hgn : g ^ n ∈ H
⊢ n = 0 ∨ g ∈ H

tactic: simp only [Int.coe_nat_eq_zero, Int.ofNat_eq_coe, zpow_ofNat] at hgn⊢
state_before: case mp.ofNat
G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : Saturated H
n✝ : ℤ
g : G
hgn✝ : g ^ n✝ ∈ H
n : ℕ
hgn : g ^ Int.ofNat n ∈ H
⊢ Int.ofNat n = 0 ∨ g ∈ H

tactic: exact hH hgn
state_before: case mp.ofNat
G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : Saturated H
n✝ : ℤ
g : G
hgn✝ : g ^ n✝ ∈ H
n : ℕ
hgn : g ^ n ∈ H
⊢ n = 0 ∨ g ∈ H

tactic: suffices g ^ (n + 1) ∈ H by
  refine' (hH this).imp _ id
  simp only [IsEmpty.forall_iff, Nat.succ_ne_zero]
state_before: case mp.negSucc
G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : Saturated H
n✝ : ℤ
g : G
hgn✝ : g ^ n✝ ∈ H
n : ℕ
hgn : g ^ Int.negSucc n ∈ H
⊢ Int.negSucc n = 0 ∨ g ∈ H

tactic: simpa only [inv_mem_iff, zpow_negSucc] using hgn
state_before: case mp.negSucc
G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : Saturated H
n✝ : ℤ
g : G
hgn✝ : g ^ n✝ ∈ H
n : ℕ
hgn : g ^ Int.negSucc n ∈ H
⊢ g ^ (n + 1) ∈ H

tactic: refine' (hH this).imp _ id
state_before: G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : Saturated H
n✝ : ℤ
g : G
hgn✝ : g ^ n✝ ∈ H
n : ℕ
hgn : g ^ Int.negSucc n ∈ H
this : g ^ (n + 1) ∈ H
⊢ Int.negSucc n = 0 ∨ g ∈ H

tactic: simp only [IsEmpty.forall_iff, Nat.succ_ne_zero]
state_before: G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : Saturated H
n✝ : ℤ
g : G
hgn✝ : g ^ n✝ ∈ H
n : ℕ
hgn : g ^ Int.negSucc n ∈ H
this : g ^ (n + 1) ∈ H
⊢ n + 1 = 0 → Int.negSucc n = 0

tactic: intro h n g hgn
state_before: case mpr
G : Type u_1
inst✝ : Group G
H : Subgroup G
⊢ (∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H) → Saturated H

tactic: specialize h n g
state_before: case mpr
G : Type u_1
inst✝ : Group G
H : Subgroup G
h : ∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H
n : ℕ
g : G
hgn : g ^ n ∈ H
⊢ n = 0 ∨ g ∈ H

tactic: simp only [Int.coe_nat_eq_zero, zpow_ofNat] at h
state_before: case mpr
G : Type u_1
inst✝ : Group G
H : Subgroup G
n : ℕ
g : G
hgn : g ^ n ∈ H
h : g ^ ↑n ∈ H → ↑n = 0 ∨ g ∈ H
⊢ n = 0 ∨ g ∈ H

tactic: apply h hgn
state_before: case mpr
G : Type u_1
inst✝ : Group G
H : Subgroup G
n : ℕ
g : G
hgn : g ^ n ∈ H
h : g ^ n ∈ H → n = 0 ∨ g ∈ H
⊢ n = 0 ∨ g ∈ H
Theorem: IsCoprime.of_mul_add_right_right
File: Mathlib/RingTheory/Coprime/Basic.lean

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

tactic: exact h.of_add_mul_right_right
state_before: R : Type u
inst✝ : CommSemiring R
x y z : R
h : IsCoprime x (y + z * x)
⊢ IsCoprime x y