ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: TopCat.GlueData.preimage_image_eq_image
File: Mathlib/Topology/Gluing.lean

Proof steps:
state_before: D : GlueData
i j : D.J
U : Set ↑(D.U i)
⊢ ⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U) = ⇑(D.f j i) '' (⇑(D.t j i ≫ D.f i j) ⁻¹' U)
state_after: D : GlueData
i j : D.J
U : Set ↑(D.U i)
this : ⇑(D.f j i) ⁻¹' (⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U)) = ⇑(D.t j i ≫ D.f i j) ⁻¹' U
⊢ ⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U) = ⇑(D.f j i) '' (⇑(D.t j i ≫ D.f i j) ⁻¹' U)
tactic: have : D.f _ _ ⁻¹' (𝖣.ι j ⁻¹' (𝖣.ι i '' U)) = (D.t j i ≫ D.f _ _) ⁻¹' U := by
    ext x
    conv_rhs => rw [← Set.preimage_image_eq U (D.ι_injective _)]
    generalize 𝖣.ι i '' U = U' -- next 4 lines were `simp` before #13170
    simp only [GlueData.diagram_l, GlueData.diagram_r, Set.mem_preimage, coe_comp,
      Function.comp_apply]
    erw [D.glue_condition_apply]
    rfl
state_before: D : GlueData
i j : D.J
U : Set ↑(D.U i)
this : ⇑(D.f j i) ⁻¹' (⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U)) = ⇑(D.t j i ≫ D.f i j) ⁻¹' U
⊢ ⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U) = ⇑(D.f j i) '' (⇑(D.t j i ≫ D.f i j) ⁻¹' U)
state_after: D : GlueData
i j : D.J
U : Set ↑(D.U i)
this : ⇑(D.f j i) ⁻¹' (⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U)) = ⇑(D.t j i ≫ D.f i j) ⁻¹' U
⊢ ⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U) = ⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U) ∩ Set.range ⇑(D.f j i)
tactic: rw [← this, Set.image_preimage_eq_inter_range]
state_before: D : GlueData
i j : D.J
U : Set ↑(D.U i)
this : ⇑(D.f j i) ⁻¹' (⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U)) = ⇑(D.t j i ≫ D.f i j) ⁻¹' U
⊢ ⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U) = ⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U) ∩ Set.range ⇑(D.f j i)
state_after: D : GlueData
i j : D.J
U : Set ↑(D.U i)
this : ⇑(D.f j i) ⁻¹' (⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U)) = ⇑(D.t j i ≫ D.f i j) ⁻¹' U
⊢ ⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U) ∩ Set.range ⇑(D.f j i) = ⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U)
tactic: symm
state_before: D : GlueData
i j : D.J
U : Set ↑(D.U i)
this : ⇑(D.f j i) ⁻¹' (⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U)) = ⇑(D.t j i ≫ D.f i j) ⁻¹' U
⊢ ⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U) ∩ Set.range ⇑(D.f j i) = ⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U)
state_after: case a
D : GlueData
i j : D.J
U : Set ↑(D.U i)
this : ⇑(D.f j i) ⁻¹' (⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U)) = ⇑(D.t j i ≫ D.f i j) ⁻¹' U
⊢ ⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U) ⊆ Set.range ⇑(D.f j i)
tactic: apply Set.inter_eq_self_of_subset_left
state_before: case a
D : GlueData
i j : D.J
U : Set ↑(D.U i)
this : ⇑(D.f j i) ⁻¹' (⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U)) = ⇑(D.t j i ≫ D.f i j) ⁻¹' U
⊢ ⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U) ⊆ Set.range ⇑(D.f j i)
state_after: case a
D : GlueData
i j : D.J
U : Set ↑(D.U i)
this : ⇑(D.f j i) ⁻¹' (⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U)) = ⇑(D.t j i ≫ D.f i j) ⁻¹' U
⊢ ⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U) ⊆ ⇑(D.ι j) ⁻¹' Set.range ⇑(D.ι i)
tactic: rw [← D.preimage_range i j]
state_before: case a
D : GlueData
i j : D.J
U : Set ↑(D.U i)
this : ⇑(D.f j i) ⁻¹' (⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U)) = ⇑(D.t j i ≫ D.f i j) ⁻¹' U
⊢ ⇑(D.ι j) ⁻¹' (⇑(D.ι i) '' U) ⊆ ⇑(D.ι j) ⁻¹' Set.range ⇑(D.ι i)
state_after: no goals
tactic: exact Set.preimage_mono (Set.image_subset_range _ _)
Theorem: Filter.comap_inf_principal_range
File: Mathlib/Order/Filter/Basic.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l f f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m : α → β
m' : β → γ
s : Set α
t : Set β
⊢ comap m (g ⊓ 𝓟 (range m)) = comap m g
state_after: no goals
tactic: simp
Theorem: Computation.equiv_of_mem
File: Mathlib/Data/Seq/Computation.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
s t : Computation α
a : α
h1 : a ∈ s
h2 : a ∈ t
a' : α
ma : a' ∈ s
⊢ a' ∈ t
state_after: α : Type u
β : Type v
γ : Type w
s t : Computation α
a : α
h1 : a ∈ s
h2 : a ∈ t
a' : α
ma : a' ∈ s
⊢ a ∈ t
tactic: rw [mem_unique ma h1]
state_before: α : Type u
β : Type v
γ : Type w
s t : Computation α
a : α
h1 : a ∈ s
h2 : a ∈ t
a' : α
ma : a' ∈ s
⊢ a ∈ t
state_after: no goals
tactic: exact h2
state_before: α : Type u
β : Type v
γ : Type w
s t : Computation α
a : α
h1 : a ∈ s
h2 : a ∈ t
a' : α
ma : a' ∈ t
⊢ a' ∈ s
state_after: α : Type u
β : Type v
γ : Type w
s t : Computation α
a : α
h1 : a ∈ s
h2 : a ∈ t
a' : α
ma : a' ∈ t
⊢ a ∈ s
tactic: rw [mem_unique ma h2]
state_before: α : Type u
β : Type v
γ : Type w
s t : Computation α
a : α
h1 : a ∈ s
h2 : a ∈ t
a' : α
ma : a' ∈ t
⊢ a ∈ s
state_after: no goals
tactic: exact h1
Theorem: Filter.principal_eq_iff_eq
File: Mathlib/Order/Filter/Basic.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f g : Filter α
s✝ t✝ s t : Set α
⊢ 𝓟 s = 𝓟 t ↔ s = t
state_after: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f g : Filter α
s✝ t✝ s t : Set α
⊢ s ⊆ t ∧ t ⊆ s ↔ s ≤ t ∧ t ≤ s
tactic: simp only [le_antisymm_iff, le_principal_iff, mem_principal]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f g : Filter α
s✝ t✝ s t : Set α
⊢ s ⊆ t ∧ t ⊆ s ↔ s ≤ t ∧ t ≤ s
state_after: no goals
tactic: rfl
Theorem: Fin.insertNth_sub_same
File: Mathlib/Algebra/Group/Fin/Tuple.lean

Proof steps:
state_before: m n : ℕ
α : Fin (n + 1) → Type u_1
inst✝ : (j : Fin (n + 1)) → Group (α j)
i : Fin (n + 1)
x y : α i
p : (j : Fin n) → α (i.succAbove j)
⊢ i.insertNth x p / i.insertNth y p = Pi.mulSingle i (x / y)
state_after: no goals
tactic: simp_rw [← insertNth_div, ← insertNth_one_right, Pi.div_def, div_self', Pi.one_def]
Theorem: MeasureTheory.FiniteMeasure.tendsto_testAgainstNN_filter_of_le_const
File: Mathlib/MeasureTheory/Measure/FiniteMeasure.lean

Proof steps:
state_before: Ω : Type u_1
inst✝³ : MeasurableSpace Ω
inst✝² : TopologicalSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
ι : Type u_2
L : Filter ι
inst✝ : L.IsCountablyGenerated
μ : FiniteMeasure Ω
fs : ι → Ω →ᵇ ℝ≥0
c : ℝ≥0
fs_le_const : ∀ᶠ (i : ι) in L, ∀ᵐ (ω : Ω) ∂↑μ, (fs i) ω ≤ c
f : Ω →ᵇ ℝ≥0
fs_lim : ∀ᵐ (ω : Ω) ∂↑μ, Tendsto (fun i => (fs i) ω) L (𝓝 (f ω))
⊢ Tendsto (fun i => μ.testAgainstNN (fs i)) L (𝓝 (μ.testAgainstNN f))
state_after: Ω : Type u_1
inst✝³ : MeasurableSpace Ω
inst✝² : TopologicalSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
ι : Type u_2
L : Filter ι
inst✝ : L.IsCountablyGenerated
μ : FiniteMeasure Ω
fs : ι → Ω →ᵇ ℝ≥0
c : ℝ≥0
fs_le_const : ∀ᶠ (i : ι) in L, ∀ᵐ (ω : Ω) ∂↑μ, (fs i) ω ≤ c
f : Ω →ᵇ ℝ≥0
fs_lim : ∀ᵐ (ω : Ω) ∂↑μ, Tendsto (fun i => (fs i) ω) L (𝓝 (f ω))
⊢ Tendsto (fun i => ∫⁻ (ω : Ω), ↑((fs i) ω) ∂↑μ) L (𝓝 (∫⁻ (x : Ω), ↑(f x) ∂↑μ))
tactic: apply (ENNReal.tendsto_toNNReal (f.lintegral_lt_top_of_nnreal (μ : Measure Ω)).ne).comp
state_before: Ω : Type u_1
inst✝³ : MeasurableSpace Ω
inst✝² : TopologicalSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
ι : Type u_2
L : Filter ι
inst✝ : L.IsCountablyGenerated
μ : FiniteMeasure Ω
fs : ι → Ω →ᵇ ℝ≥0
c : ℝ≥0
fs_le_const : ∀ᶠ (i : ι) in L, ∀ᵐ (ω : Ω) ∂↑μ, (fs i) ω ≤ c
f : Ω →ᵇ ℝ≥0
fs_lim : ∀ᵐ (ω : Ω) ∂↑μ, Tendsto (fun i => (fs i) ω) L (𝓝 (f ω))
⊢ Tendsto (fun i => ∫⁻ (ω : Ω), ↑((fs i) ω) ∂↑μ) L (𝓝 (∫⁻ (x : Ω), ↑(f x) ∂↑μ))
state_after: no goals
tactic: exact tendsto_lintegral_nn_filter_of_le_const μ fs_le_const fs_lim
Theorem: MeasureTheory.withDensity_mul₀
File: Mathlib/MeasureTheory/Measure/WithDensity.lean

Proof steps:
state_before: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hg : AEMeasurable g μ
⊢ μ.withDensity (f * g) = (μ.withDensity f).withDensity g
state_after: case h
α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hg : AEMeasurable g μ
s : Set α
hs : MeasurableSet s
⊢ (μ.withDensity (f * g)) s = ((μ.withDensity f).withDensity g) s
tactic: ext1 s hs
state_before: case h
α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hg : AEMeasurable g μ
s : Set α
hs : MeasurableSet s
⊢ (μ.withDensity (f * g)) s = ((μ.withDensity f).withDensity g) s
state_after: no goals
tactic: rw [withDensity_apply _ hs, withDensity_apply _ hs, restrict_withDensity hs,
    lintegral_withDensity_eq_lintegral_mul₀ hf.restrict hg.restrict]
Theorem: Polynomial.Chebyshev.T_two
File: Mathlib/RingTheory/Polynomial/Chebyshev.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
⊢ T R 2 = 2 * X ^ 2 - 1
state_after: no goals
tactic: simpa [pow_two, mul_assoc] using T_add_two R 0
Theorem: FreeAlgebra.star_ι
File: Mathlib/Algebra/Star/Free.lean

Proof steps:
state_before: R : Type u_1
inst✝ : CommSemiring R
X : Type u_2
x : X
⊢ star (ι R x) = ι R x
state_after: no goals
tactic: simp [star, Star.star]
Theorem: List.splitOnP_eq_single
File: Mathlib/Data/List/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p : α → Bool
xs ys : List α
ls : List (List α)
f : List α → List α
h : ∀ (x : α), x ∈ xs → ¬p x = true
⊢ splitOnP p xs = [xs]
state_after: no goals
tactic: induction xs with
  | nil => rfl
  | cons hd tl ih =>
    simp only [splitOnP_cons, h hd (mem_cons_self hd tl), if_neg]
    rw [ih <| forall_mem_of_forall_mem_cons h]
    rfl
Theorem: TopologicalSpace.Opens.map_id_eq
File: Mathlib/Topology/Category/TopCat/Opens.lean

Proof steps:
state_before: X Y Z : TopCat
⊢ map (𝟙 X) = 𝟭 (Opens ↑X)
state_after: no goals
tactic: rfl
Theorem: IsRadical.squarefree
File: Mathlib/Algebra/Squarefree/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝ : CancelCommMonoidWithZero R
x y p d : R
h0 : x ≠ 0
h : IsRadical x
⊢ Squarefree x
state_after: case intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
y p d z w : R
h0 : z * z * w ≠ 0
h : IsRadical (z * z * w)
⊢ IsUnit z
tactic: rintro z ⟨w, rfl⟩
state_before: case intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
y p d z w : R
h0 : z * z * w ≠ 0
h : IsRadical (z * z * w)
⊢ IsUnit z
state_after: case intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
y p d z w : R
h0 : z * z * w ≠ 0
h : z * z * w ∣ z * w
⊢ IsUnit z
tactic: specialize h 2 (z * w) ⟨w, by simp_rw [pow_two, mul_left_comm, ← mul_assoc]⟩
state_before: case intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
y p d z w : R
h0 : z * z * w ≠ 0
h : z * z * w ∣ z * w
⊢ IsUnit z
state_after: case intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
y p d z w : R
h0 : z * z * w ≠ 0
h : z * (z * w) ∣ 1 * (z * w)
⊢ z * w ≠ 0
tactic: rwa [← one_mul (z * w), mul_assoc, mul_dvd_mul_iff_right, ← isUnit_iff_dvd_one] at h
state_before: case intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
y p d z w : R
h0 : z * z * w ≠ 0
h : z * (z * w) ∣ 1 * (z * w)
⊢ z * w ≠ 0
state_after: case intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
y p d z w : R
h0 : z ≠ 0 ∧ z * w ≠ 0
h : z * (z * w) ∣ 1 * (z * w)
⊢ z * w ≠ 0
tactic: rw [mul_assoc, mul_ne_zero_iff] at h0
state_before: case intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
y p d z w : R
h0 : z ≠ 0 ∧ z * w ≠ 0
h : z * (z * w) ∣ 1 * (z * w)
⊢ z * w ≠ 0
state_after: no goals
tactic: exact h0.2
Theorem: PosNum.natSize_to_nat
File: Mathlib/Data/Num/Lemmas.lean

Proof steps:
state_before: α : Type u_1
n : PosNum
⊢ n.natSize = (↑n).size
state_after: no goals
tactic: rw [← size_eq_natSize, size_to_nat]
Theorem: CategoryTheory.Paths.lift_spec
File: Mathlib/CategoryTheory/PathCategory.lean

Proof steps:
state_before: V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category.{u_2, u_1} C
φ : V ⥤q C
⊢ of ⋙q (lift φ).toPrefunctor = φ
state_after: case h_obj
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category.{u_2, u_1} C
φ : V ⥤q C
⊢ ∀ (X : V), (of ⋙q (lift φ).toPrefunctor).obj X = φ.obj X

case h_map
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category.{u_2, u_1} C
φ : V ⥤q C
⊢ ∀ (X Y : V) (f : X ⟶ Y), (of ⋙q (lift φ).toPrefunctor).map f = Eq.recOn ⋯ (Eq.recOn ⋯ (φ.map f))
tactic: fapply Prefunctor.ext
Theorem: List.nodup_permutations
File: Mathlib/Data/List/Perm.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a : α
s : List α
hs : s.Nodup
⊢ s.permutations.Nodup
state_after: α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a : α
s : List α
hs : s.Nodup
⊢ s.permutations'.Nodup
tactic: rw [(permutations_perm_permutations' s).nodup_iff]
state_before: α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a : α
s : List α
hs : s.Nodup
⊢ s.permutations'.Nodup
state_after: case nil
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a : α
s : List α
⊢ [].permutations'.Nodup

case cons
α : Type u_1
β : Type u_2
l✝ l₁ l₂ : List α
a : α
s : List α
x : α
l : List α
h : ∀ a' ∈ l, x ≠ a'
h' : Pairwise (fun x x_1 => x ≠ x_1) l
IH : l.permutations'.Nodup
⊢ (x :: l).permutations'.Nodup
tactic: induction' hs with x l h h' IH
Theorem: mem_parallelepiped_iff
File: Mathlib/MeasureTheory/Measure/Haar/OfBasis.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : Fintype ι
inst✝⁴ : Fintype ι'
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
inst✝¹ : AddCommGroup F
inst✝ : Module ℝ F
v : ι → E
x : E
⊢ x ∈ parallelepiped v ↔ ∃ t ∈ Icc 0 1, x = ∑ i : ι, t i • v i
state_after: no goals
tactic: simp [parallelepiped, eq_comm]
Theorem: le_levenshtein_cons
File: Mathlib/Data/List/EditDistance/Bounds.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
C : Levenshtein.Cost α β δ
inst✝ : CanonicallyLinearOrderedAddCommMonoid δ
xs : List α
y : β
ys : List β
⊢ ∃ xs', xs' <:+ xs ∧ levenshtein C xs' ys ≤ levenshtein C xs (y :: ys)
state_after: no goals
tactic: simpa [suffixLevenshtein_eq_tails_map, List.minimum_le_coe_iff] using
    suffixLevenshtein_minimum_le_levenshtein_cons (δ := δ) xs y ys
Theorem: ZMod.map_smul
File: Mathlib/Data/ZMod/Module.lean

Proof steps:
state_before: n : ℕ
M : Type u_1
M₁ : Type u_2
F : Type u_3
S : Type u_4
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup M₁
inst✝⁵ : FunLike F M M₁
inst✝⁴ : AddMonoidHomClass F M M₁
inst✝³ : Module (ZMod n) M
inst✝² : Module (ZMod n) M₁
inst✝¹ : SetLike S M
inst✝ : AddSubgroupClass S M
x✝ : M
K : S
f : F
c : ZMod n
x : M
⊢ f (c • x) = c • f x
state_after: n : ℕ
M : Type u_1
M₁ : Type u_2
F : Type u_3
S : Type u_4
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup M₁
inst✝⁵ : FunLike F M M₁
inst✝⁴ : AddMonoidHomClass F M M₁
inst✝³ : Module (ZMod n) M
inst✝² : Module (ZMod n) M₁
inst✝¹ : SetLike S M
inst✝ : AddSubgroupClass S M
x✝ : M
K : S
f : F
c : ZMod n
x : M
⊢ f (↑c.cast • x) = ↑c.cast • f x
tactic: rw [← ZMod.intCast_zmod_cast c]
state_before: n : ℕ
M : Type u_1
M₁ : Type u_2
F : Type u_3
S : Type u_4
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup M₁
inst✝⁵ : FunLike F M M₁
inst✝⁴ : AddMonoidHomClass F M M₁
inst✝³ : Module (ZMod n) M
inst✝² : Module (ZMod n) M₁
inst✝¹ : SetLike S M
inst✝ : AddSubgroupClass S M
x✝ : M
K : S
f : F
c : ZMod n
x : M
⊢ f (↑c.cast • x) = ↑c.cast • f x
state_after: no goals
tactic: exact map_intCast_smul f _ _ (cast c) x
Theorem: CoxeterSystem.wordProd_braidWord_eq
File: Mathlib/GroupTheory/Coxeter/Basic.lean

Proof steps:
state_before: B : Type u_1
B' : Type u_2
e : B ≃ B'
W : Type u_3
H : Type u_4
inst✝¹ : Group W
inst✝ : Group H
M : CoxeterMatrix B
cs : CoxeterSystem M W
i i' : B
⊢ cs.wordProd (braidWord M i i') = cs.wordProd (braidWord M i' i)
state_after: B : Type u_1
B' : Type u_2
e : B ≃ B'
W : Type u_3
H : Type u_4
inst✝¹ : Group W
inst✝ : Group H
M : CoxeterMatrix B
cs : CoxeterSystem M W
i i' : B
this : cs.wordProd (alternatingWord i i' (M.M i i')) = cs.wordProd (alternatingWord i' i (M.M i i' * 2 - M.M i i'))
⊢ cs.wordProd (braidWord M i i') = cs.wordProd (braidWord M i' i)
tactic: have := cs.prod_alternatingWord_eq_prod_alternatingWord_sub i i' (M i i')
    (Nat.le_mul_of_pos_right _ (by norm_num))
state_before: B : Type u_1
B' : Type u_2
e : B ≃ B'
W : Type u_3
H : Type u_4
inst✝¹ : Group W
inst✝ : Group H
M : CoxeterMatrix B
cs : CoxeterSystem M W
i i' : B
this : cs.wordProd (alternatingWord i i' (M.M i i')) = cs.wordProd (alternatingWord i' i (M.M i i' * 2 - M.M i i'))
⊢ cs.wordProd (braidWord M i i') = cs.wordProd (braidWord M i' i)
state_after: B : Type u_1
B' : Type u_2
e : B ≃ B'
W : Type u_3
H : Type u_4
inst✝¹ : Group W
inst✝ : Group H
M : CoxeterMatrix B
cs : CoxeterSystem M W
i i' : B
this : cs.wordProd (alternatingWord i i' (M.M i i')) = cs.wordProd (alternatingWord i' i (M.M i i'))
⊢ cs.wordProd (braidWord M i i') = cs.wordProd (braidWord M i' i)
tactic: rw [tsub_eq_of_eq_add (mul_two (M i i'))] at this
state_before: B : Type u_1
B' : Type u_2
e : B ≃ B'
W : Type u_3
H : Type u_4
inst✝¹ : Group W
inst✝ : Group H
M : CoxeterMatrix B
cs : CoxeterSystem M W
i i' : B
this : cs.wordProd (alternatingWord i i' (M.M i i')) = cs.wordProd (alternatingWord i' i (M.M i i'))
⊢ cs.wordProd (braidWord M i i') = cs.wordProd (braidWord M i' i)
state_after: B : Type u_1
B' : Type u_2
e : B ≃ B'
W : Type u_3
H : Type u_4
inst✝¹ : Group W
inst✝ : Group H
M : CoxeterMatrix B
cs : CoxeterSystem M W
i i' : B
this : cs.wordProd (alternatingWord i i' (M.M i i')) = cs.wordProd (alternatingWord i' i (M.M i' i))
⊢ cs.wordProd (braidWord M i i') = cs.wordProd (braidWord M i' i)
tactic: nth_rw 2 [M.symmetric i i'] at this
state_before: B : Type u_1
B' : Type u_2
e : B ≃ B'
W : Type u_3
H : Type u_4
inst✝¹ : Group W
inst✝ : Group H
M : CoxeterMatrix B
cs : CoxeterSystem M W
i i' : B
this : cs.wordProd (alternatingWord i i' (M.M i i')) = cs.wordProd (alternatingWord i' i (M.M i' i))
⊢ cs.wordProd (braidWord M i i') = cs.wordProd (braidWord M i' i)
state_after: no goals
tactic: exact this
Theorem: CoalgebraCat.MonoidalCategoryAux.counit_tensorObj
File: Mathlib/Algebra/Category/CoalgebraCat/ComonEquivalence.lean

Proof steps:
state_before: R : Type u
inst✝¹² : CommRing R
M N P Q : Type u
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : AddCommGroup Q
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module R P
inst✝⁴ : Module R Q
inst✝³ : Coalgebra R M
inst✝² : Coalgebra R N
inst✝¹ : Coalgebra R P
inst✝ : Coalgebra R Q
⊢ Coalgebra.counit = Coalgebra.counit
state_after: no goals
tactic: rfl
Theorem: mul_self_sub_one
File: Mathlib/Algebra/Ring/Commute.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : NonAssocRing R
a : R
⊢ a * a - 1 = (a + 1) * (a - 1)
state_after: no goals
tactic: rw [← (Commute.one_right a).mul_self_sub_mul_self_eq, mul_one]
Theorem: Nat.pow_lt_ascFactorial
File: Mathlib/Data/Nat/Factorial/Basic.lean

Proof steps:
state_before: n : ℕ
⊢ 2 ≤ 0 → (n + 1) ^ 0 < (n + 1).ascFactorial 0
state_after: no goals
tactic: rintro ⟨⟩
state_before: n : ℕ
⊢ 2 ≤ 1 → (n + 1) ^ 1 < (n + 1).ascFactorial 1
state_after: n : ℕ
a✝ : 2 ≤ 1
⊢ (n + 1) ^ 1 < (n + 1).ascFactorial 1
tactic: intro
state_before: n : ℕ
a✝ : 2 ≤ 1
⊢ (n + 1) ^ 1 < (n + 1).ascFactorial 1
state_after: no goals
tactic: contradiction
Theorem: Orientation.kahler_eq_zero_iff
File: Mathlib/Analysis/InnerProductSpace/TwoDim.lean

Proof steps:
state_before: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
x y : E
⊢ (o.kahler x) y = 0 ↔ x = 0 ∨ y = 0
state_after: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
x y : E
⊢ x = 0 ∨ y = 0 → (o.kahler x) y = 0
tactic: refine ⟨o.eq_zero_or_eq_zero_of_kahler_eq_zero, ?_⟩
state_before: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
x y : E
⊢ x = 0 ∨ y = 0 → (o.kahler x) y = 0
state_after: no goals
tactic: rintro (rfl | rfl) <;> simp
Theorem: Nat.even_xor_odd
File: Mathlib/Algebra/Ring/Parity.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
m n✝ n : ℕ
⊢ Xor' (Even n) (Odd n)
state_after: no goals
tactic: simp [Xor', odd_iff_not_even, Decidable.em (Even n)]
Theorem: Polynomial.cyclotomic_mul_prime_pow_eq
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Expand.lean

Proof steps:
state_before: R : Type u_1
p m : ℕ
inst✝² : Fact (Nat.Prime p)
inst✝¹ : Ring R
inst✝ : CharP R p
hm : ¬p ∣ m
x✝ : 0 < 1
⊢ cyclotomic (p ^ 1 * m) R = cyclotomic m R ^ (p ^ 1 - p ^ (1 - 1))
state_after: no goals
tactic: rw [pow_one, Nat.sub_self, pow_zero, mul_comm, cyclotomic_mul_prime_eq_pow_of_not_dvd R hm]
state_before: R : Type u_1
p m : ℕ
inst✝² : Fact (Nat.Prime p)
inst✝¹ : Ring R
inst✝ : CharP R p
hm : ¬p ∣ m
a : ℕ
x✝ : 0 < a + 2
⊢ cyclotomic (p ^ (a + 2) * m) R = cyclotomic m R ^ (p ^ (a + 2) - p ^ (a + 2 - 1))
state_after: R : Type u_1
p m : ℕ
inst✝² : Fact (Nat.Prime p)
inst✝¹ : Ring R
inst✝ : CharP R p
hm : ¬p ∣ m
a : ℕ
x✝ : 0 < a + 2
hdiv : p ∣ p ^ a.succ * m
⊢ cyclotomic (p ^ (a + 2) * m) R = cyclotomic m R ^ (p ^ (a + 2) - p ^ (a + 2 - 1))
tactic: have hdiv : p ∣ p ^ a.succ * m := ⟨p ^ a * m, by rw [← mul_assoc, pow_succ']⟩
state_before: R : Type u_1
p m : ℕ
inst✝² : Fact (Nat.Prime p)
inst✝¹ : Ring R
inst✝ : CharP R p
hm : ¬p ∣ m
a : ℕ
x✝ : 0 < a + 2
hdiv : p ∣ p ^ a.succ * m
⊢ cyclotomic (p ^ (a + 2) * m) R = cyclotomic m R ^ (p ^ (a + 2) - p ^ (a + 2 - 1))
state_after: R : Type u_1
p m : ℕ
inst✝² : Fact (Nat.Prime p)
inst✝¹ : Ring R
inst✝ : CharP R p
hm : ¬p ∣ m
a : ℕ
x✝ : 0 < a + 2
hdiv : p ∣ p ^ a.succ * m
⊢ cyclotomic m R ^ ((p ^ a.succ - p ^ (a.succ - 1)) * p) = cyclotomic m R ^ (p * p ^ (a + 1) - p ^ (a + 2 - 1))

R : Type u_1
p m : ℕ
inst✝² : Fact (Nat.Prime p)
inst✝¹ : Ring R
inst✝ : CharP R p
hm : ¬p ∣ m
a : ℕ
x✝ : 0 < a + 2
hdiv : p ∣ p ^ a.succ * m
⊢ ¬p ∣ m
tactic: rw [pow_succ', mul_assoc, mul_comm, cyclotomic_mul_prime_dvd_eq_pow R hdiv,
      cyclotomic_mul_prime_pow_eq _ _ a.succ_pos, ← pow_mul]
Theorem: SimpleGraph.Preconnected.set_univ_walk_nonempty
File: Mathlib/Combinatorics/SimpleGraph/Path.lean

Proof steps:
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
hconn : G.Preconnected
u v : V
⊢ Set.univ.Nonempty
state_after: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
hconn : G.Preconnected
u v : V
⊢ Nonempty (G.Walk u v)
tactic: rw [← Set.nonempty_iff_univ_nonempty]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
hconn : G.Preconnected
u v : V
⊢ Nonempty (G.Walk u v)
state_after: no goals
tactic: exact hconn u v
Theorem: SimpleGraph.IsSRGWith.compl_is_regular
File: Mathlib/Combinatorics/SimpleGraph/StronglyRegular.lean

Proof steps:
state_before: V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
h : G.IsSRGWith n k ℓ μ
⊢ Gᶜ.IsRegularOfDegree (n - k - 1)
state_after: V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
h : G.IsSRGWith n k ℓ μ
⊢ Gᶜ.IsRegularOfDegree (Fintype.card V - 1 - k)
tactic: rw [← h.card, Nat.sub_sub, add_comm, ← Nat.sub_sub]
state_before: V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
h : G.IsSRGWith n k ℓ μ
⊢ Gᶜ.IsRegularOfDegree (Fintype.card V - 1 - k)
state_after: no goals
tactic: exact h.regular.compl
Theorem: MeasureTheory.lmarginal_update_of_not_mem
File: Mathlib/MeasureTheory/Integral/Marginal.lean

Proof steps:
state_before: δ : Type u_1
δ' : Type u_2
π : δ → Type u_3
inst✝² : (x : δ) → MeasurableSpace (π x)
μ : (i : δ) → Measure (π i)
inst✝¹ : ∀ (i : δ), SigmaFinite (μ i)
inst✝ : DecidableEq δ
s t : Finset δ
f✝ g : ((i : δ) → π i) → ℝ≥0∞
x✝ y✝ : (i : δ) → π i
i✝ i : δ
f : ((i : δ) → π i) → ℝ≥0∞
hf : Measurable f
hi : i ∉ s
x : (i : δ) → π i
y : π i
⊢ (∫⋯∫⁻_s, f ∂μ) (update x i y) = (∫⋯∫⁻_s, f ∘ fun x => update x i y ∂μ) x
state_after: no goals
tactic: induction s using Finset.induction generalizing x with
  | empty => simp
  | @insert i' s hi' ih =>
    rw [lmarginal_insert _ hf hi', lmarginal_insert _ (hf.comp measurable_update_left) hi']
    have hii' : i ≠ i' := mt (by rintro rfl; exact mem_insert_self i s) hi
    simp_rw [update_comm hii', ih (mt Finset.mem_insert_of_mem hi)]
Theorem: List.dvd_sum
File: Mathlib/Algebra/BigOperators/Ring/List.lean

Proof steps:
state_before: ι : Type u_1
κ : Type u_2
M : Type u_3
M₀ : Type u_4
R : Type u_5
inst✝ : NonUnitalSemiring R
a : R
l : List R
h : ∀ x ∈ l, a ∣ x
⊢ a ∣ l.sum
state_after: case nil
ι : Type u_1
κ : Type u_2
M : Type u_3
M₀ : Type u_4
R : Type u_5
inst✝ : NonUnitalSemiring R
a : R
h : ∀ x ∈ [], a ∣ x
⊢ a ∣ [].sum

case cons
ι : Type u_1
κ : Type u_2
M : Type u_3
M₀ : Type u_4
R : Type u_5
inst✝ : NonUnitalSemiring R
a x : R
l : List R
ih : (∀ x ∈ l, a ∣ x) → a ∣ l.sum
h : ∀ x_1 ∈ x :: l, a ∣ x_1
⊢ a ∣ (x :: l).sum
tactic: induction' l with x l ih