1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Nat.exists_prime_lt_and_le_two_mul
File: Mathlib/NumberTheory/Bertrand.lean

tactic: cases' lt_or_le 511 n with h h
state_before: n : ℕ
hn0 : n ≠ 0
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
state_after: case inl
n : ℕ
hn0 : n ≠ 0
h : 511 < n
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n

case inr
n : ℕ
hn0 : n ≠ 0
h : n ≤ 511
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n

tactic: replace h : n < 521 := h.trans_lt (by norm_num1)
state_before: case inr
n : ℕ
hn0 : n ≠ 0
h : n ≤ 511
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
state_after: case inr
n : ℕ
hn0 : n ≠ 0
h : n < 521
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n

tactic: revert h
state_before: case inr
n : ℕ
hn0 : n ≠ 0
h : n < 521
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
state_after: case inr
n : ℕ
hn0 : n ≠ 0
⊢ n < 521 → ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n

tactic: open Lean Elab Tactic in
run_tac do
  for i in [317, 163, 83, 43, 23, 13, 7, 5, 3, 2] do
    let i : Term := quote i
    evalTactic <| ←
      `(tactic| refine exists_prime_lt_and_le_two_mul_succ $i (by norm_num1) (by norm_num1) ?_)
exact fun h2 => ⟨2, prime_two, h2, Nat.mul_le_mul_left 2 (Nat.pos_of_ne_zero hn0)⟩
state_before: case inr
n : ℕ
hn0 : n ≠ 0
⊢ n < 521 → ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
state_after: no goals

tactic: exact exists_prime_lt_and_le_two_mul_eventually n h
state_before: case inl
n : ℕ
hn0 : n ≠ 0
h : 511 < n
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
state_after: no goals

tactic: norm_num1
state_before: n : ℕ
hn0 : n ≠ 0
h : n ≤ 511
⊢ 511 < 521
state_after: no goals

tactic: run_tac do
  for i in [317, 163, 83, 43, 23, 13, 7, 5, 3, 2] do
    let i : Term := quote i
    evalTactic <| ←
      `(tactic| refine exists_prime_lt_and_le_two_mul_succ $i (by norm_num1) (by norm_num1) ?_)
state_before: case inr
n : ℕ
hn0 : n ≠ 0
⊢ n < 521 → ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
state_after: case inr
n : ℕ
hn0 : n ≠ 0
⊢ n < 2 → ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n

tactic: exact fun h2 => ⟨2, prime_two, h2, Nat.mul_le_mul_left 2 (Nat.pos_of_ne_zero hn0)⟩
state_before: case inr
n : ℕ
hn0 : n ≠ 0
⊢ n < 2 → ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
state_after: no goals
Theorem: MvPolynomial.coeffs_eq_empty_of_subsingleton
File: Mathlib/Algebra/MvPolynomial/Basic.lean

tactic: simpa [coeffs] using Subsingleton.eq_zero p
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S₁
p✝ q : MvPolynomial σ R
inst✝ : Subsingleton R
p : MvPolynomial σ R
⊢ p.coeffs = ∅
state_after: no goals
Theorem: MeasureTheory.SimpleFunc.lintegral_map'
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

tactic: simp only [preimage, eq]
state_before: α : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
β : Type u_5
inst✝ : MeasurableSpace β
μ' : Measure β
f : α →ₛ ℝ≥0∞
g : β →ₛ ℝ≥0∞
m' : α → β
eq : ∀ (a : α), ↑f a = ↑g (m' a)
h : ∀ (s : Set β), MeasurableSet s → μ' s = μ (m' ⁻¹' s)
y : ℝ≥0∞
⊢ μ (↑f ⁻¹' {y}) = μ' (↑g ⁻¹' {y})
state_after: α : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
β : Type u_5
inst✝ : MeasurableSpace β
μ' : Measure β
f : α →ₛ ℝ≥0∞
g : β →ₛ ℝ≥0∞
m' : α → β
eq : ∀ (a : α), ↑f a = ↑g (m' a)
h : ∀ (s : Set β), MeasurableSet s → μ' s = μ (m' ⁻¹' s)
y : ℝ≥0∞
⊢ μ {x | ↑g (m' x) ∈ {y}} = μ' {x | ↑g x ∈ {y}}

tactic: exact (h (g ⁻¹' {y}) (g.measurableSet_preimage _)).symm
state_before: α : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
β : Type u_5
inst✝ : MeasurableSpace β
μ' : Measure β
f : α →ₛ ℝ≥0∞
g : β →ₛ ℝ≥0∞
m' : α → β
eq : ∀ (a : α), ↑f a = ↑g (m' a)
h : ∀ (s : Set β), MeasurableSet s → μ' s = μ (m' ⁻¹' s)
y : ℝ≥0∞
⊢ μ {x | ↑g (m' x) ∈ {y}} = μ' {x | ↑g x ∈ {y}}
state_after: no goals
Theorem: List.sublists'_reverse
File: Mathlib/Data/List/Sublists.lean

tactic: simp only [sublists_eq_sublists', map_map, map_id'' reverse_reverse, Function.comp]
state_before: α : Type u
β : Type v
γ : Type w
l : List α
⊢ l.reverse.sublists' = map reverse l.sublists
state_after: no goals
Theorem: CompHaus.finiteCoproduct.ι_injective
File: Mathlib/Topology/Category/CompHaus/Limits.lean

tactic: intro x y hxy
state_before: α : Type w
inst✝ : Finite α
X : α → CompHaus
a : α
⊢ Function.Injective ⇑(ι X a)
state_after: α : Type w
inst✝ : Finite α
X : α → CompHaus
a : α
x y : (forget CompHaus).obj (X a)
hxy : (ι X a) x = (ι X a) y
⊢ x = y

tactic: exact eq_of_heq (Sigma.ext_iff.mp hxy).2
state_before: α : Type w
inst✝ : Finite α
X : α → CompHaus
a : α
x y : (forget CompHaus).obj (X a)
hxy : (ι X a) x = (ι X a) y
⊢ x = y
state_after: no goals
Theorem: AlgHom.map_adjoin_singleton
File: Mathlib/RingTheory/Adjoin/Basic.lean

tactic: rw [map_adjoin, Set.image_singleton]
state_before: R : Type uR
S : Type uS
A : Type uA
B : Type uB
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
e : A →ₐ[R] B
x : A
⊢ Subalgebra.map e (adjoin R {x}) = adjoin R {e x}
state_after: no goals
Theorem: continuousWithinAt_univ
File: Mathlib/Topology/ContinuousOn.lean

tactic: rw [ContinuousAt, ContinuousWithinAt, nhdsWithin_univ]
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 : α → β
x : α
⊢ ContinuousWithinAt f univ x ↔ ContinuousAt f x
state_after: no goals
Theorem: Set.preimage_mul_const_Ioc
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [← Ioi_inter_Iic, h]
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a✝ a b c : α
h : 0 < c
⊢ (fun x => x * c) ⁻¹' Ioc a b = Ioc (a / c) (b / c)
state_after: no goals
Theorem: Polynomial.reverse_mul_of_domain
File: Mathlib/Algebra/Polynomial/Reverse.lean

tactic: by_cases f0 : f = 0
state_before: R✝ : Type u_1
inst✝² : Semiring R✝
f✝ : R✝[X]
R : Type u_2
inst✝¹ : Ring R
inst✝ : NoZeroDivisors R
f g : R[X]
⊢ (f * g).reverse = f.reverse * g.reverse
state_after: case pos
R✝ : Type u_1
inst✝² : Semiring R✝
f✝ : R✝[X]
R : Type u_2
inst✝¹ : Ring R
inst✝ : NoZeroDivisors R
f g : R[X]
f0 : f = 0
⊢ (f * g).reverse = f.reverse * g.reverse

case neg
R✝ : Type u_1
inst✝² : Semiring R✝
f✝ : R✝[X]
R : Type u_2
inst✝¹ : Ring R
inst✝ : NoZeroDivisors R
f g : R[X]
f0 : ¬f = 0
⊢ (f * g).reverse = f.reverse * g.reverse

tactic: by_cases g0 : g = 0
state_before: case neg
R✝ : Type u_1
inst✝² : Semiring R✝
f✝ : R✝[X]
R : Type u_2
inst✝¹ : Ring R
inst✝ : NoZeroDivisors R
f g : R[X]
f0 : ¬f = 0
⊢ (f * g).reverse = f.reverse * g.reverse
state_after: case pos
R✝ : Type u_1
inst✝² : Semiring R✝
f✝ : R✝[X]
R : Type u_2
inst✝¹ : Ring R
inst✝ : NoZeroDivisors R
f g : R[X]
f0 : ¬f = 0
g0 : g = 0
⊢ (f * g).reverse = f.reverse * g.reverse

case neg
R✝ : Type u_1
inst✝² : Semiring R✝
f✝ : R✝[X]
R : Type u_2
inst✝¹ : Ring R
inst✝ : NoZeroDivisors R
f g : R[X]
f0 : ¬f = 0
g0 : ¬g = 0
⊢ (f * g).reverse = f.reverse * g.reverse

tactic: simp [reverse_mul, *]
state_before: case neg
R✝ : Type u_1
inst✝² : Semiring R✝
f✝ : R✝[X]
R : Type u_2
inst✝¹ : Ring R
inst✝ : NoZeroDivisors R
f g : R[X]
f0 : ¬f = 0
g0 : ¬g = 0
⊢ (f * g).reverse = f.reverse * g.reverse
state_after: no goals

tactic: simp only [f0, zero_mul, reverse_zero]
state_before: case pos
R✝ : Type u_1
inst✝² : Semiring R✝
f✝ : R✝[X]
R : Type u_2
inst✝¹ : Ring R
inst✝ : NoZeroDivisors R
f g : R[X]
f0 : f = 0
⊢ (f * g).reverse = f.reverse * g.reverse
state_after: no goals

tactic: rw [g0, mul_zero, reverse_zero, mul_zero]
state_before: case pos
R✝ : Type u_1
inst✝² : Semiring R✝
f✝ : R✝[X]
R : Type u_2
inst✝¹ : Ring R
inst✝ : NoZeroDivisors R
f g : R[X]
f0 : ¬f = 0
g0 : g = 0
⊢ (f * g).reverse = f.reverse * g.reverse
state_after: no goals
Theorem: UpperSet.Ici_sSup
File: Mathlib/Order/UpperLower/Basic.lean

tactic: simp only [mem_Ici_iff, mem_iSup_iff, sSup_le_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝ : CompleteLattice α
S : Set α
c : α
⊢ c ∈ Ici (sSup S) ↔ c ∈ ⨆ a ∈ S, Ici a
state_after: no goals
Theorem: SubMulAction.mem_orbit_subMul_iff
File: Mathlib/GroupTheory/GroupAction/SubMulAction.lean

tactic: rw [← val_preimage_orbit, Set.mem_preimage]
state_before: S : Type u'
T : Type u''
R : Type u
M : Type v
inst✝¹ : Monoid R
inst✝ : MulAction R M
p : SubMulAction R M
x m : ↥p
⊢ x ∈ MulAction.orbit R m ↔ ↑x ∈ MulAction.orbit R ↑m
state_after: no goals
Theorem: MeasureTheory.OuterMeasure.boundedBy_eq_ofFunction
File: Mathlib/MeasureTheory/OuterMeasure/OfFunction.lean

tactic: have : (fun s : Set α => ⨆ _ : s.Nonempty, m s) = m := by
  ext1 t
  rcases t.eq_empty_or_nonempty with h | h <;> simp [h, Set.not_nonempty_empty, m_empty]
state_before: α : Type u_1
m : Set α → ℝ≥0∞
m_empty : m ∅ = 0
s : Set α
⊢ (boundedBy m) s = (OuterMeasure.ofFunction m m_empty) s
state_after: α : Type u_1
m : Set α → ℝ≥0∞
m_empty : m ∅ = 0
s : Set α
this : (fun s => ⨆ (_ : s.Nonempty), m s) = m
⊢ (boundedBy m) s = (OuterMeasure.ofFunction m m_empty) s

tactic: simp [boundedBy, this]
state_before: α : Type u_1
m : Set α → ℝ≥0∞
m_empty : m ∅ = 0
s : Set α
this : (fun s => ⨆ (_ : s.Nonempty), m s) = m
⊢ (boundedBy m) s = (OuterMeasure.ofFunction m m_empty) s
state_after: no goals

tactic: ext1 t
state_before: α : Type u_1
m : Set α → ℝ≥0∞
m_empty : m ∅ = 0
s : Set α
⊢ (fun s => ⨆ (_ : s.Nonempty), m s) = m
state_after: case h
α : Type u_1
m : Set α → ℝ≥0∞
m_empty : m ∅ = 0
s t : Set α
⊢ ⨆ (_ : t.Nonempty), m t = m t

tactic: rcases t.eq_empty_or_nonempty with h | h <;> simp [h, Set.not_nonempty_empty, m_empty]
state_before: case h
α : Type u_1
m : Set α → ℝ≥0∞
m_empty : m ∅ = 0
s t : Set α
⊢ ⨆ (_ : t.Nonempty), m t = m t
state_after: no goals
Theorem: Polynomial.natDegree_multiset_prod_X_sub_C_eq_card
File: Mathlib/Algebra/Polynomial/RingDivision.lean

tactic: rw [natDegree_multiset_prod_of_monic, Multiset.map_map]
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]
s : Multiset R
⊢ (Multiset.map (fun a => X - C a) s).prod.natDegree = Multiset.card s
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]
s : Multiset R
⊢ (Multiset.map (natDegree ∘ fun a => X - C a) s).sum = Multiset.card s

case h
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
s : Multiset R
⊢ ∀ f ∈ Multiset.map (fun a => X - C a) s, f.Monic

tactic: exact Multiset.forall_mem_map_iff.2 fun a _ => monic_X_sub_C a
state_before: case h
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
s : Multiset R
⊢ ∀ f ∈ Multiset.map (fun a => X - C a) s, f.Monic
state_after: no goals
Theorem: inner_map_polarization
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: simp only [map_add, map_sub, inner_add_left, inner_add_right, LinearMap.map_smul, inner_smul_left,
  inner_smul_right, Complex.conj_I, ← pow_two, Complex.I_sq, inner_sub_left, inner_sub_right,
  mul_add, ← mul_assoc, mul_neg, neg_neg, sub_neg_eq_add, one_mul, neg_one_mul, mul_sub, sub_sub]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁶ : _root_.RCLike 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : InnerProductSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
V : Type u_4
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℂ V
T : V →ₗ[ℂ] V
x y : V
⊢ ⟪T y, x⟫_ℂ =
    (⟪T (x + y), x + y⟫_ℂ - ⟪T (x - y), x - y⟫_ℂ + Complex.I * ⟪T (x + Complex.I • y), x + Complex.I • y⟫_ℂ -
        Complex.I * ⟪T (x - Complex.I • y), x - Complex.I • y⟫_ℂ) /
      4
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁶ : _root_.RCLike 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : InnerProductSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
V : Type u_4
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℂ V
T : V →ₗ[ℂ] V
x y : V
⊢ ⟪T y, x⟫_ℂ =
    (⟪T x, x⟫_ℂ + ⟪T y, x⟫_ℂ + (⟪T x, y⟫_ℂ + ⟪T y, y⟫_ℂ) - (⟪T x, x⟫_ℂ - (⟪T y, x⟫_ℂ + (⟪T x, y⟫_ℂ - ⟪T y, y⟫_ℂ))) +
          (Complex.I * ⟪T x, x⟫_ℂ + ⟪T y, x⟫_ℂ + (-⟪T x, y⟫_ℂ + Complex.I * ⟪T y, y⟫_ℂ)) -
        (Complex.I * ⟪T x, x⟫_ℂ - (⟪T y, x⟫_ℂ + (-⟪T x, y⟫_ℂ - Complex.I * ⟪T y, y⟫_ℂ)))) /
      4

tactic: ring
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁶ : _root_.RCLike 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : InnerProductSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
V : Type u_4
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℂ V
T : V →ₗ[ℂ] V
x y : V
⊢ ⟪T y, x⟫_ℂ =
    (⟪T x, x⟫_ℂ + ⟪T y, x⟫_ℂ + (⟪T x, y⟫_ℂ + ⟪T y, y⟫_ℂ) - (⟪T x, x⟫_ℂ - (⟪T y, x⟫_ℂ + (⟪T x, y⟫_ℂ - ⟪T y, y⟫_ℂ))) +
          (Complex.I * ⟪T x, x⟫_ℂ + ⟪T y, x⟫_ℂ + (-⟪T x, y⟫_ℂ + Complex.I * ⟪T y, y⟫_ℂ)) -
        (Complex.I * ⟪T x, x⟫_ℂ - (⟪T y, x⟫_ℂ + (-⟪T x, y⟫_ℂ - Complex.I * ⟪T y, y⟫_ℂ)))) /
      4
state_after: no goals
Theorem: PrimeSpectrum.isCompact_basicOpen
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: rw [← localization_away_comap_range (Localization (Submonoid.powers f))]
state_before: R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : R
⊢ IsCompact ↑(basicOpen f)
state_after: R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : R
⊢ IsCompact (Set.range ⇑(comap (algebraMap R (Localization (Submonoid.powers f)))))

tactic: exact isCompact_range (map_continuous _)
state_before: R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : R
⊢ IsCompact (Set.range ⇑(comap (algebraMap R (Localization (Submonoid.powers f)))))
state_after: no goals
Theorem: StrongFEPair.hf_zero'
File: Mathlib/NumberTheory/LSeries/AbstractFuncEq.lean

tactic: have := P.hg₀ ▸ P.hf_zero r
state_before: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
P : StrongFEPair E
r : ℝ
⊢ P.f =O[𝓝[>] 0] fun x => x ^ r
state_after: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
P : StrongFEPair E
r : ℝ
this : (fun x => P.f x - (P.ε * ↑(x ^ (-P.k))) • 0) =O[𝓝[>] 0] fun x => x ^ r
⊢ P.f =O[𝓝[>] 0] fun x => x ^ r

tactic: simpa only [smul_zero, sub_zero]
state_before: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
P : StrongFEPair E
r : ℝ
this : (fun x => P.f x - (P.ε * ↑(x ^ (-P.k))) • 0) =O[𝓝[>] 0] fun x => x ^ r
⊢ P.f =O[𝓝[>] 0] fun x => x ^ r
state_after: no goals
Theorem: WittVector.mul_polyOfInterest_aux2
File: Mathlib/RingTheory/WittVector/MulCoeff.lean

tactic: convert mul_polyOfInterest_aux1 p n
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝ : CommRing k
n : ℕ
⊢ ↑p ^ n * wittMul p n + wittPolyProdRemainder p n = wittPolyProd p n
state_after: case h.e'_2
p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝ : CommRing k
n : ℕ
⊢ ↑p ^ n * wittMul p n + wittPolyProdRemainder p n = ∑ i ∈ range (n + 1), ↑p ^ i * wittMul p i ^ p ^ (n - i)

tactic: rw [sum_range_succ, add_comm, Nat.sub_self, pow_zero, pow_one]
state_before: case h.e'_2
p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝ : CommRing k
n : ℕ
⊢ ↑p ^ n * wittMul p n + wittPolyProdRemainder p n = ∑ i ∈ range (n + 1), ↑p ^ i * wittMul p i ^ p ^ (n - i)
state_after: case h.e'_2
p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝ : CommRing k
n : ℕ
⊢ wittPolyProdRemainder p n + ↑p ^ n * wittMul p n =
    ∑ x ∈ range n, ↑p ^ x * wittMul p x ^ p ^ (n - x) + ↑p ^ n * wittMul p n

tactic: rfl
state_before: case h.e'_2
p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝ : CommRing k
n : ℕ
⊢ wittPolyProdRemainder p n + ↑p ^ n * wittMul p n =
    ∑ x ∈ range n, ↑p ^ x * wittMul p x ^ p ^ (n - x) + ↑p ^ n * wittMul p n
state_after: no goals
Theorem: CategoryTheory.Limits.Trident.equalizer_ext
File: Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean

tactic: rw [← s.app_zero (Classical.arbitrary J), reassoc_of% h]
state_before: J : Type w
C : Type u
inst✝¹ : Category.{v, u} C
X Y : C
f : J → (X ⟶ Y)
inst✝ : Nonempty J
s : Trident f
W : C
k l : W ⟶ s.pt
h : k ≫ s.ι = l ≫ s.ι
⊢ k ≫ s.π.app one = l ≫ s.π.app one
state_after: no goals
Theorem: Matrix.eq_zero_of_vecMul_eq_zero
File: Mathlib/LinearAlgebra/Matrix/Nondegenerate.lean

tactic: rw [dotProduct_mulVec, hv, zero_dotProduct]
state_before: m : Type u_1
R : Type u_2
A : Type u_3
inst✝⁴ : Fintype m
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DecidableEq m
M : Matrix m m A
hM : M.det ≠ 0
v : m → A
hv : v ᵥ* M = 0
w : m → A
⊢ v ⬝ᵥ M *ᵥ w = 0
state_after: no goals
Theorem: pow_two_pow_sub_pow_two_pow
File: Mathlib/NumberTheory/Multiplicity.lean

tactic: induction' n with d hd
state_before: R : Type u_1
n✝ : ℕ
inst✝ : CommRing R
x y : R
n : ℕ
⊢ x ^ 2 ^ n - y ^ 2 ^ n = (∏ i ∈ range n, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)
state_after: case zero
R : Type u_1
n : ℕ
inst✝ : CommRing R
x y : R
⊢ x ^ 2 ^ 0 - y ^ 2 ^ 0 = (∏ i ∈ range 0, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)

case succ
R : Type u_1
n : ℕ
inst✝ : CommRing R
x y : R
d : ℕ
hd : x ^ 2 ^ d - y ^ 2 ^ d = (∏ i ∈ range d, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)
⊢ x ^ 2 ^ (d + 1) - y ^ 2 ^ (d + 1) = (∏ i ∈ range (d + 1), (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)

tactic: simp only [pow_zero, pow_one, range_zero, prod_empty, one_mul, Nat.zero_eq]
state_before: case zero
R : Type u_1
n : ℕ
inst✝ : CommRing R
x y : R
⊢ x ^ 2 ^ 0 - y ^ 2 ^ 0 = (∏ i ∈ range 0, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)
state_after: no goals

tactic: suffices x ^ 2 ^ d.succ - y ^ 2 ^ d.succ = (x ^ 2 ^ d + y ^ 2 ^ d) * (x ^ 2 ^ d - y ^ 2 ^ d) by
  rw [this, hd, Finset.prod_range_succ, ← mul_assoc, mul_comm (x ^ 2 ^ d + y ^ 2 ^ d)]
state_before: case succ
R : Type u_1
n : ℕ
inst✝ : CommRing R
x y : R
d : ℕ
hd : x ^ 2 ^ d - y ^ 2 ^ d = (∏ i ∈ range d, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)
⊢ x ^ 2 ^ (d + 1) - y ^ 2 ^ (d + 1) = (∏ i ∈ range (d + 1), (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)
state_after: case succ
R : Type u_1
n : ℕ
inst✝ : CommRing R
x y : R
d : ℕ
hd : x ^ 2 ^ d - y ^ 2 ^ d = (∏ i ∈ range d, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)
⊢ x ^ 2 ^ d.succ - y ^ 2 ^ d.succ = (x ^ 2 ^ d + y ^ 2 ^ d) * (x ^ 2 ^ d - y ^ 2 ^ d)

tactic: rw [Nat.succ_eq_add_one]
state_before: case succ
R : Type u_1
n : ℕ
inst✝ : CommRing R
x y : R
d : ℕ
hd : x ^ 2 ^ d - y ^ 2 ^ d = (∏ i ∈ range d, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)
⊢ x ^ 2 ^ d.succ - y ^ 2 ^ d.succ = (x ^ 2 ^ d + y ^ 2 ^ d) * (x ^ 2 ^ d - y ^ 2 ^ d)
state_after: case succ
R : Type u_1
n : ℕ
inst✝ : CommRing R
x y : R
d : ℕ
hd : x ^ 2 ^ d - y ^ 2 ^ d = (∏ i ∈ range d, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)
⊢ x ^ 2 ^ (d + 1) - y ^ 2 ^ (d + 1) = (x ^ 2 ^ d + y ^ 2 ^ d) * (x ^ 2 ^ d - y ^ 2 ^ d)

tactic: ring
state_before: case succ
R : Type u_1
n : ℕ
inst✝ : CommRing R
x y : R
d : ℕ
hd : x ^ 2 ^ d - y ^ 2 ^ d = (∏ i ∈ range d, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)
⊢ x ^ 2 ^ (d + 1) - y ^ 2 ^ (d + 1) = (x ^ 2 ^ d + y ^ 2 ^ d) * (x ^ 2 ^ d - y ^ 2 ^ d)
state_after: no goals

tactic: rw [this, hd, Finset.prod_range_succ, ← mul_assoc, mul_comm (x ^ 2 ^ d + y ^ 2 ^ d)]
state_before: R : Type u_1
n : ℕ
inst✝ : CommRing R
x y : R
d : ℕ
hd : x ^ 2 ^ d - y ^ 2 ^ d = (∏ i ∈ range d, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)
this : x ^ 2 ^ d.succ - y ^ 2 ^ d.succ = (x ^ 2 ^ d + y ^ 2 ^ d) * (x ^ 2 ^ d - y ^ 2 ^ d)
⊢ x ^ 2 ^ (d + 1) - y ^ 2 ^ (d + 1) = (∏ i ∈ range (d + 1), (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)
state_after: no goals
Theorem: norm_of_subsingleton'
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: rw [Subsingleton.elim a 1, norm_one']
state_before: 𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝³ : SeminormedGroup E
inst✝² : SeminormedGroup F
inst✝¹ : SeminormedGroup G
s : Set E
a✝ a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
inst✝ : Subsingleton E
a : E
⊢ ‖a‖ = 0
state_after: no goals
Theorem: Finset.card_pair_eq_one_or_two
File: Mathlib/Data/Finset/Card.lean

tactic: simp [card_insert_eq_ite]
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t : Finset α
a b : α
inst✝ : DecidableEq α
⊢ {a, b}.card = 1 ∨ {a, b}.card = 2
state_after: α : Type u_1
β : Type u_2
R : Type u_3
s t : Finset α
a b : α
inst✝ : DecidableEq α
⊢ a = b ∨ ¬a = b

tactic: tauto
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t : Finset α
a b : α
inst✝ : DecidableEq α
⊢ a = b ∨ ¬a = b
state_after: no goals
Theorem: PiLp.nndist_eq_of_L2
File: Mathlib/Analysis/NormedSpace/PiLp.lean

tactic: push_cast
state_before: p : ℝ≥0∞
𝕜 : Type u_1
ι : Type u_2
α : ι → Type u_3
β✝ : ι → Type u_4
inst✝² : Fact (1 ≤ p)
inst✝¹ : Fintype ι
β : ι → Type u_5
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x y : PiLp 2 β
⊢ ↑(nndist x y) = ↑(NNReal.sqrt (∑ i : ι, nndist (x i) (y i) ^ 2))
state_after: p : ℝ≥0∞
𝕜 : Type u_1
ι : Type u_2
α : ι → Type u_3
β✝ : ι → Type u_4
inst✝² : Fact (1 ≤ p)
inst✝¹ : Fintype ι
β : ι → Type u_5
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x y : PiLp 2 β
⊢ dist x y = √(∑ x_1 : ι, dist (x x_1) (y x_1) ^ 2)

tactic: exact dist_eq_of_L2 _ _
state_before: p : ℝ≥0∞
𝕜 : Type u_1
ι : Type u_2
α : ι → Type u_3
β✝ : ι → Type u_4
inst✝² : Fact (1 ≤ p)
inst✝¹ : Fintype ι
β : ι → Type u_5
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x y : PiLp 2 β
⊢ dist x y = √(∑ x_1 : ι, dist (x x_1) (y x_1) ^ 2)
state_after: no goals
Theorem: CategoryTheory.predicateShift_predicateShift
File: Mathlib/CategoryTheory/Shift/Predicate.lean

tactic: ext X
state_before: C : Type u_1
inst✝³ : Category.{u_3, u_1} C
P : C → Prop
A : Type u_2
inst✝² : AddMonoid A
inst✝¹ : HasShift C A
a b c : A
h : a + b = c
inst✝ : ClosedUnderIsomorphisms P
⊢ PredicateShift (PredicateShift P b) a = PredicateShift P c
state_after: case h.a
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
P : C → Prop
A : Type u_2
inst✝² : AddMonoid A
inst✝¹ : HasShift C A
a b c : A
h : a + b = c
inst✝ : ClosedUnderIsomorphisms P
X : C
⊢ PredicateShift (PredicateShift P b) a X ↔ PredicateShift P c X

tactic: exact mem_iff_of_iso _ ((shiftFunctorAdd' C a b c h).symm.app X)
state_before: case h.a
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
P : C → Prop
A : Type u_2
inst✝² : AddMonoid A
inst✝¹ : HasShift C A
a b c : A
h : a + b = c
inst✝ : ClosedUnderIsomorphisms P
X : C
⊢ PredicateShift (PredicateShift P b) a X ↔ PredicateShift P c X
state_after: no goals
Theorem: RCLike.pos_iff_exists_ofReal
File: Mathlib/Analysis/RCLike/Basic.lean

tactic: simp_rw [pos_iff (K := K), ext_iff (K := K)]
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
⊢ 0 < z ↔ ∃ x > 0, ↑x = z
state_after: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
⊢ 0 < re z ∧ im z = 0 ↔ ∃ x > 0, re ↑x = re z ∧ im ↑x = im z

tactic: aesop
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
⊢ 0 < re z ∧ im z = 0 ↔ ∃ x > 0, re ↑x = re z ∧ im ↑x = im z
state_after: no goals
Theorem: Polynomial.smeval_C
File: Mathlib/Algebra/Polynomial/Smeval.lean

tactic: simp only [smeval_eq_sum, smul_pow, zero_smul, sum_C_index]
state_before: R : Type u_1
inst✝³ : Semiring R
r : R
p : R[X]
S : Type u_2
inst✝² : AddCommMonoid S
inst✝¹ : Pow S ℕ
inst✝ : MulActionWithZero R S
x : S
⊢ (C r).smeval x = r • x ^ 0
state_after: no goals
Theorem: UniqueFactorizationMonoid.factors_zero
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: simp [factors]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
⊢ factors 0 = 0
state_after: no goals
Theorem: Real.Angle.coe_toIocMod
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: rw [angle_eq_iff_two_pi_dvd_sub]
state_before: θ ψ : ℝ
⊢ ↑(toIocMod two_pi_pos ψ θ) = ↑θ
state_after: θ ψ : ℝ
⊢ ∃ k, toIocMod two_pi_pos ψ θ - θ = 2 * π * ↑k

tactic: refine ⟨-toIocDiv two_pi_pos ψ θ, ?_⟩
state_before: θ ψ : ℝ
⊢ ∃ k, toIocMod two_pi_pos ψ θ - θ = 2 * π * ↑k
state_after: θ ψ : ℝ
⊢ toIocMod two_pi_pos ψ θ - θ = 2 * π * ↑(-toIocDiv two_pi_pos ψ θ)

tactic: rw [toIocMod_sub_self, zsmul_eq_mul, mul_comm]
state_before: θ ψ : ℝ
⊢ toIocMod two_pi_pos ψ θ - θ = 2 * π * ↑(-toIocDiv two_pi_pos ψ θ)
state_after: no goals
Theorem: singleton_mul_ball
File: Mathlib/Analysis/Normed/Group/Pointwise.lean

tactic: simp only [preimage_mul_ball, image_mul_left, singleton_mul, div_inv_eq_mul, mul_comm y x]
state_before: E : Type u_1
inst✝ : SeminormedCommGroup E
ε δ : ℝ
s t : Set E
x y : E
⊢ {x} * ball y δ = ball (x * y) δ
state_after: no goals