1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Ordinal.sup_eq_zero_iff
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: refine
  ⟨fun h i => ?_, fun h =>
    le_antisymm (sup_le fun i => Ordinal.le_zero.2 (h i)) (Ordinal.zero_le _)⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal.{max u v}
⊢ sup f = 0 ↔ ∀ (i : ι), f i = 0
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal.{max u v}
h : sup f = 0
i : ι
⊢ f i = 0

tactic: rw [← Ordinal.le_zero, ← h]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal.{max u v}
h : sup f = 0
i : ι
⊢ f i = 0
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal.{max u v}
h : sup f = 0
i : ι
⊢ f i ≤ sup f

tactic: exact le_sup f i
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal.{max u v}
h : sup f = 0
i : ι
⊢ f i ≤ sup f
state_after: no goals
Theorem: Set.disjoint_toFinset
File: Mathlib/Data/Fintype/Basic.lean

tactic: simp only [← disjoint_coe, coe_toFinset]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s t : Set α
inst✝¹ : Fintype ↑s
inst✝ : Fintype ↑t
⊢ Disjoint s.toFinset t.toFinset ↔ Disjoint s t
state_after: no goals
Theorem: Polynomial.Monic.eq_one_of_isUnit
File: Mathlib/Algebra/Polynomial/Monic.lean

tactic: nontriviality R
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hm : p.Monic
hpu : IsUnit p
⊢ p = 1
state_after: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hm : p.Monic
hpu : IsUnit p
a✝ : Nontrivial R
⊢ p = 1

tactic: obtain ⟨q, h⟩ := hpu.exists_right_inv
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hm : p.Monic
hpu : IsUnit p
a✝ : Nontrivial R
⊢ p = 1
state_after: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hm : p.Monic
hpu : IsUnit p
a✝ : Nontrivial R
q : R[X]
h : p * q = 1
⊢ p = 1

tactic: have := hm.natDegree_mul' (right_ne_zero_of_mul_eq_one h)
state_before: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hm : p.Monic
hpu : IsUnit p
a✝ : Nontrivial R
q : R[X]
h : p * q = 1
⊢ p = 1
state_after: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hm : p.Monic
hpu : IsUnit p
a✝ : Nontrivial R
q : R[X]
h : p * q = 1
this : (p * q).natDegree = p.natDegree + q.natDegree
⊢ p = 1

tactic: rw [h, natDegree_one, eq_comm, add_eq_zero_iff] at this
state_before: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hm : p.Monic
hpu : IsUnit p
a✝ : Nontrivial R
q : R[X]
h : p * q = 1
this : (p * q).natDegree = p.natDegree + q.natDegree
⊢ p = 1
state_after: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hm : p.Monic
hpu : IsUnit p
a✝ : Nontrivial R
q : R[X]
h : p * q = 1
this : p.natDegree = 0 ∧ q.natDegree = 0
⊢ p = 1

tactic: exact hm.natDegree_eq_zero_iff_eq_one.mp this.1
state_before: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hm : p.Monic
hpu : IsUnit p
a✝ : Nontrivial R
q : R[X]
h : p * q = 1
this : p.natDegree = 0 ∧ q.natDegree = 0
⊢ p = 1
state_after: no goals
Theorem: zeta_eq_tsum_one_div_nat_add_one_cpow
File: Mathlib/NumberTheory/LSeries/RiemannZeta.lean

tactic: have := zeta_eq_tsum_one_div_nat_cpow hs
state_before: s : ℂ
hs : 1 < s.re
⊢ riemannZeta s = ∑' (n : ℕ), 1 / (↑n + 1) ^ s
state_after: s : ℂ
hs : 1 < s.re
this : riemannZeta s = ∑' (n : ℕ), 1 / ↑n ^ s
⊢ riemannZeta s = ∑' (n : ℕ), 1 / (↑n + 1) ^ s

tactic: rw [tsum_eq_zero_add] at this
state_before: s : ℂ
hs : 1 < s.re
this : riemannZeta s = ∑' (n : ℕ), 1 / ↑n ^ s
⊢ riemannZeta s = ∑' (n : ℕ), 1 / (↑n + 1) ^ s
state_after: s : ℂ
hs : 1 < s.re
this : riemannZeta s = 1 / ↑0 ^ s + ∑' (b : ℕ), 1 / ↑(b + 1) ^ s
⊢ riemannZeta s = ∑' (n : ℕ), 1 / (↑n + 1) ^ s

s : ℂ
hs : 1 < s.re
this : riemannZeta s = ∑' (n : ℕ), 1 / ↑n ^ s
⊢ Summable fun n => 1 / ↑n ^ s

tactic: simpa [zero_cpow (Complex.ne_zero_of_one_lt_re hs)]
state_before: s : ℂ
hs : 1 < s.re
this : riemannZeta s = 1 / ↑0 ^ s + ∑' (b : ℕ), 1 / ↑(b + 1) ^ s
⊢ riemannZeta s = ∑' (n : ℕ), 1 / (↑n + 1) ^ s
state_after: no goals

tactic: rwa [Complex.summable_one_div_nat_cpow]
state_before: s : ℂ
hs : 1 < s.re
this : riemannZeta s = ∑' (n : ℕ), 1 / ↑n ^ s
⊢ Summable fun n => 1 / ↑n ^ s
state_after: no goals
Theorem: ProbabilityTheory.gaussianReal_const_mul
File: Mathlib/Probability/Distributions/Gaussian.lean

tactic: have hXm : AEMeasurable X := aemeasurable_of_map_neZero (by rw [hX]; infer_instance)
state_before: μ : ℝ
v : ℝ≥0
Ω : Type
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : Measure.map X ℙ = gaussianReal μ v
c : ℝ
⊢ Measure.map (fun ω => c * X ω) ℙ = gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)
state_after: μ : ℝ
v : ℝ≥0
Ω : Type
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : Measure.map X ℙ = gaussianReal μ v
c : ℝ
hXm : AEMeasurable X ℙ
⊢ Measure.map (fun ω => c * X ω) ℙ = gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)

tactic: change Measure.map ((fun ω ↦ c * ω) ∘ X) ℙ = gaussianReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v)
state_before: μ : ℝ
v : ℝ≥0
Ω : Type
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : Measure.map X ℙ = gaussianReal μ v
c : ℝ
hXm : AEMeasurable X ℙ
⊢ Measure.map (fun ω => c * X ω) ℙ = gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)
state_after: μ : ℝ
v : ℝ≥0
Ω : Type
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : Measure.map X ℙ = gaussianReal μ v
c : ℝ
hXm : AEMeasurable X ℙ
⊢ Measure.map ((fun ω => c * ω) ∘ X) ℙ = gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)

tactic: rw [← AEMeasurable.map_map_of_aemeasurable (measurable_id'.const_mul c).aemeasurable hXm, hX]
state_before: μ : ℝ
v : ℝ≥0
Ω : Type
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : Measure.map X ℙ = gaussianReal μ v
c : ℝ
hXm : AEMeasurable X ℙ
⊢ Measure.map ((fun ω => c * ω) ∘ X) ℙ = gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)
state_after: μ : ℝ
v : ℝ≥0
Ω : Type
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : Measure.map X ℙ = gaussianReal μ v
c : ℝ
hXm : AEMeasurable X ℙ
⊢ Measure.map (fun x => c * x) (gaussianReal μ v) = gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)

tactic: exact gaussianReal_map_const_mul c
state_before: μ : ℝ
v : ℝ≥0
Ω : Type
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : Measure.map X ℙ = gaussianReal μ v
c : ℝ
hXm : AEMeasurable X ℙ
⊢ Measure.map (fun x => c * x) (gaussianReal μ v) = gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)
state_after: no goals

tactic: rw [hX]
state_before: μ : ℝ
v : ℝ≥0
Ω : Type
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : Measure.map X ℙ = gaussianReal μ v
c : ℝ
⊢ NeZero (Measure.map X ℙ)
state_after: μ : ℝ
v : ℝ≥0
Ω : Type
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : Measure.map X ℙ = gaussianReal μ v
c : ℝ
⊢ NeZero (gaussianReal μ v)

tactic: infer_instance
state_before: μ : ℝ
v : ℝ≥0
Ω : Type
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : Measure.map X ℙ = gaussianReal μ v
c : ℝ
⊢ NeZero (gaussianReal μ v)
state_after: no goals
Theorem: GroupFilterBasis.mem_nhds_one
File: Mathlib/Topology/Algebra/FilterBasis.lean

tactic: rw [B.nhds_one_hasBasis.mem_iff]
state_before: G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
U : Set G
hU : U ∈ B
⊢ U ∈ 𝓝 1
state_after: G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
U : Set G
hU : U ∈ B
⊢ ∃ i ∈ B, id i ⊆ U

tactic: exact ⟨U, hU, rfl.subset⟩
state_before: G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
U : Set G
hU : U ∈ B
⊢ ∃ i ∈ B, id i ⊆ U
state_after: no goals
Theorem: MeasureTheory.toFiniteAux_zero
File: Mathlib/MeasureTheory/Measure/WithDensityFinite.lean

tactic: ext s
state_before: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
⊢ Measure.toFiniteAux 0 = 0
state_after: case h
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
s : Set α
a✝ : MeasurableSet s
⊢ (Measure.toFiniteAux 0) s = 0 s

tactic: simp [toFiniteAux_apply]
state_before: case h
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
s : Set α
a✝ : MeasurableSet s
⊢ (Measure.toFiniteAux 0) s = 0 s
state_after: no goals
Theorem: TrivSqZeroExt.inr_mul_inr
File: Mathlib/Algebra/TrivSqZeroExt.lean

tactic: rw [zero_smul, zero_add, op_zero, zero_smul]
state_before: R : Type u
M : Type v
inst✝³ : Semiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : Module Rᵐᵒᵖ M
m₁ m₂ : M
⊢ 0 •> m₂ + m₁ <• 0 = 0
state_after: no goals
Theorem: CategoryTheory.Limits.IsZero.iff_isSplitEpi_eq_zero
File: Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean

tactic: rw [iff_id_eq_zero]
state_before: C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : IsSplitEpi f
⊢ IsZero Y ↔ f = 0
state_after: C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : IsSplitEpi f
⊢ 𝟙 Y = 0 ↔ f = 0

tactic: constructor
state_before: C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : IsSplitEpi f
⊢ 𝟙 Y = 0 ↔ f = 0
state_after: case mp
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : IsSplitEpi f
⊢ 𝟙 Y = 0 → f = 0

case mpr
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : IsSplitEpi f
⊢ f = 0 → 𝟙 Y = 0

tactic: intro h
state_before: case mp
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : IsSplitEpi f
⊢ 𝟙 Y = 0 → f = 0
state_after: case mp
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : IsSplitEpi f
h : 𝟙 Y = 0
⊢ f = 0

tactic: rw [← Category.comp_id f, h, comp_zero]
state_before: case mp
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : IsSplitEpi f
h : 𝟙 Y = 0
⊢ f = 0
state_after: no goals

tactic: intro h
state_before: case mpr
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : IsSplitEpi f
⊢ f = 0 → 𝟙 Y = 0
state_after: case mpr
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : IsSplitEpi f
h : f = 0
⊢ 𝟙 Y = 0

tactic: rw [← IsSplitEpi.id f]
state_before: case mpr
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : IsSplitEpi f
h : f = 0
⊢ 𝟙 Y = 0
state_after: case mpr
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : IsSplitEpi f
h : f = 0
⊢ section_ f ≫ f = 0

tactic: simp [h]
state_before: case mpr
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : IsSplitEpi f
h : f = 0
⊢ section_ f ≫ f = 0
state_after: no goals
Theorem: CategoryTheory.Limits.biprod.desc_eq
File: Mathlib/CategoryTheory/Preadditive/Biproducts.lean

tactic: ext <;> simp [add_comp]
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Preadditive C
X Y : C
inst✝ : HasBinaryBiproduct X Y
T : C
f : X ⟶ T
g : Y ⟶ T
⊢ desc f g = fst ≫ f + snd ≫ g
state_after: no goals
Theorem: Num.pred_to_nat
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [pred, PosNum.pred'_to_nat]
state_before: α : Type u_1
p : PosNum
⊢ ↑(pos p).pred = (↑(pos p)).pred
state_after: α : Type u_1
p : PosNum
⊢ (↑p).pred = (↑(pos p)).pred

tactic: rfl
state_before: α : Type u_1
p : PosNum
⊢ (↑p).pred = (↑(pos p)).pred
state_after: no goals
Theorem: SimpleGraph.Walk.IsTrail.dropUntil
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: rwa [← take_spec _ h] at hc
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u✝ v✝ w✝ x y : V
inst✝ : DecidableEq V
u v w : V
p : G.Walk v w
hc : p.IsTrail
h : u ∈ p.support
⊢ (?m.134942.append (p.dropUntil u h)).IsTrail
state_after: no goals
Theorem: String.Iterator.ValidFor.pos_eq_endPos
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

tactic: simp only [h.pos, h.toString, endPos_eq, utf8Len_reverseAux, Pos.ext_iff]
state_before: l r : List Char
it : Iterator
h : ValidFor l r it
⊢ it.i = it.s.endPos ↔ r = []
state_after: l r : List Char
it : Iterator
h : ValidFor l r it
⊢ utf8Len l = utf8Len l + utf8Len r ↔ r = []

tactic: exact (Nat.add_left_cancel_iff (m := 0)).trans <| eq_comm.trans utf8Len_eq_zero
state_before: l r : List Char
it : Iterator
h : ValidFor l r it
⊢ utf8Len l = utf8Len l + utf8Len r ↔ r = []
state_after: no goals
Theorem: List.oldMapIdxCore_eq
File: Mathlib/Data/List/Indexes.lean

tactic: induction' l with hd tl hl generalizing f n
state_before: α : Type u
β : Type v
l : List α
f : ℕ → α → β
n : ℕ
⊢ List.oldMapIdxCore f n l = List.oldMapIdx (fun i a => f (i + n) a) l
state_after: case nil
α : Type u
β : Type v
f : ℕ → α → β
n : ℕ
⊢ List.oldMapIdxCore f n [] = List.oldMapIdx (fun i a => f (i + n) a) []

case cons
α : Type u
β : Type v
hd : α
tl : List α
hl : ∀ (f : ℕ → α → β) (n : ℕ), List.oldMapIdxCore f n tl = List.oldMapIdx (fun i a => f (i + n) a) tl
f : ℕ → α → β
n : ℕ
⊢ List.oldMapIdxCore f n (hd :: tl) = List.oldMapIdx (fun i a => f (i + n) a) (hd :: tl)

tactic: rfl
state_before: case nil
α : Type u
β : Type v
f : ℕ → α → β
n : ℕ
⊢ List.oldMapIdxCore f n [] = List.oldMapIdx (fun i a => f (i + n) a) []
state_after: no goals

tactic: rw [List.oldMapIdx]
state_before: case cons
α : Type u
β : Type v
hd : α
tl : List α
hl : ∀ (f : ℕ → α → β) (n : ℕ), List.oldMapIdxCore f n tl = List.oldMapIdx (fun i a => f (i + n) a) tl
f : ℕ → α → β
n : ℕ
⊢ List.oldMapIdxCore f n (hd :: tl) = List.oldMapIdx (fun i a => f (i + n) a) (hd :: tl)
state_after: case cons
α : Type u
β : Type v
hd : α
tl : List α
hl : ∀ (f : ℕ → α → β) (n : ℕ), List.oldMapIdxCore f n tl = List.oldMapIdx (fun i a => f (i + n) a) tl
f : ℕ → α → β
n : ℕ
⊢ List.oldMapIdxCore f n (hd :: tl) = List.oldMapIdxCore (fun i a => f (i + n) a) 0 (hd :: tl)

tactic: simp only [List.oldMapIdxCore, hl, Nat.add_left_comm, Nat.add_comm, Nat.add_zero]
state_before: case cons
α : Type u
β : Type v
hd : α
tl : List α
hl : ∀ (f : ℕ → α → β) (n : ℕ), List.oldMapIdxCore f n tl = List.oldMapIdx (fun i a => f (i + n) a) tl
f : ℕ → α → β
n : ℕ
⊢ List.oldMapIdxCore f n (hd :: tl) = List.oldMapIdxCore (fun i a => f (i + n) a) 0 (hd :: tl)
state_after: no goals
Theorem: AddConstMapClass.map_nsmul_const
File: Mathlib/Algebra/AddConstMap/Basic.lean

tactic: simpa using map_add_nsmul f 0 n
state_before: F : Type u_1
G : Type u_2
H : Type u_3
inst✝³ : FunLike F G H
a : G
b : H
inst✝² : AddMonoid G
inst✝¹ : AddMonoid H
inst✝ : AddConstMapClass F G H a b
f : F
n : ℕ
⊢ f (n • a) = f 0 + n • b
state_after: no goals
Theorem: WithLp.prod_sup_edist_ne_top_aux
File: Mathlib/Analysis/NormedSpace/ProdLp.lean

tactic: simp [edist, PseudoMetricSpace.edist_dist]
state_before: p : ℝ≥0∞
𝕜 : Type u_1
α : Type u_2
β : Type u_3
hp : Fact (1 ≤ p)
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
f g : WithLp ⊤ (α × β)
⊢ edist f.1 g.1 ⊔ edist f.2 g.2 < ⊤
state_after: no goals
Theorem: UFModel.Agrees.size_eq
File: Mathlib/Data/UnionFind.lean

tactic: cases H
state_before: α : Type u_1
n : ℕ
β : Sort u_2
f : α → β
arr : Array α
m : Fin n → β
H : Agrees arr f m
⊢ n = arr.size
state_after: case mk
α : Type u_1
β : Sort u_2
f : α → β
arr : Array α
⊢ arr.size = arr.size

tactic: rfl
state_before: case mk
α : Type u_1
β : Sort u_2
f : α → β
arr : Array α
⊢ arr.size = arr.size
state_after: no goals
Theorem: injective_algebraMap_of_linearMap
File: Mathlib/Algebra/Algebra/Basic.lean

tactic: rw [← mul_one x, ← mul_one y, ← smul_eq_mul, ← smul_eq_mul,
  map_smul, map_smul, Algebra.smul_def, Algebra.smul_def, e]
state_before: F : Type u_1
E : Type u_2
inst✝² : CommSemiring F
inst✝¹ : Semiring E
inst✝ : Algebra F E
b : F →ₗ[F] E
hb : Function.Injective ⇑b
x y : F
e : (algebraMap F E) x = (algebraMap F E) y
⊢ b x = b y
state_after: no goals
Theorem: RatFunc.mk_eq_mk
File: Mathlib/FieldTheory/RatFunc/Defs.lean

tactic: rw [mk_def_of_ne _ hq, mk_def_of_ne _ hq', ofFractionRing_injective.eq_iff,
  IsLocalization.mk'_eq_iff_eq', (IsFractionRing.injective K[X] (FractionRing K[X])).eq_iff]
state_before: K : Type u
inst✝¹ : CommRing K
inst✝ : IsDomain K
p q p' q' : K[X]
hq : q ≠ 0
hq' : q' ≠ 0
⊢ RatFunc.mk p q = RatFunc.mk p' q' ↔ p * q' = p' * q
state_after: no goals
Theorem: List.prod_isUnit
File: Mathlib/Algebra/BigOperators/Group/List.lean

tactic: simp
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
l l₁ l₂ : List M
a : M
x✝ : ∀ m ∈ [], IsUnit m
⊢ IsUnit [].prod
state_after: no goals

tactic: simp only [List.prod_cons]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
l l₁ l₂ : List M
a h : M
t : List M
u : ∀ m ∈ h :: t, IsUnit m
⊢ IsUnit (h :: t).prod
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
l l₁ l₂ : List M
a h : M
t : List M
u : ∀ m ∈ h :: t, IsUnit m
⊢ IsUnit (h * t.prod)

tactic: exact IsUnit.mul (u h (mem_cons_self h t)) (prod_isUnit fun m mt => u m (mem_cons_of_mem h mt))
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
l l₁ l₂ : List M
a h : M
t : List M
u : ∀ m ∈ h :: t, IsUnit m
⊢ IsUnit (h * t.prod)
state_after: no goals
Theorem: Multiset.count_nsmul
File: Mathlib/Data/Multiset/Basic.lean

tactic: induction n <;> simp [*, succ_nsmul, succ_mul, zero_nsmul]
state_before: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
n : ℕ
s : Multiset α
⊢ count a (n • s) = n * count a s
state_after: no goals
Theorem: div_le_div_iff_right
File: Mathlib/Algebra/Order/Group/Defs.lean

tactic: simpa only [div_eq_mul_inv] using mul_le_mul_iff_right _
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LE α
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c✝ d c : α
⊢ a / c ≤ b / c ↔ a ≤ b
state_after: no goals
Theorem: CategoryTheory.Limits.inr_pushoutLeftPushoutInrIso_inv
File: Mathlib/CategoryTheory/Limits/Shapes/Pullbacks.lean

tactic: rw [Iso.comp_inv_eq, inr_pushoutLeftPushoutInrIso_hom]
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
W X Y Z : C
f : X ⟶ Y
g : X ⟶ Z
g' : Z ⟶ W
inst✝² : HasPushout f g
inst✝¹ : HasPushout pushout.inr g'
inst✝ : HasPushout f (g ≫ g')
⊢ pushout.inr ≫ (pushoutLeftPushoutInrIso f g g').inv = pushout.inr
state_after: no goals
Theorem: count_span_normalizedFactors_eq_of_normUnit
File: Mathlib/RingTheory/DedekindDomain/Ideal.lean

tactic: simpa [hX₁] using count_span_normalizedFactors_eq hr hX
state_before: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁹ : CommRing R
inst✝⁸ : CommRing A
inst✝⁷ : Field K
inst✝⁶ : IsDomain R
inst✝⁵ : IsPrincipalIdealRing R
inst✝⁴ : DecidableEq R
inst✝³ : DecidableEq (Ideal R)
inst✝² : NormalizationMonoid R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
r X : R
hr : r ≠ 0
hX₁ : normUnit X = 1
hX : Prime X
⊢ Multiset.count (span {X}) (normalizedFactors (span {r})) = Multiset.count X (normalizedFactors r)
state_after: no goals
Theorem: LinearEquiv.dualMap_refl
File: Mathlib/LinearAlgebra/Dual.lean

tactic: ext
state_before: R : Type u
inst✝⁴ : CommSemiring R
M₁ : Type v
M₂ : Type v'
inst✝³ : AddCommMonoid M₁
inst✝² : Module R M₁
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R M₂
⊢ (refl R M₁).dualMap = refl R (Dual R M₁)
state_after: case h.h
R : Type u
inst✝⁴ : CommSemiring R
M₁ : Type v
M₂ : Type v'
inst✝³ : AddCommMonoid M₁
inst✝² : Module R M₁
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R M₂
x✝¹ : Dual R M₁
x✝ : M₁
⊢ ((refl R M₁).dualMap x✝¹) x✝ = ((refl R (Dual R M₁)) x✝¹) x✝

tactic: rfl
state_before: case h.h
R : Type u
inst✝⁴ : CommSemiring R
M₁ : Type v
M₂ : Type v'
inst✝³ : AddCommMonoid M₁
inst✝² : Module R M₁
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R M₂
x✝¹ : Dual R M₁
x✝ : M₁
⊢ ((refl R M₁).dualMap x✝¹) x✝ = ((refl R (Dual R M₁)) x✝¹) x✝
state_after: no goals
Theorem: LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re
File: Mathlib/Analysis/Complex/Isometry.lean

tactic: have h₁ := f.norm_map z
state_before: f : ℂ →ₗᵢ[ℝ] ℂ
h₂ : ∀ (z : ℂ), (f z).re = z.re
z : ℂ
⊢ (f z).im = z.im ∨ (f z).im = -z.im
state_after: f : ℂ →ₗᵢ[ℝ] ℂ
h₂ : ∀ (z : ℂ), (f z).re = z.re
z : ℂ
h₁ : ‖f z‖ = ‖z‖
⊢ (f z).im = z.im ∨ (f z).im = -z.im

tactic: simp only [Complex.abs_def, norm_eq_abs] at h₁
state_before: f : ℂ →ₗᵢ[ℝ] ℂ
h₂ : ∀ (z : ℂ), (f z).re = z.re
z : ℂ
h₁ : ‖f z‖ = ‖z‖
⊢ (f z).im = z.im ∨ (f z).im = -z.im
state_after: f : ℂ →ₗᵢ[ℝ] ℂ
h₂ : ∀ (z : ℂ), (f z).re = z.re
z : ℂ
h₁ : √(normSq (f z)) = √(normSq z)
⊢ (f z).im = z.im ∨ (f z).im = -z.im

tactic: rwa [Real.sqrt_inj (normSq_nonneg _) (normSq_nonneg _), normSq_apply (f z), normSq_apply z,
  h₂, add_left_cancel_iff, mul_self_eq_mul_self_iff] at h₁
state_before: f : ℂ →ₗᵢ[ℝ] ℂ
h₂ : ∀ (z : ℂ), (f z).re = z.re
z : ℂ
h₁ : √(normSq (f z)) = √(normSq z)
⊢ (f z).im = z.im ∨ (f z).im = -z.im
state_after: no goals
Theorem: Finset.mul_zero_subset
File: Mathlib/Data/Finset/Pointwise.lean

tactic: simp [subset_iff, mem_mul]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : MulZeroClass α
s✝ t s : Finset α
⊢ s * 0 ⊆ 0
state_after: no goals
Theorem: eventually_nnnorm_sub_lt
File: Mathlib/Analysis/Normed/Group/Lemmas.lean

tactic: simpa
state_before: E : Type u_1
inst✝ : SeminormedAddCommGroup E
x₀ : E
ε : ℝ≥0
ε_pos : 0 < ε
⊢ (fun x => ‖id x - x₀‖₊) x₀ < ε
state_after: no goals
Theorem: Field.DirectLimit.exists_inv
File: Mathlib/Algebra/DirectLimit.lean

tactic: erw [← (Ring.DirectLimit.of _ _ _).map_mul,
  mul_inv_cancel fun h : x = 0 => H <| by rw [h, (Ring.DirectLimit.of _ _ _).map_zero],
  (Ring.DirectLimit.of _ _ _).map_one]
state_before: R : Type u
inst✝⁴ : Ring R
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : Nonempty ι
inst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝ : (i : ι) → Field (G i)
f : (i j : ι) → i ≤ j → G i → G j
f' : (i j : ι) → i ≤ j → G i →+* G j
p : Ring.DirectLimit G f
i : ι
x : G i
H : (Ring.DirectLimit.of G f i) x ≠ 0
⊢ (Ring.DirectLimit.of G f i) x * (Ring.DirectLimit.of G f i) x⁻¹ = 1
state_after: no goals

tactic: rw [h, (Ring.DirectLimit.of _ _ _).map_zero]
state_before: R : Type u
inst✝⁴ : Ring R
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : Nonempty ι
inst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝ : (i : ι) → Field (G i)
f : (i j : ι) → i ≤ j → G i → G j
f' : (i j : ι) → i ≤ j → G i →+* G j
p : Ring.DirectLimit G f
i : ι
x : G i
H : (Ring.DirectLimit.of G f i) x ≠ 0
h : x = 0
⊢ (Ring.DirectLimit.of G f i) x = 0
state_after: no goals
Theorem: Finset.eraseNone_eq_biUnion
File: Mathlib/Data/Finset/Option.lean

tactic: ext
state_before: α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Finset (Option α)
⊢ eraseNone s = s.biUnion Option.toFinset
state_after: case a
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Finset (Option α)
a✝ : α
⊢ a✝ ∈ eraseNone s ↔ a✝ ∈ s.biUnion Option.toFinset

tactic: simp
state_before: case a
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Finset (Option α)
a✝ : α
⊢ a✝ ∈ eraseNone s ↔ a✝ ∈ s.biUnion Option.toFinset
state_after: no goals