1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Nat.dvd_iff_prime_pow_dvd_dvd
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: rcases eq_or_ne n 0 with (rfl | hn)
state_before: a b m n✝ p n d : ℕ
⊢ d ∣ n ↔ ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n
state_after: case inl
a b m n p d : ℕ
⊢ d ∣ 0 ↔ ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ 0

case inr
a b m n✝ p n d : ℕ
hn : n ≠ 0
⊢ d ∣ n ↔ ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n

tactic: rcases eq_or_ne d 0 with (rfl | hd)
state_before: case inr
a b m n✝ p n d : ℕ
hn : n ≠ 0
⊢ d ∣ n ↔ ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n
state_after: case inr.inl
a b m n✝ p n : ℕ
hn : n ≠ 0
⊢ 0 ∣ n ↔ ∀ (p k : ℕ), Prime p → p ^ k ∣ 0 → p ^ k ∣ n

case inr.inr
a b m n✝ p n d : ℕ
hn : n ≠ 0
hd : d ≠ 0
⊢ d ∣ n ↔ ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n

tactic: refine ⟨fun h p k _ hpkd => dvd_trans hpkd h, ?_⟩
state_before: case inr.inr
a b m n✝ p n d : ℕ
hn : n ≠ 0
hd : d ≠ 0
⊢ d ∣ n ↔ ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n
state_after: case inr.inr
a b m n✝ p n d : ℕ
hn : n ≠ 0
hd : d ≠ 0
⊢ (∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n) → d ∣ n

tactic: rw [← factorization_prime_le_iff_dvd hd hn]
state_before: case inr.inr
a b m n✝ p n d : ℕ
hn : n ≠ 0
hd : d ≠ 0
⊢ (∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n) → d ∣ n
state_after: case inr.inr
a b m n✝ p n d : ℕ
hn : n ≠ 0
hd : d ≠ 0
⊢ (∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n) → ∀ (p : ℕ), Prime p → d.factorization p ≤ n.factorization p

tactic: intro h p pp
state_before: case inr.inr
a b m n✝ p n d : ℕ
hn : n ≠ 0
hd : d ≠ 0
⊢ (∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n) → ∀ (p : ℕ), Prime p → d.factorization p ≤ n.factorization p
state_after: case inr.inr
a b m n✝ p✝ n d : ℕ
hn : n ≠ 0
hd : d ≠ 0
h : ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n
p : ℕ
pp : Prime p
⊢ d.factorization p ≤ n.factorization p

tactic: simp_rw [← pp.pow_dvd_iff_le_factorization hn]
state_before: case inr.inr
a b m n✝ p✝ n d : ℕ
hn : n ≠ 0
hd : d ≠ 0
h : ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n
p : ℕ
pp : Prime p
⊢ d.factorization p ≤ n.factorization p
state_after: case inr.inr
a b m n✝ p✝ n d : ℕ
hn : n ≠ 0
hd : d ≠ 0
h : ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n
p : ℕ
pp : Prime p
⊢ p ^ d.factorization p ∣ n

tactic: exact h p _ pp (ord_proj_dvd _ _)
state_before: case inr.inr
a b m n✝ p✝ n d : ℕ
hn : n ≠ 0
hd : d ≠ 0
h : ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n
p : ℕ
pp : Prime p
⊢ p ^ d.factorization p ∣ n
state_after: no goals

tactic: simp
state_before: case inl
a b m n p d : ℕ
⊢ d ∣ 0 ↔ ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ 0
state_after: no goals

tactic: simp only [zero_dvd_iff, hn, false_iff_iff, not_forall]
state_before: case inr.inl
a b m n✝ p n : ℕ
hn : n ≠ 0
⊢ 0 ∣ n ↔ ∀ (p k : ℕ), Prime p → p ^ k ∣ 0 → p ^ k ∣ n
state_after: case inr.inl
a b m n✝ p n : ℕ
hn : n ≠ 0
⊢ ∃ x x_1, ∃ (_ : Prime x) (_ : x ^ x_1 ∣ 0), ¬x ^ x_1 ∣ n

tactic: exact ⟨2, n, prime_two, dvd_zero _, mt (le_of_dvd hn.bot_lt) (lt_two_pow n).not_le⟩
state_before: case inr.inl
a b m n✝ p n : ℕ
hn : n ≠ 0
⊢ ∃ x x_1, ∃ (_ : Prime x) (_ : x ^ x_1 ∣ 0), ¬x ^ x_1 ∣ n
state_after: no goals
Theorem: MeasureTheory.SimpleFunc.piecewise_compl
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

tactic: set_option tactic.skipAssignedInstances false in
simp [hs]; convert Set.piecewise_compl s f g
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
s : Set α
hs : MeasurableSet sᶜ
f g : α →ₛ β
⊢ ↑(piecewise sᶜ hs f g) = ↑(piecewise s ⋯ g f)
state_after: no goals

tactic: simp [hs]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
s : Set α
hs : MeasurableSet sᶜ
f g : α →ₛ β
⊢ ↑(piecewise sᶜ hs f g) = ↑(piecewise s ⋯ g f)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
s : Set α
hs : MeasurableSet sᶜ
f g : α →ₛ β
⊢ sᶜ.piecewise ↑f ↑g = s.piecewise ↑g ↑f

tactic: convert Set.piecewise_compl s f g
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
s : Set α
hs : MeasurableSet sᶜ
f g : α →ₛ β
⊢ sᶜ.piecewise ↑f ↑g = s.piecewise ↑g ↑f
state_after: no goals
Theorem: SimpleGraph.edgeSet_inf
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

tactic: ext ⟨x, y⟩
state_before: ι : Sort u_1
V : Type u
G : SimpleGraph V
a b c u v w : V
e : Sym2 V
G₁ G₂ : SimpleGraph V
⊢ (G₁ ⊓ G₂).edgeSet = G₁.edgeSet ∩ G₂.edgeSet
state_after: case h.mk.mk
ι : Sort u_1
V : Type u
G : SimpleGraph V
a b c u v w : V
e : Sym2 V
G₁ G₂ : SimpleGraph V
x✝ : Sym2 V
x y : V
⊢ Quot.mk (Sym2.Rel V) (x, y) ∈ (G₁ ⊓ G₂).edgeSet ↔ Quot.mk (Sym2.Rel V) (x, y) ∈ G₁.edgeSet ∩ G₂.edgeSet

tactic: rfl
state_before: case h.mk.mk
ι : Sort u_1
V : Type u
G : SimpleGraph V
a b c u v w : V
e : Sym2 V
G₁ G₂ : SimpleGraph V
x✝ : Sym2 V
x y : V
⊢ Quot.mk (Sym2.Rel V) (x, y) ∈ (G₁ ⊓ G₂).edgeSet ↔ Quot.mk (Sym2.Rel V) (x, y) ∈ G₁.edgeSet ∩ G₂.edgeSet
state_after: no goals
Theorem: Submonoid.closure_inv
File: Mathlib/Algebra/Group/Submonoid/Pointwise.lean

tactic: apply le_antisymm
state_before: α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝² : Monoid M
inst✝¹ : AddMonoid A
s✝ t u : Set M
inst✝ : Group G
s : Set G
⊢ closure s⁻¹ = (closure s)⁻¹
state_after: case a
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝² : Monoid M
inst✝¹ : AddMonoid A
s✝ t u : Set M
inst✝ : Group G
s : Set G
⊢ closure s⁻¹ ≤ (closure s)⁻¹

case a
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝² : Monoid M
inst✝¹ : AddMonoid A
s✝ t u : Set M
inst✝ : Group G
s : Set G
⊢ (closure s)⁻¹ ≤ closure s⁻¹

tactic: rw [closure_le, coe_inv, ← Set.inv_subset, inv_inv]
state_before: case a
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝² : Monoid M
inst✝¹ : AddMonoid A
s✝ t u : Set M
inst✝ : Group G
s : Set G
⊢ closure s⁻¹ ≤ (closure s)⁻¹
state_after: case a
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝² : Monoid M
inst✝¹ : AddMonoid A
s✝ t u : Set M
inst✝ : Group G
s : Set G
⊢ s ⊆ ↑(closure s)

tactic: exact subset_closure
state_before: case a
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝² : Monoid M
inst✝¹ : AddMonoid A
s✝ t u : Set M
inst✝ : Group G
s : Set G
⊢ s ⊆ ↑(closure s)
state_after: no goals

tactic: rw [inv_le, closure_le, coe_inv, ← Set.inv_subset]
state_before: case a
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝² : Monoid M
inst✝¹ : AddMonoid A
s✝ t u : Set M
inst✝ : Group G
s : Set G
⊢ (closure s)⁻¹ ≤ closure s⁻¹
state_after: case a
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝² : Monoid M
inst✝¹ : AddMonoid A
s✝ t u : Set M
inst✝ : Group G
s : Set G
⊢ s⁻¹ ⊆ ↑(closure s⁻¹)

tactic: exact subset_closure
state_before: case a
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝² : Monoid M
inst✝¹ : AddMonoid A
s✝ t u : Set M
inst✝ : Group G
s : Set G
⊢ s⁻¹ ⊆ ↑(closure s⁻¹)
state_after: no goals
Theorem: Batteries.RBNode.reverse_balRight
File: .lake/packages/batteries/Batteries/Data/RBMap/WF.lean

tactic: rw [← reverse_reverse (balLeft ..)]
state_before: α : Type u_1
l : RBNode α
v : α
r : RBNode α
⊢ (l.balRight v r).reverse = r.reverse.balLeft v l.reverse
state_after: α : Type u_1
l : RBNode α
v : α
r : RBNode α
⊢ (l.balRight v r).reverse = (r.reverse.balLeft v l.reverse).reverse.reverse

tactic: simp
state_before: α : Type u_1
l : RBNode α
v : α
r : RBNode α
⊢ (l.balRight v r).reverse = (r.reverse.balLeft v l.reverse).reverse.reverse
state_after: no goals
Theorem: Function.Periodic.map_vadd_multiples
File: Mathlib/Algebra/Periodic.lean

tactic: rcases a with ⟨_, m, rfl⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → β
c c₁ c₂ x✝ : α
inst✝ : AddCommMonoid α
hf : Periodic f c
a : ↥(AddSubmonoid.multiples c)
x : α
⊢ f (a +ᵥ x) = f x
state_after: case mk.intro
α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → β
c c₁ c₂ x✝ : α
inst✝ : AddCommMonoid α
hf : Periodic f c
x : α
m : ℕ
⊢ f (⟨(fun i => i • c) m, ⋯⟩ +ᵥ x) = f x

tactic: simp [AddSubmonoid.vadd_def, add_comm _ x, hf.nsmul m x]
state_before: case mk.intro
α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → β
c c₁ c₂ x✝ : α
inst✝ : AddCommMonoid α
hf : Periodic f c
x : α
m : ℕ
⊢ f (⟨(fun i => i • c) m, ⋯⟩ +ᵥ x) = f x
state_after: no goals
Theorem: subset_sInf_emptyset
File: Mathlib/Order/CompleteLatticeIntervals.lean

tactic: simp [sInf]
state_before: ι : Sort u_1
α : Type u_2
s : Set α
inst✝² : Preorder α
inst✝¹ : InfSet α
inst✝ : Inhabited ↑s
⊢ sInf ∅ = default
state_after: no goals
Theorem: interval_average_eq
File: Mathlib/MeasureTheory/Integral/IntervalAverage.lean

tactic: rcases le_or_lt a b with h | h
state_before: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f : ℝ → E
a b : ℝ
⊢ ⨍ (x : ℝ) in a..b, f x = (b - a)⁻¹ • ∫ (x : ℝ) in a..b, f x
state_after: case inl
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f : ℝ → E
a b : ℝ
h : a ≤ b
⊢ ⨍ (x : ℝ) in a..b, f x = (b - a)⁻¹ • ∫ (x : ℝ) in a..b, f x

case inr
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f : ℝ → E
a b : ℝ
h : b < a
⊢ ⨍ (x : ℝ) in a..b, f x = (b - a)⁻¹ • ∫ (x : ℝ) in a..b, f x

tactic: rw [setAverage_eq, uIoc_of_le h, Real.volume_Ioc, intervalIntegral.integral_of_le h,
  ENNReal.toReal_ofReal (sub_nonneg.2 h)]
state_before: case inl
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f : ℝ → E
a b : ℝ
h : a ≤ b
⊢ ⨍ (x : ℝ) in a..b, f x = (b - a)⁻¹ • ∫ (x : ℝ) in a..b, f x
state_after: no goals

tactic: rw [setAverage_eq, uIoc_of_ge h.le, Real.volume_Ioc, intervalIntegral.integral_of_ge h.le,
  ENNReal.toReal_ofReal (sub_nonneg.2 h.le), smul_neg, ← neg_smul, ← inv_neg, neg_sub]
state_before: case inr
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f : ℝ → E
a b : ℝ
h : b < a
⊢ ⨍ (x : ℝ) in a..b, f x = (b - a)⁻¹ • ∫ (x : ℝ) in a..b, f x
state_after: no goals
Theorem: Hyperreal.IsSt.map
File: Mathlib/Data/Real/Hyperreal.lean

tactic: rcases ofSeq_surjective x with ⟨g, rfl⟩
state_before: x : ℝ*
r : ℝ
hxr : x.IsSt r
f : ℝ → ℝ
hf : ContinuousAt f r
⊢ IsSt (Germ.map f x) (f r)
state_after: case intro
r : ℝ
f : ℝ → ℝ
hf : ContinuousAt f r
g : ℕ → ℝ
hxr : (ofSeq g).IsSt r
⊢ IsSt (Germ.map f (ofSeq g)) (f r)

tactic: exact isSt_ofSeq_iff_tendsto.2 <| hf.tendsto.comp (isSt_ofSeq_iff_tendsto.1 hxr)
state_before: case intro
r : ℝ
f : ℝ → ℝ
hf : ContinuousAt f r
g : ℕ → ℝ
hxr : (ofSeq g).IsSt r
⊢ IsSt (Germ.map f (ofSeq g)) (f r)
state_after: no goals
Theorem: AlgebraicGeometry.Scheme.restrictFunctor_map_left
File: Mathlib/AlgebraicGeometry/Restrict.lean

tactic: dsimp [ofRestrict, LocallyRingedSpace.ofRestrict, Opens.inclusion]
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X : Scheme
U V : Opens ↑↑X.toPresheafedSpace
i : U ⟶ V
⊢ Set.range ⇑(ιOpens U).val.base ⊆ Set.range ⇑(ιOpens V).val.base
state_after: C : Type u₁
inst✝ : Category.{v, u₁} C
X : Scheme
U V : Opens ↑↑X.toPresheafedSpace
i : U ⟶ V
⊢ Set.range ⇑{ toFun := Subtype.val, continuous_toFun := ⋯ } ⊆
    Set.range ⇑{ toFun := Subtype.val, continuous_toFun := ⋯ }

tactic: erw [ContinuousMap.coe_mk, ContinuousMap.coe_mk]
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X : Scheme
U V : Opens ↑↑X.toPresheafedSpace
i : U ⟶ V
⊢ Set.range ⇑{ toFun := Subtype.val, continuous_toFun := ⋯ } ⊆
    Set.range ⇑{ toFun := Subtype.val, continuous_toFun := ⋯ }
state_after: C : Type u₁
inst✝ : Category.{v, u₁} C
X : Scheme
U V : Opens ↑↑X.toPresheafedSpace
i : U ⟶ V
⊢ Set.range Subtype.val ⊆ Set.range Subtype.val

tactic: rw [Subtype.range_val, Subtype.range_val]
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X : Scheme
U V : Opens ↑↑X.toPresheafedSpace
i : U ⟶ V
⊢ Set.range Subtype.val ⊆ Set.range Subtype.val
state_after: C : Type u₁
inst✝ : Category.{v, u₁} C
X : Scheme
U V : Opens ↑↑X.toPresheafedSpace
i : U ⟶ V
⊢ ↑U ⊆ ↑V

tactic: exact i.le
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X : Scheme
U V : Opens ↑↑X.toPresheafedSpace
i : U ⟶ V
⊢ ↑U ⊆ ↑V
state_after: no goals
Theorem: Set.einfsep_iUnion_mem_option
File: Mathlib/Topology/MetricSpace/Infsep.lean

tactic: cases o <;> simp
state_before: α : Type u_1
β : Type u_2
inst✝ : EDist α
x y : α
s✝ t : Set α
ι : Type u_3
o : Option ι
s : ι → Set α
⊢ (⋃ i ∈ o, s i).einfsep = ⨅ i ∈ o, (s i).einfsep
state_after: no goals
Theorem: Matroid.Indep.subset_ground
File: Mathlib/Data/Matroid/Basic.lean

tactic: obtain ⟨B, hB, hIB⟩ := hI.exists_base_superset
state_before: α : Type u_1
M : Matroid α
I : Set α
hI : M.Indep I
⊢ I ⊆ M.E
state_after: case intro.intro
α : Type u_1
M : Matroid α
I : Set α
hI : M.Indep I
B : Set α
hB : M.Base B
hIB : I ⊆ B
⊢ I ⊆ M.E

tactic: exact hIB.trans hB.subset_ground
state_before: case intro.intro
α : Type u_1
M : Matroid α
I : Set α
hI : M.Indep I
B : Set α
hB : M.Base B
hIB : I ⊆ B
⊢ I ⊆ M.E
state_after: no goals
Theorem: Convex.add_smul_sub_mem_interior'
File: Mathlib/Analysis/Convex/Topology.lean

tactic: simpa only [sub_smul, smul_sub, one_smul, add_sub, add_comm] using
  hs.combo_interior_closure_mem_interior hy hx ht.1 (sub_nonneg.mpr ht.2)
    (add_sub_cancel _ _)
state_before: ι : Type u_1
𝕜 : Type u_2
E : Type u_3
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : Convex 𝕜 s
x y : E
hx : x ∈ closure s
hy : y ∈ interior s
t : 𝕜
ht : t ∈ Ioc 0 1
⊢ x + t • (y - x) ∈ interior s
state_after: no goals
Theorem: mul_lt_mul_of_neg_right
File: Mathlib/Algebra/Order/Ring/Defs.lean

tactic: obtain ⟨d, hcd⟩ := exists_add_of_le hc.le
state_before: α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d : α
inst✝ : ExistsAddOfLE α
h : b < a
hc : c < 0
⊢ a * c < b * c
state_after: case intro
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d✝ : α
inst✝ : ExistsAddOfLE α
h : b < a
hc : c < 0
d : α
hcd : 0 = c + d
⊢ a * c < b * c

tactic: refine (add_lt_add_iff_right (b * d + a * d)).1 ?_
state_before: case intro
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d✝ : α
inst✝ : ExistsAddOfLE α
h : b < a
hc : c < 0
d : α
hcd : 0 = c + d
⊢ a * c < b * c
state_after: case intro
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d✝ : α
inst✝ : ExistsAddOfLE α
h : b < a
hc : c < 0
d : α
hcd : 0 = c + d
⊢ a * c + (b * d + a * d) < b * c + (b * d + a * d)

tactic: calc
  _ = b * d := by rw [add_left_comm, ← mul_add, ← hcd, mul_zero, add_zero]
  _ < a * d := mul_lt_mul_of_pos_right h <| hcd.trans_lt <| add_lt_of_neg_left _ hc
  _ = _ := by rw [← add_assoc, ← mul_add, ← hcd, mul_zero, zero_add]
state_before: case intro
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d✝ : α
inst✝ : ExistsAddOfLE α
h : b < a
hc : c < 0
d : α
hcd : 0 = c + d
⊢ a * c + (b * d + a * d) < b * c + (b * d + a * d)
state_after: no goals

tactic: rw [add_left_comm, ← mul_add, ← hcd, mul_zero, add_zero]
state_before: α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d✝ : α
inst✝ : ExistsAddOfLE α
h : b < a
hc : c < 0
d : α
hcd : 0 = c + d
⊢ a * c + (b * d + a * d) = b * d
state_after: no goals

tactic: rw [← add_assoc, ← mul_add, ← hcd, mul_zero, zero_add]
state_before: α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d✝ : α
inst✝ : ExistsAddOfLE α
h : b < a
hc : c < 0
d : α
hcd : 0 = c + d
⊢ a * d = b * c + (b * d + a * d)
state_after: no goals
Theorem: Matrix.dotProduct_self_eq_zero
File: Mathlib/LinearAlgebra/Matrix/DotProduct.lean

tactic: simp [Function.funext_iff]
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✝ : LinearOrderedRing R
v : n → R
⊢ (∀ i ∈ Finset.univ, v i * v i = 0) ↔ v = 0
state_after: no goals
Theorem: Algebra.FormallySmooth.of_equiv
File: Mathlib/RingTheory/Smooth/Basic.lean

tactic: constructor
state_before: R : Type u
inst✝⁵ : CommSemiring R
A B : Type u
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
inst✝ : FormallySmooth R A
e : A ≃ₐ[R] B
⊢ FormallySmooth R B
state_after: case comp_surjective
R : Type u
inst✝⁵ : CommSemiring R
A B : Type u
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
inst✝ : FormallySmooth R A
e : A ≃ₐ[R] B
⊢ ∀ ⦃B_1 : Type u⦄ [inst : CommRing B_1] [inst_1 : Algebra R B_1] (I : Ideal B_1),
    I ^ 2 = ⊥ → Function.Surjective (Ideal.Quotient.mkₐ R I).comp

tactic: intro C _ _ I hI f
state_before: case comp_surjective
R : Type u
inst✝⁵ : CommSemiring R
A B : Type u
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
inst✝ : FormallySmooth R A
e : A ≃ₐ[R] B
⊢ ∀ ⦃B_1 : Type u⦄ [inst : CommRing B_1] [inst_1 : Algebra R B_1] (I : Ideal B_1),
    I ^ 2 = ⊥ → Function.Surjective (Ideal.Quotient.mkₐ R I).comp
state_after: case comp_surjective
R : Type u
inst✝⁷ : CommSemiring R
A B : Type u
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : Semiring B
inst✝³ : Algebra R B
inst✝² : FormallySmooth R A
e : A ≃ₐ[R] B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f : B →ₐ[R] C ⧸ I
⊢ ∃ a, (Ideal.Quotient.mkₐ R I).comp a = f

tactic: use (FormallySmooth.lift I ⟨2, hI⟩ (f.comp e : A →ₐ[R] C ⧸ I)).comp e.symm
state_before: case comp_surjective
R : Type u
inst✝⁷ : CommSemiring R
A B : Type u
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : Semiring B
inst✝³ : Algebra R B
inst✝² : FormallySmooth R A
e : A ≃ₐ[R] B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f : B →ₐ[R] C ⧸ I
⊢ ∃ a, (Ideal.Quotient.mkₐ R I).comp a = f
state_after: case h
R : Type u
inst✝⁷ : CommSemiring R
A B : Type u
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : Semiring B
inst✝³ : Algebra R B
inst✝² : FormallySmooth R A
e : A ≃ₐ[R] B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f : B →ₐ[R] C ⧸ I
⊢ (Ideal.Quotient.mkₐ R I).comp ((lift I ⋯ (f.comp ↑e)).comp ↑e.symm) = f

tactic: rw [← AlgHom.comp_assoc, FormallySmooth.comp_lift, AlgHom.comp_assoc, AlgEquiv.comp_symm,
  AlgHom.comp_id]
state_before: case h
R : Type u
inst✝⁷ : CommSemiring R
A B : Type u
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : Semiring B
inst✝³ : Algebra R B
inst✝² : FormallySmooth R A
e : A ≃ₐ[R] B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f : B →ₐ[R] C ⧸ I
⊢ (Ideal.Quotient.mkₐ R I).comp ((lift I ⋯ (f.comp ↑e)).comp ↑e.symm) = f
state_after: no goals
Theorem: isMulFreimanHom_const
File: Mathlib/Combinatorics/Additive/FreimanHom.lean

tactic: simp only [map_const', hs, prod_replicate, ht]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : CommMonoid α
inst✝¹ : CommMonoid β
inst✝ : CommMonoid γ
A A₁ A₂ : Set α
B B₁ B₂ : Set β
C : Set γ
f f₁ f₂ : α → β
g : β → γ
m n : ℕ
b : β
hb : b ∈ B
s t : Multiset α
x✝² : ∀ ⦃x : α⦄, x ∈ s → x ∈ A
x✝¹ : ∀ ⦃x : α⦄, x ∈ t → x ∈ A
hs : card s = n
ht : card t = n
x✝ : s.prod = t.prod
⊢ (map (fun x => b) s).prod = (map (fun x => b) t).prod
state_after: no goals
Theorem: NNReal.IsConjExponent.div_conj_eq_sub_one
File: Mathlib/Data/Real/ConjExponents.lean

tactic: field_simp [h.symm.ne_zero]
state_before: a b p q : ℝ≥0
h : p.IsConjExponent q
⊢ p / q = p - 1
state_after: a b p q : ℝ≥0
h : p.IsConjExponent q
⊢ p = (p - 1) * q

tactic: rw [h.sub_one_mul_conj]
state_before: a b p q : ℝ≥0
h : p.IsConjExponent q
⊢ p = (p - 1) * q
state_after: no goals
Theorem: CategoryTheory.coyonedaEquiv_coyoneda_map
File: Mathlib/CategoryTheory/Yoneda.lean

tactic: rw [coyonedaEquiv_apply]
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
X Y : C
f : X ⟶ Y
⊢ coyonedaEquiv (coyoneda.map f.op) = f
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
X Y : C
f : X ⟶ Y
⊢ (coyoneda.map f.op).app Y (𝟙 Y) = f

tactic: simp
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
X Y : C
f : X ⟶ Y
⊢ (coyoneda.map f.op).app Y (𝟙 Y) = f
state_after: no goals
Theorem: Rat.round_cast
File: Mathlib/Data/Rat/Floor.lean

tactic: have : ((x + 1 / 2 : ℚ) : α) = x + 1 / 2 := by simp
state_before: α : Type u_1
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
x : ℚ
⊢ round ↑x = round x
state_after: α : Type u_1
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
x : ℚ
this : ↑(x + 1 / 2) = ↑x + 1 / 2
⊢ round ↑x = round x

tactic: rw [round_eq, round_eq, ← this, floor_cast]
state_before: α : Type u_1
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
x : ℚ
this : ↑(x + 1 / 2) = ↑x + 1 / 2
⊢ round ↑x = round x
state_after: no goals

tactic: simp
state_before: α : Type u_1
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
x : ℚ
⊢ ↑(x + 1 / 2) = ↑x + 1 / 2
state_after: no goals
Theorem: Mathlib.Meta.NormNum.isRat_mkRat
File: Mathlib/Tactic/NormNum/Inv.lean

tactic: rw [Rat.mkRat_eq_div]
state_before: n✝¹ num✝ : ℤ
n✝ denom✝ : ℕ
inv✝ : Invertible ↑denom✝
h : ↑n✝¹ / ↑n✝ = ↑num✝ * ⅟↑denom✝
⊢ IsRat (mkRat ↑n✝¹ ↑n✝) num✝ denom✝
state_after: n✝¹ num✝ : ℤ
n✝ denom✝ : ℕ
inv✝ : Invertible ↑denom✝
h : ↑n✝¹ / ↑n✝ = ↑num✝ * ⅟↑denom✝
⊢ IsRat (↑↑n✝¹ / ↑↑n✝) num✝ denom✝

tactic: exact ⟨_, h⟩
state_before: n✝¹ num✝ : ℤ
n✝ denom✝ : ℕ
inv✝ : Invertible ↑denom✝
h : ↑n✝¹ / ↑n✝ = ↑num✝ * ⅟↑denom✝
⊢ IsRat (↑↑n✝¹ / ↑↑n✝) num✝ denom✝
state_after: no goals
Theorem: QuadraticForm.polar_zero_right
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

tactic: simp only [add_zero, polar, QuadraticForm.map_zero, sub_self]
state_before: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
y : M
⊢ polar (⇑Q) y 0 = 0
state_after: no goals