1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: List.unzip_zip
File: Mathlib/Data/List/Zip.lean

tactic: rw [← Prod.mk.eta (p := unzip (zip l₁ l₂)),
  unzip_zip_left (le_of_eq h), unzip_zip_right (ge_of_eq h)]
state_before: α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
ε : Type u_4
l₁ : List α
l₂ : List β
h : l₁.length = l₂.length
⊢ (l₁.zip l₂).unzip = (l₁, l₂)
state_after: no goals
Theorem: AdicCompletion.transitionMap_comp_reduceModIdeal
File: Mathlib/RingTheory/AdicCompletion/Functoriality.lean

tactic: ext x
state_before: R : Type u_1
inst✝⁸ : CommRing R
I : Ideal R
M : Type u_2
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
N : Type u_3
inst✝⁵ : AddCommGroup N
inst✝⁴ : Module R N
P : Type u_4
inst✝³ : AddCommGroup P
inst✝² : Module R P
T : Type u_5
inst✝¹ : AddCommGroup T
inst✝ : Module (AdicCompletion I R) T
f : M →ₗ[R] N
m n : ℕ
hmn : m ≤ n
⊢ transitionMap I N hmn ∘ₗ ↑R (reduceModIdeal (I ^ n) f) = ↑R (reduceModIdeal (I ^ m) f) ∘ₗ transitionMap I M hmn
state_after: case h.h
R : Type u_1
inst✝⁸ : CommRing R
I : Ideal R
M : Type u_2
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
N : Type u_3
inst✝⁵ : AddCommGroup N
inst✝⁴ : Module R N
P : Type u_4
inst✝³ : AddCommGroup P
inst✝² : Module R P
T : Type u_5
inst✝¹ : AddCommGroup T
inst✝ : Module (AdicCompletion I R) T
f : M →ₗ[R] N
m n : ℕ
hmn : m ≤ n
x : M
⊢ ((transitionMap I N hmn ∘ₗ ↑R (reduceModIdeal (I ^ n) f)) ∘ₗ (I ^ n • ⊤).mkQ) x =
    ((↑R (reduceModIdeal (I ^ m) f) ∘ₗ transitionMap I M hmn) ∘ₗ (I ^ n • ⊤).mkQ) x

tactic: simp
state_before: case h.h
R : Type u_1
inst✝⁸ : CommRing R
I : Ideal R
M : Type u_2
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
N : Type u_3
inst✝⁵ : AddCommGroup N
inst✝⁴ : Module R N
P : Type u_4
inst✝³ : AddCommGroup P
inst✝² : Module R P
T : Type u_5
inst✝¹ : AddCommGroup T
inst✝ : Module (AdicCompletion I R) T
f : M →ₗ[R] N
m n : ℕ
hmn : m ≤ n
x : M
⊢ ((transitionMap I N hmn ∘ₗ ↑R (reduceModIdeal (I ^ n) f)) ∘ₗ (I ^ n • ⊤).mkQ) x =
    ((↑R (reduceModIdeal (I ^ m) f) ∘ₗ transitionMap I M hmn) ∘ₗ (I ^ n • ⊤).mkQ) x
state_after: no goals
Theorem: AddCircle.exists_norm_eq_of_isOfFinAddOrder
File: Mathlib/Analysis/Normed/Group/AddCircle.lean

tactic: let n := addOrderOf u
state_before: p : ℝ
hp : Fact (0 < p)
u : AddCircle p
hu : IsOfFinAddOrder u
⊢ ∃ k, ‖u‖ = p * (↑k / ↑(addOrderOf u))
state_after: p : ℝ
hp : Fact (0 < p)
u : AddCircle p
hu : IsOfFinAddOrder u
n : ℕ := addOrderOf u
⊢ ∃ k, ‖u‖ = p * (↑k / ↑(addOrderOf u))

tactic: change ∃ k : ℕ, ‖u‖ = p * (k / n)
state_before: p : ℝ
hp : Fact (0 < p)
u : AddCircle p
hu : IsOfFinAddOrder u
n : ℕ := addOrderOf u
⊢ ∃ k, ‖u‖ = p * (↑k / ↑(addOrderOf u))
state_after: p : ℝ
hp : Fact (0 < p)
u : AddCircle p
hu : IsOfFinAddOrder u
n : ℕ := addOrderOf u
⊢ ∃ k, ‖u‖ = p * (↑k / ↑n)

tactic: obtain ⟨m, -, -, hm⟩ := exists_gcd_eq_one_of_isOfFinAddOrder hu
state_before: p : ℝ
hp : Fact (0 < p)
u : AddCircle p
hu : IsOfFinAddOrder u
n : ℕ := addOrderOf u
⊢ ∃ k, ‖u‖ = p * (↑k / ↑n)
state_after: case intro.intro.intro
p : ℝ
hp : Fact (0 < p)
u : AddCircle p
hu : IsOfFinAddOrder u
n : ℕ := addOrderOf u
m : ℕ
hm : ↑(↑m / ↑(addOrderOf u) * p) = u
⊢ ∃ k, ‖u‖ = p * (↑k / ↑n)

tactic: refine ⟨min (m % n) (n - m % n), ?_⟩
state_before: case intro.intro.intro
p : ℝ
hp : Fact (0 < p)
u : AddCircle p
hu : IsOfFinAddOrder u
n : ℕ := addOrderOf u
m : ℕ
hm : ↑(↑m / ↑(addOrderOf u) * p) = u
⊢ ∃ k, ‖u‖ = p * (↑k / ↑n)
state_after: case intro.intro.intro
p : ℝ
hp : Fact (0 < p)
u : AddCircle p
hu : IsOfFinAddOrder u
n : ℕ := addOrderOf u
m : ℕ
hm : ↑(↑m / ↑(addOrderOf u) * p) = u
⊢ ‖u‖ = p * (↑(min (m % n) (n - m % n)) / ↑n)

tactic: rw [← hm, norm_div_natCast]
state_before: case intro.intro.intro
p : ℝ
hp : Fact (0 < p)
u : AddCircle p
hu : IsOfFinAddOrder u
n : ℕ := addOrderOf u
m : ℕ
hm : ↑(↑m / ↑(addOrderOf u) * p) = u
⊢ ‖u‖ = p * (↑(min (m % n) (n - m % n)) / ↑n)
state_after: no goals
Theorem: PadicInt.norm_eq_of_norm_add_lt_right
File: Mathlib/NumberTheory/Padics/PadicIntegers.lean

tactic: rw [norm_add_eq_max_of_ne hne]
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
z1 z2 : ℤ_[p]
h : ‖z1 + z2‖ < ‖z2‖
hne : ¬‖z1‖ = ‖z2‖
⊢ ‖z1 + z2‖ ≥ ‖z2‖
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
z1 z2 : ℤ_[p]
h : ‖z1 + z2‖ < ‖z2‖
hne : ¬‖z1‖ = ‖z2‖
⊢ max ‖z1‖ ‖z2‖ ≥ ‖z2‖

tactic: apply le_max_right
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
z1 z2 : ℤ_[p]
h : ‖z1 + z2‖ < ‖z2‖
hne : ¬‖z1‖ = ‖z2‖
⊢ max ‖z1‖ ‖z2‖ ≥ ‖z2‖
state_after: no goals
Theorem: Real.add_one_lt_exp
File: Mathlib/Data/Complex/Exponential.lean

tactic: obtain hx | hx := hx.symm.lt_or_lt
state_before: x : ℝ
hx : x ≠ 0
⊢ x + 1 < rexp x
state_after: case inl
x : ℝ
hx✝ : x ≠ 0
hx : 0 < x
⊢ x + 1 < rexp x

case inr
x : ℝ
hx✝ : x ≠ 0
hx : x < 0
⊢ x + 1 < rexp x

tactic: obtain h' | h' := le_or_lt 1 (-x)
state_before: case inr
x : ℝ
hx✝ : x ≠ 0
hx : x < 0
⊢ x + 1 < rexp x
state_after: case inr.inl
x : ℝ
hx✝ : x ≠ 0
hx : x < 0
h' : 1 ≤ -x
⊢ x + 1 < rexp x

case inr.inr
x : ℝ
hx✝ : x ≠ 0
hx : x < 0
h' : -x < 1
⊢ x + 1 < rexp x

tactic: have hx' : 0 < x + 1 := by linarith
state_before: case inr.inr
x : ℝ
hx✝ : x ≠ 0
hx : x < 0
h' : -x < 1
⊢ x + 1 < rexp x
state_after: case inr.inr
x : ℝ
hx✝ : x ≠ 0
hx : x < 0
h' : -x < 1
hx' : 0 < x + 1
⊢ x + 1 < rexp x

tactic: simpa [add_comm, exp_neg, inv_lt_inv (exp_pos _) hx']
  using exp_bound_div_one_sub_of_interval' (neg_pos.2 hx) h'
state_before: case inr.inr
x : ℝ
hx✝ : x ≠ 0
hx : x < 0
h' : -x < 1
hx' : 0 < x + 1
⊢ x + 1 < rexp x
state_after: no goals

tactic: exact add_one_lt_exp_of_pos hx
state_before: case inl
x : ℝ
hx✝ : x ≠ 0
hx : 0 < x
⊢ x + 1 < rexp x
state_after: no goals

tactic: linarith [x.exp_pos]
state_before: case inr.inl
x : ℝ
hx✝ : x ≠ 0
hx : x < 0
h' : 1 ≤ -x
⊢ x + 1 < rexp x
state_after: no goals

tactic: linarith
state_before: x : ℝ
hx✝ : x ≠ 0
hx : x < 0
h' : -x < 1
⊢ 0 < x + 1
state_after: no goals
Theorem: Set.mulIndicator_eq_self_of_superset
File: Mathlib/Algebra/Group/Indicator.lean

tactic: rw [mulIndicator_eq_self] at h1 ⊢
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
M : Type u_4
N : Type u_5
inst✝¹ : One M
inst✝ : One N
s t : Set α
f g : α → M
a : α
h1 : s.mulIndicator f = f
h2 : s ⊆ t
⊢ t.mulIndicator f = f
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
M : Type u_4
N : Type u_5
inst✝¹ : One M
inst✝ : One N
s t : Set α
f g : α → M
a : α
h1 : mulSupport f ⊆ s
h2 : s ⊆ t
⊢ mulSupport f ⊆ t

tactic: exact Subset.trans h1 h2
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
M : Type u_4
N : Type u_5
inst✝¹ : One M
inst✝ : One N
s t : Set α
f g : α → M
a : α
h1 : mulSupport f ⊆ s
h2 : s ⊆ t
⊢ mulSupport f ⊆ t
state_after: no goals
Theorem: ContinuousMap.polynomial_comp_attachBound
File: Mathlib/Topology/ContinuousFunction/StoneWeierstrass.lean

tactic: ext
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f : ↥A
g : ℝ[X]
⊢ (g.toContinuousMapOn (Set.Icc (-‖f‖) ‖f‖)).comp (↑f).attachBound = ↑((Polynomial.aeval f) g)
state_after: case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f : ↥A
g : ℝ[X]
a✝ : X
⊢ ((g.toContinuousMapOn (Set.Icc (-‖f‖) ‖f‖)).comp (↑f).attachBound) a✝ = ↑((Polynomial.aeval f) g) a✝

tactic: simp only [ContinuousMap.coe_comp, Function.comp_apply, ContinuousMap.attachBound_apply_coe,
  Polynomial.toContinuousMapOn_apply, Polynomial.aeval_subalgebra_coe,
  Polynomial.aeval_continuousMap_apply, Polynomial.toContinuousMap_apply]
state_before: case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f : ↥A
g : ℝ[X]
a✝ : X
⊢ ((g.toContinuousMapOn (Set.Icc (-‖f‖) ‖f‖)).comp (↑f).attachBound) a✝ = ↑((Polynomial.aeval f) g) a✝
state_after: case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f : ↥A
g : ℝ[X]
a✝ : X
⊢ Polynomial.eval (↑((↑f).attachBound a✝)) g = Polynomial.eval (↑f a✝) g

tactic: erw [ContinuousMap.attachBound_apply_coe]
state_before: case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f : ↥A
g : ℝ[X]
a✝ : X
⊢ Polynomial.eval (↑((↑f).attachBound a✝)) g = Polynomial.eval (↑f a✝) g
state_after: no goals
Theorem: Nat.Prime.sq_add_sq
File: Mathlib/NumberTheory/SumTwoSquares.lean

tactic: apply sq_add_sq_of_nat_prime_of_not_irreducible p
state_before: p : ℕ
inst✝ : Fact (Prime p)
hp : p % 4 ≠ 3
⊢ ∃ a b, a ^ 2 + b ^ 2 = p
state_after: p : ℕ
inst✝ : Fact (Prime p)
hp : p % 4 ≠ 3
⊢ ¬Irreducible ↑p

tactic: rwa [_root_.irreducible_iff_prime, prime_iff_mod_four_eq_three_of_nat_prime p]
state_before: p : ℕ
inst✝ : Fact (Prime p)
hp : p % 4 ≠ 3
⊢ ¬Irreducible ↑p
state_after: no goals
Theorem: Filter.exists_le_of_tendsto_atTop
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: have : Nonempty α := ⟨a⟩
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : SemilatticeSup α
inst✝ : Preorder β
u : α → β
h : Tendsto u atTop atTop
a : α
b : β
⊢ ∃ a' ≥ a, b ≤ u a'
state_after: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : SemilatticeSup α
inst✝ : Preorder β
u : α → β
h : Tendsto u atTop atTop
a : α
b : β
this : Nonempty α
⊢ ∃ a' ≥ a, b ≤ u a'

tactic: have : ∀ᶠ x in atTop, a ≤ x ∧ b ≤ u x :=
  (eventually_ge_atTop a).and (h.eventually <| eventually_ge_atTop b)
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : SemilatticeSup α
inst✝ : Preorder β
u : α → β
h : Tendsto u atTop atTop
a : α
b : β
this : Nonempty α
⊢ ∃ a' ≥ a, b ≤ u a'
state_after: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : SemilatticeSup α
inst✝ : Preorder β
u : α → β
h : Tendsto u atTop atTop
a : α
b : β
this✝ : Nonempty α
this : ∀ᶠ (x : α) in atTop, a ≤ x ∧ b ≤ u x
⊢ ∃ a' ≥ a, b ≤ u a'

tactic: exact this.exists
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : SemilatticeSup α
inst✝ : Preorder β
u : α → β
h : Tendsto u atTop atTop
a : α
b : β
this✝ : Nonempty α
this : ∀ᶠ (x : α) in atTop, a ≤ x ∧ b ≤ u x
⊢ ∃ a' ≥ a, b ≤ u a'
state_after: no goals
Theorem: WittVector.mapFun.sub
File: Mathlib/RingTheory/WittVector/Basic.lean

tactic: map_fun_tac
state_before: p : ℕ
R : Type u_1
S : Type u_2
T : Type u_3
hp : Fact (Nat.Prime p)
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : CommRing T
α : Type u_4
β : Type u_5
f : R →+* S
x y : 𝕎 R
⊢ mapFun (⇑f) (x - y) = mapFun (⇑f) x - mapFun (⇑f) y
state_after: no goals
Theorem: groupCohomology.toCocycles_comp_isoTwoCocycles_hom
File: Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean

tactic: simp [isoTwoCocycles]
state_before: k G : Type u
inst✝¹ : CommRing k
inst✝ : Group G
A : Rep k G
⊢ toCocycles A 1 2 ≫ (isoTwoCocycles A).hom =
    (oneCochainsLequiv A).toModuleIso.hom ≫ ModuleCat.ofHom (shortComplexH2 A).moduleCatToCycles
state_after: k G : Type u
inst✝¹ : CommRing k
inst✝ : Group G
A : Rep k G
⊢ ↑(oneCochainsLequiv A) ≫ (shortComplexH2 A).moduleCatToCycles =
    ↑(oneCochainsLequiv A) ≫ ModuleCat.ofHom (shortComplexH2 A).moduleCatToCycles

tactic: rfl
state_before: k G : Type u
inst✝¹ : CommRing k
inst✝ : Group G
A : Rep k G
⊢ ↑(oneCochainsLequiv A) ≫ (shortComplexH2 A).moduleCatToCycles =
    ↑(oneCochainsLequiv A) ≫ ModuleCat.ofHom (shortComplexH2 A).moduleCatToCycles
state_after: no goals
Theorem: ClosureOperator.closure_sup_closure_right
File: Mathlib/Order/Closure.lean

tactic: rw [sup_comm, closure_sup_closure_left, sup_comm (a := x)]
state_before: α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
inst✝ : SemilatticeSup α
c : ClosureOperator α
x y : α
⊢ c (x ⊔ c y) = c (x ⊔ y)
state_after: no goals
Theorem: mul_left_mem_nonZeroDivisors_eq_zero_iff
File: Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean

tactic: rw [mul_comm, mul_right_mem_nonZeroDivisors_eq_zero_iff hr]
state_before: M₀ : Type u_1
inst✝⁵ : MonoidWithZero M₀
M : Type u_2
M' : Type u_3
M₁ : Type u_4
R : Type u_5
R' : Type u_6
F : Type u_7
inst✝⁴ : MonoidWithZero M
inst✝³ : MonoidWithZero M'
inst✝² : CommMonoidWithZero M₁
inst✝¹ : Ring R
inst✝ : CommRing R'
r x : M₁
hr : r ∈ M₁⁰
⊢ r * x = 0 ↔ x = 0
state_after: no goals
Theorem: Real.toNNReal_lt_natCast
File: Mathlib/Data/NNReal/Basic.lean

tactic: simp [hn]
state_before: r : ℝ
n : ℕ
hn : n ≠ 0
⊢ r.toNNReal < ↑n ↔ r < ↑n
state_after: no goals
Theorem: Polynomial.natDegree_C_mul_le
File: Mathlib/Algebra/Polynomial/Degree/Lemmas.lean

tactic: rw [natDegree_C a]
state_before: R : Type u
S : Type v
ι : Type w
a✝ b : R
m n : ℕ
inst✝ : Semiring R
p q r : R[X]
a : R
f : R[X]
⊢ (C a).natDegree + f.natDegree = 0 + f.natDegree
state_after: no goals
Theorem: ProbabilityTheory.IndepFun_iff_Indep
File: Mathlib/Probability/Independence/Basic.lean

tactic: simp only [IndepFun, Indep, kernel.IndepFun]
state_before: Ω : Type u_1
ι : Type u_2
β : Type u_3
γ : Type u_4
κ : ι → Type u_5
π : ι → Set (Set Ω)
m : ι → MeasurableSpace Ω
x✝ : MeasurableSpace Ω
μ✝ : Measure Ω
S : Finset ι
s : ι → Set Ω
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
f : Ω → β
g : Ω → γ
μ : Measure Ω
⊢ IndepFun f g μ ↔ Indep (MeasurableSpace.comap f mβ) (MeasurableSpace.comap g mγ) μ
state_after: no goals
Theorem: Nat.coprime_mul_left_add_right
File: Mathlib/Data/Nat/GCD/Basic.lean

tactic: rw [Coprime, Coprime, gcd_mul_left_add_right]
state_before: m n k : ℕ
⊢ m.Coprime (m * k + n) ↔ m.Coprime n
state_after: no goals
Theorem: UniformEquiv.toEquiv_injective
File: Mathlib/Topology/UniformSpace/Equiv.lean

tactic: simpa only [mk.injEq]
state_before: α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
inst✝³ : UniformSpace α
inst✝² : UniformSpace β
inst✝¹ : UniformSpace γ
inst✝ : UniformSpace δ
e : α ≃ β
h₁ : UniformContinuous e.toFun
h₂ : UniformContinuous e.invFun
e' : α ≃ β
h₁' : UniformContinuous e'.toFun
h₂' : UniformContinuous e'.invFun
h :
  { toEquiv := e, uniformContinuous_toFun := h₁, uniformContinuous_invFun := h₂ }.toEquiv =
    { toEquiv := e', uniformContinuous_toFun := h₁', uniformContinuous_invFun := h₂' }.toEquiv
⊢ { toEquiv := e, uniformContinuous_toFun := h₁, uniformContinuous_invFun := h₂ } =
    { toEquiv := e', uniformContinuous_toFun := h₁', uniformContinuous_invFun := h₂' }
state_after: no goals
Theorem: MulAction.stabilizer_subgroup
File: Mathlib/Algebra/Pointwise/Stabilizer.lean

tactic: simp_rw [SetLike.ext_iff, mem_stabilizer_set]
state_before: G : Type u_1
H : Type u_2
α : Type u_3
inst✝² : Group G
inst✝¹ : Group H
inst✝ : MulAction G α
a : G
s : Subgroup G
⊢ stabilizer G ↑s = s
state_after: G : Type u_1
H : Type u_2
α : Type u_3
inst✝² : Group G
inst✝¹ : Group H
inst✝ : MulAction G α
a : G
s : Subgroup G
⊢ ∀ (x : G), (∀ (b : G), x • b ∈ ↑s ↔ b ∈ ↑s) ↔ x ∈ s

tactic: refine fun a ↦ ⟨fun h ↦ ?_, fun ha b ↦ s.mul_mem_cancel_left ha⟩
state_before: G : Type u_1
H : Type u_2
α : Type u_3
inst✝² : Group G
inst✝¹ : Group H
inst✝ : MulAction G α
a : G
s : Subgroup G
⊢ ∀ (x : G), (∀ (b : G), x • b ∈ ↑s ↔ b ∈ ↑s) ↔ x ∈ s
state_after: G : Type u_1
H : Type u_2
α : Type u_3
inst✝² : Group G
inst✝¹ : Group H
inst✝ : MulAction G α
a✝ : G
s : Subgroup G
a : G
h : ∀ (b : G), a • b ∈ ↑s ↔ b ∈ ↑s
⊢ a ∈ s

tactic: simpa only [smul_eq_mul, SetLike.mem_coe, mul_one] using (h 1).2 s.one_mem
state_before: G : Type u_1
H : Type u_2
α : Type u_3
inst✝² : Group G
inst✝¹ : Group H
inst✝ : MulAction G α
a✝ : G
s : Subgroup G
a : G
h : ∀ (b : G), a • b ∈ ↑s ↔ b ∈ ↑s
⊢ a ∈ s
state_after: no goals
Theorem: AffineBasis.coord_reindex
File: Mathlib/LinearAlgebra/AffineSpace/Basis.lean

tactic: ext
state_before: ι : Type u_1
ι' : Type u_2
k : Type u_3
V : Type u_4
P : Type u_5
inst✝³ : AddCommGroup V
inst✝² : AffineSpace V P
inst✝¹ : Ring k
inst✝ : Module k V
b : AffineBasis ι k P
s : Finset ι
i✝ j : ι
e : ι ≃ ι'
i : ι'
⊢ (b.reindex e).coord i = b.coord (e.symm i)
state_after: case h
ι : Type u_1
ι' : Type u_2
k : Type u_3
V : Type u_4
P : Type u_5
inst✝³ : AddCommGroup V
inst✝² : AffineSpace V P
inst✝¹ : Ring k
inst✝ : Module k V
b : AffineBasis ι k P
s : Finset ι
i✝ j : ι
e : ι ≃ ι'
i : ι'
p✝ : P
⊢ ((b.reindex e).coord i) p✝ = (b.coord (e.symm i)) p✝

tactic: classical simp [AffineBasis.coord]
state_before: case h
ι : Type u_1
ι' : Type u_2
k : Type u_3
V : Type u_4
P : Type u_5
inst✝³ : AddCommGroup V
inst✝² : AffineSpace V P
inst✝¹ : Ring k
inst✝ : Module k V
b : AffineBasis ι k P
s : Finset ι
i✝ j : ι
e : ι ≃ ι'
i : ι'
p✝ : P
⊢ ((b.reindex e).coord i) p✝ = (b.coord (e.symm i)) p✝
state_after: no goals

tactic: simp [AffineBasis.coord]
state_before: case h
ι : Type u_1
ι' : Type u_2
k : Type u_3
V : Type u_4
P : Type u_5
inst✝³ : AddCommGroup V
inst✝² : AffineSpace V P
inst✝¹ : Ring k
inst✝ : Module k V
b : AffineBasis ι k P
s : Finset ι
i✝ j : ι
e : ι ≃ ι'
i : ι'
p✝ : P
⊢ ((b.reindex e).coord i) p✝ = (b.coord (e.symm i)) p✝
state_after: no goals
Theorem: Finset.eventually_constant_prod
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: obtain ⟨m, rfl : n = N + m⟩ := Nat.exists_eq_add_of_le hn
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
u : ℕ → β
N : ℕ
hu : ∀ n ≥ N, u n = 1
n : ℕ
hn : N ≤ n
⊢ ∏ k ∈ range n, u k = ∏ k ∈ range N, u k
state_after: case intro
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
u : ℕ → β
N : ℕ
hu : ∀ n ≥ N, u n = 1
m : ℕ
hn : N ≤ N + m
⊢ ∏ k ∈ range (N + m), u k = ∏ k ∈ range N, u k

tactic: clear hn
state_before: case intro
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
u : ℕ → β
N : ℕ
hu : ∀ n ≥ N, u n = 1
m : ℕ
hn : N ≤ N + m
⊢ ∏ k ∈ range (N + m), u k = ∏ k ∈ range N, u k
state_after: case intro
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
u : ℕ → β
N : ℕ
hu : ∀ n ≥ N, u n = 1
m : ℕ
⊢ ∏ k ∈ range (N + m), u k = ∏ k ∈ range N, u k

tactic: induction' m with m hm
state_before: case intro
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
u : ℕ → β
N : ℕ
hu : ∀ n ≥ N, u n = 1
m : ℕ
⊢ ∏ k ∈ range (N + m), u k = ∏ k ∈ range N, u k
state_after: case intro.zero
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
u : ℕ → β
N : ℕ
hu : ∀ n ≥ N, u n = 1
⊢ ∏ k ∈ range (N + 0), u k = ∏ k ∈ range N, u k

case intro.succ
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
u : ℕ → β
N : ℕ
hu : ∀ n ≥ N, u n = 1
m : ℕ
hm : ∏ k ∈ range (N + m), u k = ∏ k ∈ range N, u k
⊢ ∏ k ∈ range (N + (m + 1)), u k = ∏ k ∈ range N, u k

tactic: simp
state_before: case intro.zero
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
u : ℕ → β
N : ℕ
hu : ∀ n ≥ N, u n = 1
⊢ ∏ k ∈ range (N + 0), u k = ∏ k ∈ range N, u k
state_after: no goals

tactic: simp [← add_assoc, prod_range_succ, hm, hu]
state_before: case intro.succ
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
u : ℕ → β
N : ℕ
hu : ∀ n ≥ N, u n = 1
m : ℕ
hm : ∏ k ∈ range (N + m), u k = ∏ k ∈ range N, u k
⊢ ∏ k ∈ range (N + (m + 1)), u k = ∏ k ∈ range N, u k
state_after: no goals
Theorem: iter_deriv_zpow'
File: Mathlib/Analysis/Calculus/Deriv/ZPow.lean

tactic: induction' k with k ihk
state_before: 𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : 𝕜
s : Set 𝕜
m✝ m : ℤ
k : ℕ
⊢ (deriv^[k] fun x => x ^ m) = fun x => (∏ i ∈ Finset.range k, (↑m - ↑i)) * x ^ (m - ↑k)
state_after: case zero
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : 𝕜
s : Set 𝕜
m✝ m : ℤ
⊢ (deriv^[0] fun x => x ^ m) = fun x => (∏ i ∈ Finset.range 0, (↑m - ↑i)) * x ^ (m - ↑0)

case succ
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : 𝕜
s : Set 𝕜
m✝ m : ℤ
k : ℕ
ihk : (deriv^[k] fun x => x ^ m) = fun x => (∏ i ∈ Finset.range k, (↑m - ↑i)) * x ^ (m - ↑k)
⊢ (deriv^[k + 1] fun x => x ^ m) = fun x => (∏ i ∈ Finset.range (k + 1), (↑m - ↑i)) * x ^ (m - ↑(k + 1))

tactic: simp only [Nat.zero_eq, one_mul, Int.ofNat_zero, id, sub_zero, Finset.prod_range_zero,
  Function.iterate_zero]
state_before: case zero
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : 𝕜
s : Set 𝕜
m✝ m : ℤ
⊢ (deriv^[0] fun x => x ^ m) = fun x => (∏ i ∈ Finset.range 0, (↑m - ↑i)) * x ^ (m - ↑0)
state_after: no goals

tactic: simp only [Function.iterate_succ_apply', ihk, deriv_const_mul_field', deriv_zpow',
  Finset.prod_range_succ, Int.ofNat_succ, ← sub_sub, Int.cast_sub, Int.cast_natCast, mul_assoc]
state_before: case succ
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : 𝕜
s : Set 𝕜
m✝ m : ℤ
k : ℕ
ihk : (deriv^[k] fun x => x ^ m) = fun x => (∏ i ∈ Finset.range k, (↑m - ↑i)) * x ^ (m - ↑k)
⊢ (deriv^[k + 1] fun x => x ^ m) = fun x => (∏ i ∈ Finset.range (k + 1), (↑m - ↑i)) * x ^ (m - ↑(k + 1))
state_after: no goals
Theorem: coe_setBasisOfLinearIndependentOfCardEqFinrank
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: rw [setBasisOfLinearIndependentOfCardEqFinrank]
state_before: K : Type u
V : Type v
inst✝⁴ : DivisionRing K
inst✝³ : AddCommGroup V
inst✝² : Module K V
s : Set V
inst✝¹ : Nonempty ↑s
inst✝ : Fintype ↑s
lin_ind : LinearIndependent (ι := { x // x ∈ s }) K Subtype.val
card_eq : s.toFinset.card = finrank K V
⊢ ⇑(setBasisOfLinearIndependentOfCardEqFinrank lin_ind card_eq) = Subtype.val
state_after: K : Type u
V : Type v
inst✝⁴ : DivisionRing K
inst✝³ : AddCommGroup V
inst✝² : Module K V
s : Set V
inst✝¹ : Nonempty ↑s
inst✝ : Fintype ↑s
lin_ind : LinearIndependent (ι := { x // x ∈ s }) K Subtype.val
card_eq : s.toFinset.card = finrank K V
⊢ ⇑(basisOfLinearIndependentOfCardEqFinrank lin_ind ⋯) = Subtype.val

tactic: exact Basis.coe_mk _ _
state_before: K : Type u
V : Type v
inst✝⁴ : DivisionRing K
inst✝³ : AddCommGroup V
inst✝² : Module K V
s : Set V
inst✝¹ : Nonempty ↑s
inst✝ : Fintype ↑s
lin_ind : LinearIndependent (ι := { x // x ∈ s }) K Subtype.val
card_eq : s.toFinset.card = finrank K V
⊢ ⇑(basisOfLinearIndependentOfCardEqFinrank lin_ind ⋯) = Subtype.val
state_after: no goals
Theorem: Metric.exists_isCompact_closedBall
File: Mathlib/Topology/MetricSpace/Pseudo/Lemmas.lean

tactic: have : ∀ᶠ r in 𝓝[>] 0, IsCompact (closedBall x r) :=
  eventually_nhdsWithin_of_eventually_nhds (eventually_isCompact_closedBall x)
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : PseudoMetricSpace α
x✝ y z : α
ε ε₁ ε₂ : ℝ
s : Set α
inst✝ : WeaklyLocallyCompactSpace α
x : α
⊢ ∃ r, 0 < r ∧ IsCompact (closedBall x r)
state_after: ι : Type u_1
α : Type u_2
inst✝¹ : PseudoMetricSpace α
x✝ y z : α
ε ε₁ ε₂ : ℝ
s : Set α
inst✝ : WeaklyLocallyCompactSpace α
x : α
this : ∀ᶠ (r : ℝ) in 𝓝[>] 0, IsCompact (closedBall x r)
⊢ ∃ r, 0 < r ∧ IsCompact (closedBall x r)

tactic: simpa only [and_comm] using (this.and self_mem_nhdsWithin).exists
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : PseudoMetricSpace α
x✝ y z : α
ε ε₁ ε₂ : ℝ
s : Set α
inst✝ : WeaklyLocallyCompactSpace α
x : α
this : ∀ᶠ (r : ℝ) in 𝓝[>] 0, IsCompact (closedBall x r)
⊢ ∃ r, 0 < r ∧ IsCompact (closedBall x r)
state_after: no goals
Theorem: Finset.range_image_pred_top_sub
File: Mathlib/Order/Interval/Finset/Nat.lean

tactic: cases n
state_before: a b c n : ℕ
⊢ image (fun j => n - 1 - j) (range n) = range n
state_after: case zero
a b c : ℕ
⊢ image (fun j => 0 - 1 - j) (range 0) = range 0

case succ
a b c n✝ : ℕ
⊢ image (fun j => n✝ + 1 - 1 - j) (range (n✝ + 1)) = range (n✝ + 1)

tactic: rw [range_zero, image_empty]
state_before: case zero
a b c : ℕ
⊢ image (fun j => 0 - 1 - j) (range 0) = range 0
state_after: no goals

tactic: rw [Finset.range_eq_Ico, Nat.Ico_image_const_sub_eq_Ico (Nat.zero_le _)]
state_before: case succ
a b c n✝ : ℕ
⊢ image (fun j => n✝ + 1 - 1 - j) (range (n✝ + 1)) = range (n✝ + 1)
state_after: case succ
a b c n✝ : ℕ
⊢ Ico (n✝ + 1 - 1 + 1 - (n✝ + 1)) (n✝ + 1 - 1 + 1 - 0) = Ico 0 (n✝ + 1)

tactic: simp_rw [succ_sub_succ, Nat.sub_zero, Nat.sub_self]
state_before: case succ
a b c n✝ : ℕ
⊢ Ico (n✝ + 1 - 1 + 1 - (n✝ + 1)) (n✝ + 1 - 1 + 1 - 0) = Ico 0 (n✝ + 1)
state_after: no goals