1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Equiv.Perm.isCycleOn_support_cycleOf
File: Mathlib/GroupTheory/Perm/Cycle/Factors.lean

tactic: refine fun _ ↦ ⟨fun h ↦ mem_support_cycleOf_iff.2 ?_, fun h ↦ mem_support_cycleOf_iff.2 ?_⟩
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
f✝ g : Perm α
x✝ y : α
inst✝³ : DecidableRel f✝.SameCycle
inst✝² : DecidableRel g.SameCycle
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f : Perm α
x : α
⊢ ∀ (a : α), f a ∈ ↑(f.cycleOf x).support ↔ a ∈ ↑(f.cycleOf x).support
state_after: case refine_1
ι : Type u_1
α : Type u_2
β : Type u_3
f✝ g : Perm α
x✝¹ y : α
inst✝³ : DecidableRel f✝.SameCycle
inst✝² : DecidableRel g.SameCycle
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f : Perm α
x x✝ : α
h : f x✝ ∈ ↑(f.cycleOf x).support
⊢ f.SameCycle x x✝ ∧ x ∈ f.support

case refine_2
ι : Type u_1
α : Type u_2
β : Type u_3
f✝ g : Perm α
x✝¹ y : α
inst✝³ : DecidableRel f✝.SameCycle
inst✝² : DecidableRel g.SameCycle
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f : Perm α
x x✝ : α
h : x✝ ∈ ↑(f.cycleOf x).support
⊢ f.SameCycle x (f x✝) ∧ x ∈ f.support

tactic: exact ⟨sameCycle_apply_right.1 (mem_support_cycleOf_iff.1 h).1,
(mem_support_cycleOf_iff.1 h).2⟩
state_before: case refine_1
ι : Type u_1
α : Type u_2
β : Type u_3
f✝ g : Perm α
x✝¹ y : α
inst✝³ : DecidableRel f✝.SameCycle
inst✝² : DecidableRel g.SameCycle
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f : Perm α
x x✝ : α
h : f x✝ ∈ ↑(f.cycleOf x).support
⊢ f.SameCycle x x✝ ∧ x ∈ f.support
state_after: no goals

tactic: exact ⟨sameCycle_apply_right.2 (mem_support_cycleOf_iff.1 h).1,
(mem_support_cycleOf_iff.1 h).2⟩
state_before: case refine_2
ι : Type u_1
α : Type u_2
β : Type u_3
f✝ g : Perm α
x✝¹ y : α
inst✝³ : DecidableRel f✝.SameCycle
inst✝² : DecidableRel g.SameCycle
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f : Perm α
x x✝ : α
h : x✝ ∈ ↑(f.cycleOf x).support
⊢ f.SameCycle x (f x✝) ∧ x ∈ f.support
state_after: no goals

tactic: rw [mem_coe, mem_support_cycleOf_iff] at ha hb
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
f✝ g : Perm α
x✝ y : α
inst✝³ : DecidableRel f✝.SameCycle
inst✝² : DecidableRel g.SameCycle
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f : Perm α
x a : α
ha : a ∈ ↑(f.cycleOf x).support
b : α
hb : b ∈ ↑(f.cycleOf x).support
⊢ f.SameCycle a b
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
f✝ g : Perm α
x✝ y : α
inst✝³ : DecidableRel f✝.SameCycle
inst✝² : DecidableRel g.SameCycle
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f : Perm α
x a : α
ha : f.SameCycle x a ∧ x ∈ f.support
b : α
hb : f.SameCycle x b ∧ x ∈ f.support
⊢ f.SameCycle a b

tactic: exact ha.1.symm.trans hb.1
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
f✝ g : Perm α
x✝ y : α
inst✝³ : DecidableRel f✝.SameCycle
inst✝² : DecidableRel g.SameCycle
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f : Perm α
x a : α
ha : f.SameCycle x a ∧ x ∈ f.support
b : α
hb : f.SameCycle x b ∧ x ∈ f.support
⊢ f.SameCycle a b
state_after: no goals
Theorem: IsLocalization.AtPrime.Nontrivial
File: Mathlib/RingTheory/Localization/AtPrime.lean

tactic: rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P✝ : Type u_3
inst✝¹ : CommSemiring P✝
P : Ideal R
hp : P.IsPrime
inst✝ : IsLocalization.AtPrime S P
hze : 0 = 1
⊢ False
state_after: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P✝ : Type u_3
inst✝¹ : CommSemiring P✝
P : Ideal R
hp : P.IsPrime
inst✝ : IsLocalization.AtPrime S P
hze : (algebraMap R S) 0 = (algebraMap R S) 1
⊢ False

tactic: obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P✝ : Type u_3
inst✝¹ : CommSemiring P✝
P : Ideal R
hp : P.IsPrime
inst✝ : IsLocalization.AtPrime S P
hze : (algebraMap R S) 0 = (algebraMap R S) 1
⊢ False
state_after: case intro
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P✝ : Type u_3
inst✝¹ : CommSemiring P✝
P : Ideal R
hp : P.IsPrime
inst✝ : IsLocalization.AtPrime S P
hze : (algebraMap R S) 0 = (algebraMap R S) 1
t : ↥P.primeCompl
ht : ↑t * 0 = ↑t * 1
⊢ False

tactic: have htz : (t : R) = 0 := by simpa using ht.symm
state_before: case intro
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P✝ : Type u_3
inst✝¹ : CommSemiring P✝
P : Ideal R
hp : P.IsPrime
inst✝ : IsLocalization.AtPrime S P
hze : (algebraMap R S) 0 = (algebraMap R S) 1
t : ↥P.primeCompl
ht : ↑t * 0 = ↑t * 1
⊢ False
state_after: case intro
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P✝ : Type u_3
inst✝¹ : CommSemiring P✝
P : Ideal R
hp : P.IsPrime
inst✝ : IsLocalization.AtPrime S P
hze : (algebraMap R S) 0 = (algebraMap R S) 1
t : ↥P.primeCompl
ht : ↑t * 0 = ↑t * 1
htz : ↑t = 0
⊢ False

tactic: exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P)
state_before: case intro
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P✝ : Type u_3
inst✝¹ : CommSemiring P✝
P : Ideal R
hp : P.IsPrime
inst✝ : IsLocalization.AtPrime S P
hze : (algebraMap R S) 0 = (algebraMap R S) 1
t : ↥P.primeCompl
ht : ↑t * 0 = ↑t * 1
htz : ↑t = 0
⊢ False
state_after: no goals

tactic: simpa using ht.symm
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P✝ : Type u_3
inst✝¹ : CommSemiring P✝
P : Ideal R
hp : P.IsPrime
inst✝ : IsLocalization.AtPrime S P
hze : (algebraMap R S) 0 = (algebraMap R S) 1
t : ↥P.primeCompl
ht : ↑t * 0 = ↑t * 1
⊢ ↑t = 0
state_after: no goals
Theorem: CategoryTheory.Under.under_left
File: Mathlib/CategoryTheory/Comma/Over.lean

tactic: simp only
state_before: T : Type u₁
inst✝ : Category.{v₁, u₁} T
X : T
U : Under X
⊢ U.left = { as := PUnit.unit }
state_after: no goals
Theorem: HomologicalComplex.biprodXIso_hom_fst
File: Mathlib/Algebra/Homology/HomologicalComplexBiprod.lean

tactic: simp [biprodXIso]
state_before: C : Type u_1
ι : Type u_2
inst✝² : Category.{u_3, u_1} C
inst✝¹ : Preadditive C
c : ComplexShape ι
K L : HomologicalComplex C c
inst✝ : ∀ (i : ι), HasBinaryBiproduct (K.X i) (L.X i)
i : ι
⊢ (K.biprodXIso L i).hom ≫ biprod.fst = biprod.fst.f i
state_after: no goals
Theorem: Matrix.self_mul_conjTranspose_mul_eq_zero
File: Mathlib/LinearAlgebra/Matrix/DotProduct.lean

tactic: simpa only [conjTranspose_conjTranspose] using conjTranspose_mul_self_mul_eq_zero Aᴴ _
state_before: m : Type u_1
n : Type u_2
p : Type u_3
R : Type u_4
inst✝⁷ : Fintype m
inst✝⁶ : Fintype n
inst✝⁵ : Fintype p
inst✝⁴ : PartialOrder R
inst✝³ : NonUnitalRing R
inst✝² : StarRing R
inst✝¹ : StarOrderedRing R
inst✝ : NoZeroDivisors R
A : Matrix m n R
B : Matrix m p R
⊢ A * Aᴴ * B = 0 ↔ Aᴴ * B = 0
state_after: no goals
Theorem: IsSelfAdjoint.zpow
File: Mathlib/Algebra/Star/SelfAdjoint.lean

tactic: simp only [isSelfAdjoint_iff, star_zpow₀, hx.star_eq]
state_before: R : Type u_1
A : Type u_2
inst✝¹ : DivisionSemiring R
inst✝ : StarRing R
x : R
hx : IsSelfAdjoint x
n : ℤ
⊢ IsSelfAdjoint (x ^ n)
state_after: no goals
Theorem: Int.dist_eq'
File: Mathlib/Topology/Instances/Int.lean

tactic: rw [dist_eq]
state_before: m n : ℤ
⊢ dist m n = ↑|m - n|
state_after: m n : ℤ
⊢ |↑m - ↑n| = ↑|m - n|

tactic: norm_cast
state_before: m n : ℤ
⊢ |↑m - ↑n| = ↑|m - n|
state_after: no goals
Theorem: Filter.map_inf'
File: Mathlib/Order/Filter/Basic.lean

tactic: lift f to Filter t using htf
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l f g : Filter α
m : α → β
t : Set α
htf : t ∈ f
htg : t ∈ g
h : InjOn m t
⊢ map m (f ⊓ g) = map m f ⊓ map m g
state_after: case intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l g : Filter α
m : α → β
t : Set α
htg : t ∈ g
h : InjOn m t
f : Filter ↑t
⊢ map m (map Subtype.val f ⊓ g) = map m (map Subtype.val f) ⊓ map m g

tactic: lift g to Filter t using htg
state_before: case intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l g : Filter α
m : α → β
t : Set α
htg : t ∈ g
h : InjOn m t
f : Filter ↑t
⊢ map m (map Subtype.val f ⊓ g) = map m (map Subtype.val f) ⊓ map m g
state_after: case intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
m : α → β
t : Set α
h : InjOn m t
f g : Filter ↑t
⊢ map m (map Subtype.val f ⊓ map Subtype.val g) = map m (map Subtype.val f) ⊓ map m (map Subtype.val g)

tactic: replace h : Injective (m ∘ ((↑) : t → α)) := h.injective
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
m : α → β
t : Set α
h : InjOn m t
f g : Filter ↑t
⊢ map m (map Subtype.val f ⊓ map Subtype.val g) = map m (map Subtype.val f) ⊓ map m (map Subtype.val g)
state_after: case intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
m : α → β
t : Set α
f g : Filter ↑t
h : Injective (m ∘ Subtype.val)
⊢ map m (map Subtype.val f ⊓ map Subtype.val g) = map m (map Subtype.val f) ⊓ map m (map Subtype.val g)

tactic: simp only [map_map, ← map_inf Subtype.coe_injective, map_inf h]
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
m : α → β
t : Set α
f g : Filter ↑t
h : Injective (m ∘ Subtype.val)
⊢ map m (map Subtype.val f ⊓ map Subtype.val g) = map m (map Subtype.val f) ⊓ map m (map Subtype.val g)
state_after: no goals
Theorem: Int.even_sub
File: Mathlib/Algebra/Group/Int.lean

tactic: simp [sub_eq_add_neg, parity_simps]
state_before: u v m n : ℤ
⊢ Even (m - n) ↔ (Even m ↔ Even n)
state_after: no goals
Theorem: CategoryTheory.MonoidalCategory.leftUnitor_inv_whiskerRight
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: simp
state_before: C✝ : Type u
𝒞 : Category.{v, u} C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : MonoidalCategory C
U V W X✝ Y✝ Z X Y : C
⊢ inv ((λ_ X).inv ▷ Y) = inv ((λ_ (X ⊗ Y)).inv ≫ (α_ (𝟙_ C) X Y).inv)
state_after: no goals
Theorem: Ideal.cotangent_subsingleton_iff
File: Mathlib/RingTheory/Ideal/Cotangent.lean

tactic: constructor
state_before: R : Type u
S : Type v
S' : Type w
inst✝⁶ : CommRing R
inst✝⁵ : CommSemiring S
inst✝⁴ : Algebra S R
inst✝³ : CommSemiring S'
inst✝² : Algebra S' R
inst✝¹ : Algebra S S'
inst✝ : IsScalarTower S S' R
I : Ideal R
⊢ Subsingleton I.Cotangent ↔ IsIdempotentElem I
state_after: case mp
R : Type u
S : Type v
S' : Type w
inst✝⁶ : CommRing R
inst✝⁵ : CommSemiring S
inst✝⁴ : Algebra S R
inst✝³ : CommSemiring S'
inst✝² : Algebra S' R
inst✝¹ : Algebra S S'
inst✝ : IsScalarTower S S' R
I : Ideal R
⊢ Subsingleton I.Cotangent → IsIdempotentElem I

case mpr
R : Type u
S : Type v
S' : Type w
inst✝⁶ : CommRing R
inst✝⁵ : CommSemiring S
inst✝⁴ : Algebra S R
inst✝³ : CommSemiring S'
inst✝² : Algebra S' R
inst✝¹ : Algebra S S'
inst✝ : IsScalarTower S S' R
I : Ideal R
⊢ IsIdempotentElem I → Subsingleton I.Cotangent

tactic: intro H
state_before: case mp
R : Type u
S : Type v
S' : Type w
inst✝⁶ : CommRing R
inst✝⁵ : CommSemiring S
inst✝⁴ : Algebra S R
inst✝³ : CommSemiring S'
inst✝² : Algebra S' R
inst✝¹ : Algebra S S'
inst✝ : IsScalarTower S S' R
I : Ideal R
⊢ Subsingleton I.Cotangent → IsIdempotentElem I
state_after: case mp
R : Type u
S : Type v
S' : Type w
inst✝⁶ : CommRing R
inst✝⁵ : CommSemiring S
inst✝⁴ : Algebra S R
inst✝³ : CommSemiring S'
inst✝² : Algebra S' R
inst✝¹ : Algebra S S'
inst✝ : IsScalarTower S S' R
I : Ideal R
H : Subsingleton I.Cotangent
⊢ IsIdempotentElem I

tactic: refine (pow_two I).symm.trans (le_antisymm (Ideal.pow_le_self two_ne_zero) ?_)
state_before: case mp
R : Type u
S : Type v
S' : Type w
inst✝⁶ : CommRing R
inst✝⁵ : CommSemiring S
inst✝⁴ : Algebra S R
inst✝³ : CommSemiring S'
inst✝² : Algebra S' R
inst✝¹ : Algebra S S'
inst✝ : IsScalarTower S S' R
I : Ideal R
H : Subsingleton I.Cotangent
⊢ IsIdempotentElem I
state_after: case mp
R : Type u
S : Type v
S' : Type w
inst✝⁶ : CommRing R
inst✝⁵ : CommSemiring S
inst✝⁴ : Algebra S R
inst✝³ : CommSemiring S'
inst✝² : Algebra S' R
inst✝¹ : Algebra S S'
inst✝ : IsScalarTower S S' R
I : Ideal R
H : Subsingleton I.Cotangent
⊢ I ≤ I ^ 2

tactic: exact fun x hx => (I.toCotangent_eq_zero ⟨x, hx⟩).mp (Subsingleton.elim _ _)
state_before: case mp
R : Type u
S : Type v
S' : Type w
inst✝⁶ : CommRing R
inst✝⁵ : CommSemiring S
inst✝⁴ : Algebra S R
inst✝³ : CommSemiring S'
inst✝² : Algebra S' R
inst✝¹ : Algebra S S'
inst✝ : IsScalarTower S S' R
I : Ideal R
H : Subsingleton I.Cotangent
⊢ I ≤ I ^ 2
state_after: no goals

tactic: exact fun e =>
  ⟨fun x y =>
    Quotient.inductionOn₂' x y fun x y =>
      I.toCotangent_eq.mpr <| ((pow_two I).trans e).symm ▸ I.sub_mem x.prop y.prop⟩
state_before: case mpr
R : Type u
S : Type v
S' : Type w
inst✝⁶ : CommRing R
inst✝⁵ : CommSemiring S
inst✝⁴ : Algebra S R
inst✝³ : CommSemiring S'
inst✝² : Algebra S' R
inst✝¹ : Algebra S S'
inst✝ : IsScalarTower S S' R
I : Ideal R
⊢ IsIdempotentElem I → Subsingleton I.Cotangent
state_after: no goals
Theorem: Matrix.smul_mat_cons
File: Mathlib/Data/Matrix/Notation.lean

tactic: ext i
state_before: α : Type u
o n m : ℕ
m' : Type uₘ
n' : Type uₙ
o' : Type uₒ
a b : ℕ
inst✝ : NonUnitalNonAssocSemiring α
x : α
v : n' → α
A : Fin m → n' → α
⊢ x • vecCons v A = vecCons (x • v) (x • A)
state_after: case h.h
α : Type u
o n m : ℕ
m' : Type uₘ
n' : Type uₙ
o' : Type uₒ
a b : ℕ
inst✝ : NonUnitalNonAssocSemiring α
x : α
v : n' → α
A : Fin m → n' → α
i : Fin m.succ
x✝ : n'
⊢ (x • vecCons v A) i x✝ = vecCons (x • v) (x • A) i x✝

tactic: refine Fin.cases ?_ ?_ i <;> simp
state_before: case h.h
α : Type u
o n m : ℕ
m' : Type uₘ
n' : Type uₙ
o' : Type uₒ
a b : ℕ
inst✝ : NonUnitalNonAssocSemiring α
x : α
v : n' → α
A : Fin m → n' → α
i : Fin m.succ
x✝ : n'
⊢ (x • vecCons v A) i x✝ = vecCons (x • v) (x • A) i x✝
state_after: no goals
Theorem: Ideal.dvdNotUnit_iff_lt
File: Mathlib/RingTheory/DedekindDomain/Ideal.lean

tactic: rw [← hmul, h, mul_one]
state_before: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Field K
inst✝² : IsDedekindDomain A
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
I J : Ideal A
x✝ : DvdNotUnit I J
hI : I ≠ 0
H : Ideal A
hunit : ¬IsUnit H
hmul : J = I * H
h : J = I
⊢ I * H = I * 1
state_after: no goals
Theorem: Cardinal.nat_power_eq
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: assumption_mod_cast
state_before: c : Cardinal.{u}
h : ℵ₀ ≤ c
n : ℕ
hn : 2 ≤ n
⊢ 2 ≤ ↑n
state_after: no goals
Theorem: Polynomial.isRegular_X_pow
File: Mathlib/Algebra/Polynomial/Coeff.lean

tactic: suffices IsLeftRegular (X^n : R[X]) from
  ⟨this, this.right_of_commute (fun p => commute_X_pow p n)⟩
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
⊢ IsRegular (X ^ n)
state_after: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
⊢ IsLeftRegular (X ^ n)

tactic: intro P Q (hPQ : X^n * P = X^n * Q)
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
⊢ IsLeftRegular (X ^ n)
state_after: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
P Q : R[X]
hPQ : X ^ n * P = X ^ n * Q
⊢ P = Q

tactic: ext i
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
P Q : R[X]
hPQ : X ^ n * P = X ^ n * Q
⊢ P = Q
state_after: case a
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
P Q : R[X]
hPQ : X ^ n * P = X ^ n * Q
i : ℕ
⊢ P.coeff i = Q.coeff i

tactic: rw [← coeff_X_pow_mul P n i, hPQ, coeff_X_pow_mul Q n i]
state_before: case a
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
P Q : R[X]
hPQ : X ^ n * P = X ^ n * Q
i : ℕ
⊢ P.coeff i = Q.coeff i
state_after: no goals
Theorem: sub_one_mul_padicValNat_factorial
File: Mathlib/NumberTheory/Padics/PadicVal.lean

tactic: rw [padicValNat_factorial <| lt_succ_of_lt <| lt.base (log p n)]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ (p - 1) * padicValNat p n ! = n - (p.digits n).sum
state_after: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ (p - 1) * ∑ i ∈ Finset.Ico 1 (log p n).succ.succ, n / p ^ i = n - (p.digits n).sum

tactic: nth_rw 2 [← zero_add 1]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ (p - 1) * ∑ i ∈ Finset.Ico 1 (log p n).succ.succ, n / p ^ i = n - (p.digits n).sum
state_after: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ (p - 1) * ∑ i ∈ Finset.Ico (0 + 1) (log p n).succ.succ, n / p ^ i = n - (p.digits n).sum

tactic: rw [Nat.succ_eq_add_one, ← Finset.sum_Ico_add' _ 0 _ 1,
  Ico_zero_eq_range, ← sub_one_mul_sum_log_div_pow_eq_sub_sum_digits, Nat.succ_eq_add_one]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ (p - 1) * ∑ i ∈ Finset.Ico (0 + 1) (log p n).succ.succ, n / p ^ i = n - (p.digits n).sum
state_after: no goals
Theorem: Orientation.tan_oangle_add_right_mul_norm_of_oangle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean

tactic: have hs : (o.oangle x (x + y)).sign = 1 := by
  rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
⊢ (o.oangle x (x + y)).tan * ‖x‖ = ‖y‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
hs : (o.oangle x (x + y)).sign = 1
⊢ (o.oangle x (x + y)).tan * ‖x‖ = ‖y‖

tactic: rw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.tan_coe,
  InnerProductGeometry.tan_angle_add_mul_norm_of_inner_eq_zero
    (o.inner_eq_zero_of_oangle_eq_pi_div_two h)
    (Or.inl (o.left_ne_zero_of_oangle_eq_pi_div_two h))]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
hs : (o.oangle x (x + y)).sign = 1
⊢ (o.oangle x (x + y)).tan * ‖x‖ = ‖y‖
state_after: no goals

tactic: rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
⊢ (o.oangle x (x + y)).sign = 1
state_after: no goals
Theorem: map_natCast'
File: Mathlib/Data/Nat/Cast/Basic.lean

tactic: simp [map_zero f]
state_before: α : Type u_1
β : Type u_2
A✝ : Type u_3
B : Type u_4
F : Type u_5
inst✝⁵ : AddMonoidWithOne B
inst✝⁴ : FunLike F ℕ A✝
inst✝³ : AddMonoidWithOne A✝
A : Type u_6
inst✝² : AddMonoidWithOne A
inst✝¹ : FunLike F A B
inst✝ : AddMonoidHomClass F A B
f : F
h : f 1 = 1
⊢ f ↑0 = ↑0
state_after: no goals

tactic: rw [Nat.cast_add, map_add, Nat.cast_add, map_natCast' f h n, Nat.cast_one, h, Nat.cast_one]
state_before: α : Type u_1
β : Type u_2
A✝ : Type u_3
B : Type u_4
F : Type u_5
inst✝⁵ : AddMonoidWithOne B
inst✝⁴ : FunLike F ℕ A✝
inst✝³ : AddMonoidWithOne A✝
A : Type u_6
inst✝² : AddMonoidWithOne A
inst✝¹ : FunLike F A B
inst✝ : AddMonoidHomClass F A B
f : F
h : f 1 = 1
n : ℕ
⊢ f ↑(n + 1) = ↑(n + 1)
state_after: no goals
Theorem: Equiv.tprod_eq
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g : β → α
a a₁ a₂ : α
e : γ ≃ β
f : β → α
⊢ mulSupport f ⊆ Set.range ⇑e
state_after: no goals
Theorem: WittVector.exists_eq_pow_p_mul'
File: Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean

tactic: obtain ⟨m, b, h₁, h₂⟩ := exists_eq_pow_p_mul a ha
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝² : Field k
inst✝¹ : CharP k p
inst✝ : PerfectRing k p
a : 𝕎 k
ha : a ≠ 0
⊢ ∃ m b, a = ↑p ^ m * ↑b
state_after: case intro.intro.intro
p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝² : Field k
inst✝¹ : CharP k p
inst✝ : PerfectRing k p
a : 𝕎 k
ha : a ≠ 0
m : ℕ
b : 𝕎 k
h₁ : b.coeff 0 ≠ 0
h₂ : a = ↑p ^ m * b
⊢ ∃ m b, a = ↑p ^ m * ↑b

tactic: let b₀ := Units.mk0 (b.coeff 0) h₁
state_before: case intro.intro.intro
p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝² : Field k
inst✝¹ : CharP k p
inst✝ : PerfectRing k p
a : 𝕎 k
ha : a ≠ 0
m : ℕ
b : 𝕎 k
h₁ : b.coeff 0 ≠ 0
h₂ : a = ↑p ^ m * b
⊢ ∃ m b, a = ↑p ^ m * ↑b
state_after: case intro.intro.intro
p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝² : Field k
inst✝¹ : CharP k p
inst✝ : PerfectRing k p
a : 𝕎 k
ha : a ≠ 0
m : ℕ
b : 𝕎 k
h₁ : b.coeff 0 ≠ 0
h₂ : a = ↑p ^ m * b
b₀ : kˣ := Units.mk0 (b.coeff 0) h₁
⊢ ∃ m b, a = ↑p ^ m * ↑b

tactic: have hb₀ : b.coeff 0 = b₀ := rfl
state_before: case intro.intro.intro
p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝² : Field k
inst✝¹ : CharP k p
inst✝ : PerfectRing k p
a : 𝕎 k
ha : a ≠ 0
m : ℕ
b : 𝕎 k
h₁ : b.coeff 0 ≠ 0
h₂ : a = ↑p ^ m * b
b₀ : kˣ := Units.mk0 (b.coeff 0) h₁
⊢ ∃ m b, a = ↑p ^ m * ↑b
state_after: case intro.intro.intro
p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝² : Field k
inst✝¹ : CharP k p
inst✝ : PerfectRing k p
a : 𝕎 k
ha : a ≠ 0
m : ℕ
b : 𝕎 k
h₁ : b.coeff 0 ≠ 0
h₂ : a = ↑p ^ m * b
b₀ : kˣ := Units.mk0 (b.coeff 0) h₁
hb₀ : b.coeff 0 = ↑b₀
⊢ ∃ m b, a = ↑p ^ m * ↑b

tactic: exact ⟨m, mkUnit hb₀, h₂⟩
state_before: case intro.intro.intro
p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝² : Field k
inst✝¹ : CharP k p
inst✝ : PerfectRing k p
a : 𝕎 k
ha : a ≠ 0
m : ℕ
b : 𝕎 k
h₁ : b.coeff 0 ≠ 0
h₂ : a = ↑p ^ m * b
b₀ : kˣ := Units.mk0 (b.coeff 0) h₁
hb₀ : b.coeff 0 = ↑b₀
⊢ ∃ m b, a = ↑p ^ m * ↑b
state_after: no goals
Theorem: CategoryTheory.Limits.inl_pushoutZeroZeroIso_hom
File: Mathlib/CategoryTheory/Limits/Constructions/ZeroObjects.lean

tactic: dsimp [pushoutZeroZeroIso]
state_before: C : Type u_1
inst✝³ : Category.{u_2, u_1} C
inst✝² : HasZeroObject C
inst✝¹ : HasZeroMorphisms C
X Y : C
inst✝ : HasBinaryCoproduct X Y
⊢ pushout.inl ≫ (pushoutZeroZeroIso X Y).hom = coprod.inl
state_after: C : Type u_1
inst✝³ : Category.{u_2, u_1} C
inst✝² : HasZeroObject C
inst✝¹ : HasZeroMorphisms C
X Y : C
inst✝ : HasBinaryCoproduct X Y
⊢ pushout.inl ≫
      (colimit.isoColimitCocone
          { cocone := PushoutCocone.mk coprod.inl coprod.inr ⋯,
            isColimit :=
              isPushoutOfIsInitialIsCoproduct coprod.inl coprod.inr 0 0 HasZeroObject.zeroIsInitial
                (coprodIsCoprod X Y) }).hom =
    coprod.inl

tactic: simp
state_before: C : Type u_1
inst✝³ : Category.{u_2, u_1} C
inst✝² : HasZeroObject C
inst✝¹ : HasZeroMorphisms C
X Y : C
inst✝ : HasBinaryCoproduct X Y
⊢ pushout.inl ≫
      (colimit.isoColimitCocone
          { cocone := PushoutCocone.mk coprod.inl coprod.inr ⋯,
            isColimit :=
              isPushoutOfIsInitialIsCoproduct coprod.inl coprod.inr 0 0 HasZeroObject.zeroIsInitial
                (coprodIsCoprod X Y) }).hom =
    coprod.inl
state_after: no goals