ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: NonUnitalRing.toNonUnitalNonAssocring_injective
File: Mathlib/Algebra/Ring/Ext.lean

Proof steps:
state_before: R : Type u
⊢ Function.Injective (@toNonUnitalNonAssocRing R)
state_after: R : Type u
a₁✝ a₂✝ : NonUnitalRing R
a✝ : toNonUnitalNonAssocRing = toNonUnitalNonAssocRing
⊢ a₁✝ = a₂✝
tactic: intro _ _ _
state_before: R : Type u
a₁✝ a₂✝ : NonUnitalRing R
a✝ : toNonUnitalNonAssocRing = toNonUnitalNonAssocRing
⊢ a₁✝ = a₂✝
state_after: no goals
tactic: ext <;> congr
Theorem: CategoryTheory.Limits.limitBiconeOfUnique_isBilimit_isColimit
File: Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean

Proof steps:
state_before: J : Type w
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
D : Type uD
inst✝² : Category.{uD', uD} D
inst✝¹ : HasZeroMorphisms D
inst✝ : Unique J
f : J → C
j : J
⊢ f default = f j
state_after: case e_a
J : Type w
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
D : Type uD
inst✝² : Category.{uD', uD} D
inst✝¹ : HasZeroMorphisms D
inst✝ : Unique J
f : J → C
j : J
⊢ default = j
tactic: congr
state_before: case e_a
J : Type w
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
D : Type uD
inst✝² : Category.{uD', uD} D
inst✝¹ : HasZeroMorphisms D
inst✝ : Unique J
f : J → C
j : J
⊢ default = j
state_after: no goals
tactic: rw [← Unique.uniq]
state_before: J : Type w
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
D : Type uD
inst✝² : Category.{uD', uD} D
inst✝¹ : HasZeroMorphisms D
inst✝ : Unique J
f : J → C
j : J
⊢ f j = f default
state_after: case e_a
J : Type w
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
D : Type uD
inst✝² : Category.{uD', uD} D
inst✝¹ : HasZeroMorphisms D
inst✝ : Unique J
f : J → C
j : J
⊢ j = default
tactic: congr
state_before: case e_a
J : Type w
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
D : Type uD
inst✝² : Category.{uD', uD} D
inst✝¹ : HasZeroMorphisms D
inst✝ : Unique J
f : J → C
j : J
⊢ j = default
state_after: no goals
tactic: rw [← Unique.uniq]
Theorem: smul_eq_self_of_preimage_zpow_eq_self
File: Mathlib/Data/Set/Pointwise/Iterate.lean

Proof steps:
state_before: G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
⊢ g • s = s
state_after: G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
⊢ ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s
tactic: suffices ∀ {g' : G} (_ : g' ^ n ^ j = 1), g' • s ⊆ s by
    refine le_antisymm (this hg) ?_
    conv_lhs => rw [← smul_inv_smul g s]
    replace hg : g⁻¹ ^ n ^ j = 1 := by rw [inv_zpow, hg, inv_one]
    simpa only [le_eq_subset, set_smul_subset_set_smul_iff] using this hg
state_before: G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
⊢ ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s
state_after: G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
⊢ ∀ {g' : G}, g' ^ n ^ j = 1 → g' • (fun x => x ^ n)^[j] ⁻¹' s ⊆ (fun x => x ^ n)^[j] ⁻¹' s
tactic: rw [(IsFixedPt.preimage_iterate hs j : (zpowGroupHom n)^[j] ⁻¹' s = s).symm]
state_before: G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
⊢ ∀ {g' : G}, g' ^ n ^ j = 1 → g' • (fun x => x ^ n)^[j] ⁻¹' s ⊆ (fun x => x ^ n)^[j] ⁻¹' s
state_after: case intro.intro
G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
g' : G
hg' : g' ^ n ^ j = 1
y : G
hy : y ∈ (fun x => x ^ n)^[j] ⁻¹' s
⊢ (fun x => g' • x) y ∈ (fun x => x ^ n)^[j] ⁻¹' s
tactic: rintro g' hg' - ⟨y, hy, rfl⟩
state_before: case intro.intro
G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
g' : G
hg' : g' ^ n ^ j = 1
y : G
hy : y ∈ (fun x => x ^ n)^[j] ⁻¹' s
⊢ (fun x => g' • x) y ∈ (fun x => x ^ n)^[j] ⁻¹' s
state_after: case intro.intro
G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
g' : G
hg' : g' ^ n ^ j = 1
y : G
hy : y ∈ (fun x => x ^ n)^[j] ⁻¹' s
⊢ (⇑(zpowGroupHom n))^[j] (g' * y) ∈ s
tactic: change (zpowGroupHom n)^[j] (g' * y) ∈ s
state_before: case intro.intro
G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
g' : G
hg' : g' ^ n ^ j = 1
y : G
hy : y ∈ (fun x => x ^ n)^[j] ⁻¹' s
⊢ (⇑(zpowGroupHom n))^[j] (g' * y) ∈ s
state_after: case intro.intro
G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
g' y : G
hy : y ∈ (fun x => x ^ n)^[j] ⁻¹' s
hg' : (⇑(zpowGroupHom n))^[j] g' = 1
⊢ (⇑(zpowGroupHom n))^[j] (g' * y) ∈ s
tactic: replace hg' : (zpowGroupHom n)^[j] g' = 1 := by simpa [zpowGroupHom]
state_before: case intro.intro
G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
g' y : G
hy : y ∈ (fun x => x ^ n)^[j] ⁻¹' s
hg' : (⇑(zpowGroupHom n))^[j] g' = 1
⊢ (⇑(zpowGroupHom n))^[j] (g' * y) ∈ s
state_after: no goals
tactic: rwa [iterate_map_mul, hg', one_mul]
Theorem: sub_one_nsmul_add
File: Mathlib/Algebra/Group/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : Monoid M
a✝ b c : M
m n : ℕ
hn : n ≠ 0
a : M
⊢ a * a ^ (n - 1) = a ^ n
state_after: no goals
tactic: rw [← pow_succ', Nat.sub_add_cancel $ Nat.one_le_iff_ne_zero.2 hn]
Theorem: contMDiffAt_iff_source_of_mem_source
File: Mathlib/Geometry/Manifold/ContMDiff/Defs.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝³⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³⁶ : NormedAddCommGroup E
inst✝³⁵ : NormedSpace 𝕜 E
H : Type u_3
inst✝³⁴ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝³³ : TopologicalSpace M
inst✝³² : ChartedSpace H M
inst✝³¹ : SmoothManifoldWithCorners I M
E' : Type u_5
inst✝³⁰ : NormedAddCommGroup E'
inst✝²⁹ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝²⁸ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝²⁷ : TopologicalSpace M'
inst✝²⁶ : ChartedSpace H' M'
inst✝²⁵ : SmoothManifoldWithCorners I' M'
E'' : Type u_8
inst✝²⁴ : NormedAddCommGroup E''
inst✝²³ : NormedSpace 𝕜 E''
H'' : Type u_9
inst✝²² : TopologicalSpace H''
I'' : ModelWithCorners 𝕜 E'' H''
M'' : Type u_10
inst✝²¹ : TopologicalSpace M''
inst✝²⁰ : ChartedSpace H'' M''
F : Type u_11
inst✝¹⁹ : NormedAddCommGroup F
inst✝¹⁸ : NormedSpace 𝕜 F
G : Type u_12
inst✝¹⁷ : TopologicalSpace G
J : ModelWithCorners 𝕜 F G
N : Type u_13
inst✝¹⁶ : TopologicalSpace N
inst✝¹⁵ : ChartedSpace G N
inst✝¹⁴ : SmoothManifoldWithCorners J N
F' : Type u_14
inst✝¹³ : NormedAddCommGroup F'
inst✝¹² : NormedSpace 𝕜 F'
G' : Type u_15
inst✝¹¹ : TopologicalSpace G'
J' : ModelWithCorners 𝕜 F' G'
N' : Type u_16
inst✝¹⁰ : TopologicalSpace N'
inst✝⁹ : ChartedSpace G' N'
inst✝⁸ : SmoothManifoldWithCorners J' N'
F₁ : Type u_17
inst✝⁷ : NormedAddCommGroup F₁
inst✝⁶ : NormedSpace 𝕜 F₁
F₂ : Type u_18
inst✝⁵ : NormedAddCommGroup F₂
inst✝⁴ : NormedSpace 𝕜 F₂
F₃ : Type u_19
inst✝³ : NormedAddCommGroup F₃
inst✝² : NormedSpace 𝕜 F₃
F₄ : Type u_20
inst✝¹ : NormedAddCommGroup F₄
inst✝ : NormedSpace 𝕜 F₄
e : PartialHomeomorph M H
e' : PartialHomeomorph M' H'
f f₁ : M → M'
s s₁ t : Set M
x : M
m n : ℕ∞
x' : M
hx' : x' ∈ (chartAt H x).source
⊢ ContMDiffAt I I' n f x' ↔
    ContMDiffWithinAt 𝓘(𝕜, E) I' n (f ∘ ↑(extChartAt I x).symm) (range ↑I) (↑(extChartAt I x) x')
state_after: no goals
tactic: simp_rw [ContMDiffAt, contMDiffWithinAt_iff_source_of_mem_source hx', preimage_univ, univ_inter]
Theorem: Finset.supIndep_map
File: Mathlib/Order/SupIndep.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s✝ t : Finset ι
f : ι → α
i : ι
s : Finset ι'
g : ι' ↪ ι
⊢ (map g s).SupIndep f ↔ s.SupIndep (f ∘ ⇑g)
state_after: case refine_1
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s✝ t✝ : Finset ι
f : ι → α
i✝ : ι
s : Finset ι'
g : ι' ↪ ι
hs : (map g s).SupIndep f
t : Finset ι'
ht : t ⊆ s
i : ι'
hi : i ∈ s
hit : i ∉ t
⊢ Disjoint ((f ∘ ⇑g) i) (t.sup (f ∘ ⇑g))

case refine_2
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s✝ t : Finset ι
f : ι → α
i : ι
s : Finset ι'
g : ι' ↪ ι
hs : s.SupIndep (f ∘ ⇑g)
⊢ (map g s).SupIndep f
tactic: refine ⟨fun hs t ht i hi hit => ?_, fun hs => ?_⟩
Theorem: MeasureTheory.Measure.measure_prod_null
File: Mathlib/MeasureTheory/Constructions/Prod/Basic.lean

Proof steps:
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁶ : MeasurableSpace α
inst✝⁵ : MeasurableSpace α'
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace β'
inst✝² : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝¹ : NormedAddCommGroup E
inst✝ : SFinite ν
s : Set (α × β)
hs : MeasurableSet s
⊢ (μ.prod ν) s = 0 ↔ (fun x => ν (Prod.mk x ⁻¹' s)) =ᶠ[ae μ] 0
state_after: no goals
tactic: rw [prod_apply hs, lintegral_eq_zero_iff (measurable_measure_prod_mk_left hs)]
Theorem: freeGroupEquivCoprodI_symm_apply
File: Mathlib/GroupTheory/CoprodI.lean

Proof steps:
state_before: ι✝ : Type u_1
M : ι✝ → Type u_2
inst✝¹ : (i : ι✝) → Monoid (M i)
N : Type u_3
inst✝ : Monoid N
ι : Type u_1
⊢ FreeGroup ι ≃* CoprodI fun x => FreeGroup Unit
state_after: case refine_1
ι✝ : Type u_1
M : ι✝ → Type u_2
inst✝¹ : (i : ι✝) → Monoid (M i)
N : Type u_3
inst✝ : Monoid N
ι : Type u_1
⊢ FreeGroup ι →* CoprodI fun x => FreeGroup Unit

case refine_2
ι✝ : Type u_1
M : ι✝ → Type u_2
inst✝¹ : (i : ι✝) → Monoid (M i)
N : Type u_3
inst✝ : Monoid N
ι : Type u_1
⊢ (CoprodI fun x => FreeGroup Unit) →* FreeGroup ι

case refine_3
ι✝ : Type u_1
M : ι✝ → Type u_2
inst✝¹ : (i : ι✝) → Monoid (M i)
N : Type u_3
inst✝ : Monoid N
ι : Type u_1
⊢ ?refine_2.comp ?refine_1 = MonoidHom.id (FreeGroup ι)

case refine_4
ι✝ : Type u_1
M : ι✝ → Type u_2
inst✝¹ : (i : ι✝) → Monoid (M i)
N : Type u_3
inst✝ : Monoid N
ι : Type u_1
⊢ ?refine_1.comp ?refine_2 = MonoidHom.id (CoprodI fun x => FreeGroup Unit)
tactic: refine MonoidHom.toMulEquiv ?_ ?_ ?_ ?_
Theorem: natCast_le_rank_iff_finset
File: Mathlib/LinearAlgebra/Dimension/Finite.lean

Proof steps:
state_before: R : Type u
M M₁ : Type v
M' : Type v'
ι : Type w
inst✝⁷ : Ring R
inst✝⁶ : AddCommGroup M
inst✝⁵ : AddCommGroup M'
inst✝⁴ : AddCommGroup M₁
inst✝³ : Module R M
inst✝² : Module R M'
inst✝¹ : Module R M₁
inst✝ : StrongRankCondition R
n : ℕ
x✝ : ∃ s, s.card = n ∧ LinearIndependent R Subtype.val
s : Finset M
h₁ : s.card = n
h₂ : LinearIndependent R Subtype.val
⊢ ↑n ≤ Module.rank R M
state_after: no goals
tactic: simpa [h₁] using h₂.cardinal_le_rank
Theorem: BddOrd.Iso.mk_inv
File: Mathlib/Order/Category/BddOrd.lean

Proof steps:
state_before: α β : BddOrd
e : ↑α.toPartOrd ≃o ↑β.toPartOrd
⊢ ↑e ≫ ↑e.symm = 𝟙 α
state_after: case w
α β : BddOrd
e : ↑α.toPartOrd ≃o ↑β.toPartOrd
x✝ : (forget BddOrd).obj α
⊢ (↑e ≫ ↑e.symm) x✝ = (𝟙 α) x✝
tactic: ext
state_before: case w
α β : BddOrd
e : ↑α.toPartOrd ≃o ↑β.toPartOrd
x✝ : (forget BddOrd).obj α
⊢ (↑e ≫ ↑e.symm) x✝ = (𝟙 α) x✝
state_after: no goals
tactic: exact e.symm_apply_apply _
state_before: α β : BddOrd
e : ↑α.toPartOrd ≃o ↑β.toPartOrd
⊢ ↑e.symm ≫ ↑e = 𝟙 β
state_after: case w
α β : BddOrd
e : ↑α.toPartOrd ≃o ↑β.toPartOrd
x✝ : (forget BddOrd).obj β
⊢ (↑e.symm ≫ ↑e) x✝ = (𝟙 β) x✝
tactic: ext
state_before: case w
α β : BddOrd
e : ↑α.toPartOrd ≃o ↑β.toPartOrd
x✝ : (forget BddOrd).obj β
⊢ (↑e.symm ≫ ↑e) x✝ = (𝟙 β) x✝
state_after: no goals
tactic: exact e.apply_symm_apply _
Theorem: Besicovitch.TauPackage.monotone_iUnionUpTo
File: Mathlib/MeasureTheory/Covering/Besicovitch.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
⊢ Monotone p.iUnionUpTo
state_after: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i j : Ordinal.{u}
hij : i ≤ j
⊢ p.iUnionUpTo i ≤ p.iUnionUpTo j
tactic: intro i j hij
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i j : Ordinal.{u}
hij : i ≤ j
⊢ p.iUnionUpTo i ≤ p.iUnionUpTo j
state_after: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i j : Ordinal.{u}
hij : i ≤ j
⊢ ⋃ j, ball (p.c (p.index ↑j)) (p.r (p.index ↑j)) ≤ ⋃ j_1, ball (p.c (p.index ↑j_1)) (p.r (p.index ↑j_1))
tactic: simp only [iUnionUpTo]
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i j : Ordinal.{u}
hij : i ≤ j
⊢ ⋃ j, ball (p.c (p.index ↑j)) (p.r (p.index ↑j)) ≤ ⋃ j_1, ball (p.c (p.index ↑j_1)) (p.r (p.index ↑j_1))
state_after: no goals
tactic: exact iUnion_mono' fun r => ⟨⟨r, r.2.trans_le hij⟩, Subset.rfl⟩
Theorem: IsLocalization.mem_span_map
File: Mathlib/RingTheory/Localization/Submodule.lean

Proof steps:
state_before: R : Type u_1
inst✝⁷ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : Algebra R S
P : Type u_3
inst✝⁴ : CommRing P
g : R →+* P
T : Submonoid P
hy : M ≤ Submonoid.comap g T
Q : Type u_4
inst✝³ : CommRing Q
inst✝² : Algebra P Q
inst✝¹ : IsLocalization T Q
inst✝ : IsLocalization M S
x : S
a : Set R
⊢ x ∈ Ideal.span (⇑(algebraMap R S) '' a) ↔ ∃ y ∈ Ideal.span a, ∃ z, x = mk' S y z
state_after: R : Type u_1
inst✝⁷ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : Algebra R S
P : Type u_3
inst✝⁴ : CommRing P
g : R →+* P
T : Submonoid P
hy : M ≤ Submonoid.comap g T
Q : Type u_4
inst✝³ : CommRing Q
inst✝² : Algebra P Q
inst✝¹ : IsLocalization T Q
inst✝ : IsLocalization M S
x : S
a : Set R
⊢ (∃ y ∈ Submodule.span R (⇑(algebraMap R S) '' a), ∃ z, x = mk' S 1 z • y) ↔ ∃ y ∈ Ideal.span a, ∃ z, x = mk' S y z
tactic: refine (mem_span_iff M).trans ?_
state_before: R : Type u_1
inst✝⁷ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : Algebra R S
P : Type u_3
inst✝⁴ : CommRing P
g : R →+* P
T : Submonoid P
hy : M ≤ Submonoid.comap g T
Q : Type u_4
inst✝³ : CommRing Q
inst✝² : Algebra P Q
inst✝¹ : IsLocalization T Q
inst✝ : IsLocalization M S
x : S
a : Set R
⊢ (∃ y ∈ Submodule.span R (⇑(algebraMap R S) '' a), ∃ z, x = mk' S 1 z • y) ↔ ∃ y ∈ Ideal.span a, ∃ z, x = mk' S y z
state_after: case mp
R : Type u_1
inst✝⁷ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : Algebra R S
P : Type u_3
inst✝⁴ : CommRing P
g : R →+* P
T : Submonoid P
hy : M ≤ Submonoid.comap g T
Q : Type u_4
inst✝³ : CommRing Q
inst✝² : Algebra P Q
inst✝¹ : IsLocalization T Q
inst✝ : IsLocalization M S
x : S
a : Set R
⊢ (∃ y ∈ Submodule.span R (⇑(algebraMap R S) '' a), ∃ z, x = mk' S 1 z • y) → ∃ y ∈ Ideal.span a, ∃ z, x = mk' S y z

case mpr
R : Type u_1
inst✝⁷ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : Algebra R S
P : Type u_3
inst✝⁴ : CommRing P
g : R →+* P
T : Submonoid P
hy : M ≤ Submonoid.comap g T
Q : Type u_4
inst✝³ : CommRing Q
inst✝² : Algebra P Q
inst✝¹ : IsLocalization T Q
inst✝ : IsLocalization M S
x : S
a : Set R
⊢ (∃ y ∈ Ideal.span a, ∃ z, x = mk' S y z) → ∃ y ∈ Submodule.span R (⇑(algebraMap R S) '' a), ∃ z, x = mk' S 1 z • y
tactic: constructor
Theorem: Multiset.sum_join
File: Mathlib/Data/Multiset/Bind.lean

Proof steps:
state_before: α : Type u_1
β : Type v
γ : Type u_2
δ : Type u_3
inst✝ : CommMonoid α
S : Multiset (Multiset α)
⊢ S.join.prod = (map prod S).prod
state_after: no goals
tactic: induction S using Multiset.induction with
  | empty => simp
  | cons _ _ ih => simp [ih]
Theorem: div_le_iff₀
File: Mathlib/Algebra/Order/GroupWithZero/Canonical.lean

Proof steps:
state_before: α : Type u_1
inst✝ : LinearOrderedCommGroupWithZero α
a b c d : α
m n : ℕ
hc : c ≠ 0
⊢ a / c ≤ b ↔ a ≤ b * c
state_after: no goals
tactic: rw [div_eq_mul_inv, mul_inv_le_iff₀ hc]
Theorem: Option.bind_congr
File: Mathlib/Data/Option/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
f g : α → Option β
x : Option α
h : ∀ (a : α), a ∈ x → f a = g a
⊢ x.bind f = x.bind g
state_after: no goals
tactic: cases x <;> simp only [some_bind, none_bind, mem_def, h]
Theorem: DilationEquiv.ratio_trans
File: Mathlib/Topology/MetricSpace/DilationEquiv.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
e : X ≃ᵈ Y
e' : Y ≃ᵈ Z
⊢ ratio (e.trans e') = ratio e * ratio e'
state_after: case pos
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
e : X ≃ᵈ Y
e' : Y ≃ᵈ Z
hX : ∀ (x y : X), edist x y = 0 ∨ edist x y = ⊤
⊢ ratio (e.trans e') = ratio e * ratio e'

case neg
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
e : X ≃ᵈ Y
e' : Y ≃ᵈ Z
hX : ¬∀ (x y : X), edist x y = 0 ∨ edist x y = ⊤
⊢ ratio (e.trans e') = ratio e * ratio e'
tactic: by_cases hX : ∀ x y : X, edist x y = 0 ∨ edist x y = ∞
state_before: case neg
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
e : X ≃ᵈ Y
e' : Y ≃ᵈ Z
hX : ¬∀ (x y : X), edist x y = 0 ∨ edist x y = ⊤
⊢ ratio (e.trans e') = ratio e * ratio e'
state_after: case neg
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
e : X ≃ᵈ Y
e' : Y ≃ᵈ Z
hX : ∃ x y, edist x y ≠ 0 ∧ edist x y ≠ ⊤
⊢ ratio (e.trans e') = ratio e * ratio e'
tactic: push_neg at hX
state_before: case neg
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
e : X ≃ᵈ Y
e' : Y ≃ᵈ Z
hX : ∃ x y, edist x y ≠ 0 ∧ edist x y ≠ ⊤
⊢ ratio (e.trans e') = ratio e * ratio e'
state_after: no goals
tactic: exact (Dilation.ratio_comp' (g := e'.toDilation) (f := e.toDilation) hX).trans (mul_comm _ _)
Theorem: Equiv.removeNone_aux_some
File: Mathlib/Logic/Equiv/Option.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
e : Option α ≃ Option β
x : α
h : ∃ x', e (some x) = some x'
⊢ some (e.removeNone_aux x) = e (some x)
state_after: no goals
tactic: simp [removeNone_aux, Option.isSome_iff_exists.mpr h]
Theorem: Matroid.coindep_iff_subset_compl_base
File: Mathlib/Data/Matroid/Dual.lean

Proof steps:
state_before: α : Type u_1
M : Matroid α
I B X : Set α
⊢ M.Coindep X ↔ ∃ B, M.Base B ∧ X ⊆ M.E \ B
state_after: α : Type u_1
M : Matroid α
I B X : Set α
⊢ (∃ B, M.Base B ∧ B ⊆ M.E ∧ Disjoint B X) ∧ X ⊆ M.E ↔ ∃ B, M.Base B ∧ X ⊆ M.E ∧ Disjoint X B
tactic: simp_rw [coindep_iff_exists', subset_diff]
state_before: α : Type u_1
M : Matroid α
I B X : Set α
⊢ (∃ B, M.Base B ∧ B ⊆ M.E ∧ Disjoint B X) ∧ X ⊆ M.E ↔ ∃ B, M.Base B ∧ X ⊆ M.E ∧ Disjoint X B
state_after: no goals
tactic: exact ⟨fun ⟨⟨B, hB, _, hBX⟩, hX⟩ ↦ ⟨B, hB, hX, hBX.symm⟩,
    fun ⟨B, hB, hXE, hXB⟩ ↦ ⟨⟨B, hB, hB.subset_ground,  hXB.symm⟩, hXE⟩⟩
Theorem: Finset.filter_product
File: Mathlib/Data/Finset/Prod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s s' : Finset α
t t' : Finset β
a : α
b : β
p : α → Prop
q : β → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
⊢ filter (fun x => p x.1 ∧ q x.2) (s ×ˢ t) = filter p s ×ˢ filter q t
state_after: case a.mk
α : Type u_1
β : Type u_2
γ : Type u_3
s s' : Finset α
t t' : Finset β
a✝ : α
b✝ : β
p : α → Prop
q : β → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
a : α
b : β
⊢ (a, b) ∈ filter (fun x => p x.1 ∧ q x.2) (s ×ˢ t) ↔ (a, b) ∈ filter p s ×ˢ filter q t
tactic: ext ⟨a, b⟩
state_before: case a.mk
α : Type u_1
β : Type u_2
γ : Type u_3
s s' : Finset α
t t' : Finset β
a✝ : α
b✝ : β
p : α → Prop
q : β → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
a : α
b : β
⊢ (a, b) ∈ filter (fun x => p x.1 ∧ q x.2) (s ×ˢ t) ↔ (a, b) ∈ filter p s ×ˢ filter q t
state_after: no goals
tactic: simp [mem_filter, mem_product, decide_eq_true_eq, and_comm, and_left_comm, and_assoc]
Theorem: AffineSubspace.mem_direction_iff_eq_vsub
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

Proof steps:
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
s : AffineSubspace k P
h : (↑s).Nonempty
v : V
⊢ v ∈ s.direction ↔ ∃ p1 ∈ s, ∃ p2 ∈ s, v = p1 -ᵥ p2
state_after: 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
s : AffineSubspace k P
h : (↑s).Nonempty
v : V
⊢ (∃ x ∈ ↑s, ∃ y ∈ ↑s, x -ᵥ y = v) ↔ ∃ p1 ∈ s, ∃ p2 ∈ s, v = p1 -ᵥ p2
tactic: rw [← SetLike.mem_coe, coe_direction_eq_vsub_set h, Set.mem_vsub]
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
s : AffineSubspace k P
h : (↑s).Nonempty
v : V
⊢ (∃ x ∈ ↑s, ∃ y ∈ ↑s, x -ᵥ y = v) ↔ ∃ p1 ∈ s, ∃ p2 ∈ s, v = p1 -ᵥ p2
state_after: no goals
tactic: simp only [SetLike.mem_coe, eq_comm]
Theorem: Set.surjective_iff_surjective_of_iUnion_eq_univ
File: Mathlib/Data/Set/Lattice.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
f : α → β
U : ι → Set β
hU : iUnion U = univ
⊢ Surjective f ↔ ∀ (i : ι), Surjective ((U i).restrictPreimage f)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
f : α → β
U : ι → Set β
hU : iUnion U = univ
H : ∀ (i : ι), Surjective ((U i).restrictPreimage f)
x : β
⊢ ∃ a, f a = x
tactic: refine ⟨fun H i => (U i).restrictPreimage_surjective H, fun H x => ?_⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
f : α → β
U : ι → Set β
hU : iUnion U = univ
H : ∀ (i : ι), Surjective ((U i).restrictPreimage f)
x : β
⊢ ∃ a, f a = x
state_after: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
f : α → β
U : ι → Set β
hU : iUnion U = univ
H : ∀ (i : ι), Surjective ((U i).restrictPreimage f)
x : β
i : ι
hi : x ∈ U i
⊢ ∃ a, f a = x
tactic: obtain ⟨i, hi⟩ :=
    Set.mem_iUnion.mp
      (show x ∈ Set.iUnion U by rw [hU]; trivial)
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
f : α → β
U : ι → Set β
hU : iUnion U = univ
H : ∀ (i : ι), Surjective ((U i).restrictPreimage f)
x : β
i : ι
hi : x ∈ U i
⊢ ∃ a, f a = x
state_after: no goals
tactic: exact ⟨_, congr_arg Subtype.val (H i ⟨x, hi⟩).choose_spec⟩