1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Complex.eq_of_isMaxOn_of_ball_subset
File: Mathlib/Analysis/Complex/AbsMax.lean

tactic: simp only [H₂, SameRay.rfl.norm_add, H₁]
state_before: E : Type u
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℂ E
F : Type v
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℂ F
inst✝ : StrictConvexSpace ℝ F
f : E → F
s : Set E
z w : E
hd : DiffContOnCl ℂ f s
hz : IsMaxOn (norm ∘ f) s z
hsub : ball z (dist w z) ⊆ s
H₁ : ‖f w‖ = ‖f z‖
H₂ : ‖f w + f z‖ = ‖f z + f z‖
⊢ ‖f w + f z‖ = ‖f w‖ + ‖f z‖
state_after: no goals
Theorem: iInf_iSup_eq
File: Mathlib/Order/CompleteBooleanAlgebra.lean

tactic: simp_rw [iInf_subtype, iInf_range, iSup_subtype, iSup_range]
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
⊢ ⨅ a, ⨆ b, f a b = ⨅ a, ⨆ b, ↑b
state_after: no goals

tactic: refine le_trans ?_ <| le_iSup _ fun a => Classical.choose (g ⟨_, a, rfl⟩).2
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : (a : ↑(range fun x => range (f x))) → ↑↑a
⊢ ⨅ a, ↑(g a) ≤ ⨆ g, ⨅ a, f a (g a)
state_after: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : (a : ↑(range fun x => range (f x))) → ↑↑a
⊢ ⨅ a, ↑(g a) ≤ ⨅ a, f a ((fun a => Classical.choose ⋯) a)

tactic: refine le_iInf fun a => le_trans (iInf_le _ ⟨range (f a), a, rfl⟩) ?_
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : (a : ↑(range fun x => range (f x))) → ↑↑a
⊢ ⨅ a, ↑(g a) ≤ ⨅ a, f a ((fun a => Classical.choose ⋯) a)
state_after: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : (a : ↑(range fun x => range (f x))) → ↑↑a
a : ι
⊢ ↑(g ⟨range (f a), ⋯⟩) ≤ f a ((fun a => Classical.choose ⋯) a)

tactic: rw [← Classical.choose_spec (g ⟨_, a, rfl⟩).2]
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : (a : ↑(range fun x => range (f x))) → ↑↑a
a : ι
⊢ ↑(g ⟨range (f a), ⋯⟩) ≤ f a ((fun a => Classical.choose ⋯) a)
state_after: no goals
Theorem: InnerProductGeometry.cos_angle_add_angle_sub_add_angle_sub_eq_neg_one
File: Mathlib/Geometry/Euclidean/Triangle.lean

tactic: rw [add_assoc, Real.cos_add, cos_angle_sub_add_angle_sub_rev_eq_neg_cos_angle hx hy,
  sin_angle_sub_add_angle_sub_rev_eq_sin_angle hx hy, mul_neg, ← neg_add', add_comm, ← sq, ← sq,
  Real.sin_sq_add_cos_sq]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
hx : x ≠ 0
hy : y ≠ 0
⊢ Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1
state_after: no goals
Theorem: Set.image_star
File: Mathlib/Algebra/Star/Pointwise.lean

tactic: simp only [← star_preimage]
state_before: α : Type u_1
s t : Set α
a : α
inst✝ : InvolutiveStar α
⊢ star '' s = s⋆
state_after: α : Type u_1
s t : Set α
a : α
inst✝ : InvolutiveStar α
⊢ star '' s = star ⁻¹' s

tactic: rw [image_eq_preimage_of_inverse] <;> intro <;> simp only [star_star]
state_before: α : Type u_1
s t : Set α
a : α
inst✝ : InvolutiveStar α
⊢ star '' s = star ⁻¹' s
state_after: no goals
Theorem: MvPolynomial.X_dvd_X
File: Mathlib/Algebra/MvPolynomial/Division.lean

tactic: refine monomial_one_dvd_monomial_one.trans ?_
state_before: σ : Type u_1
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
i j : σ
⊢ X i ∣ X j ↔ i = j
state_after: σ : Type u_1
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
i j : σ
⊢ Finsupp.single i 1 ≤ Finsupp.single j 1 ↔ i = j

tactic: simp_rw [Finsupp.single_le_iff, Nat.one_le_iff_ne_zero, Finsupp.single_apply_ne_zero,
  ne_eq, not_false_eq_true, and_true]
state_before: σ : Type u_1
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
i j : σ
⊢ Finsupp.single i 1 ≤ Finsupp.single j 1 ↔ i = j
state_after: no goals
Theorem: CauSeq.sup_le
File: Mathlib/Algebra/Order/CauSeq/Basic.lean

tactic: cases' ha with ha ha
state_before: α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
ha : a ≤ c
hb : b ≤ c
⊢ a ⊔ b ≤ c
state_after: case inl
α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
hb : b ≤ c
ha : a < c
⊢ a ⊔ b ≤ c

case inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
hb : b ≤ c
ha : a ≈ c
⊢ a ⊔ b ≤ c

tactic: cases' hb with hb hb
state_before: case inl
α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
hb : b ≤ c
ha : a < c
⊢ a ⊔ b ≤ c
state_after: case inl.inl
α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
ha : a < c
hb : b < c
⊢ a ⊔ b ≤ c

case inl.inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
ha : a < c
hb : b ≈ c
⊢ a ⊔ b ≤ c

tactic: exact Or.inl (CauSeq.sup_lt ha hb)
state_before: case inl.inl
α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
ha : a < c
hb : b < c
⊢ a ⊔ b ≤ c
state_after: no goals

tactic: replace ha := le_of_le_of_eq ha.le (Setoid.symm hb)
state_before: case inl.inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
ha : a < c
hb : b ≈ c
⊢ a ⊔ b ≤ c
state_after: case inl.inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
hb : b ≈ c
ha : a ≤ b
⊢ a ⊔ b ≤ c

tactic: refine le_of_le_of_eq (Or.inr ?_) hb
state_before: case inl.inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
hb : b ≈ c
ha : a ≤ b
⊢ a ⊔ b ≤ c
state_after: case inl.inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
hb : b ≈ c
ha : a ≤ b
⊢ a ⊔ b ≈ b

tactic: exact CauSeq.sup_eq_right ha
state_before: case inl.inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
hb : b ≈ c
ha : a ≤ b
⊢ a ⊔ b ≈ b
state_after: no goals

tactic: replace hb := le_of_le_of_eq hb (Setoid.symm ha)
state_before: case inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
hb : b ≤ c
ha : a ≈ c
⊢ a ⊔ b ≤ c
state_after: case inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
ha : a ≈ c
hb : b ≤ a
⊢ a ⊔ b ≤ c

tactic: refine le_of_le_of_eq (Or.inr ?_) ha
state_before: case inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
ha : a ≈ c
hb : b ≤ a
⊢ a ⊔ b ≤ c
state_after: case inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
ha : a ≈ c
hb : b ≤ a
⊢ a ⊔ b ≈ a

tactic: exact CauSeq.sup_eq_left hb
state_before: case inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrderedField α
a b c : CauSeq α abs
ha : a ≈ c
hb : b ≤ a
⊢ a ⊔ b ≈ a
state_after: no goals
Theorem: Nat.one_le_cast
File: Mathlib/Data/Nat/Cast/Order.lean

tactic: rw [← cast_one, cast_le]
state_before: α : Type u_1
β : Type u_2
inst✝⁴ : AddMonoidWithOne α
inst✝³ : PartialOrder α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : ZeroLEOneClass α
inst✝ : CharZero α
m n : ℕ
⊢ 1 ≤ ↑n ↔ 1 ≤ n
state_after: no goals
Theorem: List.tail_append_singleton_of_ne_nil
File: Mathlib/Data/List/Basic.lean

tactic: induction l
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
a : α
l : List α
h : l ≠ []
⊢ (l ++ [a]).tail = l.tail ++ [a]
state_after: case nil
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
a : α
h : [] ≠ []
⊢ ([] ++ [a]).tail = [].tail ++ [a]

case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
a head✝ : α
tail✝ : List α
tail_ih✝ : tail✝ ≠ [] → (tail✝ ++ [a]).tail = tail✝.tail ++ [a]
h : head✝ :: tail✝ ≠ []
⊢ (head✝ :: tail✝ ++ [a]).tail = (head✝ :: tail✝).tail ++ [a]

tactic: contradiction
state_before: case nil
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
a : α
h : [] ≠ []
⊢ ([] ++ [a]).tail = [].tail ++ [a]
state_after: no goals

tactic: rw [tail, cons_append, tail]
state_before: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
a head✝ : α
tail✝ : List α
tail_ih✝ : tail✝ ≠ [] → (tail✝ ++ [a]).tail = tail✝.tail ++ [a]
h : head✝ :: tail✝ ≠ []
⊢ (head✝ :: tail✝ ++ [a]).tail = (head✝ :: tail✝).tail ++ [a]
state_after: no goals
Theorem: Traversable.traverse_map'
File: Mathlib/Control/Traversable/Lemmas.lean

tactic: ext
state_before: t : Type u → Type u
inst✝⁵ : Traversable t
inst✝⁴ : LawfulTraversable t
F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : LawfulApplicative F
inst✝¹ : Applicative G
inst✝ : LawfulApplicative G
α β γ : Type u
g✝ : α → F β
h✝ : β → G γ
f : β → γ
x : t β
g : α → β
h : β → G γ
⊢ traverse (h ∘ g) = traverse h ∘ map g
state_after: case h
t : Type u → Type u
inst✝⁵ : Traversable t
inst✝⁴ : LawfulTraversable t
F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : LawfulApplicative F
inst✝¹ : Applicative G
inst✝ : LawfulApplicative G
α β γ : Type u
g✝ : α → F β
h✝ : β → G γ
f : β → γ
x : t β
g : α → β
h : β → G γ
x✝ : t α
⊢ traverse (h ∘ g) x✝ = (traverse h ∘ map g) x✝

tactic: rw [comp_apply, traverse_map]
state_before: case h
t : Type u → Type u
inst✝⁵ : Traversable t
inst✝⁴ : LawfulTraversable t
F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : LawfulApplicative F
inst✝¹ : Applicative G
inst✝ : LawfulApplicative G
α β γ : Type u
g✝ : α → F β
h✝ : β → G γ
f : β → γ
x : t β
g : α → β
h : β → G γ
x✝ : t α
⊢ traverse (h ∘ g) x✝ = (traverse h ∘ map g) x✝
state_after: no goals
Theorem: ContinuousLinearMap.comp_hasFPowerSeriesOnBall
File: Mathlib/Analysis/Analytic/Basic.lean

tactic: simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
  ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
  g.hasSum (h.hasSum hy)
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g✝ : E → F
p pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r' : ℝ≥0∞
g : F →L[𝕜] G
h : HasFPowerSeriesOnBall f p x r
y✝ : E
hy : y✝ ∈ EMetric.ball 0 r
⊢ HasSum (fun n => (g.compFormalMultilinearSeries p n) fun x => y✝) ((⇑g ∘ f) (x + y✝))
state_after: no goals
Theorem: cross_anticomm'
File: Mathlib/LinearAlgebra/CrossProduct.lean

tactic: rw [add_eq_zero_iff_eq_neg, cross_anticomm]
state_before: R : Type u_1
inst✝ : CommRing R
v w : Fin 3 → R
⊢ (crossProduct v) w + (crossProduct w) v = 0
state_after: no goals
Theorem: MeasureTheory.sFinite_withDensity_of_measurable
File: Mathlib/MeasureTheory/Measure/WithDensity.lean

tactic: rw [← sum_sFiniteSeq μ, withDensity_sum]
state_before: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
inst✝ : SFinite μ
f : α → ℝ≥0∞
hf : Measurable f
⊢ SFinite (μ.withDensity f)
state_after: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
inst✝ : SFinite μ
f : α → ℝ≥0∞
hf : Measurable f
⊢ SFinite (sum fun n => (sFiniteSeq μ n).withDensity f)

tactic: have : ∀ n, SFinite ((sFiniteSeq μ n).withDensity f) :=
  fun n ↦ sFinite_withDensity_of_sigmaFinite_of_measurable _ hf
state_before: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
inst✝ : SFinite μ
f : α → ℝ≥0∞
hf : Measurable f
⊢ SFinite (sum fun n => (sFiniteSeq μ n).withDensity f)
state_after: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
inst✝ : SFinite μ
f : α → ℝ≥0∞
hf : Measurable f
this : ∀ (n : ℕ), SFinite ((sFiniteSeq μ n).withDensity f)
⊢ SFinite (sum fun n => (sFiniteSeq μ n).withDensity f)

tactic: infer_instance
state_before: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
inst✝ : SFinite μ
f : α → ℝ≥0∞
hf : Measurable f
this : ∀ (n : ℕ), SFinite ((sFiniteSeq μ n).withDensity f)
⊢ SFinite (sum fun n => (sFiniteSeq μ n).withDensity f)
state_after: no goals
Theorem: AffineSubspace.affineSpan_coe
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: refine le_antisymm ?_ (subset_spanPoints _ _)
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s : AffineSubspace k P
⊢ affineSpan k ↑s = s
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s : AffineSubspace k P
⊢ affineSpan k ↑s ≤ s

tactic: rintro p ⟨p1, hp1, v, hv, 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
S : AffineSpace V P
p₁ p₂ : P
s : AffineSubspace k P
⊢ affineSpan k ↑s ≤ s
state_after: case intro.intro.intro.intro
k : Type u_1
V : Type u_2
P : Type u_3
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s : AffineSubspace k P
p1 : P
hp1 : p1 ∈ ↑s
v : V
hv : v ∈ vectorSpan k ↑s
⊢ v +ᵥ p1 ∈ ↑s

tactic: exact vadd_mem_of_mem_direction hv hp1
state_before: case intro.intro.intro.intro
k : Type u_1
V : Type u_2
P : Type u_3
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s : AffineSubspace k P
p1 : P
hp1 : p1 ∈ ↑s
v : V
hv : v ∈ vectorSpan k ↑s
⊢ v +ᵥ p1 ∈ ↑s
state_after: no goals
Theorem: CategoryTheory.OverPresheafAux.MakesOverArrow.of_yoneda_arrow
File: Mathlib/CategoryTheory/Comma/Presheaf.lean

tactic: simpa only [yonedaEquiv_yoneda_map f] using of_arrow hf
state_before: C : Type u
inst✝ : Category.{v, u} C
A : Cᵒᵖ ⥤ Type v
Y : C
η : yoneda.obj Y ⟶ A
X : C
s : yoneda.obj X ⟶ A
f : X ⟶ Y
hf : yoneda.map f ≫ η = s
⊢ MakesOverArrow η s f
state_after: no goals
Theorem: Vector.mem_of_mem_tail
File: Mathlib/Data/Vector/Mem.lean

tactic: induction' n with n _
state_before: α : Type u_1
β : Type u_2
n : ℕ
a a' : α
v : Vector α n
ha : a ∈ v.tail.toList
⊢ a ∈ v.toList
state_after: case zero
α : Type u_1
β : Type u_2
n : ℕ
a a' : α
v : Vector α 0
ha : a ∈ v.tail.toList
⊢ a ∈ v.toList

case succ
α : Type u_1
β : Type u_2
n✝ : ℕ
a a' : α
n : ℕ
a✝ : ∀ (v : Vector α n), a ∈ v.tail.toList → a ∈ v.toList
v : Vector α (n + 1)
ha : a ∈ v.tail.toList
⊢ a ∈ v.toList

tactic: exact False.elim (Vector.not_mem_zero a v.tail ha)
state_before: case zero
α : Type u_1
β : Type u_2
n : ℕ
a a' : α
v : Vector α 0
ha : a ∈ v.tail.toList
⊢ a ∈ v.toList
state_after: no goals

tactic: exact (mem_succ_iff a v).2 (Or.inr ha)
state_before: case succ
α : Type u_1
β : Type u_2
n✝ : ℕ
a a' : α
n : ℕ
a✝ : ∀ (v : Vector α n), a ∈ v.tail.toList → a ∈ v.toList
v : Vector α (n + 1)
ha : a ∈ v.tail.toList
⊢ a ∈ v.toList
state_after: no goals
Theorem: UniversalEnvelopingAlgebra.lift_ι_apply'
File: Mathlib/Algebra/Lie/UniversalEnveloping.lean

tactic: simpa using lift_ι_apply R f x
state_before: R : Type u₁
L : Type u₂
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
A : Type u₃
inst✝¹ : Ring A
inst✝ : Algebra R A
f : L →ₗ⁅R⁆ A
x : L
⊢ ((lift R) f) ((mkAlgHom R L) (ιₜ x)) = f x
state_after: no goals
Theorem: MvPolynomial.totalDegree_C
File: Mathlib/Algebra/MvPolynomial/Degrees.lean

tactic: rw [sum_zero_index, bot_eq_zero', ite_self]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
a : R
⊢ (if a = 0 then ⊥ else sum 0 fun x e => e) = 0
state_after: no goals
Theorem: inf_symmDiff_symmDiff
File: Mathlib/Order/SymmDiff.lean

tactic: rw [symmDiff_comm, symmDiff_symmDiff_inf]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ (a ⊓ b) ∆ (a ∆ b) = a ⊔ b
state_after: no goals
Theorem: CategoryTheory.ShortComplex.Exact.comp_eq_zero
File: Mathlib/Algebra/Homology/ShortComplex/Exact.lean

tactic: have := h.hasHomology
state_before: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.29718, u_2} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasZeroMorphisms D
S S₁ S₂ : ShortComplex C
h : S.Exact
X Y : C
a : X ⟶ S.X₂
ha : a ≫ S.g = 0
b : S.X₂ ⟶ Y
hb : S.f ≫ b = 0
⊢ a ≫ b = 0
state_after: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.29718, u_2} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasZeroMorphisms D
S S₁ S₂ : ShortComplex C
h : S.Exact
X Y : C
a : X ⟶ S.X₂
ha : a ≫ S.g = 0
b : S.X₂ ⟶ Y
hb : S.f ≫ b = 0
this : S.HasHomology
⊢ a ≫ b = 0

tactic: have eq := h
state_before: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.29718, u_2} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasZeroMorphisms D
S S₁ S₂ : ShortComplex C
h : S.Exact
X Y : C
a : X ⟶ S.X₂
ha : a ≫ S.g = 0
b : S.X₂ ⟶ Y
hb : S.f ≫ b = 0
this : S.HasHomology
⊢ a ≫ b = 0
state_after: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.29718, u_2} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasZeroMorphisms D
S S₁ S₂ : ShortComplex C
h : S.Exact
X Y : C
a : X ⟶ S.X₂
ha : a ≫ S.g = 0
b : S.X₂ ⟶ Y
hb : S.f ≫ b = 0
this : S.HasHomology
eq : S.Exact
⊢ a ≫ b = 0

tactic: rw [exact_iff_iCycles_pOpcycles_zero] at eq
state_before: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.29718, u_2} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasZeroMorphisms D
S S₁ S₂ : ShortComplex C
h : S.Exact
X Y : C
a : X ⟶ S.X₂
ha : a ≫ S.g = 0
b : S.X₂ ⟶ Y
hb : S.f ≫ b = 0
this : S.HasHomology
eq : S.Exact
⊢ a ≫ b = 0
state_after: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.29718, u_2} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasZeroMorphisms D
S S₁ S₂ : ShortComplex C
h : S.Exact
X Y : C
a : X ⟶ S.X₂
ha : a ≫ S.g = 0
b : S.X₂ ⟶ Y
hb : S.f ≫ b = 0
this : S.HasHomology
eq : S.iCycles ≫ S.pOpcycles = 0
⊢ a ≫ b = 0

tactic: rw [← S.liftCycles_i a ha, ← S.p_descOpcycles b hb, assoc, reassoc_of% eq,
  zero_comp, comp_zero]
state_before: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.29718, u_2} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasZeroMorphisms D
S S₁ S₂ : ShortComplex C
h : S.Exact
X Y : C
a : X ⟶ S.X₂
ha : a ≫ S.g = 0
b : S.X₂ ⟶ Y
hb : S.f ≫ b = 0
this : S.HasHomology
eq : S.iCycles ≫ S.pOpcycles = 0
⊢ a ≫ b = 0
state_after: no goals
Theorem: MeasurableEmbedding.comap_preimage
File: Mathlib/MeasureTheory/Measure/Restrict.lean

tactic: rw [← hf.map_apply, hf.map_comap, restrict_apply' hf.measurableSet_range]
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
hf : MeasurableEmbedding f
μ : Measure β
s : Set β
⊢ (Measure.comap f μ) (f ⁻¹' s) = μ (s ∩ range f)
state_after: no goals
Theorem: Ordinal.natCast_inj
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simp only [le_antisymm_iff, natCast_le]
state_before: m n : ℕ
⊢ ↑m = ↑n ↔ m = n
state_after: no goals
Theorem: exists_ord_compl_eq_one_iff_isPrimePow
File: Mathlib/Data/Nat/Factorization/PrimePow.lean

tactic: refine ⟨fun h => IsPrimePow.exists_ord_compl_eq_one h, fun h => ?_⟩
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
hn : n ≠ 1
⊢ IsPrimePow n ↔ ∃ p, Nat.Prime p ∧ n / p ^ n.factorization p = 1
state_after: R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
hn : n ≠ 1
h : ∃ p, Nat.Prime p ∧ n / p ^ n.factorization p = 1
⊢ IsPrimePow n

tactic: rcases h with ⟨p, pp, h⟩
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
hn : n ≠ 1
h : ∃ p, Nat.Prime p ∧ n / p ^ n.factorization p = 1
⊢ IsPrimePow n
state_after: case intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n : ℕ
hn : n ≠ 1
p : ℕ
pp : Nat.Prime p
h : n / p ^ n.factorization p = 1
⊢ IsPrimePow n

tactic: rw [isPrimePow_nat_iff]
state_before: case intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n : ℕ
hn : n ≠ 1
p : ℕ
pp : Nat.Prime p
h : n / p ^ n.factorization p = 1
⊢ IsPrimePow n
state_after: case intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n : ℕ
hn : n ≠ 1
p : ℕ
pp : Nat.Prime p
h : n / p ^ n.factorization p = 1
⊢ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n

tactic: rw [← Nat.eq_of_dvd_of_div_eq_one (Nat.ord_proj_dvd n p) h] at hn ⊢
state_before: case intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n : ℕ
hn : n ≠ 1
p : ℕ
pp : Nat.Prime p
h : n / p ^ n.factorization p = 1
⊢ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n
state_after: case intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n p : ℕ
hn : p ^ n.factorization p ≠ 1
pp : Nat.Prime p
h : n / p ^ n.factorization p = 1
⊢ ∃ p_1 k, Nat.Prime p_1 ∧ 0 < k ∧ p_1 ^ k = p ^ n.factorization p

tactic: refine ⟨p, n.factorization p, pp, ?_, by simp⟩
state_before: case intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n p : ℕ
hn : p ^ n.factorization p ≠ 1
pp : Nat.Prime p
h : n / p ^ n.factorization p = 1
⊢ ∃ p_1 k, Nat.Prime p_1 ∧ 0 < k ∧ p_1 ^ k = p ^ n.factorization p
state_after: case intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n p : ℕ
hn : p ^ n.factorization p ≠ 1
pp : Nat.Prime p
h : n / p ^ n.factorization p = 1
⊢ 0 < n.factorization p

tactic: contrapose! hn
state_before: case intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n p : ℕ
hn : p ^ n.factorization p ≠ 1
pp : Nat.Prime p
h : n / p ^ n.factorization p = 1
⊢ 0 < n.factorization p
state_after: case intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n p : ℕ
pp : Nat.Prime p
h : n / p ^ n.factorization p = 1
hn : n.factorization p ≤ 0
⊢ p ^ n.factorization p = 1

tactic: simp [Nat.le_zero.1 hn]
state_before: case intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n p : ℕ
pp : Nat.Prime p
h : n / p ^ n.factorization p = 1
hn : n.factorization p ≤ 0
⊢ p ^ n.factorization p = 1
state_after: no goals

tactic: simp
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k n p : ℕ
hn : p ^ n.factorization p ≠ 1
pp : Nat.Prime p
h : n / p ^ n.factorization p = 1
⊢ p ^ n.factorization p = p ^ n.factorization p
state_after: no goals
Theorem: Matrix.mulVec_surjective_iff_isUnit
File: Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean

tactic: rw [mulVec_surjective_iff_exists_right_inverse, exists_right_inverse_iff_isUnit]
state_before: l : Type u_1
m : Type u
n : Type u'
α : Type v
inst✝⁴ : DecidableEq m
inst✝³ : DecidableEq n
R : Type u_2
K : Type u_3
inst✝² : CommRing R
inst✝¹ : Field K
inst✝ : Fintype m
A : Matrix m m R
⊢ Function.Surjective A.mulVec ↔ IsUnit A
state_after: no goals
Theorem: Real.rpow_neg_one
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: suffices H : x ^ ((-1 : ℤ) : ℝ) = x⁻¹ by rwa [Int.cast_neg, Int.cast_one] at H
state_before: x✝ y z : ℝ
n : ℕ
x : ℝ
⊢ x ^ (-1) = x⁻¹
state_after: x✝ y z : ℝ
n : ℕ
x : ℝ
⊢ x ^ ↑(-1) = x⁻¹

tactic: simp only [rpow_intCast, zpow_one, zpow_neg]
state_before: x✝ y z : ℝ
n : ℕ
x : ℝ
⊢ x ^ ↑(-1) = x⁻¹
state_after: no goals

tactic: rwa [Int.cast_neg, Int.cast_one] at H
state_before: x✝ y z : ℝ
n : ℕ
x : ℝ
H : x ^ ↑(-1) = x⁻¹
⊢ x ^ (-1) = x⁻¹
state_after: no goals
Theorem: Tactic.NormNum.nat_lcm_helper
File: Mathlib/Tactic/NormNum/GCD.lean

tactic: dsimp only
state_before: x y d m : ℕ
hd : x.gcd y = d
d0 : d.beq 0 = false
dm : x * y = d * m
⊢ (fun x => d * x) (x.lcm y) = (fun x => d * x) m
state_after: x y d m : ℕ
hd : x.gcd y = d
d0 : d.beq 0 = false
dm : x * y = d * m
⊢ d * x.lcm y = d * m

tactic: rw [← dm, ← hd, Nat.gcd_mul_lcm]
state_before: x y d m : ℕ
hd : x.gcd y = d
d0 : d.beq 0 = false
dm : x * y = d * m
⊢ d * x.lcm y = d * m
state_after: no goals
Theorem: CharZero.of_module
File: Mathlib/Algebra/Module/Defs.lean

tactic: refine ⟨fun m n h => @Nat.cast_injective M _ _ _ _ ?_⟩
state_before: α : Type u_1
R : Type u_2
k : Type u_3
S : Type u_4
M✝ : Type u_5
M₂ : Type u_6
M₃ : Type u_7
ι : Type u_8
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M✝
inst✝³ : Module R M✝
M : Type u_9
inst✝² : AddCommMonoidWithOne M
inst✝¹ : CharZero M
inst✝ : Module R M
⊢ CharZero R
state_after: α : Type u_1
R : Type u_2
k : Type u_3
S : Type u_4
M✝ : Type u_5
M₂ : Type u_6
M₃ : Type u_7
ι : Type u_8
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M✝
inst✝³ : Module R M✝
M : Type u_9
inst✝² : AddCommMonoidWithOne M
inst✝¹ : CharZero M
inst✝ : Module R M
m n : ℕ
h : ↑m = ↑n
⊢ ↑m = ↑n

tactic: rw [← nsmul_one, ← nsmul_one, nsmul_eq_smul_cast R m (1 : M), nsmul_eq_smul_cast R n (1 : M), h]
state_before: α : Type u_1
R : Type u_2
k : Type u_3
S : Type u_4
M✝ : Type u_5
M₂ : Type u_6
M₃ : Type u_7
ι : Type u_8
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M✝
inst✝³ : Module R M✝
M : Type u_9
inst✝² : AddCommMonoidWithOne M
inst✝¹ : CharZero M
inst✝ : Module R M
m n : ℕ
h : ↑m = ↑n
⊢ ↑m = ↑n
state_after: no goals