1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Polynomial.degree_eq_natDegree
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: let ⟨n, hn⟩ := not_forall.1 (mt Option.eq_none_iff_forall_not_mem.2 (mt degree_eq_bot.1 hp))
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
hp : p ≠ 0
⊢ p.degree = ↑p.natDegree
state_after: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
hp : p ≠ 0
n : ℕ
hn : ¬n ∉ p.degree
⊢ p.degree = ↑p.natDegree

tactic: have hn : degree p = some n := Classical.not_not.1 hn
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
hp : p ≠ 0
n : ℕ
hn : ¬n ∉ p.degree
⊢ p.degree = ↑p.natDegree
state_after: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
hp : p ≠ 0
n : ℕ
hn✝ : ¬n ∉ p.degree
hn : p.degree = Option.some n
⊢ p.degree = ↑p.natDegree

tactic: rw [natDegree, hn]
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
hp : p ≠ 0
n : ℕ
hn✝ : ¬n ∉ p.degree
hn : p.degree = Option.some n
⊢ p.degree = ↑p.natDegree
state_after: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
hp : p ≠ 0
n : ℕ
hn✝ : ¬n ∉ p.degree
hn : p.degree = Option.some n
⊢ Option.some n = ↑(WithBot.unbot' 0 (Option.some n))

tactic: rfl
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
hp : p ≠ 0
n : ℕ
hn✝ : ¬n ∉ p.degree
hn : p.degree = Option.some n
⊢ Option.some n = ↑(WithBot.unbot' 0 (Option.some n))
state_after: no goals
Theorem: Matrix.fromColumns_zero
File: Mathlib/Data/Matrix/ColumnRowPartitioned.lean

tactic: ext _ (_ | _) <;> simp
state_before: R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
⊢ fromColumns 0 0 = 0
state_after: no goals
Theorem: Padic.norm_le_one_iff_val_nonneg
File: Mathlib/NumberTheory/Padics/PadicNumbers.lean

tactic: by_cases hx : x = 0
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x : ℚ_[p]
⊢ ‖x‖ ≤ 1 ↔ 0 ≤ x.valuation
state_after: case pos
p : ℕ
hp : Fact (Nat.Prime p)
x : ℚ_[p]
hx : x = 0
⊢ ‖x‖ ≤ 1 ↔ 0 ≤ x.valuation

case neg
p : ℕ
hp : Fact (Nat.Prime p)
x : ℚ_[p]
hx : ¬x = 0
⊢ ‖x‖ ≤ 1 ↔ 0 ≤ x.valuation

tactic: simp only [hx, norm_zero, valuation_zero, zero_le_one, le_refl]
state_before: case pos
p : ℕ
hp : Fact (Nat.Prime p)
x : ℚ_[p]
hx : x = 0
⊢ ‖x‖ ≤ 1 ↔ 0 ≤ x.valuation
state_after: no goals

tactic: rw [norm_eq_pow_val hx, ← zpow_zero (p : ℝ), zpow_le_iff_le, Right.neg_nonpos_iff]
state_before: case neg
p : ℕ
hp : Fact (Nat.Prime p)
x : ℚ_[p]
hx : ¬x = 0
⊢ ‖x‖ ≤ 1 ↔ 0 ≤ x.valuation
state_after: case neg
p : ℕ
hp : Fact (Nat.Prime p)
x : ℚ_[p]
hx : ¬x = 0
⊢ 1 < ↑p

tactic: exact Nat.one_lt_cast.2 (Nat.Prime.one_lt' p).1
state_before: case neg
p : ℕ
hp : Fact (Nat.Prime p)
x : ℚ_[p]
hx : ¬x = 0
⊢ 1 < ↑p
state_after: no goals
Theorem: NormedField.nhdsWithin_isUnit_neBot
File: Mathlib/Analysis/Normed/Field/Basic.lean

tactic: simpa only [isUnit_iff_ne_zero] using punctured_nhds_neBot (0 : α)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝ : NontriviallyNormedField α
⊢ (𝓝[{x | IsUnit x}] 0).NeBot
state_after: no goals
Theorem: nat_sub_dvd_pow_sub_pow
File: Mathlib/Algebra/GeomSum.lean

tactic: rcases le_or_lt y x with h | h
state_before: α : Type u
x y n : ℕ
⊢ x - y ∣ x ^ n - y ^ n
state_after: case inl
α : Type u
x y n : ℕ
h : y ≤ x
⊢ x - y ∣ x ^ n - y ^ n

case inr
α : Type u
x y n : ℕ
h : x < y
⊢ x - y ∣ x ^ n - y ^ n

tactic: have : y ^ n ≤ x ^ n := Nat.pow_le_pow_left h _
state_before: case inl
α : Type u
x y n : ℕ
h : y ≤ x
⊢ x - y ∣ x ^ n - y ^ n
state_after: case inl
α : Type u
x y n : ℕ
h : y ≤ x
this : y ^ n ≤ x ^ n
⊢ x - y ∣ x ^ n - y ^ n

tactic: exact mod_cast sub_dvd_pow_sub_pow (x : ℤ) (↑y) n
state_before: case inl
α : Type u
x y n : ℕ
h : y ≤ x
this : y ^ n ≤ x ^ n
⊢ x - y ∣ x ^ n - y ^ n
state_after: no goals

tactic: have : x ^ n ≤ y ^ n := Nat.pow_le_pow_left h.le _
state_before: case inr
α : Type u
x y n : ℕ
h : x < y
⊢ x - y ∣ x ^ n - y ^ n
state_after: case inr
α : Type u
x y n : ℕ
h : x < y
this : x ^ n ≤ y ^ n
⊢ x - y ∣ x ^ n - y ^ n

tactic: exact (Nat.sub_eq_zero_of_le this).symm ▸ dvd_zero (x - y)
state_before: case inr
α : Type u
x y n : ℕ
h : x < y
this : x ^ n ≤ y ^ n
⊢ x - y ∣ x ^ n - y ^ n
state_after: no goals
Theorem: FiniteDimensional.finrank_lt_of_rank_lt
File: Mathlib/LinearAlgebra/Dimension/Finrank.lean

tactic: rwa [← Cardinal.toNat_lt_iff_lt_of_lt_aleph0, toNat_natCast] at h
state_before: R : Type u
M : Type v
N : Type w
inst✝⁴ : Ring R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
n : ℕ
h : Module.rank R M < ↑n
⊢ finrank R M < n
state_after: case hc
R : Type u
M : Type v
N : Type w
inst✝⁴ : Ring R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
n : ℕ
h : Module.rank R M < ↑n
⊢ Module.rank R M < ℵ₀

case hd
R : Type u
M : Type v
N : Type w
inst✝⁴ : Ring R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
n : ℕ
h : Module.rank R M < ↑n
⊢ ↑n < ℵ₀

tactic: exact h.trans (nat_lt_aleph0 n)
state_before: case hc
R : Type u
M : Type v
N : Type w
inst✝⁴ : Ring R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
n : ℕ
h : Module.rank R M < ↑n
⊢ Module.rank R M < ℵ₀
state_after: no goals

tactic: exact nat_lt_aleph0 n
state_before: case hd
R : Type u
M : Type v
N : Type w
inst✝⁴ : Ring R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
n : ℕ
h : Module.rank R M < ↑n
⊢ ↑n < ℵ₀
state_after: no goals
Theorem: QuotientGroup.comap_comap_center
File: Mathlib/GroupTheory/QuotientGroup.lean

tactic: ext x
state_before: G : Type u
inst✝⁴ : Group G
N : Subgroup G
nN : N.Normal
H : Type v
inst✝³ : Group H
M : Type x
inst✝² : Monoid M
φ : G →* H
H₁ : Subgroup G
inst✝¹ : H₁.Normal
H₂ : Subgroup (G ⧸ H₁)
inst✝ : H₂.Normal
⊢ Subgroup.comap (mk' H₁) (Subgroup.comap (mk' H₂) (Subgroup.center ((G ⧸ H₁) ⧸ H₂))) =
    Subgroup.comap (mk' (Subgroup.comap (mk' H₁) H₂)) (Subgroup.center (G ⧸ Subgroup.comap (mk' H₁) H₂))
state_after: case h
G : Type u
inst✝⁴ : Group G
N : Subgroup G
nN : N.Normal
H : Type v
inst✝³ : Group H
M : Type x
inst✝² : Monoid M
φ : G →* H
H₁ : Subgroup G
inst✝¹ : H₁.Normal
H₂ : Subgroup (G ⧸ H₁)
inst✝ : H₂.Normal
x : G
⊢ x ∈ Subgroup.comap (mk' H₁) (Subgroup.comap (mk' H₂) (Subgroup.center ((G ⧸ H₁) ⧸ H₂))) ↔
    x ∈ Subgroup.comap (mk' (Subgroup.comap (mk' H₁) H₂)) (Subgroup.center (G ⧸ Subgroup.comap (mk' H₁) H₂))

tactic: simp only [mk'_apply, Subgroup.mem_comap, Subgroup.mem_center_iff, forall_mk, ← mk_mul,
  eq_iff_div_mem, mk_div]
state_before: case h
G : Type u
inst✝⁴ : Group G
N : Subgroup G
nN : N.Normal
H : Type v
inst✝³ : Group H
M : Type x
inst✝² : Monoid M
φ : G →* H
H₁ : Subgroup G
inst✝¹ : H₁.Normal
H₂ : Subgroup (G ⧸ H₁)
inst✝ : H₂.Normal
x : G
⊢ x ∈ Subgroup.comap (mk' H₁) (Subgroup.comap (mk' H₂) (Subgroup.center ((G ⧸ H₁) ⧸ H₂))) ↔
    x ∈ Subgroup.comap (mk' (Subgroup.comap (mk' H₁) H₂)) (Subgroup.center (G ⧸ Subgroup.comap (mk' H₁) H₂))
state_after: no goals
Theorem: ProbabilityMeasure.toFiniteMeasure_normalize_eq_self
File: Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean

tactic: apply ProbabilityMeasure.eq_of_forall_apply_eq
state_before: Ω : Type u_1
inst✝ : Nonempty Ω
m0✝ : MeasurableSpace Ω
μ✝ : FiniteMeasure Ω
m0 : MeasurableSpace Ω
μ : ProbabilityMeasure Ω
⊢ μ.toFiniteMeasure.normalize = μ
state_after: case h
Ω : Type u_1
inst✝ : Nonempty Ω
m0✝ : MeasurableSpace Ω
μ✝ : FiniteMeasure Ω
m0 : MeasurableSpace Ω
μ : ProbabilityMeasure Ω
⊢ ∀ (s : Set Ω), MeasurableSet s → μ.toFiniteMeasure.normalize s = μ s

tactic: intro s _s_mble
state_before: case h
Ω : Type u_1
inst✝ : Nonempty Ω
m0✝ : MeasurableSpace Ω
μ✝ : FiniteMeasure Ω
m0 : MeasurableSpace Ω
μ : ProbabilityMeasure Ω
⊢ ∀ (s : Set Ω), MeasurableSet s → μ.toFiniteMeasure.normalize s = μ s
state_after: case h
Ω : Type u_1
inst✝ : Nonempty Ω
m0✝ : MeasurableSpace Ω
μ✝ : FiniteMeasure Ω
m0 : MeasurableSpace Ω
μ : ProbabilityMeasure Ω
s : Set Ω
_s_mble : MeasurableSet s
⊢ μ.toFiniteMeasure.normalize s = μ s

tactic: rw [μ.toFiniteMeasure.normalize_eq_of_nonzero μ.toFiniteMeasure_nonzero s]
state_before: case h
Ω : Type u_1
inst✝ : Nonempty Ω
m0✝ : MeasurableSpace Ω
μ✝ : FiniteMeasure Ω
m0 : MeasurableSpace Ω
μ : ProbabilityMeasure Ω
s : Set Ω
_s_mble : MeasurableSet s
⊢ μ.toFiniteMeasure.normalize s = μ s
state_after: case h
Ω : Type u_1
inst✝ : Nonempty Ω
m0✝ : MeasurableSpace Ω
μ✝ : FiniteMeasure Ω
m0 : MeasurableSpace Ω
μ : ProbabilityMeasure Ω
s : Set Ω
_s_mble : MeasurableSet s
⊢ μ.toFiniteMeasure.mass⁻¹ * μ.toFiniteMeasure s = μ s

tactic: simp only [ProbabilityMeasure.mass_toFiniteMeasure, inv_one, one_mul, μ.coeFn_toFiniteMeasure]
state_before: case h
Ω : Type u_1
inst✝ : Nonempty Ω
m0✝ : MeasurableSpace Ω
μ✝ : FiniteMeasure Ω
m0 : MeasurableSpace Ω
μ : ProbabilityMeasure Ω
s : Set Ω
_s_mble : MeasurableSet s
⊢ μ.toFiniteMeasure.mass⁻¹ * μ.toFiniteMeasure s = μ s
state_after: no goals
Theorem: Filter.mem_kernMap_iff_compl
File: Mathlib/Order/Filter/Basic.lean

tactic: rw [mem_kernMap, compl_surjective.exists]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
m : α → β
f : Filter α
s : Set β
⊢ s ∈ kernMap m f ↔ ∃ t, tᶜ ∈ f ∧ m '' t = sᶜ
state_after: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
m : α → β
f : Filter α
s : Set β
⊢ (∃ x, xᶜ ∈ f ∧ kernImage m xᶜ = s) ↔ ∃ t, tᶜ ∈ f ∧ m '' t = sᶜ

tactic: refine exists_congr (fun x ↦ and_congr_right fun _ ↦ ?_)
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
m : α → β
f : Filter α
s : Set β
⊢ (∃ x, xᶜ ∈ f ∧ kernImage m xᶜ = s) ↔ ∃ t, tᶜ ∈ f ∧ m '' t = sᶜ
state_after: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
m : α → β
f : Filter α
s : Set β
x : Set α
x✝ : xᶜ ∈ f
⊢ kernImage m xᶜ = s ↔ m '' x = sᶜ

tactic: rw [kernImage_compl, compl_eq_comm, eq_comm]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
m : α → β
f : Filter α
s : Set β
x : Set α
x✝ : xᶜ ∈ f
⊢ kernImage m xᶜ = s ↔ m '' x = sᶜ
state_after: no goals
Theorem: SimpleGraph.end_componentCompl_infinite
File: Mathlib/Combinatorics/SimpleGraph/Ends/Properties.lean

tactic: refine (e.val K).infinite_iff_in_all_ranges.mpr (fun L h => ?_)
state_before: V : Type
G : SimpleGraph V
e : ↑G.end
K : (Finset V)ᵒᵖ
⊢ (ComponentCompl.supp (↑e K)).Infinite
state_after: V : Type
G : SimpleGraph V
e : ↑G.end
K : (Finset V)ᵒᵖ
L : Finset V
h : K.unop ⊆ L
⊢ ∃ D, ComponentCompl.hom h D = ↑e K

tactic: change Opposite.unop K ⊆ Opposite.unop (Opposite.op L) at h
state_before: V : Type
G : SimpleGraph V
e : ↑G.end
K : (Finset V)ᵒᵖ
L : Finset V
h : K.unop ⊆ L
⊢ ∃ D, ComponentCompl.hom h D = ↑e K
state_after: V : Type
G : SimpleGraph V
e : ↑G.end
K : (Finset V)ᵒᵖ
L : Finset V
h : K.unop ⊆ { unop := L }.unop
⊢ ∃ D, ComponentCompl.hom h D = ↑e K

tactic: exact ⟨e.val (Opposite.op L), (e.prop (CategoryTheory.opHomOfLE h))⟩
state_before: V : Type
G : SimpleGraph V
e : ↑G.end
K : (Finset V)ᵒᵖ
L : Finset V
h : K.unop ⊆ { unop := L }.unop
⊢ ∃ D, ComponentCompl.hom h D = ↑e K
state_after: no goals
Theorem: Matroid.ofMatroid_lt_iff
File: Mathlib/Data/Matroid/Restrict.lean

tactic: simp
state_before: α : Type u_1
M✝ : Matroid α
R I J X Y : Set α
N M M' : Matroid α
⊢ { toMatroid := M } < { toMatroid := M' } ↔ M <r M'
state_after: no goals
Theorem: CochainComplex.HomComplex.Cochain.map_sub
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean

tactic: aesop_cat
state_before: C : Type u
inst✝⁶ : Category.{v, u} C
inst✝⁵ : Preadditive C
R : Type u_1
inst✝⁴ : Ring R
inst✝³ : Linear R C
F G K L : CochainComplex C ℤ
n m : ℤ
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : Preadditive D
z z' : Cochain K L n
f : K ⟶ L
Φ : C ⥤ D
inst✝ : Φ.Additive
⊢ (z - z').map Φ = z.map Φ - z'.map Φ
state_after: no goals
Theorem: Filter.lift_principal2
File: Mathlib/Order/Filter/Lift.lean

tactic: simp only [hs, le_principal_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Set α → Filter β
f : Filter α
s : Set α
hs : s ∈ f
⊢ f ≤ 𝓟 s
state_after: no goals
Theorem: MeasureTheory.countable_meas_le_ne_meas_lt
File: Mathlib/MeasureTheory/Integral/Layercake.lean

tactic: let F : R → ℝ≥0∞ := fun t ↦ μ {a : α | t ≤ g a}
state_before: α : Type u_1
R : Type u_2
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : LinearOrder R
g : α → R
⊢ {t | μ {a | t ≤ g a} ≠ μ {a | t < g a}}.Countable
state_after: α : Type u_1
R : Type u_2
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : LinearOrder R
g : α → R
F : R → ℝ≥0∞ := fun t => μ {a | t ≤ g a}
⊢ {t | μ {a | t ≤ g a} ≠ μ {a | t < g a}}.Countable

tactic: apply (countable_image_gt_image_Ioi F).mono
state_before: α : Type u_1
R : Type u_2
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : LinearOrder R
g : α → R
F : R → ℝ≥0∞ := fun t => μ {a | t ≤ g a}
⊢ {t | μ {a | t ≤ g a} ≠ μ {a | t < g a}}.Countable
state_after: α : Type u_1
R : Type u_2
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : LinearOrder R
g : α → R
F : R → ℝ≥0∞ := fun t => μ {a | t ≤ g a}
⊢ {t | μ {a | t ≤ g a} ≠ μ {a | t < g a}} ⊆ {x | ∃ z < F x, ∀ (y : R), x < y → F y ≤ z}

tactic: intro t ht
state_before: α : Type u_1
R : Type u_2
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : LinearOrder R
g : α → R
F : R → ℝ≥0∞ := fun t => μ {a | t ≤ g a}
⊢ {t | μ {a | t ≤ g a} ≠ μ {a | t < g a}} ⊆ {x | ∃ z < F x, ∀ (y : R), x < y → F y ≤ z}
state_after: α : Type u_1
R : Type u_2
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : LinearOrder R
g : α → R
F : R → ℝ≥0∞ := fun t => μ {a | t ≤ g a}
t : R
ht : t ∈ {t | μ {a | t ≤ g a} ≠ μ {a | t < g a}}
⊢ t ∈ {x | ∃ z < F x, ∀ (y : R), x < y → F y ≤ z}

tactic: have : μ {a | t < g a} < μ {a | t ≤ g a} :=
  lt_of_le_of_ne (measure_mono (fun a ha ↦ le_of_lt ha)) (Ne.symm ht)
state_before: α : Type u_1
R : Type u_2
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : LinearOrder R
g : α → R
F : R → ℝ≥0∞ := fun t => μ {a | t ≤ g a}
t : R
ht : t ∈ {t | μ {a | t ≤ g a} ≠ μ {a | t < g a}}
⊢ t ∈ {x | ∃ z < F x, ∀ (y : R), x < y → F y ≤ z}
state_after: α : Type u_1
R : Type u_2
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : LinearOrder R
g : α → R
F : R → ℝ≥0∞ := fun t => μ {a | t ≤ g a}
t : R
ht : t ∈ {t | μ {a | t ≤ g a} ≠ μ {a | t < g a}}
this : μ {a | t < g a} < μ {a | t ≤ g a}
⊢ t ∈ {x | ∃ z < F x, ∀ (y : R), x < y → F y ≤ z}

tactic: exact ⟨μ {a | t < g a}, this, fun s hs ↦ measure_mono (fun a ha ↦ hs.trans_le ha)⟩
state_before: α : Type u_1
R : Type u_2
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : LinearOrder R
g : α → R
F : R → ℝ≥0∞ := fun t => μ {a | t ≤ g a}
t : R
ht : t ∈ {t | μ {a | t ≤ g a} ≠ μ {a | t < g a}}
this : μ {a | t < g a} < μ {a | t ≤ g a}
⊢ t ∈ {x | ∃ z < F x, ∀ (y : R), x < y → F y ≤ z}
state_after: no goals
Theorem: HomologicalComplex.p_descOpcycles
File: Mathlib/Algebra/Homology/ShortComplex/HomologicalComplex.lean

tactic: dsimp [descOpcycles, pOpcycles]
state_before: C : Type u_1
inst✝² : Category.{u_3, u_1} C
inst✝¹ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ : K ⟶ L
ψ : L ⟶ M
i j✝ k✝ : ι
inst✝ : K.HasHomology i
A : C
k : K.X i ⟶ A
j : ι
hj : c.prev i = j
hk : K.d j i ≫ k = 0
⊢ K.pOpcycles i ≫ K.descOpcycles k j hj hk = k
state_after: C : Type u_1
inst✝² : Category.{u_3, u_1} C
inst✝¹ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ : K ⟶ L
ψ : L ⟶ M
i j✝ k✝ : ι
inst✝ : K.HasHomology i
A : C
k : K.X i ⟶ A
j : ι
hj : c.prev i = j
hk : K.d j i ≫ k = 0
⊢ (K.sc i).pOpcycles ≫ (K.sc i).descOpcycles k ⋯ = k

tactic: simp
state_before: C : Type u_1
inst✝² : Category.{u_3, u_1} C
inst✝¹ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ : K ⟶ L
ψ : L ⟶ M
i j✝ k✝ : ι
inst✝ : K.HasHomology i
A : C
k : K.X i ⟶ A
j : ι
hj : c.prev i = j
hk : K.d j i ≫ k = 0
⊢ (K.sc i).pOpcycles ≫ (K.sc i).descOpcycles k ⋯ = k
state_after: no goals
Theorem: symmDiff_sdiff_left
File: Mathlib/Order/SymmDiff.lean

tactic: rw [symmDiff_def, sup_sdiff, sdiff_idem, sdiff_sdiff_self, bot_sup_eq]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedBooleanAlgebra α
a b c d : α
⊢ a ∆ b \ a = b \ a
state_after: no goals
Theorem: Ordinal.mod_eq_of_lt
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simp only [mod_def, div_eq_zero_of_lt h, mul_zero, sub_zero]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
h : a < b
⊢ a % b = a
state_after: no goals
Theorem: Ideal.span_mul_span'
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: unfold span
state_before: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
S T : Set R
⊢ span S * span T = span (S * T)
state_after: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
S T : Set R
⊢ Submodule.span R S * Submodule.span R T = Submodule.span R (S * T)

tactic: rw [Submodule.span_mul_span]
state_before: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
S T : Set R
⊢ Submodule.span R S * Submodule.span R T = Submodule.span R (S * T)
state_after: no goals
Theorem: tsub_add_tsub_cancel
File: Mathlib/Algebra/Order/Sub/Canonical.lean

tactic: convert tsub_add_cancel_of_le (tsub_le_tsub_right hab c) using 2
state_before: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hab : b ≤ a
hcb : c ≤ b
⊢ a - b + (b - c) = a - c
state_after: case h.e'_2.h.e'_5
α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hab : b ≤ a
hcb : c ≤ b
⊢ a - b = a - c - (b - c)

tactic: rw [tsub_tsub, add_tsub_cancel_of_le hcb]
state_before: case h.e'_2.h.e'_5
α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hab : b ≤ a
hcb : c ≤ b
⊢ a - b = a - c - (b - c)
state_after: no goals
Theorem: Subgroup.normalizer_eq_top
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

tactic: rwa [h.mem_comm_iff, inv_mul_cancel_left] at hb
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 : H.Normal
a : G
_ha : a ∈ ⊤
b : G
hb : a * b * a⁻¹ ∈ H
⊢ b ∈ H
state_after: no goals
Theorem: Polynomial.iterate_derivative_X_add_pow
File: Mathlib/Algebra/Polynomial/Derivative.lean

tactic: induction k with
| zero => simp
| succ k IH =>
    rw [Nat.sub_succ', Function.iterate_succ_apply', IH, derivative_smul,
      derivative_X_add_C_pow, map_natCast, Nat.descFactorial_succ, nsmul_eq_mul, nsmul_eq_mul,
      Nat.cast_mul]
    ring
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : CommSemiring R
n k : ℕ
c : R
⊢ (⇑derivative)^[k] ((X + C c) ^ n) = n.descFactorial k • (X + C c) ^ (n - k)
state_after: no goals

tactic: simp
state_before: case zero
R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : CommSemiring R
n : ℕ
c : R
⊢ (⇑derivative)^[0] ((X + C c) ^ n) = n.descFactorial 0 • (X + C c) ^ (n - 0)
state_after: no goals

tactic: rw [Nat.sub_succ', Function.iterate_succ_apply', IH, derivative_smul,
  derivative_X_add_C_pow, map_natCast, Nat.descFactorial_succ, nsmul_eq_mul, nsmul_eq_mul,
  Nat.cast_mul]
state_before: case succ
R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : CommSemiring R
n : ℕ
c : R
k : ℕ
IH : (⇑derivative)^[k] ((X + C c) ^ n) = n.descFactorial k • (X + C c) ^ (n - k)
⊢ (⇑derivative)^[k + 1] ((X + C c) ^ n) = n.descFactorial (k + 1) • (X + C c) ^ (n - (k + 1))
state_after: case succ
R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : CommSemiring R
n : ℕ
c : R
k : ℕ
IH : (⇑derivative)^[k] ((X + C c) ^ n) = n.descFactorial k • (X + C c) ^ (n - k)
⊢ ↑(n.descFactorial k) * (↑(n - k) * (X + C c) ^ (n - k - 1)) =
    ↑(n - k) * ↑(n.descFactorial k) * (X + C c) ^ (n - k - 1)

tactic: ring
state_before: case succ
R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : CommSemiring R
n : ℕ
c : R
k : ℕ
IH : (⇑derivative)^[k] ((X + C c) ^ n) = n.descFactorial k • (X + C c) ^ (n - k)
⊢ ↑(n.descFactorial k) * (↑(n - k) * (X + C c) ^ (n - k - 1)) =
    ↑(n - k) * ↑(n.descFactorial k) * (X + C c) ^ (n - k - 1)
state_after: no goals
Theorem: List.chain'_map
File: Mathlib/Data/List/Chain.lean

tactic: cases l <;> [rfl; exact chain_map _]
state_before: α : Type u
β : Type v
R r : α → α → Prop
l✝ l₁ l₂ : List α
a b : α
f : β → α
l : List β
⊢ Chain' R (map f l) ↔ Chain' (fun a b => R (f a) (f b)) l
state_after: no goals
Theorem: tsub_add_eq_tsub_tsub_swap
File: Mathlib/Algebra/Order/Sub/Defs.lean

tactic: rw [add_comm]
state_before: α : Type u_1
β : Type u_2
inst✝³ : PartialOrder α
inst✝² : AddCommSemigroup α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a✝ b✝ c✝ d a b c : α
⊢ a - (b + c) = a - c - b
state_after: α : Type u_1
β : Type u_2
inst✝³ : PartialOrder α
inst✝² : AddCommSemigroup α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a✝ b✝ c✝ d a b c : α
⊢ a - (c + b) = a - c - b

tactic: apply tsub_add_eq_tsub_tsub
state_before: α : Type u_1
β : Type u_2
inst✝³ : PartialOrder α
inst✝² : AddCommSemigroup α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a✝ b✝ c✝ d a b c : α
⊢ a - (c + b) = a - c - b
state_after: no goals
Theorem: Polynomial.IsUnitTrinomial.not_isUnit
File: Mathlib/Algebra/Polynomial/UnitTrinomial.lean

tactic: obtain ⟨k, m, n, hkm, hmn, u, v, w, rfl⟩ := hp
state_before: p q : ℤ[X]
hp : p.IsUnitTrinomial
⊢ ¬IsUnit p
state_after: case intro.intro.intro.intro.intro.intro.intro.intro
q : ℤ[X]
k m n : ℕ
hkm : k < m
hmn : m < n
u v w : ℤˣ
⊢ ¬IsUnit (trinomial k m n ↑u ↑v ↑w)

tactic: exact fun h =>
  ne_zero_of_lt hmn
    ((trinomial_natDegree hkm hmn w.ne_zero).symm.trans
      (natDegree_eq_of_degree_eq_some (degree_eq_zero_of_isUnit h)))
state_before: case intro.intro.intro.intro.intro.intro.intro.intro
q : ℤ[X]
k m n : ℕ
hkm : k < m
hmn : m < n
u v w : ℤˣ
⊢ ¬IsUnit (trinomial k m n ↑u ↑v ↑w)
state_after: no goals
Theorem: Function.Injective.rightDistribClass
File: Mathlib/Algebra/Ring/InjSurj.lean

tactic: simp only [*, right_distrib]
state_before: α : Type u_1
β : Type u_2
inst✝¹³ : Zero β
inst✝¹² : One β
inst✝¹¹ : Add β
inst✝¹⁰ : Mul β
inst✝⁹ : Neg β
inst✝⁸ : Sub β
inst✝⁷ : SMul ℕ β
inst✝⁶ : SMul ℤ β
inst✝⁵ : Pow β ℕ
inst✝⁴ : NatCast β
inst✝³ : IntCast β
f : β → α
hf : Injective f
inst✝² : Mul α
inst✝¹ : Add α
inst✝ : RightDistribClass α
add : ∀ (x y : β), f (x + y) = f x + f y
mul : ∀ (x y : β), f (x * y) = f x * f y
x y z : β
⊢ f ((x + y) * z) = f (x * z + y * z)
state_after: no goals
Theorem: Nat.cast_npow
File: Mathlib/Algebra/Group/NatPowAssoc.lean

tactic: induction' m with m ih
state_before: M : Type u_1
inst✝³ : Monoid M
R : Type u_2
inst✝² : NonAssocSemiring R
inst✝¹ : Pow R ℕ
inst✝ : NatPowAssoc R
n m : ℕ
⊢ ↑(n ^ m) = ↑n ^ m
state_after: case zero
M : Type u_1
inst✝³ : Monoid M
R : Type u_2
inst✝² : NonAssocSemiring R
inst✝¹ : Pow R ℕ
inst✝ : NatPowAssoc R
n : ℕ
⊢ ↑(n ^ 0) = ↑n ^ 0

case succ
M : Type u_1
inst✝³ : Monoid M
R : Type u_2
inst✝² : NonAssocSemiring R
inst✝¹ : Pow R ℕ
inst✝ : NatPowAssoc R
n m : ℕ
ih : ↑(n ^ m) = ↑n ^ m
⊢ ↑(n ^ (m + 1)) = ↑n ^ (m + 1)

tactic: simp only [pow_zero, Nat.cast_one, npow_zero]
state_before: case zero
M : Type u_1
inst✝³ : Monoid M
R : Type u_2
inst✝² : NonAssocSemiring R
inst✝¹ : Pow R ℕ
inst✝ : NatPowAssoc R
n : ℕ
⊢ ↑(n ^ 0) = ↑n ^ 0
state_after: no goals

tactic: rw [npow_add, npow_add, Nat.cast_mul, ih, npow_one, npow_one]
state_before: case succ
M : Type u_1
inst✝³ : Monoid M
R : Type u_2
inst✝² : NonAssocSemiring R
inst✝¹ : Pow R ℕ
inst✝ : NatPowAssoc R
n m : ℕ
ih : ↑(n ^ m) = ↑n ^ m
⊢ ↑(n ^ (m + 1)) = ↑n ^ (m + 1)
state_after: no goals