tasksource/leandojo huggingface dataset:
Theorem: Field.DirectLimit.exists_inv
File: Mathlib/Algebra/DirectLimit.lean

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

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

tactic: rw [Int.covby_iff_succ_eq, sub_add_cancel]
state_before: z : ℤ
⊢ z - 1 ⋖ z
Theorem: Dfinsupp.erase_eq_sub_single
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: ext j
state_before: ι : Type u
γ : Type w
β✝ : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β✝ i)
s : Finset ι
x : (i : ↑↑s) → β✝ ↑i
i✝ : ι
β : ι → Type u_1
inst✝ : (i : ι) → AddGroup (β i)
f : Π₀ (i : ι), β i
i : ι
⊢ erase i f = f - single i (↑f i)

tactic: rcases eq_or_ne i j with (rfl | h)
state_before: case h
ι : Type u
γ : Type w
β✝ : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β✝ i)
s : Finset ι
x : (i : ↑↑s) → β✝ ↑i
i✝ : ι
β : ι → Type u_1
inst✝ : (i : ι) → AddGroup (β i)
f : Π₀ (i : ι), β i
i j : ι
⊢ ↑(erase i f) j = ↑(f - single i (↑f i)) j

tactic: simp
state_before: case h.inl
ι : Type u
γ : Type w
β✝ : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β✝ i)
s : Finset ι
x : (i : ↑↑s) → β✝ ↑i
i✝ : ι
β : ι → Type u_1
inst✝ : (i : ι) → AddGroup (β i)
f : Π₀ (i : ι), β i
i : ι
⊢ ↑(erase i f) i = ↑(f - single i (↑f i)) i

tactic: simp [erase_ne h.symm, single_eq_of_ne h, @eq_comm _ j, h]
state_before: case h.inr
ι : Type u
γ : Type w
β✝ : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β✝ i)
s : Finset ι
x : (i : ↑↑s) → β✝ ↑i
i✝ : ι
β : ι → Type u_1
inst✝ : (i : ι) → AddGroup (β i)
f : Π₀ (i : ι), β i
i j : ι
h : i ≠ j
⊢ ↑(erase i f) j = ↑(f - single i (↑f i)) j
Theorem: Multiset.Nat.mem_antidiagonal
File: Mathlib/Data/Multiset/NatAntidiagonal.lean

tactic: rw [antidiagonal, mem_coe, List.Nat.mem_antidiagonal]
state_before: n : ℕ
x : ℕ × ℕ
⊢ x ∈ antidiagonal n ↔ x.fst + x.snd = n
Theorem: measurable_iUnionLift
File: Mathlib/MeasureTheory/MeasurableSpace.lean

tactic: rw [preimage_iUnionLift]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.92448
δ : Type ?u.92451
δ' : Type ?u.92454
ι : Sort uι
s✝ t✝ u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝ : Countable ι
t : ι → Set α
f : (i : ι) → ↑(t i) → β
htf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ t i) (hxj : x ∈ t j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ ⋃ (i : ι), t i
htm : ∀ (i : ι), MeasurableSet (t i)
hfm : ∀ (i : ι), Measurable (f i)
s : Set β
hs : MeasurableSet s
⊢ MeasurableSet (iUnionLift t f htf T hT ⁻¹' s)

tactic: exact .preimage (.iUnion fun i => .image_inclusion _ (htm _) (hfm i hs)) (measurable_inclusion _)
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.92448
δ : Type ?u.92451
δ' : Type ?u.92454
ι : Sort uι
s✝ t✝ u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝ : Countable ι
t : ι → Set α
f : (i : ι) → ↑(t i) → β
htf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ t i) (hxj : x ∈ t j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ ⋃ (i : ι), t i
htm : ∀ (i : ι), MeasurableSet (t i)
hfm : ∀ (i : ι), Measurable (f i)
s : Set β
hs : MeasurableSet s
⊢ MeasurableSet (inclusion hT ⁻¹' ⋃ (i : ι), inclusion (_ : t i ⊆ ⋃ (i : ι), t i) '' (f i ⁻¹' s))
Theorem: FormalMultilinearSeries.changeOriginSeries_summable_aux₂
File: Mathlib/Analysis/Analytic/Basic.lean

tactic: rcases ENNReal.lt_iff_exists_add_pos_lt.1 hr with ⟨r', h0, hr'⟩
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type ?u.1515814
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
p : FormalMultilinearSeries 𝕜 E F
x y : E
r R : ℝ≥0
hr : ↑r < radius p
k : ℕ
⊢ Summable fun s => ‖p (k + s.fst)‖₊ * r ^ s.fst

tactic: simpa only [mul_inv_cancel_right₀ (pow_pos h0 _).ne'] using
  ((NNReal.summable_sigma.1 (p.changeOriginSeries_summable_aux₁ hr')).1 k).mul_right (r' ^ k)⁻¹
state_before: case intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type ?u.1515814
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
p : FormalMultilinearSeries 𝕜 E F
x y : E
r R : ℝ≥0
hr : ↑r < radius p
k : ℕ
r' : ℝ≥0
h0 : 0 < r'
hr' : ↑r + ↑r' < radius p
⊢ Summable fun s => ‖p (k + s.fst)‖₊ * r ^ s.fst
Theorem: inv_mul_cancel_left
File: Mathlib/Algebra/Group/Defs.lean

tactic: rw [← mul_assoc, mul_left_inv, one_mul]
state_before: G : Type u_1
inst✝ : Group G
a✝ b✝ c a b : G
⊢ a⁻¹ * (a * b) = b
Theorem: Matrix.det_conj_of_mul_eq_one
File: Mathlib/LinearAlgebra/Determinant.lean

tactic: rw [← det_comm' hM'M hMM', ← Matrix.mul_assoc, hM'M, Matrix.one_mul]
state_before: R : Type ?u.33943
inst✝¹¹ : CommRing R
M✝ : Type ?u.33949
inst✝¹⁰ : AddCommGroup M✝
inst✝⁹ : Module R M✝
M'✝ : Type ?u.34534
inst✝⁸ : AddCommGroup M'✝
inst✝⁷ : Module R M'✝
ι : Type ?u.35076
inst✝⁶ : DecidableEq ι
inst✝⁵ : Fintype ι
e : Basis ι R M✝
A : Type u_3
inst✝⁴ : CommRing A
m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
inst✝¹ : DecidableEq m
inst✝ : DecidableEq n
M : Matrix m n A
M' : Matrix n m A
N : Matrix n n A
hMM' : M ⬝ M' = 1
hM'M : M' ⬝ M = 1
⊢ det (M ⬝ N ⬝ M') = det N
Theorem: compact_covered_by_mul_left_translates
File: Mathlib/Topology/Algebra/Group/Basic.lean

tactic: exact ⟨t, Subset.trans ht <| iUnion₂_mono fun g _ => interior_subset⟩
state_before: case intro
α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
K V : Set G
hK : IsCompact K
hV : Set.Nonempty (interior V)
t : Finset G
ht : K ⊆ ⋃ (x : G) (h : x ∈ t), interior ((fun x_1 x_2 => x_1 * x_2) x ⁻¹' V)
⊢ ∃ t, K ⊆ ⋃ (g : G) (_ : g ∈ t), (fun h => g * h) ⁻¹' V

tactic: cases' hV with g₀ hg₀
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
K V : Set G
hK : IsCompact K
hV : Set.Nonempty (interior V)
⊢ K ⊆ ⋃ (i : G), (fun x => interior ((fun x x_1 => x * x_1) x ⁻¹' V)) i

tactic: refine' fun g _ => mem_iUnion.2 ⟨g₀ * g⁻¹, _⟩
state_before: case intro
α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
K V : Set G
hK : IsCompact K
g₀ : G
hg₀ : g₀ ∈ interior V
⊢ K ⊆ ⋃ (i : G), (fun x => interior ((fun x x_1 => x * x_1) x ⁻¹' V)) i

tactic: refine' preimage_interior_subset_interior_preimage (continuous_const.mul continuous_id) _
state_before: case intro
α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
K V : Set G
hK : IsCompact K
g₀ : G
hg₀ : g₀ ∈ interior V
g : G
x✝ : g ∈ K
⊢ g ∈ (fun x => interior ((fun x x_1 => x * x_1) x ⁻¹' V)) (g₀ * g⁻¹)

tactic: rwa [mem_preimage, id_def, inv_mul_cancel_right]
state_before: case intro
α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
K V : Set G
hK : IsCompact K
g₀ : G
hg₀ : g₀ ∈ interior V
g : G
x✝ : g ∈ K
⊢ g ∈ (fun x => g₀ * g⁻¹ * id x) ⁻¹' interior V
Theorem: Finset.image_sdiff
File: Mathlib/Data/Finset/Image.lean

tactic: push_cast
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.93853
inst✝¹ : DecidableEq β
f✝ g : α → β
s✝ : Finset α
t✝ : Finset β
a : α
b c : β
inst✝ : DecidableEq α
f : α → β
s t : Finset α
hf : Injective f
⊢ ↑(image f (s \ t)) = ↑(image f s \ image f t)

tactic: exact Set.image_diff hf _ _
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.93853
inst✝¹ : DecidableEq β
f✝ g : α → β
s✝ : Finset α
t✝ : Finset β
a : α
b c : β
inst✝ : DecidableEq α
f : α → β
s t : Finset α
hf : Injective f
⊢ f '' (↑s \ ↑t) = f '' ↑s \ f '' ↑t
Theorem: CompositionSeries.toList_ne_nil
File: Mathlib/Order/JordanHolder.lean

tactic: rw [← List.length_pos_iff_ne_nil, length_toList]
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s : CompositionSeries X
⊢ toList s ≠ []

tactic: exact Nat.succ_pos _
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s : CompositionSeries X
⊢ 0 < s.length + 1
Theorem: Set.mk_preimage_tprod
File: Mathlib/Data/Prod/TProd.lean

tactic: simp [Set.tprod]
state_before: ι : Type u
α : ι → Type v
i j : ι
l : List ι
f : (i : ι) → α i
t : (i : ι) → Set (α i)
⊢ TProd.mk [] ⁻¹' Set.tprod [] t = pi {i | i ∈ []} t

tactic: ext f
state_before: ι : Type u
α : ι → Type v
i✝ j : ι
l✝ : List ι
f : (i : ι) → α i
i : ι
l : List ι
t : (i : ι) → Set (α i)
⊢ TProd.mk (i :: l) ⁻¹' Set.tprod (i :: l) t = pi {i_1 | i_1 ∈ i :: l} t

tactic: have h : TProd.mk l f ∈ Set.tprod l t ↔ ∀ i : ι, i ∈ l → f i ∈ t i := by
  change f ∈ TProd.mk l ⁻¹' Set.tprod l t ↔ f ∈ { x | x ∈ l }.pi t
  rw [mk_preimage_tprod l t]
state_before: case h
ι : Type u
α : ι → Type v
i✝ j : ι
l✝ : List ι
f✝ : (i : ι) → α i
i : ι
l : List ι
t : (i : ι) → Set (α i)
f : (i : ι) → α i
⊢ f ∈ TProd.mk (i :: l) ⁻¹' Set.tprod (i :: l) t ↔ f ∈ pi {i_1 | i_1 ∈ i :: l} t

tactic: rw [Set.tprod, TProd.mk, mem_preimage, mem_pi, prod_mk_mem_set_prod_eq]
state_before: case h
ι : Type u
α : ι → Type v
i✝ j : ι
l✝ : List ι
f✝ : (i : ι) → α i
i : ι
l : List ι
t : (i : ι) → Set (α i)
f : (i : ι) → α i
h : TProd.mk l f ∈ Set.tprod l t ↔ ∀ (i : ι), i ∈ l → f i ∈ t i
⊢ f ∈ TProd.mk (i :: l) ⁻¹' Set.tprod (i :: l) t ↔ f ∈ pi {i_1 | i_1 ∈ i :: l} t

tactic: simp_rw [mem_setOf_eq, mem_cons]
state_before: case h
ι : Type u
α : ι → Type v
i✝ j : ι
l✝ : List ι
f✝ : (i : ι) → α i
i : ι
l : List ι
t : (i : ι) → Set (α i)
f : (i : ι) → α i
h : TProd.mk l f ∈ Set.tprod l t ↔ ∀ (i : ι), i ∈ l → f i ∈ t i
⊢ f i ∈ t i ∧ TProd.mk l f ∈ Set.tprod l t ↔ ∀ (i_1 : ι), i_1 ∈ {i_2 | i_2 ∈ i :: l} → f i_1 ∈ t i_1

tactic: rw [forall_eq_or_imp, and_congr_right_iff]
state_before: case h
ι : Type u
α : ι → Type v
i✝ j : ι
l✝ : List ι
f✝ : (i : ι) → α i
i : ι
l : List ι
t : (i : ι) → Set (α i)
f : (i : ι) → α i
h : TProd.mk l f ∈ Set.tprod l t ↔ ∀ (i : ι), i ∈ l → f i ∈ t i
⊢ f i ∈ t i ∧ TProd.mk l f ∈ Set.tprod l t ↔ ∀ (i_1 : ι), i_1 = i ∨ i_1 ∈ l → f i_1 ∈ t i_1

tactic: exact fun _ => h
state_before: case h
ι : Type u
α : ι → Type v
i✝ j : ι
l✝ : List ι
f✝ : (i : ι) → α i
i : ι
l : List ι
t : (i : ι) → Set (α i)
f : (i : ι) → α i
h : TProd.mk l f ∈ Set.tprod l t ↔ ∀ (i : ι), i ∈ l → f i ∈ t i
⊢ f i ∈ t i → (TProd.mk l f ∈ Set.tprod l t ↔ ∀ (a : ι), a ∈ l → f a ∈ t a)

tactic: change f ∈ TProd.mk l ⁻¹' Set.tprod l t ↔ f ∈ { x | x ∈ l }.pi t
state_before: ι : Type u
α : ι → Type v
i✝ j : ι
l✝ : List ι
f✝ : (i : ι) → α i
i : ι
l : List ι
t : (i : ι) → Set (α i)
f : (i : ι) → α i
⊢ TProd.mk l f ∈ Set.tprod l t ↔ ∀ (i : ι), i ∈ l → f i ∈ t i

tactic: rw [mk_preimage_tprod l t]
state_before: ι : Type u
α : ι → Type v
i✝ j : ι
l✝ : List ι
f✝ : (i : ι) → α i
i : ι
l : List ι
t : (i : ι) → Set (α i)
f : (i : ι) → α i
⊢ f ∈ TProd.mk l ⁻¹' Set.tprod l t ↔ f ∈ pi {x | x ∈ l} t
Theorem: Subgroup.mem_normalizer_iff''
File: Mathlib/GroupTheory/Subgroup/Basic.lean

tactic: rw [← inv_mem_iff (x := g), mem_normalizer_iff, inv_inv]
state_before: G : Type u_1
G' : Type ?u.379936
inst✝² : Group G
inst✝¹ : Group G'
A : Type ?u.379945
inst✝ : AddGroup A
H K : Subgroup G
g : G
⊢ g ∈ normalizer H ↔ ∀ (h : G), h ∈ H ↔ g⁻¹ * h * g ∈ H
Theorem: zero_geom_sum
File: Mathlib/Algebra/GeomSum.lean

tactic: simp
state_before: α : Type u
inst✝ : Semiring α
⊢ ∑ i in range 0, 0 ^ i = if 0 = 0 then 0 else 1

tactic: simp
state_before: α : Type u
inst✝ : Semiring α
⊢ ∑ i in range 1, 0 ^ i = if 1 = 0 then 0 else 1

tactic: rw [geom_sum_succ']
state_before: α : Type u
inst✝ : Semiring α
n : ℕ
⊢ ∑ i in range (n + 2), 0 ^ i = if n + 2 = 0 then 0 else 1

tactic: simp [zero_geom_sum]
state_before: α : Type u
inst✝ : Semiring α
n : ℕ
⊢ 0 ^ (n + 1) + ∑ i in range (n + 1), 0 ^ i = if n + 2 = 0 then 0 else 1
Theorem: Pretrivialization.apply_mk_symm
File: Mathlib/Topology/FiberBundle/Trivialization.lean

tactic: rw [e.mk_symm hb, e.apply_symm_apply (e.mk_mem_target.mpr hb)]
state_before: ι : Type ?u.17161
B : Type u_1
F : Type u_2
E : B → Type u_3
Z : Type ?u.17175
inst✝² : TopologicalSpace B
inst✝¹ : TopologicalSpace F
proj : Z → B
e✝ : Pretrivialization F proj
x : Z
e' : Pretrivialization F TotalSpace.proj
x' : TotalSpace E
b✝ : B
y✝ : E b✝
inst✝ : (x : B) → Zero (E x)
e : Pretrivialization F TotalSpace.proj
b : B
hb : b ∈ e.baseSet
y : F
⊢ ↑e (totalSpaceMk b (Pretrivialization.symm e b y)) = (b, y)
Theorem: Nat.floor_eq_zero
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [← lt_one_iff, ← @cast_one α]
state_before: F : Type ?u.36275
α : Type u_1
β : Type ?u.36281
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a : α
n : ℕ
⊢ ⌊a⌋₊ = 0 ↔ a < 1

tactic: exact floor_lt' Nat.one_ne_zero
state_before: F : Type ?u.36275
α : Type u_1
β : Type ?u.36281
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a : α
n : ℕ
⊢ ⌊a⌋₊ < 1 ↔ a < ↑1
Theorem: MeasurableSpace.empty_mem_generateMeasurableRec
File: Mathlib/MeasureTheory/CardMeasurableSpace.lean

tactic: unfold generateMeasurableRec
state_before: α : Type u
s : Set (Set α)
i : (Quotient.out (ord (aleph 1))).α
⊢ ∅ ∈ generateMeasurableRec s i

tactic: exact mem_union_left _ (mem_union_left _ (mem_union_right _ (mem_singleton ∅)))
state_before: α : Type u
s : Set (Set α)
i : (Quotient.out (ord (aleph 1))).α
⊢ ∅ ∈
    let i := i;
    let S := ⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j;
    s ∪ {∅} ∪ compl '' S ∪ range fun f => ⋃ (n : ℕ), ↑(f n)
Theorem: EMetric.mk_uniformity_basis
File: Mathlib/Topology/MetricSpace/EMetricSpace.lean

tactic: refine' ⟨fun s => uniformity_basis_edist.mem_iff.trans _⟩
state_before: α : Type u
β✝ : Type v
X : Type ?u.16479
inst✝ : PseudoEMetricSpace α
β : Type u_1
p : β → Prop
f : β → ℝ≥0∞
hf₀ : ∀ (x : β), p x → 0 < f x
hf : ∀ (ε : ℝ≥0∞), 0 < ε → ∃ x, p x ∧ f x ≤ ε
⊢ HasBasis (𝓤 α) p fun x => {p | edist p.fst p.snd < f x}

tactic: constructor
state_before: α : Type u
β✝ : Type v
X : Type ?u.16479
inst✝ : PseudoEMetricSpace α
β : Type u_1
p : β → Prop
f : β → ℝ≥0∞
hf₀ : ∀ (x : β), p x → 0 < f x
hf : ∀ (ε : ℝ≥0∞), 0 < ε → ∃ x, p x ∧ f x ≤ ε
s : Set (α × α)
⊢ (∃ i, 0 < i ∧ {p | edist p.fst p.snd < i} ⊆ s) ↔ ∃ i, p i ∧ {p | edist p.fst p.snd < f i} ⊆ s

tactic: rintro ⟨ε, ε₀, hε⟩
state_before: case mp
α : Type u
β✝ : Type v
X : Type ?u.16479
inst✝ : PseudoEMetricSpace α
β : Type u_1
p : β → Prop
f : β → ℝ≥0∞
hf₀ : ∀ (x : β), p x → 0 < f x
hf : ∀ (ε : ℝ≥0∞), 0 < ε → ∃ x, p x ∧ f x ≤ ε
s : Set (α × α)
⊢ (∃ i, 0 < i ∧ {p | edist p.fst p.snd < i} ⊆ s) → ∃ i, p i ∧ {p | edist p.fst p.snd < f i} ⊆ s

tactic: rcases hf ε ε₀ with ⟨i, hi, H⟩
state_before: case mp.intro.intro
α : Type u
β✝ : Type v
X : Type ?u.16479
inst✝ : PseudoEMetricSpace α
β : Type u_1
p : β → Prop
f : β → ℝ≥0∞
hf₀ : ∀ (x : β), p x → 0 < f x
hf : ∀ (ε : ℝ≥0∞), 0 < ε → ∃ x, p x ∧ f x ≤ ε
s : Set (α × α)
ε : ℝ≥0∞
ε₀ : 0 < ε
hε : {p | edist p.fst p.snd < ε} ⊆ s
⊢ ∃ i, p i ∧ {p | edist p.fst p.snd < f i} ⊆ s

tactic: exact ⟨i, hi, fun x hx => hε <| lt_of_lt_of_le hx.out H⟩
state_before: case mp.intro.intro.intro.intro
α : Type u
β✝ : Type v
X : Type ?u.16479
inst✝ : PseudoEMetricSpace α
β : Type u_1
p : β → Prop
f : β → ℝ≥0∞
hf₀ : ∀ (x : β), p x → 0 < f x
hf : ∀ (ε : ℝ≥0∞), 0 < ε → ∃ x, p x ∧ f x ≤ ε
s : Set (α × α)
ε : ℝ≥0∞
ε₀ : 0 < ε
hε : {p | edist p.fst p.snd < ε} ⊆ s
i : β
hi : p i
H : f i ≤ ε
⊢ ∃ i, p i ∧ {p | edist p.fst p.snd < f i} ⊆ s

tactic: exact fun ⟨i, hi, H⟩ => ⟨f i, hf₀ i hi, H⟩
state_before: case mpr
α : Type u
β✝ : Type v
X : Type ?u.16479
inst✝ : PseudoEMetricSpace α
β : Type u_1
p : β → Prop
f : β → ℝ≥0∞
hf₀ : ∀ (x : β), p x → 0 < f x
hf : ∀ (ε : ℝ≥0∞), 0 < ε → ∃ x, p x ∧ f x ≤ ε
s : Set (α × α)
⊢ (∃ i, p i ∧ {p | edist p.fst p.snd < f i} ⊆ s) → ∃ i, 0 < i ∧ {p | edist p.fst p.snd < i} ⊆ s
Theorem: rank_self
File: Mathlib/LinearAlgebra/Dimension.lean

tactic: rw [← Cardinal.lift_inj, ← (Basis.singleton PUnit R).mk_eq_rank, Cardinal.mk_punit]
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type ?u.445169
R : Type u
inst✝³ : Ring R
inst✝² : StrongRankCondition R
M : Type v
inst✝¹ : AddCommGroup M
inst✝ : Module R M
⊢ Module.rank R R = 1
Theorem: Function.update_injective
File: Mathlib/Logic/Function/Basic.lean

tactic: have := congr_fun h a'
state_before: α : Sort u
β : α → Sort v
α' : Sort w
inst✝¹ : DecidableEq α
inst✝ : DecidableEq α'
f✝ g : (a : α) → β a
a : α
b : β a
f : (a : α) → β a
a' : α
v v' : β a'
h : update f a' v = update f a' v'
⊢ v = v'

tactic: rwa [update_same, update_same] at this
state_before: α : Sort u
β : α → Sort v
α' : Sort w
inst✝¹ : DecidableEq α
inst✝ : DecidableEq α'
f✝ g : (a : α) → β a
a : α
b : β a
f : (a : α) → β a
a' : α
v v' : β a'
h : update f a' v = update f a' v'
this : update f a' v a' = update f a' v' a'
⊢ v = v'
Theorem: Fintype.coe_image_univ
File: Mathlib/Data/Fintype/Basic.lean

tactic: ext x
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.120186
inst✝¹ : Fintype α
inst✝ : DecidableEq β
f : α → β
⊢ ↑(image f univ) = Set.range f

tactic: simp
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.120186
inst✝¹ : Fintype α
inst✝ : DecidableEq β
f : α → β
x : β
⊢ x ∈ ↑(image f univ) ↔ x ∈ Set.range f
Theorem: MeasureTheory.piPremeasure_pi
File: Mathlib/MeasureTheory/Constructions/Pi.lean

tactic: simp [hs, piPremeasure]
state_before: ι : Type u_2
ι' : Type ?u.1293941
α : ι → Type u_1
inst✝ : Fintype ι
m : (i : ι) → OuterMeasure (α i)
s : (i : ι) → Set (α i)
hs : Set.Nonempty (Set.pi univ s)
⊢ piPremeasure m (Set.pi univ s) = ∏ i : ι, ↑(m i) (s i)
Theorem: Nat.Primrec.pow
File: Mathlib/Computability/Primrec.lean

tactic: simp
state_before: p : ℕ
⊢ unpaired
      (fun z n =>
        Nat.rec 1
          (fun y IH =>
            unpaired (fun x x_1 => x * x_1)
              (Nat.pair (unpair (unpair (Nat.pair z (Nat.pair y IH))).snd).snd
                (unpair (Nat.pair z (Nat.pair y IH))).fst))
          n)
      p =
    unpaired (fun x x_1 => x ^ x_1) p

tactic: induction p.unpair.2 <;> simp [*, pow_succ]
state_before: p : ℕ
⊢ Nat.rec 1 (fun y IH => IH * (unpair p).fst) (unpair p).snd = (unpair p).fst ^ (unpair p).snd
Theorem: Fin.addCases_left
File: Mathlib/Data/Fin/Basic.lean

tactic: cases' i with i hi
state_before: n✝ m✝ m n : ℕ
C : Fin (m + n) → Sort u_1
hleft : (i : Fin m) → C (↑(castAdd n) i)
hright : (i : Fin n) → C (↑(natAdd m) i)
i : Fin m
⊢ addCases hleft hright (↑(castAdd n) i) = hleft i

tactic: rw [addCases, dif_pos (castAdd_lt _ _)]
state_before: case mk
n✝ m✝ m n : ℕ
C : Fin (m + n) → Sort u_1
hleft : (i : Fin m) → C (↑(castAdd n) i)
hright : (i : Fin n) → C (↑(natAdd m) i)
i : ℕ
hi : i < m
⊢ addCases hleft hright (↑(castAdd n) { val := i, isLt := hi }) = hleft { val := i, isLt := hi }

tactic: rfl
state_before: case mk
n✝ m✝ m n : ℕ
C : Fin (m + n) → Sort u_1
hleft : (i : Fin m) → C (↑(castAdd n) i)
hright : (i : Fin n) → C (↑(natAdd m) i)
i : ℕ
hi : i < m
⊢ (_ :
        ↑(castAdd n)
            (castLT (↑(castAdd n) { val := i, isLt := hi }) (_ : ↑(↑(castAdd n) { val := i, isLt := hi }) < m)) =
          ↑(castAdd n) { val := i, isLt := hi }) ▸
      hleft (castLT (↑(castAdd n) { val := i, isLt := hi }) (_ : ↑(↑(castAdd n) { val := i, isLt := hi }) < m)) =
    hleft { val := i, isLt := hi }
Theorem: Polynomial.eval_nat_cast_map
File: Mathlib/Data/Polynomial/Eval.lean

tactic: induction p using Polynomial.induction_on' with
| h_add p q hp hq =>
  simp only [hp, hq, Polynomial.map_add, RingHom.map_add, eval_add]
| h_monomial n r =>
  simp only [map_natCast f, eval_monomial, map_monomial, f.map_pow, f.map_mul]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
f✝ f : R →+* S
p : R[X]
n : ℕ
⊢ eval (↑n) (map f p) = ↑f (eval (↑n) p)

tactic: simp only [hp, hq, Polynomial.map_add, RingHom.map_add, eval_add]
state_before: case h_add
R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p✝ q✝ r : R[X]
inst✝ : Semiring S
f✝ f : R →+* S
n : ℕ
p q : R[X]
hp : eval (↑n) (map f p) = ↑f (eval (↑n) p)
hq : eval (↑n) (map f q) = ↑f (eval (↑n) q)
⊢ eval (↑n) (map f (p + q)) = ↑f (eval (↑n) (p + q))

tactic: simp only [map_natCast f, eval_monomial, map_monomial, f.map_pow, f.map_mul]
state_before: case h_monomial
R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n✝¹ : ℕ
inst✝¹ : Semiring R
p q r✝ : R[X]
inst✝ : Semiring S
f✝ f : R →+* S
n✝ n : ℕ
r : R
⊢ eval (↑n✝) (map f (↑(monomial n) r)) = ↑f (eval (↑n✝) (↑(monomial n) r))
Theorem: Fin.map_valEmbedding_Iic
File: Mathlib/Data/Fin/Interval.lean

tactic: simp [Iic_eq_finset_subtype, Finset.fin, Finset.map_map, Iic_filter_lt_of_lt_right]
state_before: n : ℕ
a b : Fin n
⊢ map valEmbedding (Iic b) = Iic ↑b
Theorem: Ordnode.dual_eraseMax
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: rw [← dual_dual (eraseMin _), dual_eraseMin, dual_dual]
state_before: α : Type u_1
t : Ordnode α
⊢ dual (eraseMax t) = eraseMin (dual t)
Theorem: Submonoid.LocalizationMap.epic_of_localizationMap
File: Mathlib/GroupTheory/MonoidLocalization.lean

tactic: rw [← f.lift_of_comp j, ← f.lift_of_comp k]
state_before: M : Type u_3
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_1
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
j k : N →* P
h : ∀ (a : M), ↑(MonoidHom.comp j (toMap f)) a = ↑(MonoidHom.comp k (toMap f)) a
⊢ j = k

tactic: congr 1 with x
state_before: M : Type u_3
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_1
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
j k : N →* P
h : ∀ (a : M), ↑(MonoidHom.comp j (toMap f)) a = ↑(MonoidHom.comp k (toMap f)) a
⊢ lift f (_ : ∀ (y : { x // x ∈ S }), IsUnit (↑(MonoidHom.comp j (toMap f)) ↑y)) =
    lift f (_ : ∀ (y : { x // x ∈ S }), IsUnit (↑(MonoidHom.comp k (toMap f)) ↑y))

tactic: exact h x
state_before: case e_g.h
M : Type u_3
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_1
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
j k : N →* P
h : ∀ (a : M), ↑(MonoidHom.comp j (toMap f)) a = ↑(MonoidHom.comp k (toMap f)) a
x : M
⊢ ↑(MonoidHom.comp j (toMap f)) x = ↑(MonoidHom.comp k (toMap f)) x