tasksource/leandojo huggingface dataset:
Theorem: Commute.geom_sum₂
File: Mathlib/Algebra/GeomSum.lean

tactic: have : x - y ≠ 0 := by simp_all [sub_eq_iff_eq_add]
state_before: α : Type u
inst✝ : DivisionRing α
x y : α
h' : Commute x y
h : x ≠ y
n : ℕ
⊢ ∑ i in range n, x ^ i * y ^ (n - 1 - i) = (x ^ n - y ^ n) / (x - y)

tactic: rw [← h'.geom_sum₂_mul, mul_div_cancel _ this]
state_before: α : Type u
inst✝ : DivisionRing α
x y : α
h' : Commute x y
h : x ≠ y
n : ℕ
this : x - y ≠ 0
⊢ ∑ i in range n, x ^ i * y ^ (n - 1 - i) = (x ^ n - y ^ n) / (x - y)

tactic: simp_all [sub_eq_iff_eq_add]
state_before: α : Type u
inst✝ : DivisionRing α
x y : α
h' : Commute x y
h : x ≠ y
n : ℕ
⊢ x - y ≠ 0
Theorem: LieHom.isIdealMorphism_of_surjective
File: Mathlib/Algebra/Lie/Submodule.lean

tactic: rw [isIdealMorphism_def, f.idealRange_eq_top_of_surjective h, f.range_eq_top.mpr h,
  LieIdeal.top_coe_lieSubalgebra]
state_before: R : Type u
L : Type v
L' : Type w₂
M : Type w
M' : Type w₁
inst✝¹² : CommRing R
inst✝¹¹ : LieRing L
inst✝¹⁰ : LieAlgebra R L
inst✝⁹ : LieRing L'
inst✝⁸ : LieAlgebra R L'
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
inst✝¹ : LieRingModule L M'
inst✝ : LieModule R L M'
f : L →ₗ⁅R⁆ L'
I : LieIdeal R L
J : LieIdeal R L'
h : Function.Surjective ↑f
⊢ IsIdealMorphism f
Theorem: Dfinsupp.comapDomain_add
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: ext
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
κ : Type u_1
inst✝ : (i : ι) → AddZeroClass (β i)
h : κ → ι
hh : Function.Injective h
f g : Π₀ (i : ι), β i
⊢ comapDomain h hh (f + g) = comapDomain h hh f + comapDomain h hh g

tactic: rw [add_apply, comapDomain_apply, comapDomain_apply, comapDomain_apply, add_apply]
state_before: case h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
κ : Type u_1
inst✝ : (i : ι) → AddZeroClass (β i)
h : κ → ι
hh : Function.Injective h
f g : Π₀ (i : ι), β i
i✝ : κ
⊢ ↑(comapDomain h hh (f + g)) i✝ = ↑(comapDomain h hh f + comapDomain h hh g) i✝
Theorem: Stream'.WSeq.toList'_think
File: Mathlib/Data/Seq/WSeq.lean

tactic: simp [toList, think]
state_before: α : Type u
β : Type v
γ : Type w
l : List α
s : WSeq α
⊢ Computation.destruct
      (Computation.corec
        (fun x =>
          match x with
          | (l, s) =>
            match Seq.destruct s with
            | none => Sum.inl (List.reverse l)
            | some (none, s') => Sum.inr (l, s')
            | some (some a, s') => Sum.inr (a :: l, s'))
        (l, think s)) =
    Sum.inr
      (Computation.corec
        (fun x =>
          match x with
          | (l, s) =>
            match Seq.destruct s with
            | none => Sum.inl (List.reverse l)
            | some (none, s') => Sum.inr (l, s')
            | some (some a, s') => Sum.inr (a :: l, s'))
        (l, s))
Theorem: Pmf.mem_support_ofFinset_iff
File: Mathlib/Probability/ProbabilityMassFunction/Constructions.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.126237
γ : Type ?u.126240
f : α → ℝ≥0∞
s : Finset α
h : ∑ a in s, f a = 1
h' : ∀ (a : α), ¬a ∈ s → f a = 0
a : α
⊢ a ∈ support (ofFinset f s h h') ↔ a ∈ s ∧ f a ≠ 0
Theorem: List.cyclicPermutations_eq_nil_iff
File: Mathlib/Data/List/Rotate.lean

tactic: refine' ⟨fun h => _, fun h => by simp [h]⟩
state_before: α : Type u
l✝ l' l : List α
⊢ cyclicPermutations l = [[]] ↔ l = []

tactic: rw [eq_comm, ← isRotated_nil_iff', ← mem_cyclicPermutations_iff, h, mem_singleton]
state_before: α : Type u
l✝ l' l : List α
h : cyclicPermutations l = [[]]
⊢ l = []

tactic: simp [h]
state_before: α : Type u
l✝ l' l : List α
h : l = []
⊢ cyclicPermutations l = [[]]
Theorem: AdjoinRoot.quotEquivQuotMap_apply_mk
File: Mathlib/RingTheory/AdjoinRoot.lean

tactic: rw [AdjoinRoot.quotEquivQuotMap_apply, AdjoinRoot.quotAdjoinRootEquivQuotPolynomialQuot_mk_of]
state_before: R : Type u
S : Type v
K : Type w
inst✝ : CommRing R
I✝ : Ideal R
f✝ f g : R[X]
I : Ideal R
⊢ ↑(quotEquivQuotMap f I) (↑(Ideal.Quotient.mk (Ideal.map (of f) I)) (↑(mk f) g)) =
    ↑(Ideal.Quotient.mk (span {Polynomial.map (Ideal.Quotient.mk I) f})) (Polynomial.map (Ideal.Quotient.mk I) g)
Theorem: Nat.swap_mem_divisorsAntidiagonal
File: Mathlib/NumberTheory/Divisors.lean

tactic: rw [mem_divisorsAntidiagonal, mem_divisorsAntidiagonal, mul_comm, Prod.swap]
state_before: n : ℕ
x : ℕ × ℕ
⊢ Prod.swap x ∈ divisorsAntidiagonal n ↔ x ∈ divisorsAntidiagonal n
Theorem: toIxxMod_antisymm
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: by_contra' h
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b c : α
n : ℤ
h₁₂₃ : toIcoMod hp a b ≤ toIocMod hp a c
h₁₃₂ : toIcoMod hp a c ≤ toIocMod hp a b
⊢ b ≡ a [PMOD p] ∨ c ≡ b [PMOD p] ∨ a ≡ c [PMOD p]

tactic: rw [modEq_comm] at h
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b c : α
n : ℤ
h₁₂₃ : toIcoMod hp a b ≤ toIocMod hp a c
h₁₃₂ : toIcoMod hp a c ≤ toIocMod hp a b
h : ¬b ≡ a [PMOD p] ∧ ¬c ≡ b [PMOD p] ∧ ¬a ≡ c [PMOD p]
⊢ False

tactic: rw [← (not_modEq_iff_toIcoMod_eq_toIocMod hp).mp h.2.2] at h₁₂₃
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b c : α
n : ℤ
h₁₂₃ : toIcoMod hp a b ≤ toIocMod hp a c
h₁₃₂ : toIcoMod hp a c ≤ toIocMod hp a b
h : ¬a ≡ b [PMOD p] ∧ ¬c ≡ b [PMOD p] ∧ ¬a ≡ c [PMOD p]
⊢ False

tactic: rw [← (not_modEq_iff_toIcoMod_eq_toIocMod hp).mp h.1] at h₁₃₂
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b c : α
n : ℤ
h₁₂₃ : toIcoMod hp a b ≤ toIcoMod hp a c
h₁₃₂ : toIcoMod hp a c ≤ toIocMod hp a b
h : ¬a ≡ b [PMOD p] ∧ ¬c ≡ b [PMOD p] ∧ ¬a ≡ c [PMOD p]
⊢ False

tactic: exact h.2.1 ((toIcoMod_inj _).1 <| h₁₃₂.antisymm h₁₂₃)
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b c : α
n : ℤ
h₁₂₃ : toIcoMod hp a b ≤ toIcoMod hp a c
h₁₃₂ : toIcoMod hp a c ≤ toIcoMod hp a b
h : ¬a ≡ b [PMOD p] ∧ ¬c ≡ b [PMOD p] ∧ ¬a ≡ c [PMOD p]
⊢ False
Theorem: Nat.add_choose_mul_factorial_mul_factorial
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: rw [← choose_mul_factorial_mul_factorial (Nat.le_add_left _ _), add_tsub_cancel_right,
  mul_right_comm]
state_before: i j : ℕ
⊢ choose (i + j) j * i ! * j ! = (i + j)!
Theorem: Prime.pow_dvd_of_dvd_mul_left
File: Mathlib/Algebra/Associated.lean

tactic: induction' n with n ih
state_before: α : Type u_1
β : Type ?u.30722
γ : Type ?u.30725
δ : Type ?u.30728
inst✝ : CancelCommMonoidWithZero α
p a b : α
hp : Prime p
n : ℕ
h : ¬p ∣ a
h' : p ^ n ∣ a * b
⊢ p ^ n ∣ b

tactic: rw [pow_zero]
state_before: case zero
α : Type u_1
β : Type ?u.30722
γ : Type ?u.30725
δ : Type ?u.30728
inst✝ : CancelCommMonoidWithZero α
p a b : α
hp : Prime p
n : ℕ
h : ¬p ∣ a
h'✝ : p ^ n ∣ a * b
h' : p ^ Nat.zero ∣ a * b
⊢ p ^ Nat.zero ∣ b

tactic: exact one_dvd b
state_before: case zero
α : Type u_1
β : Type ?u.30722
γ : Type ?u.30725
δ : Type ?u.30728
inst✝ : CancelCommMonoidWithZero α
p a b : α
hp : Prime p
n : ℕ
h : ¬p ∣ a
h'✝ : p ^ n ∣ a * b
h' : p ^ Nat.zero ∣ a * b
⊢ 1 ∣ b

tactic: obtain ⟨c, rfl⟩ := ih (dvd_trans (pow_dvd_pow p n.le_succ) h')
state_before: case succ
α : Type u_1
β : Type ?u.30722
γ : Type ?u.30725
δ : Type ?u.30728
inst✝ : CancelCommMonoidWithZero α
p a b : α
hp : Prime p
n✝ : ℕ
h : ¬p ∣ a
h'✝ : p ^ n✝ ∣ a * b
n : ℕ
ih : p ^ n ∣ a * b → p ^ n ∣ b
h' : p ^ Nat.succ n ∣ a * b
⊢ p ^ Nat.succ n ∣ b

tactic: rw [pow_succ']
state_before: case succ.intro
α : Type u_1
β : Type ?u.30722
γ : Type ?u.30725
δ : Type ?u.30728
inst✝ : CancelCommMonoidWithZero α
p a : α
hp : Prime p
n✝ : ℕ
h : ¬p ∣ a
n : ℕ
c : α
h'✝ : p ^ n✝ ∣ a * (p ^ n * c)
ih : p ^ n ∣ a * (p ^ n * c) → p ^ n ∣ p ^ n * c
h' : p ^ Nat.succ n ∣ a * (p ^ n * c)
⊢ p ^ Nat.succ n ∣ p ^ n * c

tactic: apply mul_dvd_mul_left _ ((hp.dvd_or_dvd _).resolve_left h)
state_before: case succ.intro
α : Type u_1
β : Type ?u.30722
γ : Type ?u.30725
δ : Type ?u.30728
inst✝ : CancelCommMonoidWithZero α
p a : α
hp : Prime p
n✝ : ℕ
h : ¬p ∣ a
n : ℕ
c : α
h'✝ : p ^ n✝ ∣ a * (p ^ n * c)
ih : p ^ n ∣ a * (p ^ n * c) → p ^ n ∣ p ^ n * c
h' : p ^ Nat.succ n ∣ a * (p ^ n * c)
⊢ p ^ n * p ∣ p ^ n * c

tactic: rwa [← mul_dvd_mul_iff_left (pow_ne_zero n hp.ne_zero), ← pow_succ', mul_left_comm]
state_before: α : Type u_1
β : Type ?u.30722
γ : Type ?u.30725
δ : Type ?u.30728
inst✝ : CancelCommMonoidWithZero α
p a : α
hp : Prime p
n✝ : ℕ
h : ¬p ∣ a
n : ℕ
c : α
h'✝ : p ^ n✝ ∣ a * (p ^ n * c)
ih : p ^ n ∣ a * (p ^ n * c) → p ^ n ∣ p ^ n * c
h' : p ^ Nat.succ n ∣ a * (p ^ n * c)
⊢ p ∣ a * c
Theorem: QuadraticForm.map_smul_of_tower
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

tactic: rw [← IsScalarTower.algebraMap_smul R a x, map_smul, ← RingHom.map_mul, Algebra.smul_def]
state_before: S : Type u_1
R : Type u_2
R₁ : Type ?u.131813
M : Type u_3
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
Q : QuadraticForm R M
inst✝³ : CommSemiring S
inst✝² : Algebra S R
inst✝¹ : Module S M
inst✝ : IsScalarTower S R M
a : S
x : M
⊢ ↑Q (a • x) = (a * a) • ↑Q x
Theorem: Set.iUnion_eq_range_sigma
File: Mathlib/Data/Set/Lattice.lean

tactic: simp [Set.ext_iff]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.153217
ι : Sort ?u.153220
ι' : Sort ?u.153223
ι₂ : Sort ?u.153226
κ : ι → Sort ?u.153231
κ₁ : ι → Sort ?u.153236
κ₂ : ι → Sort ?u.153241
κ' : ι' → Sort ?u.153246
s : α → Set β
⊢ (⋃ (i : α), s i) = range fun a => ↑a.snd
Theorem: Complex.dist_conj_self
File: Mathlib/Analysis/Complex/Basic.lean

tactic: rw [dist_of_re_eq (conj_re z), conj_im, dist_comm, Real.dist_eq, sub_neg_eq_add, ← two_mul,
  _root_.abs_mul, abs_of_pos (zero_lt_two' ℝ)]
state_before: E : Type ?u.15628
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
z : ℂ
⊢ dist (↑(starRingEnd ℂ) z) z = 2 * Abs.abs z.im
Theorem: FreeMonoid.ofList_join
File: Mathlib/Algebra/FreeMonoid/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.10895
γ : Type ?u.10898
M : Type ?u.10901
inst✝¹ : Monoid M
N : Type ?u.10907
inst✝ : Monoid N
xs : List (List α)
⊢ ↑toList (↑ofList (List.join xs)) = ↑toList (List.prod (List.map (↑ofList) xs))
Theorem: List.cons_union
File: Std/Data/List/Lemmas.lean

tactic: simp [List.union, foldr]
state_before: α : Type u_1
inst✝ : DecidableEq α
a : α
l₁ l₂ : List α
⊢ List.union (a :: l₁) l₂ = List.insert a (List.union l₁ l₂)
Theorem: List.last_ofFn
File: Mathlib/Data/List/OfFn.lean

tactic: simp [getLast_eq_get]
state_before: α : Type u
n : ℕ
f : Fin n → α
h : ofFn f ≠ []
hn : optParam (n - 1 < n) (_ : pred (Nat.sub n 0) < Nat.sub n 0)
⊢ getLast (ofFn f) h = f { val := n - 1, isLt := hn }
Theorem: Stream'.WSeq.head_some_of_get?_some
File: Mathlib/Data/Seq/WSeq.lean

tactic: induction n generalizing a with
| zero => exact ⟨_, h⟩
| succ n IH =>
    let ⟨a', h'⟩ := head_some_of_head_tail_some h
    exact IH h'
state_before: α : Type u
β : Type v
γ : Type w
s : WSeq α
a : α
n : ℕ
h : some a ∈ get? s n
⊢ ∃ a', some a' ∈ head s

tactic: exact ⟨_, h⟩
state_before: case zero
α : Type u
β : Type v
γ : Type w
s : WSeq α
a : α
h : some a ∈ get? s Nat.zero
⊢ ∃ a', some a' ∈ head s

tactic: let ⟨a', h'⟩ := head_some_of_head_tail_some h
state_before: case succ
α : Type u
β : Type v
γ : Type w
s : WSeq α
n : ℕ
IH : ∀ {a : α}, some a ∈ get? s n → ∃ a', some a' ∈ head s
a : α
h : some a ∈ get? s (Nat.succ n)
⊢ ∃ a', some a' ∈ head s

tactic: exact IH h'
state_before: case succ
α : Type u
β : Type v
γ : Type w
s : WSeq α
n : ℕ
IH : ∀ {a : α}, some a ∈ get? s n → ∃ a', some a' ∈ head s
a : α
h : some a ∈ get? s (Nat.succ n)
a' : α
h' : some a' ∈ head (drop s n)
⊢ ∃ a', some a' ∈ head s
Theorem: Metric.isClosed_of_pairwise_le_dist
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: simpa using hs
state_before: α : Type u
β : Type v
X : Type ?u.554897
ι : Type ?u.554900
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x : γ
s✝ s : Set γ
ε : ℝ
hε : 0 < ε
hs : Set.Pairwise s fun x y => ε ≤ dist x y
⊢ Set.Pairwise s fun x y => ¬(x, y) ∈ {p | dist p.fst p.snd < ε}
Theorem: MvPolynomial.isHomogeneous_of_totalDegree_zero
File: Mathlib/RingTheory/MvPolynomial/Homogeneous.lean

tactic: erw [totalDegree, Finset.sup_eq_bot_iff] at hp
state_before: σ : Type u_1
τ : Type ?u.128781
R : Type u_2
S : Type ?u.128787
inst✝ : CommSemiring R
p : MvPolynomial σ R
hp : totalDegree p = 0
⊢ IsHomogeneous p 0

tactic: simp_rw [mem_support_iff] at hp
state_before: σ : Type u_1
τ : Type ?u.128781
R : Type u_2
S : Type ?u.128787
inst✝ : CommSemiring R
p : MvPolynomial σ R
hp : ∀ (s : σ →₀ ℕ), s ∈ support p → (Finsupp.sum s fun x e => e) = ⊥
⊢ IsHomogeneous p 0

tactic: exact hp
state_before: σ : Type u_1
τ : Type ?u.128781
R : Type u_2
S : Type ?u.128787
inst✝ : CommSemiring R
p : MvPolynomial σ R
hp : ∀ (s : σ →₀ ℕ), coeff s p ≠ 0 → (Finsupp.sum s fun x e => e) = ⊥
⊢ IsHomogeneous p 0
Theorem: Polynomial.modByMonic_one
File: Mathlib/Data/Polynomial/Div.lean

tactic: convert monic_one (R:=R)
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
⊢ Monic 1
Theorem: closure_diff_frontier
File: Mathlib/Topology/Basic.lean

tactic: rw [frontier, diff_diff_right_self, inter_eq_self_of_subset_right interior_subset_closure]
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
⊢ closure s \ frontier s = interior s
Theorem: Ordnode.Valid'.rotateL_lemma₃
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: linarith
state_before: α : Type ?u.311144
inst✝ : Preorder α
a b c : ℕ
H2 : 3 * a ≤ b + c
h : b < 2 * c
⊢ a + b < 3 * c
Theorem: TopologicalSpace.IsTopologicalBasis.inducing
File: Mathlib/Topology/Bases.lean

tactic: refine' isTopologicalBasis_of_open_of_nhds _ _
state_before: α : Type u
t : TopologicalSpace α
β : Type u_1
inst✝ : TopologicalSpace β
f : α → β
T : Set (Set β)
hf : Inducing f
h : IsTopologicalBasis T
⊢ IsTopologicalBasis (preimage f '' T)

tactic: rintro _ ⟨V, hV, rfl⟩
state_before: case refine'_1
α : Type u
t : TopologicalSpace α
β : Type u_1
inst✝ : TopologicalSpace β
f : α → β
T : Set (Set β)
hf : Inducing f
h : IsTopologicalBasis T
⊢ ∀ (u : Set α), u ∈ preimage f '' T → IsOpen u

tactic: rw [hf.isOpen_iff]
state_before: case refine'_1.intro.intro
α : Type u
t : TopologicalSpace α
β : Type u_1
inst✝ : TopologicalSpace β
f : α → β
T : Set (Set β)
hf : Inducing f
h : IsTopologicalBasis T
V : Set β
hV : V ∈ T
⊢ IsOpen (f ⁻¹' V)

tactic: refine' ⟨V, h.isOpen hV, rfl⟩
state_before: case refine'_1.intro.intro
α : Type u
t : TopologicalSpace α
β : Type u_1
inst✝ : TopologicalSpace β
f : α → β
T : Set (Set β)
hf : Inducing f
h : IsTopologicalBasis T
V : Set β
hV : V ∈ T
⊢ ∃ t, IsOpen t ∧ f ⁻¹' t = f ⁻¹' V

tactic: intro a U ha hU
state_before: case refine'_2
α : Type u
t : TopologicalSpace α
β : Type u_1
inst✝ : TopologicalSpace β
f : α → β
T : Set (Set β)
hf : Inducing f
h : IsTopologicalBasis T
⊢ ∀ (a : α) (u : Set α), a ∈ u → IsOpen u → ∃ v, v ∈ preimage f '' T ∧ a ∈ v ∧ v ⊆ u

tactic: rw [hf.isOpen_iff] at hU
state_before: case refine'_2
α : Type u
t : TopologicalSpace α
β : Type u_1
inst✝ : TopologicalSpace β
f : α → β
T : Set (Set β)
hf : Inducing f
h : IsTopologicalBasis T
a : α
U : Set α
ha : a ∈ U
hU : IsOpen U
⊢ ∃ v, v ∈ preimage f '' T ∧ a ∈ v ∧ v ⊆ U

tactic: obtain ⟨V, hV, rfl⟩ := hU
state_before: case refine'_2
α : Type u
t : TopologicalSpace α
β : Type u_1
inst✝ : TopologicalSpace β
f : α → β
T : Set (Set β)
hf : Inducing f
h : IsTopologicalBasis T
a : α
U : Set α
ha : a ∈ U
hU : ∃ t, IsOpen t ∧ f ⁻¹' t = U
⊢ ∃ v, v ∈ preimage f '' T ∧ a ∈ v ∧ v ⊆ U

tactic: obtain ⟨S, hS, rfl⟩ := h.open_eq_sUnion hV
state_before: case refine'_2.intro.intro
α : Type u
t : TopologicalSpace α
β : Type u_1
inst✝ : TopologicalSpace β
f : α → β
T : Set (Set β)
hf : Inducing f
h : IsTopologicalBasis T
a : α
V : Set β
hV : IsOpen V
ha : a ∈ f ⁻¹' V
⊢ ∃ v, v ∈ preimage f '' T ∧ a ∈ v ∧ v ⊆ f ⁻¹' V

tactic: obtain ⟨W, hW, ha⟩ := ha
state_before: case refine'_2.intro.intro.intro.intro
α : Type u
t : TopologicalSpace α
β : Type u_1
inst✝ : TopologicalSpace β
f : α → β
T : Set (Set β)
hf : Inducing f
h : IsTopologicalBasis T
a : α
S : Set (Set β)
hS : S ⊆ T
hV : IsOpen (⋃₀ S)
ha : a ∈ f ⁻¹' ⋃₀ S
⊢ ∃ v, v ∈ preimage f '' T ∧ a ∈ v ∧ v ⊆ f ⁻¹' ⋃₀ S

tactic: refine' ⟨f ⁻¹' W, ⟨_, hS hW, rfl⟩, ha, Set.preimage_mono <| Set.subset_sUnion_of_mem hW⟩
state_before: case refine'_2.intro.intro.intro.intro.intro.intro
α : Type u
t : TopologicalSpace α
β : Type u_1
inst✝ : TopologicalSpace β
f : α → β
T : Set (Set β)
hf : Inducing f
h : IsTopologicalBasis T
a : α
S : Set (Set β)
hS : S ⊆ T
hV : IsOpen (⋃₀ S)
W : Set β
hW : W ∈ S
ha : f a ∈ W
⊢ ∃ v, v ∈ preimage f '' T ∧ a ∈ v ∧ v ⊆ f ⁻¹' ⋃₀ S
Theorem: bernoulli'_spec
File: Mathlib/NumberTheory/Bernoulli.lean

tactic: rw [sum_range_succ_comm, bernoulli'_def n, tsub_self, choose_zero_right, sub_self, zero_add,
  div_one, cast_one, one_mul, sub_add, ← sum_sub_distrib, ← sub_eq_zero, sub_sub_cancel_left,
  neg_eq_zero]
state_before: A : Type ?u.176715
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∑ k in range (succ n), ↑(Nat.choose n (n - k)) / (↑n - ↑k + 1) * bernoulli' k = 1

tactic: exact Finset.sum_eq_zero (fun x hx => by rw [choose_symm (le_of_lt (mem_range.1 hx)), sub_self])
state_before: A : Type ?u.176715
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∑ x in range n,
      (↑(Nat.choose n x) / (↑n - ↑x + 1) * bernoulli' x - ↑(Nat.choose n (n - x)) / (↑n - ↑x + 1) * bernoulli' x) =
    0

tactic: rw [choose_symm (le_of_lt (mem_range.1 hx)), sub_self]
state_before: A : Type ?u.176715
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n x : ℕ
hx : x ∈ range n
⊢ ↑(Nat.choose n x) / (↑n - ↑x + 1) * bernoulli' x - ↑(Nat.choose n (n - x)) / (↑n - ↑x + 1) * bernoulli' x = 0
Theorem: Basis.total_coord
File: Mathlib/LinearAlgebra/Dual.lean

tactic: haveI := Classical.decEq ι
state_before: R : Type u
M : Type v
K : Type u₁
V : Type u₂
ι : Type w
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : _root_.Finite ι
b : Basis ι R M
f : ι →₀ R
i : ι
⊢ ↑(↑(Finsupp.total ι (Dual R M) R (coord b)) f) (↑b i) = ↑f i

tactic: rw [← coe_dualBasis, total_dualBasis]
state_before: R : Type u
M : Type v
K : Type u₁
V : Type u₂
ι : Type w
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : _root_.Finite ι
b : Basis ι R M
f : ι →₀ R
i : ι
this : DecidableEq ι
⊢ ↑(↑(Finsupp.total ι (Dual R M) R (coord b)) f) (↑b i) = ↑f i
Theorem: CauSeq.neg_limZero
File: Mathlib/Data/Real/CauSeq.lean

tactic: rw [← neg_one_mul f]
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f : CauSeq β abv
hf : LimZero f
⊢ LimZero (-f)

tactic: exact mul_limZero_right _ hf
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f : CauSeq β abv
hf : LimZero f
⊢ LimZero (-1 * f)
Theorem: List.map_subset_iff
File: Mathlib/Data/List/Basic.lean

tactic: refine' ⟨_, map_subset f⟩
state_before: ι : Type ?u.9936
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂✝ l₁ l₂ : List α
f : α → β
h : Injective f
⊢ map f l₁ ⊆ map f l₂ ↔ l₁ ⊆ l₂

tactic: intro h2 x hx
state_before: ι : Type ?u.9936
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂✝ l₁ l₂ : List α
f : α → β
h : Injective f
⊢ map f l₁ ⊆ map f l₂ → l₁ ⊆ l₂

tactic: rcases mem_map.1 (h2 (mem_map_of_mem f hx)) with ⟨x', hx', hxx'⟩
state_before: ι : Type ?u.9936
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂✝ l₁ l₂ : List α
f : α → β
h : Injective f
h2 : map f l₁ ⊆ map f l₂
x : α
hx : x ∈ l₁
⊢ x ∈ l₂

tactic: cases h hxx'
state_before: case intro.intro
ι : Type ?u.9936
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂✝ l₁ l₂ : List α
f : α → β
h : Injective f
h2 : map f l₁ ⊆ map f l₂
x : α
hx : x ∈ l₁
x' : α
hx' : x' ∈ l₂
hxx' : f x' = f x
⊢ x ∈ l₂

tactic: exact hx'
state_before: case intro.intro.refl
ι : Type ?u.9936
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂✝ l₁ l₂ : List α
f : α → β
h : Injective f
h2 : map f l₁ ⊆ map f l₂
x : α
hx : x ∈ l₁
hx' : x ∈ l₂
hxx' : f x = f x
⊢ x ∈ l₂
Theorem: Equiv.Perm.Disjoint.commute
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: simp [mul_apply, hf, hg]
state_before: α : Type u_1
f g h✝ : Perm α
h : Disjoint f g
x : α
hf : ↑f x = x
hg : ↑f (↑g x) = ↑g x
⊢ ↑(f * g) x = ↑(g * f) x

tactic: simp [mul_apply, hf, g.injective hg]
state_before: α : Type u_1
f g h✝ : Perm α
h : Disjoint f g
x : α
hf : ↑f x = x
hg : ↑g (↑g x) = ↑g x
⊢ ↑(f * g) x = ↑(g * f) x

tactic: simp [mul_apply, f.injective hf, hg]
state_before: α : Type u_1
f g h✝ : Perm α
h : Disjoint f g
x : α
hg : ↑g x = x
hf : ↑f (↑f x) = ↑f x
⊢ ↑(f * g) x = ↑(g * f) x

tactic: simp [mul_apply, hf, hg]
state_before: α : Type u_1
f g h✝ : Perm α
h : Disjoint f g
x : α
hg : ↑g x = x
hf : ↑g (↑f x) = ↑f x
⊢ ↑(f * g) x = ↑(g * f) x
Theorem: Nat.dvd_of_mem_factorization
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: rcases eq_or_ne n 0 with (rfl | hn)
state_before: n p : ℕ
h : p ∈ (factorization n).support
⊢ p ∣ n

tactic: simp [← mem_factors_iff_dvd hn (prime_of_mem_factorization h), factor_iff_mem_factorization.mp h]
state_before: case inr
n p : ℕ
h : p ∈ (factorization n).support
hn : n ≠ 0
⊢ p ∣ n

tactic: simp
state_before: case inl
p : ℕ
h : p ∈ (factorization 0).support
⊢ p ∣ 0
Theorem: HolderOnWith.uniformContinuousOn
File: Mathlib/Topology/MetricSpace/Holder.lean

tactic: refine' EMetric.uniformContinuousOn_iff.2 fun ε εpos => _
state_before: X : Type u_1
Y : Type u_2
Z : Type ?u.259336
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
C r : ℝ≥0
f : X → Y
s t : Set X
hf : HolderOnWith C r f s
h0 : 0 < r
⊢ UniformContinuousOn f s

tactic: have : Tendsto (fun d : ℝ≥0∞ => (C : ℝ≥0∞) * d ^ (r : ℝ)) (𝓝 0) (𝓝 0) :=
  ENNReal.tendsto_const_mul_rpow_nhds_zero_of_pos ENNReal.coe_ne_top h0
state_before: X : Type u_1
Y : Type u_2
Z : Type ?u.259336
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
C r : ℝ≥0
f : X → Y
s t : Set X
hf : HolderOnWith C r f s
h0 : 0 < r
ε : ℝ≥0∞
εpos : ε > 0
⊢ ∃ δ, δ > 0 ∧ ∀ {a : X}, a ∈ s → ∀ {b : X}, b ∈ s → edist a b < δ → edist (f a) (f b) < ε

tactic: rcases ENNReal.nhds_zero_basis.mem_iff.1 (this (gt_mem_nhds εpos)) with ⟨δ, δ0, H⟩
state_before: X : Type u_1
Y : Type u_2
Z : Type ?u.259336
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
C r : ℝ≥0
f : X → Y
s t : Set X
hf : HolderOnWith C r f s
h0 : 0 < r
ε : ℝ≥0∞
εpos : ε > 0
this : Tendsto (fun d => ↑C * d ^ ↑r) (𝓝 0) (𝓝 0)
⊢ ∃ δ, δ > 0 ∧ ∀ {a : X}, a ∈ s → ∀ {b : X}, b ∈ s → edist a b < δ → edist (f a) (f b) < ε

tactic: exact ⟨δ, δ0, fun hx y hy h => (hf.edist_le hx hy).trans_lt (H h)⟩
state_before: case intro.intro
X : Type u_1
Y : Type u_2
Z : Type ?u.259336
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
C r : ℝ≥0
f : X → Y
s t : Set X
hf : HolderOnWith C r f s
h0 : 0 < r
ε : ℝ≥0∞
εpos : ε > 0
this : Tendsto (fun d => ↑C * d ^ ↑r) (𝓝 0) (𝓝 0)
δ : ℝ≥0∞
δ0 : 0 < δ
H : Iio δ ⊆ (fun d => ↑C * d ^ ↑r) ⁻¹' {x | (fun x => x < ε) x}
⊢ ∃ δ, δ > 0 ∧ ∀ {a : X}, a ∈ s → ∀ {b : X}, b ∈ s → edist a b < δ → edist (f a) (f b) < ε
Theorem: Subfield.zpow_mem
File: Mathlib/FieldTheory/Subfield.lean

tactic: cases n
state_before: K : Type u
L : Type v
M : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field M
s t : Subfield K
x : K
hx : x ∈ s
n : ℤ
⊢ x ^ n ∈ s

tactic: simpa using s.pow_mem hx _
state_before: case ofNat
K : Type u
L : Type v
M : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field M
s t : Subfield K
x : K
hx : x ∈ s
a✝ : ℕ
⊢ x ^ Int.ofNat a✝ ∈ s

tactic: simpa [pow_succ] using s.inv_mem (s.mul_mem hx (s.pow_mem hx _))
state_before: case negSucc
K : Type u
L : Type v
M : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field M
s t : Subfield K
x : K
hx : x ∈ s
a✝ : ℕ
⊢ x ^ Int.negSucc a✝ ∈ s