1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: IsPrimitiveRoot.neg_one
File: Mathlib/RingTheory/RootsOfUnity/Basic.lean

tactic: convert IsPrimitiveRoot.orderOf (-1 : R)
state_before: M : Type u_1
N : Type u_2
G : Type u_3
R : Type u_4
S : Type u_5
F : Type u_6
inst✝⁴ : CommMonoid M
inst✝³ : CommMonoid N
inst✝² : DivisionCommMonoid G
k l : ℕ
inst✝¹ : CommRing R
ζ : Rˣ
h✝ : IsPrimitiveRoot ζ k
p : ℕ
inst✝ : Nontrivial R
h : CharP R p
hp : p ≠ 2
⊢ IsPrimitiveRoot (-1) 2
state_after: case h.e'_4
M : Type u_1
N : Type u_2
G : Type u_3
R : Type u_4
S : Type u_5
F : Type u_6
inst✝⁴ : CommMonoid M
inst✝³ : CommMonoid N
inst✝² : DivisionCommMonoid G
k l : ℕ
inst✝¹ : CommRing R
ζ : Rˣ
h✝ : IsPrimitiveRoot ζ k
p : ℕ
inst✝ : Nontrivial R
h : CharP R p
hp : p ≠ 2
⊢ 2 = orderOf (-1)

tactic: rw [orderOf_neg_one, if_neg]
state_before: case h.e'_4
M : Type u_1
N : Type u_2
G : Type u_3
R : Type u_4
S : Type u_5
F : Type u_6
inst✝⁴ : CommMonoid M
inst✝³ : CommMonoid N
inst✝² : DivisionCommMonoid G
k l : ℕ
inst✝¹ : CommRing R
ζ : Rˣ
h✝ : IsPrimitiveRoot ζ k
p : ℕ
inst✝ : Nontrivial R
h : CharP R p
hp : p ≠ 2
⊢ 2 = orderOf (-1)
state_after: case h.e'_4.hnc
M : Type u_1
N : Type u_2
G : Type u_3
R : Type u_4
S : Type u_5
F : Type u_6
inst✝⁴ : CommMonoid M
inst✝³ : CommMonoid N
inst✝² : DivisionCommMonoid G
k l : ℕ
inst✝¹ : CommRing R
ζ : Rˣ
h✝ : IsPrimitiveRoot ζ k
p : ℕ
inst✝ : Nontrivial R
h : CharP R p
hp : p ≠ 2
⊢ ¬ringChar R = 2

tactic: rwa [ringChar.eq_iff.mpr h]
state_before: case h.e'_4.hnc
M : Type u_1
N : Type u_2
G : Type u_3
R : Type u_4
S : Type u_5
F : Type u_6
inst✝⁴ : CommMonoid M
inst✝³ : CommMonoid N
inst✝² : DivisionCommMonoid G
k l : ℕ
inst✝¹ : CommRing R
ζ : Rˣ
h✝ : IsPrimitiveRoot ζ k
p : ℕ
inst✝ : Nontrivial R
h : CharP R p
hp : p ≠ 2
⊢ ¬ringChar R = 2
state_after: no goals
Theorem: Rel.comp_left_id
File: Mathlib/Data/Rel.lean

tactic: unfold comp
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r✝ r : Rel α β
⊢ Eq • r = r
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
r✝ r : Rel α β
⊢ (fun x z => ∃ y, x = y ∧ r y z) = r

tactic: ext x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r✝ r : Rel α β
⊢ (fun x z => ∃ y, x = y ∧ r y z) = r
state_after: case a.h.a
α : Type u_1
β : Type u_2
γ : Type u_3
r✝ r : Rel α β
x : α
x✝ : β
⊢ (∃ y, x = y ∧ r y x✝) ↔ r x x✝

tactic: simp
state_before: case a.h.a
α : Type u_1
β : Type u_2
γ : Type u_3
r✝ r : Rel α β
x : α
x✝ : β
⊢ (∃ y, x = y ∧ r y x✝) ↔ r x x✝
state_after: no goals
Theorem: fourier_neg'
File: Mathlib/Analysis/Fourier/AddCircle.lean

tactic: rw [← neg_smul, ← fourier_apply]
state_before: T : ℝ
n : ℤ
x : AddCircle T
⊢ ↑(-(n • x)).toCircle = (starRingEnd ℂ) ((fourier n) x)
state_after: T : ℝ
n : ℤ
x : AddCircle T
⊢ (fourier (-n)) x = (starRingEnd ℂ) ((fourier n) x)

tactic: exact fourier_neg
state_before: T : ℝ
n : ℤ
x : AddCircle T
⊢ (fourier (-n)) x = (starRingEnd ℂ) ((fourier n) x)
state_after: no goals
Theorem: Polynomial.aroots_C
File: Mathlib/Algebra/Polynomial/Roots.lean

tactic: rw [aroots_def, map_C, roots_C]
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
p q : R[X]
inst✝³ : CommRing T
inst✝² : CommRing S
inst✝¹ : IsDomain S
inst✝ : Algebra T S
a : T
⊢ (C a).aroots S = 0
state_after: no goals
Theorem: groupCohomology.mem_oneCocycles_iff
File: Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean

tactic: simp_rw [mem_oneCocycles_def, sub_add_eq_add_sub, sub_eq_zero, eq_comm]
state_before: k G : Type u
inst✝¹ : CommRing k
inst✝ : Group G
A : Rep k G
f : G → CoeSort.coe A
⊢ f ∈ oneCocycles A ↔ ∀ (g h : G), f (g * h) = (A.ρ g) (f h) + f g
state_after: no goals
Theorem: Real.one_lt_exp_iff
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← exp_zero, exp_lt_exp]
state_before: x✝ y x : ℝ
⊢ 1 < rexp x ↔ 0 < x
state_after: no goals
Theorem: UpperHalfPlane.atImInfty_mem
File: Mathlib/Analysis/Complex/UpperHalfPlane/FunctionsBoundedAtInfty.lean

tactic: simp only [atImInfty_basis.mem_iff, true_and]
state_before: S : Set ℍ
⊢ S ∈ atImInfty ↔ ∃ A, ∀ (z : ℍ), A ≤ z.im → z ∈ S
state_after: S : Set ℍ
⊢ (∃ i, im ⁻¹' Set.Ici i ⊆ S) ↔ ∃ A, ∀ (z : ℍ), A ≤ z.im → z ∈ S

tactic: rfl
state_before: S : Set ℍ
⊢ (∃ i, im ⁻¹' Set.Ici i ⊆ S) ↔ ∃ A, ∀ (z : ℍ), A ≤ z.im → z ∈ S
state_after: no goals
Theorem: Submonoid.sup_eq_closure_mul
File: Mathlib/Algebra/Group/Submonoid/Pointwise.lean

tactic: rw [closure_eq, closure_eq]
state_before: α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝¹ : Monoid M
inst✝ : AddMonoid A
s t u : Set M
H K : Submonoid M
⊢ closure ↑H ⊔ closure ↑K ≤ H ⊔ K
state_after: no goals
Theorem: Matroid.restrict_ground_eq_self
File: Mathlib/Data/Matroid/Restrict.lean

tactic: refine eq_of_indep_iff_indep_forall rfl ?_
state_before: α : Type u_1
M✝ : Matroid α
R I J X Y : Set α
M : Matroid α
⊢ M ↾ M.E = M
state_after: α : Type u_1
M✝ : Matroid α
R I J X Y : Set α
M : Matroid α
⊢ ∀ I ⊆ (M ↾ M.E).E, (M ↾ M.E).Indep I ↔ M.Indep I

tactic: aesop
state_before: α : Type u_1
M✝ : Matroid α
R I J X Y : Set α
M : Matroid α
⊢ ∀ I ⊆ (M ↾ M.E).E, (M ↾ M.E).Indep I ↔ M.Indep I
state_after: no goals
Theorem: CategoryTheory.sheafComposeIso_inv_fac
File: Mathlib/CategoryTheory/Sites/PreservesSheafification.lean

tactic: rw [← sheafComposeIso_hom_fac, assoc, Iso.hom_inv_id, comp_id]
state_before: C : Type u
inst✝⁶ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u_1
B : Type u_2
inst✝⁵ : Category.{u_4, u_1} A
inst✝⁴ : Category.{u_3, u_2} B
F : A ⥤ B
inst✝³ : HasWeakSheafify J A
inst✝² : HasWeakSheafify J B
inst✝¹ : J.HasSheafCompose F
inst✝ : J.PreservesSheafification F
P : Cᵒᵖ ⥤ A
⊢ whiskerRight (toSheafify J P) F ≫ (sheafifyComposeIso J F P).inv = toSheafify J (P ⋙ F)
state_after: no goals
Theorem: List.nil_eq_rotate_iff
File: Mathlib/Data/List/Rotate.lean

tactic: rw [eq_comm, rotate_eq_nil_iff, eq_comm]
state_before: α : Type u
l : List α
n : ℕ
⊢ [] = l.rotate n ↔ [] = l
state_after: no goals
Theorem: Sum.update_inl_apply_inl
File: Mathlib/Data/Sum/Basic.lean

tactic: rw [← update_inl_comp_inl, Function.comp_apply]
state_before: α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_1
δ : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq (α ⊕ β)
f : α ⊕ β → γ
i j : α
x : γ
⊢ update f (inl i) x (inl j) = update (f ∘ inl) i x j
state_after: no goals
Theorem: CategoryTheory.Subgroupoid.le_iff
File: Mathlib/CategoryTheory/Groupoid/Subgroupoid.lean

tactic: rw [SetLike.le_def, Sigma.forall]
state_before: C : Type u
inst✝ : Groupoid C
S✝ S T : Subgroupoid C
⊢ S ≤ T ↔ ∀ {c d : C}, S.arrows c d ⊆ T.arrows c d
state_after: C : Type u
inst✝ : Groupoid C
S✝ S T : Subgroupoid C
⊢ (∀ (a : C) (b : (d : C) × (a ⟶ d)), ⟨a, b⟩ ∈ S → ⟨a, b⟩ ∈ T) ↔ ∀ {c d : C}, S.arrows c d ⊆ T.arrows c d

tactic: exact forall_congr' fun c => Sigma.forall
state_before: C : Type u
inst✝ : Groupoid C
S✝ S T : Subgroupoid C
⊢ (∀ (a : C) (b : (d : C) × (a ⟶ d)), ⟨a, b⟩ ∈ S → ⟨a, b⟩ ∈ T) ↔ ∀ {c d : C}, S.arrows c d ⊆ T.arrows c d
state_after: no goals
Theorem: Mathlib.Meta.NormNum.isInt_pow
File: Mathlib/Tactic/NormNum/Pow.lean

tactic: simp
state_before: α : Type u_1
inst✝ : Ring α
n✝¹ : ℤ
n✝ : ℕ
⊢ ↑n✝¹ ^ ↑n✝ = ↑(n✝¹.pow n✝)
state_after: no goals
Theorem: ENNReal.rpow_eq_zero_iff_of_pos
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: simp [hy, hy.not_lt]
state_before: x : ℝ≥0∞
y : ℝ
hy : 0 < y
⊢ x ^ y = 0 ↔ x = 0
state_after: no goals
Theorem: image_toPullbackDiag
File: Mathlib/Data/Set/Prod.lean

tactic: ext x
state_before: X : Type u_1
Y : Sort u_2
Z : ?m.78474
f : X → Y
s : Set X
⊢ toPullbackDiag f '' s = pullbackDiagonal f ∩ Subtype.val ⁻¹' s ×ˢ s
state_after: case h
X : Type u_1
Y : Sort u_2
Z : ?m.78474
f : X → Y
s : Set X
x : Pullback f f
⊢ x ∈ toPullbackDiag f '' s ↔ x ∈ pullbackDiagonal f ∩ Subtype.val ⁻¹' s ×ˢ s

tactic: constructor
state_before: case h
X : Type u_1
Y : Sort u_2
Z : ?m.78474
f : X → Y
s : Set X
x : Pullback f f
⊢ x ∈ toPullbackDiag f '' s ↔ x ∈ pullbackDiagonal f ∩ Subtype.val ⁻¹' s ×ˢ s
state_after: case h.mp
X : Type u_1
Y : Sort u_2
Z : ?m.78474
f : X → Y
s : Set X
x : Pullback f f
⊢ x ∈ toPullbackDiag f '' s → x ∈ pullbackDiagonal f ∩ Subtype.val ⁻¹' s ×ˢ s

case h.mpr
X : Type u_1
Y : Sort u_2
Z : ?m.78474
f : X → Y
s : Set X
x : Pullback f f
⊢ x ∈ pullbackDiagonal f ∩ Subtype.val ⁻¹' s ×ˢ s → x ∈ toPullbackDiag f '' s

tactic: rintro ⟨x, hx, rfl⟩
state_before: case h.mp
X : Type u_1
Y : Sort u_2
Z : ?m.78474
f : X → Y
s : Set X
x : Pullback f f
⊢ x ∈ toPullbackDiag f '' s → x ∈ pullbackDiagonal f ∩ Subtype.val ⁻¹' s ×ˢ s
state_after: case h.mp.intro.intro
X : Type u_1
Y : Sort u_2
Z : ?m.78474
f : X → Y
s : Set X
x : X
hx : x ∈ s
⊢ toPullbackDiag f x ∈ pullbackDiagonal f ∩ Subtype.val ⁻¹' s ×ˢ s

tactic: exact ⟨rfl, hx, hx⟩
state_before: case h.mp.intro.intro
X : Type u_1
Y : Sort u_2
Z : ?m.78474
f : X → Y
s : Set X
x : X
hx : x ∈ s
⊢ toPullbackDiag f x ∈ pullbackDiagonal f ∩ Subtype.val ⁻¹' s ×ˢ s
state_after: no goals

tactic: obtain ⟨⟨x, y⟩, h⟩ := x
state_before: case h.mpr
X : Type u_1
Y : Sort u_2
Z : ?m.78474
f : X → Y
s : Set X
x : Pullback f f
⊢ x ∈ pullbackDiagonal f ∩ Subtype.val ⁻¹' s ×ˢ s → x ∈ toPullbackDiag f '' s
state_after: case h.mpr.mk.mk
X : Type u_1
Y : Sort u_2
Z : ?m.78474
f : X → Y
s : Set X
x y : X
h : f (x, y).1 = f (x, y).2
⊢ ⟨(x, y), h⟩ ∈ pullbackDiagonal f ∩ Subtype.val ⁻¹' s ×ˢ s → ⟨(x, y), h⟩ ∈ toPullbackDiag f '' s

tactic: rintro ⟨rfl : x = y, h2x⟩
state_before: case h.mpr.mk.mk
X : Type u_1
Y : Sort u_2
Z : ?m.78474
f : X → Y
s : Set X
x y : X
h : f (x, y).1 = f (x, y).2
⊢ ⟨(x, y), h⟩ ∈ pullbackDiagonal f ∩ Subtype.val ⁻¹' s ×ˢ s → ⟨(x, y), h⟩ ∈ toPullbackDiag f '' s
state_after: case h.mpr.mk.mk.intro
X : Type u_1
Y : Sort u_2
Z : ?m.78474
f : X → Y
s : Set X
x : X
h : f (x, x).1 = f (x, x).2
h2x : ⟨(x, x), h⟩ ∈ Subtype.val ⁻¹' s ×ˢ s
⊢ ⟨(x, x), h⟩ ∈ toPullbackDiag f '' s

tactic: exact mem_image_of_mem _ h2x.1
state_before: case h.mpr.mk.mk.intro
X : Type u_1
Y : Sort u_2
Z : ?m.78474
f : X → Y
s : Set X
x : X
h : f (x, x).1 = f (x, x).2
h2x : ⟨(x, x), h⟩ ∈ Subtype.val ⁻¹' s ×ˢ s
⊢ ⟨(x, x), h⟩ ∈ toPullbackDiag f '' s
state_after: no goals
Theorem: ProbabilityTheory.evariance_zero
File: Mathlib/Probability/Variance.lean

tactic: simp [evariance]
state_before: Ω : Type u_1
m : MeasurableSpace Ω
X : Ω → ℝ
μ : Measure Ω
⊢ evariance 0 μ = 0
state_after: no goals
Theorem: MeasureTheory.stoppedProcess_eq_of_le
File: Mathlib/Probability/Process/Stopping.lean

tactic: simp [stoppedProcess, min_eq_left h]
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : LinearOrder ι
u : ι → Ω → β
τ : Ω → ι
i : ι
ω : Ω
h : i ≤ τ ω
⊢ stoppedProcess u τ i ω = u i ω
state_after: no goals
Theorem: Matrix.fromColumns_toColumns
File: Mathlib/Data/Matrix/ColumnRowPartitioned.lean

tactic: ext i (j | j) <;> 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₂
A : Matrix m (n₁ ⊕ n₂) R
⊢ A.toColumns₁.fromColumns A.toColumns₂ = A
state_after: no goals
Theorem: isCompact_iff_ultrafilter_le_nhds
File: Mathlib/Topology/Compactness/Compact.lean

tactic: refine (forall_neBot_le_iff ?_).trans ?_
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
⊢ IsCompact s ↔ ∀ (f : Ultrafilter X), ↑f ≤ 𝓟 s → ∃ x ∈ s, ↑f ≤ 𝓝 x
state_after: case refine_1
X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
⊢ Monotone fun f => ∃ x ∈ s, ClusterPt x f

case refine_2
X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
⊢ (∀ (f : Ultrafilter X), ↑f ≤ 𝓟 s → ∃ x ∈ s, ClusterPt x ↑f) ↔ ∀ (f : Ultrafilter X), ↑f ≤ 𝓟 s → ∃ x ∈ s, ↑f ≤ 𝓝 x

tactic: rintro f g hle ⟨x, hxs, hxf⟩
state_before: case refine_1
X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
⊢ Monotone fun f => ∃ x ∈ s, ClusterPt x f
state_after: case refine_1.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
f g : Filter X
hle : f ≤ g
x : X
hxs : x ∈ s
hxf : ClusterPt x f
⊢ ∃ x ∈ s, ClusterPt x g

tactic: exact ⟨x, hxs, hxf.mono hle⟩
state_before: case refine_1.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
f g : Filter X
hle : f ≤ g
x : X
hxs : x ∈ s
hxf : ClusterPt x f
⊢ ∃ x ∈ s, ClusterPt x g
state_after: no goals

tactic: simp only [Ultrafilter.clusterPt_iff]
state_before: case refine_2
X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
⊢ (∀ (f : Ultrafilter X), ↑f ≤ 𝓟 s → ∃ x ∈ s, ClusterPt x ↑f) ↔ ∀ (f : Ultrafilter X), ↑f ≤ 𝓟 s → ∃ x ∈ s, ↑f ≤ 𝓝 x
state_after: no goals
Theorem: CategoryTheory.presheafHom_map_app
File: Mathlib/CategoryTheory/Sites/SheafHom.lean

tactic: subst w
state_before: C : Type u
inst✝¹ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝ : Category.{v', u'} A
F G : Cᵒᵖ ⥤ A
X Y Z : C
f : Z ⟶ Y
g : Y ⟶ X
h : Z ⟶ X
w : f ≫ g = h
α : (presheafHom F G).obj { unop := X }
⊢ ((presheafHom F G).map g.op α).app { unop := Over.mk f } = α.app { unop := Over.mk h }
state_after: C : Type u
inst✝¹ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝ : Category.{v', u'} A
F G : Cᵒᵖ ⥤ A
X Y Z : C
f : Z ⟶ Y
g : Y ⟶ X
α : (presheafHom F G).obj { unop := X }
⊢ ((presheafHom F G).map g.op α).app { unop := Over.mk f } = α.app { unop := Over.mk (f ≫ g) }

tactic: rfl
state_before: C : Type u
inst✝¹ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝ : Category.{v', u'} A
F G : Cᵒᵖ ⥤ A
X Y Z : C
f : Z ⟶ Y
g : Y ⟶ X
α : (presheafHom F G).obj { unop := X }
⊢ ((presheafHom F G).map g.op α).app { unop := Over.mk f } = α.app { unop := Over.mk (f ≫ g) }
state_after: no goals
Theorem: inv_smul_eq_iff₀
File: Mathlib/GroupTheory/GroupAction/Group.lean

tactic: rw [← h, smul_inv_smul₀ ha]
state_before: α : Type u
β : Type v
γ : Type w
inst✝¹ : GroupWithZero α
inst✝ : MulAction α β
a✝ a : α
ha : a ≠ 0
x y : β
h : a⁻¹ • x = y
⊢ x = a • y
state_after: no goals

tactic: rw [h, inv_smul_smul₀ ha]
state_before: α : Type u
β : Type v
γ : Type w
inst✝¹ : GroupWithZero α
inst✝ : MulAction α β
a✝ a : α
ha : a ≠ 0
x y : β
h : x = a • y
⊢ a⁻¹ • x = y
state_after: no goals
Theorem: rank_eq_card_basis
File: Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean

tactic: classical
haveI := nontrivial_of_invariantBasisNumber R
rw [← h.mk_range_eq_rank, Cardinal.mk_fintype, Set.card_range_of_injective h.injective]
state_before: R : Type u
M : Type v
inst✝⁴ : Ring R
inst✝³ : AddCommGroup M
inst✝² : Module R M
ι✝ : Type w
ι' : Type w'
inst✝¹ : StrongRankCondition R
ι : Type w
inst✝ : Fintype ι
h : Basis ι R M
⊢ Module.rank R M = ↑(Fintype.card ι)
state_after: no goals

tactic: haveI := nontrivial_of_invariantBasisNumber R
state_before: R : Type u
M : Type v
inst✝⁴ : Ring R
inst✝³ : AddCommGroup M
inst✝² : Module R M
ι✝ : Type w
ι' : Type w'
inst✝¹ : StrongRankCondition R
ι : Type w
inst✝ : Fintype ι
h : Basis ι R M
⊢ Module.rank R M = ↑(Fintype.card ι)
state_after: R : Type u
M : Type v
inst✝⁴ : Ring R
inst✝³ : AddCommGroup M
inst✝² : Module R M
ι✝ : Type w
ι' : Type w'
inst✝¹ : StrongRankCondition R
ι : Type w
inst✝ : Fintype ι
h : Basis ι R M
this : Nontrivial R
⊢ Module.rank R M = ↑(Fintype.card ι)

tactic: rw [← h.mk_range_eq_rank, Cardinal.mk_fintype, Set.card_range_of_injective h.injective]
state_before: R : Type u
M : Type v
inst✝⁴ : Ring R
inst✝³ : AddCommGroup M
inst✝² : Module R M
ι✝ : Type w
ι' : Type w'
inst✝¹ : StrongRankCondition R
ι : Type w
inst✝ : Fintype ι
h : Basis ι R M
this : Nontrivial R
⊢ Module.rank R M = ↑(Fintype.card ι)
state_after: no goals
Theorem: Filter.HasBasis.le_iff
File: Mathlib/Order/Filter/Bases.lean

tactic: simp only [le_def, hl.mem_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
l l' : Filter α
p : ι → Prop
s : ι → Set α
t : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
hl : l.HasBasis p s
⊢ l ≤ l' ↔ ∀ t ∈ l', ∃ i, p i ∧ s i ⊆ t
state_after: no goals
Theorem: hammingDist_lt_one
File: Mathlib/InformationTheory/Hamming.lean

tactic: rw [Nat.lt_one_iff, hammingDist_eq_zero]
state_before: α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝² : Fintype ι
inst✝¹ : (i : ι) → DecidableEq (β i)
γ : ι → Type u_4
inst✝ : (i : ι) → DecidableEq (γ i)
x y : (i : ι) → β i
⊢ hammingDist x y < 1 ↔ x = y
state_after: no goals
Theorem: AlgHom.restrictNormal_comp
File: Mathlib/FieldTheory/Normal.lean

tactic: simp only [AlgHom.comp_apply, AlgHom.restrictNormal_commutes]
state_before: F : Type u_1
K : Type u_2
inst✝¹⁸ : Field F
inst✝¹⁷ : Field K
inst✝¹⁶ : Algebra F K
K₁ : Type u_3
K₂ : Type u_4
K₃ : Type u_5
inst✝¹⁵ : Field F
inst✝¹⁴ : Field K₁
inst✝¹³ : Field K₂
inst✝¹² : Field K₃
inst✝¹¹ : Algebra F K₁
inst✝¹⁰ : Algebra F K₂
inst✝⁹ : Algebra F K₃
ϕ : K₁ →ₐ[F] K₂
χ : K₁ ≃ₐ[F] K₂
ψ : K₂ →ₐ[F] K₃
ω : K₂ ≃ₐ[F] K₃
E : Type u_6
inst✝⁸ : Field E
inst✝⁷ : Algebra F E
inst✝⁶ : Algebra E K₁
inst✝⁵ : Algebra E K₂
inst✝⁴ : Algebra E K₃
inst✝³ : IsScalarTower F E K₁
inst✝² : IsScalarTower F E K₂
inst✝¹ : IsScalarTower F E K₃
inst✝ : Normal F E
x✝ : E
⊢ (algebraMap E K₃) (((ψ.restrictNormal E).comp (ϕ.restrictNormal E)) x✝) =
    (algebraMap E K₃) (((ψ.comp ϕ).restrictNormal E) x✝)
state_after: no goals
Theorem: Quiver.Path.cast_eq_iff_heq
File: Mathlib/Combinatorics/Quiver/Cast.lean

tactic: rw [Path.cast_eq_cast]
state_before: U : Type u_1
inst✝ : Quiver U
u v u' v' : U
hu : u = u'
hv : v = v'
p : Path u v
p' : Path u' v'
⊢ cast hu hv p = p' ↔ HEq p p'
state_after: U : Type u_1
inst✝ : Quiver U
u v u' v' : U
hu : u = u'
hv : v = v'
p : Path u v
p' : Path u' v'
⊢ _root_.cast ⋯ p = p' ↔ HEq p p'

tactic: exact _root_.cast_eq_iff_heq
state_before: U : Type u_1
inst✝ : Quiver U
u v u' v' : U
hu : u = u'
hv : v = v'
p : Path u v
p' : Path u' v'
⊢ _root_.cast ⋯ p = p' ↔ HEq p p'
state_after: no goals
Theorem: IntermediateField.AdjoinSimple.isIntegral_gen
File: Mathlib/FieldTheory/Adjoin.lean

tactic: conv_rhs => rw [← AdjoinSimple.algebraMap_gen F α]
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
⊢ IsIntegral F (gen F α) ↔ IsIntegral F α
state_after: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
⊢ IsIntegral F (gen F α) ↔ IsIntegral F ((algebraMap (↥F⟮α⟯) E) (gen F α))

tactic: rw [isIntegral_algebraMap_iff (algebraMap F⟮α⟯ E).injective]
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
⊢ IsIntegral F (gen F α) ↔ IsIntegral F ((algebraMap (↥F⟮α⟯) E) (gen F α))
state_after: no goals
Theorem: Heyting.IsRegular.disjoint_compl_left_iff
File: Mathlib/Order/Heyting/Regular.lean

tactic: rw [← le_compl_iff_disjoint_left, ha.eq]
state_before: α : Type u_1
inst✝ : HeytingAlgebra α
a b : α
ha : IsRegular a
⊢ Disjoint aᶜ b ↔ b ≤ a
state_after: no goals
Theorem: Real.volume_closedBall
File: Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean

tactic: rw [closedBall_eq_Icc, volume_Icc, ← sub_add, add_sub_cancel_left, two_mul]
state_before: ι : Type u_1
inst✝ : Fintype ι
a r : ℝ
⊢ volume (Metric.closedBall a r) = ofReal (2 * r)
state_after: no goals
Theorem: Composition.eq_ones_iff_le_length
File: Mathlib/Combinatorics/Enumerative/Composition.lean

tactic: simp [eq_ones_iff_length, le_antisymm_iff, c.length_le]
state_before: n : ℕ
c✝ c : Composition n
⊢ c = ones n ↔ n ≤ c.length
state_after: no goals
Theorem: FirstOrder.Language.Substructure.comap_id
File: Mathlib/ModelTheory/Substructures.lean

tactic: simp
state_before: L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
S✝ : L.Substructure M
s : Set M
S : L.Substructure P
⊢ ∀ (x : P), x ∈ comap (Hom.id L P) S ↔ x ∈ S
state_after: no goals
Theorem: NonUnitalAlgHom.fst_prod
File: Mathlib/Algebra/Algebra/NonUnitalHom.lean

tactic: rfl
state_before: R : Type u
S : Type u₁
T : Type u_1
inst✝¹² : Monoid R
inst✝¹¹ : Monoid S
inst✝¹⁰ : Monoid T
φ : R →* S
A : Type v
B : Type w
C : Type w₁
inst✝⁹ : NonUnitalNonAssocSemiring A
inst✝⁸ : DistribMulAction R A
inst✝⁷ : NonUnitalNonAssocSemiring B
inst✝⁶ : DistribMulAction S B
inst✝⁵ : NonUnitalNonAssocSemiring C
inst✝⁴ : DistribMulAction T C
φ' : S →* R
ψ : S →* T
χ : R →* T
B₁ : Type u_2
inst✝³ : NonUnitalNonAssocSemiring B₁
inst✝² : DistribMulAction R B₁
inst✝¹ : DistribMulAction R B
inst✝ : DistribMulAction R C
f : A →ₙₐ[R] B
g : A →ₙₐ[R] C
⊢ (fst R B C).comp (f.prod g) = f
state_after: no goals
Theorem: Set.ncard_union_add_ncard_inter
File: Mathlib/Data/Set/Card.lean

tactic: to_encard_tac
state_before: α : Type u_1
β : Type u_2
s✝ t✝ : Set α
f : α → β
s t : Set α
hs : autoParam s.Finite _auto✝
ht : autoParam t.Finite _auto✝
⊢ (s ∪ t).ncard + (s ∩ t).ncard = s.ncard + t.ncard
state_after: α : Type u_1
β : Type u_2
s✝ t✝ : Set α
f : α → β
s t : Set α
hs : autoParam s.Finite _auto✝
ht : autoParam t.Finite _auto✝
⊢ ↑(s ∪ t).ncard + ↑(s ∩ t).ncard = ↑s.ncard + ↑t.ncard

tactic: rw [hs.cast_ncard_eq, ht.cast_ncard_eq, (hs.union ht).cast_ncard_eq,
(hs.subset inter_subset_left).cast_ncard_eq, encard_union_add_encard_inter]
state_before: α : Type u_1
β : Type u_2
s✝ t✝ : Set α
f : α → β
s t : Set α
hs : autoParam s.Finite _auto✝
ht : autoParam t.Finite _auto✝
⊢ ↑(s ∪ t).ncard + ↑(s ∩ t).ncard = ↑s.ncard + ↑t.ncard
state_after: no goals
Theorem: Nat.floor_pos
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [Nat.lt_iff_add_one_le, zero_add, le_floor_iff' Nat.one_ne_zero, cast_one]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a : α
n : ℕ
⊢ 0 < ⌊a⌋₊ ↔ 1 ≤ a
state_after: no goals
Theorem: CategoryTheory.effectiveEpiFamilyStructCompIso_aux
File: Mathlib/CategoryTheory/EffectiveEpi/Comp.lean

tactic: apply h
state_before: C : Type u_1
inst✝² : Category.{u_3, u_1} C
B B' : C
α : Type u_2
X : α → C
π : (a : α) → X a ⟶ B
inst✝¹ : EffectiveEpiFamily X π
i : B ⟶ B'
inst✝ : IsIso i
W : C
e : (a : α) → X a ⟶ W
h : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ ≫ i = g₂ ≫ π a₂ ≫ i → g₁ ≫ e a₁ = g₂ ≫ e a₂
Z : C
a₁ a₂ : α
g₁ : Z ⟶ X a₁
g₂ : Z ⟶ X a₂
hg : g₁ ≫ π a₁ = g₂ ≫ π a₂
⊢ g₁ ≫ e a₁ = g₂ ≫ e a₂
state_after: case a
C : Type u_1
inst✝² : Category.{u_3, u_1} C
B B' : C
α : Type u_2
X : α → C
π : (a : α) → X a ⟶ B
inst✝¹ : EffectiveEpiFamily X π
i : B ⟶ B'
inst✝ : IsIso i
W : C
e : (a : α) → X a ⟶ W
h : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ ≫ i = g₂ ≫ π a₂ ≫ i → g₁ ≫ e a₁ = g₂ ≫ e a₂
Z : C
a₁ a₂ : α
g₁ : Z ⟶ X a₁
g₂ : Z ⟶ X a₂
hg : g₁ ≫ π a₁ = g₂ ≫ π a₂
⊢ g₁ ≫ π a₁ ≫ i = g₂ ≫ π a₂ ≫ i

tactic: rw [← Category.assoc, hg]
state_before: case a
C : Type u_1
inst✝² : Category.{u_3, u_1} C
B B' : C
α : Type u_2
X : α → C
π : (a : α) → X a ⟶ B
inst✝¹ : EffectiveEpiFamily X π
i : B ⟶ B'
inst✝ : IsIso i
W : C
e : (a : α) → X a ⟶ W
h : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ ≫ i = g₂ ≫ π a₂ ≫ i → g₁ ≫ e a₁ = g₂ ≫ e a₂
Z : C
a₁ a₂ : α
g₁ : Z ⟶ X a₁
g₂ : Z ⟶ X a₂
hg : g₁ ≫ π a₁ = g₂ ≫ π a₂
⊢ g₁ ≫ π a₁ ≫ i = g₂ ≫ π a₂ ≫ i
state_after: case a
C : Type u_1
inst✝² : Category.{u_3, u_1} C
B B' : C
α : Type u_2
X : α → C
π : (a : α) → X a ⟶ B
inst✝¹ : EffectiveEpiFamily X π
i : B ⟶ B'
inst✝ : IsIso i
W : C
e : (a : α) → X a ⟶ W
h : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ ≫ i = g₂ ≫ π a₂ ≫ i → g₁ ≫ e a₁ = g₂ ≫ e a₂
Z : C
a₁ a₂ : α
g₁ : Z ⟶ X a₁
g₂ : Z ⟶ X a₂
hg : g₁ ≫ π a₁ = g₂ ≫ π a₂
⊢ (g₂ ≫ π a₂) ≫ i = g₂ ≫ π a₂ ≫ i

tactic: simp
state_before: case a
C : Type u_1
inst✝² : Category.{u_3, u_1} C
B B' : C
α : Type u_2
X : α → C
π : (a : α) → X a ⟶ B
inst✝¹ : EffectiveEpiFamily X π
i : B ⟶ B'
inst✝ : IsIso i
W : C
e : (a : α) → X a ⟶ W
h : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ ≫ i = g₂ ≫ π a₂ ≫ i → g₁ ≫ e a₁ = g₂ ≫ e a₂
Z : C
a₁ a₂ : α
g₁ : Z ⟶ X a₁
g₂ : Z ⟶ X a₂
hg : g₁ ≫ π a₁ = g₂ ≫ π a₂
⊢ (g₂ ≫ π a₂) ≫ i = g₂ ≫ π a₂ ≫ i
state_after: no goals