1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: MvQPF.liftpPreservation_iff_uniform
File: Mathlib/Data/QPF/Multivariate/Basic.lean

tactic: rw [← suppPreservation_iff_liftpPreservation, suppPreservation_iff_isUniform]
state_before: n : ℕ
F : TypeVec.{u} n → Type u_1
q : MvQPF F
⊢ LiftPPreservation ↔ IsUniform
state_after: no goals
Theorem: Polynomial.X_pow_sub_one_splits
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean

tactic: rw [splits_iff_card_roots, ← nthRoots, IsPrimitiveRoot.card_nthRoots_one h, natDegree_X_pow_sub_C]
state_before: K : Type u_1
inst✝ : Field K
ζ : K
n : ℕ
h : IsPrimitiveRoot ζ n
⊢ Splits (RingHom.id K) (X ^ n - C 1)
state_after: no goals
Theorem: Ioc_subset_closure_interior
File: Mathlib/Topology/Order/DenselyOrdered.lean

tactic: rcases eq_or_ne a b with (rfl | h)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a✝ b✝ : α
s : Set α
a b : α
⊢ Ioc a b ⊆ closure (interior (Ioc a b))
state_after: case inl
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a✝ b : α
s : Set α
a : α
⊢ Ioc a a ⊆ closure (interior (Ioc a a))

case inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a✝ b✝ : α
s : Set α
a b : α
h : a ≠ b
⊢ Ioc a b ⊆ closure (interior (Ioc a b))

tactic: simp
state_before: case inl
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a✝ b : α
s : Set α
a : α
⊢ Ioc a a ⊆ closure (interior (Ioc a a))
state_after: no goals

tactic: calc
  Ioc a b ⊆ Icc a b := Ioc_subset_Icc_self
  _ = closure (Ioo a b) := (closure_Ioo h).symm
  _ ⊆ closure (interior (Ioc a b)) :=
    closure_mono (interior_maximal Ioo_subset_Ioc_self isOpen_Ioo)
state_before: case inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a✝ b✝ : α
s : Set α
a b : α
h : a ≠ b
⊢ Ioc a b ⊆ closure (interior (Ioc a b))
state_after: no goals
Theorem: FirstOrder.Language.BoundedFormula.relabel_all
File: Mathlib/ModelTheory/Syntax.lean

tactic: rw [relabel, mapTermRel, relabel]
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
g : α → β ⊕ Fin n
k : ℕ
φ : L.BoundedFormula α (k + 1)
⊢ relabel g φ.all = (relabel g φ).all
state_after: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
g : α → β ⊕ Fin n
k : ℕ
φ : L.BoundedFormula α (k + 1)
⊢ (castLE ⋯ (mapTermRel (fun x t => Term.relabel (relabelAux g x) t) (fun x => id) (fun x => castLE ⋯) φ)).all =
    (mapTermRel (fun x t => Term.relabel (relabelAux g x) t) (fun x => id) (fun x => castLE ⋯) φ).all

tactic: simp
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
g : α → β ⊕ Fin n
k : ℕ
φ : L.BoundedFormula α (k + 1)
⊢ (castLE ⋯ (mapTermRel (fun x t => Term.relabel (relabelAux g x) t) (fun x => id) (fun x => castLE ⋯) φ)).all =
    (mapTermRel (fun x t => Term.relabel (relabelAux g x) t) (fun x => id) (fun x => castLE ⋯) φ).all
state_after: no goals
Theorem: MulAction.IsFixedBlock.isBlock
File: Mathlib/GroupTheory/GroupAction/Blocks.lean

tactic: simp [IsBlock.def, hfB _]
state_before: G : Type u_1
X : Type u_2
inst✝ : SMul G X
B : Set X
hfB : IsFixedBlock G B
⊢ IsBlock G B
state_after: no goals
Theorem: MvPolynomial.degreeOf_zero
File: Mathlib/Algebra/MvPolynomial/Degrees.lean

tactic: classical simp only [degreeOf_def, degrees_zero, Multiset.count_zero]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
n : σ
⊢ degreeOf n 0 = 0
state_after: no goals

tactic: simp only [degreeOf_def, degrees_zero, Multiset.count_zero]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
n : σ
⊢ degreeOf n 0 = 0
state_after: no goals
Theorem: UniformSpace.hasBasis_nhds_prod
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: rw [nhds_prod_eq]
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
x y : α
⊢ (𝓝 (x, y)).HasBasis (fun s => s ∈ 𝓤 α ∧ SymmetricRel s) fun s => ball x s ×ˢ ball y s
state_after: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
x y : α
⊢ (𝓝 x ×ˢ 𝓝 y).HasBasis (fun s => s ∈ 𝓤 α ∧ SymmetricRel s) fun s => ball x s ×ˢ ball y s

tactic: apply (hasBasis_nhds x).prod_same_index (hasBasis_nhds y)
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
x y : α
⊢ (𝓝 x ×ˢ 𝓝 y).HasBasis (fun s => s ∈ 𝓤 α ∧ SymmetricRel s) fun s => ball x s ×ˢ ball y s
state_after: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
x y : α
⊢ ∀ {i j : Set (α × α)},
    i ∈ 𝓤 α ∧ SymmetricRel i →
      j ∈ 𝓤 α ∧ SymmetricRel j → ∃ k, (k ∈ 𝓤 α ∧ SymmetricRel k) ∧ ball x k ⊆ ball x i ∧ ball y k ⊆ ball y j

tactic: rintro U V ⟨U_in, U_symm⟩ ⟨V_in, V_symm⟩
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
x y : α
⊢ ∀ {i j : Set (α × α)},
    i ∈ 𝓤 α ∧ SymmetricRel i →
      j ∈ 𝓤 α ∧ SymmetricRel j → ∃ k, (k ∈ 𝓤 α ∧ SymmetricRel k) ∧ ball x k ⊆ ball x i ∧ ball y k ⊆ ball y j
state_after: case intro.intro
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
x y : α
U V : Set (α × α)
U_in : U ∈ 𝓤 α
U_symm : SymmetricRel U
V_in : V ∈ 𝓤 α
V_symm : SymmetricRel V
⊢ ∃ k, (k ∈ 𝓤 α ∧ SymmetricRel k) ∧ ball x k ⊆ ball x U ∧ ball y k ⊆ ball y V

tactic: exact
  ⟨U ∩ V, ⟨(𝓤 α).inter_sets U_in V_in, U_symm.inter V_symm⟩, ball_inter_left x U V,
    ball_inter_right y U V⟩
state_before: case intro.intro
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
x y : α
U V : Set (α × α)
U_in : U ∈ 𝓤 α
U_symm : SymmetricRel U
V_in : V ∈ 𝓤 α
V_symm : SymmetricRel V
⊢ ∃ k, (k ∈ 𝓤 α ∧ SymmetricRel k) ∧ ball x k ⊆ ball x U ∧ ball y k ⊆ ball y V
state_after: no goals
Theorem: Real.toNNReal_add
File: Mathlib/Data/NNReal/Basic.lean

tactic: simp [hr, hp, add_nonneg]
state_before: r p : ℝ
hr : 0 ≤ r
hp : 0 ≤ p
⊢ ↑(r + p).toNNReal = ↑(r.toNNReal + p.toNNReal)
state_after: no goals
Theorem: CochainComplex.HomComplex.Cochain.rightShift_units_smul
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean

tactic: apply rightShift_smul
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
x : Rˣ
⊢ (x • γ).rightShift a n' hn' = x • γ.rightShift a n' hn'
state_after: no goals
Theorem: Finset.sort_nodup
File: Mathlib/Data/Finset/Sort.lean

tactic: rw [sort_eq]
state_before: α : Type u_1
β : Type u_2
r : α → α → Prop
inst✝³ : DecidableRel r
inst✝² : IsTrans α r
inst✝¹ : IsAntisymm α r
inst✝ : IsTotal α r
s : Finset α
⊢ (↑(sort r s)).Nodup
state_after: α : Type u_1
β : Type u_2
r : α → α → Prop
inst✝³ : DecidableRel r
inst✝² : IsTrans α r
inst✝¹ : IsAntisymm α r
inst✝ : IsTotal α r
s : Finset α
⊢ s.val.Nodup

tactic: exact s.2
state_before: α : Type u_1
β : Type u_2
r : α → α → Prop
inst✝³ : DecidableRel r
inst✝² : IsTrans α r
inst✝¹ : IsAntisymm α r
inst✝ : IsTotal α r
s : Finset α
⊢ s.val.Nodup
state_after: no goals
Theorem: jacobiTheta₂_add_right
File: Mathlib/NumberTheory/ModularForms/JacobiTheta/TwoVariable.lean

tactic: refine tsum_congr (fun n ↦ ?_)
state_before: z τ : ℂ
⊢ jacobiTheta₂ z (τ + 2) = jacobiTheta₂ z τ
state_after: z τ : ℂ
n : ℤ
⊢ jacobiTheta₂_term n z (τ + 2) = jacobiTheta₂_term n z τ

tactic: simp_rw [jacobiTheta₂_term, Complex.exp_add]
state_before: z τ : ℂ
n : ℤ
⊢ jacobiTheta₂_term n z (τ + 2) = jacobiTheta₂_term n z τ
state_after: z τ : ℂ
n : ℤ
⊢ cexp (2 * ↑π * I * ↑n * z) * cexp (↑π * I * ↑n ^ 2 * (τ + 2)) =
    cexp (2 * ↑π * I * ↑n * z) * cexp (↑π * I * ↑n ^ 2 * τ)

tactic: suffices cexp (π * I * n ^ 2 * 2 : ℂ) = 1 by rw [mul_add, Complex.exp_add, this, mul_one]
state_before: z τ : ℂ
n : ℤ
⊢ cexp (2 * ↑π * I * ↑n * z) * cexp (↑π * I * ↑n ^ 2 * (τ + 2)) =
    cexp (2 * ↑π * I * ↑n * z) * cexp (↑π * I * ↑n ^ 2 * τ)
state_after: z τ : ℂ
n : ℤ
⊢ cexp (↑π * I * ↑n ^ 2 * 2) = 1

tactic: rw [(by push_cast; ring : (π * I * n ^ 2 * 2 : ℂ) = (n ^ 2 :) * (2 * π * I)), exp_int_mul,
  exp_two_pi_mul_I, one_zpow]
state_before: z τ : ℂ
n : ℤ
⊢ cexp (↑π * I * ↑n ^ 2 * 2) = 1
state_after: no goals

tactic: rw [mul_add, Complex.exp_add, this, mul_one]
state_before: z τ : ℂ
n : ℤ
this : cexp (↑π * I * ↑n ^ 2 * 2) = 1
⊢ cexp (2 * ↑π * I * ↑n * z) * cexp (↑π * I * ↑n ^ 2 * (τ + 2)) =
    cexp (2 * ↑π * I * ↑n * z) * cexp (↑π * I * ↑n ^ 2 * τ)
state_after: no goals

tactic: push_cast
state_before: z τ : ℂ
n : ℤ
⊢ ↑π * I * ↑n ^ 2 * 2 = ↑(n ^ 2) * (2 * ↑π * I)
state_after: z τ : ℂ
n : ℤ
⊢ ↑π * I * ↑n ^ 2 * 2 = ↑n ^ 2 * (2 * ↑π * I)

tactic: ring
state_before: z τ : ℂ
n : ℤ
⊢ ↑π * I * ↑n ^ 2 * 2 = ↑n ^ 2 * (2 * ↑π * I)
state_after: no goals
Theorem: Subsemiring.unop_closure
File: Mathlib/Algebra/Ring/Subsemiring/MulOpposite.lean

tactic: simp_rw [closure, unop_sInf, Set.preimage_setOf_eq, op_coe]
state_before: ι : Sort u_1
R : Type u_2
inst✝ : NonAssocSemiring R
s : Set Rᵐᵒᵖ
⊢ (closure s).unop = closure (MulOpposite.op ⁻¹' s)
state_after: ι : Sort u_1
R : Type u_2
inst✝ : NonAssocSemiring R
s : Set Rᵐᵒᵖ
⊢ sInf {a | s ⊆ MulOpposite.unop ⁻¹' ↑a} = sInf {S | MulOpposite.op ⁻¹' s ⊆ ↑S}

tactic: congr with a
state_before: ι : Sort u_1
R : Type u_2
inst✝ : NonAssocSemiring R
s : Set Rᵐᵒᵖ
⊢ sInf {a | s ⊆ MulOpposite.unop ⁻¹' ↑a} = sInf {S | MulOpposite.op ⁻¹' s ⊆ ↑S}
state_after: case e_a.h
ι : Sort u_1
R : Type u_2
inst✝ : NonAssocSemiring R
s : Set Rᵐᵒᵖ
a : Subsemiring R
⊢ a ∈ {a | s ⊆ MulOpposite.unop ⁻¹' ↑a} ↔ a ∈ {S | MulOpposite.op ⁻¹' s ⊆ ↑S}

tactic: exact MulOpposite.op_surjective.forall
state_before: case e_a.h
ι : Sort u_1
R : Type u_2
inst✝ : NonAssocSemiring R
s : Set Rᵐᵒᵖ
a : Subsemiring R
⊢ a ∈ {a | s ⊆ MulOpposite.unop ⁻¹' ↑a} ↔ a ∈ {S | MulOpposite.op ⁻¹' s ⊆ ↑S}
state_after: no goals
Theorem: Stream'.tail_drop'
File: Mathlib/Data/Stream/Init.lean

tactic: ext
state_before: α : Type u
β : Type v
δ : Type w
i : ℕ
s : Stream' α
⊢ (drop i s).tail = drop (i + 1) s
state_after: case a
α : Type u
β : Type v
δ : Type w
i : ℕ
s : Stream' α
n✝ : ℕ
⊢ (drop i s).tail.get n✝ = (drop (i + 1) s).get n✝

tactic: simp [Nat.add_comm, Nat.add_assoc, Nat.add_left_comm]
state_before: case a
α : Type u
β : Type v
δ : Type w
i : ℕ
s : Stream' α
n✝ : ℕ
⊢ (drop i s).tail.get n✝ = (drop (i + 1) s).get n✝
state_after: no goals
Theorem: CategoryTheory.GrothendieckTopology.Subpresheaf.lift_ι
File: Mathlib/CategoryTheory/Sites/Subsheaf.lean

tactic: ext
state_before: C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
f : F' ⟶ F
hf : ∀ (U : Cᵒᵖ) (x : F'.obj U), f.app U x ∈ G.obj U
⊢ G.lift f hf ≫ G.ι = f
state_after: case w.h.h
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
f : F' ⟶ F
hf : ∀ (U : Cᵒᵖ) (x : F'.obj U), f.app U x ∈ G.obj U
x✝ : Cᵒᵖ
a✝ : F'.obj x✝
⊢ (G.lift f hf ≫ G.ι).app x✝ a✝ = f.app x✝ a✝

tactic: rfl
state_before: case w.h.h
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
f : F' ⟶ F
hf : ∀ (U : Cᵒᵖ) (x : F'.obj U), f.app U x ∈ G.obj U
x✝ : Cᵒᵖ
a✝ : F'.obj x✝
⊢ (G.lift f hf ≫ G.ι).app x✝ a✝ = f.app x✝ a✝
state_after: no goals
Theorem: CategoryTheory.Limits.biprod.add_eq_lift_desc_id
File: Mathlib/CategoryTheory/Preadditive/Biproducts.lean

tactic: simp
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Preadditive C
X Y : C
f g : X ⟶ Y
inst✝ : HasBinaryBiproduct Y Y
⊢ f + g = lift f g ≫ desc (𝟙 Y) (𝟙 Y)
state_after: no goals
Theorem: CategoryTheory.Functor.isSplitEpi_iff
File: Mathlib/CategoryTheory/Functor/EpiMono.lean

tactic: constructor
state_before: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
E : Type u₃
inst✝² : Category.{v₃, u₃} E
F : C ⥤ D
X Y : C
f : X ⟶ Y
inst✝¹ : F.Full
inst✝ : F.Faithful
⊢ IsSplitEpi (F.map f) ↔ IsSplitEpi f
state_after: case mp
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
E : Type u₃
inst✝² : Category.{v₃, u₃} E
F : C ⥤ D
X Y : C
f : X ⟶ Y
inst✝¹ : F.Full
inst✝ : F.Faithful
⊢ IsSplitEpi (F.map f) → IsSplitEpi f

case mpr
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
E : Type u₃
inst✝² : Category.{v₃, u₃} E
F : C ⥤ D
X Y : C
f : X ⟶ Y
inst✝¹ : F.Full
inst✝ : F.Faithful
⊢ IsSplitEpi f → IsSplitEpi (F.map f)

tactic: intro h
state_before: case mp
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
E : Type u₃
inst✝² : Category.{v₃, u₃} E
F : C ⥤ D
X Y : C
f : X ⟶ Y
inst✝¹ : F.Full
inst✝ : F.Faithful
⊢ IsSplitEpi (F.map f) → IsSplitEpi f
state_after: case mp
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
E : Type u₃
inst✝² : Category.{v₃, u₃} E
F : C ⥤ D
X Y : C
f : X ⟶ Y
inst✝¹ : F.Full
inst✝ : F.Faithful
h : IsSplitEpi (F.map f)
⊢ IsSplitEpi f

tactic: exact IsSplitEpi.mk' ((splitEpiEquiv F f).invFun h.exists_splitEpi.some)
state_before: case mp
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
E : Type u₃
inst✝² : Category.{v₃, u₃} E
F : C ⥤ D
X Y : C
f : X ⟶ Y
inst✝¹ : F.Full
inst✝ : F.Faithful
h : IsSplitEpi (F.map f)
⊢ IsSplitEpi f
state_after: no goals

tactic: intro h
state_before: case mpr
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
E : Type u₃
inst✝² : Category.{v₃, u₃} E
F : C ⥤ D
X Y : C
f : X ⟶ Y
inst✝¹ : F.Full
inst✝ : F.Faithful
⊢ IsSplitEpi f → IsSplitEpi (F.map f)
state_after: case mpr
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
E : Type u₃
inst✝² : Category.{v₃, u₃} E
F : C ⥤ D
X Y : C
f : X ⟶ Y
inst✝¹ : F.Full
inst✝ : F.Faithful
h : IsSplitEpi f
⊢ IsSplitEpi (F.map f)

tactic: exact IsSplitEpi.mk' ((splitEpiEquiv F f).toFun h.exists_splitEpi.some)
state_before: case mpr
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
E : Type u₃
inst✝² : Category.{v₃, u₃} E
F : C ⥤ D
X Y : C
f : X ⟶ Y
inst✝¹ : F.Full
inst✝ : F.Faithful
h : IsSplitEpi f
⊢ IsSplitEpi (F.map f)
state_after: no goals
Theorem: List.toFinsupp_nil
File: Mathlib/Data/List/ToFinsupp.lean

tactic: ext
state_before: M : Type u_1
inst✝² : Zero M
l : List M
inst✝¹ : DecidablePred fun x => l.getD x 0 ≠ 0
n : ℕ
inst✝ : DecidablePred fun i => [].getD i 0 ≠ 0
⊢ [].toFinsupp = 0
state_after: case h
M : Type u_1
inst✝² : Zero M
l : List M
inst✝¹ : DecidablePred fun x => l.getD x 0 ≠ 0
n : ℕ
inst✝ : DecidablePred fun i => [].getD i 0 ≠ 0
a✝ : ℕ
⊢ [].toFinsupp a✝ = 0 a✝

tactic: simp
state_before: case h
M : Type u_1
inst✝² : Zero M
l : List M
inst✝¹ : DecidablePred fun x => l.getD x 0 ≠ 0
n : ℕ
inst✝ : DecidablePred fun i => [].getD i 0 ≠ 0
a✝ : ℕ
⊢ [].toFinsupp a✝ = 0 a✝
state_after: no goals
Theorem: Nat.testBit_two_pow_self
File: Mathlib/Data/Nat/Bitwise.lean

tactic: rw [testBit, shiftRight_eq_div_pow, Nat.div_self (Nat.pow_pos Nat.zero_lt_two)]
state_before: n : ℕ
⊢ (2 ^ n).testBit n = true
state_after: n : ℕ
⊢ (1 &&& 1 != 0) = true

tactic: simp
state_before: n : ℕ
⊢ (1 &&& 1 != 0) = true
state_after: no goals
Theorem: Nat.factorization_centralBinom_of_two_mul_self_lt_three_mul
File: Mathlib/Data/Nat/Choose/Factorization.lean

tactic: refine factorization_choose_of_lt_three_mul ?_ p_le_n (p_le_n.trans ?_) big
state_before: p n k : ℕ
n_big : 2 < n
p_le_n : p ≤ n
big : 2 * n < 3 * p
⊢ n.centralBinom.factorization p = 0
state_after: case refine_1
p n k : ℕ
n_big : 2 < n
p_le_n : p ≤ n
big : 2 * n < 3 * p
⊢ p ≠ 2

case refine_2
p n k : ℕ
n_big : 2 < n
p_le_n : p ≤ n
big : 2 * n < 3 * p
⊢ n ≤ 2 * n - n

tactic: omega
state_before: case refine_1
p n k : ℕ
n_big : 2 < n
p_le_n : p ≤ n
big : 2 * n < 3 * p
⊢ p ≠ 2
state_after: no goals

tactic: rw [two_mul, add_tsub_cancel_left]
state_before: case refine_2
p n k : ℕ
n_big : 2 < n
p_le_n : p ≤ n
big : 2 * n < 3 * p
⊢ n ≤ 2 * n - n
state_after: no goals
Theorem: Polynomial.support_trinomial
File: Mathlib/Algebra/Polynomial/Coeff.lean

tactic: apply subset_antisymm (support_trinomial' k m n x y z)
state_before: R : Type u
S : Type v
a b : R
n✝ m✝ : ℕ
inst✝ : Semiring R
p q r : R[X]
k m n : ℕ
hkm : k < m
hmn : m < n
x y z : R
hx : x ≠ 0
hy : y ≠ 0
hz : z ≠ 0
⊢ (C x * X ^ k + C y * X ^ m + C z * X ^ n).support = {k, m, n}
state_after: R : Type u
S : Type v
a b : R
n✝ m✝ : ℕ
inst✝ : Semiring R
p q r : R[X]
k m n : ℕ
hkm : k < m
hmn : m < n
x y z : R
hx : x ≠ 0
hy : y ≠ 0
hz : z ≠ 0
⊢ {k, m, n} ⊆ (C x * X ^ k + C y * X ^ m + C z * X ^ n).support

tactic: simp_rw [insert_subset_iff, singleton_subset_iff, mem_support_iff, coeff_add, coeff_C_mul,
  coeff_X_pow_self, mul_one, coeff_X_pow, if_neg hkm.ne, if_neg hkm.ne', if_neg hmn.ne,
  if_neg hmn.ne', if_neg (hkm.trans hmn).ne, if_neg (hkm.trans hmn).ne', mul_zero, add_zero,
  zero_add, Ne, hx, hy, hz, not_false_eq_true, and_true]
state_before: R : Type u
S : Type v
a b : R
n✝ m✝ : ℕ
inst✝ : Semiring R
p q r : R[X]
k m n : ℕ
hkm : k < m
hmn : m < n
x y z : R
hx : x ≠ 0
hy : y ≠ 0
hz : z ≠ 0
⊢ {k, m, n} ⊆ (C x * X ^ k + C y * X ^ m + C z * X ^ n).support
state_after: no goals
Theorem: Real.cos_three_mul
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← ofReal_inj]
state_before: x y : ℝ
⊢ cos (3 * x) = 4 * cos x ^ 3 - 3 * cos x
state_after: x y : ℝ
⊢ ↑(cos (3 * x)) = ↑(4 * cos x ^ 3 - 3 * cos x)

tactic: simp [cos_three_mul]
state_before: x y : ℝ
⊢ ↑(cos (3 * x)) = ↑(4 * cos x ^ 3 - 3 * cos x)
state_after: no goals
Theorem: Cardinal.toPartENat_le_iff_of_lt_aleph0
File: Mathlib/SetTheory/Cardinal/PartENat.lean

tactic: lift c' to ℕ using hc'
state_before: α : Type u
c c' : Cardinal.{u_1}
hc' : c' < ℵ₀
⊢ toPartENat c ≤ toPartENat c' ↔ c ≤ c'
state_after: case intro
α : Type u
c : Cardinal.{u_1}
c' : ℕ
⊢ toPartENat c ≤ toPartENat ↑c' ↔ c ≤ ↑c'

tactic: simp_rw [← partENatOfENat_toENat, toENat_nat, ← toENat_le_nat,
 ← PartENat.withTopOrderIso.symm.le_iff_le, PartENat.ofENat_le, map_le_map_iff]
state_before: case intro
α : Type u
c : Cardinal.{u_1}
c' : ℕ
⊢ toPartENat c ≤ toPartENat ↑c' ↔ c ≤ ↑c'
state_after: no goals
Theorem: Nat.multichoose_one
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: induction' k with k IH
state_before: k : ℕ
⊢ multichoose 1 k = 1
state_after: case zero

⊢ multichoose 1 0 = 1

case succ
k : ℕ
IH : multichoose 1 k = 1
⊢ multichoose 1 (k + 1) = 1

tactic: simp [multichoose_succ_succ 0 k, IH]
state_before: case succ
k : ℕ
IH : multichoose 1 k = 1
⊢ multichoose 1 (k + 1) = 1
state_after: no goals

tactic: simp
state_before: case zero

⊢ multichoose 1 0 = 1
state_after: no goals
Theorem: CategoryTheory.wellPowered_of_equiv
File: Mathlib/CategoryTheory/Subobject/WellPowered.lean

tactic: infer_instance
state_before: C : Type u₁
inst✝² : Category.{v, u₁} C
D : Type u₂
inst✝¹ : Category.{v, u₂} D
e : C ≌ D
inst✝ : WellPowered C
X : D
⊢ EssentiallySmall.{v, v, max u₁ v} (MonoOver (e.symm.functor.obj X))
state_after: no goals
Theorem: ZMod.eisenstein_lemma
File: Mathlib/NumberTheory/LegendreSymbol/GaussEisensteinLemmas.lean

tactic: haveI hp' : Fact (p % 2 = 1) := ⟨Nat.Prime.mod_two_eq_one_iff_ne_two.mpr hp⟩
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
a : ℕ
ha1 : a % 2 = 1
ha0 : ↑a ≠ 0
⊢ legendreSym p ↑a = (-1) ^ ∑ x ∈ Ico 1 (p / 2).succ, x * a / p
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
a : ℕ
ha1 : a % 2 = 1
ha0 : ↑a ≠ 0
hp' : Fact (p % 2 = 1)
⊢ legendreSym p ↑a = (-1) ^ ∑ x ∈ Ico 1 (p / 2).succ, x * a / p

tactic: have ha0' : ((a : ℤ) : ZMod p) ≠ 0 := by norm_cast
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
a : ℕ
ha1 : a % 2 = 1
ha0 : ↑a ≠ 0
hp' : Fact (p % 2 = 1)
⊢ legendreSym p ↑a = (-1) ^ ∑ x ∈ Ico 1 (p / 2).succ, x * a / p
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
a : ℕ
ha1 : a % 2 = 1
ha0 : ↑a ≠ 0
hp' : Fact (p % 2 = 1)
ha0' : ↑↑a ≠ 0
⊢ legendreSym p ↑a = (-1) ^ ∑ x ∈ Ico 1 (p / 2).succ, x * a / p

tactic: rw [neg_one_pow_eq_pow_mod_two, gauss_lemma hp ha0', neg_one_pow_eq_pow_mod_two,
  (by norm_cast : ((a : ℤ) : ZMod p) = (a : ZMod p)),
  show _ = _ from eisenstein_lemma_aux p ha1 ha0]
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
a : ℕ
ha1 : a % 2 = 1
ha0 : ↑a ≠ 0
hp' : Fact (p % 2 = 1)
ha0' : ↑↑a ≠ 0
⊢ legendreSym p ↑a = (-1) ^ ∑ x ∈ Ico 1 (p / 2).succ, x * a / p
state_after: no goals

tactic: norm_cast
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
a : ℕ
ha1 : a % 2 = 1
ha0 : ↑a ≠ 0
hp' : Fact (p % 2 = 1)
⊢ ↑↑a ≠ 0
state_after: no goals

tactic: norm_cast
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
a : ℕ
ha1 : a % 2 = 1
ha0 : ↑a ≠ 0
hp' : Fact (p % 2 = 1)
ha0' : ↑↑a ≠ 0
⊢ ↑↑a = ↑a
state_after: no goals
Theorem: Gamma1_in_Gamma0
File: Mathlib/NumberTheory/ModularForms/CongruenceSubgroups.lean

tactic: intro x HA
state_before: N✝ N : ℕ
⊢ Gamma1 N ≤ Gamma0 N
state_after: N✝ N : ℕ
x : SL(2, ℤ)
HA : x ∈ Gamma1 N
⊢ x ∈ Gamma0 N

tactic: simp only [Gamma0_mem, Gamma1_mem, coe_matrix_coe, Int.coe_castRingHom, map_apply] at *
state_before: N✝ N : ℕ
x : SL(2, ℤ)
HA : x ∈ Gamma1 N
⊢ x ∈ Gamma0 N
state_after: N✝ N : ℕ
x : SL(2, ℤ)
HA : ↑(↑x 0 0) = 1 ∧ ↑(↑x 1 1) = 1 ∧ ↑(↑x 1 0) = 0
⊢ ↑(↑x 1 0) = 0

tactic: exact HA.2.2
state_before: N✝ N : ℕ
x : SL(2, ℤ)
HA : ↑(↑x 0 0) = 1 ∧ ↑(↑x 1 1) = 1 ∧ ↑(↑x 1 0) = 0
⊢ ↑(↑x 1 0) = 0
state_after: no goals
Theorem: PFun.dom_comp
File: Mathlib/Data/PFun.lean

tactic: ext
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f✝ : α →. β
f : β →. γ
g : α →. β
⊢ (f.comp g).Dom = g.preimage f.Dom
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f✝ : α →. β
f : β →. γ
g : α →. β
x✝ : α
⊢ x✝ ∈ (f.comp g).Dom ↔ x✝ ∈ g.preimage f.Dom

tactic: simp_rw [mem_preimage, mem_dom, comp_apply, Part.mem_bind_iff, ← exists_and_right]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f✝ : α →. β
f : β →. γ
g : α →. β
x✝ : α
⊢ x✝ ∈ (f.comp g).Dom ↔ x✝ ∈ g.preimage f.Dom
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f✝ : α →. β
f : β →. γ
g : α →. β
x✝ : α
⊢ (∃ y, ∃ a ∈ g x✝, y ∈ f a) ↔ ∃ y, ∃ x ∈ f y, y ∈ g x✝

tactic: rw [exists_comm]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f✝ : α →. β
f : β →. γ
g : α →. β
x✝ : α
⊢ (∃ y, ∃ a ∈ g x✝, y ∈ f a) ↔ ∃ y, ∃ x ∈ f y, y ∈ g x✝
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f✝ : α →. β
f : β →. γ
g : α →. β
x✝ : α
⊢ (∃ b a, b ∈ g x✝ ∧ a ∈ f b) ↔ ∃ y, ∃ x ∈ f y, y ∈ g x✝

tactic: simp_rw [and_comm]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f✝ : α →. β
f : β →. γ
g : α →. β
x✝ : α
⊢ (∃ b a, b ∈ g x✝ ∧ a ∈ f b) ↔ ∃ y, ∃ x ∈ f y, y ∈ g x✝
state_after: no goals
Theorem: pow_mem_range_pow_of_coprime
File: Mathlib/Data/Int/GCD.lean

tactic: simp [pow_eq_pow_iff_of_coprime hmn.symm]
state_before: α : Type u_1
inst✝ : CommGroupWithZero α
a✝ b : α
m n : ℕ
hmn : m.Coprime n
a : α
⊢ (a ^ m ∈ Set.range fun x => x ^ n) ↔ a ∈ Set.range fun x => x ^ n
state_after: α : Type u_1
inst✝ : CommGroupWithZero α
a✝ b : α
m n : ℕ
hmn : m.Coprime n
a : α
⊢ (∃ y c, y = c ^ m ∧ a = c ^ n) ↔ ∃ y, y ^ n = a

tactic: aesop
state_before: α : Type u_1
inst✝ : CommGroupWithZero α
a✝ b : α
m n : ℕ
hmn : m.Coprime n
a : α
⊢ (∃ y c, y = c ^ m ∧ a = c ^ n) ↔ ∃ y, y ^ n = a
state_after: no goals