ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: ZNum.cast_add
File: Mathlib/Data/Num/Lemmas.lean

Proof steps:
state_before: α : Type u_1
inst✝ : AddGroupWithOne α
a : ZNum
⊢ ↑(0 + a) = ↑0 + ↑a
state_after: no goals
tactic: cases a <;> exact (_root_.zero_add _).symm
state_before: α : Type u_1
inst✝ : AddGroupWithOne α
b : ZNum
⊢ ↑(b + 0) = ↑b + ↑0
state_after: no goals
tactic: cases b <;> exact (_root_.add_zero _).symm
state_before: α : Type u_1
inst✝ : AddGroupWithOne α
a b : PosNum
⊢ ↑(pos a + neg b) = ↑(pos a) + ↑(neg b)
state_after: no goals
tactic: simpa only [sub_eq_add_neg] using PosNum.cast_sub' (α := α) _ _
state_before: α : Type u_1
inst✝ : AddGroupWithOne α
a b : PosNum
⊢ ↑b + -↑a = -↑a + ↑b
state_after: α : Type u_1
inst✝ : AddGroupWithOne α
a b : PosNum
⊢ ↑↑b + ↑(-↑a) = ↑(-↑a + ↑b)
tactic: rw [← PosNum.cast_to_int a, ← PosNum.cast_to_int b, ← Int.cast_neg, ← Int.cast_add (-a)]
state_before: α : Type u_1
inst✝ : AddGroupWithOne α
a b : PosNum
⊢ ↑↑b + ↑(-↑a) = ↑(-↑a + ↑b)
state_after: no goals
tactic: simp [add_comm]
state_before: α : Type u_1
inst✝ : AddGroupWithOne α
a b : PosNum
⊢ -↑(a + b) = -↑a + -↑b
state_after: no goals
tactic: rw [PosNum.cast_add, neg_eq_iff_eq_neg, neg_add_rev, neg_neg, neg_neg,
          ← PosNum.cast_to_int a, ← PosNum.cast_to_int b, ← Int.cast_add, ← Int.cast_add, add_comm]
Theorem: CategoryTheory.ShortComplex.HomologyData.op_left
File: Mathlib/Algebra/Homology/ShortComplex/Homology.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
h : S.HomologyData
⊢ (h.right.op.π ≫ h.iso.op.hom ≫ h.left.op.ι).unop = (h.right.op.i ≫ h.left.op.p).unop
state_after: no goals
tactic: simp
Theorem: Algebra.norm_one_add_smul
File: Mathlib/RingTheory/NormTrace.lean

Proof steps:
state_before: A : Type u_1
B : Type u_2
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : Algebra A B
inst✝¹ : Module.Free A B
inst✝ : Module.Finite A B
a : A
x : B
⊢ ∃ r, (norm A) (1 + a • x) = 1 + (trace A B) x * a + r * a ^ 2
state_after: no goals
tactic: classical
  let ι := Module.Free.ChooseBasisIndex A B
  let b : Basis ι A B := Module.Free.chooseBasis _ _
  haveI : Fintype ι := inferInstance
  clear_value ι b
  simp_rw [Algebra.norm_eq_matrix_det b, Algebra.trace_eq_matrix_trace b]
  simp only [map_add, map_one, map_smul, Matrix.det_one_add_smul a]
  exact ⟨_, rfl⟩
Theorem: MeasureTheory.ProbabilityMeasure.map_fst_prod
File: Mathlib/MeasureTheory/Measure/FiniteMeasureProd.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : MeasurableSpace α
β : Type u_2
inst✝ : MeasurableSpace β
μ : ProbabilityMeasure α
ν : ProbabilityMeasure β
⊢ (μ.prod ν).map ⋯ = μ
state_after: case a
α : Type u_1
inst✝¹ : MeasurableSpace α
β : Type u_2
inst✝ : MeasurableSpace β
μ : ProbabilityMeasure α
ν : ProbabilityMeasure β
⊢ ↑((μ.prod ν).map ⋯) = ↑μ
tactic: apply Subtype.ext
state_before: case a
α : Type u_1
inst✝¹ : MeasurableSpace α
β : Type u_2
inst✝ : MeasurableSpace β
μ : ProbabilityMeasure α
ν : ProbabilityMeasure β
⊢ ↑((μ.prod ν).map ⋯) = ↑μ
state_after: no goals
tactic: simp only [val_eq_to_measure, toMeasure_map, toMeasure_prod, Measure.map_fst_prod,
             measure_univ, one_smul]
Theorem: CategoryTheory.GrothendieckTopology.coversTop_iff_of_isTerminal
File: Mathlib/CategoryTheory/Sites/CoversTop.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝ : Category.{v', u'} A
X : C
hX : IsTerminal X
I : Type u_1
Y : I → C
⊢ J.CoversTop Y ↔ Sieve.ofObjects Y X ∈ J.sieves X
state_after: case mp
C : Type u
inst✝¹ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝ : Category.{v', u'} A
X : C
hX : IsTerminal X
I : Type u_1
Y : I → C
⊢ J.CoversTop Y → Sieve.ofObjects Y X ∈ J.sieves X

case mpr
C : Type u
inst✝¹ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝ : Category.{v', u'} A
X : C
hX : IsTerminal X
I : Type u_1
Y : I → C
⊢ Sieve.ofObjects Y X ∈ J.sieves X → J.CoversTop Y
tactic: constructor
Theorem: Finset.partiallyWellOrderedOn_sup
File: Mathlib/Order/WellFoundedSet.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
π : ι → Type u_5
r : α → α → Prop
s : Finset ι
f : ι → Set α
⊢ (∅.sup f).PartiallyWellOrderedOn r ↔ ∀ i ∈ ∅, (f i).PartiallyWellOrderedOn r
state_after: no goals
tactic: simp
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
π : ι → Type u_5
r : α → α → Prop
s✝ : Finset ι
f : ι → Set α
a : ι
s : Finset ι
ha : a ∉ s
hs : (s.sup f).PartiallyWellOrderedOn r ↔ ∀ i ∈ s, (f i).PartiallyWellOrderedOn r
⊢ ((cons a s ha).sup f).PartiallyWellOrderedOn r ↔ ∀ i ∈ cons a s ha, (f i).PartiallyWellOrderedOn r
state_after: no goals
tactic: simp [-sup_set_eq_biUnion, hs]
Theorem: List.getElem_pmap
File: Mathlib/Data/List/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p : α → Prop
f : (a : α) → p a → β
l : List α
h : ∀ (a : α), a ∈ l → p a
n : ℕ
hn : n < (pmap f l h).length
⊢ (pmap f l h)[n] = f l[n] ⋯
state_after: case nil
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p : α → Prop
f : (a : α) → p a → β
h : ∀ (a : α), a ∈ [] → p a
n : ℕ
hn : n < (pmap f [] h).length
⊢ (pmap f [] h)[n] = f [][n] ⋯

case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p : α → Prop
f : (a : α) → p a → β
hd : α
tl : List α
hl : ∀ (h : ∀ (a : α), a ∈ tl → p a) {n : ℕ} (hn : n < (pmap f tl h).length), (pmap f tl h)[n] = f tl[n] ⋯
h : ∀ (a : α), a ∈ hd :: tl → p a
n : ℕ
hn : n < (pmap f (hd :: tl) h).length
⊢ (pmap f (hd :: tl) h)[n] = f (hd :: tl)[n] ⋯
tactic: induction' l with hd tl hl generalizing n
Theorem: PerfectionMap.map_eq_map
File: Mathlib/RingTheory/Perfection.lean

Proof steps:
state_before: p : ℕ
inst✝¹⁰ : Fact (Nat.Prime p)
R : Type u₁
inst✝⁹ : CommSemiring R
inst✝⁸ : CharP R p
P : Type u₃
inst✝⁷ : CommSemiring P
inst✝⁶ : CharP P p
inst✝⁵ : PerfectRing P p
S : Type u₂
inst✝⁴ : CommSemiring S
inst✝³ : CharP S p
Q : Type u₄
inst✝² : CommSemiring Q
inst✝¹ : CharP Q p
inst✝ : PerfectRing Q p
φ : R →+* S
f : Ring.Perfection R p
⊢ (Perfection.coeff S p 0) ((map p ⋯ ⋯ φ) f) = (Perfection.coeff S p 0) ((Perfection.map p φ) f)
state_after: no goals
tactic: rw [map_map, Perfection.coeff_map]
Theorem: MeasureTheory.integrable_of_summable_norm_restrict
File: Mathlib/MeasureTheory/Integral/SetIntegral.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace X
ι : Type u_5
inst✝⁵ : Countable ι
μ : Measure X
inst✝⁴ : NormedAddCommGroup E
inst✝³ : TopologicalSpace X
inst✝² : BorelSpace X
inst✝¹ : MetrizableSpace X
inst✝ : IsLocallyFiniteMeasure μ
f : C(X, E)
s : ι → Compacts X
hf : Summable fun i => ‖ContinuousMap.restrict (↑(s i)) f‖ * (μ ↑(s i)).toReal
hs : ⋃ i, ↑(s i) = univ
⊢ Integrable (⇑f) μ
state_after: no goals
tactic: simpa only [hs, integrableOn_univ] using integrableOn_iUnion_of_summable_norm_restrict hf
Theorem: LinearMap.toMatrixAlgEquiv_reindexRange
File: Mathlib/LinearAlgebra/Matrix/ToLin.lean

Proof steps:
state_before: R : Type u_1
inst✝¹⁰ : CommSemiring R
l : Type u_2
m : Type u_3
n : Type u_4
inst✝⁹ : Fintype n
inst✝⁸ : Fintype m
inst✝⁷ : DecidableEq n
M₁ : Type u_5
M₂ : Type u_6
inst✝⁶ : AddCommMonoid M₁
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
v₁ : Basis n R M₁
v₂ : Basis m R M₂
M₃ : Type u_7
inst✝² : AddCommMonoid M₃
inst✝¹ : Module R M₃
v₃ : Basis l R M₃
inst✝ : DecidableEq M₁
f : M₁ →ₗ[R] M₁
k i : n
⊢ (toMatrixAlgEquiv v₁.reindexRange) f ⟨v₁ k, ⋯⟩ ⟨v₁ i, ⋯⟩ = (toMatrixAlgEquiv v₁) f k i
state_after: no goals
tactic: simp_rw [LinearMap.toMatrixAlgEquiv_apply, Basis.reindexRange_self, Basis.reindexRange_repr]
Theorem: Metric.mem_closedBall_comm
File: Mathlib/Topology/MetricSpace/Pseudo/Defs.lean

Proof steps:
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
⊢ x ∈ closedBall y ε ↔ y ∈ closedBall x ε
state_after: no goals
tactic: rw [mem_closedBall', mem_closedBall]
Theorem: IsLindelof.countable_of_discrete
File: Mathlib/Topology/Compactness/Lindelof.lean

Proof steps:
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : DiscreteTopology X
hs : IsLindelof s
⊢ s.Countable
state_after: X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : DiscreteTopology X
hs : IsLindelof s
this : ∀ (x : X), {x} ∈ 𝓝 x
⊢ s.Countable
tactic: have : ∀ x : X, ({x} : Set X) ∈ 𝓝 x := by simp [nhds_discrete]
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : DiscreteTopology X
hs : IsLindelof s
this : ∀ (x : X), {x} ∈ 𝓝 x
⊢ s.Countable
state_after: case intro.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t✝ : Set X
inst✝ : DiscreteTopology X
hs : IsLindelof s
this : ∀ (x : X), {x} ∈ 𝓝 x
t : Set X
ht : t.Countable
left✝ : ∀ x ∈ t, x ∈ s
hssubt : s ⊆ ⋃ x ∈ t, {x}
⊢ s.Countable
tactic: rcases hs.elim_nhds_subcover (fun x => {x}) fun x _ => this x with ⟨t, ht, _, hssubt⟩
state_before: case intro.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t✝ : Set X
inst✝ : DiscreteTopology X
hs : IsLindelof s
this : ∀ (x : X), {x} ∈ 𝓝 x
t : Set X
ht : t.Countable
left✝ : ∀ x ∈ t, x ∈ s
hssubt : s ⊆ ⋃ x ∈ t, {x}
⊢ s.Countable
state_after: case intro.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t✝ : Set X
inst✝ : DiscreteTopology X
hs : IsLindelof s
this : ∀ (x : X), {x} ∈ 𝓝 x
t : Set X
ht : t.Countable
left✝ : ∀ x ∈ t, x ∈ s
hssubt : s ⊆ t
⊢ s.Countable
tactic: rw [biUnion_of_singleton] at hssubt
state_before: case intro.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t✝ : Set X
inst✝ : DiscreteTopology X
hs : IsLindelof s
this : ∀ (x : X), {x} ∈ 𝓝 x
t : Set X
ht : t.Countable
left✝ : ∀ x ∈ t, x ∈ s
hssubt : s ⊆ t
⊢ s.Countable
state_after: no goals
tactic: exact ht.mono hssubt
Theorem: Finite.one_lt_card_iff_nontrivial
File: Mathlib/Data/Finite/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
⊢ 1 < Nat.card α ↔ Nontrivial α
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
this : Fintype α
⊢ 1 < Nat.card α ↔ Nontrivial α
tactic: haveI := Fintype.ofFinite α
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
this : Fintype α
⊢ 1 < Nat.card α ↔ Nontrivial α
state_after: no goals
tactic: simp only [Nat.card_eq_fintype_card, Fintype.one_lt_card_iff_nontrivial]
Theorem: OreLocalization.nsmul_eq_nsmul
File: Mathlib/RingTheory/OreLocalization/Ring.lean

Proof steps:
state_before: R : Type u_1
inst✝³ : Semiring R
S : Submonoid R
inst✝² : OreSet S
X : Type u_2
inst✝¹ : AddCommMonoid X
inst✝ : Module R X
n : ℕ
x : OreLocalization S X
⊢ n • x = n • x
state_after: R : Type u_1
inst✝³ : Semiring R
S : Submonoid R
inst✝² : OreSet S
X : Type u_2
inst✝¹ : AddCommMonoid X
inst✝ : Module R X
n : ℕ
x : OreLocalization S X
inst : Module ℕ (OreLocalization S X) := instModuleOfIsScalarTower
⊢ n • x = n • x
tactic: letI inst := OreLocalization.instModuleOfIsScalarTower (R₀ := ℕ) (R := R) (X := X) (S := S)
state_before: R : Type u_1
inst✝³ : Semiring R
S : Submonoid R
inst✝² : OreSet S
X : Type u_2
inst✝¹ : AddCommMonoid X
inst✝ : Module R X
n : ℕ
x : OreLocalization S X
inst : Module ℕ (OreLocalization S X) := instModuleOfIsScalarTower
⊢ n • x = n • x
state_after: no goals
tactic: exact congr($(AddCommMonoid.natModule.unique.2 inst).smul n x)
Theorem: StructureGroupoid.LocalInvariantProp.congr_set
File: Mathlib/Geometry/Manifold/LocalInvariantProperties.lean

Proof steps:
state_before: H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
P : (H → H') → Set H → H → Prop
s✝ t✝ u : Set H
x✝ : H
hG : G.LocalInvariantProp G' P
s t : Set H
x : H
f : H → H'
hu : s =ᶠ[𝓝 x] t
⊢ P f s x ↔ P f t x
state_after: case intro.intro.intro
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
P : (H → H') → Set H → H → Prop
s✝ t✝ u : Set H
x✝ : H
hG : G.LocalInvariantProp G' P
s t : Set H
x : H
f : H → H'
hu : s =ᶠ[𝓝 x] t
o : Set H
host : o ⊆ {x | (fun x => x ∈ s ↔ x ∈ t) x}
ho : IsOpen o
hxo : x ∈ o
⊢ P f s x ↔ P f t x
tactic: obtain ⟨o, host, ho, hxo⟩ := mem_nhds_iff.mp hu.mem_iff
state_before: case intro.intro.intro
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
P : (H → H') → Set H → H → Prop
s✝ t✝ u : Set H
x✝ : H
hG : G.LocalInvariantProp G' P
s t : Set H
x : H
f : H → H'
hu : s =ᶠ[𝓝 x] t
o : Set H
host : o ⊆ {x | (fun x => x ∈ s ↔ x ∈ t) x}
ho : IsOpen o
hxo : x ∈ o
⊢ P f s x ↔ P f t x
state_after: case intro.intro.intro
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
P : (H → H') → Set H → H → Prop
s✝ t✝ u : Set H
x✝ : H
hG : G.LocalInvariantProp G' P
s t : Set H
x : H
f : H → H'
hu : s =ᶠ[𝓝 x] t
o : Set H
ho : IsOpen o
hxo : x ∈ o
host : s ∩ o = t ∩ o
⊢ P f s x ↔ P f t x
tactic: simp_rw [subset_def, mem_setOf, ← and_congr_left_iff, ← mem_inter_iff, ← Set.ext_iff] at host
state_before: case intro.intro.intro
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
P : (H → H') → Set H → H → Prop
s✝ t✝ u : Set H
x✝ : H
hG : G.LocalInvariantProp G' P
s t : Set H
x : H
f : H → H'
hu : s =ᶠ[𝓝 x] t
o : Set H
ho : IsOpen o
hxo : x ∈ o
host : s ∩ o = t ∩ o
⊢ P f s x ↔ P f t x
state_after: no goals
tactic: rw [hG.is_local ho hxo, host, ← hG.is_local ho hxo]
Theorem: SimpleGraph.Subgraph.IsMatching.subgraphOfAdj
File: Mathlib/Combinatorics/SimpleGraph/Matching.lean

Proof steps:
state_before: V : Type u_1
G G' : SimpleGraph V
M M' : G.Subgraph
v w : V
h : G.Adj v w
⊢ (G.subgraphOfAdj h).IsMatching
state_after: V : Type u_1
G G' : SimpleGraph V
M M' : G.Subgraph
v w : V
h : G.Adj v w
v✝ : V
hv : v✝ ∈ (G.subgraphOfAdj h).verts
⊢ ∃! w_1, (G.subgraphOfAdj h).Adj v✝ w_1
tactic: intro _ hv
state_before: V : Type u_1
G G' : SimpleGraph V
M M' : G.Subgraph
v w : V
h : G.Adj v w
v✝ : V
hv : v✝ ∈ (G.subgraphOfAdj h).verts
⊢ ∃! w_1, (G.subgraphOfAdj h).Adj v✝ w_1
state_after: V : Type u_1
G G' : SimpleGraph V
M M' : G.Subgraph
v w : V
h : G.Adj v w
v✝ : V
hv : v✝ = v ∨ v✝ = w
⊢ ∃! w_1, (G.subgraphOfAdj h).Adj v✝ w_1
tactic: rw [subgraphOfAdj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at hv
state_before: V : Type u_1
G G' : SimpleGraph V
M M' : G.Subgraph
v w : V
h : G.Adj v w
v✝ : V
hv : v✝ = v ∨ v✝ = w
⊢ ∃! w_1, (G.subgraphOfAdj h).Adj v✝ w_1
state_after: no goals
tactic: cases hv with
  | inl => use w; aesop
  | inr => use v; aesop
Theorem: RatFunc.mul_inv_cancel
File: Mathlib/FieldTheory/RatFunc/Basic.lean

Proof steps:
state_before: K : Type u
inst✝¹ : CommRing K
inst✝ : IsDomain K
p : FractionRing K[X]
h : { toFractionRing := p } ≠ 0
⊢ { toFractionRing := p } * { toFractionRing := p }⁻¹ = 1
state_after: K : Type u
inst✝¹ : CommRing K
inst✝ : IsDomain K
p : FractionRing K[X]
h : { toFractionRing := p } ≠ 0
this : p ≠ 0
⊢ { toFractionRing := p } * { toFractionRing := p }⁻¹ = 1
tactic: have : p ≠ 0 := fun hp => h <| by rw [hp, ofFractionRing_zero]
state_before: K : Type u
inst✝¹ : CommRing K
inst✝ : IsDomain K
p : FractionRing K[X]
h : { toFractionRing := p } ≠ 0
this : p ≠ 0
⊢ { toFractionRing := p } * { toFractionRing := p }⁻¹ = 1
state_after: no goals
tactic: simpa only [← ofFractionRing_inv, ← ofFractionRing_mul, ← ofFractionRing_one,
      ofFractionRing.injEq] using  -- Porting note: `ofFractionRing.injEq` was not present
      _root_.mul_inv_cancel this
Theorem: AlgebraicGeometry.disjoint_opensRange_sigmaι
File: Mathlib/AlgebraicGeometry/Limits.lean

Proof steps:
state_before: ι : Type u
f : ι → Scheme
i j : ι
h : i ≠ j
⊢ Disjoint (Scheme.Hom.opensRange (Sigma.ι f i)) (Scheme.Hom.opensRange (Sigma.ι f j))
state_after: ι : Type u
f : ι → Scheme
i j : ι
h : i ≠ j
U : (∐ f).Opens
hU : U ≤ Scheme.Hom.opensRange (Sigma.ι f i)
hU' : U ≤ Scheme.Hom.opensRange (Sigma.ι f j)
x : ↑↑(∐ f).toPresheafedSpace
hx : x ∈ ↑U
⊢ x ∈ ↑⊥
tactic: intro U hU hU' x hx
state_before: ι : Type u
f : ι → Scheme
i j : ι
h : i ≠ j
U : (∐ f).Opens
hU : U ≤ Scheme.Hom.opensRange (Sigma.ι f i)
hU' : U ≤ Scheme.Hom.opensRange (Sigma.ι f j)
x : ↑↑(∐ f).toPresheafedSpace
hx : x ∈ ↑U
⊢ x ∈ ↑⊥
state_after: case intro
ι : Type u
f : ι → Scheme
i j : ι
h : i ≠ j
U : (∐ f).Opens
hU : U ≤ Scheme.Hom.opensRange (Sigma.ι f i)
hU' : U ≤ Scheme.Hom.opensRange (Sigma.ι f j)
x : ↑↑(f i).toPresheafedSpace
hx : (Sigma.ι f i).val.base x ∈ ↑U
⊢ (Sigma.ι f i).val.base x ∈ ↑⊥
tactic: obtain ⟨x, rfl⟩ := hU hx
state_before: case intro
ι : Type u
f : ι → Scheme
i j : ι
h : i ≠ j
U : (∐ f).Opens
hU : U ≤ Scheme.Hom.opensRange (Sigma.ι f i)
hU' : U ≤ Scheme.Hom.opensRange (Sigma.ι f j)
x : ↑↑(f i).toPresheafedSpace
hx : (Sigma.ι f i).val.base x ∈ ↑U
⊢ (Sigma.ι f i).val.base x ∈ ↑⊥
state_after: case intro.intro
ι : Type u
f : ι → Scheme
i j : ι
h : i ≠ j
U : (∐ f).Opens
hU : U ≤ Scheme.Hom.opensRange (Sigma.ι f i)
hU' : U ≤ Scheme.Hom.opensRange (Sigma.ι f j)
x : ↑↑(f i).toPresheafedSpace
hx : (Sigma.ι f i).val.base x ∈ ↑U
y : ↑↑(f j).toPresheafedSpace
hy : (Sigma.ι f j).val.base y = (Sigma.ι f i).val.base x
⊢ (Sigma.ι f i).val.base x ∈ ↑⊥
tactic: obtain ⟨y, hy⟩ := hU' hx
state_before: case intro.intro
ι : Type u
f : ι → Scheme
i j : ι
h : i ≠ j
U : (∐ f).Opens
hU : U ≤ Scheme.Hom.opensRange (Sigma.ι f i)
hU' : U ≤ Scheme.Hom.opensRange (Sigma.ι f j)
x : ↑↑(f i).toPresheafedSpace
hx : (Sigma.ι f i).val.base x ∈ ↑U
y : ↑↑(f j).toPresheafedSpace
hy : (Sigma.ι f j).val.base y = (Sigma.ι f i).val.base x
⊢ (Sigma.ι f i).val.base x ∈ ↑⊥
state_after: case intro.intro.refl
ι : Type u
f : ι → Scheme
i : ι
U : (∐ f).Opens
hU : U ≤ Scheme.Hom.opensRange (Sigma.ι f i)
x : ↑↑(f i).toPresheafedSpace
hx : (Sigma.ι f i).val.base x ∈ ↑U
h : i ≠ i
hU' : U ≤ Scheme.Hom.opensRange (Sigma.ι f i)
hy : (Sigma.ι f i).val.base x = (Sigma.ι f i).val.base x
⊢ (Sigma.ι f i).val.base x ∈ ↑⊥
tactic: obtain ⟨rfl⟩ := (sigmaι_eq_iff _ _ _ _ _).mp hy
state_before: case intro.intro.refl
ι : Type u
f : ι → Scheme
i : ι
U : (∐ f).Opens
hU : U ≤ Scheme.Hom.opensRange (Sigma.ι f i)
x : ↑↑(f i).toPresheafedSpace
hx : (Sigma.ι f i).val.base x ∈ ↑U
h : i ≠ i
hU' : U ≤ Scheme.Hom.opensRange (Sigma.ι f i)
hy : (Sigma.ι f i).val.base x = (Sigma.ι f i).val.base x
⊢ (Sigma.ι f i).val.base x ∈ ↑⊥
state_after: no goals
tactic: cases h rfl
Theorem: Tropical.add_eq_left
File: Mathlib/Algebra/Tropical/Basic.lean

Proof steps:
state_before: R : Type u
inst✝ : LinearOrder R
x y : Tropical R
h : x ≤ y
⊢ untrop (x + y) = untrop x
state_after: no goals
tactic: simpa using h
Theorem: RootPairing.coroot_root_two
File: Mathlib/LinearAlgebra/RootSystem/Defs.lean

Proof steps:
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
N : Type u_4
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
P : RootPairing ι R M N
i j : ι
⊢ (P.toLin.flip (P.coroot i)) (P.root i) = 2
state_after: no goals
tactic: simp
Theorem: Subsemigroup.mem_iSup_of_directed
File: Mathlib/Algebra/Group/Subsemigroup/Membership.lean

Proof steps:
state_before: ι : Sort u_1
M : Type u_2
A : Type u_3
B : Type u_4
inst✝ : Mul M
S : ι → Subsemigroup M
hS : Directed (fun x x_1 => x ≤ x_1) S
x : M
⊢ x ∈ ⨆ i, S i ↔ ∃ i, x ∈ S i
state_after: ι : Sort u_1
M : Type u_2
A : Type u_3
B : Type u_4
inst✝ : Mul M
S : ι → Subsemigroup M
hS : Directed (fun x x_1 => x ≤ x_1) S
x : M
⊢ x ∈ ⨆ i, S i → ∃ i, x ∈ S i
tactic: refine ⟨?_, fun ⟨i, hi⟩ ↦ le_iSup S i hi⟩
state_before: ι : Sort u_1
M : Type u_2
A : Type u_3
B : Type u_4
inst✝ : Mul M
S : ι → Subsemigroup M
hS : Directed (fun x x_1 => x ≤ x_1) S
x : M
⊢ x ∈ ⨆ i, S i → ∃ i, x ∈ S i
state_after: ι : Sort u_1
M : Type u_2
A : Type u_3
B : Type u_4
inst✝ : Mul M
S : ι → Subsemigroup M
hS : Directed (fun x x_1 => x ≤ x_1) S
x : M
⊢ x ∈ closure (⋃ i, ↑(S i)) → ∃ i, x ∈ S i
tactic: suffices x ∈ closure (⋃ i, (S i : Set M)) → ∃ i, x ∈ S i by
    simpa only [closure_iUnion, closure_eq (S _)] using this
state_before: ι : Sort u_1
M : Type u_2
A : Type u_3
B : Type u_4
inst✝ : Mul M
S : ι → Subsemigroup M
hS : Directed (fun x x_1 => x ≤ x_1) S
x : M
⊢ x ∈ closure (⋃ i, ↑(S i)) → ∃ i, x ∈ S i
state_after: ι : Sort u_1
M : Type u_2
A : Type u_3
B : Type u_4
inst✝ : Mul M
S : ι → Subsemigroup M
hS : Directed (fun x x_1 => x ≤ x_1) S
x : M
hx : x ∈ closure (⋃ i, ↑(S i))
⊢ ∀ (x y : M), (∃ i, x ∈ S i) → (∃ i, y ∈ S i) → ∃ i, x * y ∈ S i
tactic: refine fun hx ↦ closure_induction hx (fun y hy ↦ mem_iUnion.mp hy) ?_
state_before: ι : Sort u_1
M : Type u_2
A : Type u_3
B : Type u_4
inst✝ : Mul M
S : ι → Subsemigroup M
hS : Directed (fun x x_1 => x ≤ x_1) S
x : M
hx : x ∈ closure (⋃ i, ↑(S i))
⊢ ∀ (x y : M), (∃ i, x ∈ S i) → (∃ i, y ∈ S i) → ∃ i, x * y ∈ S i
state_after: case intro.intro
ι : Sort u_1
M : Type u_2
A : Type u_3
B : Type u_4
inst✝ : Mul M
S : ι → Subsemigroup M
hS : Directed (fun x x_1 => x ≤ x_1) S
x✝ : M
hx : x✝ ∈ closure (⋃ i, ↑(S i))
x y : M
i : ι
hi : x ∈ S i
j : ι
hj : y ∈ S j
⊢ ∃ i, x * y ∈ S i
tactic: rintro x y ⟨i, hi⟩ ⟨j, hj⟩
state_before: case intro.intro
ι : Sort u_1
M : Type u_2
A : Type u_3
B : Type u_4
inst✝ : Mul M
S : ι → Subsemigroup M
hS : Directed (fun x x_1 => x ≤ x_1) S
x✝ : M
hx : x✝ ∈ closure (⋃ i, ↑(S i))
x y : M
i : ι
hi : x ∈ S i
j : ι
hj : y ∈ S j
⊢ ∃ i, x * y ∈ S i
state_after: case intro.intro.intro.intro
ι : Sort u_1
M : Type u_2
A : Type u_3
B : Type u_4
inst✝ : Mul M
S : ι → Subsemigroup M
hS : Directed (fun x x_1 => x ≤ x_1) S
x✝ : M
hx : x✝ ∈ closure (⋃ i, ↑(S i))
x y : M
i : ι
hi : x ∈ S i
j : ι
hj : y ∈ S j
k : ι
hki : S i ≤ S k
hkj : S j ≤ S k
⊢ ∃ i, x * y ∈ S i
tactic: rcases hS i j with ⟨k, hki, hkj⟩
state_before: case intro.intro.intro.intro
ι : Sort u_1
M : Type u_2
A : Type u_3
B : Type u_4
inst✝ : Mul M
S : ι → Subsemigroup M
hS : Directed (fun x x_1 => x ≤ x_1) S
x✝ : M
hx : x✝ ∈ closure (⋃ i, ↑(S i))
x y : M
i : ι
hi : x ∈ S i
j : ι
hj : y ∈ S j
k : ι
hki : S i ≤ S k
hkj : S j ≤ S k
⊢ ∃ i, x * y ∈ S i
state_after: no goals
tactic: exact ⟨k, (S k).mul_mem (hki hi) (hkj hj)⟩
Theorem: List.filterMap_eq_bind_toList
File: Mathlib/Data/List/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → Option β
l : List α
⊢ filterMap f l = l.bind fun a => (f a).toList
state_after: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → Option β
a : α
l : List α
ih : filterMap f l = l.bind fun a => (f a).toList
⊢ (match f a with
    | none => filterMap f l
    | some b => b :: filterMap f l) =
    (f a).toList ++ l.bind fun a => (f a).toList
tactic: induction' l with a l ih <;> simp [filterMap_cons]
state_before: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → Option β
a : α
l : List α
ih : filterMap f l = l.bind fun a => (f a).toList
⊢ (match f a with
    | none => filterMap f l
    | some b => b :: filterMap f l) =
    (f a).toList ++ l.bind fun a => (f a).toList
state_after: no goals
tactic: rcases f a <;> simp [ih]