1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: NonUnitalSubalgebra.star_mem_star_iff
File: Mathlib/Algebra/Star/NonUnitalSubalgebra.lean

tactic: simp
state_before: F : Type v'
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : NonUnitalSemiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Module R A
inst✝⁸ : IsScalarTower R A A
inst✝⁷ : SMulCommClass R A A
inst✝⁶ : StarModule R A
inst✝⁵ : NonUnitalSemiring B
inst✝⁴ : StarRing B
inst✝³ : Module R B
inst✝² : IsScalarTower R B B
inst✝¹ : SMulCommClass R B B
inst✝ : StarModule R B
S : NonUnitalSubalgebra R A
x : A
⊢ star x ∈ star S ↔ x ∈ S
state_after: no goals
Theorem: Vector.mapAccumr₂_mapAccumr₂_left_left
File: Mathlib/Data/Vector/MapLemmas.lean

tactic: induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all
state_before: α : Type
n : ℕ
β : Type
xs : Vector α n
ys : Vector β n
γ σ₁ φ σ₂ : Type
s₂ : σ₂
s₁ : σ₁
f₁ : γ → α → σ₁ → σ₁ × φ
f₂ : α → β → σ₂ → σ₂ × γ
⊢ mapAccumr₂ f₁ (mapAccumr₂ f₂ xs ys s₂).2 xs s₁ =
    let m :=
      mapAccumr₂
        (fun x y x_1 =>
          match x_1 with
          | (s₁, s₂) =>
            let r₂ := f₂ x y s₂;
            let r₁ := f₁ r₂.2 x s₁;
            ((r₁.1, r₂.1), r₁.2))
        xs ys (s₁, s₂);
    (m.1.1, m.2)
state_after: no goals
Theorem: Subgroup.characteristic_iff_map_le
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

tactic: simp_rw [map_equiv_eq_comap_symm']
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K : Subgroup G
⊢ H.Characteristic ↔ ∀ (ϕ : G ≃* G), map ϕ.toMonoidHom H ≤ H
state_after: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K : Subgroup G
⊢ H.Characteristic ↔ ∀ (ϕ : G ≃* G), comap ϕ.symm.toMonoidHom H ≤ H

tactic: exact characteristic_iff_comap_le.trans ⟨fun h ϕ => h ϕ.symm, fun h ϕ => h ϕ.symm⟩
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K : Subgroup G
⊢ H.Characteristic ↔ ∀ (ϕ : G ≃* G), comap ϕ.symm.toMonoidHom H ≤ H
state_after: no goals
Theorem: map_iInf₂
File: Mathlib/Order/Hom/CompleteLattice.lean

tactic: simp_rw [map_iInf]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ι : Sort u_6
κ : ι → Sort u_7
inst✝³ : FunLike F α β
inst✝² : InfSet α
inst✝¹ : InfSet β
inst✝ : sInfHomClass F α β
f : F
g : (i : ι) → κ i → α
⊢ f (⨅ i, ⨅ j, g i j) = ⨅ i, ⨅ j, f (g i j)
state_after: no goals
Theorem: OrderIso.image_Icc
File: Mathlib/Order/Interval/Set/OrderIso.lean

tactic: rw [e.image_eq_preimage, e.symm.preimage_Icc, e.symm_symm]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
e : α ≃o β
a b : α
⊢ ⇑e '' Icc a b = Icc (e a) (e b)
state_after: no goals
Theorem: Part.toOption_isSome
File: Mathlib/Data/Part.lean

tactic: by_cases h : o.Dom <;> simp [h, toOption]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
o : Part α
inst✝ : Decidable o.Dom
⊢ o.toOption.isSome = true ↔ o.Dom
state_after: no goals
Theorem: ENNReal.le_of_forall_nnreal_lt
File: Mathlib/Data/ENNReal/Inv.lean

tactic: refine le_of_forall_ge_of_dense fun r hr => ?_
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
x y : ℝ≥0∞
h : ∀ (r : ℝ≥0), ↑r < x → ↑r ≤ y
⊢ x ≤ y
state_after: a b c d : ℝ≥0∞
r✝ p q : ℝ≥0
x y : ℝ≥0∞
h : ∀ (r : ℝ≥0), ↑r < x → ↑r ≤ y
r : ℝ≥0∞
hr : r < x
⊢ r ≤ y

tactic: lift r to ℝ≥0 using ne_top_of_lt hr
state_before: a b c d : ℝ≥0∞
r✝ p q : ℝ≥0
x y : ℝ≥0∞
h : ∀ (r : ℝ≥0), ↑r < x → ↑r ≤ y
r : ℝ≥0∞
hr : r < x
⊢ r ≤ y
state_after: case intro
a b c d : ℝ≥0∞
r✝ p q : ℝ≥0
x y : ℝ≥0∞
h : ∀ (r : ℝ≥0), ↑r < x → ↑r ≤ y
r : ℝ≥0
hr : ↑r < x
⊢ ↑r ≤ y

tactic: exact h r hr
state_before: case intro
a b c d : ℝ≥0∞
r✝ p q : ℝ≥0
x y : ℝ≥0∞
h : ∀ (r : ℝ≥0), ↑r < x → ↑r ≤ y
r : ℝ≥0
hr : ↑r < x
⊢ ↑r ≤ y
state_after: no goals
Theorem: Set.image_mul_left_Ioo
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: convert image_mul_right_Ioo b c h using 1 <;> simp only [mul_comm _ a]
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a✝ a : α
h : 0 < a
b c : α
⊢ (fun x => a * x) '' Ioo b c = Ioo (a * b) (a * c)
state_after: no goals
Theorem: List.foldl1_eq_foldr1
File: Mathlib/Data/List/Basic.lean

tactic: simp only [cons_append, foldl_cons, foldr_cons, foldl1_eq_foldr1 _ _ l]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → α → α
hcomm : Commutative f
hassoc : Associative f
a b c : α
l : List α
⊢ foldl f a (c :: l ++ [b]) = foldr f b (a :: c :: l)
state_after: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → α → α
hcomm : Commutative f
hassoc : Associative f
a b c : α
l : List α
⊢ f (f a c) (foldr f b l) = f a (f c (foldr f b l))

tactic: rw [hassoc]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → α → α
hcomm : Commutative f
hassoc : Associative f
a b c : α
l : List α
⊢ f (f a c) (foldr f b l) = f a (f c (foldr f b l))
state_after: no goals
Theorem: natDegree_minpolyDiv_lt
File: Mathlib/FieldTheory/Minpoly/MinpolyDiv.lean

tactic: rw [← natDegree_minpolyDiv_succ hx]
state_before: R : Type u_2
K : Type ?u.69028
L : Type ?u.69031
S : Type u_1
inst✝⁶ : CommRing R
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : Algebra K L
x : S
hx : IsIntegral R x
inst✝ : Nontrivial S
⊢ (minpolyDiv R x).natDegree < (minpoly R x).natDegree
state_after: R : Type u_2
K : Type ?u.69028
L : Type ?u.69031
S : Type u_1
inst✝⁶ : CommRing R
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : Algebra K L
x : S
hx : IsIntegral R x
inst✝ : Nontrivial S
⊢ (minpolyDiv R x).natDegree < (minpolyDiv R x).natDegree + 1

tactic: exact Nat.lt_succ_self _
state_before: R : Type u_2
K : Type ?u.69028
L : Type ?u.69031
S : Type u_1
inst✝⁶ : CommRing R
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : Algebra K L
x : S
hx : IsIntegral R x
inst✝ : Nontrivial S
⊢ (minpolyDiv R x).natDegree < (minpolyDiv R x).natDegree + 1
state_after: no goals
Theorem: List.drop_take_succ_join_eq_getElem
File: Mathlib/Algebra/BigOperators/Group/List.lean

tactic: simpa using drop_take_succ_join_eq_getElem' _ _ _
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
L : List (List α)
i : ℕ
h : i < L.length
⊢ drop (take i (map length L)).sum (take (take (i + 1) (map length L)).sum L.join) = L[i]
state_after: no goals
Theorem: WeierstrassCurve.preΨ'_ne_zero
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Degree.lean

tactic: by_cases hn : 2 < n
state_before: R : Type u
inst✝¹ : CommRing R
W : WeierstrassCurve R
inst✝ : Nontrivial R
n : ℕ
h : ↑n ≠ 0
⊢ W.preΨ' n ≠ 0
state_after: case pos
R : Type u
inst✝¹ : CommRing R
W : WeierstrassCurve R
inst✝ : Nontrivial R
n : ℕ
h : ↑n ≠ 0
hn : 2 < n
⊢ W.preΨ' n ≠ 0

case neg
R : Type u
inst✝¹ : CommRing R
W : WeierstrassCurve R
inst✝ : Nontrivial R
n : ℕ
h : ↑n ≠ 0
hn : ¬2 < n
⊢ W.preΨ' n ≠ 0

tactic: exact ne_zero_of_natDegree_gt <| W.natDegree_preΨ'_pos hn h
state_before: case pos
R : Type u
inst✝¹ : CommRing R
W : WeierstrassCurve R
inst✝ : Nontrivial R
n : ℕ
h : ↑n ≠ 0
hn : 2 < n
⊢ W.preΨ' n ≠ 0
state_after: no goals

tactic: rcases n with _ | _ | _ <;> aesop
state_before: case neg
R : Type u
inst✝¹ : CommRing R
W : WeierstrassCurve R
inst✝ : Nontrivial R
n : ℕ
h : ↑n ≠ 0
hn : ¬2 < n
⊢ W.preΨ' n ≠ 0
state_after: no goals
Theorem: mem_fixingSubgroup_iff_subset_fixedBy
File: Mathlib/GroupTheory/GroupAction/FixingSubgroup.lean

tactic: simp_rw [mem_fixingSubgroup_iff, Set.subset_def, mem_fixedBy]
state_before: M : Type u_1
α : Type u_2
inst✝¹ : Group M
inst✝ : MulAction M α
s : Set α
m : M
⊢ m ∈ fixingSubgroup M s ↔ s ⊆ fixedBy α m
state_after: no goals
Theorem: Finset.subtype_univ
File: Mathlib/Data/Fintype/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : Fintype α
s t : Finset α
inst✝² : Fintype α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : Fintype { a // p a }
⊢ Finset.subtype p univ = univ
state_after: no goals
Theorem: Finset.prod_sdiff_div_prod_sdiff
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: simp [← Finset.prod_sdiff (@inf_le_left _ _ s₁ s₂), ← Finset.prod_sdiff (@inf_le_right _ _ s₁ s₂)]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommGroup β
inst✝ : DecidableEq α
⊢ (∏ x ∈ s₂ \ s₁, f x) / ∏ x ∈ s₁ \ s₂, f x = (∏ x ∈ s₂, f x) / ∏ x ∈ s₁, f x
state_after: no goals
Theorem: MvPolynomial.finSuccEquiv_apply
File: Mathlib/Algebra/MvPolynomial/Equiv.lean

tactic: rw [← finSuccEquiv_eq, RingHom.coe_coe]
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
s : σ →₀ ℕ
inst✝ : CommSemiring R
n : ℕ
p : MvPolynomial (Fin (n + 1)) R
⊢ (finSuccEquiv R n) p =
    (eval₂Hom (Polynomial.C.comp C) fun i => Fin.cases Polynomial.X (fun k => Polynomial.C (X k)) i) p
state_after: no goals
Theorem: uniformContinuousOn_iff_restrict
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: delta UniformContinuousOn UniformContinuous
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
f : α → β
s : Set α
⊢ UniformContinuousOn f s ↔ UniformContinuous (s.restrict f)
state_after: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
f : α → β
s : Set α
⊢ Tendsto (fun x => (f x.1, f x.2)) (𝓤 α ⊓ 𝓟 (s ×ˢ s)) (𝓤 β) ↔
    Tendsto (fun x => (s.restrict f x.1, s.restrict f x.2)) (𝓤 ↑s) (𝓤 β)

tactic: rw [← map_uniformity_set_coe, tendsto_map'_iff]
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
f : α → β
s : Set α
⊢ Tendsto (fun x => (f x.1, f x.2)) (𝓤 α ⊓ 𝓟 (s ×ˢ s)) (𝓤 β) ↔
    Tendsto (fun x => (s.restrict f x.1, s.restrict f x.2)) (𝓤 ↑s) (𝓤 β)
state_after: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
f : α → β
s : Set α
⊢ Tendsto ((fun x => (f x.1, f x.2)) ∘ Prod.map Subtype.val Subtype.val) (𝓤 ↑s) (𝓤 β) ↔
    Tendsto (fun x => (s.restrict f x.1, s.restrict f x.2)) (𝓤 ↑s) (𝓤 β)

tactic: rfl
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
f : α → β
s : Set α
⊢ Tendsto ((fun x => (f x.1, f x.2)) ∘ Prod.map Subtype.val Subtype.val) (𝓤 ↑s) (𝓤 β) ↔
    Tendsto (fun x => (s.restrict f x.1, s.restrict f x.2)) (𝓤 ↑s) (𝓤 β)
state_after: no goals
Theorem: Units.mul_inv_of_eq
File: Mathlib/Algebra/Group/Units.lean

tactic: rw [← h, u.mul_inv]
state_before: α : Type u
inst✝ : Monoid α
a✝ b c u : αˣ
a : α
h : ↑u = a
⊢ a * ↑u⁻¹ = 1
state_after: no goals
Theorem: Finset.range_eq_empty_iff
File: Mathlib/Data/Finset/Basic.lean

tactic: rw [← not_nonempty_iff_eq_empty, nonempty_range_iff, not_not]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
n m l : ℕ
⊢ range n = ∅ ↔ n = 0
state_after: no goals
Theorem: EReal.nhds_bot_basis
File: Mathlib/Topology/Instances/EReal.lean

tactic: refine _root_.nhds_bot_basis.to_hasBasis (fun x hx => ?_) fun _ _ ↦ ⟨_, bot_lt_coe _, Subset.rfl⟩
state_before: α : Type u_1
inst✝ : TopologicalSpace α
⊢ (𝓝 ⊥).HasBasis (fun x => True) fun x => Iio ↑x
state_after: α : Type u_1
inst✝ : TopologicalSpace α
x : EReal
hx : ⊥ < x
⊢ ∃ i', True ∧ Iio ↑i' ⊆ Iio x

tactic: rcases exists_rat_btwn_of_lt hx with ⟨y, -, hxy⟩
state_before: α : Type u_1
inst✝ : TopologicalSpace α
x : EReal
hx : ⊥ < x
⊢ ∃ i', True ∧ Iio ↑i' ⊆ Iio x
state_after: case intro.intro
α : Type u_1
inst✝ : TopologicalSpace α
x : EReal
hx : ⊥ < x
y : ℚ
hxy : ↑↑y < x
⊢ ∃ i', True ∧ Iio ↑i' ⊆ Iio x

tactic: exact ⟨_, trivial, Iio_subset_Iio hxy.le⟩
state_before: case intro.intro
α : Type u_1
inst✝ : TopologicalSpace α
x : EReal
hx : ⊥ < x
y : ℚ
hxy : ↑↑y < x
⊢ ∃ i', True ∧ Iio ↑i' ⊆ Iio x
state_after: no goals
Theorem: Complex.div_ofReal
File: Mathlib/Data/Complex/Basic.lean

tactic: simp_rw [div_eq_inv_mul, ← ofReal_inv, ofReal_mul']
state_before: z : ℂ
x : ℝ
⊢ z / ↑x = { re := z.re / x, im := z.im / x }
state_after: no goals
Theorem: Int.shiftRight_negSucc
File: Mathlib/Data/Int/Bitwise.lean

tactic: cases n <;> rfl
state_before: m n : ℕ
⊢ -[m+1] >>> ↑n = -[m >>> n+1]
state_after: no goals
Theorem: AffineIndependent.units_lineMap
File: Mathlib/LinearAlgebra/AffineSpace/Independent.lean

tactic: rw [affineIndependent_iff_linearIndependent_vsub k _ j] at hp ⊢
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
hp : AffineIndependent k p
j : ι
w : ι → kˣ
⊢ AffineIndependent k fun i => (AffineMap.lineMap (p j) (p i)) ↑(w i)
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
j : ι
hp : LinearIndependent k fun i => p ↑i -ᵥ p j
w : ι → kˣ
⊢ LinearIndependent k fun i => (AffineMap.lineMap (p j) (p ↑i)) ↑(w ↑i) -ᵥ (AffineMap.lineMap (p j) (p j)) ↑(w j)

tactic: simp only [AffineMap.lineMap_vsub_left, AffineMap.coe_const, AffineMap.lineMap_same, const_apply]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
j : ι
hp : LinearIndependent k fun i => p ↑i -ᵥ p j
w : ι → kˣ
⊢ LinearIndependent k fun i => (AffineMap.lineMap (p j) (p ↑i)) ↑(w ↑i) -ᵥ (AffineMap.lineMap (p j) (p j)) ↑(w j)
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
j : ι
hp : LinearIndependent k fun i => p ↑i -ᵥ p j
w : ι → kˣ
⊢ LinearIndependent k fun i => ↑(w ↑i) • (p ↑i -ᵥ p j)

tactic: exact hp.units_smul fun i => w i
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
j : ι
hp : LinearIndependent k fun i => p ↑i -ᵥ p j
w : ι → kˣ
⊢ LinearIndependent k fun i => ↑(w ↑i) • (p ↑i -ᵥ p j)
state_after: no goals
Theorem: LSeries.abscissaOfAbsConv_le_of_le_const
File: Mathlib/NumberTheory/LSeries/Convergence.lean

tactic: convert abscissaOfAbsConv_le_of_le_const_mul_rpow (x := 0) ?_
state_before: f : ℕ → ℂ
h : ∃ C, ∀ (n : ℕ), n ≠ 0 → ‖f n‖ ≤ C
⊢ abscissaOfAbsConv f ≤ 1
state_after: case h.e'_4
f : ℕ → ℂ
h : ∃ C, ∀ (n : ℕ), n ≠ 0 → ‖f n‖ ≤ C
⊢ 1 = ↑0 + 1

case convert_2
f : ℕ → ℂ
h : ∃ C, ∀ (n : ℕ), n ≠ 0 → ‖f n‖ ≤ C
⊢ ∃ C, ∀ (n : ℕ), n ≠ 0 → ‖f n‖ ≤ C * ↑n ^ 0

tactic: simp only [EReal.coe_zero, zero_add]
state_before: case h.e'_4
f : ℕ → ℂ
h : ∃ C, ∀ (n : ℕ), n ≠ 0 → ‖f n‖ ≤ C
⊢ 1 = ↑0 + 1
state_after: no goals

tactic: simpa only [norm_eq_abs, Real.rpow_zero, mul_one] using h
state_before: case convert_2
f : ℕ → ℂ
h : ∃ C, ∀ (n : ℕ), n ≠ 0 → ‖f n‖ ≤ C
⊢ ∃ C, ∀ (n : ℕ), n ≠ 0 → ‖f n‖ ≤ C * ↑n ^ 0
state_after: no goals
Theorem: List.product_nil
File: Mathlib/Data/List/ProdSigma.lean

tactic: simp [product_cons, product_nil l]
state_before: α : Type u_1
β : Type u_2
head✝ : α
l : List α
⊢ (head✝ :: l) ×ˢ [] = []
state_after: no goals
Theorem: Nat.perm_factors_mul
File: Mathlib/Data/Nat/Factors.lean

tactic: refine (factors_unique ?_ ?_).symm
state_before: a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ (a * b).factors ~ a.factors ++ b.factors
state_after: case refine_1
a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ (a.factors ++ b.factors).prod = a * b

case refine_2
a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ ∀ p ∈ a.factors ++ b.factors, Prime p

tactic: rw [List.prod_append, prod_factors ha, prod_factors hb]
state_before: case refine_1
a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ (a.factors ++ b.factors).prod = a * b
state_after: no goals

tactic: intro p hp
state_before: case refine_2
a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ ∀ p ∈ a.factors ++ b.factors, Prime p
state_after: case refine_2
a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
p : ℕ
hp : p ∈ a.factors ++ b.factors
⊢ Prime p

tactic: rw [List.mem_append] at hp
state_before: case refine_2
a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
p : ℕ
hp : p ∈ a.factors ++ b.factors
⊢ Prime p
state_after: case refine_2
a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
p : ℕ
hp : p ∈ a.factors ∨ p ∈ b.factors
⊢ Prime p

tactic: cases' hp with hp' hp' <;> exact prime_of_mem_factors hp'
state_before: case refine_2
a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
p : ℕ
hp : p ∈ a.factors ∨ p ∈ b.factors
⊢ Prime p
state_after: no goals
Theorem: IntermediateField.exists_finset_of_mem_supr'
File: Mathlib/FieldTheory/Adjoin.lean

tactic: refine exists_finset_of_mem_iSup (SetLike.le_def.mp (iSup_le fun i ↦ ?_) hx)
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
x : E
hx : x ∈ ⨆ i, f i
⊢ ∃ s, x ∈ ⨆ i ∈ s, F⟮↑i.snd⟯
state_after: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
x : E
hx : x ∈ ⨆ i, f i
i : ι
⊢ f i ≤ ⨆ i, F⟮↑i.snd⟯

tactic: exact fun x h ↦ SetLike.le_def.mp (le_iSup_of_le ⟨i, x, h⟩ (by simp)) (mem_adjoin_simple_self F x)
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
x : E
hx : x ∈ ⨆ i, f i
i : ι
⊢ f i ≤ ⨆ i, F⟮↑i.snd⟯
state_after: no goals

tactic: simp
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
x✝ : E
hx : x✝ ∈ ⨆ i, f i
i : ι
x : E
h : x ∈ f i
⊢ F⟮x⟯ ≤ F⟮↑⟨i, ⟨x, h⟩⟩.snd⟯
state_after: no goals
Theorem: ZMod.val_mul
File: Mathlib/Data/ZMod/Basic.lean

tactic: cases n
state_before: n : ℕ
a b : ZMod n
⊢ (a * b).val = a.val * b.val % n
state_after: case zero
a b : ZMod 0
⊢ (a * b).val = a.val * b.val % 0

case succ
n✝ : ℕ
a b : ZMod (n✝ + 1)
⊢ (a * b).val = a.val * b.val % (n✝ + 1)

tactic: rw [Nat.mod_zero]
state_before: case zero
a b : ZMod 0
⊢ (a * b).val = a.val * b.val % 0
state_after: case zero
a b : ZMod 0
⊢ (a * b).val = a.val * b.val

tactic: apply Int.natAbs_mul
state_before: case zero
a b : ZMod 0
⊢ (a * b).val = a.val * b.val
state_after: no goals

tactic: apply Fin.val_mul
state_before: case succ
n✝ : ℕ
a b : ZMod (n✝ + 1)
⊢ (a * b).val = a.val * b.val % (n✝ + 1)
state_after: no goals
Theorem: List.orderedInsert_count
File: Mathlib/Data/List/Sort.lean

tactic: rw [(L.perm_orderedInsert r b).count_eq, count_cons]
state_before: α : Type u
r : α → α → Prop
inst✝¹ : DecidableRel r
inst✝ : DecidableEq α
L : List α
a b : α
⊢ count a (orderedInsert r b L) = count a L + if a = b then 1 else 0
state_after: no goals
Theorem: FractionalIdeal.coe_dual
File: Mathlib/RingTheory/DedekindDomain/Different.lean

tactic: rw [dual, dif_neg hI, coe_mk]
state_before: A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁹ : CommRing A
inst✝¹⁸ : Field K
inst✝¹⁷ : CommRing B
inst✝¹⁶ : Field L
inst✝¹⁵ : Algebra A K
inst✝¹⁴ : Algebra B L
inst✝¹³ : Algebra A B
inst✝¹² : Algebra K L
inst✝¹¹ : Algebra A L
inst✝¹⁰ : IsScalarTower A K L
inst✝⁹ : IsScalarTower A B L
inst✝⁸ : IsDomain A
inst✝⁷ : IsDomain B
inst✝⁶ : IsFractionRing A K
inst✝⁵ : IsIntegralClosure B A L
inst✝⁴ : IsFractionRing B L
inst✝³ : FiniteDimensional K L
inst✝² : IsSeparable K L
inst✝¹ : IsIntegrallyClosed A
inst✝ : IsDedekindDomain B
I J : FractionalIdeal B⁰ L
hI : I ≠ 0
hJ : J ≠ 0
⊢ ↑(dual A K I) = (↑I)ᵛ
state_after: no goals
Theorem: SimpleGraph.left_nonuniformWitnesses_subset
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean

tactic: rw [nonuniformWitnesses, dif_pos h]
state_before: α : Type u_1
𝕜 : Type u_2
inst✝¹ : LinearOrderedField 𝕜
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : 𝕜
s t : Finset α
a b : α
h : ¬G.IsUniform ε s t
⊢ (G.nonuniformWitnesses ε s t).1 ⊆ s
state_after: α : Type u_1
𝕜 : Type u_2
inst✝¹ : LinearOrderedField 𝕜
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : 𝕜
s t : Finset α
a b : α
h : ¬G.IsUniform ε s t
⊢ (⋯.choose, ⋯.choose).1 ⊆ s

tactic: exact (not_isUniform_iff.1 h).choose_spec.1
state_before: α : Type u_1
𝕜 : Type u_2
inst✝¹ : LinearOrderedField 𝕜
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : 𝕜
s t : Finset α
a b : α
h : ¬G.IsUniform ε s t
⊢ (⋯.choose, ⋯.choose).1 ⊆ s
state_after: no goals
Theorem: Cardinal.le_mul_left
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: convert mul_le_mul_right' (one_le_iff_ne_zero.mpr h) a
state_before: a b : Cardinal.{u_1}
h : b ≠ 0
⊢ a ≤ b * a
state_after: case h.e'_3
a b : Cardinal.{u_1}
h : b ≠ 0
⊢ a = 1 * a

tactic: rw [one_mul]
state_before: case h.e'_3
a b : Cardinal.{u_1}
h : b ≠ 0
⊢ a = 1 * a
state_after: no goals
Theorem: PMF.bindOnSupport_pure
File: Mathlib/Probability/ProbabilityMassFunction/Monad.lean

tactic: simp only [PMF.bind_pure, PMF.bindOnSupport_eq_bind]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
p✝ : PMF α
f : (a : α) → a ∈ p✝.support → PMF β
p : PMF α
⊢ (p.bindOnSupport fun a x => pure a) = p
state_after: no goals
Theorem: PrimeMultiset.prod_ofPNatList
File: Mathlib/Data/PNat/Factors.lean

tactic: have := prod_ofPNatMultiset (l : Multiset ℕ+) h
state_before: l : List ℕ+
h : ∀ p ∈ l, p.Prime
⊢ (ofPNatList l h).prod = l.prod
state_after: l : List ℕ+
h : ∀ p ∈ l, p.Prime
this : (ofPNatMultiset (↑l) h).prod = (↑l).prod
⊢ (ofPNatList l h).prod = l.prod

tactic: rw [Multiset.prod_coe] at this
state_before: l : List ℕ+
h : ∀ p ∈ l, p.Prime
this : (ofPNatMultiset (↑l) h).prod = (↑l).prod
⊢ (ofPNatList l h).prod = l.prod
state_after: l : List ℕ+
h : ∀ p ∈ l, p.Prime
this : (ofPNatMultiset (↑l) h).prod = l.prod
⊢ (ofPNatList l h).prod = l.prod

tactic: exact this
state_before: l : List ℕ+
h : ∀ p ∈ l, p.Prime
this : (ofPNatMultiset (↑l) h).prod = l.prod
⊢ (ofPNatList l h).prod = l.prod
state_after: no goals
Theorem: HasStrictDerivAt.clm_apply
File: Mathlib/Analysis/Calculus/Deriv/Mul.lean

tactic: have := (hc.hasStrictFDerivAt.clm_apply hu.hasStrictFDerivAt).hasStrictDerivAt
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
E : Type w
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
G✝ : Type u_1
inst✝³ : NormedAddCommGroup G✝
inst✝² : NormedSpace 𝕜 G✝
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
G : Type u_2
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
c : 𝕜 → F →L[𝕜] G
c' : F →L[𝕜] G
d : 𝕜 → E →L[𝕜] F
d' : E →L[𝕜] F
u : 𝕜 → F
u' : F
hc : HasStrictDerivAt c c' x
hu : HasStrictDerivAt u u' x
⊢ HasStrictDerivAt (fun y => (c y) (u y)) (c' (u x) + (c x) u') x
state_after: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
E : Type w
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
G✝ : Type u_1
inst✝³ : NormedAddCommGroup G✝
inst✝² : NormedSpace 𝕜 G✝
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
G : Type u_2
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
c : 𝕜 → F →L[𝕜] G
c' : F →L[𝕜] G
d : 𝕜 → E →L[𝕜] F
d' : E →L[𝕜] F
u : 𝕜 → F
u' : F
hc : HasStrictDerivAt c c' x
hu : HasStrictDerivAt u u' x
this : HasStrictDerivAt (fun y => (c y) (u y)) (((c x).comp (smulRight 1 u') + (smulRight 1 c').flip (u x)) 1) x
⊢ HasStrictDerivAt (fun y => (c y) (u y)) (c' (u x) + (c x) u') x

tactic: rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul,
  one_smul, add_comm] at this
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
E : Type w
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
G✝ : Type u_1
inst✝³ : NormedAddCommGroup G✝
inst✝² : NormedSpace 𝕜 G✝
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
G : Type u_2
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
c : 𝕜 → F →L[𝕜] G
c' : F →L[𝕜] G
d : 𝕜 → E →L[𝕜] F
d' : E →L[𝕜] F
u : 𝕜 → F
u' : F
hc : HasStrictDerivAt c c' x
hu : HasStrictDerivAt u u' x
this : HasStrictDerivAt (fun y => (c y) (u y)) (((c x).comp (smulRight 1 u') + (smulRight 1 c').flip (u x)) 1) x
⊢ HasStrictDerivAt (fun y => (c y) (u y)) (c' (u x) + (c x) u') x
state_after: no goals