ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: NNRat.num_inv_of_ne_zero
File: Mathlib/Algebra/Order/Field/Rat.lean

Proof steps:
state_before: q : ℚ≥0
hq : q ≠ 0
⊢ q⁻¹.num = q.den
state_after: q : ℚ≥0
hq : q ≠ 0
⊢ (↑q.den).natAbs.Coprime q.num
tactic: rw [inv_def, divNat, num, coe_mk, Rat.divInt_ofNat, ← Rat.mk_eq_mkRat _ _ (num_ne_zero.mpr hq),
    Int.natAbs_ofNat]
state_before: q : ℚ≥0
hq : q ≠ 0
⊢ (↑q.den).natAbs.Coprime q.num
state_after: no goals
tactic: simpa using q.coprime_num_den.symm
Theorem: AlgebraicTopology.DoldKan.PInftyToNormalizedMooreComplex_naturality
File: Mathlib/AlgebraicTopology/DoldKan/Normalized.lean

Proof steps:
state_before: A : Type u_1
inst✝¹ : Category.{u_2, u_1} A
inst✝ : Abelian A
X✝ X Y : SimplicialObject A
f : X ⟶ Y
⊢ AlternatingFaceMapComplex.map f ≫ PInftyToNormalizedMooreComplex Y =
    PInftyToNormalizedMooreComplex X ≫ NormalizedMooreComplex.map f
state_after: no goals
tactic: aesop_cat
Theorem: TopCat.toCondensedSet_val_obj
File: Mathlib/Condensed/TopComparison.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
G : C ⥤ TopCat
X✝ : Type w'
inst✝ : TopologicalSpace X✝
X : TopCat
⊢ EqualizerCondition (yonedaPresheaf compHausToTop ↑X)
state_after: C : Type u
inst✝¹ : Category.{v, u} C
G : C ⥤ TopCat
X✝ : Type w'
inst✝ : TopologicalSpace X✝
X : TopCat
⊢ ∀ (Z B : CompHaus) (π : Z ⟶ B) [inst : EffectiveEpi π], QuotientMap ⇑(compHausToTop.map π)
tactic: apply (config := { allowSynthFailures := true }) equalizerCondition_yonedaPresheaf
      compHausToTop.{u} X
state_before: C : Type u
inst✝¹ : Category.{v, u} C
G : C ⥤ TopCat
X✝ : Type w'
inst✝ : TopologicalSpace X✝
X : TopCat
⊢ ∀ (Z B : CompHaus) (π : Z ⟶ B) [inst : EffectiveEpi π], QuotientMap ⇑(compHausToTop.map π)
state_after: C : Type u
inst✝¹ : Category.{v, u} C
G : C ⥤ TopCat
X✝ : Type w'
inst✝ : TopologicalSpace X✝
X : TopCat
Z B : CompHaus
π : Z ⟶ B
he : EffectiveEpi π
⊢ QuotientMap ⇑(compHausToTop.map π)
tactic: intro Z B π he
state_before: C : Type u
inst✝¹ : Category.{v, u} C
G : C ⥤ TopCat
X✝ : Type w'
inst✝ : TopologicalSpace X✝
X : TopCat
Z B : CompHaus
π : Z ⟶ B
he : EffectiveEpi π
⊢ QuotientMap ⇑(compHausToTop.map π)
state_after: C : Type u
inst✝¹ : Category.{v, u} C
G : C ⥤ TopCat
X✝ : Type w'
inst✝ : TopologicalSpace X✝
X : TopCat
Z B : CompHaus
π : Z ⟶ B
he : Function.Surjective ⇑π
⊢ QuotientMap ⇑(compHausToTop.map π)
tactic: rw [((CompHaus.effectiveEpi_tfae π).out 0 2 :)] at he
state_before: C : Type u
inst✝¹ : Category.{v, u} C
G : C ⥤ TopCat
X✝ : Type w'
inst✝ : TopologicalSpace X✝
X : TopCat
Z B : CompHaus
π : Z ⟶ B
he : Function.Surjective ⇑π
⊢ QuotientMap ⇑(compHausToTop.map π)
state_after: no goals
tactic: apply QuotientMap.of_surjective_continuous he π.continuous
Theorem: Ordinal.nadd_def
File: Mathlib/SetTheory/Ordinal/NaturalOps.lean

Proof steps:
state_before: a✝ b✝ c a b : Ordinal.{u}
⊢ a ♯ b = max (a.blsub fun a' x => a' ♯ b) (b.blsub fun b' x => a ♯ b')
state_after: no goals
tactic: rw [nadd]
Theorem: ONote.fastGrowing_two
File: Mathlib/SetTheory/Ordinal/Notation.lean

Proof steps:
state_before: ⊢ fastGrowing 2 = fun n => 2 ^ n * n
state_after: ⊢ (fun i => (fastGrowing 1)^[i] i) = fun n => 2 ^ n * n
tactic: rw [@fastGrowing_succ 2 1 rfl]
state_before: ⊢ (fun i => (fastGrowing 1)^[i] i) = fun n => 2 ^ n * n
state_after: case h
i : ℕ
⊢ (fastGrowing 1)^[i] i = 2 ^ i * i
tactic: funext i
state_before: case h
i : ℕ
⊢ (fastGrowing 1)^[i] i = 2 ^ i * i
state_after: case h
i : ℕ
⊢ (fun n => 2 * n)^[i] i = 2 ^ i * i
tactic: rw [fastGrowing_one]
state_before: case h
i : ℕ
⊢ (fun n => 2 * n)^[i] i = 2 ^ i * i
state_after: case h
i : ℕ
⊢ ∀ (a b : ℕ), (fun n => 2 * n)^[a] b = 2 ^ a * b
tactic: suffices ∀ a b, (fun n : ℕ => 2 * n)^[a] b = (2 ^ a) * b from this _ _
state_before: case h
i : ℕ
⊢ ∀ (a b : ℕ), (fun n => 2 * n)^[a] b = 2 ^ a * b
state_after: case h
i a b : ℕ
⊢ (fun n => 2 * n)^[a] b = 2 ^ a * b
tactic: intro a b
state_before: case h
i a b : ℕ
⊢ (fun n => 2 * n)^[a] b = 2 ^ a * b
state_after: no goals
tactic: induction a <;>
    simp [*, Function.iterate_succ, pow_succ, mul_assoc, -Function.iterate_succ]
Theorem: Finmap.union_cancel
File: Mathlib/Data/Finmap.lean

Proof steps:
state_before: α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : s₁.Disjoint s₃
h' : s₂.Disjoint s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
⊢ s₁ = s₂
state_after: case a
α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : s₁.Disjoint s₃
h' : s₂.Disjoint s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
⊢ ∀ (x : α), lookup x s₁ = lookup x s₂
tactic: apply ext_lookup
state_before: case a
α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : s₁.Disjoint s₃
h' : s₂.Disjoint s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
⊢ ∀ (x : α), lookup x s₁ = lookup x s₂
state_after: case a
α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : s₁.Disjoint s₃
h' : s₂.Disjoint s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
x : α
⊢ lookup x s₁ = lookup x s₂
tactic: intro x
state_before: case a
α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : s₁.Disjoint s₃
h' : s₂.Disjoint s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
x : α
⊢ lookup x s₁ = lookup x s₂
state_after: case a
α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : s₁.Disjoint s₃
h' : s₂.Disjoint s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
x : α
this : lookup x (s₁ ∪ s₃) = lookup x (s₂ ∪ s₃)
⊢ lookup x s₁ = lookup x s₂
tactic: have : (s₁ ∪ s₃).lookup x = (s₂ ∪ s₃).lookup x := h'' ▸ rfl
state_before: case a
α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : s₁.Disjoint s₃
h' : s₂.Disjoint s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
x : α
this : lookup x (s₁ ∪ s₃) = lookup x (s₂ ∪ s₃)
⊢ lookup x s₁ = lookup x s₂
state_after: case pos
α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : s₁.Disjoint s₃
h' : s₂.Disjoint s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
x : α
this : lookup x (s₁ ∪ s₃) = lookup x (s₂ ∪ s₃)
hs₁ : x ∈ s₁
⊢ lookup x s₁ = lookup x s₂

case neg
α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : s₁.Disjoint s₃
h' : s₂.Disjoint s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
x : α
this : lookup x (s₁ ∪ s₃) = lookup x (s₂ ∪ s₃)
hs₁ : x ∉ s₁
⊢ lookup x s₁ = lookup x s₂
tactic: by_cases hs₁ : x ∈ s₁
Theorem: AddSubgroup.index_le_of_leftCoset_cover_const
File: Mathlib/GroupTheory/CosetCover.lean

Proof steps:
state_before: G : Type u_1
inst✝ : Group G
ι : Type u_2
s : Finset ι
H : Subgroup G
g : ι → G
hcovers : ⋃ i ∈ s, g i • ↑H = Set.univ
⊢ H.index ≤ s.card
state_after: no goals
tactic: cases H.index.eq_zero_or_pos with
  | inl h => exact h ▸ s.card.zero_le
  | inr h =>
    rw [leftCoset_cover_const_iff_surjOn, Set.surjOn_iff_surjective] at hcovers
    exact (Nat.card_le_card_of_surjective _ hcovers).trans_eq (Nat.card_eq_finsetCard _)
Theorem: Commute.geom_sum₂_succ_eq
File: Mathlib/Algebra/GeomSum.lean

Proof steps:
state_before: α✝ α : Type u
inst✝ : Ring α
x y : α
h : Commute x y
n : ℕ
⊢ ∑ i ∈ range (n + 1), x ^ i * y ^ (n - i) = x ^ n + y * ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i)
state_after: α✝ α : Type u
inst✝ : Ring α
x y : α
h : Commute x y
n : ℕ
⊢ ∑ i ∈ range n, x ^ i * y ^ (n - i) = ∑ x_1 ∈ range n, x ^ x_1 * y ^ (n - 1 - x_1 + 1)
tactic: simp_rw [mul_sum, sum_range_succ_comm, tsub_self, pow_zero, mul_one, add_right_inj, ← mul_assoc,
    (h.symm.pow_right _).eq, mul_assoc, ← pow_succ']
state_before: α✝ α : Type u
inst✝ : Ring α
x y : α
h : Commute x y
n : ℕ
⊢ ∑ i ∈ range n, x ^ i * y ^ (n - i) = ∑ x_1 ∈ range n, x ^ x_1 * y ^ (n - 1 - x_1 + 1)
state_after: α✝ α : Type u
inst✝ : Ring α
x y : α
h : Commute x y
n i : ℕ
hi : i ∈ range n
⊢ x ^ i * y ^ (n - i) = x ^ i * y ^ (n - 1 - i + 1)
tactic: refine sum_congr rfl fun i hi => ?_
state_before: α✝ α : Type u
inst✝ : Ring α
x y : α
h : Commute x y
n i : ℕ
hi : i ∈ range n
⊢ x ^ i * y ^ (n - i) = x ^ i * y ^ (n - 1 - i + 1)
state_after: α✝ α : Type u
inst✝ : Ring α
x y : α
h : Commute x y
n i : ℕ
hi : i ∈ range n
⊢ n - 1 - i + 1 = n - i
tactic: suffices n - 1 - i + 1 = n - i by rw [this]
state_before: α✝ α : Type u
inst✝ : Ring α
x y : α
h : Commute x y
n i : ℕ
hi : i ∈ range n
⊢ n - 1 - i + 1 = n - i
state_after: case zero
α✝ α : Type u
inst✝ : Ring α
x y : α
h : Commute x y
i : ℕ
hi : i ∈ range 0
⊢ 0 - 1 - i + 1 = 0 - i

case succ
α✝ α : Type u
inst✝ : Ring α
x y : α
h : Commute x y
i n : ℕ
hi : i ∈ range (n + 1)
⊢ n + 1 - 1 - i + 1 = n + 1 - i
tactic: cases' n with n
Theorem: Subtype.coe_preimage_self
File: Mathlib/Data/Set/Image.lean

Proof steps:
state_before: α : Type u_1
s : Set α
⊢ val ⁻¹' s = univ
state_after: no goals
tactic: rw [← preimage_range, range_coe]
Theorem: RingHom.finiteType_holdsForLocalizationAway
File: Mathlib/RingTheory/RingHom/FiniteType.lean

Proof steps:
state_before: ⊢ HoldsForLocalizationAway @FiniteType
state_after: R S : Type u_1
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
r : R
inst✝ : IsLocalization.Away r S
⊢ (algebraMap R S).FiniteType
tactic: introv R _
state_before: R S : Type u_1
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
r : R
inst✝ : IsLocalization.Away r S
⊢ (algebraMap R S).FiniteType
state_after: R S : Type u_1
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
r : R
inst✝ : IsLocalization.Away r S
⊢ Algebra.FiniteType R S
tactic: suffices Algebra.FiniteType R S by
    rw [RingHom.FiniteType]
    convert this; ext
    rw [Algebra.smul_def]; rfl
state_before: R S : Type u_1
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
r : R
inst✝ : IsLocalization.Away r S
⊢ Algebra.FiniteType R S
state_after: no goals
tactic: exact IsLocalization.finiteType_of_monoid_fg (Submonoid.powers r) S
Theorem: Set.iUnion_prod_of_monotone
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
inst✝ : SemilatticeSup α
s : α → Set β
t : α → Set γ
hs : Monotone s
ht : Monotone t
⊢ ⋃ x, s x ×ˢ t x = (⋃ x, s x) ×ˢ ⋃ x, t x
state_after: case h.mk
α : 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
inst✝ : SemilatticeSup α
s : α → Set β
t : α → Set γ
hs : Monotone s
ht : Monotone t
z : β
w : γ
⊢ (z, w) ∈ ⋃ x, s x ×ˢ t x ↔ (z, w) ∈ (⋃ x, s x) ×ˢ ⋃ x, t x
tactic: ext ⟨z, w⟩
state_before: case h.mk
α : 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
inst✝ : SemilatticeSup α
s : α → Set β
t : α → Set γ
hs : Monotone s
ht : Monotone t
z : β
w : γ
⊢ (z, w) ∈ ⋃ x, s x ×ˢ t x ↔ (z, w) ∈ (⋃ x, s x) ×ˢ ⋃ x, t x
state_after: case h.mk
α : 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
inst✝ : SemilatticeSup α
s : α → Set β
t : α → Set γ
hs : Monotone s
ht : Monotone t
z : β
w : γ
⊢ (∀ (x : α), z ∈ s x → w ∈ t x → (∃ i, z ∈ s i) ∧ ∃ i, w ∈ t i) ∧
    ∀ (x : α), z ∈ s x → ∀ (x : α), w ∈ t x → ∃ i, z ∈ s i ∧ w ∈ t i
tactic: simp only [mem_prod, mem_iUnion, exists_imp, and_imp, iff_def]
state_before: case h.mk
α : 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
inst✝ : SemilatticeSup α
s : α → Set β
t : α → Set γ
hs : Monotone s
ht : Monotone t
z : β
w : γ
⊢ (∀ (x : α), z ∈ s x → w ∈ t x → (∃ i, z ∈ s i) ∧ ∃ i, w ∈ t i) ∧
    ∀ (x : α), z ∈ s x → ∀ (x : α), w ∈ t x → ∃ i, z ∈ s i ∧ w ∈ t i
state_after: case h.mk.left
α : 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
inst✝ : SemilatticeSup α
s : α → Set β
t : α → Set γ
hs : Monotone s
ht : Monotone t
z : β
w : γ
⊢ ∀ (x : α), z ∈ s x → w ∈ t x → (∃ i, z ∈ s i) ∧ ∃ i, w ∈ t i

case h.mk.right
α : 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
inst✝ : SemilatticeSup α
s : α → Set β
t : α → Set γ
hs : Monotone s
ht : Monotone t
z : β
w : γ
⊢ ∀ (x : α), z ∈ s x → ∀ (x : α), w ∈ t x → ∃ i, z ∈ s i ∧ w ∈ t i
tactic: constructor
Theorem: LowerSet.coe_eq_univ
File: Mathlib/Order/UpperLower/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝ : LE α
S : Set (LowerSet α)
s t : LowerSet α
a : α
⊢ ↑s = univ ↔ s = ⊤
state_after: no goals
tactic: simp [SetLike.ext'_iff]
Theorem: ENNReal.hasBasis_nhds_of_ne_top'
File: Mathlib/Topology/Instances/ENNReal.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
xt : x ≠ ⊤
⊢ (𝓝 x).HasBasis (fun x => x ≠ 0) fun ε => Icc (x - ε) (x + ε)
state_after: case inl
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
xt : 0 ≠ ⊤
⊢ (𝓝 0).HasBasis (fun x => x ≠ 0) fun ε => Icc (0 - ε) (0 + ε)

case inr
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
xt : x ≠ ⊤
x0 : 0 < x
⊢ (𝓝 x).HasBasis (fun x => x ≠ 0) fun ε => Icc (x - ε) (x + ε)
tactic: rcases (zero_le x).eq_or_gt with rfl | x0
Theorem: AlgebraicGeometry.LocallyRingedSpace.evaluation_ne_zero_iff_mem_basicOpen
File: Mathlib/Geometry/RingedSpace/LocallyRingedSpace/ResidueField.lean

Proof steps:
state_before: X : LocallyRingedSpace
U : Opens ↑X.toTopCat
x : ↥U
f : ↑(X.presheaf.obj (op U))
⊢ (X.evaluation x) f ≠ 0 ↔ ↑x ∈ X.toRingedSpace.basicOpen f
state_after: no goals
tactic: simp
Theorem: Turing.ToPartrec.Cont.then_eval
File: Mathlib/Computability/TMToPartrec.lean

Proof steps:
state_before: k k' : Cont
v : List ℕ
⊢ (k.then k').eval v = k.eval v >>= k'.eval
state_after: case comp
k' : Cont
a✝¹ : Code
a✝ : Cont
k_ih : ∀ {v : List ℕ}, (a✝.then k').eval v = a✝.eval v >>= k'.eval
v : List ℕ
⊢ a✝¹.eval v >>= (a✝.then k').eval = a✝¹.eval v >>= fun x => a✝.eval x >>= k'.eval

case fix
k' : Cont
a✝¹ : Code
a✝ : Cont
k_ih : ∀ {v : List ℕ}, (a✝.then k').eval v = a✝.eval v >>= k'.eval
v : List ℕ
⊢ (if v.headI = 0 then a✝.eval v.tail >>= k'.eval else a✝¹.fix.eval v.tail >>= (a✝.then k').eval) =
    (if v.headI = 0 then a✝.eval v.tail else a✝¹.fix.eval v.tail >>= a✝.eval) >>= k'.eval
tactic: induction' k with _ _ _ _ _ _ _ _ _ k_ih _ _ k_ih generalizing v <;>
    simp only [Cont.eval, Cont.then, bind_assoc, pure_bind, *]
Theorem: CochainComplex.mappingConeCompTriangle_mor₁
File: Mathlib/Algebra/Homology/HomotopyCategory/Triangulated.lean

Proof steps:
state_before: C : Type u_1
inst✝³ : Category.{?u.342, u_1} C
inst✝² : Preadditive C
inst✝¹ : HasZeroObject C
inst✝ : HasBinaryBiproducts C
X₁ X₂ X₃ : CochainComplex C ℤ
f : X₁ ⟶ X₂
g : X₂ ⟶ X₃
⊢ f ≫ g = 𝟙 X₁ ≫ f ≫ g
state_after: no goals
tactic: rw [id_comp]
state_before: C : Type u_1
inst✝³ : Category.{?u.342, u_1} C
inst✝² : Preadditive C
inst✝¹ : HasZeroObject C
inst✝ : HasBinaryBiproducts C
X₁ X₂ X₃ : CochainComplex C ℤ
f : X₁ ⟶ X₂
g : X₂ ⟶ X₃
⊢ (f ≫ g) ≫ 𝟙 X₃ = f ≫ g
state_after: no goals
tactic: rw [comp_id]
Theorem: Real.rpow_inv_rpow
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

Proof steps:
state_before: x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : y ≠ 0
⊢ (x ^ y⁻¹) ^ y = x
state_after: no goals
tactic: rw [← rpow_mul hx, inv_mul_cancel hy, rpow_one]
Theorem: TopCat.of_isoOfHomeo
File: Mathlib/Topology/Category/TopCat/Basic.lean

Proof steps:
state_before: X Y : TopCat
f : ↑X ≃ₜ ↑Y
⊢ homeoOfIso (isoOfHomeo f) = f
state_after: X Y : TopCat
f : ↑X ≃ₜ ↑Y
⊢ { toFun := ⇑f.toContinuousMap, invFun := ⇑f.symm.toContinuousMap, left_inv := ⋯, right_inv := ⋯,
      continuous_toFun := ⋯, continuous_invFun := ⋯ } =
    f
tactic: dsimp [homeoOfIso, isoOfHomeo]
state_before: X Y : TopCat
f : ↑X ≃ₜ ↑Y
⊢ { toFun := ⇑f.toContinuousMap, invFun := ⇑f.symm.toContinuousMap, left_inv := ⋯, right_inv := ⋯,
      continuous_toFun := ⋯, continuous_invFun := ⋯ } =
    f
state_after: case H
X Y : TopCat
f : ↑X ≃ₜ ↑Y
x✝ : ↑X
⊢ { toFun := ⇑f.toContinuousMap, invFun := ⇑f.symm.toContinuousMap, left_inv := ⋯, right_inv := ⋯,
        continuous_toFun := ⋯, continuous_invFun := ⋯ }
      x✝ =
    f x✝
tactic: ext
state_before: case H
X Y : TopCat
f : ↑X ≃ₜ ↑Y
x✝ : ↑X
⊢ { toFun := ⇑f.toContinuousMap, invFun := ⇑f.symm.toContinuousMap, left_inv := ⋯, right_inv := ⋯,
        continuous_toFun := ⋯, continuous_invFun := ⋯ }
      x✝ =
    f x✝
state_after: no goals
tactic: rfl
Theorem: Fin.le_rev_iff
File: Mathlib/Data/Fin/Basic.lean

Proof steps:
state_before: n m : ℕ
i j : Fin n
⊢ i ≤ j.rev ↔ j ≤ i.rev
state_after: no goals
tactic: rw [← rev_le_rev, rev_rev]
Theorem: Basis.reindexFinsetRange_repr
File: Mathlib/LinearAlgebra/Basis.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid M'
inst✝² : Module R M'
b b₁ : Basis ι R M
i✝ : ι
c : R
x✝ : M
b' : Basis ι' R M'
e : ι ≃ ι'
inst✝¹ : Fintype ι
inst✝ : DecidableEq M
x : M
i : ι
h : optParam (b i ∈ Finset.image (⇑b) Finset.univ) ⋯
⊢ (b.reindexFinsetRange.repr x) ⟨b i, h⟩ = (b.repr x) i
state_after: no goals
tactic: simp [reindexFinsetRange]
Theorem: Set.infsep_pair
File: Mathlib/Topology/MetricSpace/Infsep.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
s t : Set α
⊢ {x, y}.infsep = dist x y
state_after: α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
s t : Set α
⊢ (ENNReal.ofReal (dist x y)).toReal = dist x y
tactic: rw [infsep_pair_eq_toReal, edist_dist]
state_before: α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
s t : Set α
⊢ (ENNReal.ofReal (dist x y)).toReal = dist x y
state_after: no goals
tactic: exact ENNReal.toReal_ofReal dist_nonneg
Theorem: Real.abs_exp_sub_one_sub_id_le
File: Mathlib/Data/Complex/Exponential.lean

Proof steps:
state_before: x : ℝ
hx : |x| ≤ 1
⊢ |rexp x - 1 - x| ≤ x ^ 2
state_after: x : ℝ
hx : |x| ≤ 1
⊢ |rexp x - 1 - x| ≤ |x| ^ 2
tactic: rw [← _root_.sq_abs]
state_before: x : ℝ
hx : |x| ≤ 1
⊢ |rexp x - 1 - x| ≤ |x| ^ 2
state_after: x : ℝ
hx : |x| ≤ 1
this : Complex.abs ↑x ≤ 1
⊢ |rexp x - 1 - x| ≤ |x| ^ 2
tactic: have : Complex.abs x ≤ 1 := mod_cast hx
state_before: x : ℝ
hx : |x| ≤ 1
this : Complex.abs ↑x ≤ 1
⊢ |rexp x - 1 - x| ≤ |x| ^ 2
state_after: x : ℝ
hx : |x| ≤ 1
this✝ : Complex.abs ↑x ≤ 1
this : Complex.abs (cexp ↑x - 1 - ↑x) ≤ Complex.abs ↑x ^ 2
⊢ |rexp x - 1 - x| ≤ |x| ^ 2
tactic: have := Complex.abs_exp_sub_one_sub_id_le this
state_before: x : ℝ
hx : |x| ≤ 1
this✝ : Complex.abs ↑x ≤ 1
this : Complex.abs (cexp ↑x - 1 - ↑x) ≤ Complex.abs ↑x ^ 2
⊢ |rexp x - 1 - x| ≤ |x| ^ 2
state_after: x : ℝ
hx : |x| ≤ 1
this✝ : Complex.abs ↑x ≤ 1
this : |rexp x - 1 - x| ≤ |x| ^ 2
⊢ |rexp x - 1 - x| ≤ |x| ^ 2
tactic: rw [← ofReal_one, ← ofReal_exp, ← ofReal_sub, ← ofReal_sub, abs_ofReal, abs_ofReal] at this
state_before: x : ℝ
hx : |x| ≤ 1
this✝ : Complex.abs ↑x ≤ 1
this : |rexp x - 1 - x| ≤ |x| ^ 2
⊢ |rexp x - 1 - x| ≤ |x| ^ 2
state_after: no goals
tactic: exact this
Theorem: Polynomial.opRingEquiv_symm_monomial
File: Mathlib/RingTheory/Polynomial/Opposites.lean

Proof steps:
state_before: R : Type u_1
inst✝ : Semiring R
n : ℕ
r : Rᵐᵒᵖ
⊢ (opRingEquiv R) ((opRingEquiv R).symm ((monomial n) r)) = (opRingEquiv R) (op ((monomial n) (unop r)))
state_after: no goals
tactic: simp
Theorem: List.tails_reverse
File: Mathlib/Data/List/Infix.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a b : α
m n : ℕ
l : List α
⊢ l.reverse.tails = (map reverse l.inits).reverse
state_after: α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a b : α
m n : ℕ
l : List α
⊢ l.reverse.tails = (map reverse (map reverse l.reverse.tails).reverse).reverse
tactic: rw [inits_eq_tails l]
state_before: α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a b : α
m n : ℕ
l : List α
⊢ l.reverse.tails = (map reverse (map reverse l.reverse.tails).reverse).reverse
state_after: no goals
tactic: simp [reverse_involutive.comp_self, ← map_reverse]
Theorem: Set.image_add_left'
File: Mathlib/Data/Set/Pointwise/Basic.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Group α
s t : Set α
a b : α
⊢ (fun x => a⁻¹ * x) '' t = (fun x => a * x) ⁻¹' t
state_after: no goals
tactic: simp
Theorem: Filter.hasBasis_iInf_of_directed
File: Mathlib/Order/Filter/Bases.lean

Proof steps:
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' : ι'✝
ι : Type u_6
ι' : Type u_7
inst✝ : Nonempty ι
l : ι → Filter α
s : ι → ι' → Set α
p : ι → ι' → Prop
hl : ∀ (i : ι), (l i).HasBasis (p i) (s i)
h : Directed (fun x x_1 => x ≥ x_1) l
⊢ (⨅ i, l i).HasBasis (fun ii' => p ii'.1 ii'.2) fun ii' => s ii'.1 ii'.2
state_after: α : 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' : ι'✝
ι : Type u_6
ι' : Type u_7
inst✝ : Nonempty ι
l : ι → Filter α
s : ι → ι' → Set α
p : ι → ι' → Prop
hl : ∀ (i : ι), (l i).HasBasis (p i) (s i)
h : Directed (fun x x_1 => x ≥ x_1) l
t : Set α
⊢ t ∈ ⨅ i, l i ↔ ∃ i, p i.1 i.2 ∧ s i.1 i.2 ⊆ t
tactic: refine ⟨fun t => ?_⟩
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' : ι'✝
ι : Type u_6
ι' : Type u_7
inst✝ : Nonempty ι
l : ι → Filter α
s : ι → ι' → Set α
p : ι → ι' → Prop
hl : ∀ (i : ι), (l i).HasBasis (p i) (s i)
h : Directed (fun x x_1 => x ≥ x_1) l
t : Set α
⊢ t ∈ ⨅ i, l i ↔ ∃ i, p i.1 i.2 ∧ s i.1 i.2 ⊆ t
state_after: α : 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' : ι'✝
ι : Type u_6
ι' : Type u_7
inst✝ : Nonempty ι
l : ι → Filter α
s : ι → ι' → Set α
p : ι → ι' → Prop
hl : ∀ (i : ι), (l i).HasBasis (p i) (s i)
h : Directed (fun x x_1 => x ≥ x_1) l
t : Set α
⊢ (∃ i, t ∈ l i) ↔ ∃ a b, p (a, b).1 (a, b).2 ∧ s (a, b).1 (a, b).2 ⊆ t
tactic: rw [mem_iInf_of_directed h, Prod.exists]
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' : ι'✝
ι : Type u_6
ι' : Type u_7
inst✝ : Nonempty ι
l : ι → Filter α
s : ι → ι' → Set α
p : ι → ι' → Prop
hl : ∀ (i : ι), (l i).HasBasis (p i) (s i)
h : Directed (fun x x_1 => x ≥ x_1) l
t : Set α
⊢ (∃ i, t ∈ l i) ↔ ∃ a b, p (a, b).1 (a, b).2 ∧ s (a, b).1 (a, b).2 ⊆ t
state_after: no goals
tactic: exact exists_congr fun i => (hl i).mem_iff
Theorem: Rat.den_mk
File: Mathlib/Data/Rat/Lemmas.lean

Proof steps:
state_before: n d : ℤ
⊢ (n /. d).den = if d = 0 then 1 else d.natAbs / n.gcd d
state_after: n d : ℤ
this : ∀ (m : ℕ), (↑m + 1).natAbs = m + 1
⊢ (n /. d).den = if d = 0 then 1 else d.natAbs / n.gcd d
tactic: have (m : ℕ) : Int.natAbs (m + 1) = m + 1 := by
    rw [← Nat.cast_one, ← Nat.cast_add, Int.natAbs_cast]
state_before: n d : ℤ
this : ∀ (m : ℕ), (↑m + 1).natAbs = m + 1
⊢ (n /. d).den = if d = 0 then 1 else d.natAbs / n.gcd d
state_after: no goals
tactic: rcases d with ((_ | _) | _) <;>
    simp [divInt, mkRat, Rat.normalize, Nat.succPNat, Int.sign, Int.gcd,
      if_neg (Nat.cast_add_one_ne_zero _), this]