1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Finset.prod_range_natCast_sub
File: Mathlib/Algebra/BigOperators/Ring.lean

tactic: rw [prod_natCast]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
κ : ι → Type u_5
s s₁ s₂ : Finset ι
i : ι
a : α
f g : ι → α
inst✝ : CommRing α
n k : ℕ
⊢ ∏ i ∈ range k, (↑n - ↑i) = ↑(∏ i ∈ range k, (n - i))
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
κ : ι → Type u_5
s s₁ s₂ : Finset ι
i : ι
a : α
f g : ι → α
inst✝ : CommRing α
n k : ℕ
⊢ ∏ i ∈ range k, (↑n - ↑i) = ∏ i ∈ range k, ↑(n - i)

tactic: rcases le_or_lt k n with hkn | hnk
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
κ : ι → Type u_5
s s₁ s₂ : Finset ι
i : ι
a : α
f g : ι → α
inst✝ : CommRing α
n k : ℕ
⊢ ∏ i ∈ range k, (↑n - ↑i) = ∏ i ∈ range k, ↑(n - i)
state_after: case inl
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
κ : ι → Type u_5
s s₁ s₂ : Finset ι
i : ι
a : α
f g : ι → α
inst✝ : CommRing α
n k : ℕ
hkn : k ≤ n
⊢ ∏ i ∈ range k, (↑n - ↑i) = ∏ i ∈ range k, ↑(n - i)

case inr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
κ : ι → Type u_5
s s₁ s₂ : Finset ι
i : ι
a : α
f g : ι → α
inst✝ : CommRing α
n k : ℕ
hnk : n < k
⊢ ∏ i ∈ range k, (↑n - ↑i) = ∏ i ∈ range k, ↑(n - i)

tactic: exact prod_congr rfl fun i hi => (Nat.cast_sub <| (mem_range.1 hi).le.trans hkn).symm
state_before: case inl
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
κ : ι → Type u_5
s s₁ s₂ : Finset ι
i : ι
a : α
f g : ι → α
inst✝ : CommRing α
n k : ℕ
hkn : k ≤ n
⊢ ∏ i ∈ range k, (↑n - ↑i) = ∏ i ∈ range k, ↑(n - i)
state_after: no goals

tactic: rw [← mem_range] at hnk
state_before: case inr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
κ : ι → Type u_5
s s₁ s₂ : Finset ι
i : ι
a : α
f g : ι → α
inst✝ : CommRing α
n k : ℕ
hnk : n < k
⊢ ∏ i ∈ range k, (↑n - ↑i) = ∏ i ∈ range k, ↑(n - i)
state_after: case inr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
κ : ι → Type u_5
s s₁ s₂ : Finset ι
i : ι
a : α
f g : ι → α
inst✝ : CommRing α
n k : ℕ
hnk : n ∈ range k
⊢ ∏ i ∈ range k, (↑n - ↑i) = ∏ i ∈ range k, ↑(n - i)

tactic: rw [prod_eq_zero hnk, prod_eq_zero hnk] <;> simp
state_before: case inr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
κ : ι → Type u_5
s s₁ s₂ : Finset ι
i : ι
a : α
f g : ι → α
inst✝ : CommRing α
n k : ℕ
hnk : n ∈ range k
⊢ ∏ i ∈ range k, (↑n - ↑i) = ∏ i ∈ range k, ↑(n - i)
state_after: no goals
Theorem: Polynomial.root_X_sub_C
File: Mathlib/Algebra/Polynomial/Eval.lean

tactic: rw [IsRoot.def, eval_sub, eval_X, eval_C, sub_eq_zero, eq_comm]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝ : Ring R
p q r : R[X]
⊢ (X - C a).IsRoot b ↔ a = b
state_after: no goals
Theorem: Stream'.WSeq.ret_bind
File: Mathlib/Data/Seq/WSeq.lean

tactic: simp [bind]
state_before: α : Type u
β : Type v
γ : Type w
a : α
f : α → WSeq β
⊢ (ret a).bind f ~ʷ f a
state_after: no goals
Theorem: AddMonoidAlgebra.modOf_apply_of_not_exists_add
File: Mathlib/Algebra/MonoidAlgebra/Division.lean

tactic: classical exact Finsupp.filter_apply_pos _ _ h
state_before: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
x : k[G]
g g' : G
h : ¬∃ d, g' = g + d
⊢ (x %ᵒᶠ g) g' = x g'
state_after: no goals

tactic: exact Finsupp.filter_apply_pos _ _ h
state_before: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
x : k[G]
g g' : G
h : ¬∃ d, g' = g + d
⊢ (x %ᵒᶠ g) g' = x g'
state_after: no goals
Theorem: intervalIntegral.integral_comp_mul_sub
File: Mathlib/MeasureTheory/Integral/IntervalIntegral.lean

tactic: simpa only [sub_eq_add_neg] using integral_comp_mul_add f hc (-d)
state_before: ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a b c d✝ : ℝ
f : ℝ → E
hc : c ≠ 0
d : ℝ
⊢ ∫ (x : ℝ) in a..b, f (c * x - d) = c⁻¹ • ∫ (x : ℝ) in c * a - d..c * b - d, f x
state_after: no goals
Theorem: TopCat.piIsoPi_hom_apply
File: Mathlib/Topology/Category/TopCat/Limits/Products.lean

tactic: have := piIsoPi_inv_π α i
state_before: J : Type v
inst✝ : SmallCategory J
ι : Type v
α : ι → TopCat
i : ι
x : ↑(∏ᶜ α)
⊢ (piIsoPi α).hom x i = (Pi.π α i) x
state_after: J : Type v
inst✝ : SmallCategory J
ι : Type v
α : ι → TopCat
i : ι
x : ↑(∏ᶜ α)
this : (piIsoPi α).inv ≫ Pi.π α i = piπ α i
⊢ (piIsoPi α).hom x i = (Pi.π α i) x

tactic: rw [Iso.inv_comp_eq] at this
state_before: J : Type v
inst✝ : SmallCategory J
ι : Type v
α : ι → TopCat
i : ι
x : ↑(∏ᶜ α)
this : (piIsoPi α).inv ≫ Pi.π α i = piπ α i
⊢ (piIsoPi α).hom x i = (Pi.π α i) x
state_after: J : Type v
inst✝ : SmallCategory J
ι : Type v
α : ι → TopCat
i : ι
x : ↑(∏ᶜ α)
this : Pi.π α i = (piIsoPi α).hom ≫ piπ α i
⊢ (piIsoPi α).hom x i = (Pi.π α i) x

tactic: exact ConcreteCategory.congr_hom this x
state_before: J : Type v
inst✝ : SmallCategory J
ι : Type v
α : ι → TopCat
i : ι
x : ↑(∏ᶜ α)
this : Pi.π α i = (piIsoPi α).hom ≫ piπ α i
⊢ (piIsoPi α).hom x i = (Pi.π α i) x
state_after: no goals
Theorem: List.range_succ_eq_map
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: rw [range_eq_range', range_eq_range', range', Nat.add_comm, ← map_add_range']
state_before: n : Nat
⊢ range (n + 1) = 0 :: map succ (range n)
state_after: n : Nat
⊢ 0 :: map (fun x => 1 + x) (range' 0 n) = 0 :: map succ (range' 0 n)

tactic: congr
state_before: n : Nat
⊢ 0 :: map (fun x => 1 + x) (range' 0 n) = 0 :: map succ (range' 0 n)
state_after: case e_tail.e_f
n : Nat
⊢ (fun x => 1 + x) = succ

tactic: exact funext one_add
state_before: case e_tail.e_f
n : Nat
⊢ (fun x => 1 + x) = succ
state_after: no goals
Theorem: DFinsupp.coprodMap_apply_single
File: Mathlib/LinearAlgebra/DFinsupp.lean

tactic: simp [coprodMap]
state_before: ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
inst✝⁶ : Semiring R
inst✝⁵ : (i : ι) → AddCommMonoid (M i)
inst✝⁴ : (i : ι) → Module R (M i)
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : DecidableEq ι
inst✝ : (x : N) → Decidable (x ≠ 0)
f : (i : ι) → M i →ₗ[R] N
i : ι
x : M i
⊢ (coprodMap f) (single i x) = (f i) x
state_after: no goals
Theorem: QuotientGroup.leftRel_eq
File: Mathlib/GroupTheory/Coset.lean

tactic: simp only [eq_iff_iff]
state_before: α : Type u_1
inst✝ : Group α
s : Subgroup α
⊢ ∀ (a b : α), Setoid.r a b = (a⁻¹ * b ∈ s)
state_after: α : Type u_1
inst✝ : Group α
s : Subgroup α
⊢ ∀ (a b : α), Setoid.r a b ↔ a⁻¹ * b ∈ s

tactic: apply leftRel_apply
state_before: α : Type u_1
inst✝ : Group α
s : Subgroup α
⊢ ∀ (a b : α), Setoid.r a b ↔ a⁻¹ * b ∈ s
state_after: no goals
Theorem: Function.Antiperiodic.nat_odd_mul_antiperiodic
File: Mathlib/Algebra/Periodic.lean

tactic: rw [← add_assoc, h, h.nat_even_mul_periodic]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → β
c c₁ c₂ x✝ : α
inst✝¹ : Semiring α
inst✝ : InvolutiveNeg β
h : Antiperiodic f c
n : ℕ
x : α
⊢ f (x + (↑n * (2 * c) + c)) = -f x
state_after: no goals
Theorem: Subgroup.prod_eq_bot_iff
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

tactic: simpa only [← Subgroup.toSubmonoid_eq] using Submonoid.prod_eq_bot_iff
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
H✝ K✝ : Subgroup G
k : Set G
N : Type u_5
inst✝¹ : Group N
P : Type u_6
inst✝ : Group P
H : Subgroup G
K : Subgroup N
⊢ H.prod K = ⊥ ↔ H = ⊥ ∧ K = ⊥
state_after: no goals
Theorem: tsub_tsub
File: Mathlib/Algebra/Order/Sub/Defs.lean

tactic: apply le_antisymm
state_before: α : Type u_1
β : Type u_2
inst✝³ : PartialOrder α
inst✝² : AddCommSemigroup α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a✝ b✝ c✝ d b a c : α
⊢ b - a - c = b - (a + c)
state_after: case a
α : Type u_1
β : Type u_2
inst✝³ : PartialOrder α
inst✝² : AddCommSemigroup α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a✝ b✝ c✝ d b a c : α
⊢ b - a - c ≤ b - (a + c)

case a
α : Type u_1
β : Type u_2
inst✝³ : PartialOrder α
inst✝² : AddCommSemigroup α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a✝ b✝ c✝ d b a c : α
⊢ b - (a + c) ≤ b - a - c

tactic: rw [tsub_le_iff_left, tsub_le_iff_left, ← add_assoc, ← tsub_le_iff_left]
state_before: case a
α : Type u_1
β : Type u_2
inst✝³ : PartialOrder α
inst✝² : AddCommSemigroup α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a✝ b✝ c✝ d b a c : α
⊢ b - a - c ≤ b - (a + c)
state_after: no goals

tactic: rw [tsub_le_iff_left, add_assoc, ← tsub_le_iff_left, ← tsub_le_iff_left]
state_before: case a
α : Type u_1
β : Type u_2
inst✝³ : PartialOrder α
inst✝² : AddCommSemigroup α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a✝ b✝ c✝ d b a c : α
⊢ b - (a + c) ≤ b - a - c
state_after: no goals
Theorem: Finset.exists_compls_iff
File: Mathlib/Data/Finset/Sups.lean

tactic: aesop
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : BooleanAlgebra α
s s₁ s₂ t t₁ t₂ u v : Finset α
a b c : α
p : α → Prop
⊢ (∃ a ∈ sᶜˢ, p a) ↔ ∃ a ∈ s, p aᶜ
state_after: no goals
Theorem: MonoidHomClass.lipschitz_of_bound
File: Mathlib/Analysis/Normed/Group/Uniform.lean

tactic: simpa only [dist_eq_norm_div, map_div] using h (x / y)
state_before: 𝓕 : Type u_1
α : Type u_2
E : Type u_3
F : Type u_4
inst✝³ : SeminormedGroup E
inst✝² : SeminormedGroup F
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
inst✝¹ : FunLike 𝓕 E F
inst✝ : MonoidHomClass 𝓕 E F
f : 𝓕
C : ℝ
h : ∀ (x : E), ‖f x‖ ≤ C * ‖x‖
x y : E
⊢ dist (f x) (f y) ≤ C * dist x y
state_after: no goals
Theorem: IsPreconnected.infinite_of_nontrivial
File: Mathlib/Topology/Separation.lean

tactic: refine mt (fun hf => (subsingleton_coe s).mp ?_) (not_subsingleton_iff.mpr hs)
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
s : Set X
h : IsPreconnected s
hs : s.Nontrivial
⊢ s.Infinite
state_after: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
s : Set X
h : IsPreconnected s
hs : s.Nontrivial
hf : s.Finite
⊢ Subsingleton ↑s

tactic: haveI := @discrete_of_t1_of_finite s _ _ hf.to_subtype
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
s : Set X
h : IsPreconnected s
hs : s.Nontrivial
hf : s.Finite
⊢ Subsingleton ↑s
state_after: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
s : Set X
h : IsPreconnected s
hs : s.Nontrivial
hf : s.Finite
this : DiscreteTopology ↑s
⊢ Subsingleton ↑s

tactic: exact @PreconnectedSpace.trivial_of_discrete _ _ (Subtype.preconnectedSpace h) _
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
s : Set X
h : IsPreconnected s
hs : s.Nontrivial
hf : s.Finite
this : DiscreteTopology ↑s
⊢ Subsingleton ↑s
state_after: no goals
Theorem: Hyperreal.IsSt.st_eq
File: Mathlib/Data/Real/Hyperreal.lean

tactic: have h : ∃ r, IsSt x r := ⟨r, hxr⟩
state_before: x : ℝ*
r : ℝ
hxr : x.IsSt r
⊢ x.st = r
state_after: x : ℝ*
r : ℝ
hxr : x.IsSt r
h : ∃ r, x.IsSt r
⊢ x.st = r

tactic: rw [st, dif_pos h]
state_before: x : ℝ*
r : ℝ
hxr : x.IsSt r
h : ∃ r, x.IsSt r
⊢ x.st = r
state_after: x : ℝ*
r : ℝ
hxr : x.IsSt r
h : ∃ r, x.IsSt r
⊢ Classical.choose h = r

tactic: exact (Classical.choose_spec h).unique hxr
state_before: x : ℝ*
r : ℝ
hxr : x.IsSt r
h : ∃ r, x.IsSt r
⊢ Classical.choose h = r
state_after: no goals
Theorem: rank_prod
File: Mathlib/LinearAlgebra/Dimension/Constructions.lean

tactic: simpa [rank_eq_card_chooseBasisIndex R M, rank_eq_card_chooseBasisIndex R M', lift_umax,
  lift_umax'] using ((chooseBasis R M).prod (chooseBasis R M')).mk_eq_rank.symm
state_before: R S : Type u
M : Type v
M' : Type v'
M₁ : Type v
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type u_1
inst✝¹¹ : Ring R
inst✝¹⁰ : CommRing S
inst✝⁹ : AddCommGroup M
inst✝⁸ : AddCommGroup M'
inst✝⁷ : AddCommGroup M₁
inst✝⁶ : Module R M
inst✝⁵ : Module R M'
inst✝⁴ : Module R M₁
inst✝³ : StrongRankCondition R
inst✝² : Module.Free R M
inst✝¹ : Module.Free R M'
inst✝ : Module.Free R M₁
⊢ Module.rank R (M × M') = lift.{v', v} (Module.rank R M) + lift.{v, v'} (Module.rank R M')
state_after: no goals
Theorem: CategoryTheory.rightAdjointMate_id
File: Mathlib/CategoryTheory/Monoidal/Rigid/Basic.lean

tactic: simp [rightAdjointMate]
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
X : C
inst✝ : HasRightDual X
⊢ 𝟙 Xᘁ = 𝟙 Xᘁ
state_after: no goals
Theorem: CliffordAlgebra.map_surjective
File: Mathlib/LinearAlgebra/CliffordAlgebra/Basic.lean

tactic: simp only [AlgHom.commutes]
state_before: R : Type u_1
inst✝¹⁰ : CommRing R
M : Type u_2
inst✝⁹ : AddCommGroup M
inst✝⁸ : Module R M
Q : QuadraticForm R M
n : ℕ
A : Type u_3
inst✝⁷ : Semiring A
inst✝⁶ : Algebra R A
M₁ : Type u_4
M₂ : Type u_5
M₃ : Type u_6
inst✝⁵ : AddCommGroup M₁
inst✝⁴ : AddCommGroup M₂
inst✝³ : AddCommGroup M₃
inst✝² : Module R M₁
inst✝¹ : Module R M₂
inst✝ : Module R M₃
Q₁✝ : QuadraticForm R M₁
Q₂✝ : QuadraticForm R M₂
Q₃ : QuadraticForm R M₃
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
f : Q₁ →qᵢ Q₂
hf : Function.Surjective ⇑f
r : R
⊢ (map f) ((algebraMap R (CliffordAlgebra Q₁)) r) = (algebraMap R (CliffordAlgebra Q₂)) r
state_after: no goals

tactic: simp only [map_apply_ι, hx]
state_before: R : Type u_1
inst✝¹⁰ : CommRing R
M : Type u_2
inst✝⁹ : AddCommGroup M
inst✝⁸ : Module R M
Q : QuadraticForm R M
n : ℕ
A : Type u_3
inst✝⁷ : Semiring A
inst✝⁶ : Algebra R A
M₁ : Type u_4
M₂ : Type u_5
M₃ : Type u_6
inst✝⁵ : AddCommGroup M₁
inst✝⁴ : AddCommGroup M₂
inst✝³ : AddCommGroup M₃
inst✝² : Module R M₁
inst✝¹ : Module R M₂
inst✝ : Module R M₃
Q₁✝ : QuadraticForm R M₁
Q₂✝ : QuadraticForm R M₂
Q₃ : QuadraticForm R M₃
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
f : Q₁ →qᵢ Q₂
hf : Function.Surjective ⇑f
y : M₂
x : M₁
hx : f x = y
⊢ (map f) ((ι Q₁) x) = (ι Q₂) y
state_after: no goals

tactic: simp only [map_mul, hx, hy]
state_before: R : Type u_1
inst✝¹⁰ : CommRing R
M : Type u_2
inst✝⁹ : AddCommGroup M
inst✝⁸ : Module R M
Q : QuadraticForm R M
n : ℕ
A : Type u_3
inst✝⁷ : Semiring A
inst✝⁶ : Algebra R A
M₁ : Type u_4
M₂ : Type u_5
M₃ : Type u_6
inst✝⁵ : AddCommGroup M₁
inst✝⁴ : AddCommGroup M₂
inst✝³ : AddCommGroup M₃
inst✝² : Module R M₁
inst✝¹ : Module R M₂
inst✝ : Module R M₃
Q₁✝ : QuadraticForm R M₁
Q₂✝ : QuadraticForm R M₂
Q₃ : QuadraticForm R M₃
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
f : Q₁ →qᵢ Q₂
hf : Function.Surjective ⇑f
x✝³ x✝² : CliffordAlgebra Q₂
x✝¹ : ∃ a, (map f) a = x✝³
x✝ : ∃ a, (map f) a = x✝²
x : CliffordAlgebra Q₁
hx : (map f) x = x✝³
y : CliffordAlgebra Q₁
hy : (map f) y = x✝²
⊢ (map f) (x * y) = x✝³ * x✝²
state_after: no goals

tactic: simp only [map_add, hx, hy]
state_before: R : Type u_1
inst✝¹⁰ : CommRing R
M : Type u_2
inst✝⁹ : AddCommGroup M
inst✝⁸ : Module R M
Q : QuadraticForm R M
n : ℕ
A : Type u_3
inst✝⁷ : Semiring A
inst✝⁶ : Algebra R A
M₁ : Type u_4
M₂ : Type u_5
M₃ : Type u_6
inst✝⁵ : AddCommGroup M₁
inst✝⁴ : AddCommGroup M₂
inst✝³ : AddCommGroup M₃
inst✝² : Module R M₁
inst✝¹ : Module R M₂
inst✝ : Module R M₃
Q₁✝ : QuadraticForm R M₁
Q₂✝ : QuadraticForm R M₂
Q₃ : QuadraticForm R M₃
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
f : Q₁ →qᵢ Q₂
hf : Function.Surjective ⇑f
x✝³ x✝² : CliffordAlgebra Q₂
x✝¹ : ∃ a, (map f) a = x✝³
x✝ : ∃ a, (map f) a = x✝²
x : CliffordAlgebra Q₁
hx : (map f) x = x✝³
y : CliffordAlgebra Q₁
hy : (map f) y = x✝²
⊢ (map f) (x + y) = x✝³ + x✝²
state_after: no goals
Theorem: Nat.Subtype.exists_succ
File: Mathlib/Logic/Denumerable.lean

tactic: rwa [add_right_comm, Nat.add_sub_cancel' hax]
state_before: α : Type u_1
β : Type u_2
s : Set ℕ
inst✝ : Infinite ↑s
x : ↑s
h : ¬∃ n, ↑x + n + 1 ∈ s
a : ℕ
ha : a ∈ s
hax : a ≥ ↑x + 1
⊢ ↑x + (a - (↑x + 1)) + 1 ∈ s
state_after: no goals

tactic: simp [-Multiset.range_succ]
state_before: α : Type u_1
β : Type u_2
s : Set ℕ
inst✝ : Infinite ↑s
x : ↑s
h : ¬∃ n, ↑x + n + 1 ∈ s
this : ∀ a ∈ s, a < ↑x + 1
⊢ ∀ a ∈ Multiset.filter (fun x => x ∈ s) (Multiset.range (↑x).succ), a ∈ s
state_after: no goals

tactic: simpa [Subtype.ext_iff_val, Multiset.mem_filter, -Multiset.range_succ]
state_before: α : Type u_1
β : Type u_2
s : Set ℕ
inst✝ : Infinite ↑s
x : ↑s
h : ¬∃ n, ↑x + n + 1 ∈ s
this : ∀ a ∈ s, a < ↑x + 1
⊢ ∀ (x_1 : { y // y ∈ s }),
    x_1 ∈ (Multiset.pmap (fun y hy => ⟨y, hy⟩) (Multiset.filter (fun x => x ∈ s) (Multiset.range (↑x).succ)) ⋯).toFinset
state_after: no goals
Theorem: X_pow_sub_C_eq_prod'
File: Mathlib/FieldTheory/KummerExtension.lean

tactic: rw [eq_prod_roots_of_monic_of_splits_id (monic_X_pow_sub_C _ (Nat.pos_iff_ne_zero.mp hn))
  (X_pow_sub_C_splits_of_isPrimitiveRoot hζ e), ← nthRoots, hζ.nthRoots_eq e, Multiset.map_map]
state_before: K : Type u
inst✝ : Field K
n : ℕ
ζ : K
hζ : IsPrimitiveRoot ζ n
α a : K
hn : 0 < n
e : α ^ n = a
⊢ X ^ n - C a = ∏ i ∈ Finset.range n, (X - C (ζ ^ i * α))
state_after: K : Type u
inst✝ : Field K
n : ℕ
ζ : K
hζ : IsPrimitiveRoot ζ n
α a : K
hn : 0 < n
e : α ^ n = a
⊢ (Multiset.map ((fun a => X - C a) ∘ fun x => ζ ^ x * α) (Multiset.range n)).prod =
    ∏ i ∈ Finset.range n, (X - C (ζ ^ i * α))

tactic: rfl
state_before: K : Type u
inst✝ : Field K
n : ℕ
ζ : K
hζ : IsPrimitiveRoot ζ n
α a : K
hn : 0 < n
e : α ^ n = a
⊢ (Multiset.map ((fun a => X - C a) ∘ fun x => ζ ^ x * α) (Multiset.range n)).prod =
    ∏ i ∈ Finset.range n, (X - C (ζ ^ i * α))
state_after: no goals
Theorem: Ideal.span_one
File: Mathlib/RingTheory/Ideal/Basic.lean

tactic: rw [← Set.singleton_one, span_singleton_one]
state_before: α : Type u
β : Type v
inst✝ : Semiring α
I : Ideal α
a b : α
⊢ span 1 = ⊤
state_after: no goals
Theorem: MeasureTheory.norm_indicatorConstLp
File: Mathlib/MeasureTheory/Function/LpSpace.lean

tactic: rw [Lp.norm_def, snorm_congr_ae indicatorConstLp_coeFn,
  snorm_indicator_const hs hp_ne_zero hp_ne_top, ENNReal.toReal_mul, ENNReal.toReal_rpow,
  ENNReal.coe_toReal, coe_nnnorm]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
s : Set α
hs : MeasurableSet s
hμs : μ s ≠ ⊤
c : E
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
⊢ ‖indicatorConstLp p hs hμs c‖ = ‖c‖ * (μ s).toReal ^ (1 / p.toReal)
state_after: no goals
Theorem: Associates.FactorSet.prod_eq_zero_iff
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: unfold FactorSet at p
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Nontrivial α
p : FactorSet α
⊢ p.prod = 0 ↔ p = ⊤
state_after: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Nontrivial α
p : WithTop (Multiset { a // Irreducible a })
⊢ prod p = 0 ↔ p = ⊤

tactic: induction p
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Nontrivial α
p : WithTop (Multiset { a // Irreducible a })
⊢ prod p = 0 ↔ p = ⊤
state_after: case top
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Nontrivial α
⊢ prod ⊤ = 0 ↔ ⊤ = ⊤

case coe
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Nontrivial α
a✝ : Multiset { a // Irreducible a }
⊢ prod ↑a✝ = 0 ↔ ↑a✝ = ⊤

tactic: simp only [iff_self_iff, eq_self_iff_true, Associates.prod_top]
state_before: case top
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Nontrivial α
⊢ prod ⊤ = 0 ↔ ⊤ = ⊤
state_after: no goals

tactic: rw [prod_coe, Multiset.prod_eq_zero_iff, Multiset.mem_map, eq_false WithTop.coe_ne_top,
  iff_false_iff, not_exists]
state_before: case coe
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Nontrivial α
a✝ : Multiset { a // Irreducible a }
⊢ prod ↑a✝ = 0 ↔ ↑a✝ = ⊤
state_after: case coe
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Nontrivial α
a✝ : Multiset { a // Irreducible a }
⊢ ∀ (x : { a // Irreducible a }), ¬(x ∈ a✝ ∧ ↑x = 0)

tactic: exact fun a => not_and_of_not_right _ a.prop.ne_zero
state_before: case coe
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Nontrivial α
a✝ : Multiset { a // Irreducible a }
⊢ ∀ (x : { a // Irreducible a }), ¬(x ∈ a✝ ∧ ↑x = 0)
state_after: no goals
Theorem: Polynomial.coeff_coe_units_zero_ne_zero
File: Mathlib/Algebra/Polynomial/RingDivision.lean

tactic: conv in 0 => rw [← natDegree_coe_units u]
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]
u : R[X]ˣ
⊢ (↑u).coeff 0 ≠ 0
state_after: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
u : R[X]ˣ
⊢ (↑u).coeff (↑u).natDegree ≠ 0

tactic: rw [← leadingCoeff, Ne, leadingCoeff_eq_zero]
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]
u : R[X]ˣ
⊢ (↑u).coeff (↑u).natDegree ≠ 0
state_after: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
u : R[X]ˣ
⊢ ¬↑u = 0

tactic: exact Units.ne_zero _
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]
u : R[X]ˣ
⊢ ¬↑u = 0
state_after: no goals
Theorem: ZMod.valMinAbs_neg_of_ne_half
File: Mathlib/Data/ZMod/Basic.lean

tactic: cases' eq_zero_or_neZero n with h h
state_before: n : ℕ
a : ZMod n
ha : 2 * a.val ≠ n
⊢ (-a).valMinAbs = -a.valMinAbs
state_after: case inl
n : ℕ
a : ZMod n
ha : 2 * a.val ≠ n
h : n = 0
⊢ (-a).valMinAbs = -a.valMinAbs

case inr
n : ℕ
a : ZMod n
ha : 2 * a.val ≠ n
h : NeZero n
⊢ (-a).valMinAbs = -a.valMinAbs

tactic: refine (valMinAbs_spec _ _).2 ⟨?_, ?_, ?_⟩
state_before: case inr
n : ℕ
a : ZMod n
ha : 2 * a.val ≠ n
h : NeZero n
⊢ (-a).valMinAbs = -a.valMinAbs
state_after: case inr.refine_1
n : ℕ
a : ZMod n
ha : 2 * a.val ≠ n
h : NeZero n
⊢ -a = ↑(-a.valMinAbs)

case inr.refine_2
n : ℕ
a : ZMod n
ha : 2 * a.val ≠ n
h : NeZero n
⊢ -↑n < -a.valMinAbs * 2

case inr.refine_3
n : ℕ
a : ZMod n
ha : 2 * a.val ≠ n
h : NeZero n
⊢ -a.valMinAbs * 2 ≤ ↑n

tactic: subst h
state_before: case inl
n : ℕ
a : ZMod n
ha : 2 * a.val ≠ n
h : n = 0
⊢ (-a).valMinAbs = -a.valMinAbs
state_after: case inl
a : ZMod 0
ha : 2 * a.val ≠ 0
⊢ (-a).valMinAbs = -a.valMinAbs

tactic: rfl
state_before: case inl
a : ZMod 0
ha : 2 * a.val ≠ 0
⊢ (-a).valMinAbs = -a.valMinAbs
state_after: no goals

tactic: rw [Int.cast_neg, coe_valMinAbs]
state_before: case inr.refine_1
n : ℕ
a : ZMod n
ha : 2 * a.val ≠ n
h : NeZero n
⊢ -a = ↑(-a.valMinAbs)
state_after: no goals

tactic: rw [neg_mul, neg_lt_neg_iff]
state_before: case inr.refine_2
n : ℕ
a : ZMod n
ha : 2 * a.val ≠ n
h : NeZero n
⊢ -↑n < -a.valMinAbs * 2
state_after: case inr.refine_2
n : ℕ
a : ZMod n
ha : 2 * a.val ≠ n
h : NeZero n
⊢ a.valMinAbs * 2 < ↑n

tactic: exact a.valMinAbs_mem_Ioc.2.lt_of_ne (mt a.valMinAbs_mul_two_eq_iff.1 ha)
state_before: case inr.refine_2
n : ℕ
a : ZMod n
ha : 2 * a.val ≠ n
h : NeZero n
⊢ a.valMinAbs * 2 < ↑n
state_after: no goals

tactic: linarith only [a.valMinAbs_mem_Ioc.1]
state_before: case inr.refine_3
n : ℕ
a : ZMod n
ha : 2 * a.val ≠ n
h : NeZero n
⊢ -a.valMinAbs * 2 ≤ ↑n
state_after: no goals
Theorem: CategoryTheory.ShortComplex.cyclesMap'_smul
File: Mathlib/Algebra/Homology/ShortComplex/Linear.lean

tactic: have γ : LeftHomologyMapData φ h₁ h₂ := default
state_before: R : Type u_1
C : Type u_2
inst✝³ : Semiring R
inst✝² : Category.{u_3, u_2} C
inst✝¹ : Preadditive C
inst✝ : Linear R C
S₁ S₂ : ShortComplex C
φ φ' : S₁ ⟶ S₂
h₁ : S₁.LeftHomologyData
h₂ : S₂.LeftHomologyData
a : R
⊢ cyclesMap' (a • φ) h₁ h₂ = a • cyclesMap' φ h₁ h₂
state_after: R : Type u_1
C : Type u_2
inst✝³ : Semiring R
inst✝² : Category.{u_3, u_2} C
inst✝¹ : Preadditive C
inst✝ : Linear R C
S₁ S₂ : ShortComplex C
φ φ' : S₁ ⟶ S₂
h₁ : S₁.LeftHomologyData
h₂ : S₂.LeftHomologyData
a : R
γ : LeftHomologyMapData φ h₁ h₂
⊢ cyclesMap' (a • φ) h₁ h₂ = a • cyclesMap' φ h₁ h₂

tactic: simp only [(γ.smul a).cyclesMap'_eq, LeftHomologyMapData.smul_φK, γ.cyclesMap'_eq]
state_before: R : Type u_1
C : Type u_2
inst✝³ : Semiring R
inst✝² : Category.{u_3, u_2} C
inst✝¹ : Preadditive C
inst✝ : Linear R C
S₁ S₂ : ShortComplex C
φ φ' : S₁ ⟶ S₂
h₁ : S₁.LeftHomologyData
h₂ : S₂.LeftHomologyData
a : R
γ : LeftHomologyMapData φ h₁ h₂
⊢ cyclesMap' (a • φ) h₁ h₂ = a • cyclesMap' φ h₁ h₂
state_after: no goals