1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: CategoryTheory.MorphismProperty.RespectsIso.monomorphisms
File: Mathlib/CategoryTheory/MorphismProperty/Basic.lean

tactic: intro X Y Z e f
state_before: case right
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.27545, u_1} D
⊢ ∀ {X Y Z : C} (e : Y ≅ Z) (f : X ⟶ Y),
    MorphismProperty.monomorphisms C f → MorphismProperty.monomorphisms C (f ≫ e.hom)
state_after: case right
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.27545, u_1} D
X Y Z : C
e : Y ≅ Z
f : X ⟶ Y
⊢ MorphismProperty.monomorphisms C f → MorphismProperty.monomorphisms C (f ≫ e.hom)

tactic: simp only [monomorphisms.iff]
state_before: case right
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.27545, u_1} D
X Y Z : C
e : Y ≅ Z
f : X ⟶ Y
⊢ MorphismProperty.monomorphisms C f → MorphismProperty.monomorphisms C (f ≫ e.hom)
state_after: case right
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.27545, u_1} D
X Y Z : C
e : Y ≅ Z
f : X ⟶ Y
⊢ Mono f → Mono (f ≫ e.hom)

tactic: intro
state_before: case right
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.27545, u_1} D
X Y Z : C
e : Y ≅ Z
f : X ⟶ Y
⊢ Mono f → Mono (f ≫ e.hom)
state_after: case right
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.27545, u_1} D
X Y Z : C
e : Y ≅ Z
f : X ⟶ Y
a✝ : Mono f
⊢ Mono (f ≫ e.hom)

tactic: apply mono_comp
state_before: case right
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.27545, u_1} D
X Y Z : C
e : Y ≅ Z
f : X ⟶ Y
a✝ : Mono f
⊢ Mono (f ≫ e.hom)
state_after: no goals
Theorem: toIocDiv_zsmul_sub_self
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: rw [toIocMod, neg_sub]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIocDiv hp a b • p - b = -toIocMod hp a b
state_after: no goals
Theorem: Padic.AddValuation.map_zero
File: Mathlib/NumberTheory/Padics/PadicNumbers.lean

tactic: rw [addValuationDef, if_pos (Eq.refl _)]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
⊢ addValuationDef 0 = ⊤
state_after: no goals
Theorem: IsFiniteMeasure.lintegral_lt_top_of_bounded_to_ennreal
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: cases' f_bdd with c hc
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α✝
μ✝ ν : Measure α✝
α : Type u_5
inst✝ : MeasurableSpace α
μ : Measure α
μ_fin : IsFiniteMeasure μ
f : α → ℝ≥0∞
f_bdd : ∃ c, ∀ (x : α), f x ≤ ↑c
⊢ ∫⁻ (x : α), f x ∂μ < ⊤
state_after: case intro
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α✝
μ✝ ν : Measure α✝
α : Type u_5
inst✝ : MeasurableSpace α
μ : Measure α
μ_fin : IsFiniteMeasure μ
f : α → ℝ≥0∞
c : ℝ≥0
hc : ∀ (x : α), f x ≤ ↑c
⊢ ∫⁻ (x : α), f x ∂μ < ⊤

tactic: apply lt_of_le_of_lt (@lintegral_mono _ _ μ _ _ hc)
state_before: case intro
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α✝
μ✝ ν : Measure α✝
α : Type u_5
inst✝ : MeasurableSpace α
μ : Measure α
μ_fin : IsFiniteMeasure μ
f : α → ℝ≥0∞
c : ℝ≥0
hc : ∀ (x : α), f x ≤ ↑c
⊢ ∫⁻ (x : α), f x ∂μ < ⊤
state_after: case intro
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α✝
μ✝ ν : Measure α✝
α : Type u_5
inst✝ : MeasurableSpace α
μ : Measure α
μ_fin : IsFiniteMeasure μ
f : α → ℝ≥0∞
c : ℝ≥0
hc : ∀ (x : α), f x ≤ ↑c
⊢ ∫⁻ (a : α), ↑c ∂μ < ⊤

tactic: rw [lintegral_const]
state_before: case intro
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α✝
μ✝ ν : Measure α✝
α : Type u_5
inst✝ : MeasurableSpace α
μ : Measure α
μ_fin : IsFiniteMeasure μ
f : α → ℝ≥0∞
c : ℝ≥0
hc : ∀ (x : α), f x ≤ ↑c
⊢ ∫⁻ (a : α), ↑c ∂μ < ⊤
state_after: case intro
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α✝
μ✝ ν : Measure α✝
α : Type u_5
inst✝ : MeasurableSpace α
μ : Measure α
μ_fin : IsFiniteMeasure μ
f : α → ℝ≥0∞
c : ℝ≥0
hc : ∀ (x : α), f x ≤ ↑c
⊢ ↑c * μ univ < ⊤

tactic: exact ENNReal.mul_lt_top ENNReal.coe_lt_top.ne μ_fin.measure_univ_lt_top.ne
state_before: case intro
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α✝
μ✝ ν : Measure α✝
α : Type u_5
inst✝ : MeasurableSpace α
μ : Measure α
μ_fin : IsFiniteMeasure μ
f : α → ℝ≥0∞
c : ℝ≥0
hc : ∀ (x : α), f x ≤ ↑c
⊢ ↑c * μ univ < ⊤
state_after: no goals
Theorem: HomologicalComplex.cylinder.πCompι₀Homotopy.biprod_lift_id_sub_id
File: Mathlib/Algebra/Homology/HomotopyCofiber.lean

tactic: simp
state_before: C : Type u_1
inst✝⁵ : Category.{u_3, u_1} C
inst✝⁴ : Preadditive C
ι : Type u_2
c : ComplexShape ι
F G K : HomologicalComplex C c
φ : F ⟶ G
inst✝³ : HasHomotopyCofiber φ
inst✝² : DecidableRel c.Rel
inst✝¹ : ∀ (i : ι), HasBinaryBiproduct (K.X i) (K.X i)
inst✝ : HasHomotopyCofiber (biprod.lift (𝟙 K) (-𝟙 K))
hc : ∀ (j : ι), ∃ i, c.Rel i j
⊢ biprod.lift (𝟙 K) (-𝟙 K) ≫ biprod.fst = (biprod.inl - biprod.inr) ≫ biprod.fst
state_after: no goals

tactic: simp
state_before: C : Type u_1
inst✝⁵ : Category.{u_3, u_1} C
inst✝⁴ : Preadditive C
ι : Type u_2
c : ComplexShape ι
F G K : HomologicalComplex C c
φ : F ⟶ G
inst✝³ : HasHomotopyCofiber φ
inst✝² : DecidableRel c.Rel
inst✝¹ : ∀ (i : ι), HasBinaryBiproduct (K.X i) (K.X i)
inst✝ : HasHomotopyCofiber (biprod.lift (𝟙 K) (-𝟙 K))
hc : ∀ (j : ι), ∃ i, c.Rel i j
⊢ biprod.lift (𝟙 K) (-𝟙 K) ≫ biprod.snd = (biprod.inl - biprod.inr) ≫ biprod.snd
state_after: no goals
Theorem: CochainComplex.mappingCone.liftCochain_v_snd_v
File: Mathlib/Algebra/Homology/HomotopyCategory/MappingCone.lean

tactic: simpa only [Cochain.comp_v _ _ (add_zero n) p₁ p₂ p₂ h₁₂ (add_zero p₂)]
  using Cochain.congr_v (liftCochain_snd φ α β h) p₁ p₂ (by omega)
state_before: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
F G : CochainComplex C ℤ
φ : F ⟶ G
inst✝ : HasHomotopyCofiber φ
K : CochainComplex C ℤ
n m : ℤ
α : Cochain K F m
β : Cochain K G n
h : n + 1 = m
p₁ p₂ : ℤ
h₁₂ : p₁ + n = p₂
⊢ (liftCochain φ α β h).v p₁ p₂ h₁₂ ≫ (snd φ).v p₂ p₂ ⋯ = β.v p₁ p₂ h₁₂
state_after: no goals

tactic: omega
state_before: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
F G : CochainComplex C ℤ
φ : F ⟶ G
inst✝ : HasHomotopyCofiber φ
K : CochainComplex C ℤ
n m : ℤ
α : Cochain K F m
β : Cochain K G n
h : n + 1 = m
p₁ p₂ : ℤ
h₁₂ : p₁ + n = p₂
⊢ p₁ + n = p₂
state_after: no goals
Theorem: UniformCauchySeqOn.mono
File: Mathlib/Topology/UniformSpace/UniformConvergence.lean

tactic: rw [uniformCauchySeqOn_iff_uniformCauchySeqOnFilter] at hf ⊢
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝ : UniformSpace β
F : ι → α → β
f : α → β
s s'✝ : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
s' : Set α
hf : UniformCauchySeqOn F p s
hss' : s' ⊆ s
⊢ UniformCauchySeqOn F p s'
state_after: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝ : UniformSpace β
F : ι → α → β
f : α → β
s s'✝ : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
s' : Set α
hf : UniformCauchySeqOnFilter F p (𝓟 s)
hss' : s' ⊆ s
⊢ UniformCauchySeqOnFilter F p (𝓟 s')

tactic: exact hf.mono_right (le_principal_iff.mpr <| mem_principal.mpr hss')
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝ : UniformSpace β
F : ι → α → β
f : α → β
s s'✝ : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
s' : Set α
hf : UniformCauchySeqOnFilter F p (𝓟 s)
hss' : s' ⊆ s
⊢ UniformCauchySeqOnFilter F p (𝓟 s')
state_after: no goals
Theorem: DirichletCharacter.convolution_mul_moebius
File: Mathlib/NumberTheory/LSeries/Dirichlet.lean

tactic: nth_rewrite 1 [← mul_one ↗χ]
state_before: n : ℕ
χ : DirichletCharacter ℂ n
this : (1 ⍟ fun x => ↑(μ x)) = δ
⊢ (fun n_1 => χ ↑n_1) ⍟ ((fun n_1 => χ ↑n_1) * fun n => ↑(μ n)) = δ
state_after: n : ℕ
χ : DirichletCharacter ℂ n
this : (1 ⍟ fun x => ↑(μ x)) = δ
⊢ (fun n_1 => χ ↑n_1) * 1 ⍟ ((fun n_1 => χ ↑n_1) * fun n => ↑(μ n)) = δ

tactic: simpa only [mul_convolution_distrib χ 1 ↗μ, this] using mul_delta _
state_before: n : ℕ
χ : DirichletCharacter ℂ n
this : (1 ⍟ fun x => ↑(μ x)) = δ
⊢ (fun n_1 => χ ↑n_1) * 1 ⍟ ((fun n_1 => χ ↑n_1) * fun n => ↑(μ n)) = δ
state_after: no goals

tactic: rw [one_convolution_eq_zeta_convolution, ← one_eq_delta]
state_before: n : ℕ
χ : DirichletCharacter ℂ n
⊢ (1 ⍟ fun x => ↑(μ x)) = δ
state_after: n : ℕ
χ : DirichletCharacter ℂ n
⊢ ((fun x => ↑(ζ x)) ⍟ fun x => ↑(μ x)) = fun n => 1 n

tactic: simp_rw [← natCoe_apply, ← intCoe_apply, coe_mul, coe_zeta_mul_coe_moebius]
state_before: n : ℕ
χ : DirichletCharacter ℂ n
⊢ ((fun x => ↑(ζ x)) ⍟ fun x => ↑(μ x)) = fun n => 1 n
state_after: no goals
Theorem: isOpen_singleton_of_finite_mem_nhds
File: Mathlib/Topology/Separation.lean

tactic: have A : {x} ⊆ s := by simp only [singleton_subset_iff, mem_of_mem_nhds hs]
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
x : X
s : Set X
hs : s ∈ 𝓝 x
hsf : s.Finite
⊢ IsOpen {x}
state_after: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
x : X
s : Set X
hs : s ∈ 𝓝 x
hsf : s.Finite
A : {x} ⊆ s
⊢ IsOpen {x}

tactic: have B : IsClosed (s \ {x}) := (hsf.subset diff_subset).isClosed
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
x : X
s : Set X
hs : s ∈ 𝓝 x
hsf : s.Finite
A : {x} ⊆ s
⊢ IsOpen {x}
state_after: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
x : X
s : Set X
hs : s ∈ 𝓝 x
hsf : s.Finite
A : {x} ⊆ s
B : IsClosed (s \ {x})
⊢ IsOpen {x}

tactic: have C : (s \ {x})ᶜ ∈ 𝓝 x := B.isOpen_compl.mem_nhds fun h => h.2 rfl
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
x : X
s : Set X
hs : s ∈ 𝓝 x
hsf : s.Finite
A : {x} ⊆ s
B : IsClosed (s \ {x})
⊢ IsOpen {x}
state_after: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
x : X
s : Set X
hs : s ∈ 𝓝 x
hsf : s.Finite
A : {x} ⊆ s
B : IsClosed (s \ {x})
C : (s \ {x})ᶜ ∈ 𝓝 x
⊢ IsOpen {x}

tactic: have D : {x} ∈ 𝓝 x := by simpa only [← diff_eq, diff_diff_cancel_left A] using inter_mem hs C
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
x : X
s : Set X
hs : s ∈ 𝓝 x
hsf : s.Finite
A : {x} ⊆ s
B : IsClosed (s \ {x})
C : (s \ {x})ᶜ ∈ 𝓝 x
⊢ IsOpen {x}
state_after: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
x : X
s : Set X
hs : s ∈ 𝓝 x
hsf : s.Finite
A : {x} ⊆ s
B : IsClosed (s \ {x})
C : (s \ {x})ᶜ ∈ 𝓝 x
D : {x} ∈ 𝓝 x
⊢ IsOpen {x}

tactic: rwa [← mem_interior_iff_mem_nhds, ← singleton_subset_iff, subset_interior_iff_isOpen] at D
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
x : X
s : Set X
hs : s ∈ 𝓝 x
hsf : s.Finite
A : {x} ⊆ s
B : IsClosed (s \ {x})
C : (s \ {x})ᶜ ∈ 𝓝 x
D : {x} ∈ 𝓝 x
⊢ IsOpen {x}
state_after: no goals

tactic: simp only [singleton_subset_iff, mem_of_mem_nhds hs]
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
x : X
s : Set X
hs : s ∈ 𝓝 x
hsf : s.Finite
⊢ {x} ⊆ s
state_after: no goals

tactic: simpa only [← diff_eq, diff_diff_cancel_left A] using inter_mem hs C
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
x : X
s : Set X
hs : s ∈ 𝓝 x
hsf : s.Finite
A : {x} ⊆ s
B : IsClosed (s \ {x})
C : (s \ {x})ᶜ ∈ 𝓝 x
⊢ {x} ∈ 𝓝 x
state_after: no goals
Theorem: Basis.equiv_refl
File: Mathlib/LinearAlgebra/Basis.lean

tactic: simp
state_before: ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid M'
inst✝² : Module R M'
b b₁ : Basis ι R M
i✝ : ι
c : R
x : M
b' : Basis ι' R M'
e : ι ≃ ι'
inst✝¹ : AddCommMonoid M''
inst✝ : Module R M''
i : ι
⊢ (b.equiv b (Equiv.refl ι)) (b i) = (LinearEquiv.refl R M) (b i)
state_after: no goals
Theorem: CategoryTheory.Arrow.AugmentedCechNerve.ExtraDegeneracy.s_comp_π_0
File: Mathlib/AlgebraicTopology/ExtraDegeneracy.lean

tactic: dsimp [ExtraDegeneracy.s]
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
f : Arrow C
inst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom
S : SplitEpi f.hom
n : ℕ
⊢ s f S n ≫ WidePullback.π (fun x => f.hom) 0 = (WidePullback.base fun x => f.hom) ≫ S.section_
state_after: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
f : Arrow C
inst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom
S : SplitEpi f.hom
n : ℕ
⊢ WidePullback.lift (WidePullback.base fun x => f.hom)
        (fun i =>
          if x : i = 0 then (WidePullback.base fun x => f.hom) ≫ S.section_
          else WidePullback.π (fun x => f.hom) (i.pred x))
        ⋯ ≫
      WidePullback.π (fun x => f.hom) 0 =
    (WidePullback.base fun x => f.hom) ≫ S.section_

tactic: simp only [WidePullback.lift_π]
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
f : Arrow C
inst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom
S : SplitEpi f.hom
n : ℕ
⊢ WidePullback.lift (WidePullback.base fun x => f.hom)
        (fun i =>
          if x : i = 0 then (WidePullback.base fun x => f.hom) ≫ S.section_
          else WidePullback.π (fun x => f.hom) (i.pred x))
        ⋯ ≫
      WidePullback.π (fun x => f.hom) 0 =
    (WidePullback.base fun x => f.hom) ≫ S.section_
state_after: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
f : Arrow C
inst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom
S : SplitEpi f.hom
n : ℕ
⊢ (if h : True then (WidePullback.base fun x => f.hom) ≫ S.section_
    else WidePullback.π (fun x => f.hom) (Fin.pred 0 ⋯)) =
    (WidePullback.base fun x => f.hom) ≫ S.section_

tactic: rfl
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
f : Arrow C
inst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom
S : SplitEpi f.hom
n : ℕ
⊢ (if h : True then (WidePullback.base fun x => f.hom) ≫ S.section_
    else WidePullback.π (fun x => f.hom) (Fin.pred 0 ⋯)) =
    (WidePullback.base fun x => f.hom) ≫ S.section_
state_after: no goals
Theorem: vectorSpan_singleton
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: simp [vectorSpan_def]
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
p : P
⊢ vectorSpan k {p} = ⊥
state_after: no goals
Theorem: Submodule.map_symm_eq_iff
File: Mathlib/Algebra/Module/Submodule/Map.lean

tactic: constructor <;> rintro rfl
state_before: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
M₃ : Type u_8
inst✝⁷ : Semiring R
inst✝⁶ : Semiring R₂
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M₂
inst✝³ : Module R M
inst✝² : Module R₂ M₂
τ₁₂ : R →+* R₂
τ₂₁ : R₂ →+* R
inst✝¹ : RingHomInvPair τ₁₂ τ₂₁
inst✝ : RingHomInvPair τ₂₁ τ₁₂
p : Submodule R M
q : Submodule R₂ M₂
e : M ≃ₛₗ[τ₁₂] M₂
K : Submodule R₂ M₂
⊢ map e.symm K = p ↔ map e p = K
state_after: case mp
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
M₃ : Type u_8
inst✝⁷ : Semiring R
inst✝⁶ : Semiring R₂
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M₂
inst✝³ : Module R M
inst✝² : Module R₂ M₂
τ₁₂ : R →+* R₂
τ₂₁ : R₂ →+* R
inst✝¹ : RingHomInvPair τ₁₂ τ₂₁
inst✝ : RingHomInvPair τ₂₁ τ₁₂
q : Submodule R₂ M₂
e : M ≃ₛₗ[τ₁₂] M₂
K : Submodule R₂ M₂
⊢ map e (map e.symm K) = K

case mpr
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
M₃ : Type u_8
inst✝⁷ : Semiring R
inst✝⁶ : Semiring R₂
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M₂
inst✝³ : Module R M
inst✝² : Module R₂ M₂
τ₁₂ : R →+* R₂
τ₂₁ : R₂ →+* R
inst✝¹ : RingHomInvPair τ₁₂ τ₂₁
inst✝ : RingHomInvPair τ₂₁ τ₁₂
p : Submodule R M
q : Submodule R₂ M₂
e : M ≃ₛₗ[τ₁₂] M₂
⊢ map e.symm (map e p) = p

tactic: calc
  map e (map e.symm K) = comap e.symm (map e.symm K) := map_equiv_eq_comap_symm _ _
  _ = K := comap_map_eq_of_injective e.symm.injective _
state_before: case mp
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
M₃ : Type u_8
inst✝⁷ : Semiring R
inst✝⁶ : Semiring R₂
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M₂
inst✝³ : Module R M
inst✝² : Module R₂ M₂
τ₁₂ : R →+* R₂
τ₂₁ : R₂ →+* R
inst✝¹ : RingHomInvPair τ₁₂ τ₂₁
inst✝ : RingHomInvPair τ₂₁ τ₁₂
q : Submodule R₂ M₂
e : M ≃ₛₗ[τ₁₂] M₂
K : Submodule R₂ M₂
⊢ map e (map e.symm K) = K
state_after: no goals

tactic: calc
  map e.symm (map e p) = comap e (map e p) := (comap_equiv_eq_map_symm _ _).symm
  _ = p := comap_map_eq_of_injective e.injective _
state_before: case mpr
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
M₃ : Type u_8
inst✝⁷ : Semiring R
inst✝⁶ : Semiring R₂
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M₂
inst✝³ : Module R M
inst✝² : Module R₂ M₂
τ₁₂ : R →+* R₂
τ₂₁ : R₂ →+* R
inst✝¹ : RingHomInvPair τ₁₂ τ₂₁
inst✝ : RingHomInvPair τ₂₁ τ₁₂
p : Submodule R M
q : Submodule R₂ M₂
e : M ≃ₛₗ[τ₁₂] M₂
⊢ map e.symm (map e p) = p
state_after: no goals
Theorem: Mathlib.Meta.Finset.range_succ'
File: Mathlib/Tactic/NormNum/BigOperators.lean

tactic: rw [pn.out, Nat.cast_id, pn', Finset.range_succ, Finset.insert_eq_cons]
state_before: n nn n' : ℕ
pn : NormNum.IsNat n nn
pn' : nn = n'.succ
⊢ Finset.range n = Finset.cons n' (Finset.range n') ⋯
state_after: no goals
Theorem: FractionalIdeal.coe_ideal_span_singleton_mul_inv
File: Mathlib/RingTheory/DedekindDomain/Ideal.lean

tactic: rw [coeIdeal_span_singleton,
  spanSingleton_mul_inv K <|
    (map_ne_zero_iff _ <| NoZeroSMulDivisors.algebraMap_injective R₁ K).mpr hx]
state_before: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁹ : CommRing R
inst✝⁸ : CommRing A
inst✝⁷ : Field K
R₁ : Type u_4
inst✝⁶ : CommRing R₁
inst✝⁵ : IsDomain R₁
inst✝⁴ : Algebra R₁ K
inst✝³ : IsFractionRing R₁ K
I J : FractionalIdeal R₁⁰ K
K' : Type u_5
inst✝² : Field K'
inst✝¹ : Algebra R₁ K'
inst✝ : IsFractionRing R₁ K'
x : R₁
hx : x ≠ 0
⊢ ↑(Ideal.span {x}) * (↑(Ideal.span {x}))⁻¹ = 1
state_after: no goals
Theorem: Multiset.noncommProd_cons
File: Mathlib/Data/Finset/NoncommProd.lean

tactic: induction s using Quotient.inductionOn
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
s : Multiset α
a : α
comm : {x | x ∈ a ::ₘ s}.Pairwise Commute
⊢ (a ::ₘ s).noncommProd comm = a * s.noncommProd ⋯
state_after: case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
a : α
a✝ : List α
comm : {x | x ∈ a ::ₘ ⟦a✝⟧}.Pairwise Commute
⊢ (a ::ₘ ⟦a✝⟧).noncommProd comm = a * noncommProd ⟦a✝⟧ ⋯

tactic: simp
state_before: case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
a : α
a✝ : List α
comm : {x | x ∈ a ::ₘ ⟦a✝⟧}.Pairwise Commute
⊢ (a ::ₘ ⟦a✝⟧).noncommProd comm = a * noncommProd ⟦a✝⟧ ⋯
state_after: no goals
Theorem: commProb_le_one
File: Mathlib/GroupTheory/CommutingProbability.lean

tactic: refine div_le_one_of_le ?_ (sq_nonneg (Nat.card M : ℚ))
state_before: M : Type u_1
inst✝¹ : Mul M
inst✝ : Finite M
⊢ commProb M ≤ 1
state_after: M : Type u_1
inst✝¹ : Mul M
inst✝ : Finite M
⊢ ↑(Nat.card { p // Commute p.1 p.2 }) ≤ ↑(Nat.card M) ^ 2

tactic: rw [← Nat.cast_pow, Nat.cast_le, sq, ← Nat.card_prod]
state_before: M : Type u_1
inst✝¹ : Mul M
inst✝ : Finite M
⊢ ↑(Nat.card { p // Commute p.1 p.2 }) ≤ ↑(Nat.card M) ^ 2
state_after: M : Type u_1
inst✝¹ : Mul M
inst✝ : Finite M
⊢ Nat.card { p // Commute p.1 p.2 } ≤ Nat.card (M × M)

tactic: apply Finite.card_subtype_le
state_before: M : Type u_1
inst✝¹ : Mul M
inst✝ : Finite M
⊢ Nat.card { p // Commute p.1 p.2 } ≤ Nat.card (M × M)
state_after: no goals
Theorem: List.IsPrefix.map
File: Mathlib/Data/List/Infix.lean

tactic: induction' l₁ with hd tl hl generalizing l₂
state_before: α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
h : l₁ <+: l₂
f : α → β
⊢ map f l₁ <+: map f l₂
state_after: case nil
α : Type u_1
β : Type u_2
l l₃ : List α
a b : α
m n : ℕ
f : α → β
l₂ : List α
h : [] <+: l₂
⊢ map f [] <+: map f l₂

case cons
α : Type u_1
β : Type u_2
l l₃ : List α
a b : α
m n : ℕ
f : α → β
hd : α
tl : List α
hl : ∀ {l₂ : List α}, tl <+: l₂ → map f tl <+: map f l₂
l₂ : List α
h : hd :: tl <+: l₂
⊢ map f (hd :: tl) <+: map f l₂

tactic: simp only [nil_prefix, map_nil]
state_before: case nil
α : Type u_1
β : Type u_2
l l₃ : List α
a b : α
m n : ℕ
f : α → β
l₂ : List α
h : [] <+: l₂
⊢ map f [] <+: map f l₂
state_after: no goals

tactic: cases' l₂ with hd₂ tl₂
state_before: case cons
α : Type u_1
β : Type u_2
l l₃ : List α
a b : α
m n : ℕ
f : α → β
hd : α
tl : List α
hl : ∀ {l₂ : List α}, tl <+: l₂ → map f tl <+: map f l₂
l₂ : List α
h : hd :: tl <+: l₂
⊢ map f (hd :: tl) <+: map f l₂
state_after: case cons.nil
α : Type u_1
β : Type u_2
l l₃ : List α
a b : α
m n : ℕ
f : α → β
hd : α
tl : List α
hl : ∀ {l₂ : List α}, tl <+: l₂ → map f tl <+: map f l₂
h : hd :: tl <+: []
⊢ map f (hd :: tl) <+: map f []

case cons.cons
α : Type u_1
β : Type u_2
l l₃ : List α
a b : α
m n : ℕ
f : α → β
hd : α
tl : List α
hl : ∀ {l₂ : List α}, tl <+: l₂ → map f tl <+: map f l₂
hd₂ : α
tl₂ : List α
h : hd :: tl <+: hd₂ :: tl₂
⊢ map f (hd :: tl) <+: map f (hd₂ :: tl₂)

tactic: simpa only using eq_nil_of_prefix_nil h
state_before: case cons.nil
α : Type u_1
β : Type u_2
l l₃ : List α
a b : α
m n : ℕ
f : α → β
hd : α
tl : List α
hl : ∀ {l₂ : List α}, tl <+: l₂ → map f tl <+: map f l₂
h : hd :: tl <+: []
⊢ map f (hd :: tl) <+: map f []
state_after: no goals

tactic: rw [cons_prefix_iff] at h
state_before: case cons.cons
α : Type u_1
β : Type u_2
l l₃ : List α
a b : α
m n : ℕ
f : α → β
hd : α
tl : List α
hl : ∀ {l₂ : List α}, tl <+: l₂ → map f tl <+: map f l₂
hd₂ : α
tl₂ : List α
h : hd :: tl <+: hd₂ :: tl₂
⊢ map f (hd :: tl) <+: map f (hd₂ :: tl₂)
state_after: case cons.cons
α : Type u_1
β : Type u_2
l l₃ : List α
a b : α
m n : ℕ
f : α → β
hd : α
tl : List α
hl : ∀ {l₂ : List α}, tl <+: l₂ → map f tl <+: map f l₂
hd₂ : α
tl₂ : List α
h : hd = hd₂ ∧ tl <+: tl₂
⊢ map f (hd :: tl) <+: map f (hd₂ :: tl₂)

tactic: simp only [List.map_cons, h, prefix_cons_inj, hl, map]
state_before: case cons.cons
α : Type u_1
β : Type u_2
l l₃ : List α
a b : α
m n : ℕ
f : α → β
hd : α
tl : List α
hl : ∀ {l₂ : List α}, tl <+: l₂ → map f tl <+: map f l₂
hd₂ : α
tl₂ : List α
h : hd = hd₂ ∧ tl <+: tl₂
⊢ map f (hd :: tl) <+: map f (hd₂ :: tl₂)
state_after: no goals
Theorem: Nat.descFactorial_eq_factorial_mul_choose
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: obtain h | h := Nat.lt_or_ge n k
state_before: n k : ℕ
⊢ n.descFactorial k = k ! * n.choose k
state_after: case inl
n k : ℕ
h : n < k
⊢ n.descFactorial k = k ! * n.choose k

case inr
n k : ℕ
h : n ≥ k
⊢ n.descFactorial k = k ! * n.choose k

tactic: rw [Nat.mul_comm]
state_before: case inr
n k : ℕ
h : n ≥ k
⊢ n.descFactorial k = k ! * n.choose k
state_after: case inr
n k : ℕ
h : n ≥ k
⊢ n.descFactorial k = n.choose k * k !

tactic: apply Nat.mul_right_cancel (n - k).factorial_pos
state_before: case inr
n k : ℕ
h : n ≥ k
⊢ n.descFactorial k = n.choose k * k !
state_after: case inr
n k : ℕ
h : n ≥ k
⊢ n.descFactorial k * (n - k)! = n.choose k * k ! * (n - k)!

tactic: rw [choose_mul_factorial_mul_factorial h, ← factorial_mul_descFactorial h, Nat.mul_comm]
state_before: case inr
n k : ℕ
h : n ≥ k
⊢ n.descFactorial k * (n - k)! = n.choose k * k ! * (n - k)!
state_after: no goals

tactic: rw [descFactorial_eq_zero_iff_lt.2 h, choose_eq_zero_of_lt h, Nat.mul_zero]
state_before: case inl
n k : ℕ
h : n < k
⊢ n.descFactorial k = k ! * n.choose k
state_after: no goals