ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Real.continuousAt_tan
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/ArctanDeriv.lean

Proof steps:
state_before: x : ℝ
⊢ ContinuousAt tan x ↔ cos x ≠ 0
state_after: x : ℝ
hc : ContinuousAt tan x
h₀ : cos x = 0
⊢ False
tactic: refine ⟨fun hc h₀ => ?_, fun h => (hasDerivAt_tan h).continuousAt⟩
state_before: x : ℝ
hc : ContinuousAt tan x
h₀ : cos x = 0
⊢ False
state_after: no goals
tactic: exact not_tendsto_nhds_of_tendsto_atTop (tendsto_abs_tan_of_cos_eq_zero h₀) _
    (hc.norm.tendsto.mono_left inf_le_left)
Theorem: Multiset.equivDFinsupp_apply
File: Mathlib/Data/DFinsupp/Multiset.lean

Proof steps:
state_before: α : Type u_1
β : α → Type u_2
inst✝ : DecidableEq α
s t : Multiset α
⊢ DFinsupp.toMultiset.comp toDFinsupp = AddMonoidHom.id (Multiset α)
state_after: case h.a
α : Type u_1
β : α → Type u_2
inst✝ : DecidableEq α
s t : Multiset α
x✝ a✝ : α
⊢ count a✝ ((DFinsupp.toMultiset.comp toDFinsupp) {x✝}) = count a✝ ((AddMonoidHom.id (Multiset α)) {x✝})
tactic: ext
state_before: case h.a
α : Type u_1
β : α → Type u_2
inst✝ : DecidableEq α
s t : Multiset α
x✝ a✝ : α
⊢ count a✝ ((DFinsupp.toMultiset.comp toDFinsupp) {x✝}) = count a✝ ((AddMonoidHom.id (Multiset α)) {x✝})
state_after: no goals
tactic: simp
state_before: α : Type u_1
β : α → Type u_2
inst✝ : DecidableEq α
s t : Multiset α
⊢ toDFinsupp.comp DFinsupp.toMultiset = AddMonoidHom.id (Π₀ (x : α), ℕ)
state_after: case H.a.h
α : Type u_1
β : α → Type u_2
inst✝ : DecidableEq α
s t : Multiset α
x✝ i✝ : α
⊢ (((toDFinsupp.comp DFinsupp.toMultiset).comp (DFinsupp.singleAddHom (fun i => ℕ) x✝)) 1) i✝ =
    (((AddMonoidHom.id (Π₀ (x : α), ℕ)).comp (DFinsupp.singleAddHom (fun i => ℕ) x✝)) 1) i✝
tactic: ext
state_before: case H.a.h
α : Type u_1
β : α → Type u_2
inst✝ : DecidableEq α
s t : Multiset α
x✝ i✝ : α
⊢ (((toDFinsupp.comp DFinsupp.toMultiset).comp (DFinsupp.singleAddHom (fun i => ℕ) x✝)) 1) i✝ =
    (((AddMonoidHom.id (Π₀ (x : α), ℕ)).comp (DFinsupp.singleAddHom (fun i => ℕ) x✝)) 1) i✝
state_after: no goals
tactic: simp
Theorem: Function.Injective.isOfFinAddOrder_iff
File: Mathlib/GroupTheory/OrderOfElement.lean

Proof steps:
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : Monoid G
a b x y : G
n m : ℕ
inst✝ : Monoid H
f : G →* H
hf : Injective ⇑f
⊢ IsOfFinOrder (f x) ↔ IsOfFinOrder x
state_after: no goals
tactic: rw [← orderOf_pos_iff, orderOf_injective f hf x, ← orderOf_pos_iff]
Theorem: Finset.sup'_cons
File: Mathlib/Data/Finset/Lattice.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : SemilatticeSup α
s : Finset β
H : s.Nonempty
f : β → α
b : β
hb : b ∉ s
⊢ (cons b s hb).sup' ⋯ f = f b ⊔ s.sup' H f
state_after: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : SemilatticeSup α
s : Finset β
H : s.Nonempty
f : β → α
b : β
hb : b ∉ s
⊢ ↑((cons b s hb).sup' ⋯ f) = ↑(f b ⊔ s.sup' H f)
tactic: rw [← WithBot.coe_eq_coe]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : SemilatticeSup α
s : Finset β
H : s.Nonempty
f : β → α
b : β
hb : b ∉ s
⊢ ↑((cons b s hb).sup' ⋯ f) = ↑(f b ⊔ s.sup' H f)
state_after: no goals
tactic: simp [WithBot.coe_sup]
Theorem: Nat.Ioc_filter_modEq_card
File: Mathlib/Data/Int/CardIntervalMod.lean

Proof steps:
state_before: a b r : ℕ
hr : 0 < r
v : ℕ
⊢ ↑(filter (fun x => x ≡ v [MOD r]) (Ioc a b)).card = max (⌊(↑b - ↑v) / ↑r⌋ - ⌊(↑a - ↑v) / ↑r⌋) 0
state_after: no goals
tactic: simp_rw [← Ioc_filter_modEq_cast _ _ ▸ card_map _,
    Int.Ioc_filter_modEq_card _ _ (cast_lt.mpr hr), Int.cast_natCast]
Theorem: RingQuot.ringQuot_ext'
File: Mathlib/Algebra/RingQuot.lean

Proof steps:
state_before: R : Type uR
inst✝⁶ : Semiring R
S : Type uS
inst✝⁵ : CommSemiring S
T : Type uT
A : Type uA
inst✝⁴ : Semiring A
inst✝³ : Algebra S A
r : R → R → Prop
inst✝² : Semiring T
B : Type u₄
inst✝¹ : Semiring B
inst✝ : Algebra S B
s : A → A → Prop
f g : RingQuot s →ₐ[S] B
w : f.comp (mkAlgHom S s) = g.comp (mkAlgHom S s)
⊢ f = g
state_after: case H
R : Type uR
inst✝⁶ : Semiring R
S : Type uS
inst✝⁵ : CommSemiring S
T : Type uT
A : Type uA
inst✝⁴ : Semiring A
inst✝³ : Algebra S A
r : R → R → Prop
inst✝² : Semiring T
B : Type u₄
inst✝¹ : Semiring B
inst✝ : Algebra S B
s : A → A → Prop
f g : RingQuot s →ₐ[S] B
w : f.comp (mkAlgHom S s) = g.comp (mkAlgHom S s)
x : RingQuot s
⊢ f x = g x
tactic: ext x
state_before: case H
R : Type uR
inst✝⁶ : Semiring R
S : Type uS
inst✝⁵ : CommSemiring S
T : Type uT
A : Type uA
inst✝⁴ : Semiring A
inst✝³ : Algebra S A
r : R → R → Prop
inst✝² : Semiring T
B : Type u₄
inst✝¹ : Semiring B
inst✝ : Algebra S B
s : A → A → Prop
f g : RingQuot s →ₐ[S] B
w : f.comp (mkAlgHom S s) = g.comp (mkAlgHom S s)
x : RingQuot s
⊢ f x = g x
state_after: case H.intro
R : Type uR
inst✝⁶ : Semiring R
S : Type uS
inst✝⁵ : CommSemiring S
T : Type uT
A : Type uA
inst✝⁴ : Semiring A
inst✝³ : Algebra S A
r : R → R → Prop
inst✝² : Semiring T
B : Type u₄
inst✝¹ : Semiring B
inst✝ : Algebra S B
s : A → A → Prop
f g : RingQuot s →ₐ[S] B
w : f.comp (mkAlgHom S s) = g.comp (mkAlgHom S s)
x : A
⊢ f ((mkAlgHom S s) x) = g ((mkAlgHom S s) x)
tactic: rcases mkAlgHom_surjective S s x with ⟨x, rfl⟩
state_before: case H.intro
R : Type uR
inst✝⁶ : Semiring R
S : Type uS
inst✝⁵ : CommSemiring S
T : Type uT
A : Type uA
inst✝⁴ : Semiring A
inst✝³ : Algebra S A
r : R → R → Prop
inst✝² : Semiring T
B : Type u₄
inst✝¹ : Semiring B
inst✝ : Algebra S B
s : A → A → Prop
f g : RingQuot s →ₐ[S] B
w : f.comp (mkAlgHom S s) = g.comp (mkAlgHom S s)
x : A
⊢ f ((mkAlgHom S s) x) = g ((mkAlgHom S s) x)
state_after: no goals
tactic: exact AlgHom.congr_fun w x
Theorem: MeasureTheory.IsStoppingTime.measurableSpace_mono
File: Mathlib/Probability/Process/Stopping.lean

Proof steps:
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
hle : τ ≤ π
⊢ hτ.measurableSpace ≤ hπ.measurableSpace
state_after: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
hle : τ ≤ π
s : Set Ω
hs : MeasurableSet s
i : ι
⊢ MeasurableSet (s ∩ {ω | π ω ≤ i})
tactic: intro s hs i
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
hle : τ ≤ π
s : Set Ω
hs : MeasurableSet s
i : ι
⊢ MeasurableSet (s ∩ {ω | π ω ≤ i})
state_after: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
hle : τ ≤ π
s : Set Ω
hs : MeasurableSet s
i : ι
⊢ MeasurableSet (s ∩ {ω | τ ω ≤ i} ∩ {ω | π ω ≤ i})

Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
hle : τ ≤ π
s : Set Ω
hs : MeasurableSet s
i : ι
⊢ s ∩ {ω | π ω ≤ i} = s ∩ {ω | τ ω ≤ i} ∩ {ω | π ω ≤ i}
tactic: rw [(_ : s ∩ {ω | π ω ≤ i} = s ∩ {ω | τ ω ≤ i} ∩ {ω | π ω ≤ i})]
Theorem: Matrix.toMvPolynomial_one
File: Mathlib/Algebra/Module/LinearMap/Polynomial.lean

Proof steps:
state_before: m : Type u_1
n : Type u_2
o : Type u_3
R : Type u_4
S : Type u_5
inst✝⁴ : Fintype n
inst✝³ : Fintype o
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : DecidableEq n
⊢ toMvPolynomial 1 = X
state_after: case h
m : Type u_1
n : Type u_2
o : Type u_3
R : Type u_4
S : Type u_5
inst✝⁴ : Fintype n
inst✝³ : Fintype o
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : DecidableEq n
i : n
⊢ toMvPolynomial 1 i = X i
tactic: ext i : 1
state_before: case h
m : Type u_1
n : Type u_2
o : Type u_3
R : Type u_4
S : Type u_5
inst✝⁴ : Fintype n
inst✝³ : Fintype o
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : DecidableEq n
i : n
⊢ toMvPolynomial 1 i = X i
state_after: case h
m : Type u_1
n : Type u_2
o : Type u_3
R : Type u_4
S : Type u_5
inst✝⁴ : Fintype n
inst✝³ : Fintype o
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : DecidableEq n
i : n
⊢ (monomial (Finsupp.single i 1)) (1 i i) = X i

case h.h₀
m : Type u_1
n : Type u_2
o : Type u_3
R : Type u_4
S : Type u_5
inst✝⁴ : Fintype n
inst✝³ : Fintype o
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : DecidableEq n
i : n
⊢ ∀ b ∈ Finset.univ, b ≠ i → (monomial (Finsupp.single b 1)) (1 i b) = 0

case h.h₁
m : Type u_1
n : Type u_2
o : Type u_3
R : Type u_4
S : Type u_5
inst✝⁴ : Fintype n
inst✝³ : Fintype o
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : DecidableEq n
i : n
⊢ i ∉ Finset.univ → (monomial (Finsupp.single i 1)) (1 i i) = 0
tactic: rw [toMvPolynomial, Finset.sum_eq_single i]
Theorem: Int.gcd_dvd_iff
File: Mathlib/Data/Int/GCD.lean

Proof steps:
state_before: a b : ℤ
n : ℕ
⊢ a.gcd b ∣ n ↔ ∃ x y, ↑n = a * x + b * y
state_after: case mp
a b : ℤ
n : ℕ
⊢ a.gcd b ∣ n → ∃ x y, ↑n = a * x + b * y

case mpr
a b : ℤ
n : ℕ
⊢ (∃ x y, ↑n = a * x + b * y) → a.gcd b ∣ n
tactic: constructor
Theorem: Function.Surjective.connectedSpace
File: Mathlib/Topology/Connected/Basic.lean

Proof steps:
state_before: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝² : TopologicalSpace α
s t u v : Set α
inst✝¹ : ConnectedSpace α
inst✝ : TopologicalSpace β
f : α → β
hf : Surjective f
hf' : Continuous f
⊢ ConnectedSpace β
state_after: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝² : TopologicalSpace α
s t u v : Set α
inst✝¹ : ConnectedSpace α
inst✝ : TopologicalSpace β
f : α → β
hf : Surjective f
hf' : Continuous f
⊢ IsConnected (range f)
tactic: rw [connectedSpace_iff_univ, ← hf.range_eq]
state_before: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝² : TopologicalSpace α
s t u v : Set α
inst✝¹ : ConnectedSpace α
inst✝ : TopologicalSpace β
f : α → β
hf : Surjective f
hf' : Continuous f
⊢ IsConnected (range f)
state_after: no goals
tactic: exact isConnected_range hf'
Theorem: legendreSym.quadratic_reciprocity_one_mod_four
File: Mathlib/NumberTheory/LegendreSymbol/QuadraticReciprocity.lean

Proof steps:
state_before: p q : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : Fact (Nat.Prime q)
hp : p % 4 = 1
hq : q ≠ 2
⊢ legendreSym q ↑p = legendreSym p ↑q
state_after: no goals
tactic: rw [quadratic_reciprocity' (Prime.mod_two_eq_one_iff_ne_two.mp (odd_of_mod_four_eq_one hp)) hq,
    pow_mul, neg_one_pow_div_two_of_one_mod_four hp, one_pow, one_mul]
Theorem: ContinuousOn.preimage_interior_subset_interior_preimage
File: Mathlib/Topology/ContinuousOn.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : TopologicalSpace α
ι : Type u_5
π : ι → Type u_6
inst✝³ : (i : ι) → TopologicalSpace (π i)
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → β
s : Set α
t : Set β
hf : ContinuousOn f s
hs : IsOpen s
⊢ interior (s ∩ f ⁻¹' t) = s ∩ interior (f ⁻¹' t)
state_after: no goals
tactic: rw [interior_inter, hs.interior_eq]
Theorem: Set.finite_diff_iUnion_Ioo'
File: Mathlib/Data/Set/Finite.lean

Proof steps:
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
inst✝ : LinearOrder α
s✝ s : Set α
⊢ (s \ ⋃ x, Ioo ↑x.1 ↑x.2).Finite
state_after: no goals
tactic: simpa only [iUnion, iSup_prod, iSup_subtype] using s.finite_diff_iUnion_Ioo
Theorem: PartialHomeomorph.restrContDiff_apply
File: Mathlib/Analysis/Calculus/ContDiff/Basic.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
D : Type uD
inst✝⁹ : NormedAddCommGroup D
inst✝⁸ : NormedSpace 𝕜 D
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type u_2
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f✝ f₁ : E → F
g : F → G
x✝ x₀ : E
c : F
b : E × F → G
m n✝ : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
f : PartialHomeomorph E F
n : ℕ
x : E
hx : x ∈ f.source
⊢ ↑f x ∈ {y | ContDiffAt 𝕜 (↑n) (↑f.symm) y ∧ ContDiffAt 𝕜 (↑n) (↑f) (↑f.symm y)} ↔
    x ∈ {x | ContDiffAt 𝕜 (↑n) (↑f) x ∧ ContDiffAt 𝕜 (↑n) (↑f.symm) (↑f x)}
state_after: no goals
tactic: simp [hx, and_comm]
Theorem: Zspan.fract_eq_self
File: Mathlib/Algebra/Module/Zlattice/Basic.lean

Proof steps:
state_before: E : Type u_1
ι : Type u_2
K : Type u_3
inst✝⁴ : NormedLinearOrderedField K
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace K E
b : Basis ι K E
inst✝¹ : FloorRing K
inst✝ : Fintype ι
x : E
⊢ fract b x = x ↔ x ∈ fundamentalDomain b
state_after: no goals
tactic: classical simp only [Basis.ext_elem_iff b, repr_fract_apply, Int.fract_eq_self,
    mem_fundamentalDomain, Set.mem_Ico]
Theorem: TypeVec.subtypeVal_toSubtype
File: Mathlib/Data/TypeVec.lean

Proof steps:
state_before: n : ℕ
α : TypeVec.{u_1} n
p : α ⟹ repeat n Prop
⊢ subtypeVal p ⊚ toSubtype p = fun x => Subtype.val
state_after: case a.h
n : ℕ
α : TypeVec.{u_1} n
p : α ⟹ repeat n Prop
i : Fin2 n
x : (fun i => { x // ofRepeat (p i x) }) i
⊢ (subtypeVal p ⊚ toSubtype p) i x = ↑x
tactic: ext i x
state_before: case a.h
n : ℕ
α : TypeVec.{u_1} n
p : α ⟹ repeat n Prop
i : Fin2 n
x : (fun i => { x // ofRepeat (p i x) }) i
⊢ (subtypeVal p ⊚ toSubtype p) i x = ↑x
state_after: case a.h.fs
n n✝ : ℕ
a✝ : Fin2 n✝
a_ih✝ :
  ∀ {α : TypeVec.{u_1} n✝} (p : α ⟹ repeat n✝ Prop) (x : { x // ofRepeat (p a✝ x) }),
    subtypeVal p a✝ (toSubtype p a✝ x) = ↑x
α : TypeVec.{u_1} (n✝ + 1)
p : α ⟹ repeat (n✝ + 1) Prop
x : { x // ofRepeat (p a✝.fs x) }
⊢ subtypeVal (dropFun p) a✝ (toSubtype (dropFun p) a✝ x) = ↑x
tactic: induction i <;> dsimp only [toSubtype, comp, subtypeVal] at *
state_before: case a.h.fs
n n✝ : ℕ
a✝ : Fin2 n✝
a_ih✝ :
  ∀ {α : TypeVec.{u_1} n✝} (p : α ⟹ repeat n✝ Prop) (x : { x // ofRepeat (p a✝ x) }),
    subtypeVal p a✝ (toSubtype p a✝ x) = ↑x
α : TypeVec.{u_1} (n✝ + 1)
p : α ⟹ repeat (n✝ + 1) Prop
x : { x // ofRepeat (p a✝.fs x) }
⊢ subtypeVal (dropFun p) a✝ (toSubtype (dropFun p) a✝ x) = ↑x
state_after: no goals
tactic: simp [*]
Theorem: Nat.eq_of_dvd_of_div_eq_one
File: Mathlib/Data/Nat/Defs.lean

Proof steps:
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
hab : a ∣ b
h : b / a = 1
⊢ a = b
state_after: no goals
tactic: rw [← Nat.div_mul_cancel hab, h, Nat.one_mul]
Theorem: Basis.coe_toDual_self
File: Mathlib/LinearAlgebra/Dual.lean

Proof steps:
state_before: R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι : Type uι
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : DecidableEq ι
b : Basis ι R M
i : ι
⊢ b.toDual (b i) = b.coord i
state_after: case h
R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι : Type uι
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : DecidableEq ι
b : Basis ι R M
i : ι
x✝ : M
⊢ (b.toDual (b i)) x✝ = (b.coord i) x✝
tactic: ext
state_before: case h
R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι : Type uι
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : DecidableEq ι
b : Basis ι R M
i : ι
x✝ : M
⊢ (b.toDual (b i)) x✝ = (b.coord i) x✝
state_after: no goals
tactic: apply toDual_apply_right
Theorem: span_eq_iUnion_nat
File: Mathlib/LinearAlgebra/Finsupp.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Set M
⊢ ↑(span R s) = ⋃ n, (fun f => ∑ i : Fin n, (f i).1 • (f i).2) '' {f | ∀ (i : Fin n), (f i).2 ∈ s}
state_after: case h
R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Set M
m : M
⊢ m ∈ ↑(span R s) ↔ m ∈ ⋃ n, (fun f => ∑ i : Fin n, (f i).1 • (f i).2) '' {f | ∀ (i : Fin n), (f i).2 ∈ s}
tactic: ext m
state_before: case h
R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Set M
m : M
⊢ m ∈ ↑(span R s) ↔ m ∈ ⋃ n, (fun f => ∑ i : Fin n, (f i).1 • (f i).2) '' {f | ∀ (i : Fin n), (f i).2 ∈ s}
state_after: case h
R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Set M
m : M
⊢ (∃ n f g, ∑ i : Fin n, f i • ↑(g i) = m) ↔ ∃ i x, (∀ (i : Fin i), (x i).2 ∈ s) ∧ ∑ i : Fin i, (x i).1 • (x i).2 = m
tactic: simp only [SetLike.mem_coe, mem_iUnion, mem_image, mem_setOf_eq, mem_span_set']
state_before: case h
R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Set M
m : M
⊢ (∃ n f g, ∑ i : Fin n, f i • ↑(g i) = m) ↔ ∃ i x, (∀ (i : Fin i), (x i).2 ∈ s) ∧ ∑ i : Fin i, (x i).1 • (x i).2 = m
state_after: case h.refine_1
R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Set M
m : M
n : ℕ
⊢ (∃ f g, ∑ i : Fin n, f i • ↑(g i) = m) → ∃ x, (∀ (i : Fin n), (x i).2 ∈ s) ∧ ∑ i : Fin n, (x i).1 • (x i).2 = m

case h.refine_2
R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Set M
m : M
n : ℕ
⊢ (∃ x, (∀ (i : Fin n), (x i).2 ∈ s) ∧ ∑ i : Fin n, (x i).1 • (x i).2 = m) → ∃ f g, ∑ i : Fin n, f i • ↑(g i) = m
tactic: refine exists_congr (fun n ↦ ⟨?_, ?_⟩)
Theorem: FintypeCat.toProfinite_map_apply
File: Mathlib/Topology/Category/Profinite/Basic.lean

Proof steps:
state_before: X✝ Y✝ : FintypeCat
f : X✝ ⟶ Y✝
⊢ Continuous f
state_after: no goals
tactic: continuity
Theorem: Levenshtein.impl_length
File: Mathlib/Data/List/EditDistance/Defs.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
inst✝¹ : AddZeroClass δ
inst✝ : Min δ
C : Cost α β δ
x : α
xs : List α
y : β
d✝ : δ
ds : List δ
w✝ : 0 < (d✝ :: ds).length
d : { r // 0 < r.length }
w : d.val.length = xs.length + 1
⊢ (impl C xs y d).val.length = xs.length + 1
state_after: no goals
tactic: induction xs generalizing d with
  | nil => rfl
  | cons x xs ih =>
    dsimp [impl]
    match d, w with
    | ⟨d₁ :: d₂ :: ds, _⟩, w =>
      dsimp
      congr 1
      exact ih ⟨d₂ :: ds, (by simp)⟩ (by simpa using w)
Theorem: Orientation.oangle_smul_left_of_pos
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean

Proof steps:
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
r : ℝ
hr : 0 < r
⊢ o.oangle (r • x) y = o.oangle x y
state_after: no goals
tactic: simp [oangle, Complex.arg_real_mul _ hr]
Theorem: Projectivization.map_comp
File: Mathlib/LinearAlgebra/Projectivization/Basic.lean

Proof steps:
state_before: K : Type u_1
V : Type u_2
inst✝⁹ : DivisionRing K
inst✝⁸ : AddCommGroup V
inst✝⁷ : Module K V
L : Type u_3
W : Type u_4
inst✝⁶ : DivisionRing L
inst✝⁵ : AddCommGroup W
inst✝⁴ : Module L W
F : Type u_5
U : Type u_6
inst✝³ : Field F
inst✝² : AddCommGroup U
inst✝¹ : Module F U
σ : K →+* L
τ : L →+* F
γ : K →+* F
inst✝ : RingHomCompTriple σ τ γ
f : V →ₛₗ[σ] W
hf : Function.Injective ⇑f
g : W →ₛₗ[τ] U
hg : Function.Injective ⇑g
⊢ map (g.comp f) ⋯ = map g hg ∘ map f hf
state_after: case h.mk
K : Type u_1
V : Type u_2
inst✝⁹ : DivisionRing K
inst✝⁸ : AddCommGroup V
inst✝⁷ : Module K V
L : Type u_3
W : Type u_4
inst✝⁶ : DivisionRing L
inst✝⁵ : AddCommGroup W
inst✝⁴ : Module L W
F : Type u_5
U : Type u_6
inst✝³ : Field F
inst✝² : AddCommGroup U
inst✝¹ : Module F U
σ : K →+* L
τ : L →+* F
γ : K →+* F
inst✝ : RingHomCompTriple σ τ γ
f : V →ₛₗ[σ] W
hf : Function.Injective ⇑f
g : W →ₛₗ[τ] U
hg : Function.Injective ⇑g
x✝ : ℙ K V
v : { v // v ≠ 0 }
⊢ map (g.comp f) ⋯ (Quot.mk Setoid.r v) = (map g hg ∘ map f hf) (Quot.mk Setoid.r v)
tactic: ext ⟨v⟩
state_before: case h.mk
K : Type u_1
V : Type u_2
inst✝⁹ : DivisionRing K
inst✝⁸ : AddCommGroup V
inst✝⁷ : Module K V
L : Type u_3
W : Type u_4
inst✝⁶ : DivisionRing L
inst✝⁵ : AddCommGroup W
inst✝⁴ : Module L W
F : Type u_5
U : Type u_6
inst✝³ : Field F
inst✝² : AddCommGroup U
inst✝¹ : Module F U
σ : K →+* L
τ : L →+* F
γ : K →+* F
inst✝ : RingHomCompTriple σ τ γ
f : V →ₛₗ[σ] W
hf : Function.Injective ⇑f
g : W →ₛₗ[τ] U
hg : Function.Injective ⇑g
x✝ : ℙ K V
v : { v // v ≠ 0 }
⊢ map (g.comp f) ⋯ (Quot.mk Setoid.r v) = (map g hg ∘ map f hf) (Quot.mk Setoid.r v)
state_after: no goals
tactic: rfl
Theorem: zsmul_eq_mul
File: Mathlib/Data/Int/Cast/Lemmas.lean

Proof steps:
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝ : NonAssocRing α
a✝ b : α
n✝ : ℤ
a : α
n : ℕ
⊢ ↑n • a = ↑↑n * a
state_after: no goals
tactic: rw [natCast_zsmul, nsmul_eq_mul, Int.cast_natCast]
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝ : NonAssocRing α
a✝ b : α
n✝ : ℤ
a : α
n : ℕ
⊢ -[n+1] • a = ↑-[n+1] * a
state_after: no goals
tactic: simp [Nat.cast_succ, neg_add_rev, Int.cast_negSucc, add_mul]
Theorem: inv_mul_le_iff'
File: Mathlib/Algebra/Order/Field/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
h : 0 < b
⊢ b⁻¹ * a ≤ c ↔ a ≤ c * b
state_after: no goals
tactic: rw [inv_mul_le_iff h, mul_comm]
Theorem: SimpleGraph.ComponentCompl.pairwise_disjoint
File: Mathlib/Combinatorics/SimpleGraph/Ends/Defs.lean

Proof steps:
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
⊢ Pairwise fun C D => Disjoint ↑C ↑D
state_after: V : Type u
G : SimpleGraph V
K L L' M : Set V
C D : G.ComponentCompl K
ne : C ≠ D
⊢ Disjoint ↑C ↑D
tactic: rintro C D ne
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
C D : G.ComponentCompl K
ne : C ≠ D
⊢ Disjoint ↑C ↑D
state_after: V : Type u
G : SimpleGraph V
K L L' M : Set V
C D : G.ComponentCompl K
ne : C ≠ D
⊢ ↑C ∩ ↑D ⊆ ∅
tactic: rw [Set.disjoint_iff]
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
C D : G.ComponentCompl K
ne : C ≠ D
⊢ ↑C ∩ ↑D ⊆ ∅
state_after: no goals
tactic: exact fun u ⟨uC, uD⟩ => ne (uC.choose_spec.symm.trans uD.choose_spec)
Theorem: integral_re_add_im
File: Mathlib/MeasureTheory/Integral/SetIntegral.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : MeasurableSpace X
μ : Measure X
𝕜 : Type u_5
inst✝⁴ : RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
f : X → 𝕜
hf : Integrable f μ
⊢ ↑(∫ (x : X), re (f x) ∂μ) + ↑(∫ (x : X), im (f x) ∂μ) * I = ∫ (x : X), f x ∂μ
state_after: no goals
tactic: rw [← integral_ofReal, ← integral_ofReal, integral_coe_re_add_coe_im hf]
Theorem: Subgroup.mem_closure_pair
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

Proof steps:
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
N : Type u_5
inst✝¹ : Group N
C : Type u_6
inst✝ : CommGroup C
s t : Subgroup C
x✝ x y z : C
⊢ z ∈ closure {x, y} ↔ ∃ m n, x ^ m * y ^ n = z
state_after: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
N : Type u_5
inst✝¹ : Group N
C : Type u_6
inst✝ : CommGroup C
s t : Subgroup C
x✝ x y z : C
⊢ (∃ y_1 ∈ closure {x}, ∃ z_1 ∈ closure {y}, y_1 * z_1 = z) ↔ ∃ m n, x ^ m * y ^ n = z
tactic: rw [← Set.singleton_union, Subgroup.closure_union, mem_sup]
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
N : Type u_5
inst✝¹ : Group N
C : Type u_6
inst✝ : CommGroup C
s t : Subgroup C
x✝ x y z : C
⊢ (∃ y_1 ∈ closure {x}, ∃ z_1 ∈ closure {y}, y_1 * z_1 = z) ↔ ∃ m n, x ^ m * y ^ n = z
state_after: no goals
tactic: simp_rw [mem_closure_singleton, exists_exists_eq_and]