1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Set.Nonempty.div_zero
File: Mathlib/Data/Set/Pointwise/Basic.lean

tactic: simpa [mem_div] using hs
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : GroupWithZero α
s t : Set α
hs : s.Nonempty
⊢ 0 ⊆ s / 0
state_after: no goals
Theorem: Measurable.iff
File: Mathlib/MeasureTheory/MeasurableSpace/Basic.lean

tactic: simp_rw [iff_iff_implies_and_implies]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝ : MeasurableSpace α
p q : α → Prop
hp : Measurable p
hq : Measurable q
⊢ MeasurableSet {a | p a ↔ q a}
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝ : MeasurableSpace α
p q : α → Prop
hp : Measurable p
hq : Measurable q
⊢ MeasurableSet {a | (p a → q a) ∧ (q a → p a)}

tactic: exact hq.setOf.bihimp hp.setOf
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝ : MeasurableSpace α
p q : α → Prop
hp : Measurable p
hq : Measurable q
⊢ MeasurableSet {a | (p a → q a) ∧ (q a → p a)}
state_after: no goals
Theorem: Ideal.quotient_map_C_eq_zero
File: Mathlib/RingTheory/Polynomial/Quotient.lean

tactic: intro a ha
state_before: R : Type u_1
inst✝ : CommRing R
I : Ideal R
⊢ ∀ a ∈ I, ((Quotient.mk (map C I)).comp C) a = 0
state_after: R : Type u_1
inst✝ : CommRing R
I : Ideal R
a : R
ha : a ∈ I
⊢ ((Quotient.mk (map C I)).comp C) a = 0

tactic: rw [RingHom.comp_apply, Quotient.eq_zero_iff_mem]
state_before: R : Type u_1
inst✝ : CommRing R
I : Ideal R
a : R
ha : a ∈ I
⊢ ((Quotient.mk (map C I)).comp C) a = 0
state_after: R : Type u_1
inst✝ : CommRing R
I : Ideal R
a : R
ha : a ∈ I
⊢ C a ∈ map C I

tactic: exact mem_map_of_mem _ ha
state_before: R : Type u_1
inst✝ : CommRing R
I : Ideal R
a : R
ha : a ∈ I
⊢ C a ∈ map C I
state_after: no goals
Theorem: Matrix.dotProduct_star_self_eq_zero
File: Mathlib/LinearAlgebra/Matrix/DotProduct.lean

tactic: simp [Function.funext_iff, mul_eq_zero]
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
v : n → R
⊢ (∀ i ∈ Finset.univ, star (v i) * v i = 0) ↔ v = 0
state_after: no goals
Theorem: connectedComponents_preimage_singleton
File: Mathlib/Topology/Connected/Basic.lean

tactic: ext y
state_before: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
x : α
⊢ ConnectedComponents.mk ⁻¹' {ConnectedComponents.mk x} = connectedComponent x
state_after: case h
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
x y : α
⊢ y ∈ ConnectedComponents.mk ⁻¹' {ConnectedComponents.mk x} ↔ y ∈ connectedComponent x

tactic: rw [mem_preimage, mem_singleton_iff, ConnectedComponents.coe_eq_coe']
state_before: case h
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
x y : α
⊢ y ∈ ConnectedComponents.mk ⁻¹' {ConnectedComponents.mk x} ↔ y ∈ connectedComponent x
state_after: no goals
Theorem: Set.image_update_Icc_left
File: Mathlib/Order/Interval/Set/Pi.lean

tactic: simpa using image_update_Icc f i a (f i)
state_before: ι : Type u_1
α : ι → Type u_2
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → PartialOrder (α i)
f : (i : ι) → α i
i : ι
a : α i
⊢ update f i '' Icc a (f i) = Icc (update f i a) f
state_after: no goals
Theorem: Set.image_const_add_Iic
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [add_comm]
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ (fun x => a + x) '' Iic b = Iic (a + b)
state_after: no goals
Theorem: List.suffix_insert
File: Mathlib/Data/List/Infix.lean

tactic: by_cases h : a ∈ l
state_before: α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a✝ b : α
m n : ℕ
inst✝ : DecidableEq α
a : α
l : List α
⊢ l <:+ List.insert a l
state_after: case pos
α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a✝ b : α
m n : ℕ
inst✝ : DecidableEq α
a : α
l : List α
h : a ∈ l
⊢ l <:+ List.insert a l

case neg
α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a✝ b : α
m n : ℕ
inst✝ : DecidableEq α
a : α
l : List α
h : ¬a ∈ l
⊢ l <:+ List.insert a l

tactic: simp only [insert_of_mem h, insert, suffix_refl]
state_before: case pos
α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a✝ b : α
m n : ℕ
inst✝ : DecidableEq α
a : α
l : List α
h : a ∈ l
⊢ l <:+ List.insert a l
state_after: no goals

tactic: simp only [insert_of_not_mem h, suffix_cons, insert]
state_before: case neg
α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a✝ b : α
m n : ℕ
inst✝ : DecidableEq α
a : α
l : List α
h : ¬a ∈ l
⊢ l <:+ List.insert a l
state_after: no goals
Theorem: IsLocalizedModule.eq_iff_exists
File: Mathlib/Algebra/Module/LocalizedModule.lean

tactic: apply_fun f at h
state_before: R : Type u_1
inst✝¹² : CommSemiring R
S : Submonoid R
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid M'
inst✝⁹ : AddCommMonoid M''
A : Type u_5
inst✝⁸ : CommSemiring A
inst✝⁷ : Algebra R A
inst✝⁶ : Module A M'
inst✝⁵ : IsLocalization S A
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M''
inst✝¹ : IsScalarTower R A M'
f : M →ₗ[R] M'
g : M →ₗ[R] M''
inst✝ : IsLocalizedModule S f
x₁ x₂ : M
x✝ : ∃ c, c • x₁ = c • x₂
c : ↥S
h : c • x₁ = c • x₂
⊢ f x₁ = f x₂
state_after: R : Type u_1
inst✝¹² : CommSemiring R
S : Submonoid R
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid M'
inst✝⁹ : AddCommMonoid M''
A : Type u_5
inst✝⁸ : CommSemiring A
inst✝⁷ : Algebra R A
inst✝⁶ : Module A M'
inst✝⁵ : IsLocalization S A
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M''
inst✝¹ : IsScalarTower R A M'
f : M →ₗ[R] M'
g : M →ₗ[R] M''
inst✝ : IsLocalizedModule S f
x₁ x₂ : M
x✝ : ∃ c, c • x₁ = c • x₂
c : ↥S
h : f (c • x₁) = f (c • x₂)
⊢ f x₁ = f x₂

tactic: simp_rw [f.map_smul_of_tower, Submonoid.smul_def, ← Module.algebraMap_end_apply R R] at h
state_before: R : Type u_1
inst✝¹² : CommSemiring R
S : Submonoid R
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid M'
inst✝⁹ : AddCommMonoid M''
A : Type u_5
inst✝⁸ : CommSemiring A
inst✝⁷ : Algebra R A
inst✝⁶ : Module A M'
inst✝⁵ : IsLocalization S A
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M''
inst✝¹ : IsScalarTower R A M'
f : M →ₗ[R] M'
g : M →ₗ[R] M''
inst✝ : IsLocalizedModule S f
x₁ x₂ : M
x✝ : ∃ c, c • x₁ = c • x₂
c : ↥S
h : f (c • x₁) = f (c • x₂)
⊢ f x₁ = f x₂
state_after: R : Type u_1
inst✝¹² : CommSemiring R
S : Submonoid R
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid M'
inst✝⁹ : AddCommMonoid M''
A : Type u_5
inst✝⁸ : CommSemiring A
inst✝⁷ : Algebra R A
inst✝⁶ : Module A M'
inst✝⁵ : IsLocalization S A
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M''
inst✝¹ : IsScalarTower R A M'
f : M →ₗ[R] M'
g : M →ₗ[R] M''
inst✝ : IsLocalizedModule S f
x₁ x₂ : M
x✝ : ∃ c, c • x₁ = c • x₂
c : ↥S
h : ((algebraMap R (Module.End R M')) ↑c) (f x₁) = ((algebraMap R (Module.End R M')) ↑c) (f x₂)
⊢ f x₁ = f x₂

tactic: exact ((Module.End_isUnit_iff _).mp <| map_units f c).1 h
state_before: R : Type u_1
inst✝¹² : CommSemiring R
S : Submonoid R
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid M'
inst✝⁹ : AddCommMonoid M''
A : Type u_5
inst✝⁸ : CommSemiring A
inst✝⁷ : Algebra R A
inst✝⁶ : Module A M'
inst✝⁵ : IsLocalization S A
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M''
inst✝¹ : IsScalarTower R A M'
f : M →ₗ[R] M'
g : M →ₗ[R] M''
inst✝ : IsLocalizedModule S f
x₁ x₂ : M
x✝ : ∃ c, c • x₁ = c • x₂
c : ↥S
h : ((algebraMap R (Module.End R M')) ↑c) (f x₁) = ((algebraMap R (Module.End R M')) ↑c) (f x₂)
⊢ f x₁ = f x₂
state_after: no goals
Theorem: ENNReal.toReal_mul_top
File: Mathlib/Data/ENNReal/Real.lean

tactic: rw [toReal_mul, top_toReal, mul_zero]
state_before: a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
⊢ (a * ⊤).toReal = 0
state_after: no goals
Theorem: SimpleGraph.Subgraph.isMatching_iff_forall_degree
File: Mathlib/Combinatorics/SimpleGraph/Matching.lean

tactic: simp only [degree_eq_one_iff_unique_adj, IsMatching]
state_before: V : Type u
G : SimpleGraph V
M✝ M : G.Subgraph
inst✝ : (v : V) → Fintype ↑(M.neighborSet v)
⊢ M.IsMatching ↔ ∀ v ∈ M.verts, M.degree v = 1
state_after: no goals
Theorem: Submodule.isInternal_prime_power_torsion_of_pid
File: Mathlib/Algebra/Module/PID.lean

tactic: convert isInternal_prime_power_torsion hM
state_before: R : Type u
inst✝⁷ : CommRing R
inst✝⁶ : IsDomain R
inst✝⁵ : IsPrincipalIdealRing R
M : Type v
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
N : Type (max u v)
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : Module.Finite R M
hM : Module.IsTorsion R M
⊢ DirectSum.IsInternal fun p => torsionBy R M (IsPrincipal.generator ↑p ^ Multiset.count (↑p) (factors ⊤.annihilator))
state_after: case h.e'_8.h
R : Type u
inst✝⁷ : CommRing R
inst✝⁶ : IsDomain R
inst✝⁵ : IsPrincipalIdealRing R
M : Type v
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
N : Type (max u v)
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : Module.Finite R M
hM : Module.IsTorsion R M
x✝ : { x // x ∈ (factors ⊤.annihilator).toFinset }
⊢ torsionBy R M (IsPrincipal.generator ↑x✝ ^ Multiset.count (↑x✝) (factors ⊤.annihilator)) =
    torsionBySet R M ↑(↑x✝ ^ Multiset.count (↑x✝) (factors ⊤.annihilator))

tactic: ext p : 1
state_before: case h.e'_8.h
R : Type u
inst✝⁷ : CommRing R
inst✝⁶ : IsDomain R
inst✝⁵ : IsPrincipalIdealRing R
M : Type v
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
N : Type (max u v)
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : Module.Finite R M
hM : Module.IsTorsion R M
x✝ : { x // x ∈ (factors ⊤.annihilator).toFinset }
⊢ torsionBy R M (IsPrincipal.generator ↑x✝ ^ Multiset.count (↑x✝) (factors ⊤.annihilator)) =
    torsionBySet R M ↑(↑x✝ ^ Multiset.count (↑x✝) (factors ⊤.annihilator))
state_after: case h.e'_8.h.h
R : Type u
inst✝⁷ : CommRing R
inst✝⁶ : IsDomain R
inst✝⁵ : IsPrincipalIdealRing R
M : Type v
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
N : Type (max u v)
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : Module.Finite R M
hM : Module.IsTorsion R M
x✝ : { x // x ∈ (factors ⊤.annihilator).toFinset }
p : M
⊢ p ∈ torsionBy R M (IsPrincipal.generator ↑x✝ ^ Multiset.count (↑x✝) (factors ⊤.annihilator)) ↔
    p ∈ torsionBySet R M ↑(↑x✝ ^ Multiset.count (↑x✝) (factors ⊤.annihilator))

tactic: rw [← torsionBySet_span_singleton_eq, Ideal.submodule_span_eq, ← Ideal.span_singleton_pow,
  Ideal.span_singleton_generator]
state_before: case h.e'_8.h.h
R : Type u
inst✝⁷ : CommRing R
inst✝⁶ : IsDomain R
inst✝⁵ : IsPrincipalIdealRing R
M : Type v
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
N : Type (max u v)
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : Module.Finite R M
hM : Module.IsTorsion R M
x✝ : { x // x ∈ (factors ⊤.annihilator).toFinset }
p : M
⊢ p ∈ torsionBy R M (IsPrincipal.generator ↑x✝ ^ Multiset.count (↑x✝) (factors ⊤.annihilator)) ↔
    p ∈ torsionBySet R M ↑(↑x✝ ^ Multiset.count (↑x✝) (factors ⊤.annihilator))
state_after: no goals
Theorem: Finset.sigma_preimage_mk_of_subset
File: Mathlib/Data/Finset/Preimage.lean

tactic: rw [sigma_preimage_mk, filter_true_of_mem <| image_subset_iff.1 ht]
state_before: α : Type u
β✝ : Type v
ι : Sort w
γ : Type x
β : α → Type u_1
inst✝ : DecidableEq α
s : Finset ((a : α) × β a)
t : Finset α
ht : image Sigma.fst s ⊆ t
⊢ (t.sigma fun a => s.preimage (Sigma.mk a) ⋯) = s
state_after: no goals
Theorem: CircleDeg1Lift.map_lt_add_translationNumber_add_one
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

tactic: gcongr
state_before: f g : CircleDeg1Lift
x : ℝ
⊢ x + ↑⌊τ f⌋ + 1 ≤ x + τ f + 1
state_after: case bc.bc
f g : CircleDeg1Lift
x : ℝ
⊢ ↑⌊τ f⌋ ≤ τ f

tactic: apply floor_le
state_before: case bc.bc
f g : CircleDeg1Lift
x : ℝ
⊢ ↑⌊τ f⌋ ≤ τ f
state_after: no goals
Theorem: Nat.Partrec'.to_part
File: Mathlib/Computability/Halting.lean

tactic: induction pf with
| prim hf => exact hf.to_prim.to_comp
| comp _ _ _ hf hg => exact (Partrec.vector_mOfFn hg).bind (hf.comp snd)
| rfind _ hf =>
  have := hf.comp (vector_cons.comp snd fst)
  have :=
    ((Primrec.eq.comp _root_.Primrec.id (_root_.Primrec.const 0)).to_comp.comp
      this).to₂.partrec₂
  exact _root_.Partrec.rfind this
state_before: n : ℕ
f : Vector ℕ n →. ℕ
pf : Partrec' f
⊢ _root_.Partrec f
state_after: no goals

tactic: exact hf.to_prim.to_comp
state_before: case prim
n : ℕ
f : Vector ℕ n →. ℕ
n✝ : ℕ
f✝ : Vector ℕ n✝ → ℕ
hf : Primrec' f✝
⊢ _root_.Partrec ↑f✝
state_after: no goals

tactic: exact (Partrec.vector_mOfFn hg).bind (hf.comp snd)
state_before: case comp
n : ℕ
f : Vector ℕ n →. ℕ
m✝ n✝ : ℕ
f✝ : Vector ℕ n✝ →. ℕ
g✝ : Fin n✝ → Vector ℕ m✝ →. ℕ
a✝¹ : Partrec' f✝
a✝ : ∀ (i : Fin n✝), Partrec' (g✝ i)
hf : _root_.Partrec f✝
hg : ∀ (i : Fin n✝), _root_.Partrec (g✝ i)
⊢ _root_.Partrec fun v => (mOfFn fun i => g✝ i v) >>= f✝
state_after: no goals

tactic: have := hf.comp (vector_cons.comp snd fst)
state_before: case rfind
n : ℕ
f : Vector ℕ n →. ℕ
n✝ : ℕ
f✝ : Vector ℕ (n✝ + 1) → ℕ
a✝ : Partrec' ↑f✝
hf : _root_.Partrec ↑f✝
⊢ _root_.Partrec fun v => Nat.rfind fun n => Part.some (decide (f✝ (n ::ᵥ v) = 0))
state_after: case rfind
n : ℕ
f : Vector ℕ n →. ℕ
n✝ : ℕ
f✝ : Vector ℕ (n✝ + 1) → ℕ
a✝ : Partrec' ↑f✝
hf : _root_.Partrec ↑f✝
this : _root_.Partrec fun a => ↑f✝ (a.2 ::ᵥ a.1)
⊢ _root_.Partrec fun v => Nat.rfind fun n => Part.some (decide (f✝ (n ::ᵥ v) = 0))

tactic: have :=
  ((Primrec.eq.comp _root_.Primrec.id (_root_.Primrec.const 0)).to_comp.comp
    this).to₂.partrec₂
state_before: case rfind
n : ℕ
f : Vector ℕ n →. ℕ
n✝ : ℕ
f✝ : Vector ℕ (n✝ + 1) → ℕ
a✝ : Partrec' ↑f✝
hf : _root_.Partrec ↑f✝
this : _root_.Partrec fun a => ↑f✝ (a.2 ::ᵥ a.1)
⊢ _root_.Partrec fun v => Nat.rfind fun n => Part.some (decide (f✝ (n ::ᵥ v) = 0))
state_after: case rfind
n : ℕ
f : Vector ℕ n →. ℕ
n✝ : ℕ
f✝ : Vector ℕ (n✝ + 1) → ℕ
a✝ : Partrec' ↑f✝
hf : _root_.Partrec ↑f✝
this✝ : _root_.Partrec fun a => ↑f✝ (a.2 ::ᵥ a.1)
this : Partrec₂ fun a => ↑fun b => decide ((fun a => id a = 0) (f✝ ((a, b).2 ::ᵥ (a, b).1)))
⊢ _root_.Partrec fun v => Nat.rfind fun n => Part.some (decide (f✝ (n ::ᵥ v) = 0))

tactic: exact _root_.Partrec.rfind this
state_before: case rfind
n : ℕ
f : Vector ℕ n →. ℕ
n✝ : ℕ
f✝ : Vector ℕ (n✝ + 1) → ℕ
a✝ : Partrec' ↑f✝
hf : _root_.Partrec ↑f✝
this✝ : _root_.Partrec fun a => ↑f✝ (a.2 ::ᵥ a.1)
this : Partrec₂ fun a => ↑fun b => decide ((fun a => id a = 0) (f✝ ((a, b).2 ::ᵥ (a, b).1)))
⊢ _root_.Partrec fun v => Nat.rfind fun n => Part.some (decide (f✝ (n ::ᵥ v) = 0))
state_after: no goals
Theorem: Ordnode.all_node4R
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: cases m <;> simp [node4R, all_node', All, all_node3R, and_assoc]
state_before: α : Type u_1
P : α → Prop
l : Ordnode α
x : α
m : Ordnode α
y : α
r : Ordnode α
⊢ All P (l.node4R x m y r) ↔ All P l ∧ P x ∧ All P m ∧ P y ∧ All P r
state_after: no goals
Theorem: Bool.eq_false_eq_not_eq_true
File: Mathlib/Init/Data/Bool/Lemmas.lean

tactic: simp
state_before: b : Bool
⊢ (¬b = true) = (b = false)
state_after: no goals
Theorem: AffineSubspace.directionOfNonempty_eq_direction
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: refine le_antisymm ?_ (Submodule.span_le.2 Set.Subset.rfl)
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
s : AffineSubspace k P
h : (↑s).Nonempty
⊢ directionOfNonempty h = s.direction
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
s : AffineSubspace k P
h : (↑s).Nonempty
⊢ directionOfNonempty h ≤ s.direction

tactic: rw [← SetLike.coe_subset_coe, directionOfNonempty, direction, Submodule.coe_set_mk,
  AddSubmonoid.coe_set_mk]
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
s : AffineSubspace k P
h : (↑s).Nonempty
⊢ directionOfNonempty h ≤ s.direction
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
s : AffineSubspace k P
h : (↑s).Nonempty
⊢ ↑{ carrier := ↑s -ᵥ ↑s, add_mem' := ⋯ } ⊆ ↑(vectorSpan k ↑s)

tactic: exact vsub_set_subset_vectorSpan k _
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
s : AffineSubspace k P
h : (↑s).Nonempty
⊢ ↑{ carrier := ↑s -ᵥ ↑s, add_mem' := ⋯ } ⊆ ↑(vectorSpan k ↑s)
state_after: no goals
Theorem: FreeAbelianGroup.toFinsupp_toFreeAbelianGroup
File: Mathlib/GroupTheory/FreeAbelianGroupFinsupp.lean

tactic: rw [← AddMonoidHom.comp_apply, toFinsupp_comp_toFreeAbelianGroup, AddMonoidHom.id_apply]
state_before: X : Type u_1
f : X →₀ ℤ
⊢ toFinsupp (toFreeAbelianGroup f) = f
state_after: no goals
Theorem: Fintype.card_lt_of_injective_of_not_mem
File: Mathlib/Data/Fintype/Card.lean

tactic: rwa [← mem_coe, coe_map, coe_univ, Set.image_univ]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : Fintype α
inst✝ : Fintype β
f : α → β
h : Injective f
b : β
w : b ∉ Set.range f
⊢ ?m.14799 ∉ map { toFun := f, inj' := h } univ
state_after: no goals
Theorem: Function.Antiperiodic.add_int_mul_eq
File: Mathlib/Algebra/Periodic.lean

tactic: simpa only [zsmul_eq_mul] using h.add_zsmul_eq n
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → β
c c₁ c₂ x : α
inst✝¹ : Ring α
inst✝ : Ring β
h : Antiperiodic f c
n : ℤ
⊢ f (x + ↑n * c) = ↑↑n.negOnePow * f x
state_after: no goals
Theorem: ENNReal.coe_zpow
File: Mathlib/Data/ENNReal/Inv.lean

tactic: cases' n with n n
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
hr : r ≠ 0
n : ℤ
⊢ ↑(r ^ n) = ↑r ^ n
state_after: case ofNat
a b c d : ℝ≥0∞
r p q : ℝ≥0
hr : r ≠ 0
n : ℕ
⊢ ↑(r ^ Int.ofNat n) = ↑r ^ Int.ofNat n

case negSucc
a b c d : ℝ≥0∞
r p q : ℝ≥0
hr : r ≠ 0
n : ℕ
⊢ ↑(r ^ Int.negSucc n) = ↑r ^ Int.negSucc n

tactic: simp only [Int.ofNat_eq_coe, coe_pow, zpow_natCast]
state_before: case ofNat
a b c d : ℝ≥0∞
r p q : ℝ≥0
hr : r ≠ 0
n : ℕ
⊢ ↑(r ^ Int.ofNat n) = ↑r ^ Int.ofNat n
state_after: no goals

tactic: have : r ^ n.succ ≠ 0 := pow_ne_zero (n + 1) hr
state_before: case negSucc
a b c d : ℝ≥0∞
r p q : ℝ≥0
hr : r ≠ 0
n : ℕ
⊢ ↑(r ^ Int.negSucc n) = ↑r ^ Int.negSucc n
state_after: case negSucc
a b c d : ℝ≥0∞
r p q : ℝ≥0
hr : r ≠ 0
n : ℕ
this : r ^ n.succ ≠ 0
⊢ ↑(r ^ Int.negSucc n) = ↑r ^ Int.negSucc n

tactic: simp only [zpow_negSucc, coe_inv this, coe_pow]
state_before: case negSucc
a b c d : ℝ≥0∞
r p q : ℝ≥0
hr : r ≠ 0
n : ℕ
this : r ^ n.succ ≠ 0
⊢ ↑(r ^ Int.negSucc n) = ↑r ^ Int.negSucc n
state_after: no goals
Theorem: Set.Icc.one_sub_le_one
File: Mathlib/Algebra/Order/Interval/Set/Instances.lean

tactic: simpa using x.2.1
state_before: α : Type u_1
inst✝¹ : OrderedSemiring α
β : Type u_2
inst✝ : OrderedRing β
x : ↑(Icc 0 1)
⊢ 1 - ↑x ≤ 1
state_after: no goals
Theorem: List.mergeSort_nil
File: Mathlib/Data/List/Sort.lean

tactic: rw [List.mergeSort]
state_before: α : Type u
r : α → α → Prop
inst✝ : DecidableRel r
⊢ mergeSort r [] = []
state_after: no goals
Theorem: Hyperreal.infinitesimal_iff_infinite_inv
File: Mathlib/Data/Real/Hyperreal.lean

tactic: rw [inv_inv]
state_before: x : ℝ*
h : x ≠ 0
⊢ x.Infinitesimal ↔ x⁻¹⁻¹.Infinitesimal
state_after: no goals
Theorem: Irreducible.gcd_eq_one_iff
File: Mathlib/Algebra/GCDMonoid/Basic.lean

tactic: rw [← hx.isUnit_gcd_iff, ← normalize_eq_one, NormalizedGCDMonoid.normalize_gcd]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
x y : α
hx : Irreducible x
⊢ gcd x y = 1 ↔ ¬x ∣ y
state_after: no goals
Theorem: CategoryTheory.Subobject.factors_right_of_factors_add
File: Mathlib/CategoryTheory/Subobject/FactorThru.lean

tactic: simp
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : Preadditive C
X Y : C
P : Subobject Y
f g : X ⟶ Y
w : P.Factors (f + g)
wf : P.Factors f
⊢ (P.factorThru (f + g) w - P.factorThru f wf) ≫ (representative.obj P).arrow = g
state_after: no goals
Theorem: Polynomial.rootMultiplicity_mul
File: Mathlib/Algebra/Polynomial/RingDivision.lean

tactic: classical
have hp : p ≠ 0 := left_ne_zero_of_mul hpq
have hq : q ≠ 0 := right_ne_zero_of_mul hpq
rw [rootMultiplicity_eq_multiplicity (p * q), dif_neg hpq, rootMultiplicity_eq_multiplicity p,
  dif_neg hp, rootMultiplicity_eq_multiplicity q, dif_neg hq,
  multiplicity.mul' (prime_X_sub_C x)]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q✝ p q : R[X]
x : R
hpq : p * q ≠ 0
⊢ rootMultiplicity x (p * q) = rootMultiplicity x p + rootMultiplicity x q
state_after: no goals

tactic: have hp : p ≠ 0 := left_ne_zero_of_mul hpq
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q✝ p q : R[X]
x : R
hpq : p * q ≠ 0
⊢ rootMultiplicity x (p * q) = rootMultiplicity x p + rootMultiplicity x q
state_after: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q✝ p q : R[X]
x : R
hpq : p * q ≠ 0
hp : p ≠ 0
⊢ rootMultiplicity x (p * q) = rootMultiplicity x p + rootMultiplicity x q

tactic: have hq : q ≠ 0 := right_ne_zero_of_mul hpq
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q✝ p q : R[X]
x : R
hpq : p * q ≠ 0
hp : p ≠ 0
⊢ rootMultiplicity x (p * q) = rootMultiplicity x p + rootMultiplicity x q
state_after: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q✝ p q : R[X]
x : R
hpq : p * q ≠ 0
hp : p ≠ 0
hq : q ≠ 0
⊢ rootMultiplicity x (p * q) = rootMultiplicity x p + rootMultiplicity x q

tactic: rw [rootMultiplicity_eq_multiplicity (p * q), dif_neg hpq, rootMultiplicity_eq_multiplicity p,
  dif_neg hp, rootMultiplicity_eq_multiplicity q, dif_neg hq,
  multiplicity.mul' (prime_X_sub_C x)]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q✝ p q : R[X]
x : R
hpq : p * q ≠ 0
hp : p ≠ 0
hq : q ≠ 0
⊢ rootMultiplicity x (p * q) = rootMultiplicity x p + rootMultiplicity x q
state_after: no goals
Theorem: Real.Gamma_mul_Gamma_add_half_of_pos
File: Mathlib/Analysis/SpecialFunctions/Gamma/BohrMollerup.lean

tactic: rw [← doublingGamma_eq_Gamma (mul_pos two_pos hs), doublingGamma,
  mul_div_cancel_left₀ _ (two_ne_zero' ℝ), (by abel : 1 - 2 * s = -(2 * s - 1)),
  rpow_neg zero_le_two]
state_before: s : ℝ
hs : 0 < s
⊢ Gamma s * Gamma (s + 1 / 2) = Gamma (2 * s) * 2 ^ (1 - 2 * s) * √π
state_after: s : ℝ
hs : 0 < s
⊢ Gamma s * Gamma (s + 1 / 2) = Gamma s * Gamma (s + 1 / 2) * 2 ^ (2 * s - 1) / √π * (2 ^ (2 * s - 1))⁻¹ * √π

tactic: field_simp [(sqrt_pos_of_pos pi_pos).ne', (rpow_pos_of_pos two_pos (2 * s - 1)).ne']
state_before: s : ℝ
hs : 0 < s
⊢ Gamma s * Gamma (s + 1 / 2) = Gamma s * Gamma (s + 1 / 2) * 2 ^ (2 * s - 1) / √π * (2 ^ (2 * s - 1))⁻¹ * √π
state_after: s : ℝ
hs : 0 < s
⊢ Gamma s * Gamma ((s * 2 + 1) / 2) * (√π * 2 ^ (2 * s - 1)) = Gamma s * Gamma ((s * 2 + 1) / 2) * 2 ^ (2 * s - 1) * √π

tactic: ring
state_before: s : ℝ
hs : 0 < s
⊢ Gamma s * Gamma ((s * 2 + 1) / 2) * (√π * 2 ^ (2 * s - 1)) = Gamma s * Gamma ((s * 2 + 1) / 2) * 2 ^ (2 * s - 1) * √π
state_after: no goals

tactic: abel
state_before: s : ℝ
hs : 0 < s
⊢ 1 - 2 * s = -(2 * s - 1)
state_after: no goals
Theorem: MvPolynomial.pderiv_monomial_single
File: Mathlib/Algebra/MvPolynomial/PDeriv.lean

tactic: simp
state_before: R : Type u
σ : Type v
a a' a₁ a₂ : R
s : σ →₀ ℕ
inst✝ : CommSemiring R
i : σ
n : ℕ
⊢ (pderiv i) ((monomial (single i n)) a) = (monomial (single i (n - 1))) (a * ↑n)
state_after: no goals
Theorem: sup_himp_distrib
File: Mathlib/Order/Heyting/Basic.lean

tactic: rw [le_inf_iff, le_himp_comm, sup_le_iff]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : GeneralizedHeytingAlgebra α
a✝ b✝ c✝ d✝ a b c d : α
⊢ d ≤ a ⊔ b ⇨ c ↔ d ≤ (a ⇨ c) ⊓ (b ⇨ c)
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : GeneralizedHeytingAlgebra α
a✝ b✝ c✝ d✝ a b c d : α
⊢ a ≤ d ⇨ c ∧ b ≤ d ⇨ c ↔ d ≤ a ⇨ c ∧ d ≤ b ⇨ c

tactic: simp_rw [le_himp_comm]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : GeneralizedHeytingAlgebra α
a✝ b✝ c✝ d✝ a b c d : α
⊢ a ≤ d ⇨ c ∧ b ≤ d ⇨ c ↔ d ≤ a ⇨ c ∧ d ≤ b ⇨ c
state_after: no goals