1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: SetTheory.Game.add_lf_add_left
File: Mathlib/SetTheory/Game/Basic.lean

tactic: rintro ⟨b⟩ ⟨c⟩ h ⟨a⟩
state_before: ⊢ ∀ {b c : Game}, b ⧏ c → ∀ (a : Game), a + b ⧏ a + c
state_after: case mk.mk.mk
b✝ : Game
b : PGame
c✝ : Game
c : PGame
h : Quot.mk Setoid.r b ⧏ Quot.mk Setoid.r c
a✝ : Game
a : PGame
⊢ Quot.mk Setoid.r a + Quot.mk Setoid.r b ⧏ Quot.mk Setoid.r a + Quot.mk Setoid.r c

tactic: apply PGame.add_lf_add_left h
state_before: case mk.mk.mk
b✝ : Game
b : PGame
c✝ : Game
c : PGame
h : Quot.mk Setoid.r b ⧏ Quot.mk Setoid.r c
a✝ : Game
a : PGame
⊢ Quot.mk Setoid.r a + Quot.mk Setoid.r b ⧏ Quot.mk Setoid.r a + Quot.mk Setoid.r c
state_after: no goals
Theorem: RatFunc.mk_smul
File: Mathlib/FieldTheory/RatFunc/Basic.lean

tactic: by_cases hq : q = 0
state_before: K : Type u
inst✝⁴ : CommRing K
R : Type u_1
inst✝³ : IsDomain K
inst✝² : Monoid R
inst✝¹ : DistribMulAction R K[X]
inst✝ : IsScalarTower R K[X] K[X]
c : R
p q : K[X]
⊢ RatFunc.mk (c • p) q = c • RatFunc.mk p q
state_after: case pos
K : Type u
inst✝⁴ : CommRing K
R : Type u_1
inst✝³ : IsDomain K
inst✝² : Monoid R
inst✝¹ : DistribMulAction R K[X]
inst✝ : IsScalarTower R K[X] K[X]
c : R
p q : K[X]
hq : q = 0
⊢ RatFunc.mk (c • p) q = c • RatFunc.mk p q

case neg
K : Type u
inst✝⁴ : CommRing K
R : Type u_1
inst✝³ : IsDomain K
inst✝² : Monoid R
inst✝¹ : DistribMulAction R K[X]
inst✝ : IsScalarTower R K[X] K[X]
c : R
p q : K[X]
hq : ¬q = 0
⊢ RatFunc.mk (c • p) q = c • RatFunc.mk p q

tactic: rw [hq, mk_zero, mk_zero, ← ofFractionRing_smul, smul_zero]
state_before: case pos
K : Type u
inst✝⁴ : CommRing K
R : Type u_1
inst✝³ : IsDomain K
inst✝² : Monoid R
inst✝¹ : DistribMulAction R K[X]
inst✝ : IsScalarTower R K[X] K[X]
c : R
p q : K[X]
hq : q = 0
⊢ RatFunc.mk (c • p) q = c • RatFunc.mk p q
state_after: no goals

tactic: rw [mk_eq_localization_mk _ hq, mk_eq_localization_mk _ hq, ← Localization.smul_mk, ←
  ofFractionRing_smul]
state_before: case neg
K : Type u
inst✝⁴ : CommRing K
R : Type u_1
inst✝³ : IsDomain K
inst✝² : Monoid R
inst✝¹ : DistribMulAction R K[X]
inst✝ : IsScalarTower R K[X] K[X]
c : R
p q : K[X]
hq : ¬q = 0
⊢ RatFunc.mk (c • p) q = c • RatFunc.mk p q
state_after: no goals
Theorem: ArithmeticFunction.isMultiplicative_one
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: simp
state_before: R : Type u_1
inst✝ : MonoidWithZero R
⊢ 1 1 = 1
state_after: no goals

tactic: intro m n hm _hn hmn
state_before: R : Type u_1
inst✝ : MonoidWithZero R
⊢ ∀ {m n : ℕ}, m ≠ 0 → n ≠ 0 → m.Coprime n → 1 (m * n) = 1 m * 1 n
state_after: R : Type u_1
inst✝ : MonoidWithZero R
m n : ℕ
hm : m ≠ 0
_hn : n ≠ 0
hmn : m.Coprime n
⊢ 1 (m * n) = 1 m * 1 n

tactic: rcases eq_or_ne m 1 with (rfl | hm')
state_before: R : Type u_1
inst✝ : MonoidWithZero R
m n : ℕ
hm : m ≠ 0
_hn : n ≠ 0
hmn : m.Coprime n
⊢ 1 (m * n) = 1 m * 1 n
state_after: case inl
R : Type u_1
inst✝ : MonoidWithZero R
n : ℕ
_hn : n ≠ 0
hm : 1 ≠ 0
hmn : Coprime 1 n
⊢ 1 (1 * n) = 1 1 * 1 n

case inr
R : Type u_1
inst✝ : MonoidWithZero R
m n : ℕ
hm : m ≠ 0
_hn : n ≠ 0
hmn : m.Coprime n
hm' : m ≠ 1
⊢ 1 (m * n) = 1 m * 1 n

tactic: rw [one_apply_ne, one_apply_ne hm', zero_mul]
state_before: case inr
R : Type u_1
inst✝ : MonoidWithZero R
m n : ℕ
hm : m ≠ 0
_hn : n ≠ 0
hmn : m.Coprime n
hm' : m ≠ 1
⊢ 1 (m * n) = 1 m * 1 n
state_after: case inr
R : Type u_1
inst✝ : MonoidWithZero R
m n : ℕ
hm : m ≠ 0
_hn : n ≠ 0
hmn : m.Coprime n
hm' : m ≠ 1
⊢ m * n ≠ 1

tactic: rw [Ne, mul_eq_one, not_and_or]
state_before: case inr
R : Type u_1
inst✝ : MonoidWithZero R
m n : ℕ
hm : m ≠ 0
_hn : n ≠ 0
hmn : m.Coprime n
hm' : m ≠ 1
⊢ m * n ≠ 1
state_after: case inr
R : Type u_1
inst✝ : MonoidWithZero R
m n : ℕ
hm : m ≠ 0
_hn : n ≠ 0
hmn : m.Coprime n
hm' : m ≠ 1
⊢ ¬m = 1 ∨ ¬n = 1

tactic: exact Or.inl hm'
state_before: case inr
R : Type u_1
inst✝ : MonoidWithZero R
m n : ℕ
hm : m ≠ 0
_hn : n ≠ 0
hmn : m.Coprime n
hm' : m ≠ 1
⊢ ¬m = 1 ∨ ¬n = 1
state_after: no goals

tactic: simp
state_before: case inl
R : Type u_1
inst✝ : MonoidWithZero R
n : ℕ
_hn : n ≠ 0
hm : 1 ≠ 0
hmn : Coprime 1 n
⊢ 1 (1 * n) = 1 1 * 1 n
state_after: no goals
Theorem: Multiset.map_comp_coe
File: Mathlib/Data/Multiset/Functor.lean

tactic: funext
state_before: F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
α β : Type u_1
h : α → β
⊢ Functor.map h ∘ Coe.coe = Coe.coe ∘ Functor.map h
state_after: case h
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
α β : Type u_1
h : α → β
x✝ : List α
⊢ (Functor.map h ∘ Coe.coe) x✝ = (Coe.coe ∘ Functor.map h) x✝

tactic: simp only [Function.comp_apply, Coe.coe, fmap_def, map_coe, List.map_eq_map]
state_before: case h
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
α β : Type u_1
h : α → β
x✝ : List α
⊢ (Functor.map h ∘ Coe.coe) x✝ = (Coe.coe ∘ Functor.map h) x✝
state_after: no goals
Theorem: Matrix.IsHermitian.eigenvectorUnitary_mulVec
File: Mathlib/LinearAlgebra/Matrix/Spectrum.lean

tactic: simp only [mulVec_single, eigenvectorUnitary_apply, mul_one]
state_before: 𝕜 : Type u_1
inst✝² : RCLike 𝕜
n : Type u_2
inst✝¹ : Fintype n
A : Matrix n n 𝕜
inst✝ : DecidableEq n
hA : A.IsHermitian
j : n
⊢ ↑hA.eigenvectorUnitary *ᵥ Pi.single j 1 = (WithLp.equiv 2 ((i : n) → (fun x => 𝕜) i)) (hA.eigenvectorBasis j)
state_after: no goals
Theorem: Sum.getLeft_eq_iff
File: .lake/packages/batteries/Batteries/Data/Sum/Lemmas.lean

tactic: cases x <;> simp at h ⊢
state_before: α✝ : Type u_1
a : α✝
β✝ : Type u_2
x : α✝ ⊕ β✝
h : x.isLeft = true
⊢ x.getLeft h = a ↔ x = inl a
state_after: no goals
Theorem: divp_eq_one_iff_eq
File: Mathlib/Algebra/Group/Units.lean

tactic: rw [divp_mul_cancel, one_mul]
state_before: α : Type u
inst✝ : Monoid α
a✝ b c a : α
u : αˣ
⊢ a /ₚ u * ↑u = 1 * ↑u ↔ a = ↑u
state_after: no goals
Theorem: RCLike.inv_eq_conj
File: Mathlib/Analysis/RCLike/Basic.lean

tactic: simp_rw [conj_mul, hz, algebraMap.coe_one, one_pow]
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
hz : ‖z‖ = 1
⊢ (starRingEnd K) z * z = 1
state_after: no goals
Theorem: Submonoid.subsemiringClosure_eq_closure
File: Mathlib/Algebra/Ring/Subsemiring/Basic.lean

tactic: ext
state_before: R : Type u
S : Type v
T : Type w
inst✝² : NonAssocSemiring R
M : Submonoid R
inst✝¹ : NonAssocSemiring S
inst✝ : NonAssocSemiring T
⊢ M.subsemiringClosure = Subsemiring.closure ↑M
state_after: case h
R : Type u
S : Type v
T : Type w
inst✝² : NonAssocSemiring R
M : Submonoid R
inst✝¹ : NonAssocSemiring S
inst✝ : NonAssocSemiring T
x✝ : R
⊢ x✝ ∈ M.subsemiringClosure ↔ x✝ ∈ Subsemiring.closure ↑M

tactic: refine
  ⟨fun hx => ?_, fun hx =>
    (Subsemiring.mem_closure.mp hx) M.subsemiringClosure fun s sM => ?_⟩
<;> rintro - ⟨H1, rfl⟩
<;> rintro - ⟨H2, rfl⟩
state_before: case h
R : Type u
S : Type v
T : Type w
inst✝² : NonAssocSemiring R
M : Submonoid R
inst✝¹ : NonAssocSemiring S
inst✝ : NonAssocSemiring T
x✝ : R
⊢ x✝ ∈ M.subsemiringClosure ↔ x✝ ∈ Subsemiring.closure ↑M
state_after: case h.refine_1.intro.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonAssocSemiring R
M : Submonoid R
inst✝¹ : NonAssocSemiring S
inst✝ : NonAssocSemiring T
x✝ : R
hx : x✝ ∈ M.subsemiringClosure
H1 : Subsemiring R
H2 : H1 ∈ {S | ↑M ⊆ ↑S}
⊢ x✝ ∈ (fun h => ↑H1) H2

case h.refine_2.intro.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonAssocSemiring R
M : Submonoid R
inst✝¹ : NonAssocSemiring S
inst✝ : NonAssocSemiring T
x✝ : R
hx : x✝ ∈ Subsemiring.closure ↑M
s : R
sM : s ∈ ↑M
H1 : AddSubmonoid R
H2 : H1 ∈ {S | ↑M ⊆ ↑S}
⊢ s ∈ (fun h => ↑H1) H2

tactic: exact AddSubmonoid.mem_closure.mp hx H1.toAddSubmonoid H2
state_before: case h.refine_1.intro.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonAssocSemiring R
M : Submonoid R
inst✝¹ : NonAssocSemiring S
inst✝ : NonAssocSemiring T
x✝ : R
hx : x✝ ∈ M.subsemiringClosure
H1 : Subsemiring R
H2 : H1 ∈ {S | ↑M ⊆ ↑S}
⊢ x✝ ∈ (fun h => ↑H1) H2
state_after: no goals

tactic: exact H2 sM
state_before: case h.refine_2.intro.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonAssocSemiring R
M : Submonoid R
inst✝¹ : NonAssocSemiring S
inst✝ : NonAssocSemiring T
x✝ : R
hx : x✝ ∈ Subsemiring.closure ↑M
s : R
sM : s ∈ ↑M
H1 : AddSubmonoid R
H2 : H1 ∈ {S | ↑M ⊆ ↑S}
⊢ s ∈ (fun h => ↑H1) H2
state_after: no goals
Theorem: LinearMap.span_singleton_eq_range
File: Mathlib/LinearAlgebra/Span.lean

tactic: refine Iff.trans ?_ LinearMap.mem_range.symm
state_before: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x y : M
⊢ y ∈ span R {x} ↔ y ∈ range (toSpanSingleton R M x)
state_after: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x y : M
⊢ y ∈ span R {x} ↔ ∃ y_1, (toSpanSingleton R M x) y_1 = y

tactic: exact mem_span_singleton
state_before: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x y : M
⊢ y ∈ span R {x} ↔ ∃ y_1, (toSpanSingleton R M x) y_1 = y
state_after: no goals
Theorem: Polynomial.pow_rootMultiplicity_not_dvd
File: Mathlib/Algebra/Polynomial/RingDivision.lean

tactic: rw [← rootMultiplicity_le_iff p0]
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
⊢ ¬(X - C a) ^ (rootMultiplicity a p + 1) ∣ p
state_after: no goals
Theorem: Real.tendsto_of_bddAbove_monotone
File: Mathlib/Topology/Instances/NNReal.lean

tactic: obtain ⟨B, hB⟩ := Real.exists_isLUB  (Set.range_nonempty f) h_bdd
state_before: f : ℕ → ℝ
h_bdd : BddAbove (range f)
h_mon : Monotone f
⊢ ∃ r, Tendsto f atTop (𝓝 r)
state_after: case intro
f : ℕ → ℝ
h_bdd : BddAbove (range f)
h_mon : Monotone f
B : ℝ
hB : IsLUB (range f) B
⊢ ∃ r, Tendsto f atTop (𝓝 r)

tactic: exact ⟨B, tendsto_atTop_isLUB h_mon hB⟩
state_before: case intro
f : ℕ → ℝ
h_bdd : BddAbove (range f)
h_mon : Monotone f
B : ℝ
hB : IsLUB (range f) B
⊢ ∃ r, Tendsto f atTop (𝓝 r)
state_after: no goals
Theorem: circleMap_not_mem_ball
File: Mathlib/MeasureTheory/Integral/CircleIntegral.lean

tactic: simp [dist_eq, le_abs_self]
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
c : ℂ
R θ : ℝ
⊢ circleMap c R θ ∉ ball c R
state_after: no goals
Theorem: ENNReal.not_lt_top
File: Mathlib/Data/ENNReal/Operations.lean

tactic: rw [lt_top_iff_ne_top, Classical.not_not]
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
α : Type u_1
x : ℝ≥0∞
⊢ ¬x < ⊤ ↔ x = ⊤
state_after: no goals
Theorem: Subgroup.eq_bot_or_eq_top_of_prime_card
File: Mathlib/GroupTheory/SpecificGroups/Cyclic.lean

tactic: classical
have := card_subgroup_dvd_card H
rwa [Nat.card_eq_fintype_card (α := G), Nat.dvd_prime hp.1, ← Nat.card_eq_fintype_card,
  ← eq_bot_iff_card, card_eq_iff_eq_top] at this
state_before: α : Type u
a : α
inst✝¹ : Group α
G : Type u_1
inst✝ : Group G
x✝ : Fintype G
H : Subgroup G
hp : Fact (Nat.Prime (Fintype.card G))
⊢ H = ⊥ ∨ H = ⊤
state_after: no goals

tactic: have := card_subgroup_dvd_card H
state_before: α : Type u
a : α
inst✝¹ : Group α
G : Type u_1
inst✝ : Group G
x✝ : Fintype G
H : Subgroup G
hp : Fact (Nat.Prime (Fintype.card G))
⊢ H = ⊥ ∨ H = ⊤
state_after: α : Type u
a : α
inst✝¹ : Group α
G : Type u_1
inst✝ : Group G
x✝ : Fintype G
H : Subgroup G
hp : Fact (Nat.Prime (Fintype.card G))
this : Nat.card ↥H ∣ Nat.card G
⊢ H = ⊥ ∨ H = ⊤

tactic: rwa [Nat.card_eq_fintype_card (α := G), Nat.dvd_prime hp.1, ← Nat.card_eq_fintype_card,
  ← eq_bot_iff_card, card_eq_iff_eq_top] at this
state_before: α : Type u
a : α
inst✝¹ : Group α
G : Type u_1
inst✝ : Group G
x✝ : Fintype G
H : Subgroup G
hp : Fact (Nat.Prime (Fintype.card G))
this : Nat.card ↥H ∣ Nat.card G
⊢ H = ⊥ ∨ H = ⊤
state_after: no goals
Theorem: lt_div_iff_mul_lt
File: Mathlib/Algebra/Order/Group/Defs.lean

tactic: rw [← mul_lt_mul_iff_right b, div_eq_mul_inv, inv_mul_cancel_right]
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LT α
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
a b c d : α
⊢ a < c / b ↔ a * b < c
state_after: no goals
Theorem: Real.sin_eq_sqrt_one_sub_cos_sq
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: rw [← abs_sin_eq_sqrt_one_sub_cos_sq, abs_of_nonneg (sin_nonneg_of_nonneg_of_le_pi hl hu)]
state_before: x : ℝ
hl : 0 ≤ x
hu : x ≤ π
⊢ sin x = √(1 - cos x ^ 2)
state_after: no goals
Theorem: RCLike.div_I
File: Mathlib/Analysis/RCLike/Basic.lean

tactic: rw [div_eq_mul_inv, inv_I, mul_neg]
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z✝ z : K
⊢ z / I = -(z * I)
state_after: no goals
Theorem: isConnected_setOf_sameRay_and_ne_zero
File: Mathlib/Analysis/Convex/Normed.lean

tactic: simp_rw [← exists_pos_left_iff_sameRay_and_ne_zero hx]
state_before: ι : Type u_1
E : Type u_2
P : Type u_3
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
s t : Set E
x : E
hx : x ≠ 0
⊢ IsConnected {y | SameRay ℝ x y ∧ y ≠ 0}
state_after: ι : Type u_1
E : Type u_2
P : Type u_3
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
s t : Set E
x : E
hx : x ≠ 0
⊢ IsConnected {y | ∃ r, 0 < r ∧ r • x = y}

tactic: exact isConnected_Ioi.image _ (continuous_id.smul continuous_const).continuousOn
state_before: ι : Type u_1
E : Type u_2
P : Type u_3
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
s t : Set E
x : E
hx : x ≠ 0
⊢ IsConnected {y | ∃ r, 0 < r ∧ r • x = y}
state_after: no goals
Theorem: CategoryTheory.Bicategory.rightUnitor_naturality
File: Mathlib/CategoryTheory/Bicategory/Basic.lean

tactic: simp
state_before: B : Type u
inst✝ : Bicategory B
a b c d e : B
f g : a ⟶ b
η : f ⟶ g
⊢ η ▷ 𝟙 b ≫ (ρ_ g).hom = (ρ_ f).hom ≫ η
state_after: no goals
Theorem: sdiff_sdiff_sdiff_le_sdiff
File: Mathlib/Order/Heyting/Basic.lean

tactic: rw [sdiff_le_iff, sdiff_le_iff, sup_left_comm, sup_sdiff_self, sup_left_comm, sdiff_sup_self,
  sup_left_comm]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ (a \ b) \ (a \ c) ≤ c \ b
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a ≤ a ⊔ (b ⊔ c)

tactic: exact le_sup_left
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a ≤ a ⊔ (b ⊔ c)
state_after: no goals
Theorem: EMetric.hausdorffEdist_zero_iff_closure_eq_closure
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: simp only [hausdorffEdist_def, ENNReal.sup_eq_zero, ENNReal.iSup_eq_zero, ← subset_def,
  ← mem_closure_iff_infEdist_zero, subset_antisymm_iff, isClosed_closure.closure_subset_iff]
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
⊢ hausdorffEdist s t = 0 ↔ closure s = closure t
state_after: no goals
Theorem: String.Iterator.ValidFor.nextn
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

tactic: simp [h, Iterator.nextn]
state_before: l r : List Char
it : Iterator
h : ValidFor l r it
x✝ : 0 ≤ r.length
⊢ ValidFor ((List.take 0 r).reverse ++ l) (List.drop 0 r) (it.nextn 0)
state_after: no goals

tactic: simp only [Iterator.nextn]
state_before: l r : List Char
it : Iterator
h : ValidFor l r it
n : Nat
hn : n + 1 ≤ r.length
⊢ ValidFor ((List.take (n + 1) r).reverse ++ l) (List.drop (n + 1) r) (it.nextn (n + 1))
state_after: l r : List Char
it : Iterator
h : ValidFor l r it
n : Nat
hn : n + 1 ≤ r.length
⊢ ValidFor ((List.take (n + 1) r).reverse ++ l) (List.drop (n + 1) r) (it.next.nextn n)

tactic: have a::r := r
state_before: l r : List Char
it : Iterator
h : ValidFor l r it
n : Nat
hn : n + 1 ≤ r.length
⊢ ValidFor ((List.take (n + 1) r).reverse ++ l) (List.drop (n + 1) r) (it.next.nextn n)
state_after: l r✝ : List Char
it : Iterator
n : Nat
a : Char
r : List Char
h : ValidFor l (a :: r) it
hn : n + 1 ≤ (a :: r).length
⊢ ValidFor ((List.take (n + 1) (a :: r)).reverse ++ l) (List.drop (n + 1) (a :: r)) (it.next.nextn n)

tactic: simpa using h.next.nextn _ (Nat.le_of_succ_le_succ hn)
state_before: l r✝ : List Char
it : Iterator
n : Nat
a : Char
r : List Char
h : ValidFor l (a :: r) it
hn : n + 1 ≤ (a :: r).length
⊢ ValidFor ((List.take (n + 1) (a :: r)).reverse ++ l) (List.drop (n + 1) (a :: r)) (it.next.nextn n)
state_after: no goals
Theorem: Quaternion.normSq_coe
File: Mathlib/Algebra/Quaternion.lean

tactic: rw [normSq_def, star_coe, ← coe_mul, coe_re, sq]
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝ : CommRing R
r x y z : R
a b c : ℍ[R]
⊢ normSq ↑x = x ^ 2
state_after: no goals
Theorem: DirichletCharacter.eq_one_iff_conductor_eq_one
File: Mathlib/NumberTheory/DirichletCharacter/Basic.lean

tactic: refine ⟨fun h ↦ h ▸ conductor_one hn, fun hχ ↦ ?_⟩
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
hn : n ≠ 0
⊢ χ = 1 ↔ χ.conductor = 1
state_after: R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
hn : n ≠ 0
hχ : χ.conductor = 1
⊢ χ = 1

tactic: obtain ⟨h', χ₀, h⟩ := factorsThrough_conductor χ
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
hn : n ≠ 0
hχ : χ.conductor = 1
⊢ χ = 1
state_after: case intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
hn : n ≠ 0
hχ : χ.conductor = 1
h' : χ.conductor ∣ n
χ₀ : DirichletCharacter R χ.conductor
h : χ = (changeLevel h') χ₀
⊢ χ = 1

tactic: exact (level_one' χ₀ hχ ▸ h).trans <| changeLevel_one h'
state_before: case intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
hn : n ≠ 0
hχ : χ.conductor = 1
h' : χ.conductor ∣ n
χ₀ : DirichletCharacter R χ.conductor
h : χ = (changeLevel h') χ₀
⊢ χ = 1
state_after: no goals
Theorem: even_iff_two_dvd
File: Mathlib/Algebra/Ring/Parity.lean

tactic: simp [Even, Dvd.dvd, two_mul]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
inst✝¹ : Semiring α
inst✝ : Semiring β
a b : α
m n : ℕ
⊢ Even a ↔ 2 ∣ a
state_after: no goals
Theorem: Finset.noncommProd_congr
File: Mathlib/Data/Finset/NoncommProd.lean

tactic: dsimp only
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s₁ s₂ : Finset α
f g : α → β
h₁ : s₁ = s₂
h₂ : ∀ x ∈ s₂, f x = g x
comm : (↑s₁).Pairwise fun a b => Commute (f a) (f b)
x : α
hx : x ∈ ↑s₂
y : α
hy : y ∈ ↑s₂
h : x ≠ y
⊢ (fun a b => Commute (g a) (g b)) x y
state_after: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s₁ s₂ : Finset α
f g : α → β
h₁ : s₁ = s₂
h₂ : ∀ x ∈ s₂, f x = g x
comm : (↑s₁).Pairwise fun a b => Commute (f a) (f b)
x : α
hx : x ∈ ↑s₂
y : α
hy : y ∈ ↑s₂
h : x ≠ y
⊢ Commute (g x) (g y)

tactic: rw [← h₂ _ hx, ← h₂ _ hy]
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s₁ s₂ : Finset α
f g : α → β
h₁ : s₁ = s₂
h₂ : ∀ x ∈ s₂, f x = g x
comm : (↑s₁).Pairwise fun a b => Commute (f a) (f b)
x : α
hx : x ∈ ↑s₂
y : α
hy : y ∈ ↑s₂
h : x ≠ y
⊢ Commute (g x) (g y)
state_after: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s₁ s₂ : Finset α
f g : α → β
h₁ : s₁ = s₂
h₂ : ∀ x ∈ s₂, f x = g x
comm : (↑s₁).Pairwise fun a b => Commute (f a) (f b)
x : α
hx : x ∈ ↑s₂
y : α
hy : y ∈ ↑s₂
h : x ≠ y
⊢ Commute (f x) (f y)

tactic: subst h₁
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s₁ s₂ : Finset α
f g : α → β
h₁ : s₁ = s₂
h₂ : ∀ x ∈ s₂, f x = g x
comm : (↑s₁).Pairwise fun a b => Commute (f a) (f b)
x : α
hx : x ∈ ↑s₂
y : α
hy : y ∈ ↑s₂
h : x ≠ y
⊢ Commute (f x) (f y)
state_after: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s₁ : Finset α
f g : α → β
comm : (↑s₁).Pairwise fun a b => Commute (f a) (f b)
x y : α
h : x ≠ y
h₂ : ∀ x ∈ s₁, f x = g x
hx : x ∈ ↑s₁
hy : y ∈ ↑s₁
⊢ Commute (f x) (f y)

tactic: exact comm hx hy h
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s₁ : Finset α
f g : α → β
comm : (↑s₁).Pairwise fun a b => Commute (f a) (f b)
x y : α
h : x ≠ y
h₂ : ∀ x ∈ s₁, f x = g x
hx : x ∈ ↑s₁
hy : y ∈ ↑s₁
⊢ Commute (f x) (f y)
state_after: no goals

tactic: simp_rw [noncommProd, Multiset.map_congr (congr_arg _ h₁) h₂]
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s₁ s₂ : Finset α
f g : α → β
h₁ : s₁ = s₂
h₂ : ∀ x ∈ s₂, f x = g x
comm : (↑s₁).Pairwise fun a b => Commute (f a) (f b)
⊢ s₁.noncommProd f comm = s₂.noncommProd g ⋯
state_after: no goals
Theorem: MeasureTheory.lintegral_rpow_nnnorm_eq_rpow_snorm'
File: Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean

tactic: rw [snorm', ← ENNReal.rpow_mul, one_div, inv_mul_cancel, ENNReal.rpow_one]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
hq0_lt : 0 < q
⊢ ∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ = snorm' f q μ ^ q
state_after: α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
hq0_lt : 0 < q
⊢ q ≠ 0

tactic: exact (ne_of_lt hq0_lt).symm
state_before: α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
hq0_lt : 0 < q
⊢ q ≠ 0
state_after: no goals
Theorem: Finset.disjUnion_singleton
File: Mathlib/Data/Finset/Basic.lean

tactic: rw [disjUnion_comm, singleton_disjUnion]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s : Finset α
a : α
h : _root_.Disjoint s {a}
⊢ s.disjUnion {a} h = cons a s ⋯
state_after: no goals