1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: zero_pow_eq_zero
File: Mathlib/Algebra/GroupWithZero/Basic.lean

tactic: rintro h rfl
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
a : M₀
m n : ℕ
inst✝ : Nontrivial M₀
⊢ 0 ^ n = 0 → n ≠ 0
state_after: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
a : M₀
m : ℕ
inst✝ : Nontrivial M₀
h : 0 ^ 0 = 0
⊢ False

tactic: simp at h
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
a : M₀
m : ℕ
inst✝ : Nontrivial M₀
h : 0 ^ 0 = 0
⊢ False
state_after: no goals
Theorem: Function.Injective.leftDistribClass
File: Mathlib/Algebra/Ring/InjSurj.lean

tactic: simp only [*, left_distrib]
state_before: α : Type u_1
β : Type u_2
inst✝¹³ : Zero β
inst✝¹² : One β
inst✝¹¹ : Add β
inst✝¹⁰ : Mul β
inst✝⁹ : Neg β
inst✝⁸ : Sub β
inst✝⁷ : SMul ℕ β
inst✝⁶ : SMul ℤ β
inst✝⁵ : Pow β ℕ
inst✝⁴ : NatCast β
inst✝³ : IntCast β
f : β → α
hf : Injective f
inst✝² : Mul α
inst✝¹ : Add α
inst✝ : LeftDistribClass α
add : ∀ (x y : β), f (x + y) = f x + f y
mul : ∀ (x y : β), f (x * y) = f x * f y
x y z : β
⊢ f (x * (y + z)) = f (x * y + x * z)
state_after: no goals
Theorem: List.foldrIdx_eq_foldr_enum
File: Mathlib/Data/List/Indexes.lean

tactic: simp only [foldrIdx, foldrIdxSpec, foldrIdx_eq_foldrIdxSpec, enum]
state_before: α : Type u
β : Type v
f : ℕ → α → β → β
b : β
as : List α
⊢ foldrIdx f b as = foldr (uncurry f) b as.enum
state_after: no goals
Theorem: Polynomial.smul_eval_smul
File: Mathlib/Algebra/Polynomial/GroupRingAction.lean

tactic: rw [smul_C, eval_C, eval_C]
state_before: M : Type u_1
inst✝⁴ : Monoid M
R : Type u_2
inst✝³ : Semiring R
inst✝² : MulSemiringAction M R
S : Type u_3
inst✝¹ : CommSemiring S
inst✝ : MulSemiringAction M S
m : M
f : S[X]
x r : S
⊢ eval (m • x) (m • C r) = m • eval x (C r)
state_after: no goals

tactic: rw [smul_add, eval_add, ihf, ihg, eval_add, smul_add]
state_before: M : Type u_1
inst✝⁴ : Monoid M
R : Type u_2
inst✝³ : Semiring R
inst✝² : MulSemiringAction M R
S : Type u_3
inst✝¹ : CommSemiring S
inst✝ : MulSemiringAction M S
m : M
f✝ : S[X]
x : S
f g : S[X]
ihf : eval (m • x) (m • f) = m • eval x f
ihg : eval (m • x) (m • g) = m • eval x g
⊢ eval (m • x) (m • (f + g)) = m • eval x (f + g)
state_after: no goals

tactic: rw [smul_mul', smul_pow', smul_C, smul_X, eval_mul, eval_C, eval_pow, eval_X, eval_mul, eval_C,
  eval_pow, eval_X, smul_mul', smul_pow']
state_before: M : Type u_1
inst✝⁴ : Monoid M
R : Type u_2
inst✝³ : Semiring R
inst✝² : MulSemiringAction M R
S : Type u_3
inst✝¹ : CommSemiring S
inst✝ : MulSemiringAction M S
m : M
f : S[X]
x : S
n : ℕ
r : S
x✝ : eval (m • x) (m • (C r * X ^ n)) = m • eval x (C r * X ^ n)
⊢ eval (m • x) (m • (C r * X ^ (n + 1))) = m • eval x (C r * X ^ (n + 1))
state_after: no goals
Theorem: NNRat.cast_mul_of_ne_zero
File: Mathlib/Data/Rat/Cast/Defs.lean

tactic: rw [mul_def, cast_divNat_of_ne_zero, cast_def, cast_def,
  (Nat.commute_cast _ _).div_mul_div_comm (Nat.commute_cast _ _)]
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝ : DivisionSemiring α
q r : ℚ≥0
hq : ↑q.den ≠ 0
hr : ↑r.den ≠ 0
⊢ ↑(q * r) = ↑q * ↑r
state_after: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝ : DivisionSemiring α
q r : ℚ≥0
hq : ↑q.den ≠ 0
hr : ↑r.den ≠ 0
⊢ ↑(q.num * r.num) / ↑(q.den * r.den) = ↑q.num * ↑r.num / (↑q.den * ↑r.den)

case hb
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝ : DivisionSemiring α
q r : ℚ≥0
hq : ↑q.den ≠ 0
hr : ↑r.den ≠ 0
⊢ ↑(q.den * r.den) ≠ 0

tactic: push_cast
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝ : DivisionSemiring α
q r : ℚ≥0
hq : ↑q.den ≠ 0
hr : ↑r.den ≠ 0
⊢ ↑(q.num * r.num) / ↑(q.den * r.den) = ↑q.num * ↑r.num / (↑q.den * ↑r.den)
state_after: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝ : DivisionSemiring α
q r : ℚ≥0
hq : ↑q.den ≠ 0
hr : ↑r.den ≠ 0
⊢ ↑q.num * ↑r.num / (↑q.den * ↑r.den) = ↑q.num * ↑r.num / (↑q.den * ↑r.den)

tactic: rfl
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝ : DivisionSemiring α
q r : ℚ≥0
hq : ↑q.den ≠ 0
hr : ↑r.den ≠ 0
⊢ ↑q.num * ↑r.num / (↑q.den * ↑r.den) = ↑q.num * ↑r.num / (↑q.den * ↑r.den)
state_after: no goals

tactic: push_cast
state_before: case hb
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝ : DivisionSemiring α
q r : ℚ≥0
hq : ↑q.den ≠ 0
hr : ↑r.den ≠ 0
⊢ ↑(q.den * r.den) ≠ 0
state_after: case hb
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝ : DivisionSemiring α
q r : ℚ≥0
hq : ↑q.den ≠ 0
hr : ↑r.den ≠ 0
⊢ ↑q.den * ↑r.den ≠ 0

tactic: exact mul_ne_zero hq hr
state_before: case hb
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝ : DivisionSemiring α
q r : ℚ≥0
hq : ↑q.den ≠ 0
hr : ↑r.den ≠ 0
⊢ ↑q.den * ↑r.den ≠ 0
state_after: no goals
Theorem: Matrix.posSemidef_self_mul_conjTranspose
File: Mathlib/LinearAlgebra/Matrix/PosDef.lean

tactic: simpa only [conjTranspose_conjTranspose] using posSemidef_conjTranspose_mul_self Aᴴ
state_before: m : Type u_1
n : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝⁶ : Fintype m
inst✝⁵ : Fintype n
inst✝⁴ : CommRing R
inst✝³ : PartialOrder R
inst✝² : StarRing R
inst✝¹ : StarOrderedRing R
inst✝ : RCLike 𝕜
A : Matrix m n R
⊢ (A * Aᴴ).PosSemidef
state_after: no goals
Theorem: Trivialization.isImage_preimage_prod
File: Mathlib/Topology/FiberBundle/Trivialization.lean

tactic: simp [e.coe_fst', hx]
state_before: ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace F
proj : Z → B
inst✝² : TopologicalSpace Z
inst✝¹ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x✝ : Z
e' : Trivialization F TotalSpace.proj
x' : TotalSpace F E
b : B
y : E b
B' : Type u_6
inst✝ : TopologicalSpace B'
e : Trivialization F proj
s : Set B
x : Z
hx : x ∈ e.source
⊢ ↑e.toPartialHomeomorph x ∈ s ×ˢ univ ↔ x ∈ proj ⁻¹' s
state_after: no goals
Theorem: NNRat.toNNRat_prod_of_nonneg
File: Mathlib/Data/NNRat/BigOperators.lean

tactic: rw [← coe_inj, coe_prod, Rat.coe_toNNRat _ (Finset.prod_nonneg hf)]
state_before: ι : Type u_1
α : Type u_2
s : Finset α
f : α → ℚ
hf : ∀ a ∈ s, 0 ≤ f a
⊢ (∏ a ∈ s, f a).toNNRat = ∏ a ∈ s, (f a).toNNRat
state_after: ι : Type u_1
α : Type u_2
s : Finset α
f : α → ℚ
hf : ∀ a ∈ s, 0 ≤ f a
⊢ ∏ i ∈ s, f i = ∏ a ∈ s, ↑(f a).toNNRat

tactic: exact Finset.prod_congr rfl fun x hxs ↦ by rw [Rat.coe_toNNRat _ (hf x hxs)]
state_before: ι : Type u_1
α : Type u_2
s : Finset α
f : α → ℚ
hf : ∀ a ∈ s, 0 ≤ f a
⊢ ∏ i ∈ s, f i = ∏ a ∈ s, ↑(f a).toNNRat
state_after: no goals

tactic: rw [Rat.coe_toNNRat _ (hf x hxs)]
state_before: ι : Type u_1
α : Type u_2
s : Finset α
f : α → ℚ
hf : ∀ a ∈ s, 0 ≤ f a
x : α
hxs : x ∈ s
⊢ f x = ↑(f x).toNNRat
state_after: no goals
Theorem: HasDerivAt.le_of_lip'
File: Mathlib/Analysis/Calculus/Deriv/Basic.lean

tactic: simpa using HasFDerivAt.le_of_lip' hf.hasFDerivAt hC₀ hlip
state_before: 𝕜 : Type u
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type v
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type w
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f✝ f₀ f₁ g : 𝕜 → F
f'✝ f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
f : 𝕜 → F
f' : F
x₀ : 𝕜
hf : HasDerivAt f f' x₀
C : ℝ
hC₀ : 0 ≤ C
hlip : ∀ᶠ (x : 𝕜) in 𝓝 x₀, ‖f x - f x₀‖ ≤ C * ‖x - x₀‖
⊢ ‖f'‖ ≤ C
state_after: no goals
Theorem: CategoryTheory.Functor.shiftIso_add'_hom_app
File: Mathlib/CategoryTheory/Shift/ShiftSequence.lean

tactic: rw [← hnm, ← ha'', ← ha', add_assoc]
state_before: C : Type u_1
A : Type u_2
inst✝⁶ : Category.{?u.58646, u_1} C
inst✝⁵ : Category.{?u.58650, u_2} A
F : C ⥤ A
M : Type u_3
inst✝⁴ : AddMonoid M
inst✝³ : HasShift C M
G : Type u_4
inst✝² : AddGroup G
inst✝¹ : HasShift C G
inst✝ : F.ShiftSequence M
n m mn : M
hnm : m + n = mn
a a' a'' : M
ha' : n + a = a'
ha'' : m + a' = a''
X : C
⊢ mn + a = a''
state_after: no goals

tactic: simp [F.shiftIso_add' n m mn hnm a a' a'' ha' ha'']
state_before: C : Type u_1
A : Type u_2
inst✝⁶ : Category.{u_6, u_1} C
inst✝⁵ : Category.{u_5, u_2} A
F : C ⥤ A
M : Type u_3
inst✝⁴ : AddMonoid M
inst✝³ : HasShift C M
G : Type u_4
inst✝² : AddGroup G
inst✝¹ : HasShift C G
inst✝ : F.ShiftSequence M
n m mn : M
hnm : m + n = mn
a a' a'' : M
ha' : n + a = a'
ha'' : m + a' = a''
X : C
⊢ (F.shiftIso mn a a'' ⋯).hom.app X =
    (F.shift a).map ((shiftFunctorAdd' C m n mn hnm).hom.app X) ≫
      (F.shiftIso n a a' ha').hom.app ((shiftFunctor C m).obj X) ≫ (F.shiftIso m a' a'' ha'').hom.app X
state_after: no goals
Theorem: Complex.cpow_int_mul'
File: Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean

tactic: rw [mul_comm] at hlt hle
state_before: x : ℂ
n : ℤ
hlt : -π < ↑n * x.arg
hle : ↑n * x.arg ≤ π
y : ℂ
⊢ x ^ (↑n * y) = (x ^ n) ^ y
state_after: x : ℂ
n : ℤ
hlt : -π < x.arg * ↑n
hle : x.arg * ↑n ≤ π
y : ℂ
⊢ x ^ (↑n * y) = (x ^ n) ^ y

tactic: rw [cpow_mul, cpow_intCast] <;> simpa [log_im]
state_before: x : ℂ
n : ℤ
hlt : -π < x.arg * ↑n
hle : x.arg * ↑n ≤ π
y : ℂ
⊢ x ^ (↑n * y) = (x ^ n) ^ y
state_after: no goals
Theorem: IntermediateField.aeval_gen_minpoly
File: Mathlib/FieldTheory/Adjoin.lean

tactic: ext
state_before: F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
⊢ (aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0
state_after: case a
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
⊢ ↑((aeval (AdjoinSimple.gen F α)) (minpoly F α)) = ↑0

tactic: convert minpoly.aeval F α
state_before: case a
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
⊢ ↑((aeval (AdjoinSimple.gen F α)) (minpoly F α)) = ↑0
state_after: case h.e'_2
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
⊢ ↑((aeval (AdjoinSimple.gen F α)) (minpoly F α)) = (aeval α) (minpoly F α)

tactic: conv in aeval α => rw [← AdjoinSimple.algebraMap_gen F α]
state_before: case h.e'_2
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
⊢ ↑((aeval (AdjoinSimple.gen F α)) (minpoly F α)) = (aeval α) (minpoly F α)
state_after: case h.e'_2
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
⊢ ↑((aeval (AdjoinSimple.gen F α)) (minpoly F α)) =
    (aeval ((algebraMap (↥F⟮α⟯) E) (AdjoinSimple.gen F α))) (minpoly F α)

tactic: exact (aeval_algebraMap_apply E (AdjoinSimple.gen F α) _).symm
state_before: case h.e'_2
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
⊢ ↑((aeval (AdjoinSimple.gen F α)) (minpoly F α)) =
    (aeval ((algebraMap (↥F⟮α⟯) E) (AdjoinSimple.gen F α))) (minpoly F α)
state_after: no goals
Theorem: isSMulRegular_of_group
File: Mathlib/Algebra/Regular/SMul.lean

tactic: intro x y h
state_before: R : Type u_1
S : Type u_2
M : Type u_3
a b : R
s : S
G : Type u_4
inst✝¹ : Group G
inst✝ : MulAction G R
g : G
⊢ IsSMulRegular R g
state_after: R : Type u_1
S : Type u_2
M : Type u_3
a b : R
s : S
G : Type u_4
inst✝¹ : Group G
inst✝ : MulAction G R
g : G
x y : R
h : (fun x => g • x) x = (fun x => g • x) y
⊢ x = y
Theorem: OrthonormalBasis.addHaar_eq_volume
File: Mathlib/MeasureTheory/Measure/Haar/InnerProductSpace.lean

tactic: rw [Basis.addHaar_eq_iff]
state_before: ι✝ : Type u_1
E : Type u_2
F✝ : Type u_3
inst✝¹¹ : Fintype ι✝
inst✝¹⁰ : NormedAddCommGroup F✝
inst✝⁹ : InnerProductSpace ℝ F✝
inst✝⁸ : FiniteDimensional ℝ F✝
inst✝⁷ : MeasurableSpace F✝
inst✝⁶ : BorelSpace F✝
ι : Type u_4
F : Type u_5
inst✝⁵ : Fintype ι
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
inst✝² : FiniteDimensional ℝ F
inst✝¹ : MeasurableSpace F
inst✝ : BorelSpace F
b : OrthonormalBasis ι ℝ F
⊢ b.toBasis.addHaar = volume
state_after: ι✝ : Type u_1
E : Type u_2
F✝ : Type u_3
inst✝¹¹ : Fintype ι✝
inst✝¹⁰ : NormedAddCommGroup F✝
inst✝⁹ : InnerProductSpace ℝ F✝
inst✝⁸ : FiniteDimensional ℝ F✝
inst✝⁷ : MeasurableSpace F✝
inst✝⁶ : BorelSpace F✝
ι : Type u_4
F : Type u_5
inst✝⁵ : Fintype ι
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
inst✝² : FiniteDimensional ℝ F
inst✝¹ : MeasurableSpace F
inst✝ : BorelSpace F
b : OrthonormalBasis ι ℝ F
⊢ volume ↑b.toBasis.parallelepiped = 1

tactic: exact b.volume_parallelepiped
state_before: ι✝ : Type u_1
E : Type u_2
F✝ : Type u_3
inst✝¹¹ : Fintype ι✝
inst✝¹⁰ : NormedAddCommGroup F✝
inst✝⁹ : InnerProductSpace ℝ F✝
inst✝⁸ : FiniteDimensional ℝ F✝
inst✝⁷ : MeasurableSpace F✝
inst✝⁶ : BorelSpace F✝
ι : Type u_4
F : Type u_5
inst✝⁵ : Fintype ι
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
inst✝² : FiniteDimensional ℝ F
inst✝¹ : MeasurableSpace F
inst✝ : BorelSpace F
b : OrthonormalBasis ι ℝ F
⊢ volume ↑b.toBasis.parallelepiped = 1
state_after: no goals
Theorem: jacobiSym.value_at
File: Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean

tactic: conv_rhs => rw [← prod_factors hb.pos.ne', cast_list_prod, map_list_prod χ]
state_before: a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ J(a | b) = χ ↑b
state_after: a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ J(a | b) = (List.map (⇑χ) (List.map Nat.cast b.factors)).prod

tactic: rw [jacobiSym, List.map_map, ← List.pmap_eq_map Nat.Prime _ _ fun _ => prime_of_mem_factors]
state_before: a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ J(a | b) = (List.map (⇑χ) (List.map Nat.cast b.factors)).prod
state_after: a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ (List.pmap (fun p pp => legendreSym p a) b.factors ⋯).prod =
    (List.pmap (fun a x => (⇑χ ∘ Nat.cast) a) b.factors ⋯).prod

tactic: congr 1
state_before: a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ (List.pmap (fun p pp => legendreSym p a) b.factors ⋯).prod =
    (List.pmap (fun a x => (⇑χ ∘ Nat.cast) a) b.factors ⋯).prod
state_after: case e_a
a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ List.pmap (fun p pp => legendreSym p a) b.factors ⋯ = List.pmap (fun a x => (⇑χ ∘ Nat.cast) a) b.factors ⋯

tactic: apply List.pmap_congr
state_before: case e_a
a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ List.pmap (fun p pp => legendreSym p a) b.factors ⋯ = List.pmap (fun a x => (⇑χ ∘ Nat.cast) a) b.factors ⋯
state_after: case e_a.h
a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ ∀ a_1 ∈ b.factors, ∀ (h₁ : Nat.Prime a_1), Nat.Prime a_1 → legendreSym a_1 a = (⇑χ ∘ Nat.cast) a_1

tactic: exact fun p h pp _ => hp p pp (hb.ne_two_of_dvd_nat <| dvd_of_mem_factors h)
state_before: case e_a.h
a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ ∀ a_1 ∈ b.factors, ∀ (h₁ : Nat.Prime a_1), Nat.Prime a_1 → legendreSym a_1 a = (⇑χ ∘ Nat.cast) a_1
state_after: no goals
Theorem: Set.singleton_unop_op
File: Mathlib/Data/Set/Opposite.lean

tactic: ext
state_before: α : Type u_1
x : αᵒᵖ
⊢ {x.unop}.op = {x}
state_after: case h
α : Type u_1
x x✝ : αᵒᵖ
⊢ x✝ ∈ {x.unop}.op ↔ x✝ ∈ {x}

tactic: constructor
state_before: case h
α : Type u_1
x x✝ : αᵒᵖ
⊢ x✝ ∈ {x.unop}.op ↔ x✝ ∈ {x}
state_after: case h.mp
α : Type u_1
x x✝ : αᵒᵖ
⊢ x✝ ∈ {x.unop}.op → x✝ ∈ {x}

case h.mpr
α : Type u_1
x x✝ : αᵒᵖ
⊢ x✝ ∈ {x} → x✝ ∈ {x.unop}.op

tactic: apply unop_injective
state_before: case h.mp
α : Type u_1
x x✝ : αᵒᵖ
⊢ x✝ ∈ {x.unop}.op → x✝ ∈ {x}
state_after: no goals

tactic: apply op_injective
state_before: case h.mpr
α : Type u_1
x x✝ : αᵒᵖ
⊢ x✝ ∈ {x} → x✝ ∈ {x.unop}.op
state_after: no goals
Theorem: Set.sInter_eq_iInter
File: Mathlib/Data/Set/Lattice.lean

tactic: simp only [← sInter_range, Subtype.range_coe]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
s : Set (Set α)
⊢ ⋂₀ s = ⋂ i, ↑i
state_after: no goals
Theorem: MvPolynomial.weightedHomogeneousComponent_C_mul
File: Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean

tactic: simp only [C_mul', LinearMap.map_smul]
state_before: R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
n : M
r : R
⊢ (weightedHomogeneousComponent w n) (C r * φ) = C r * (weightedHomogeneousComponent w n) φ
state_after: no goals
Theorem: Stream'.map_iterate
File: Mathlib/Data/Stream/Init.lean

tactic: funext n
state_before: α : Type u
β : Type v
δ : Type w
f : α → α
a : α
⊢ iterate f (f a) = map f (iterate f a)
state_after: case h
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
n : ℕ
⊢ iterate f (f a) n = map f (iterate f a) n

tactic: induction' n with n' ih
state_before: case h
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
n : ℕ
⊢ iterate f (f a) n = map f (iterate f a) n
state_after: case h.zero
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
⊢ iterate f (f a) 0 = map f (iterate f a) 0

case h.succ
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
n' : ℕ
ih : iterate f (f a) n' = map f (iterate f a) n'
⊢ iterate f (f a) (n' + 1) = map f (iterate f a) (n' + 1)

tactic: rfl
state_before: case h.zero
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
⊢ iterate f (f a) 0 = map f (iterate f a) 0
state_after: no goals

tactic: unfold map iterate get
state_before: case h.succ
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
n' : ℕ
ih : iterate f (f a) n' = map f (iterate f a) n'
⊢ iterate f (f a) (n' + 1) = map f (iterate f a) (n' + 1)
state_after: case h.succ
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
n' : ℕ
ih : iterate f (f a) n' = map f (iterate f a) n'
⊢ f (iterate f (f a) n') = f (iterate f a (n' + 1))

tactic: rw [map, get] at ih
state_before: case h.succ
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
n' : ℕ
ih : iterate f (f a) n' = map f (iterate f a) n'
⊢ f (iterate f (f a) n') = f (iterate f a (n' + 1))
state_after: case h.succ
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
n' : ℕ
ih : iterate f (f a) n' = f (iterate f a n')
⊢ f (iterate f (f a) n') = f (iterate f a (n' + 1))

tactic: rw [iterate]
state_before: case h.succ
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
n' : ℕ
ih : iterate f (f a) n' = f (iterate f a n')
⊢ f (iterate f (f a) n') = f (iterate f a (n' + 1))
state_after: case h.succ
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
n' : ℕ
ih : iterate f (f a) n' = f (iterate f a n')
⊢ f (iterate f (f a) n') = f (f (iterate f a n'))

tactic: exact congrArg f ih
state_before: case h.succ
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
n' : ℕ
ih : iterate f (f a) n' = f (iterate f a n')
⊢ f (iterate f (f a) n') = f (f (iterate f a n'))
state_after: no goals
Theorem: IsOpen.connectedComponentIn
File: Mathlib/Topology/Connected/LocallyConnected.lean

tactic: rw [isOpen_iff_mem_nhds]
state_before: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s t u v : Set α
inst✝ : LocallyConnectedSpace α
F : Set α
x : α
hF : IsOpen F
⊢ IsOpen (connectedComponentIn F x)
state_after: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s t u v : Set α
inst✝ : LocallyConnectedSpace α
F : Set α
x : α
hF : IsOpen F
⊢ ∀ x_1 ∈ connectedComponentIn F x, connectedComponentIn F x ∈ 𝓝 x_1

tactic: intro y hy
state_before: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s t u v : Set α
inst✝ : LocallyConnectedSpace α
F : Set α
x : α
hF : IsOpen F
⊢ ∀ x_1 ∈ connectedComponentIn F x, connectedComponentIn F x ∈ 𝓝 x_1
state_after: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s t u v : Set α
inst✝ : LocallyConnectedSpace α
F : Set α
x : α
hF : IsOpen F
y : α
hy : y ∈ connectedComponentIn F x
⊢ connectedComponentIn F x ∈ 𝓝 y

tactic: rw [connectedComponentIn_eq hy]
state_before: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s t u v : Set α
inst✝ : LocallyConnectedSpace α
F : Set α
x : α
hF : IsOpen F
y : α
hy : y ∈ connectedComponentIn F x
⊢ connectedComponentIn F x ∈ 𝓝 y
state_after: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s t u v : Set α
inst✝ : LocallyConnectedSpace α
F : Set α
x : α
hF : IsOpen F
y : α
hy : y ∈ connectedComponentIn F x
⊢ connectedComponentIn F y ∈ 𝓝 y

tactic: exact connectedComponentIn_mem_nhds (hF.mem_nhds <| connectedComponentIn_subset F x hy)
state_before: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s t u v : Set α
inst✝ : LocallyConnectedSpace α
F : Set α
x : α
hF : IsOpen F
y : α
hy : y ∈ connectedComponentIn F x
⊢ connectedComponentIn F y ∈ 𝓝 y
state_after: no goals
Theorem: ZMod.cast_add
File: Mathlib/Data/ZMod/Basic.lean

tactic: cases n
state_before: n : ℕ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
h : m ∣ n
a b : ZMod n
⊢ (a + b).cast = a.cast + b.cast
state_after: case zero
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
h : m ∣ 0
a b : ZMod 0
⊢ (a + b).cast = a.cast + b.cast

case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ n✝ + 1
a b : ZMod (n✝ + 1)
⊢ (a + b).cast = a.cast + b.cast

tactic: symm
state_before: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ n✝ + 1
a b : ZMod (n✝ + 1)
⊢ (a + b).cast = a.cast + b.cast
state_after: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ n✝ + 1
a b : ZMod (n✝ + 1)
⊢ a.cast + b.cast = (a + b).cast

tactic: dsimp [ZMod, ZMod.cast]
state_before: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ n✝ + 1
a b : ZMod (n✝ + 1)
⊢ a.cast + b.cast = (a + b).cast
state_after: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ n✝ + 1
a b : ZMod (n✝ + 1)
⊢ ↑a.val + ↑b.val = ↑(val (a + b))

tactic: erw [← Nat.cast_add, ← sub_eq_zero, ← Nat.cast_sub (Nat.mod_le _ _),
  @CharP.cast_eq_zero_iff R _ m]
state_before: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ n✝ + 1
a b : ZMod (n✝ + 1)
⊢ ↑a.val + ↑b.val = ↑(val (a + b))
state_after: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ n✝ + 1
a b : ZMod (n✝ + 1)
⊢ m ∣ a.val + b.val - (a.val + b.val) % n✝.succ

tactic: exact h.trans (Nat.dvd_sub_mod _)
state_before: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ n✝ + 1
a b : ZMod (n✝ + 1)
⊢ m ∣ a.val + b.val - (a.val + b.val) % n✝.succ
state_after: no goals

tactic: apply Int.cast_add
state_before: case zero
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
h : m ∣ 0
a b : ZMod 0
⊢ (a + b).cast = a.cast + b.cast
state_after: no goals
Theorem: Multiset.map_univ
File: Mathlib/Data/Multiset/Fintype.lean

tactic: erw [← Multiset.map_map, Multiset.map_univ_coe]
state_before: α : Type u_1
inst✝ : DecidableEq α
m✝ : Multiset α
β : Type u_2
m : Multiset α
f : α → β
⊢ map (fun x => f x.fst) Finset.univ.val = map f m
state_after: no goals
Theorem: Commute.inv_mul_cancel
File: Mathlib/Algebra/Group/Commute/Basic.lean

tactic: rw [h.inv_left.eq, inv_mul_cancel_right]
state_before: G : Type u_1
inst✝ : Group G
a b : G
h : Commute a b
⊢ a⁻¹ * b * a = b
state_after: no goals